q2-tecton-elements 1.51.1 → 1.51.3

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 (469) hide show
  1. package/dist/cjs/click-elsewhere_2.cjs.entry.js +66 -71
  2. package/dist/cjs/click-elsewhere_2.cjs.entry.js.map +1 -1
  3. package/dist/cjs/{index-9aa4a776.js → index-c4a56631.js} +1 -21
  4. package/dist/cjs/index-c4a56631.js.map +1 -0
  5. package/dist/cjs/loader.cjs.js +1 -1
  6. package/dist/cjs/q2-action-group.cjs.entry.js +1 -1
  7. package/dist/cjs/q2-action-sheet.cjs.entry.js +2 -2
  8. package/dist/cjs/q2-avatar.cjs.entry.js +1 -1
  9. package/dist/cjs/q2-badge_7.cjs.entry.js +12 -4
  10. package/dist/cjs/q2-badge_7.cjs.entry.js.map +1 -1
  11. package/dist/cjs/q2-calendar.cjs.entry.js +1 -1
  12. package/dist/cjs/q2-card.cjs.entry.js +1 -1
  13. package/dist/cjs/q2-carousel-pane.cjs.entry.js +3 -3
  14. package/dist/cjs/q2-carousel.cjs.entry.js +1 -1
  15. package/dist/cjs/q2-chart-area.cjs.entry.js +2 -2
  16. package/dist/cjs/q2-chart-bar.cjs.entry.js +2 -2
  17. package/dist/cjs/q2-chart-donut.cjs.entry.js +2 -2
  18. package/dist/cjs/q2-checkbox-group.cjs.entry.js +1 -1
  19. package/dist/cjs/q2-checkbox.cjs.entry.js +1 -1
  20. package/dist/cjs/q2-currency.cjs.entry.js +1 -1
  21. package/dist/cjs/q2-data-table.cjs.entry.js +1 -1
  22. package/dist/cjs/q2-detail.cjs.entry.js +2 -2
  23. package/dist/cjs/q2-dropdown-item.cjs.entry.js +1 -1
  24. package/dist/cjs/q2-dropdown.cjs.entry.js +10 -12
  25. package/dist/cjs/q2-dropdown.cjs.entry.js.map +1 -1
  26. package/dist/cjs/q2-editable-field.cjs.entry.js +7 -8
  27. package/dist/cjs/q2-editable-field.cjs.entry.js.map +1 -1
  28. package/dist/cjs/q2-formatted-text.cjs.entry.js +1 -1
  29. package/dist/cjs/q2-item.cjs.entry.js +2 -2
  30. package/dist/cjs/q2-legend.cjs.entry.js +1 -1
  31. package/dist/cjs/q2-list.cjs.entry.js +2 -2
  32. package/dist/cjs/q2-loc.cjs.entry.js +2 -2
  33. package/dist/cjs/q2-message.cjs.entry.js +2 -2
  34. package/dist/cjs/q2-month-picker.cjs.entry.js +3 -3
  35. package/dist/cjs/q2-optgroup.cjs.entry.js +2 -2
  36. package/dist/cjs/q2-option-list.cjs.entry.js +1 -1
  37. package/dist/cjs/q2-option.cjs.entry.js +1 -1
  38. package/dist/cjs/q2-pagination.cjs.entry.js +3 -3
  39. package/dist/cjs/q2-pill.cjs.entry.js +2 -2
  40. package/dist/cjs/q2-radio-group.cjs.entry.js +1 -1
  41. package/dist/cjs/q2-radio.cjs.entry.js +1 -1
  42. package/dist/cjs/q2-relative-time.cjs.entry.js +2 -2
  43. package/dist/cjs/q2-resize-observer.cjs.entry.js +1 -1
  44. package/dist/cjs/q2-section.cjs.entry.js +3 -3
  45. package/dist/cjs/q2-select.cjs.entry.js +93 -16
  46. package/dist/cjs/q2-select.cjs.entry.js.map +1 -1
  47. package/dist/cjs/q2-stepper-pane.cjs.entry.js +1 -1
  48. package/dist/cjs/q2-stepper-vertical.cjs.entry.js +2 -2
  49. package/dist/cjs/q2-stepper.cjs.entry.js +2 -2
  50. package/dist/cjs/q2-tag.cjs.entry.js +2 -2
  51. package/dist/cjs/q2-tecton-elements.cjs.js +1 -1
  52. package/dist/cjs/q2-textarea.cjs.entry.js +3 -2
  53. package/dist/cjs/q2-textarea.cjs.entry.js.map +1 -1
  54. package/dist/cjs/q2-tooltip.cjs.entry.js +1 -1
  55. package/dist/cjs/tecton-tab-pane.cjs.entry.js +2 -2
  56. package/dist/collection/components/click-elsewhere/click-elsewhere.js.map +1 -1
  57. package/dist/collection/components/click-elsewhere/test/click-elsewhere-test.e2e.js.map +1 -1
  58. package/dist/collection/components/q2-action-group/q2-action-group.js +1 -1
  59. package/dist/collection/components/q2-action-group/q2-action-group.js.map +1 -1
  60. package/dist/collection/components/q2-action-group/test/q2-action-group.e2e.js.map +1 -1
  61. package/dist/collection/components/q2-action-group/test/q2-action-group.spec.js.map +1 -1
  62. package/dist/collection/components/q2-action-sheet/q2-action-sheet.js +1 -1
  63. package/dist/collection/components/q2-action-sheet/q2-action-sheet.js.map +1 -1
  64. package/dist/collection/components/q2-action-sheet/test/q2-action-sheet-test.e2e.js.map +1 -1
  65. package/dist/collection/components/q2-avatar/q2-avatar.js +1 -1
  66. package/dist/collection/components/q2-avatar/q2-avatar.js.map +1 -1
  67. package/dist/collection/components/q2-avatar/test/q2-avatar-test.e2e.js.map +1 -1
  68. package/dist/collection/components/q2-badge/q2-badge.js.map +1 -1
  69. package/dist/collection/components/q2-badge/test/q2-badge-test.e2e.js.map +1 -1
  70. package/dist/collection/components/q2-btn/q2-btn.js +4 -0
  71. package/dist/collection/components/q2-btn/q2-btn.js.map +1 -1
  72. package/dist/collection/components/q2-btn/test/q2-btn-test.e2e.js.map +1 -1
  73. package/dist/collection/components/q2-calendar/q2-calendar-helpers.js.map +1 -1
  74. package/dist/collection/components/q2-calendar/q2-calendar-types.js.map +1 -1
  75. package/dist/collection/components/q2-calendar/q2-calendar-validation.js.map +1 -1
  76. package/dist/collection/components/q2-calendar/q2-calendar.js.map +1 -1
  77. package/dist/collection/components/q2-calendar/q2-month-picker.js +2 -2
  78. package/dist/collection/components/q2-calendar/q2-month-picker.js.map +1 -1
  79. package/dist/collection/components/q2-calendar/test/helpers-test.e2e.js.map +1 -1
  80. package/dist/collection/components/q2-calendar/test/q2-calendar-month-picker-test.e2e.js.map +1 -1
  81. package/dist/collection/components/q2-calendar/test/q2-calendar-test.e2e.js +2 -2
  82. package/dist/collection/components/q2-calendar/test/q2-calendar-test.e2e.js.map +1 -1
  83. package/dist/collection/components/q2-calendar/test/validation-test.e2e.js.map +1 -1
  84. package/dist/collection/components/q2-card/q2-card.js.map +1 -1
  85. package/dist/collection/components/q2-card/test/q2-card-test.e2e.js.map +1 -1
  86. package/dist/collection/components/q2-carousel/q2-carousel.js.map +1 -1
  87. package/dist/collection/components/q2-carousel/test/q2-carousel-test.e2e.js.map +1 -1
  88. package/dist/collection/components/q2-carousel-pane/q2-carousel-pane.js +2 -2
  89. package/dist/collection/components/q2-carousel-pane/q2-carousel-pane.js.map +1 -1
  90. package/dist/collection/components/q2-carousel-pane/test/q2-carousel-pane-test.e2e.js.map +1 -1
  91. package/dist/collection/components/q2-carousel-pane/test/q2-carousel-pane-test.spec.js.map +1 -1
  92. package/dist/collection/components/q2-chart-area/q2-chart-area.js +1 -1
  93. package/dist/collection/components/q2-chart-area/q2-chart-area.js.map +1 -1
  94. package/dist/collection/components/q2-chart-area/test/q2-chart-area-test.e2e.js.map +1 -1
  95. package/dist/collection/components/q2-chart-bar/q2-chart-bar.js +1 -1
  96. package/dist/collection/components/q2-chart-bar/q2-chart-bar.js.map +1 -1
  97. package/dist/collection/components/q2-chart-bar/test/q2-chart-bar-test.e2e.js.map +1 -1
  98. package/dist/collection/components/q2-chart-donut/q2-chart-donut.js +1 -1
  99. package/dist/collection/components/q2-chart-donut/q2-chart-donut.js.map +1 -1
  100. package/dist/collection/components/q2-chart-donut/test/q2-chart-donut-test.e2e.js.map +1 -1
  101. package/dist/collection/components/q2-checkbox/q2-checkbox.js.map +1 -1
  102. package/dist/collection/components/q2-checkbox/test/q2-checkbox-test.e2e.js.map +1 -1
  103. package/dist/collection/components/q2-checkbox-group/q2-checkbox-group.js.map +1 -1
  104. package/dist/collection/components/q2-checkbox-group/test/q2-checkbox-group-test.e2e.js.map +1 -1
  105. package/dist/collection/components/q2-currency/q2-currency.js +1 -1
  106. package/dist/collection/components/q2-currency/q2-currency.js.map +1 -1
  107. package/dist/collection/components/q2-currency/test/q2-currency-test.e2e.js.map +1 -1
  108. package/dist/collection/components/q2-data-table/q2-data-table.js.map +1 -1
  109. package/dist/collection/components/q2-data-table/test/q2-data-table-test.e2e.js.map +1 -1
  110. package/dist/collection/components/q2-detail/q2-detail.js +1 -1
  111. package/dist/collection/components/q2-detail/q2-detail.js.map +1 -1
  112. package/dist/collection/components/q2-detail/test/q2-detail-test.e2e.js.map +1 -1
  113. package/dist/collection/components/q2-dropdown/q2-dropdown.js +9 -11
  114. package/dist/collection/components/q2-dropdown/q2-dropdown.js.map +1 -1
  115. package/dist/collection/components/q2-dropdown/test/q2-dropdown-test.e2e.js +5 -17
  116. package/dist/collection/components/q2-dropdown/test/q2-dropdown-test.e2e.js.map +1 -1
  117. package/dist/collection/components/q2-dropdown-item/q2-dropdown-item.js.map +1 -1
  118. package/dist/collection/components/q2-dropdown-item/test/q2-dropdown-item-test.e2e.js.map +1 -1
  119. package/dist/collection/components/q2-editable-field/q2-editable-field.js +12 -7
  120. package/dist/collection/components/q2-editable-field/q2-editable-field.js.map +1 -1
  121. package/dist/collection/components/q2-editable-field/test/q2-editable-field-test.e2e.js.map +1 -1
  122. package/dist/collection/components/q2-formatted-text/q2-formatted-text.js +1 -1
  123. package/dist/collection/components/q2-formatted-text/q2-formatted-text.js.map +1 -1
  124. package/dist/collection/components/q2-formatted-text/test/q2-formatted-text-test.e2e.js.map +1 -1
  125. package/dist/collection/components/q2-icon/q2-icon-types.js.map +1 -1
  126. package/dist/collection/components/q2-icon/q2-icon.js +4 -0
  127. package/dist/collection/components/q2-icon/q2-icon.js.map +1 -1
  128. package/dist/collection/components/q2-icon/test/q2-icon-test.e2e.js.map +1 -1
  129. package/dist/collection/components/q2-input/formatting/alpha.js.map +1 -1
  130. package/dist/collection/components/q2-input/formatting/alphanumeric.js.map +1 -1
  131. package/dist/collection/components/q2-input/formatting/credit-card.js.map +1 -1
  132. package/dist/collection/components/q2-input/formatting/credit-card.spec.js.map +1 -1
  133. package/dist/collection/components/q2-input/formatting/currency.js.map +1 -1
  134. package/dist/collection/components/q2-input/formatting/date.js.map +1 -1
  135. package/dist/collection/components/q2-input/formatting/generic.js.map +1 -1
  136. package/dist/collection/components/q2-input/formatting/number.js.map +1 -1
  137. package/dist/collection/components/q2-input/formatting/numeric.js.map +1 -1
  138. package/dist/collection/components/q2-input/formatting/phone.js.map +1 -1
  139. package/dist/collection/components/q2-input/formatting/postal.js.map +1 -1
  140. package/dist/collection/components/q2-input/formatting/ssn.js.map +1 -1
  141. package/dist/collection/components/q2-input/formatting/tin.js.map +1 -1
  142. package/dist/collection/components/q2-input/q2-input-types.js.map +1 -1
  143. package/dist/collection/components/q2-input/q2-input.js +1 -1
  144. package/dist/collection/components/q2-input/q2-input.js.map +1 -1
  145. package/dist/collection/components/q2-input/test/q2-input-credit-card-test.e2e.js.map +1 -1
  146. package/dist/collection/components/q2-input/test/q2-input-test.e2e.js.map +1 -1
  147. package/dist/collection/components/q2-item/q2-item.js +1 -1
  148. package/dist/collection/components/q2-item/q2-item.js.map +1 -1
  149. package/dist/collection/components/q2-item/test/q2-item-test.e2e.js.map +1 -1
  150. package/dist/collection/components/q2-item/test/q2-item-test.spec.js.map +1 -1
  151. package/dist/collection/components/q2-legend/q2-legend.js +1 -1
  152. package/dist/collection/components/q2-legend/q2-legend.js.map +1 -1
  153. package/dist/collection/components/q2-legend/test/q2-legend-test.e2e.js.map +1 -1
  154. package/dist/collection/components/q2-legend/test/q2-legend-test.spec.js.map +1 -1
  155. package/dist/collection/components/q2-link/q2-link.js.map +1 -1
  156. package/dist/collection/components/q2-link/test/q2-link-test.e2e.js.map +1 -1
  157. package/dist/collection/components/q2-list/q2-list.js +1 -1
  158. package/dist/collection/components/q2-list/q2-list.js.map +1 -1
  159. package/dist/collection/components/q2-list/test/q2-list-test.e2e.js.map +1 -1
  160. package/dist/collection/components/q2-loading/q2-loading.js.map +1 -1
  161. package/dist/collection/components/q2-loading/skeleton/q2-loading-element/index.js.map +1 -1
  162. package/dist/collection/components/q2-loading/skeleton/shapes.js.map +1 -1
  163. package/dist/collection/components/q2-loading/test/q2-loading-element-test.e2e.js.map +1 -1
  164. package/dist/collection/components/q2-loading/test/q2-loading-test.e2e.js.map +1 -1
  165. package/dist/collection/components/q2-loc/q2-loc.js +1 -1
  166. package/dist/collection/components/q2-loc/q2-loc.js.map +1 -1
  167. package/dist/collection/components/q2-loc/test/q2-loc-test.e2e.js.map +1 -1
  168. package/dist/collection/components/q2-message/q2-message.js +1 -1
  169. package/dist/collection/components/q2-message/q2-message.js.map +1 -1
  170. package/dist/collection/components/q2-message/test/q2-message-test.e2e.js.map +1 -1
  171. package/dist/collection/components/q2-optgroup/q2-optgroup.js +1 -1
  172. package/dist/collection/components/q2-optgroup/q2-optgroup.js.map +1 -1
  173. package/dist/collection/components/q2-optgroup/test/q2-optgroup-test.e2e.js.map +1 -1
  174. package/dist/collection/components/q2-option/q2-option.js +1 -1
  175. package/dist/collection/components/q2-option/q2-option.js.map +1 -1
  176. package/dist/collection/components/q2-option/test/q2-option-test.e2e.js.map +1 -1
  177. package/dist/collection/components/q2-option-list/q2-option-list.js.map +1 -1
  178. package/dist/collection/components/q2-option-list/test/q2-option-list-test.e2e.js.map +1 -1
  179. package/dist/collection/components/q2-pagination/q2-pagination.js +2 -2
  180. package/dist/collection/components/q2-pagination/q2-pagination.js.map +1 -1
  181. package/dist/collection/components/q2-pagination/test/q2-pagination-test.e2e.js +1 -0
  182. package/dist/collection/components/q2-pagination/test/q2-pagination-test.e2e.js.map +1 -1
  183. package/dist/collection/components/q2-pill/q2-pill.js +1 -1
  184. package/dist/collection/components/q2-pill/q2-pill.js.map +1 -1
  185. package/dist/collection/components/q2-pill/test/q2-pill-test.e2e.js +1 -1
  186. package/dist/collection/components/q2-pill/test/q2-pill-test.e2e.js.map +1 -1
  187. package/dist/collection/components/q2-popover/q2-popover.css +18 -10
  188. package/dist/collection/components/q2-popover/q2-popover.js +66 -70
  189. package/dist/collection/components/q2-popover/q2-popover.js.map +1 -1
  190. package/dist/collection/components/q2-popover/test/q2-popover-test.e2e.js +1 -83
  191. package/dist/collection/components/q2-popover/test/q2-popover-test.e2e.js.map +1 -1
  192. package/dist/collection/components/q2-popover/test/q2-popover-test.spec.js +743 -435
  193. package/dist/collection/components/q2-popover/test/q2-popover-test.spec.js.map +1 -1
  194. package/dist/collection/components/q2-radio/q2-radio.js.map +1 -1
  195. package/dist/collection/components/q2-radio/test/q2-radio-test.e2e.js.map +1 -1
  196. package/dist/collection/components/q2-radio-group/q2-radio-group.js.map +1 -1
  197. package/dist/collection/components/q2-radio-group/test/q2-radio-group-test.e2e.js.map +1 -1
  198. package/dist/collection/components/q2-relative-time/q2-relative-time.js +1 -1
  199. package/dist/collection/components/q2-relative-time/q2-relative-time.js.map +1 -1
  200. package/dist/collection/components/q2-relative-time/test/q2-relative-time-test.e2e.js.map +1 -1
  201. package/dist/collection/components/q2-resize-observer/q2-resize-observer.js +1 -1
  202. package/dist/collection/components/q2-resize-observer/q2-resize-observer.js.map +1 -1
  203. package/dist/collection/components/q2-resize-observer/test/q2-resize-observer.e2e.js.map +1 -1
  204. package/dist/collection/components/q2-resize-observer/test/q2-resize-observer.spec.js.map +1 -1
  205. package/dist/collection/components/q2-section/q2-section.js +2 -2
  206. package/dist/collection/components/q2-section/q2-section.js.map +1 -1
  207. package/dist/collection/components/q2-section/test/q2-section-test.e2e.js.map +1 -1
  208. package/dist/collection/components/q2-select/q2-select.js +114 -18
  209. package/dist/collection/components/q2-select/q2-select.js.map +1 -1
  210. package/dist/collection/components/q2-select/test/q2-select-test.e2e.js +1 -2
  211. package/dist/collection/components/q2-select/test/q2-select-test.e2e.js.map +1 -1
  212. package/dist/collection/components/q2-select/test/q2-select-test.spec.js +412 -0
  213. package/dist/collection/components/q2-select/test/q2-select-test.spec.js.map +1 -0
  214. package/dist/collection/components/q2-stepper/q2-stepper.js +1 -1
  215. package/dist/collection/components/q2-stepper/q2-stepper.js.map +1 -1
  216. package/dist/collection/components/q2-stepper/test/q2-stepper-test.e2e.js.map +1 -1
  217. package/dist/collection/components/q2-stepper-pane/q2-stepper-pane.js.map +1 -1
  218. package/dist/collection/components/q2-stepper-pane/test/q2-stepper-pane-test.e2e.js.map +1 -1
  219. package/dist/collection/components/q2-stepper-vertical/q2-stepper-vertical.js +1 -1
  220. package/dist/collection/components/q2-stepper-vertical/q2-stepper-vertical.js.map +1 -1
  221. package/dist/collection/components/q2-stepper-vertical/test/q2-stepper-vertical-test.e2e.js.map +1 -1
  222. package/dist/collection/components/q2-tab-container/q2-tab-container.js +1 -1
  223. package/dist/collection/components/q2-tab-container/q2-tab-container.js.map +1 -1
  224. package/dist/collection/components/q2-tab-container/test/q2-tab-container-test.e2e.js.map +1 -1
  225. package/dist/collection/components/q2-tab-container/test/q2-tab-container-test.spec.js.map +1 -1
  226. package/dist/collection/components/q2-tab-pane/q2-tab-pane.js +1 -1
  227. package/dist/collection/components/q2-tab-pane/q2-tab-pane.js.map +1 -1
  228. package/dist/collection/components/q2-tab-pane/test/q2-tab-pane-test.e2e.js.map +1 -1
  229. package/dist/collection/components/q2-tag/q2-tag.js +1 -1
  230. package/dist/collection/components/q2-tag/q2-tag.js.map +1 -1
  231. package/dist/collection/components/q2-tag/test/q2-tag-test.e2e.js +6 -1
  232. package/dist/collection/components/q2-tag/test/q2-tag-test.e2e.js.map +1 -1
  233. package/dist/collection/components/q2-textarea/q2-textarea.js +2 -1
  234. package/dist/collection/components/q2-textarea/q2-textarea.js.map +1 -1
  235. package/dist/collection/components/q2-textarea/test/q2-textarea-test.e2e.js.map +1 -1
  236. package/dist/collection/components/q2-tooltip/q2-tooltip.js.map +1 -1
  237. package/dist/collection/components/q2-tooltip/test/q2-tooltip-test.e2e.js.map +1 -1
  238. package/dist/collection/components/tecton-tab-pane/tecton-tab-pane-types.js.map +1 -1
  239. package/dist/collection/components/tecton-tab-pane/tecton-tab-pane.js +2 -2
  240. package/dist/collection/components/tecton-tab-pane/tecton-tab-pane.js.map +1 -1
  241. package/dist/collection/components/tecton-tab-pane/test/tecton-tab-pane-test.e2e.js.map +1 -1
  242. package/dist/collection/index.js.map +1 -1
  243. package/dist/collection/utils/action-sheet.js.map +1 -1
  244. package/dist/collection/utils/charting.js.map +1 -1
  245. package/dist/collection/utils/helpers.js.map +1 -1
  246. package/dist/collection/utils/index.js.map +1 -1
  247. package/dist/collection/utils/sanitize-html-string.js.map +1 -1
  248. package/dist/collection/utils/sanitize-regex-string.js.map +1 -1
  249. package/dist/collection/utils/test/action-sheet-test.e2e.js.map +1 -1
  250. package/dist/collection/utils/test/index.spec.js.map +1 -1
  251. package/dist/components/index2.js +1 -20
  252. package/dist/components/index2.js.map +1 -1
  253. package/dist/components/q2-action-group.js +1 -1
  254. package/dist/components/q2-action-sheet.js +1 -1
  255. package/dist/components/q2-avatar2.js +1 -1
  256. package/dist/components/q2-btn2.js +4 -0
  257. package/dist/components/q2-btn2.js.map +1 -1
  258. package/dist/components/q2-carousel-pane.js +2 -2
  259. package/dist/components/q2-chart-area.js +1 -1
  260. package/dist/components/q2-chart-bar.js +1 -1
  261. package/dist/components/q2-chart-donut.js +1 -1
  262. package/dist/components/q2-currency.js +1 -1
  263. package/dist/components/q2-detail.js +1 -1
  264. package/dist/components/q2-dropdown.js +9 -11
  265. package/dist/components/q2-dropdown.js.map +1 -1
  266. package/dist/components/q2-editable-field.js +7 -8
  267. package/dist/components/q2-editable-field.js.map +1 -1
  268. package/dist/components/q2-formatted-text.js +1 -1
  269. package/dist/components/q2-icon2.js +4 -0
  270. package/dist/components/q2-icon2.js.map +1 -1
  271. package/dist/components/q2-input2.js +1 -1
  272. package/dist/components/q2-item.js +1 -1
  273. package/dist/components/q2-legend2.js +1 -1
  274. package/dist/components/q2-list.js +1 -1
  275. package/dist/components/q2-loc.js +1 -1
  276. package/dist/components/q2-message2.js +1 -1
  277. package/dist/components/q2-month-picker.js +2 -2
  278. package/dist/components/q2-optgroup2.js +1 -1
  279. package/dist/components/q2-option2.js +1 -1
  280. package/dist/components/q2-pagination.js +2 -2
  281. package/dist/components/q2-pill.js +1 -1
  282. package/dist/components/q2-popover2.js +65 -70
  283. package/dist/components/q2-popover2.js.map +1 -1
  284. package/dist/components/q2-relative-time.js +1 -1
  285. package/dist/components/q2-resize-observer2.js +1 -1
  286. package/dist/components/q2-section.js +2 -2
  287. package/dist/components/q2-select2.js +96 -19
  288. package/dist/components/q2-select2.js.map +1 -1
  289. package/dist/components/q2-stepper-vertical.js +1 -1
  290. package/dist/components/q2-stepper.js +1 -1
  291. package/dist/components/q2-tab-container.js +1 -1
  292. package/dist/components/q2-tab-pane.js +1 -1
  293. package/dist/components/q2-tag.js +1 -1
  294. package/dist/components/q2-textarea.js +2 -1
  295. package/dist/components/q2-textarea.js.map +1 -1
  296. package/dist/components/tecton-tab-pane.js +2 -2
  297. package/dist/esm/click-elsewhere_2.entry.js +66 -71
  298. package/dist/esm/click-elsewhere_2.entry.js.map +1 -1
  299. package/dist/esm/{index-844fc010.js → index-a185b189.js} +2 -21
  300. package/dist/esm/index-a185b189.js.map +1 -0
  301. package/dist/esm/loader.js +1 -1
  302. package/dist/esm/q2-action-group.entry.js +1 -1
  303. package/dist/esm/q2-action-sheet.entry.js +2 -2
  304. package/dist/esm/q2-avatar.entry.js +1 -1
  305. package/dist/esm/q2-badge_7.entry.js +12 -4
  306. package/dist/esm/q2-badge_7.entry.js.map +1 -1
  307. package/dist/esm/q2-calendar.entry.js +1 -1
  308. package/dist/esm/q2-card.entry.js +1 -1
  309. package/dist/esm/q2-carousel-pane.entry.js +3 -3
  310. package/dist/esm/q2-carousel.entry.js +1 -1
  311. package/dist/esm/q2-chart-area.entry.js +2 -2
  312. package/dist/esm/q2-chart-bar.entry.js +2 -2
  313. package/dist/esm/q2-chart-donut.entry.js +2 -2
  314. package/dist/esm/q2-checkbox-group.entry.js +1 -1
  315. package/dist/esm/q2-checkbox.entry.js +1 -1
  316. package/dist/esm/q2-currency.entry.js +1 -1
  317. package/dist/esm/q2-data-table.entry.js +1 -1
  318. package/dist/esm/q2-detail.entry.js +2 -2
  319. package/dist/esm/q2-dropdown-item.entry.js +1 -1
  320. package/dist/esm/q2-dropdown.entry.js +10 -12
  321. package/dist/esm/q2-dropdown.entry.js.map +1 -1
  322. package/dist/esm/q2-editable-field.entry.js +7 -8
  323. package/dist/esm/q2-editable-field.entry.js.map +1 -1
  324. package/dist/esm/q2-formatted-text.entry.js +1 -1
  325. package/dist/esm/q2-item.entry.js +2 -2
  326. package/dist/esm/q2-legend.entry.js +1 -1
  327. package/dist/esm/q2-list.entry.js +2 -2
  328. package/dist/esm/q2-loc.entry.js +2 -2
  329. package/dist/esm/q2-message.entry.js +2 -2
  330. package/dist/esm/q2-month-picker.entry.js +3 -3
  331. package/dist/esm/q2-optgroup.entry.js +2 -2
  332. package/dist/esm/q2-option-list.entry.js +1 -1
  333. package/dist/esm/q2-option.entry.js +1 -1
  334. package/dist/esm/q2-pagination.entry.js +3 -3
  335. package/dist/esm/q2-pill.entry.js +2 -2
  336. package/dist/esm/q2-radio-group.entry.js +1 -1
  337. package/dist/esm/q2-radio.entry.js +1 -1
  338. package/dist/esm/q2-relative-time.entry.js +2 -2
  339. package/dist/esm/q2-resize-observer.entry.js +1 -1
  340. package/dist/esm/q2-section.entry.js +3 -3
  341. package/dist/esm/q2-select.entry.js +94 -17
  342. package/dist/esm/q2-select.entry.js.map +1 -1
  343. package/dist/esm/q2-stepper-pane.entry.js +1 -1
  344. package/dist/esm/q2-stepper-vertical.entry.js +2 -2
  345. package/dist/esm/q2-stepper.entry.js +2 -2
  346. package/dist/esm/q2-tag.entry.js +2 -2
  347. package/dist/esm/q2-tecton-elements.js +1 -1
  348. package/dist/esm/q2-textarea.entry.js +3 -2
  349. package/dist/esm/q2-textarea.entry.js.map +1 -1
  350. package/dist/esm/q2-tooltip.entry.js +1 -1
  351. package/dist/esm/tecton-tab-pane.entry.js +2 -2
  352. package/dist/jest.setup.js +22 -0
  353. package/dist/jest.setup.js.map +1 -0
  354. package/dist/q2-tecton-elements/{p-7c9a0122.entry.js → p-089801c6.entry.js} +2 -2
  355. package/dist/q2-tecton-elements/p-0e63312a.entry.js +2 -0
  356. package/dist/q2-tecton-elements/p-0e63312a.entry.js.map +1 -0
  357. package/dist/q2-tecton-elements/{p-7c9f8b62.entry.js → p-15383dc8.entry.js} +2 -2
  358. package/dist/q2-tecton-elements/{p-7903cd15.entry.js → p-18209f3b.entry.js} +2 -2
  359. package/dist/q2-tecton-elements/{p-ac6aa392.entry.js → p-1f7e9ab9.entry.js} +2 -2
  360. package/dist/q2-tecton-elements/{p-7aef0c08.entry.js → p-29f1f2df.entry.js} +2 -2
  361. package/dist/q2-tecton-elements/{p-8d07cf91.entry.js → p-2a296347.entry.js} +2 -2
  362. package/dist/q2-tecton-elements/{p-4e10550d.entry.js → p-3b075b65.entry.js} +2 -2
  363. package/dist/q2-tecton-elements/{p-c5667d5d.entry.js → p-432869d3.entry.js} +2 -2
  364. package/dist/q2-tecton-elements/{p-f5f23659.entry.js → p-4a399340.entry.js} +2 -2
  365. package/dist/q2-tecton-elements/{p-5f99a4a8.entry.js → p-4cabd4a3.entry.js} +2 -2
  366. package/dist/q2-tecton-elements/{p-07d1c3ae.entry.js → p-4e4aa30e.entry.js} +2 -2
  367. package/dist/q2-tecton-elements/{p-a47597dd.entry.js → p-50f6e95a.entry.js} +2 -2
  368. package/dist/q2-tecton-elements/{p-7906f49e.entry.js → p-53224667.entry.js} +2 -2
  369. package/dist/q2-tecton-elements/p-5df24439.entry.js +2 -0
  370. package/dist/q2-tecton-elements/p-5df24439.entry.js.map +1 -0
  371. package/dist/q2-tecton-elements/{p-b1784be3.entry.js → p-65f60a00.entry.js} +2 -2
  372. package/dist/q2-tecton-elements/{p-188eb162.entry.js → p-7e87cbdf.entry.js} +3 -3
  373. package/dist/q2-tecton-elements/p-85c46278.entry.js +2 -0
  374. package/dist/q2-tecton-elements/p-85c46278.entry.js.map +1 -0
  375. package/dist/q2-tecton-elements/{p-8d2b02e1.entry.js → p-8a75584e.entry.js} +2 -2
  376. package/dist/q2-tecton-elements/{p-5637c486.entry.js → p-998d2b5e.entry.js} +2 -2
  377. package/dist/q2-tecton-elements/{p-e2c800ef.entry.js → p-9e8e33e4.entry.js} +2 -2
  378. package/dist/q2-tecton-elements/{p-1c88d057.entry.js → p-a2793557.entry.js} +2 -2
  379. package/dist/q2-tecton-elements/{p-95a7c042.entry.js → p-a64e521d.entry.js} +2 -2
  380. package/dist/q2-tecton-elements/{p-16910682.entry.js → p-aad42723.entry.js} +2 -2
  381. package/dist/q2-tecton-elements/{p-f135b265.entry.js → p-ac7a3bc1.entry.js} +2 -2
  382. package/dist/q2-tecton-elements/{p-f135b265.entry.js.map → p-ac7a3bc1.entry.js.map} +1 -1
  383. package/dist/q2-tecton-elements/{p-20a3d6ed.entry.js → p-b17e9798.entry.js} +2 -2
  384. package/dist/q2-tecton-elements/{p-5a834214.entry.js → p-bbe24257.entry.js} +2 -2
  385. package/dist/q2-tecton-elements/{p-b7de110e.entry.js → p-bc530c75.entry.js} +2 -2
  386. package/dist/q2-tecton-elements/{p-2733583e.entry.js → p-c324d1c8.entry.js} +2 -2
  387. package/dist/q2-tecton-elements/{p-3e428290.entry.js → p-c3566e7a.entry.js} +2 -2
  388. package/dist/q2-tecton-elements/p-c5445b5e.js +2 -0
  389. package/dist/q2-tecton-elements/p-c5445b5e.js.map +1 -0
  390. package/dist/q2-tecton-elements/{p-e216ef3f.entry.js → p-c6fb83ff.entry.js} +2 -2
  391. package/dist/q2-tecton-elements/{p-1c760a89.entry.js → p-cca5af1f.entry.js} +2 -2
  392. package/dist/q2-tecton-elements/{p-a5d0e252.entry.js → p-cfcec7f4.entry.js} +2 -2
  393. package/dist/q2-tecton-elements/{p-c235ab3f.entry.js → p-d312f179.entry.js} +2 -2
  394. package/dist/q2-tecton-elements/{p-96b1406c.entry.js → p-d326261a.entry.js} +2 -2
  395. package/dist/q2-tecton-elements/{p-06701928.entry.js → p-dc80c2ed.entry.js} +2 -2
  396. package/dist/q2-tecton-elements/{p-4774e5b3.entry.js → p-e0a617fd.entry.js} +2 -2
  397. package/dist/q2-tecton-elements/p-e940ccfb.entry.js +2 -0
  398. package/dist/q2-tecton-elements/p-e940ccfb.entry.js.map +1 -0
  399. package/dist/q2-tecton-elements/{p-50f7328f.entry.js → p-e9dfbb78.entry.js} +2 -2
  400. package/dist/q2-tecton-elements/{p-ff8f1a32.entry.js → p-ebc71f10.entry.js} +2 -2
  401. package/dist/q2-tecton-elements/{p-ad057d10.entry.js → p-f043a9f1.entry.js} +2 -2
  402. package/dist/q2-tecton-elements/{p-fff01dc1.entry.js → p-f51426b0.entry.js} +2 -2
  403. package/dist/q2-tecton-elements/p-f8710843.entry.js +2 -0
  404. package/dist/q2-tecton-elements/p-f8710843.entry.js.map +1 -0
  405. package/dist/q2-tecton-elements/{p-81fbe718.entry.js → p-fa68a890.entry.js} +2 -2
  406. package/dist/q2-tecton-elements/{p-490ef8e5.entry.js → p-fbd6cb9a.entry.js} +2 -2
  407. package/dist/q2-tecton-elements/q2-tecton-elements.esm.js +1 -1
  408. package/dist/q2-tecton-elements/q2-tecton-elements.esm.js.map +1 -1
  409. package/dist/types/builds/q2e/development/tecton/tecton/packages/q2-tecton-elements/.stencil/jest.setup.d.ts +1 -0
  410. package/dist/types/components/q2-btn/q2-btn.d.ts +1 -0
  411. package/dist/types/components/q2-dropdown/q2-dropdown.d.ts +1 -4
  412. package/dist/types/components/q2-editable-field/q2-editable-field.d.ts +2 -2
  413. package/dist/types/components/q2-icon/q2-icon.d.ts +1 -0
  414. package/dist/types/components/q2-popover/q2-popover.d.ts +4 -5
  415. package/dist/types/components/q2-select/q2-select.d.ts +19 -0
  416. package/package.json +3 -3
  417. package/dist/cjs/index-9aa4a776.js.map +0 -1
  418. package/dist/esm/index-844fc010.js.map +0 -1
  419. package/dist/q2-tecton-elements/p-1305f7ca.entry.js +0 -2
  420. package/dist/q2-tecton-elements/p-1305f7ca.entry.js.map +0 -1
  421. package/dist/q2-tecton-elements/p-15ac45d6.js +0 -2
  422. package/dist/q2-tecton-elements/p-15ac45d6.js.map +0 -1
  423. package/dist/q2-tecton-elements/p-56df21b0.entry.js +0 -2
  424. package/dist/q2-tecton-elements/p-56df21b0.entry.js.map +0 -1
  425. package/dist/q2-tecton-elements/p-896c7008.entry.js +0 -2
  426. package/dist/q2-tecton-elements/p-896c7008.entry.js.map +0 -1
  427. package/dist/q2-tecton-elements/p-b0e5e9dc.entry.js +0 -2
  428. package/dist/q2-tecton-elements/p-b0e5e9dc.entry.js.map +0 -1
  429. package/dist/q2-tecton-elements/p-f7867f21.entry.js +0 -2
  430. package/dist/q2-tecton-elements/p-f7867f21.entry.js.map +0 -1
  431. /package/dist/q2-tecton-elements/{p-7c9a0122.entry.js.map → p-089801c6.entry.js.map} +0 -0
  432. /package/dist/q2-tecton-elements/{p-7c9f8b62.entry.js.map → p-15383dc8.entry.js.map} +0 -0
  433. /package/dist/q2-tecton-elements/{p-7903cd15.entry.js.map → p-18209f3b.entry.js.map} +0 -0
  434. /package/dist/q2-tecton-elements/{p-ac6aa392.entry.js.map → p-1f7e9ab9.entry.js.map} +0 -0
  435. /package/dist/q2-tecton-elements/{p-7aef0c08.entry.js.map → p-29f1f2df.entry.js.map} +0 -0
  436. /package/dist/q2-tecton-elements/{p-8d07cf91.entry.js.map → p-2a296347.entry.js.map} +0 -0
  437. /package/dist/q2-tecton-elements/{p-4e10550d.entry.js.map → p-3b075b65.entry.js.map} +0 -0
  438. /package/dist/q2-tecton-elements/{p-c5667d5d.entry.js.map → p-432869d3.entry.js.map} +0 -0
  439. /package/dist/q2-tecton-elements/{p-f5f23659.entry.js.map → p-4a399340.entry.js.map} +0 -0
  440. /package/dist/q2-tecton-elements/{p-5f99a4a8.entry.js.map → p-4cabd4a3.entry.js.map} +0 -0
  441. /package/dist/q2-tecton-elements/{p-07d1c3ae.entry.js.map → p-4e4aa30e.entry.js.map} +0 -0
  442. /package/dist/q2-tecton-elements/{p-a47597dd.entry.js.map → p-50f6e95a.entry.js.map} +0 -0
  443. /package/dist/q2-tecton-elements/{p-7906f49e.entry.js.map → p-53224667.entry.js.map} +0 -0
  444. /package/dist/q2-tecton-elements/{p-b1784be3.entry.js.map → p-65f60a00.entry.js.map} +0 -0
  445. /package/dist/q2-tecton-elements/{p-188eb162.entry.js.map → p-7e87cbdf.entry.js.map} +0 -0
  446. /package/dist/q2-tecton-elements/{p-8d2b02e1.entry.js.map → p-8a75584e.entry.js.map} +0 -0
  447. /package/dist/q2-tecton-elements/{p-5637c486.entry.js.map → p-998d2b5e.entry.js.map} +0 -0
  448. /package/dist/q2-tecton-elements/{p-e2c800ef.entry.js.map → p-9e8e33e4.entry.js.map} +0 -0
  449. /package/dist/q2-tecton-elements/{p-1c88d057.entry.js.map → p-a2793557.entry.js.map} +0 -0
  450. /package/dist/q2-tecton-elements/{p-95a7c042.entry.js.map → p-a64e521d.entry.js.map} +0 -0
  451. /package/dist/q2-tecton-elements/{p-16910682.entry.js.map → p-aad42723.entry.js.map} +0 -0
  452. /package/dist/q2-tecton-elements/{p-20a3d6ed.entry.js.map → p-b17e9798.entry.js.map} +0 -0
  453. /package/dist/q2-tecton-elements/{p-5a834214.entry.js.map → p-bbe24257.entry.js.map} +0 -0
  454. /package/dist/q2-tecton-elements/{p-b7de110e.entry.js.map → p-bc530c75.entry.js.map} +0 -0
  455. /package/dist/q2-tecton-elements/{p-2733583e.entry.js.map → p-c324d1c8.entry.js.map} +0 -0
  456. /package/dist/q2-tecton-elements/{p-3e428290.entry.js.map → p-c3566e7a.entry.js.map} +0 -0
  457. /package/dist/q2-tecton-elements/{p-e216ef3f.entry.js.map → p-c6fb83ff.entry.js.map} +0 -0
  458. /package/dist/q2-tecton-elements/{p-1c760a89.entry.js.map → p-cca5af1f.entry.js.map} +0 -0
  459. /package/dist/q2-tecton-elements/{p-a5d0e252.entry.js.map → p-cfcec7f4.entry.js.map} +0 -0
  460. /package/dist/q2-tecton-elements/{p-c235ab3f.entry.js.map → p-d312f179.entry.js.map} +0 -0
  461. /package/dist/q2-tecton-elements/{p-96b1406c.entry.js.map → p-d326261a.entry.js.map} +0 -0
  462. /package/dist/q2-tecton-elements/{p-06701928.entry.js.map → p-dc80c2ed.entry.js.map} +0 -0
  463. /package/dist/q2-tecton-elements/{p-4774e5b3.entry.js.map → p-e0a617fd.entry.js.map} +0 -0
  464. /package/dist/q2-tecton-elements/{p-50f7328f.entry.js.map → p-e9dfbb78.entry.js.map} +0 -0
  465. /package/dist/q2-tecton-elements/{p-ff8f1a32.entry.js.map → p-ebc71f10.entry.js.map} +0 -0
  466. /package/dist/q2-tecton-elements/{p-ad057d10.entry.js.map → p-f043a9f1.entry.js.map} +0 -0
  467. /package/dist/q2-tecton-elements/{p-fff01dc1.entry.js.map → p-f51426b0.entry.js.map} +0 -0
  468. /package/dist/q2-tecton-elements/{p-81fbe718.entry.js.map → p-fa68a890.entry.js.map} +0 -0
  469. /package/dist/q2-tecton-elements/{p-490ef8e5.entry.js.map → p-fbd6cb9a.entry.js.map} +0 -0
@@ -146,10 +146,10 @@ const Q2MonthPicker$1 = /*@__PURE__*/ proxyCustomElement(class Q2MonthPicker ext
146
146
  // #endregion
147
147
  // #region Render Methods
148
148
  render() {
149
- return (h("div", { key: 'd22180a2a528e72f2e44753b6a4641f51165552d', class: "month-container", onKeyDown: this.onMonthKeydown }, h("div", { key: '983b7140b4c87233e9110b4f6b951ab30d2eb516', class: "navigation" }, h("q2-btn", { key: 'ee79cfe4a3e38cd0b97307738700e94ad23c7e4b', class: "year-btn", onClick: () => this.viewChange.emit({
149
+ return (h("div", { key: '555dca80155124cd1233f73b36568402493ceab4', class: "month-container", onKeyDown: this.onMonthKeydown }, h("div", { key: '3f09186cd4e2311e381824ac7a1a48c016065a10', class: "navigation" }, h("q2-btn", { key: '00490d53e3fa767830e5f3efe729d8b67875fe66', class: "year-btn", onClick: () => this.viewChange.emit({
150
150
  view: 'year',
151
151
  selectedYear: this.year,
152
- }) }, h("span", { key: '839b8de5beabf7be05a58f7531826548bb68d3ba', class: "year" }, this.year), h("q2-icon", { key: '100c2dd1f43d29be9f51f5292973cb6dc727adcb', class: "year-icon off", type: "chevron-down" })), h("div", { key: 'e3a62840e3510b9abf165a540f3db8a85ece6073', class: "month-controller" }, h("div", { key: '65bc9199498ad0dd401a561739dcf8101e22e9fe', class: "cal-year-prev-next" }, h("q2-btn", { key: '11586afd04c7f4952ea7e9c97b82c28003d1eb56', label: loc('tecton.element.calendar.previousYear'), "hide-label": true, class: "cal-nav-btn prev-year", "test-id": "previousYearButton", onClick: () => this.selectYear(this.year - 1) }, h("q2-icon", { key: '6c9cf0005614b5f6034e070c7cc1b237ea058eca', type: "arrow-left" })), h("q2-btn", { key: 'c40c6d29045e48d3d38bde0d24870672c8045226', label: loc('tecton.element.calendar.nextYear'), "hide-label": true, class: "cal-nav-btn next-year", "test-id": "nextYearButton", onClick: () => this.selectYear(this.year + 1) }, h("q2-icon", { key: '66a04f751f9f85f146d915116d607e7a841e3a80', type: "arrow-right" }))))), h("div", { key: '7515edd4312fa9bbf81685e9cc9e8a2fcadcd8f0', class: "month-list", onClick: this.onMonthSelection }, this.months.map((month, index) => (h("div", { class: "month" }, h("span", { role: "button", class: "month-button", "data-index": index, "aria-label": month.label, tabindex: index === this.focusedIndex ? 0 : -1 }, month.abbr))))), this.today && (h("div", { key: 'f75f8128ec48c01ee725dd1bc0dafdb0d01870fa', class: "today-label" }, loc('tecton.element.calendar.today'), ": ", this.today))));
152
+ }) }, h("span", { key: 'ee04c0467883a1b31ab6c93c5436d7ca6e34e91d', class: "year" }, this.year), h("q2-icon", { key: 'd1260a0e88eff0cb1f888216f75fbb54371949c7', class: "year-icon off", type: "chevron-down" })), h("div", { key: 'a826ff901a64cad49e871de9655d1fb6f72cb3e9', class: "month-controller" }, h("div", { key: '54e8a3e89c4cfcc253086e3cb1e3ce90e61599a3', class: "cal-year-prev-next" }, h("q2-btn", { key: 'ffb19646ea021de3cc6df62b56c39e79578f7336', label: loc('tecton.element.calendar.previousYear'), "hide-label": true, class: "cal-nav-btn prev-year", "test-id": "previousYearButton", onClick: () => this.selectYear(this.year - 1) }, h("q2-icon", { key: 'cb06ce15c48c25b7bd4933ade991d4c93fba12d9', type: "arrow-left" })), h("q2-btn", { key: '8441268eaa3819b3b926cc9d7a5fe1daf9d161f9', label: loc('tecton.element.calendar.nextYear'), "hide-label": true, class: "cal-nav-btn next-year", "test-id": "nextYearButton", onClick: () => this.selectYear(this.year + 1) }, h("q2-icon", { key: '3ede2b3b369b64afe251f709d9b073570d0a9191', type: "arrow-right" }))))), h("div", { key: 'ed3a7f57dab6582f2cdd43947f83595f12d87d6e', class: "month-list", onClick: this.onMonthSelection }, this.months.map((month, index) => (h("div", { class: "month" }, h("span", { role: "button", class: "month-button", "data-index": index, "aria-label": month.label, tabindex: index === this.focusedIndex ? 0 : -1 }, month.abbr))))), this.today && (h("div", { key: '2947993eacb8aafa3ea1be73851c9a6e7eadc488', class: "today-label" }, loc('tecton.element.calendar.today'), ": ", this.today))));
153
153
  }
154
154
  get hostElement() { return this; }
155
155
  static get style() { return Q2MonthPickerStyle0; }
@@ -50,7 +50,7 @@ const Q2Optgroup = /*@__PURE__*/ proxyCustomElement(class Q2Optgroup extends HTM
50
50
  // #endregion
51
51
  // #region Render Methods
52
52
  render() {
53
- return (h("div", { key: '2c58c18d1f6d5b7886d12a0c5ae99975912fe41b', class: "q2-optgroup-container", hidden: this.hidden, "aria-labelledby": this.headerId, role: "group" }, h("div", { key: '7852309fb1c677c76931f630b6f975379450f5d1', class: "q2-optgroup-header", id: this.headerId }, (this.label && loc(this.label)) || ''), h("div", { key: '4481127fec8a882f0bfcaf3d2047ec2f9b4eb059', class: "q2-optgroup-options" }, h("slot", { key: '03425c1d351eb91b0956c03ef3584a978578db37' }))));
53
+ return (h("div", { key: '466b3bcee30f9380438897851de34e3d1ff1a1d5', class: "q2-optgroup-container", hidden: this.hidden, "aria-labelledby": this.headerId, role: "group" }, h("div", { key: '95ce796d972e98470463d930af6b7732972b06f8', class: "q2-optgroup-header", id: this.headerId }, (this.label && loc(this.label)) || ''), h("div", { key: '1d264ca1fac24bdbdcec0c2a3be33ac13ef6b5c2', class: "q2-optgroup-options" }, h("slot", { key: 'd4347778dab8b54deae81679f9dbd086416f775e' }))));
54
54
  }
55
55
  get hostElement() { return this; }
56
56
  static get watchers() { return {
@@ -65,7 +65,7 @@ const Q2Option = /*@__PURE__*/ proxyCustomElement(class Q2Option extends HTMLEle
65
65
  render() {
66
66
  const { disabled, disabledGroup, selected, _multiSelectHidden } = this;
67
67
  const isDisabled = disabled || disabledGroup;
68
- return (h(Host, { key: '31957c36e0836d1f4936d8af97beb51335b4c6b9', tabindex: "-1", "aria-disabled": isDisabled ? 'true' : undefined, "aria-selected": `${!!selected}`, "aria-hidden": _multiSelectHidden ? 'true' : undefined, display: this.display }, this.selected && h("q2-icon", { key: 'c5e9eac9b66bb975b303c1184b06fd71718096f7', type: "checkmark" }), h("div", { key: 'c0ea2c0acd37626d90ad07908f7697fe7c1edc1e', class: "content" }, h("slot", { key: '7b19d2f5977b67cace150e51956121011e28c138' }))));
68
+ return (h(Host, { key: '0571dd56a1a6bdfc80dafdb905aa13b8e7c4cbff', tabindex: "-1", "aria-disabled": isDisabled ? 'true' : undefined, "aria-selected": `${!!selected}`, "aria-hidden": _multiSelectHidden ? 'true' : undefined, display: this.display }, this.selected && h("q2-icon", { key: '4edab639eaf0b2579defba20e5bbe12b420c993a', type: "checkmark" }), h("div", { key: 'dcdffb03959e6e4fda4c36ae695be521448a83ba', class: "content" }, h("slot", { key: '0cbf7d23bbc741264e94e1c34a71913d87d54f56' }))));
69
69
  }
70
70
  get hostElement() { return this; }
71
71
  static get style() { return Q2OptionStyle0; }
@@ -273,7 +273,7 @@ const Q2Pagination$1 = /*@__PURE__*/ proxyCustomElement(class Q2Pagination exten
273
273
  total,
274
274
  });
275
275
  }
276
- return (h("nav", { key: '417a7242c4873c1f2d4c12382f63f5e7534bda04', class: "container", ref: el => (this.containerElement = el), "aria-label": loc('tecton.element.pagination.title') }, h("div", { key: '5234d2c6d9f2249788d52970f69be1a0d38ad52e', class: "description", "test-id": "description" }, pagesOnly
276
+ return (h("nav", { key: '8c0dbed8d2d19f2023295bd40d826cd1b8253a5c', class: "container", ref: el => (this.containerElement = el), "aria-label": loc('tecton.element.pagination.title') }, h("div", { key: 'ad67c82ff77b38e03f00c5ed347e94fd199f5a07', class: "description", "test-id": "description" }, pagesOnly
277
277
  ? loc('tecton.element.pagination.pages', {
278
278
  current: page,
279
279
  total: totalPages,
@@ -282,7 +282,7 @@ const Q2Pagination$1 = /*@__PURE__*/ proxyCustomElement(class Q2Pagination exten
282
282
  range: currentRange,
283
283
  recordType: recordType.toLowerCase(),
284
284
  total: total.toLocaleString(),
285
- })), h("div", { key: 'f1809000bd2d37a8eedad140329ef72ad326bb6b', class: "btn-group" }, h("q2-btn", { key: '62612892b86508d1a834f18e9c242812ac339a21', 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: '2ff44c03d569a60d28b411b233818e8a8ed09af6', type: "chevron-double-left" })), h("q2-btn", { key: 'e36a4f8c021fd18248f4fc864aff5f194f248095', ref: el => (this.prevPageBtn = el), label: prevButtonLabel, disabled: onFirstPage, onClick: () => this.handlePageChange(page - 1), "test-id": "prevPageBtn", "hide-label": true }, h("q2-icon", { key: 'd103f86c52b8ed6809552126de4d3b52cda6b724', type: "chevron-left" }))), h("div", { key: 'e6f515d392ddb8e4a97b6406e6c7ed09503c4f9f', class: "controls", hidden: isFullViewHidden, "test-id": "controls" }, h("span", { key: '1ad86adf8bd04f8c658b8035d6f4c878b7214e38', "aria-hidden": "true" }, loc('tecton.element.pagination.page')), h("div", { key: '3d701869101717b2c4f73478e33013a923fd8f44', class: "input-wrapper", onClick: () => this.inputField.dispatchEvent(new FocusEvent('focus')) }, h("q2-input", { key: '63cf49a1292cc983fba7214116b73d423cabc64c', 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 => this.handlePageChange(event.detail.value), "test-id": "pageInput", current: "page" })), h("span", { key: '526fd412a6dd8312d6bcf7a5c8baff1257642e4a', "aria-hidden": "true" }, loc('tecton.element.pagination.ofPages', [totalPages.toLocaleString()]))), h("div", { key: '069656ae8ee3523040eed22b8f2436fdde926358', class: "btn-group" }, h("q2-btn", { key: 'f215824b3c39eaf84cb6e974912ad2cd3e0ea71a', ref: el => (this.nextPageBtn = el), label: nextButtonLabel, disabled: onLastPage, onClick: () => this.handlePageChange(page + 1), "test-id": "nextPageBtn", "hide-label": true }, h("q2-icon", { key: 'd6d32de9af991e629b00632514ed2a96be42b825', type: "chevron-right" })), h("q2-btn", { key: '74ad02e29e5fadb2bff39cee2d7c6d2f62139bb7', 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: '970487bac61e8ad48acc77ce34f67a16f2d57dda', type: "chevron-double-right" }))), h("div", { key: 'dbd712331f2f14a3db1c8a247d36d7457fedeb8e', class: "per-page", hidden: isFullViewHidden || !((_a = this.perPageIncrements) === null || _a === void 0 ? void 0 : _a.length) }, showPerPageSelect && this.renderPerPage())));
285
+ })), h("div", { key: 'd5c979232baa0518541e79b1cc864f33dc49ff02', class: "btn-group" }, h("q2-btn", { key: 'cef629abc29a528b32ca755b11c085f1ffc46cdd', 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: '029c9a586ab2f3270b00422fc3b800f6638f44ee', type: "chevron-double-left" })), h("q2-btn", { key: '55212d112080244cf9eb0d8557aee19e3f97cc8b', ref: el => (this.prevPageBtn = el), label: prevButtonLabel, disabled: onFirstPage, onClick: () => this.handlePageChange(page - 1), "test-id": "prevPageBtn", "hide-label": true }, h("q2-icon", { key: '7930ed4e89581b8f4c799a346688236ffacdba10', type: "chevron-left" }))), h("div", { key: 'eeaea625758658bb0d03240c268c5180a70d0e1b', class: "controls", hidden: isFullViewHidden, "test-id": "controls" }, h("span", { key: '4bae99ae5e804f9675877cd8c3e11f760d178e19', "aria-hidden": "true" }, loc('tecton.element.pagination.page')), h("div", { key: 'f25ab7fa7e0978b4f7a477e0ab84c8e5d755a9b1', class: "input-wrapper", onClick: () => this.inputField.dispatchEvent(new FocusEvent('focus')) }, h("q2-input", { key: '08e49f61fe54e5fc4200a855c3f19b5a32d8d453', 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 => this.handlePageChange(event.detail.value), "test-id": "pageInput", current: "page" })), h("span", { key: '09124ee64222d5bb29b96e0ca1f1b605812d2e9d', "aria-hidden": "true" }, loc('tecton.element.pagination.ofPages', [totalPages.toLocaleString()]))), h("div", { key: '689a52f7549e0577cb4fb629d731cd5c116a7183', class: "btn-group" }, h("q2-btn", { key: '706927b54d84fc2313f69f8b943cc64327535e3a', ref: el => (this.nextPageBtn = el), label: nextButtonLabel, disabled: onLastPage, onClick: () => this.handlePageChange(page + 1), "test-id": "nextPageBtn", "hide-label": true }, h("q2-icon", { key: 'bf57121e65a675313687368340b571d753a2dcd3', type: "chevron-right" })), h("q2-btn", { key: '20ba1d7019aee7f087653feff9212da4097801b1', 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: 'f42fc0ff80b6b8a8cec9e879176b644520cb45a5', type: "chevron-double-right" }))), h("div", { key: 'ebd17ab21163f2f3c1db56a10f84d4c36693b77c', class: "per-page", hidden: isFullViewHidden || !((_a = this.perPageIncrements) === null || _a === void 0 ? void 0 : _a.length) }, showPerPageSelect && this.renderPerPage())));
286
286
  }
287
287
  get hostElement() { return this; }
288
288
  static get watchers() { return {
@@ -348,7 +348,7 @@ const Q2Pill$1 = /*@__PURE__*/ proxyCustomElement(class Q2Pill extends HTMLEleme
348
348
  wrapperClassNames.push('has-icon');
349
349
  if (optionCount)
350
350
  wrapperClassNames.push('has-options');
351
- return (h("click-elsewhere", { key: '02e7f5f616daeb2b0e40259c1c99ac142f86b553', onChange: this.onClickElsewhere }, h("div", { key: '13ece1982239e075de4911cc76c806b9f30dc84b', class: wrapperClassNames.join(' ') }, h("div", { key: 'afff34dc889240fbbf32cb2401359f51ce5feee4', class: "btn-height-wrapper", ref: el => (this.primaryBtnWrapper = el), onClick: this.handleWrapperClick, tabIndex: -1 }, h("button", { key: '5f9b91813e5f4006137534fe5fe1820adf35d2f6', 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.handleButtonFocusout, 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: '084fb2e933da3e3f281a5480c74e917ebac38015', class: "sr" }, "(", loc('tecton.element.pill.active'), ")"))), this.renderIcon(), !!optionCount && this.renderHiddenElement()), this.optionCount > 0 && (h("q2-popover", { key: '5fcab5d95192479ac7f0e2e911d51327044500ef', ref: el => (this.popoverElement = el), controlElement: this.primaryBtn, open: this.open, "max-height": this.popoverMaxHeight, minHeight: this.popoverMinHeight, direction: this.popoverDirection, align: this.popoverAlignment }, h("div", { key: 'b5d7756b724d76aa0cf487324c6790d7ca529293', class: "popover-content" }, h("div", { key: 'e191b41fcfa2a9f2fefc66dde961a24a867c73d8', ref: el => (this.popoverTopContainer = el), class: "popover-top-container", tabindex: "-1", hidden: !this.hasPopoverTop, onKeyDown: this.handleKeydown }, h("slot", { key: '8078c79efc74285ce9db259c28a1c6b2e957a09f', name: "popover-top" })), h("q2-option-list", { key: '1cd2a521a30af647a4ba5008f11d927209454061', 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: '432d785fe233aaf875a1b601522bb5189edf1b82' })), h("div", { key: '22d1406b38ae6f991c7253f5b10b70f7fa6744e7', ref: el => (this.popoverBottomContainer = el), class: "popover-bottom-container", tabindex: "-1", hidden: !this.hasPopoverBottom, onKeyDown: this.handleKeydown }, h("slot", { key: '7619b7dabfaae3dea23363d7769e350a7f2ed51f', name: "popover-bottom" })))))));
351
+ return (h("click-elsewhere", { key: 'bf12787a839b5ec97a14a2638b83534a3ccf610b', onChange: this.onClickElsewhere }, h("div", { key: 'b3c02f4d5400e6637e2848ff70ea0548469ce156', class: wrapperClassNames.join(' ') }, h("div", { key: 'a99df01a6e69f73fe9f21b4ed51113ae2a2ecfcc', class: "btn-height-wrapper", ref: el => (this.primaryBtnWrapper = el), onClick: this.handleWrapperClick, tabIndex: -1 }, h("button", { key: '2759471703efb53fe6132c36797e5f4d016b0108', 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.handleButtonFocusout, 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: '8c0733bf2bae45288dbdf13801305043d0b7cd67', class: "sr" }, "(", loc('tecton.element.pill.active'), ")"))), this.renderIcon(), !!optionCount && this.renderHiddenElement()), this.optionCount > 0 && (h("q2-popover", { key: '65af1d895e52ebec3000172ed59713190ec1c4cd', ref: el => (this.popoverElement = el), controlElement: this.primaryBtn, open: this.open, "max-height": this.popoverMaxHeight, minHeight: this.popoverMinHeight, direction: this.popoverDirection, align: this.popoverAlignment }, h("div", { key: '8cfde66d75fee798ee956921ba04aa9ed5643651', class: "popover-content" }, h("div", { key: '688cf13032c09f0f63fb39c58a0182e77f98ddeb', ref: el => (this.popoverTopContainer = el), class: "popover-top-container", tabindex: "-1", hidden: !this.hasPopoverTop, onKeyDown: this.handleKeydown }, h("slot", { key: 'af6a97d9bba21ed908c876da0ad8851b9fcb286a', name: "popover-top" })), h("q2-option-list", { key: 'fb4c49c8b3936faabe1533973680bcf33e5d13da', 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: 'ce059f109de1eab4b3129916d14a365fd54f9802' })), h("div", { key: '2f388ecb604db14d4e419128703980e02dda3598', ref: el => (this.popoverBottomContainer = el), class: "popover-bottom-container", tabindex: "-1", hidden: !this.hasPopoverBottom, onKeyDown: this.handleKeydown }, h("slot", { key: '2881980ed3c258ccbd58509fb4b348d5dba0d978', name: "popover-bottom" })))))));
352
352
  }
353
353
  get hostElement() { return this; }
354
354
  static get watchers() { return {
@@ -1,7 +1,7 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
2
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,25 +47,42 @@ 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;
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
- containerElement.style.setProperty('--comp-pop-width', `${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`);
70
+ containerElement.style.setProperty('--comp-pop-width', `${(controlElement === null || controlElement === void 0 ? void 0 : controlElement.offsetWidth) || 0}px`);
62
71
  if (currentDirection === 'up') {
63
- containerElement.style.setProperty('--comp-pop-bottom', `${rootElementRect.height + rootElementRect.top - controlTop}px`);
72
+ if (isModule) {
73
+ containerElement.style.setProperty('--comp-pop-bottom', `${window.innerHeight - controlTop}px`);
74
+ }
75
+ else {
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`);
77
+ }
64
78
  }
65
79
  if (currentDirection === 'down') {
66
- containerElement.style.setProperty('--comp-pop-top', `${controlBottom - rootElementRect.top}px`);
80
+ if (isModule) {
81
+ containerElement.style.setProperty('--comp-pop-top', `${controlBottom}px`);
82
+ }
83
+ else {
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`);
85
+ }
67
86
  }
68
87
  // Wait for one paint to prevent layout thrashing
69
88
  await waitForNextPaint();
@@ -80,7 +99,7 @@ const Q2Popover = /*@__PURE__*/ proxyCustomElement(class Q2Popover extends HTMLE
80
99
  };
81
100
  this.currentDirection = undefined;
82
101
  this.show = false;
83
- this.align = undefined;
102
+ this.align = 'left';
84
103
  this.block = undefined;
85
104
  this.controlElement = undefined;
86
105
  this.direction = undefined;
@@ -93,9 +112,21 @@ const Q2Popover = /*@__PURE__*/ proxyCustomElement(class Q2Popover extends HTMLE
93
112
  // #region Component Lifecycle Events
94
113
  disconnectedCallback() {
95
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
+ }
96
125
  }
97
126
  componentDidLoad() {
98
127
  this.handleMinHeight();
128
+ if (this.supportsPopoverAPI)
129
+ this.containerElement.addEventListener('toggle', this.handlePopoverToggleEvent);
99
130
  if (this.open)
100
131
  this.determinePopDirection();
101
132
  }
@@ -122,7 +153,6 @@ const Q2Popover = /*@__PURE__*/ proxyCustomElement(class Q2Popover extends HTMLE
122
153
  this.handleMinHeight();
123
154
  }
124
155
  async openChanged(open) {
125
- this.setRootElement();
126
156
  this.popoverStateChanged.emit({ open });
127
157
  if (open) {
128
158
  this.addViewportListeners();
@@ -131,7 +161,12 @@ const Q2Popover = /*@__PURE__*/ proxyCustomElement(class Q2Popover extends HTMLE
131
161
  else {
132
162
  this.removeViewportListeners();
133
163
  this.currentDirection = undefined;
134
- this.show = false;
164
+ if (this.mode === 'legacy' || !this.supportsPopoverAPI) {
165
+ this.show = false;
166
+ }
167
+ else {
168
+ this.containerElement.hidePopover();
169
+ }
135
170
  await waitForNextPaint();
136
171
  this.clearCSSProperties();
137
172
  }
@@ -154,18 +189,16 @@ const Q2Popover = /*@__PURE__*/ proxyCustomElement(class Q2Popover extends HTMLE
154
189
  return undefined;
155
190
  }
156
191
  }
157
- get validatedMaxHeight() {
158
- const { maxHeight } = this;
159
- return isNaN(maxHeight) ? undefined : maxHeight;
192
+ get supportsPopoverAPI() {
193
+ return Object.hasOwn(HTMLElement.prototype, 'popover');
160
194
  }
161
195
  addViewportListeners() {
162
196
  var _a;
163
197
  window.addEventListener('resize', this.viewPortOrientationChanged);
164
- // #region remove when Popover API is supported in iOS
198
+ visualViewport === null || visualViewport === void 0 ? void 0 : visualViewport.addEventListener('resize', this.viewPortChanged);
165
199
  window.addEventListener('scroll', this.viewPortChanged, { passive: true, capture: true });
166
- (_a = screen === null || screen === void 0 ? void 0 : screen.orientation) === null || _a === void 0 ? void 0 : _a.addEventListener('change', this.viewPortOrientationChanged);
200
+ (_a = screen === null || screen === void 0 ? void 0 : screen.orientation) === null || _a === void 0 ? void 0 : _a.addEventListener('orientationchange', this.viewPortOrientationChanged);
167
201
  window.addEventListener('orientationchange', this.viewPortOrientationChanged);
168
- // #endregion
169
202
  }
170
203
  clearCSSProperties() {
171
204
  this.containerElement.style.removeProperty('--comp-pop-max-height');
@@ -217,17 +250,13 @@ const Q2Popover = /*@__PURE__*/ proxyCustomElement(class Q2Popover extends HTMLE
217
250
  switch (currentOrDetermineDirection) {
218
251
  case 'up':
219
252
  if (shouldUpdateMaxHeight) {
220
- const priorityMaxHeight = this.validatedMaxHeight || maxSpaceAbove;
221
- const maxHeight = Math.min(maxSpaceAbove, priorityMaxHeight);
222
- containerElement.style.setProperty('--comp-pop-max-height', `${maxHeight}px`);
253
+ containerElement.style.setProperty('--comp-pop-max-height', `${maxSpaceAbove}px`);
223
254
  }
224
255
  this.setDirectionAndShow('up');
225
256
  break;
226
257
  case 'down':
227
258
  if (shouldUpdateMaxHeight) {
228
- const priorityMaxHeight = this.validatedMaxHeight || maxSpaceBelow;
229
- const maxHeight = Math.min(maxSpaceBelow, priorityMaxHeight);
230
- containerElement.style.setProperty('--comp-pop-max-height', `${maxHeight}px`);
259
+ containerElement.style.setProperty('--comp-pop-max-height', `${maxSpaceBelow}px`);
231
260
  }
232
261
  this.setDirectionAndShow('down');
233
262
  break;
@@ -236,72 +265,38 @@ const Q2Popover = /*@__PURE__*/ proxyCustomElement(class Q2Popover extends HTMLE
236
265
  removeViewportListeners() {
237
266
  var _a;
238
267
  window.removeEventListener('resize', this.viewPortOrientationChanged);
239
- // #region remove when Popover API is supported in iOS
240
- window.removeEventListener('scroll', this.viewPortChanged);
268
+ visualViewport === null || visualViewport === void 0 ? void 0 : visualViewport.removeEventListener('resize', this.viewPortChanged);
269
+ window.removeEventListener('scroll', this.viewPortChanged, { capture: true });
241
270
  (_a = screen === null || screen === void 0 ? void 0 : screen.orientation) === null || _a === void 0 ? void 0 : _a.removeEventListener('orientationchange', this.viewPortOrientationChanged);
242
271
  window.removeEventListener('orientationchange', this.viewPortOrientationChanged);
243
- // #endregion
244
272
  }
245
273
  setDirectionAndShow(direction) {
246
- this.setRootElement();
247
274
  // Due to some runtime inconsistency across devices/browsers we need to add one more check here because the
248
275
  // popover can be closed between the time the popover is opened and the time the direction is determined
249
276
  const isOpen = this.open;
250
277
  if (!isOpen)
251
278
  return;
252
279
  this.currentDirection = direction;
253
- this.show = true;
254
- if (this.mode === 'legacy') {
280
+ if (this.mode === 'legacy' || !this.supportsPopoverAPI) {
281
+ this.show = true;
255
282
  this.setAbsoluteCSSProperties();
256
283
  }
257
284
  else {
258
- this.setFixedCSSProperties();
285
+ this.setPopoverAPICSSProperties();
286
+ this.containerElement.showPopover();
259
287
  }
260
288
  }
261
- setRootElement() {
262
- let currentElement = this.hostElement;
263
- while (currentElement && currentElement !== document.documentElement) {
264
- const computedStyle = window.getComputedStyle(currentElement);
265
- // Check if the element has any styles applied that create a new containg block
266
- if (computedStyle.transform !== 'none' ||
267
- computedStyle.filter !== 'none' ||
268
- computedStyle.perspective !== 'none' ||
269
- computedStyle.containerType !== 'normal' ||
270
- ['transform', 'perspective', 'filter'].includes(computedStyle.willChange) ||
271
- ['layout', 'paint', 'strict', 'content'].includes(computedStyle.contain)) {
272
- this.rootElementRect = currentElement.getBoundingClientRect();
273
- return;
274
- }
275
- const rootNode = currentElement.getRootNode();
276
- const isRootNodeWebComponent = typeof ShadowRoot !== 'undefined' &&
277
- rootNode instanceof ShadowRoot &&
278
- rootNode.host instanceof HTMLElement;
279
- if (isRootNodeWebComponent) {
280
- currentElement = rootNode.host;
281
- }
282
- else {
283
- currentElement = currentElement.parentElement;
284
- }
285
- }
286
- // Return the document's bounding rect if no element is found
287
- this.rootElementRect = {
288
- top: 0,
289
- bottom: 0,
290
- left: 0,
291
- right: 0,
292
- height: window.visualViewport.height,
293
- width: window.visualViewport.width,
294
- };
295
- }
296
289
  // #endregion
297
290
  // #region Render Methods
298
291
  render() {
299
- const containerClasses = ['container', this.currentDirection];
292
+ const containerClasses = ['container', this.currentDirection, this.align];
300
293
  if (this.show)
301
294
  containerClasses.push('show');
295
+ if (this.block)
296
+ containerClasses.push('block');
302
297
  if (this.mode === 'legacy')
303
298
  containerClasses.push('legacy');
304
- 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' }))));
299
+ return (h("div", { key: '25c64e3cebb5b2c332adc6f7d99be5f014ed5ce5', ref: el => (this.containerElement = el), class: containerClasses.join(' '), "test-id": "outerContainer", tabIndex: -1, popover: "auto" }, h("div", { key: '29f0674224cab236bb4c71adb5695d2fce5f5470', ref: el => (this.contentElement = el), class: "content" }, h("slot", { key: '3492361127d9dfc838e94cba14ceb5c12e123286' }))));
305
300
  }
306
301
  get hostElement() { return this; }
307
302
  static get watchers() { return {
@@ -1 +1 @@
1
- {"file":"q2-popover2.js","mappings":";;;AAAA,MAAM,YAAY,GAAG,4iFAA4iF,CAAC;AAClkF,wBAAe,YAAY;;MCed,SAAS;;;;;;;;;QAQlB,kBAAa,GAAG,EAAE,CAAC;;QAEnB,uBAAkB,GAAY,KAAK,CAAC;QAkPpC,oBAAe,GAAG;YACd,IAAI,IAAI,CAAC,SAAS,EAAE;gBAChB,wBAAwB,CAAC,IAAI,EAAE,WAAW,EAAE,MAAM,CAAC,CAAC;aACvD;SACJ,CAAC;QAYF,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,GAAG,CAAC,CAAC;gBAC3D,gBAAgB,CAAC,KAAK,CAAC,WAAW,CAAC,kBAAkB,EAAE,OAAO,CAAC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AAC,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 } 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"],"version":3}
1
+ {"file":"q2-popover2.js","mappings":";;;AAAA,MAAM,YAAY,GAAG,ytFAAytF,CAAC;AAC/uF,wBAAe,YAAY;;MCed,SAAS;;;;;;;;;QAQlB,kBAAa,GAAG,EAAE,CAAC;QACnB,uBAAkB,GAAY,KAAK,CAAC;QA4PpC,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,CAAC,KAAK,CAAC,WAAW,CAAC,kBAAkB,EAAE,GAAG,CAAC,CAAC;gBAC5D,gBAAgB,CAAC,KAAK,CAAC,WAAW,CAAC,iBAAiB,EAAE,OAAO,CAAC,CAAC;aAClE;iBAAM;gB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IAAI;YAAE,gBAAgB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAC7C,IAAI,IAAI,CAAC,KAAK;YAAE,gBAAgB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC/C,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,EACZ,OAAO,EAAC,MAAM,IAEd,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.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@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 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 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 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: 'bb2afb6a702c88e41eed0cad8ad263e7d7014406' }, shouldShow ? h("time", { dateTime: displayedMessage }, displayedMessage) : null);
146
+ return h(Fragment, { key: 'ed93ac75ce8c58e36ac28a11b735c1f27bb9f36b' }, 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: 'e704a2aa1c38da509b0e366e03cd33397ffdbf5d', onSlotchange: this.handleSlotChange });
83
+ return h("slot", { key: 'a2bc98bbab08717788bc3544753dfadec6d9529b', onSlotchange: this.handleSlotChange });
84
84
  }
85
85
  get hostElement() { return this; }
86
86
  static get watchers() { return {
@@ -193,9 +193,9 @@ const Q2Section$1 = /*@__PURE__*/ proxyCustomElement(class Q2Section extends HTM
193
193
  wrapperClasses.push('is-transitioning');
194
194
  }
195
195
  const showDefaultHeader = !this.hasYieldedHeader && !!this.label;
196
- return (h("section", { key: '994cfe09abd1a9d8220ca4017cb4003ae1e2cf39', class: "wrapper" }, h("header", { key: '56a44ef98988748508c673bd3725887a1743a99b', class: hasHeader ? 'has-header' : '' }, h("div", { key: '03cc85008637fe3de375d223de79ac59c6b6ba64', class: "header-content", id: this.titleId, onClick: this.collapsible && this.onHeaderClick }, showDefaultHeader && h("h2", { key: '69c2119b393e0b3f02392686ec49835273a9ebcb', class: "title" }, loc(this.label)), h("div", { key: '62a92b25033d9c9709a680b05becc2a48779197c', ref: el => (this.headerSlotWrapper = el), class: "header-slot-wrapper" }, h("slot", { key: 'f5b2dbc68e33d01f31845bdbfb429e0a18a5e174', ref: (el) => (this.headerSlot = el), name: "q2-section-header" }))), this.collapsible && !this.noCollapseIcon && (h("q2-btn", { key: '1983d339de073ca38b6879fca9d96fbe4648e533', 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: 'de36065a7fdeb1c381184304e4ed679f27d4f771', type: "chevron-up" })))), h("div", { key: 'e681760db4a6551d03ded78c25ab24257b6eaf0b', class: wrapperClasses.join(' '), id: this.contentId, "aria-labelledby": this.titleId, role: "region", onTransitionEnd: this.onTransitionEnd, style: this.collapsible && {
196
+ return (h("section", { key: '8fb3af91211e857b5f3ce699a34ae924292c15ee', class: "wrapper" }, h("header", { key: '70cc58cc4ba81963966d940bac75170115d8b2df', class: hasHeader ? 'has-header' : '' }, h("div", { key: '75632d067c8add9849a03696f1b546293120f60a', class: "header-content", id: this.titleId, onClick: this.collapsible && this.onHeaderClick }, showDefaultHeader && h("h2", { key: 'a13c27bd7e4ad893415432247af331dbddbfecaf', class: "title" }, loc(this.label)), h("div", { key: 'f160d75cc07aeab01b0be94cb9e192bca82d51be', ref: el => (this.headerSlotWrapper = el), class: "header-slot-wrapper" }, h("slot", { key: '3b999cd695be9866b7eda78b44f105b5ba1a48c0', ref: (el) => (this.headerSlot = el), name: "q2-section-header" }))), this.collapsible && !this.noCollapseIcon && (h("q2-btn", { key: '8cda7c3998eabc4ee9ba0c37067b6d6a3a1f136b', 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: '5c453c8498993b74b3b2df173b6641235527ecf8', type: "chevron-up" })))), h("div", { key: '8781154e86dc8689c50362694b3f9afd138cc1a7', class: wrapperClasses.join(' '), id: this.contentId, "aria-labelledby": this.titleId, role: "region", onTransitionEnd: this.onTransitionEnd, style: this.collapsible && {
197
197
  height: this.contentHeight,
198
- } }, h("div", { key: '004500e012e4eb718f7e018c20a0cc3590b9ebce', ref: el => (this.contentContainer = el), class: "content", tabindex: "-1" }, h("slot", { key: 'f83f550c26a3f36d2a72c777a9f904a3774e963f', ref: (el) => (this.contentSlot = el) })))));
198
+ } }, h("div", { key: '6b4e808f97cf63aafd105e68c98fb8fd578dc0b4', ref: el => (this.contentContainer = el), class: "content", tabindex: "-1" }, h("slot", { key: '8a0f4e65d9f135d03eaef60fe1d92518c2ea9c8a', ref: (el) => (this.contentSlot = el) })))));
199
199
  }
200
200
  get hostElement() { return this; }
201
201
  static get watchers() { return {