q2-tecton-elements 1.50.1 → 1.51.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (578) hide show
  1. package/dist/cjs/click-elsewhere_2.cjs.entry.js +21 -12
  2. package/dist/cjs/click-elsewhere_2.cjs.entry.js.map +1 -1
  3. package/dist/cjs/index-9aa4a776.js +235 -0
  4. package/dist/cjs/index-9aa4a776.js.map +1 -0
  5. package/dist/cjs/{index-43010ce4.js → index-f69742cf.js} +1 -1
  6. package/dist/cjs/{index-43010ce4.js.map → index-f69742cf.js.map} +1 -1
  7. package/dist/cjs/loader.cjs.js +1 -1
  8. package/dist/cjs/q2-action-group.cjs.entry.js +50 -0
  9. package/dist/cjs/q2-action-group.cjs.entry.js.map +1 -0
  10. package/dist/cjs/q2-action-sheet.cjs.entry.js +1364 -3
  11. package/dist/cjs/q2-action-sheet.cjs.entry.js.map +1 -1
  12. package/dist/cjs/q2-avatar.cjs.entry.js +1 -1
  13. package/dist/cjs/q2-badge_7.cjs.entry.js +23 -13
  14. package/dist/cjs/q2-badge_7.cjs.entry.js.map +1 -1
  15. package/dist/cjs/q2-calendar.cjs.entry.js +2 -2
  16. package/dist/cjs/q2-card.cjs.entry.js +1 -1
  17. package/dist/cjs/q2-carousel-pane.cjs.entry.js +3 -3
  18. package/dist/cjs/q2-carousel.cjs.entry.js +1 -1
  19. package/dist/cjs/q2-chart-area.cjs.entry.js +2 -2
  20. package/dist/cjs/q2-chart-area.cjs.entry.js.map +1 -1
  21. package/dist/cjs/q2-chart-bar.cjs.entry.js +2 -2
  22. package/dist/cjs/q2-chart-bar.cjs.entry.js.map +1 -1
  23. package/dist/cjs/q2-chart-donut.cjs.entry.js +16 -16
  24. package/dist/cjs/q2-chart-donut.cjs.entry.js.map +1 -1
  25. package/dist/cjs/q2-checkbox-group.cjs.entry.js +2 -2
  26. package/dist/cjs/q2-checkbox-group.cjs.entry.js.map +1 -1
  27. package/dist/cjs/q2-checkbox.cjs.entry.js +1 -1
  28. package/dist/cjs/q2-currency.cjs.entry.js +1 -1
  29. package/dist/cjs/q2-data-table.cjs.entry.js +62 -62
  30. package/dist/cjs/q2-data-table.cjs.entry.js.map +1 -1
  31. package/dist/cjs/q2-detail.cjs.entry.js +2 -2
  32. package/dist/cjs/q2-dropdown-item.cjs.entry.js +2 -2
  33. package/dist/cjs/q2-dropdown-item.cjs.entry.js.map +1 -1
  34. package/dist/cjs/q2-dropdown.cjs.entry.js +77 -5
  35. package/dist/cjs/q2-dropdown.cjs.entry.js.map +1 -1
  36. package/dist/cjs/q2-editable-field.cjs.entry.js +1 -1
  37. package/dist/cjs/q2-formatted-text.cjs.entry.js +72 -0
  38. package/dist/cjs/q2-formatted-text.cjs.entry.js.map +1 -0
  39. package/dist/cjs/q2-item.cjs.entry.js +2 -2
  40. package/dist/cjs/q2-legend.cjs.entry.js +2 -2
  41. package/dist/cjs/q2-legend.cjs.entry.js.map +1 -1
  42. package/dist/cjs/q2-link.cjs.entry.js +64 -0
  43. package/dist/cjs/q2-link.cjs.entry.js.map +1 -0
  44. package/dist/cjs/q2-list.cjs.entry.js +2 -2
  45. package/dist/cjs/q2-loc.cjs.entry.js +2 -2
  46. package/dist/cjs/q2-message.cjs.entry.js +2 -2
  47. package/dist/cjs/q2-month-picker.cjs.entry.js +3 -3
  48. package/dist/cjs/q2-optgroup.cjs.entry.js +2 -2
  49. package/dist/cjs/q2-option-list.cjs.entry.js +9 -4
  50. package/dist/cjs/q2-option-list.cjs.entry.js.map +1 -1
  51. package/dist/cjs/q2-option.cjs.entry.js +1 -1
  52. package/dist/cjs/q2-pagination.cjs.entry.js +90 -9
  53. package/dist/cjs/q2-pagination.cjs.entry.js.map +1 -1
  54. package/dist/cjs/q2-pill.cjs.entry.js +26 -5
  55. package/dist/cjs/q2-pill.cjs.entry.js.map +1 -1
  56. package/dist/cjs/q2-radio-group.cjs.entry.js +2 -2
  57. package/dist/cjs/q2-radio-group.cjs.entry.js.map +1 -1
  58. package/dist/cjs/q2-radio.cjs.entry.js +1 -1
  59. package/dist/cjs/q2-relative-time.cjs.entry.js +3 -3
  60. package/dist/cjs/q2-resize-observer.cjs.entry.js +96 -0
  61. package/dist/cjs/q2-resize-observer.cjs.entry.js.map +1 -0
  62. package/dist/cjs/q2-section.cjs.entry.js +27 -3
  63. package/dist/cjs/q2-section.cjs.entry.js.map +1 -1
  64. package/dist/cjs/q2-select.cjs.entry.js +7 -6
  65. package/dist/cjs/q2-select.cjs.entry.js.map +1 -1
  66. package/dist/cjs/q2-stepper-pane.cjs.entry.js +1 -1
  67. package/dist/cjs/q2-stepper-vertical.cjs.entry.js +2 -2
  68. package/dist/cjs/q2-stepper.cjs.entry.js +39 -3
  69. package/dist/cjs/q2-stepper.cjs.entry.js.map +1 -1
  70. package/dist/cjs/q2-tag.cjs.entry.js +3 -2
  71. package/dist/cjs/q2-tag.cjs.entry.js.map +1 -1
  72. package/dist/cjs/q2-tecton-elements.cjs.js +1 -1
  73. package/dist/cjs/q2-textarea.cjs.entry.js +46 -11
  74. package/dist/cjs/q2-textarea.cjs.entry.js.map +1 -1
  75. package/dist/cjs/q2-tooltip.cjs.entry.js +2 -2
  76. package/dist/cjs/q2-tooltip.cjs.entry.js.map +1 -1
  77. package/dist/cjs/tecton-tab-pane.cjs.entry.js +2 -2
  78. package/dist/collection/collection-manifest.json +4 -0
  79. package/dist/collection/components/q2-action-group/q2-action-group.css +99 -0
  80. package/dist/collection/components/q2-action-group/q2-action-group.js +120 -0
  81. package/dist/collection/components/q2-action-group/q2-action-group.js.map +1 -0
  82. package/dist/collection/components/q2-action-group/test/q2-action-group.e2e.js +30 -0
  83. package/dist/collection/components/q2-action-group/test/q2-action-group.e2e.js.map +1 -0
  84. package/dist/collection/components/q2-action-group/test/q2-action-group.spec.js +156 -0
  85. package/dist/collection/components/q2-action-group/test/q2-action-group.spec.js.map +1 -0
  86. package/dist/collection/components/q2-action-sheet/q2-action-sheet.js +3 -2
  87. package/dist/collection/components/q2-action-sheet/q2-action-sheet.js.map +1 -1
  88. package/dist/collection/components/q2-avatar/q2-avatar.js +1 -1
  89. package/dist/collection/components/q2-avatar/test/q2-avatar-test.e2e.js +14 -9
  90. package/dist/collection/components/q2-avatar/test/q2-avatar-test.e2e.js.map +1 -1
  91. package/dist/collection/components/q2-badge/test/q2-badge-test.e2e.js +14 -9
  92. package/dist/collection/components/q2-badge/test/q2-badge-test.e2e.js.map +1 -1
  93. package/dist/collection/components/q2-btn/test/q2-btn-test.e2e.js +14 -9
  94. package/dist/collection/components/q2-btn/test/q2-btn-test.e2e.js.map +1 -1
  95. package/dist/collection/components/q2-calendar/q2-month-picker.js +2 -2
  96. package/dist/collection/components/q2-calendar/test/q2-calendar-test.e2e.js +227 -223
  97. package/dist/collection/components/q2-calendar/test/q2-calendar-test.e2e.js.map +1 -1
  98. package/dist/collection/components/q2-card/test/q2-card-test.e2e.js +12 -7
  99. package/dist/collection/components/q2-card/test/q2-card-test.e2e.js.map +1 -1
  100. package/dist/collection/components/q2-carousel/test/q2-carousel-test.e2e.js +49 -45
  101. package/dist/collection/components/q2-carousel/test/q2-carousel-test.e2e.js.map +1 -1
  102. package/dist/collection/components/q2-carousel-pane/q2-carousel-pane.js +2 -2
  103. package/dist/collection/components/q2-chart-area/q2-chart-area.js +2 -2
  104. package/dist/collection/components/q2-chart-area/q2-chart-area.js.map +1 -1
  105. package/dist/collection/components/q2-chart-area/test/q2-chart-area-test.e2e.js +12 -7
  106. package/dist/collection/components/q2-chart-area/test/q2-chart-area-test.e2e.js.map +1 -1
  107. package/dist/collection/components/q2-chart-bar/q2-chart-bar.js +2 -2
  108. package/dist/collection/components/q2-chart-bar/q2-chart-bar.js.map +1 -1
  109. package/dist/collection/components/q2-chart-bar/test/q2-chart-bar-test.e2e.js +16 -11
  110. package/dist/collection/components/q2-chart-bar/test/q2-chart-bar-test.e2e.js.map +1 -1
  111. package/dist/collection/components/q2-chart-donut/q2-chart-donut.js +15 -15
  112. package/dist/collection/components/q2-chart-donut/q2-chart-donut.js.map +1 -1
  113. package/dist/collection/components/q2-chart-donut/test/q2-chart-donut-test.e2e.js +32 -26
  114. package/dist/collection/components/q2-chart-donut/test/q2-chart-donut-test.e2e.js.map +1 -1
  115. package/dist/collection/components/q2-checkbox/test/q2-checkbox-test.e2e.js +12 -7
  116. package/dist/collection/components/q2-checkbox/test/q2-checkbox-test.e2e.js.map +1 -1
  117. package/dist/collection/components/q2-checkbox-group/q2-checkbox-group.js +2 -2
  118. package/dist/collection/components/q2-checkbox-group/q2-checkbox-group.js.map +1 -1
  119. package/dist/collection/components/q2-checkbox-group/test/q2-checkbox-group-test.e2e.js +22 -17
  120. package/dist/collection/components/q2-checkbox-group/test/q2-checkbox-group-test.e2e.js.map +1 -1
  121. package/dist/collection/components/q2-currency/q2-currency.js +1 -1
  122. package/dist/collection/components/q2-currency/test/q2-currency-test.e2e.js +12 -7
  123. package/dist/collection/components/q2-currency/test/q2-currency-test.e2e.js.map +1 -1
  124. package/dist/collection/components/q2-data-table/q2-data-table.js +104 -104
  125. package/dist/collection/components/q2-data-table/q2-data-table.js.map +1 -1
  126. package/dist/collection/components/q2-data-table/test/q2-data-table-test.e2e.js +42 -24
  127. package/dist/collection/components/q2-data-table/test/q2-data-table-test.e2e.js.map +1 -1
  128. package/dist/collection/components/q2-detail/q2-detail.js +1 -1
  129. package/dist/collection/components/q2-detail/test/q2-detail-test.e2e.js +12 -7
  130. package/dist/collection/components/q2-detail/test/q2-detail-test.e2e.js.map +1 -1
  131. package/dist/collection/components/q2-dropdown/q2-dropdown.js +201 -4
  132. package/dist/collection/components/q2-dropdown/q2-dropdown.js.map +1 -1
  133. package/dist/collection/components/q2-dropdown/test/q2-dropdown-test.e2e.js +305 -124
  134. package/dist/collection/components/q2-dropdown/test/q2-dropdown-test.e2e.js.map +1 -1
  135. package/dist/collection/components/q2-dropdown-item/q2-dropdown-item.js +1 -1
  136. package/dist/collection/components/q2-dropdown-item/q2-dropdown-item.js.map +1 -1
  137. package/dist/collection/components/q2-dropdown-item/test/q2-dropdown-item-test.e2e.js +18 -13
  138. package/dist/collection/components/q2-dropdown-item/test/q2-dropdown-item-test.e2e.js.map +1 -1
  139. package/dist/collection/components/q2-editable-field/test/q2-editable-field-test.e2e.js +14 -18
  140. package/dist/collection/components/q2-editable-field/test/q2-editable-field-test.e2e.js.map +1 -1
  141. package/dist/collection/components/q2-formatted-text/q2-formatted-text.css +94 -0
  142. package/dist/collection/components/q2-formatted-text/q2-formatted-text.js +230 -0
  143. package/dist/collection/components/q2-formatted-text/q2-formatted-text.js.map +1 -0
  144. package/dist/collection/components/q2-formatted-text/test/q2-formatted-text-test.e2e.js +430 -0
  145. package/dist/collection/components/q2-formatted-text/test/q2-formatted-text-test.e2e.js.map +1 -0
  146. package/dist/collection/components/q2-icon/test/q2-icon-test.e2e.js +14 -9
  147. package/dist/collection/components/q2-icon/test/q2-icon-test.e2e.js.map +1 -1
  148. package/dist/collection/components/q2-input/q2-input.css +9 -0
  149. package/dist/collection/components/q2-input/q2-input.js +7 -8
  150. package/dist/collection/components/q2-input/q2-input.js.map +1 -1
  151. package/dist/collection/components/q2-input/test/q2-input-test.e2e.js +50 -33
  152. package/dist/collection/components/q2-input/test/q2-input-test.e2e.js.map +1 -1
  153. package/dist/collection/components/q2-item/q2-item.js +1 -1
  154. package/dist/collection/components/q2-item/test/q2-item-test.e2e.js +32 -7
  155. package/dist/collection/components/q2-item/test/q2-item-test.e2e.js.map +1 -1
  156. package/dist/collection/components/q2-legend/q2-legend.css +1 -1
  157. package/dist/collection/components/q2-legend/q2-legend.js +1 -1
  158. package/dist/collection/components/q2-legend/test/q2-legend-test.e2e.js +13 -8
  159. package/dist/collection/components/q2-legend/test/q2-legend-test.e2e.js.map +1 -1
  160. package/dist/collection/components/q2-link/q2-link.css +146 -0
  161. package/dist/collection/components/q2-link/q2-link.js +242 -0
  162. package/dist/collection/components/q2-link/q2-link.js.map +1 -0
  163. package/dist/collection/components/q2-link/test/q2-link-test.e2e.js +145 -0
  164. package/dist/collection/components/q2-link/test/q2-link-test.e2e.js.map +1 -0
  165. package/dist/collection/components/q2-list/q2-list.js +1 -1
  166. package/dist/collection/components/q2-list/test/q2-list-test.e2e.js +12 -7
  167. package/dist/collection/components/q2-list/test/q2-list-test.e2e.js.map +1 -1
  168. package/dist/collection/components/q2-loading/test/q2-loading-element-test.e2e.js +14 -9
  169. package/dist/collection/components/q2-loading/test/q2-loading-element-test.e2e.js.map +1 -1
  170. package/dist/collection/components/q2-loading/test/q2-loading-test.e2e.js +14 -9
  171. package/dist/collection/components/q2-loading/test/q2-loading-test.e2e.js.map +1 -1
  172. package/dist/collection/components/q2-loc/q2-loc.js +1 -1
  173. package/dist/collection/components/q2-loc/test/q2-loc-test.e2e.js +16 -11
  174. package/dist/collection/components/q2-loc/test/q2-loc-test.e2e.js.map +1 -1
  175. package/dist/collection/components/q2-message/q2-message.js +1 -1
  176. package/dist/collection/components/q2-message/test/q2-message-test.e2e.js +14 -9
  177. package/dist/collection/components/q2-message/test/q2-message-test.e2e.js.map +1 -1
  178. package/dist/collection/components/q2-optgroup/q2-optgroup.js +1 -1
  179. package/dist/collection/components/q2-optgroup/test/q2-optgroup-test.e2e.js +20 -13
  180. package/dist/collection/components/q2-optgroup/test/q2-optgroup-test.e2e.js.map +1 -1
  181. package/dist/collection/components/q2-option/q2-option.js +1 -1
  182. package/dist/collection/components/q2-option/test/q2-option-test.e2e.js +28 -12
  183. package/dist/collection/components/q2-option/test/q2-option-test.e2e.js.map +1 -1
  184. package/dist/collection/components/q2-option-list/q2-option-list.js +7 -5
  185. package/dist/collection/components/q2-option-list/q2-option-list.js.map +1 -1
  186. package/dist/collection/components/q2-option-list/test/q2-option-list-test.e2e.js +415 -405
  187. package/dist/collection/components/q2-option-list/test/q2-option-list-test.e2e.js.map +1 -1
  188. package/dist/collection/components/q2-pagination/q2-pagination.js +230 -14
  189. package/dist/collection/components/q2-pagination/q2-pagination.js.map +1 -1
  190. package/dist/collection/components/q2-pagination/test/q2-pagination-test.e2e.js +138 -15
  191. package/dist/collection/components/q2-pagination/test/q2-pagination-test.e2e.js.map +1 -1
  192. package/dist/collection/components/q2-pill/q2-pill.css +12 -0
  193. package/dist/collection/components/q2-pill/q2-pill.js +43 -3
  194. package/dist/collection/components/q2-pill/q2-pill.js.map +1 -1
  195. package/dist/collection/components/q2-pill/test/q2-pill-test.e2e.js +412 -212
  196. package/dist/collection/components/q2-pill/test/q2-pill-test.e2e.js.map +1 -1
  197. package/dist/collection/components/q2-popover/q2-popover.js +37 -11
  198. package/dist/collection/components/q2-popover/q2-popover.js.map +1 -1
  199. package/dist/collection/components/q2-popover/test/q2-popover-test.e2e.js +296 -236
  200. package/dist/collection/components/q2-popover/test/q2-popover-test.e2e.js.map +1 -1
  201. package/dist/collection/components/q2-popover/test/q2-popover-test.spec.js +3 -3
  202. package/dist/collection/components/q2-popover/test/q2-popover-test.spec.js.map +1 -1
  203. package/dist/collection/components/q2-radio/test/q2-radio-test.e2e.js +21 -7
  204. package/dist/collection/components/q2-radio/test/q2-radio-test.e2e.js.map +1 -1
  205. package/dist/collection/components/q2-radio-group/q2-radio-group.js +2 -2
  206. package/dist/collection/components/q2-radio-group/q2-radio-group.js.map +1 -1
  207. package/dist/collection/components/q2-radio-group/test/q2-radio-group-test.e2e.js +32 -26
  208. package/dist/collection/components/q2-radio-group/test/q2-radio-group-test.e2e.js.map +1 -1
  209. package/dist/collection/components/q2-relative-time/q2-relative-time.js +1 -1
  210. package/dist/collection/components/q2-relative-time/test/q2-relative-time-test.e2e.js +12 -7
  211. package/dist/collection/components/q2-relative-time/test/q2-relative-time-test.e2e.js.map +1 -1
  212. package/dist/collection/components/q2-resize-observer/q2-resize-observer.css +71 -0
  213. package/dist/collection/components/q2-resize-observer/q2-resize-observer.js +166 -0
  214. package/dist/collection/components/q2-resize-observer/q2-resize-observer.js.map +1 -0
  215. package/dist/collection/components/q2-resize-observer/test/q2-resize-observer.e2e.js +83 -0
  216. package/dist/collection/components/q2-resize-observer/test/q2-resize-observer.e2e.js.map +1 -0
  217. package/dist/collection/components/q2-resize-observer/test/q2-resize-observer.spec.js +66 -0
  218. package/dist/collection/components/q2-resize-observer/test/q2-resize-observer.spec.js.map +1 -0
  219. package/dist/collection/components/q2-section/q2-section.js +78 -2
  220. package/dist/collection/components/q2-section/q2-section.js.map +1 -1
  221. package/dist/collection/components/q2-section/test/q2-section-test.e2e.js +39 -9
  222. package/dist/collection/components/q2-section/test/q2-section-test.e2e.js.map +1 -1
  223. package/dist/collection/components/q2-select/q2-select.js +23 -5
  224. package/dist/collection/components/q2-select/q2-select.js.map +1 -1
  225. package/dist/collection/components/q2-select/test/q2-select-test.e2e.js +695 -676
  226. package/dist/collection/components/q2-select/test/q2-select-test.e2e.js.map +1 -1
  227. package/dist/collection/components/q2-stepper/q2-stepper.js +76 -2
  228. package/dist/collection/components/q2-stepper/q2-stepper.js.map +1 -1
  229. package/dist/collection/components/q2-stepper/test/q2-stepper-test.e2e.js +183 -87
  230. package/dist/collection/components/q2-stepper/test/q2-stepper-test.e2e.js.map +1 -1
  231. package/dist/collection/components/q2-stepper-pane/q2-stepper-pane.js +2 -2
  232. package/dist/collection/components/q2-stepper-pane/test/q2-stepper-pane-test.e2e.js +20 -9
  233. package/dist/collection/components/q2-stepper-pane/test/q2-stepper-pane-test.e2e.js.map +1 -1
  234. package/dist/collection/components/q2-stepper-vertical/q2-stepper-vertical.js +1 -1
  235. package/dist/collection/components/q2-stepper-vertical/test/q2-stepper-vertical-test.e2e.js +71 -67
  236. package/dist/collection/components/q2-stepper-vertical/test/q2-stepper-vertical-test.e2e.js.map +1 -1
  237. package/dist/collection/components/q2-tab-container/q2-tab-container.js +50 -7
  238. package/dist/collection/components/q2-tab-container/q2-tab-container.js.map +1 -1
  239. package/dist/collection/components/q2-tab-container/test/q2-tab-container-test.e2e.js +89 -65
  240. package/dist/collection/components/q2-tab-container/test/q2-tab-container-test.e2e.js.map +1 -1
  241. package/dist/collection/components/q2-tab-pane/q2-tab-pane.js +1 -1
  242. package/dist/collection/components/q2-tab-pane/test/q2-tab-pane-test.e2e.js +14 -9
  243. package/dist/collection/components/q2-tab-pane/test/q2-tab-pane-test.e2e.js.map +1 -1
  244. package/dist/collection/components/q2-tag/q2-tag.js +19 -1
  245. package/dist/collection/components/q2-tag/q2-tag.js.map +1 -1
  246. package/dist/collection/components/q2-tag/test/q2-tag-test.e2e.js +47 -28
  247. package/dist/collection/components/q2-tag/test/q2-tag-test.e2e.js.map +1 -1
  248. package/dist/collection/components/q2-textarea/q2-textarea.js +51 -13
  249. package/dist/collection/components/q2-textarea/q2-textarea.js.map +1 -1
  250. package/dist/collection/components/q2-textarea/test/q2-textarea-test.e2e.js +31 -10
  251. package/dist/collection/components/q2-textarea/test/q2-textarea-test.e2e.js.map +1 -1
  252. package/dist/collection/components/q2-tooltip/q2-tooltip.css +5 -2
  253. package/dist/collection/components/q2-tooltip/test/q2-tooltip-test.e2e.js +51 -13
  254. package/dist/collection/components/q2-tooltip/test/q2-tooltip-test.e2e.js.map +1 -1
  255. package/dist/collection/components/tecton-tab-pane/tecton-tab-pane.js +2 -2
  256. package/dist/collection/components/tecton-tab-pane/test/tecton-tab-pane-test.e2e.js +18 -13
  257. package/dist/collection/components/tecton-tab-pane/test/tecton-tab-pane-test.e2e.js.map +1 -1
  258. package/dist/collection/utils/helpers.js +65 -0
  259. package/dist/collection/utils/helpers.js.map +1 -1
  260. package/dist/collection/utils/index.js +11 -11
  261. package/dist/collection/utils/index.js.map +1 -1
  262. package/dist/collection/utils/sanitize-html-string.js +10 -0
  263. package/dist/collection/utils/sanitize-html-string.js.map +1 -0
  264. package/dist/collection/utils/sanitize-regex-string.js +4 -0
  265. package/dist/collection/utils/sanitize-regex-string.js.map +1 -0
  266. package/dist/components/index.js +8 -0
  267. package/dist/components/index.js.map +1 -1
  268. package/dist/components/index2.js +11 -1356
  269. package/dist/components/index2.js.map +1 -1
  270. package/dist/components/q2-action-group.d.ts +11 -0
  271. package/dist/components/q2-action-group.js +75 -0
  272. package/dist/components/q2-action-group.js.map +1 -0
  273. package/dist/components/q2-action-sheet.js +1363 -2
  274. package/dist/components/q2-action-sheet.js.map +1 -1
  275. package/dist/components/q2-avatar2.js +1 -1
  276. package/dist/components/q2-btn2.js +1 -1
  277. package/dist/components/q2-carousel-pane.js +2 -2
  278. package/dist/components/q2-chart-area.js +1 -1
  279. package/dist/components/q2-chart-area.js.map +1 -1
  280. package/dist/components/q2-chart-bar.js +1 -1
  281. package/dist/components/q2-chart-bar.js.map +1 -1
  282. package/dist/components/q2-chart-donut.js +15 -15
  283. package/dist/components/q2-chart-donut.js.map +1 -1
  284. package/dist/components/q2-checkbox-group.js +2 -2
  285. package/dist/components/q2-checkbox-group.js.map +1 -1
  286. package/dist/components/q2-currency.js +1 -1
  287. package/dist/components/q2-data-table.js +64 -64
  288. package/dist/components/q2-data-table.js.map +1 -1
  289. package/dist/components/q2-detail.js +1 -1
  290. package/dist/components/q2-dropdown-item2.js +1 -1
  291. package/dist/components/q2-dropdown-item2.js.map +1 -1
  292. package/dist/components/q2-dropdown.js +82 -5
  293. package/dist/components/q2-dropdown.js.map +1 -1
  294. package/dist/components/q2-formatted-text.d.ts +11 -0
  295. package/dist/components/q2-formatted-text.js +101 -0
  296. package/dist/components/q2-formatted-text.js.map +1 -0
  297. package/dist/components/q2-input2.js +4 -5
  298. package/dist/components/q2-input2.js.map +1 -1
  299. package/dist/components/q2-item.js +1 -1
  300. package/dist/components/q2-legend2.js +2 -2
  301. package/dist/components/q2-legend2.js.map +1 -1
  302. package/dist/components/q2-link.d.ts +11 -0
  303. package/dist/components/q2-link.js +93 -0
  304. package/dist/components/q2-link.js.map +1 -0
  305. package/dist/components/q2-list.js +1 -1
  306. package/dist/components/q2-loc.js +1 -1
  307. package/dist/components/q2-message2.js +1 -1
  308. package/dist/components/q2-month-picker.js +2 -2
  309. package/dist/components/q2-optgroup2.js +1 -1
  310. package/dist/components/q2-option-list2.js +8 -3
  311. package/dist/components/q2-option-list2.js.map +1 -1
  312. package/dist/components/q2-option2.js +1 -1
  313. package/dist/components/q2-pagination.js +97 -10
  314. package/dist/components/q2-pagination.js.map +1 -1
  315. package/dist/components/q2-pill.js +29 -5
  316. package/dist/components/q2-pill.js.map +1 -1
  317. package/dist/components/q2-popover2.js +22 -12
  318. package/dist/components/q2-popover2.js.map +1 -1
  319. package/dist/components/q2-radio-group.js +2 -2
  320. package/dist/components/q2-radio-group.js.map +1 -1
  321. package/dist/components/q2-relative-time.js +1 -1
  322. package/dist/components/q2-resize-observer.d.ts +11 -0
  323. package/dist/components/q2-resize-observer.js +8 -0
  324. package/dist/components/q2-resize-observer.js.map +1 -0
  325. package/dist/components/q2-resize-observer2.js +112 -0
  326. package/dist/components/q2-resize-observer2.js.map +1 -0
  327. package/dist/components/q2-section.js +30 -4
  328. package/dist/components/q2-section.js.map +1 -1
  329. package/dist/components/q2-select2.js +7 -5
  330. package/dist/components/q2-select2.js.map +1 -1
  331. package/dist/components/q2-stepper-vertical.js +1 -1
  332. package/dist/components/q2-stepper.js +40 -3
  333. package/dist/components/q2-stepper.js.map +1 -1
  334. package/dist/components/q2-tab-container.js +20 -8
  335. package/dist/components/q2-tab-container.js.map +1 -1
  336. package/dist/components/q2-tab-pane.js +1 -1
  337. package/dist/components/q2-tag.js +3 -1
  338. package/dist/components/q2-tag.js.map +1 -1
  339. package/dist/components/q2-textarea.js +49 -12
  340. package/dist/components/q2-textarea.js.map +1 -1
  341. package/dist/components/q2-tooltip.js +1 -1
  342. package/dist/components/q2-tooltip.js.map +1 -1
  343. package/dist/components/tecton-tab-pane.js +2 -2
  344. package/dist/esm/click-elsewhere_2.entry.js +21 -12
  345. package/dist/esm/click-elsewhere_2.entry.js.map +1 -1
  346. package/dist/esm/{index-c6d74f10.js → index-3184c760.js} +1 -1
  347. package/dist/esm/{index-c6d74f10.js.map → index-3184c760.js.map} +1 -1
  348. package/dist/esm/index-844fc010.js +211 -0
  349. package/dist/esm/index-844fc010.js.map +1 -0
  350. package/dist/esm/loader.js +1 -1
  351. package/dist/esm/q2-action-group.entry.js +46 -0
  352. package/dist/esm/q2-action-group.entry.js.map +1 -0
  353. package/dist/esm/q2-action-sheet.entry.js +1363 -2
  354. package/dist/esm/q2-action-sheet.entry.js.map +1 -1
  355. package/dist/esm/q2-avatar.entry.js +1 -1
  356. package/dist/esm/q2-badge_7.entry.js +23 -13
  357. package/dist/esm/q2-badge_7.entry.js.map +1 -1
  358. package/dist/esm/q2-calendar.entry.js +2 -2
  359. package/dist/esm/q2-card.entry.js +1 -1
  360. package/dist/esm/q2-carousel-pane.entry.js +3 -3
  361. package/dist/esm/q2-carousel.entry.js +1 -1
  362. package/dist/esm/q2-chart-area.entry.js +2 -2
  363. package/dist/esm/q2-chart-area.entry.js.map +1 -1
  364. package/dist/esm/q2-chart-bar.entry.js +2 -2
  365. package/dist/esm/q2-chart-bar.entry.js.map +1 -1
  366. package/dist/esm/q2-chart-donut.entry.js +16 -16
  367. package/dist/esm/q2-chart-donut.entry.js.map +1 -1
  368. package/dist/esm/q2-checkbox-group.entry.js +2 -2
  369. package/dist/esm/q2-checkbox-group.entry.js.map +1 -1
  370. package/dist/esm/q2-checkbox.entry.js +1 -1
  371. package/dist/esm/q2-currency.entry.js +1 -1
  372. package/dist/esm/q2-data-table.entry.js +62 -62
  373. package/dist/esm/q2-data-table.entry.js.map +1 -1
  374. package/dist/esm/q2-detail.entry.js +2 -2
  375. package/dist/esm/q2-dropdown-item.entry.js +2 -2
  376. package/dist/esm/q2-dropdown-item.entry.js.map +1 -1
  377. package/dist/esm/q2-dropdown.entry.js +77 -5
  378. package/dist/esm/q2-dropdown.entry.js.map +1 -1
  379. package/dist/esm/q2-editable-field.entry.js +1 -1
  380. package/dist/esm/q2-formatted-text.entry.js +68 -0
  381. package/dist/esm/q2-formatted-text.entry.js.map +1 -0
  382. package/dist/esm/q2-item.entry.js +2 -2
  383. package/dist/esm/q2-legend.entry.js +2 -2
  384. package/dist/esm/q2-legend.entry.js.map +1 -1
  385. package/dist/esm/q2-link.entry.js +60 -0
  386. package/dist/esm/q2-link.entry.js.map +1 -0
  387. package/dist/esm/q2-list.entry.js +2 -2
  388. package/dist/esm/q2-loc.entry.js +2 -2
  389. package/dist/esm/q2-message.entry.js +2 -2
  390. package/dist/esm/q2-month-picker.entry.js +3 -3
  391. package/dist/esm/q2-optgroup.entry.js +2 -2
  392. package/dist/esm/q2-option-list.entry.js +9 -4
  393. package/dist/esm/q2-option-list.entry.js.map +1 -1
  394. package/dist/esm/q2-option.entry.js +1 -1
  395. package/dist/esm/q2-pagination.entry.js +90 -9
  396. package/dist/esm/q2-pagination.entry.js.map +1 -1
  397. package/dist/esm/q2-pill.entry.js +26 -5
  398. package/dist/esm/q2-pill.entry.js.map +1 -1
  399. package/dist/esm/q2-radio-group.entry.js +2 -2
  400. package/dist/esm/q2-radio-group.entry.js.map +1 -1
  401. package/dist/esm/q2-radio.entry.js +1 -1
  402. package/dist/esm/q2-relative-time.entry.js +3 -3
  403. package/dist/esm/q2-resize-observer.entry.js +92 -0
  404. package/dist/esm/q2-resize-observer.entry.js.map +1 -0
  405. package/dist/esm/q2-section.entry.js +27 -3
  406. package/dist/esm/q2-section.entry.js.map +1 -1
  407. package/dist/esm/q2-select.entry.js +7 -6
  408. package/dist/esm/q2-select.entry.js.map +1 -1
  409. package/dist/esm/q2-stepper-pane.entry.js +1 -1
  410. package/dist/esm/q2-stepper-vertical.entry.js +2 -2
  411. package/dist/esm/q2-stepper.entry.js +39 -3
  412. package/dist/esm/q2-stepper.entry.js.map +1 -1
  413. package/dist/esm/q2-tag.entry.js +3 -2
  414. package/dist/esm/q2-tag.entry.js.map +1 -1
  415. package/dist/esm/q2-tecton-elements.js +1 -1
  416. package/dist/esm/q2-textarea.entry.js +47 -12
  417. package/dist/esm/q2-textarea.entry.js.map +1 -1
  418. package/dist/esm/q2-tooltip.entry.js +2 -2
  419. package/dist/esm/q2-tooltip.entry.js.map +1 -1
  420. package/dist/esm/tecton-tab-pane.entry.js +2 -2
  421. package/dist/q2-tecton-elements/{p-0a3a804a.entry.js → p-06701928.entry.js} +2 -2
  422. package/dist/q2-tecton-elements/{p-0a3a804a.entry.js.map → p-06701928.entry.js.map} +1 -1
  423. package/dist/q2-tecton-elements/{p-5d936af5.entry.js → p-07d1c3ae.entry.js} +2 -2
  424. package/dist/q2-tecton-elements/p-15ac45d6.js +2 -0
  425. package/dist/q2-tecton-elements/p-15ac45d6.js.map +1 -0
  426. package/dist/q2-tecton-elements/{p-ce4e6b41.entry.js → p-16910682.entry.js} +2 -2
  427. package/dist/q2-tecton-elements/p-16910682.entry.js.map +1 -0
  428. package/dist/q2-tecton-elements/p-188eb162.entry.js +3 -0
  429. package/dist/q2-tecton-elements/p-188eb162.entry.js.map +1 -0
  430. package/dist/q2-tecton-elements/{p-58cafc0d.entry.js → p-1c760a89.entry.js} +2 -2
  431. package/dist/q2-tecton-elements/{p-074ae80c.entry.js → p-1c88d057.entry.js} +2 -2
  432. package/dist/q2-tecton-elements/{p-3b0d3cd4.entry.js → p-20a3d6ed.entry.js} +2 -2
  433. package/dist/q2-tecton-elements/p-20a3d6ed.entry.js.map +1 -0
  434. package/dist/q2-tecton-elements/{p-77a0cc0c.entry.js → p-2733583e.entry.js} +2 -2
  435. package/dist/q2-tecton-elements/{p-4116579f.entry.js → p-3e428290.entry.js} +2 -2
  436. package/dist/q2-tecton-elements/p-3e428290.entry.js.map +1 -0
  437. package/dist/q2-tecton-elements/{p-072c5877.entry.js → p-4774e5b3.entry.js} +2 -2
  438. package/dist/q2-tecton-elements/{p-77272c4c.entry.js → p-490ef8e5.entry.js} +2 -2
  439. package/dist/q2-tecton-elements/{p-0a1dff75.entry.js → p-4e10550d.entry.js} +2 -2
  440. package/dist/q2-tecton-elements/p-4e10550d.entry.js.map +1 -0
  441. package/dist/q2-tecton-elements/{p-2ca6d44f.entry.js → p-50f7328f.entry.js} +2 -2
  442. package/dist/q2-tecton-elements/p-5637c486.entry.js +2 -0
  443. package/dist/q2-tecton-elements/p-5637c486.entry.js.map +1 -0
  444. package/dist/q2-tecton-elements/p-56df21b0.entry.js +2 -0
  445. package/dist/q2-tecton-elements/p-56df21b0.entry.js.map +1 -0
  446. package/dist/q2-tecton-elements/{p-34856c71.entry.js → p-5a834214.entry.js} +2 -2
  447. package/dist/q2-tecton-elements/{p-34856c71.entry.js.map → p-5a834214.entry.js.map} +1 -1
  448. package/dist/q2-tecton-elements/p-5f99a4a8.entry.js +2 -0
  449. package/dist/q2-tecton-elements/p-5f99a4a8.entry.js.map +1 -0
  450. package/dist/q2-tecton-elements/p-72d948b4.entry.js +2 -0
  451. package/dist/q2-tecton-elements/p-72d948b4.entry.js.map +1 -0
  452. package/dist/q2-tecton-elements/{p-3c7be0bb.entry.js → p-7903cd15.entry.js} +2 -2
  453. package/dist/q2-tecton-elements/p-7903cd15.entry.js.map +1 -0
  454. package/dist/q2-tecton-elements/{p-d2e1631a.entry.js → p-7906f49e.entry.js} +2 -2
  455. package/dist/q2-tecton-elements/{p-d2e1631a.entry.js.map → p-7906f49e.entry.js.map} +1 -1
  456. package/dist/q2-tecton-elements/{p-2fcaf2d6.entry.js → p-7aef0c08.entry.js} +2 -2
  457. package/dist/q2-tecton-elements/{p-8a4b106d.entry.js → p-7c9a0122.entry.js} +2 -2
  458. package/dist/q2-tecton-elements/p-7c9f8b62.entry.js +2 -0
  459. package/dist/q2-tecton-elements/p-7c9f8b62.entry.js.map +1 -0
  460. package/dist/q2-tecton-elements/{p-cf32b5db.entry.js → p-81fbe718.entry.js} +2 -2
  461. package/dist/q2-tecton-elements/p-81fbe718.entry.js.map +1 -0
  462. package/dist/q2-tecton-elements/{p-6237c775.entry.js → p-896c7008.entry.js} +2 -2
  463. package/dist/q2-tecton-elements/{p-395904b4.entry.js → p-8d07cf91.entry.js} +2 -2
  464. package/dist/q2-tecton-elements/{p-fffb54e9.entry.js → p-8d2b02e1.entry.js} +2 -2
  465. package/dist/q2-tecton-elements/{p-6e6d9793.entry.js → p-95a7c042.entry.js} +2 -2
  466. package/dist/q2-tecton-elements/{p-45407ecc.entry.js → p-96b1406c.entry.js} +2 -2
  467. package/dist/q2-tecton-elements/{p-cb3f48de.entry.js → p-a47597dd.entry.js} +2 -2
  468. package/dist/q2-tecton-elements/p-a47597dd.entry.js.map +1 -0
  469. package/dist/q2-tecton-elements/p-a5d0e252.entry.js +2 -0
  470. package/dist/q2-tecton-elements/p-a5d0e252.entry.js.map +1 -0
  471. package/dist/q2-tecton-elements/{p-2c26295e.entry.js → p-ac6aa392.entry.js} +2 -2
  472. package/dist/q2-tecton-elements/{p-376a0589.entry.js → p-ad057d10.entry.js} +2 -2
  473. package/dist/q2-tecton-elements/p-ad798287.entry.js +2 -0
  474. package/dist/q2-tecton-elements/p-ad798287.entry.js.map +1 -0
  475. package/dist/q2-tecton-elements/{p-ad998f71.entry.js → p-b0e5e9dc.entry.js} +2 -2
  476. package/dist/q2-tecton-elements/p-b0e5e9dc.entry.js.map +1 -0
  477. package/dist/q2-tecton-elements/{p-34696e3f.entry.js → p-b1784be3.entry.js} +2 -2
  478. package/dist/q2-tecton-elements/{p-259b728a.entry.js → p-b7de110e.entry.js} +2 -2
  479. package/dist/q2-tecton-elements/{p-8111547c.entry.js → p-c235ab3f.entry.js} +2 -2
  480. package/dist/q2-tecton-elements/p-c5667d5d.entry.js +2 -0
  481. package/dist/q2-tecton-elements/p-c5667d5d.entry.js.map +1 -0
  482. package/dist/q2-tecton-elements/{p-c81d299a.entry.js → p-e216ef3f.entry.js} +2 -2
  483. package/dist/q2-tecton-elements/p-e2c800ef.entry.js +2 -0
  484. package/dist/q2-tecton-elements/p-e2c800ef.entry.js.map +1 -0
  485. package/dist/q2-tecton-elements/p-f135b265.entry.js +2 -0
  486. package/dist/q2-tecton-elements/p-f135b265.entry.js.map +1 -0
  487. package/dist/q2-tecton-elements/{p-721365be.js → p-f1e887f5.js} +1 -1
  488. package/dist/q2-tecton-elements/{p-6b7c53a8.entry.js → p-f5f23659.entry.js} +2 -2
  489. package/dist/q2-tecton-elements/p-f7867f21.entry.js +2 -0
  490. package/dist/q2-tecton-elements/p-f7867f21.entry.js.map +1 -0
  491. package/dist/q2-tecton-elements/p-ff8f1a32.entry.js +2 -0
  492. package/dist/q2-tecton-elements/p-ff8f1a32.entry.js.map +1 -0
  493. package/dist/q2-tecton-elements/p-fff01dc1.entry.js +2 -0
  494. package/dist/q2-tecton-elements/p-fff01dc1.entry.js.map +1 -0
  495. package/dist/q2-tecton-elements/q2-tecton-elements.esm.js +1 -1
  496. package/dist/q2-tecton-elements/q2-tecton-elements.esm.js.map +1 -1
  497. package/dist/types/components/q2-action-group/q2-action-group.d.ts +30 -0
  498. package/dist/types/components/q2-chart-area/q2-chart-area.d.ts +1 -1
  499. package/dist/types/components/q2-chart-bar/q2-chart-bar.d.ts +1 -1
  500. package/dist/types/components/q2-chart-donut/q2-chart-donut.d.ts +2 -0
  501. package/dist/types/components/q2-data-table/q2-data-table.d.ts +15 -13
  502. package/dist/types/components/q2-dropdown/q2-dropdown.d.ts +36 -0
  503. package/dist/types/components/q2-formatted-text/q2-formatted-text.d.ts +34 -0
  504. package/dist/types/components/q2-input/q2-input.d.ts +10 -9
  505. package/dist/types/components/q2-legend/q2-legend.d.ts +1 -0
  506. package/dist/types/components/q2-link/q2-link.d.ts +36 -0
  507. package/dist/types/components/q2-pagination/q2-pagination.d.ts +60 -3
  508. package/dist/types/components/q2-pill/q2-pill.d.ts +11 -0
  509. package/dist/types/components/q2-popover/q2-popover.d.ts +7 -1
  510. package/dist/types/components/q2-resize-observer/q2-resize-observer.d.ts +28 -0
  511. package/dist/types/components/q2-section/q2-section.d.ts +12 -0
  512. package/dist/types/components/q2-select/q2-select.d.ts +5 -0
  513. package/dist/types/components/q2-stepper/q2-stepper.d.ts +10 -1
  514. package/dist/types/components/q2-tab-container/q2-tab-container.d.ts +8 -2
  515. package/dist/types/components/q2-tag/q2-tag.d.ts +5 -0
  516. package/dist/types/components/q2-textarea/q2-textarea.d.ts +8 -3
  517. package/dist/types/components.d.ts +394 -18
  518. package/dist/types/utils/helpers.d.ts +28 -0
  519. package/dist/types/utils/index.d.ts +3 -3
  520. package/dist/types/utils/sanitize-html-string.d.ts +1 -0
  521. package/dist/types/utils/sanitize-regex-string.d.ts +1 -0
  522. package/package.json +4 -4
  523. package/dist/cjs/index-64d8b839.js +0 -1580
  524. package/dist/cjs/index-64d8b839.js.map +0 -1
  525. package/dist/esm/index-4a80972c.js +0 -1556
  526. package/dist/esm/index-4a80972c.js.map +0 -1
  527. package/dist/q2-tecton-elements/p-0a1dff75.entry.js.map +0 -1
  528. package/dist/q2-tecton-elements/p-3b0d3cd4.entry.js.map +0 -1
  529. package/dist/q2-tecton-elements/p-3c7be0bb.entry.js.map +0 -1
  530. package/dist/q2-tecton-elements/p-403bf3d4.entry.js +0 -2
  531. package/dist/q2-tecton-elements/p-403bf3d4.entry.js.map +0 -1
  532. package/dist/q2-tecton-elements/p-4116579f.entry.js.map +0 -1
  533. package/dist/q2-tecton-elements/p-661ed976.entry.js +0 -2
  534. package/dist/q2-tecton-elements/p-661ed976.entry.js.map +0 -1
  535. package/dist/q2-tecton-elements/p-9a1a4bc0.js +0 -3
  536. package/dist/q2-tecton-elements/p-9a1a4bc0.js.map +0 -1
  537. package/dist/q2-tecton-elements/p-a7a0b8aa.entry.js +0 -2
  538. package/dist/q2-tecton-elements/p-a7a0b8aa.entry.js.map +0 -1
  539. package/dist/q2-tecton-elements/p-aa57b657.entry.js +0 -2
  540. package/dist/q2-tecton-elements/p-aa57b657.entry.js.map +0 -1
  541. package/dist/q2-tecton-elements/p-ad998f71.entry.js.map +0 -1
  542. package/dist/q2-tecton-elements/p-adec9275.entry.js +0 -2
  543. package/dist/q2-tecton-elements/p-adec9275.entry.js.map +0 -1
  544. package/dist/q2-tecton-elements/p-adf0a7c9.entry.js +0 -2
  545. package/dist/q2-tecton-elements/p-adf0a7c9.entry.js.map +0 -1
  546. package/dist/q2-tecton-elements/p-b72fd065.entry.js +0 -2
  547. package/dist/q2-tecton-elements/p-b72fd065.entry.js.map +0 -1
  548. package/dist/q2-tecton-elements/p-c0c658d1.entry.js +0 -2
  549. package/dist/q2-tecton-elements/p-c0c658d1.entry.js.map +0 -1
  550. package/dist/q2-tecton-elements/p-cb3f48de.entry.js.map +0 -1
  551. package/dist/q2-tecton-elements/p-ce4e6b41.entry.js.map +0 -1
  552. package/dist/q2-tecton-elements/p-cf32b5db.entry.js.map +0 -1
  553. package/dist/q2-tecton-elements/p-cf966a0f.entry.js +0 -2
  554. package/dist/q2-tecton-elements/p-cf966a0f.entry.js.map +0 -1
  555. package/dist/q2-tecton-elements/p-dc77bf66.entry.js +0 -2
  556. package/dist/q2-tecton-elements/p-dc77bf66.entry.js.map +0 -1
  557. /package/dist/q2-tecton-elements/{p-5d936af5.entry.js.map → p-07d1c3ae.entry.js.map} +0 -0
  558. /package/dist/q2-tecton-elements/{p-58cafc0d.entry.js.map → p-1c760a89.entry.js.map} +0 -0
  559. /package/dist/q2-tecton-elements/{p-074ae80c.entry.js.map → p-1c88d057.entry.js.map} +0 -0
  560. /package/dist/q2-tecton-elements/{p-77a0cc0c.entry.js.map → p-2733583e.entry.js.map} +0 -0
  561. /package/dist/q2-tecton-elements/{p-072c5877.entry.js.map → p-4774e5b3.entry.js.map} +0 -0
  562. /package/dist/q2-tecton-elements/{p-77272c4c.entry.js.map → p-490ef8e5.entry.js.map} +0 -0
  563. /package/dist/q2-tecton-elements/{p-2ca6d44f.entry.js.map → p-50f7328f.entry.js.map} +0 -0
  564. /package/dist/q2-tecton-elements/{p-2fcaf2d6.entry.js.map → p-7aef0c08.entry.js.map} +0 -0
  565. /package/dist/q2-tecton-elements/{p-8a4b106d.entry.js.map → p-7c9a0122.entry.js.map} +0 -0
  566. /package/dist/q2-tecton-elements/{p-6237c775.entry.js.map → p-896c7008.entry.js.map} +0 -0
  567. /package/dist/q2-tecton-elements/{p-395904b4.entry.js.map → p-8d07cf91.entry.js.map} +0 -0
  568. /package/dist/q2-tecton-elements/{p-fffb54e9.entry.js.map → p-8d2b02e1.entry.js.map} +0 -0
  569. /package/dist/q2-tecton-elements/{p-6e6d9793.entry.js.map → p-95a7c042.entry.js.map} +0 -0
  570. /package/dist/q2-tecton-elements/{p-45407ecc.entry.js.map → p-96b1406c.entry.js.map} +0 -0
  571. /package/dist/q2-tecton-elements/{p-2c26295e.entry.js.map → p-ac6aa392.entry.js.map} +0 -0
  572. /package/dist/q2-tecton-elements/{p-376a0589.entry.js.map → p-ad057d10.entry.js.map} +0 -0
  573. /package/dist/q2-tecton-elements/{p-34696e3f.entry.js.map → p-b1784be3.entry.js.map} +0 -0
  574. /package/dist/q2-tecton-elements/{p-259b728a.entry.js.map → p-b7de110e.entry.js.map} +0 -0
  575. /package/dist/q2-tecton-elements/{p-8111547c.entry.js.map → p-c235ab3f.entry.js.map} +0 -0
  576. /package/dist/q2-tecton-elements/{p-c81d299a.entry.js.map → p-e216ef3f.entry.js.map} +0 -0
  577. /package/dist/q2-tecton-elements/{p-721365be.js.map → p-f1e887f5.js.map} +0 -0
  578. /package/dist/q2-tecton-elements/{p-6b7c53a8.entry.js.map → p-f5f23659.entry.js.map} +0 -0
@@ -76,6 +76,7 @@ export class Q2Popover {
76
76
  this.block = undefined;
77
77
  this.controlElement = undefined;
78
78
  this.direction = undefined;
79
+ this.maxHeight = undefined;
79
80
  this.minHeight = undefined;
80
81
  this.mode = null;
81
82
  this.open = undefined;
@@ -129,7 +130,13 @@ export class Q2Popover {
129
130
  }
130
131
  // #endregion
131
132
  // #region Local Methods
132
- get actualDirection() {
133
+ get isModule() {
134
+ var _a, _b;
135
+ const isIframe = window !== window.top;
136
+ const hasPlatformDimensions = Object.keys((_b = (_a = window.Tecton) === null || _a === void 0 ? void 0 : _a.platformDimensions) !== null && _b !== void 0 ? _b : {}).length > 0;
137
+ return isIframe && hasPlatformDimensions;
138
+ }
139
+ get providedDirection() {
133
140
  const { direction } = this;
134
141
  switch (direction) {
135
142
  case 'up':
@@ -139,11 +146,9 @@ export class Q2Popover {
139
146
  return undefined;
140
147
  }
141
148
  }
142
- get isModule() {
143
- var _a, _b;
144
- const isIframe = window !== window.top;
145
- const hasPlatformDimensions = Object.keys((_b = (_a = window.Tecton) === null || _a === void 0 ? void 0 : _a.platformDimensions) !== null && _b !== void 0 ? _b : {}).length > 0;
146
- return isIframe && hasPlatformDimensions;
149
+ get validatedMaxHeight() {
150
+ const { maxHeight } = this;
151
+ return isNaN(maxHeight) ? undefined : maxHeight;
147
152
  }
148
153
  addViewportListeners() {
149
154
  var _a;
@@ -165,7 +170,7 @@ export class Q2Popover {
165
170
  }
166
171
  async determinePopDirection() {
167
172
  var _a, _b, _c;
168
- const { containerElement, controlElement, actualDirection, displayBuffer } = this;
173
+ const { containerElement, controlElement, providedDirection, displayBuffer } = this;
169
174
  if (containerElement)
170
175
  containerElement.style.maxHeight = null;
171
176
  await waitForNextPaint();
@@ -200,17 +205,21 @@ export class Q2Popover {
200
205
  const shouldUpdateMaxHeight = !containerElement.style.getPropertyValue('--comp-pop-max-height') || this.orientationChanged;
201
206
  // we do not want to constantly update the max-height after an orientation change, so we switch this back to false
202
207
  this.orientationChanged = false;
203
- const currentOrDetermineDirection = this.currentDirection || actualDirection || directionWithMostSpace;
208
+ const currentOrDetermineDirection = this.currentDirection || providedDirection || directionWithMostSpace;
204
209
  switch (currentOrDetermineDirection) {
205
210
  case 'up':
206
211
  if (shouldUpdateMaxHeight) {
207
- containerElement.style.setProperty('--comp-pop-max-height', `${maxSpaceAbove}px`);
212
+ const priorityMaxHeight = this.validatedMaxHeight || maxSpaceAbove;
213
+ const maxHeight = Math.min(maxSpaceAbove, priorityMaxHeight);
214
+ containerElement.style.setProperty('--comp-pop-max-height', `${maxHeight}px`);
208
215
  }
209
216
  this.setDirectionAndShow('up');
210
217
  break;
211
218
  case 'down':
212
219
  if (shouldUpdateMaxHeight) {
213
- containerElement.style.setProperty('--comp-pop-max-height', `${maxSpaceBelow}px`);
220
+ const priorityMaxHeight = this.validatedMaxHeight || maxSpaceBelow;
221
+ const maxHeight = Math.min(maxSpaceBelow, priorityMaxHeight);
222
+ containerElement.style.setProperty('--comp-pop-max-height', `${maxHeight}px`);
214
223
  }
215
224
  this.setDirectionAndShow('down');
216
225
  break;
@@ -286,7 +295,7 @@ export class Q2Popover {
286
295
  containerClasses.push('show');
287
296
  if (this.mode === 'legacy')
288
297
  containerClasses.push('legacy');
289
- return (h("div", { key: '570cccbfa3c4830d4b9d52c9564c5355ed357e4f', ref: el => (this.containerElement = el), class: containerClasses.join(' '), "test-id": "outerContainer" }, h("div", { key: '7729d8f39d61e866de0cf3fe6d65fa8205af8a18', ref: el => (this.contentElement = el), class: "content" }, h("slot", { key: '315ce34d31a84a0a0d6688982567d2267452161c' }))));
298
+ return (h("div", { key: '859d756319e8db9fc5e28f15c172a675c220f217', ref: el => (this.containerElement = el), class: containerClasses.join(' '), "test-id": "outerContainer" }, h("div", { key: '6928f830953fe36fa76fbd8da81f6bde70689ffe', ref: el => (this.contentElement = el), class: "content" }, h("slot", { key: '36be03972c41ec02cefff9b0aa61526e66a49084' }))));
290
299
  }
291
300
  static get is() { return "q2-popover"; }
292
301
  static get encapsulation() { return "shadow"; }
@@ -373,6 +382,23 @@ export class Q2Popover {
373
382
  "attribute": "direction",
374
383
  "reflect": true
375
384
  },
385
+ "maxHeight": {
386
+ "type": "number",
387
+ "mutable": false,
388
+ "complexType": {
389
+ "original": "number",
390
+ "resolved": "number",
391
+ "references": {}
392
+ },
393
+ "required": false,
394
+ "optional": false,
395
+ "docs": {
396
+ "tags": [],
397
+ "text": "Force the maximum height of the popover. This value will be interpreted as pixels.\nIf no value is passed, or the value exceeds available space, the component will auto-detect the maximum height based on available space."
398
+ },
399
+ "attribute": "max-height",
400
+ "reflect": false
401
+ },
376
402
  "minHeight": {
377
403
  "type": "number",
378
404
  "mutable": false,
@@ -1 +1 @@
1
- {"version":3,"file":"q2-popover.js","sourceRoot":"","sources":["../../../src/components/q2-popover/q2-popover.tsx"],"names":[],"mappings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AgB,GAAG,EAAE,CAAC,EACvC,KAAK,EAAE,gBAAgB,CAAC,IAAI,CAAC,GAAG,CAAC,aACzB,gBAAgB;YAExB,4DACI,GAAG,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,cAAc,GAAG,EAAE,CAAC,EACrC,KAAK,EAAC,SAAS;gBAEf,8DAAQ,CACN,CACJ,CACT,CAAC;IACN,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGJ","sourcesContent":["import {\n Component,\n Prop,\n h,\n ComponentInterface,\n Element,\n Watch,\n Method,\n Listen,\n EventEmitter,\n Event,\n State,\n} from '@stencil/core';\nimport { handleDeprecationWarning, waitForNextPaint } from '../../utils';\n\n@Component({ tag: 'q2-popover', shadow: true, styleUrl: 'q2-popover.scss' })\nexport class Q2Popover implements ComponentInterface {\n // #region Own Properties\n\n containerElement: HTMLDivElement;\n contentElement: HTMLDivElement;\n /**\n * The number of pixels to leave between the popover and the edge of the viewport\n */\n displayBuffer = 10;\n /** remove when Popover API is supported in iOS */\n orientationChanged: boolean = false;\n rootElementRect: DOMRect;\n\n // #endregion\n // #region Host HTML Element\n\n @Element()\n hostElement: HTMLElement;\n\n // #endregion\n // #region State Properties\n\n @State()\n currentDirection: 'down' | 'up' = undefined;\n\n // remove `show` when Popover API is supported in iOS\n @State()\n show: boolean = false;\n\n // #endregion\n // #region Public Property API\n\n /** Aligns the popover to the left or right side of the control element. */\n @Prop({ reflect: true })\n align: 'left' | 'right';\n\n /** Indicates the popover will match the width of its parent element. */\n @Prop({ reflect: true })\n block: boolean;\n\n /** The element that controls the popover's behavior. */\n @Prop()\n controlElement: HTMLElement;\n\n /**\n * Force the direction of the popover when it opens.\n * If no value is passed, the component will auto-detect the direction based on available space.\n */\n @Prop({ reflect: true })\n direction: 'up' | 'down';\n\n /** @deprecated */\n @Prop()\n minHeight: number;\n\n @Prop()\n mode: 'legacy' = null;\n\n /** Controls whether the popover is open or closed. */\n @Prop({ reflect: true, mutable: true })\n open: boolean;\n\n // #endregion\n // #region Events\n\n /**\n * Emitted when the popover is opened or closed.\n */\n @Event()\n popoverStateChanged: EventEmitter<{ open: boolean }>;\n\n // #endregion\n // #region Component Lifecycle Events\n\n disconnectedCallback() {\n this.removeViewportListeners();\n }\n\n componentDidLoad() {\n this.handleMinHeight();\n if (this.open) this.determinePopDirection();\n }\n\n // #endregion\n // #region Listeners\n\n @Listen('popoverState')\n popoverStateHandler(event: CustomEvent<{ open: boolean }>) {\n const {\n detail: { open },\n } = event;\n if (open === this.open) return;\n\n this.open = open;\n event.stopPropagation();\n }\n\n // #endregion\n // #region Public Methods API\n\n @Method()\n async scrollContainerTo(options: ScrollToOptions) {\n this.containerElement.scrollTo(options);\n }\n\n @Method()\n async toggle() {\n this.open = !this.open;\n }\n\n // #endregion\n // #region Watchers\n\n @Watch('minHeight')\n minHeightProvided() {\n this.handleMinHeight();\n }\n\n @Watch('open')\n async openChanged(open: boolean) {\n this.setRootElement();\n this.popoverStateChanged.emit({ open });\n\n if (open) {\n this.addViewportListeners();\n this.determinePopDirection();\n } else {\n this.removeViewportListeners();\n this.currentDirection = undefined;\n this.show = false;\n await waitForNextPaint();\n this.clearCSSProperties();\n }\n }\n\n // #endregion\n // #region Local Methods\n\n get actualDirection(): 'up' | 'down' | undefined {\n const { direction } = this;\n switch (direction) {\n case 'up':\n case 'down':\n return direction;\n default:\n return undefined;\n }\n }\n\n get isModule() {\n const isIframe = window !== window.top;\n const hasPlatformDimensions = Object.keys(window.Tecton?.platformDimensions ?? {}).length > 0;\n return isIframe && hasPlatformDimensions;\n }\n\n addViewportListeners() {\n window.addEventListener('resize', this.viewPortOrientationChanged);\n // #region remove when Popover API is supported in iOS\n window.addEventListener('scroll', this.viewPortChanged, { passive: true, capture: true });\n screen?.orientation?.addEventListener('change', this.viewPortOrientationChanged);\n window.addEventListener('orientationchange', this.viewPortOrientationChanged);\n\n // #endregion\n }\n\n clearCSSProperties() {\n this.containerElement.style.removeProperty('--comp-pop-max-height');\n this.containerElement.style.removeProperty('--comp-pop-top');\n this.containerElement.style.removeProperty('--comp-pop-bottom');\n this.containerElement.style.removeProperty('--comp-pop-left');\n this.containerElement.style.removeProperty('--comp-pop-right');\n this.containerElement.style.removeProperty('--comp-pop-width');\n this.containerElement.style.removeProperty('--comp-pop-opacity');\n }\n\n async determinePopDirection() {\n const { containerElement, controlElement, actualDirection, displayBuffer } = this;\n if (containerElement) containerElement.style.maxHeight = null;\n\n await waitForNextPaint();\n\n const { isModule } = this;\n const { top: controlTop, bottom: controlBottom } = controlElement?.getBoundingClientRect?.() ?? {\n top: 0,\n bottom: 0,\n };\n\n let windowHeight: number;\n let maxSpaceAbove: number;\n let maxSpaceBelow: number;\n\n if (isModule) {\n const { outletOffset = 0, innerHeight = window.innerHeight } = window.Tecton?.platformDimensions || {};\n const distanceToIframeBottom = window.visualViewport.height - controlBottom;\n const viewableSpaceBelow = innerHeight - (outletOffset + controlBottom);\n const isIframeShorterThanWindow = distanceToIframeBottom < viewableSpaceBelow;\n windowHeight = innerHeight;\n // If the top of the module is below the top of the window we just use the controlTop\n // Otherwise we need to add the outletOffset to the controlTop\n maxSpaceAbove = (outletOffset > 0 ? controlTop : controlTop + outletOffset) - displayBuffer;\n maxSpaceBelow = isIframeShorterThanWindow\n ? distanceToIframeBottom - displayBuffer\n : viewableSpaceBelow - displayBuffer;\n } else {\n windowHeight = window.visualViewport.height;\n maxSpaceAbove = controlTop - displayBuffer;\n maxSpaceBelow = windowHeight - controlBottom - displayBuffer;\n }\n\n const directionWithMostSpace: 'up' | 'down' = maxSpaceAbove > maxSpaceBelow ? 'up' : 'down';\n\n // We do not want to update the max height once the popover is open unless the page orientation shifts (resize or mobile use cases)\n const shouldUpdateMaxHeight =\n !containerElement.style.getPropertyValue('--comp-pop-max-height') || this.orientationChanged;\n // we do not want to constantly update the max-height after an orientation change, so we switch this back to false\n this.orientationChanged = false;\n const currentOrDetermineDirection = this.currentDirection || actualDirection || directionWithMostSpace;\n\n switch (currentOrDetermineDirection) {\n case 'up':\n if (shouldUpdateMaxHeight) {\n containerElement.style.setProperty('--comp-pop-max-height', `${maxSpaceAbove}px`);\n }\n this.setDirectionAndShow('up');\n break;\n case 'down':\n if (shouldUpdateMaxHeight) {\n containerElement.style.setProperty('--comp-pop-max-height', `${maxSpaceBelow}px`);\n }\n this.setDirectionAndShow('down');\n break;\n default:\n break;\n }\n }\n\n handleMinHeight = () => {\n if (this.minHeight) {\n handleDeprecationWarning(this, 'minHeight', 'prop');\n }\n };\n\n removeViewportListeners() {\n window.removeEventListener('resize', this.viewPortOrientationChanged);\n // #region remove when Popover API is supported in iOS\n window.removeEventListener('scroll', this.viewPortChanged);\n screen?.orientation?.removeEventListener('orientationchange', this.viewPortOrientationChanged);\n window.removeEventListener('orientationchange', this.viewPortOrientationChanged);\n\n // #endregion\n }\n\n setAbsoluteCSSProperties = async () => {\n const { controlElement, containerElement, currentDirection, align } = this;\n\n if (align === 'right') {\n containerElement.style.setProperty('--comp-pop-right', '0');\n containerElement.style.setProperty('--comp-pop-left', 'unset');\n } else {\n containerElement.style.setProperty('--comp-pop-left', '0');\n containerElement.style.setProperty('--comp-pop-right', 'unset');\n }\n\n if (this.block) {\n containerElement.style.setProperty('--comp-pop-width', '100%');\n }\n\n if (currentDirection === 'up') {\n const controlStyle = getComputedStyle(controlElement);\n const controlSize =\n parseInt(controlStyle.height || '0') +\n parseInt(controlStyle.borderTopWidth || '0') +\n parseInt(controlStyle.borderBottomWidth || '0');\n\n containerElement.style.setProperty('--comp-pop-bottom', `${controlSize}px`);\n }\n\n // Wait for one paint to prevent layout thrashing\n await waitForNextPaint();\n containerElement.style.setProperty('--comp-pop-opacity', '1');\n };\n\n setDirectionAndShow(direction: 'up' | 'down') {\n this.setRootElement();\n // Due to some runtime inconsistency across devices/browsers we need to add one more check here because the\n // popover can be closed between the time the popover is opened and the time the direction is determined\n const isOpen = this.open;\n if (!isOpen) return;\n\n this.currentDirection = direction;\n this.show = true;\n if (this.mode === 'legacy') {\n this.setAbsoluteCSSProperties();\n } else {\n this.setFixedCSSProperties();\n }\n }\n\n setFixedCSSProperties = async () => {\n const { controlElement, containerElement, currentDirection, rootElementRect } = this;\n const {\n top: controlTop,\n bottom: controlBottom,\n left: controlLeft,\n right: controlRight,\n } = controlElement?.getBoundingClientRect?.() ?? {\n top: 0,\n bottom: 0,\n left: 0,\n right: 0,\n };\n const popoverLeft: number = controlLeft - rootElementRect.left;\n\n if (this.block) containerElement.style.setProperty('--comp-pop-width', `${controlElement.offsetWidth || 0}px`);\n containerElement.style.setProperty('--comp-pop-left', `${popoverLeft}px`);\n containerElement.style.setProperty(\n '--comp-pop-right',\n `${rootElementRect.width + rootElementRect.left - controlRight}px`\n );\n\n if (currentDirection === 'up') {\n containerElement.style.setProperty(\n '--comp-pop-bottom',\n `${rootElementRect.height + rootElementRect.top - controlTop}px`\n );\n }\n if (currentDirection === 'down') {\n containerElement.style.setProperty('--comp-pop-top', `${controlBottom - rootElementRect.top}px`);\n }\n\n // Wait for one paint to prevent layout thrashing\n await waitForNextPaint();\n containerElement.style.setProperty('--comp-pop-opacity', '1');\n };\n\n setRootElement() {\n let currentElement: HTMLElement = this.hostElement;\n\n while (currentElement && currentElement !== document.documentElement) {\n const computedStyle = window.getComputedStyle(currentElement);\n\n // Check if the element has any styles applied that create a new containg block\n if (\n computedStyle.transform !== 'none' ||\n computedStyle.filter !== 'none' ||\n computedStyle.perspective !== 'none' ||\n computedStyle.containerType !== 'normal' ||\n ['transform', 'perspective', 'filter'].includes(computedStyle.willChange) ||\n ['layout', 'paint', 'strict', 'content'].includes(computedStyle.contain)\n ) {\n this.rootElementRect = currentElement.getBoundingClientRect();\n return;\n }\n\n const rootNode = currentElement.getRootNode();\n const isRootNodeWebComponent =\n typeof ShadowRoot !== 'undefined' &&\n rootNode instanceof ShadowRoot &&\n rootNode.host instanceof HTMLElement;\n if (isRootNodeWebComponent) {\n currentElement = rootNode.host;\n } else {\n currentElement = currentElement.parentElement;\n }\n }\n\n // Return the document's bounding rect if no element is found\n this.rootElementRect = {\n top: 0,\n bottom: 0,\n left: 0,\n right: 0,\n height: window.visualViewport.height,\n width: window.visualViewport.width,\n } as DOMRect;\n }\n\n viewPortChanged = () => {\n if (!this.open) return;\n this.determinePopDirection();\n };\n\n viewPortOrientationChanged = () => {\n this.orientationChanged = true;\n this.viewPortChanged();\n };\n\n // #endregion\n // #region Render Methods\n\n render() {\n const containerClasses = ['container', this.currentDirection];\n if (this.show) containerClasses.push('show');\n if (this.mode === 'legacy') containerClasses.push('legacy');\n\n return (\n <div\n ref={el => (this.containerElement = el)}\n class={containerClasses.join(' ')}\n test-id=\"outerContainer\"\n >\n <div\n ref={el => (this.contentElement = el)}\n class=\"content\"\n >\n <slot />\n </div>\n </div>\n );\n }\n\n // #endregion\n}\n"]}
1
+ {"version":3,"file":"q2-popover.js","sourceRoot":"","sources":["../../../src/components/q2-popover/q2-popover.tsx"],"names":[],"mappings":"AAAA,OAAO,EACH,SAAS,EACT,IAAI,EACJ,CAAC,EAED,OAAO,EACP,KAAK,EACL,MAAM,EACN,MAAM,EAEN,KAAK,EACL,KAAK,GACR,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,wBAAwB,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAGzE,MAAM,OAAO,SAAS;;QAKlB;;WAEG;QACH,kBAAa,GAAG,EAAE,CAAC;QACnB,kDAAkD;QAClD,uBAAkB,GAAY,KAAK,CAAC;QAkPpC,oBAAe,GAAG,GAAG,EAAE;YACnB,IAAI,IAAI,CAAC,SAAS,EAAE,CAAC;gBACjB,wBAAwB,CAAC,IAAI,E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G,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,gBAAgB,GAAG,EAAE,CAAC,EACvC,KAAK,EAAE,gBAAgB,CAAC,IAAI,CAAC,GAAG,CAAC,aACzB,gBAAgB;YAExB,4DACI,GAAG,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,cAAc,GAAG,EAAE,CAAC,EACrC,KAAK,EAAC,SAAS;gBAEf,8DAAQ,CACN,CACJ,CACT,CAAC;IACN,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGJ","sourcesContent":["import {\n Component,\n Prop,\n h,\n ComponentInterface,\n Element,\n Watch,\n Method,\n Listen,\n EventEmitter,\n Event,\n State,\n} from '@stencil/core';\nimport { handleDeprecationWarning, waitForNextPaint } from '../../utils';\n\n@Component({ tag: 'q2-popover', shadow: true, styleUrl: 'q2-popover.scss' })\nexport class Q2Popover implements ComponentInterface {\n // #region Own Properties\n\n containerElement: HTMLDivElement;\n contentElement: HTMLDivElement;\n /**\n * The number of pixels to leave between the popover and the edge of the viewport\n */\n displayBuffer = 10;\n /** remove when Popover API is supported in iOS */\n orientationChanged: boolean = false;\n rootElementRect: DOMRect;\n\n // #endregion\n // #region Host HTML Element\n\n @Element()\n hostElement: HTMLElement;\n\n // #endregion\n // #region State Properties\n\n @State()\n currentDirection: 'down' | 'up' = undefined;\n\n // remove `show` when Popover API is supported in iOS\n @State()\n show: boolean = false;\n\n // #endregion\n // #region Public Property API\n\n /** Aligns the popover to the left or right side of the control element. */\n @Prop({ reflect: true })\n align: 'left' | 'right';\n\n /** Indicates the popover will match the width of its parent element. */\n @Prop({ reflect: true })\n block: boolean;\n\n /** The element that controls the popover's behavior. */\n @Prop()\n controlElement: HTMLElement;\n\n /**\n * Force the direction of the popover when it opens.\n * If no value is passed, the component will auto-detect the direction based on available space.\n */\n @Prop({ reflect: true })\n direction: 'up' | 'down';\n\n /**\n * Force the maximum height of the popover. This value will be interpreted as pixels.\n * If no value is passed, or the value exceeds available space, the component will auto-detect the maximum height based on available space.\n */\n @Prop()\n maxHeight: number;\n\n /** @deprecated */\n @Prop()\n minHeight: number;\n\n @Prop()\n mode: 'legacy' = null;\n\n /** Controls whether the popover is open or closed. */\n @Prop({ reflect: true, mutable: true })\n open: boolean;\n\n // #endregion\n // #region Events\n\n /**\n * Emitted when the popover is opened or closed.\n */\n @Event()\n popoverStateChanged: EventEmitter<{ open: boolean }>;\n\n // #endregion\n // #region Component Lifecycle Events\n\n disconnectedCallback() {\n this.removeViewportListeners();\n }\n\n componentDidLoad() {\n this.handleMinHeight();\n if (this.open) this.determinePopDirection();\n }\n\n // #endregion\n // #region Listeners\n\n @Listen('popoverState')\n popoverStateHandler(event: CustomEvent<{ open: boolean }>) {\n const {\n detail: { open },\n } = event;\n if (open === this.open) return;\n\n this.open = open;\n event.stopPropagation();\n }\n\n // #endregion\n // #region Public Methods API\n\n @Method()\n async scrollContainerTo(options: ScrollToOptions) {\n this.containerElement.scrollTo(options);\n }\n\n @Method()\n async toggle() {\n this.open = !this.open;\n }\n\n // #endregion\n // #region Watchers\n\n @Watch('minHeight')\n minHeightProvided() {\n this.handleMinHeight();\n }\n\n @Watch('open')\n async openChanged(open: boolean) {\n this.setRootElement();\n this.popoverStateChanged.emit({ open });\n\n if (open) {\n this.addViewportListeners();\n this.determinePopDirection();\n } else {\n this.removeViewportListeners();\n this.currentDirection = undefined;\n this.show = false;\n await waitForNextPaint();\n this.clearCSSProperties();\n }\n }\n\n // #endregion\n // #region Local Methods\n\n get isModule() {\n const isIframe = window !== window.top;\n const hasPlatformDimensions = Object.keys(window.Tecton?.platformDimensions ?? {}).length > 0;\n return isIframe && hasPlatformDimensions;\n }\n\n get providedDirection(): 'up' | 'down' | undefined {\n const { direction } = this;\n switch (direction) {\n case 'up':\n case 'down':\n return direction;\n default:\n return undefined;\n }\n }\n\n get validatedMaxHeight(): number | undefined {\n const { maxHeight } = this;\n return isNaN(maxHeight) ? undefined : maxHeight;\n }\n\n addViewportListeners() {\n window.addEventListener('resize', this.viewPortOrientationChanged);\n // #region remove when Popover API is supported in iOS\n window.addEventListener('scroll', this.viewPortChanged, { passive: true, capture: true });\n screen?.orientation?.addEventListener('change', this.viewPortOrientationChanged);\n window.addEventListener('orientationchange', this.viewPortOrientationChanged);\n\n // #endregion\n }\n\n clearCSSProperties() {\n this.containerElement.style.removeProperty('--comp-pop-max-height');\n this.containerElement.style.removeProperty('--comp-pop-top');\n this.containerElement.style.removeProperty('--comp-pop-bottom');\n this.containerElement.style.removeProperty('--comp-pop-left');\n this.containerElement.style.removeProperty('--comp-pop-right');\n this.containerElement.style.removeProperty('--comp-pop-width');\n this.containerElement.style.removeProperty('--comp-pop-opacity');\n }\n\n async determinePopDirection() {\n const { containerElement, controlElement, providedDirection, displayBuffer } = this;\n if (containerElement) containerElement.style.maxHeight = null;\n\n await waitForNextPaint();\n\n const { isModule } = this;\n const { top: controlTop, bottom: controlBottom } = controlElement?.getBoundingClientRect?.() ?? {\n top: 0,\n bottom: 0,\n };\n\n let windowHeight: number;\n let maxSpaceAbove: number;\n let maxSpaceBelow: number;\n\n if (isModule) {\n const { outletOffset = 0, innerHeight = window.innerHeight } = window.Tecton?.platformDimensions || {};\n const distanceToIframeBottom = window.visualViewport.height - controlBottom;\n const viewableSpaceBelow = innerHeight - (outletOffset + controlBottom);\n const isIframeShorterThanWindow = distanceToIframeBottom < viewableSpaceBelow;\n windowHeight = innerHeight;\n // If the top of the module is below the top of the window we just use the controlTop\n // Otherwise we need to add the outletOffset to the controlTop\n maxSpaceAbove = (outletOffset > 0 ? controlTop : controlTop + outletOffset) - displayBuffer;\n maxSpaceBelow = isIframeShorterThanWindow\n ? distanceToIframeBottom - displayBuffer\n : viewableSpaceBelow - displayBuffer;\n } else {\n windowHeight = window.visualViewport.height;\n maxSpaceAbove = controlTop - displayBuffer;\n maxSpaceBelow = windowHeight - controlBottom - displayBuffer;\n }\n\n const directionWithMostSpace: 'up' | 'down' = maxSpaceAbove > maxSpaceBelow ? 'up' : 'down';\n\n // We do not want to update the max height once the popover is open unless the page orientation shifts (resize or mobile use cases)\n const shouldUpdateMaxHeight =\n !containerElement.style.getPropertyValue('--comp-pop-max-height') || this.orientationChanged;\n // we do not want to constantly update the max-height after an orientation change, so we switch this back to false\n this.orientationChanged = false;\n const currentOrDetermineDirection = this.currentDirection || providedDirection || directionWithMostSpace;\n\n switch (currentOrDetermineDirection) {\n case 'up':\n if (shouldUpdateMaxHeight) {\n const priorityMaxHeight = this.validatedMaxHeight || maxSpaceAbove;\n const maxHeight = Math.min(maxSpaceAbove, priorityMaxHeight);\n containerElement.style.setProperty('--comp-pop-max-height', `${maxHeight}px`);\n }\n this.setDirectionAndShow('up');\n break;\n case 'down':\n if (shouldUpdateMaxHeight) {\n const priorityMaxHeight = this.validatedMaxHeight || maxSpaceBelow;\n const maxHeight = Math.min(maxSpaceBelow, priorityMaxHeight);\n containerElement.style.setProperty('--comp-pop-max-height', `${maxHeight}px`);\n }\n this.setDirectionAndShow('down');\n break;\n default:\n break;\n }\n }\n\n handleMinHeight = () => {\n if (this.minHeight) {\n handleDeprecationWarning(this, 'minHeight', 'prop');\n }\n };\n\n removeViewportListeners() {\n window.removeEventListener('resize', this.viewPortOrientationChanged);\n // #region remove when Popover API is supported in iOS\n window.removeEventListener('scroll', this.viewPortChanged);\n screen?.orientation?.removeEventListener('orientationchange', this.viewPortOrientationChanged);\n window.removeEventListener('orientationchange', this.viewPortOrientationChanged);\n\n // #endregion\n }\n\n setAbsoluteCSSProperties = async () => {\n const { controlElement, containerElement, currentDirection, align } = this;\n\n if (align === 'right') {\n containerElement.style.setProperty('--comp-pop-right', '0');\n containerElement.style.setProperty('--comp-pop-left', 'unset');\n } else {\n containerElement.style.setProperty('--comp-pop-left', '0');\n containerElement.style.setProperty('--comp-pop-right', 'unset');\n }\n\n if (this.block) {\n containerElement.style.setProperty('--comp-pop-width', '100%');\n }\n\n if (currentDirection === 'up') {\n const controlStyle = getComputedStyle(controlElement);\n const controlSize =\n parseInt(controlStyle.height || '0') +\n parseInt(controlStyle.borderTopWidth || '0') +\n parseInt(controlStyle.borderBottomWidth || '0');\n\n containerElement.style.setProperty('--comp-pop-bottom', `${controlSize}px`);\n }\n\n // Wait for one paint to prevent layout thrashing\n await waitForNextPaint();\n containerElement.style.setProperty('--comp-pop-opacity', '1');\n };\n\n setDirectionAndShow(direction: 'up' | 'down') {\n this.setRootElement();\n // Due to some runtime inconsistency across devices/browsers we need to add one more check here because the\n // popover can be closed between the time the popover is opened and the time the direction is determined\n const isOpen = this.open;\n if (!isOpen) return;\n\n this.currentDirection = direction;\n this.show = true;\n if (this.mode === 'legacy') {\n this.setAbsoluteCSSProperties();\n } else {\n this.setFixedCSSProperties();\n }\n }\n\n setFixedCSSProperties = async () => {\n const { controlElement, containerElement, currentDirection, rootElementRect } = this;\n const {\n top: controlTop,\n bottom: controlBottom,\n left: controlLeft,\n right: controlRight,\n } = controlElement?.getBoundingClientRect?.() ?? {\n top: 0,\n bottom: 0,\n left: 0,\n right: 0,\n };\n const popoverLeft: number = controlLeft - rootElementRect.left;\n\n if (this.block) containerElement.style.setProperty('--comp-pop-width', `${controlElement.offsetWidth || 0}px`);\n containerElement.style.setProperty('--comp-pop-left', `${popoverLeft}px`);\n containerElement.style.setProperty(\n '--comp-pop-right',\n `${rootElementRect.width + rootElementRect.left - controlRight}px`\n );\n\n if (currentDirection === 'up') {\n containerElement.style.setProperty(\n '--comp-pop-bottom',\n `${rootElementRect.height + rootElementRect.top - controlTop}px`\n );\n }\n if (currentDirection === 'down') {\n containerElement.style.setProperty('--comp-pop-top', `${controlBottom - rootElementRect.top}px`);\n }\n\n // Wait for one paint to prevent layout thrashing\n await waitForNextPaint();\n containerElement.style.setProperty('--comp-pop-opacity', '1');\n };\n\n setRootElement() {\n let currentElement: HTMLElement = this.hostElement;\n\n while (currentElement && currentElement !== document.documentElement) {\n const computedStyle = window.getComputedStyle(currentElement);\n\n // Check if the element has any styles applied that create a new containg block\n if (\n computedStyle.transform !== 'none' ||\n computedStyle.filter !== 'none' ||\n computedStyle.perspective !== 'none' ||\n computedStyle.containerType !== 'normal' ||\n ['transform', 'perspective', 'filter'].includes(computedStyle.willChange) ||\n ['layout', 'paint', 'strict', 'content'].includes(computedStyle.contain)\n ) {\n this.rootElementRect = currentElement.getBoundingClientRect();\n return;\n }\n\n const rootNode = currentElement.getRootNode();\n const isRootNodeWebComponent =\n typeof ShadowRoot !== 'undefined' &&\n rootNode instanceof ShadowRoot &&\n rootNode.host instanceof HTMLElement;\n if (isRootNodeWebComponent) {\n currentElement = rootNode.host;\n } else {\n currentElement = currentElement.parentElement;\n }\n }\n\n // Return the document's bounding rect if no element is found\n this.rootElementRect = {\n top: 0,\n bottom: 0,\n left: 0,\n right: 0,\n height: window.visualViewport.height,\n width: window.visualViewport.width,\n } as DOMRect;\n }\n\n viewPortChanged = () => {\n if (!this.open) return;\n this.determinePopDirection();\n };\n\n viewPortOrientationChanged = () => {\n this.orientationChanged = true;\n this.viewPortChanged();\n };\n\n // #endregion\n // #region Render Methods\n\n render() {\n const containerClasses = ['container', this.currentDirection];\n if (this.show) containerClasses.push('show');\n if (this.mode === 'legacy') containerClasses.push('legacy');\n\n return (\n <div\n ref={el => (this.containerElement = el)}\n class={containerClasses.join(' ')}\n test-id=\"outerContainer\"\n >\n <div\n ref={el => (this.contentElement = el)}\n class=\"content\"\n >\n <slot />\n </div>\n </div>\n );\n }\n\n // #endregion\n}\n"]}