q2-tecton-elements 1.51.2 → 1.51.4

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 (445) hide show
  1. package/dist/cjs/click-elsewhere_2.cjs.entry.js +77 -81
  2. package/dist/cjs/click-elsewhere_2.cjs.entry.js.map +1 -1
  3. package/dist/cjs/{index-9aa4a776.js → index-bdd747a4.js} +30 -18
  4. package/dist/cjs/index-bdd747a4.js.map +1 -0
  5. package/dist/cjs/loader.cjs.js +1 -1
  6. package/dist/cjs/q2-action-group.cjs.entry.js +1 -1
  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 +4 -4
  10. package/dist/cjs/q2-calendar.cjs.entry.js +1 -1
  11. package/dist/cjs/q2-card.cjs.entry.js +1 -1
  12. package/dist/cjs/q2-carousel-pane.cjs.entry.js +3 -3
  13. package/dist/cjs/q2-carousel.cjs.entry.js +1 -1
  14. package/dist/cjs/q2-chart-area.cjs.entry.js +2 -2
  15. package/dist/cjs/q2-chart-bar.cjs.entry.js +2 -2
  16. package/dist/cjs/q2-chart-donut.cjs.entry.js +2 -2
  17. package/dist/cjs/q2-checkbox-group.cjs.entry.js +1 -1
  18. package/dist/cjs/q2-checkbox.cjs.entry.js +1 -1
  19. package/dist/cjs/q2-currency.cjs.entry.js +1 -1
  20. package/dist/cjs/q2-data-table.cjs.entry.js +1 -1
  21. package/dist/cjs/q2-detail.cjs.entry.js +2 -2
  22. package/dist/cjs/q2-dropdown-item.cjs.entry.js +1 -1
  23. package/dist/cjs/q2-dropdown.cjs.entry.js +4 -2
  24. package/dist/cjs/q2-dropdown.cjs.entry.js.map +1 -1
  25. package/dist/cjs/q2-editable-field.cjs.entry.js +1 -1
  26. package/dist/cjs/q2-formatted-text.cjs.entry.js +1 -1
  27. package/dist/cjs/q2-item.cjs.entry.js +2 -2
  28. package/dist/cjs/q2-legend.cjs.entry.js +1 -1
  29. package/dist/cjs/q2-list.cjs.entry.js +2 -2
  30. package/dist/cjs/q2-loc.cjs.entry.js +2 -2
  31. package/dist/cjs/q2-message.cjs.entry.js +2 -2
  32. package/dist/cjs/q2-month-picker.cjs.entry.js +3 -3
  33. package/dist/cjs/q2-optgroup.cjs.entry.js +2 -2
  34. package/dist/cjs/q2-option-list.cjs.entry.js +1 -1
  35. package/dist/cjs/q2-option.cjs.entry.js +1 -1
  36. package/dist/cjs/q2-pagination.cjs.entry.js +3 -3
  37. package/dist/cjs/q2-pill.cjs.entry.js +2 -2
  38. package/dist/cjs/q2-radio-group.cjs.entry.js +1 -1
  39. package/dist/cjs/q2-radio.cjs.entry.js +1 -1
  40. package/dist/cjs/q2-relative-time.cjs.entry.js +2 -2
  41. package/dist/cjs/q2-resize-observer.cjs.entry.js +1 -1
  42. package/dist/cjs/q2-section.cjs.entry.js +3 -3
  43. package/dist/cjs/q2-select.cjs.entry.js +134 -17
  44. package/dist/cjs/q2-select.cjs.entry.js.map +1 -1
  45. package/dist/cjs/q2-stepper-pane.cjs.entry.js +1 -1
  46. package/dist/cjs/q2-stepper-vertical.cjs.entry.js +2 -2
  47. package/dist/cjs/q2-stepper.cjs.entry.js +2 -2
  48. package/dist/cjs/q2-tag.cjs.entry.js +2 -2
  49. package/dist/cjs/q2-tecton-elements.cjs.js +1 -1
  50. package/dist/cjs/q2-textarea.cjs.entry.js +2 -2
  51. package/dist/cjs/q2-tooltip.cjs.entry.js +1 -1
  52. package/dist/cjs/tecton-tab-pane.cjs.entry.js +2 -2
  53. package/dist/collection/components/click-elsewhere/click-elsewhere.js.map +1 -1
  54. package/dist/collection/components/click-elsewhere/test/click-elsewhere-test.e2e.js.map +1 -1
  55. package/dist/collection/components/q2-action-group/q2-action-group.js +1 -1
  56. package/dist/collection/components/q2-action-group/q2-action-group.js.map +1 -1
  57. package/dist/collection/components/q2-action-group/test/q2-action-group.e2e.js.map +1 -1
  58. package/dist/collection/components/q2-action-group/test/q2-action-group.spec.js.map +1 -1
  59. package/dist/collection/components/q2-action-sheet/q2-action-sheet.js +1 -1
  60. package/dist/collection/components/q2-action-sheet/q2-action-sheet.js.map +1 -1
  61. package/dist/collection/components/q2-action-sheet/test/q2-action-sheet-test.e2e.js.map +1 -1
  62. package/dist/collection/components/q2-avatar/q2-avatar.js +1 -1
  63. package/dist/collection/components/q2-avatar/q2-avatar.js.map +1 -1
  64. package/dist/collection/components/q2-avatar/test/q2-avatar-test.e2e.js.map +1 -1
  65. package/dist/collection/components/q2-badge/q2-badge.js.map +1 -1
  66. package/dist/collection/components/q2-badge/test/q2-badge-test.e2e.js.map +1 -1
  67. package/dist/collection/components/q2-btn/q2-btn.js.map +1 -1
  68. package/dist/collection/components/q2-btn/test/q2-btn-test.e2e.js.map +1 -1
  69. package/dist/collection/components/q2-calendar/q2-calendar-helpers.js.map +1 -1
  70. package/dist/collection/components/q2-calendar/q2-calendar-types.js.map +1 -1
  71. package/dist/collection/components/q2-calendar/q2-calendar-validation.js.map +1 -1
  72. package/dist/collection/components/q2-calendar/q2-calendar.js.map +1 -1
  73. package/dist/collection/components/q2-calendar/q2-month-picker.js +2 -2
  74. package/dist/collection/components/q2-calendar/q2-month-picker.js.map +1 -1
  75. package/dist/collection/components/q2-calendar/test/helpers-test.e2e.js.map +1 -1
  76. package/dist/collection/components/q2-calendar/test/q2-calendar-month-picker-test.e2e.js.map +1 -1
  77. package/dist/collection/components/q2-calendar/test/q2-calendar-test.e2e.js +2 -2
  78. package/dist/collection/components/q2-calendar/test/q2-calendar-test.e2e.js.map +1 -1
  79. package/dist/collection/components/q2-calendar/test/validation-test.e2e.js.map +1 -1
  80. package/dist/collection/components/q2-card/q2-card.js.map +1 -1
  81. package/dist/collection/components/q2-card/test/q2-card-test.e2e.js.map +1 -1
  82. package/dist/collection/components/q2-carousel/q2-carousel.js.map +1 -1
  83. package/dist/collection/components/q2-carousel/test/q2-carousel-test.e2e.js.map +1 -1
  84. package/dist/collection/components/q2-carousel-pane/q2-carousel-pane.js +2 -2
  85. package/dist/collection/components/q2-carousel-pane/q2-carousel-pane.js.map +1 -1
  86. package/dist/collection/components/q2-carousel-pane/test/q2-carousel-pane-test.e2e.js.map +1 -1
  87. package/dist/collection/components/q2-carousel-pane/test/q2-carousel-pane-test.spec.js.map +1 -1
  88. package/dist/collection/components/q2-chart-area/q2-chart-area.js +1 -1
  89. package/dist/collection/components/q2-chart-area/q2-chart-area.js.map +1 -1
  90. package/dist/collection/components/q2-chart-area/test/q2-chart-area-test.e2e.js.map +1 -1
  91. package/dist/collection/components/q2-chart-bar/q2-chart-bar.js +1 -1
  92. package/dist/collection/components/q2-chart-bar/q2-chart-bar.js.map +1 -1
  93. package/dist/collection/components/q2-chart-bar/test/q2-chart-bar-test.e2e.js.map +1 -1
  94. package/dist/collection/components/q2-chart-donut/q2-chart-donut.js +1 -1
  95. package/dist/collection/components/q2-chart-donut/q2-chart-donut.js.map +1 -1
  96. package/dist/collection/components/q2-chart-donut/test/q2-chart-donut-test.e2e.js.map +1 -1
  97. package/dist/collection/components/q2-checkbox/q2-checkbox.js.map +1 -1
  98. package/dist/collection/components/q2-checkbox/test/q2-checkbox-test.e2e.js.map +1 -1
  99. package/dist/collection/components/q2-checkbox-group/q2-checkbox-group.js.map +1 -1
  100. package/dist/collection/components/q2-checkbox-group/test/q2-checkbox-group-test.e2e.js.map +1 -1
  101. package/dist/collection/components/q2-currency/q2-currency.js +1 -1
  102. package/dist/collection/components/q2-currency/q2-currency.js.map +1 -1
  103. package/dist/collection/components/q2-currency/test/q2-currency-test.e2e.js.map +1 -1
  104. package/dist/collection/components/q2-data-table/q2-data-table.js.map +1 -1
  105. package/dist/collection/components/q2-data-table/test/q2-data-table-test.e2e.js.map +1 -1
  106. package/dist/collection/components/q2-detail/q2-detail.js +1 -1
  107. package/dist/collection/components/q2-detail/q2-detail.js.map +1 -1
  108. package/dist/collection/components/q2-detail/test/q2-detail-test.e2e.js.map +1 -1
  109. package/dist/collection/components/q2-dropdown/q2-dropdown.js +3 -1
  110. package/dist/collection/components/q2-dropdown/q2-dropdown.js.map +1 -1
  111. package/dist/collection/components/q2-dropdown/test/q2-dropdown-test.e2e.js +5 -17
  112. package/dist/collection/components/q2-dropdown/test/q2-dropdown-test.e2e.js.map +1 -1
  113. package/dist/collection/components/q2-dropdown-item/q2-dropdown-item.js.map +1 -1
  114. package/dist/collection/components/q2-dropdown-item/test/q2-dropdown-item-test.e2e.js.map +1 -1
  115. package/dist/collection/components/q2-editable-field/q2-editable-field.js.map +1 -1
  116. package/dist/collection/components/q2-editable-field/test/q2-editable-field-test.e2e.js.map +1 -1
  117. package/dist/collection/components/q2-formatted-text/q2-formatted-text.js +1 -1
  118. package/dist/collection/components/q2-formatted-text/q2-formatted-text.js.map +1 -1
  119. package/dist/collection/components/q2-formatted-text/test/q2-formatted-text-test.e2e.js.map +1 -1
  120. package/dist/collection/components/q2-icon/q2-icon-types.js.map +1 -1
  121. package/dist/collection/components/q2-icon/q2-icon.js.map +1 -1
  122. package/dist/collection/components/q2-icon/test/q2-icon-test.e2e.js.map +1 -1
  123. package/dist/collection/components/q2-input/formatting/alpha.js.map +1 -1
  124. package/dist/collection/components/q2-input/formatting/alphanumeric.js.map +1 -1
  125. package/dist/collection/components/q2-input/formatting/credit-card.js.map +1 -1
  126. package/dist/collection/components/q2-input/formatting/credit-card.spec.js.map +1 -1
  127. package/dist/collection/components/q2-input/formatting/currency.js.map +1 -1
  128. package/dist/collection/components/q2-input/formatting/date.js.map +1 -1
  129. package/dist/collection/components/q2-input/formatting/generic.js.map +1 -1
  130. package/dist/collection/components/q2-input/formatting/number.js.map +1 -1
  131. package/dist/collection/components/q2-input/formatting/numeric.js.map +1 -1
  132. package/dist/collection/components/q2-input/formatting/phone.js.map +1 -1
  133. package/dist/collection/components/q2-input/formatting/postal.js.map +1 -1
  134. package/dist/collection/components/q2-input/formatting/ssn.js.map +1 -1
  135. package/dist/collection/components/q2-input/formatting/tin.js.map +1 -1
  136. package/dist/collection/components/q2-input/q2-input-types.js.map +1 -1
  137. package/dist/collection/components/q2-input/q2-input.js +1 -1
  138. package/dist/collection/components/q2-input/q2-input.js.map +1 -1
  139. package/dist/collection/components/q2-input/test/q2-input-credit-card-test.e2e.js.map +1 -1
  140. package/dist/collection/components/q2-input/test/q2-input-test.e2e.js.map +1 -1
  141. package/dist/collection/components/q2-item/q2-item.js +1 -1
  142. package/dist/collection/components/q2-item/q2-item.js.map +1 -1
  143. package/dist/collection/components/q2-item/test/q2-item-test.e2e.js.map +1 -1
  144. package/dist/collection/components/q2-item/test/q2-item-test.spec.js.map +1 -1
  145. package/dist/collection/components/q2-legend/q2-legend.js +1 -1
  146. package/dist/collection/components/q2-legend/q2-legend.js.map +1 -1
  147. package/dist/collection/components/q2-legend/test/q2-legend-test.e2e.js.map +1 -1
  148. package/dist/collection/components/q2-legend/test/q2-legend-test.spec.js.map +1 -1
  149. package/dist/collection/components/q2-link/q2-link.js.map +1 -1
  150. package/dist/collection/components/q2-link/test/q2-link-test.e2e.js.map +1 -1
  151. package/dist/collection/components/q2-list/q2-list.js +1 -1
  152. package/dist/collection/components/q2-list/q2-list.js.map +1 -1
  153. package/dist/collection/components/q2-list/test/q2-list-test.e2e.js.map +1 -1
  154. package/dist/collection/components/q2-loading/q2-loading.js.map +1 -1
  155. package/dist/collection/components/q2-loading/skeleton/q2-loading-element/index.js.map +1 -1
  156. package/dist/collection/components/q2-loading/skeleton/shapes.js.map +1 -1
  157. package/dist/collection/components/q2-loading/test/q2-loading-element-test.e2e.js.map +1 -1
  158. package/dist/collection/components/q2-loading/test/q2-loading-test.e2e.js.map +1 -1
  159. package/dist/collection/components/q2-loc/q2-loc.js +1 -1
  160. package/dist/collection/components/q2-loc/q2-loc.js.map +1 -1
  161. package/dist/collection/components/q2-loc/test/q2-loc-test.e2e.js.map +1 -1
  162. package/dist/collection/components/q2-message/q2-message.js +1 -1
  163. package/dist/collection/components/q2-message/q2-message.js.map +1 -1
  164. package/dist/collection/components/q2-message/test/q2-message-test.e2e.js.map +1 -1
  165. package/dist/collection/components/q2-optgroup/q2-optgroup.js +1 -1
  166. package/dist/collection/components/q2-optgroup/q2-optgroup.js.map +1 -1
  167. package/dist/collection/components/q2-optgroup/test/q2-optgroup-test.e2e.js.map +1 -1
  168. package/dist/collection/components/q2-option/q2-option.js +1 -1
  169. package/dist/collection/components/q2-option/q2-option.js.map +1 -1
  170. package/dist/collection/components/q2-option/test/q2-option-test.e2e.js.map +1 -1
  171. package/dist/collection/components/q2-option-list/q2-option-list.js.map +1 -1
  172. package/dist/collection/components/q2-option-list/test/q2-option-list-test.e2e.js.map +1 -1
  173. package/dist/collection/components/q2-pagination/q2-pagination.js +2 -2
  174. package/dist/collection/components/q2-pagination/q2-pagination.js.map +1 -1
  175. package/dist/collection/components/q2-pagination/test/q2-pagination-test.e2e.js +1 -0
  176. package/dist/collection/components/q2-pagination/test/q2-pagination-test.e2e.js.map +1 -1
  177. package/dist/collection/components/q2-pill/q2-pill.js +1 -1
  178. package/dist/collection/components/q2-pill/q2-pill.js.map +1 -1
  179. package/dist/collection/components/q2-pill/test/q2-pill-test.e2e.js +1 -1
  180. package/dist/collection/components/q2-pill/test/q2-pill-test.e2e.js.map +1 -1
  181. package/dist/collection/components/q2-popover/q2-popover.css +18 -10
  182. package/dist/collection/components/q2-popover/q2-popover.js +78 -81
  183. package/dist/collection/components/q2-popover/q2-popover.js.map +1 -1
  184. package/dist/collection/components/q2-popover/test/q2-popover-test.e2e.js +1 -83
  185. package/dist/collection/components/q2-popover/test/q2-popover-test.e2e.js.map +1 -1
  186. package/dist/collection/components/q2-popover/test/q2-popover-test.spec.js +902 -511
  187. package/dist/collection/components/q2-popover/test/q2-popover-test.spec.js.map +1 -1
  188. package/dist/collection/components/q2-radio/q2-radio.js.map +1 -1
  189. package/dist/collection/components/q2-radio/test/q2-radio-test.e2e.js.map +1 -1
  190. package/dist/collection/components/q2-radio-group/q2-radio-group.js.map +1 -1
  191. package/dist/collection/components/q2-radio-group/test/q2-radio-group-test.e2e.js.map +1 -1
  192. package/dist/collection/components/q2-relative-time/q2-relative-time.js +1 -1
  193. package/dist/collection/components/q2-relative-time/q2-relative-time.js.map +1 -1
  194. package/dist/collection/components/q2-relative-time/test/q2-relative-time-test.e2e.js.map +1 -1
  195. package/dist/collection/components/q2-resize-observer/q2-resize-observer.js +1 -1
  196. package/dist/collection/components/q2-resize-observer/q2-resize-observer.js.map +1 -1
  197. package/dist/collection/components/q2-resize-observer/test/q2-resize-observer.e2e.js.map +1 -1
  198. package/dist/collection/components/q2-resize-observer/test/q2-resize-observer.spec.js.map +1 -1
  199. package/dist/collection/components/q2-section/q2-section.js +2 -2
  200. package/dist/collection/components/q2-section/q2-section.js.map +1 -1
  201. package/dist/collection/components/q2-section/test/q2-section-test.e2e.js.map +1 -1
  202. package/dist/collection/components/q2-select/q2-select.js +155 -19
  203. package/dist/collection/components/q2-select/q2-select.js.map +1 -1
  204. package/dist/collection/components/q2-select/test/q2-select-test.e2e.js +1 -2
  205. package/dist/collection/components/q2-select/test/q2-select-test.e2e.js.map +1 -1
  206. package/dist/collection/components/q2-select/test/q2-select-test.spec.js +552 -0
  207. package/dist/collection/components/q2-select/test/q2-select-test.spec.js.map +1 -0
  208. package/dist/collection/components/q2-stepper/q2-stepper.js +1 -1
  209. package/dist/collection/components/q2-stepper/q2-stepper.js.map +1 -1
  210. package/dist/collection/components/q2-stepper/test/q2-stepper-test.e2e.js.map +1 -1
  211. package/dist/collection/components/q2-stepper-pane/q2-stepper-pane.js.map +1 -1
  212. package/dist/collection/components/q2-stepper-pane/test/q2-stepper-pane-test.e2e.js.map +1 -1
  213. package/dist/collection/components/q2-stepper-vertical/q2-stepper-vertical.js +1 -1
  214. package/dist/collection/components/q2-stepper-vertical/q2-stepper-vertical.js.map +1 -1
  215. package/dist/collection/components/q2-stepper-vertical/test/q2-stepper-vertical-test.e2e.js.map +1 -1
  216. package/dist/collection/components/q2-tab-container/q2-tab-container.js +1 -1
  217. package/dist/collection/components/q2-tab-container/q2-tab-container.js.map +1 -1
  218. package/dist/collection/components/q2-tab-container/test/q2-tab-container-test.e2e.js.map +1 -1
  219. package/dist/collection/components/q2-tab-container/test/q2-tab-container-test.spec.js.map +1 -1
  220. package/dist/collection/components/q2-tab-pane/q2-tab-pane.js +1 -1
  221. package/dist/collection/components/q2-tab-pane/q2-tab-pane.js.map +1 -1
  222. package/dist/collection/components/q2-tab-pane/test/q2-tab-pane-test.e2e.js.map +1 -1
  223. package/dist/collection/components/q2-tag/q2-tag.js +1 -1
  224. package/dist/collection/components/q2-tag/q2-tag.js.map +1 -1
  225. package/dist/collection/components/q2-tag/test/q2-tag-test.e2e.js +6 -1
  226. package/dist/collection/components/q2-tag/test/q2-tag-test.e2e.js.map +1 -1
  227. package/dist/collection/components/q2-textarea/q2-textarea.js +1 -1
  228. package/dist/collection/components/q2-textarea/q2-textarea.js.map +1 -1
  229. package/dist/collection/components/q2-textarea/test/q2-textarea-test.e2e.js.map +1 -1
  230. package/dist/collection/components/q2-tooltip/q2-tooltip.js.map +1 -1
  231. package/dist/collection/components/q2-tooltip/test/q2-tooltip-test.e2e.js.map +1 -1
  232. package/dist/collection/components/tecton-tab-pane/tecton-tab-pane-types.js.map +1 -1
  233. package/dist/collection/components/tecton-tab-pane/tecton-tab-pane.js +2 -2
  234. package/dist/collection/components/tecton-tab-pane/tecton-tab-pane.js.map +1 -1
  235. package/dist/collection/components/tecton-tab-pane/test/tecton-tab-pane-test.e2e.js.map +1 -1
  236. package/dist/collection/index.js.map +1 -1
  237. package/dist/collection/utils/action-sheet.js.map +1 -1
  238. package/dist/collection/utils/charting.js.map +1 -1
  239. package/dist/collection/utils/helpers.js.map +1 -1
  240. package/dist/collection/utils/index.js +37 -0
  241. package/dist/collection/utils/index.js.map +1 -1
  242. package/dist/collection/utils/sanitize-html-string.js.map +1 -1
  243. package/dist/collection/utils/sanitize-regex-string.js.map +1 -1
  244. package/dist/collection/utils/test/action-sheet-test.e2e.js.map +1 -1
  245. package/dist/collection/utils/test/index.spec.js.map +1 -1
  246. package/dist/components/index2.js +29 -17
  247. package/dist/components/index2.js.map +1 -1
  248. package/dist/components/q2-action-group.js +1 -1
  249. package/dist/components/q2-action-sheet.js +1 -1
  250. package/dist/components/q2-avatar2.js +1 -1
  251. package/dist/components/q2-carousel-pane.js +2 -2
  252. package/dist/components/q2-chart-area.js +1 -1
  253. package/dist/components/q2-chart-bar.js +1 -1
  254. package/dist/components/q2-chart-donut.js +1 -1
  255. package/dist/components/q2-currency.js +1 -1
  256. package/dist/components/q2-detail.js +1 -1
  257. package/dist/components/q2-dropdown.js +3 -1
  258. package/dist/components/q2-dropdown.js.map +1 -1
  259. package/dist/components/q2-formatted-text.js +1 -1
  260. package/dist/components/q2-input2.js +1 -1
  261. package/dist/components/q2-item.js +1 -1
  262. package/dist/components/q2-legend2.js +1 -1
  263. package/dist/components/q2-list.js +1 -1
  264. package/dist/components/q2-loc.js +1 -1
  265. package/dist/components/q2-message2.js +1 -1
  266. package/dist/components/q2-month-picker.js +2 -2
  267. package/dist/components/q2-optgroup2.js +1 -1
  268. package/dist/components/q2-option2.js +1 -1
  269. package/dist/components/q2-pagination.js +2 -2
  270. package/dist/components/q2-pill.js +1 -1
  271. package/dist/components/q2-popover2.js +77 -81
  272. package/dist/components/q2-popover2.js.map +1 -1
  273. package/dist/components/q2-relative-time.js +1 -1
  274. package/dist/components/q2-resize-observer2.js +1 -1
  275. package/dist/components/q2-section.js +2 -2
  276. package/dist/components/q2-select2.js +137 -20
  277. package/dist/components/q2-select2.js.map +1 -1
  278. package/dist/components/q2-stepper-vertical.js +1 -1
  279. package/dist/components/q2-stepper.js +1 -1
  280. package/dist/components/q2-tab-container.js +1 -1
  281. package/dist/components/q2-tab-pane.js +1 -1
  282. package/dist/components/q2-tag.js +1 -1
  283. package/dist/components/q2-textarea.js +1 -1
  284. package/dist/components/tecton-tab-pane.js +2 -2
  285. package/dist/esm/click-elsewhere_2.entry.js +77 -81
  286. package/dist/esm/click-elsewhere_2.entry.js.map +1 -1
  287. package/dist/esm/{index-844fc010.js → index-7409eb95.js} +30 -18
  288. package/dist/esm/index-7409eb95.js.map +1 -0
  289. package/dist/esm/loader.js +1 -1
  290. package/dist/esm/q2-action-group.entry.js +1 -1
  291. package/dist/esm/q2-action-sheet.entry.js +2 -2
  292. package/dist/esm/q2-avatar.entry.js +1 -1
  293. package/dist/esm/q2-badge_7.entry.js +4 -4
  294. package/dist/esm/q2-calendar.entry.js +1 -1
  295. package/dist/esm/q2-card.entry.js +1 -1
  296. package/dist/esm/q2-carousel-pane.entry.js +3 -3
  297. package/dist/esm/q2-carousel.entry.js +1 -1
  298. package/dist/esm/q2-chart-area.entry.js +2 -2
  299. package/dist/esm/q2-chart-bar.entry.js +2 -2
  300. package/dist/esm/q2-chart-donut.entry.js +2 -2
  301. package/dist/esm/q2-checkbox-group.entry.js +1 -1
  302. package/dist/esm/q2-checkbox.entry.js +1 -1
  303. package/dist/esm/q2-currency.entry.js +1 -1
  304. package/dist/esm/q2-data-table.entry.js +1 -1
  305. package/dist/esm/q2-detail.entry.js +2 -2
  306. package/dist/esm/q2-dropdown-item.entry.js +1 -1
  307. package/dist/esm/q2-dropdown.entry.js +4 -2
  308. package/dist/esm/q2-dropdown.entry.js.map +1 -1
  309. package/dist/esm/q2-editable-field.entry.js +1 -1
  310. package/dist/esm/q2-formatted-text.entry.js +1 -1
  311. package/dist/esm/q2-item.entry.js +2 -2
  312. package/dist/esm/q2-legend.entry.js +1 -1
  313. package/dist/esm/q2-list.entry.js +2 -2
  314. package/dist/esm/q2-loc.entry.js +2 -2
  315. package/dist/esm/q2-message.entry.js +2 -2
  316. package/dist/esm/q2-month-picker.entry.js +3 -3
  317. package/dist/esm/q2-optgroup.entry.js +2 -2
  318. package/dist/esm/q2-option-list.entry.js +1 -1
  319. package/dist/esm/q2-option.entry.js +1 -1
  320. package/dist/esm/q2-pagination.entry.js +3 -3
  321. package/dist/esm/q2-pill.entry.js +2 -2
  322. package/dist/esm/q2-radio-group.entry.js +1 -1
  323. package/dist/esm/q2-radio.entry.js +1 -1
  324. package/dist/esm/q2-relative-time.entry.js +2 -2
  325. package/dist/esm/q2-resize-observer.entry.js +1 -1
  326. package/dist/esm/q2-section.entry.js +3 -3
  327. package/dist/esm/q2-select.entry.js +135 -18
  328. package/dist/esm/q2-select.entry.js.map +1 -1
  329. package/dist/esm/q2-stepper-pane.entry.js +1 -1
  330. package/dist/esm/q2-stepper-vertical.entry.js +2 -2
  331. package/dist/esm/q2-stepper.entry.js +2 -2
  332. package/dist/esm/q2-tag.entry.js +2 -2
  333. package/dist/esm/q2-tecton-elements.js +1 -1
  334. package/dist/esm/q2-textarea.entry.js +2 -2
  335. package/dist/esm/q2-tooltip.entry.js +1 -1
  336. package/dist/esm/tecton-tab-pane.entry.js +2 -2
  337. package/dist/jest.setup.js +33 -0
  338. package/dist/jest.setup.js.map +1 -0
  339. package/dist/q2-tecton-elements/p-011a8cb6.js +2 -0
  340. package/dist/{esm/index-844fc010.js.map → q2-tecton-elements/p-011a8cb6.js.map} +1 -1
  341. package/dist/q2-tecton-elements/p-0ab7d3d3.entry.js +2 -0
  342. package/dist/q2-tecton-elements/p-0ab7d3d3.entry.js.map +1 -0
  343. package/dist/q2-tecton-elements/{p-b7de110e.entry.js → p-0b56edea.entry.js} +2 -2
  344. package/dist/q2-tecton-elements/p-11f9deb7.entry.js +2 -0
  345. package/dist/q2-tecton-elements/p-11f9deb7.entry.js.map +1 -0
  346. package/dist/q2-tecton-elements/{p-81fbe718.entry.js → p-12286a4c.entry.js} +2 -2
  347. package/dist/q2-tecton-elements/{p-7c9a0122.entry.js → p-127e2513.entry.js} +2 -2
  348. package/dist/q2-tecton-elements/{p-7c9f8b62.entry.js → p-15383dc8.entry.js} +2 -2
  349. package/dist/q2-tecton-elements/{p-0d50ee56.entry.js → p-2bc82b46.entry.js} +2 -2
  350. package/dist/q2-tecton-elements/{p-f5f23659.entry.js → p-33f52a11.entry.js} +2 -2
  351. package/dist/q2-tecton-elements/{p-a47597dd.entry.js → p-385e6ae1.entry.js} +2 -2
  352. package/dist/q2-tecton-elements/{p-e0ae03c0.entry.js → p-45dc2aab.entry.js} +2 -2
  353. package/dist/q2-tecton-elements/{p-07d1c3ae.entry.js → p-4e4aa30e.entry.js} +2 -2
  354. package/dist/q2-tecton-elements/{p-16910682.entry.js → p-4ecad44e.entry.js} +2 -2
  355. package/dist/q2-tecton-elements/{p-7aef0c08.entry.js → p-4f77b52f.entry.js} +2 -2
  356. package/dist/q2-tecton-elements/{p-20a3d6ed.entry.js → p-5178f2cb.entry.js} +2 -2
  357. package/dist/q2-tecton-elements/{p-188eb162.entry.js → p-52af46d1.entry.js} +3 -3
  358. package/dist/q2-tecton-elements/{p-1c88d057.entry.js → p-5488af98.entry.js} +2 -2
  359. package/dist/q2-tecton-elements/{p-1c760a89.entry.js → p-5706de19.entry.js} +2 -2
  360. package/dist/q2-tecton-elements/{p-8d2b02e1.entry.js → p-5c71d589.entry.js} +2 -2
  361. package/dist/q2-tecton-elements/{p-e216ef3f.entry.js → p-5d809a5d.entry.js} +2 -2
  362. package/dist/q2-tecton-elements/{p-ac6aa392.entry.js → p-6214e9c0.entry.js} +2 -2
  363. package/dist/q2-tecton-elements/{p-3e428290.entry.js → p-6c190e64.entry.js} +2 -2
  364. package/dist/q2-tecton-elements/{p-06701928.entry.js → p-734efa4a.entry.js} +2 -2
  365. package/dist/q2-tecton-elements/{p-490ef8e5.entry.js → p-77de2770.entry.js} +2 -2
  366. package/dist/q2-tecton-elements/{p-4e10550d.entry.js → p-7823fd55.entry.js} +2 -2
  367. package/dist/q2-tecton-elements/{p-c5667d5d.entry.js → p-7c48cd76.entry.js} +2 -2
  368. package/dist/q2-tecton-elements/{p-7903cd15.entry.js → p-8d130707.entry.js} +2 -2
  369. package/dist/q2-tecton-elements/{p-7906f49e.entry.js → p-96bc1deb.entry.js} +2 -2
  370. package/dist/q2-tecton-elements/{p-5637c486.entry.js → p-998d2b5e.entry.js} +2 -2
  371. package/dist/q2-tecton-elements/{p-ad057d10.entry.js → p-9aadc2e6.entry.js} +2 -2
  372. package/dist/q2-tecton-elements/{p-e2c800ef.entry.js → p-9e8e33e4.entry.js} +2 -2
  373. package/dist/q2-tecton-elements/{p-c235ab3f.entry.js → p-a746e0d1.entry.js} +2 -2
  374. package/dist/q2-tecton-elements/{p-50f7328f.entry.js → p-b4f2418c.entry.js} +2 -2
  375. package/dist/q2-tecton-elements/{p-5f99a4a8.entry.js → p-bcc27542.entry.js} +2 -2
  376. package/dist/q2-tecton-elements/{p-5a834214.entry.js → p-bd9559b6.entry.js} +2 -2
  377. package/dist/q2-tecton-elements/{p-2733583e.entry.js → p-c324d1c8.entry.js} +2 -2
  378. package/dist/q2-tecton-elements/{p-b1784be3.entry.js → p-c5fa02eb.entry.js} +2 -2
  379. package/dist/q2-tecton-elements/{p-96b1406c.entry.js → p-d326261a.entry.js} +2 -2
  380. package/dist/q2-tecton-elements/{p-8d07cf91.entry.js → p-dd00b967.entry.js} +2 -2
  381. package/dist/q2-tecton-elements/p-ddada899.entry.js +2 -0
  382. package/dist/q2-tecton-elements/{p-1f0b9209.entry.js.map → p-ddada899.entry.js.map} +1 -1
  383. package/dist/q2-tecton-elements/{p-4774e5b3.entry.js → p-e0a617fd.entry.js} +2 -2
  384. package/dist/q2-tecton-elements/{p-ff8f1a32.entry.js → p-ebc71f10.entry.js} +2 -2
  385. package/dist/q2-tecton-elements/{p-a5d0e252.entry.js → p-eef77a94.entry.js} +2 -2
  386. package/dist/q2-tecton-elements/{p-fff01dc1.entry.js → p-f3101416.entry.js} +2 -2
  387. package/dist/q2-tecton-elements/{p-95a7c042.entry.js → p-fdde906e.entry.js} +2 -2
  388. package/dist/q2-tecton-elements/{p-61d68630.entry.js → p-fdf71eb1.entry.js} +2 -2
  389. package/dist/q2-tecton-elements/q2-tecton-elements.esm.js +1 -1
  390. package/dist/q2-tecton-elements/q2-tecton-elements.esm.js.map +1 -1
  391. package/dist/types/builds/q2e/development/tecton/tecton/packages/q2-tecton-elements/.stencil/jest.setup.d.ts +10 -0
  392. package/dist/types/components/q2-popover/q2-popover.d.ts +4 -5
  393. package/dist/types/components/q2-select/q2-select.d.ts +23 -0
  394. package/dist/types/utils/index.d.ts +3 -0
  395. package/package.json +3 -3
  396. package/dist/cjs/index-9aa4a776.js.map +0 -1
  397. package/dist/q2-tecton-elements/p-15ac45d6.js +0 -2
  398. package/dist/q2-tecton-elements/p-15ac45d6.js.map +0 -1
  399. package/dist/q2-tecton-elements/p-1f0b9209.entry.js +0 -2
  400. package/dist/q2-tecton-elements/p-56df21b0.entry.js +0 -2
  401. package/dist/q2-tecton-elements/p-56df21b0.entry.js.map +0 -1
  402. package/dist/q2-tecton-elements/p-6f5b7571.entry.js +0 -2
  403. package/dist/q2-tecton-elements/p-6f5b7571.entry.js.map +0 -1
  404. /package/dist/q2-tecton-elements/{p-b7de110e.entry.js.map → p-0b56edea.entry.js.map} +0 -0
  405. /package/dist/q2-tecton-elements/{p-81fbe718.entry.js.map → p-12286a4c.entry.js.map} +0 -0
  406. /package/dist/q2-tecton-elements/{p-7c9a0122.entry.js.map → p-127e2513.entry.js.map} +0 -0
  407. /package/dist/q2-tecton-elements/{p-7c9f8b62.entry.js.map → p-15383dc8.entry.js.map} +0 -0
  408. /package/dist/q2-tecton-elements/{p-0d50ee56.entry.js.map → p-2bc82b46.entry.js.map} +0 -0
  409. /package/dist/q2-tecton-elements/{p-f5f23659.entry.js.map → p-33f52a11.entry.js.map} +0 -0
  410. /package/dist/q2-tecton-elements/{p-a47597dd.entry.js.map → p-385e6ae1.entry.js.map} +0 -0
  411. /package/dist/q2-tecton-elements/{p-e0ae03c0.entry.js.map → p-45dc2aab.entry.js.map} +0 -0
  412. /package/dist/q2-tecton-elements/{p-07d1c3ae.entry.js.map → p-4e4aa30e.entry.js.map} +0 -0
  413. /package/dist/q2-tecton-elements/{p-16910682.entry.js.map → p-4ecad44e.entry.js.map} +0 -0
  414. /package/dist/q2-tecton-elements/{p-7aef0c08.entry.js.map → p-4f77b52f.entry.js.map} +0 -0
  415. /package/dist/q2-tecton-elements/{p-20a3d6ed.entry.js.map → p-5178f2cb.entry.js.map} +0 -0
  416. /package/dist/q2-tecton-elements/{p-188eb162.entry.js.map → p-52af46d1.entry.js.map} +0 -0
  417. /package/dist/q2-tecton-elements/{p-1c88d057.entry.js.map → p-5488af98.entry.js.map} +0 -0
  418. /package/dist/q2-tecton-elements/{p-1c760a89.entry.js.map → p-5706de19.entry.js.map} +0 -0
  419. /package/dist/q2-tecton-elements/{p-8d2b02e1.entry.js.map → p-5c71d589.entry.js.map} +0 -0
  420. /package/dist/q2-tecton-elements/{p-e216ef3f.entry.js.map → p-5d809a5d.entry.js.map} +0 -0
  421. /package/dist/q2-tecton-elements/{p-ac6aa392.entry.js.map → p-6214e9c0.entry.js.map} +0 -0
  422. /package/dist/q2-tecton-elements/{p-3e428290.entry.js.map → p-6c190e64.entry.js.map} +0 -0
  423. /package/dist/q2-tecton-elements/{p-06701928.entry.js.map → p-734efa4a.entry.js.map} +0 -0
  424. /package/dist/q2-tecton-elements/{p-490ef8e5.entry.js.map → p-77de2770.entry.js.map} +0 -0
  425. /package/dist/q2-tecton-elements/{p-4e10550d.entry.js.map → p-7823fd55.entry.js.map} +0 -0
  426. /package/dist/q2-tecton-elements/{p-c5667d5d.entry.js.map → p-7c48cd76.entry.js.map} +0 -0
  427. /package/dist/q2-tecton-elements/{p-7903cd15.entry.js.map → p-8d130707.entry.js.map} +0 -0
  428. /package/dist/q2-tecton-elements/{p-7906f49e.entry.js.map → p-96bc1deb.entry.js.map} +0 -0
  429. /package/dist/q2-tecton-elements/{p-5637c486.entry.js.map → p-998d2b5e.entry.js.map} +0 -0
  430. /package/dist/q2-tecton-elements/{p-ad057d10.entry.js.map → p-9aadc2e6.entry.js.map} +0 -0
  431. /package/dist/q2-tecton-elements/{p-e2c800ef.entry.js.map → p-9e8e33e4.entry.js.map} +0 -0
  432. /package/dist/q2-tecton-elements/{p-c235ab3f.entry.js.map → p-a746e0d1.entry.js.map} +0 -0
  433. /package/dist/q2-tecton-elements/{p-50f7328f.entry.js.map → p-b4f2418c.entry.js.map} +0 -0
  434. /package/dist/q2-tecton-elements/{p-5f99a4a8.entry.js.map → p-bcc27542.entry.js.map} +0 -0
  435. /package/dist/q2-tecton-elements/{p-5a834214.entry.js.map → p-bd9559b6.entry.js.map} +0 -0
  436. /package/dist/q2-tecton-elements/{p-2733583e.entry.js.map → p-c324d1c8.entry.js.map} +0 -0
  437. /package/dist/q2-tecton-elements/{p-b1784be3.entry.js.map → p-c5fa02eb.entry.js.map} +0 -0
  438. /package/dist/q2-tecton-elements/{p-96b1406c.entry.js.map → p-d326261a.entry.js.map} +0 -0
  439. /package/dist/q2-tecton-elements/{p-8d07cf91.entry.js.map → p-dd00b967.entry.js.map} +0 -0
  440. /package/dist/q2-tecton-elements/{p-4774e5b3.entry.js.map → p-e0a617fd.entry.js.map} +0 -0
  441. /package/dist/q2-tecton-elements/{p-ff8f1a32.entry.js.map → p-ebc71f10.entry.js.map} +0 -0
  442. /package/dist/q2-tecton-elements/{p-a5d0e252.entry.js.map → p-eef77a94.entry.js.map} +0 -0
  443. /package/dist/q2-tecton-elements/{p-fff01dc1.entry.js.map → p-f3101416.entry.js.map} +0 -0
  444. /package/dist/q2-tecton-elements/{p-95a7c042.entry.js.map → p-fdde906e.entry.js.map} +0 -0
  445. /package/dist/q2-tecton-elements/{p-61d68630.entry.js.map → p-fdf71eb1.entry.js.map} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAgBlC,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAsD,EAAK,EAAE,QAAgB,GAAG,EAAE,EAAE;IACxG,IAAI,OAAsC,CAAC;IAC3C,OAAO,UAAU,GAAG,IAAmB;QACnC,YAAY,CAAC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AY,GAAG,GAAG,EAAE;;IAC7B,OAAO,MAAA,MAAA,MAAM,CAAC,cAAc,0CAAE,YAAY,kDAAI,CAAC;AACnD,CAAC,CAAC;AAEF,wCAAwC;AACxC,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,MAAa,EAAE,EAAE;IACzC,IAAI,CAAC,MAAM,CAAC,MAAM,IAAI,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC;QACpE,MAAM,CAAC,MAAM,GAAG,YAAY,MAAM,CAAC,KAAK,EAAgC,CAAC;QACzE,MAAM,CAAC,KAAK,GAAG,SAAS,CAAC;IAC7B,CAAC;AACL,CAAC,CAAC","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"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/utils/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAgBlC,MAAM,CAAC,MAAM,QAAQ,GAAG,C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,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;YACxC,gBAAgB,CAAC,KAAK,CAAC,WAAW,CAAC,QAAQ,EAAE,GAAG,MAAM,IAAI,CAAC,CAAC;QAChE,CAAC;IACL,CAAC,CAAC,CAAC;AACP,CAAC;AAED,MAAM,CAAC,MAAM,YAAY,GAAG,GAAG,EAAE;;IAC7B,OAAO,MAAA,MAAA,MAAM,CAAC,cAAc,0CAAE,YAAY,kDAAI,CAAC;AACnD,CAAC,CAAC;AAEF,wCAAwC;AACxC,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,MAAa,EAAE,EAAE;IACzC,IAAI,CAAC,MAAM,CAAC,MAAM,IAAI,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC;QACpE,MAAM,CAAC,MAAM,GAAG,YAAY,MAAM,CAAC,KAAK,EAAgC,CAAC;QACzE,MAAM,CAAC,KAAK,GAAG,SAAS,CAAC;IAC7B,CAAC;AACL,CAAC,CAAC","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 isAndroid(): boolean {\n return /Android/i.test(navigator.userAgent);\n}\n\nexport function isIOS(): boolean {\n return /iPad|iPhone|iPod/.test(navigator.userAgent);\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 isInScrollableContainer(element) {\n let current = element;\n\n while (current && current !== document.body && current !== document.documentElement) {\n // Move to parent\n if (current.parentElement) {\n current = current.parentElement;\n } else {\n // Try to cross shadow DOM boundary\n const root = current.getRootNode();\n if (root && root.host) {\n current = root.host;\n } else {\n break;\n }\n }\n\n const style = window.getComputedStyle(current);\n const hasScrollableOverflow =\n style.overflow === 'scroll' ||\n style.overflow === 'auto' ||\n style.overflowX === 'scroll' ||\n style.overflowX === 'auto' ||\n style.overflowY === 'scroll' ||\n style.overflowY === 'auto';\n\n const hasOverflowingContent =\n current.scrollHeight > current.clientHeight || current.scrollWidth > current.clientWidth;\n\n if (hasScrollableOverflow && hasOverflowingContent) {\n return true;\n }\n }\n\n return false;\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"]}
@@ -1 +1 @@
1
- {"version":3,"file":"sanitize-html-string.js","sourceRoot":"","sources":["../../src/utils/sanitize-html-string.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,UAAkB;IACzD,OAAO,SAAS,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,UAAU,EAAE;QAC1C,WAAW,EAAE,CAAC,OAAO,CAAC;QACtB,uBAAuB,EAAE;YACrB,YAAY,EAAE,MAAM;SACvB;KACJ,CAAC,CAAC;AACP,CAAC","sourcesContent":["import DOMPurify from 'dompurify';\n\nexport default function sanitizeHTMLString(htmlString: string) {\n return DOMPurify(window).sanitize(htmlString, {\n FORBID_TAGS: ['style'],\n CUSTOM_ELEMENT_HANDLING: {\n tagNameCheck: /^q2-/,\n },\n });\n}\n"]}
1
+ {"version":3,"file":"sanitize-html-string.js","sourceRoot":"","sources":["../../../src/utils/sanitize-html-string.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,UAAkB;IACzD,OAAO,SAAS,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,UAAU,EAAE;QAC1C,WAAW,EAAE,CAAC,OAAO,CAAC;QACtB,uBAAuB,EAAE;YACrB,YAAY,EAAE,MAAM;SACvB;KACJ,CAAC,CAAC;AACP,CAAC","sourcesContent":["import DOMPurify from 'dompurify';\n\nexport default function sanitizeHTMLString(htmlString: string) {\n return DOMPurify(window).sanitize(htmlString, {\n FORBID_TAGS: ['style'],\n CUSTOM_ELEMENT_HANDLING: {\n tagNameCheck: /^q2-/,\n },\n });\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"sanitize-regex-string.js","sourceRoot":"","sources":["../../src/utils/sanitize-regex-string.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAC,WAAmB;IAC3D,OAAO,WAAW,CAAC,OAAO,CAAC,qBAAqB,EAAE,MAAM,CAAC,CAAC;AAC9D,CAAC","sourcesContent":["export default function sanitizeRegexString(regexString: string) {\n return regexString.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n}\n"]}
1
+ {"version":3,"file":"sanitize-regex-string.js","sourceRoot":"","sources":["../../../src/utils/sanitize-regex-string.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAC,WAAmB;IAC3D,OAAO,WAAW,CAAC,OAAO,CAAC,qBAAqB,EAAE,MAAM,CAAC,CAAC;AAC9D,CAAC","sourcesContent":["export default function sanitizeRegexString(regexString: string) {\n return regexString.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"action-sheet-test.e2e.js","sourceRoot":"","sources":["../../../src/utils/test/action-sheet-test.e2e.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,aAAa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e,EAAE,EAAE;aACtB,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,iCAAiC,EAAE,KAAK,IAAI,EAAE;YAC7C,MAAM,MAAM,GAAG,MAAM,aAAa,CAAC;gBAC/B,UAAU,EAAE;oBACR,QAAQ,EAAE,IAAI;oBACd,WAAW,EAAE,KAAK,IAAI,EAAE,CAAC,EAAE;iBACH;gBAC5B,KAAK,EAAE,EAAE;aACZ,CAAC,CAAC;YAEH,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,OAAO,CAAC;gBAC7B,QAAQ,EAAE,KAAK;gBACf,QAAQ,EAAE,IAAI;gBACd,eAAe,EAAE,EAAE;aACtB,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,wCAAwC,EAAE,KAAK,IAAI,EAAE;YACpD,MAAM,MAAM,GAAG,MAAM,aAAa,CAAC;gBAC/B,UAAU,EAAE;oBACR,eAAe,EAAE,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC;oBAC7D,WAAW,EAAE,KAAK,IAAI,EAAE,CAAC,EAAE;iBACH;gBAC5B,KAAK,EAAE,EAAE;aACZ,CAAC,CAAC;YAEH,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,OAAO,CAAC;gBAC7B,QAAQ,EAAE,KAAK;gBACf,QAAQ,EAAE,KAAK;gBACf,eAAe,EAAE,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC;aAChE,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC","sourcesContent":["import { ActionSheetListOptgroup } from 'q2-tecton-common/lib/utility/action-sheet';\nimport { shouldShowActionSheet, buildListData } from '../action-sheet';\n\ndescribe('utils: action-sheet', () => {\n describe('shouldShowActionSheet', () => {\n const defineShowActionSheet = () => {\n (window as any).TectonElements = {\n showActionSheet: async () => ({\n selectedOptions: [],\n type: 'confirm',\n }),\n };\n };\n const originalCreateElement = document.createElement;\n const setDialogCompatibility = (enabled: boolean) => {\n document.createElement = jest.fn().mockImplementation(tagName => {\n return tagName === 'dialog' && enabled ? { open: true } : {};\n });\n };\n const newKeyboardEvent = (key: string) => new KeyboardEvent('keydown', { key });\n\n describe(\"when component's hoist prop is true\", () => {\n afterEach(() => {\n document.createElement = originalCreateElement;\n });\n\n it('returns false when dialog is not supported', async () => {\n setDialogCompatibility(false);\n expect(shouldShowActionSheet({ hoist: true })).toBe(false);\n });\n\n describe('when dialog is supported', () => {\n beforeEach(() => {\n setDialogCompatibility(true);\n });\n\n it('returns false when showActionSheet is undefined', async () => {\n expect(shouldShowActionSheet({ hoist: true })).toBe(false);\n });\n\n describe('when showActionSheet is defined', () => {\n beforeEach(() => {\n defineShowActionSheet();\n });\n\n it('returns true', async () => {\n expect(shouldShowActionSheet({ hoist: true })).toBe(true);\n });\n\n describe('when event is defined', () => {\n describe('when event is a KeyboardEvent', () => {\n it('returns true on ArrowDown', async () => {\n expect(shouldShowActionSheet({ hoist: true }, newKeyboardEvent('ArrowDown'))).toBe(\n true\n );\n });\n\n it('returns false on the letter \"S\"', async () => {\n expect(shouldShowActionSheet({ hoist: true }, newKeyboardEvent('S'))).toBe(false);\n });\n });\n\n describe('when event is a MouseEvent', () => {\n it(\"returns true when event's type is click\", async () => {\n expect(shouldShowActionSheet({ hoist: true }, new MouseEvent('click'))).toBe(true);\n });\n it(\"returns false when event's type is mousedown\", async () => {\n expect(shouldShowActionSheet({ hoist: true }, new MouseEvent('mousedown'))).toBe(false);\n });\n });\n });\n });\n });\n });\n });\n describe('buildListData', () => {\n beforeEach(() => {\n document.body.innerHTML = `\n <q2-option value=\"option-1\">Option 1</q2-option>\n <q2-option value=\"option-2\">Option 2</q2-option>\n <q2-option value=\"option-3\">Option 3</q2-option>\n <q2-option value=\"option-4\">Option 4</q2-option>\n `;\n });\n afterEach(() => {\n document.body.innerHTML = '';\n });\n\n it('serializes basic options', async () => {\n const result = await buildListData({\n optionList: {\n getContents: async () => Array.from(document.body.children),\n } as HTMLQ2OptionListElement,\n label: 'Test',\n });\n\n expect(result.title).toEqual('Test');\n expect(result.options).toHaveLength(4);\n expect(result.listProps).toEqual({\n multiple: false,\n noSelect: false,\n selectedOptions: [],\n });\n });\n\n it('serializes groups of options', async () => {\n document.body.innerHTML = `\n <q2-optgroup label=\"Group 1\">\n <q2-option value=\"option-1\">Option 1</q2-option>\n <q2-option value=\"option-2\">Option 2</q2-option>\n <q2-option value=\"option-3\">Option 3</q2-option>\n </q2-optgroup>\n <q2-optgroup label=\"Group 2\">\n <q2-option value=\"option-4\">Option 4</q2-option>\n </q2-optgroup>\n `;\n const result = await buildListData({\n optionList: {\n getContents: async () => Array.from(document.body.children),\n } as HTMLQ2OptionListElement,\n label: '',\n });\n\n expect(result.options).toHaveLength(2);\n expect((result.options[0] as ActionSheetListOptgroup).options).toHaveLength(3);\n expect((result.options[1] as ActionSheetListOptgroup).options).toHaveLength(1);\n });\n\n it('sets listProps.multiple to true', async () => {\n const result = await buildListData({\n optionList: {\n multiple: true,\n getContents: async () => [],\n } as HTMLQ2OptionListElement,\n label: '',\n });\n\n expect(result.listProps).toEqual({\n multiple: true,\n noSelect: false,\n selectedOptions: [],\n });\n });\n\n it('sets listProps.noSelect to true', async () => {\n const result = await buildListData({\n optionList: {\n noSelect: true,\n getContents: async () => [],\n } as HTMLQ2OptionListElement,\n label: '',\n });\n\n expect(result.listProps).toEqual({\n multiple: false,\n noSelect: true,\n selectedOptions: [],\n });\n });\n\n it('sets listProps.selectedOptions to true', async () => {\n const result = await buildListData({\n optionList: {\n selectedOptions: [{ value: 'option-1', display: 'Option 1' }],\n getContents: async () => [],\n } as HTMLQ2OptionListElement,\n label: '',\n });\n\n expect(result.listProps).toEqual({\n multiple: false,\n noSelect: false,\n selectedOptions: [{ value: 'option-1', display: 'Option 1' }],\n });\n });\n });\n});\n"]}
1
+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sheet';\nimport { shouldShowActionSheet, buildListData } from '../action-sheet';\n\ndescribe('utils: action-sheet', () => {\n describe('shouldShowActionSheet', () => {\n const defineShowActionSheet = () => {\n (window as any).TectonElements = {\n showActionSheet: async () => ({\n selectedOptions: [],\n type: 'confirm',\n }),\n };\n };\n const originalCreateElement = document.createElement;\n const setDialogCompatibility = (enabled: boolean) => {\n document.createElement = jest.fn().mockImplementation(tagName => {\n return tagName === 'dialog' && enabled ? { open: true } : {};\n });\n };\n const newKeyboardEvent = (key: string) => new KeyboardEvent('keydown', { key });\n\n describe(\"when component's hoist prop is true\", () => {\n afterEach(() => {\n document.createElement = originalCreateElement;\n });\n\n it('returns false when dialog is not supported', async () => {\n setDialogCompatibility(false);\n expect(shouldShowActionSheet({ hoist: true })).toBe(false);\n });\n\n describe('when dialog is supported', () => {\n beforeEach(() => {\n setDialogCompatibility(true);\n });\n\n it('returns false when showActionSheet is undefined', async () => {\n expect(shouldShowActionSheet({ hoist: true })).toBe(false);\n });\n\n describe('when showActionSheet is defined', () => {\n beforeEach(() => {\n defineShowActionSheet();\n });\n\n it('returns true', async () => {\n expect(shouldShowActionSheet({ hoist: true })).toBe(true);\n });\n\n describe('when event is defined', () => {\n describe('when event is a KeyboardEvent', () => {\n it('returns true on ArrowDown', async () => {\n expect(shouldShowActionSheet({ hoist: true }, newKeyboardEvent('ArrowDown'))).toBe(\n true\n );\n });\n\n it('returns false on the letter \"S\"', async () => {\n expect(shouldShowActionSheet({ hoist: true }, newKeyboardEvent('S'))).toBe(false);\n });\n });\n\n describe('when event is a MouseEvent', () => {\n it(\"returns true when event's type is click\", async () => {\n expect(shouldShowActionSheet({ hoist: true }, new MouseEvent('click'))).toBe(true);\n });\n it(\"returns false when event's type is mousedown\", async () => {\n expect(shouldShowActionSheet({ hoist: true }, new MouseEvent('mousedown'))).toBe(false);\n });\n });\n });\n });\n });\n });\n });\n describe('buildListData', () => {\n beforeEach(() => {\n document.body.innerHTML = `\n <q2-option value=\"option-1\">Option 1</q2-option>\n <q2-option value=\"option-2\">Option 2</q2-option>\n <q2-option value=\"option-3\">Option 3</q2-option>\n <q2-option value=\"option-4\">Option 4</q2-option>\n `;\n });\n afterEach(() => {\n document.body.innerHTML = '';\n });\n\n it('serializes basic options', async () => {\n const result = await buildListData({\n optionList: {\n getContents: async () => Array.from(document.body.children),\n } as HTMLQ2OptionListElement,\n label: 'Test',\n });\n\n expect(result.title).toEqual('Test');\n expect(result.options).toHaveLength(4);\n expect(result.listProps).toEqual({\n multiple: false,\n noSelect: false,\n selectedOptions: [],\n });\n });\n\n it('serializes groups of options', async () => {\n document.body.innerHTML = `\n <q2-optgroup label=\"Group 1\">\n <q2-option value=\"option-1\">Option 1</q2-option>\n <q2-option value=\"option-2\">Option 2</q2-option>\n <q2-option value=\"option-3\">Option 3</q2-option>\n </q2-optgroup>\n <q2-optgroup label=\"Group 2\">\n <q2-option value=\"option-4\">Option 4</q2-option>\n </q2-optgroup>\n `;\n const result = await buildListData({\n optionList: {\n getContents: async () => Array.from(document.body.children),\n } as HTMLQ2OptionListElement,\n label: '',\n });\n\n expect(result.options).toHaveLength(2);\n expect((result.options[0] as ActionSheetListOptgroup).options).toHaveLength(3);\n expect((result.options[1] as ActionSheetListOptgroup).options).toHaveLength(1);\n });\n\n it('sets listProps.multiple to true', async () => {\n const result = await buildListData({\n optionList: {\n multiple: true,\n getContents: async () => [],\n } as HTMLQ2OptionListElement,\n label: '',\n });\n\n expect(result.listProps).toEqual({\n multiple: true,\n noSelect: false,\n selectedOptions: [],\n });\n });\n\n it('sets listProps.noSelect to true', async () => {\n const result = await buildListData({\n optionList: {\n noSelect: true,\n getContents: async () => [],\n } as HTMLQ2OptionListElement,\n label: '',\n });\n\n expect(result.listProps).toEqual({\n multiple: false,\n noSelect: true,\n selectedOptions: [],\n });\n });\n\n it('sets listProps.selectedOptions to true', async () => {\n const result = await buildListData({\n optionList: {\n selectedOptions: [{ value: 'option-1', display: 'Option 1' }],\n getContents: async () => [],\n } as HTMLQ2OptionListElement,\n label: '',\n });\n\n expect(result.listProps).toEqual({\n multiple: false,\n noSelect: false,\n selectedOptions: [{ value: 'option-1', display: 'Option 1' }],\n });\n });\n });\n});\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.spec.js","sourceRoot":"","sources":["../../../src/utils/test/index.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAEhD,QAAQ,CAAC,eAAe,EAAE,GAAG,EAAE;IAC3B,QAAQ,CAAC,sBAAsB,EAAE,GAAG,EAAE;QAClC,EAAE,CAAC,gDAAgD,EAAE,GAAG,EAAE;YACtD,MAAM,CAAC,oBAAoB,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;QAC/D,CAAC,CAAC,CAAC;QACH,EAAE,CAAC,qFAAqF,EAAE,GAAG,EAAE;YAC3F,MAAM,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QACzD,CAAC,CAAC,CAAC;QACH,EAAE,CAAC,sFAAsF,EAAE,GAAG,EAAE;YAC5F,MAAM,CAAC,oBAAoB,CAAC,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;QAChE,CAAC,CAAC,CAAC;QACH,EAAE,CAAC,iDAAiD,EAAE,GAAG,EAAE;YACvD,MAAM,CAAC,oBAAoB,CAAC,MAAM,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QAC5E,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC","sourcesContent":["import { getAriaValueFromProp } from '../index';\n\ndescribe('General Utils', () => {\n describe('getAriaValueFromProp', () => {\n it('return `undefined` value when `prop` undefined', () => {\n expect(getAriaValueFromProp(undefined)).toEqual(undefined);\n });\n it('return `prop` value when `validValues` undefined and `prop` not equal to \"Symbol()\"', () => {\n expect(getAriaValueFromProp('test')).toEqual('test');\n });\n it('return `undefined` value when `validValues` undefined and `prop` equal to \"Symbol()\"', () => {\n expect(getAriaValueFromProp('Symbol()')).toEqual(undefined);\n });\n it('return `prop` value when in `validValues` array', () => {\n expect(getAriaValueFromProp('test', ['test', 'test2'])).toEqual('test');\n });\n });\n});\n"]}
1
+ {"version":3,"file":"index.spec.js","sourceRoot":"","sources":["../../../../src/utils/test/index.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAEhD,QAAQ,CAAC,eAAe,EAAE,GAAG,EAAE;IAC3B,QAAQ,CAAC,sBAAsB,EAAE,GAAG,EAAE;QAClC,EAAE,CAAC,gDAAgD,EAAE,GAAG,EAAE;YACtD,MAAM,CAAC,oBAAoB,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;QAC/D,CAAC,CAAC,CAAC;QACH,EAAE,CAAC,qFAAqF,EAAE,GAAG,EAAE;YAC3F,MAAM,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QACzD,CAAC,CAAC,CAAC;QACH,EAAE,CAAC,sFAAsF,EAAE,GAAG,EAAE;YAC5F,MAAM,CAAC,oBAAoB,CAAC,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;QAChE,CAAC,CAAC,CAAC;QACH,EAAE,CAAC,iDAAiD,EAAE,GAAG,EAAE;YACvD,MAAM,CAAC,oBAAoB,CAAC,MAAM,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QAC5E,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC","sourcesContent":["import { getAriaValueFromProp } from '../index';\n\ndescribe('General Utils', () => {\n describe('getAriaValueFromProp', () => {\n it('return `undefined` value when `prop` undefined', () => {\n expect(getAriaValueFromProp(undefined)).toEqual(undefined);\n });\n it('return `prop` value when `validValues` undefined and `prop` not equal to \"Symbol()\"', () => {\n expect(getAriaValueFromProp('test')).toEqual('test');\n });\n it('return `undefined` value when `validValues` undefined and `prop` equal to \"Symbol()\"', () => {\n expect(getAriaValueFromProp('Symbol()')).toEqual(undefined);\n });\n it('return `prop` value when in `validValues` array', () => {\n expect(getAriaValueFromProp('test', ['test', 'test2'])).toEqual('test');\n });\n });\n});\n"]}
@@ -12,24 +12,36 @@ const debounce = (fn, delay = 300) => {
12
12
  function isMobile() {
13
13
  return /Android|webOS|iPhone|iPad|iPod|BlackBerry|Mobile|IEMobile|Windows Phone|Opera Mini/i.test(navigator.userAgent);
14
14
  }
15
- function isHostLosingFocus(event, hostElement) {
16
- const type = event.type;
17
- const focusInTypes = ['focusin', 'focus'];
18
- const isFocusIn = focusInTypes.includes(type);
19
- // on focusin: `target` is element losing focus, `relatedTarget` is element gaining focus
20
- // on focusout: `target` is element gaining focus, `relatedTarget` is element losing focus
21
- const elementGainingFocus = isFocusIn ? event.target : event.relatedTarget;
22
- const isElementNestedInHostElement = (element) => {
23
- if (element === hostElement)
15
+ function isInScrollableContainer(element) {
16
+ let current = element;
17
+ while (current && current !== document.body && current !== document.documentElement) {
18
+ // Move to parent
19
+ if (current.parentElement) {
20
+ current = current.parentElement;
21
+ }
22
+ else {
23
+ // Try to cross shadow DOM boundary
24
+ const root = current.getRootNode();
25
+ if (root && root.host) {
26
+ current = root.host;
27
+ }
28
+ else {
29
+ break;
30
+ }
31
+ }
32
+ const style = window.getComputedStyle(current);
33
+ const hasScrollableOverflow = style.overflow === 'scroll' ||
34
+ style.overflow === 'auto' ||
35
+ style.overflowX === 'scroll' ||
36
+ style.overflowX === 'auto' ||
37
+ style.overflowY === 'scroll' ||
38
+ style.overflowY === 'auto';
39
+ const hasOverflowingContent = current.scrollHeight > current.clientHeight || current.scrollWidth > current.clientWidth;
40
+ if (hasScrollableOverflow && hasOverflowingContent) {
24
41
  return true;
25
- if (element.parentElement) {
26
- return isElementNestedInHostElement(element.parentElement);
27
42
  }
28
- return false;
29
- };
30
- if (!(elementGainingFocus instanceof HTMLElement))
31
- return true;
32
- return !isElementNestedInHostElement(elementGainingFocus);
43
+ }
44
+ return false;
33
45
  }
34
46
  function isRelatedTargetWithinHost(event, element) {
35
47
  return event.relatedTarget !== element && !element.contains(event.relatedTarget);
@@ -206,6 +218,6 @@ const handleColor = (target) => {
206
218
  }
207
219
  };
208
220
 
209
- export { handleRenamedProp as a, isTouchDevice as b, createGuid as c, isMobile as d, resizeIframe as e, hasSlotContent as f, debounce as g, handleAriaLabel as h, isEventFromElement as i, renderMessages as j, handleDeprecationWarning as k, loc as l, handleColor as m, nextPaint as n, overrideFocus as o, getAriaValueFromProp as p, isFirefox as q, renderLabel as r, setMessageHeight as s, isVisible as t, isRelatedTargetWithinHost as u, isHostLosingFocus as v, waitForNextPaint as w };
221
+ export { handleRenamedProp as a, isTouchDevice as b, createGuid as c, isMobile as d, resizeIframe as e, hasSlotContent as f, debounce as g, handleAriaLabel as h, isEventFromElement as i, renderMessages as j, handleDeprecationWarning as k, loc as l, handleColor as m, nextPaint as n, overrideFocus as o, getAriaValueFromProp as p, isFirefox as q, renderLabel as r, setMessageHeight as s, isVisible as t, isInScrollableContainer as u, isRelatedTargetWithinHost as v, waitForNextPaint as w };
210
222
 
211
223
  //# sourceMappingURL=index2.js.map
@@ -1 +1 @@
1
- {"file":"index2.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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"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"],"version":3}
1
+ {"file":"index2.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;SAUc,QAAQ;IACpB,OAAO,qFAAqF,CAAC,IAAI,CAC7F,SAAS,CAAC,SAAS,CACtB,CAAC;AACN,CAAC;SAEe,uBAAuB,CAAC,OAAO;IAC3C,IAAI,OAAO,GAAG,OAAO,CAAC;IAEtB,OAAO,OAAO,IAAI,OAAO,KAAK,QAAQ,CAAC,IAAI,IAAI,OAAO,KAAK,QAAQ,CAAC,eAAe,EAAE;;QAEjF,IAAI,OAAO,CAAC,aAAa,EAAE;YACvB,OAAO,GA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L;;;;","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 isAndroid(): boolean {\n return /Android/i.test(navigator.userAgent);\n}\n\nexport function isIOS(): boolean {\n return /iPad|iPhone|iPod/.test(navigator.userAgent);\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 isInScrollableContainer(element) {\n let current = element;\n\n while (current && current !== document.body && current !== document.documentElement) {\n // Move to parent\n if (current.parentElement) {\n current = current.parentElement;\n } else {\n // Try to cross shadow DOM boundary\n const root = current.getRootNode();\n if (root && root.host) {\n current = root.host;\n } else {\n break;\n }\n }\n\n const style = window.getComputedStyle(current);\n const hasScrollableOverflow =\n style.overflow === 'scroll' ||\n style.overflow === 'auto' ||\n style.overflowX === 'scroll' ||\n style.overflowX === 'auto' ||\n style.overflowY === 'scroll' ||\n style.overflowY === 'auto';\n\n const hasOverflowingContent =\n current.scrollHeight > current.clientHeight || current.scrollWidth > current.clientWidth;\n\n if (hasScrollableOverflow && hasOverflowingContent) {\n return true;\n }\n }\n\n return false;\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"],"version":3}
@@ -39,7 +39,7 @@ const Q2BtnGroup = /*@__PURE__*/ proxyCustomElement(class Q2BtnGroup extends HTM
39
39
  if (fullWidth)
40
40
  containerClassNames.push('full-width');
41
41
  containerClassNames.push(orientation === 'auto' ? autoOrientation : orientation);
42
- return (h("q2-resize-observer", { key: 'c54581213b0dd9ec12bcf95f779c816b551a92ef', onTctResize: this.handleResize, disabled: this.orientation !== 'auto' }, h("div", { key: 'ea09d4fba28775bf9f503e69daa4e0e93b0a7723', class: containerClassNames.join(' '), role: "group" }, h("slot", { key: '0ffaa62bee644b270fecba1c97ef7119e718d376' }))));
42
+ return (h("q2-resize-observer", { key: '729af17556609d1c7277af444f5fd174d9d3c743', onTctResize: this.handleResize, disabled: this.orientation !== 'auto' }, h("div", { key: '36362c7f7839eaeb22982e39d4c7457baf1664fe', class: containerClassNames.join(' '), role: "group" }, h("slot", { key: '5f626162c40b8893fb44d66cda3ed1cbdcda60c1' }))));
43
43
  }
44
44
  static get style() { return Q2ActionGroupStyle0; }
45
45
  }, [1, "q2-action-group", {
@@ -1584,7 +1584,7 @@ const Q2ActionSheet$1 = /*@__PURE__*/ proxyCustomElement(class Q2ActionSheet ext
1584
1584
  }
1585
1585
  const appearance = (data === null || data === void 0 ? void 0 : data.appearance) || 'slot';
1586
1586
  const interiorClasses = `interior is-${appearance}`;
1587
- return (h("dialog", { key: '180f1e7bfe1230ae340fdd883fb6d9860992c034', ref: el => (this.dialogElement = el), class: renderStatus, onClick: this.onClick }, h("div", { key: 'a0e4825c839ab21c8e61747e96b2323711fd74f9', class: interiorClasses }, showHeader && (h("header", { key: '48b6b57131e5141a17eb64ce8201490690932fa0' }, h("div", { key: '780791a3a29360f68313e9f27bae3fb4ac2a500d', class: "title" }, (data === null || data === void 0 ? void 0 : data.title) || this.title), !this.hideClose && (h("q2-btn", { key: '31fcbeb189b43175a665786cc2e484787e4eb189', class: "btn-close", "test-id": "btnClose", onClick: this.onCancel, label: "tecton.element.actionSheet.close", "hide-label": true }, h("q2-icon", { key: 'e964e15fdf8f96ca0712455fd611318896d035cc', type: "close" }))))), ((_a = this.data) === null || _a === void 0 ? void 0 : _a.description) && h("p", { key: '869ef0bdb2118fe24ae920905fa24e708927ac53' }, data.description), RenderContent && h(RenderContent, { key: 'b0ae13c7b3114f62c4caf820bc2f9780eb1cdfbd', data: this.data }))));
1587
+ return (h("dialog", { key: '31bc3d81dcc5c9d2ae8f9aab483a409079d48c14', ref: el => (this.dialogElement = el), class: renderStatus, onClick: this.onClick }, h("div", { key: '6eb5d2e33e8611603c881fb3e186a3f572523191', class: interiorClasses }, showHeader && (h("header", { key: '10ee18c23992e8a1b44379cedad890c4b026eb01' }, h("div", { key: 'e79ce11c6d5a2f2c20370a7487414b49bb157ede', class: "title" }, (data === null || data === void 0 ? void 0 : data.title) || this.title), !this.hideClose && (h("q2-btn", { key: 'ba9fc043ed93ff5440c118c89e3bfa55b8a3b7bc', class: "btn-close", "test-id": "btnClose", onClick: this.onCancel, label: "tecton.element.actionSheet.close", "hide-label": true }, h("q2-icon", { key: '9c586be83888340642782a65a4c597b049534590', type: "close" }))))), ((_a = this.data) === null || _a === void 0 ? void 0 : _a.description) && h("p", { key: 'd6c3d454f6473c30622245cf3e7e788a59533a12' }, data.description), RenderContent && h(RenderContent, { key: '2203d396cfe8ed55720accfff34e9f1877d7e3e3', data: this.data }))));
1588
1588
  }
1589
1589
  get hostElement() { return this; }
1590
1590
  static get style() { return Q2ActionSheetStyle0; }
@@ -56,7 +56,7 @@ const Q2Avatar = /*@__PURE__*/ proxyCustomElement(class Q2Avatar extends HTMLEle
56
56
  const isLoaded = this.isLoaded;
57
57
  const showInitials = (this.name || this.initials) && (!this.src || this.badSrc);
58
58
  const showFallback = !this.name && !this.initials && (!this.src || this.badSrc);
59
- return (h("div", { key: '7ecd9ef9eefb818f07ecf991af2eb5ad0f495497' }, showImg && (h("img", { key: '11c948c15f4b848457866f0a898368d1e609944c', class: isLoaded ? 'avatar-img' : 'avatar-img-default', "test-id": "userImage", src: this.src, onError: this.onError, onLoad: this.onLoad, alt: this.name || '' })), showInitials && (h("svg", { key: '22bea8e763c06733d7d999b2784d0bcfe503c432', viewBox: "0 0 100 100", preserveAspectRatio: "xMidYMid meet", "test-id": "userInitials", class: `avatar-initials size-${computedInitials.length}`, "aria-label": this.name, "aria-hidden": !this.name && 'true' }, h("text", { key: 'aa9a1512d5ae2f204e0d369b1209f7f3f33d2fcc', x: "50", y: "50", "dominant-baseline": "central", "text-anchor": "middle", "aria-hidden": "true" }, computedInitials))), showFallback && (h("div", { key: 'f897f840dbc1c453e2a9f83801a68e17aadca240', "test-id": "fallbackIcon", class: "fallback" }, h("q2-icon", { key: '5c880be18f7b8fe4f9b844ad66e5d9caf2959313', type: this.icon })))));
59
+ return (h("div", { key: '8fc018a14a769bf69c404a5059c6cc5a887cdc56' }, showImg && (h("img", { key: 'a9045f15fab15010cfb78b63021093dc6066c88e', class: isLoaded ? 'avatar-img' : 'avatar-img-default', "test-id": "userImage", src: this.src, onError: this.onError, onLoad: this.onLoad, alt: this.name || '' })), showInitials && (h("svg", { key: '0a5c8c322867fe769c2f093c9d853f2141b5ad81', viewBox: "0 0 100 100", preserveAspectRatio: "xMidYMid meet", "test-id": "userInitials", class: `avatar-initials size-${computedInitials.length}`, "aria-label": this.name, "aria-hidden": !this.name && 'true' }, h("text", { key: 'cc2279c1fa426e9ff7218eed1b8c392c50a510b2', x: "50", y: "50", "dominant-baseline": "central", "text-anchor": "middle", "aria-hidden": "true" }, computedInitials))), showFallback && (h("div", { key: '085bc656b4bd267443d90eb48bc392b32c669440', "test-id": "fallbackIcon", class: "fallback" }, h("q2-icon", { key: '60ed698068e1f5ab3c797d1c5f7e2b36c4b6d028', type: this.icon })))));
60
60
  }
61
61
  get el() { return this; }
62
62
  static get watchers() { return {
@@ -99,12 +99,12 @@ const Q2CarouselPane$1 = /*@__PURE__*/ proxyCustomElement(class Q2CarouselPane e
99
99
  // #region Render Methods
100
100
  render() {
101
101
  const { label } = this;
102
- return (h(Host, { key: '19ee20073c4e1c4cf787450e2e0558020f2d281e', class: this.generatePaneClass(this.currentPaneIndex), tabIndex: this.isActivePane ? 0 : -1, role: "group", "aria-roledescription": "slide", "aria-hidden": this.isActivePane ? undefined : 'true', "aria-label": label
102
+ return (h(Host, { key: 'cff153cc1df3fd6b79567a9a26bf0a29dcf57637', class: this.generatePaneClass(this.currentPaneIndex), tabIndex: this.isActivePane ? 0 : -1, role: "group", "aria-roledescription": "slide", "aria-hidden": this.isActivePane ? undefined : 'true', "aria-label": label
103
103
  ? loc(label)
104
104
  : loc('tecton.element.carousel.itemDescription', [
105
105
  (this.currentPaneIndex + 1).toString(),
106
106
  (this.siblingCount || 0).toString(),
107
- ]), onClick: this.paneClicked }, h("article", { key: '7603016c43a342e9733bd6b9ab60c212c0d4594d', class: "q2-carousel-pane-main-content" }, h("slot", { key: '94524394e0a431c369887d7d2e040430f3f852dd' }))));
107
+ ]), onClick: this.paneClicked }, h("article", { key: '9478afdc746a0d2d8e5f75912ef6782e8c29462c', class: "q2-carousel-pane-main-content" }, h("slot", { key: '06a9139a74a369fd76b66a46190078ccc3a5f5bc' }))));
108
108
  }
109
109
  get hostElement() { return this; }
110
110
  static get watchers() { return {
@@ -4193,7 +4193,7 @@ const Q2ChartArea$1 = /*@__PURE__*/ proxyCustomElement(class Q2ChartArea extends
4193
4193
  // #endregion
4194
4194
  // #region Render Methods
4195
4195
  render() {
4196
- return (h("div", { key: '1c54ebb293f7a71741ba2f805591e1e2a876ba11', class: "container" }, h("div", { key: 'd0a8520a736ad2236b30255725a91b501c009642', ref: el => (this.chartContainer = el), class: "chart-container", role: "img", "test-id": "areaChartContainer" })));
4196
+ return (h("div", { key: 'fb7a07b14e488e9376c1862c543ac4104f3d8d61', class: "container" }, h("div", { key: 'da19fd22b76543476d5fc54ca8b0cf4ebf6120f9', ref: el => (this.chartContainer = el), class: "chart-container", role: "img", "test-id": "areaChartContainer" })));
4197
4197
  }
4198
4198
  get hostElement() { return this; }
4199
4199
  static get watchers() { return {
@@ -1412,7 +1412,7 @@ const Q2ChartBar$1 = /*@__PURE__*/ proxyCustomElement(class Q2ChartBar extends H
1412
1412
  // #endregion
1413
1413
  // #region Render Methods
1414
1414
  render() {
1415
- return (h("div", { key: '894583cef73c43fc6ad9488a73c93f34acf266ca', class: "container" }, h("div", { key: '7c8b92cce307c4d14bf5f4735ba9c40ed48d2592', ref: el => (this.chartContainer = el), class: "chart-container", role: "img", "test-id": "barChartContainer" })));
1415
+ return (h("div", { key: '31d66bd842689a0fbfc6e0bbc635efe70298d35e', class: "container" }, h("div", { key: '9ec957c31158a6d0d0ff3528536d63e0cb1bc7b5', ref: el => (this.chartContainer = el), class: "chart-container", role: "img", "test-id": "barChartContainer" })));
1416
1416
  }
1417
1417
  get hostElement() { return this; }
1418
1418
  static get watchers() { return {
@@ -4496,7 +4496,7 @@ const Q2ChartDonut$1 = /*@__PURE__*/ proxyCustomElement(class Q2ChartDonut exten
4496
4496
  } })), !!name && h("div", { class: "name" }, name), !isNaN(value) && h("div", { class: "value" }, displayValue))));
4497
4497
  }
4498
4498
  render() {
4499
- return (h("click-elsewhere", { key: '653843d0844777cd5a1eca08ff2212af8866a30a', onChange: this.onClickElsewhere }, h("figure", { key: '3189ea33feae10932fe45ed1a6930badb4a9b438' }, h("div", { key: '3be03652e90ae4a776b9bf87ec575863c8f03621', class: "container" }, h("div", { key: '2e08d9019dfaabefd989ba51870bc778fa04905c', ref: el => (this.chartContainer = el), "aria-describedby": !this.isClickable ? 'center-card-description' : undefined, class: "chart-container", role: "img", "test-id": "chartContainer", onClick: this.onContainerClick, tabIndex: !this.isClickable ? 0 : undefined, onKeyDown: !this.isClickable ? this.onButtonKeyDown : undefined }), this.renderCenterBlock()), this.showLegend && (h("figcaption", { key: '158058ae81b1c016474f73c943d1452c6955022b' }, h("q2-legend", { key: '2d3f38b153a808c6eb15c69cc5450cc6838a5166', class: "legend", data: this.legendData, format: this.format, hoveredItemId: this.legendHoveredId, onClick: this.onLegendClick, onMouseleave: this.onLegendMouseleave, onMouseenter: this.onLegendMouseenter, selectedItemId: this.selectedId }))))));
4499
+ return (h("click-elsewhere", { key: 'a661d66ef04a8687d08cb80c3b89b26d1634232e', onChange: this.onClickElsewhere }, h("figure", { key: 'cad4c1954dda3915447801ca831284837bc1955d' }, h("div", { key: '93b242a1ed18214d06b336bf35d87f6f48818fa9', class: "container" }, h("div", { key: 'b03b803fbc264e60b910e0e2a7cbcefc860f2766', ref: el => (this.chartContainer = el), "aria-describedby": !this.isClickable ? 'center-card-description' : undefined, class: "chart-container", role: "img", "test-id": "chartContainer", onClick: this.onContainerClick, tabIndex: !this.isClickable ? 0 : undefined, onKeyDown: !this.isClickable ? this.onButtonKeyDown : undefined }), this.renderCenterBlock()), this.showLegend && (h("figcaption", { key: '93925c564b033360e5fcb7059305bfbbf1b85b4a' }, h("q2-legend", { key: '65b8695de24592940e369cb4687557f2abfa7b1c', class: "legend", data: this.legendData, format: this.format, hoveredItemId: this.legendHoveredId, onClick: this.onLegendClick, onMouseleave: this.onLegendMouseleave, onMouseenter: this.onLegendMouseenter, selectedItemId: this.selectedId }))))));
4500
4500
  }
4501
4501
  get hostElement() { return this; }
4502
4502
  static get watchers() { return {
@@ -112,7 +112,7 @@ const Q2Currency$1 = /*@__PURE__*/ proxyCustomElement(class Q2Currency extends H
112
112
  // #region Render Methods
113
113
  render() {
114
114
  const { hasPlusMinusSign, plusMinusSign, currencyIsFront, currencySymbol, shouldSuperscriptSymbol, amountCore, fraction, shouldSuperscriptFraction, readableCurrency, currencyClasses, } = this;
115
- return (h("div", { key: 'd921c89c1a7cc2b8cc768f828a68794b81ea896e', class: currencyClasses, "aria-label": readableCurrency }, hasPlusMinusSign && h("span", { key: '042f4f077827825dc9a59fd88770bd92758e4a1d' }, plusMinusSign), currencyIsFront && h("span", { key: '1a383dd810cdf6e4e8c7f2b0c3cb823ea27a30d5', class: shouldSuperscriptSymbol ? 'superscript' : '' }, currencySymbol), h("span", { key: '2c2892e40610254844efcfff6dae56699a94beff' }, amountCore), h("span", { key: '1c4cea0da09310e0d252a82e66dbd6473ef2b9f5', class: shouldSuperscriptFraction ? 'superscript' : '' }, fraction), !currencyIsFront && h("span", { key: '0f54a283e8979f4fe276a1c1a4202eff4bdb3673', class: shouldSuperscriptSymbol ? 'superscript' : '' }, currencySymbol)));
115
+ return (h("div", { key: 'a2559c41121977bb8b0031e6d2a6af4f05ba2aaa', class: currencyClasses, "aria-label": readableCurrency }, hasPlusMinusSign && h("span", { key: 'bda886f79e14fe0aa24a8c190789a88b14b7bae6' }, plusMinusSign), currencyIsFront && h("span", { key: '953a15863f65b5b4ec6a06ca710029e72751aada', class: shouldSuperscriptSymbol ? 'superscript' : '' }, currencySymbol), h("span", { key: '2952e4f6b23294d494a875d9f51f80697338557f' }, amountCore), h("span", { key: 'ac5a927a4d1aad7ceff9d3d8aee72ebd65ebc202', class: shouldSuperscriptFraction ? 'superscript' : '' }, fraction), !currencyIsFront && h("span", { key: 'a4dab9acf37de2bf9ab55378cde352e50f5eb440', class: shouldSuperscriptSymbol ? 'superscript' : '' }, currencySymbol)));
116
116
  }
117
117
  static get watchers() { return {
118
118
  "amount": ["propsUpdated"],
@@ -105,7 +105,7 @@ const Q2Detail$1 = /*@__PURE__*/ proxyCustomElement(class Q2Detail extends HTMLE
105
105
  // #endregion
106
106
  // #region Render Methods
107
107
  render() {
108
- return (h("div", { key: '9a3e8d5e8d175475d15aa9326d7c6833a7506b2f', class: this.detailClasses }, this.hasLabel && (h("div", { key: 'fb6ae48d90123296344a0606908dbb939210fee3', class: this.labelClasses, "aria-describedby": !!this.description ? 'label-description' : undefined }, !!this.label ? loc(this.label) : this.hasLabelSlotContent ? h("slot", { name: "label" }) : '')), this.hasDescripiton && (h("div", { key: 'af7968032661f3d967385e898afb6040f1f33b51', id: "label-description", class: this.descriptionClasses }, !!this.description ? loc(this.description) : this.hasDefaultSlotContent ? h("slot", null) : ''))));
108
+ return (h("div", { key: '6ec53bef5b60be767f948c9340473ce3b73aec1f', class: this.detailClasses }, this.hasLabel && (h("div", { key: 'b178f8dd90fd4dfa3abaebbf3ede9860acdc4103', class: this.labelClasses, "aria-describedby": !!this.description ? 'label-description' : undefined }, !!this.label ? loc(this.label) : this.hasLabelSlotContent ? h("slot", { name: "label" }) : '')), this.hasDescripiton && (h("div", { key: '163f2ac054ee7a4f1a4c20c8b2da1d94633adfa6', id: "label-description", class: this.descriptionClasses }, !!this.description ? loc(this.description) : this.hasDefaultSlotContent ? h("slot", null) : ''))));
109
109
  }
110
110
  get hostElement() { return this; }
111
111
  static get style() { return Q2DetailStyle0; }
@@ -77,6 +77,7 @@ const Q2Dropdown$1 = /*@__PURE__*/ proxyCustomElement(class Q2Dropdown extends H
77
77
  }
78
78
  };
79
79
  this.onToggleClick = () => {
80
+ this.popoverElement.controlElement = this.controlElement;
80
81
  if (this.open) {
81
82
  this.closeDropdown();
82
83
  }
@@ -85,6 +86,7 @@ const Q2Dropdown$1 = /*@__PURE__*/ proxyCustomElement(class Q2Dropdown extends H
85
86
  }
86
87
  };
87
88
  this.onToggleKeydown = async (event) => {
89
+ this.popoverElement.controlElement = this.controlElement;
88
90
  switch (event.key) {
89
91
  case 'ArrowUp':
90
92
  event.preventDefault();
@@ -374,7 +376,7 @@ const Q2Dropdown$1 = /*@__PURE__*/ proxyCustomElement(class Q2Dropdown extends H
374
376
  // #region Render Methods
375
377
  render() {
376
378
  const btnProps = this.toggleButtonProps;
377
- return (h("click-elsewhere", { key: '16789bbd29b2e6d9190b50361317dc7d61ebaf37', class: this.open ? 'dropdown-open' : '', onChange: this.onClickElsewhere, "test-id": "dropdownContainer" }, h("q2-btn", { key: '099cdfec01cdd1092083c5a49c486dd7292ba0f7', ref: el => (this.controlElement = el), class: btnProps.className, onClick: this.onToggleClick, onKeyDown: this.onToggleKeydown, fab: btnProps.fab, intent: btnProps.intent, active: btnProps.active, disabled: btnProps.disabled, ariaExpanded: `${!!btnProps.ariaExpanded}`, label: this.hideLabel && this.label ? loc(this.label) : undefined, hideLabel: this.hideLabel, ariaHasPopup: "menu", "test-id": "dropdownButton", block: this.block, description: loc('tecton.element.dropdown.itemCount', [this.determineDropdownItemCount]) }, this.hasCustomControl ? (h("div", { "test-id": "dropdownControl", class: btnProps.custom ? '' : 'hidden' }, h("slot", { name: "control" }))) : (h(Fragment, null, this.icon ? h("q2-icon", { type: this.icon }) : ' ', this.label && !this.hideLabel && (h("span", { class: "dropdown-button-text" }, loc(this.label)))))), h("q2-popover", { key: '0cdb2ce343ac83db31d6eaf03cebf8795e815ffb', ref: el => (this.popoverElement = el), controlElement: this.controlElement, open: this.open, "max-height": this.popoverMaxHeight, minHeight: this.popoverMinHeight, direction: this.popoverDirection, align: this.popoverAlignment, mode: this.popoverMode || undefined, block: this.block }, h("div", { key: 'aaa58a9164e046acd8c4adb63e6d54f98bbe3a76', onClick: this.onDropdownMenuClick, onKeyDown: this.onDropdownMenuKeydown, role: "menu", "aria-label": loc(this.label) || undefined }, h("slot", { key: 'e7cfea4e3c9437e69807aad505b730d45d7c98a9' })))));
379
+ return (h("click-elsewhere", { key: 'e7713f559cdc4b531405463149e6f50e5442a031', class: this.open ? 'dropdown-open' : '', onChange: this.onClickElsewhere, "test-id": "dropdownContainer" }, h("q2-btn", { key: 'ce4da0604182ce4e2df84af8e0f5c9079dab69a7', ref: el => (this.controlElement = el), class: btnProps.className, onClick: this.onToggleClick, onKeyDown: this.onToggleKeydown, fab: btnProps.fab, intent: btnProps.intent, active: btnProps.active, disabled: btnProps.disabled, ariaExpanded: `${!!btnProps.ariaExpanded}`, label: this.hideLabel && this.label ? loc(this.label) : undefined, hideLabel: this.hideLabel, ariaHasPopup: "menu", "test-id": "dropdownButton", block: this.block, description: loc('tecton.element.dropdown.itemCount', [this.determineDropdownItemCount]) }, this.hasCustomControl ? (h("div", { "test-id": "dropdownControl", class: btnProps.custom ? '' : 'hidden' }, h("slot", { name: "control" }))) : (h(Fragment, null, this.icon ? h("q2-icon", { type: this.icon }) : ' ', this.label && !this.hideLabel && (h("span", { class: "dropdown-button-text" }, loc(this.label)))))), h("q2-popover", { key: '176a3c7198b608618333a8b9729d6ee3baea6668', ref: el => (this.popoverElement = el), controlElement: this.controlElement, open: this.open, "max-height": this.popoverMaxHeight, minHeight: this.popoverMinHeight, direction: this.popoverDirection, align: this.popoverAlignment, mode: this.popoverMode || undefined, block: this.block }, h("div", { key: 'b7dd7ce2d16de77ef0d1e095b8ba29674c4e62dc', onClick: this.onDropdownMenuClick, onKeyDown: this.onDropdownMenuKeydown, role: "menu", "aria-label": loc(this.label) || undefined }, h("slot", { key: '090b476dccf76a38e4413b4378ed5b2cc0971494' })))));
378
380
  }
379
381
  get hostElement() { return this; }
380
382
  static get watchers() { return {