q2-tecton-elements 1.67.0 → 1.67.1

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 (256) hide show
  1. package/dist/bundle-report.json +431 -431
  2. package/dist/cjs/click-elsewhere.q2-option-list.q2-popover.entry.cjs.js.map +1 -1
  3. package/dist/cjs/click-elsewhere_3.cjs.entry.js +41 -14
  4. package/dist/cjs/click-elsewhere_3.cjs.entry.js.map +1 -1
  5. package/dist/cjs/q2-action-group_2.cjs.entry.js +2 -2
  6. package/dist/cjs/q2-action-sheet.cjs.entry.js +1 -1
  7. package/dist/cjs/q2-avatar.cjs.entry.js +1 -1
  8. package/dist/cjs/q2-btn.q2-loading.entry.cjs.js.map +1 -1
  9. package/dist/cjs/q2-btn_2.cjs.entry.js +4 -2
  10. package/dist/cjs/q2-btn_2.cjs.entry.js.map +1 -1
  11. package/dist/cjs/q2-calendar.cjs.entry.js +1 -1
  12. package/dist/cjs/q2-card-image.cjs.entry.js +2 -2
  13. package/dist/cjs/q2-carousel-pane.cjs.entry.js +2 -2
  14. package/dist/cjs/q2-carousel.cjs.entry.js +1 -1
  15. package/dist/cjs/q2-chart-area.cjs.entry.js +1 -1
  16. package/dist/cjs/q2-chart-bar.cjs.entry.js +1 -1
  17. package/dist/cjs/q2-chart-donut.cjs.entry.js +1 -1
  18. package/dist/cjs/q2-checkbox-group.cjs.entry.js +1 -1
  19. package/dist/cjs/q2-checkbox_2.cjs.entry.js +1 -1
  20. package/dist/cjs/q2-context.cjs.entry.js +1 -1
  21. package/dist/cjs/q2-currency.cjs.entry.js +1 -1
  22. package/dist/cjs/q2-data-table.cjs.entry.js +1 -1
  23. package/dist/cjs/q2-detail.cjs.entry.js +1 -1
  24. package/dist/cjs/q2-dropdown.cjs.entry.js +1 -1
  25. package/dist/cjs/q2-editable-field.cjs.entry.js +1 -1
  26. package/dist/cjs/q2-example.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-grid-area.cjs.entry.js +1 -1
  30. package/dist/cjs/q2-grid.cjs.entry.js +1 -1
  31. package/dist/cjs/q2-input.cjs.entry.js +1 -1
  32. package/dist/cjs/q2-item.cjs.entry.js +1 -1
  33. package/dist/cjs/q2-legend.cjs.entry.js +1 -1
  34. package/dist/cjs/q2-link_2.cjs.entry.js +1 -1
  35. package/dist/cjs/q2-message.cjs.entry.js +1 -1
  36. package/dist/cjs/q2-meter.cjs.entry.js +1 -1
  37. package/dist/cjs/q2-modal.cjs.entry.js +1 -1
  38. package/dist/cjs/q2-month-picker.cjs.entry.js +2 -2
  39. package/dist/cjs/q2-mutation-observer.cjs.entry.js +1 -1
  40. package/dist/cjs/q2-optgroup.cjs.entry.js +1 -1
  41. package/dist/cjs/q2-pagination.cjs.entry.js +3 -3
  42. package/dist/cjs/q2-pill.cjs.entry.js +1 -1
  43. package/dist/cjs/q2-radio-group.cjs.entry.js +1 -1
  44. package/dist/cjs/q2-radio.cjs.entry.js +1 -1
  45. package/dist/cjs/q2-relative-time.cjs.entry.js +1 -1
  46. package/dist/cjs/q2-section.cjs.entry.js +2 -2
  47. package/dist/cjs/q2-select.cjs.entry.js +1 -1
  48. package/dist/cjs/q2-stepper-pane.cjs.entry.js +1 -1
  49. package/dist/cjs/q2-stepper.cjs.entry.js +1 -1
  50. package/dist/cjs/q2-textarea.cjs.entry.js +1 -1
  51. package/dist/collection/collection-manifest.json +3 -3
  52. package/dist/collection/components/q2-action-group/q2-action-group.js +1 -1
  53. package/dist/collection/components/q2-action-sheet/q2-action-sheet.js +1 -1
  54. package/dist/collection/components/q2-avatar/q2-avatar.js +1 -1
  55. package/dist/collection/components/q2-btn/q2-btn.js +4 -2
  56. package/dist/collection/components/q2-btn/q2-btn.js.map +1 -1
  57. package/dist/collection/components/q2-calendar/q2-calendar.js +1 -1
  58. package/dist/collection/components/q2-calendar/q2-month-picker.js +2 -2
  59. package/dist/collection/components/q2-card-image/q2-card-image.js +2 -2
  60. package/dist/collection/components/q2-carousel/q2-carousel.js +1 -1
  61. package/dist/collection/components/q2-carousel-pane/q2-carousel-pane.js +2 -2
  62. package/dist/collection/components/q2-chart-area/q2-chart-area.js +1 -1
  63. package/dist/collection/components/q2-chart-bar/q2-chart-bar.js +1 -1
  64. package/dist/collection/components/q2-chart-donut/q2-chart-donut.js +1 -1
  65. package/dist/collection/components/q2-checkbox/q2-checkbox.js +1 -1
  66. package/dist/collection/components/q2-checkbox-group/q2-checkbox-group.js +1 -1
  67. package/dist/collection/components/q2-context/q2-context.js +1 -1
  68. package/dist/collection/components/q2-currency/q2-currency.js +1 -1
  69. package/dist/collection/components/q2-data-table/q2-data-table.js +1 -1
  70. package/dist/collection/components/q2-detail/q2-detail.js +1 -1
  71. package/dist/collection/components/q2-dropdown/q2-dropdown.js +1 -1
  72. package/dist/collection/components/q2-editable-field/q2-editable-field.js +2 -2
  73. package/dist/collection/components/q2-example/q2-example.js +1 -1
  74. package/dist/collection/components/q2-form/q2-form.js +1 -1
  75. package/dist/collection/components/q2-formatted-text/q2-formatted-text.js +1 -1
  76. package/dist/collection/components/q2-grid/q2-grid.js +31 -31
  77. package/dist/collection/components/q2-grid-area/q2-grid-area.js +43 -43
  78. package/dist/collection/components/q2-input/q2-input.js +3 -3
  79. package/dist/collection/components/q2-item/q2-item.js +1 -1
  80. package/dist/collection/components/q2-legend/q2-legend.js +1 -1
  81. package/dist/collection/components/q2-list/q2-list.js +1 -1
  82. package/dist/collection/components/q2-message/q2-message.js +1 -1
  83. package/dist/collection/components/q2-meter/q2-meter.js +1 -1
  84. package/dist/collection/components/q2-modal/q2-modal.js +1 -1
  85. package/dist/collection/components/q2-mutation-observer/q2-mutation-observer.js +1 -1
  86. package/dist/collection/components/q2-optgroup/q2-optgroup.js +1 -1
  87. package/dist/collection/components/q2-option-list/q2-option-list.js +6 -6
  88. package/dist/collection/components/q2-pagination/q2-pagination.js +3 -3
  89. package/dist/collection/components/q2-pill/q2-pill.js +1 -1
  90. package/dist/collection/components/q2-popover/q2-popover.js +40 -13
  91. package/dist/collection/components/q2-popover/q2-popover.js.map +1 -1
  92. package/dist/collection/components/q2-radio/q2-radio.js +1 -1
  93. package/dist/collection/components/q2-radio-group/q2-radio-group.js +1 -1
  94. package/dist/collection/components/q2-relative-time/q2-relative-time.js +1 -1
  95. package/dist/collection/components/q2-resize-observer/q2-resize-observer.js +1 -1
  96. package/dist/collection/components/q2-section/q2-section.js +2 -2
  97. package/dist/collection/components/q2-select/q2-select.js +1 -1
  98. package/dist/collection/components/q2-stepper/q2-stepper.js +1 -1
  99. package/dist/collection/components/q2-stepper-pane/q2-stepper-pane.js +1 -1
  100. package/dist/collection/components/q2-textarea/q2-textarea.js +1 -1
  101. package/dist/components/q2-action-group2.js +1 -1
  102. package/dist/components/q2-action-sheet.js +1 -1
  103. package/dist/components/q2-avatar2.js +1 -1
  104. package/dist/components/q2-btn2.js +4 -2
  105. package/dist/components/q2-btn2.js.map +1 -1
  106. package/dist/components/q2-calendar.js +1 -1
  107. package/dist/components/q2-card-image.js +2 -2
  108. package/dist/components/q2-carousel-pane.js +2 -2
  109. package/dist/components/q2-carousel.js +1 -1
  110. package/dist/components/q2-chart-area.js +1 -1
  111. package/dist/components/q2-chart-bar.js +1 -1
  112. package/dist/components/q2-chart-donut.js +1 -1
  113. package/dist/components/q2-checkbox-group.js +1 -1
  114. package/dist/components/q2-checkbox2.js +1 -1
  115. package/dist/components/q2-context.js +1 -1
  116. package/dist/components/q2-currency.js +1 -1
  117. package/dist/components/q2-data-table.js +1 -1
  118. package/dist/components/q2-detail.js +1 -1
  119. package/dist/components/q2-dropdown.js +1 -1
  120. package/dist/components/q2-editable-field.js +1 -1
  121. package/dist/components/q2-example.js +1 -1
  122. package/dist/components/q2-form.js +1 -1
  123. package/dist/components/q2-formatted-text.js +1 -1
  124. package/dist/components/q2-grid-area.js +1 -1
  125. package/dist/components/q2-grid.js +1 -1
  126. package/dist/components/q2-input2.js +1 -1
  127. package/dist/components/q2-item2.js +1 -1
  128. package/dist/components/q2-legend2.js +1 -1
  129. package/dist/components/q2-list2.js +1 -1
  130. package/dist/components/q2-message2.js +1 -1
  131. package/dist/components/q2-meter.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-mutation-observer.js +1 -1
  135. package/dist/components/q2-optgroup2.js +1 -1
  136. package/dist/components/q2-option-list2.js +1 -1
  137. package/dist/components/q2-pagination.js +3 -3
  138. package/dist/components/q2-pill.js +1 -1
  139. package/dist/components/q2-popover2.js +40 -13
  140. package/dist/components/q2-popover2.js.map +1 -1
  141. package/dist/components/q2-radio-group.js +1 -1
  142. package/dist/components/q2-radio.js +1 -1
  143. package/dist/components/q2-relative-time.js +1 -1
  144. package/dist/components/q2-resize-observer2.js +1 -1
  145. package/dist/components/q2-section.js +2 -2
  146. package/dist/components/q2-select2.js +1 -1
  147. package/dist/components/q2-stepper-pane.js +1 -1
  148. package/dist/components/q2-stepper.js +1 -1
  149. package/dist/components/q2-textarea.js +1 -1
  150. package/dist/esm/click-elsewhere.q2-option-list.q2-popover.entry.js.map +1 -1
  151. package/dist/esm/click-elsewhere_3.entry.js +41 -14
  152. package/dist/esm/click-elsewhere_3.entry.js.map +1 -1
  153. package/dist/esm/q2-action-group_2.entry.js +2 -2
  154. package/dist/esm/q2-action-sheet.entry.js +1 -1
  155. package/dist/esm/q2-avatar.entry.js +1 -1
  156. package/dist/esm/q2-btn.q2-loading.entry.js.map +1 -1
  157. package/dist/esm/q2-btn_2.entry.js +4 -2
  158. package/dist/esm/q2-btn_2.entry.js.map +1 -1
  159. package/dist/esm/q2-calendar.entry.js +1 -1
  160. package/dist/esm/q2-card-image.entry.js +2 -2
  161. package/dist/esm/q2-carousel-pane.entry.js +2 -2
  162. package/dist/esm/q2-carousel.entry.js +1 -1
  163. package/dist/esm/q2-chart-area.entry.js +1 -1
  164. package/dist/esm/q2-chart-bar.entry.js +1 -1
  165. package/dist/esm/q2-chart-donut.entry.js +1 -1
  166. package/dist/esm/q2-checkbox-group.entry.js +1 -1
  167. package/dist/esm/q2-checkbox_2.entry.js +1 -1
  168. package/dist/esm/q2-context.entry.js +1 -1
  169. package/dist/esm/q2-currency.entry.js +1 -1
  170. package/dist/esm/q2-data-table.entry.js +1 -1
  171. package/dist/esm/q2-detail.entry.js +1 -1
  172. package/dist/esm/q2-dropdown.entry.js +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-form.entry.js +1 -1
  176. package/dist/esm/q2-formatted-text.entry.js +1 -1
  177. package/dist/esm/q2-grid-area.entry.js +1 -1
  178. package/dist/esm/q2-grid.entry.js +1 -1
  179. package/dist/esm/q2-input.entry.js +1 -1
  180. package/dist/esm/q2-item.entry.js +1 -1
  181. package/dist/esm/q2-legend.entry.js +1 -1
  182. package/dist/esm/q2-link_2.entry.js +1 -1
  183. package/dist/esm/q2-message.entry.js +1 -1
  184. package/dist/esm/q2-meter.entry.js +1 -1
  185. package/dist/esm/q2-modal.entry.js +1 -1
  186. package/dist/esm/q2-month-picker.entry.js +2 -2
  187. package/dist/esm/q2-mutation-observer.entry.js +1 -1
  188. package/dist/esm/q2-optgroup.entry.js +1 -1
  189. package/dist/esm/q2-pagination.entry.js +3 -3
  190. package/dist/esm/q2-pill.entry.js +1 -1
  191. package/dist/esm/q2-radio-group.entry.js +1 -1
  192. package/dist/esm/q2-radio.entry.js +1 -1
  193. package/dist/esm/q2-relative-time.entry.js +1 -1
  194. package/dist/esm/q2-section.entry.js +2 -2
  195. package/dist/esm/q2-select.entry.js +1 -1
  196. package/dist/esm/q2-stepper-pane.entry.js +1 -1
  197. package/dist/esm/q2-stepper.entry.js +1 -1
  198. package/dist/esm/q2-textarea.entry.js +1 -1
  199. package/dist/q2-tecton-elements/click-elsewhere.q2-option-list.q2-popover.entry.esm.js.map +1 -1
  200. package/dist/q2-tecton-elements/click-elsewhere_3.entry.js +212 -193
  201. package/dist/q2-tecton-elements/click-elsewhere_3.entry.js.map +1 -1
  202. package/dist/q2-tecton-elements/q2-action-group_2.entry.js +4 -4
  203. package/dist/q2-tecton-elements/q2-action-sheet.entry.js +8 -8
  204. package/dist/q2-tecton-elements/q2-avatar.entry.js +8 -8
  205. package/dist/q2-tecton-elements/q2-btn.q2-loading.entry.esm.js.map +1 -1
  206. package/dist/q2-tecton-elements/q2-btn_2.entry.js +4 -2
  207. package/dist/q2-tecton-elements/q2-btn_2.entry.js.map +1 -1
  208. package/dist/q2-tecton-elements/q2-calendar.entry.js +2 -2
  209. package/dist/q2-tecton-elements/q2-card-image.entry.js +2 -2
  210. package/dist/q2-tecton-elements/q2-carousel-pane.entry.js +3 -3
  211. package/dist/q2-tecton-elements/q2-carousel.entry.js +1 -1
  212. package/dist/q2-tecton-elements/q2-chart-area.entry.js +2 -2
  213. package/dist/q2-tecton-elements/q2-chart-bar.entry.js +2 -2
  214. package/dist/q2-tecton-elements/q2-chart-donut.entry.js +14 -14
  215. package/dist/q2-tecton-elements/q2-checkbox-group.entry.js +6 -6
  216. package/dist/q2-tecton-elements/q2-checkbox_2.entry.js +8 -8
  217. package/dist/q2-tecton-elements/q2-context.entry.js +15 -15
  218. package/dist/q2-tecton-elements/q2-currency.entry.js +11 -11
  219. package/dist/q2-tecton-elements/q2-data-table.entry.js +3 -3
  220. package/dist/q2-tecton-elements/q2-detail.entry.js +3 -3
  221. package/dist/q2-tecton-elements/q2-dropdown.entry.js +79 -79
  222. package/dist/q2-tecton-elements/q2-editable-field.entry.js +1 -1
  223. package/dist/q2-tecton-elements/q2-example.entry.js +1 -1
  224. package/dist/q2-tecton-elements/q2-form.entry.js +2 -2
  225. package/dist/q2-tecton-elements/q2-formatted-text.entry.js +2 -2
  226. package/dist/q2-tecton-elements/q2-grid-area.entry.js +2 -2
  227. package/dist/q2-tecton-elements/q2-grid.entry.js +3 -3
  228. package/dist/q2-tecton-elements/q2-input.entry.js +3 -3
  229. package/dist/q2-tecton-elements/q2-item.entry.js +21 -21
  230. package/dist/q2-tecton-elements/q2-legend.entry.js +2 -2
  231. package/dist/q2-tecton-elements/q2-link_2.entry.js +6 -6
  232. package/dist/q2-tecton-elements/q2-message.entry.js +6 -6
  233. package/dist/q2-tecton-elements/q2-meter.entry.js +7 -7
  234. package/dist/q2-tecton-elements/q2-modal.entry.js +50 -50
  235. package/dist/q2-tecton-elements/q2-month-picker.entry.js +66 -66
  236. package/dist/q2-tecton-elements/q2-mutation-observer.entry.js +1 -1
  237. package/dist/q2-tecton-elements/q2-optgroup.entry.js +4 -4
  238. package/dist/q2-tecton-elements/q2-pagination.entry.js +19 -19
  239. package/dist/q2-tecton-elements/q2-pill.entry.js +36 -36
  240. package/dist/q2-tecton-elements/q2-radio-group.entry.js +6 -6
  241. package/dist/q2-tecton-elements/q2-radio.entry.js +8 -8
  242. package/dist/q2-tecton-elements/q2-relative-time.entry.js +1 -1
  243. package/dist/q2-tecton-elements/q2-section.entry.js +22 -22
  244. package/dist/q2-tecton-elements/q2-select.entry.js +1 -1
  245. package/dist/q2-tecton-elements/q2-stepper-pane.entry.js +11 -11
  246. package/dist/q2-tecton-elements/q2-stepper.entry.js +25 -25
  247. package/dist/q2-tecton-elements/q2-textarea.entry.js +2 -2
  248. package/dist/types/components/q2-popover/q2-popover.d.ts +1 -0
  249. package/dist/types/components/q2-stepper-vertical/q2-stepper-vertical.d.ts +1 -1
  250. package/package.json +71 -69
  251. /package/dist/types/{Users/kvanhouten/Documents/Work/tecton_extra → builds/q2e/development/tecton/tecton}/packages/q2-tecton-elements/.stencil/jest.e2e-coverage.d.ts +0 -0
  252. /package/dist/types/{Users/kvanhouten/Documents/Work/tecton_extra → builds/q2e/development/tecton/tecton}/packages/q2-tecton-elements/.stencil/jest.setup.d.ts +0 -0
  253. /package/dist/types/{Users/kvanhouten/Documents/Work/tecton_extra → builds/q2e/development/tecton/tecton}/packages/q2-tecton-elements/.stencil/scripts/docs-generator/index.d.ts +0 -0
  254. /package/dist/types/{Users/kvanhouten/Documents/Work/tecton_extra → builds/q2e/development/tecton/tecton}/packages/q2-tecton-elements/.stencil/scripts/docs-generator/markdown-generator.d.ts +0 -0
  255. /package/dist/types/{Users/kvanhouten/Documents/Work/tecton_extra → builds/q2e/development/tecton/tecton}/packages/q2-tecton-elements/.stencil/scripts/docs-generator/tag-handlers.d.ts +0 -0
  256. /package/dist/types/{Users/kvanhouten/Documents/Work/tecton_extra → builds/q2e/development/tecton/tecton}/packages/q2-tecton-elements/.stencil/scripts/docs-generator/types.d.ts +0 -0
@@ -668,7 +668,7 @@ const Q2OptionList = class {
668
668
  // #endregion
669
669
  // #region Render Methods
670
670
  render() {
671
- return (h(Host, { key: '05e3dbeb1ffe4910f7c3c922311f51e0e34a4771' }, h("div", { key: '152c7430207325f6d6bcb6b5253c61528f9338eb', class: "content", ref: el => (this.contentElement = el), onFocusout: this.focusoutHandler }, h("div", { key: 'd94b9d6fe8fe5221b44c59424351cd2fa4e2139b', class: "options", "aria-label": loc('tecton.element.optionList.label', [this.label]), "aria-multiselectable": this.type === 'menu' ? undefined : `${!!this.multiple}`, role: this.type || 'listbox', onKeyDown: this.internalKeydownHandler, onClick: this.clickHandler }, h("slot", { key: 'c655e10092d73bdeb985ee08776024c5dbd6fc96' })))));
671
+ return (h(Host, { key: '99c8a52ef8c6adbd138bdd4ff40340fabe670903' }, h("div", { key: '632777fab876b3ef838e8658de35df410fc1d3b7', class: "content", ref: el => (this.contentElement = el), onFocusout: this.focusoutHandler }, h("div", { key: '97079fcb63d10e57ae3e3f1fcbc0a4c307dcda3c', class: "options", "aria-label": loc('tecton.element.optionList.label', [this.label]), "aria-multiselectable": this.type === 'menu' ? undefined : `${!!this.multiple}`, role: this.type || 'listbox', onKeyDown: this.internalKeydownHandler, onClick: this.clickHandler }, h("slot", { key: '07f07e638defb8427f320db9bf3cfb87f6711f9e' })))));
672
672
  }
673
673
  get hostElement() { return getElement(this); }
674
674
  static get watchers() { return {
@@ -690,6 +690,7 @@ const Q2Popover = class {
690
690
  */
691
691
  this.displayBuffer = 10;
692
692
  this.orientationChanged = false;
693
+ this.pendingAnimationResolve = null;
693
694
  // #endregion
694
695
  // #region State Properties
695
696
  this.animationState = 'idle';
@@ -717,6 +718,8 @@ const Q2Popover = class {
717
718
  };
718
719
  this.setAbsoluteCSSProperties = async () => {
719
720
  const { controlElement, containerElement, currentDirection, align } = this;
721
+ if (!containerElement)
722
+ return;
720
723
  if (align === 'right') {
721
724
  containerElement.style.setProperty('--comp-pop-right', '0');
722
725
  containerElement.style.setProperty('--comp-pop-left', 'unset');
@@ -737,11 +740,14 @@ const Q2Popover = class {
737
740
  }
738
741
  // Wait for one paint to prevent layout thrashing
739
742
  await waitForNextPaint();
740
- containerElement.style.setProperty('--comp-pop-opacity', '1');
743
+ if (this.containerElement)
744
+ containerElement.style.setProperty('--comp-pop-opacity', '1');
741
745
  };
742
746
  this.setPopoverAPICSSProperties = async () => {
743
747
  var _a, _b, _c;
744
748
  const { controlElement, containerElement, currentDirection, isModule, align } = this;
749
+ if (!containerElement)
750
+ return;
745
751
  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 : {
746
752
  top: 0,
747
753
  bottom: 0,
@@ -779,7 +785,8 @@ const Q2Popover = class {
779
785
  }
780
786
  // Wait for one paint to prevent layout thrashing
781
787
  await waitForNextPaint();
782
- containerElement.style.setProperty('--comp-pop-opacity', '1');
788
+ if (this.containerElement)
789
+ containerElement.style.setProperty('--comp-pop-opacity', '1');
783
790
  };
784
791
  this.viewPortChanged = () => {
785
792
  if (!this.open)
@@ -794,8 +801,13 @@ const Q2Popover = class {
794
801
  // #endregion
795
802
  // #region Component Lifecycle Events
796
803
  disconnectedCallback() {
804
+ var _a;
797
805
  this.removeViewportListeners();
798
- this.containerElement.removeEventListener('toggle', this.handlePopoverToggleEvent);
806
+ if (this.pendingAnimationResolve) {
807
+ this.pendingAnimationResolve();
808
+ this.pendingAnimationResolve = null;
809
+ }
810
+ (_a = this.containerElement) === null || _a === void 0 ? void 0 : _a.removeEventListener('toggle', this.handlePopoverToggleEvent);
799
811
  this.containerElement = null;
800
812
  this.contentElement = null;
801
813
  this.controlElement = null;
@@ -807,9 +819,10 @@ const Q2Popover = class {
807
819
  }
808
820
  }
809
821
  componentDidLoad() {
822
+ var _a;
810
823
  this.handleMinHeight();
811
824
  if (this.supportsPopoverAPI)
812
- this.containerElement.addEventListener('toggle', this.handlePopoverToggleEvent);
825
+ (_a = this.containerElement) === null || _a === void 0 ? void 0 : _a.addEventListener('toggle', this.handlePopoverToggleEvent);
813
826
  if (this.open)
814
827
  this.determinePopDirection();
815
828
  }
@@ -825,7 +838,8 @@ const Q2Popover = class {
825
838
  // #endregion
826
839
  // #region Public Methods API
827
840
  async scrollContainerTo(options) {
828
- this.containerElement.scrollTo(options);
841
+ var _a;
842
+ (_a = this.containerElement) === null || _a === void 0 ? void 0 : _a.scrollTo(options);
829
843
  }
830
844
  async toggle() {
831
845
  this.open = !this.open;
@@ -848,17 +862,25 @@ const Q2Popover = class {
848
862
  // Wait for close animation to complete
849
863
  if (this.animated) {
850
864
  await new Promise(resolve => {
865
+ var _a;
851
866
  const handleAnimationEnd = () => {
852
- this.containerElement.removeEventListener('animationend', handleAnimationEnd);
867
+ var _a;
868
+ this.pendingAnimationResolve = null;
869
+ (_a = this.containerElement) === null || _a === void 0 ? void 0 : _a.removeEventListener('animationend', handleAnimationEnd);
853
870
  resolve();
854
871
  };
855
- this.containerElement.addEventListener('animationend', handleAnimationEnd);
872
+ this.pendingAnimationResolve = handleAnimationEnd;
873
+ (_a = this.containerElement) === null || _a === void 0 ? void 0 : _a.addEventListener('animationend', handleAnimationEnd);
874
+ if (!this.containerElement)
875
+ resolve();
856
876
  });
857
877
  }
858
878
  else {
859
879
  // No animation, proceed immediately
860
880
  await waitForNextPaint();
861
881
  }
882
+ if (!this.containerElement)
883
+ return;
862
884
  this.currentDirection = undefined;
863
885
  this.animationState = 'idle';
864
886
  if (this.mode === 'legacy' || !this.supportsPopoverAPI) {
@@ -907,6 +929,8 @@ const Q2Popover = class {
907
929
  window.addEventListener('orientationchange', this.viewPortOrientationChanged);
908
930
  }
909
931
  clearCSSProperties() {
932
+ if (!this.containerElement)
933
+ return;
910
934
  this.containerElement.style.removeProperty('--comp-pop-max-height');
911
935
  this.containerElement.style.removeProperty('--comp-pop-top');
912
936
  this.containerElement.style.removeProperty('--comp-pop-bottom');
@@ -921,6 +945,8 @@ const Q2Popover = class {
921
945
  if (containerElement)
922
946
  containerElement.style.maxHeight = null;
923
947
  await waitForNextPaint();
948
+ if (!this.containerElement)
949
+ return;
924
950
  const { isModule } = this;
925
951
  const { top: controlTop, bottom: controlBottom } = (_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 : {
926
952
  top: 0,
@@ -953,13 +979,13 @@ const Q2Popover = class {
953
979
  }
954
980
  const directionWithMostSpace = maxSpaceAbove > maxSpaceBelow ? 'up' : 'down';
955
981
  // We do not want to update the max height once the popover is open unless the page orientation shifts (resize or mobile use cases)
956
- const shouldUpdateMaxHeight = !containerElement.style.getPropertyValue('--comp-pop-max-height') || this.orientationChanged;
982
+ const shouldUpdateMaxHeight = !(containerElement === null || containerElement === void 0 ? void 0 : containerElement.style.getPropertyValue('--comp-pop-max-height')) || this.orientationChanged;
957
983
  // we do not want to constantly update the max-height after an orientation change, so we switch this back to false
958
984
  this.orientationChanged = false;
959
985
  const currentOrDetermineDirection = this.currentDirection || providedDirection || directionWithMostSpace;
960
986
  switch (currentOrDetermineDirection) {
961
987
  case 'up':
962
- if (shouldUpdateMaxHeight) {
988
+ if (shouldUpdateMaxHeight && containerElement) {
963
989
  const priorityMaxHeight = this.validatedMaxHeight || maxSpaceAbove;
964
990
  const maxHeight = Math.min(maxSpaceAbove, priorityMaxHeight);
965
991
  containerElement.style.setProperty('--comp-pop-max-height', `${maxHeight}px`);
@@ -967,7 +993,7 @@ const Q2Popover = class {
967
993
  this.setDirectionAndShow('up');
968
994
  break;
969
995
  case 'down':
970
- if (shouldUpdateMaxHeight) {
996
+ if (shouldUpdateMaxHeight && containerElement) {
971
997
  const priorityMaxHeight = this.validatedMaxHeight || maxSpaceBelow;
972
998
  const maxHeight = Math.min(maxSpaceBelow, priorityMaxHeight);
973
999
  containerElement.style.setProperty('--comp-pop-max-height', `${maxHeight}px`);
@@ -985,10 +1011,11 @@ const Q2Popover = class {
985
1011
  window.removeEventListener('orientationchange', this.viewPortOrientationChanged);
986
1012
  }
987
1013
  setDirectionAndShow(direction) {
1014
+ var _a;
988
1015
  // Due to some runtime inconsistency across devices/browsers we need to add one more check here because the
989
1016
  // popover can be closed between the time the popover is opened and the time the direction is determined
990
1017
  const isOpen = this.open;
991
- if (!isOpen)
1018
+ if (!isOpen || !this.containerElement)
992
1019
  return;
993
1020
  this.currentDirection = direction;
994
1021
  if (this.mode === 'legacy' || !this.supportsPopoverAPI) {
@@ -997,7 +1024,7 @@ const Q2Popover = class {
997
1024
  }
998
1025
  else {
999
1026
  this.setPopoverAPICSSProperties();
1000
- this.containerElement.showPopover();
1027
+ (_a = this.containerElement) === null || _a === void 0 ? void 0 : _a.showPopover();
1001
1028
  }
1002
1029
  }
1003
1030
  // #endregion
@@ -1016,7 +1043,7 @@ const Q2Popover = class {
1016
1043
  containerClasses.push('animating-open');
1017
1044
  if (this.animated && this.animationState === 'closing')
1018
1045
  containerClasses.push('animating-close');
1019
- return (h("div", { key: 'b5166478bf50c313679ce71b381e6fe305e03446', ref: el => (this.containerElement = el), class: containerClasses.join(' '), "test-id": "outerContainer", tabIndex: -1, popover: "manual" }, h("div", { key: '9e939ece2775d98418f726066c9e7b1e7dcb7fde', ref: el => (this.contentElement = el), class: "content" }, h("slot", { key: 'dc16dc214cf71f050e49057f6f35271bb141b692' }))));
1046
+ return (h("div", { key: '779d18b2765abec3eff0f19ca297b01356a06a7d', ref: el => (this.containerElement = el), class: containerClasses.join(' '), "test-id": "outerContainer", tabIndex: -1, popover: "manual" }, h("div", { key: '47eb4c1420bbc63f821333c03804c1843363f946', ref: el => (this.contentElement = el), class: "content" }, h("slot", { key: '8554a334fd61f07cf712e2bdbe797f7835878469' }))));
1020
1047
  }
1021
1048
  get hostElement() { return getElement(this); }
1022
1049
  static get watchers() { return {