q2-tecton-elements 1.55.5 → 1.55.7

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 (268) hide show
  1. package/dist/bundle-report.json +262 -214
  2. package/dist/cjs/{index-905f4c87.js → index-ac3330d8.js} +33 -1
  3. package/dist/cjs/index-ac3330d8.js.map +1 -0
  4. package/dist/cjs/loader.cjs.js +1 -1
  5. package/dist/cjs/q2-action-group.cjs.entry.js +2 -2
  6. package/dist/cjs/q2-action-sheet.cjs.entry.js +2 -2
  7. package/dist/cjs/q2-avatar.cjs.entry.js +1 -1
  8. package/dist/cjs/q2-badge_7.cjs.entry.js +4 -4
  9. package/dist/cjs/q2-calendar.cjs.entry.js +1 -1
  10. package/dist/cjs/q2-card.cjs.entry.js +1 -1
  11. package/dist/cjs/q2-carousel-pane.cjs.entry.js +3 -3
  12. package/dist/cjs/q2-carousel.cjs.entry.js +1 -1
  13. package/dist/cjs/q2-chart-area.cjs.entry.js +2 -2
  14. package/dist/cjs/q2-chart-bar.cjs.entry.js +2 -2
  15. package/dist/cjs/q2-chart-donut.cjs.entry.js +2 -2
  16. package/dist/cjs/q2-checkbox-group.cjs.entry.js +1 -1
  17. package/dist/cjs/q2-checkbox.cjs.entry.js +1 -1
  18. package/dist/cjs/q2-currency.cjs.entry.js +1 -1
  19. package/dist/cjs/q2-data-table.cjs.entry.js +1 -1
  20. package/dist/cjs/q2-detail.cjs.entry.js +2 -2
  21. package/dist/cjs/q2-dropdown-item.cjs.entry.js +1 -1
  22. package/dist/cjs/q2-dropdown.cjs.entry.js +27 -22
  23. package/dist/cjs/q2-dropdown.cjs.entry.js.map +1 -1
  24. package/dist/cjs/q2-editable-field.cjs.entry.js +1 -1
  25. package/dist/cjs/q2-example.cjs.entry.js +1 -1
  26. package/dist/cjs/q2-file-picker.cjs.entry.js +1 -1
  27. package/dist/cjs/q2-form.cjs.entry.js +1 -1
  28. package/dist/cjs/q2-formatted-text.cjs.entry.js +1 -1
  29. package/dist/cjs/q2-item_3.cjs.entry.js +3 -3
  30. package/dist/cjs/q2-legend.cjs.entry.js +1 -1
  31. package/dist/cjs/q2-loc.cjs.entry.js +1 -1
  32. package/dist/cjs/q2-message.cjs.entry.js +2 -2
  33. package/dist/cjs/q2-modal.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_2.cjs.entry.js +73 -69
  37. package/dist/cjs/q2-option-list_2.cjs.entry.js.map +1 -1
  38. package/dist/cjs/q2-option.cjs.entry.js +1 -1
  39. package/dist/cjs/q2-pagination.cjs.entry.js +4 -4
  40. package/dist/cjs/q2-pill.cjs.entry.js +2 -2
  41. package/dist/cjs/q2-radio-group.cjs.entry.js +1 -1
  42. package/dist/cjs/q2-radio.cjs.entry.js +1 -1
  43. package/dist/cjs/q2-relative-time.cjs.entry.js +2 -2
  44. package/dist/cjs/q2-resize-observer.cjs.entry.js +1 -1
  45. package/dist/cjs/q2-section.cjs.entry.js +3 -3
  46. package/dist/cjs/q2-select.cjs.entry.js +122 -12
  47. package/dist/cjs/q2-select.cjs.entry.js.map +1 -1
  48. package/dist/cjs/q2-stepper-pane.cjs.entry.js +1 -1
  49. package/dist/cjs/q2-stepper-vertical.cjs.entry.js +2 -2
  50. package/dist/cjs/q2-stepper.cjs.entry.js +2 -2
  51. package/dist/cjs/q2-tag.cjs.entry.js +2 -2
  52. package/dist/cjs/q2-tecton-elements.cjs.js +1 -1
  53. package/dist/cjs/q2-textarea.cjs.entry.js +2 -2
  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/q2-action-group/q2-action-group.js +1 -1
  57. package/dist/collection/components/q2-action-sheet/q2-action-sheet.js +1 -1
  58. package/dist/collection/components/q2-avatar/q2-avatar.js +1 -1
  59. package/dist/collection/components/q2-calendar/q2-month-picker.js +2 -2
  60. package/dist/collection/components/q2-calendar/test/q2-calendar-test.e2e.js +2 -2
  61. package/dist/collection/components/q2-calendar/test/q2-calendar-test.e2e.js.map +1 -1
  62. package/dist/collection/components/q2-carousel-pane/q2-carousel-pane.js +2 -2
  63. package/dist/collection/components/q2-chart-area/q2-chart-area.js +1 -1
  64. package/dist/collection/components/q2-chart-bar/q2-chart-bar.js +1 -1
  65. package/dist/collection/components/q2-chart-donut/q2-chart-donut.js +1 -1
  66. package/dist/collection/components/q2-currency/q2-currency.js +1 -1
  67. package/dist/collection/components/q2-detail/q2-detail.js +1 -1
  68. package/dist/collection/components/q2-dropdown/q2-dropdown.js +27 -21
  69. package/dist/collection/components/q2-dropdown/q2-dropdown.js.map +1 -1
  70. package/dist/collection/components/q2-dropdown/test/q2-dropdown-test.e2e.js +34 -32
  71. package/dist/collection/components/q2-dropdown/test/q2-dropdown-test.e2e.js.map +1 -1
  72. package/dist/collection/components/q2-example/q2-example.js +1 -1
  73. package/dist/collection/components/q2-form/q2-form.js +1 -1
  74. package/dist/collection/components/q2-formatted-text/q2-formatted-text.js +1 -1
  75. package/dist/collection/components/q2-input/q2-input.js +1 -1
  76. package/dist/collection/components/q2-item/q2-item.js +1 -1
  77. package/dist/collection/components/q2-legend/q2-legend.js +1 -1
  78. package/dist/collection/components/q2-list/q2-list.js +1 -1
  79. package/dist/collection/components/q2-message/q2-message.js +1 -1
  80. package/dist/collection/components/q2-modal/q2-modal.js +1 -1
  81. package/dist/collection/components/q2-optgroup/q2-optgroup.js +1 -1
  82. package/dist/collection/components/q2-pagination/q2-pagination.js +3 -3
  83. package/dist/collection/components/q2-pagination/test/q2-pagination-test.e2e.js +1 -0
  84. package/dist/collection/components/q2-pagination/test/q2-pagination-test.e2e.js.map +1 -1
  85. package/dist/collection/components/q2-pill/q2-pill.js +1 -1
  86. package/dist/collection/components/q2-popover/q2-popover.css +18 -10
  87. package/dist/collection/components/q2-popover/q2-popover.js +74 -69
  88. package/dist/collection/components/q2-popover/q2-popover.js.map +1 -1
  89. package/dist/collection/components/q2-popover/test/q2-popover-test.e2e.js +1 -34
  90. package/dist/collection/components/q2-popover/test/q2-popover-test.e2e.js.map +1 -1
  91. package/dist/collection/components/q2-popover/test/q2-popover-test.spec.js +902 -511
  92. package/dist/collection/components/q2-popover/test/q2-popover-test.spec.js.map +1 -1
  93. package/dist/collection/components/q2-relative-time/q2-relative-time.js +1 -1
  94. package/dist/collection/components/q2-resize-observer/q2-resize-observer.js +1 -1
  95. package/dist/collection/components/q2-section/q2-section.js +2 -2
  96. package/dist/collection/components/q2-select/q2-select.js +137 -15
  97. package/dist/collection/components/q2-select/q2-select.js.map +1 -1
  98. package/dist/collection/components/q2-select/test/q2-select-test.spec.js +467 -0
  99. package/dist/collection/components/q2-select/test/q2-select-test.spec.js.map +1 -1
  100. package/dist/collection/components/q2-stepper/q2-stepper.js +1 -1
  101. package/dist/collection/components/q2-stepper-vertical/q2-stepper-vertical.js +1 -1
  102. package/dist/collection/components/q2-tab-container/q2-tab-container.js +1 -1
  103. package/dist/collection/components/q2-tab-pane/q2-tab-pane.js +1 -1
  104. package/dist/collection/components/q2-tag/q2-tag.js +1 -1
  105. package/dist/collection/components/q2-tag/test/q2-tag-test.e2e.js +5 -0
  106. package/dist/collection/components/q2-tag/test/q2-tag-test.e2e.js.map +1 -1
  107. package/dist/collection/components/q2-textarea/q2-textarea.js +1 -1
  108. package/dist/collection/components/tecton-tab-pane/tecton-tab-pane.js +2 -2
  109. package/dist/collection/utils/index.js +37 -0
  110. package/dist/collection/utils/index.js.map +1 -1
  111. package/dist/components/index2.js +32 -1
  112. package/dist/components/index2.js.map +1 -1
  113. package/dist/components/q2-action-group2.js +1 -1
  114. package/dist/components/q2-action-sheet.js +1 -1
  115. package/dist/components/q2-avatar2.js +1 -1
  116. package/dist/components/q2-carousel-pane.js +2 -2
  117. package/dist/components/q2-chart-area.js +1 -1
  118. package/dist/components/q2-chart-bar.js +1 -1
  119. package/dist/components/q2-chart-donut.js +1 -1
  120. package/dist/components/q2-currency.js +1 -1
  121. package/dist/components/q2-detail.js +1 -1
  122. package/dist/components/q2-dropdown.js +26 -21
  123. package/dist/components/q2-dropdown.js.map +1 -1
  124. package/dist/components/q2-example.js +1 -1
  125. package/dist/components/q2-form.js +1 -1
  126. package/dist/components/q2-formatted-text.js +1 -1
  127. package/dist/components/q2-input2.js +1 -1
  128. package/dist/components/q2-item2.js +1 -1
  129. package/dist/components/q2-legend2.js +1 -1
  130. package/dist/components/q2-list2.js +1 -1
  131. package/dist/components/q2-message2.js +1 -1
  132. package/dist/components/q2-modal.js +1 -1
  133. package/dist/components/q2-month-picker.js +2 -2
  134. package/dist/components/q2-optgroup2.js +1 -1
  135. package/dist/components/q2-pagination.js +3 -3
  136. package/dist/components/q2-pill.js +1 -1
  137. package/dist/components/q2-popover2.js +73 -69
  138. package/dist/components/q2-popover2.js.map +1 -1
  139. package/dist/components/q2-relative-time.js +1 -1
  140. package/dist/components/q2-resize-observer2.js +1 -1
  141. package/dist/components/q2-section.js +2 -2
  142. package/dist/components/q2-select2.js +125 -15
  143. package/dist/components/q2-select2.js.map +1 -1
  144. package/dist/components/q2-stepper-vertical.js +1 -1
  145. package/dist/components/q2-stepper.js +1 -1
  146. package/dist/components/q2-tab-container.js +1 -1
  147. package/dist/components/q2-tab-pane.js +1 -1
  148. package/dist/components/q2-tag.js +1 -1
  149. package/dist/components/q2-textarea.js +1 -1
  150. package/dist/components/tecton-tab-pane.js +2 -2
  151. package/dist/esm/{index-f2a66217.js → index-e4c2bfff.js} +33 -2
  152. package/dist/{cjs/index-905f4c87.js.map → esm/index-e4c2bfff.js.map} +1 -1
  153. package/dist/esm/loader.js +1 -1
  154. package/dist/esm/q2-action-group.entry.js +2 -2
  155. package/dist/esm/q2-action-sheet.entry.js +2 -2
  156. package/dist/esm/q2-avatar.entry.js +1 -1
  157. package/dist/esm/q2-badge_7.entry.js +4 -4
  158. package/dist/esm/q2-calendar.entry.js +1 -1
  159. package/dist/esm/q2-card.entry.js +1 -1
  160. package/dist/esm/q2-carousel-pane.entry.js +3 -3
  161. package/dist/esm/q2-carousel.entry.js +1 -1
  162. package/dist/esm/q2-chart-area.entry.js +2 -2
  163. package/dist/esm/q2-chart-bar.entry.js +2 -2
  164. package/dist/esm/q2-chart-donut.entry.js +2 -2
  165. package/dist/esm/q2-checkbox-group.entry.js +1 -1
  166. package/dist/esm/q2-checkbox.entry.js +1 -1
  167. package/dist/esm/q2-currency.entry.js +1 -1
  168. package/dist/esm/q2-data-table.entry.js +1 -1
  169. package/dist/esm/q2-detail.entry.js +2 -2
  170. package/dist/esm/q2-dropdown-item.entry.js +1 -1
  171. package/dist/esm/q2-dropdown.entry.js +27 -22
  172. package/dist/esm/q2-dropdown.entry.js.map +1 -1
  173. package/dist/esm/q2-editable-field.entry.js +1 -1
  174. package/dist/esm/q2-example.entry.js +1 -1
  175. package/dist/esm/q2-file-picker.entry.js +1 -1
  176. package/dist/esm/q2-form.entry.js +1 -1
  177. package/dist/esm/q2-formatted-text.entry.js +1 -1
  178. package/dist/esm/q2-item_3.entry.js +3 -3
  179. package/dist/esm/q2-legend.entry.js +1 -1
  180. package/dist/esm/q2-loc.entry.js +1 -1
  181. package/dist/esm/q2-message.entry.js +2 -2
  182. package/dist/esm/q2-modal.entry.js +2 -2
  183. package/dist/esm/q2-month-picker.entry.js +3 -3
  184. package/dist/esm/q2-optgroup.entry.js +2 -2
  185. package/dist/esm/q2-option-list_2.entry.js +73 -69
  186. package/dist/esm/q2-option-list_2.entry.js.map +1 -1
  187. package/dist/esm/q2-option.entry.js +1 -1
  188. package/dist/esm/q2-pagination.entry.js +4 -4
  189. package/dist/esm/q2-pill.entry.js +2 -2
  190. package/dist/esm/q2-radio-group.entry.js +1 -1
  191. package/dist/esm/q2-radio.entry.js +1 -1
  192. package/dist/esm/q2-relative-time.entry.js +2 -2
  193. package/dist/esm/q2-resize-observer.entry.js +1 -1
  194. package/dist/esm/q2-section.entry.js +3 -3
  195. package/dist/esm/q2-select.entry.js +123 -13
  196. package/dist/esm/q2-select.entry.js.map +1 -1
  197. package/dist/esm/q2-stepper-pane.entry.js +1 -1
  198. package/dist/esm/q2-stepper-vertical.entry.js +2 -2
  199. package/dist/esm/q2-stepper.entry.js +2 -2
  200. package/dist/esm/q2-tag.entry.js +2 -2
  201. package/dist/esm/q2-tecton-elements.js +1 -1
  202. package/dist/esm/q2-textarea.entry.js +2 -2
  203. package/dist/esm/q2-tooltip.entry.js +1 -1
  204. package/dist/esm/tecton-tab-pane.entry.js +2 -2
  205. package/dist/jest.setup.js +11 -0
  206. package/dist/jest.setup.js.map +1 -1
  207. package/dist/q2-tecton-elements/{index-f2a66217.js → index-e4c2bfff.js} +71 -46
  208. package/dist/q2-tecton-elements/index-e4c2bfff.js.map +1 -0
  209. package/dist/q2-tecton-elements/q2-action-group.entry.js +4 -4
  210. package/dist/q2-tecton-elements/q2-action-sheet.entry.js +9 -9
  211. package/dist/q2-tecton-elements/q2-avatar.entry.js +6 -6
  212. package/dist/q2-tecton-elements/q2-badge_7.entry.js +17 -17
  213. package/dist/q2-tecton-elements/q2-calendar.entry.js +1 -1
  214. package/dist/q2-tecton-elements/q2-card.entry.js +1 -1
  215. package/dist/q2-tecton-elements/q2-carousel-pane.entry.js +4 -4
  216. package/dist/q2-tecton-elements/q2-carousel.entry.js +1 -1
  217. package/dist/q2-tecton-elements/q2-chart-area.entry.js +3 -3
  218. package/dist/q2-tecton-elements/q2-chart-bar.entry.js +80 -80
  219. package/dist/q2-tecton-elements/q2-chart-donut.entry.js +101 -101
  220. package/dist/q2-tecton-elements/q2-checkbox-group.entry.js +4 -4
  221. package/dist/q2-tecton-elements/q2-checkbox.entry.js +1 -1
  222. package/dist/q2-tecton-elements/q2-currency.entry.js +6 -6
  223. package/dist/q2-tecton-elements/q2-data-table.entry.js +1 -1
  224. package/dist/q2-tecton-elements/q2-detail.entry.js +4 -4
  225. package/dist/q2-tecton-elements/q2-dropdown-item.entry.js +1 -1
  226. package/dist/q2-tecton-elements/q2-dropdown.entry.js +81 -75
  227. package/dist/q2-tecton-elements/q2-dropdown.entry.js.map +1 -1
  228. package/dist/q2-tecton-elements/q2-editable-field.entry.js +1 -1
  229. package/dist/q2-tecton-elements/q2-example.entry.js +1 -1
  230. package/dist/q2-tecton-elements/q2-file-picker.entry.js +1 -1
  231. package/dist/q2-tecton-elements/q2-form.entry.js +7 -7
  232. package/dist/q2-tecton-elements/q2-formatted-text.entry.js +2 -2
  233. package/dist/q2-tecton-elements/q2-item_3.entry.js +22 -22
  234. package/dist/q2-tecton-elements/q2-legend.entry.js +5 -5
  235. package/dist/q2-tecton-elements/q2-loc.entry.js +1 -1
  236. package/dist/q2-tecton-elements/q2-message.entry.js +6 -6
  237. package/dist/q2-tecton-elements/q2-modal.entry.js +18 -18
  238. package/dist/q2-tecton-elements/q2-month-picker.entry.js +30 -30
  239. package/dist/q2-tecton-elements/q2-optgroup.entry.js +5 -5
  240. package/dist/q2-tecton-elements/q2-option-list_2.entry.js +150 -140
  241. package/dist/q2-tecton-elements/q2-option-list_2.entry.js.map +1 -1
  242. package/dist/q2-tecton-elements/q2-option.entry.js +1 -1
  243. package/dist/q2-tecton-elements/q2-pagination.entry.js +38 -38
  244. package/dist/q2-tecton-elements/q2-pill.entry.js +14 -14
  245. package/dist/q2-tecton-elements/q2-radio-group.entry.js +1 -1
  246. package/dist/q2-tecton-elements/q2-radio.entry.js +1 -1
  247. package/dist/q2-tecton-elements/q2-relative-time.entry.js +2 -2
  248. package/dist/q2-tecton-elements/q2-resize-observer.entry.js +1 -1
  249. package/dist/q2-tecton-elements/q2-section.entry.js +12 -12
  250. package/dist/q2-tecton-elements/q2-select.entry.js +186 -89
  251. package/dist/q2-tecton-elements/q2-select.entry.js.map +1 -1
  252. package/dist/q2-tecton-elements/q2-stepper-pane.entry.js +1 -1
  253. package/dist/q2-tecton-elements/q2-stepper-vertical.entry.js +28 -28
  254. package/dist/q2-tecton-elements/q2-stepper.entry.js +21 -21
  255. package/dist/q2-tecton-elements/q2-tag.entry.js +6 -6
  256. package/dist/q2-tecton-elements/q2-tecton-elements.esm.js +1 -1
  257. package/dist/q2-tecton-elements/q2-tecton-elements.esm.js.map +1 -1
  258. package/dist/q2-tecton-elements/q2-textarea.entry.js +3 -3
  259. package/dist/q2-tecton-elements/q2-tooltip.entry.js +1 -1
  260. package/dist/q2-tecton-elements/tecton-tab-pane.entry.js +9 -9
  261. package/dist/types/builds/q2e/development/tecton/tecton/packages/q2-tecton-elements/.stencil/jest.setup.d.ts +9 -0
  262. package/dist/types/components/q2-dropdown/q2-dropdown.d.ts +6 -4
  263. package/dist/types/components/q2-popover/q2-popover.d.ts +4 -4
  264. package/dist/types/components/q2-select/q2-select.d.ts +22 -0
  265. package/dist/types/utils/index.d.ts +3 -0
  266. package/package.json +3 -3
  267. package/dist/esm/index-f2a66217.js.map +0 -1
  268. package/dist/q2-tecton-elements/index-f2a66217.js.map +0 -1
@@ -65,7 +65,7 @@ const Q2Message = /*@__PURE__*/ proxyCustomElement(class Q2Message extends HTMLE
65
65
  const addDivForAriaLive = !isFirefox && this.presentToggle;
66
66
  const { description } = this;
67
67
  const messageLabel = loc(`tecton.element.message.type.${this.type ? this.type : 'info'}`);
68
- return (h("div", { key: 'ccca9e80908f73482c73f865743e5f7cd6438d99', tabindex: "-1", class: "message", role: description ? undefined : 'alert', "aria-live": description ? undefined : 'assertive', "aria-atomic": description ? undefined : 'true', "aria-relevant": description && addAriaHiddenForAriaLive ? undefined : 'all', "test-id": "messageContainer" }, this.appearance === 'standard' ? this.messageIcon(this.type) : '', addDivForAriaLive && h("div", { key: 'a9937495e83a7e0852034c36639d8c60ea3c30ac', class: "sr" }), h("div", { key: 'e650f7ef7c2544e44f63ce7a23f33f04145a7e83', class: "sr message-label" }, messageLabel), h("div", { key: 'daa66069373ac3030fb33dc3c88c0621c91bb6a4', class: "message-content", "aria-hidden": addAriaHiddenForAriaLive ? 'true' : undefined }, h("slot", { key: '464a52a941be194c1267beee2c1b307ece17f964' }))));
68
+ return (h("div", { key: 'f4161e85adba8c023d8ad135c955a312e145ad9a', tabindex: "-1", class: "message", role: description ? undefined : 'alert', "aria-live": description ? undefined : 'assertive', "aria-atomic": description ? undefined : 'true', "aria-relevant": description && addAriaHiddenForAriaLive ? undefined : 'all', "test-id": "messageContainer" }, this.appearance === 'standard' ? this.messageIcon(this.type) : '', addDivForAriaLive && h("div", { key: '75a17b9f1d17e1c051e7ed986d1382f83da6747b', class: "sr" }), h("div", { key: '4d1761c6d6391d2f6ed982add6effc441f7284f3', class: "sr message-label" }, messageLabel), h("div", { key: '035a1040c019d8aa6eb6899e275469ab9edfc69d', class: "message-content", "aria-hidden": addAriaHiddenForAriaLive ? 'true' : undefined }, h("slot", { key: '59187a716f498e899c6c5bf6c81aca27dbfb32c2' }))));
69
69
  }
70
70
  get hostElement() { return this; }
71
71
  static get style() { return Q2MessageStyle0; }
@@ -164,7 +164,7 @@ const Q2Modal$1 = /*@__PURE__*/ proxyCustomElement(class Q2Modal extends HTMLEle
164
164
  render() {
165
165
  const interiorClasses = `interior`;
166
166
  const renderStatus = `${this.renderStatus || ''}`;
167
- return (h("dialog", { key: '73f146b4e163c9395837b932588870487645b6ce', ref: el => (this.dialogElement = el), class: renderStatus, onClick: this.onClick }, h("div", { key: '4219e99c0186ffe1a7e0d3a9e81334adb02a4979', class: interiorClasses }, this.title && (h("header", { key: '77d134b2d00f7e4221b25917ab46714446c19b22' }, this.title && h("h2", { key: '0f43942c22bd5b9ca7784bcd4c637c6fc3fb1203', class: "title" }, this.title), !!this.closable && (h("q2-btn", { key: '6dcf3f2a05cf76a78cf8e2fddd4566d88ddb7421', class: "btn-close", "test-id": "btnClose", onClick: this.onCancel, label: "tecton.element.modal.close", "hide-label": true }, h("q2-icon", { key: '8cdf1b3e2b4990547381f04527e0ca3116802949', type: "close" }))))), h("div", { key: 'e1bcef9f5eca9e2f4504abbbd4d90ba690e4a6d2', class: "content", ref: el => (this.contentElement = el) }, this.icon && (h("div", { key: '0bd5d3ca0d3f13c3879b752202697841fffabf94', class: "icon" }, h("q2-icon", { key: 'f236ba5a6f0b14fa865ace8f69813634fa65494c', type: this.icon, style: this.iconStyle() }))), this.imageSrc && (h("div", { key: '9c2978ebff4bdc67930fe2a5232b5fb92822e3c9', class: "image" }, h("img", { key: '6c5ac47ad9f780e6496b3c8464f003a7f76cbb58', src: this.imageSrc }))), hasSlotContent(this.hostElement, 'content') && h("slot", { key: 'cd4bb02b38c02115a5c8601cc0c4371cbe01611d', name: "content" }), this.description && h("p", { key: 'e94d10a5b24629b9a8c965b28a5b439a83e1324b', class: "description" }, this.description), this.customMarkup && (h("p", { key: 'cfc781b852faeba9d089355a92809873f0efdda0', class: "customMarkup", innerHTML: sanitizeHTMLString(this.customMarkup) }))), h("footer", { key: '57c18d04f08e1e00bf3e869d84e8e2f9d8901ae5' }, h("q2-action-group", { key: '9f27a49f45568166416acf2a9df83d3d0da58cb2', "full-width": true }, h("slot", { key: '64a30e7f6ebaf5f5b99264235d5510835826f566', name: "action" }))))));
167
+ return (h("dialog", { key: '14c7d74be95682be1c6523d495a2b35bcc247e4a', ref: el => (this.dialogElement = el), class: renderStatus, onClick: this.onClick }, h("div", { key: '64d3d8d9e01f4e8fee2ae452714e4eedd2570e68', class: interiorClasses }, this.title && (h("header", { key: 'd36f931c9f7ae0f14817abb9a6dedee6257a5664' }, this.title && h("h2", { key: '39097ca1ee788258b9e349b8bc374b190ecaa8a5', class: "title" }, this.title), !!this.closable && (h("q2-btn", { key: 'd1c9a7bd159e4c7fdfa557efca9204593f27803d', class: "btn-close", "test-id": "btnClose", onClick: this.onCancel, label: "tecton.element.modal.close", "hide-label": true }, h("q2-icon", { key: '6225815f507315357b545a3177727f9f3438bccf', type: "close" }))))), h("div", { key: '4988151b63997614a382f7241f60af147b120e88', class: "content", ref: el => (this.contentElement = el) }, this.icon && (h("div", { key: 'a54460f79a828bed7630108dd6f04ca1929dfbfb', class: "icon" }, h("q2-icon", { key: '3bd18a8787e40183f1d71ddd48e6ca207062588b', type: this.icon, style: this.iconStyle() }))), this.imageSrc && (h("div", { key: '074f8bda9529d16d06630b4107a51e478a07d156', class: "image" }, h("img", { key: '608a63353a935f44dfe3c2b809f4f28b89c38b31', src: this.imageSrc }))), hasSlotContent(this.hostElement, 'content') && h("slot", { key: '4f23c254881c6840e05ac24b0ff712fd6e1f90df', name: "content" }), this.description && h("p", { key: 'af66d8b53f300ff96b68d59a4e47bf5fe5a535ea', class: "description" }, this.description), this.customMarkup && (h("p", { key: 'bae1c644d7e41fd6389cf40689afe3c62dada367', class: "customMarkup", innerHTML: sanitizeHTMLString(this.customMarkup) }))), h("footer", { key: 'f5b4756a03b61a192074100ca8d0e2162a95ba58' }, h("q2-action-group", { key: '3586e0321e11e3a97ee2d640d55d71fc502ee50f', "full-width": true }, h("slot", { key: '3a66978962bfdafe16dc1948d3fd31f8088c0100', name: "action" }))))));
168
168
  }
169
169
  get hostElement() { return this; }
170
170
  static get style() { return Q2ModalStyle0; }
@@ -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: '9208eb9402c7bd1d9a9d52db3153d4b027e2d676', class: "month-container", onKeyDown: this.onMonthKeydown }, h("div", { key: 'e6a68034e723e758d9c9824d1a88aeefa73d4ef5', class: "navigation" }, h("q2-btn", { key: '552ca23bfaedc6a787ca78b6db0c027f13b94713', class: "year-btn", onClick: () => this.viewChange.emit({
149
+ return (h("div", { key: 'b7429b5ed21f7cda666f140a9a93ee643176979c', class: "month-container", onKeyDown: this.onMonthKeydown }, h("div", { key: '802900b16d0efa602df89edb22e174329736dca4', class: "navigation" }, h("q2-btn", { key: '0a318088ab2eb826620c056246599f5b7803c51e', class: "year-btn", onClick: () => this.viewChange.emit({
150
150
  view: 'year',
151
151
  selectedYear: this.year,
152
- }) }, h("span", { key: '758eeb0b67194fb19c191965684ec1f96663fb0e', class: "year" }, this.year), h("q2-icon", { key: 'c510bb62e965091cf52213ca7ea6b14fd5f00746', class: "year-icon off", type: "chevron-down" })), h("div", { key: 'b523d3a4d99316266e494b1375ba0f7630e5a2b5', class: "month-controller" }, h("div", { key: '22ad01820573025add8690107ad17a173fee2551', class: "cal-year-prev-next" }, h("q2-btn", { key: '9305d7ea801adc18e2fa613f395c2ad3bcaf16b8', 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: '01e0409616245ff1f468a3945bf570697a745f7c', type: "arrow-left" })), h("q2-btn", { key: 'c89e7e4c668ab6c69caa767746e9eccbc127e321', 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: 'd15cd07ed6ecc9d0ca4f6b2c1c66e7804195a912', type: "arrow-right" }))))), h("div", { key: 'bc5f547b283296e8caff1d10ab0babd269ff5d80', 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: '1ad90d319a3589309eec05791fe289c5a8813df9', class: "today-label" }, loc('tecton.element.calendar.today'), ": ", this.today))));
152
+ }) }, h("span", { key: '02018f884cb7b48fb581597fc7d5a2a323497668', class: "year" }, this.year), h("q2-icon", { key: '9ab23a381d4fedb5aca2ecee19eb975d76ff4465', class: "year-icon off", type: "chevron-down" })), h("div", { key: '79dd4cd0864d051a4252c21ebbd697e0e75b0ec3', class: "month-controller" }, h("div", { key: 'd94ad2ebfc317206bfff5b16861c52507a168e09', class: "cal-year-prev-next" }, h("q2-btn", { key: '4d8b12fde9825bd5dca90012d42e73453f2cb777', 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: '428b2feb8854e145bdbc88bdd2c6a2c25a3a50ce', type: "arrow-left" })), h("q2-btn", { key: '2f7ef439402c9788ae002a199813387a370e0ed3', 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: '5931c20eac7a2268c6b945b336f44e143e9fe484', type: "arrow-right" }))))), h("div", { key: '9e18ae0e86a741201eb2a8c6ff04b9007899cbae', 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: '8dfee8bcf4ee9b4137c9c8644be7f38f5794bf4d', 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; }
@@ -51,7 +51,7 @@ const Q2Optgroup = /*@__PURE__*/ proxyCustomElement(class Q2Optgroup extends HTM
51
51
  // #endregion
52
52
  // #region Render Methods
53
53
  render() {
54
- return (h("div", { key: '72e78e35e909a826dbff58572ccf2eb922992ad8', class: "q2-optgroup-container", hidden: this.hidden, "aria-labelledby": this.headerId, role: "group" }, h("div", { key: '3c25d95961cf0b41f1633782647a708043033bea', class: "q2-optgroup-header", id: this.headerId }, (this.label && loc(this.label)) || ''), h("div", { key: '126e87b4daeb27564289a5c183f2fa155f8b086f', class: "q2-optgroup-options" }, h("slot", { key: '21e7c0f8f8992915b029343ce917ebb20f0579b5' }))));
54
+ return (h("div", { key: '6b13767a72d67ef3493dcf8d0a4d61fef6255590', class: "q2-optgroup-container", hidden: this.hidden, "aria-labelledby": this.headerId, role: "group" }, h("div", { key: 'bb613f288978e7ea2e26dbd541bfd1d436df4325', class: "q2-optgroup-header", id: this.headerId }, (this.label && loc(this.label)) || ''), h("div", { key: '523029610ca35f25407ee95e8cb58d5c619c03b8', class: "q2-optgroup-options" }, h("slot", { key: 'd278b4bbd2ffe6de40f2259ae3164798ab9c2523' }))));
55
55
  }
56
56
  get hostElement() { return this; }
57
57
  static get watchers() { return {
@@ -274,7 +274,7 @@ const Q2Pagination$1 = /*@__PURE__*/ proxyCustomElement(class Q2Pagination exten
274
274
  total,
275
275
  });
276
276
  }
277
- return (h("nav", { key: '81ad5cb26deb25850937b8cc9532c085c7ae7a7a', class: "container", ref: el => (this.containerElement = el), "aria-label": loc('tecton.element.pagination.title') }, h("div", { key: '80e730df9072d5d807d21fa589bb743dfc3c47c1', class: "description", "test-id": "description" }, pagesOnly
277
+ return (h("nav", { key: '522f7a6ca80da14c71ab8e4c16345f780bdfedb7', class: "container", ref: el => (this.containerElement = el), "aria-label": loc('tecton.element.pagination.title') }, h("div", { key: '7192232f0c101c7d91681d6aeb71d9816bc54ec9', class: "description", "test-id": "description" }, pagesOnly
278
278
  ? loc('tecton.element.pagination.pages', {
279
279
  current: page,
280
280
  total: totalPages,
@@ -283,10 +283,10 @@ const Q2Pagination$1 = /*@__PURE__*/ proxyCustomElement(class Q2Pagination exten
283
283
  range: currentRange,
284
284
  recordType: recordType.toLowerCase(),
285
285
  total: total.toLocaleString(),
286
- })), h("div", { key: '4ac5c21e45e4d4aed43e01fd49a0f398cb2ffa0b', class: "btn-group" }, h("q2-btn", { key: '1f2a32ece3c921d9173e5d5958527d7c6e0e3910', 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: '11250e5b156691b6800475010416711941f60b95', type: "chevron-double-left" })), h("q2-btn", { key: 'af6e51286ec4017c92bf941a5b0aecfc5eb5e082', ref: el => (this.prevPageBtn = el), label: prevButtonLabel, disabled: onFirstPage, onClick: () => this.handlePageChange(page - 1), "test-id": "prevPageBtn", "hide-label": true }, h("q2-icon", { key: '7090e6297c5983639e7113416101d1811e95d4c7', type: "chevron-left" }))), h("div", { key: 'e09c5ef5a837b14cdbd4a26f5acc71e47cfb6728', class: "controls", hidden: isFullViewHidden, "test-id": "controls" }, h("span", { key: '1dd05c355c04f568d17ccdfc927b570e8795c99f', "aria-hidden": "true" }, loc('tecton.element.pagination.page')), h("div", { key: 'a9e13e527bfe98e928a467c9c99e21cfadae182f', class: "input-wrapper", onClick: () => this.inputField.dispatchEvent(new FocusEvent('focus')) }, h("q2-input", { key: '368f0f7ee7f23c45101362b0dacf9df0ee9cc41c', ref: el => (this.inputField = el), type: "number", value: `${page}`, min: 1, max: this.totalPages, hideLabel: true, optional: true, label: `${loc('tecton.element.pagination.page')} (${loc('tecton.element.pagination.ofPages', [totalPages.toLocaleString()])})`, onChange: event => {
286
+ })), h("div", { key: '82b75af4cd9e03338e9fe262d8881fbf36b7a591', class: "btn-group" }, h("q2-btn", { key: '6a5a7a66e845acf4d56cbd0cebe42568c399434e', 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: '2d601f453125c485ad742a6b0ef90724f390da32', type: "chevron-double-left" })), h("q2-btn", { key: '9b177b458d7d1b0a6408c51ad146308d8cef1123', ref: el => (this.prevPageBtn = el), label: prevButtonLabel, disabled: onFirstPage, onClick: () => this.handlePageChange(page - 1), "test-id": "prevPageBtn", "hide-label": true }, h("q2-icon", { key: 'c7c017d0542756c0d0b33fbca98b0b87f014e1f9', type: "chevron-left" }))), h("div", { key: 'afa7a54817a9d79cc2ca17749e5778b4cd2ded66', class: "controls", hidden: isFullViewHidden, "test-id": "controls" }, h("span", { key: '24549c54a21e204c50797738287010af4414d2a9', "aria-hidden": "true" }, loc('tecton.element.pagination.page')), h("div", { key: '3ee4e68f1528ad2a947e816e8b4aa3f70d25b7f7', class: "input-wrapper", onClick: () => this.inputField.dispatchEvent(new FocusEvent('focus')) }, h("q2-input", { key: 'd937bdb0510012fde31a06fbd781e9bfa5dc72f8', ref: el => (this.inputField = el), type: "number", value: `${page}`, min: 1, max: this.totalPages, hideLabel: true, optional: true, label: `${loc('tecton.element.pagination.page')} (${loc('tecton.element.pagination.ofPages', [totalPages.toLocaleString()])})`, onChange: event => {
287
287
  event.stopPropagation();
288
288
  this.handlePageChange(event.detail.value);
289
- }, "test-id": "pageInput", current: "page" })), h("span", { key: '29a9af7d27dc1f28387df6ef1dd052c2ce0c27ac', "aria-hidden": "true" }, loc('tecton.element.pagination.ofPages', [totalPages.toLocaleString()]))), h("div", { key: '7cd9ea6486ef69c90bf03cac9f80fd575f78103a', class: "btn-group" }, h("q2-btn", { key: '138e654a3112debc75c12ab01cca93f9a768e7a9', ref: el => (this.nextPageBtn = el), label: nextButtonLabel, disabled: onLastPage, onClick: () => this.handlePageChange(page + 1), "test-id": "nextPageBtn", "hide-label": true }, h("q2-icon", { key: '2b6ab242a2f1d090c07675753c5b5a3f2b36ffe0', type: "chevron-right" })), h("q2-btn", { key: '35103fb040b0b9117c035a2808be49afaffaa9f2', 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: '47ee1ca35772437aad4319aa391b5623f3546500', type: "chevron-double-right" }))), h("div", { key: '639a79c43ddb8c2757ffb34b9f54da4e75323a80', class: "per-page", hidden: isFullViewHidden || !((_a = this.perPageIncrements) === null || _a === void 0 ? void 0 : _a.length) }, showPerPageSelect && this.renderPerPage())));
289
+ }, "test-id": "pageInput", current: "page" })), h("span", { key: 'f334329061ef618c1db563ac01a763fb6416d1b1', "aria-hidden": "true" }, loc('tecton.element.pagination.ofPages', [totalPages.toLocaleString()]))), h("div", { key: '02b29f060edb638e8cf0c7bb7cda4d0485af2481', class: "btn-group" }, h("q2-btn", { key: '9a75c84ecc03f11dd852200966f2db2a28fd5bcf', ref: el => (this.nextPageBtn = el), label: nextButtonLabel, disabled: onLastPage, onClick: () => this.handlePageChange(page + 1), "test-id": "nextPageBtn", "hide-label": true }, h("q2-icon", { key: 'b6727d1d7f018d60e4f31c0099af29efc9abb8a0', type: "chevron-right" })), h("q2-btn", { key: '2b0ed22e5d397aa7affc12e7bee1c8d4dc284484', 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: '95c98ee4c4c1bcfb709e9a3a2c1648eca717f8b3', type: "chevron-double-right" }))), h("div", { key: '44e21a845dce96cc86b35df24bead60b4542b99f', class: "per-page", hidden: isFullViewHidden || !((_a = this.perPageIncrements) === null || _a === void 0 ? void 0 : _a.length) }, showPerPageSelect && this.renderPerPage())));
290
290
  }
291
291
  get hostElement() { return this; }
292
292
  static get watchers() { return {
@@ -354,7 +354,7 @@ const Q2Pill$1 = /*@__PURE__*/ proxyCustomElement(class Q2Pill extends HTMLEleme
354
354
  wrapperClassNames.push('has-icon');
355
355
  if (optionCount)
356
356
  wrapperClassNames.push('has-options');
357
- return (h("click-elsewhere", { key: 'c6dfa2ec426f3a2e3f2623fa0f218045cf22bf65', onChange: this.onClickElsewhere }, h("div", { key: 'b06ee5e8fd7c66e535ae786bbc41b7bbb2f890f0', class: wrapperClassNames.join(' ') }, h("div", { key: '33cfc2f0ac6d50cde4ff3c4d301b81081018faa0', class: "btn-height-wrapper", ref: el => (this.primaryBtnWrapper = el), onClick: this.handleWrapperClick, tabIndex: -1 }, h("button", { key: 'ce96d775d2cd1349ac8e982862bce850bfb7ff00', class: "btn-primary", "test-id": "btn-control", type: "button", role: (optionCount && 'combobox') || undefined, ref: el => (this.primaryBtn = el), onClick: this.handleClick, onKeyDown: this.handleKeydown, onFocusout: this.handleFocusOut, disabled: this.disabled, "aria-roledescription": !optionCount && 'filter', "aria-controls": (optionCount && 'option-list') || undefined, "aria-expanded": (optionCount && `${!!open}`) || undefined, "aria-label": this.buttonContent, "aria-describedby": (optionCount && 'option-description') || undefined }, this.truncatedButtonContent, !optionCount && active && h("span", { key: 'd7def68e55ecd39072d2b7a268459d01fa9f0715', class: "sr" }, "(", loc('tecton.element.pill.active'), ")"))), this.renderIcon(), !!optionCount && this.renderHiddenElement()), this.optionCount > 0 && (h("q2-popover", { key: '962a7145528d951a7a56e51a8290e2a3d22fe469', ref: el => (this.popoverElement = el), controlElement: this.primaryBtn, open: this.open, "max-height": this.popoverMaxHeight, minHeight: this.popoverMinHeight, direction: this.popoverDirection, align: this.popoverAlignment, onFocusout: this.handleFocusOut }, h("div", { key: '35da2a4a0f9487329dd2f6599433278b842f5730', class: "popover-content" }, h("div", { key: '084bad243e6946269d3a4525bf98a6b717101a65', ref: el => (this.popoverTopContainer = el), class: "popover-top-container", tabindex: "-1", hidden: !this.hasPopoverTop, onKeyDown: this.handleKeydown }, h("slot", { key: '5f2e3b51085f841e816f5052f56a7ed89214e169', name: "popover-top" })), h("q2-option-list", { key: 'd176a943fd4a94ed519c42dcf1182931d02a8b13', 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: '34b6eb444aefb59b23c85d4354861135cf63919f' })), h("div", { key: 'b30d3f4dd110de4cc4ccc2887f9e936af5986db1', ref: el => (this.popoverBottomContainer = el), class: "popover-bottom-container", tabindex: "-1", hidden: !this.hasPopoverBottom, onKeyDown: this.handleKeydown }, h("slot", { key: '003d70ef29d638287629f4af176cf3d1852168be', name: "popover-bottom" })))))));
357
+ return (h("click-elsewhere", { key: 'c9b3e809fd37896292b160ae76cc0f5c6922ae6a', onChange: this.onClickElsewhere }, h("div", { key: '0827c66963b1823bb295bc3f3faa6ca42dddef0f', class: wrapperClassNames.join(' ') }, h("div", { key: '0433e16bc73d9e3f16779b6caf389cd93f72bb3e', class: "btn-height-wrapper", ref: el => (this.primaryBtnWrapper = el), onClick: this.handleWrapperClick, tabIndex: -1 }, h("button", { key: '8050576845cdb23971103766f2401064ce0cad88', class: "btn-primary", "test-id": "btn-control", type: "button", role: (optionCount && 'combobox') || undefined, ref: el => (this.primaryBtn = el), onClick: this.handleClick, onKeyDown: this.handleKeydown, onFocusout: this.handleFocusOut, disabled: this.disabled, "aria-roledescription": !optionCount && 'filter', "aria-controls": (optionCount && 'option-list') || undefined, "aria-expanded": (optionCount && `${!!open}`) || undefined, "aria-label": this.buttonContent, "aria-describedby": (optionCount && 'option-description') || undefined }, this.truncatedButtonContent, !optionCount && active && h("span", { key: '336ae9801e05bd79e9295500840888f13b1c8965', class: "sr" }, "(", loc('tecton.element.pill.active'), ")"))), this.renderIcon(), !!optionCount && this.renderHiddenElement()), this.optionCount > 0 && (h("q2-popover", { key: '8b5aaba68697d6697b0676b12e22dd5ae2bff171', ref: el => (this.popoverElement = el), controlElement: this.primaryBtn, open: this.open, "max-height": this.popoverMaxHeight, minHeight: this.popoverMinHeight, direction: this.popoverDirection, align: this.popoverAlignment, onFocusout: this.handleFocusOut }, h("div", { key: 'a549cebcd60061337dd5050a7c032b6a8fc17bda', class: "popover-content" }, h("div", { key: 'd2fa4b73da36e0e99ed757ff79ce267222212dd8', ref: el => (this.popoverTopContainer = el), class: "popover-top-container", tabindex: "-1", hidden: !this.hasPopoverTop, onKeyDown: this.handleKeydown }, h("slot", { key: '29853c6df6666b9f1140bec1f1f4228cc678d975', name: "popover-top" })), h("q2-option-list", { key: '6ec051510319b4754990db8116b59cf143dec6be', 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: 'f05e10a03bab9955e957a347210e67fdd792ea7d' })), h("div", { key: 'c09db49ec7e48e707bc5f2757df5cfb980c29e35', ref: el => (this.popoverBottomContainer = el), class: "popover-bottom-container", tabindex: "-1", hidden: !this.hasPopoverBottom, onKeyDown: this.handleKeydown }, h("slot", { key: 'c6c2b55e80afaff64211777bf7c2994da15a3bc7', name: "popover-bottom" })))))));
358
358
  }
359
359
  get hostElement() { return this; }
360
360
  static get watchers() { return {
@@ -1,7 +1,7 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
2
- import { k as handleDeprecationWarning, w as waitForNextPaint } from './index2.js';
2
+ import { k as handleDeprecationWarning, w as waitForNextPaint, v as isInScrollableContainer, d as isMobile } 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;
52
+ const { controlElement, containerElement, currentDirection, isModule, align } = this;
51
53
  const { top: controlTop, bottom: controlBottom, left: controlLeft, right: controlRight, } = (_b = (_a = controlElement === null || controlElement === void 0 ? void 0 : controlElement.getBoundingClientRect) === null || _a === void 0 ? void 0 : _a.call(controlElement)) !== null && _b !== void 0 ? _b : {
52
54
  top: 0,
53
55
  bottom: 0,
54
56
  left: 0,
55
57
  right: 0,
56
58
  };
57
- const popoverLeft = controlLeft - rootElementRect.left;
59
+ const popoverLeft = controlLeft;
60
+ const popoverRight = ((_c = window === null || window === void 0 ? void 0 : window.visualViewport) === null || _c === void 0 ? void 0 : _c.width) - controlRight;
61
+ if (align === 'right') {
62
+ containerElement.style.setProperty('--comp-pop-right', `${popoverRight - window.scrollX}px`);
63
+ containerElement.style.setProperty('--comp-pop-left', 'unset');
64
+ }
65
+ else {
66
+ containerElement.style.setProperty('--comp-pop-left', `${popoverLeft + window.scrollX}px`);
67
+ containerElement.style.setProperty('--comp-pop-right', 'unset');
68
+ }
58
69
  if (this.block)
59
70
  containerElement.style.setProperty('--comp-pop-width', `${(controlElement === null || controlElement === void 0 ? void 0 : controlElement.offsetWidth) || 0}px`);
60
- containerElement.style.setProperty('--comp-pop-left', `${popoverLeft}px`);
61
- containerElement.style.setProperty('--comp-pop-right', `${rootElementRect.width + rootElementRect.left - controlRight}px`);
62
71
  if (currentDirection === 'up') {
63
- 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 - 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 + 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,13 +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);
96
116
  this.containerElement = null;
97
117
  this.contentElement = null;
98
118
  this.controlElement = null;
99
- this.rootElementRect = 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
+ }
100
125
  }
101
126
  componentDidLoad() {
102
127
  this.handleMinHeight();
128
+ if (this.supportsPopoverAPI)
129
+ this.containerElement.addEventListener('toggle', this.handlePopoverToggleEvent);
103
130
  if (this.open)
104
131
  this.determinePopDirection();
105
132
  }
@@ -126,7 +153,6 @@ const Q2Popover = /*@__PURE__*/ proxyCustomElement(class Q2Popover extends HTMLE
126
153
  this.handleMinHeight();
127
154
  }
128
155
  async openChanged(open) {
129
- this.setRootElement();
130
156
  this.popoverStateChanged.emit({ open });
131
157
  if (open) {
132
158
  this.addViewportListeners();
@@ -135,7 +161,12 @@ const Q2Popover = /*@__PURE__*/ proxyCustomElement(class Q2Popover extends HTMLE
135
161
  else {
136
162
  this.removeViewportListeners();
137
163
  this.currentDirection = undefined;
138
- this.show = false;
164
+ if (this.mode === 'legacy' || !this.supportsPopoverAPI) {
165
+ this.show = false;
166
+ }
167
+ else {
168
+ this.containerElement.hidePopover();
169
+ }
139
170
  await waitForNextPaint();
140
171
  this.clearCSSProperties();
141
172
  }
@@ -158,6 +189,9 @@ const Q2Popover = /*@__PURE__*/ proxyCustomElement(class Q2Popover extends HTMLE
158
189
  return undefined;
159
190
  }
160
191
  }
192
+ get supportsPopoverAPI() {
193
+ return Object.hasOwn(HTMLElement.prototype, 'popover');
194
+ }
161
195
  get validatedMaxHeight() {
162
196
  const { maxHeight } = this;
163
197
  return isNaN(maxHeight) ? undefined : maxHeight;
@@ -165,11 +199,12 @@ const Q2Popover = /*@__PURE__*/ proxyCustomElement(class Q2Popover extends HTMLE
165
199
  addViewportListeners() {
166
200
  var _a;
167
201
  window.addEventListener('resize', this.viewPortOrientationChanged);
168
- // #region remove when Popover API is supported in iOS
169
- window.addEventListener('scroll', this.viewPortChanged, { passive: true, capture: true });
202
+ visualViewport === null || visualViewport === void 0 ? void 0 : visualViewport.addEventListener('resize', this.viewPortChanged);
203
+ if (isInScrollableContainer(this.hostElement) && !isMobile()) {
204
+ window.addEventListener('scroll', this.viewPortChanged, { passive: true, capture: true });
205
+ }
170
206
  (_a = screen === null || screen === void 0 ? void 0 : screen.orientation) === null || _a === void 0 ? void 0 : _a.addEventListener('orientationchange', this.viewPortOrientationChanged);
171
207
  window.addEventListener('orientationchange', this.viewPortOrientationChanged);
172
- // #endregion
173
208
  }
174
209
  clearCSSProperties() {
175
210
  this.containerElement.style.removeProperty('--comp-pop-max-height');
@@ -195,20 +230,23 @@ const Q2Popover = /*@__PURE__*/ proxyCustomElement(class Q2Popover extends HTMLE
195
230
  let maxSpaceAbove;
196
231
  let maxSpaceBelow;
197
232
  if (isModule) {
198
- const { outletOffset = 0, innerHeight = window.innerHeight } = ((_c = window.Tecton) === null || _c === void 0 ? void 0 : _c.platformDimensions) || {};
199
- const distanceToIframeBottom = window.visualViewport.height - controlBottom;
200
- const viewableSpaceBelow = innerHeight - (outletOffset + controlBottom);
233
+ const { outletOffset = 0, innerHeight = window.innerHeight, top: topBarHeight = 0, bottom: bottomBarHeight = 0, } = ((_c = window.Tecton) === null || _c === void 0 ? void 0 : _c.platformDimensions) || {};
234
+ const distanceToIframeBottom = window.innerHeight - controlBottom;
235
+ // controlElement position visually on the page
236
+ const visualControlTop = outletOffset > 0 ? controlTop : controlTop + outletOffset - topBarHeight;
237
+ const visualControlBottom = outletOffset + controlBottom - topBarHeight;
238
+ // visual space around the controlElement
239
+ const viewableSpaceAbove = visualControlTop;
240
+ const viewableSpaceBelow = innerHeight - bottomBarHeight - visualControlBottom;
241
+ // calculate space above and below controlElement
201
242
  const isIframeShorterThanWindow = distanceToIframeBottom < viewableSpaceBelow;
202
- windowHeight = innerHeight;
203
- // If the top of the module is below the top of the window we just use the controlTop
204
- // Otherwise we need to add the outletOffset to the controlTop
205
- maxSpaceAbove = (outletOffset > 0 ? controlTop : controlTop + outletOffset) - displayBuffer;
243
+ maxSpaceAbove = viewableSpaceAbove - displayBuffer;
206
244
  maxSpaceBelow = isIframeShorterThanWindow
207
245
  ? distanceToIframeBottom - displayBuffer
208
246
  : viewableSpaceBelow - displayBuffer;
209
247
  }
210
248
  else {
211
- windowHeight = window.visualViewport.height;
249
+ windowHeight = window.innerHeight;
212
250
  maxSpaceAbove = controlTop - displayBuffer;
213
251
  maxSpaceBelow = windowHeight - controlBottom - displayBuffer;
214
252
  }
@@ -240,72 +278,38 @@ const Q2Popover = /*@__PURE__*/ proxyCustomElement(class Q2Popover extends HTMLE
240
278
  removeViewportListeners() {
241
279
  var _a;
242
280
  window.removeEventListener('resize', this.viewPortOrientationChanged);
243
- // #region remove when Popover API is supported in iOS
281
+ visualViewport === null || visualViewport === void 0 ? void 0 : visualViewport.removeEventListener('resize', this.viewPortChanged);
244
282
  window.removeEventListener('scroll', this.viewPortChanged, { capture: true });
245
283
  (_a = screen === null || screen === void 0 ? void 0 : screen.orientation) === null || _a === void 0 ? void 0 : _a.removeEventListener('orientationchange', this.viewPortOrientationChanged);
246
284
  window.removeEventListener('orientationchange', this.viewPortOrientationChanged);
247
- // #endregion
248
285
  }
249
286
  setDirectionAndShow(direction) {
250
- this.setRootElement();
251
287
  // Due to some runtime inconsistency across devices/browsers we need to add one more check here because the
252
288
  // popover can be closed between the time the popover is opened and the time the direction is determined
253
289
  const isOpen = this.open;
254
290
  if (!isOpen)
255
291
  return;
256
292
  this.currentDirection = direction;
257
- this.show = true;
258
- if (this.mode === 'legacy') {
293
+ if (this.mode === 'legacy' || !this.supportsPopoverAPI) {
294
+ this.show = true;
259
295
  this.setAbsoluteCSSProperties();
260
296
  }
261
297
  else {
262
- this.setFixedCSSProperties();
263
- }
264
- }
265
- setRootElement() {
266
- let currentElement = this.hostElement;
267
- while (currentElement && currentElement !== document.documentElement) {
268
- const computedStyle = window.getComputedStyle(currentElement);
269
- // Check if the element has any styles applied that create a new containg block
270
- if (computedStyle.transform !== 'none' ||
271
- computedStyle.filter !== 'none' ||
272
- computedStyle.perspective !== 'none' ||
273
- computedStyle.containerType !== 'normal' ||
274
- ['transform', 'perspective', 'filter'].includes(computedStyle.willChange) ||
275
- ['layout', 'paint', 'strict', 'content'].includes(computedStyle.contain)) {
276
- this.rootElementRect = currentElement.getBoundingClientRect();
277
- return;
278
- }
279
- const rootNode = currentElement.getRootNode();
280
- const isRootNodeWebComponent = typeof ShadowRoot !== 'undefined' &&
281
- rootNode instanceof ShadowRoot &&
282
- rootNode.host instanceof HTMLElement;
283
- if (isRootNodeWebComponent) {
284
- currentElement = rootNode.host;
285
- }
286
- else {
287
- currentElement = currentElement.parentElement;
288
- }
298
+ this.setPopoverAPICSSProperties();
299
+ this.containerElement.showPopover();
289
300
  }
290
- // Return the document's bounding rect if no element is found
291
- this.rootElementRect = {
292
- top: 0,
293
- bottom: 0,
294
- left: 0,
295
- right: 0,
296
- height: window.visualViewport.height,
297
- width: window.visualViewport.width,
298
- };
299
301
  }
300
302
  // #endregion
301
303
  // #region Render Methods
302
304
  render() {
303
- const containerClasses = ['container', this.currentDirection];
305
+ const containerClasses = ['container', this.currentDirection, this.align];
304
306
  if (this.show)
305
307
  containerClasses.push('show');
308
+ if (this.block)
309
+ containerClasses.push('block');
306
310
  if (this.mode === 'legacy')
307
311
  containerClasses.push('legacy');
308
- return (h("div", { key: 'd32d4929d567609b450603228c6747cfaf60f42f', ref: el => (this.containerElement = el), class: containerClasses.join(' '), "test-id": "outerContainer", tabIndex: -1 }, h("div", { key: 'bab899e8951dd534c21a09fbac84bae890bc932e', ref: el => (this.contentElement = el), class: "content" }, h("slot", { key: '6b222ff386edeaf985dee48074ba30e68a95964c' }))));
312
+ return (h("div", { key: 'fedc22e67f0b6a687a9053973e53dc11f22a01f4', ref: el => (this.containerElement = el), class: containerClasses.join(' '), "test-id": "outerContainer", tabIndex: -1, popover: "manual" }, h("div", { key: '563f4feede1e59a43968e9720d41d9ee1b41ab3c', ref: el => (this.contentElement = el), class: "content" }, h("slot", { key: 'cb74f4a2b315adcffbf2bbf6db9cae70c2ae8892' }))));
309
313
  }
310
314
  get hostElement() { return this; }
311
315
  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;QAsPpC,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,CAAC;aACnE;YAED,IAAI,IAAI,CAAC,KAAK,EAAE;gBACZ,gBAAgB,CAAC,KAAK,CAAC,WAAW,CAAC,kBAAkB,EAAE,MAAM,CAAC,CAAC;aAClE;YAED,IAAI,gBAAgB,KAAK,IAAI,EAAE;gBAC3B,MAAM,YAAY,GAAG,gBAAgB,CAAC,cAAc,CAA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I,GAAG,EAAE,EAAE,KAAK,IAAI,CAAC,cAAc,GAAG,EAAE,CAAC,EACrC,KAAK,EAAC,SAAS,IAEf,8DAAQ,CACN,CACJ,EACR;KACL;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/q2-popover/q2-popover.scss?tag=q2-popover&encapsulation=shadow","src/components/q2-popover/q2-popover.tsx"],"sourcesContent":["@import '../../styles/host.scss';\n@import '../../styles/functions';\n\n.container {\n display: none;\n}\n\n.show {\n display: block;\n position: fixed;\n z-index: var-list(--tct-popover-z-index, 50);\n margin: 0;\n padding: 0;\n overflow: auto;\n background: var-list(--tct-popover-background, --app-white, #ffffff);\n color: var-list(--tct-popover-font-color, --t-text, #4d4d4d);\n min-width: var-list(--tct-popover-min-width, 135px);\n margin-block: var-list(--tct-popover-margin-block, 0);\n box-shadow: var-list(--tct-popover-box-shadow, --app-shadow-1, unquote(\"0px 0px 2px rgba(0, 0, 0, 0.12), 0px 2px 4px rgba(0, 0, 0, 0.14)\"));\n border-width: var-list(--tct-popover-border-width, 0);\n border-style: solid;\n border-color: var-list(--tct-popover-border-color, transparent);\n border-radius: var-list(--tct-popover-border-radius, 0);\n // the following --comp variables are set via JS\n max-height: var(--comp-pop-max-height);\n left: var(--comp-pop-left);\n opacity: var(--comp-pop-opacity, 0);\n\n :host([block]) & {\n right: unset;\n width: var(--comp-pop-width);\n min-width: var-list(--tct-popover-min-width, unset);\n }\n\n :host([align='left']) & {\n left: var(--comp-pop-left);\n right: unset;\n }\n\n :host([align='right']) & {\n right: var(--comp-pop-right);\n left: unset;\n }\n\n &.down {\n top: var-list(--tct-popover-top, --comp-pop-top);\n bottom: unset;\n }\n\n &.up {\n top: unset;\n bottom: var(--comp-pop-bottom);\n }\n\n &.legacy {\n position: absolute;\n }\n\n @include tiny-scrollbar();\n}\n\nclick-elsewhere {\n position: relative;\n display: block;\n}\n","import {\n Component,\n Prop,\n h,\n ComponentInterface,\n Element,\n Watch,\n Method,\n Listen,\n EventEmitter,\n Event,\n State,\n} from '@stencil/core';\nimport { handleDeprecationWarning, waitForNextPaint } 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 this.containerElement = null;\n this.contentElement = null;\n this.controlElement = null;\n this.rootElementRect = null;\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('orientationchange', 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, { capture: true });\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 tabIndex={-1}\n >\n <div\n ref={el => (this.contentElement = el)}\n class=\"content\"\n >\n <slot />\n </div>\n </div>\n );\n }\n\n // #endregion\n}\n"],"version":3}
1
+ {"file":"q2-popover2.js","mappings":";;;AAAA,MAAM,YAAY,GAAG,ytFAAytF,CAAC;AAC/uF,wBAAe,YAAY;;MCed,SAAS;;;;;;;;;QAQlB,kBAAa,GAAG,EAAE,CAAC;QACnB,uBAAkB,GAAY,KAAK,CAAC;QAiRpC,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,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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, isMobile, isInScrollableContainer } 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 get validatedMaxHeight(): number | undefined {\n const { maxHeight } = this;\n return isNaN(maxHeight) ? undefined : maxHeight;\n }\n\n addViewportListeners() {\n window.addEventListener('resize', this.viewPortOrientationChanged);\n visualViewport?.addEventListener('resize', this.viewPortChanged);\n if (isInScrollableContainer(this.hostElement) && !isMobile()) {\n window.addEventListener('scroll', this.viewPortChanged, { passive: true, capture: true });\n }\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 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 if (isModule) {\n const {\n outletOffset = 0,\n innerHeight = window.innerHeight,\n top: topBarHeight = 0,\n bottom: bottomBarHeight = 0,\n } = window.Tecton?.platformDimensions || {};\n\n const distanceToIframeBottom = window.innerHeight - controlBottom;\n\n // controlElement position visually on the page\n const visualControlTop = outletOffset > 0 ? controlTop : controlTop + outletOffset - topBarHeight;\n const visualControlBottom = outletOffset + controlBottom - topBarHeight;\n\n // visual space around the controlElement\n const viewableSpaceAbove = visualControlTop;\n const viewableSpaceBelow = innerHeight - bottomBarHeight - visualControlBottom;\n\n // calculate space above and below controlElement\n const isIframeShorterThanWindow = distanceToIframeBottom < viewableSpaceBelow;\n maxSpaceAbove = viewableSpaceAbove - displayBuffer;\n maxSpaceBelow = isIframeShorterThanWindow\n ? distanceToIframeBottom - displayBuffer\n : viewableSpaceBelow - displayBuffer;\n } else {\n windowHeight = window.innerHeight;\n maxSpaceAbove = controlTop - displayBuffer;\n maxSpaceBelow = windowHeight - controlBottom - displayBuffer;\n }\n\n const directionWithMostSpace: 'up' | 'down' = maxSpaceAbove > maxSpaceBelow ? 'up' : 'down';\n\n // We do not want to update the max height once the popover is open unless the page orientation shifts (resize or mobile use cases)\n const shouldUpdateMaxHeight =\n !containerElement.style.getPropertyValue('--comp-pop-max-height') || this.orientationChanged;\n // we do not want to constantly update the max-height after an orientation change, so we switch this back to false\n this.orientationChanged = false;\n const currentOrDetermineDirection = this.currentDirection || providedDirection || directionWithMostSpace;\n\n switch (currentOrDetermineDirection) {\n case 'up':\n if (shouldUpdateMaxHeight) {\n const priorityMaxHeight = this.validatedMaxHeight || maxSpaceAbove;\n const maxHeight = Math.min(maxSpaceAbove, priorityMaxHeight);\n containerElement.style.setProperty('--comp-pop-max-height', `${maxHeight}px`);\n }\n this.setDirectionAndShow('up');\n break;\n case 'down':\n if (shouldUpdateMaxHeight) {\n const priorityMaxHeight = this.validatedMaxHeight || maxSpaceBelow;\n const maxHeight = Math.min(maxSpaceBelow, priorityMaxHeight);\n containerElement.style.setProperty('--comp-pop-max-height', `${maxHeight}px`);\n }\n this.setDirectionAndShow('down');\n break;\n default:\n break;\n }\n }\n\n handleMinHeight = () => {\n if (this.minHeight) {\n handleDeprecationWarning(this, 'minHeight', 'prop');\n }\n };\n\n handlePopoverToggleEvent = (event: ToggleEvent) => {\n this.popoverStateChanged.emit({ open: event.newState === 'open' });\n };\n\n removeViewportListeners() {\n window.removeEventListener('resize', this.viewPortOrientationChanged);\n visualViewport?.removeEventListener('resize', this.viewPortChanged);\n window.removeEventListener('scroll', this.viewPortChanged, { capture: true });\n screen?.orientation?.removeEventListener('orientationchange', this.viewPortOrientationChanged);\n window.removeEventListener('orientationchange', this.viewPortOrientationChanged);\n }\n\n setAbsoluteCSSProperties = async () => {\n const { controlElement, containerElement, currentDirection, align } = this;\n\n if (align === 'right') {\n containerElement.style.setProperty('--comp-pop-right', '0');\n containerElement.style.setProperty('--comp-pop-left', 'unset');\n } else {\n containerElement.style.setProperty('--comp-pop-left', '0');\n containerElement.style.setProperty('--comp-pop-right', 'unset');\n }\n\n if (this.block) {\n containerElement.style.setProperty('--comp-pop-width', '100%');\n }\n\n if (currentDirection === 'up') {\n const controlStyle = getComputedStyle(controlElement);\n const controlSize =\n parseInt(controlStyle.height || '0') +\n parseInt(controlStyle.borderTopWidth || '0') +\n parseInt(controlStyle.borderBottomWidth || '0');\n\n containerElement.style.setProperty('--comp-pop-bottom', `${controlSize}px`);\n }\n\n // Wait for one paint to prevent layout thrashing\n await waitForNextPaint();\n containerElement.style.setProperty('--comp-pop-opacity', '1');\n };\n\n setDirectionAndShow(direction: 'up' | 'down') {\n // Due to some runtime inconsistency across devices/browsers we need to add one more check here because the\n // popover can be closed between the time the popover is opened and the time the direction is determined\n const isOpen = this.open;\n if (!isOpen) return;\n\n this.currentDirection = direction;\n if (this.mode === 'legacy' || !this.supportsPopoverAPI) {\n this.show = true;\n this.setAbsoluteCSSProperties();\n } else {\n this.setPopoverAPICSSProperties();\n this.containerElement.showPopover();\n }\n }\n\n setPopoverAPICSSProperties = async () => {\n const { controlElement, containerElement, currentDirection, isModule, align } = this;\n const {\n top: controlTop,\n bottom: controlBottom,\n left: controlLeft,\n right: controlRight,\n } = controlElement?.getBoundingClientRect?.() ?? {\n top: 0,\n bottom: 0,\n left: 0,\n right: 0,\n };\n\n const popoverLeft: number = controlLeft;\n const popoverRight: number = window?.visualViewport?.width - controlRight;\n\n if (align === 'right') {\n containerElement.style.setProperty('--comp-pop-right', `${popoverRight - window.scrollX}px`);\n containerElement.style.setProperty('--comp-pop-left', 'unset');\n } else {\n containerElement.style.setProperty('--comp-pop-left', `${popoverLeft + window.scrollX}px`);\n containerElement.style.setProperty('--comp-pop-right', 'unset');\n }\n\n if (this.block) containerElement.style.setProperty('--comp-pop-width', `${controlElement?.offsetWidth || 0}px`);\n\n if (currentDirection === 'up') {\n if (isModule) {\n containerElement.style.setProperty('--comp-pop-bottom', `${window.innerHeight - controlTop}px`);\n } else {\n containerElement.style.setProperty(\n '--comp-pop-bottom',\n `${window.innerHeight - controlTop - window.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('--comp-pop-top', `${controlBottom + window.scrollY}px`);\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=\"manual\"\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: '9026e0194b08d067c04188fc4c7c9ffa05727fb6' }, shouldShow ? h("time", { dateTime: displayedMessage }, displayedMessage) : null);
146
+ return h(Fragment, { key: '0bb624cf78e589203bcfdd4752dbaaebc78d9294' }, 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: 'fa058a508d2397d7844acd6b67d4d2414c0822f1', onSlotchange: this.handleSlotChange });
83
+ return h("slot", { key: '6fa2e8e2004d9fcfb3f7cfb46cfdd359ca82d301', onSlotchange: this.handleSlotChange });
84
84
  }
85
85
  get hostElement() { return this; }
86
86
  static get watchers() { return {
@@ -195,9 +195,9 @@ const Q2Section$1 = /*@__PURE__*/ proxyCustomElement(class Q2Section extends HTM
195
195
  wrapperClasses.push('is-transitioning');
196
196
  }
197
197
  const showDefaultHeader = !this.hasYieldedHeader && !!this.label;
198
- return (h("section", { key: '59a073f2fbbc37bb7e7f1c6823610e150fd1e256', class: "wrapper" }, h("header", { key: 'c02e2e531cb0ad833752f9254b95f6eb76d8b317', class: hasHeader ? 'has-header' : '' }, h("div", { key: '7d3b12f0640b7dd8b49bbca7ce710f6bb75325a2', class: "header-content", id: this.titleId, onClick: this.collapsible && this.onHeaderClick }, showDefaultHeader && h("h2", { key: '7552c47106c63ce813145a13bf29e6fa4db74c58', class: "title" }, loc(this.label)), h("div", { key: '4823d86d58f2a214a31987b8892802d861388a5d', ref: el => (this.headerSlotWrapper = el), class: "header-slot-wrapper" }, h("slot", { key: 'f70123a46f2077c23cb0a25c56e83d59e3432485', ref: (el) => (this.headerSlot = el), name: "q2-section-header" }))), this.collapsible && !this.noCollapseIcon && (h("q2-btn", { key: '7330e6657cd6eeb8e448a04b2b3530e3843d1763', 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: '8a953908c20c980198ad77e66b41d5da3337ea28', type: "chevron-up" })))), h("div", { key: 'caa5b37b95099c0959b048f6d7f030c1e0bdf16f', class: wrapperClasses.join(' '), id: this.contentId, "aria-labelledby": this.titleId, role: "region", onTransitionEnd: this.onTransitionEnd, style: this.collapsible && {
198
+ return (h("section", { key: 'ec30708aa932f68c2ff165d666b6f87be9f7dfeb', class: "wrapper" }, h("header", { key: '25227270bdc86679fdf2b646b4314b83bd85d530', class: hasHeader ? 'has-header' : '' }, h("div", { key: 'f3257aafae07ef530489b4cc0e1e860ebc36d5d0', class: "header-content", id: this.titleId, onClick: this.collapsible && this.onHeaderClick }, showDefaultHeader && h("h2", { key: '889e0fc00a0b7b2081e679b8eefe5ce95ba27db9', class: "title" }, loc(this.label)), h("div", { key: 'c5cba7080bebd4db424afb1e46e33aa1906d06ec', ref: el => (this.headerSlotWrapper = el), class: "header-slot-wrapper" }, h("slot", { key: '897516031609575ab040af97c1215aedf646f87c', ref: (el) => (this.headerSlot = el), name: "q2-section-header" }))), this.collapsible && !this.noCollapseIcon && (h("q2-btn", { key: 'a6c85a93fd2701287361b75e9277b7efd309a506', 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: '08b7f0dc76c46ce103f3d53fd5ed9cae8a193382', type: "chevron-up" })))), h("div", { key: 'e8ccaeceee8096e3285ebedf9940f1aab3284814', class: wrapperClasses.join(' '), id: this.contentId, "aria-labelledby": this.titleId, role: "region", onTransitionEnd: this.onTransitionEnd, style: this.collapsible && {
199
199
  height: this.contentHeight,
200
- } }, h("div", { key: 'c4e83982d85944756eb7f9f379a3671ce7faee6b', ref: el => (this.contentContainer = el), class: "content", tabindex: "-1" }, h("slot", { key: '336a133e83f81a21da1e3008b0b4f35ffe25a4a6', ref: (el) => (this.contentSlot = el) })))));
200
+ } }, h("div", { key: 'df810dbfea3eec7465c438bce87bcb23ae3c8651', ref: el => (this.contentContainer = el), class: "content", tabindex: "-1" }, h("slot", { key: '221f07d4737fcf53a8697053e31d9774918a9e5e', ref: (el) => (this.contentSlot = el) })))));
201
201
  }
202
202
  get hostElement() { return this; }
203
203
  static get watchers() { return {