q2-tecton-elements 1.56.2 → 1.56.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 (289) hide show
  1. package/dist/bundle-report.json +303 -245
  2. package/dist/cjs/{index-99667782.js → index-905f4c87.js} +1 -5
  3. package/dist/cjs/index-905f4c87.js.map +1 -0
  4. package/dist/cjs/loader.cjs.js +1 -1
  5. package/dist/cjs/q2-action-group.cjs.entry.js +2 -2
  6. package/dist/cjs/q2-action-sheet.cjs.entry.js +2 -2
  7. package/dist/cjs/q2-avatar.cjs.entry.js +1 -1
  8. package/dist/cjs/q2-badge_7.cjs.entry.js +12 -4
  9. package/dist/cjs/q2-badge_7.cjs.entry.js.map +1 -1
  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 +33 -32
  24. package/dist/cjs/q2-dropdown.cjs.entry.js.map +1 -1
  25. package/dist/cjs/q2-editable-field.cjs.entry.js +7 -8
  26. package/dist/cjs/q2-editable-field.cjs.entry.js.map +1 -1
  27. package/dist/cjs/q2-example.cjs.entry.js +1 -1
  28. package/dist/cjs/q2-file-picker.cjs.entry.js +1 -1
  29. package/dist/cjs/q2-form.cjs.entry.js +1 -1
  30. package/dist/cjs/q2-formatted-text.cjs.entry.js +1 -1
  31. package/dist/cjs/q2-item_3.cjs.entry.js +3 -3
  32. package/dist/cjs/q2-legend.cjs.entry.js +1 -1
  33. package/dist/cjs/q2-loc.cjs.entry.js +1 -1
  34. package/dist/cjs/q2-message.cjs.entry.js +2 -2
  35. package/dist/cjs/q2-modal.cjs.entry.js +2 -2
  36. package/dist/cjs/q2-month-picker.cjs.entry.js +3 -3
  37. package/dist/cjs/q2-optgroup.cjs.entry.js +2 -2
  38. package/dist/cjs/q2-option-list_2.cjs.entry.js +54 -63
  39. package/dist/cjs/q2-option-list_2.cjs.entry.js.map +1 -1
  40. package/dist/cjs/q2-option.cjs.entry.js +1 -1
  41. package/dist/cjs/q2-pagination.cjs.entry.js +4 -4
  42. package/dist/cjs/q2-pill.cjs.entry.js +2 -2
  43. package/dist/cjs/q2-radio-group.cjs.entry.js +1 -1
  44. package/dist/cjs/q2-radio.cjs.entry.js +1 -1
  45. package/dist/cjs/q2-relative-time.cjs.entry.js +2 -2
  46. package/dist/cjs/q2-resize-observer.cjs.entry.js +1 -1
  47. package/dist/cjs/q2-section.cjs.entry.js +3 -3
  48. package/dist/cjs/q2-select.cjs.entry.js +81 -11
  49. package/dist/cjs/q2-select.cjs.entry.js.map +1 -1
  50. package/dist/cjs/q2-stepper-pane.cjs.entry.js +1 -1
  51. package/dist/cjs/q2-stepper-vertical.cjs.entry.js +2 -2
  52. package/dist/cjs/q2-stepper.cjs.entry.js +2 -2
  53. package/dist/cjs/q2-tag.cjs.entry.js +2 -2
  54. package/dist/cjs/q2-tecton-elements.cjs.js +1 -1
  55. package/dist/cjs/q2-textarea.cjs.entry.js +3 -2
  56. package/dist/cjs/q2-textarea.cjs.entry.js.map +1 -1
  57. package/dist/cjs/q2-tooltip.cjs.entry.js +1 -1
  58. package/dist/cjs/tecton-tab-pane.cjs.entry.js +2 -2
  59. package/dist/collection/components/q2-action-group/q2-action-group.js +1 -1
  60. package/dist/collection/components/q2-action-sheet/q2-action-sheet.js +1 -1
  61. package/dist/collection/components/q2-avatar/q2-avatar.js +1 -1
  62. package/dist/collection/components/q2-btn/q2-btn.js +4 -0
  63. package/dist/collection/components/q2-btn/q2-btn.js.map +1 -1
  64. package/dist/collection/components/q2-calendar/q2-month-picker.js +2 -2
  65. package/dist/collection/components/q2-calendar/test/q2-calendar-test.e2e.js +2 -2
  66. package/dist/collection/components/q2-calendar/test/q2-calendar-test.e2e.js.map +1 -1
  67. package/dist/collection/components/q2-carousel-pane/q2-carousel-pane.js +2 -2
  68. package/dist/collection/components/q2-chart-area/q2-chart-area.js +1 -1
  69. package/dist/collection/components/q2-chart-bar/q2-chart-bar.js +1 -1
  70. package/dist/collection/components/q2-chart-donut/q2-chart-donut.js +1 -1
  71. package/dist/collection/components/q2-currency/q2-currency.js +1 -1
  72. package/dist/collection/components/q2-detail/q2-detail.js +1 -1
  73. package/dist/collection/components/q2-dropdown/q2-dropdown.js +33 -31
  74. package/dist/collection/components/q2-dropdown/q2-dropdown.js.map +1 -1
  75. package/dist/collection/components/q2-dropdown/test/q2-dropdown-test.e2e.js +34 -32
  76. package/dist/collection/components/q2-dropdown/test/q2-dropdown-test.e2e.js.map +1 -1
  77. package/dist/collection/components/q2-editable-field/q2-editable-field.js +12 -7
  78. package/dist/collection/components/q2-editable-field/q2-editable-field.js.map +1 -1
  79. package/dist/collection/components/q2-example/q2-example.js +1 -1
  80. package/dist/collection/components/q2-form/q2-form.js +1 -1
  81. package/dist/collection/components/q2-formatted-text/q2-formatted-text.js +1 -1
  82. package/dist/collection/components/q2-icon/q2-icon.js +4 -0
  83. package/dist/collection/components/q2-icon/q2-icon.js.map +1 -1
  84. package/dist/collection/components/q2-input/q2-input.js +1 -1
  85. package/dist/collection/components/q2-item/q2-item.js +1 -1
  86. package/dist/collection/components/q2-legend/q2-legend.js +1 -1
  87. package/dist/collection/components/q2-list/q2-list.js +1 -1
  88. package/dist/collection/components/q2-message/q2-message.js +1 -1
  89. package/dist/collection/components/q2-modal/q2-modal.js +1 -1
  90. package/dist/collection/components/q2-optgroup/q2-optgroup.js +1 -1
  91. package/dist/collection/components/q2-pagination/q2-pagination.js +3 -3
  92. package/dist/collection/components/q2-pagination/test/q2-pagination-test.e2e.js +1 -0
  93. package/dist/collection/components/q2-pagination/test/q2-pagination-test.e2e.js.map +1 -1
  94. package/dist/collection/components/q2-pill/q2-pill.js +1 -1
  95. package/dist/collection/components/q2-popover/q2-popover.css +18 -10
  96. package/dist/collection/components/q2-popover/q2-popover.js +55 -63
  97. package/dist/collection/components/q2-popover/q2-popover.js.map +1 -1
  98. package/dist/collection/components/q2-popover/test/q2-popover-test.e2e.js +1 -34
  99. package/dist/collection/components/q2-popover/test/q2-popover-test.e2e.js.map +1 -1
  100. package/dist/collection/components/q2-popover/test/q2-popover-test.spec.js +743 -435
  101. package/dist/collection/components/q2-popover/test/q2-popover-test.spec.js.map +1 -1
  102. package/dist/collection/components/q2-relative-time/q2-relative-time.js +1 -1
  103. package/dist/collection/components/q2-resize-observer/q2-resize-observer.js +1 -1
  104. package/dist/collection/components/q2-section/q2-section.js +2 -2
  105. package/dist/collection/components/q2-select/q2-select.js +96 -14
  106. package/dist/collection/components/q2-select/q2-select.js.map +1 -1
  107. package/dist/collection/components/q2-select/test/q2-select-test.spec.js +327 -0
  108. package/dist/collection/components/q2-select/test/q2-select-test.spec.js.map +1 -1
  109. package/dist/collection/components/q2-stepper/q2-stepper.js +1 -1
  110. package/dist/collection/components/q2-stepper-vertical/q2-stepper-vertical.js +1 -1
  111. package/dist/collection/components/q2-tab-container/q2-tab-container.js +1 -1
  112. package/dist/collection/components/q2-tab-pane/q2-tab-pane.js +1 -1
  113. package/dist/collection/components/q2-tag/q2-tag.js +1 -1
  114. package/dist/collection/components/q2-tag/test/q2-tag-test.e2e.js +5 -0
  115. package/dist/collection/components/q2-tag/test/q2-tag-test.e2e.js.map +1 -1
  116. package/dist/collection/components/q2-textarea/q2-textarea.js +2 -1
  117. package/dist/collection/components/q2-textarea/q2-textarea.js.map +1 -1
  118. package/dist/collection/components/tecton-tab-pane/tecton-tab-pane.js +2 -2
  119. package/dist/components/index2.js +1 -4
  120. package/dist/components/index2.js.map +1 -1
  121. package/dist/components/q2-action-group2.js +1 -1
  122. package/dist/components/q2-action-sheet.js +1 -1
  123. package/dist/components/q2-avatar2.js +1 -1
  124. package/dist/components/q2-btn2.js +4 -0
  125. package/dist/components/q2-btn2.js.map +1 -1
  126. package/dist/components/q2-carousel-pane.js +2 -2
  127. package/dist/components/q2-chart-area.js +1 -1
  128. package/dist/components/q2-chart-bar.js +1 -1
  129. package/dist/components/q2-chart-donut.js +1 -1
  130. package/dist/components/q2-currency.js +1 -1
  131. package/dist/components/q2-detail.js +1 -1
  132. package/dist/components/q2-dropdown.js +32 -31
  133. package/dist/components/q2-dropdown.js.map +1 -1
  134. package/dist/components/q2-editable-field.js +7 -8
  135. package/dist/components/q2-editable-field.js.map +1 -1
  136. package/dist/components/q2-example.js +1 -1
  137. package/dist/components/q2-form.js +1 -1
  138. package/dist/components/q2-formatted-text.js +1 -1
  139. package/dist/components/q2-icon2.js +4 -0
  140. package/dist/components/q2-icon2.js.map +1 -1
  141. package/dist/components/q2-input2.js +1 -1
  142. package/dist/components/q2-item2.js +1 -1
  143. package/dist/components/q2-legend2.js +1 -1
  144. package/dist/components/q2-list2.js +1 -1
  145. package/dist/components/q2-message2.js +1 -1
  146. package/dist/components/q2-modal.js +1 -1
  147. package/dist/components/q2-month-picker.js +2 -2
  148. package/dist/components/q2-optgroup2.js +1 -1
  149. package/dist/components/q2-pagination.js +3 -3
  150. package/dist/components/q2-pill.js +1 -1
  151. package/dist/components/q2-popover2.js +54 -63
  152. package/dist/components/q2-popover2.js.map +1 -1
  153. package/dist/components/q2-relative-time.js +1 -1
  154. package/dist/components/q2-resize-observer2.js +1 -1
  155. package/dist/components/q2-section.js +2 -2
  156. package/dist/components/q2-select2.js +84 -14
  157. package/dist/components/q2-select2.js.map +1 -1
  158. package/dist/components/q2-stepper-vertical.js +1 -1
  159. package/dist/components/q2-stepper.js +1 -1
  160. package/dist/components/q2-tab-container.js +1 -1
  161. package/dist/components/q2-tab-pane.js +1 -1
  162. package/dist/components/q2-tag.js +1 -1
  163. package/dist/components/q2-textarea.js +2 -1
  164. package/dist/components/q2-textarea.js.map +1 -1
  165. package/dist/components/tecton-tab-pane.js +2 -2
  166. package/dist/esm/{index-c215e8ef.js → index-f2a66217.js} +2 -5
  167. package/dist/esm/index-f2a66217.js.map +1 -0
  168. package/dist/esm/loader.js +1 -1
  169. package/dist/esm/q2-action-group.entry.js +2 -2
  170. package/dist/esm/q2-action-sheet.entry.js +2 -2
  171. package/dist/esm/q2-avatar.entry.js +1 -1
  172. package/dist/esm/q2-badge_7.entry.js +12 -4
  173. package/dist/esm/q2-badge_7.entry.js.map +1 -1
  174. package/dist/esm/q2-calendar.entry.js +1 -1
  175. package/dist/esm/q2-card.entry.js +1 -1
  176. package/dist/esm/q2-carousel-pane.entry.js +3 -3
  177. package/dist/esm/q2-carousel.entry.js +1 -1
  178. package/dist/esm/q2-chart-area.entry.js +2 -2
  179. package/dist/esm/q2-chart-bar.entry.js +2 -2
  180. package/dist/esm/q2-chart-donut.entry.js +2 -2
  181. package/dist/esm/q2-checkbox-group.entry.js +1 -1
  182. package/dist/esm/q2-checkbox.entry.js +1 -1
  183. package/dist/esm/q2-currency.entry.js +1 -1
  184. package/dist/esm/q2-data-table.entry.js +1 -1
  185. package/dist/esm/q2-detail.entry.js +2 -2
  186. package/dist/esm/q2-dropdown-item.entry.js +1 -1
  187. package/dist/esm/q2-dropdown.entry.js +33 -32
  188. package/dist/esm/q2-dropdown.entry.js.map +1 -1
  189. package/dist/esm/q2-editable-field.entry.js +7 -8
  190. package/dist/esm/q2-editable-field.entry.js.map +1 -1
  191. package/dist/esm/q2-example.entry.js +1 -1
  192. package/dist/esm/q2-file-picker.entry.js +1 -1
  193. package/dist/esm/q2-form.entry.js +1 -1
  194. package/dist/esm/q2-formatted-text.entry.js +1 -1
  195. package/dist/esm/q2-item_3.entry.js +3 -3
  196. package/dist/esm/q2-legend.entry.js +1 -1
  197. package/dist/esm/q2-loc.entry.js +1 -1
  198. package/dist/esm/q2-message.entry.js +2 -2
  199. package/dist/esm/q2-modal.entry.js +2 -2
  200. package/dist/esm/q2-month-picker.entry.js +3 -3
  201. package/dist/esm/q2-optgroup.entry.js +2 -2
  202. package/dist/esm/q2-option-list_2.entry.js +54 -63
  203. package/dist/esm/q2-option-list_2.entry.js.map +1 -1
  204. package/dist/esm/q2-option.entry.js +1 -1
  205. package/dist/esm/q2-pagination.entry.js +4 -4
  206. package/dist/esm/q2-pill.entry.js +2 -2
  207. package/dist/esm/q2-radio-group.entry.js +1 -1
  208. package/dist/esm/q2-radio.entry.js +1 -1
  209. package/dist/esm/q2-relative-time.entry.js +2 -2
  210. package/dist/esm/q2-resize-observer.entry.js +1 -1
  211. package/dist/esm/q2-section.entry.js +3 -3
  212. package/dist/esm/q2-select.entry.js +82 -12
  213. package/dist/esm/q2-select.entry.js.map +1 -1
  214. package/dist/esm/q2-stepper-pane.entry.js +1 -1
  215. package/dist/esm/q2-stepper-vertical.entry.js +2 -2
  216. package/dist/esm/q2-stepper.entry.js +2 -2
  217. package/dist/esm/q2-tag.entry.js +2 -2
  218. package/dist/esm/q2-tecton-elements.js +1 -1
  219. package/dist/esm/q2-textarea.entry.js +3 -2
  220. package/dist/esm/q2-textarea.entry.js.map +1 -1
  221. package/dist/esm/q2-tooltip.entry.js +1 -1
  222. package/dist/esm/tecton-tab-pane.entry.js +2 -2
  223. package/dist/q2-tecton-elements/{index-c215e8ef.js → index-f2a66217.js} +2 -6
  224. package/dist/q2-tecton-elements/index-f2a66217.js.map +1 -0
  225. package/dist/q2-tecton-elements/q2-action-group.entry.js +4 -4
  226. package/dist/q2-tecton-elements/q2-action-sheet.entry.js +9 -9
  227. package/dist/q2-tecton-elements/q2-avatar.entry.js +6 -6
  228. package/dist/q2-tecton-elements/q2-badge_7.entry.js +50 -42
  229. package/dist/q2-tecton-elements/q2-badge_7.entry.js.map +1 -1
  230. package/dist/q2-tecton-elements/q2-calendar.entry.js +1 -1
  231. package/dist/q2-tecton-elements/q2-card.entry.js +1 -1
  232. package/dist/q2-tecton-elements/q2-carousel-pane.entry.js +21 -21
  233. package/dist/q2-tecton-elements/q2-carousel.entry.js +1 -1
  234. package/dist/q2-tecton-elements/q2-chart-area.entry.js +3 -3
  235. package/dist/q2-tecton-elements/q2-chart-bar.entry.js +80 -80
  236. package/dist/q2-tecton-elements/q2-chart-donut.entry.js +7 -7
  237. package/dist/q2-tecton-elements/q2-checkbox-group.entry.js +1 -1
  238. package/dist/q2-tecton-elements/q2-checkbox.entry.js +1 -1
  239. package/dist/q2-tecton-elements/q2-currency.entry.js +6 -6
  240. package/dist/q2-tecton-elements/q2-data-table.entry.js +1 -1
  241. package/dist/q2-tecton-elements/q2-detail.entry.js +39 -39
  242. package/dist/q2-tecton-elements/q2-dropdown-item.entry.js +1 -1
  243. package/dist/q2-tecton-elements/q2-dropdown.entry.js +81 -79
  244. package/dist/q2-tecton-elements/q2-dropdown.entry.js.map +1 -1
  245. package/dist/q2-tecton-elements/q2-editable-field.entry.js +32 -23
  246. package/dist/q2-tecton-elements/q2-editable-field.entry.js.map +1 -1
  247. package/dist/q2-tecton-elements/q2-example.entry.js +1 -1
  248. package/dist/q2-tecton-elements/q2-file-picker.entry.js +1 -1
  249. package/dist/q2-tecton-elements/q2-form.entry.js +10 -10
  250. package/dist/q2-tecton-elements/q2-formatted-text.entry.js +2 -2
  251. package/dist/q2-tecton-elements/q2-item_3.entry.js +19 -19
  252. package/dist/q2-tecton-elements/q2-legend.entry.js +2 -2
  253. package/dist/q2-tecton-elements/q2-loc.entry.js +1 -1
  254. package/dist/q2-tecton-elements/q2-message.entry.js +6 -6
  255. package/dist/q2-tecton-elements/q2-modal.entry.js +24 -24
  256. package/dist/q2-tecton-elements/q2-month-picker.entry.js +67 -67
  257. package/dist/q2-tecton-elements/q2-optgroup.entry.js +8 -8
  258. package/dist/q2-tecton-elements/q2-option-list_2.entry.js +155 -154
  259. package/dist/q2-tecton-elements/q2-option-list_2.entry.js.map +1 -1
  260. package/dist/q2-tecton-elements/q2-option.entry.js +1 -1
  261. package/dist/q2-tecton-elements/q2-pagination.entry.js +42 -42
  262. package/dist/q2-tecton-elements/q2-pill.entry.js +14 -14
  263. package/dist/q2-tecton-elements/q2-radio-group.entry.js +1 -1
  264. package/dist/q2-tecton-elements/q2-radio.entry.js +13 -13
  265. package/dist/q2-tecton-elements/q2-relative-time.entry.js +5 -5
  266. package/dist/q2-tecton-elements/q2-resize-observer.entry.js +1 -1
  267. package/dist/q2-tecton-elements/q2-section.entry.js +23 -23
  268. package/dist/q2-tecton-elements/q2-select.entry.js +146 -88
  269. package/dist/q2-tecton-elements/q2-select.entry.js.map +1 -1
  270. package/dist/q2-tecton-elements/q2-stepper-pane.entry.js +1 -1
  271. package/dist/q2-tecton-elements/q2-stepper-vertical.entry.js +5 -5
  272. package/dist/q2-tecton-elements/q2-stepper.entry.js +21 -21
  273. package/dist/q2-tecton-elements/q2-tag.entry.js +6 -6
  274. package/dist/q2-tecton-elements/q2-tecton-elements.esm.js +1 -1
  275. package/dist/q2-tecton-elements/q2-tecton-elements.esm.js.map +1 -1
  276. package/dist/q2-tecton-elements/q2-textarea.entry.js +4 -3
  277. package/dist/q2-tecton-elements/q2-textarea.entry.js.map +1 -1
  278. package/dist/q2-tecton-elements/q2-tooltip.entry.js +1 -1
  279. package/dist/q2-tecton-elements/tecton-tab-pane.entry.js +6 -6
  280. package/dist/types/components/q2-btn/q2-btn.d.ts +1 -0
  281. package/dist/types/components/q2-dropdown/q2-dropdown.d.ts +7 -8
  282. package/dist/types/components/q2-editable-field/q2-editable-field.d.ts +2 -1
  283. package/dist/types/components/q2-icon/q2-icon.d.ts +1 -0
  284. package/dist/types/components/q2-popover/q2-popover.d.ts +4 -4
  285. package/dist/types/components/q2-select/q2-select.d.ts +18 -0
  286. package/package.json +3 -3
  287. package/dist/cjs/index-99667782.js.map +0 -1
  288. package/dist/esm/index-c215e8ef.js.map +0 -1
  289. package/dist/q2-tecton-elements/index-c215e8ef.js.map +0 -1
@@ -274,7 +274,7 @@ const Q2Pagination$1 = /*@__PURE__*/ proxyCustomElement(class Q2Pagination exten
274
274
  total,
275
275
  });
276
276
  }
277
- return (h("nav", { key: 'e4616477b30fd7dd28fa3a4e62592b214b69b9f6', class: "container", ref: el => (this.containerElement = el), "aria-label": loc('tecton.element.pagination.title') }, h("div", { key: 'cdb3e35325c438a0206d652bd98153a1aeeedf2d', class: "description", "test-id": "description" }, pagesOnly
277
+ return (h("nav", { key: '8cd6c3b284ae35fa5ad3ec0efcccd801c01e4f2b', class: "container", ref: el => (this.containerElement = el), "aria-label": loc('tecton.element.pagination.title') }, h("div", { key: 'bb6134c23085c3533cc4c8d9890d92ea0e8aa975', class: "description", "test-id": "description" }, pagesOnly
278
278
  ? loc('tecton.element.pagination.pages', {
279
279
  current: page,
280
280
  total: totalPages,
@@ -283,10 +283,10 @@ const Q2Pagination$1 = /*@__PURE__*/ proxyCustomElement(class Q2Pagination exten
283
283
  range: currentRange,
284
284
  recordType: recordType.toLowerCase(),
285
285
  total: total.toLocaleString(),
286
- })), h("div", { key: '2cf40274735d444078640a3dae49cf8cce8bcd75', class: "btn-group" }, h("q2-btn", { key: 'b2a59683e6de97296185a1660f28215836480c66', ref: el => (this.firstPageBtn = el), label: loc('tecton.element.pagination.goToFirstPage'), disabled: onFirstPage, hidden: isFullViewHidden, onClick: () => this.handlePageChange(1), "test-id": "firstPageBtn", "hide-label": true }, h("q2-icon", { key: '4adbaba53706f3c5d9086654819ecd5c27d33e95', type: "chevron-double-left" })), h("q2-btn", { key: 'b6f7b9c964a7dd0b9cfe351830c49232685f0d8f', ref: el => (this.prevPageBtn = el), label: prevButtonLabel, disabled: onFirstPage, onClick: () => this.handlePageChange(page - 1), "test-id": "prevPageBtn", "hide-label": true }, h("q2-icon", { key: '6d83cd40ad0bb0fba1bd68b614c964a5c167301f', type: "chevron-left" }))), h("div", { key: '70f0ac1e14080a6040a15f763e1dabc8f7272ddb', class: "controls", hidden: isFullViewHidden, "test-id": "controls" }, h("span", { key: '47a5bd6f4f7749ebbba5b6905a2e972be60699ef', "aria-hidden": "true" }, loc('tecton.element.pagination.page')), h("div", { key: '1fcba245b6947317d9bdb4477ff7e0d96ec1c80f', class: "input-wrapper", onClick: () => this.inputField.dispatchEvent(new FocusEvent('focus')) }, h("q2-input", { key: '749b9f09f0b81aae7fb71bdf319a757560df2952', ref: el => (this.inputField = el), type: "number", value: `${page}`, min: 1, max: this.totalPages, hideLabel: true, optional: true, label: `${loc('tecton.element.pagination.page')} (${loc('tecton.element.pagination.ofPages', [totalPages.toLocaleString()])})`, onChange: event => {
286
+ })), h("div", { key: 'eee9fb85bce54d23555e8798aea5730655dab4e2', class: "btn-group" }, h("q2-btn", { key: '989e82c55e507e463e0663e5614535cabf0c87b2', ref: el => (this.firstPageBtn = el), label: loc('tecton.element.pagination.goToFirstPage'), disabled: onFirstPage, hidden: isFullViewHidden, onClick: () => this.handlePageChange(1), "test-id": "firstPageBtn", "hide-label": true }, h("q2-icon", { key: '06962d6321e19b5b0c3cb1e26d3f8e03c6c7128d', type: "chevron-double-left" })), h("q2-btn", { key: 'a24b7078e8ba50396b9b37f4a78dedf7d2754c31', ref: el => (this.prevPageBtn = el), label: prevButtonLabel, disabled: onFirstPage, onClick: () => this.handlePageChange(page - 1), "test-id": "prevPageBtn", "hide-label": true }, h("q2-icon", { key: '856160008f6b5894787e0fb49ca2db740953aae0', type: "chevron-left" }))), h("div", { key: '944fa4562795ceed2a6750be5eb89416054b3416', class: "controls", hidden: isFullViewHidden, "test-id": "controls" }, h("span", { key: '7322ff93da2f2cbe2d1b5a5b7f529edece073ca9', "aria-hidden": "true" }, loc('tecton.element.pagination.page')), h("div", { key: 'ae62eec868897426e817d83833f68081515144a9', class: "input-wrapper", onClick: () => this.inputField.dispatchEvent(new FocusEvent('focus')) }, h("q2-input", { key: 'e3bff9c345bbe1c333ba846f9688d0858a87f0e1', ref: el => (this.inputField = el), type: "number", value: `${page}`, min: 1, max: this.totalPages, hideLabel: true, optional: true, label: `${loc('tecton.element.pagination.page')} (${loc('tecton.element.pagination.ofPages', [totalPages.toLocaleString()])})`, onChange: event => {
287
287
  event.stopPropagation();
288
288
  this.handlePageChange(event.detail.value);
289
- }, "test-id": "pageInput", current: "page" })), h("span", { key: '5487f5759ebf662bc707a49fb8335d8ef77717b0', "aria-hidden": "true" }, loc('tecton.element.pagination.ofPages', [totalPages.toLocaleString()]))), h("div", { key: 'f64e38fb2bf0e0983369f588d033320233bfc4b3', class: "btn-group" }, h("q2-btn", { key: 'd74c44f3e2bded92bf85f0daf6c2d67497a3c023', ref: el => (this.nextPageBtn = el), label: nextButtonLabel, disabled: onLastPage, onClick: () => this.handlePageChange(page + 1), "test-id": "nextPageBtn", "hide-label": true }, h("q2-icon", { key: 'e2155fbcda5cb0228f577080efee7b9d66e2f40b', type: "chevron-right" })), h("q2-btn", { key: '904be8a1533f3c3889271ab0b0c82e3a6b72333f', ref: el => (this.lastPageBtn = el), label: "tecton.element.pagination.goToLastPage", disabled: onLastPage, hidden: isFullViewHidden, onClick: () => this.handlePageChange(totalPages), "test-id": "lastPageBtn", "hide-label": true }, h("q2-icon", { key: 'f0d9534001ffe5d53014a3a9f8f0d7b1249a63b7', type: "chevron-double-right" }))), h("div", { key: 'fd19931080ddfd62048fbdd56ac672d902a4897e', class: "per-page", hidden: isFullViewHidden || !((_a = this.perPageIncrements) === null || _a === void 0 ? void 0 : _a.length) }, showPerPageSelect && this.renderPerPage())));
289
+ }, "test-id": "pageInput", current: "page" })), h("span", { key: 'a49b6c4761f6a2f0e47d2d2aeade1afa397e91f6', "aria-hidden": "true" }, loc('tecton.element.pagination.ofPages', [totalPages.toLocaleString()]))), h("div", { key: '2b5ea02f813c83971e5d76a0e787026396a5b861', class: "btn-group" }, h("q2-btn", { key: '4ef7c19dc1d875c83943f137c49a89a3c7133710', ref: el => (this.nextPageBtn = el), label: nextButtonLabel, disabled: onLastPage, onClick: () => this.handlePageChange(page + 1), "test-id": "nextPageBtn", "hide-label": true }, h("q2-icon", { key: '2f6dcbf7289ad071e69d826f878ccb60b0a25089', type: "chevron-right" })), h("q2-btn", { key: 'b2243b300fc640656172947c32f85d1d5968f377', ref: el => (this.lastPageBtn = el), label: "tecton.element.pagination.goToLastPage", disabled: onLastPage, hidden: isFullViewHidden, onClick: () => this.handlePageChange(totalPages), "test-id": "lastPageBtn", "hide-label": true }, h("q2-icon", { key: 'ae96242ad2e130dc5983b2558e51670489e10754', type: "chevron-double-right" }))), h("div", { key: '2ffa172543ca869e835237479e9f54bf4a832557', class: "per-page", hidden: isFullViewHidden || !((_a = this.perPageIncrements) === null || _a === void 0 ? void 0 : _a.length) }, showPerPageSelect && this.renderPerPage())));
290
290
  }
291
291
  get hostElement() { return this; }
292
292
  static get watchers() { return {
@@ -354,7 +354,7 @@ const Q2Pill$1 = /*@__PURE__*/ proxyCustomElement(class Q2Pill extends HTMLEleme
354
354
  wrapperClassNames.push('has-icon');
355
355
  if (optionCount)
356
356
  wrapperClassNames.push('has-options');
357
- return (h("click-elsewhere", { key: '1a38e1b79a2374179402a38766d71d4b0e0c87c2', onChange: this.onClickElsewhere }, h("div", { key: '42449fc55a6e5e376e6988cd98b8ada97fe7b354', class: wrapperClassNames.join(' ') }, h("div", { key: '064912bd05367c774b4ed3e279006e92bd362fac', class: "btn-height-wrapper", ref: el => (this.primaryBtnWrapper = el), onClick: this.handleWrapperClick, tabIndex: -1 }, h("button", { key: 'c8c9ff305b0a5034bb2267c48df93742dc55b893', class: "btn-primary", "test-id": "btn-control", type: "button", role: (optionCount && 'combobox') || undefined, ref: el => (this.primaryBtn = el), onClick: this.handleClick, onKeyDown: this.handleKeydown, onFocusout: this.handleFocusOut, disabled: this.disabled, "aria-roledescription": !optionCount && 'filter', "aria-controls": (optionCount && 'option-list') || undefined, "aria-expanded": (optionCount && `${!!open}`) || undefined, "aria-label": this.buttonContent, "aria-describedby": (optionCount && 'option-description') || undefined }, this.truncatedButtonContent, !optionCount && active && h("span", { key: '6f43159191e9b0a8c4f91a5d039df0470aa81989', class: "sr" }, "(", loc('tecton.element.pill.active'), ")"))), this.renderIcon(), !!optionCount && this.renderHiddenElement()), this.optionCount > 0 && (h("q2-popover", { key: '4753edbf7ccc743fe250a1de1c4764e946a9808e', ref: el => (this.popoverElement = el), controlElement: this.primaryBtn, open: this.open, "max-height": this.popoverMaxHeight, minHeight: this.popoverMinHeight, direction: this.popoverDirection, align: this.popoverAlignment, onFocusout: this.handleFocusOut }, h("div", { key: 'd69a33c01a2ac50578b61f534dfbbe4e0bb6b70e', class: "popover-content" }, h("div", { key: '86414eeb865a4a2bf9794743abb0320e549861d6', ref: el => (this.popoverTopContainer = el), class: "popover-top-container", tabindex: "-1", hidden: !this.hasPopoverTop, onKeyDown: this.handleKeydown }, h("slot", { key: 'b5de1db64154afb5c436371f0e3e18900c179517', name: "popover-top" })), h("q2-option-list", { key: 'dacf5eb6be2ba24ed9c4ed0e47d56a30d2a8b29f', type: "listbox", ref: el => (this.optionList = el), id: "option-list", onChange: this.handleChange, multiple: this.multiple, selectedOptions: this.selectedOptions, onReady: () => this.updateSelectedOptionElements(), label: loc('tecton.element.optionList.label', [this.optionListLabel]) }, h("slot", { key: 'daba4b0b15124d315df04d3c9d854aa7f65c72b8' })), h("div", { key: 'a57ffcdc81ac2221d39182beea673b31b57edd2d', ref: el => (this.popoverBottomContainer = el), class: "popover-bottom-container", tabindex: "-1", hidden: !this.hasPopoverBottom, onKeyDown: this.handleKeydown }, h("slot", { key: '3486555868e3b2825a3dc413a3f0146ddd3eb8d5', name: "popover-bottom" })))))));
357
+ return (h("click-elsewhere", { key: '39b8191efec50c57a7a99a32ef75cfd1cc077542', onChange: this.onClickElsewhere }, h("div", { key: '567cd1584f0ba37881c05e2874f53c7c0c7fcb95', class: wrapperClassNames.join(' ') }, h("div", { key: '069dfffaac43291cdab44de446f0a2279f6252be', class: "btn-height-wrapper", ref: el => (this.primaryBtnWrapper = el), onClick: this.handleWrapperClick, tabIndex: -1 }, h("button", { key: '0bb5a84f2ff5e53a6ceb78700377d345644a96ef', class: "btn-primary", "test-id": "btn-control", type: "button", role: (optionCount && 'combobox') || undefined, ref: el => (this.primaryBtn = el), onClick: this.handleClick, onKeyDown: this.handleKeydown, onFocusout: this.handleFocusOut, disabled: this.disabled, "aria-roledescription": !optionCount && 'filter', "aria-controls": (optionCount && 'option-list') || undefined, "aria-expanded": (optionCount && `${!!open}`) || undefined, "aria-label": this.buttonContent, "aria-describedby": (optionCount && 'option-description') || undefined }, this.truncatedButtonContent, !optionCount && active && h("span", { key: '32e5c78e876f9a45fc030bb5b2c1db7f55b31094', class: "sr" }, "(", loc('tecton.element.pill.active'), ")"))), this.renderIcon(), !!optionCount && this.renderHiddenElement()), this.optionCount > 0 && (h("q2-popover", { key: '03700b0b36ae8679c383ddda879036be0154d51c', ref: el => (this.popoverElement = el), controlElement: this.primaryBtn, open: this.open, "max-height": this.popoverMaxHeight, minHeight: this.popoverMinHeight, direction: this.popoverDirection, align: this.popoverAlignment, onFocusout: this.handleFocusOut }, h("div", { key: '271a56c5bb184c65b2b9b334e962d220008c35b2', class: "popover-content" }, h("div", { key: 'a7a3454c9592d29bb6af477dfd4a7582f7167984', ref: el => (this.popoverTopContainer = el), class: "popover-top-container", tabindex: "-1", hidden: !this.hasPopoverTop, onKeyDown: this.handleKeydown }, h("slot", { key: '7e81948063866a172018203d1add5ce48f533093', name: "popover-top" })), h("q2-option-list", { key: 'e83afc508bf20d9eeb8154d79afa6a4792ab3def', type: "listbox", ref: el => (this.optionList = el), id: "option-list", onChange: this.handleChange, multiple: this.multiple, selectedOptions: this.selectedOptions, onReady: () => this.updateSelectedOptionElements(), label: loc('tecton.element.optionList.label', [this.optionListLabel]) }, h("slot", { key: '2c5227d4994484480915d59b00266f38fe30b40d' })), h("div", { key: 'a70b7e91ba7c1f2826881d983ee44433687752c9', ref: el => (this.popoverBottomContainer = el), class: "popover-bottom-container", tabindex: "-1", hidden: !this.hasPopoverBottom, onKeyDown: this.handleKeydown }, h("slot", { key: 'ed2a086eeee755951a42dcf985519cfde693cf85', name: "popover-bottom" })))))));
358
358
  }
359
359
  get hostElement() { return this; }
360
360
  static get watchers() { return {
@@ -1,7 +1,7 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
2
- import { k as handleDeprecationWarning, w as waitForNextPaint, v as isAndroid } from './index2.js';
2
+ import { k as handleDeprecationWarning, w as waitForNextPaint } from './index2.js';
3
3
 
4
- const q2PopoverCss = "*{box-sizing:border-box}*:active{outline:none}*:focus{outline:none;box-shadow:var(--const-double-focus-ring, 0 0 0 2px #ffffff, 0 0 0 4px #0066cc)}:host{box-shadow:none !important}::-moz-focus-inner{border:none}input,textarea,button{font-family:inherit;font-size:inherit;font-stretch:inherit}:host(.sr),:host(.sr) button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.sr,.sr button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.hidden{display:none}:host([hidden]){display:none}.invisible{visibility:hidden}.container{display:none}.show{display:block;position:fixed;z-index:var(--tct-popover-z-index, 50);margin:0;padding:0;overflow:auto;background:var(--tct-popover-background, var(--app-white, #ffffff));color:var(--tct-popover-font-color, var(--t-text, #4d4d4d));min-width:var(--tct-popover-min-width, 135px);margin-block:var(--tct-popover-margin-block, 0);box-shadow:var(--tct-popover-box-shadow, var(--app-shadow-1, 0px 0px 2px rgba(0, 0, 0, 0.12), 0px 2px 4px rgba(0, 0, 0, 0.14)));border-width:var(--tct-popover-border-width, 0);border-style:solid;border-color:var(--tct-popover-border-color, transparent);border-radius:var(--tct-popover-border-radius, 0);max-height:var(--comp-pop-max-height);left:var(--comp-pop-left);opacity:var(--comp-pop-opacity, 0);--comp-scrollbar-size:var(--tct-scrollbar-size, var(--t-scrollbar-size, var(--app-scale-1x, 5px)));--comp-scrollbar-border-radius:var(--tct-scrollbar-border-radius, var(--t-scrollbar-border-radius, var(--app-border-radius-1, 4px)));--comp-scrollbar-color:var(--tct-scrollbar-color, var(--t-scrollbar-color, var(--t-a11y-gray-color, #747474)));scrollbar-width:thin;scrollbar-color:var(--comp-scrollbar-color) transparent}:host([block]) .show{right:unset;width:var(--comp-pop-width);min-width:var(--tct-popover-min-width, unset)}:host([align=left]) .show{left:var(--comp-pop-left);right:unset}:host([align=right]) .show{right:var(--comp-pop-right);left:unset}.show.down{top:var(--tct-popover-top, var(--comp-pop-top));bottom:unset}.show.up{top:unset;bottom:var(--comp-pop-bottom)}.show.legacy{position:absolute}.show::-webkit-scrollbar{width:var(--comp-scrollbar-size);height:var(--comp-scrollbar-size);margin:5px}.show::-webkit-scrollbar-thumb{background:var(--comp-scrollbar-color);border-radius:var(--comp-scrollbar-border-radius)}.show::-webkit-scrollbar-track{background:transparent;border-radius:var(--comp-scrollbar-border-radius)}click-elsewhere{position:relative;display:block}";
4
+ const q2PopoverCss = "*{box-sizing:border-box}*:active{outline:none}*:focus{outline:none;box-shadow:var(--const-double-focus-ring, 0 0 0 2px #ffffff, 0 0 0 4px #0066cc)}:host{box-shadow:none !important}::-moz-focus-inner{border:none}input,textarea,button{font-family:inherit;font-size:inherit;font-stretch:inherit}:host(.sr),:host(.sr) button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.sr,.sr button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.hidden{display:none}:host([hidden]){display:none}.invisible{visibility:hidden}.legacy.container{display:none}.legacy.show{display:block;z-index:var(--tct-popover-z-index, 50)}:popover-open,.show{position:absolute;margin:0;padding:0;overflow:auto;background:var(--tct-popover-background, var(--app-white, #ffffff));color:var(--tct-popover-font-color, var(--t-text, #4d4d4d));min-width:var(--tct-popover-min-width, 135px);margin-block:var(--tct-popover-margin-block, 0);box-shadow:var(--tct-popover-box-shadow, var(--app-shadow-1, 0px 0px 2px rgba(0, 0, 0, 0.12), 0px 2px 4px rgba(0, 0, 0, 0.14)));border-width:var(--tct-popover-border-width, 0);border-style:solid;border-color:var(--tct-popover-border-color, transparent);border-radius:var(--tct-popover-border-radius, 0);max-height:var(--comp-pop-max-height);left:var(--comp-pop-left);opacity:var(--comp-pop-opacity, 0);--comp-scrollbar-size:var(--tct-scrollbar-size, var(--t-scrollbar-size, var(--app-scale-1x, 5px)));--comp-scrollbar-border-radius:var(--tct-scrollbar-border-radius, var(--t-scrollbar-border-radius, var(--app-border-radius-1, 4px)));--comp-scrollbar-color:var(--tct-scrollbar-color, var(--t-scrollbar-color, var(--t-a11y-gray-color, #747474)));scrollbar-width:thin;scrollbar-color:var(--comp-scrollbar-color) transparent}:popover-open.block,.show.block{right:unset;width:var(--comp-pop-width);min-width:var(--tct-popover-min-width, unset)}:popover-open.left,.show.left{left:var(--comp-pop-left);right:unset}:popover-open.right,.show.right{right:var(--comp-pop-right);left:unset}:popover-open.down,.show.down{top:var(--tct-popover-top, var(--comp-pop-top));bottom:unset}:popover-open.up,.show.up{top:unset;bottom:var(--comp-pop-bottom)}:popover-open::-webkit-scrollbar,.show::-webkit-scrollbar{width:var(--comp-scrollbar-size);height:var(--comp-scrollbar-size);margin:5px}:popover-open::-webkit-scrollbar-thumb,.show::-webkit-scrollbar-thumb{background:var(--comp-scrollbar-color);border-radius:var(--comp-scrollbar-border-radius)}:popover-open::-webkit-scrollbar-track,.show::-webkit-scrollbar-track{background:transparent;border-radius:var(--comp-scrollbar-border-radius)}click-elsewhere{position:relative;display:block}";
5
5
  const Q2PopoverStyle0 = q2PopoverCss;
6
6
 
7
7
  const Q2Popover = /*@__PURE__*/ proxyCustomElement(class Q2Popover extends HTMLElement {
@@ -14,13 +14,15 @@ const Q2Popover = /*@__PURE__*/ proxyCustomElement(class Q2Popover extends HTMLE
14
14
  * The number of pixels to leave between the popover and the edge of the viewport
15
15
  */
16
16
  this.displayBuffer = 10;
17
- /** remove when Popover API is supported in iOS */
18
17
  this.orientationChanged = false;
19
18
  this.handleMinHeight = () => {
20
19
  if (this.minHeight) {
21
20
  handleDeprecationWarning(this, 'minHeight', 'prop');
22
21
  }
23
22
  };
23
+ this.handlePopoverToggleEvent = (event) => {
24
+ this.popoverStateChanged.emit({ open: event.newState === 'open' });
25
+ };
24
26
  this.setAbsoluteCSSProperties = async () => {
25
27
  const { controlElement, containerElement, currentDirection, align } = this;
26
28
  if (align === 'right') {
@@ -45,34 +47,41 @@ const Q2Popover = /*@__PURE__*/ proxyCustomElement(class Q2Popover extends HTMLE
45
47
  await waitForNextPaint();
46
48
  containerElement.style.setProperty('--comp-pop-opacity', '1');
47
49
  };
48
- this.setFixedCSSProperties = async () => {
49
- var _a, _b, _c, _d;
50
- const { controlElement, containerElement, currentDirection, rootElementRect } = this;
50
+ this.setPopoverAPICSSProperties = async () => {
51
+ var _a, _b, _c, _d, _e, _f;
52
+ const { controlElement, containerElement, currentDirection, isModule, align } = this;
51
53
  const { top: controlTop, bottom: controlBottom, left: controlLeft, right: controlRight, } = (_b = (_a = controlElement === null || controlElement === void 0 ? void 0 : controlElement.getBoundingClientRect) === null || _a === void 0 ? void 0 : _a.call(controlElement)) !== null && _b !== void 0 ? _b : {
52
54
  top: 0,
53
55
  bottom: 0,
54
56
  left: 0,
55
57
  right: 0,
56
58
  };
57
- const popoverLeft = controlLeft - rootElementRect.left;
59
+ const popoverLeft = controlLeft;
60
+ const popoverRight = ((_c = window === null || window === void 0 ? void 0 : window.visualViewport) === null || _c === void 0 ? void 0 : _c.width) - controlRight;
61
+ if (align === 'right') {
62
+ containerElement.style.setProperty('--comp-pop-right', `${popoverRight - window.scrollX}px`);
63
+ containerElement.style.setProperty('--comp-pop-left', 'unset');
64
+ }
65
+ else {
66
+ containerElement.style.setProperty('--comp-pop-left', `${popoverLeft + window.scrollX}px`);
67
+ containerElement.style.setProperty('--comp-pop-right', 'unset');
68
+ }
58
69
  if (this.block)
59
70
  containerElement.style.setProperty('--comp-pop-width', `${(controlElement === null || controlElement === void 0 ? void 0 : controlElement.offsetWidth) || 0}px`);
60
- containerElement.style.setProperty('--comp-pop-left', `${popoverLeft}px`);
61
- containerElement.style.setProperty('--comp-pop-right', `${rootElementRect.width + rootElementRect.left - controlRight}px`);
62
71
  if (currentDirection === 'up') {
63
- if (isAndroid()) {
72
+ if (isModule) {
64
73
  containerElement.style.setProperty('--comp-pop-bottom', `${window.innerHeight - controlTop}px`);
65
74
  }
66
75
  else {
67
- containerElement.style.setProperty('--comp-pop-bottom', `${window.innerHeight - controlTop - ((_c = window === null || window === void 0 ? void 0 : window.visualViewport.offsetTop) !== null && _c !== void 0 ? _c : 0)}px`);
76
+ containerElement.style.setProperty('--comp-pop-bottom', `${window.innerHeight - controlTop - ((_d = window === null || window === void 0 ? void 0 : window.visualViewport) === null || _d === void 0 ? void 0 : _d.offsetTop) - window.scrollY}px`);
68
77
  }
69
78
  }
70
79
  if (currentDirection === 'down') {
71
- if (isAndroid()) {
80
+ if (isModule) {
72
81
  containerElement.style.setProperty('--comp-pop-top', `${controlBottom}px`);
73
82
  }
74
83
  else {
75
- containerElement.style.setProperty('--comp-pop-top', `${controlBottom - rootElementRect.top + ((_d = window === null || window === void 0 ? void 0 : window.visualViewport.offsetTop) !== null && _d !== void 0 ? _d : 0)}px`);
84
+ containerElement.style.setProperty('--comp-pop-top', `${controlBottom + ((_f = (_e = window === null || window === void 0 ? void 0 : window.visualViewport) === null || _e === void 0 ? void 0 : _e.offsetTop) !== null && _f !== void 0 ? _f : 0) + window.scrollY}px`);
76
85
  }
77
86
  }
78
87
  // Wait for one paint to prevent layout thrashing
@@ -90,7 +99,7 @@ const Q2Popover = /*@__PURE__*/ proxyCustomElement(class Q2Popover extends HTMLE
90
99
  };
91
100
  this.currentDirection = undefined;
92
101
  this.show = false;
93
- this.align = undefined;
102
+ this.align = 'left';
94
103
  this.block = undefined;
95
104
  this.controlElement = undefined;
96
105
  this.direction = undefined;
@@ -103,9 +112,21 @@ const Q2Popover = /*@__PURE__*/ proxyCustomElement(class Q2Popover extends HTMLE
103
112
  // #region Component Lifecycle Events
104
113
  disconnectedCallback() {
105
114
  this.removeViewportListeners();
115
+ this.containerElement.removeEventListener('toggle', this.handlePopoverToggleEvent);
116
+ this.containerElement = null;
117
+ this.contentElement = null;
118
+ this.controlElement = null;
119
+ }
120
+ componentWillLoad() {
121
+ if (!this.supportsPopoverAPI) {
122
+ console.warn('The Popover API is not supported in this browser. Please update your browser to the latest version. The component will use legacy mode.');
123
+ this.mode = 'legacy';
124
+ }
106
125
  }
107
126
  componentDidLoad() {
108
127
  this.handleMinHeight();
128
+ if (this.supportsPopoverAPI)
129
+ this.containerElement.addEventListener('toggle', this.handlePopoverToggleEvent);
109
130
  if (this.open)
110
131
  this.determinePopDirection();
111
132
  }
@@ -132,7 +153,6 @@ const Q2Popover = /*@__PURE__*/ proxyCustomElement(class Q2Popover extends HTMLE
132
153
  this.handleMinHeight();
133
154
  }
134
155
  async openChanged(open) {
135
- this.setRootElement();
136
156
  this.popoverStateChanged.emit({ open });
137
157
  if (open) {
138
158
  this.addViewportListeners();
@@ -141,7 +161,12 @@ const Q2Popover = /*@__PURE__*/ proxyCustomElement(class Q2Popover extends HTMLE
141
161
  else {
142
162
  this.removeViewportListeners();
143
163
  this.currentDirection = undefined;
144
- this.show = false;
164
+ if (this.mode === 'legacy' || !this.supportsPopoverAPI) {
165
+ this.show = false;
166
+ }
167
+ else {
168
+ this.containerElement.hidePopover();
169
+ }
145
170
  await waitForNextPaint();
146
171
  this.clearCSSProperties();
147
172
  }
@@ -164,6 +189,9 @@ const Q2Popover = /*@__PURE__*/ proxyCustomElement(class Q2Popover extends HTMLE
164
189
  return undefined;
165
190
  }
166
191
  }
192
+ get supportsPopoverAPI() {
193
+ return Object.hasOwn(HTMLElement.prototype, 'popover');
194
+ }
167
195
  get validatedMaxHeight() {
168
196
  const { maxHeight } = this;
169
197
  return isNaN(maxHeight) ? undefined : maxHeight;
@@ -172,11 +200,9 @@ const Q2Popover = /*@__PURE__*/ proxyCustomElement(class Q2Popover extends HTMLE
172
200
  var _a;
173
201
  window.addEventListener('resize', this.viewPortOrientationChanged);
174
202
  visualViewport === null || visualViewport === void 0 ? void 0 : visualViewport.addEventListener('resize', this.viewPortChanged);
175
- // #region remove when Popover API is supported in iOS
176
203
  window.addEventListener('scroll', this.viewPortChanged, { passive: true, capture: true });
177
- (_a = screen === null || screen === void 0 ? void 0 : screen.orientation) === null || _a === void 0 ? void 0 : _a.addEventListener('change', this.viewPortOrientationChanged);
204
+ (_a = screen === null || screen === void 0 ? void 0 : screen.orientation) === null || _a === void 0 ? void 0 : _a.addEventListener('orientationchange', this.viewPortOrientationChanged);
178
205
  window.addEventListener('orientationchange', this.viewPortOrientationChanged);
179
- // #endregion
180
206
  }
181
207
  clearCSSProperties() {
182
208
  this.containerElement.style.removeProperty('--comp-pop-max-height');
@@ -248,72 +274,37 @@ const Q2Popover = /*@__PURE__*/ proxyCustomElement(class Q2Popover extends HTMLE
248
274
  var _a;
249
275
  window.removeEventListener('resize', this.viewPortOrientationChanged);
250
276
  visualViewport === null || visualViewport === void 0 ? void 0 : visualViewport.removeEventListener('resize', this.viewPortChanged);
251
- // #region remove when Popover API is supported in iOS
252
- window.removeEventListener('scroll', this.viewPortChanged);
277
+ window.removeEventListener('scroll', this.viewPortChanged, { capture: true });
253
278
  (_a = screen === null || screen === void 0 ? void 0 : screen.orientation) === null || _a === void 0 ? void 0 : _a.removeEventListener('orientationchange', this.viewPortOrientationChanged);
254
279
  window.removeEventListener('orientationchange', this.viewPortOrientationChanged);
255
- // #endregion
256
280
  }
257
281
  setDirectionAndShow(direction) {
258
- this.setRootElement();
259
282
  // Due to some runtime inconsistency across devices/browsers we need to add one more check here because the
260
283
  // popover can be closed between the time the popover is opened and the time the direction is determined
261
284
  const isOpen = this.open;
262
285
  if (!isOpen)
263
286
  return;
264
287
  this.currentDirection = direction;
265
- this.show = true;
266
- if (this.mode === 'legacy') {
288
+ if (this.mode === 'legacy' || !this.supportsPopoverAPI) {
289
+ this.show = true;
267
290
  this.setAbsoluteCSSProperties();
268
291
  }
269
292
  else {
270
- this.setFixedCSSProperties();
293
+ this.setPopoverAPICSSProperties();
294
+ this.containerElement.showPopover();
271
295
  }
272
296
  }
273
- setRootElement() {
274
- let currentElement = this.hostElement;
275
- while (currentElement && currentElement !== document.documentElement) {
276
- const computedStyle = window.getComputedStyle(currentElement);
277
- // Check if the element has any styles applied that create a new containg block
278
- if (computedStyle.transform !== 'none' ||
279
- computedStyle.filter !== 'none' ||
280
- computedStyle.perspective !== 'none' ||
281
- computedStyle.containerType !== 'normal' ||
282
- ['transform', 'perspective', 'filter'].includes(computedStyle.willChange) ||
283
- ['layout', 'paint', 'strict', 'content'].includes(computedStyle.contain)) {
284
- this.rootElementRect = currentElement.getBoundingClientRect();
285
- return;
286
- }
287
- const rootNode = currentElement.getRootNode();
288
- const isRootNodeWebComponent = typeof ShadowRoot !== 'undefined' &&
289
- rootNode instanceof ShadowRoot &&
290
- rootNode.host instanceof HTMLElement;
291
- if (isRootNodeWebComponent) {
292
- currentElement = rootNode.host;
293
- }
294
- else {
295
- currentElement = currentElement.parentElement;
296
- }
297
- }
298
- // Return the document's bounding rect if no element is found
299
- this.rootElementRect = {
300
- top: 0,
301
- bottom: 0,
302
- left: 0,
303
- right: 0,
304
- height: window.visualViewport.height,
305
- width: window.visualViewport.width,
306
- };
307
- }
308
297
  // #endregion
309
298
  // #region Render Methods
310
299
  render() {
311
- const containerClasses = ['container', this.currentDirection];
300
+ const containerClasses = ['container', this.currentDirection, this.align];
312
301
  if (this.show)
313
302
  containerClasses.push('show');
303
+ if (this.block)
304
+ containerClasses.push('block');
314
305
  if (this.mode === 'legacy')
315
306
  containerClasses.push('legacy');
316
- return (h("div", { key: '446d034f2c109204dad72cf53e293b01beac7183', ref: el => (this.containerElement = el), class: containerClasses.join(' '), "test-id": "outerContainer", tabIndex: -1 }, h("div", { key: 'd972d4c7047be74731c64b4ae81358b39fed6ce1', ref: el => (this.contentElement = el), class: "content" }, h("slot", { key: '9b2b755f1d83418d1b367739416f6bc80c19ee0f' }))));
307
+ return (h("div", { key: 'c9bbcb53ba8f8bb8879d96cd2f828943dea32b92', ref: el => (this.containerElement = el), class: containerClasses.join(' '), "test-id": "outerContainer", tabIndex: -1, popover: "auto" }, h("div", { key: '4088186bfb7b320fcd8836bcef40b90a685caf9e', ref: el => (this.contentElement = el), class: "content" }, h("slot", { key: '0876866b03a8708a0b401df638d3146263afc141' }))));
317
308
  }
318
309
  get hostElement() { return this; }
319
310
  static get watchers() { return {
@@ -1 +1 @@
1
- {"file":"q2-popover2.js","mappings":";;;AAAA,MAAM,YAAY,GAAG,4iFAA4iF,CAAC;AAClkF,wBAAe,YAAY;;MCuCd,SAAS;;;;;;;;;QAQlB,kBAAa,GAAG,EAAE,CAAC;;QAEnB,uBAAkB,GAAY,KAAK,CAAC;QAmPpC,oBAAe,GAAG;YACd,IAAI,IAAI,CAAC,SAAS,EAAE;gBAChB,wBAAwB,CAAC,IAAI,EAAE,WAAW,EAAE,MAAM,CAAC,CAAC;aACvD;SACJ,CAAC;QAaF,6BAAwB,GAAG;YACvB,MAAM,EAAE,cAAc,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC;YAE3E,IAAI,KAAK,KAAK,OAAO,EAAE;gBACnB,gBAAgB,CAAC,KAAK,CAAC,WAAW,CAAC,kBAAkB,EAAE,GAAG,CAAC,CAAC;gBAC5D,gBAAgB,CAAC,KAAK,CAAC,WAAW,CAAC,iBAAiB,EAAE,OAAO,CAAC,CAAC;aAClE;iBAAM;gBACH,gBAAgB,CAAC,KAAK,CAAC,WAAW,CAAC,iBAAiB,EAAE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gBACH,cAAc,GAAG,cAAc,CAAC,aAAa,CAAC;aACjD;SACJ;;QAGD,IAAI,CAAC,eAAe,GAAG;YACnB,GAAG,EAAE,CAAC;YACN,MAAM,EAAE,CAAC;YACT,IAAI,EAAE,CAAC;YACP,KAAK,EAAE,CAAC;YACR,MAAM,EAAE,MAAM,CAAC,cAAc,CAAC,MAAM;YACpC,KAAK,EAAE,MAAM,CAAC,cAAc,CAAC,KAAK;SAC1B,CAAC;KAChB;;;IAeD,MAAM;QACF,MAAM,gBAAgB,GAAG,CAAC,WAAW,EAAE,IAAI,CAAC,gBAAgB,CAAC,CAAC;QAC9D,IAAI,IAAI,CAAC,IAAI;YAAE,gBAAgB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAC7C,IAAI,IAAI,CAAC,IAAI,KAAK,QAAQ;YAAE,gBAAgB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAE5D,QACI,4DACI,GAAG,EAAE,EAAE,KAAK,IAAI,CAAC,gBAAgB,GAAG,EAAE,CAAC,EACvC,KAAK,EAAE,gBAAgB,CAAC,IAAI,CAAC,GAAG,CAAC,aACzB,gBAAgB,EACxB,QAAQ,EAAE,CAAC,CAAC,IAEZ,4DACI,GAAG,EAAE,EAAE,KAAK,IAAI,CAAC,cAAc,GAAG,EAAE,CAAC,EACrC,KAAK,EAAC,SAAS,IAEf,8DAAQ,CACN,CACJ,EACR;KACL;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/q2-popover/q2-popover.scss?tag=q2-popover&encapsulation=shadow","src/components/q2-popover/q2-popover.tsx"],"sourcesContent":["@import '../../styles/host.scss';\n@import '../../styles/functions';\n\n.container {\n display: none;\n}\n\n.show {\n display: block;\n position: fixed;\n z-index: var-list(--tct-popover-z-index, 50);\n margin: 0;\n padding: 0;\n overflow: auto;\n background: var-list(--tct-popover-background, --app-white, #ffffff);\n color: var-list(--tct-popover-font-color, --t-text, #4d4d4d);\n min-width: var-list(--tct-popover-min-width, 135px);\n margin-block: var-list(--tct-popover-margin-block, 0);\n box-shadow: var-list(--tct-popover-box-shadow, --app-shadow-1, unquote(\"0px 0px 2px rgba(0, 0, 0, 0.12), 0px 2px 4px rgba(0, 0, 0, 0.14)\"));\n border-width: var-list(--tct-popover-border-width, 0);\n border-style: solid;\n border-color: var-list(--tct-popover-border-color, transparent);\n border-radius: var-list(--tct-popover-border-radius, 0);\n // the following --comp variables are set via JS\n max-height: var(--comp-pop-max-height);\n left: var(--comp-pop-left);\n opacity: var(--comp-pop-opacity, 0);\n\n :host([block]) & {\n right: unset;\n width: var(--comp-pop-width);\n min-width: var-list(--tct-popover-min-width, unset);\n }\n\n :host([align='left']) & {\n left: var(--comp-pop-left);\n right: unset;\n }\n\n :host([align='right']) & {\n right: var(--comp-pop-right);\n left: unset;\n }\n\n &.down {\n top: var-list(--tct-popover-top, --comp-pop-top);\n bottom: unset;\n }\n\n &.up {\n top: unset;\n bottom: var(--comp-pop-bottom);\n }\n\n &.legacy {\n position: absolute;\n }\n\n @include tiny-scrollbar();\n}\n\nclick-elsewhere {\n position: relative;\n display: block;\n}\n","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, isAndroid } from '../../utils';\n\n/**\n * ***********\n * * WARNING *\n * ***********\n * Touching this file obligates you to manually test thoroughly, because Puppeteer can't capture every edgecase.\n *\n * Each of the following Scenarios must be tested on each Device, in each Environment.\n *\n * Scenarios:\n * - Q2 Select non-typeable\n * - Q2 Select typeable\n *\n * Devices:\n * - iOS Safari\n * - Android Chrome\n * - MacOS Safari\n * - Chrome\n * - Firefox\n *\n * Environments:\n * - Standard (Outside of Iframe)\n * - SDK Extension (Inside of Iframe)\n */\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 visualViewport?.addEventListener('resize', this.viewPortChanged);\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 visualViewport?.removeEventListener('resize', this.viewPortChanged);\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 if (isAndroid()) {\n containerElement.style.setProperty('--comp-pop-bottom', `${window.innerHeight - controlTop}px`);\n } else {\n containerElement.style.setProperty(\n '--comp-pop-bottom',\n `${window.innerHeight - controlTop - (window?.visualViewport.offsetTop ?? 0)}px`\n );\n }\n }\n if (currentDirection === 'down') {\n if (isAndroid()) {\n containerElement.style.setProperty('--comp-pop-top', `${controlBottom}px`);\n } else {\n containerElement.style.setProperty(\n '--comp-pop-top',\n `${controlBottom - rootElementRect.top + (window?.visualViewport.offsetTop ?? 0)}px`\n );\n }\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 tabIndex={-1}\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"],"version":3}
1
+ {"file":"q2-popover2.js","mappings":";;;AAAA,MAAM,YAAY,GAAG,ytFAAytF,CAAC;AAC/uF,wBAAe,YAAY;;MCuCd,SAAS;;;;;;;;;QAQlB,kBAAa,GAAG,EAAE,CAAC;QACnB,uBAAkB,GAAY,KAAK,CAAC;QAqQpC,oBAAe,GAAG;YACd,IAAI,IAAI,CAAC,SAAS,EAAE;gBAChB,wBAAwB,CAAC,IAAI,EAAE,WAAW,EAAE,MAAM,CAAC,CAAC;aACvD;SACJ,CAAC;QAEF,6BAAwB,GAAG,CAAC,KAAkB;YAC1C,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,QAAQ,KAAK,MAAM,EAAE,CAAC,CAAC;SACtE,CAAC;QAUF,6BAAwB,GAAG;YACvB,MAAM,EAAE,cAAc,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC;YAE3E,IAAI,KAAK,KAAK,OAAO,EAAE;gBACnB,gBAAgB,C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q2-popover/q2-popover.scss?tag=q2-popover&encapsulation=shadow","src/components/q2-popover/q2-popover.tsx"],"sourcesContent":["@import '../../styles/host.scss';\n@import '../../styles/functions';\n\n.legacy {\n &.container {\n display: none;\n }\n\n &.show {\n display: block;\n z-index: var-list(--tct-popover-z-index, 50);\n }\n}\n\n:popover-open,\n.show {\n position: absolute;\n margin: 0;\n padding: 0;\n overflow: auto;\n background: var-list(--tct-popover-background, --app-white, #ffffff);\n color: var-list(--tct-popover-font-color, --t-text, #4d4d4d);\n min-width: var-list(--tct-popover-min-width, 135px);\n margin-block: var-list(--tct-popover-margin-block, 0);\n box-shadow: var-list(\n --tct-popover-box-shadow,\n --app-shadow-1,\n unquote('0px 0px 2px rgba(0, 0, 0, 0.12), 0px 2px 4px rgba(0, 0, 0, 0.14)')\n );\n border-width: var-list(--tct-popover-border-width, 0);\n border-style: solid;\n border-color: var-list(--tct-popover-border-color, transparent);\n border-radius: var-list(--tct-popover-border-radius, 0);\n // the --comp variables are set via JS\n max-height: var(--comp-pop-max-height);\n left: var(--comp-pop-left);\n opacity: var(--comp-pop-opacity, 0);\n\n &.block {\n right: unset;\n width: var(--comp-pop-width);\n min-width: var-list(--tct-popover-min-width, unset);\n }\n\n &.left {\n left: var(--comp-pop-left);\n right: unset;\n }\n\n &.right {\n right: var(--comp-pop-right);\n left: unset;\n }\n\n &.down {\n top: var-list(--tct-popover-top, --comp-pop-top);\n bottom: unset;\n }\n\n &.up {\n top: unset;\n bottom: var(--comp-pop-bottom);\n }\n\n @include tiny-scrollbar();\n}\n\nclick-elsewhere {\n position: relative;\n display: block;\n}\n","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/**\n * ***********\n * * WARNING *\n * ***********\n * Touching this file obligates you to manually test thoroughly, because Puppeteer can't capture every edgecase.\n *\n * Each of the following Scenarios must be tested on each Device, in each Environment.\n *\n * Scenarios:\n * - Q2 Select non-typeable\n * - Q2 Select typeable\n *\n * Devices:\n * - iOS Safari\n * - Android Chrome\n * - MacOS Safari\n * - Chrome\n * - Firefox\n *\n * Environments:\n * - Standard (Outside of Iframe)\n * - SDK Extension (Inside of Iframe)\n */\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 orientationChanged: boolean = false;\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' = 'left';\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 this.containerElement.removeEventListener('toggle', this.handlePopoverToggleEvent);\n this.containerElement = null;\n this.contentElement = null;\n this.controlElement = null;\n }\n\n componentWillLoad() {\n if (!this.supportsPopoverAPI) {\n console.warn(\n 'The Popover API is not supported in this browser. Please update your browser to the latest version. The component will use legacy mode.'\n );\n this.mode = 'legacy';\n }\n }\n\n componentDidLoad() {\n this.handleMinHeight();\n if (this.supportsPopoverAPI) this.containerElement.addEventListener('toggle', this.handlePopoverToggleEvent);\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.popoverStateChanged.emit({ open });\n\n if (open) {\n this.addViewportListeners();\n this.determinePopDirection();\n } else {\n this.removeViewportListeners();\n this.currentDirection = undefined;\n if (this.mode === 'legacy' || !this.supportsPopoverAPI) {\n this.show = false;\n } else {\n this.containerElement.hidePopover();\n }\n\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 supportsPopoverAPI(): boolean {\n return Object.hasOwn(HTMLElement.prototype, 'popover');\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 visualViewport?.addEventListener('resize', this.viewPortChanged);\n window.addEventListener('scroll', this.viewPortChanged, { passive: true, capture: true });\n screen?.orientation?.addEventListener('orientationchange', this.viewPortOrientationChanged);\n window.addEventListener('orientationchange', this.viewPortOrientationChanged);\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 handlePopoverToggleEvent = (event: ToggleEvent) => {\n this.popoverStateChanged.emit({ open: event.newState === 'open' });\n };\n\n removeViewportListeners() {\n window.removeEventListener('resize', this.viewPortOrientationChanged);\n visualViewport?.removeEventListener('resize', this.viewPortChanged);\n window.removeEventListener('scroll', this.viewPortChanged, { capture: true });\n screen?.orientation?.removeEventListener('orientationchange', this.viewPortOrientationChanged);\n window.removeEventListener('orientationchange', this.viewPortOrientationChanged);\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 // 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 if (this.mode === 'legacy' || !this.supportsPopoverAPI) {\n this.show = true;\n this.setAbsoluteCSSProperties();\n } else {\n this.setPopoverAPICSSProperties();\n this.containerElement.showPopover();\n }\n }\n\n setPopoverAPICSSProperties = async () => {\n const { controlElement, containerElement, currentDirection, isModule, align } = 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\n const popoverLeft: number = controlLeft;\n const popoverRight: number = window?.visualViewport?.width - controlRight;\n\n if (align === 'right') {\n containerElement.style.setProperty('--comp-pop-right', `${popoverRight - window.scrollX}px`);\n containerElement.style.setProperty('--comp-pop-left', 'unset');\n } else {\n containerElement.style.setProperty('--comp-pop-left', `${popoverLeft + window.scrollX}px`);\n containerElement.style.setProperty('--comp-pop-right', 'unset');\n }\n\n if (this.block) containerElement.style.setProperty('--comp-pop-width', `${controlElement?.offsetWidth || 0}px`);\n\n if (currentDirection === 'up') {\n if (isModule) {\n containerElement.style.setProperty('--comp-pop-bottom', `${window.innerHeight - controlTop}px`);\n } else {\n containerElement.style.setProperty(\n '--comp-pop-bottom',\n `${window.innerHeight - controlTop - window?.visualViewport?.offsetTop - window.scrollY}px`\n );\n }\n }\n\n if (currentDirection === 'down') {\n if (isModule) {\n containerElement.style.setProperty('--comp-pop-top', `${controlBottom}px`);\n } else {\n containerElement.style.setProperty(\n '--comp-pop-top',\n `${controlBottom + (window?.visualViewport?.offsetTop ?? 0) + window.scrollY}px`\n );\n }\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 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, this.align];\n if (this.show) containerClasses.push('show');\n if (this.block) containerClasses.push('block');\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 tabIndex={-1}\n popover=\"auto\"\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"],"version":3}
@@ -143,7 +143,7 @@ const Q2RelativeTime$1 = /*@__PURE__*/ proxyCustomElement(class Q2RelativeTime e
143
143
  // #region Render Methods
144
144
  render() {
145
145
  const { shouldShow, displayedMessage } = this;
146
- return h(Fragment, { key: 'ff051c1959e6ed788c90501ef3ab4ecdc1f5b323' }, shouldShow ? h("time", { dateTime: displayedMessage }, displayedMessage) : null);
146
+ return h(Fragment, { key: 'a753c60bdfc31563edae1e019bb474adb4223d09' }, shouldShow ? h("time", { dateTime: displayedMessage }, displayedMessage) : null);
147
147
  }
148
148
  get hostElement() { return this; }
149
149
  static get watchers() { return {
@@ -80,7 +80,7 @@ const Q2ResizeObserver = /*@__PURE__*/ proxyCustomElement(class Q2ResizeObserver
80
80
  // #endregion
81
81
  // #region Render Methods
82
82
  render() {
83
- return h("slot", { key: '7d455e40c969cc8a5666a521dcbe8d389d6e150a', onSlotchange: this.handleSlotChange });
83
+ return h("slot", { key: '7c4cb60ff8d63adb4b07d4edc8216f81575ade3c', onSlotchange: this.handleSlotChange });
84
84
  }
85
85
  get hostElement() { return this; }
86
86
  static get watchers() { return {
@@ -195,9 +195,9 @@ const Q2Section$1 = /*@__PURE__*/ proxyCustomElement(class Q2Section extends HTM
195
195
  wrapperClasses.push('is-transitioning');
196
196
  }
197
197
  const showDefaultHeader = !this.hasYieldedHeader && !!this.label;
198
- return (h("section", { key: '71c1482d31e7053030e9c36883edc90e0e5c3d21', class: "wrapper" }, h("header", { key: 'e121ea36506ad3a832f766bb2aa0bbe032f05f07', class: hasHeader ? 'has-header' : '' }, h("div", { key: '36ea0a7f9eceaec0dd0f993e9127eb7596b122e1', class: "header-content", id: this.titleId, onClick: this.collapsible && this.onHeaderClick }, showDefaultHeader && h("h2", { key: '117705f6ef890ed02d146673fa3d9629cc5c0a82', class: "title" }, loc(this.label)), h("div", { key: '2a49ef960a6d2afb78b80c7e93d995a89c268c96', ref: el => (this.headerSlotWrapper = el), class: "header-slot-wrapper" }, h("slot", { key: '8b7564b09e2baf4193488295e4cc4a3775124edd', ref: (el) => (this.headerSlot = el), name: "q2-section-header" }))), this.collapsible && !this.noCollapseIcon && (h("q2-btn", { key: 'da53b8ba0be85f0a691e11e63f7f484598c4e1d3', label: loc(this.label || 'tecton.element.section.defaultToggleLabel'), ariaExpanded: `${!!this.expanded}`, ariaControls: this.contentId, "test-id": "toggleButton", "hide-label": true, onClick: this.onHeaderClick }, h("q2-icon", { key: '1b5f5450d3b0d438a9b7635af161f178732a2d59', type: "chevron-up" })))), h("div", { key: 'b6d48ffaf628a680256cad41fe9ca85a853aa3c5', class: wrapperClasses.join(' '), id: this.contentId, "aria-labelledby": this.titleId, role: "region", onTransitionEnd: this.onTransitionEnd, style: this.collapsible && {
198
+ return (h("section", { key: 'aad8f4ed8e043dc68a156c0d84c743009bc8b0a0', class: "wrapper" }, h("header", { key: '0ccac68fa88dd41add615b69b67ef99076665b78', class: hasHeader ? 'has-header' : '' }, h("div", { key: '29098c74e1839055a6abc6caef08f06373741792', class: "header-content", id: this.titleId, onClick: this.collapsible && this.onHeaderClick }, showDefaultHeader && h("h2", { key: 'e008221c2eaaa1eb742ae8b4c8d545eaddb03d7a', class: "title" }, loc(this.label)), h("div", { key: '6ed2d75316a439258fb3156a189b6a152e115a30', ref: el => (this.headerSlotWrapper = el), class: "header-slot-wrapper" }, h("slot", { key: 'd6161fbeeb9df5225ae83fd6464a0b3c85189998', ref: (el) => (this.headerSlot = el), name: "q2-section-header" }))), this.collapsible && !this.noCollapseIcon && (h("q2-btn", { key: 'b5b4ed4ec55a85883fcb18acc416934de779d84d', label: loc(this.label || 'tecton.element.section.defaultToggleLabel'), ariaExpanded: `${!!this.expanded}`, ariaControls: this.contentId, "test-id": "toggleButton", "hide-label": true, onClick: this.onHeaderClick }, h("q2-icon", { key: 'f2fc3f261e310043b7a0e4ac9bd384003fc341b3', type: "chevron-up" })))), h("div", { key: '04ce4f28a96228b7bf5b70e4a24b85b03adc1443', class: wrapperClasses.join(' '), id: this.contentId, "aria-labelledby": this.titleId, role: "region", onTransitionEnd: this.onTransitionEnd, style: this.collapsible && {
199
199
  height: this.contentHeight,
200
- } }, h("div", { key: '8037954e38ee9cce6c07821b3164d01e97d87404', ref: el => (this.contentContainer = el), class: "content", tabindex: "-1" }, h("slot", { key: 'a3b8d35029fdffbb248627c4a8c742da827a0526', ref: (el) => (this.contentSlot = el) })))));
200
+ } }, h("div", { key: '983ef55e4fcfba0abed1072ed9515a19a32e385b', ref: el => (this.contentContainer = el), class: "content", tabindex: "-1" }, h("slot", { key: 'ebd8bf51a38ea00e18b4afa89d748846d81b5b01', ref: (el) => (this.contentSlot = el) })))));
201
201
  }
202
202
  get hostElement() { return this; }
203
203
  static get watchers() { return {