q2-tecton-elements 1.50.1 → 1.51.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.
Files changed (578) hide show
  1. package/dist/cjs/click-elsewhere_2.cjs.entry.js +21 -12
  2. package/dist/cjs/click-elsewhere_2.cjs.entry.js.map +1 -1
  3. package/dist/cjs/index-9aa4a776.js +235 -0
  4. package/dist/cjs/index-9aa4a776.js.map +1 -0
  5. package/dist/cjs/{index-43010ce4.js → index-f69742cf.js} +1 -1
  6. package/dist/cjs/{index-43010ce4.js.map → index-f69742cf.js.map} +1 -1
  7. package/dist/cjs/loader.cjs.js +1 -1
  8. package/dist/cjs/q2-action-group.cjs.entry.js +50 -0
  9. package/dist/cjs/q2-action-group.cjs.entry.js.map +1 -0
  10. package/dist/cjs/q2-action-sheet.cjs.entry.js +1364 -3
  11. package/dist/cjs/q2-action-sheet.cjs.entry.js.map +1 -1
  12. package/dist/cjs/q2-avatar.cjs.entry.js +1 -1
  13. package/dist/cjs/q2-badge_7.cjs.entry.js +23 -13
  14. package/dist/cjs/q2-badge_7.cjs.entry.js.map +1 -1
  15. package/dist/cjs/q2-calendar.cjs.entry.js +2 -2
  16. package/dist/cjs/q2-card.cjs.entry.js +1 -1
  17. package/dist/cjs/q2-carousel-pane.cjs.entry.js +3 -3
  18. package/dist/cjs/q2-carousel.cjs.entry.js +1 -1
  19. package/dist/cjs/q2-chart-area.cjs.entry.js +2 -2
  20. package/dist/cjs/q2-chart-area.cjs.entry.js.map +1 -1
  21. package/dist/cjs/q2-chart-bar.cjs.entry.js +2 -2
  22. package/dist/cjs/q2-chart-bar.cjs.entry.js.map +1 -1
  23. package/dist/cjs/q2-chart-donut.cjs.entry.js +16 -16
  24. package/dist/cjs/q2-chart-donut.cjs.entry.js.map +1 -1
  25. package/dist/cjs/q2-checkbox-group.cjs.entry.js +2 -2
  26. package/dist/cjs/q2-checkbox-group.cjs.entry.js.map +1 -1
  27. package/dist/cjs/q2-checkbox.cjs.entry.js +1 -1
  28. package/dist/cjs/q2-currency.cjs.entry.js +1 -1
  29. package/dist/cjs/q2-data-table.cjs.entry.js +62 -62
  30. package/dist/cjs/q2-data-table.cjs.entry.js.map +1 -1
  31. package/dist/cjs/q2-detail.cjs.entry.js +2 -2
  32. package/dist/cjs/q2-dropdown-item.cjs.entry.js +2 -2
  33. package/dist/cjs/q2-dropdown-item.cjs.entry.js.map +1 -1
  34. package/dist/cjs/q2-dropdown.cjs.entry.js +77 -5
  35. package/dist/cjs/q2-dropdown.cjs.entry.js.map +1 -1
  36. package/dist/cjs/q2-editable-field.cjs.entry.js +1 -1
  37. package/dist/cjs/q2-formatted-text.cjs.entry.js +72 -0
  38. package/dist/cjs/q2-formatted-text.cjs.entry.js.map +1 -0
  39. package/dist/cjs/q2-item.cjs.entry.js +2 -2
  40. package/dist/cjs/q2-legend.cjs.entry.js +2 -2
  41. package/dist/cjs/q2-legend.cjs.entry.js.map +1 -1
  42. package/dist/cjs/q2-link.cjs.entry.js +64 -0
  43. package/dist/cjs/q2-link.cjs.entry.js.map +1 -0
  44. package/dist/cjs/q2-list.cjs.entry.js +2 -2
  45. package/dist/cjs/q2-loc.cjs.entry.js +2 -2
  46. package/dist/cjs/q2-message.cjs.entry.js +2 -2
  47. package/dist/cjs/q2-month-picker.cjs.entry.js +3 -3
  48. package/dist/cjs/q2-optgroup.cjs.entry.js +2 -2
  49. package/dist/cjs/q2-option-list.cjs.entry.js +9 -4
  50. package/dist/cjs/q2-option-list.cjs.entry.js.map +1 -1
  51. package/dist/cjs/q2-option.cjs.entry.js +1 -1
  52. package/dist/cjs/q2-pagination.cjs.entry.js +90 -9
  53. package/dist/cjs/q2-pagination.cjs.entry.js.map +1 -1
  54. package/dist/cjs/q2-pill.cjs.entry.js +26 -5
  55. package/dist/cjs/q2-pill.cjs.entry.js.map +1 -1
  56. package/dist/cjs/q2-radio-group.cjs.entry.js +2 -2
  57. package/dist/cjs/q2-radio-group.cjs.entry.js.map +1 -1
  58. package/dist/cjs/q2-radio.cjs.entry.js +1 -1
  59. package/dist/cjs/q2-relative-time.cjs.entry.js +3 -3
  60. package/dist/cjs/q2-resize-observer.cjs.entry.js +96 -0
  61. package/dist/cjs/q2-resize-observer.cjs.entry.js.map +1 -0
  62. package/dist/cjs/q2-section.cjs.entry.js +27 -3
  63. package/dist/cjs/q2-section.cjs.entry.js.map +1 -1
  64. package/dist/cjs/q2-select.cjs.entry.js +7 -6
  65. package/dist/cjs/q2-select.cjs.entry.js.map +1 -1
  66. package/dist/cjs/q2-stepper-pane.cjs.entry.js +1 -1
  67. package/dist/cjs/q2-stepper-vertical.cjs.entry.js +2 -2
  68. package/dist/cjs/q2-stepper.cjs.entry.js +39 -3
  69. package/dist/cjs/q2-stepper.cjs.entry.js.map +1 -1
  70. package/dist/cjs/q2-tag.cjs.entry.js +3 -2
  71. package/dist/cjs/q2-tag.cjs.entry.js.map +1 -1
  72. package/dist/cjs/q2-tecton-elements.cjs.js +1 -1
  73. package/dist/cjs/q2-textarea.cjs.entry.js +46 -11
  74. package/dist/cjs/q2-textarea.cjs.entry.js.map +1 -1
  75. package/dist/cjs/q2-tooltip.cjs.entry.js +2 -2
  76. package/dist/cjs/q2-tooltip.cjs.entry.js.map +1 -1
  77. package/dist/cjs/tecton-tab-pane.cjs.entry.js +2 -2
  78. package/dist/collection/collection-manifest.json +4 -0
  79. package/dist/collection/components/q2-action-group/q2-action-group.css +99 -0
  80. package/dist/collection/components/q2-action-group/q2-action-group.js +120 -0
  81. package/dist/collection/components/q2-action-group/q2-action-group.js.map +1 -0
  82. package/dist/collection/components/q2-action-group/test/q2-action-group.e2e.js +30 -0
  83. package/dist/collection/components/q2-action-group/test/q2-action-group.e2e.js.map +1 -0
  84. package/dist/collection/components/q2-action-group/test/q2-action-group.spec.js +156 -0
  85. package/dist/collection/components/q2-action-group/test/q2-action-group.spec.js.map +1 -0
  86. package/dist/collection/components/q2-action-sheet/q2-action-sheet.js +3 -2
  87. package/dist/collection/components/q2-action-sheet/q2-action-sheet.js.map +1 -1
  88. package/dist/collection/components/q2-avatar/q2-avatar.js +1 -1
  89. package/dist/collection/components/q2-avatar/test/q2-avatar-test.e2e.js +14 -9
  90. package/dist/collection/components/q2-avatar/test/q2-avatar-test.e2e.js.map +1 -1
  91. package/dist/collection/components/q2-badge/test/q2-badge-test.e2e.js +14 -9
  92. package/dist/collection/components/q2-badge/test/q2-badge-test.e2e.js.map +1 -1
  93. package/dist/collection/components/q2-btn/test/q2-btn-test.e2e.js +14 -9
  94. package/dist/collection/components/q2-btn/test/q2-btn-test.e2e.js.map +1 -1
  95. package/dist/collection/components/q2-calendar/q2-month-picker.js +2 -2
  96. package/dist/collection/components/q2-calendar/test/q2-calendar-test.e2e.js +227 -223
  97. package/dist/collection/components/q2-calendar/test/q2-calendar-test.e2e.js.map +1 -1
  98. package/dist/collection/components/q2-card/test/q2-card-test.e2e.js +12 -7
  99. package/dist/collection/components/q2-card/test/q2-card-test.e2e.js.map +1 -1
  100. package/dist/collection/components/q2-carousel/test/q2-carousel-test.e2e.js +49 -45
  101. package/dist/collection/components/q2-carousel/test/q2-carousel-test.e2e.js.map +1 -1
  102. package/dist/collection/components/q2-carousel-pane/q2-carousel-pane.js +2 -2
  103. package/dist/collection/components/q2-chart-area/q2-chart-area.js +2 -2
  104. package/dist/collection/components/q2-chart-area/q2-chart-area.js.map +1 -1
  105. package/dist/collection/components/q2-chart-area/test/q2-chart-area-test.e2e.js +12 -7
  106. package/dist/collection/components/q2-chart-area/test/q2-chart-area-test.e2e.js.map +1 -1
  107. package/dist/collection/components/q2-chart-bar/q2-chart-bar.js +2 -2
  108. package/dist/collection/components/q2-chart-bar/q2-chart-bar.js.map +1 -1
  109. package/dist/collection/components/q2-chart-bar/test/q2-chart-bar-test.e2e.js +16 -11
  110. package/dist/collection/components/q2-chart-bar/test/q2-chart-bar-test.e2e.js.map +1 -1
  111. package/dist/collection/components/q2-chart-donut/q2-chart-donut.js +15 -15
  112. package/dist/collection/components/q2-chart-donut/q2-chart-donut.js.map +1 -1
  113. package/dist/collection/components/q2-chart-donut/test/q2-chart-donut-test.e2e.js +32 -26
  114. package/dist/collection/components/q2-chart-donut/test/q2-chart-donut-test.e2e.js.map +1 -1
  115. package/dist/collection/components/q2-checkbox/test/q2-checkbox-test.e2e.js +12 -7
  116. package/dist/collection/components/q2-checkbox/test/q2-checkbox-test.e2e.js.map +1 -1
  117. package/dist/collection/components/q2-checkbox-group/q2-checkbox-group.js +2 -2
  118. package/dist/collection/components/q2-checkbox-group/q2-checkbox-group.js.map +1 -1
  119. package/dist/collection/components/q2-checkbox-group/test/q2-checkbox-group-test.e2e.js +22 -17
  120. package/dist/collection/components/q2-checkbox-group/test/q2-checkbox-group-test.e2e.js.map +1 -1
  121. package/dist/collection/components/q2-currency/q2-currency.js +1 -1
  122. package/dist/collection/components/q2-currency/test/q2-currency-test.e2e.js +12 -7
  123. package/dist/collection/components/q2-currency/test/q2-currency-test.e2e.js.map +1 -1
  124. package/dist/collection/components/q2-data-table/q2-data-table.js +104 -104
  125. package/dist/collection/components/q2-data-table/q2-data-table.js.map +1 -1
  126. package/dist/collection/components/q2-data-table/test/q2-data-table-test.e2e.js +42 -24
  127. package/dist/collection/components/q2-data-table/test/q2-data-table-test.e2e.js.map +1 -1
  128. package/dist/collection/components/q2-detail/q2-detail.js +1 -1
  129. package/dist/collection/components/q2-detail/test/q2-detail-test.e2e.js +12 -7
  130. package/dist/collection/components/q2-detail/test/q2-detail-test.e2e.js.map +1 -1
  131. package/dist/collection/components/q2-dropdown/q2-dropdown.js +201 -4
  132. package/dist/collection/components/q2-dropdown/q2-dropdown.js.map +1 -1
  133. package/dist/collection/components/q2-dropdown/test/q2-dropdown-test.e2e.js +305 -124
  134. package/dist/collection/components/q2-dropdown/test/q2-dropdown-test.e2e.js.map +1 -1
  135. package/dist/collection/components/q2-dropdown-item/q2-dropdown-item.js +1 -1
  136. package/dist/collection/components/q2-dropdown-item/q2-dropdown-item.js.map +1 -1
  137. package/dist/collection/components/q2-dropdown-item/test/q2-dropdown-item-test.e2e.js +18 -13
  138. package/dist/collection/components/q2-dropdown-item/test/q2-dropdown-item-test.e2e.js.map +1 -1
  139. package/dist/collection/components/q2-editable-field/test/q2-editable-field-test.e2e.js +14 -18
  140. package/dist/collection/components/q2-editable-field/test/q2-editable-field-test.e2e.js.map +1 -1
  141. package/dist/collection/components/q2-formatted-text/q2-formatted-text.css +94 -0
  142. package/dist/collection/components/q2-formatted-text/q2-formatted-text.js +230 -0
  143. package/dist/collection/components/q2-formatted-text/q2-formatted-text.js.map +1 -0
  144. package/dist/collection/components/q2-formatted-text/test/q2-formatted-text-test.e2e.js +430 -0
  145. package/dist/collection/components/q2-formatted-text/test/q2-formatted-text-test.e2e.js.map +1 -0
  146. package/dist/collection/components/q2-icon/test/q2-icon-test.e2e.js +14 -9
  147. package/dist/collection/components/q2-icon/test/q2-icon-test.e2e.js.map +1 -1
  148. package/dist/collection/components/q2-input/q2-input.css +9 -0
  149. package/dist/collection/components/q2-input/q2-input.js +7 -8
  150. package/dist/collection/components/q2-input/q2-input.js.map +1 -1
  151. package/dist/collection/components/q2-input/test/q2-input-test.e2e.js +50 -33
  152. package/dist/collection/components/q2-input/test/q2-input-test.e2e.js.map +1 -1
  153. package/dist/collection/components/q2-item/q2-item.js +1 -1
  154. package/dist/collection/components/q2-item/test/q2-item-test.e2e.js +32 -7
  155. package/dist/collection/components/q2-item/test/q2-item-test.e2e.js.map +1 -1
  156. package/dist/collection/components/q2-legend/q2-legend.css +1 -1
  157. package/dist/collection/components/q2-legend/q2-legend.js +1 -1
  158. package/dist/collection/components/q2-legend/test/q2-legend-test.e2e.js +13 -8
  159. package/dist/collection/components/q2-legend/test/q2-legend-test.e2e.js.map +1 -1
  160. package/dist/collection/components/q2-link/q2-link.css +146 -0
  161. package/dist/collection/components/q2-link/q2-link.js +242 -0
  162. package/dist/collection/components/q2-link/q2-link.js.map +1 -0
  163. package/dist/collection/components/q2-link/test/q2-link-test.e2e.js +145 -0
  164. package/dist/collection/components/q2-link/test/q2-link-test.e2e.js.map +1 -0
  165. package/dist/collection/components/q2-list/q2-list.js +1 -1
  166. package/dist/collection/components/q2-list/test/q2-list-test.e2e.js +12 -7
  167. package/dist/collection/components/q2-list/test/q2-list-test.e2e.js.map +1 -1
  168. package/dist/collection/components/q2-loading/test/q2-loading-element-test.e2e.js +14 -9
  169. package/dist/collection/components/q2-loading/test/q2-loading-element-test.e2e.js.map +1 -1
  170. package/dist/collection/components/q2-loading/test/q2-loading-test.e2e.js +14 -9
  171. package/dist/collection/components/q2-loading/test/q2-loading-test.e2e.js.map +1 -1
  172. package/dist/collection/components/q2-loc/q2-loc.js +1 -1
  173. package/dist/collection/components/q2-loc/test/q2-loc-test.e2e.js +16 -11
  174. package/dist/collection/components/q2-loc/test/q2-loc-test.e2e.js.map +1 -1
  175. package/dist/collection/components/q2-message/q2-message.js +1 -1
  176. package/dist/collection/components/q2-message/test/q2-message-test.e2e.js +14 -9
  177. package/dist/collection/components/q2-message/test/q2-message-test.e2e.js.map +1 -1
  178. package/dist/collection/components/q2-optgroup/q2-optgroup.js +1 -1
  179. package/dist/collection/components/q2-optgroup/test/q2-optgroup-test.e2e.js +20 -13
  180. package/dist/collection/components/q2-optgroup/test/q2-optgroup-test.e2e.js.map +1 -1
  181. package/dist/collection/components/q2-option/q2-option.js +1 -1
  182. package/dist/collection/components/q2-option/test/q2-option-test.e2e.js +28 -12
  183. package/dist/collection/components/q2-option/test/q2-option-test.e2e.js.map +1 -1
  184. package/dist/collection/components/q2-option-list/q2-option-list.js +7 -5
  185. package/dist/collection/components/q2-option-list/q2-option-list.js.map +1 -1
  186. package/dist/collection/components/q2-option-list/test/q2-option-list-test.e2e.js +415 -405
  187. package/dist/collection/components/q2-option-list/test/q2-option-list-test.e2e.js.map +1 -1
  188. package/dist/collection/components/q2-pagination/q2-pagination.js +230 -14
  189. package/dist/collection/components/q2-pagination/q2-pagination.js.map +1 -1
  190. package/dist/collection/components/q2-pagination/test/q2-pagination-test.e2e.js +138 -15
  191. package/dist/collection/components/q2-pagination/test/q2-pagination-test.e2e.js.map +1 -1
  192. package/dist/collection/components/q2-pill/q2-pill.css +12 -0
  193. package/dist/collection/components/q2-pill/q2-pill.js +43 -3
  194. package/dist/collection/components/q2-pill/q2-pill.js.map +1 -1
  195. package/dist/collection/components/q2-pill/test/q2-pill-test.e2e.js +412 -212
  196. package/dist/collection/components/q2-pill/test/q2-pill-test.e2e.js.map +1 -1
  197. package/dist/collection/components/q2-popover/q2-popover.js +37 -11
  198. package/dist/collection/components/q2-popover/q2-popover.js.map +1 -1
  199. package/dist/collection/components/q2-popover/test/q2-popover-test.e2e.js +296 -236
  200. package/dist/collection/components/q2-popover/test/q2-popover-test.e2e.js.map +1 -1
  201. package/dist/collection/components/q2-popover/test/q2-popover-test.spec.js +3 -3
  202. package/dist/collection/components/q2-popover/test/q2-popover-test.spec.js.map +1 -1
  203. package/dist/collection/components/q2-radio/test/q2-radio-test.e2e.js +21 -7
  204. package/dist/collection/components/q2-radio/test/q2-radio-test.e2e.js.map +1 -1
  205. package/dist/collection/components/q2-radio-group/q2-radio-group.js +2 -2
  206. package/dist/collection/components/q2-radio-group/q2-radio-group.js.map +1 -1
  207. package/dist/collection/components/q2-radio-group/test/q2-radio-group-test.e2e.js +32 -26
  208. package/dist/collection/components/q2-radio-group/test/q2-radio-group-test.e2e.js.map +1 -1
  209. package/dist/collection/components/q2-relative-time/q2-relative-time.js +1 -1
  210. package/dist/collection/components/q2-relative-time/test/q2-relative-time-test.e2e.js +12 -7
  211. package/dist/collection/components/q2-relative-time/test/q2-relative-time-test.e2e.js.map +1 -1
  212. package/dist/collection/components/q2-resize-observer/q2-resize-observer.css +71 -0
  213. package/dist/collection/components/q2-resize-observer/q2-resize-observer.js +166 -0
  214. package/dist/collection/components/q2-resize-observer/q2-resize-observer.js.map +1 -0
  215. package/dist/collection/components/q2-resize-observer/test/q2-resize-observer.e2e.js +83 -0
  216. package/dist/collection/components/q2-resize-observer/test/q2-resize-observer.e2e.js.map +1 -0
  217. package/dist/collection/components/q2-resize-observer/test/q2-resize-observer.spec.js +66 -0
  218. package/dist/collection/components/q2-resize-observer/test/q2-resize-observer.spec.js.map +1 -0
  219. package/dist/collection/components/q2-section/q2-section.js +78 -2
  220. package/dist/collection/components/q2-section/q2-section.js.map +1 -1
  221. package/dist/collection/components/q2-section/test/q2-section-test.e2e.js +39 -9
  222. package/dist/collection/components/q2-section/test/q2-section-test.e2e.js.map +1 -1
  223. package/dist/collection/components/q2-select/q2-select.js +23 -5
  224. package/dist/collection/components/q2-select/q2-select.js.map +1 -1
  225. package/dist/collection/components/q2-select/test/q2-select-test.e2e.js +695 -676
  226. package/dist/collection/components/q2-select/test/q2-select-test.e2e.js.map +1 -1
  227. package/dist/collection/components/q2-stepper/q2-stepper.js +76 -2
  228. package/dist/collection/components/q2-stepper/q2-stepper.js.map +1 -1
  229. package/dist/collection/components/q2-stepper/test/q2-stepper-test.e2e.js +183 -87
  230. package/dist/collection/components/q2-stepper/test/q2-stepper-test.e2e.js.map +1 -1
  231. package/dist/collection/components/q2-stepper-pane/q2-stepper-pane.js +2 -2
  232. package/dist/collection/components/q2-stepper-pane/test/q2-stepper-pane-test.e2e.js +20 -9
  233. package/dist/collection/components/q2-stepper-pane/test/q2-stepper-pane-test.e2e.js.map +1 -1
  234. package/dist/collection/components/q2-stepper-vertical/q2-stepper-vertical.js +1 -1
  235. package/dist/collection/components/q2-stepper-vertical/test/q2-stepper-vertical-test.e2e.js +71 -67
  236. package/dist/collection/components/q2-stepper-vertical/test/q2-stepper-vertical-test.e2e.js.map +1 -1
  237. package/dist/collection/components/q2-tab-container/q2-tab-container.js +50 -7
  238. package/dist/collection/components/q2-tab-container/q2-tab-container.js.map +1 -1
  239. package/dist/collection/components/q2-tab-container/test/q2-tab-container-test.e2e.js +89 -65
  240. package/dist/collection/components/q2-tab-container/test/q2-tab-container-test.e2e.js.map +1 -1
  241. package/dist/collection/components/q2-tab-pane/q2-tab-pane.js +1 -1
  242. package/dist/collection/components/q2-tab-pane/test/q2-tab-pane-test.e2e.js +14 -9
  243. package/dist/collection/components/q2-tab-pane/test/q2-tab-pane-test.e2e.js.map +1 -1
  244. package/dist/collection/components/q2-tag/q2-tag.js +19 -1
  245. package/dist/collection/components/q2-tag/q2-tag.js.map +1 -1
  246. package/dist/collection/components/q2-tag/test/q2-tag-test.e2e.js +47 -28
  247. package/dist/collection/components/q2-tag/test/q2-tag-test.e2e.js.map +1 -1
  248. package/dist/collection/components/q2-textarea/q2-textarea.js +51 -13
  249. package/dist/collection/components/q2-textarea/q2-textarea.js.map +1 -1
  250. package/dist/collection/components/q2-textarea/test/q2-textarea-test.e2e.js +31 -10
  251. package/dist/collection/components/q2-textarea/test/q2-textarea-test.e2e.js.map +1 -1
  252. package/dist/collection/components/q2-tooltip/q2-tooltip.css +5 -2
  253. package/dist/collection/components/q2-tooltip/test/q2-tooltip-test.e2e.js +51 -13
  254. package/dist/collection/components/q2-tooltip/test/q2-tooltip-test.e2e.js.map +1 -1
  255. package/dist/collection/components/tecton-tab-pane/tecton-tab-pane.js +2 -2
  256. package/dist/collection/components/tecton-tab-pane/test/tecton-tab-pane-test.e2e.js +18 -13
  257. package/dist/collection/components/tecton-tab-pane/test/tecton-tab-pane-test.e2e.js.map +1 -1
  258. package/dist/collection/utils/helpers.js +65 -0
  259. package/dist/collection/utils/helpers.js.map +1 -1
  260. package/dist/collection/utils/index.js +11 -11
  261. package/dist/collection/utils/index.js.map +1 -1
  262. package/dist/collection/utils/sanitize-html-string.js +10 -0
  263. package/dist/collection/utils/sanitize-html-string.js.map +1 -0
  264. package/dist/collection/utils/sanitize-regex-string.js +4 -0
  265. package/dist/collection/utils/sanitize-regex-string.js.map +1 -0
  266. package/dist/components/index.js +8 -0
  267. package/dist/components/index.js.map +1 -1
  268. package/dist/components/index2.js +11 -1356
  269. package/dist/components/index2.js.map +1 -1
  270. package/dist/components/q2-action-group.d.ts +11 -0
  271. package/dist/components/q2-action-group.js +75 -0
  272. package/dist/components/q2-action-group.js.map +1 -0
  273. package/dist/components/q2-action-sheet.js +1363 -2
  274. package/dist/components/q2-action-sheet.js.map +1 -1
  275. package/dist/components/q2-avatar2.js +1 -1
  276. package/dist/components/q2-btn2.js +1 -1
  277. package/dist/components/q2-carousel-pane.js +2 -2
  278. package/dist/components/q2-chart-area.js +1 -1
  279. package/dist/components/q2-chart-area.js.map +1 -1
  280. package/dist/components/q2-chart-bar.js +1 -1
  281. package/dist/components/q2-chart-bar.js.map +1 -1
  282. package/dist/components/q2-chart-donut.js +15 -15
  283. package/dist/components/q2-chart-donut.js.map +1 -1
  284. package/dist/components/q2-checkbox-group.js +2 -2
  285. package/dist/components/q2-checkbox-group.js.map +1 -1
  286. package/dist/components/q2-currency.js +1 -1
  287. package/dist/components/q2-data-table.js +64 -64
  288. package/dist/components/q2-data-table.js.map +1 -1
  289. package/dist/components/q2-detail.js +1 -1
  290. package/dist/components/q2-dropdown-item2.js +1 -1
  291. package/dist/components/q2-dropdown-item2.js.map +1 -1
  292. package/dist/components/q2-dropdown.js +82 -5
  293. package/dist/components/q2-dropdown.js.map +1 -1
  294. package/dist/components/q2-formatted-text.d.ts +11 -0
  295. package/dist/components/q2-formatted-text.js +101 -0
  296. package/dist/components/q2-formatted-text.js.map +1 -0
  297. package/dist/components/q2-input2.js +4 -5
  298. package/dist/components/q2-input2.js.map +1 -1
  299. package/dist/components/q2-item.js +1 -1
  300. package/dist/components/q2-legend2.js +2 -2
  301. package/dist/components/q2-legend2.js.map +1 -1
  302. package/dist/components/q2-link.d.ts +11 -0
  303. package/dist/components/q2-link.js +93 -0
  304. package/dist/components/q2-link.js.map +1 -0
  305. package/dist/components/q2-list.js +1 -1
  306. package/dist/components/q2-loc.js +1 -1
  307. package/dist/components/q2-message2.js +1 -1
  308. package/dist/components/q2-month-picker.js +2 -2
  309. package/dist/components/q2-optgroup2.js +1 -1
  310. package/dist/components/q2-option-list2.js +8 -3
  311. package/dist/components/q2-option-list2.js.map +1 -1
  312. package/dist/components/q2-option2.js +1 -1
  313. package/dist/components/q2-pagination.js +97 -10
  314. package/dist/components/q2-pagination.js.map +1 -1
  315. package/dist/components/q2-pill.js +29 -5
  316. package/dist/components/q2-pill.js.map +1 -1
  317. package/dist/components/q2-popover2.js +22 -12
  318. package/dist/components/q2-popover2.js.map +1 -1
  319. package/dist/components/q2-radio-group.js +2 -2
  320. package/dist/components/q2-radio-group.js.map +1 -1
  321. package/dist/components/q2-relative-time.js +1 -1
  322. package/dist/components/q2-resize-observer.d.ts +11 -0
  323. package/dist/components/q2-resize-observer.js +8 -0
  324. package/dist/components/q2-resize-observer.js.map +1 -0
  325. package/dist/components/q2-resize-observer2.js +112 -0
  326. package/dist/components/q2-resize-observer2.js.map +1 -0
  327. package/dist/components/q2-section.js +30 -4
  328. package/dist/components/q2-section.js.map +1 -1
  329. package/dist/components/q2-select2.js +7 -5
  330. package/dist/components/q2-select2.js.map +1 -1
  331. package/dist/components/q2-stepper-vertical.js +1 -1
  332. package/dist/components/q2-stepper.js +40 -3
  333. package/dist/components/q2-stepper.js.map +1 -1
  334. package/dist/components/q2-tab-container.js +20 -8
  335. package/dist/components/q2-tab-container.js.map +1 -1
  336. package/dist/components/q2-tab-pane.js +1 -1
  337. package/dist/components/q2-tag.js +3 -1
  338. package/dist/components/q2-tag.js.map +1 -1
  339. package/dist/components/q2-textarea.js +49 -12
  340. package/dist/components/q2-textarea.js.map +1 -1
  341. package/dist/components/q2-tooltip.js +1 -1
  342. package/dist/components/q2-tooltip.js.map +1 -1
  343. package/dist/components/tecton-tab-pane.js +2 -2
  344. package/dist/esm/click-elsewhere_2.entry.js +21 -12
  345. package/dist/esm/click-elsewhere_2.entry.js.map +1 -1
  346. package/dist/esm/{index-c6d74f10.js → index-3184c760.js} +1 -1
  347. package/dist/esm/{index-c6d74f10.js.map → index-3184c760.js.map} +1 -1
  348. package/dist/esm/index-844fc010.js +211 -0
  349. package/dist/esm/index-844fc010.js.map +1 -0
  350. package/dist/esm/loader.js +1 -1
  351. package/dist/esm/q2-action-group.entry.js +46 -0
  352. package/dist/esm/q2-action-group.entry.js.map +1 -0
  353. package/dist/esm/q2-action-sheet.entry.js +1363 -2
  354. package/dist/esm/q2-action-sheet.entry.js.map +1 -1
  355. package/dist/esm/q2-avatar.entry.js +1 -1
  356. package/dist/esm/q2-badge_7.entry.js +23 -13
  357. package/dist/esm/q2-badge_7.entry.js.map +1 -1
  358. package/dist/esm/q2-calendar.entry.js +2 -2
  359. package/dist/esm/q2-card.entry.js +1 -1
  360. package/dist/esm/q2-carousel-pane.entry.js +3 -3
  361. package/dist/esm/q2-carousel.entry.js +1 -1
  362. package/dist/esm/q2-chart-area.entry.js +2 -2
  363. package/dist/esm/q2-chart-area.entry.js.map +1 -1
  364. package/dist/esm/q2-chart-bar.entry.js +2 -2
  365. package/dist/esm/q2-chart-bar.entry.js.map +1 -1
  366. package/dist/esm/q2-chart-donut.entry.js +16 -16
  367. package/dist/esm/q2-chart-donut.entry.js.map +1 -1
  368. package/dist/esm/q2-checkbox-group.entry.js +2 -2
  369. package/dist/esm/q2-checkbox-group.entry.js.map +1 -1
  370. package/dist/esm/q2-checkbox.entry.js +1 -1
  371. package/dist/esm/q2-currency.entry.js +1 -1
  372. package/dist/esm/q2-data-table.entry.js +62 -62
  373. package/dist/esm/q2-data-table.entry.js.map +1 -1
  374. package/dist/esm/q2-detail.entry.js +2 -2
  375. package/dist/esm/q2-dropdown-item.entry.js +2 -2
  376. package/dist/esm/q2-dropdown-item.entry.js.map +1 -1
  377. package/dist/esm/q2-dropdown.entry.js +77 -5
  378. package/dist/esm/q2-dropdown.entry.js.map +1 -1
  379. package/dist/esm/q2-editable-field.entry.js +1 -1
  380. package/dist/esm/q2-formatted-text.entry.js +68 -0
  381. package/dist/esm/q2-formatted-text.entry.js.map +1 -0
  382. package/dist/esm/q2-item.entry.js +2 -2
  383. package/dist/esm/q2-legend.entry.js +2 -2
  384. package/dist/esm/q2-legend.entry.js.map +1 -1
  385. package/dist/esm/q2-link.entry.js +60 -0
  386. package/dist/esm/q2-link.entry.js.map +1 -0
  387. package/dist/esm/q2-list.entry.js +2 -2
  388. package/dist/esm/q2-loc.entry.js +2 -2
  389. package/dist/esm/q2-message.entry.js +2 -2
  390. package/dist/esm/q2-month-picker.entry.js +3 -3
  391. package/dist/esm/q2-optgroup.entry.js +2 -2
  392. package/dist/esm/q2-option-list.entry.js +9 -4
  393. package/dist/esm/q2-option-list.entry.js.map +1 -1
  394. package/dist/esm/q2-option.entry.js +1 -1
  395. package/dist/esm/q2-pagination.entry.js +90 -9
  396. package/dist/esm/q2-pagination.entry.js.map +1 -1
  397. package/dist/esm/q2-pill.entry.js +26 -5
  398. package/dist/esm/q2-pill.entry.js.map +1 -1
  399. package/dist/esm/q2-radio-group.entry.js +2 -2
  400. package/dist/esm/q2-radio-group.entry.js.map +1 -1
  401. package/dist/esm/q2-radio.entry.js +1 -1
  402. package/dist/esm/q2-relative-time.entry.js +3 -3
  403. package/dist/esm/q2-resize-observer.entry.js +92 -0
  404. package/dist/esm/q2-resize-observer.entry.js.map +1 -0
  405. package/dist/esm/q2-section.entry.js +27 -3
  406. package/dist/esm/q2-section.entry.js.map +1 -1
  407. package/dist/esm/q2-select.entry.js +7 -6
  408. package/dist/esm/q2-select.entry.js.map +1 -1
  409. package/dist/esm/q2-stepper-pane.entry.js +1 -1
  410. package/dist/esm/q2-stepper-vertical.entry.js +2 -2
  411. package/dist/esm/q2-stepper.entry.js +39 -3
  412. package/dist/esm/q2-stepper.entry.js.map +1 -1
  413. package/dist/esm/q2-tag.entry.js +3 -2
  414. package/dist/esm/q2-tag.entry.js.map +1 -1
  415. package/dist/esm/q2-tecton-elements.js +1 -1
  416. package/dist/esm/q2-textarea.entry.js +47 -12
  417. package/dist/esm/q2-textarea.entry.js.map +1 -1
  418. package/dist/esm/q2-tooltip.entry.js +2 -2
  419. package/dist/esm/q2-tooltip.entry.js.map +1 -1
  420. package/dist/esm/tecton-tab-pane.entry.js +2 -2
  421. package/dist/q2-tecton-elements/{p-0a3a804a.entry.js → p-06701928.entry.js} +2 -2
  422. package/dist/q2-tecton-elements/{p-0a3a804a.entry.js.map → p-06701928.entry.js.map} +1 -1
  423. package/dist/q2-tecton-elements/{p-5d936af5.entry.js → p-07d1c3ae.entry.js} +2 -2
  424. package/dist/q2-tecton-elements/p-15ac45d6.js +2 -0
  425. package/dist/q2-tecton-elements/p-15ac45d6.js.map +1 -0
  426. package/dist/q2-tecton-elements/{p-ce4e6b41.entry.js → p-16910682.entry.js} +2 -2
  427. package/dist/q2-tecton-elements/p-16910682.entry.js.map +1 -0
  428. package/dist/q2-tecton-elements/p-188eb162.entry.js +3 -0
  429. package/dist/q2-tecton-elements/p-188eb162.entry.js.map +1 -0
  430. package/dist/q2-tecton-elements/{p-58cafc0d.entry.js → p-1c760a89.entry.js} +2 -2
  431. package/dist/q2-tecton-elements/{p-074ae80c.entry.js → p-1c88d057.entry.js} +2 -2
  432. package/dist/q2-tecton-elements/{p-3b0d3cd4.entry.js → p-20a3d6ed.entry.js} +2 -2
  433. package/dist/q2-tecton-elements/p-20a3d6ed.entry.js.map +1 -0
  434. package/dist/q2-tecton-elements/{p-77a0cc0c.entry.js → p-2733583e.entry.js} +2 -2
  435. package/dist/q2-tecton-elements/{p-4116579f.entry.js → p-3e428290.entry.js} +2 -2
  436. package/dist/q2-tecton-elements/p-3e428290.entry.js.map +1 -0
  437. package/dist/q2-tecton-elements/{p-072c5877.entry.js → p-4774e5b3.entry.js} +2 -2
  438. package/dist/q2-tecton-elements/{p-77272c4c.entry.js → p-490ef8e5.entry.js} +2 -2
  439. package/dist/q2-tecton-elements/{p-0a1dff75.entry.js → p-4e10550d.entry.js} +2 -2
  440. package/dist/q2-tecton-elements/p-4e10550d.entry.js.map +1 -0
  441. package/dist/q2-tecton-elements/{p-2ca6d44f.entry.js → p-50f7328f.entry.js} +2 -2
  442. package/dist/q2-tecton-elements/p-5637c486.entry.js +2 -0
  443. package/dist/q2-tecton-elements/p-5637c486.entry.js.map +1 -0
  444. package/dist/q2-tecton-elements/p-56df21b0.entry.js +2 -0
  445. package/dist/q2-tecton-elements/p-56df21b0.entry.js.map +1 -0
  446. package/dist/q2-tecton-elements/{p-34856c71.entry.js → p-5a834214.entry.js} +2 -2
  447. package/dist/q2-tecton-elements/{p-34856c71.entry.js.map → p-5a834214.entry.js.map} +1 -1
  448. package/dist/q2-tecton-elements/p-5f99a4a8.entry.js +2 -0
  449. package/dist/q2-tecton-elements/p-5f99a4a8.entry.js.map +1 -0
  450. package/dist/q2-tecton-elements/p-72d948b4.entry.js +2 -0
  451. package/dist/q2-tecton-elements/p-72d948b4.entry.js.map +1 -0
  452. package/dist/q2-tecton-elements/{p-3c7be0bb.entry.js → p-7903cd15.entry.js} +2 -2
  453. package/dist/q2-tecton-elements/p-7903cd15.entry.js.map +1 -0
  454. package/dist/q2-tecton-elements/{p-d2e1631a.entry.js → p-7906f49e.entry.js} +2 -2
  455. package/dist/q2-tecton-elements/{p-d2e1631a.entry.js.map → p-7906f49e.entry.js.map} +1 -1
  456. package/dist/q2-tecton-elements/{p-2fcaf2d6.entry.js → p-7aef0c08.entry.js} +2 -2
  457. package/dist/q2-tecton-elements/{p-8a4b106d.entry.js → p-7c9a0122.entry.js} +2 -2
  458. package/dist/q2-tecton-elements/p-7c9f8b62.entry.js +2 -0
  459. package/dist/q2-tecton-elements/p-7c9f8b62.entry.js.map +1 -0
  460. package/dist/q2-tecton-elements/{p-cf32b5db.entry.js → p-81fbe718.entry.js} +2 -2
  461. package/dist/q2-tecton-elements/p-81fbe718.entry.js.map +1 -0
  462. package/dist/q2-tecton-elements/{p-6237c775.entry.js → p-896c7008.entry.js} +2 -2
  463. package/dist/q2-tecton-elements/{p-395904b4.entry.js → p-8d07cf91.entry.js} +2 -2
  464. package/dist/q2-tecton-elements/{p-fffb54e9.entry.js → p-8d2b02e1.entry.js} +2 -2
  465. package/dist/q2-tecton-elements/{p-6e6d9793.entry.js → p-95a7c042.entry.js} +2 -2
  466. package/dist/q2-tecton-elements/{p-45407ecc.entry.js → p-96b1406c.entry.js} +2 -2
  467. package/dist/q2-tecton-elements/{p-cb3f48de.entry.js → p-a47597dd.entry.js} +2 -2
  468. package/dist/q2-tecton-elements/p-a47597dd.entry.js.map +1 -0
  469. package/dist/q2-tecton-elements/p-a5d0e252.entry.js +2 -0
  470. package/dist/q2-tecton-elements/p-a5d0e252.entry.js.map +1 -0
  471. package/dist/q2-tecton-elements/{p-2c26295e.entry.js → p-ac6aa392.entry.js} +2 -2
  472. package/dist/q2-tecton-elements/{p-376a0589.entry.js → p-ad057d10.entry.js} +2 -2
  473. package/dist/q2-tecton-elements/p-ad798287.entry.js +2 -0
  474. package/dist/q2-tecton-elements/p-ad798287.entry.js.map +1 -0
  475. package/dist/q2-tecton-elements/{p-ad998f71.entry.js → p-b0e5e9dc.entry.js} +2 -2
  476. package/dist/q2-tecton-elements/p-b0e5e9dc.entry.js.map +1 -0
  477. package/dist/q2-tecton-elements/{p-34696e3f.entry.js → p-b1784be3.entry.js} +2 -2
  478. package/dist/q2-tecton-elements/{p-259b728a.entry.js → p-b7de110e.entry.js} +2 -2
  479. package/dist/q2-tecton-elements/{p-8111547c.entry.js → p-c235ab3f.entry.js} +2 -2
  480. package/dist/q2-tecton-elements/p-c5667d5d.entry.js +2 -0
  481. package/dist/q2-tecton-elements/p-c5667d5d.entry.js.map +1 -0
  482. package/dist/q2-tecton-elements/{p-c81d299a.entry.js → p-e216ef3f.entry.js} +2 -2
  483. package/dist/q2-tecton-elements/p-e2c800ef.entry.js +2 -0
  484. package/dist/q2-tecton-elements/p-e2c800ef.entry.js.map +1 -0
  485. package/dist/q2-tecton-elements/p-f135b265.entry.js +2 -0
  486. package/dist/q2-tecton-elements/p-f135b265.entry.js.map +1 -0
  487. package/dist/q2-tecton-elements/{p-721365be.js → p-f1e887f5.js} +1 -1
  488. package/dist/q2-tecton-elements/{p-6b7c53a8.entry.js → p-f5f23659.entry.js} +2 -2
  489. package/dist/q2-tecton-elements/p-f7867f21.entry.js +2 -0
  490. package/dist/q2-tecton-elements/p-f7867f21.entry.js.map +1 -0
  491. package/dist/q2-tecton-elements/p-ff8f1a32.entry.js +2 -0
  492. package/dist/q2-tecton-elements/p-ff8f1a32.entry.js.map +1 -0
  493. package/dist/q2-tecton-elements/p-fff01dc1.entry.js +2 -0
  494. package/dist/q2-tecton-elements/p-fff01dc1.entry.js.map +1 -0
  495. package/dist/q2-tecton-elements/q2-tecton-elements.esm.js +1 -1
  496. package/dist/q2-tecton-elements/q2-tecton-elements.esm.js.map +1 -1
  497. package/dist/types/components/q2-action-group/q2-action-group.d.ts +30 -0
  498. package/dist/types/components/q2-chart-area/q2-chart-area.d.ts +1 -1
  499. package/dist/types/components/q2-chart-bar/q2-chart-bar.d.ts +1 -1
  500. package/dist/types/components/q2-chart-donut/q2-chart-donut.d.ts +2 -0
  501. package/dist/types/components/q2-data-table/q2-data-table.d.ts +15 -13
  502. package/dist/types/components/q2-dropdown/q2-dropdown.d.ts +36 -0
  503. package/dist/types/components/q2-formatted-text/q2-formatted-text.d.ts +34 -0
  504. package/dist/types/components/q2-input/q2-input.d.ts +10 -9
  505. package/dist/types/components/q2-legend/q2-legend.d.ts +1 -0
  506. package/dist/types/components/q2-link/q2-link.d.ts +36 -0
  507. package/dist/types/components/q2-pagination/q2-pagination.d.ts +60 -3
  508. package/dist/types/components/q2-pill/q2-pill.d.ts +11 -0
  509. package/dist/types/components/q2-popover/q2-popover.d.ts +7 -1
  510. package/dist/types/components/q2-resize-observer/q2-resize-observer.d.ts +28 -0
  511. package/dist/types/components/q2-section/q2-section.d.ts +12 -0
  512. package/dist/types/components/q2-select/q2-select.d.ts +5 -0
  513. package/dist/types/components/q2-stepper/q2-stepper.d.ts +10 -1
  514. package/dist/types/components/q2-tab-container/q2-tab-container.d.ts +8 -2
  515. package/dist/types/components/q2-tag/q2-tag.d.ts +5 -0
  516. package/dist/types/components/q2-textarea/q2-textarea.d.ts +8 -3
  517. package/dist/types/components.d.ts +394 -18
  518. package/dist/types/utils/helpers.d.ts +28 -0
  519. package/dist/types/utils/index.d.ts +3 -3
  520. package/dist/types/utils/sanitize-html-string.d.ts +1 -0
  521. package/dist/types/utils/sanitize-regex-string.d.ts +1 -0
  522. package/package.json +4 -4
  523. package/dist/cjs/index-64d8b839.js +0 -1580
  524. package/dist/cjs/index-64d8b839.js.map +0 -1
  525. package/dist/esm/index-4a80972c.js +0 -1556
  526. package/dist/esm/index-4a80972c.js.map +0 -1
  527. package/dist/q2-tecton-elements/p-0a1dff75.entry.js.map +0 -1
  528. package/dist/q2-tecton-elements/p-3b0d3cd4.entry.js.map +0 -1
  529. package/dist/q2-tecton-elements/p-3c7be0bb.entry.js.map +0 -1
  530. package/dist/q2-tecton-elements/p-403bf3d4.entry.js +0 -2
  531. package/dist/q2-tecton-elements/p-403bf3d4.entry.js.map +0 -1
  532. package/dist/q2-tecton-elements/p-4116579f.entry.js.map +0 -1
  533. package/dist/q2-tecton-elements/p-661ed976.entry.js +0 -2
  534. package/dist/q2-tecton-elements/p-661ed976.entry.js.map +0 -1
  535. package/dist/q2-tecton-elements/p-9a1a4bc0.js +0 -3
  536. package/dist/q2-tecton-elements/p-9a1a4bc0.js.map +0 -1
  537. package/dist/q2-tecton-elements/p-a7a0b8aa.entry.js +0 -2
  538. package/dist/q2-tecton-elements/p-a7a0b8aa.entry.js.map +0 -1
  539. package/dist/q2-tecton-elements/p-aa57b657.entry.js +0 -2
  540. package/dist/q2-tecton-elements/p-aa57b657.entry.js.map +0 -1
  541. package/dist/q2-tecton-elements/p-ad998f71.entry.js.map +0 -1
  542. package/dist/q2-tecton-elements/p-adec9275.entry.js +0 -2
  543. package/dist/q2-tecton-elements/p-adec9275.entry.js.map +0 -1
  544. package/dist/q2-tecton-elements/p-adf0a7c9.entry.js +0 -2
  545. package/dist/q2-tecton-elements/p-adf0a7c9.entry.js.map +0 -1
  546. package/dist/q2-tecton-elements/p-b72fd065.entry.js +0 -2
  547. package/dist/q2-tecton-elements/p-b72fd065.entry.js.map +0 -1
  548. package/dist/q2-tecton-elements/p-c0c658d1.entry.js +0 -2
  549. package/dist/q2-tecton-elements/p-c0c658d1.entry.js.map +0 -1
  550. package/dist/q2-tecton-elements/p-cb3f48de.entry.js.map +0 -1
  551. package/dist/q2-tecton-elements/p-ce4e6b41.entry.js.map +0 -1
  552. package/dist/q2-tecton-elements/p-cf32b5db.entry.js.map +0 -1
  553. package/dist/q2-tecton-elements/p-cf966a0f.entry.js +0 -2
  554. package/dist/q2-tecton-elements/p-cf966a0f.entry.js.map +0 -1
  555. package/dist/q2-tecton-elements/p-dc77bf66.entry.js +0 -2
  556. package/dist/q2-tecton-elements/p-dc77bf66.entry.js.map +0 -1
  557. /package/dist/q2-tecton-elements/{p-5d936af5.entry.js.map → p-07d1c3ae.entry.js.map} +0 -0
  558. /package/dist/q2-tecton-elements/{p-58cafc0d.entry.js.map → p-1c760a89.entry.js.map} +0 -0
  559. /package/dist/q2-tecton-elements/{p-074ae80c.entry.js.map → p-1c88d057.entry.js.map} +0 -0
  560. /package/dist/q2-tecton-elements/{p-77a0cc0c.entry.js.map → p-2733583e.entry.js.map} +0 -0
  561. /package/dist/q2-tecton-elements/{p-072c5877.entry.js.map → p-4774e5b3.entry.js.map} +0 -0
  562. /package/dist/q2-tecton-elements/{p-77272c4c.entry.js.map → p-490ef8e5.entry.js.map} +0 -0
  563. /package/dist/q2-tecton-elements/{p-2ca6d44f.entry.js.map → p-50f7328f.entry.js.map} +0 -0
  564. /package/dist/q2-tecton-elements/{p-2fcaf2d6.entry.js.map → p-7aef0c08.entry.js.map} +0 -0
  565. /package/dist/q2-tecton-elements/{p-8a4b106d.entry.js.map → p-7c9a0122.entry.js.map} +0 -0
  566. /package/dist/q2-tecton-elements/{p-6237c775.entry.js.map → p-896c7008.entry.js.map} +0 -0
  567. /package/dist/q2-tecton-elements/{p-395904b4.entry.js.map → p-8d07cf91.entry.js.map} +0 -0
  568. /package/dist/q2-tecton-elements/{p-fffb54e9.entry.js.map → p-8d2b02e1.entry.js.map} +0 -0
  569. /package/dist/q2-tecton-elements/{p-6e6d9793.entry.js.map → p-95a7c042.entry.js.map} +0 -0
  570. /package/dist/q2-tecton-elements/{p-45407ecc.entry.js.map → p-96b1406c.entry.js.map} +0 -0
  571. /package/dist/q2-tecton-elements/{p-2c26295e.entry.js.map → p-ac6aa392.entry.js.map} +0 -0
  572. /package/dist/q2-tecton-elements/{p-376a0589.entry.js.map → p-ad057d10.entry.js.map} +0 -0
  573. /package/dist/q2-tecton-elements/{p-34696e3f.entry.js.map → p-b1784be3.entry.js.map} +0 -0
  574. /package/dist/q2-tecton-elements/{p-259b728a.entry.js.map → p-b7de110e.entry.js.map} +0 -0
  575. /package/dist/q2-tecton-elements/{p-8111547c.entry.js.map → p-c235ab3f.entry.js.map} +0 -0
  576. /package/dist/q2-tecton-elements/{p-c81d299a.entry.js.map → p-e216ef3f.entry.js.map} +0 -0
  577. /package/dist/q2-tecton-elements/{p-721365be.js.map → p-f1e887f5.js.map} +0 -0
  578. /package/dist/q2-tecton-elements/{p-6b7c53a8.entry.js.map → p-f5f23659.entry.js.map} +0 -0
@@ -1,7 +1,11 @@
1
- import { h } from "@stencil/core";
2
- import { createGuid, isEventFromElement, labelDOM, loc, messagesDOM, overrideFocus, setMessageHeight } from "../../utils/index";
1
+ import { Fragment, h, } from "@stencil/core";
2
+ import { createGuid, debounce, isEventFromElement, renderLabel, loc, renderMessages, overrideFocus, setMessageHeight, } from "../../utils/index";
3
3
  export class Q2Textarea {
4
4
  constructor() {
5
+ this.debouncedScreenReaderCharacterCount = debounce(() => {
6
+ this.updateScreenReaderCharacterCount();
7
+ }, 2000);
8
+ this.describeByScreenReaderCharacterCount = true;
5
9
  this.guid = createGuid();
6
10
  this.scheduledAfterRender = [];
7
11
  this.checkCols = () => {
@@ -55,6 +59,7 @@ export class Q2Textarea {
55
59
  };
56
60
  this.onTextareaBlur = () => {
57
61
  const { valueOnFocus, textareaField: { value }, } = this;
62
+ this.describeByScreenReaderCharacterCount = true;
58
63
  this.hasFocus = false;
59
64
  setMessageHeight(this);
60
65
  if (valueOnFocus !== value)
@@ -73,7 +78,10 @@ export class Q2Textarea {
73
78
  this.onTextareaInput = (event) => {
74
79
  event.stopPropagation();
75
80
  const value = event.target.value;
81
+ this.describeByScreenReaderCharacterCount = false;
76
82
  this.increaseHeightIfOverflowing();
83
+ if (this.maxlength)
84
+ this.debouncedScreenReaderCharacterCount();
77
85
  this.input.emit({ value });
78
86
  };
79
87
  this.onTouchMove = (event) => {
@@ -95,8 +103,13 @@ export class Q2Textarea {
95
103
  document.addEventListener('touchmove', this.onTouchMove);
96
104
  document.addEventListener('touchend', this.onTouchMove);
97
105
  };
106
+ this.updateScreenReaderCharacterCount = () => {
107
+ var _a;
108
+ this.screenReaderCharacterCount = ((_a = this.value) === null || _a === void 0 ? void 0 : _a.length) || 0;
109
+ };
98
110
  this.downParams = undefined;
99
111
  this.hasFocus = undefined;
112
+ this.screenReaderCharacterCount = undefined;
100
113
  this.cols = undefined;
101
114
  this.disabled = undefined;
102
115
  this.errors = undefined;
@@ -119,6 +132,9 @@ export class Q2Textarea {
119
132
  if (isNaN(this.maxlength)) {
120
133
  this.maxlength = undefined;
121
134
  }
135
+ if (this.maxlength) {
136
+ this.updateScreenReaderCharacterCount();
137
+ }
122
138
  }
123
139
  componentDidLoad() {
124
140
  overrideFocus(this.hostElement);
@@ -172,6 +188,11 @@ export class Q2Textarea {
172
188
  hintsObserver() {
173
189
  this.hasFocus && this.scheduledAfterRender.push(() => setMessageHeight(this));
174
190
  }
191
+ maxlengthObserver() {
192
+ if (this.maxlength) {
193
+ this.updateScreenReaderCharacterCount();
194
+ }
195
+ }
175
196
  rowsObserver() {
176
197
  this.contentContainer.style.height = null;
177
198
  }
@@ -190,7 +211,17 @@ export class Q2Textarea {
190
211
  return Array.isArray(this.errors) && this.errors.length > 0;
191
212
  }
192
213
  get inputDescribedBy() {
193
- return this.showMessages ? `${this.inputId}-description` : undefined;
214
+ let describedBy = undefined;
215
+ if (this.showMessages) {
216
+ describedBy = `${this.inputId}-description`;
217
+ }
218
+ // Remove screen reader character count from described by after typing
219
+ // starts to avoid double announcement. It's needed on focus to announce
220
+ // the character count when field gains focus.
221
+ if (this.maxlength && this.describeByScreenReaderCharacterCount) {
222
+ describedBy = describedBy ? `${describedBy} ${this.inputId}-max-length` : `${this.inputId}-max-length`;
223
+ }
224
+ return describedBy;
194
225
  }
195
226
  get inputId() {
196
227
  return `input-guid-${this.guid}`;
@@ -213,14 +244,6 @@ export class Q2Textarea {
213
244
  const focusClass = this.hasFocus ? ' has-focus' : '';
214
245
  return `field-container${errorClass}${valueClass}${focusClass}`;
215
246
  }
216
- inputDOM() {
217
- const textareaClasses = this.resize === 'vertical-auto' ? 'resize-vertical-auto' : '';
218
- return (h("div", { class: "input-container" }, h("textarea", { id: this.inputId, class: textareaClasses, placeholder: (this.placeholder && loc(this.placeholder)) || undefined, "test-id": "inputField", maxLength: this.maxlength, "aria-describedby": this.inputDescribedBy, "aria-invalid": `${this.hasError}`, "aria-required": `${!this.optional}`, "aria-label": this.hideLabel && this.label, spellcheck: this.spellcheck, rows: this.rows || 3, cols: this.cols, value: this.value, ref: el => (this.textareaField = el), readonly: !!this.readonly, disabled: !!this.disabled, maxlength: this.maxlength, onInput: this.onTextareaInput, onChange: this.onTextareaChange, onFocus: this.onTextareaFocus, onBlur: this.onTextareaBlur }), this.hasError ? (h("q2-icon", { type: "error", class: "icon-error" })) : (''), this.showResize && (h("button", { onMouseDown: this.onMouseDown, onTouchStart: this.onTouchStart, class: "btn-resize", "aria-label": loc('tecton.element.input.resize'), tabIndex: -1 }, h("svg", { "aria-hidden": "true", viewBox: "0 0 12 12", xmlns: "http://www.w3.org/2000/svg" }, h("path", { d: "M8.5 11.5l3-3m-7 3l7-7m-11 7l11-11", fill: "none", "stroke-stroke-linecap": "square" }))))));
219
- }
220
- maxLengthDOM() {
221
- var _a;
222
- return (h("div", { class: "max-length", "aria-hidden": "true" }, ((_a = this.value) === null || _a === void 0 ? void 0 : _a.length) || 0, "/", this.maxlength));
223
- }
224
247
  setHeight(event) {
225
248
  var _a, _b;
226
249
  const { contentContainer, resize, downParams: { height, y }, } = this;
@@ -250,8 +273,19 @@ export class Q2Textarea {
250
273
  }
251
274
  // #endregion
252
275
  // #region Render Methods
276
+ renderInput() {
277
+ const textareaClasses = this.resize === 'vertical-auto' ? 'resize-vertical-auto' : '';
278
+ return (h("div", { class: "input-container" }, h("textarea", { id: this.inputId, class: textareaClasses, placeholder: (this.placeholder && loc(this.placeholder)) || undefined, "test-id": "inputField", maxLength: this.maxlength, "aria-describedby": this.inputDescribedBy, "aria-invalid": `${this.hasError}`, "aria-required": `${!this.optional}`, "aria-label": this.hideLabel && this.label, spellcheck: this.spellcheck, rows: this.rows || 3, cols: this.cols, value: this.value, ref: el => (this.textareaField = el), readonly: !!this.readonly, disabled: !!this.disabled, maxlength: this.maxlength, onInput: this.onTextareaInput, onChange: this.onTextareaChange, onFocus: this.onTextareaFocus, onBlur: this.onTextareaBlur }), this.hasError ? (h("q2-icon", { type: "error", class: "icon-error" })) : (''), this.showResize && (h("button", { onMouseDown: this.onMouseDown, onTouchStart: this.onTouchStart, class: "btn-resize", "aria-label": loc('tecton.element.input.resize'), tabIndex: -1 }, h("svg", { "aria-hidden": "true", viewBox: "0 0 12 12", xmlns: "http://www.w3.org/2000/svg" }, h("path", { d: "M8.5 11.5l3-3m-7 3l7-7m-11 7l11-11", fill: "none", "stroke-stroke-linecap": "square" }))))));
279
+ }
280
+ renderMaxLength() {
281
+ var _a;
282
+ return (h(Fragment, null, h("div", { class: "max-length", "aria-hidden": "true" }, ((_a = this.value) === null || _a === void 0 ? void 0 : _a.length) || 0, "/", this.maxlength), h("div", { "aria-live": "polite", class: "sr", id: `${this.inputId}-max-length`, "test-id": "max-length-sr" }, loc('tecton.element.textarea.characterCount.screenReader', [
283
+ this.screenReaderCharacterCount,
284
+ this.maxlength,
285
+ ]))));
286
+ }
253
287
  render() {
254
- return (h("div", { key: 'b4c03a5742684b04b9794fddb0bb8d8677d57be5', class: this.wrapperClasses }, labelDOM(this), h("div", { key: 'e80bd2b2e9e2344479def41185418f34b8feb40c', class: "content-container", ref: el => (this.contentContainer = el) }, this.inputDOM(), this.maxlength ? this.maxLengthDOM() : '', messagesDOM(this))));
288
+ return (h("div", { key: '054133483b317d5298a8fb08671d84e917888a3a', class: this.wrapperClasses }, renderLabel(this), h("div", { key: 'dd234ec95a89c23a473c9987a64a5dcfecd7fd44', class: "content-container", ref: el => (this.contentContainer = el) }, this.renderInput(), this.maxlength ? this.renderMaxLength() : '', renderMessages(this))));
255
289
  }
256
290
  static get is() { return "q2-textarea"; }
257
291
  static get encapsulation() { return "shadow"; }
@@ -548,7 +582,8 @@ export class Q2Textarea {
548
582
  static get states() {
549
583
  return {
550
584
  "downParams": {},
551
- "hasFocus": {}
585
+ "hasFocus": {},
586
+ "screenReaderCharacterCount": {}
552
587
  };
553
588
  }
554
589
  static get events() {
@@ -624,6 +659,9 @@ export class Q2Textarea {
624
659
  }, {
625
660
  "propName": "hints",
626
661
  "methodName": "hintsObserver"
662
+ }, {
663
+ "propName": "maxlength",
664
+ "methodName": "maxlengthObserver"
627
665
  }, {
628
666
  "propName": "rows",
629
667
  "methodName": "rowsObserver"
@@ -1 +1 @@
1
- {"version":3,"file":"q2-textarea.js","sourceRoot":"","sources":["../../../src/components/q2-textarea/q2-textarea.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAgB,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAE/G,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,QAAQ,EAAE,GAAG,EAAE,WAAW,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAGxH,MAAM,OAAO,UAAU;;QAInB,SAAI,GAAG,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IAAI,CAAC,cAAc;YAC1B,QAAQ,CAAC,IAAI,CAAC;YACf,4DACI,KAAK,EAAC,mBAAmB,EACzB,GAAG,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,gBAAgB,GAAG,EAAE,CAAC;gBAEtC,IAAI,CAAC,QAAQ,EAAE;gBACf,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC,EAAE;gBACzC,WAAW,CAAC,IAAI,CAAC,CAChB,CACJ,CACT,CAAC;IACN,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGJ","sourcesContent":["import { Component, EventEmitter, Prop, Event, Element, State, h, Watch, Listen, Method } from '@stencil/core';\nimport { IDict } from 'src/util';\nimport { createGuid, isEventFromElement, labelDOM, loc, messagesDOM, overrideFocus, setMessageHeight } from 'src/utils';\n\n@Component({ tag: 'q2-textarea', shadow: true, styleUrl: 'q2-textarea.scss' })\nexport class Q2Textarea {\n // #region Own Properties\n\n contentContainer?: HTMLDivElement;\n guid = createGuid();\n scheduledAfterRender: (() => void)[] = [];\n textareaField?: HTMLTextAreaElement;\n valueOnFocus: string;\n\n // #endregion\n // #region Host HTML Element\n\n @Element()\n hostElement: HTMLElement;\n\n // #endregion\n // #region State Properties\n\n @State()\n downParams: IDict<number>;\n\n @State()\n hasFocus: boolean;\n\n // #endregion\n // #region Public Property API\n\n /**\n * Defines the number of columns displayed in the field.\n * If not set, the field will be full-width and respond to the window size.\n */\n @Prop({ reflect: true })\n cols: number;\n\n /** Indicates the field cannot be focused or interacted with. */\n @Prop({ reflect: true })\n disabled: boolean;\n\n /**\n * Each item in the `errors` array will appear below the input field when the field is focused.\n * @localizable\n */\n @Prop()\n errors: string[];\n\n /**\n * Hide's the field's `<label>` element from view.\n * @warning\n * Only use when a visible label is impractical.\n */\n @Prop({ reflect: true })\n hideLabel: boolean;\n\n /**\n * When `true` and the input field has an active validation error, the field shows the error state without displaying associated error messages below the field (from the errors array above).\n * Primarily used for dropdown selects and date pickers whose controls appear below the input field (where the error messages, if displayed, would also appear).\n */\n @Prop({ reflect: true })\n hideMessages: boolean;\n\n /**\n * Each item in the `hints` array will appear below the input field when the field is focused.\n * @info\n * The `errors` array takes precedence over the `hints` array. If an input field has both hints and errors, only the errors will display.\n * Once all errors are resolved, the hints display the next time the field is focused.\n * @localizable\n */\n @Prop()\n hints: string[];\n\n /**\n * The label that appears above the field. This is announced by screen readers when the field is focused.\n * @localizable\n */\n @Prop({ reflect: true })\n label: string;\n\n /**\n * Defines the maximum allowed input length in characters. Formatting characters (e.g. `.`, `-`, etc) are included in the `maxlength` comparison.\n * Make sure you account for them when setting the `maxlength` value.\n * @info\n * Please set the `rows` attribute in correlation with `maxlength` to show as much text as possible in the field viewport.\n */\n @Prop({ reflect: true, mutable: true })\n maxlength: number;\n\n /** Appends \"(optional)\" to the field label, and sets `aria-required` on the nested input tag to `false`. */\n @Prop({ reflect: true })\n optional: boolean;\n\n /**\n * Text that appears within the field when it is blurred and empty.\n * Placeholder text disappears when the user focuses on the field and provides input.\n * @info\n * Primarily used for rare cases in which a visible form label is not expected (e.g., search fields).\n * @localizable\n */\n @Prop({ reflect: true })\n placeholder: string;\n\n /**\n * Appends \"(read only)\" to the field label, and field becomes unusable, but remains focusable.\n * Takes priority over `optional` if both are `true`.\n */\n @Prop({ reflect: true })\n readonly: boolean;\n\n /** Indicates how the field is resizable. */\n @Prop({ reflect: true })\n resize: 'none' | 'vertical' | 'horizontal' | 'both' | 'vertical-auto' = 'vertical';\n\n /** Defines the number of rows displayed in the field. */\n @Prop({ reflect: true })\n rows: number;\n\n /** Determines whether the field is subject to spell-checking by the underlying browser or OS. */\n @Prop({ reflect: true })\n spellcheck: boolean;\n\n /** The value of the field. */\n @Prop({ mutable: true })\n value: string;\n\n // #endregion\n // #region Events\n\n /**\n * Emitted when the field loses focus after the value has been changed.\n * @legacyEvent\n */\n @Event()\n change: EventEmitter<{ value: string }>;\n\n /**\n * Emitted when the field value is updated.\n * @legacyEvent\n */\n @Event()\n input: EventEmitter<{ value: string }>;\n\n // #endregion\n // #region Component Lifecycle Events\n\n componentWillLoad() {\n if (isNaN(this.maxlength)) {\n this.maxlength = undefined;\n }\n }\n\n componentDidLoad() {\n overrideFocus(this.hostElement);\n }\n\n componentDidRender() {\n this.scheduledAfterRender.push(this.checkRows, this.checkCols, this.increaseHeightIfOverflowing);\n this.scheduledAfterRender.forEach(fn => fn());\n this.scheduledAfterRender = [];\n }\n\n // #endregion\n // #region Listeners\n\n @Listen('change')\n onHostElementChange(event: CustomEvent) {\n if (event.target === this.hostElement && !this.hostElement.onchange) {\n this.value = event.detail.value;\n }\n }\n\n @Listen('focus')\n onHostElementFocus(event: Event) {\n if (!isEventFromElement(event, this.hostElement)) return;\n this.textareaField.focus();\n }\n\n @Listen('input')\n onHostElementInput(event: CustomEvent) {\n if (event.target === this.hostElement && !this.hostElement.oninput) {\n this.value = event.detail.value;\n }\n }\n\n // #endregion\n // #region Public Methods API\n\n /**\n * Emulates focusing the `<textarea>`, centering the provided value, and emitting an `input` event.\n *\n * This method leaves the focus on the `<textarea>` and as a result does not trigger the `change` event. If you want\n * to trigger the `change` event, move the focus to another element after calling this method.\n *\n * @testOnly\n */\n @Method()\n setValue(value: string) {\n const { textareaField } = this;\n textareaField.focus();\n textareaField.value = value;\n textareaField.dispatchEvent(new InputEvent('input'));\n }\n\n // #endregion\n // #region Watchers\n\n @Watch('cols')\n colsObserver() {\n this.contentContainer.style.width = null;\n }\n\n @Watch('errors')\n errorsObserver() {\n this.hasFocus && this.scheduledAfterRender.push(() => setMessageHeight(this));\n }\n\n @Watch('hints')\n hintsObserver() {\n this.hasFocus && this.scheduledAfterRender.push(() => setMessageHeight(this));\n }\n\n @Watch('rows')\n rowsObserver() {\n this.contentContainer.style.height = null;\n }\n\n @Watch('value')\n valueObserver() {\n const { maxlength, value = '' } = this;\n if (!maxlength) return;\n\n const truncatedValue = value.substr(0, maxlength);\n if (truncatedValue === value) return;\n\n this.change.emit({ value: truncatedValue });\n }\n\n // #endregion\n // #region Local Methods\n\n get hasError() {\n return Array.isArray(this.errors) && this.errors.length > 0;\n }\n\n get inputDescribedBy() {\n return this.showMessages ? `${this.inputId}-description` : undefined;\n }\n\n get inputId() {\n return `input-guid-${this.guid}`;\n }\n\n get messages(): string[] {\n return (\n (this.errors && this.errors.length > 0 && this.errors) ||\n (this.hints && this.hints.length > 0 && this.hints) ||\n []\n );\n }\n\n get showMessages() {\n return this.messages.length > 0 && !this.hideMessages;\n }\n\n get showResize() {\n const { resize } = this;\n return resize && resize !== 'none';\n }\n\n get wrapperClasses() {\n const errorClass = this.hasError ? ' has-error' : '';\n const valueClass = !!this.value ? ' has-value' : '';\n const focusClass = this.hasFocus ? ' has-focus' : '';\n\n return `field-container${errorClass}${valueClass}${focusClass}`;\n }\n\n checkCols = () => {\n const { contentContainer, cols, textareaField, resize } = this;\n\n if (!cols || ['none', 'vertical'].includes(resize)) return;\n contentContainer.style.width = `${contentContainer.offsetWidth}px`;\n textareaField.removeAttribute('cols');\n };\n\n checkRows = () => {\n const { contentContainer, rows, textareaField, resize } = this;\n\n if (!rows || ['none', 'horizontal'].includes(resize)) return;\n contentContainer.style.height = `${contentContainer.offsetHeight}px`;\n textareaField.removeAttribute('rows');\n };\n\n getBorderOffset = () => {\n const computedStyle = window.getComputedStyle(this.textareaField);\n\n return parseInt(computedStyle.borderTopWidth, 10) + parseInt(computedStyle.borderBottomWidth, 10);\n };\n\n increaseHeightIfOverflowing = () => {\n const { scrollHeight } = this.textareaField;\n if (this.resize === 'vertical-auto' && this.isOverflowingVertically()) {\n // need to account for border width because scrollHeight does not include it\n const newHeight = scrollHeight + this.getBorderOffset();\n this.contentContainer.style.height = `${newHeight}px`;\n }\n };\n\n inputDOM() {\n const textareaClasses = this.resize === 'vertical-auto' ? 'resize-vertical-auto' : '';\n\n return (\n <div class=\"input-container\">\n <textarea\n id={this.inputId}\n class={textareaClasses}\n placeholder={(this.placeholder && loc(this.placeholder)) || undefined}\n test-id=\"inputField\"\n maxLength={this.maxlength}\n aria-describedby={this.inputDescribedBy}\n aria-invalid={`${this.hasError}`}\n aria-required={`${!this.optional}`}\n aria-label={this.hideLabel && this.label}\n spellcheck={this.spellcheck}\n rows={this.rows || 3}\n cols={this.cols}\n value={this.value}\n ref={el => (this.textareaField = el)}\n readonly={!!this.readonly}\n disabled={!!this.disabled}\n maxlength={this.maxlength}\n onInput={this.onTextareaInput}\n onChange={this.onTextareaChange}\n onFocus={this.onTextareaFocus}\n onBlur={this.onTextareaBlur}\n ></textarea>\n {this.hasError ? (\n <q2-icon\n type=\"error\"\n class=\"icon-error\"\n />\n ) : (\n ''\n )}\n {this.showResize && (\n <button\n onMouseDown={this.onMouseDown}\n onTouchStart={this.onTouchStart}\n class=\"btn-resize\"\n aria-label={loc('tecton.element.input.resize')}\n tabIndex={-1}\n >\n <svg\n aria-hidden=\"true\"\n viewBox=\"0 0 12 12\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M8.5 11.5l3-3m-7 3l7-7m-11 7l11-11\"\n fill=\"none\"\n stroke-stroke-linecap=\"square\"\n />\n </svg>\n </button>\n )}\n </div>\n );\n }\n\n isOverflowingVertically = () => {\n const { clientHeight, scrollHeight } = this.textareaField;\n\n return scrollHeight > clientHeight;\n };\n\n maxLengthDOM() {\n return (\n <div\n class=\"max-length\"\n aria-hidden=\"true\"\n >\n {this.value?.length || 0}/{this.maxlength}\n </div>\n );\n }\n\n onMouseDown = (event: MouseEvent) => {\n const { contentContainer } = this;\n this.downParams = {\n width: contentContainer.offsetWidth,\n height: contentContainer.offsetHeight,\n x: event.clientX,\n y: event.clientY,\n };\n document.addEventListener('mousemove', this.onMouseMove);\n document.addEventListener('mouseup', this.onMouseUp);\n };\n\n onMouseMove = (event: MouseEvent) => {\n this.setHeight(event);\n this.setWidth(event);\n };\n\n onMouseUp = () => {\n document.removeEventListener('mousemove', this.onMouseMove);\n this.downParams = null;\n };\n\n onTextareaBlur = () => {\n const {\n valueOnFocus,\n textareaField: { value },\n } = this;\n this.hasFocus = false;\n setMessageHeight(this);\n if (valueOnFocus !== value) this.change.emit({ value });\n };\n\n onTextareaChange = (event: InputEvent) => {\n event.stopPropagation();\n const value = (event.target as HTMLTextAreaElement).value;\n\n this.change.emit({ value });\n };\n\n onTextareaFocus = () => {\n this.hasFocus = true;\n this.valueOnFocus = this.value;\n setMessageHeight(this);\n };\n\n onTextareaInput = (event: InputEvent) => {\n event.stopPropagation();\n const value = (event.target as HTMLTextAreaElement).value;\n this.increaseHeightIfOverflowing();\n\n this.input.emit({ value });\n };\n\n onTouchMove = (event: TouchEvent) => {\n this.setHeight(event);\n this.setWidth(event);\n };\n\n onTouchStart = (event: TouchEvent) => {\n if (event.touches.length !== 1) return;\n\n event.preventDefault();\n\n const { contentContainer } = this;\n const firstTouch = event.touches[0];\n\n this.downParams = {\n width: contentContainer.offsetWidth,\n height: contentContainer.offsetHeight,\n x: firstTouch.pageX,\n y: firstTouch.pageY,\n };\n\n document.addEventListener('touchmove', this.onTouchMove);\n document.addEventListener('touchend', this.onTouchMove);\n };\n\n setHeight(event: MouseEvent | TouchEvent) {\n const {\n contentContainer,\n resize,\n downParams: { height, y },\n } = this;\n const resizeY = ['both', 'vertical', 'vertical-auto'].includes(resize);\n\n if (!resizeY) return;\n\n const eventY = event instanceof MouseEvent ? event.clientY : event.touches[0]?.pageY ?? 0;\n const newHeight = height - (y - eventY);\n // If 'vertical-auto', change height if the new height is greater\n // than the current height or the textarea is not overflowing.\n // Otherwise, change height regardless of the new height.\n if (\n resize !== 'vertical-auto' ||\n newHeight > height ||\n (resize === 'vertical-auto' && !this.isOverflowingVertically())\n ) {\n contentContainer.style.height = `${newHeight}px`;\n }\n }\n\n setWidth(event: MouseEvent | TouchEvent) {\n const {\n contentContainer,\n resize,\n downParams: { width, x },\n } = this;\n\n const resizeX = ['both', 'horizontal'].includes(resize);\n\n if (!resizeX) return;\n const eventX = event instanceof MouseEvent ? event.clientX : event.touches[0]?.pageX ?? 0;\n const newWidth = width - (x - eventX);\n contentContainer.style.width = `${newWidth}px`;\n }\n\n // #endregion\n // #region Render Methods\n\n render() {\n return (\n <div class={this.wrapperClasses}>\n {labelDOM(this)}\n <div\n class=\"content-container\"\n ref={el => (this.contentContainer = el)}\n >\n {this.inputDOM()}\n {this.maxlength ? this.maxLengthDOM() : ''}\n {messagesDOM(this)}\n </div>\n </div>\n );\n }\n\n // #endregion\n}\n"]}
1
+ {"version":3,"file":"q2-textarea.js","sourceRoot":"","sources":["../../../src/components/q2-textarea/q2-textarea.tsx"],"names":[],"mappings":"AAAA,OAAO,EACH,SAAS,EAET,IAAI,EACJ,KAAK,EACL,OAAO,EACP,QAAQ,EACR,KAAK,EACL,CAAC,EACD,KAAK,EACL,MAAM,EACN,MAAM,GACT,MAAM,eAAe,CAAC;AAEvB,OAAO,EACH,UAAU,EACV,QAAQ,EACR,kBAAkB,EAClB,WAAW,EACX,GAAG,EACH,cAAc,EACd,aAAa,EACb,gBAAgB,GACnB,MAAM,WAAW,CAAC;AAGnB,MAAM,OAAO,UAAU;;QAInB,wCAAmC,GAAG,QAAQ,CAAC,GAAG,EAAE;YAChD,IAAI,CAAC,gCAAgC,EAAE,CAAC;QAC5C,CAAC,EAAE,IAAI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AAE,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,gBAAgB,GAAG,EAAE,CAAC;gBAEtC,IAAI,CAAC,WAAW,EAAE;gBAClB,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,eAAe,EAAE,CAAC,CAAC,CAAC,EAAE;gBAC5C,cAAc,CAAC,IAAI,CAAC,CACnB,CACJ,CACT,CAAC;IACN,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGJ","sourcesContent":["import {\n Component,\n EventEmitter,\n Prop,\n Event,\n Element,\n Fragment,\n State,\n h,\n Watch,\n Listen,\n Method,\n} from '@stencil/core';\nimport { IDict } from 'src/util';\nimport {\n createGuid,\n debounce,\n isEventFromElement,\n renderLabel,\n loc,\n renderMessages,\n overrideFocus,\n setMessageHeight,\n} from 'src/utils';\n\n@Component({ tag: 'q2-textarea', shadow: true, styleUrl: 'q2-textarea.scss' })\nexport class Q2Textarea {\n // #region Own Properties\n\n contentContainer?: HTMLDivElement;\n debouncedScreenReaderCharacterCount = debounce(() => {\n this.updateScreenReaderCharacterCount();\n }, 2000);\n describeByScreenReaderCharacterCount = true;\n guid = createGuid();\n scheduledAfterRender: (() => void)[] = [];\n textareaField?: HTMLTextAreaElement;\n valueOnFocus: string;\n\n // #endregion\n // #region Host HTML Element\n\n @Element()\n hostElement: HTMLElement;\n\n // #endregion\n // #region State Properties\n\n @State()\n downParams: IDict<number>;\n\n @State()\n hasFocus: boolean;\n\n @State()\n screenReaderCharacterCount: number;\n\n // #endregion\n // #region Public Property API\n\n /**\n * Defines the number of columns displayed in the field.\n * If not set, the field will be full-width and respond to the window size.\n */\n @Prop({ reflect: true })\n cols: number;\n\n /** Indicates the field cannot be focused or interacted with. */\n @Prop({ reflect: true })\n disabled: boolean;\n\n /**\n * Each item in the `errors` array will appear below the input field when the field is focused.\n * @localizable\n */\n @Prop()\n errors: string[];\n\n /**\n * Hide's the field's `<label>` element from view.\n * @warning\n * Only use when a visible label is impractical.\n */\n @Prop({ reflect: true })\n hideLabel: boolean;\n\n /**\n * When `true` and the input field has an active validation error, the field shows the error state without displaying associated error messages below the field (from the errors array above).\n * Primarily used for dropdown selects and date pickers whose controls appear below the input field (where the error messages, if displayed, would also appear).\n */\n @Prop({ reflect: true })\n hideMessages: boolean;\n\n /**\n * Each item in the `hints` array will appear below the input field when the field is focused.\n * @info\n * The `errors` array takes precedence over the `hints` array. If an input field has both hints and errors, only the errors will display.\n * Once all errors are resolved, the hints display the next time the field is focused.\n * @localizable\n */\n @Prop()\n hints: string[];\n\n /**\n * The label that appears above the field. This is announced by screen readers when the field is focused.\n * @localizable\n */\n @Prop({ reflect: true })\n label: string;\n\n /**\n * Defines the maximum allowed input length in characters. Formatting characters (e.g. `.`, `-`, etc) are included in the `maxlength` comparison.\n * Make sure you account for them when setting the `maxlength` value.\n * @info\n * Please set the `rows` attribute in correlation with `maxlength` to show as much text as possible in the field viewport.\n */\n @Prop({ reflect: true, mutable: true })\n maxlength: number;\n\n /** Appends \"(optional)\" to the field label, and sets `aria-required` on the nested input tag to `false`. */\n @Prop({ reflect: true })\n optional: boolean;\n\n /**\n * Text that appears within the field when it is blurred and empty.\n * Placeholder text disappears when the user focuses on the field and provides input.\n * @info\n * Primarily used for rare cases in which a visible form label is not expected (e.g., search fields).\n * @localizable\n */\n @Prop({ reflect: true })\n placeholder: string;\n\n /**\n * Appends \"(read only)\" to the field label, and field becomes unusable, but remains focusable.\n * Takes priority over `optional` if both are `true`.\n */\n @Prop({ reflect: true })\n readonly: boolean;\n\n /** Indicates how the field is resizable. */\n @Prop({ reflect: true })\n resize: 'none' | 'vertical' | 'horizontal' | 'both' | 'vertical-auto' = 'vertical';\n\n /** Defines the number of rows displayed in the field. */\n @Prop({ reflect: true })\n rows: number;\n\n /** Determines whether the field is subject to spell-checking by the underlying browser or OS. */\n @Prop({ reflect: true })\n spellcheck: boolean;\n\n /** The value of the field. */\n @Prop({ mutable: true })\n value: string;\n\n // #endregion\n // #region Events\n\n /**\n * Emitted when the field loses focus after the value has been changed.\n * @legacyEvent\n */\n @Event()\n change: EventEmitter<{ value: string }>;\n\n /**\n * Emitted when the field value is updated.\n * @legacyEvent\n */\n @Event()\n input: EventEmitter<{ value: string }>;\n\n // #endregion\n // #region Component Lifecycle Events\n\n componentWillLoad() {\n if (isNaN(this.maxlength)) {\n this.maxlength = undefined;\n }\n\n if (this.maxlength) {\n this.updateScreenReaderCharacterCount();\n }\n }\n\n componentDidLoad() {\n overrideFocus(this.hostElement);\n }\n\n componentDidRender() {\n this.scheduledAfterRender.push(this.checkRows, this.checkCols, this.increaseHeightIfOverflowing);\n this.scheduledAfterRender.forEach(fn => fn());\n this.scheduledAfterRender = [];\n }\n\n // #endregion\n // #region Listeners\n\n @Listen('change')\n onHostElementChange(event: CustomEvent) {\n if (event.target === this.hostElement && !this.hostElement.onchange) {\n this.value = event.detail.value;\n }\n }\n\n @Listen('focus')\n onHostElementFocus(event: Event) {\n if (!isEventFromElement(event, this.hostElement)) return;\n this.textareaField.focus();\n }\n\n @Listen('input')\n onHostElementInput(event: CustomEvent) {\n if (event.target === this.hostElement && !this.hostElement.oninput) {\n this.value = event.detail.value;\n }\n }\n\n // #endregion\n // #region Public Methods API\n\n /**\n * Emulates focusing the `<textarea>`, centering the provided value, and emitting an `input` event.\n *\n * This method leaves the focus on the `<textarea>` and as a result does not trigger the `change` event. If you want\n * to trigger the `change` event, move the focus to another element after calling this method.\n *\n * @testOnly\n */\n @Method()\n setValue(value: string) {\n const { textareaField } = this;\n textareaField.focus();\n textareaField.value = value;\n textareaField.dispatchEvent(new InputEvent('input'));\n }\n\n // #endregion\n // #region Watchers\n\n @Watch('cols')\n colsObserver() {\n this.contentContainer.style.width = null;\n }\n\n @Watch('errors')\n errorsObserver() {\n this.hasFocus && this.scheduledAfterRender.push(() => setMessageHeight(this));\n }\n\n @Watch('hints')\n hintsObserver() {\n this.hasFocus && this.scheduledAfterRender.push(() => setMessageHeight(this));\n }\n\n @Watch('maxlength')\n maxlengthObserver() {\n if (this.maxlength) {\n this.updateScreenReaderCharacterCount();\n }\n }\n\n @Watch('rows')\n rowsObserver() {\n this.contentContainer.style.height = null;\n }\n\n @Watch('value')\n valueObserver() {\n const { maxlength, value = '' } = this;\n if (!maxlength) return;\n\n const truncatedValue = value.substr(0, maxlength);\n if (truncatedValue === value) return;\n\n this.change.emit({ value: truncatedValue });\n }\n\n // #endregion\n // #region Local Methods\n\n get hasError() {\n return Array.isArray(this.errors) && this.errors.length > 0;\n }\n\n get inputDescribedBy() {\n let describedBy = undefined;\n\n if (this.showMessages) {\n describedBy = `${this.inputId}-description`;\n }\n\n // Remove screen reader character count from described by after typing\n // starts to avoid double announcement. It's needed on focus to announce\n // the character count when field gains focus.\n if (this.maxlength && this.describeByScreenReaderCharacterCount) {\n describedBy = describedBy ? `${describedBy} ${this.inputId}-max-length` : `${this.inputId}-max-length`;\n }\n\n return describedBy;\n }\n\n get inputId() {\n return `input-guid-${this.guid}`;\n }\n\n get messages(): string[] {\n return (\n (this.errors && this.errors.length > 0 && this.errors) ||\n (this.hints && this.hints.length > 0 && this.hints) ||\n []\n );\n }\n\n get showMessages() {\n return this.messages.length > 0 && !this.hideMessages;\n }\n\n get showResize() {\n const { resize } = this;\n return resize && resize !== 'none';\n }\n\n get wrapperClasses() {\n const errorClass = this.hasError ? ' has-error' : '';\n const valueClass = !!this.value ? ' has-value' : '';\n const focusClass = this.hasFocus ? ' has-focus' : '';\n\n return `field-container${errorClass}${valueClass}${focusClass}`;\n }\n\n checkCols = () => {\n const { contentContainer, cols, textareaField, resize } = this;\n\n if (!cols || ['none', 'vertical'].includes(resize)) return;\n contentContainer.style.width = `${contentContainer.offsetWidth}px`;\n textareaField.removeAttribute('cols');\n };\n\n checkRows = () => {\n const { contentContainer, rows, textareaField, resize } = this;\n\n if (!rows || ['none', 'horizontal'].includes(resize)) return;\n contentContainer.style.height = `${contentContainer.offsetHeight}px`;\n textareaField.removeAttribute('rows');\n };\n\n getBorderOffset = () => {\n const computedStyle = window.getComputedStyle(this.textareaField);\n\n return parseInt(computedStyle.borderTopWidth, 10) + parseInt(computedStyle.borderBottomWidth, 10);\n };\n\n increaseHeightIfOverflowing = () => {\n const { scrollHeight } = this.textareaField;\n if (this.resize === 'vertical-auto' && this.isOverflowingVertically()) {\n // need to account for border width because scrollHeight does not include it\n const newHeight = scrollHeight + this.getBorderOffset();\n this.contentContainer.style.height = `${newHeight}px`;\n }\n };\n\n isOverflowingVertically = () => {\n const { clientHeight, scrollHeight } = this.textareaField;\n\n return scrollHeight > clientHeight;\n };\n\n onMouseDown = (event: MouseEvent) => {\n const { contentContainer } = this;\n this.downParams = {\n width: contentContainer.offsetWidth,\n height: contentContainer.offsetHeight,\n x: event.clientX,\n y: event.clientY,\n };\n document.addEventListener('mousemove', this.onMouseMove);\n document.addEventListener('mouseup', this.onMouseUp);\n };\n\n onMouseMove = (event: MouseEvent) => {\n this.setHeight(event);\n this.setWidth(event);\n };\n\n onMouseUp = () => {\n document.removeEventListener('mousemove', this.onMouseMove);\n this.downParams = null;\n };\n\n onTextareaBlur = () => {\n const {\n valueOnFocus,\n textareaField: { value },\n } = this;\n this.describeByScreenReaderCharacterCount = true;\n this.hasFocus = false;\n setMessageHeight(this);\n if (valueOnFocus !== value) this.change.emit({ value });\n };\n\n onTextareaChange = (event: InputEvent) => {\n event.stopPropagation();\n const value = (event.target as HTMLTextAreaElement).value;\n\n this.change.emit({ value });\n };\n\n onTextareaFocus = () => {\n this.hasFocus = true;\n this.valueOnFocus = this.value;\n setMessageHeight(this);\n };\n\n onTextareaInput = (event: InputEvent) => {\n event.stopPropagation();\n const value = (event.target as HTMLTextAreaElement).value;\n this.describeByScreenReaderCharacterCount = false;\n this.increaseHeightIfOverflowing();\n if (this.maxlength) this.debouncedScreenReaderCharacterCount();\n this.input.emit({ value });\n };\n\n onTouchMove = (event: TouchEvent) => {\n this.setHeight(event);\n this.setWidth(event);\n };\n\n onTouchStart = (event: TouchEvent) => {\n if (event.touches.length !== 1) return;\n\n event.preventDefault();\n\n const { contentContainer } = this;\n const firstTouch = event.touches[0];\n\n this.downParams = {\n width: contentContainer.offsetWidth,\n height: contentContainer.offsetHeight,\n x: firstTouch.pageX,\n y: firstTouch.pageY,\n };\n\n document.addEventListener('touchmove', this.onTouchMove);\n document.addEventListener('touchend', this.onTouchMove);\n };\n\n setHeight(event: MouseEvent | TouchEvent) {\n const {\n contentContainer,\n resize,\n downParams: { height, y },\n } = this;\n const resizeY = ['both', 'vertical', 'vertical-auto'].includes(resize);\n\n if (!resizeY) return;\n\n const eventY = event instanceof MouseEvent ? event.clientY : event.touches[0]?.pageY ?? 0;\n const newHeight = height - (y - eventY);\n // If 'vertical-auto', change height if the new height is greater\n // than the current height or the textarea is not overflowing.\n // Otherwise, change height regardless of the new height.\n if (\n resize !== 'vertical-auto' ||\n newHeight > height ||\n (resize === 'vertical-auto' && !this.isOverflowingVertically())\n ) {\n contentContainer.style.height = `${newHeight}px`;\n }\n }\n\n setWidth(event: MouseEvent | TouchEvent) {\n const {\n contentContainer,\n resize,\n downParams: { width, x },\n } = this;\n\n const resizeX = ['both', 'horizontal'].includes(resize);\n\n if (!resizeX) return;\n const eventX = event instanceof MouseEvent ? event.clientX : event.touches[0]?.pageX ?? 0;\n const newWidth = width - (x - eventX);\n contentContainer.style.width = `${newWidth}px`;\n }\n\n updateScreenReaderCharacterCount = () => {\n this.screenReaderCharacterCount = this.value?.length || 0;\n };\n\n // #endregion\n // #region Render Methods\n\n renderInput() {\n const textareaClasses = this.resize === 'vertical-auto' ? 'resize-vertical-auto' : '';\n\n return (\n <div class=\"input-container\">\n <textarea\n id={this.inputId}\n class={textareaClasses}\n placeholder={(this.placeholder && loc(this.placeholder)) || undefined}\n test-id=\"inputField\"\n maxLength={this.maxlength}\n aria-describedby={this.inputDescribedBy}\n aria-invalid={`${this.hasError}`}\n aria-required={`${!this.optional}`}\n aria-label={this.hideLabel && this.label}\n spellcheck={this.spellcheck}\n rows={this.rows || 3}\n cols={this.cols}\n value={this.value}\n ref={el => (this.textareaField = el)}\n readonly={!!this.readonly}\n disabled={!!this.disabled}\n maxlength={this.maxlength}\n onInput={this.onTextareaInput}\n onChange={this.onTextareaChange}\n onFocus={this.onTextareaFocus}\n onBlur={this.onTextareaBlur}\n ></textarea>\n {this.hasError ? (\n <q2-icon\n type=\"error\"\n class=\"icon-error\"\n />\n ) : (\n ''\n )}\n {this.showResize && (\n <button\n onMouseDown={this.onMouseDown}\n onTouchStart={this.onTouchStart}\n class=\"btn-resize\"\n aria-label={loc('tecton.element.input.resize')}\n tabIndex={-1}\n >\n <svg\n aria-hidden=\"true\"\n viewBox=\"0 0 12 12\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M8.5 11.5l3-3m-7 3l7-7m-11 7l11-11\"\n fill=\"none\"\n stroke-stroke-linecap=\"square\"\n />\n </svg>\n </button>\n )}\n </div>\n );\n }\n\n renderMaxLength() {\n return (\n <Fragment>\n <div\n class=\"max-length\"\n aria-hidden=\"true\"\n >\n {this.value?.length || 0}/{this.maxlength}\n </div>\n <div\n aria-live=\"polite\"\n class=\"sr\"\n id={`${this.inputId}-max-length`}\n test-id=\"max-length-sr\"\n >\n {loc('tecton.element.textarea.characterCount.screenReader', [\n this.screenReaderCharacterCount,\n this.maxlength,\n ])}\n </div>\n </Fragment>\n );\n }\n\n render() {\n return (\n <div class={this.wrapperClasses}>\n {renderLabel(this)}\n <div\n class=\"content-container\"\n ref={el => (this.contentContainer = el)}\n >\n {this.renderInput()}\n {this.maxlength ? this.renderMaxLength() : ''}\n {renderMessages(this)}\n </div>\n </div>\n );\n }\n\n // #endregion\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { setup, dispatchEvent, getActiveElementTestId, getListOfStyleCompilationIssues, evaluateA11y, } from "../../../utils/helpers";
1
+ import { setup, setTestStrings, dispatchEvent, getActiveElementTestId, getListOfStyleCompilationIssues, evaluateA11y, } from "../../../utils/helpers";
2
2
  describe('q2-textarea', () => {
3
3
  let page;
4
4
  let normalStyle;
@@ -22,15 +22,6 @@ describe('q2-textarea', () => {
22
22
  const label = await page.find('q2-textarea >>> label');
23
23
  expect(label.innerText.trim()).toEqual('name');
24
24
  });
25
- describe('[A11y] guideline compliance', () => {
26
- it('Does not have accessibility violations with only label', async () => {
27
- const page = await setup({
28
- html: `<q2-textarea value="Ir" />`,
29
- });
30
- const hasViolations = await evaluateA11y(page);
31
- expect(hasViolations).toBe(false);
32
- });
33
- });
34
25
  describe('focus transferring', () => {
35
26
  const html = '<q2-textarea value="Ir" />';
36
27
  it('focuses when focus event dispatched ', async function () {
@@ -351,6 +342,22 @@ describe('q2-textarea', () => {
351
342
  expect(await innerTextarea.getProperty('value')).toEqual('ABCDE');
352
343
  expect(maxLengthContainer).toEqualText('5/5');
353
344
  });
345
+ it('screen reader character total is updated after pause in typing', async () => {
346
+ const page = await setup({ html: '<q2-textarea />' });
347
+ await setTestStrings(page, {
348
+ 'tecton.element.textarea.characterCount.screenReader': '{0}',
349
+ });
350
+ const q2Textarea = await page.find('q2-textarea');
351
+ q2Textarea.setProperty('maxlength', '5');
352
+ await page.waitForChanges();
353
+ await q2Textarea.callMethod('setValue', 'test');
354
+ await page.waitForChanges();
355
+ const maxLengthSRContainerOld = await page.find('q2-textarea >>> [test-id="max-length-sr"]');
356
+ expect(maxLengthSRContainerOld).toEqualText('0');
357
+ await page.waitForTimeout(2000);
358
+ const maxLengthSRContainerNew = await page.find('q2-textarea >>> [test-id="max-length-sr"]');
359
+ expect(maxLengthSRContainerNew).toEqualText('4');
360
+ });
354
361
  });
355
362
  });
356
363
  describe('optional', () => {
@@ -1163,5 +1170,19 @@ describe('q2-textarea', () => {
1163
1170
  });
1164
1171
  });
1165
1172
  });
1173
+ describe('Accessibility', () => {
1174
+ describe('aXe DevTools', () => {
1175
+ it('does not have accessibility violations', async () => {
1176
+ const page = await setup({
1177
+ html: `<q2-textarea value="Ir" />`,
1178
+ });
1179
+ const hasViolations = await evaluateA11y(page);
1180
+ expect(hasViolations).toBe(false);
1181
+ });
1182
+ });
1183
+ describe('Accessibility Tree', () => { });
1184
+ describe('Keyboard Controls', () => { });
1185
+ describe('Other', () => { });
1186
+ });
1166
1187
  });
1167
1188
  //# sourceMappingURL=q2-textarea-test.e2e.js.map