q2-tecton-elements 1.53.0 → 1.53.2

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 (442) hide show
  1. package/dist/cjs/click-elsewhere_2.cjs.entry.js +64 -61
  2. package/dist/cjs/click-elsewhere_2.cjs.entry.js.map +1 -1
  3. package/dist/cjs/{index-07285783.js → index-76f63767.js} +1 -21
  4. package/dist/cjs/index-76f63767.js.map +1 -0
  5. package/dist/cjs/loader.cjs.js +1 -1
  6. package/dist/cjs/q2-action-group.cjs.entry.js +2 -2
  7. package/dist/cjs/q2-action-sheet.cjs.entry.js +2 -2
  8. package/dist/cjs/q2-avatar.cjs.entry.js +1 -1
  9. package/dist/cjs/q2-badge_7.cjs.entry.js +12 -4
  10. package/dist/cjs/q2-badge_7.cjs.entry.js.map +1 -1
  11. package/dist/cjs/q2-calendar.cjs.entry.js +1 -1
  12. package/dist/cjs/q2-card.cjs.entry.js +1 -1
  13. package/dist/cjs/q2-carousel-pane.cjs.entry.js +3 -3
  14. package/dist/cjs/q2-carousel.cjs.entry.js +1 -1
  15. package/dist/cjs/q2-chart-area.cjs.entry.js +2 -2
  16. package/dist/cjs/q2-chart-bar.cjs.entry.js +2 -2
  17. package/dist/cjs/q2-chart-donut.cjs.entry.js +2 -2
  18. package/dist/cjs/q2-checkbox-group.cjs.entry.js +1 -1
  19. package/dist/cjs/q2-checkbox.cjs.entry.js +1 -1
  20. package/dist/cjs/q2-currency.cjs.entry.js +1 -1
  21. package/dist/cjs/q2-data-table.cjs.entry.js +1 -1
  22. package/dist/cjs/q2-detail.cjs.entry.js +2 -2
  23. package/dist/cjs/q2-dropdown-item.cjs.entry.js +1 -1
  24. package/dist/cjs/q2-dropdown.cjs.entry.js +10 -12
  25. package/dist/cjs/q2-dropdown.cjs.entry.js.map +1 -1
  26. package/dist/cjs/q2-editable-field.cjs.entry.js +7 -8
  27. package/dist/cjs/q2-editable-field.cjs.entry.js.map +1 -1
  28. package/dist/cjs/q2-example.cjs.entry.js +1 -1
  29. package/dist/cjs/q2-file-picker.cjs.entry.js +1 -1
  30. package/dist/cjs/q2-formatted-text.cjs.entry.js +1 -1
  31. package/dist/cjs/q2-item_3.cjs.entry.js +3 -3
  32. package/dist/cjs/q2-legend.cjs.entry.js +1 -1
  33. package/dist/cjs/q2-loc.cjs.entry.js +2 -2
  34. package/dist/cjs/q2-message.cjs.entry.js +2 -2
  35. package/dist/cjs/q2-month-picker.cjs.entry.js +3 -3
  36. package/dist/cjs/q2-optgroup.cjs.entry.js +2 -2
  37. package/dist/cjs/q2-option-list.cjs.entry.js +1 -1
  38. package/dist/cjs/q2-option.cjs.entry.js +2 -2
  39. package/dist/cjs/q2-pagination.cjs.entry.js +4 -4
  40. package/dist/cjs/q2-pill.cjs.entry.js +2 -2
  41. package/dist/cjs/q2-radio-group.cjs.entry.js +1 -1
  42. package/dist/cjs/q2-radio.cjs.entry.js +1 -1
  43. package/dist/cjs/q2-relative-time.cjs.entry.js +2 -2
  44. package/dist/cjs/q2-resize-observer.cjs.entry.js +1 -1
  45. package/dist/cjs/q2-section.cjs.entry.js +3 -3
  46. package/dist/cjs/q2-select.cjs.entry.js +89 -13
  47. package/dist/cjs/q2-select.cjs.entry.js.map +1 -1
  48. package/dist/cjs/q2-stepper-pane.cjs.entry.js +1 -1
  49. package/dist/cjs/q2-stepper-vertical.cjs.entry.js +2 -2
  50. package/dist/cjs/q2-stepper.cjs.entry.js +2 -2
  51. package/dist/cjs/q2-tag.cjs.entry.js +2 -2
  52. package/dist/cjs/q2-tecton-elements.cjs.js +1 -1
  53. package/dist/cjs/q2-textarea.cjs.entry.js +3 -2
  54. package/dist/cjs/q2-textarea.cjs.entry.js.map +1 -1
  55. package/dist/cjs/q2-tooltip.cjs.entry.js +1 -1
  56. package/dist/cjs/tecton-tab-pane.cjs.entry.js +2 -2
  57. package/dist/collection/components/click-elsewhere/click-elsewhere.js.map +1 -1
  58. package/dist/collection/components/click-elsewhere/test/click-elsewhere-test.e2e.js.map +1 -1
  59. package/dist/collection/components/q2-action-group/q2-action-group.js +1 -1
  60. package/dist/collection/components/q2-action-group/q2-action-group.js.map +1 -1
  61. package/dist/collection/components/q2-action-group/test/q2-action-group.e2e.js.map +1 -1
  62. package/dist/collection/components/q2-action-group/test/q2-action-group.spec.js.map +1 -1
  63. package/dist/collection/components/q2-action-sheet/q2-action-sheet.js +1 -1
  64. package/dist/collection/components/q2-action-sheet/q2-action-sheet.js.map +1 -1
  65. package/dist/collection/components/q2-action-sheet/test/q2-action-sheet-test.e2e.js.map +1 -1
  66. package/dist/collection/components/q2-avatar/q2-avatar.js +1 -1
  67. package/dist/collection/components/q2-avatar/q2-avatar.js.map +1 -1
  68. package/dist/collection/components/q2-avatar/test/q2-avatar-test.e2e.js.map +1 -1
  69. package/dist/collection/components/q2-badge/q2-badge.js.map +1 -1
  70. package/dist/collection/components/q2-badge/test/q2-badge-test.e2e.js.map +1 -1
  71. package/dist/collection/components/q2-btn/q2-btn.js +4 -0
  72. package/dist/collection/components/q2-btn/q2-btn.js.map +1 -1
  73. package/dist/collection/components/q2-btn/test/q2-btn-test.e2e.js.map +1 -1
  74. package/dist/collection/components/q2-calendar/q2-calendar-helpers.js.map +1 -1
  75. package/dist/collection/components/q2-calendar/q2-calendar-types.js.map +1 -1
  76. package/dist/collection/components/q2-calendar/q2-calendar-validation.js.map +1 -1
  77. package/dist/collection/components/q2-calendar/q2-calendar.js.map +1 -1
  78. package/dist/collection/components/q2-calendar/q2-month-picker.js +2 -2
  79. package/dist/collection/components/q2-calendar/q2-month-picker.js.map +1 -1
  80. package/dist/collection/components/q2-calendar/test/helpers-test.e2e.js.map +1 -1
  81. package/dist/collection/components/q2-calendar/test/q2-calendar-month-picker-test.e2e.js.map +1 -1
  82. package/dist/collection/components/q2-calendar/test/q2-calendar-test.e2e.js +2 -2
  83. package/dist/collection/components/q2-calendar/test/q2-calendar-test.e2e.js.map +1 -1
  84. package/dist/collection/components/q2-calendar/test/validation-test.e2e.js.map +1 -1
  85. package/dist/collection/components/q2-card/q2-card.js.map +1 -1
  86. package/dist/collection/components/q2-card/test/q2-card-test.e2e.js.map +1 -1
  87. package/dist/collection/components/q2-carousel/q2-carousel.js.map +1 -1
  88. package/dist/collection/components/q2-carousel/test/q2-carousel-test.e2e.js.map +1 -1
  89. package/dist/collection/components/q2-carousel-pane/q2-carousel-pane.js +2 -2
  90. package/dist/collection/components/q2-carousel-pane/q2-carousel-pane.js.map +1 -1
  91. package/dist/collection/components/q2-carousel-pane/test/q2-carousel-pane-test.e2e.js.map +1 -1
  92. package/dist/collection/components/q2-carousel-pane/test/q2-carousel-pane-test.spec.js.map +1 -1
  93. package/dist/collection/components/q2-chart-area/q2-chart-area.js +1 -1
  94. package/dist/collection/components/q2-chart-area/q2-chart-area.js.map +1 -1
  95. package/dist/collection/components/q2-chart-area/test/q2-chart-area-test.e2e.js.map +1 -1
  96. package/dist/collection/components/q2-chart-bar/q2-chart-bar.js +1 -1
  97. package/dist/collection/components/q2-chart-bar/q2-chart-bar.js.map +1 -1
  98. package/dist/collection/components/q2-chart-bar/test/q2-chart-bar-test.e2e.js.map +1 -1
  99. package/dist/collection/components/q2-chart-donut/q2-chart-donut.js +1 -1
  100. package/dist/collection/components/q2-chart-donut/q2-chart-donut.js.map +1 -1
  101. package/dist/collection/components/q2-chart-donut/test/q2-chart-donut-test.e2e.js.map +1 -1
  102. package/dist/collection/components/q2-checkbox/q2-checkbox.js.map +1 -1
  103. package/dist/collection/components/q2-checkbox/test/q2-checkbox-test.e2e.js.map +1 -1
  104. package/dist/collection/components/q2-checkbox-group/q2-checkbox-group.js.map +1 -1
  105. package/dist/collection/components/q2-checkbox-group/test/q2-checkbox-group-test.e2e.js.map +1 -1
  106. package/dist/collection/components/q2-currency/q2-currency.js +1 -1
  107. package/dist/collection/components/q2-currency/q2-currency.js.map +1 -1
  108. package/dist/collection/components/q2-currency/test/q2-currency-test.e2e.js.map +1 -1
  109. package/dist/collection/components/q2-data-table/q2-data-table.js.map +1 -1
  110. package/dist/collection/components/q2-data-table/test/q2-data-table-test.e2e.js.map +1 -1
  111. package/dist/collection/components/q2-detail/q2-detail.js +1 -1
  112. package/dist/collection/components/q2-detail/q2-detail.js.map +1 -1
  113. package/dist/collection/components/q2-detail/test/q2-detail-test.e2e.js.map +1 -1
  114. package/dist/collection/components/q2-dropdown/q2-dropdown.js +9 -11
  115. package/dist/collection/components/q2-dropdown/q2-dropdown.js.map +1 -1
  116. package/dist/collection/components/q2-dropdown/test/q2-dropdown-test.e2e.js +5 -17
  117. package/dist/collection/components/q2-dropdown/test/q2-dropdown-test.e2e.js.map +1 -1
  118. package/dist/collection/components/q2-dropdown-item/q2-dropdown-item.js.map +1 -1
  119. package/dist/collection/components/q2-dropdown-item/test/q2-dropdown-item-test.e2e.js.map +1 -1
  120. package/dist/collection/components/q2-editable-field/q2-editable-field.js +12 -7
  121. package/dist/collection/components/q2-editable-field/q2-editable-field.js.map +1 -1
  122. package/dist/collection/components/q2-editable-field/test/q2-editable-field-test.e2e.js.map +1 -1
  123. package/dist/collection/components/q2-example/q2-example.js +1 -1
  124. package/dist/collection/components/q2-example/q2-example.js.map +1 -1
  125. package/dist/collection/components/q2-example/test/q2-example.e2e.js.map +1 -1
  126. package/dist/collection/components/q2-example/test/q2-example.spec.js.map +1 -1
  127. package/dist/collection/components/q2-file-picker/q2-file-picker.js.map +1 -1
  128. package/dist/collection/components/q2-file-picker/test/q2-file-picker-test.e2e.js.map +1 -1
  129. package/dist/collection/components/q2-file-picker/test/q2-file-picker-test.spec.js.map +1 -1
  130. package/dist/collection/components/q2-formatted-text/q2-formatted-text.js +1 -1
  131. package/dist/collection/components/q2-formatted-text/q2-formatted-text.js.map +1 -1
  132. package/dist/collection/components/q2-formatted-text/test/q2-formatted-text-test.e2e.js.map +1 -1
  133. package/dist/collection/components/q2-icon/q2-icon-types.js.map +1 -1
  134. package/dist/collection/components/q2-icon/q2-icon.js +4 -0
  135. package/dist/collection/components/q2-icon/q2-icon.js.map +1 -1
  136. package/dist/collection/components/q2-icon/test/q2-icon-test.e2e.js.map +1 -1
  137. package/dist/collection/components/q2-input/formatting/alpha.js.map +1 -1
  138. package/dist/collection/components/q2-input/formatting/alpha.spec.js.map +1 -1
  139. package/dist/collection/components/q2-input/formatting/alphanumeric.js.map +1 -1
  140. package/dist/collection/components/q2-input/formatting/alphanumeric.spec.js.map +1 -1
  141. package/dist/collection/components/q2-input/formatting/credit-card.js.map +1 -1
  142. package/dist/collection/components/q2-input/formatting/credit-card.spec.js.map +1 -1
  143. package/dist/collection/components/q2-input/formatting/currency.js.map +1 -1
  144. package/dist/collection/components/q2-input/formatting/currency.spec.js.map +1 -1
  145. package/dist/collection/components/q2-input/formatting/date.js.map +1 -1
  146. package/dist/collection/components/q2-input/formatting/date.spec.js.map +1 -1
  147. package/dist/collection/components/q2-input/formatting/generic.js.map +1 -1
  148. package/dist/collection/components/q2-input/formatting/number.js.map +1 -1
  149. package/dist/collection/components/q2-input/formatting/numeric.js.map +1 -1
  150. package/dist/collection/components/q2-input/formatting/numeric.spec.js.map +1 -1
  151. package/dist/collection/components/q2-input/formatting/phone.js.map +1 -1
  152. package/dist/collection/components/q2-input/formatting/phone.spec.js.map +1 -1
  153. package/dist/collection/components/q2-input/formatting/postal.js.map +1 -1
  154. package/dist/collection/components/q2-input/formatting/postal.spec.js.map +1 -1
  155. package/dist/collection/components/q2-input/formatting/ssn.js.map +1 -1
  156. package/dist/collection/components/q2-input/formatting/ssn.spec.js.map +1 -1
  157. package/dist/collection/components/q2-input/formatting/tin.js.map +1 -1
  158. package/dist/collection/components/q2-input/formatting/tin.spec.js.map +1 -1
  159. package/dist/collection/components/q2-input/q2-input-types.js.map +1 -1
  160. package/dist/collection/components/q2-input/q2-input.js +1 -1
  161. package/dist/collection/components/q2-input/q2-input.js.map +1 -1
  162. package/dist/collection/components/q2-input/test/q2-input-credit-card-test.e2e.js.map +1 -1
  163. package/dist/collection/components/q2-input/test/q2-input-test.e2e.js.map +1 -1
  164. package/dist/collection/components/q2-input/test/q2-input-test.spec.js.map +1 -1
  165. package/dist/collection/components/q2-item/q2-item.js +1 -1
  166. package/dist/collection/components/q2-item/q2-item.js.map +1 -1
  167. package/dist/collection/components/q2-item/test/q2-item-test.e2e.js.map +1 -1
  168. package/dist/collection/components/q2-item/test/q2-item-test.spec.js.map +1 -1
  169. package/dist/collection/components/q2-legend/q2-legend.js +1 -1
  170. package/dist/collection/components/q2-legend/q2-legend.js.map +1 -1
  171. package/dist/collection/components/q2-legend/test/q2-legend-test.e2e.js.map +1 -1
  172. package/dist/collection/components/q2-legend/test/q2-legend-test.spec.js.map +1 -1
  173. package/dist/collection/components/q2-link/q2-link.js.map +1 -1
  174. package/dist/collection/components/q2-link/test/q2-link-test.e2e.js.map +1 -1
  175. package/dist/collection/components/q2-list/q2-list.js +1 -1
  176. package/dist/collection/components/q2-list/q2-list.js.map +1 -1
  177. package/dist/collection/components/q2-list/test/q2-list-test.e2e.js.map +1 -1
  178. package/dist/collection/components/q2-loading/q2-loading.js.map +1 -1
  179. package/dist/collection/components/q2-loading/skeleton/q2-loading-element/index.js.map +1 -1
  180. package/dist/collection/components/q2-loading/skeleton/shapes.js.map +1 -1
  181. package/dist/collection/components/q2-loading/test/q2-loading-element-test.e2e.js.map +1 -1
  182. package/dist/collection/components/q2-loading/test/q2-loading-test.e2e.js.map +1 -1
  183. package/dist/collection/components/q2-loc/q2-loc.js +1 -1
  184. package/dist/collection/components/q2-loc/q2-loc.js.map +1 -1
  185. package/dist/collection/components/q2-loc/test/q2-loc-test.e2e.js.map +1 -1
  186. package/dist/collection/components/q2-loc/test/q2-loc-test.spec.js.map +1 -1
  187. package/dist/collection/components/q2-message/q2-message.js +1 -1
  188. package/dist/collection/components/q2-message/q2-message.js.map +1 -1
  189. package/dist/collection/components/q2-message/test/q2-message-test.e2e.js.map +1 -1
  190. package/dist/collection/components/q2-optgroup/q2-optgroup.js +1 -1
  191. package/dist/collection/components/q2-optgroup/q2-optgroup.js.map +1 -1
  192. package/dist/collection/components/q2-optgroup/test/q2-optgroup-test.e2e.js.map +1 -1
  193. package/dist/collection/components/q2-option/q2-option.js +1 -1
  194. package/dist/collection/components/q2-option/q2-option.js.map +1 -1
  195. package/dist/collection/components/q2-option/test/q2-option-test.e2e.js.map +1 -1
  196. package/dist/collection/components/q2-option/test/q2-option-test.spec.js.map +1 -1
  197. package/dist/collection/components/q2-option-list/q2-option-list.js.map +1 -1
  198. package/dist/collection/components/q2-option-list/test/q2-option-list-test.e2e.js.map +1 -1
  199. package/dist/collection/components/q2-pagination/q2-pagination.js +3 -3
  200. package/dist/collection/components/q2-pagination/q2-pagination.js.map +1 -1
  201. package/dist/collection/components/q2-pagination/test/q2-pagination-test.e2e.js +1 -0
  202. package/dist/collection/components/q2-pagination/test/q2-pagination-test.e2e.js.map +1 -1
  203. package/dist/collection/components/q2-pill/q2-pill.js +1 -1
  204. package/dist/collection/components/q2-pill/q2-pill.js.map +1 -1
  205. package/dist/collection/components/q2-pill/test/q2-pill-test.e2e.js +1 -1
  206. package/dist/collection/components/q2-pill/test/q2-pill-test.e2e.js.map +1 -1
  207. package/dist/collection/components/q2-popover/q2-popover.css +18 -10
  208. package/dist/collection/components/q2-popover/q2-popover.js +64 -60
  209. package/dist/collection/components/q2-popover/q2-popover.js.map +1 -1
  210. package/dist/collection/components/q2-popover/test/q2-popover-test.e2e.js +1 -34
  211. package/dist/collection/components/q2-popover/test/q2-popover-test.e2e.js.map +1 -1
  212. package/dist/collection/components/q2-popover/test/q2-popover-test.spec.js +743 -435
  213. package/dist/collection/components/q2-popover/test/q2-popover-test.spec.js.map +1 -1
  214. package/dist/collection/components/q2-radio/q2-radio.js.map +1 -1
  215. package/dist/collection/components/q2-radio/test/q2-radio-test.e2e.js.map +1 -1
  216. package/dist/collection/components/q2-radio-group/q2-radio-group.js.map +1 -1
  217. package/dist/collection/components/q2-radio-group/test/q2-radio-group-test.e2e.js.map +1 -1
  218. package/dist/collection/components/q2-relative-time/q2-relative-time.js +1 -1
  219. package/dist/collection/components/q2-relative-time/q2-relative-time.js.map +1 -1
  220. package/dist/collection/components/q2-relative-time/test/q2-relative-time-test.e2e.js.map +1 -1
  221. package/dist/collection/components/q2-resize-observer/q2-resize-observer.js +1 -1
  222. package/dist/collection/components/q2-resize-observer/q2-resize-observer.js.map +1 -1
  223. package/dist/collection/components/q2-resize-observer/test/q2-resize-observer.e2e.js.map +1 -1
  224. package/dist/collection/components/q2-resize-observer/test/q2-resize-observer.spec.js.map +1 -1
  225. package/dist/collection/components/q2-section/q2-section.js +2 -2
  226. package/dist/collection/components/q2-section/q2-section.js.map +1 -1
  227. package/dist/collection/components/q2-section/test/q2-section-test.e2e.js.map +1 -1
  228. package/dist/collection/components/q2-select/q2-select.js +110 -15
  229. package/dist/collection/components/q2-select/q2-select.js.map +1 -1
  230. package/dist/collection/components/q2-select/test/q2-select-test.e2e.js +1 -1
  231. package/dist/collection/components/q2-select/test/q2-select-test.e2e.js.map +1 -1
  232. package/dist/collection/components/q2-select/test/q2-select-test.spec.js +412 -0
  233. package/dist/collection/components/q2-select/test/q2-select-test.spec.js.map +1 -0
  234. package/dist/collection/components/q2-stepper/q2-stepper.js +1 -1
  235. package/dist/collection/components/q2-stepper/q2-stepper.js.map +1 -1
  236. package/dist/collection/components/q2-stepper/test/q2-stepper-test.e2e.js.map +1 -1
  237. package/dist/collection/components/q2-stepper-pane/q2-stepper-pane.js.map +1 -1
  238. package/dist/collection/components/q2-stepper-pane/test/q2-stepper-pane-test.e2e.js.map +1 -1
  239. package/dist/collection/components/q2-stepper-vertical/q2-stepper-vertical.js +1 -1
  240. package/dist/collection/components/q2-stepper-vertical/q2-stepper-vertical.js.map +1 -1
  241. package/dist/collection/components/q2-stepper-vertical/test/q2-stepper-vertical-test.e2e.js.map +1 -1
  242. package/dist/collection/components/q2-tab-container/q2-tab-container.js +1 -1
  243. package/dist/collection/components/q2-tab-container/q2-tab-container.js.map +1 -1
  244. package/dist/collection/components/q2-tab-container/test/q2-tab-container-test.e2e.js.map +1 -1
  245. package/dist/collection/components/q2-tab-container/test/q2-tab-container-test.spec.js.map +1 -1
  246. package/dist/collection/components/q2-tab-pane/q2-tab-pane.js +1 -1
  247. package/dist/collection/components/q2-tab-pane/q2-tab-pane.js.map +1 -1
  248. package/dist/collection/components/q2-tab-pane/test/q2-tab-pane-test.e2e.js.map +1 -1
  249. package/dist/collection/components/q2-tag/q2-tag.js +1 -1
  250. package/dist/collection/components/q2-tag/q2-tag.js.map +1 -1
  251. package/dist/collection/components/q2-tag/test/q2-tag-test.e2e.js +6 -1
  252. package/dist/collection/components/q2-tag/test/q2-tag-test.e2e.js.map +1 -1
  253. package/dist/collection/components/q2-textarea/q2-textarea.js +2 -1
  254. package/dist/collection/components/q2-textarea/q2-textarea.js.map +1 -1
  255. package/dist/collection/components/q2-textarea/test/q2-textarea-test.e2e.js.map +1 -1
  256. package/dist/collection/components/q2-tooltip/q2-tooltip.js.map +1 -1
  257. package/dist/collection/components/q2-tooltip/test/q2-tooltip-test.e2e.js.map +1 -1
  258. package/dist/collection/components/tecton-tab-pane/tecton-tab-pane-types.js.map +1 -1
  259. package/dist/collection/components/tecton-tab-pane/tecton-tab-pane.js +2 -2
  260. package/dist/collection/components/tecton-tab-pane/tecton-tab-pane.js.map +1 -1
  261. package/dist/collection/components/tecton-tab-pane/test/tecton-tab-pane-test.e2e.js.map +1 -1
  262. package/dist/collection/index.js.map +1 -1
  263. package/dist/collection/utils/action-sheet.js.map +1 -1
  264. package/dist/collection/utils/charting.js.map +1 -1
  265. package/dist/collection/utils/helpers.js.map +1 -1
  266. package/dist/collection/utils/index.js.map +1 -1
  267. package/dist/collection/utils/sanitize-html-string.js.map +1 -1
  268. package/dist/collection/utils/sanitize-regex-string.js.map +1 -1
  269. package/dist/collection/utils/test/action-sheet-test.e2e.js.map +1 -1
  270. package/dist/collection/utils/test/index.spec.js.map +1 -1
  271. package/dist/components/index2.js +1 -20
  272. package/dist/components/index2.js.map +1 -1
  273. package/dist/components/q2-action-group.js +1 -1
  274. package/dist/components/q2-action-sheet.js +1 -1
  275. package/dist/components/q2-avatar2.js +1 -1
  276. package/dist/components/q2-btn2.js +4 -0
  277. package/dist/components/q2-btn2.js.map +1 -1
  278. package/dist/components/q2-carousel-pane.js +2 -2
  279. package/dist/components/q2-chart-area.js +1 -1
  280. package/dist/components/q2-chart-bar.js +1 -1
  281. package/dist/components/q2-chart-donut.js +1 -1
  282. package/dist/components/q2-currency.js +1 -1
  283. package/dist/components/q2-detail.js +1 -1
  284. package/dist/components/q2-dropdown.js +9 -11
  285. package/dist/components/q2-dropdown.js.map +1 -1
  286. package/dist/components/q2-editable-field.js +7 -8
  287. package/dist/components/q2-editable-field.js.map +1 -1
  288. package/dist/components/q2-example.js +1 -1
  289. package/dist/components/q2-formatted-text.js +1 -1
  290. package/dist/components/q2-icon2.js +4 -0
  291. package/dist/components/q2-icon2.js.map +1 -1
  292. package/dist/components/q2-input2.js +1 -1
  293. package/dist/components/q2-item2.js +1 -1
  294. package/dist/components/q2-legend2.js +1 -1
  295. package/dist/components/q2-list2.js +1 -1
  296. package/dist/components/q2-loc.js +1 -1
  297. package/dist/components/q2-message2.js +1 -1
  298. package/dist/components/q2-month-picker.js +2 -2
  299. package/dist/components/q2-optgroup2.js +1 -1
  300. package/dist/components/q2-option2.js +1 -1
  301. package/dist/components/q2-pagination.js +3 -3
  302. package/dist/components/q2-pill.js +1 -1
  303. package/dist/components/q2-popover2.js +63 -60
  304. package/dist/components/q2-popover2.js.map +1 -1
  305. package/dist/components/q2-relative-time.js +1 -1
  306. package/dist/components/q2-resize-observer2.js +1 -1
  307. package/dist/components/q2-section.js +2 -2
  308. package/dist/components/q2-select2.js +92 -16
  309. package/dist/components/q2-select2.js.map +1 -1
  310. package/dist/components/q2-stepper-vertical.js +1 -1
  311. package/dist/components/q2-stepper.js +1 -1
  312. package/dist/components/q2-tab-container.js +1 -1
  313. package/dist/components/q2-tab-pane.js +1 -1
  314. package/dist/components/q2-tag.js +1 -1
  315. package/dist/components/q2-textarea.js +2 -1
  316. package/dist/components/q2-textarea.js.map +1 -1
  317. package/dist/components/tecton-tab-pane.js +2 -2
  318. package/dist/esm/click-elsewhere_2.entry.js +64 -61
  319. package/dist/esm/click-elsewhere_2.entry.js.map +1 -1
  320. package/dist/esm/{index-d18e2a20.js → index-504f1a9e.js} +2 -21
  321. package/dist/esm/index-504f1a9e.js.map +1 -0
  322. package/dist/esm/loader.js +1 -1
  323. package/dist/esm/q2-action-group.entry.js +2 -2
  324. package/dist/esm/q2-action-sheet.entry.js +2 -2
  325. package/dist/esm/q2-avatar.entry.js +1 -1
  326. package/dist/esm/q2-badge_7.entry.js +12 -4
  327. package/dist/esm/q2-badge_7.entry.js.map +1 -1
  328. package/dist/esm/q2-calendar.entry.js +1 -1
  329. package/dist/esm/q2-card.entry.js +1 -1
  330. package/dist/esm/q2-carousel-pane.entry.js +3 -3
  331. package/dist/esm/q2-carousel.entry.js +1 -1
  332. package/dist/esm/q2-chart-area.entry.js +2 -2
  333. package/dist/esm/q2-chart-bar.entry.js +2 -2
  334. package/dist/esm/q2-chart-donut.entry.js +2 -2
  335. package/dist/esm/q2-checkbox-group.entry.js +1 -1
  336. package/dist/esm/q2-checkbox.entry.js +1 -1
  337. package/dist/esm/q2-currency.entry.js +1 -1
  338. package/dist/esm/q2-data-table.entry.js +1 -1
  339. package/dist/esm/q2-detail.entry.js +2 -2
  340. package/dist/esm/q2-dropdown-item.entry.js +1 -1
  341. package/dist/esm/q2-dropdown.entry.js +10 -12
  342. package/dist/esm/q2-dropdown.entry.js.map +1 -1
  343. package/dist/esm/q2-editable-field.entry.js +7 -8
  344. package/dist/esm/q2-editable-field.entry.js.map +1 -1
  345. package/dist/esm/q2-example.entry.js +1 -1
  346. package/dist/esm/q2-file-picker.entry.js +1 -1
  347. package/dist/esm/q2-formatted-text.entry.js +1 -1
  348. package/dist/esm/q2-item_3.entry.js +3 -3
  349. package/dist/esm/q2-legend.entry.js +1 -1
  350. package/dist/esm/q2-loc.entry.js +2 -2
  351. package/dist/esm/q2-message.entry.js +2 -2
  352. package/dist/esm/q2-month-picker.entry.js +3 -3
  353. package/dist/esm/q2-optgroup.entry.js +2 -2
  354. package/dist/esm/q2-option-list.entry.js +1 -1
  355. package/dist/esm/q2-option.entry.js +2 -2
  356. package/dist/esm/q2-pagination.entry.js +4 -4
  357. package/dist/esm/q2-pill.entry.js +2 -2
  358. package/dist/esm/q2-radio-group.entry.js +1 -1
  359. package/dist/esm/q2-radio.entry.js +1 -1
  360. package/dist/esm/q2-relative-time.entry.js +2 -2
  361. package/dist/esm/q2-resize-observer.entry.js +1 -1
  362. package/dist/esm/q2-section.entry.js +3 -3
  363. package/dist/esm/q2-select.entry.js +90 -14
  364. package/dist/esm/q2-select.entry.js.map +1 -1
  365. package/dist/esm/q2-stepper-pane.entry.js +1 -1
  366. package/dist/esm/q2-stepper-vertical.entry.js +2 -2
  367. package/dist/esm/q2-stepper.entry.js +2 -2
  368. package/dist/esm/q2-tag.entry.js +2 -2
  369. package/dist/esm/q2-tecton-elements.js +1 -1
  370. package/dist/esm/q2-textarea.entry.js +3 -2
  371. package/dist/esm/q2-textarea.entry.js.map +1 -1
  372. package/dist/esm/q2-tooltip.entry.js +1 -1
  373. package/dist/esm/tecton-tab-pane.entry.js +2 -2
  374. package/dist/jest.setup.js +22 -0
  375. package/dist/jest.setup.js.map +1 -0
  376. package/dist/q2-tecton-elements/click-elsewhere_2.entry.js +175 -163
  377. package/dist/q2-tecton-elements/click-elsewhere_2.entry.js.map +1 -1
  378. package/dist/q2-tecton-elements/{index-d18e2a20.js → index-504f1a9e.js} +51 -69
  379. package/dist/q2-tecton-elements/index-504f1a9e.js.map +1 -0
  380. package/dist/q2-tecton-elements/q2-action-group.entry.js +4 -4
  381. package/dist/q2-tecton-elements/q2-action-sheet.entry.js +34 -34
  382. package/dist/q2-tecton-elements/q2-avatar.entry.js +6 -6
  383. package/dist/q2-tecton-elements/q2-badge_7.entry.js +25 -17
  384. package/dist/q2-tecton-elements/q2-badge_7.entry.js.map +1 -1
  385. package/dist/q2-tecton-elements/q2-calendar.entry.js +1 -1
  386. package/dist/q2-tecton-elements/q2-card.entry.js +1 -1
  387. package/dist/q2-tecton-elements/q2-carousel-pane.entry.js +21 -21
  388. package/dist/q2-tecton-elements/q2-carousel.entry.js +1 -1
  389. package/dist/q2-tecton-elements/q2-chart-area.entry.js +3 -3
  390. package/dist/q2-tecton-elements/q2-chart-bar.entry.js +3 -3
  391. package/dist/q2-tecton-elements/q2-chart-donut.entry.js +101 -101
  392. package/dist/q2-tecton-elements/q2-checkbox-group.entry.js +1 -1
  393. package/dist/q2-tecton-elements/q2-checkbox.entry.js +1 -1
  394. package/dist/q2-tecton-elements/q2-currency.entry.js +6 -6
  395. package/dist/q2-tecton-elements/q2-data-table.entry.js +1 -1
  396. package/dist/q2-tecton-elements/q2-detail.entry.js +39 -39
  397. package/dist/q2-tecton-elements/q2-dropdown-item.entry.js +1 -1
  398. package/dist/q2-tecton-elements/q2-dropdown.entry.js +14 -16
  399. package/dist/q2-tecton-elements/q2-dropdown.entry.js.map +1 -1
  400. package/dist/q2-tecton-elements/q2-editable-field.entry.js +27 -18
  401. package/dist/q2-tecton-elements/q2-editable-field.entry.js.map +1 -1
  402. package/dist/q2-tecton-elements/q2-example.entry.js +1 -1
  403. package/dist/q2-tecton-elements/q2-file-picker.entry.js +1 -1
  404. package/dist/q2-tecton-elements/q2-formatted-text.entry.js +2 -2
  405. package/dist/q2-tecton-elements/q2-item_3.entry.js +19 -19
  406. package/dist/q2-tecton-elements/q2-legend.entry.js +2 -2
  407. package/dist/q2-tecton-elements/q2-loc.entry.js +5 -5
  408. package/dist/q2-tecton-elements/q2-message.entry.js +21 -21
  409. package/dist/q2-tecton-elements/q2-month-picker.entry.js +14 -14
  410. package/dist/q2-tecton-elements/q2-optgroup.entry.js +8 -8
  411. package/dist/q2-tecton-elements/q2-option-list.entry.js +1 -1
  412. package/dist/q2-tecton-elements/q2-option.entry.js +14 -14
  413. package/dist/q2-tecton-elements/q2-pagination.entry.js +34 -34
  414. package/dist/q2-tecton-elements/q2-pill.entry.js +14 -14
  415. package/dist/q2-tecton-elements/q2-radio-group.entry.js +1 -1
  416. package/dist/q2-tecton-elements/q2-radio.entry.js +1 -1
  417. package/dist/q2-tecton-elements/q2-relative-time.entry.js +2 -2
  418. package/dist/q2-tecton-elements/q2-resize-observer.entry.js +1 -1
  419. package/dist/q2-tecton-elements/q2-section.entry.js +19 -19
  420. package/dist/q2-tecton-elements/q2-select.entry.js +156 -92
  421. package/dist/q2-tecton-elements/q2-select.entry.js.map +1 -1
  422. package/dist/q2-tecton-elements/q2-stepper-pane.entry.js +1 -1
  423. package/dist/q2-tecton-elements/q2-stepper-vertical.entry.js +37 -37
  424. package/dist/q2-tecton-elements/q2-stepper.entry.js +29 -29
  425. package/dist/q2-tecton-elements/q2-tag.entry.js +25 -25
  426. package/dist/q2-tecton-elements/q2-tecton-elements.esm.js +1 -1
  427. package/dist/q2-tecton-elements/q2-tecton-elements.esm.js.map +1 -1
  428. package/dist/q2-tecton-elements/q2-textarea.entry.js +4 -3
  429. package/dist/q2-tecton-elements/q2-textarea.entry.js.map +1 -1
  430. package/dist/q2-tecton-elements/q2-tooltip.entry.js +1 -1
  431. package/dist/q2-tecton-elements/tecton-tab-pane.entry.js +6 -6
  432. package/dist/types/builds/q2e/development/tecton/tecton/packages/q2-tecton-elements/.stencil/jest.setup.d.ts +1 -0
  433. package/dist/types/components/q2-btn/q2-btn.d.ts +1 -0
  434. package/dist/types/components/q2-dropdown/q2-dropdown.d.ts +1 -4
  435. package/dist/types/components/q2-editable-field/q2-editable-field.d.ts +2 -1
  436. package/dist/types/components/q2-icon/q2-icon.d.ts +1 -0
  437. package/dist/types/components/q2-popover/q2-popover.d.ts +4 -4
  438. package/dist/types/components/q2-select/q2-select.d.ts +19 -0
  439. package/package.json +3 -3
  440. package/dist/cjs/index-07285783.js.map +0 -1
  441. package/dist/esm/index-d18e2a20.js.map +0 -1
  442. package/dist/q2-tecton-elements/index-d18e2a20.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"names":["q2TextareaCss","Q2TextareaStyle0","Q2Textarea","this","debouncedScreenReaderCharacterCount","debounce","updateScreenReaderCharacterCount","describeByScreenReaderCharacterCount","guid","createGuid","scheduledAfterRender","checkCols","contentContainer","cols","textareaField","resize","includes","style","width","offsetWidth","removeAttribute","checkRows","rows","height","offsetHeight","getBorderOffset","computedStyle","window","getComputedStyle","parseInt","borderTopWidth","borderBottomWidth","increaseHeightIfOverflowing","scrollHeight","isOverflowingVertically","newHeight","clientHeight","onMouseDown","event","downParams","x","clientX","y","clientY","document","addEventListener","onMouseMove","onMouseUp","setHeight","setWidth","removeEventListener","onTextareaBlur","valueOnFocus","value","hasFocus","setMessageHeight","change","emit","onTextareaChange","stopPropagation","target","onTextareaFocus","onTextareaInput","maxlength","input","onTouchMove","onTouchStart","touches","length","preventDefault","firstTouch","pageX","pageY","screenReaderCharacterCount","_a","componentWillLoad","isNaN","undefined","componentDidLoad","overrideFocus","hostElement","componentDidRender","push","forEach","fn","onHostElementChange","onchange","detail","onHostElementFocus","isEventFromElement","focus","onHostElementInput","oninput","setValue","dispatchEvent","InputEvent","colsObserver","errorsObserver","hintsObserver","maxlengthObserver","rowsObserver","valueObserver","truncatedValue","substr","hasError","Array","isArray","errors","inputDescribedBy","describedBy","showMessages","inputId","messages","hints","hideMessages","showResize","wrapperClasses","errorClass","valueClass","focusClass","resizeY","eventY","MouseEvent","_b","resizeX","eventX","newWidth","renderInput","textareaClasses","h","class","id","placeholder","loc","maxLength","optional","hideLabel","label","spellcheck","ref","el","readonly","disabled","onInput","onChange","onFocus","onBlur","type","tabIndex","viewBox","xmlns","d","fill","renderMaxLength","Fragment","render","key","renderLabel","renderMessages"],"sources":["src/components/q2-textarea/q2-textarea.scss?tag=q2-textarea&encapsulation=shadow","src/components/q2-textarea/q2-textarea.tsx"],"sourcesContent":["@import '../../styles/host';\n@import '../../styles/functions';\n\n:host {\n --comp-default-margin: #{var-list(var-prefixer(textarea-margin-top), --app-scale-6x, 30px)} 0 #{var-list(\n var-prefixer(textarea-margin-bottom),\n --app-scale-6x,\n 30px\n )};\n display: block;\n margin: var-list(--tct-textarea-margin, --comp-default-margin);\n font-size: var-list(var-prefixer(textarea-font-size), --app-font-size, inherit);\n}\n\n:host([hidden]) {\n display: none;\n}\n\nlabel {\n --comp-label-padding: #{var-list(\n --tct-textarea-label-padding,\n unquote(\n '0 #{var-list(var-prefixer(textarea-label-padding-right), 0)} 0 #{var-list(var-prefixer(textarea-label-padding-left), 0)}'\n )\n )};\n --comp-label-margin: #{var-list(\n --tct-textarea-label-margin,\n unquote(\n '#{var-list(var-prefixer(textarea-label-margin-top), 0)} 0 #{var-list(var-prefixer(textarea-label-margin-bottom), --tct-scale-1x, --app-scale-1x, 5px)}'\n )\n )};\n display: block;\n padding: var(--comp-label-padding);\n margin: var(--comp-label-margin);\n color: var-list(var-prefixer(textarea-label-font-color), inherit);\n font-size: var-list(var-prefixer(textarea-label-font-size), inherit);\n font-weight: var-list(var-prefixer(textarea-label-font-weight), 600);\n text-transform: var-list(var-prefixer(textarea-label-text-transform), none);\n letter-spacing: var-list(var-prefixer(textarea-label-letter-spacing), normal);\n transition: color var-list(var-prefixer(textarea-tween), --tct-tween-2, --app-tween-2, unquote('0.4s ease'));\n\n .has-error & {\n color: var-list(var-prefixer(textarea-error-label-font-color), --tct-textarea-label-font-color, inherit);\n }\n\n :hover & {\n color: var-list(--tct-textarea-hover-label-font-color, var-prefixer(textarea-label-font-color), inherit);\n .has-error & {\n color: var-list(\n --tct-textarea-error-hover-label-font-color,\n var-prefixer(textarea-error-label-font-color),\n --tct-textarea-hover-label-font-color,\n --tct-textarea-label-font-color,\n inherit\n );\n }\n }\n\n :host(:focus-within) & {\n color: var-list(--tct-textarea-focus-label-font-color, var-prefixer(textarea-label-font-color), inherit);\n }\n\n :host(:focus-within) .has-error & {\n color: var-list(\n --tct-textarea-error-focus-label-font-color,\n var-prefixer(textarea-error-label-font-color),\n --tct-textarea-focus-label-font-color,\n var-prefixer(textarea-label-font-color),\n inherit\n );\n }\n}\n\n.optional-tag {\n --comp-label-optional-margin: #{var-list(\n --tct-textarea-label-optional-margin,\n unquote(\n '0 0 0 #{var-list(var-prefixer(textarea-label-optional-margin-left), --tct-scale-1x, --app-scale-1x, 5px)}'\n )\n )};\n margin: var(--comp-label-optional-margin);\n color: var-list(\n var-prefixer(textarea-label-optional-font-color),\n --t-textA,\n --t-a11y-gray-color,\n rgba(77, 77, 77, 0.77)\n );\n font-size: var-list(var-prefixer(textarea-label-optional-font-size), 12px);\n font-weight: var-list(var-prefixer(textarea-label-optional-font-weight), 400);\n}\n\n.input-container {\n min-height: var-list(var-prefixer(textarea-min-height), --comp-textarea-min-height);\n height: 100%;\n --comp-default-border-radius: #{var-list(--tct-border-radius-1, --app-border-radius-1, 4px)};\n --comp-textarea-border-top-left-radius: #{var-list(\n var-prefixer(textarea-border-top-left-radius),\n --comp-default-border-radius\n )};\n --comp-textarea-border-top-right-radius: #{var-list(\n var-prefixer(textarea-border-top-right-radius),\n --comp-default-border-radius\n )};\n --comp-textarea-border-bottom-right-radius: #{var-list(\n var-prefixer(textarea-border-bottom-right-radius),\n --comp-default-border-radius\n )};\n --comp-textarea-border-bottom-left-radius: #{var-list(\n var-prefixer(textarea-border-bottom-left-radius),\n --comp-default-border-radius\n )};\n --comp-textarea-border-radius: var(--comp-textarea-border-top-left-radius)\n var(--comp-textarea-border-top-right-radius) var(--comp-textarea-border-bottom-right-radius)\n var(--comp-textarea-border-bottom-left-radius);\n --comp-textarea-border-width: #{var-list(var-prefixer(textarea-border-top-width), 1px)\n var-list(var-prefixer(textarea-border-right-width), 1px)\n var-list(var-prefixer(textarea-border-bottom-width), 1px)\n var-list(var-prefixer(textarea-border-left-width), 1px)};\n --comp-textarea-icon-clearance: 34px;\n\n :host([disabled]) & {\n cursor: not-allowed;\n opacity: var-list(var-prefixer(textarea-disabled-opacity), --tct-disabled-opacity, --app-disabled-opacity, 0.4);\n }\n}\n\n.content-container {\n --comp-textarea-min-height: 46px;\n --comp-textarea-min-width: 150px;\n position: relative;\n display: inline-block;\n min-height: var-list(var-prefixer(textarea-min-height), --comp-textarea-min-height);\n min-width: var-list(var-prefixer(textarea-min-width) --comp-textarea-min-width);\n\n :host(:not([cols])) & {\n width: 100%;\n }\n}\n\ntextarea {\n --comp-textarea-padding: #{var-list(\n --tct-textarea-padding,\n unquote(\n '#{var-list(var-prefixer(textarea-vertical-padding), --tct-scale-2x, --app-scale-2x, 10px)} #{var-list(var-prefixer(textarea-horizontal-padding), --tct-scale-2x, --app-scale-2x, 10px)}'\n )\n )};\n --comp-textarea-border-color: #{var-list(\n var-prefixer(textarea-border-color),\n var-prefixer(input-border-color),\n --t-a11y-gray-color-AA,\n #949494\n )};\n --comp-textarea-background: #{var-list(\n --tct-textarea-background,\n var-prefixer(textarea-bg),\n --tct-input-background,\n var-prefixer(input-bg),\n --t-gray-14,\n #fcfcfd\n )};\n --comp-textarea-hover-ring-color: var(--tct-textarea-hover-ring-color);\n --comp-textarea-hover-ring: #{0 0 0 2px var(--t-base), 0 0 0 4px var(--comp-textarea-hover-ring-color),\n var-list(--tct-textarea-hover-box-shadow, unquote('0 0 transparent'))};\n\n resize: none;\n height: 100%;\n -webkit-appearance: none;\n appearance: none;\n display: block;\n box-sizing: border-box;\n min-height: var-list(var-prefixer(textarea-min-height), --comp-textarea-min-height);\n padding: var(--comp-textarea-padding);\n background: var(--comp-textarea-background);\n color: var-list(var-prefixer(textarea-font-color), --t-input-font-color, inherit);\n border-width: var(--comp-textarea-border-width);\n border-style: solid;\n border-color: var(--comp-textarea-border-color);\n border-radius: var(--comp-textarea-border-radius);\n box-shadow: var-list(var-prefixer(textarea-box-shadow), none);\n scrollbar-width: thin;\n scrollbar-color: var(--t-a11y-gray-color) transparent;\n --comp-textarea-tween: #{var-list(var-prefixer(textarea-tween), --tct-tween-2, --app-tween-2, unquote('0.4s ease'))};\n transition:\n border-width var(--comp-textarea-tween),\n border-color var(--comp-textarea-tween),\n box-shadow var(--comp-textarea-tween);\n\n &::-webkit-scrollbar {\n width: var(--app-scale-1x);\n height: var(--app-scale-1x);\n margin: var(--app-scale-1x);\n }\n\n &::-webkit-scrollbar-thumb {\n background: var(--t-a11y-gray-color);\n border-radius: 2px;\n }\n\n &::-webkit-scrollbar-track {\n background: transparent;\n }\n\n &:not([cols]) {\n width: 100%;\n }\n\n .has-error & {\n padding-right: var(--comp-textarea-icon-clearance);\n border-color: var-list(var-prefixer(textarea-error-border-color), --const-stoplight-alert, #d20a0a);\n background: var-list(--tct-textarea-error-background, --comp-textarea-background);\n }\n\n &:hover {\n border-color: var-list(--tct-textarea-hover-border-color, --comp-textarea-border-color);\n background: var-list(--tct-textarea-hover-background, --comp-textarea-background);\n box-shadow: var-list(--tct-textarea-hover-box-shadow, --comp-textarea-hover-ring);\n\n .has-error & {\n border-color: var-list(\n --tct-textarea-error-hover-border-color,\n var-prefixer(textarea-error-border-color),\n --const-stoplight-alert,\n #d20a0a\n );\n background: var-list(\n --tct-textarea-error-hover-background,\n --tct-textarea-error-background,\n --comp-textarea-background\n );\n box-shadow: var-list(\n --tct-textarea-error-hover-box-shadow,\n --tct-textarea-error-box-shadow,\n --tct-textarea-hover-box-shadow,\n --comp-textarea-hover-ring\n );\n }\n }\n\n &:focus {\n border-color: var-list(--tct-textarea-focus-border-color, --comp-textarea-border-color);\n background: var-list(--tct-textarea-focus-background, --comp-textarea-background);\n box-shadow: var-list(--tct-textarea-focus-box-shadow, --const-double-focus-ring);\n\n .has-error & {\n border-color: var-list(\n --tct-textarea-error-focus-border-color,\n --tct-textarea-error-border-color,\n --const-stoplight-alert,\n #d20a0a\n );\n background: var-list(\n --tct-textarea-error-focus-background,\n --tct-textarea-error-background,\n --tct-textarea-focus-background,\n --comp-textarea-background\n );\n box-shadow: var-list(\n --tct-textarea-error-focus-box-shadow,\n --tct-textarea-error-box-shadow,\n --tct-textarea-focus-box-shadow,\n --const-double-focus-ring\n );\n }\n }\n\n &::placeholder {\n color: var-list(\n var-prefixer(textarea-placeholder-font-color),\n --t-input-placeholder-font-color,\n --tct-gray-7,\n --app-gray-7,\n --tct-gray-d1,\n --app-gray-d1,\n #666666\n );\n }\n\n &[disabled] {\n cursor: not-allowed;\n }\n\n &.resize-vertical-auto {\n overflow: hidden;\n }\n\n .has-error & {\n padding-right: var(--comp-textarea-icon-clearance);\n\n &:not(:focus) {\n border-color: var-list(var-prefixer(textarea-error-border-color), --const-stoplight-alert, #d20a0a);\n }\n }\n}\n\nq2-icon {\n margin-top: calc(#{var-list(var-prefixer(textarea-border-top-width), 1px)} / 2);\n margin-bottom: calc(#{var-list(var-prefixer(textarea-border-bottom-width), 1px)} / 2);\n pointer-events: none;\n position: absolute;\n top: var-list(var-prefixer(textarea-vertical-padding), --tct-scale-2x, --app-scale-2x, 10px);\n color: var-list(var-prefixer(textarea-icon-stroke-primary), --app-gray-9, --tct-gray, --app-gray, #999999);\n right: 0;\n margin-right: var-list(--tct-scale-2x, --app-scale-2x, 10px);\n --tct-icon-stroke-primary: #{var-list(\n var-prefixer(textarea-icon-stroke-primary),\n var-prefixer(gray-9),\n --tct-gray,\n --app-gray,\n #999999\n )};\n --t-icon-stroke-primary: #{var-list(\n var-prefixer(textarea-icon-stroke-primary),\n var-prefixer(gray-9),\n --tct-gray,\n --app-gray,\n #999999\n )};\n}\n\n.icon-error {\n color: var-list(--tct-stoplight-error, --const-stoplight-alert, #d20a0a);\n --tct-icon-stroke-primary: #{var-list(--tct-stoplight-error, --const-stoplight-alert, #d20a0a)};\n --t-icon-stroke-primary: #{var-list(--tct-stoplight-error, --const-stoplight-alert, #d20a0a)};\n}\n\n.messages-container {\n height: 0px;\n overflow: hidden;\n background: var-list(\n --tct-message-background,\n --tct-message-bg,\n var-prefixer(gray-14),\n --tct-gray-l3,\n --app-gray-l3,\n #f2f2f2\n );\n box-shadow: var-list(\n var-prefixer(textarea-message-box-shadow),\n --tct-box-shadow-1,\n --app-shadow-1,\n unquote(\"0px 0px 2px rgba(0, 0, 0, 0.12), 0px 2px 4px rgba(0, 0, 0, 0.14)\")\n );\n transition: height\n var-list(var-prefixer(textarea-messages-tween), --tct-tween-1, --app-tween-1, unquote('0.2s ease'));\n margin-top: 2px;\n z-index: 1;\n position: absolute;\n width: 100%;\n color: var-list(var-prefixer(textarea-messages-font-color), inherit);\n}\n\n.max-length {\n color: var-list(var-prefixer(textarea-max-length-color), --t-textA, rgba(77, 77, 77, 0.77));\n font-size: var-list(\n var-prefixer(textarea-max-length-font-size),\n --tct-font-size-small,\n --app-font-size-small,\n 12px\n );\n position: absolute;\n right: 0;\n}\n\n.btn-resize {\n --tct-textarea-resize-icon-padding: calc(\n calc(\n #{var-list(var-prefixer(textarea-resize-btn-width), --tct-btn-icon-width, 44px)} - #{var-list(\n var-prefixer(textarea-resize-icon-size),\n 12px\n )}\n ) / 2\n );\n width: var-list(var-prefixer(textarea-resize-btn-width), --tct-btn-icon-width, 44px);\n height: var-list(var-prefixer(textarea-resize-btn-height), --tct-btn-icon-height, 44px);\n background: var-list(var-prefixer(textarea-resize-btn-background), transparent);\n stroke: var-list(var-prefixer(textarea-resize-color), --t-textA, rgba(77, 77, 77, 0.77));\n border: 0;\n position: absolute;\n right: calc(#{var-list(var-prefixer(textarea-resize-icon-padding))} * -1 + 2px);\n bottom: calc(#{var-list(var-prefixer(textarea-resize-icon-padding))} * -1 + 2px);\n display: block;\n padding: var-list(var-prefixer(textarea-resize-icon-padding));\n font-size: 0;\n\n &:focus {\n outline: none;\n box-shadow: none;\n }\n\n :host([resize='both']) & {\n cursor: se-resize;\n }\n\n :host([resize='vertical']) &,\n :host([resize='vertical-auto']) & {\n cursor: s-resize;\n }\n\n :host([resize='horizontal']) & {\n cursor: e-resize;\n }\n}\n","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"],"mappings":";;;;AAAA,MAAMA,IAAgB;;AACtB,MAAAC,IAAeD;;MCyBFE,IAAU;;;;;IAInBC,KAAAC,sCAAsCC,GAAS;MAC3CF,KAAKG;AAAkC,QACxC;IACHH,KAAAI,uCAAuC;IACvCJ,KAAAK,OAAOC;IACPN,KAAAO,uBAAuC;IAySvCP,KAAAQ,YAAY;MACR,OAAMC,kBAAEA,GAAgBC,MAAEA,GAAIC,eAAEA,GAAaC,QAAEA,KAAWZ;MAE1D,KAAKU,KAAQ,EAAC,QAAQ,aAAYG,SAASD,IAAS;MACpDH,EAAiBK,MAAMC,QAAQ,GAAGN,EAAiBO;MACnDL,EAAcM,gBAAgB;AAAO;IAGzCjB,KAAAkB,YAAY;MACR,OAAMT,kBAAEA,GAAgBU,MAAEA,GAAIR,eAAEA,GAAaC,QAAEA,KAAWZ;MAE1D,KAAKmB,KAAQ,EAAC,QAAQ,eAAcN,SAASD,IAAS;MACtDH,EAAiBK,MAAMM,SAAS,GAAGX,EAAiBY;MACpDV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;MACZoB,SAAQ;MACRC,OAAM;OAENrB,EAAA;MACIsB,GAAE;MACFC,MAAK;MAAM,yBACW;;;EASlD,eAAAC;;IACI,OACIxB,EAACyB,GAAQ,MACLzB,EAAA;MACIC,OAAM;MAAY,eACN;SAEXxD,IAAAvE,KAAKkD,WAAK,QAAAqB,WAAA,aAAAA,EAAEN,WAAU,GAAC,KAAGjE,KAAK4D,YAEpCkE,EAAA;MAAA,aACc;MACVC,OAAM;MACNC,IAAI,GAAGhI,KAAK4G;MAAoB,WACxB;OAEPsB,EAAI,uDAAuD,EACxDlI,KAAKsE,4BACLtE,KAAK4D;;EAOzB,MAAA4F;IACI,OACI1B,EAAA;MAAA2B,KAAA;MAAK1B,OAAO/H,KAAKiH;OACZyC,EAAY1J,OACb8H,EAAA;MAAA2B,KAAA;MACI1B,OAAM;MACNS,KAAKC,KAAOzI,KAAKS,mBAAmBgI;OAEnCzI,KAAK4H,eACL5H,KAAK4D,YAAY5D,KAAKsJ,oBAAoB,IAC1CK,EAAe3J"}
1
+ {"version":3,"names":["q2TextareaCss","Q2TextareaStyle0","Q2Textarea","this","debouncedScreenReaderCharacterCount","debounce","updateScreenReaderCharacterCount","describeByScreenReaderCharacterCount","guid","createGuid","scheduledAfterRender","checkCols","contentContainer","cols","textareaField","resize","includes","style","width","offsetWidth","removeAttribute","checkRows","rows","height","offsetHeight","getBorderOffset","computedStyle","window","getComputedStyle","parseInt","borderTopWidth","borderBottomWidth","increaseHeightIfOverflowing","scrollHeight","isOverflowingVertically","newHeight","clientHeight","onMouseDown","event","downParams","x","clientX","y","clientY","document","addEventListener","onMouseMove","onMouseUp","setHeight","setWidth","removeEventListener","onTextareaBlur","valueOnFocus","value","hasFocus","setMessageHeight","change","emit","onTextareaChange","stopPropagation","target","onTextareaFocus","onTextareaInput","maxlength","input","onTouchMove","onTouchStart","touches","length","preventDefault","firstTouch","pageX","pageY","screenReaderCharacterCount","_a","componentWillLoad","isNaN","undefined","componentDidLoad","overrideFocus","hostElement","componentDidRender","push","forEach","fn","onHostElementChange","onchange","detail","onHostElementFocus","isEventFromElement","focus","onHostElementInput","oninput","setValue","dispatchEvent","InputEvent","colsObserver","errorsObserver","hintsObserver","maxlengthObserver","rowsObserver","valueObserver","truncatedValue","substr","hasError","Array","isArray","errors","inputDescribedBy","describedBy","showMessages","inputId","messages","hints","hideMessages","showResize","wrapperClasses","errorClass","valueClass","focusClass","resizeY","eventY","MouseEvent","_b","resizeX","eventX","newWidth","renderInput","textareaClasses","h","class","id","placeholder","loc","maxLength","optional","hideLabel","label","spellcheck","ref","el","readonly","disabled","onInput","onChange","onFocus","onBlur","type","tabIndex","viewBox","xmlns","d","fill","renderMaxLength","Fragment","render","key","renderLabel","renderMessages"],"sources":["src/components/q2-textarea/q2-textarea.scss?tag=q2-textarea&encapsulation=shadow","src/components/q2-textarea/q2-textarea.tsx"],"sourcesContent":["@import '../../styles/host';\n@import '../../styles/functions';\n\n:host {\n --comp-default-margin: #{var-list(var-prefixer(textarea-margin-top), --app-scale-6x, 30px)} 0 #{var-list(\n var-prefixer(textarea-margin-bottom),\n --app-scale-6x,\n 30px\n )};\n display: block;\n margin: var-list(--tct-textarea-margin, --comp-default-margin);\n font-size: var-list(var-prefixer(textarea-font-size), --app-font-size, inherit);\n}\n\n:host([hidden]) {\n display: none;\n}\n\nlabel {\n --comp-label-padding: #{var-list(\n --tct-textarea-label-padding,\n unquote(\n '0 #{var-list(var-prefixer(textarea-label-padding-right), 0)} 0 #{var-list(var-prefixer(textarea-label-padding-left), 0)}'\n )\n )};\n --comp-label-margin: #{var-list(\n --tct-textarea-label-margin,\n unquote(\n '#{var-list(var-prefixer(textarea-label-margin-top), 0)} 0 #{var-list(var-prefixer(textarea-label-margin-bottom), --tct-scale-1x, --app-scale-1x, 5px)}'\n )\n )};\n display: block;\n padding: var(--comp-label-padding);\n margin: var(--comp-label-margin);\n color: var-list(var-prefixer(textarea-label-font-color), inherit);\n font-size: var-list(var-prefixer(textarea-label-font-size), inherit);\n font-weight: var-list(var-prefixer(textarea-label-font-weight), 600);\n text-transform: var-list(var-prefixer(textarea-label-text-transform), none);\n letter-spacing: var-list(var-prefixer(textarea-label-letter-spacing), normal);\n transition: color var-list(var-prefixer(textarea-tween), --tct-tween-2, --app-tween-2, unquote('0.4s ease'));\n\n .has-error & {\n color: var-list(var-prefixer(textarea-error-label-font-color), --tct-textarea-label-font-color, inherit);\n }\n\n :hover & {\n color: var-list(--tct-textarea-hover-label-font-color, var-prefixer(textarea-label-font-color), inherit);\n .has-error & {\n color: var-list(\n --tct-textarea-error-hover-label-font-color,\n var-prefixer(textarea-error-label-font-color),\n --tct-textarea-hover-label-font-color,\n --tct-textarea-label-font-color,\n inherit\n );\n }\n }\n\n :host(:focus-within) & {\n color: var-list(--tct-textarea-focus-label-font-color, var-prefixer(textarea-label-font-color), inherit);\n }\n\n :host(:focus-within) .has-error & {\n color: var-list(\n --tct-textarea-error-focus-label-font-color,\n var-prefixer(textarea-error-label-font-color),\n --tct-textarea-focus-label-font-color,\n var-prefixer(textarea-label-font-color),\n inherit\n );\n }\n}\n\n.optional-tag {\n --comp-label-optional-margin: #{var-list(\n --tct-textarea-label-optional-margin,\n unquote(\n '0 0 0 #{var-list(var-prefixer(textarea-label-optional-margin-left), --tct-scale-1x, --app-scale-1x, 5px)}'\n )\n )};\n margin: var(--comp-label-optional-margin);\n color: var-list(\n var-prefixer(textarea-label-optional-font-color),\n --t-textA,\n --t-a11y-gray-color,\n rgba(77, 77, 77, 0.77)\n );\n font-size: var-list(var-prefixer(textarea-label-optional-font-size), 12px);\n font-weight: var-list(var-prefixer(textarea-label-optional-font-weight), 400);\n}\n\n.input-container {\n min-height: var-list(var-prefixer(textarea-min-height), --comp-textarea-min-height);\n height: 100%;\n --comp-default-border-radius: #{var-list(--tct-border-radius-1, --app-border-radius-1, 4px)};\n --comp-textarea-border-top-left-radius: #{var-list(\n var-prefixer(textarea-border-top-left-radius),\n --comp-default-border-radius\n )};\n --comp-textarea-border-top-right-radius: #{var-list(\n var-prefixer(textarea-border-top-right-radius),\n --comp-default-border-radius\n )};\n --comp-textarea-border-bottom-right-radius: #{var-list(\n var-prefixer(textarea-border-bottom-right-radius),\n --comp-default-border-radius\n )};\n --comp-textarea-border-bottom-left-radius: #{var-list(\n var-prefixer(textarea-border-bottom-left-radius),\n --comp-default-border-radius\n )};\n --comp-textarea-border-radius: var(--comp-textarea-border-top-left-radius)\n var(--comp-textarea-border-top-right-radius) var(--comp-textarea-border-bottom-right-radius)\n var(--comp-textarea-border-bottom-left-radius);\n --comp-textarea-border-width: #{var-list(var-prefixer(textarea-border-top-width), 1px)\n var-list(var-prefixer(textarea-border-right-width), 1px)\n var-list(var-prefixer(textarea-border-bottom-width), 1px)\n var-list(var-prefixer(textarea-border-left-width), 1px)};\n --comp-textarea-icon-clearance: 34px;\n\n :host([disabled]) & {\n cursor: not-allowed;\n opacity: var-list(var-prefixer(textarea-disabled-opacity), --tct-disabled-opacity, --app-disabled-opacity, 0.4);\n }\n}\n\n.content-container {\n --comp-textarea-min-height: 46px;\n --comp-textarea-min-width: 150px;\n position: relative;\n display: inline-block;\n min-height: var-list(var-prefixer(textarea-min-height), --comp-textarea-min-height);\n min-width: var-list(var-prefixer(textarea-min-width) --comp-textarea-min-width);\n\n :host(:not([cols])) & {\n width: 100%;\n }\n}\n\ntextarea {\n --comp-textarea-padding: #{var-list(\n --tct-textarea-padding,\n unquote(\n '#{var-list(var-prefixer(textarea-vertical-padding), --tct-scale-2x, --app-scale-2x, 10px)} #{var-list(var-prefixer(textarea-horizontal-padding), --tct-scale-2x, --app-scale-2x, 10px)}'\n )\n )};\n --comp-textarea-border-color: #{var-list(\n var-prefixer(textarea-border-color),\n var-prefixer(input-border-color),\n --t-a11y-gray-color-AA,\n #949494\n )};\n --comp-textarea-background: #{var-list(\n --tct-textarea-background,\n var-prefixer(textarea-bg),\n --tct-input-background,\n var-prefixer(input-bg),\n --t-gray-14,\n #fcfcfd\n )};\n --comp-textarea-hover-ring-color: var(--tct-textarea-hover-ring-color);\n --comp-textarea-hover-ring: #{0 0 0 2px var(--t-base), 0 0 0 4px var(--comp-textarea-hover-ring-color),\n var-list(--tct-textarea-hover-box-shadow, unquote('0 0 transparent'))};\n\n resize: none;\n height: 100%;\n -webkit-appearance: none;\n appearance: none;\n display: block;\n box-sizing: border-box;\n min-height: var-list(var-prefixer(textarea-min-height), --comp-textarea-min-height);\n padding: var(--comp-textarea-padding);\n background: var(--comp-textarea-background);\n color: var-list(var-prefixer(textarea-font-color), --t-input-font-color, inherit);\n border-width: var(--comp-textarea-border-width);\n border-style: solid;\n border-color: var(--comp-textarea-border-color);\n border-radius: var(--comp-textarea-border-radius);\n box-shadow: var-list(var-prefixer(textarea-box-shadow), none);\n scrollbar-width: thin;\n scrollbar-color: var(--t-a11y-gray-color) transparent;\n --comp-textarea-tween: #{var-list(var-prefixer(textarea-tween), --tct-tween-2, --app-tween-2, unquote('0.4s ease'))};\n transition:\n border-width var(--comp-textarea-tween),\n border-color var(--comp-textarea-tween),\n box-shadow var(--comp-textarea-tween);\n\n &::-webkit-scrollbar {\n width: var(--app-scale-1x);\n height: var(--app-scale-1x);\n margin: var(--app-scale-1x);\n }\n\n &::-webkit-scrollbar-thumb {\n background: var(--t-a11y-gray-color);\n border-radius: 2px;\n }\n\n &::-webkit-scrollbar-track {\n background: transparent;\n }\n\n &:not([cols]) {\n width: 100%;\n }\n\n .has-error & {\n padding-right: var(--comp-textarea-icon-clearance);\n border-color: var-list(var-prefixer(textarea-error-border-color), --const-stoplight-alert, #d20a0a);\n background: var-list(--tct-textarea-error-background, --comp-textarea-background);\n }\n\n &:hover {\n border-color: var-list(--tct-textarea-hover-border-color, --comp-textarea-border-color);\n background: var-list(--tct-textarea-hover-background, --comp-textarea-background);\n box-shadow: var-list(--tct-textarea-hover-box-shadow, --comp-textarea-hover-ring);\n\n .has-error & {\n border-color: var-list(\n --tct-textarea-error-hover-border-color,\n var-prefixer(textarea-error-border-color),\n --const-stoplight-alert,\n #d20a0a\n );\n background: var-list(\n --tct-textarea-error-hover-background,\n --tct-textarea-error-background,\n --comp-textarea-background\n );\n box-shadow: var-list(\n --tct-textarea-error-hover-box-shadow,\n --tct-textarea-error-box-shadow,\n --tct-textarea-hover-box-shadow,\n --comp-textarea-hover-ring\n );\n }\n }\n\n &:focus {\n border-color: var-list(--tct-textarea-focus-border-color, --comp-textarea-border-color);\n background: var-list(--tct-textarea-focus-background, --comp-textarea-background);\n box-shadow: var-list(--tct-textarea-focus-box-shadow, --const-double-focus-ring);\n\n .has-error & {\n border-color: var-list(\n --tct-textarea-error-focus-border-color,\n --tct-textarea-error-border-color,\n --const-stoplight-alert,\n #d20a0a\n );\n background: var-list(\n --tct-textarea-error-focus-background,\n --tct-textarea-error-background,\n --tct-textarea-focus-background,\n --comp-textarea-background\n );\n box-shadow: var-list(\n --tct-textarea-error-focus-box-shadow,\n --tct-textarea-error-box-shadow,\n --tct-textarea-focus-box-shadow,\n --const-double-focus-ring\n );\n }\n }\n\n &::placeholder {\n color: var-list(\n var-prefixer(textarea-placeholder-font-color),\n --t-input-placeholder-font-color,\n --tct-gray-7,\n --app-gray-7,\n --tct-gray-d1,\n --app-gray-d1,\n #666666\n );\n }\n\n &[disabled] {\n cursor: not-allowed;\n }\n\n &.resize-vertical-auto {\n overflow: hidden;\n }\n\n .has-error & {\n padding-right: var(--comp-textarea-icon-clearance);\n\n &:not(:focus) {\n border-color: var-list(var-prefixer(textarea-error-border-color), --const-stoplight-alert, #d20a0a);\n }\n }\n}\n\nq2-icon {\n margin-top: calc(#{var-list(var-prefixer(textarea-border-top-width), 1px)} / 2);\n margin-bottom: calc(#{var-list(var-prefixer(textarea-border-bottom-width), 1px)} / 2);\n pointer-events: none;\n position: absolute;\n top: var-list(var-prefixer(textarea-vertical-padding), --tct-scale-2x, --app-scale-2x, 10px);\n color: var-list(var-prefixer(textarea-icon-stroke-primary), --app-gray-9, --tct-gray, --app-gray, #999999);\n right: 0;\n margin-right: var-list(--tct-scale-2x, --app-scale-2x, 10px);\n --tct-icon-stroke-primary: #{var-list(\n var-prefixer(textarea-icon-stroke-primary),\n var-prefixer(gray-9),\n --tct-gray,\n --app-gray,\n #999999\n )};\n --t-icon-stroke-primary: #{var-list(\n var-prefixer(textarea-icon-stroke-primary),\n var-prefixer(gray-9),\n --tct-gray,\n --app-gray,\n #999999\n )};\n}\n\n.icon-error {\n color: var-list(--tct-stoplight-error, --const-stoplight-alert, #d20a0a);\n --tct-icon-stroke-primary: #{var-list(--tct-stoplight-error, --const-stoplight-alert, #d20a0a)};\n --t-icon-stroke-primary: #{var-list(--tct-stoplight-error, --const-stoplight-alert, #d20a0a)};\n}\n\n.messages-container {\n height: 0px;\n overflow: hidden;\n background: var-list(\n --tct-message-background,\n --tct-message-bg,\n var-prefixer(gray-14),\n --tct-gray-l3,\n --app-gray-l3,\n #f2f2f2\n );\n box-shadow: var-list(\n var-prefixer(textarea-message-box-shadow),\n --tct-box-shadow-1,\n --app-shadow-1,\n unquote(\"0px 0px 2px rgba(0, 0, 0, 0.12), 0px 2px 4px rgba(0, 0, 0, 0.14)\")\n );\n transition: height\n var-list(var-prefixer(textarea-messages-tween), --tct-tween-1, --app-tween-1, unquote('0.2s ease'));\n margin-top: 2px;\n z-index: 1;\n position: absolute;\n width: 100%;\n color: var-list(var-prefixer(textarea-messages-font-color), inherit);\n}\n\n.max-length {\n color: var-list(var-prefixer(textarea-max-length-color), --t-textA, rgba(77, 77, 77, 0.77));\n font-size: var-list(\n var-prefixer(textarea-max-length-font-size),\n --tct-font-size-small,\n --app-font-size-small,\n 12px\n );\n position: absolute;\n right: 0;\n}\n\n.btn-resize {\n --tct-textarea-resize-icon-padding: calc(\n calc(\n #{var-list(var-prefixer(textarea-resize-btn-width), --tct-btn-icon-width, 44px)} - #{var-list(\n var-prefixer(textarea-resize-icon-size),\n 12px\n )}\n ) / 2\n );\n width: var-list(var-prefixer(textarea-resize-btn-width), --tct-btn-icon-width, 44px);\n height: var-list(var-prefixer(textarea-resize-btn-height), --tct-btn-icon-height, 44px);\n background: var-list(var-prefixer(textarea-resize-btn-background), transparent);\n stroke: var-list(var-prefixer(textarea-resize-color), --t-textA, rgba(77, 77, 77, 0.77));\n border: 0;\n position: absolute;\n right: calc(#{var-list(var-prefixer(textarea-resize-icon-padding))} * -1 + 2px);\n bottom: calc(#{var-list(var-prefixer(textarea-resize-icon-padding))} * -1 + 2px);\n display: block;\n padding: var-list(var-prefixer(textarea-resize-icon-padding));\n font-size: 0;\n\n &:focus {\n outline: none;\n box-shadow: none;\n }\n\n :host([resize='both']) & {\n cursor: se-resize;\n }\n\n :host([resize='vertical']) &,\n :host([resize='vertical-auto']) & {\n cursor: s-resize;\n }\n\n :host([resize='horizontal']) & {\n cursor: e-resize;\n }\n}\n","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 document.removeEventListener('mouseup', this.onMouseUp);\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"],"mappings":";;;;AAAA,MAAMA,IA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Y5D,KAAKsJ,oBAAoB,IAC1CK,EAAe3J"}
@@ -1,6 +1,6 @@
1
1
  import { r as t, h as o, g as i } from "./index-7a5365e2.js";
2
2
 
3
- import { o as e, i as a } from "./index-d18e2a20.js";
3
+ import { o as e, i as a } from "./index-504f1a9e.js";
4
4
 
5
5
  const r = '*{box-sizing:border-box}*:active{outline:none}*:focus{outline:none;box-shadow:var(--const-double-focus-ring, 0 0 0 2px #ffffff, 0 0 0 4px #0066cc)}:host{box-shadow:none !important}::-moz-focus-inner{border:none}input,textarea,button{font-family:inherit;font-size:inherit;font-stretch:inherit}:host(.sr),:host(.sr) button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.sr,.sr button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.hidden{display:none}:host([hidden]){display:none}.invisible{visibility:hidden}:host{display:inline-block}:host([block]){display:block}.tooltip{--comp-background:var(--tct-tooltip-background, var(--tct-tooltip-background-color, var(--t-tooltip-background-color, var(--t-top-a3, rgba(13, 13, 13, 0.8509803922)))));--comp-offset-default:calc(var(--app-scale-1x, 5px) * -1);--comp-offset:var(--tct-tooltip-offset, var(--t-tooltip-offset, var(--comp-offset-default)));--comp-position:var(--tct-tooltip-position, var(--t-tooltip-position, var(--app-scale-1x, 5px)));--comp-body-offset-default:calc(var(--app-scale-3x, 15px) * -1);--comp-body-offset:var(--tct-tooltip-body-offset, var(--t-tooltip-body-offset, var(--comp-body-offset-default)));--comp-duration:var(--tct-tooltip-transition-duration, var(--t-tooltip-transition-duration, var(--app-duration-1, 0.2s)));--comp-visible-duration:var(--tct-tooltip-transition-visible-duration, var(--t-tooltip-transition-visible-duration, 2s));--comp-delay:var(--tct-tooltip-transition-delay, var(--t-tooltip-transition-delay, 0s));display:inline-block;position:relative}.tooltip:hover{--comp-delay:var(--tct-tooltip-transition-delay, var(--t-tooltip-transition-delay, 1s))}:host([immediate]:not([immediate=false])) .tooltip:hover{--comp-delay:0s}.tooltip:before{position:absolute;z-index:2;width:0;height:0;color:var(--comp-background);pointer-events:none;content:"";border:var(--tct-tooltip-arrow-size, var(--t-tooltip-arrow-size, var(--app-scale-1x, 5px))) solid transparent}.tooltip:after{--comp-padding:var(--app-scale-1x, 5px) 8px;position:absolute;z-index:1;padding:var(--tct-tooltip-padding, var(--t-tooltip-padding, var(--comp-padding)));font-weight:var(--tct-tooltip-font-weight, var(--t-tooltip-font-weight, 600));font-size:var(--tct-tooltip-font-size, var(--t-tooltip-font-size, var(--app-font-size-small, 12px)));line-height:1.5;color:var(--tct-tooltip-color, var(--t-tooltip-color, var(--app-white, #ffffff)));text-align:center;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-wrap:break-word;white-space:pre;pointer-events:none;content:attr(aria-label);background:var(--comp-background);border-radius:var(--tct-tooltip-border-radius, var(--t-tooltip-border-radius, var(--app-border-radius-1, 4px)))}.tooltip:before,.tooltip:after{display:inline-block;visibility:hidden;opacity:0;transition:all var(--comp-duration) ease-in-out var(--comp-delay)}:host([block]) .tooltip{display:block}.tooltip:hover:before,.tooltip:hover:after,.tooltip.has-keyboard-focus:focus-within:before,.tooltip.has-keyboard-focus:focus-within:after,:host([persistent]:not([persistent=false])) .tooltip:before,:host([persistent]:not([persistent=false])) .tooltip:after{text-decoration:none;visibility:visible;opacity:1}@keyframes tooltippedFade{from{opacity:0}to{opacity:1}}.tooltip.has-generic-focus:focus-within:before,.tooltip.has-generic-focus:focus-within:after{visibility:visible;opacity:0;transition:none;animation-timing-function:ease-in-out;animation-fill-mode:forwards;animation-name:tooltippedFade, tooltippedFade;animation-direction:normal, reverse;animation-duration:var(--comp-duration);animation-delay:0ms, calc(var(--comp-visible-duration) + var(--comp-duration))}.tooltip.has-generic-focus-out:before,.tooltip.has-generic-focus-out:after{visibility:visible;opacity:0;transition:none;animation-timing-function:ease-in-out;animation-fill-mode:forwards;animation-name:tooltippedFade;animation-direction:reverse;animation-duration:var(--comp-duration)}:host([multiline]) .tooltip:after{width:max-content;max-width:var(--tct-tooltip-max-width, var(--t-tooltip-max-width, 200px));word-break:break-word;word-wrap:normal;white-space:pre-line;border-collapse:separate;text-align:left}:host([position=s]) :host([multiline]) .tooltip:after,:host([position=n]) :host([multiline]) .tooltip:after{right:auto;left:50%;transform:translateX(-50%)}:host([position=w]) :host([multiline]) .tooltip:after,:host([position=e]) :host([multiline]) .tooltip:after{right:100%}:host([multiline]) .tooltip:hover:after,:host([multiline]) .tooltip:active:after,:host([multiline]) .tooltip:focus:after{display:table-cell}:host([multiline]) .tooltip:focus-within:after{display:table-cell}:host([position=s]) .tooltip:after,:host([position=se]) .tooltip:after,:host([position=sw]) .tooltip:after{top:100%;right:50%;margin-top:var(--comp-position)}:host([position=s]) .tooltip:before,:host([position=se]) .tooltip:before,:host([position=sw]) .tooltip:before{top:auto;right:50%;bottom:var(--comp-offset);margin-right:var(--comp-offset);border-bottom-color:var(--comp-background)}:host([position=n]) .tooltip:after,:host([position=ne]) .tooltip:after,:host([position=nw]) .tooltip:after{right:50%;bottom:100%;margin-bottom:var(--comp-position)}:host([position=n]) .tooltip:before,:host([position=ne]) .tooltip:before,:host([position=nw]) .tooltip:before{top:var(--comp-offset);right:50%;bottom:auto;margin-right:var(--comp-offset);border-top-color:var(--comp-background)}:host([position=se]) .tooltip:after,:host([position=ne]) .tooltip:after{right:auto;left:50%;margin-left:var(--comp-body-offset)}:host([position=sw]) .tooltip:after{margin-right:var(--comp-body-offset)}:host([position=nw]) .tooltip:after{margin-right:var(--comp-body-offset)}:host([position=s]) .tooltip:after,:host([position=n]) .tooltip:after{transform:translateX(50%)}:host([position=w]) .tooltip:after{right:100%;bottom:50%;margin-right:var(--comp-position);transform:translateY(50%)}:host([position=w]) .tooltip:before{top:50%;bottom:50%;left:var(--comp-offset);margin-top:var(--comp-offset);border-left-color:var(--comp-background)}:host([position=e]) .tooltip:after{bottom:50%;left:100%;margin-left:var(--comp-position);transform:translateY(50%)}:host([position=e]) .tooltip:before{top:50%;right:var(--comp-offset);bottom:50%;margin-top:var(--comp-offset);border-right-color:var(--comp-background)}';
6
6
 
@@ -71,7 +71,7 @@ const a = class {
71
71
  // #region Render Methods
72
72
  render() {
73
73
  return t("div", {
74
- key: "5174270c1e044911b9d44c816a2028b43700a995",
74
+ key: "fbf2550a809c04de1ec1e0d56d042772e7a56ab1",
75
75
  id: `tab-pane-${this.guid}-${this.index}`,
76
76
  class: `tab-pane${this.selected ? "" : " hidden"}`,
77
77
  role: "tabpanel",
@@ -79,12 +79,12 @@ const a = class {
79
79
  "aria-hidden": `${!this.selected}`,
80
80
  "aria-labelledby": `tab-${this.guid}-${this.index}`
81
81
  }, this.selected && this.provided !== undefined && !this.provided && t("div", {
82
- key: "5e2e150c061227354cd8258d0f47ed0aa42efca6"
82
+ key: "3dfbabecf7a65d3e4a9e9cb022488ea2d74ec64a"
83
83
  }, t("slot", {
84
- key: "b6d73cfc3af1e9886cc32e8a8beefea6021ee3a3",
84
+ key: "38f20a0d29bea45eaae2c9fd1bfb6f324694accc",
85
85
  name: "loading-wrapper"
86
86
  }), t("iframe", {
87
- key: "bf5327f033c4d14e191b8924fc0c9150216e23eb",
87
+ key: "25106e9d4ff8fca4b9ca785d75b97557d4441ade",
88
88
  hidden: true,
89
89
  name: this.moduleId,
90
90
  scrolling: "no",
@@ -107,11 +107,11 @@ const a = class {
107
107
  value: e.value,
108
108
  name: e.key
109
109
  })))) : ""), t("div", {
110
- key: "43c42d0775a119f1e506a3935a55761e8635a70c",
110
+ key: "caa4de86bb34e5cf3f4bb60977f2be9450210cf3",
111
111
  class: "slot-wrapper",
112
112
  hidden: this.selected && this.provided !== undefined && !this.provided
113
113
  }, t("slot", {
114
- key: "e09658539ada47efbbd04fedf0e675ea2bd626c9"
114
+ key: "da2ded5ffc3b4f5f42741b574f25280040a39eae"
115
115
  })));
116
116
  }
117
117
  get hostElement() {
@@ -64,6 +64,7 @@ export declare class Q2Btn implements ComponentInterface {
64
64
  type: string;
65
65
  componentWillLoad(): void;
66
66
  componentDidLoad(): void;
67
+ disconnectedCallback(): void;
67
68
  handleClick(event: Event): void;
68
69
  delegateFocus(event: FocusEvent): void;
69
70
  ariaLabelObserver(): void;
@@ -1,5 +1,4 @@
1
1
  import { ComponentInterface } from '../../stencil-public-runtime';
2
- import { IDict } from "../../util";
3
2
  export declare class Q2Dropdown implements ComponentInterface {
4
3
  controlElement?: HTMLQ2BtnElement;
5
4
  dropdownItemSelector: string;
@@ -156,7 +155,6 @@ export declare class Q2Dropdown implements ComponentInterface {
156
155
  focusFirstItem: () => Promise<void>;
157
156
  focusLastItem: () => Promise<void>;
158
157
  focusToggle: () => void;
159
- navigateTo(featureName: string, moduleName?: string, queryParams?: IDict<string>): void;
160
158
  onClickElsewhere: (event: CustomEvent) => void;
161
159
  onDropdownMenuClick: (event: MouseEvent | CustomEvent) => Promise<void>;
162
160
  onDropdownMenuKeydown: (event: KeyboardEvent) => void;
@@ -165,8 +163,7 @@ export declare class Q2Dropdown implements ComponentInterface {
165
163
  openDropdown: () => void;
166
164
  orchestrateResolvedMenuItems(): void;
167
165
  removeResolvedElements(): void;
168
- resolveMenu(): Promise<import("src/util").ResolvedMenuItem[]>;
166
+ resolveMenu(): Promise<import("../../util").ResolvedMenuItem[]>;
169
167
  resolveMenuItemElements(): Promise<HTMLQ2DropdownItemElement[]>;
170
- showOverpanel(overpanelPath: string, params: IDict<string>): Promise<unknown>;
171
168
  render(): any;
172
169
  }
@@ -1,6 +1,7 @@
1
1
  import { EventEmitter } from '../../stencil-public-runtime';
2
2
  import { IEventDetail, Q2InputCustomEvent } from "../../components";
3
3
  import { Q2Input } from '../q2-input/q2-input';
4
+ import { IFormatterValueObject } from '../q2-input/q2-input-types';
4
5
  export declare class Q2EditableField {
5
6
  cancelBtnElement: HTMLQ2BtnElement;
6
7
  defaultValue: string;
@@ -90,6 +91,7 @@ export declare class Q2EditableField {
90
91
  componentDidRender(): void;
91
92
  onHostElementChange(event: CustomEvent): void;
92
93
  delegateFocus(event: FocusEvent): void;
94
+ inputFormatted(event: CustomEvent<IFormatterValueObject>): void;
93
95
  /**
94
96
  * Emulates clicking the cancel button, which will hide the `<q2-input>` field.
95
97
  *
@@ -128,7 +130,6 @@ export declare class Q2EditableField {
128
130
  get wrapperClass(): string;
129
131
  cancelClick: (event?: MouseEvent) => void;
130
132
  editClick: (event: MouseEvent) => void;
131
- generateEditBtn(): any;
132
133
  generateEditStateDOM(): any;
133
134
  generateReadStateDOM(): any;
134
135
  inputChange: (e: CustomEvent) => void;
@@ -12,6 +12,7 @@ export declare class Q2Icon implements ComponentInterface {
12
12
  type: string;
13
13
  componentWillLoad(): void;
14
14
  componentDidRender(): void;
15
+ disconnectedCallback(): void;
15
16
  handleIcon(): void;
16
17
  get iconCloneViewBox(): string;
17
18
  get isCustom(): boolean;
@@ -6,9 +6,7 @@ export declare class Q2Popover implements ComponentInterface {
6
6
  * The number of pixels to leave between the popover and the edge of the viewport
7
7
  */
8
8
  displayBuffer: number;
9
- /** remove when Popover API is supported in iOS */
10
9
  orientationChanged: boolean;
11
- rootElementRect: DOMRect;
12
10
  hostElement: HTMLElement;
13
11
  currentDirection: 'down' | 'up';
14
12
  show: boolean;
@@ -40,6 +38,7 @@ export declare class Q2Popover implements ComponentInterface {
40
38
  open: boolean;
41
39
  }>;
42
40
  disconnectedCallback(): void;
41
+ componentWillLoad(): void;
43
42
  componentDidLoad(): void;
44
43
  popoverStateHandler(event: CustomEvent<{
45
44
  open: boolean;
@@ -50,16 +49,17 @@ export declare class Q2Popover implements ComponentInterface {
50
49
  openChanged(open: boolean): Promise<void>;
51
50
  get isModule(): boolean;
52
51
  get providedDirection(): 'up' | 'down' | undefined;
52
+ get supportsPopoverAPI(): boolean;
53
53
  get validatedMaxHeight(): number | undefined;
54
54
  addViewportListeners(): void;
55
55
  clearCSSProperties(): void;
56
56
  determinePopDirection(): Promise<void>;
57
57
  handleMinHeight: () => void;
58
+ handlePopoverToggleEvent: (event: ToggleEvent) => void;
58
59
  removeViewportListeners(): void;
59
60
  setAbsoluteCSSProperties: () => Promise<void>;
60
61
  setDirectionAndShow(direction: 'up' | 'down'): void;
61
- setFixedCSSProperties: () => Promise<void>;
62
- setRootElement(): void;
62
+ setPopoverAPICSSProperties: () => Promise<void>;
63
63
  viewPortChanged: () => void;
64
64
  viewPortOrientationChanged: () => void;
65
65
  render(): any;
@@ -2,10 +2,17 @@
2
2
  import { EventEmitter, ComponentInterface } from '../../stencil-public-runtime';
3
3
  import { IEventDetail, Q2InputCustomEvent, Q2OptionListCustomEvent } from "../../components";
4
4
  import { IOptionValue } from '../q2-option-list/q2-option-list';
5
+ /**
6
+ * @slot popover-top - An optional slot to display custom content persistently at the top of the popover. This is **not** compatible with the action sheet workflow.
7
+ * @slot popover-bottom - An optional slot to display custom content persistently at the bottom of the popover. This is **not** compatible with the action sheet workflow.
8
+ * @slot q2-select-display - An optional slot to display custom HTML content in the display area.
9
+ */
5
10
  export declare class Q2Select implements ComponentInterface {
11
+ guid: number;
6
12
  inputField?: HTMLQ2InputElement;
7
13
  mutationObserver: MutationObserver;
8
14
  optionList: HTMLQ2OptionListElement;
15
+ originalSearchable: boolean;
9
16
  popoverElement?: HTMLQ2PopoverElement;
10
17
  popoverTopContainer?: HTMLDivElement;
11
18
  scheduledAfterRender: (() => void)[];
@@ -143,6 +150,9 @@ export declare class Q2Select implements ComponentInterface {
143
150
  handleFocusout(event: FocusEvent): void;
144
151
  onHostElementInput(event: CustomEvent): void;
145
152
  keydownHandler(event: KeyboardEvent): void;
153
+ popoverStateChanged({ detail: { open } }: CustomEvent<{
154
+ open: boolean;
155
+ }>): void;
146
156
  /**
147
157
  * Emulates clicking the `<input>` to hide the popover if it is visible.
148
158
  *
@@ -185,6 +195,8 @@ export declare class Q2Select implements ComponentInterface {
185
195
  get firstSelectedValue(): string;
186
196
  get innerInputContainer(): HTMLElement;
187
197
  get innerInputField(): HTMLInputElement | HTMLButtonElement;
198
+ get inputId(): string;
199
+ get isModule(): boolean;
188
200
  get optionElements(): HTMLQ2OptionElement[];
189
201
  get popoverMinHeight(): number;
190
202
  get selectedDisplay(): string;
@@ -201,12 +213,17 @@ export declare class Q2Select implements ComponentInterface {
201
213
  clearValue(): void;
202
214
  clickedElsewhere: (event: CustomEvent) => void;
203
215
  closeDropdown(): void;
216
+ destroyEventListeners: () => void;
204
217
  executeActionSheet(event: MouseEvent | KeyboardEvent): Promise<void>;
205
218
  focusInput(): void;
219
+ handleOptionListExternalKeydown(event: KeyboardEvent): void;
220
+ handleOrientationChange: () => void;
206
221
  handleSelectionChanges(changeDetails: {
207
222
  value?: string;
208
223
  values?: IOptionValue[];
209
224
  }): void;
225
+ initEventListeners: () => void;
226
+ initMutationObserver: () => void;
210
227
  inputBlurHandler: () => void;
211
228
  inputChangeHandler: (event: Event) => void;
212
229
  inputClickHandler: (event: MouseEvent) => Promise<void>;
@@ -224,6 +241,7 @@ export declare class Q2Select implements ComponentInterface {
224
241
  action: 'close' | 'select' | 'open';
225
242
  }>) => void;
226
243
  openDropdownWithoutActiveElement(): void;
244
+ setCustomLabel(): void;
227
245
  setStatusMessage(message: any): void;
228
246
  shouldClearSearchText(event: KeyboardEvent): boolean;
229
247
  showAllOptions: () => void;
@@ -232,6 +250,7 @@ export declare class Q2Select implements ComponentInterface {
232
250
  visibilityToggleKeyDown: (event: KeyboardEvent) => void;
233
251
  renderCustomDisplay(): any;
234
252
  renderOptionsDropdown(): any;
253
+ renderSelectField(): any;
235
254
  renderVisibilityToggle(): any;
236
255
  render(): any;
237
256
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "q2-tecton-elements",
3
- "version": "1.53.0",
3
+ "version": "1.53.2",
4
4
  "description": "Q2 Tecton Custom Elements",
5
5
  "license": "MIT",
6
6
  "author": "Q2 Tecton Team",
@@ -35,7 +35,7 @@
35
35
  },
36
36
  "dependencies": {
37
37
  "@stencil/core": "4.18.0",
38
- "q2-tecton-common": "1.53.0",
38
+ "q2-tecton-common": "1.53.2",
39
39
  "swiper": "8.4.4"
40
40
  },
41
41
  "devDependencies": {
@@ -60,5 +60,5 @@
60
60
  "typescript": "5.4.5",
61
61
  "typescript-eslint": "^7.11.0"
62
62
  },
63
- "gitHead": "c1c1a3fd469d623971a1081835bfab6fbc56d28c"
63
+ "gitHead": "f857159e9d506f0773fb2663b88cf7dfef16ee34"
64
64
  }
@@ -1 +0,0 @@
1
- {"file":"index-07285783.js","mappings":";;;;MAgBa,QAAQ,GAAG,CAAsD,EAAK,EAAE,QAAgB,GAAG;IACpG,IAAI,OAAsC,CAAC;IAC3C,OAAO,UAAU,GAAG,IAAmB;QACnC,YAAY,CAAC,OAAO,CAAC,CAAC;QACtB,OAAO,GAAG,UAAU,CAAC;YACjB,EAAE,CAAC,GAAG,IAAI,CAAC,CAAC;SACf,EAAE,KAAK,CAAC,CAAC;KACb,CAAC;AACN,EAAE;SAEc,QAAQ;IACpB,OAAO,qFAAqF,CAAC,IAAI,CAC7F,SAAS,CAAC,SAAS,CACtB,CAAC;AACN,CAAC;SAEe,iBAAiB,CAAC,KAAiB,EAAE,WAAwB;IACzE,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC;IACxB,MAAM,YAAY,GAAG,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;IAC1C,MAAM,SAAS,GAAG,YAAY,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;;;IAI9C,MAAM,mBAAmB,GAAG,SAAS,GAAG,KAAK,CAAC,MAAM,GAAG,KAAK,CAAC,aAAa,CAAC;IAE3E,MAAM,4BAA4B,GAAG,CAAC,OAAoB;QACtD,IAAI,OAAO,KAAK,WAAW;YAAE,OAAO,IAAI,CAAC;QACzC,IAAI,OAAO,CAAC,aAAa,EAAE;YACvB,OAAO,4BAA4B,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;SAC9D;QACD,OAAO,KAAK,CAAC;KAChB,CAAC;IAEF,IAAI,EAAE,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a,EAAE,CAAC;gBAE3C,IAAI,aAAa,CAAC,MAAM,GAAG,CAAC,EAAE;oBAC1B,KAAK,MAAM,QAAQ,IAAI,aAAa,EAAE;wBAClC,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE;4BAC/B,MAAM,WAAW,CAAC,QAAQ,CAAC,CAAC;yBAC/B;qBACJ;iBACJ;qBAAM;;oBAEH,KAAK,MAAM,QAAQ,IAAI,IAAI,CAAC,UAAU,EAAE;wBACpC,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE;4BAC/B,MAAM,WAAW,CAAC,QAAQ,CAAC,CAAC;yBAC/B;qBACJ;iBACJ;aACJ;SACJ;KACJ;IAED,MAAM,WAAW,CAAC,OAAO,CAAC,CAAC;;IAG3B,IAAI,IAAI,CAAC,IAAI,EAAE;QACX,MAAM,GAAG,MAAM,CAAC,IAAI,EAAE,CAAC;KAC1B;IAED,IAAI,IAAI,CAAC,mBAAmB,EAAE;QAC1B,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;KACxC;IAED,OAAO,MAAM,CAAC;AAClB;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["h"],"sources":["src/utils/index.tsx"],"sourcesContent":["import { h } from '@stencil/core';\nimport { Q2Btn } from 'src/components/q2-btn/q2-btn';\nimport { Q2Calendar } from 'src/components/q2-calendar/q2-calendar';\nimport { Q2Carousel } from 'src/components/q2-carousel/q2-carousel';\nimport { Q2Checkbox } from 'src/components/q2-checkbox/q2-checkbox';\nimport { Q2CheckboxGroup } from 'src/components/q2-checkbox-group/q2-checkbox-group';\nimport { Q2RadioGroup } from 'src/components/q2-radio-group/q2-radio-group';\nimport { Q2Dropdown } from 'src/components/q2-dropdown/q2-dropdown';\nimport { Q2DropdownItem } from 'src/components/q2-dropdown-item/q2-dropdown-item';\nimport { Q2EditableField } from 'src/components/q2-editable-field/q2-editable-field';\nimport { Q2Input } from 'src/components/q2-input/q2-input';\nimport { Q2Loading } from 'src/components/q2-loading/q2-loading';\nimport { Q2Radio } from 'src/components/q2-radio/q2-radio';\nimport { Q2Select } from 'src/components/q2-select/q2-select';\nimport { FormFieldTypes, IDict } from 'src/util';\n\nexport const debounce = <F extends (...args: Parameters<F>) => ReturnType<F>>(fn: F, delay: number = 300) => {\n let timeout: ReturnType<typeof setTimeout>;\n return function (...args: Parameters<F>) {\n clearTimeout(timeout);\n timeout = setTimeout(() => {\n fn(...args);\n }, delay);\n };\n};\n\nexport function isMobile(): boolean {\n return /Android|webOS|iPhone|iPad|iPod|BlackBerry|Mobile|IEMobile|Windows Phone|Opera Mini/i.test(\n navigator.userAgent\n );\n}\n\nexport function isHostLosingFocus(event: FocusEvent, hostElement: HTMLElement) {\n const type = event.type;\n const focusInTypes = ['focusin', 'focus'];\n const isFocusIn = focusInTypes.includes(type);\n\n // on focusin: `target` is element losing focus, `relatedTarget` is element gaining focus\n // on focusout: `target` is element gaining focus, `relatedTarget` is element losing focus\n const elementGainingFocus = isFocusIn ? event.target : event.relatedTarget;\n\n const isElementNestedInHostElement = (element: HTMLElement) => {\n if (element === hostElement) return true;\n if (element.parentElement) {\n return isElementNestedInHostElement(element.parentElement);\n }\n return false;\n };\n\n if (!(elementGainingFocus instanceof HTMLElement)) return true;\n return !isElementNestedInHostElement(elementGainingFocus);\n}\n\nexport function isRelatedTargetWithinHost(event: FocusEvent, element: HTMLElement) {\n return event.relatedTarget !== element && !element.contains(event.relatedTarget as Node);\n}\n\nexport function isEventFromElement(event: Event, element: HTMLElement): boolean {\n return event.composedPath?.()[0] === element;\n}\n\nexport function overrideFocus(hostElement: HTMLElement) {\n hostElement.focus = () => hostElement?.dispatchEvent(new FocusEvent('focus', { bubbles: false }));\n}\n\nexport function isFirefox() {\n const userAgent = navigator.userAgent.toLowerCase();\n return userAgent.includes('firefox');\n}\n\nexport function isTouchDevice() {\n return 'ontouchstart' in window || navigator.maxTouchPoints > 0;\n}\n\nexport function isSafari() {\n const userAgent = navigator.userAgent.toLowerCase();\n return userAgent.includes('safari') && !userAgent.includes('chrome');\n}\n\n/**\n * Returns the value of a prop if it is defined and included in the `validValues`\n * array. This is used primarily to prevent Vue wrappers from setting aria props\n * to \"Symbol()\" when the prop is not set.\n */\nexport function getAriaValueFromProp(prop: string, validValues?: string[]) {\n if (prop === undefined) return prop;\n if (!validValues) return prop !== 'Symbol()' ? prop : undefined;\n return validValues.includes(prop) || prop === '' ? prop : undefined;\n}\n\nlet guid: number = 1000;\nexport function createGuid(): number {\n return guid++;\n}\n\nexport function nextPaint(fn: (value?: unknown) => void) {\n requestAnimationFrame(() => {\n requestAnimationFrame(fn);\n });\n}\n\nexport function isVisible(element: HTMLElement) {\n return element.offsetWidth > 0 || element.offsetHeight > 0 || element.getClientRects().length > 0;\n}\n\nexport function waitForNextPaint() {\n return new Promise(resolve => nextPaint(resolve));\n}\n\nexport function capitalize(value: string) {\n return `${value.charAt(0).toUpperCase()}${value.slice(1)}`;\n}\n\nexport function pick(props: string[]): (obj: object) => object {\n return obj => {\n return props.reduce((memo, prop) => {\n return {\n ...memo,\n [prop]: obj[prop],\n };\n }, {});\n };\n}\n\nexport function loc(key: string, subs?: IDict<any> | string[]) {\n if (!key) return '';\n if (window.Tecton?.noStrings === true) {\n return key;\n }\n return window?.TectonElements?.loc(key, subs) ?? key;\n}\n\nexport function renderLabel(target: FormFieldTypes | Q2RadioGroup | Q2CheckboxGroup) {\n const { label, hideLabel, optional, readonly } = target;\n const labelClasses: string[] = ['input-label'];\n let helpText = '';\n\n let shouldHideLabel = hideLabel;\n if (!shouldHideLabel) {\n const labelSlotElements = target.hostElement.querySelectorAll<HTMLSlotElement>('[slot=\"label\"]');\n const hasSlotContent = labelSlotElements.length > 0;\n const hasLabel = !!label;\n\n shouldHideLabel = hasLabel || hasSlotContent ? false : true;\n }\n\n if (shouldHideLabel) labelClasses.push('sr');\n if (optional) {\n helpText = <span class=\"optional-tag\">{loc('tecton.element.input.optional')}</span>;\n }\n if (readonly) {\n helpText = <span class=\"optional-tag\">{loc('tecton.element.input.readonly')}</span>;\n labelClasses.push('readonly-field');\n }\n return (\n <label\n htmlFor={target.inputId}\n class={labelClasses.join(' ')}\n >\n <slot name=\"label\">\n {label ? loc(label) : undefined}\n {helpText}\n </slot>\n </label>\n );\n}\n\nexport function hasSlotContent(target: HTMLElement, slotName: string) {\n return target.querySelector(`[slot=\"${slotName}\"]`) !== null;\n}\n\nexport function handleAriaLabel(\n target:\n | Q2Input\n | Q2Select\n | Q2Radio\n | Q2Checkbox\n | Q2EditableField\n | Q2Dropdown\n | Q2DropdownItem\n | Q2Loading\n | Q2Carousel\n | Q2Calendar\n | Q2Btn\n) {\n const { ariaLabel } = target;\n if (!ariaLabel) return;\n\n // If empty ariaLabel prop is set to primitive symbol by framework wrapper, set ariaLabel to undefined and return\n const FW_WRAPPERS_EMPTY_PROP = Symbol().toString();\n if (ariaLabel === FW_WRAPPERS_EMPTY_PROP) {\n target.ariaLabel = undefined;\n return;\n }\n\n // If ariaLabel is set, set hideLabel to true and set label to ariaLabel\n if ('hideLabel' in target) target.hideLabel = true;\n target.label = loc(ariaLabel);\n target.ariaLabel = undefined;\n}\n\n/**\n * Handles when a prop has been renamed on a component without introducing a breaking change.\n */\nexport function handleRenamedProp(target: object, oldProp: string, newProp: string, removeOldProp?: boolean) {\n if (typeof target[oldProp] === 'undefined') return;\n\n // If old prop has value, aka set in component, call handleDeprecationWarning()\n if (target[oldProp]) {\n handleDeprecationWarning(target, oldProp, 'prop');\n }\n\n target[newProp] = target[oldProp];\n\n if (removeOldProp) {\n delete target[oldProp];\n }\n}\n\nexport function handleDeprecationWarning(\n target: object,\n deprecatedItemName: string,\n deprecatedItemType: 'function' | 'prop' | 'method' | 'event'\n) {\n if (window.location.hostname === 'localhost' || window.location.host === 'stack.q2developer.com') {\n if (target[deprecatedItemName] === 'undefined') return;\n\n const componentName = target.constructor.name.toLowerCase().slice(2);\n\n switch (deprecatedItemType) {\n case 'prop':\n if (deprecatedItemName === 'size' && componentName === 'btn') {\n console.warn(\n `The property of size in q2-btn should not be typeof number, or typeof string containing a number. This functionality will be deprecated in an upcoming release. Instead, please use the value 'undefined', or typeof string with any of the following values: \"small\" / \"medium\" / \"large\" `\n );\n } else {\n console.warn(\n `The property ${deprecatedItemName} in q2-${componentName} has been marked for deprecation and will be removed in an upcoming major release.`\n );\n }\n break;\n\n case 'function':\n console.warn(\n `The function ${deprecatedItemName} in ${componentName} has been marked for deprecation and will be removed in an upcoming major release.`\n );\n break;\n\n case 'method':\n console.warn(\n `The method ${deprecatedItemName} in ${componentName} has been marked for deprecation and will be removed in an upcoming major release.`\n );\n break;\n\n case 'event':\n console.warn(\n `The event ${deprecatedItemName} in ${componentName} has been marked for deprecation and will be removed in an upcoming major release.`\n );\n break;\n\n default:\n console.error(\n `handleDeprecationWarning --> No type found for desired deprecation: ${deprecatedItemName} in q2-${componentName}: deprecatedItemType = ${deprecatedItemName}`\n );\n }\n }\n}\n\nexport function renderMessages(target: FormFieldTypes) {\n const type = target.hasError ? 'danger' : 'info';\n\n return (\n <div class=\"messages-container\">\n <q2-message\n appearance=\"minimal\"\n description\n type={type}\n test-id=\"message\"\n >\n <ul id={target.inputDescribedBy}>\n {target.messages.map(message => (\n <li test-id=\"messageListItem\">{loc(message)}</li>\n ))}\n </ul>\n </q2-message>\n </div>\n );\n}\n\nexport function setMessageHeight(target: FormFieldTypes) {\n const messageContainer = (target.hostElement.shadowRoot as ShadowRoot).querySelector<HTMLDivElement>(\n '.messages-container'\n );\n const q2Message = messageContainer.querySelector('q2-message');\n nextPaint(() => {\n const height = target.showMessages && target.hasFocus ? q2Message.getBoundingClientRect().height : 0;\n\n if (messageContainer.style.getPropertyValue('height') === `${height}px`) return;\n\n if (height === 0) {\n q2Message.classList.add('invisible');\n messageContainer.style.removeProperty('height');\n } else {\n q2Message.classList.remove('invisible');\n messageContainer.style.setProperty('height', `${height}px`);\n }\n });\n}\n\nexport const resizeIframe = () => {\n return window.TectonElements?.resizeIframe?.();\n};\n\n// Handling color attribute (deprecated)\nexport const handleColor = (target: Q2Btn) => {\n if (!target.intent && ['primary', 'secondary'].includes(target.color)) {\n target.intent = `workflow-${target.color}` as HTMLQ2BtnElement['intent'];\n target.color = undefined;\n }\n};\n\n/**\n * Gets all translated text content from an element, including shadow DOM content\n *\n * @param {Element} element - The element to extract text from\n * @param {Object} options - Configuration options\n * @param {boolean} [options.trim=true] - Whether to trim whitespace\n * @param {boolean} [options.normalizeWhitespace=false] - Whether to normalize whitespace\n * @param {boolean} [options.skipComponentReady=false] - Skip waiting for components (for test environments)\n * @return {Promise<string>} All translated text content in DOM order\n */\nexport const getAllText = async (element, options = {}) => {\n if (!element) return '';\n\n const opts = {\n trim: true,\n normalizeWhitespace: false,\n skipComponentReady: false,\n ...options,\n };\n\n const nodesToSkip = new Set(['STYLE', 'SCRIPT', 'NOSCRIPT', 'TEMPLATE', '#comment']);\n const processedNodes = new WeakSet();\n let result = '';\n\n async function processNode(node) {\n if (processedNodes.has(node) || nodesToSkip.has(node.nodeName)) return;\n\n processedNodes.add(node);\n\n // Handle text nodes\n if (node.nodeType === Node.TEXT_NODE) {\n const text = opts.trim ? node.textContent.trim() : node.textContent;\n\n if (text) {\n // Add space between adjacent text nodes if needed\n if (result && !result.endsWith(' ') && !text.startsWith(' ')) {\n result += ' ';\n }\n\n // Translate the text\n result += opts.skipComponentReady ? window.TectonElements?.loc(text) : loc(text);\n }\n return;\n }\n\n // Handle element nodes\n if (node.nodeType === Node.ELEMENT_NODE) {\n // Wait for Stencil component if needed\n const isStencilComponent = node.nodeName.startsWith('Q2-') && typeof node.componentOnReady === 'function';\n\n if (isStencilComponent && !opts.skipComponentReady) {\n await node.componentOnReady();\n }\n\n // Process children in light DOM\n for (const child of node.childNodes) {\n await processNode(child);\n }\n\n // Process shadow DOM if present\n if (node.shadowRoot) {\n for (const shadowChild of node.shadowRoot.childNodes) {\n await processNode(shadowChild);\n }\n }\n\n // Handle slot elements with assigned nodes\n if (node.nodeName === 'SLOT' && typeof node.assignedNodes === 'function') {\n const assignedNodes = node.assignedNodes();\n\n if (assignedNodes.length > 0) {\n for (const assigned of assignedNodes) {\n if (!processedNodes.has(assigned)) {\n await processNode(assigned);\n }\n }\n } else {\n // Process slot fallback content\n for (const fallback of node.childNodes) {\n if (!processedNodes.has(fallback)) {\n await processNode(fallback);\n }\n }\n }\n }\n }\n }\n\n await processNode(element);\n\n // Apply final formatting\n if (opts.trim) {\n result = result.trim();\n }\n\n if (opts.normalizeWhitespace) {\n result = result.replace(/\\s+/g, ' ');\n }\n\n return result;\n};\n"],"version":3}
@@ -1 +0,0 @@
1
- {"file":"index-d18e2a20.js","mappings":";;MAgBa,QAAQ,GAAG,CAAsD,EAAK,EAAE,QAAgB,GAAG;IACpG,IAAI,OAAsC,CAAC;IAC3C,OAAO,UAAU,GAAG,IAAmB;QACnC,YAAY,CAAC,OAAO,CAAC,CAAC;QACtB,OAAO,GAAG,UAAU,CAAC;YACjB,EAAE,CAAC,GAAG,IAAI,CAAC,CAAC;SACf,EAAE,KAAK,CAAC,CAAC;KACb,CAAC;AACN,EAAE;SAEc,QAAQ;IACpB,OAAO,qFAAqF,CAAC,IAAI,CAC7F,SAAS,CAAC,SAAS,CACtB,CAAC;AACN,CAAC;SAEe,iBAAiB,CAAC,KAAiB,EAAE,WAAwB;IACzE,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC;IACxB,MAAM,YAAY,GAAG,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;IAC1C,MAAM,SAAS,GAAG,YAAY,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;;;IAI9C,MAAM,mBAAmB,GAAG,SAAS,GAAG,KAAK,CAAC,MAAM,GAAG,KAAK,CAAC,aAAa,CAAC;IAE3E,MAAM,4BAA4B,GAAG,CAAC,OAAoB;QACtD,IAAI,OAAO,KAAK,WAAW;YAAE,OAAO,IAAI,CAAC;QACzC,IAAI,OAAO,CAAC,a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C,QAAQ,KAAK,MAAM,IAAI,OAAO,IAAI,CAAC,aAAa,KAAK,UAAU,EAAE;gBACtE,MAAM,aAAa,GAAG,IAAI,CAAC,aAAa,EAAE,CAAC;gBAE3C,IAAI,aAAa,CAAC,MAAM,GAAG,CAAC,EAAE;oBAC1B,KAAK,MAAM,QAAQ,IAAI,aAAa,EAAE;wBAClC,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE;4BAC/B,MAAM,WAAW,CAAC,QAAQ,CAAC,CAAC;yBAC/B;qBACJ;iBACJ;qBAAM;;oBAEH,KAAK,MAAM,QAAQ,IAAI,IAAI,CAAC,UAAU,EAAE;wBACpC,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE;4BAC/B,MAAM,WAAW,CAAC,QAAQ,CAAC,CAAC;yBAC/B;qBACJ;iBACJ;aACJ;SACJ;KACJ;IAED,MAAM,WAAW,CAAC,OAAO,CAAC,CAAC;;IAG3B,IAAI,IAAI,CAAC,IAAI,EAAE;QACX,MAAM,GAAG,MAAM,CAAC,IAAI,EAAE,CAAC;KAC1B;IAED,IAAI,IAAI,CAAC,mBAAmB,EAAE;QAC1B,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;KACxC;IAED,OAAO,MAAM,CAAC;AAClB;;;;","names":[],"sources":["src/utils/index.tsx"],"sourcesContent":["import { h } from '@stencil/core';\nimport { Q2Btn } from 'src/components/q2-btn/q2-btn';\nimport { Q2Calendar } from 'src/components/q2-calendar/q2-calendar';\nimport { Q2Carousel } from 'src/components/q2-carousel/q2-carousel';\nimport { Q2Checkbox } from 'src/components/q2-checkbox/q2-checkbox';\nimport { Q2CheckboxGroup } from 'src/components/q2-checkbox-group/q2-checkbox-group';\nimport { Q2RadioGroup } from 'src/components/q2-radio-group/q2-radio-group';\nimport { Q2Dropdown } from 'src/components/q2-dropdown/q2-dropdown';\nimport { Q2DropdownItem } from 'src/components/q2-dropdown-item/q2-dropdown-item';\nimport { Q2EditableField } from 'src/components/q2-editable-field/q2-editable-field';\nimport { Q2Input } from 'src/components/q2-input/q2-input';\nimport { Q2Loading } from 'src/components/q2-loading/q2-loading';\nimport { Q2Radio } from 'src/components/q2-radio/q2-radio';\nimport { Q2Select } from 'src/components/q2-select/q2-select';\nimport { FormFieldTypes, IDict } from 'src/util';\n\nexport const debounce = <F extends (...args: Parameters<F>) => ReturnType<F>>(fn: F, delay: number = 300) => {\n let timeout: ReturnType<typeof setTimeout>;\n return function (...args: Parameters<F>) {\n clearTimeout(timeout);\n timeout = setTimeout(() => {\n fn(...args);\n }, delay);\n };\n};\n\nexport function isMobile(): boolean {\n return /Android|webOS|iPhone|iPad|iPod|BlackBerry|Mobile|IEMobile|Windows Phone|Opera Mini/i.test(\n navigator.userAgent\n );\n}\n\nexport function isHostLosingFocus(event: FocusEvent, hostElement: HTMLElement) {\n const type = event.type;\n const focusInTypes = ['focusin', 'focus'];\n const isFocusIn = focusInTypes.includes(type);\n\n // on focusin: `target` is element losing focus, `relatedTarget` is element gaining focus\n // on focusout: `target` is element gaining focus, `relatedTarget` is element losing focus\n const elementGainingFocus = isFocusIn ? event.target : event.relatedTarget;\n\n const isElementNestedInHostElement = (element: HTMLElement) => {\n if (element === hostElement) return true;\n if (element.parentElement) {\n return isElementNestedInHostElement(element.parentElement);\n }\n return false;\n };\n\n if (!(elementGainingFocus instanceof HTMLElement)) return true;\n return !isElementNestedInHostElement(elementGainingFocus);\n}\n\nexport function isRelatedTargetWithinHost(event: FocusEvent, element: HTMLElement) {\n return event.relatedTarget !== element && !element.contains(event.relatedTarget as Node);\n}\n\nexport function isEventFromElement(event: Event, element: HTMLElement): boolean {\n return event.composedPath?.()[0] === element;\n}\n\nexport function overrideFocus(hostElement: HTMLElement) {\n hostElement.focus = () => hostElement?.dispatchEvent(new FocusEvent('focus', { bubbles: false }));\n}\n\nexport function isFirefox() {\n const userAgent = navigator.userAgent.toLowerCase();\n return userAgent.includes('firefox');\n}\n\nexport function isTouchDevice() {\n return 'ontouchstart' in window || navigator.maxTouchPoints > 0;\n}\n\nexport function isSafari() {\n const userAgent = navigator.userAgent.toLowerCase();\n return userAgent.includes('safari') && !userAgent.includes('chrome');\n}\n\n/**\n * Returns the value of a prop if it is defined and included in the `validValues`\n * array. This is used primarily to prevent Vue wrappers from setting aria props\n * to \"Symbol()\" when the prop is not set.\n */\nexport function getAriaValueFromProp(prop: string, validValues?: string[]) {\n if (prop === undefined) return prop;\n if (!validValues) return prop !== 'Symbol()' ? prop : undefined;\n return validValues.includes(prop) || prop === '' ? prop : undefined;\n}\n\nlet guid: number = 1000;\nexport function createGuid(): number {\n return guid++;\n}\n\nexport function nextPaint(fn: (value?: unknown) => void) {\n requestAnimationFrame(() => {\n requestAnimationFrame(fn);\n });\n}\n\nexport function isVisible(element: HTMLElement) {\n return element.offsetWidth > 0 || element.offsetHeight > 0 || element.getClientRects().length > 0;\n}\n\nexport function waitForNextPaint() {\n return new Promise(resolve => nextPaint(resolve));\n}\n\nexport function capitalize(value: string) {\n return `${value.charAt(0).toUpperCase()}${value.slice(1)}`;\n}\n\nexport function pick(props: string[]): (obj: object) => object {\n return obj => {\n return props.reduce((memo, prop) => {\n return {\n ...memo,\n [prop]: obj[prop],\n };\n }, {});\n };\n}\n\nexport function loc(key: string, subs?: IDict<any> | string[]) {\n if (!key) return '';\n if (window.Tecton?.noStrings === true) {\n return key;\n }\n return window?.TectonElements?.loc(key, subs) ?? key;\n}\n\nexport function renderLabel(target: FormFieldTypes | Q2RadioGroup | Q2CheckboxGroup) {\n const { label, hideLabel, optional, readonly } = target;\n const labelClasses: string[] = ['input-label'];\n let helpText = '';\n\n let shouldHideLabel = hideLabel;\n if (!shouldHideLabel) {\n const labelSlotElements = target.hostElement.querySelectorAll<HTMLSlotElement>('[slot=\"label\"]');\n const hasSlotContent = labelSlotElements.length > 0;\n const hasLabel = !!label;\n\n shouldHideLabel = hasLabel || hasSlotContent ? false : true;\n }\n\n if (shouldHideLabel) labelClasses.push('sr');\n if (optional) {\n helpText = <span class=\"optional-tag\">{loc('tecton.element.input.optional')}</span>;\n }\n if (readonly) {\n helpText = <span class=\"optional-tag\">{loc('tecton.element.input.readonly')}</span>;\n labelClasses.push('readonly-field');\n }\n return (\n <label\n htmlFor={target.inputId}\n class={labelClasses.join(' ')}\n >\n <slot name=\"label\">\n {label ? loc(label) : undefined}\n {helpText}\n </slot>\n </label>\n );\n}\n\nexport function hasSlotContent(target: HTMLElement, slotName: string) {\n return target.querySelector(`[slot=\"${slotName}\"]`) !== null;\n}\n\nexport function handleAriaLabel(\n target:\n | Q2Input\n | Q2Select\n | Q2Radio\n | Q2Checkbox\n | Q2EditableField\n | Q2Dropdown\n | Q2DropdownItem\n | Q2Loading\n | Q2Carousel\n | Q2Calendar\n | Q2Btn\n) {\n const { ariaLabel } = target;\n if (!ariaLabel) return;\n\n // If empty ariaLabel prop is set to primitive symbol by framework wrapper, set ariaLabel to undefined and return\n const FW_WRAPPERS_EMPTY_PROP = Symbol().toString();\n if (ariaLabel === FW_WRAPPERS_EMPTY_PROP) {\n target.ariaLabel = undefined;\n return;\n }\n\n // If ariaLabel is set, set hideLabel to true and set label to ariaLabel\n if ('hideLabel' in target) target.hideLabel = true;\n target.label = loc(ariaLabel);\n target.ariaLabel = undefined;\n}\n\n/**\n * Handles when a prop has been renamed on a component without introducing a breaking change.\n */\nexport function handleRenamedProp(target: object, oldProp: string, newProp: string, removeOldProp?: boolean) {\n if (typeof target[oldProp] === 'undefined') return;\n\n // If old prop has value, aka set in component, call handleDeprecationWarning()\n if (target[oldProp]) {\n handleDeprecationWarning(target, oldProp, 'prop');\n }\n\n target[newProp] = target[oldProp];\n\n if (removeOldProp) {\n delete target[oldProp];\n }\n}\n\nexport function handleDeprecationWarning(\n target: object,\n deprecatedItemName: string,\n deprecatedItemType: 'function' | 'prop' | 'method' | 'event'\n) {\n if (window.location.hostname === 'localhost' || window.location.host === 'stack.q2developer.com') {\n if (target[deprecatedItemName] === 'undefined') return;\n\n const componentName = target.constructor.name.toLowerCase().slice(2);\n\n switch (deprecatedItemType) {\n case 'prop':\n if (deprecatedItemName === 'size' && componentName === 'btn') {\n console.warn(\n `The property of size in q2-btn should not be typeof number, or typeof string containing a number. This functionality will be deprecated in an upcoming release. Instead, please use the value 'undefined', or typeof string with any of the following values: \"small\" / \"medium\" / \"large\" `\n );\n } else {\n console.warn(\n `The property ${deprecatedItemName} in q2-${componentName} has been marked for deprecation and will be removed in an upcoming major release.`\n );\n }\n break;\n\n case 'function':\n console.warn(\n `The function ${deprecatedItemName} in ${componentName} has been marked for deprecation and will be removed in an upcoming major release.`\n );\n break;\n\n case 'method':\n console.warn(\n `The method ${deprecatedItemName} in ${componentName} has been marked for deprecation and will be removed in an upcoming major release.`\n );\n break;\n\n case 'event':\n console.warn(\n `The event ${deprecatedItemName} in ${componentName} has been marked for deprecation and will be removed in an upcoming major release.`\n );\n break;\n\n default:\n console.error(\n `handleDeprecationWarning --> No type found for desired deprecation: ${deprecatedItemName} in q2-${componentName}: deprecatedItemType = ${deprecatedItemName}`\n );\n }\n }\n}\n\nexport function renderMessages(target: FormFieldTypes) {\n const type = target.hasError ? 'danger' : 'info';\n\n return (\n <div class=\"messages-container\">\n <q2-message\n appearance=\"minimal\"\n description\n type={type}\n test-id=\"message\"\n >\n <ul id={target.inputDescribedBy}>\n {target.messages.map(message => (\n <li test-id=\"messageListItem\">{loc(message)}</li>\n ))}\n </ul>\n </q2-message>\n </div>\n );\n}\n\nexport function setMessageHeight(target: FormFieldTypes) {\n const messageContainer = (target.hostElement.shadowRoot as ShadowRoot).querySelector<HTMLDivElement>(\n '.messages-container'\n );\n const q2Message = messageContainer.querySelector('q2-message');\n nextPaint(() => {\n const height = target.showMessages && target.hasFocus ? q2Message.getBoundingClientRect().height : 0;\n\n if (messageContainer.style.getPropertyValue('height') === `${height}px`) return;\n\n if (height === 0) {\n q2Message.classList.add('invisible');\n messageContainer.style.removeProperty('height');\n } else {\n q2Message.classList.remove('invisible');\n messageContainer.style.setProperty('height', `${height}px`);\n }\n });\n}\n\nexport const resizeIframe = () => {\n return window.TectonElements?.resizeIframe?.();\n};\n\n// Handling color attribute (deprecated)\nexport const handleColor = (target: Q2Btn) => {\n if (!target.intent && ['primary', 'secondary'].includes(target.color)) {\n target.intent = `workflow-${target.color}` as HTMLQ2BtnElement['intent'];\n target.color = undefined;\n }\n};\n\n/**\n * Gets all translated text content from an element, including shadow DOM content\n *\n * @param {Element} element - The element to extract text from\n * @param {Object} options - Configuration options\n * @param {boolean} [options.trim=true] - Whether to trim whitespace\n * @param {boolean} [options.normalizeWhitespace=false] - Whether to normalize whitespace\n * @param {boolean} [options.skipComponentReady=false] - Skip waiting for components (for test environments)\n * @return {Promise<string>} All translated text content in DOM order\n */\nexport const getAllText = async (element, options = {}) => {\n if (!element) return '';\n\n const opts = {\n trim: true,\n normalizeWhitespace: false,\n skipComponentReady: false,\n ...options,\n };\n\n const nodesToSkip = new Set(['STYLE', 'SCRIPT', 'NOSCRIPT', 'TEMPLATE', '#comment']);\n const processedNodes = new WeakSet();\n let result = '';\n\n async function processNode(node) {\n if (processedNodes.has(node) || nodesToSkip.has(node.nodeName)) return;\n\n processedNodes.add(node);\n\n // Handle text nodes\n if (node.nodeType === Node.TEXT_NODE) {\n const text = opts.trim ? node.textContent.trim() : node.textContent;\n\n if (text) {\n // Add space between adjacent text nodes if needed\n if (result && !result.endsWith(' ') && !text.startsWith(' ')) {\n result += ' ';\n }\n\n // Translate the text\n result += opts.skipComponentReady ? window.TectonElements?.loc(text) : loc(text);\n }\n return;\n }\n\n // Handle element nodes\n if (node.nodeType === Node.ELEMENT_NODE) {\n // Wait for Stencil component if needed\n const isStencilComponent = node.nodeName.startsWith('Q2-') && typeof node.componentOnReady === 'function';\n\n if (isStencilComponent && !opts.skipComponentReady) {\n await node.componentOnReady();\n }\n\n // Process children in light DOM\n for (const child of node.childNodes) {\n await processNode(child);\n }\n\n // Process shadow DOM if present\n if (node.shadowRoot) {\n for (const shadowChild of node.shadowRoot.childNodes) {\n await processNode(shadowChild);\n }\n }\n\n // Handle slot elements with assigned nodes\n if (node.nodeName === 'SLOT' && typeof node.assignedNodes === 'function') {\n const assignedNodes = node.assignedNodes();\n\n if (assignedNodes.length > 0) {\n for (const assigned of assignedNodes) {\n if (!processedNodes.has(assigned)) {\n await processNode(assigned);\n }\n }\n } else {\n // Process slot fallback content\n for (const fallback of node.childNodes) {\n if (!processedNodes.has(fallback)) {\n await processNode(fallback);\n }\n }\n }\n }\n }\n }\n\n await processNode(element);\n\n // Apply final formatting\n if (opts.trim) {\n result = result.trim();\n }\n\n if (opts.normalizeWhitespace) {\n result = result.replace(/\\s+/g, ' ');\n }\n\n return result;\n};\n"],"version":3}