q2-tecton-elements 1.46.1 → 1.46.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (342) hide show
  1. package/dist/cjs/click-elsewhere_2.cjs.entry.js +80 -38
  2. package/dist/cjs/click-elsewhere_2.cjs.entry.js.map +1 -1
  3. package/dist/cjs/{index-0e15dc8d.js → index-d1633d7b.js} +33 -1
  4. package/dist/cjs/index-d1633d7b.js.map +1 -0
  5. package/dist/cjs/{index-59fb7c74.js → index-f69742cf.js} +1 -1
  6. package/dist/cjs/{index-59fb7c74.js.map → index-f69742cf.js.map} +1 -1
  7. package/dist/cjs/loader.cjs.js +1 -1
  8. package/dist/cjs/q2-action-sheet.cjs.entry.js +2 -2
  9. package/dist/cjs/q2-avatar.cjs.entry.js +1 -1
  10. package/dist/cjs/q2-btn_2.cjs.entry.js +1 -1
  11. package/dist/cjs/q2-calendar.cjs.entry.js +3 -3
  12. package/dist/cjs/q2-card.cjs.entry.js +1 -1
  13. package/dist/cjs/q2-carousel-pane.cjs.entry.js +3 -3
  14. package/dist/cjs/q2-carousel.cjs.entry.js +2 -2
  15. package/dist/cjs/q2-chart-area.cjs.entry.js +2 -2
  16. package/dist/cjs/q2-chart-bar.cjs.entry.js +2 -2
  17. package/dist/cjs/q2-chart-donut.cjs.entry.js +2 -2
  18. package/dist/cjs/q2-checkbox-group.cjs.entry.js +2 -2
  19. package/dist/cjs/q2-checkbox.cjs.entry.js +2 -2
  20. package/dist/cjs/q2-currency.cjs.entry.js +1 -1
  21. package/dist/cjs/q2-data-table.cjs.entry.js +2 -2
  22. package/dist/cjs/q2-detail.cjs.entry.js +2 -2
  23. package/dist/cjs/q2-dropdown-item.cjs.entry.js +1 -1
  24. package/dist/cjs/q2-dropdown.cjs.entry.js +4 -2
  25. package/dist/cjs/q2-dropdown.cjs.entry.js.map +1 -1
  26. package/dist/cjs/q2-editable-field.cjs.entry.js +2 -2
  27. package/dist/cjs/q2-icon.cjs.entry.js +1 -1
  28. package/dist/cjs/q2-input.cjs.entry.js +2 -2
  29. package/dist/cjs/q2-item.cjs.entry.js +2 -2
  30. package/dist/cjs/q2-item.cjs.entry.js.map +1 -1
  31. package/dist/cjs/q2-legend.cjs.entry.js +1 -1
  32. package/dist/cjs/q2-list.cjs.entry.js +2 -2
  33. package/dist/cjs/q2-loc.cjs.entry.js +2 -2
  34. package/dist/cjs/q2-message.cjs.entry.js +2 -2
  35. package/dist/cjs/q2-month-picker.cjs.entry.js +3 -3
  36. package/dist/cjs/q2-optgroup.cjs.entry.js +2 -2
  37. package/dist/cjs/q2-option-list.cjs.entry.js +2 -2
  38. package/dist/cjs/q2-option.cjs.entry.js +1 -1
  39. package/dist/cjs/q2-pagination.cjs.entry.js +3 -3
  40. package/dist/cjs/q2-pill.cjs.entry.js +2 -2
  41. package/dist/cjs/q2-radio-group.cjs.entry.js +2 -2
  42. package/dist/cjs/q2-radio.cjs.entry.js +2 -2
  43. package/dist/cjs/q2-relative-time.cjs.entry.js +2 -2
  44. package/dist/cjs/q2-section.cjs.entry.js +3 -3
  45. package/dist/cjs/q2-select.cjs.entry.js +101 -9
  46. package/dist/cjs/q2-select.cjs.entry.js.map +1 -1
  47. package/dist/cjs/q2-stepper-pane.cjs.entry.js +2 -2
  48. package/dist/cjs/q2-stepper-vertical.cjs.entry.js +1 -1
  49. package/dist/cjs/q2-stepper.cjs.entry.js +2 -2
  50. package/dist/cjs/q2-tab-container.cjs.entry.js +1 -1
  51. package/dist/cjs/q2-tag.cjs.entry.js +1 -1
  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/collection/collection-manifest.json +5 -5
  56. package/dist/collection/components/q2-action-sheet/q2-action-sheet.js +1 -1
  57. package/dist/collection/components/q2-avatar/q2-avatar.js +1 -1
  58. package/dist/collection/components/q2-calendar/q2-calendar.js +1 -1
  59. package/dist/collection/components/q2-calendar/q2-month-picker.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-currency/q2-currency.js +1 -1
  68. package/dist/collection/components/q2-data-table/q2-data-table.js +7 -7
  69. package/dist/collection/components/q2-detail/q2-detail.js +1 -1
  70. package/dist/collection/components/q2-dropdown/q2-dropdown.js +3 -1
  71. package/dist/collection/components/q2-dropdown/q2-dropdown.js.map +1 -1
  72. package/dist/collection/components/q2-editable-field/q2-editable-field.js +2 -2
  73. package/dist/collection/components/q2-input/q2-input.js +2 -2
  74. package/dist/collection/components/q2-item/q2-item.js +1 -1
  75. package/dist/collection/components/q2-item/q2-item.js.map +1 -1
  76. package/dist/collection/components/q2-legend/q2-legend.js +1 -1
  77. package/dist/collection/components/q2-list/q2-list.js +1 -1
  78. package/dist/collection/components/q2-loc/q2-loc.js +1 -1
  79. package/dist/collection/components/q2-message/q2-message.js +1 -1
  80. package/dist/collection/components/q2-optgroup/q2-optgroup.js +1 -1
  81. package/dist/collection/components/q2-option/q2-option.js +1 -1
  82. package/dist/collection/components/q2-option-list/q2-option-list.js +4 -4
  83. package/dist/collection/components/q2-pagination/q2-pagination.js +2 -2
  84. package/dist/collection/components/q2-pill/q2-pill.js +1 -1
  85. package/dist/collection/components/q2-popover/q2-popover.css +19 -11
  86. package/dist/collection/components/q2-popover/q2-popover.js +81 -38
  87. package/dist/collection/components/q2-popover/q2-popover.js.map +1 -1
  88. package/dist/collection/components/q2-radio/q2-radio.js +1 -1
  89. package/dist/collection/components/q2-radio-group/q2-radio-group.js +1 -1
  90. package/dist/collection/components/q2-relative-time/q2-relative-time.js +1 -1
  91. package/dist/collection/components/q2-section/q2-section.js +2 -2
  92. package/dist/collection/components/q2-select/q2-select.js +109 -10
  93. package/dist/collection/components/q2-select/q2-select.js.map +1 -1
  94. package/dist/collection/components/q2-stepper/q2-stepper.js +1 -1
  95. package/dist/collection/components/q2-stepper-pane/q2-stepper-pane.js +3 -3
  96. package/dist/collection/components/q2-textarea/q2-textarea.js +1 -1
  97. package/dist/collection/utils/index.js +31 -0
  98. package/dist/collection/utils/index.js.map +1 -1
  99. package/dist/components/index2.js +32 -1
  100. package/dist/components/index2.js.map +1 -1
  101. package/dist/components/q2-action-sheet.js +1 -1
  102. package/dist/components/q2-avatar2.js +1 -1
  103. package/dist/components/q2-calendar.js +1 -1
  104. package/dist/components/q2-carousel-pane.js +2 -2
  105. package/dist/components/q2-carousel.js +1 -1
  106. package/dist/components/q2-chart-area.js +1 -1
  107. package/dist/components/q2-chart-bar.js +1 -1
  108. package/dist/components/q2-chart-donut.js +1 -1
  109. package/dist/components/q2-checkbox-group.js +1 -1
  110. package/dist/components/q2-checkbox2.js +1 -1
  111. package/dist/components/q2-currency.js +1 -1
  112. package/dist/components/q2-data-table.js +1 -1
  113. package/dist/components/q2-detail.js +1 -1
  114. package/dist/components/q2-dropdown.js +3 -1
  115. package/dist/components/q2-dropdown.js.map +1 -1
  116. package/dist/components/q2-editable-field.js +1 -1
  117. package/dist/components/q2-input2.js +1 -1
  118. package/dist/components/q2-item.js +1 -1
  119. package/dist/components/q2-item.js.map +1 -1
  120. package/dist/components/q2-legend2.js +1 -1
  121. package/dist/components/q2-list.js +1 -1
  122. package/dist/components/q2-loc.js +1 -1
  123. package/dist/components/q2-message2.js +1 -1
  124. package/dist/components/q2-month-picker.js +2 -2
  125. package/dist/components/q2-optgroup2.js +1 -1
  126. package/dist/components/q2-option-list2.js +1 -1
  127. package/dist/components/q2-option2.js +1 -1
  128. package/dist/components/q2-pagination.js +2 -2
  129. package/dist/components/q2-pill.js +1 -1
  130. package/dist/components/q2-popover2.js +80 -38
  131. package/dist/components/q2-popover2.js.map +1 -1
  132. package/dist/components/q2-radio-group.js +1 -1
  133. package/dist/components/q2-radio.js +1 -1
  134. package/dist/components/q2-relative-time.js +1 -1
  135. package/dist/components/q2-section.js +2 -2
  136. package/dist/components/q2-select2.js +102 -10
  137. package/dist/components/q2-select2.js.map +1 -1
  138. package/dist/components/q2-stepper-pane.js +1 -1
  139. package/dist/components/q2-stepper.js +1 -1
  140. package/dist/components/q2-textarea.js +1 -1
  141. package/dist/esm/click-elsewhere_2.entry.js +80 -38
  142. package/dist/esm/click-elsewhere_2.entry.js.map +1 -1
  143. package/dist/esm/{index-c99c4cc6.js → index-3184c760.js} +1 -1
  144. package/dist/esm/{index-c99c4cc6.js.map → index-3184c760.js.map} +1 -1
  145. package/dist/esm/{index-0a702dd6.js → index-bcdf5800.js} +33 -2
  146. package/dist/esm/index-bcdf5800.js.map +1 -0
  147. package/dist/esm/loader.js +1 -1
  148. package/dist/esm/q2-action-sheet.entry.js +2 -2
  149. package/dist/esm/q2-avatar.entry.js +1 -1
  150. package/dist/esm/q2-btn_2.entry.js +1 -1
  151. package/dist/esm/q2-calendar.entry.js +3 -3
  152. package/dist/esm/q2-card.entry.js +1 -1
  153. package/dist/esm/q2-carousel-pane.entry.js +3 -3
  154. package/dist/esm/q2-carousel.entry.js +2 -2
  155. package/dist/esm/q2-chart-area.entry.js +2 -2
  156. package/dist/esm/q2-chart-bar.entry.js +2 -2
  157. package/dist/esm/q2-chart-donut.entry.js +2 -2
  158. package/dist/esm/q2-checkbox-group.entry.js +2 -2
  159. package/dist/esm/q2-checkbox.entry.js +2 -2
  160. package/dist/esm/q2-currency.entry.js +1 -1
  161. package/dist/esm/q2-data-table.entry.js +2 -2
  162. package/dist/esm/q2-detail.entry.js +2 -2
  163. package/dist/esm/q2-dropdown-item.entry.js +1 -1
  164. package/dist/esm/q2-dropdown.entry.js +4 -2
  165. package/dist/esm/q2-dropdown.entry.js.map +1 -1
  166. package/dist/esm/q2-editable-field.entry.js +2 -2
  167. package/dist/esm/q2-icon.entry.js +1 -1
  168. package/dist/esm/q2-input.entry.js +2 -2
  169. package/dist/esm/q2-item.entry.js +2 -2
  170. package/dist/esm/q2-item.entry.js.map +1 -1
  171. package/dist/esm/q2-legend.entry.js +1 -1
  172. package/dist/esm/q2-list.entry.js +2 -2
  173. package/dist/esm/q2-loc.entry.js +2 -2
  174. package/dist/esm/q2-message.entry.js +2 -2
  175. package/dist/esm/q2-month-picker.entry.js +3 -3
  176. package/dist/esm/q2-optgroup.entry.js +2 -2
  177. package/dist/esm/q2-option-list.entry.js +2 -2
  178. package/dist/esm/q2-option.entry.js +1 -1
  179. package/dist/esm/q2-pagination.entry.js +3 -3
  180. package/dist/esm/q2-pill.entry.js +2 -2
  181. package/dist/esm/q2-radio-group.entry.js +2 -2
  182. package/dist/esm/q2-radio.entry.js +2 -2
  183. package/dist/esm/q2-relative-time.entry.js +2 -2
  184. package/dist/esm/q2-section.entry.js +3 -3
  185. package/dist/esm/q2-select.entry.js +101 -9
  186. package/dist/esm/q2-select.entry.js.map +1 -1
  187. package/dist/esm/q2-stepper-pane.entry.js +2 -2
  188. package/dist/esm/q2-stepper-vertical.entry.js +1 -1
  189. package/dist/esm/q2-stepper.entry.js +2 -2
  190. package/dist/esm/q2-tab-container.entry.js +1 -1
  191. package/dist/esm/q2-tag.entry.js +1 -1
  192. package/dist/esm/q2-tecton-elements.js +1 -1
  193. package/dist/esm/q2-textarea.entry.js +2 -2
  194. package/dist/esm/q2-tooltip.entry.js +1 -1
  195. package/dist/jest.setup.js +33 -0
  196. package/dist/jest.setup.js.map +1 -0
  197. package/dist/q2-tecton-elements/{p-79df783e.entry.js → p-03352b21.entry.js} +2 -2
  198. package/dist/q2-tecton-elements/{p-0bc47914.entry.js → p-06857d9c.entry.js} +2 -2
  199. package/dist/q2-tecton-elements/{p-85003c5b.entry.js → p-09b5a6b9.entry.js} +2 -2
  200. package/dist/q2-tecton-elements/{p-d635e39f.entry.js → p-0f0bf0c8.entry.js} +2 -2
  201. package/dist/q2-tecton-elements/p-0fefcb1d.entry.js +2 -0
  202. package/dist/q2-tecton-elements/p-0fefcb1d.entry.js.map +1 -0
  203. package/dist/q2-tecton-elements/{p-0e482a7c.entry.js → p-149044cd.entry.js} +2 -2
  204. package/dist/q2-tecton-elements/{p-16891e51.entry.js → p-15348da5.entry.js} +2 -2
  205. package/dist/q2-tecton-elements/{p-d60ccf2f.entry.js → p-185c79e0.entry.js} +2 -2
  206. package/dist/q2-tecton-elements/{p-4f2dfb4d.entry.js → p-1c11d59b.entry.js} +2 -2
  207. package/dist/q2-tecton-elements/{p-12326313.entry.js → p-1dc6ecb5.entry.js} +2 -2
  208. package/dist/q2-tecton-elements/{p-bf32fd9c.entry.js → p-1ebe32e2.entry.js} +2 -2
  209. package/dist/q2-tecton-elements/{p-aec64fcb.entry.js → p-21a2e5ad.entry.js} +2 -2
  210. package/dist/q2-tecton-elements/{p-47868d6d.entry.js → p-21e676e1.entry.js} +2 -2
  211. package/dist/q2-tecton-elements/{p-f45b3488.entry.js → p-29724a1a.entry.js} +2 -2
  212. package/dist/q2-tecton-elements/{p-18ec54c0.entry.js → p-312135cd.entry.js} +2 -2
  213. package/dist/q2-tecton-elements/{p-be101dcf.entry.js → p-3cbf95af.entry.js} +2 -2
  214. package/dist/q2-tecton-elements/{p-ced89010.entry.js → p-3dff9fb0.entry.js} +2 -2
  215. package/dist/q2-tecton-elements/{p-bc141c5b.entry.js → p-3fc1e94e.entry.js} +2 -2
  216. package/dist/q2-tecton-elements/{p-e27a23fc.entry.js → p-4bfec601.entry.js} +2 -2
  217. package/dist/q2-tecton-elements/{p-ca7ad3c3.entry.js → p-579b3ea1.entry.js} +2 -2
  218. package/dist/q2-tecton-elements/{p-245ad08f.entry.js → p-5a786cd9.entry.js} +2 -2
  219. package/dist/q2-tecton-elements/{p-fe3c62e0.entry.js → p-5cc62aae.entry.js} +2 -2
  220. package/dist/q2-tecton-elements/{p-97a98211.entry.js → p-632e1e0c.entry.js} +2 -2
  221. package/dist/q2-tecton-elements/{p-ca0d7eb3.entry.js → p-6468801f.entry.js} +2 -2
  222. package/dist/q2-tecton-elements/{p-81b76d40.entry.js → p-6968b5f5.entry.js} +2 -2
  223. package/dist/q2-tecton-elements/{p-d8fba914.entry.js → p-6a988acf.entry.js} +2 -2
  224. package/dist/q2-tecton-elements/{p-ac9414a6.entry.js → p-7be88140.entry.js} +2 -2
  225. package/dist/q2-tecton-elements/{p-4194d6ed.entry.js → p-837ae97f.entry.js} +2 -2
  226. package/dist/q2-tecton-elements/{p-65ed80a5.entry.js → p-873d6333.entry.js} +2 -2
  227. package/dist/q2-tecton-elements/p-8ba6e825.js +2 -0
  228. package/dist/q2-tecton-elements/p-8ba6e825.js.map +1 -0
  229. package/dist/q2-tecton-elements/{p-515d424b.entry.js → p-8c5fdf44.entry.js} +2 -2
  230. package/dist/q2-tecton-elements/{p-2a248a3f.entry.js → p-8e0c36e3.entry.js} +2 -2
  231. package/dist/q2-tecton-elements/{p-57bf9342.entry.js → p-911a4540.entry.js} +2 -2
  232. package/dist/q2-tecton-elements/{p-2c57a367.entry.js → p-9b200726.entry.js} +2 -2
  233. package/dist/q2-tecton-elements/p-9ccfa476.entry.js +2 -0
  234. package/dist/q2-tecton-elements/p-9ccfa476.entry.js.map +1 -0
  235. package/dist/q2-tecton-elements/{p-2132da06.entry.js → p-a39898b8.entry.js} +2 -2
  236. package/dist/q2-tecton-elements/{p-f1265647.entry.js → p-c8850fd8.entry.js} +2 -2
  237. package/dist/q2-tecton-elements/{p-32e57e9f.entry.js → p-c9946cd4.entry.js} +2 -2
  238. package/dist/q2-tecton-elements/p-c9946cd4.entry.js.map +1 -0
  239. package/dist/q2-tecton-elements/{p-dc057a9c.entry.js → p-da06a34d.entry.js} +2 -2
  240. package/dist/q2-tecton-elements/{p-aed969d4.entry.js → p-e654d2d6.entry.js} +2 -2
  241. package/dist/q2-tecton-elements/{p-4570ff06.entry.js → p-f09ab575.entry.js} +2 -2
  242. package/dist/q2-tecton-elements/{p-6559c942.js → p-f1e887f5.js} +1 -1
  243. package/dist/q2-tecton-elements/p-fa332463.entry.js +2 -0
  244. package/dist/q2-tecton-elements/{p-ef441885.entry.js.map → p-fa332463.entry.js.map} +1 -1
  245. package/dist/q2-tecton-elements/{p-f2251261.entry.js → p-fdfbe122.entry.js} +2 -2
  246. package/dist/q2-tecton-elements/{p-e762526f.entry.js → p-fe6db5c3.entry.js} +2 -2
  247. package/dist/q2-tecton-elements/{p-dd670d63.entry.js → p-ffbdd4c8.entry.js} +2 -2
  248. package/dist/q2-tecton-elements/q2-tecton-elements.esm.js +1 -1
  249. package/dist/q2-tecton-elements/q2-tecton-elements.esm.js.map +1 -1
  250. package/dist/test/elements/q2-calendar-test.e2e.js +2 -2
  251. package/dist/test/elements/q2-calendar-test.e2e.js.map +1 -1
  252. package/dist/test/elements/q2-dropdown-test.e2e.js +2 -14
  253. package/dist/test/elements/q2-dropdown-test.e2e.js.map +1 -1
  254. package/dist/test/elements/q2-pagination-test.e2e.js +2 -1
  255. package/dist/test/elements/q2-pagination-test.e2e.js.map +1 -1
  256. package/dist/test/elements/q2-pill-test.e2e.js +1 -1
  257. package/dist/test/elements/q2-pill-test.e2e.js.map +1 -1
  258. package/dist/test/elements/q2-popover-test.e2e.js +1 -34
  259. package/dist/test/elements/q2-popover-test.e2e.js.map +1 -1
  260. package/dist/test/elements/q2-popover-test.spec.js +896 -374
  261. package/dist/test/elements/q2-popover-test.spec.js.map +1 -1
  262. package/dist/test/elements/q2-select-test.e2e.js +1 -1
  263. package/dist/test/elements/q2-select-test.e2e.js.map +1 -1
  264. package/dist/test/elements/q2-select-test.spec.js +552 -0
  265. package/dist/test/elements/q2-select-test.spec.js.map +1 -0
  266. package/dist/test/elements/q2-tag-test.e2e.js +1 -1
  267. package/dist/test/elements/q2-tag-test.e2e.js.map +1 -1
  268. package/dist/types/builds/q2e/development/tecton/tecton/packages/q2-tecton-elements/.stencil/jest.setup.d.ts +10 -0
  269. package/dist/types/components/q2-action-sheet/q2-action-sheet.d.ts +60 -0
  270. package/dist/types/components/q2-calendar/q2-calendar.d.ts +324 -0
  271. package/dist/types/components/q2-carousel/q2-carousel.d.ts +2 -2
  272. package/dist/types/components/q2-data-table/q2-data-table.d.ts +221 -0
  273. package/dist/types/components/q2-dropdown/q2-dropdown.d.ts +130 -0
  274. package/dist/types/components/q2-dropdown-item/q2-dropdown-item.d.ts +45 -0
  275. package/dist/types/components/q2-editable-field/q2-editable-field.d.ts +136 -0
  276. package/dist/types/components/q2-loading/skeleton/shapes.d.ts +1 -0
  277. package/dist/types/components/q2-optgroup/q2-optgroup.d.ts +1 -1
  278. package/dist/types/components/q2-option-list/q2-option-list.d.ts +99 -0
  279. package/dist/types/components/q2-pagination/q2-pagination.d.ts +60 -0
  280. package/dist/types/components/q2-pill/q2-pill.d.ts +102 -0
  281. package/dist/types/components/q2-popover/q2-popover.d.ts +5 -3
  282. package/dist/types/components/q2-select/q2-select.d.ts +242 -0
  283. package/dist/types/components/q2-stepper/q2-stepper.d.ts +52 -0
  284. package/dist/types/components/q2-stepper-vertical/q2-stepper-vertical.d.ts +62 -0
  285. package/dist/types/components/q2-tab-container/q2-tab-container.d.ts +2 -2
  286. package/dist/types/components/q2-tag/q2-tag.d.ts +59 -0
  287. package/dist/types/utils/action-sheet.d.ts +12 -0
  288. package/dist/types/utils/index.d.ts +1 -0
  289. package/package.json +4 -4
  290. package/dist/cjs/index-0e15dc8d.js.map +0 -1
  291. package/dist/esm/index-0a702dd6.js.map +0 -1
  292. package/dist/q2-tecton-elements/p-32e57e9f.entry.js.map +0 -1
  293. package/dist/q2-tecton-elements/p-36398b59.entry.js +0 -2
  294. package/dist/q2-tecton-elements/p-36398b59.entry.js.map +0 -1
  295. package/dist/q2-tecton-elements/p-42302f6f.js +0 -2
  296. package/dist/q2-tecton-elements/p-42302f6f.js.map +0 -1
  297. package/dist/q2-tecton-elements/p-ca7dad64.entry.js +0 -2
  298. package/dist/q2-tecton-elements/p-ca7dad64.entry.js.map +0 -1
  299. package/dist/q2-tecton-elements/p-ef441885.entry.js +0 -2
  300. /package/dist/q2-tecton-elements/{p-79df783e.entry.js.map → p-03352b21.entry.js.map} +0 -0
  301. /package/dist/q2-tecton-elements/{p-0bc47914.entry.js.map → p-06857d9c.entry.js.map} +0 -0
  302. /package/dist/q2-tecton-elements/{p-85003c5b.entry.js.map → p-09b5a6b9.entry.js.map} +0 -0
  303. /package/dist/q2-tecton-elements/{p-d635e39f.entry.js.map → p-0f0bf0c8.entry.js.map} +0 -0
  304. /package/dist/q2-tecton-elements/{p-0e482a7c.entry.js.map → p-149044cd.entry.js.map} +0 -0
  305. /package/dist/q2-tecton-elements/{p-16891e51.entry.js.map → p-15348da5.entry.js.map} +0 -0
  306. /package/dist/q2-tecton-elements/{p-d60ccf2f.entry.js.map → p-185c79e0.entry.js.map} +0 -0
  307. /package/dist/q2-tecton-elements/{p-4f2dfb4d.entry.js.map → p-1c11d59b.entry.js.map} +0 -0
  308. /package/dist/q2-tecton-elements/{p-12326313.entry.js.map → p-1dc6ecb5.entry.js.map} +0 -0
  309. /package/dist/q2-tecton-elements/{p-bf32fd9c.entry.js.map → p-1ebe32e2.entry.js.map} +0 -0
  310. /package/dist/q2-tecton-elements/{p-aec64fcb.entry.js.map → p-21a2e5ad.entry.js.map} +0 -0
  311. /package/dist/q2-tecton-elements/{p-47868d6d.entry.js.map → p-21e676e1.entry.js.map} +0 -0
  312. /package/dist/q2-tecton-elements/{p-f45b3488.entry.js.map → p-29724a1a.entry.js.map} +0 -0
  313. /package/dist/q2-tecton-elements/{p-18ec54c0.entry.js.map → p-312135cd.entry.js.map} +0 -0
  314. /package/dist/q2-tecton-elements/{p-be101dcf.entry.js.map → p-3cbf95af.entry.js.map} +0 -0
  315. /package/dist/q2-tecton-elements/{p-ced89010.entry.js.map → p-3dff9fb0.entry.js.map} +0 -0
  316. /package/dist/q2-tecton-elements/{p-bc141c5b.entry.js.map → p-3fc1e94e.entry.js.map} +0 -0
  317. /package/dist/q2-tecton-elements/{p-e27a23fc.entry.js.map → p-4bfec601.entry.js.map} +0 -0
  318. /package/dist/q2-tecton-elements/{p-ca7ad3c3.entry.js.map → p-579b3ea1.entry.js.map} +0 -0
  319. /package/dist/q2-tecton-elements/{p-245ad08f.entry.js.map → p-5a786cd9.entry.js.map} +0 -0
  320. /package/dist/q2-tecton-elements/{p-fe3c62e0.entry.js.map → p-5cc62aae.entry.js.map} +0 -0
  321. /package/dist/q2-tecton-elements/{p-97a98211.entry.js.map → p-632e1e0c.entry.js.map} +0 -0
  322. /package/dist/q2-tecton-elements/{p-ca0d7eb3.entry.js.map → p-6468801f.entry.js.map} +0 -0
  323. /package/dist/q2-tecton-elements/{p-81b76d40.entry.js.map → p-6968b5f5.entry.js.map} +0 -0
  324. /package/dist/q2-tecton-elements/{p-d8fba914.entry.js.map → p-6a988acf.entry.js.map} +0 -0
  325. /package/dist/q2-tecton-elements/{p-ac9414a6.entry.js.map → p-7be88140.entry.js.map} +0 -0
  326. /package/dist/q2-tecton-elements/{p-4194d6ed.entry.js.map → p-837ae97f.entry.js.map} +0 -0
  327. /package/dist/q2-tecton-elements/{p-65ed80a5.entry.js.map → p-873d6333.entry.js.map} +0 -0
  328. /package/dist/q2-tecton-elements/{p-515d424b.entry.js.map → p-8c5fdf44.entry.js.map} +0 -0
  329. /package/dist/q2-tecton-elements/{p-2a248a3f.entry.js.map → p-8e0c36e3.entry.js.map} +0 -0
  330. /package/dist/q2-tecton-elements/{p-57bf9342.entry.js.map → p-911a4540.entry.js.map} +0 -0
  331. /package/dist/q2-tecton-elements/{p-2c57a367.entry.js.map → p-9b200726.entry.js.map} +0 -0
  332. /package/dist/q2-tecton-elements/{p-2132da06.entry.js.map → p-a39898b8.entry.js.map} +0 -0
  333. /package/dist/q2-tecton-elements/{p-f1265647.entry.js.map → p-c8850fd8.entry.js.map} +0 -0
  334. /package/dist/q2-tecton-elements/{p-dc057a9c.entry.js.map → p-da06a34d.entry.js.map} +0 -0
  335. /package/dist/q2-tecton-elements/{p-aed969d4.entry.js.map → p-e654d2d6.entry.js.map} +0 -0
  336. /package/dist/q2-tecton-elements/{p-4570ff06.entry.js.map → p-f09ab575.entry.js.map} +0 -0
  337. /package/dist/q2-tecton-elements/{p-6559c942.js.map → p-f1e887f5.js.map} +0 -0
  338. /package/dist/q2-tecton-elements/{p-f2251261.entry.js.map → p-fdfbe122.entry.js.map} +0 -0
  339. /package/dist/q2-tecton-elements/{p-e762526f.entry.js.map → p-fe6db5c3.entry.js.map} +0 -0
  340. /package/dist/q2-tecton-elements/{p-dd670d63.entry.js.map → p-ffbdd4c8.entry.js.map} +0 -0
  341. /package/dist/types/{workspace/workspace/tecton-production_release_1.46.x → builds/q2e/development/tecton/tecton}/packages/q2-tecton-elements/.stencil/test/elements/q2-detail/slot-component.d.ts +0 -0
  342. /package/dist/types/{workspace/workspace/tecton-production_release_1.46.x → builds/q2e/development/tecton/tecton}/packages/q2-tecton-elements/.stencil/test/helpers.d.ts +0 -0
@@ -1,12 +1,11 @@
1
1
  import { h, } from "@stencil/core";
2
- import { handleDeprecationWarning, waitForNextPaint } from "../../utils";
2
+ import { handleDeprecationWarning, waitForNextPaint, isMobile, isInScrollableContainer } from "../../utils";
3
3
  export class Q2Popover {
4
4
  constructor() {
5
5
  /**
6
6
  * The number of pixels to leave between the popover and the edge of the viewport
7
7
  */
8
8
  this.displayBuffer = 10;
9
- /** remove when Popover API is supported in iOS */
10
9
  this.orientationChanged = false;
11
10
  /// Helpers ///
12
11
  this.handleMinHeight = () => {
@@ -14,6 +13,9 @@ export class Q2Popover {
14
13
  handleDeprecationWarning(this, 'minHeight', 'prop');
15
14
  }
16
15
  };
16
+ this.handlePopoverToggleEvent = (event) => {
17
+ this.popoverStateChanged.emit({ open: event.newState === 'open' });
18
+ };
17
19
  this.viewPortChanged = () => {
18
20
  if (!this.open)
19
21
  return;
@@ -23,9 +25,9 @@ export class Q2Popover {
23
25
  this.orientationChanged = true;
24
26
  this.viewPortChanged();
25
27
  };
26
- this.setFixedCSSProperties = async () => {
27
- var _a, _b;
28
- const { controlElement, containerElement, currentDirection } = this;
28
+ this.setPopoverAPICSSProperties = async () => {
29
+ var _a, _b, _c, _d, _e, _f;
30
+ const { controlElement, containerElement, currentDirection, isModule, align } = this;
29
31
  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 : {
30
32
  top: 0,
31
33
  bottom: 0,
@@ -33,16 +35,32 @@ export class Q2Popover {
33
35
  right: 0,
34
36
  };
35
37
  const popoverLeft = controlLeft;
36
- const popoverRight = window.visualViewport.width - controlRight;
38
+ const popoverRight = ((_c = window === null || window === void 0 ? void 0 : window.visualViewport) === null || _c === void 0 ? void 0 : _c.width) - controlRight;
39
+ if (align === 'right') {
40
+ containerElement.style.setProperty('--comp-pop-right', `${popoverRight - window.scrollX}px`);
41
+ containerElement.style.setProperty('--comp-pop-left', 'unset');
42
+ }
43
+ else {
44
+ containerElement.style.setProperty('--comp-pop-left', `${popoverLeft + window.scrollX}px`);
45
+ containerElement.style.setProperty('--comp-pop-right', 'unset');
46
+ }
37
47
  if (this.block)
38
- containerElement.style.setProperty('--comp-pop-width', `${controlElement.offsetWidth || 0}px`);
39
- containerElement.style.setProperty('--comp-pop-left', `${popoverLeft}px`);
40
- containerElement.style.setProperty('--comp-pop-right', `${popoverRight}px`);
48
+ containerElement.style.setProperty('--comp-pop-width', `${(controlElement === null || controlElement === void 0 ? void 0 : controlElement.offsetWidth) || 0}px`);
41
49
  if (currentDirection === 'up') {
42
- containerElement.style.setProperty('--comp-pop-bottom', `${window.visualViewport.height - controlTop}px`);
50
+ if (isModule) {
51
+ containerElement.style.setProperty('--comp-pop-bottom', `${window.innerHeight - controlTop}px`);
52
+ }
53
+ else {
54
+ containerElement.style.setProperty('--comp-pop-bottom', `${window.innerHeight - controlTop - ((_d = window === null || window === void 0 ? void 0 : window.visualViewport) === null || _d === void 0 ? void 0 : _d.offsetTop) - window.scrollY}px`);
55
+ }
43
56
  }
44
57
  if (currentDirection === 'down') {
45
- containerElement.style.setProperty('--comp-pop-top', `${controlBottom}px`);
58
+ if (isModule) {
59
+ containerElement.style.setProperty('--comp-pop-top', `${controlBottom}px`);
60
+ }
61
+ else {
62
+ containerElement.style.setProperty('--comp-pop-top', `${controlBottom + ((_f = (_e = window === null || window === void 0 ? void 0 : window.visualViewport) === null || _e === void 0 ? void 0 : _e.offsetTop) !== null && _f !== void 0 ? _f : 0) + window.scrollY}px`);
63
+ }
46
64
  }
47
65
  // Wait for one paint to prevent layout thrashing
48
66
  await waitForNextPaint();
@@ -73,7 +91,7 @@ export class Q2Popover {
73
91
  containerElement.style.setProperty('--comp-pop-opacity', '1');
74
92
  };
75
93
  this.direction = undefined;
76
- this.align = undefined;
94
+ this.align = 'left';
77
95
  this.open = undefined;
78
96
  this.block = undefined;
79
97
  this.controlElement = undefined;
@@ -83,13 +101,25 @@ export class Q2Popover {
83
101
  this.show = false;
84
102
  }
85
103
  /// Lifecycle hooks ///
104
+ componentWillLoad() {
105
+ if (!this.supportsPopoverAPI) {
106
+ 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.');
107
+ this.mode = 'legacy';
108
+ }
109
+ }
86
110
  componentDidLoad() {
87
111
  this.handleMinHeight();
112
+ if (this.supportsPopoverAPI)
113
+ this.containerElement.addEventListener('toggle', this.handlePopoverToggleEvent);
88
114
  if (this.open)
89
115
  this.determinePopDirection();
90
116
  }
91
117
  disconnectedCallback() {
92
118
  this.removeViewportListeners();
119
+ this.containerElement.removeEventListener('toggle', this.handlePopoverToggleEvent);
120
+ this.containerElement = null;
121
+ this.contentElement = null;
122
+ this.controlElement = null;
93
123
  }
94
124
  /// Methods ///
95
125
  async toggle() {
@@ -108,7 +138,12 @@ export class Q2Popover {
108
138
  else {
109
139
  this.removeViewportListeners();
110
140
  this.currentDirection = undefined;
111
- this.show = false;
141
+ if (this.mode === 'legacy' || !this.supportsPopoverAPI) {
142
+ this.show = false;
143
+ }
144
+ else {
145
+ this.containerElement.hidePopover();
146
+ }
112
147
  await waitForNextPaint();
113
148
  this.clearCSSProperties();
114
149
  }
@@ -125,7 +160,7 @@ export class Q2Popover {
125
160
  event.stopPropagation();
126
161
  }
127
162
  /// Getters ///
128
- get actualDirection() {
163
+ get providedDirection() {
129
164
  const { direction } = this;
130
165
  switch (direction) {
131
166
  case 'up':
@@ -141,23 +176,26 @@ export class Q2Popover {
141
176
  const hasPlatformDimensions = Object.keys((_b = (_a = window.Tecton) === null || _a === void 0 ? void 0 : _a.platformDimensions) !== null && _b !== void 0 ? _b : {}).length > 0;
142
177
  return isIframe && hasPlatformDimensions;
143
178
  }
179
+ get supportsPopoverAPI() {
180
+ return Object.hasOwn(HTMLElement.prototype, 'popover');
181
+ }
144
182
  addViewportListeners() {
145
183
  var _a;
146
184
  window.addEventListener('resize', this.viewPortOrientationChanged);
147
- // #region remove when Popover API is supported in iOS
148
- window.addEventListener('scroll', this.viewPortChanged, { passive: true, capture: true });
149
- (_a = screen === null || screen === void 0 ? void 0 : screen.orientation) === null || _a === void 0 ? void 0 : _a.addEventListener('change', this.viewPortOrientationChanged);
185
+ visualViewport === null || visualViewport === void 0 ? void 0 : visualViewport.addEventListener('resize', this.viewPortChanged);
186
+ if (isInScrollableContainer(this.hostElement) && !isMobile()) {
187
+ window.addEventListener('scroll', this.viewPortChanged, { passive: true, capture: true });
188
+ }
189
+ (_a = screen === null || screen === void 0 ? void 0 : screen.orientation) === null || _a === void 0 ? void 0 : _a.addEventListener('orientationchange', this.viewPortOrientationChanged);
150
190
  window.addEventListener('orientationchange', this.viewPortOrientationChanged);
151
- // #endregion
152
191
  }
153
192
  removeViewportListeners() {
154
193
  var _a;
155
194
  window.removeEventListener('resize', this.viewPortOrientationChanged);
156
- // #region remove when Popover API is supported in iOS
195
+ visualViewport === null || visualViewport === void 0 ? void 0 : visualViewport.removeEventListener('resize', this.viewPortChanged);
157
196
  window.removeEventListener('scroll', this.viewPortChanged);
158
197
  (_a = screen === null || screen === void 0 ? void 0 : screen.orientation) === null || _a === void 0 ? void 0 : _a.removeEventListener('orientationchange', this.viewPortOrientationChanged);
159
198
  window.removeEventListener('orientationchange', this.viewPortOrientationChanged);
160
- // #endregion
161
199
  }
162
200
  clearCSSProperties() {
163
201
  this.containerElement.style.removeProperty('--comp-pop-max-height');
@@ -175,17 +213,18 @@ export class Q2Popover {
175
213
  if (!isOpen)
176
214
  return;
177
215
  this.currentDirection = direction;
178
- this.show = true;
179
- if (this.mode === 'legacy') {
216
+ if (this.mode === 'legacy' || !this.supportsPopoverAPI) {
217
+ this.show = true;
180
218
  this.setAbsoluteCSSProperties();
181
219
  }
182
220
  else {
183
- this.setFixedCSSProperties();
221
+ this.setPopoverAPICSSProperties();
222
+ this.containerElement.showPopover();
184
223
  }
185
224
  }
186
225
  async determinePopDirection() {
187
226
  var _a, _b, _c;
188
- const { containerElement, controlElement, actualDirection, displayBuffer } = this;
227
+ const { containerElement, controlElement, providedDirection, displayBuffer } = this;
189
228
  if (containerElement)
190
229
  containerElement.style.maxHeight = null;
191
230
  await waitForNextPaint();
@@ -198,22 +237,23 @@ export class Q2Popover {
198
237
  let maxSpaceAbove;
199
238
  let maxSpaceBelow;
200
239
  if (isModule) {
201
- const platformDimensions = (_c = window.Tecton) === null || _c === void 0 ? void 0 : _c.platformDimensions;
202
- const distanceToIframeBottom = window.visualViewport.height - controlBottom;
203
- const viewableSpaceBelow = platformDimensions.innerHeight - (platformDimensions.outletOffset + controlBottom);
240
+ const { outletOffset = 0, innerHeight = window.innerHeight, top: topBarHeight = 0, bottom: bottomBarHeight = 0, } = ((_c = window.Tecton) === null || _c === void 0 ? void 0 : _c.platformDimensions) || {};
241
+ const distanceToIframeBottom = window.innerHeight - controlBottom;
242
+ // controlElement position visually on the page
243
+ const visualControlTop = outletOffset > 0 ? controlTop : controlTop + outletOffset - topBarHeight;
244
+ const visualControlBottom = outletOffset + controlBottom - topBarHeight;
245
+ // visual space around the controlElement
246
+ const viewableSpaceAbove = visualControlTop;
247
+ const viewableSpaceBelow = innerHeight - bottomBarHeight - visualControlBottom;
248
+ // calculate space above and below controlElement
204
249
  const isIframeShorterThanWindow = distanceToIframeBottom < viewableSpaceBelow;
205
- windowHeight = platformDimensions.innerHeight;
206
- // If the top of the module is below the top of the window we just use the controlTop
207
- // Otherwise we need to add the outletOffset to the controlTop
208
- maxSpaceAbove =
209
- (platformDimensions.outletOffset > 0 ? controlTop : controlTop + platformDimensions.outletOffset) -
210
- displayBuffer;
250
+ maxSpaceAbove = viewableSpaceAbove - displayBuffer;
211
251
  maxSpaceBelow = isIframeShorterThanWindow
212
252
  ? distanceToIframeBottom - displayBuffer
213
253
  : viewableSpaceBelow - displayBuffer;
214
254
  }
215
255
  else {
216
- windowHeight = window.visualViewport.height;
256
+ windowHeight = window.innerHeight;
217
257
  maxSpaceAbove = controlTop - displayBuffer;
218
258
  maxSpaceBelow = windowHeight - controlBottom - displayBuffer;
219
259
  }
@@ -222,7 +262,7 @@ export class Q2Popover {
222
262
  const shouldUpdateMaxHeight = !containerElement.style.getPropertyValue('--comp-pop-max-height') || this.orientationChanged;
223
263
  // we do not want to constantly update the max-height after an orientation change, so we switch this back to false
224
264
  this.orientationChanged = false;
225
- const currentOrDetermineDirection = this.currentDirection || actualDirection || directionWithMostSpace;
265
+ const currentOrDetermineDirection = this.currentDirection || providedDirection || directionWithMostSpace;
226
266
  switch (currentOrDetermineDirection) {
227
267
  case 'up':
228
268
  if (shouldUpdateMaxHeight) {
@@ -242,12 +282,14 @@ export class Q2Popover {
242
282
  }
243
283
  /// DOM ///
244
284
  render() {
245
- const containerClasses = ['container', this.currentDirection];
285
+ const containerClasses = ['container', this.currentDirection, this.align];
246
286
  if (this.show)
247
287
  containerClasses.push('show');
288
+ if (this.block)
289
+ containerClasses.push('block');
248
290
  if (this.mode === 'legacy')
249
291
  containerClasses.push('legacy');
250
- return (h("div", { key: 'e30d8c33a5c1ef22fe5721daa2b48e22118d2476', ref: el => (this.containerElement = el), class: containerClasses.join(' '), "test-id": "outerContainer" }, h("div", { key: 'b8e6bcc629445b9649498f491676baf73cd3957a', ref: el => (this.contentElement = el), class: "content" }, h("slot", { key: 'e6b3e6d397e471cb3d2ecaa534106fd04b74c41e' }))));
292
+ return (h("div", { key: 'cece9e9d32bd79d0d8ad20a69542a1a66dd29755', ref: el => (this.containerElement = el), class: containerClasses.join(' '), "test-id": "outerContainer", tabIndex: -1, popover: "manual" }, h("div", { key: '016f1d7424aa5e097809c5d13a1d0f6e07754b82', ref: el => (this.contentElement = el), class: "content" }, h("slot", { key: '9b5ab6bb51e1822a88348d28490704f7f920758d' }))));
251
293
  }
252
294
  static get is() { return "q2-popover"; }
253
295
  static get encapsulation() { return "shadow"; }
@@ -295,7 +337,8 @@ export class Q2Popover {
295
337
  "text": "Aligns the popover to the left or right side of the control element."
296
338
  },
297
339
  "attribute": "align",
298
- "reflect": true
340
+ "reflect": true,
341
+ "defaultValue": "'left'"
299
342
  },
300
343
  "open": {
301
344
  "type": "boolean",
@@ -1 +1 @@
1
- {"version":3,"file":"q2-popover.js","sourceRoot":"","sources":["../../../../src/components/q2-popover/q2-popover.tsx"],"names":[],"mappings":"AAAA,OAAO,EACH,SAAS,EACT,IAAI,EACJ,CAAC,EAED,OAAO,EACP,KAAK,EACL,MAAM,EACN,MAAM,EAEN,KAAK,EACL,KAAK,GACR,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,wBAAwB,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAGzE,MAAM,OAAO,SAAS;;QAsClB;;WAEG;QACH,kBAAa,GAAG,EAAE,CAAC;QAEnB,kDAAkD;QAClD,uBAAkB,GAAY,KAAK,CAAC;QA2EpC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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 /**\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 }) direction: 'up' | 'down';\n\n /** Aligns the popover to the left or right side of the control element. */\n @Prop({ reflect: true }) align: 'left' | 'right';\n\n /** Controls whether the popover is open or closed. */\n @Prop({ reflect: true, mutable: true }) open: boolean;\n\n /** Indicates the popover will match the width of its parent element. */\n @Prop({ reflect: true }) block: boolean;\n\n /** The element that controls the popover's behavior. */\n @Prop() controlElement: HTMLElement;\n\n @Prop() mode: 'legacy' = null;\n\n /** @deprecated */\n @Prop() minHeight: number;\n\n @Element() hostElement: HTMLElement;\n\n /**\n * Emitted when the popover is opened or closed.\n */\n @Event() popoverStateChanged: EventEmitter<{ open: boolean }>;\n\n @State() currentDirection: 'down' | 'up' = undefined;\n // remove `show` when Popover API is supported in iOS\n @State() show: boolean = false;\n\n containerElement: HTMLDivElement;\n contentElement: HTMLDivElement;\n\n /**\n * The number of pixels to leave between the popover and the edge of the viewport\n */\n displayBuffer = 10;\n\n /** remove when Popover API is supported in iOS */\n orientationChanged: boolean = false;\n\n /// Lifecycle hooks ///\n componentDidLoad() {\n this.handleMinHeight();\n if (this.open) this.determinePopDirection();\n }\n\n disconnectedCallback() {\n this.removeViewportListeners();\n }\n\n /// Methods ///\n @Method()\n async toggle() {\n this.open = !this.open;\n }\n\n @Method()\n async scrollContainerTo(options: ScrollToOptions) {\n this.containerElement.scrollTo(options);\n }\n\n /// Watchers ///\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 this.show = false;\n await waitForNextPaint();\n this.clearCSSProperties();\n }\n }\n\n @Watch('minHeight')\n minHeightProvided() {\n this.handleMinHeight();\n }\n\n /// Listeners ///\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 /// Getters ///\n get actualDirection(): 'up' | 'down' | undefined {\n const { direction } = this;\n switch (direction) {\n case 'up':\n case 'down':\n return direction;\n default:\n return undefined;\n }\n }\n\n get isModule() {\n const isIframe = window !== window.top;\n const hasPlatformDimensions = Object.keys(window.Tecton?.platformDimensions ?? {}).length > 0;\n return isIframe && hasPlatformDimensions;\n }\n\n /// Helpers ///\n handleMinHeight = () => {\n if (this.minHeight) {\n handleDeprecationWarning(this, 'minHeight', 'prop');\n }\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 addViewportListeners() {\n window.addEventListener('resize', this.viewPortOrientationChanged);\n // #region remove when Popover API is supported in iOS\n window.addEventListener('scroll', this.viewPortChanged, { passive: true, capture: true });\n screen?.orientation?.addEventListener('change', this.viewPortOrientationChanged);\n window.addEventListener('orientationchange', this.viewPortOrientationChanged);\n // #endregion\n }\n\n removeViewportListeners() {\n window.removeEventListener('resize', this.viewPortOrientationChanged);\n // #region remove when Popover API is supported in iOS\n window.removeEventListener('scroll', this.viewPortChanged);\n screen?.orientation?.removeEventListener('orientationchange', this.viewPortOrientationChanged);\n window.removeEventListener('orientationchange', this.viewPortOrientationChanged);\n // #endregion\n }\n\n setFixedCSSProperties = async () => {\n const { controlElement, containerElement, currentDirection } = 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;\n const popoverRight: number = window.visualViewport.width - controlRight;\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('--comp-pop-right', `${popoverRight}px`);\n\n if (currentDirection === 'up') {\n containerElement.style.setProperty('--comp-pop-bottom', `${window.visualViewport.height - controlTop}px`);\n }\n if (currentDirection === 'down') {\n containerElement.style.setProperty('--comp-pop-top', `${controlBottom}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 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 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 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 this.show = true;\n if (this.mode === 'legacy') {\n this.setAbsoluteCSSProperties();\n } else {\n this.setFixedCSSProperties();\n }\n }\n\n async determinePopDirection() {\n const { containerElement, controlElement, actualDirection, displayBuffer } = this;\n if (containerElement) containerElement.style.maxHeight = null;\n\n await waitForNextPaint();\n\n const { isModule } = this;\n const { top: controlTop, bottom: controlBottom } = controlElement?.getBoundingClientRect?.() ?? {\n top: 0,\n bottom: 0,\n };\n\n let windowHeight: number;\n let maxSpaceAbove: number;\n let maxSpaceBelow: number;\n\n if (isModule) {\n const platformDimensions = window.Tecton?.platformDimensions;\n const distanceToIframeBottom = window.visualViewport.height - controlBottom;\n const viewableSpaceBelow =\n platformDimensions.innerHeight - (platformDimensions.outletOffset + controlBottom);\n const isIframeShorterThanWindow = distanceToIframeBottom < viewableSpaceBelow;\n windowHeight = platformDimensions.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 =\n (platformDimensions.outletOffset > 0 ? controlTop : controlTop + platformDimensions.outletOffset) -\n displayBuffer;\n maxSpaceBelow = isIframeShorterThanWindow\n ? distanceToIframeBottom - displayBuffer\n : viewableSpaceBelow - displayBuffer;\n } else {\n windowHeight = window.visualViewport.height;\n maxSpaceAbove = controlTop - displayBuffer;\n maxSpaceBelow = windowHeight - controlBottom - displayBuffer;\n }\n\n const directionWithMostSpace: 'up' | 'down' = maxSpaceAbove > maxSpaceBelow ? 'up' : 'down';\n\n // We do not want to update the max height once the popover is open unless the page orientation shifts (resize or mobile use cases)\n const shouldUpdateMaxHeight =\n !containerElement.style.getPropertyValue('--comp-pop-max-height') || this.orientationChanged;\n // we do not want to constantly update the max-height after an orientation change, so we switch this back to false\n this.orientationChanged = false;\n const currentOrDetermineDirection = this.currentDirection || actualDirection || directionWithMostSpace;\n\n switch (currentOrDetermineDirection) {\n case 'up':\n if (shouldUpdateMaxHeight) {\n containerElement.style.setProperty('--comp-pop-max-height', `${maxSpaceAbove}px`);\n }\n this.setDirectionAndShow('up');\n break;\n case 'down':\n if (shouldUpdateMaxHeight) {\n containerElement.style.setProperty('--comp-pop-max-height', `${maxSpaceBelow}px`);\n }\n this.setDirectionAndShow('down');\n break;\n default:\n break;\n }\n }\n\n /// DOM ///\n render() {\n const containerClasses = ['container', this.currentDirection];\n if (this.show) containerClasses.push('show');\n if (this.mode === 'legacy') containerClasses.push('legacy');\n\n return (\n <div\n ref={el => (this.containerElement = el)}\n class={containerClasses.join(' ')}\n test-id=\"outerContainer\"\n >\n <div\n ref={el => (this.contentElement = el)}\n class=\"content\"\n >\n <slot />\n </div>\n </div>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"q2-popover.js","sourceRoot":"","sources":["../../../../src/components/q2-popover/q2-popover.tsx"],"names":[],"mappings":"AAAA,OAAO,EACH,SAAS,EACT,IAAI,EACJ,CAAC,EAED,OAAO,EACP,KAAK,EACL,MAAM,EACN,MAAM,EAEN,KAAK,EACL,KAAK,GACR,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,wBAAwB,EAAE,gBAAgB,EAAE,QAAQ,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AAG5G,MAAM,OAAO,SAAS;;QAsClB;;WAEG;QACH,kBAAa,GAAG,EAAE,CAAC;QAEnB,uBAAkB,GAAY,KAAK,CAAC;QAkGpC,eAAe;QACf,oBAAe,GAAG,GAAG,EAAE;YACnB,IAAI,IAAI,CAAC,SAAS,EAAE,CAAC;gBACjB,wBAAwB,CAAC,IAAI,EAAE,WAAW,EAAE,MAAM,CAAC,CAAC;YACxD,CAAC;QACL,CAAC,CAAC;QAEF,6BAAwB,GAAG,CAAC,KAAkB,EAAE,EAAE;YAC9C,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,QAAQ,KAAK,MAAM,EAAE,CAAC,CAAC;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AAM,gBAAgB,GAAG,CAAC,WAAW,EAAE,IAAI,CAAC,gBAAgB,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;QAC1E,IAAI,IAAI,CAAC,IAAI;YAAE,gBAAgB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAC7C,IAAI,IAAI,CAAC,KAAK;YAAE,gBAAgB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC/C,IAAI,IAAI,CAAC,IAAI,KAAK,QAAQ;YAAE,gBAAgB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAE5D,OAAO,CACH,4DACI,GAAG,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,gBAAgB,GAAG,EAAE,CAAC,EACvC,KAAK,EAAE,gBAAgB,CAAC,IAAI,CAAC,GAAG,CAAC,aACzB,gBAAgB,EACxB,QAAQ,EAAE,CAAC,CAAC,EACZ,OAAO,EAAC,QAAQ;YAEhB,4DACI,GAAG,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,cAAc,GAAG,EAAE,CAAC,EACrC,KAAK,EAAC,SAAS;gBAEf,8DAAQ,CACN,CACJ,CACT,CAAC;IACN,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACJ","sourcesContent":["import {\n Component,\n Prop,\n h,\n ComponentInterface,\n Element,\n Watch,\n Method,\n Listen,\n EventEmitter,\n Event,\n State,\n} from '@stencil/core';\nimport { handleDeprecationWarning, waitForNextPaint, isMobile, isInScrollableContainer } from '../../utils';\n\n@Component({ tag: 'q2-popover', shadow: true, styleUrl: 'q2-popover.scss' })\nexport class Q2Popover implements ComponentInterface {\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 }) direction: 'up' | 'down';\n\n /** Aligns the popover to the left or right side of the control element. */\n @Prop({ reflect: true }) align: 'left' | 'right' = 'left';\n\n /** Controls whether the popover is open or closed. */\n @Prop({ reflect: true, mutable: true }) open: boolean;\n\n /** Indicates the popover will match the width of its parent element. */\n @Prop({ reflect: true }) block: boolean;\n\n /** The element that controls the popover's behavior. */\n @Prop() controlElement: HTMLElement;\n\n @Prop() mode: 'legacy' = null;\n\n /** @deprecated */\n @Prop() minHeight: number;\n\n @Element() hostElement: HTMLElement;\n\n /**\n * Emitted when the popover is opened or closed.\n */\n @Event() popoverStateChanged: EventEmitter<{ open: boolean }>;\n\n @State() currentDirection: 'down' | 'up' = undefined;\n // remove `show` when Popover API is supported in iOS\n @State() show: boolean = false;\n\n containerElement: HTMLDivElement;\n contentElement: HTMLDivElement;\n\n /**\n * The number of pixels to leave between the popover and the edge of the viewport\n */\n displayBuffer = 10;\n\n orientationChanged: boolean = false;\n\n /// Lifecycle hooks ///\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 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 /// Methods ///\n @Method()\n async toggle() {\n this.open = !this.open;\n }\n\n @Method()\n async scrollContainerTo(options: ScrollToOptions) {\n this.containerElement.scrollTo(options);\n }\n\n /// Watchers ///\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 @Watch('minHeight')\n minHeightProvided() {\n this.handleMinHeight();\n }\n\n /// Listeners ///\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 /// Getters ///\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 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 supportsPopoverAPI(): boolean {\n return Object.hasOwn(HTMLElement.prototype, 'popover');\n }\n\n /// Helpers ///\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 viewPortChanged = () => {\n if (!this.open) return;\n this.determinePopDirection();\n };\n\n viewPortOrientationChanged = () => {\n this.orientationChanged = true;\n this.viewPortChanged();\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 removeViewportListeners() {\n window.removeEventListener('resize', this.viewPortOrientationChanged);\n visualViewport?.removeEventListener('resize', this.viewPortChanged);\n window.removeEventListener('scroll', this.viewPortChanged);\n screen?.orientation?.removeEventListener('orientationchange', this.viewPortOrientationChanged);\n window.removeEventListener('orientationchange', this.viewPortOrientationChanged);\n }\n\n setPopoverAPICSSProperties = async () => {\n const { controlElement, containerElement, currentDirection, isModule, align } = this;\n const {\n top: controlTop,\n bottom: controlBottom,\n left: controlLeft,\n right: controlRight,\n } = controlElement?.getBoundingClientRect?.() ?? {\n top: 0,\n bottom: 0,\n left: 0,\n right: 0,\n };\n\n const popoverLeft: number = controlLeft;\n const popoverRight: number = window?.visualViewport?.width - controlRight;\n\n if (align === 'right') {\n containerElement.style.setProperty('--comp-pop-right', `${popoverRight - window.scrollX}px`);\n containerElement.style.setProperty('--comp-pop-left', 'unset');\n } else {\n containerElement.style.setProperty('--comp-pop-left', `${popoverLeft + window.scrollX}px`);\n containerElement.style.setProperty('--comp-pop-right', 'unset');\n }\n\n if (this.block) containerElement.style.setProperty('--comp-pop-width', `${controlElement?.offsetWidth || 0}px`);\n\n if (currentDirection === 'up') {\n if (isModule) {\n containerElement.style.setProperty('--comp-pop-bottom', `${window.innerHeight - controlTop}px`);\n } else {\n containerElement.style.setProperty(\n '--comp-pop-bottom',\n `${window.innerHeight - controlTop - window?.visualViewport?.offsetTop - window.scrollY}px`\n );\n }\n }\n\n if (currentDirection === 'down') {\n if (isModule) {\n containerElement.style.setProperty('--comp-pop-top', `${controlBottom}px`);\n } else {\n containerElement.style.setProperty(\n '--comp-pop-top',\n `${controlBottom + (window?.visualViewport?.offsetTop ?? 0) + window.scrollY}px`\n );\n }\n }\n\n // Wait for one paint to prevent layout thrashing\n await waitForNextPaint();\n containerElement.style.setProperty('--comp-pop-opacity', '1');\n };\n\n 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 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 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 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 containerElement.style.setProperty('--comp-pop-max-height', `${maxSpaceAbove}px`);\n }\n this.setDirectionAndShow('up');\n break;\n case 'down':\n if (shouldUpdateMaxHeight) {\n containerElement.style.setProperty('--comp-pop-max-height', `${maxSpaceBelow}px`);\n }\n this.setDirectionAndShow('down');\n break;\n default:\n break;\n }\n }\n\n /// DOM ///\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"]}
@@ -67,7 +67,7 @@ export class Q2Radio {
67
67
  }
68
68
  }
69
69
  render() {
70
- return (h("div", { key: '747de74f65700a44bec6fb7fbaf6e910685897e4', class: this.groupTileLayout ? 'radio-tile' : 'radio-container' }, h("input", { key: '4727b651cdc7e2fa095c8b4a1050463ef1aeca1d', ref: el => (this.inputField = el), class: "sr", id: this._id, type: "radio", name: this.name, value: this.value, disabled: this.disabled || this.groupDisabled, checked: this.checked, "aria-label": this.label && this.hideLabel ? loc(this.label) : undefined, onChange: this.inputChange, "test-id": "q2RadioInnerRadioBox" }), h("label", { key: 'bc37d7119b83407f93dabf4d75be15e3d31be876', htmlFor: this._id, class: this.hideLabel ? 'label-hidden' : undefined, "test-id": "radioButton" }, !this.groupTileLayout && (h("svg", { key: '197549ba1fcfe3d509a00f3c5e45f36fab4c4ff2', viewBox: "0 0 18 18" }, h("circle", { key: '206836e8921b866e27fadbdc8354b305acad2c0d', stroke: "none", fill: "none", cx: "9", cy: "9", r: "8" }), h("circle", { key: '50ef8f9239754be1d153df0e38bc55a663e0c12c', stroke: "none", fill: "none", cx: "9", cy: "9", r: "4" }))), !this.hideLabel && (h("div", { key: '5a2d36332cc8231daaa08eb5c3db99598d921f08', class: "label-content" }, (this.label && loc(this.label)) || '', h("slot", { key: '3b3b5c2e89a82092dc8b727e5cfc15609aaba27e' }))))));
70
+ return (h("div", { key: '11d52f8240d6022946c837b15afb173c44eb8962', class: this.groupTileLayout ? 'radio-tile' : 'radio-container' }, h("input", { key: '640bea7973f39132323acab2877d7995110c17d7', ref: el => (this.inputField = el), class: "sr", id: this._id, type: "radio", name: this.name, value: this.value, disabled: this.disabled || this.groupDisabled, checked: this.checked, "aria-label": this.label && this.hideLabel ? loc(this.label) : undefined, onChange: this.inputChange, "test-id": "q2RadioInnerRadioBox" }), h("label", { key: 'e198013184a88d97d76997c5f6e4c6c2784639b5', htmlFor: this._id, class: this.hideLabel ? 'label-hidden' : undefined, "test-id": "radioButton" }, !this.groupTileLayout && (h("svg", { key: 'cf8114adaf788f34a482c577c0f236e37d49e1ec', viewBox: "0 0 18 18" }, h("circle", { key: 'ccbd318974b142dc6bb8d86500c015bbb181bf6e', stroke: "none", fill: "none", cx: "9", cy: "9", r: "8" }), h("circle", { key: '07514318a21df53b3a85714b4a6e586ca2c5ad05', stroke: "none", fill: "none", cx: "9", cy: "9", r: "4" }))), !this.hideLabel && (h("div", { key: 'a77b401809a6a1f7adeb5f118efeaa2a238ebbf9', class: "label-content" }, (this.label && loc(this.label)) || '', h("slot", { key: '884d312374997e55428215c5f302b55dded2ed0f' }))))));
71
71
  }
72
72
  static get is() { return "q2-radio"; }
73
73
  static get encapsulation() { return "shadow"; }
@@ -154,7 +154,7 @@ export class Q2RadioGroup {
154
154
  const showLabel = this.label || this.optional || this.readonly;
155
155
  const { hasError } = this;
156
156
  const showLabelRow = showLabel || hasError;
157
- return (h(Fragment, { key: '5fc0ba8dc6df9631a891e6997e520e663671dbf8' }, showLabelRow && (h("div", { key: 'd65d48917b4dfa90b498467baf1b0d546f57df1b', class: "label-row" }, showLabel && h("div", { key: '43e5db86c270d7e0822c1683d1eca97cb64e72c2', class: "group-legend" }, labelDOM(this)), hasError && (h("q2-icon", { key: 'f57ca3a0da21160ac81d00cac3c85a069fd3d9e5', type: "error", "test-id": "iconError" })))), h("fieldset", { key: 'e85a89714c71b43670d392ba311d436a4c73038b', onChange: this.onInnerRadioChange, "aria-invalid": `${this.hasError}` }, showLabel && h("legend", { key: '701af7a401c2871f9cbc472ffa27edac8b3e109e', class: "sr" }, labelDOM(this)), this.inputDom())));
157
+ return (h(Fragment, { key: '89b900da542fcef23c5b83f79a5f9d0a94c46b94' }, showLabelRow && (h("div", { key: 'c8b042825052f086c86daeea2a4785a935e89669', class: "label-row" }, showLabel && h("div", { key: '0b76b8f8da79ef43aaaac6fb9dbd55deb98ae4f0', class: "group-legend" }, labelDOM(this)), hasError && (h("q2-icon", { key: '114c828a9a38c6e967f309a9cc33e36b81c6688f', type: "error", "test-id": "iconError" })))), h("fieldset", { key: '08ea4a163a783340e50f9cb7c89b30fb1cd1e8a7', onChange: this.onInnerRadioChange, "aria-invalid": `${this.hasError}` }, showLabel && h("legend", { key: '668f4d97c9b8e8056589260ebac95d060709f490', class: "sr" }, labelDOM(this)), this.inputDom())));
158
158
  }
159
159
  inputDom() {
160
160
  if (this.tileLayout) {
@@ -114,7 +114,7 @@ export class Q2RelativeTime {
114
114
  /// DOM ///
115
115
  render() {
116
116
  const { shouldShow, displayedMessage } = this;
117
- return h(Fragment, { key: '26e452a6b2cda738835ac8675aea30b50846920a' }, shouldShow ? h("time", { dateTime: displayedMessage }, displayedMessage) : null);
117
+ return h(Fragment, { key: 'dde4907293728cbb3f1d42060293220c3d446b02' }, shouldShow ? h("time", { dateTime: displayedMessage }, displayedMessage) : null);
118
118
  }
119
119
  static get is() { return "q2-relative-time"; }
120
120
  static get encapsulation() { return "shadow"; }
@@ -153,9 +153,9 @@ export class Q2Section {
153
153
  wrapperClasses.push('is-transitioning');
154
154
  }
155
155
  const showDefaultHeader = !this.hasYieldedHeader && !!this.label;
156
- return (h("section", { key: '4cae0e6f0057c318e45274cdabe74878bad2a995', class: "wrapper" }, h("header", { key: 'bb4439e069cb85a3950cabfcc08d220415229082', class: hasHeader ? 'has-header' : '' }, h("div", { key: '036bd23de5da7bd0c45a31521fdeffa240e398b0', class: "header-content", id: this.titleId, onClick: this.collapsible && this.onHeaderClick }, showDefaultHeader && h("h2", { key: '2742ab3ad5654864b0951637e0b5a5a5028ea34d', class: "title" }, loc(this.label)), h("div", { key: 'b772b2028190079db060d28ebaab67723b030462', ref: el => (this.headerSlotWrapper = el), class: "header-slot-wrapper" }, h("slot", { key: '986a404b7a5297af31d4122ffe4daa4697b90203', ref: (el) => (this.headerSlot = el), name: "q2-section-header" }))), this.collapsible && !this.noCollapseIcon && (h("q2-btn", { key: '678f61529c25ceb257cf7d26abdd46448b0f0d96', 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: '5494baf730dd97d54e1e50b6366dbaea3676ce16', type: "chevron-up" })))), h("div", { key: '33cdc24262ad444f8d61cd557371963e5ebf4ce0', class: wrapperClasses.join(' '), id: this.contentId, "aria-labelledby": this.titleId, role: "region", onTransitionEnd: this.onTransitionEnd, style: this.collapsible && {
156
+ return (h("section", { key: 'c7bcdc8451b8ba3e80b3a4d080469d2d6a10dfa2', class: "wrapper" }, h("header", { key: 'a50b01b5e72dd0fc2fb1f28a8985bc2649a137a3', class: hasHeader ? 'has-header' : '' }, h("div", { key: 'decced634cbc774a5215dc2caf0da821ef02e3ca', class: "header-content", id: this.titleId, onClick: this.collapsible && this.onHeaderClick }, showDefaultHeader && h("h2", { key: '74c14dc96e48b1a22bf771b2256afbeccb8bb809', class: "title" }, loc(this.label)), h("div", { key: 'de4984f8b38347e0d7018b2ba00cf1593e961edd', ref: el => (this.headerSlotWrapper = el), class: "header-slot-wrapper" }, h("slot", { key: '0889d40beeb04241e56837d99cbaa7238bed9051', ref: (el) => (this.headerSlot = el), name: "q2-section-header" }))), this.collapsible && !this.noCollapseIcon && (h("q2-btn", { key: 'ce19177afee03d711374c44557d36eacd4c93dc2', 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: 'ff1400bd6cc63f20fa8e25d016ef0a877c300d2e', type: "chevron-up" })))), h("div", { key: '5449e450a0d42463e4c55d9fa5ada0d4b0027c97', class: wrapperClasses.join(' '), id: this.contentId, "aria-labelledby": this.titleId, role: "region", onTransitionEnd: this.onTransitionEnd, style: this.collapsible && {
157
157
  height: this.contentHeight,
158
- } }, h("div", { key: 'f30463473a96a1e5fe8dc4f5951c147a1847d2f4', ref: el => (this.contentContainer = el), class: "content", tabindex: "-1" }, h("slot", { key: 'e41200b2ed13a0e280c223020c7b7ada8d3b6056', ref: (el) => (this.contentSlot = el) })))));
158
+ } }, h("div", { key: '86160c53fd5d0362c72dddfe9ab97d8f912f9e64', ref: el => (this.contentContainer = el), class: "content", tabindex: "-1" }, h("slot", { key: '741afed909cbb5edf60dc67ce99e23aa7e749522', ref: (el) => (this.contentSlot = el) })))));
159
159
  }
160
160
  static get is() { return "q2-section"; }
161
161
  static get encapsulation() { return "shadow"; }