q2-tecton-elements 1.47.0 → 1.47.2

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 (323) hide show
  1. package/dist/cjs/click-elsewhere_2.cjs.entry.js +66 -27
  2. package/dist/cjs/click-elsewhere_2.cjs.entry.js.map +1 -1
  3. package/dist/cjs/{index-c385e32f.js → index-f69742cf.js} +1 -1
  4. package/dist/cjs/{index-c385e32f.js.map → index-f69742cf.js.map} +1 -1
  5. package/dist/cjs/loader.cjs.js +1 -1
  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_2.cjs.entry.js +4 -0
  9. package/dist/cjs/q2-btn_2.cjs.entry.js.map +1 -1
  10. package/dist/cjs/q2-calendar.cjs.entry.js +2 -2
  11. package/dist/cjs/q2-carousel-pane.cjs.entry.js +2 -2
  12. package/dist/cjs/q2-carousel.cjs.entry.js +1 -1
  13. package/dist/cjs/q2-chart-area.cjs.entry.js +1 -1
  14. package/dist/cjs/q2-chart-bar.cjs.entry.js +1 -1
  15. package/dist/cjs/q2-chart-donut.cjs.entry.js +1 -1
  16. package/dist/cjs/q2-checkbox-group.cjs.entry.js +1 -1
  17. package/dist/cjs/q2-checkbox.cjs.entry.js +1 -1
  18. package/dist/cjs/q2-currency.cjs.entry.js +1 -1
  19. package/dist/cjs/q2-data-table.cjs.entry.js +1 -1
  20. package/dist/cjs/q2-detail.cjs.entry.js +1 -1
  21. package/dist/cjs/q2-dropdown.cjs.entry.js +9 -11
  22. package/dist/cjs/q2-dropdown.cjs.entry.js.map +1 -1
  23. package/dist/cjs/q2-editable-field.cjs.entry.js +6 -4
  24. package/dist/cjs/q2-editable-field.cjs.entry.js.map +1 -1
  25. package/dist/cjs/q2-icon.cjs.entry.js +4 -0
  26. package/dist/cjs/q2-icon.cjs.entry.js.map +1 -1
  27. package/dist/cjs/q2-input.cjs.entry.js +1 -1
  28. package/dist/cjs/q2-item.cjs.entry.js +1 -1
  29. package/dist/cjs/q2-legend.cjs.entry.js +1 -1
  30. package/dist/cjs/q2-list.cjs.entry.js +1 -1
  31. package/dist/cjs/q2-loc.cjs.entry.js +1 -1
  32. package/dist/cjs/q2-message.cjs.entry.js +1 -1
  33. package/dist/cjs/q2-month-picker.cjs.entry.js +2 -2
  34. package/dist/cjs/q2-optgroup.cjs.entry.js +1 -1
  35. package/dist/cjs/q2-option-list.cjs.entry.js +1 -1
  36. package/dist/cjs/q2-option.cjs.entry.js +1 -1
  37. package/dist/cjs/q2-pagination.cjs.entry.js +2 -2
  38. package/dist/cjs/q2-pill.cjs.entry.js +1 -1
  39. package/dist/cjs/q2-radio-group.cjs.entry.js +1 -1
  40. package/dist/cjs/q2-radio.cjs.entry.js +1 -1
  41. package/dist/cjs/q2-relative-time.cjs.entry.js +2 -2
  42. package/dist/cjs/q2-section.cjs.entry.js +2 -2
  43. package/dist/cjs/q2-select.cjs.entry.js +55 -7
  44. package/dist/cjs/q2-select.cjs.entry.js.map +1 -1
  45. package/dist/cjs/q2-stepper-pane.cjs.entry.js +1 -1
  46. package/dist/cjs/q2-stepper.cjs.entry.js +1 -1
  47. package/dist/cjs/q2-tecton-elements.cjs.js +1 -1
  48. package/dist/cjs/q2-textarea.cjs.entry.js +2 -1
  49. package/dist/cjs/q2-textarea.cjs.entry.js.map +1 -1
  50. package/dist/collection/collection-manifest.json +5 -5
  51. package/dist/collection/components/q2-action-sheet/q2-action-sheet.js +1 -1
  52. package/dist/collection/components/q2-avatar/q2-avatar.js +1 -1
  53. package/dist/collection/components/q2-btn/q2-btn.js +4 -0
  54. package/dist/collection/components/q2-btn/q2-btn.js.map +1 -1
  55. package/dist/collection/components/q2-calendar/q2-calendar.js +1 -1
  56. package/dist/collection/components/q2-calendar/q2-month-picker.js +2 -2
  57. package/dist/collection/components/q2-carousel/q2-carousel.js +1 -1
  58. package/dist/collection/components/q2-carousel-pane/q2-carousel-pane.js +2 -2
  59. package/dist/collection/components/q2-chart-area/q2-chart-area.js +1 -1
  60. package/dist/collection/components/q2-chart-bar/q2-chart-bar.js +1 -1
  61. package/dist/collection/components/q2-chart-donut/q2-chart-donut.js +1 -1
  62. package/dist/collection/components/q2-checkbox/q2-checkbox.js +1 -1
  63. package/dist/collection/components/q2-checkbox-group/q2-checkbox-group.js +1 -1
  64. package/dist/collection/components/q2-currency/q2-currency.js +1 -1
  65. package/dist/collection/components/q2-data-table/q2-data-table.js +7 -7
  66. package/dist/collection/components/q2-detail/q2-detail.js +1 -1
  67. package/dist/collection/components/q2-dropdown/q2-dropdown.js +9 -11
  68. package/dist/collection/components/q2-dropdown/q2-dropdown.js.map +1 -1
  69. package/dist/collection/components/q2-editable-field/q2-editable-field.js +13 -5
  70. package/dist/collection/components/q2-editable-field/q2-editable-field.js.map +1 -1
  71. package/dist/collection/components/q2-icon/q2-icon.js +4 -0
  72. package/dist/collection/components/q2-icon/q2-icon.js.map +1 -1
  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-legend/q2-legend.js +1 -1
  76. package/dist/collection/components/q2-list/q2-list.js +1 -1
  77. package/dist/collection/components/q2-loc/q2-loc.js +1 -1
  78. package/dist/collection/components/q2-message/q2-message.js +1 -1
  79. package/dist/collection/components/q2-optgroup/q2-optgroup.js +1 -1
  80. package/dist/collection/components/q2-option/q2-option.js +1 -1
  81. package/dist/collection/components/q2-option-list/q2-option-list.js +4 -4
  82. package/dist/collection/components/q2-pagination/q2-pagination.js +2 -2
  83. package/dist/collection/components/q2-pill/q2-pill.js +1 -1
  84. package/dist/collection/components/q2-popover/q2-popover.css +19 -11
  85. package/dist/collection/components/q2-popover/q2-popover.js +67 -27
  86. package/dist/collection/components/q2-popover/q2-popover.js.map +1 -1
  87. package/dist/collection/components/q2-radio/q2-radio.js +1 -1
  88. package/dist/collection/components/q2-radio-group/q2-radio-group.js +1 -1
  89. package/dist/collection/components/q2-relative-time/q2-relative-time.js +1 -1
  90. package/dist/collection/components/q2-section/q2-section.js +2 -2
  91. package/dist/collection/components/q2-select/q2-select.js +64 -9
  92. package/dist/collection/components/q2-select/q2-select.js.map +1 -1
  93. package/dist/collection/components/q2-stepper/q2-stepper.js +1 -1
  94. package/dist/collection/components/q2-stepper-pane/q2-stepper-pane.js +3 -3
  95. package/dist/collection/components/q2-textarea/q2-textarea.js +2 -1
  96. package/dist/collection/components/q2-textarea/q2-textarea.js.map +1 -1
  97. package/dist/components/q2-action-sheet.js +1 -1
  98. package/dist/components/q2-avatar2.js +1 -1
  99. package/dist/components/q2-btn2.js +4 -0
  100. package/dist/components/q2-btn2.js.map +1 -1
  101. package/dist/components/q2-calendar.js +1 -1
  102. package/dist/components/q2-carousel-pane.js +2 -2
  103. package/dist/components/q2-carousel.js +1 -1
  104. package/dist/components/q2-chart-area.js +1 -1
  105. package/dist/components/q2-chart-bar.js +1 -1
  106. package/dist/components/q2-chart-donut.js +1 -1
  107. package/dist/components/q2-checkbox-group.js +1 -1
  108. package/dist/components/q2-checkbox2.js +1 -1
  109. package/dist/components/q2-currency.js +1 -1
  110. package/dist/components/q2-data-table.js +1 -1
  111. package/dist/components/q2-detail.js +1 -1
  112. package/dist/components/q2-dropdown.js +9 -11
  113. package/dist/components/q2-dropdown.js.map +1 -1
  114. package/dist/components/q2-editable-field.js +7 -5
  115. package/dist/components/q2-editable-field.js.map +1 -1
  116. package/dist/components/q2-icon2.js +4 -0
  117. package/dist/components/q2-icon2.js.map +1 -1
  118. package/dist/components/q2-input2.js +1 -1
  119. package/dist/components/q2-item.js +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 +66 -27
  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 +57 -9
  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 +2 -1
  141. package/dist/components/q2-textarea.js.map +1 -1
  142. package/dist/esm/click-elsewhere_2.entry.js +66 -27
  143. package/dist/esm/click-elsewhere_2.entry.js.map +1 -1
  144. package/dist/esm/{index-f0dfb099.js → index-3184c760.js} +1 -1
  145. package/dist/esm/{index-f0dfb099.js.map → index-3184c760.js.map} +1 -1
  146. package/dist/esm/loader.js +1 -1
  147. package/dist/esm/q2-action-sheet.entry.js +1 -1
  148. package/dist/esm/q2-avatar.entry.js +1 -1
  149. package/dist/esm/q2-btn_2.entry.js +4 -0
  150. package/dist/esm/q2-btn_2.entry.js.map +1 -1
  151. package/dist/esm/q2-calendar.entry.js +2 -2
  152. package/dist/esm/q2-carousel-pane.entry.js +2 -2
  153. package/dist/esm/q2-carousel.entry.js +1 -1
  154. package/dist/esm/q2-chart-area.entry.js +1 -1
  155. package/dist/esm/q2-chart-bar.entry.js +1 -1
  156. package/dist/esm/q2-chart-donut.entry.js +1 -1
  157. package/dist/esm/q2-checkbox-group.entry.js +1 -1
  158. package/dist/esm/q2-checkbox.entry.js +1 -1
  159. package/dist/esm/q2-currency.entry.js +1 -1
  160. package/dist/esm/q2-data-table.entry.js +1 -1
  161. package/dist/esm/q2-detail.entry.js +1 -1
  162. package/dist/esm/q2-dropdown.entry.js +9 -11
  163. package/dist/esm/q2-dropdown.entry.js.map +1 -1
  164. package/dist/esm/q2-editable-field.entry.js +6 -4
  165. package/dist/esm/q2-editable-field.entry.js.map +1 -1
  166. package/dist/esm/q2-icon.entry.js +4 -0
  167. package/dist/esm/q2-icon.entry.js.map +1 -1
  168. package/dist/esm/q2-input.entry.js +1 -1
  169. package/dist/esm/q2-item.entry.js +1 -1
  170. package/dist/esm/q2-legend.entry.js +1 -1
  171. package/dist/esm/q2-list.entry.js +1 -1
  172. package/dist/esm/q2-loc.entry.js +1 -1
  173. package/dist/esm/q2-message.entry.js +1 -1
  174. package/dist/esm/q2-month-picker.entry.js +2 -2
  175. package/dist/esm/q2-optgroup.entry.js +1 -1
  176. package/dist/esm/q2-option-list.entry.js +1 -1
  177. package/dist/esm/q2-option.entry.js +1 -1
  178. package/dist/esm/q2-pagination.entry.js +2 -2
  179. package/dist/esm/q2-pill.entry.js +1 -1
  180. package/dist/esm/q2-radio-group.entry.js +1 -1
  181. package/dist/esm/q2-radio.entry.js +1 -1
  182. package/dist/esm/q2-relative-time.entry.js +2 -2
  183. package/dist/esm/q2-section.entry.js +2 -2
  184. package/dist/esm/q2-select.entry.js +56 -8
  185. package/dist/esm/q2-select.entry.js.map +1 -1
  186. package/dist/esm/q2-stepper-pane.entry.js +1 -1
  187. package/dist/esm/q2-stepper.entry.js +1 -1
  188. package/dist/esm/q2-tecton-elements.js +1 -1
  189. package/dist/esm/q2-textarea.entry.js +2 -1
  190. package/dist/esm/q2-textarea.entry.js.map +1 -1
  191. package/dist/jest.setup.js +22 -0
  192. package/dist/jest.setup.js.map +1 -0
  193. package/dist/q2-tecton-elements/{p-7dafc5da.entry.js → p-044b8914.entry.js} +2 -2
  194. package/dist/q2-tecton-elements/p-0499abaa.entry.js +2 -0
  195. package/dist/q2-tecton-elements/p-0499abaa.entry.js.map +1 -0
  196. package/dist/q2-tecton-elements/{p-a891571c.entry.js → p-07f40176.entry.js} +2 -2
  197. package/dist/q2-tecton-elements/{p-c9ee763d.entry.js → p-08d5de5c.entry.js} +2 -2
  198. package/dist/q2-tecton-elements/{p-24d96969.entry.js → p-0a211fb4.entry.js} +2 -2
  199. package/dist/q2-tecton-elements/{p-35cc1039.entry.js → p-132005d2.entry.js} +2 -2
  200. package/dist/q2-tecton-elements/{p-0e482a7c.entry.js → p-149044cd.entry.js} +2 -2
  201. package/dist/q2-tecton-elements/{p-8fc099f5.entry.js → p-28b0de1c.entry.js} +2 -2
  202. package/dist/q2-tecton-elements/{p-33af97b0.entry.js → p-2de3e7b1.entry.js} +2 -2
  203. package/dist/q2-tecton-elements/{p-33af97b0.entry.js.map → p-2de3e7b1.entry.js.map} +1 -1
  204. package/dist/q2-tecton-elements/{p-52e277b8.entry.js → p-3030d55f.entry.js} +2 -2
  205. package/dist/q2-tecton-elements/{p-ced89010.entry.js → p-3dff9fb0.entry.js} +2 -2
  206. package/dist/q2-tecton-elements/{p-fb7dd7ab.entry.js → p-432532fe.entry.js} +2 -2
  207. package/dist/q2-tecton-elements/{p-2d6a9a94.entry.js → p-46085a34.entry.js} +2 -2
  208. package/dist/q2-tecton-elements/{p-1b89b9c3.entry.js → p-4740e969.entry.js} +2 -2
  209. package/dist/q2-tecton-elements/{p-76be9cad.entry.js → p-4ef5222b.entry.js} +2 -2
  210. package/dist/q2-tecton-elements/p-4ef5222b.entry.js.map +1 -0
  211. package/dist/q2-tecton-elements/{p-dd18416f.entry.js → p-502af427.entry.js} +2 -2
  212. package/dist/q2-tecton-elements/{p-66ae329f.entry.js → p-5214296a.entry.js} +2 -2
  213. package/dist/q2-tecton-elements/{p-ca43e917.entry.js → p-572805fc.entry.js} +2 -2
  214. package/dist/q2-tecton-elements/{p-6f2de185.entry.js → p-59551fa4.entry.js} +2 -2
  215. package/dist/q2-tecton-elements/{p-abe30d0c.entry.js → p-644d5b2e.entry.js} +2 -2
  216. package/dist/q2-tecton-elements/{p-45d70da2.entry.js → p-6468801f.entry.js} +2 -2
  217. package/dist/q2-tecton-elements/{p-30d70f4a.entry.js → p-68276771.entry.js} +2 -2
  218. package/dist/q2-tecton-elements/{p-23183c61.entry.js → p-6be0e333.entry.js} +2 -2
  219. package/dist/q2-tecton-elements/{p-3f665c56.entry.js → p-84fc61f5.entry.js} +2 -2
  220. package/dist/q2-tecton-elements/{p-d75e4752.entry.js → p-85a7b1ab.entry.js} +2 -2
  221. package/dist/q2-tecton-elements/{p-7cbb989e.entry.js → p-a2caa101.entry.js} +2 -2
  222. package/dist/q2-tecton-elements/{p-b849365e.entry.js → p-aa768c36.entry.js} +2 -2
  223. package/dist/q2-tecton-elements/{p-774975fa.entry.js → p-c5ae8890.entry.js} +2 -2
  224. package/dist/q2-tecton-elements/p-c9866d11.entry.js +2 -0
  225. package/dist/q2-tecton-elements/p-c9866d11.entry.js.map +1 -0
  226. package/dist/q2-tecton-elements/{p-3fe532bc.entry.js → p-cb8e7ebb.entry.js} +2 -2
  227. package/dist/q2-tecton-elements/p-cb8e7ebb.entry.js.map +1 -0
  228. package/dist/q2-tecton-elements/{p-a3d58a50.entry.js → p-ccbc168f.entry.js} +2 -2
  229. package/dist/q2-tecton-elements/{p-f18caa3f.entry.js → p-d6c8d94d.entry.js} +2 -2
  230. package/dist/q2-tecton-elements/{p-a03c29f3.entry.js → p-def9be7b.entry.js} +2 -2
  231. package/dist/q2-tecton-elements/p-e1c642fa.entry.js +2 -0
  232. package/dist/q2-tecton-elements/p-e1c642fa.entry.js.map +1 -0
  233. package/dist/q2-tecton-elements/{p-aed969d4.entry.js → p-e654d2d6.entry.js} +2 -2
  234. package/dist/q2-tecton-elements/{p-9eafabd5.entry.js → p-e786ba03.entry.js} +2 -2
  235. package/dist/q2-tecton-elements/p-e9e66809.entry.js +2 -0
  236. package/dist/q2-tecton-elements/p-e9e66809.entry.js.map +1 -0
  237. package/dist/q2-tecton-elements/{p-3c42c90f.js → p-f1e887f5.js} +1 -1
  238. package/dist/q2-tecton-elements/{p-8a00552f.entry.js → p-fe1f1ff4.entry.js} +2 -2
  239. package/dist/q2-tecton-elements/q2-tecton-elements.esm.js +1 -1
  240. package/dist/q2-tecton-elements/q2-tecton-elements.esm.js.map +1 -1
  241. package/dist/test/elements/q2-calendar-test.e2e.js +2 -2
  242. package/dist/test/elements/q2-calendar-test.e2e.js.map +1 -1
  243. package/dist/test/elements/q2-dropdown-test.e2e.js +2 -14
  244. package/dist/test/elements/q2-dropdown-test.e2e.js.map +1 -1
  245. package/dist/test/elements/q2-pill-test.e2e.js +1 -1
  246. package/dist/test/elements/q2-pill-test.e2e.js.map +1 -1
  247. package/dist/test/elements/q2-popover-test.e2e.js +1 -34
  248. package/dist/test/elements/q2-popover-test.e2e.js.map +1 -1
  249. package/dist/test/elements/q2-popover-test.spec.js +739 -296
  250. package/dist/test/elements/q2-popover-test.spec.js.map +1 -1
  251. package/dist/test/elements/q2-select-test.e2e.js +1 -1
  252. package/dist/test/elements/q2-select-test.e2e.js.map +1 -1
  253. package/dist/test/elements/q2-select-test.spec.js +412 -0
  254. package/dist/test/elements/q2-select-test.spec.js.map +1 -0
  255. package/dist/test/elements/q2-tag-test.e2e.js +1 -1
  256. package/dist/test/elements/q2-tag-test.e2e.js.map +1 -1
  257. package/dist/types/builds/q2e/development/tecton/tecton/packages/q2-tecton-elements/.stencil/jest.setup.d.ts +1 -0
  258. package/dist/types/components/q2-action-sheet/q2-action-sheet.d.ts +60 -0
  259. package/dist/types/components/q2-btn/q2-btn.d.ts +1 -0
  260. package/dist/types/components/q2-calendar/q2-calendar.d.ts +324 -0
  261. package/dist/types/components/q2-carousel/q2-carousel.d.ts +2 -2
  262. package/dist/types/components/q2-data-table/q2-data-table.d.ts +221 -0
  263. package/dist/types/components/q2-dropdown/q2-dropdown.d.ts +127 -0
  264. package/dist/types/components/q2-dropdown-item/q2-dropdown-item.d.ts +45 -0
  265. package/dist/types/components/q2-editable-field/q2-editable-field.d.ts +138 -0
  266. package/dist/types/components/q2-icon/q2-icon.d.ts +1 -0
  267. package/dist/types/components/q2-loading/skeleton/shapes.d.ts +1 -0
  268. package/dist/types/components/q2-optgroup/q2-optgroup.d.ts +1 -1
  269. package/dist/types/components/q2-option-list/q2-option-list.d.ts +99 -0
  270. package/dist/types/components/q2-pagination/q2-pagination.d.ts +60 -0
  271. package/dist/types/components/q2-pill/q2-pill.d.ts +102 -0
  272. package/dist/types/components/q2-popover/q2-popover.d.ts +5 -3
  273. package/dist/types/components/q2-select/q2-select.d.ts +239 -0
  274. package/dist/types/components/q2-stepper/q2-stepper.d.ts +52 -0
  275. package/dist/types/components/q2-stepper-vertical/q2-stepper-vertical.d.ts +62 -0
  276. package/dist/types/components/q2-tab-container/q2-tab-container.d.ts +2 -2
  277. package/dist/types/components/q2-tag/q2-tag.d.ts +59 -0
  278. package/dist/types/utils/action-sheet.d.ts +12 -0
  279. package/package.json +3 -3
  280. package/dist/q2-tecton-elements/p-0e27ea75.entry.js +0 -2
  281. package/dist/q2-tecton-elements/p-0e27ea75.entry.js.map +0 -1
  282. package/dist/q2-tecton-elements/p-3fe532bc.entry.js.map +0 -1
  283. package/dist/q2-tecton-elements/p-4b47816d.entry.js +0 -2
  284. package/dist/q2-tecton-elements/p-4b47816d.entry.js.map +0 -1
  285. package/dist/q2-tecton-elements/p-6eac40be.entry.js +0 -2
  286. package/dist/q2-tecton-elements/p-6eac40be.entry.js.map +0 -1
  287. package/dist/q2-tecton-elements/p-76be9cad.entry.js.map +0 -1
  288. package/dist/q2-tecton-elements/p-e25194ce.entry.js +0 -2
  289. package/dist/q2-tecton-elements/p-e25194ce.entry.js.map +0 -1
  290. /package/dist/q2-tecton-elements/{p-7dafc5da.entry.js.map → p-044b8914.entry.js.map} +0 -0
  291. /package/dist/q2-tecton-elements/{p-a891571c.entry.js.map → p-07f40176.entry.js.map} +0 -0
  292. /package/dist/q2-tecton-elements/{p-c9ee763d.entry.js.map → p-08d5de5c.entry.js.map} +0 -0
  293. /package/dist/q2-tecton-elements/{p-24d96969.entry.js.map → p-0a211fb4.entry.js.map} +0 -0
  294. /package/dist/q2-tecton-elements/{p-35cc1039.entry.js.map → p-132005d2.entry.js.map} +0 -0
  295. /package/dist/q2-tecton-elements/{p-0e482a7c.entry.js.map → p-149044cd.entry.js.map} +0 -0
  296. /package/dist/q2-tecton-elements/{p-8fc099f5.entry.js.map → p-28b0de1c.entry.js.map} +0 -0
  297. /package/dist/q2-tecton-elements/{p-52e277b8.entry.js.map → p-3030d55f.entry.js.map} +0 -0
  298. /package/dist/q2-tecton-elements/{p-ced89010.entry.js.map → p-3dff9fb0.entry.js.map} +0 -0
  299. /package/dist/q2-tecton-elements/{p-fb7dd7ab.entry.js.map → p-432532fe.entry.js.map} +0 -0
  300. /package/dist/q2-tecton-elements/{p-2d6a9a94.entry.js.map → p-46085a34.entry.js.map} +0 -0
  301. /package/dist/q2-tecton-elements/{p-1b89b9c3.entry.js.map → p-4740e969.entry.js.map} +0 -0
  302. /package/dist/q2-tecton-elements/{p-dd18416f.entry.js.map → p-502af427.entry.js.map} +0 -0
  303. /package/dist/q2-tecton-elements/{p-66ae329f.entry.js.map → p-5214296a.entry.js.map} +0 -0
  304. /package/dist/q2-tecton-elements/{p-ca43e917.entry.js.map → p-572805fc.entry.js.map} +0 -0
  305. /package/dist/q2-tecton-elements/{p-6f2de185.entry.js.map → p-59551fa4.entry.js.map} +0 -0
  306. /package/dist/q2-tecton-elements/{p-abe30d0c.entry.js.map → p-644d5b2e.entry.js.map} +0 -0
  307. /package/dist/q2-tecton-elements/{p-45d70da2.entry.js.map → p-6468801f.entry.js.map} +0 -0
  308. /package/dist/q2-tecton-elements/{p-30d70f4a.entry.js.map → p-68276771.entry.js.map} +0 -0
  309. /package/dist/q2-tecton-elements/{p-23183c61.entry.js.map → p-6be0e333.entry.js.map} +0 -0
  310. /package/dist/q2-tecton-elements/{p-3f665c56.entry.js.map → p-84fc61f5.entry.js.map} +0 -0
  311. /package/dist/q2-tecton-elements/{p-d75e4752.entry.js.map → p-85a7b1ab.entry.js.map} +0 -0
  312. /package/dist/q2-tecton-elements/{p-7cbb989e.entry.js.map → p-a2caa101.entry.js.map} +0 -0
  313. /package/dist/q2-tecton-elements/{p-b849365e.entry.js.map → p-aa768c36.entry.js.map} +0 -0
  314. /package/dist/q2-tecton-elements/{p-774975fa.entry.js.map → p-c5ae8890.entry.js.map} +0 -0
  315. /package/dist/q2-tecton-elements/{p-a3d58a50.entry.js.map → p-ccbc168f.entry.js.map} +0 -0
  316. /package/dist/q2-tecton-elements/{p-f18caa3f.entry.js.map → p-d6c8d94d.entry.js.map} +0 -0
  317. /package/dist/q2-tecton-elements/{p-a03c29f3.entry.js.map → p-def9be7b.entry.js.map} +0 -0
  318. /package/dist/q2-tecton-elements/{p-aed969d4.entry.js.map → p-e654d2d6.entry.js.map} +0 -0
  319. /package/dist/q2-tecton-elements/{p-9eafabd5.entry.js.map → p-e786ba03.entry.js.map} +0 -0
  320. /package/dist/q2-tecton-elements/{p-3c42c90f.js.map → p-f1e887f5.js.map} +0 -0
  321. /package/dist/q2-tecton-elements/{p-8a00552f.entry.js.map → p-fe1f1ff4.entry.js.map} +0 -0
  322. /package/dist/types/{workspace/workspace/_Gitlab_tecton-production_master → builds/q2e/development/tecton/tecton}/packages/q2-tecton-elements/.stencil/test/elements/q2-detail/slot-component.d.ts +0 -0
  323. /package/dist/types/{workspace/workspace/_Gitlab_tecton-production_master → builds/q2e/development/tecton/tecton}/packages/q2-tecton-elements/.stencil/test/helpers.d.ts +0 -0
@@ -1,7 +1,7 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
2
2
  import { g as handleDeprecationWarning, w as waitForNextPaint } from './index2.js';
3
3
 
4
- const q2PopoverCss = "*{box-sizing:border-box}*:active{outline:none}*:focus{outline:none;box-shadow:var(--const-double-focus-ring, 0 0 0 2px #ffffff, 0 0 0 4px #0066cc)}:host{box-shadow:none !important}::-moz-focus-inner{border:none}input,textarea,button{font-family:inherit;font-size:inherit;font-stretch:inherit}:host(.sr),:host(.sr) button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.sr,.sr button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.hidden{display:none}:host([hidden]){display:none}.invisible{visibility:hidden}.container{display:none}.show{display:block;position:fixed;z-index:var(--tct-popover-z-index, 50);margin:0;padding:0;overflow:auto;background:var(--tct-popover-background, var(--app-white, #ffffff));color:var(--tct-popover-font-color, var(--t-text, #4d4d4d));min-width:var(--tct-popover-min-width, 135px);margin-block:var(--tct-popover-margin-block, 0);box-shadow:var(--tct-popover-box-shadow, var(--app-shadow-1, 0 2px 4px rgba(0, 0, 0, 0.3)));border-width:var(--tct-popover-border-width, 0);border-style:solid;border-color:var(--tct-popover-border-color, transparent);border-radius:var(--tct-popover-border-radius, 0);max-height:var(--comp-pop-max-height);left:var(--comp-pop-left);opacity:var(--comp-pop-opacity, 0);--comp-scrollbar-size:var(--tct-scrollbar-size, var(--t-scrollbar-size, var(--app-scale-1x, 5px)));--comp-scrollbar-border-radius:var(--tct-scrollbar-border-radius, var(--t-scrollbar-border-radius, var(--app-border-radius-1, 3px)));--comp-scrollbar-color:var(--tct-scrollbar-color, var(--t-scrollbar-color, var(--t-a11y-gray-color, #747474)));scrollbar-width:thin;scrollbar-color:var(--comp-scrollbar-color) transparent}:host([block]) .show{right:unset;width:var(--comp-pop-width);min-width:var(--tct-popover-min-width, unset)}:host([align=left]) .show{left:var(--comp-pop-left);right:unset}:host([align=right]) .show{right:var(--comp-pop-right);left:unset}.show.down{top:var(--tct-popover-top, var(--comp-pop-top));bottom:unset}.show.up{top:unset;bottom:var(--comp-pop-bottom)}.show.legacy{position:absolute}.show::-webkit-scrollbar{width:var(--comp-scrollbar-size);height:var(--comp-scrollbar-size);margin:5px}.show::-webkit-scrollbar-thumb{background:var(--comp-scrollbar-color);border-radius:var(--comp-scrollbar-border-radius)}.show::-webkit-scrollbar-track{background:transparent;border-radius:var(--comp-scrollbar-border-radius)}click-elsewhere{position:relative;display:block}";
4
+ const q2PopoverCss = "*{box-sizing:border-box}*:active{outline:none}*:focus{outline:none;box-shadow:var(--const-double-focus-ring, 0 0 0 2px #ffffff, 0 0 0 4px #0066cc)}:host{box-shadow:none !important}::-moz-focus-inner{border:none}input,textarea,button{font-family:inherit;font-size:inherit;font-stretch:inherit}:host(.sr),:host(.sr) button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.sr,.sr button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.hidden{display:none}:host([hidden]){display:none}.invisible{visibility:hidden}.legacy.container{display:none}.legacy.show{display:block;z-index:var(--tct-popover-z-index, 50)}:popover-open,.show{position:absolute;margin:0;padding:0;overflow:auto;background:var(--tct-popover-background, var(--app-white, #ffffff));color:var(--tct-popover-font-color, var(--t-text, #4d4d4d));min-width:var(--tct-popover-min-width, 135px);margin-block:var(--tct-popover-margin-block, 0);box-shadow:var(--tct-popover-box-shadow, var(--app-shadow-1, 0px 0px 2px rgba(0, 0, 0, 0.12), 0px 2px 4px rgba(0, 0, 0, 0.14)));border-width:var(--tct-popover-border-width, 0);border-style:solid;border-color:var(--tct-popover-border-color, transparent);border-radius:var(--tct-popover-border-radius, 0);max-height:var(--comp-pop-max-height);left:var(--comp-pop-left);opacity:var(--comp-pop-opacity, 0);--comp-scrollbar-size:var(--tct-scrollbar-size, var(--t-scrollbar-size, var(--app-scale-1x, 5px)));--comp-scrollbar-border-radius:var(--tct-scrollbar-border-radius, var(--t-scrollbar-border-radius, var(--app-border-radius-1, 3px)));--comp-scrollbar-color:var(--tct-scrollbar-color, var(--t-scrollbar-color, var(--t-a11y-gray-color, #747474)));scrollbar-width:thin;scrollbar-color:var(--comp-scrollbar-color) transparent}:popover-open.block,.show.block{right:unset;width:var(--comp-pop-width);min-width:var(--tct-popover-min-width, unset)}:popover-open.left,.show.left{left:var(--comp-pop-left);right:unset}:popover-open.right,.show.right{right:var(--comp-pop-right);left:unset}:popover-open.down,.show.down{top:var(--tct-popover-top, var(--comp-pop-top));bottom:unset}:popover-open.up,.show.up{top:unset;bottom:var(--comp-pop-bottom)}:popover-open::-webkit-scrollbar,.show::-webkit-scrollbar{width:var(--comp-scrollbar-size);height:var(--comp-scrollbar-size);margin:5px}:popover-open::-webkit-scrollbar-thumb,.show::-webkit-scrollbar-thumb{background:var(--comp-scrollbar-color);border-radius:var(--comp-scrollbar-border-radius)}:popover-open::-webkit-scrollbar-track,.show::-webkit-scrollbar-track{background:transparent;border-radius:var(--comp-scrollbar-border-radius)}click-elsewhere{position:relative;display:block}";
5
5
  const Q2PopoverStyle0 = q2PopoverCss;
6
6
 
7
7
  const Q2Popover = /*@__PURE__*/ proxyCustomElement(class Q2Popover extends HTMLElement {
@@ -14,7 +14,6 @@ const Q2Popover = /*@__PURE__*/ proxyCustomElement(class Q2Popover extends HTMLE
14
14
  * The number of pixels to leave between the popover and the edge of the viewport
15
15
  */
16
16
  this.displayBuffer = 10;
17
- /** remove when Popover API is supported in iOS */
18
17
  this.orientationChanged = false;
19
18
  /// Helpers ///
20
19
  this.handleMinHeight = () => {
@@ -22,6 +21,9 @@ const Q2Popover = /*@__PURE__*/ proxyCustomElement(class Q2Popover extends HTMLE
22
21
  handleDeprecationWarning(this, 'minHeight', 'prop');
23
22
  }
24
23
  };
24
+ this.handlePopoverToggleEvent = (event) => {
25
+ this.popoverStateChanged.emit({ open: event.newState === 'open' });
26
+ };
25
27
  this.viewPortChanged = () => {
26
28
  if (!this.open)
27
29
  return;
@@ -31,9 +33,9 @@ const Q2Popover = /*@__PURE__*/ proxyCustomElement(class Q2Popover extends HTMLE
31
33
  this.orientationChanged = true;
32
34
  this.viewPortChanged();
33
35
  };
34
- this.setFixedCSSProperties = async () => {
35
- var _a, _b;
36
- const { controlElement, containerElement, currentDirection } = this;
36
+ this.setPopoverAPICSSProperties = async () => {
37
+ var _a, _b, _c, _d, _e, _f;
38
+ const { controlElement, containerElement, currentDirection, isModule, align } = this;
37
39
  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 : {
38
40
  top: 0,
39
41
  bottom: 0,
@@ -41,16 +43,32 @@ const Q2Popover = /*@__PURE__*/ proxyCustomElement(class Q2Popover extends HTMLE
41
43
  right: 0,
42
44
  };
43
45
  const popoverLeft = controlLeft;
44
- const popoverRight = window.visualViewport.width - controlRight;
46
+ const popoverRight = ((_c = window === null || window === void 0 ? void 0 : window.visualViewport) === null || _c === void 0 ? void 0 : _c.width) - controlRight;
47
+ if (align === 'right') {
48
+ containerElement.style.setProperty('--comp-pop-right', `${popoverRight - window.scrollX}px`);
49
+ containerElement.style.setProperty('--comp-pop-left', 'unset');
50
+ }
51
+ else {
52
+ containerElement.style.setProperty('--comp-pop-left', `${popoverLeft + window.scrollX}px`);
53
+ containerElement.style.setProperty('--comp-pop-right', 'unset');
54
+ }
45
55
  if (this.block)
46
- containerElement.style.setProperty('--comp-pop-width', `${controlElement.offsetWidth || 0}px`);
47
- containerElement.style.setProperty('--comp-pop-left', `${popoverLeft}px`);
48
- containerElement.style.setProperty('--comp-pop-right', `${popoverRight}px`);
56
+ containerElement.style.setProperty('--comp-pop-width', `${(controlElement === null || controlElement === void 0 ? void 0 : controlElement.offsetWidth) || 0}px`);
49
57
  if (currentDirection === 'up') {
50
- containerElement.style.setProperty('--comp-pop-bottom', `${window.visualViewport.height - controlTop}px`);
58
+ if (isModule) {
59
+ containerElement.style.setProperty('--comp-pop-bottom', `${window.innerHeight - controlTop}px`);
60
+ }
61
+ else {
62
+ 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`);
63
+ }
51
64
  }
52
65
  if (currentDirection === 'down') {
53
- containerElement.style.setProperty('--comp-pop-top', `${controlBottom}px`);
66
+ if (isModule) {
67
+ containerElement.style.setProperty('--comp-pop-top', `${controlBottom}px`);
68
+ }
69
+ else {
70
+ 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`);
71
+ }
54
72
  }
55
73
  // Wait for one paint to prevent layout thrashing
56
74
  await waitForNextPaint();
@@ -81,7 +99,7 @@ const Q2Popover = /*@__PURE__*/ proxyCustomElement(class Q2Popover extends HTMLE
81
99
  containerElement.style.setProperty('--comp-pop-opacity', '1');
82
100
  };
83
101
  this.direction = undefined;
84
- this.align = undefined;
102
+ this.align = 'left';
85
103
  this.open = undefined;
86
104
  this.block = undefined;
87
105
  this.controlElement = undefined;
@@ -91,13 +109,25 @@ const Q2Popover = /*@__PURE__*/ proxyCustomElement(class Q2Popover extends HTMLE
91
109
  this.show = false;
92
110
  }
93
111
  /// Lifecycle hooks ///
112
+ componentWillLoad() {
113
+ if (!this.supportsPopoverAPI) {
114
+ 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.');
115
+ this.mode = 'legacy';
116
+ }
117
+ }
94
118
  componentDidLoad() {
95
119
  this.handleMinHeight();
120
+ if (this.supportsPopoverAPI)
121
+ this.containerElement.addEventListener('toggle', this.handlePopoverToggleEvent);
96
122
  if (this.open)
97
123
  this.determinePopDirection();
98
124
  }
99
125
  disconnectedCallback() {
100
126
  this.removeViewportListeners();
127
+ this.containerElement.removeEventListener('toggle', this.handlePopoverToggleEvent);
128
+ this.containerElement = null;
129
+ this.contentElement = null;
130
+ this.controlElement = null;
101
131
  }
102
132
  /// Methods ///
103
133
  async toggle() {
@@ -116,7 +146,12 @@ const Q2Popover = /*@__PURE__*/ proxyCustomElement(class Q2Popover extends HTMLE
116
146
  else {
117
147
  this.removeViewportListeners();
118
148
  this.currentDirection = undefined;
119
- this.show = false;
149
+ if (this.mode === 'legacy' || !this.supportsPopoverAPI) {
150
+ this.show = false;
151
+ }
152
+ else {
153
+ this.containerElement.hidePopover();
154
+ }
120
155
  await waitForNextPaint();
121
156
  this.clearCSSProperties();
122
157
  }
@@ -133,7 +168,7 @@ const Q2Popover = /*@__PURE__*/ proxyCustomElement(class Q2Popover extends HTMLE
133
168
  event.stopPropagation();
134
169
  }
135
170
  /// Getters ///
136
- get actualDirection() {
171
+ get providedDirection() {
137
172
  const { direction } = this;
138
173
  switch (direction) {
139
174
  case 'up':
@@ -149,23 +184,24 @@ const Q2Popover = /*@__PURE__*/ proxyCustomElement(class Q2Popover extends HTMLE
149
184
  const hasPlatformDimensions = Object.keys((_b = (_a = window.Tecton) === null || _a === void 0 ? void 0 : _a.platformDimensions) !== null && _b !== void 0 ? _b : {}).length > 0;
150
185
  return isIframe && hasPlatformDimensions;
151
186
  }
187
+ get supportsPopoverAPI() {
188
+ return Object.hasOwn(HTMLElement.prototype, 'popover');
189
+ }
152
190
  addViewportListeners() {
153
191
  var _a;
154
192
  window.addEventListener('resize', this.viewPortOrientationChanged);
155
- // #region remove when Popover API is supported in iOS
193
+ visualViewport === null || visualViewport === void 0 ? void 0 : visualViewport.addEventListener('resize', this.viewPortChanged);
156
194
  window.addEventListener('scroll', this.viewPortChanged, { passive: true, capture: true });
157
- (_a = screen === null || screen === void 0 ? void 0 : screen.orientation) === null || _a === void 0 ? void 0 : _a.addEventListener('change', this.viewPortOrientationChanged);
195
+ (_a = screen === null || screen === void 0 ? void 0 : screen.orientation) === null || _a === void 0 ? void 0 : _a.addEventListener('orientationchange', this.viewPortOrientationChanged);
158
196
  window.addEventListener('orientationchange', this.viewPortOrientationChanged);
159
- // #endregion
160
197
  }
161
198
  removeViewportListeners() {
162
199
  var _a;
163
200
  window.removeEventListener('resize', this.viewPortOrientationChanged);
164
- // #region remove when Popover API is supported in iOS
165
- window.removeEventListener('scroll', this.viewPortChanged);
201
+ visualViewport === null || visualViewport === void 0 ? void 0 : visualViewport.removeEventListener('resize', this.viewPortChanged);
202
+ window.removeEventListener('scroll', this.viewPortChanged, { capture: true });
166
203
  (_a = screen === null || screen === void 0 ? void 0 : screen.orientation) === null || _a === void 0 ? void 0 : _a.removeEventListener('orientationchange', this.viewPortOrientationChanged);
167
204
  window.removeEventListener('orientationchange', this.viewPortOrientationChanged);
168
- // #endregion
169
205
  }
170
206
  clearCSSProperties() {
171
207
  this.containerElement.style.removeProperty('--comp-pop-max-height');
@@ -183,17 +219,18 @@ const Q2Popover = /*@__PURE__*/ proxyCustomElement(class Q2Popover extends HTMLE
183
219
  if (!isOpen)
184
220
  return;
185
221
  this.currentDirection = direction;
186
- this.show = true;
187
- if (this.mode === 'legacy') {
222
+ if (this.mode === 'legacy' || !this.supportsPopoverAPI) {
223
+ this.show = true;
188
224
  this.setAbsoluteCSSProperties();
189
225
  }
190
226
  else {
191
- this.setFixedCSSProperties();
227
+ this.setPopoverAPICSSProperties();
228
+ this.containerElement.showPopover();
192
229
  }
193
230
  }
194
231
  async determinePopDirection() {
195
232
  var _a, _b, _c;
196
- const { containerElement, controlElement, actualDirection, displayBuffer } = this;
233
+ const { containerElement, controlElement, providedDirection, displayBuffer } = this;
197
234
  if (containerElement)
198
235
  containerElement.style.maxHeight = null;
199
236
  await waitForNextPaint();
@@ -228,7 +265,7 @@ const Q2Popover = /*@__PURE__*/ proxyCustomElement(class Q2Popover extends HTMLE
228
265
  const shouldUpdateMaxHeight = !containerElement.style.getPropertyValue('--comp-pop-max-height') || this.orientationChanged;
229
266
  // we do not want to constantly update the max-height after an orientation change, so we switch this back to false
230
267
  this.orientationChanged = false;
231
- const currentOrDetermineDirection = this.currentDirection || actualDirection || directionWithMostSpace;
268
+ const currentOrDetermineDirection = this.currentDirection || providedDirection || directionWithMostSpace;
232
269
  switch (currentOrDetermineDirection) {
233
270
  case 'up':
234
271
  if (shouldUpdateMaxHeight) {
@@ -246,12 +283,14 @@ const Q2Popover = /*@__PURE__*/ proxyCustomElement(class Q2Popover extends HTMLE
246
283
  }
247
284
  /// DOM ///
248
285
  render() {
249
- const containerClasses = ['container', this.currentDirection];
286
+ const containerClasses = ['container', this.currentDirection, this.align];
250
287
  if (this.show)
251
288
  containerClasses.push('show');
289
+ if (this.block)
290
+ containerClasses.push('block');
252
291
  if (this.mode === 'legacy')
253
292
  containerClasses.push('legacy');
254
- return (h("div", { key: '7d15b8b85048ea39fb00f350a4a66de5ac110793', ref: el => (this.containerElement = el), class: containerClasses.join(' '), "test-id": "outerContainer" }, h("div", { key: 'f37b60229cf15c849a673f69a61dbc98b974670d', ref: el => (this.contentElement = el), class: "content" }, h("slot", { key: '79860592d387238074f19b6d48e5f1fabe65a73d' }))));
293
+ return (h("div", { key: '0263b5ca206dd3bfd037de9db3c2ec4b4e38fca5', ref: el => (this.containerElement = el), class: containerClasses.join(' '), "test-id": "outerContainer", tabIndex: -1, popover: "auto" }, h("div", { key: '993240fb13583b9ee143a4cbbac22034dced6019', ref: el => (this.contentElement = el), class: "content" }, h("slot", { key: '4c7864fdb9795291c1adf918da1870a80a667bae' }))));
255
294
  }
256
295
  get hostElement() { return this; }
257
296
  static get watchers() { return {
@@ -1 +1 @@
1
- {"file":"q2-popover2.js","mappings":";;;AAAA,MAAM,YAAY,GAAG,wgFAAwgF,CAAC;AAC9hF,wBAAe,YAAY;;MCed,SAAS;;;;;;;;;QAyClB,kBAAa,GAAG,EAAE,CAAC;;QAGnB,uBAAkB,GAAY,KAAK,CAAC;;QA4EpC,oBAAe,GAAG;YACd,IAAI,IAAI,CAAC,SAAS,EAAE;gBAChB,wBAAwB,CAAC,IAAI,EAAE,WAAW,EAAE,MAAM,CAAC,CAAC;aACvD;SACJ,CAAC;QAEF,oBAAe,GAAG;YACd,IAAI,CAAC,IAAI,CAAC,IAAI;gBAAE,OAAO;YACvB,IAAI,CAAC,qBAAqB,EAAE,CAAC;SAChC,CAAC;QAEF,+BAA0B,GAAG;YACzB,I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MAAM,2BAA2B,GAAG,IAAI,CAAC,gBAAgB,IAAI,eAAe,IAAI,sBAAsB,CAAC;QAEvG,QAAQ,2BAA2B;YAC/B,KAAK,IAAI;gBACL,IAAI,qBAAqB,EAAE;oBACvB,gBAAgB,CAAC,KAAK,CAAC,WAAW,CAAC,uBAAuB,EAAE,GAAG,aAAa,IAAI,CAAC,CAAC;iBACrF;gBACD,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,CAAC;gBAC/B,MAAM;YACV,KAAK,MAAM;gBACP,IAAI,qBAAqB,EAAE;oBACvB,gBAAgB,CAAC,KAAK,CAAC,WAAW,CAAC,uBAAuB,EAAE,GAAG,aAAa,IAAI,CAAC,CAAC;iBACrF;gBACD,IAAI,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAC;gBACjC,MAAM;SAGb;KACJ;;IAGD,MAAM;QACF,MAAM,gBAAgB,GAAG,CAAC,WAAW,EAAE,IAAI,CAAC,gBAAgB,CAAC,CAAC;QAC9D,IAAI,IAAI,CAAC,IAAI;YAAE,gBAAgB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAC7C,IAAI,IAAI,CAAC,IAAI,KAAK,QAAQ;YAAE,gBAAgB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAE5D,QACI,4DACI,GAAG,EAAE,EAAE,KAAK,IAAI,CAAC,gBAAgB,GAAG,EAAE,CAAC,EACvC,KAAK,EAAE,gBAAgB,CAAC,IAAI,CAAC,GAAG,CAAC,aACzB,gBAAgB,IAExB,4DACI,GAAG,EAAE,EAAE,KAAK,IAAI,CAAC,cAAc,GAAG,EAAE,CAAC,EACrC,KAAK,EAAC,SAAS,IAEf,8DAAQ,CACN,CACJ,EACR;KACL;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/q2-popover/q2-popover.scss?tag=q2-popover&encapsulation=shadow","src/components/q2-popover/q2-popover.tsx"],"sourcesContent":["@import '../../styles/host.scss';\n@import '../../styles/functions';\n\n.container {\n display: none;\n}\n\n.show {\n display: block;\n position: fixed;\n z-index: var-list(--tct-popover-z-index, 50);\n margin: 0;\n padding: 0;\n overflow: auto;\n background: var-list(--tct-popover-background, --app-white, #ffffff);\n color: var-list(--tct-popover-font-color, --t-text, #4d4d4d);\n min-width: var-list(--tct-popover-min-width, 135px);\n margin-block: var-list(--tct-popover-margin-block, 0);\n box-shadow: var-list(--tct-popover-box-shadow, --app-shadow-1, unquote('0 2px 4px rgba(0, 0, 0, 0.3)'));\n border-width: var-list(--tct-popover-border-width, 0);\n border-style: solid;\n border-color: var-list(--tct-popover-border-color, transparent);\n border-radius: var-list(--tct-popover-border-radius, 0);\n // the following --comp variables are set via JS\n max-height: var(--comp-pop-max-height);\n left: var(--comp-pop-left);\n opacity: var(--comp-pop-opacity, 0);\n\n :host([block]) & {\n right: unset;\n width: var(--comp-pop-width);\n min-width: var-list(--tct-popover-min-width, unset);\n }\n\n :host([align='left']) & {\n left: var(--comp-pop-left);\n right: unset;\n }\n\n :host([align='right']) & {\n right: var(--comp-pop-right);\n left: unset;\n }\n\n &.down {\n top: var-list(--tct-popover-top, --comp-pop-top);\n bottom: unset;\n }\n\n &.up {\n top: unset;\n bottom: var(--comp-pop-bottom);\n }\n\n &.legacy {\n position: absolute;\n }\n\n @include tiny-scrollbar();\n}\n\nclick-elsewhere {\n position: relative;\n display: block;\n}\n","import {\n Component,\n Prop,\n h,\n ComponentInterface,\n Element,\n Watch,\n Method,\n Listen,\n EventEmitter,\n Event,\n State,\n} from '@stencil/core';\nimport { handleDeprecationWarning, waitForNextPaint } from '../../utils';\n\n@Component({ tag: 'q2-popover', shadow: true, styleUrl: 'q2-popover.scss' })\nexport class Q2Popover implements ComponentInterface {\n /**\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 { outletOffset = 0, innerHeight = window.innerHeight } = window.Tecton?.platformDimensions || {};\n const distanceToIframeBottom = window.visualViewport.height - controlBottom;\n const viewableSpaceBelow = innerHeight - (outletOffset + controlBottom);\n const isIframeShorterThanWindow = distanceToIframeBottom < viewableSpaceBelow;\n windowHeight = innerHeight;\n // If the top of the module is below the top of the window we just use the controlTop\n // Otherwise we need to add the outletOffset to the controlTop\n maxSpaceAbove = (outletOffset > 0 ? controlTop : controlTop + outletOffset) - displayBuffer;\n maxSpaceBelow = isIframeShorterThanWindow\n ? distanceToIframeBottom - displayBuffer\n : viewableSpaceBelow - displayBuffer;\n } else {\n windowHeight = window.visualViewport.height;\n maxSpaceAbove = controlTop - displayBuffer;\n maxSpaceBelow = windowHeight - controlBottom - displayBuffer;\n }\n\n const directionWithMostSpace: 'up' | 'down' = maxSpaceAbove > maxSpaceBelow ? 'up' : 'down';\n\n // We do not want to update the max height once the popover is open unless the page orientation shifts (resize or mobile use cases)\n const shouldUpdateMaxHeight =\n !containerElement.style.getPropertyValue('--comp-pop-max-height') || this.orientationChanged;\n // we do not want to constantly update the max-height after an orientation change, so we switch this back to false\n this.orientationChanged = false;\n const currentOrDetermineDirection = this.currentDirection || 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"],"version":3}
1
+ {"file":"q2-popover2.js","mappings":";;;AAAA,MAAM,YAAY,GAAG,ytFAAytF,CAAC;AAC/uF,wBAAe,YAAY;;MCed,SAAS;;;;;;;;;QAyClB,kBAAa,GAAG,EAAE,CAAC;QAEnB,uBAAkB,GAAY,KAAK,CAAC;;QAmGpC,oBAAe,GAAG;YACd,IAAI,IAAI,CAAC,SAAS,EAAE;gBAChB,wBAAwB,CAAC,IAAI,EAAE,WAAW,EAAE,MAAM,CAAC,CAAC;aACvD;SACJ,CAAC;QAEF,6BAAwB,GAAG,CAAC,KAAkB;YAC1C,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,QAAQ,KAAK,MAAM,EAAE,CAAC,CAAC;SACtE,CAAC;QAEF,oBAAe,GAAG;YACd,IAAI,CAAC,IAAI,CAAC,IAAI;gBAAE,OAAO;YACvB,IAAI,CAAC,qBAAqB,EAAE,CAAC;SAChC,CAAC;QAEF,+BAA0B,GAAG;YACzB,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAC;YAC/B,IAAI,CAAC,eAAe,EAAE,CAAC;SAC1B,CAAC;QAkBF,+BAA0B,GAAG;;YACzB,MAAM,EAAE,cAAc,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC;YACrF,MAAM,EACF,GAAG,EAAE,UAAU,EACf,MAAM,EAAE,aAAa,EACrB,IAAI,EAAE,WAAW,EACjB,KAAK,EAAE,YAAY,GACtB,GAAG,MAAA,MAAA,cAAc,aAAd,cAAc,uBAAd,cAAc,CAAE,qBAAqB,8DAAI,mCAAI;gBAC7C,GAAG,EAAE,CAAC;gBACN,MAAM,EAAE,CAAC;gBACT,IAAI,EAAE,CAAC;gBACP,KAA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,EAAE,gBAAgB,CAAC,IAAI,CAAC,GAAG,CAAC,aACzB,gBAAgB,EACxB,QAAQ,EAAE,CAAC,CAAC,EACZ,OAAO,EAAC,MAAM,IAEd,4DACI,GAAG,EAAE,EAAE,KAAK,IAAI,CAAC,cAAc,GAAG,EAAE,CAAC,EACrC,KAAK,EAAC,SAAS,IAEf,8DAAQ,CACN,CACJ,EACR;KACL;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/q2-popover/q2-popover.scss?tag=q2-popover&encapsulation=shadow","src/components/q2-popover/q2-popover.tsx"],"sourcesContent":["@import '../../styles/host.scss';\n@import '../../styles/functions';\n\n.legacy {\n &.container {\n display: none;\n }\n\n &.show {\n display: block;\n z-index: var-list(--tct-popover-z-index, 50);\n }\n}\n\n:popover-open,\n.show {\n position: absolute;\n margin: 0;\n padding: 0;\n overflow: auto;\n background: var-list(--tct-popover-background, --app-white, #ffffff);\n color: var-list(--tct-popover-font-color, --t-text, #4d4d4d);\n min-width: var-list(--tct-popover-min-width, 135px);\n margin-block: var-list(--tct-popover-margin-block, 0);\n box-shadow: var-list(\n --tct-popover-box-shadow,\n --app-shadow-1,\n unquote('0px 0px 2px rgba(0, 0, 0, 0.12), 0px 2px 4px rgba(0, 0, 0, 0.14)')\n );\n border-width: var-list(--tct-popover-border-width, 0);\n border-style: solid;\n border-color: var-list(--tct-popover-border-color, transparent);\n border-radius: var-list(--tct-popover-border-radius, 0);\n // the --comp variables are set via JS\n max-height: var(--comp-pop-max-height);\n left: var(--comp-pop-left);\n opacity: var(--comp-pop-opacity, 0);\n\n &.block {\n right: unset;\n width: var(--comp-pop-width);\n min-width: var-list(--tct-popover-min-width, unset);\n }\n\n &.left {\n left: var(--comp-pop-left);\n right: unset;\n }\n\n &.right {\n right: var(--comp-pop-right);\n left: unset;\n }\n\n &.down {\n top: var-list(--tct-popover-top, --comp-pop-top);\n bottom: unset;\n }\n\n &.up {\n top: unset;\n bottom: var(--comp-pop-bottom);\n }\n\n @include tiny-scrollbar();\n}\n\nclick-elsewhere {\n position: relative;\n display: block;\n}\n","import {\n Component,\n Prop,\n h,\n ComponentInterface,\n Element,\n Watch,\n Method,\n Listen,\n EventEmitter,\n Event,\n State,\n} from '@stencil/core';\nimport { handleDeprecationWarning, waitForNextPaint } from '../../utils';\n\n@Component({ tag: 'q2-popover', shadow: true, styleUrl: 'q2-popover.scss' })\nexport class Q2Popover implements ComponentInterface {\n /**\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 window.addEventListener('scroll', this.viewPortChanged, { passive: true, capture: true });\n screen?.orientation?.addEventListener('orientationchange', this.viewPortOrientationChanged);\n window.addEventListener('orientationchange', this.viewPortOrientationChanged);\n }\n\n removeViewportListeners() {\n window.removeEventListener('resize', this.viewPortOrientationChanged);\n visualViewport?.removeEventListener('resize', this.viewPortChanged);\n window.removeEventListener('scroll', this.viewPortChanged, { capture: true });\n screen?.orientation?.removeEventListener('orientationchange', this.viewPortOrientationChanged);\n window.removeEventListener('orientationchange', this.viewPortOrientationChanged);\n }\n\n 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\n await waitForNextPaint();\n\n const { isModule } = this;\n const { top: controlTop, bottom: controlBottom } = controlElement?.getBoundingClientRect?.() ?? {\n top: 0,\n bottom: 0,\n };\n\n let windowHeight: number;\n let maxSpaceAbove: number;\n let maxSpaceBelow: number;\n\n if (isModule) {\n const { outletOffset = 0, innerHeight = window.innerHeight } = window.Tecton?.platformDimensions || {};\n const distanceToIframeBottom = window.visualViewport.height - controlBottom;\n const viewableSpaceBelow = innerHeight - (outletOffset + controlBottom);\n const isIframeShorterThanWindow = distanceToIframeBottom < viewableSpaceBelow;\n windowHeight = innerHeight;\n // If the top of the module is below the top of the window we just use the controlTop\n // Otherwise we need to add the outletOffset to the controlTop\n maxSpaceAbove = (outletOffset > 0 ? controlTop : controlTop + outletOffset) - displayBuffer;\n maxSpaceBelow = isIframeShorterThanWindow\n ? distanceToIframeBottom - displayBuffer\n : viewableSpaceBelow - displayBuffer;\n } else {\n windowHeight = window.visualViewport.height;\n maxSpaceAbove = controlTop - displayBuffer;\n maxSpaceBelow = windowHeight - controlBottom - displayBuffer;\n }\n\n const directionWithMostSpace: 'up' | 'down' = maxSpaceAbove > maxSpaceBelow ? 'up' : 'down';\n\n // We do not want to update the max height once the popover is open unless the page orientation shifts (resize or mobile use cases)\n const shouldUpdateMaxHeight =\n !containerElement.style.getPropertyValue('--comp-pop-max-height') || this.orientationChanged;\n // we do not want to constantly update the max-height after an orientation change, so we switch this back to false\n this.orientationChanged = false;\n const currentOrDetermineDirection = this.currentDirection || providedDirection || directionWithMostSpace;\n\n switch (currentOrDetermineDirection) {\n case 'up':\n if (shouldUpdateMaxHeight) {\n containerElement.style.setProperty('--comp-pop-max-height', `${maxSpaceAbove}px`);\n }\n this.setDirectionAndShow('up');\n break;\n case 'down':\n if (shouldUpdateMaxHeight) {\n containerElement.style.setProperty('--comp-pop-max-height', `${maxSpaceBelow}px`);\n }\n this.setDirectionAndShow('down');\n break;\n default:\n break;\n }\n }\n\n /// 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=\"auto\"\n >\n <div\n ref={el => (this.contentElement = el)}\n class=\"content\"\n >\n <slot />\n </div>\n </div>\n );\n }\n}\n"],"version":3}
@@ -163,7 +163,7 @@ const Q2RadioGroup$1 = /*@__PURE__*/ proxyCustomElement(class Q2RadioGroup exten
163
163
  const showLabel = this.label || this.optional || this.readonly;
164
164
  const { hasError } = this;
165
165
  const showLabelRow = showLabel || hasError;
166
- 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())));
166
+ 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())));
167
167
  }
168
168
  inputDom() {
169
169
  if (this.tileLayout) {
@@ -75,7 +75,7 @@ const Q2Radio$1 = /*@__PURE__*/ proxyCustomElement(class Q2Radio extends HTMLEle
75
75
  }
76
76
  }
77
77
  render() {
78
- 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' }))))));
78
+ 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' }))))));
79
79
  }
80
80
  get hostElement() { return this; }
81
81
  static get watchers() { return {
@@ -121,7 +121,7 @@ const Q2RelativeTime$1 = /*@__PURE__*/ proxyCustomElement(class Q2RelativeTime e
121
121
  /// DOM ///
122
122
  render() {
123
123
  const { shouldShow, displayedMessage } = this;
124
- return h(Fragment, { key: '26e452a6b2cda738835ac8675aea30b50846920a' }, shouldShow ? h("time", { dateTime: displayedMessage }, displayedMessage) : null);
124
+ return h(Fragment, { key: 'dde4907293728cbb3f1d42060293220c3d446b02' }, shouldShow ? h("time", { dateTime: displayedMessage }, displayedMessage) : null);
125
125
  }
126
126
  get hostElement() { return this; }
127
127
  static get watchers() { return {
@@ -164,9 +164,9 @@ const Q2Section$1 = /*@__PURE__*/ proxyCustomElement(class Q2Section extends HTM
164
164
  wrapperClasses.push('is-transitioning');
165
165
  }
166
166
  const showDefaultHeader = !this.hasYieldedHeader && !!this.label;
167
- 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 && {
167
+ 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 && {
168
168
  height: this.contentHeight,
169
- } }, h("div", { key: 'f30463473a96a1e5fe8dc4f5951c147a1847d2f4', ref: el => (this.contentContainer = el), class: "content", tabindex: "-1" }, h("slot", { key: 'e41200b2ed13a0e280c223020c7b7ada8d3b6056', ref: (el) => (this.contentSlot = el) })))));
169
+ } }, h("div", { key: '86160c53fd5d0362c72dddfe9ab97d8f912f9e64', ref: el => (this.contentContainer = el), class: "content", tabindex: "-1" }, h("slot", { key: '741afed909cbb5edf60dc67ce99e23aa7e749522', ref: (el) => (this.contentSlot = el) })))));
170
170
  }
171
171
  get hostElement() { return this; }
172
172
  static get watchers() { return {
@@ -1,5 +1,5 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
2
- import { l as loc, h as handleAriaLabel, o as overrideFocus, w as waitForNextPaint, t as isRelatedTargetWithinHost, i as isEventFromElement, u as isHostLosingFocus } from './index2.js';
2
+ import { d as isMobile, l as loc, h as handleAriaLabel, o as overrideFocus, w as waitForNextPaint, t as isRelatedTargetWithinHost, i as isEventFromElement, u as isHostLosingFocus } from './index2.js';
3
3
  import { s as shouldShowActionSheet, a as showActionSheetList } from './action-sheet.js';
4
4
  import { d as defineCustomElement$8 } from './click-elsewhere2.js';
5
5
  import { d as defineCustomElement$7 } from './q2-badge2.js';
@@ -22,6 +22,20 @@ const Q2Select = /*@__PURE__*/ proxyCustomElement(class Q2Select extends HTMLEle
22
22
  this.input = createEvent(this, "input", 7);
23
23
  var _a;
24
24
  this.scheduledAfterRender = [];
25
+ this.initEventListeners = () => {
26
+ var _a;
27
+ if (!isMobile())
28
+ return;
29
+ (_a = screen === null || screen === void 0 ? void 0 : screen.orientation) === null || _a === void 0 ? void 0 : _a.addEventListener('change', this.handleOrientationChange);
30
+ window.addEventListener('resize', this.handleOrientationChange);
31
+ visualViewport === null || visualViewport === void 0 ? void 0 : visualViewport.addEventListener('resize', this.handleOrientationChange);
32
+ };
33
+ this.initMutationObserver = () => {
34
+ const observer = new MutationObserver(this.onMutationObserved);
35
+ observer.observe(this.hostElement, { childList: true, subtree: true });
36
+ this.mutationObserver = observer;
37
+ this.onMutationObserved();
38
+ };
25
39
  this.showSelectedOptions = () => {
26
40
  this.showSelected = true;
27
41
  };
@@ -57,6 +71,30 @@ const Q2Select = /*@__PURE__*/ proxyCustomElement(class Q2Select extends HTMLEle
57
71
  this.showAllOptions();
58
72
  this.handleSelectionChanges(event.detail);
59
73
  };
74
+ this.destroyEventListeners = () => {
75
+ var _a;
76
+ if (!isMobile())
77
+ return;
78
+ (_a = screen === null || screen === void 0 ? void 0 : screen.orientation) === null || _a === void 0 ? void 0 : _a.removeEventListener('change', this.handleOrientationChange);
79
+ window.removeEventListener('resize', this.handleOrientationChange);
80
+ visualViewport === null || visualViewport === void 0 ? void 0 : visualViewport.removeEventListener('resize', this.handleOrientationChange);
81
+ };
82
+ this.handleOrientationChange = () => {
83
+ var _a, _b, _c;
84
+ if (!isMobile())
85
+ return;
86
+ let isLandscape;
87
+ if (this.isModule) {
88
+ isLandscape = (_a = window.Tecton) === null || _a === void 0 ? void 0 : _a.platformDimensions.orientationType.includes('landscape');
89
+ }
90
+ else {
91
+ isLandscape = (_c = (_b = screen === null || screen === void 0 ? void 0 : screen.orientation) === null || _b === void 0 ? void 0 : _b.type) === null || _c === void 0 ? void 0 : _c.includes('landscape');
92
+ }
93
+ if (isLandscape && this.searchable)
94
+ this.searchable = false;
95
+ if (!isLandscape)
96
+ this.searchable = this.originalSearchable;
97
+ };
60
98
  /// Event handlers ///
61
99
  this.onPopoverState = ({ detail: { open, action }, }) => {
62
100
  if (!open || this.searchText) {
@@ -97,7 +135,7 @@ const Q2Select = /*@__PURE__*/ proxyCustomElement(class Q2Select extends HTMLEle
97
135
  // Prevent click event from firing when spacebar is pressed
98
136
  if (key === ' ')
99
137
  event.preventDefault();
100
- this.optionList.handleExternalKeydown(event);
138
+ this.handleOptionListExternalKeydown(event);
101
139
  };
102
140
  this.visibilityToggleKeyDown = (event) => {
103
141
  const key = event.key;
@@ -186,15 +224,15 @@ const Q2Select = /*@__PURE__*/ proxyCustomElement(class Q2Select extends HTMLEle
186
224
  }
187
225
  /// Lifecycle Hooks ///
188
226
  componentWillLoad() {
227
+ this.originalSearchable = this.searchable;
189
228
  handleAriaLabel(this);
229
+ this.handleOrientationChange();
190
230
  this.buildStructuredSelectedOptions();
191
231
  this.handleMultilineOptionsUpdate(this.multilineOptions, false);
192
232
  }
193
233
  componentDidLoad() {
194
- const observer = new MutationObserver(this.onMutationObserved);
195
- observer.observe(this.hostElement, { childList: true, subtree: true });
196
- this.mutationObserver = observer;
197
- this.onMutationObserved();
234
+ this.initMutationObserver();
235
+ this.initEventListeners();
198
236
  overrideFocus(this.hostElement);
199
237
  setTimeout(() => this.checkSelectedDisplay(), 0);
200
238
  }
@@ -208,8 +246,15 @@ const Q2Select = /*@__PURE__*/ proxyCustomElement(class Q2Select extends HTMLEle
208
246
  var _a;
209
247
  (_a = this.mutationObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
210
248
  this.mutationObserver = null;
249
+ this.destroyEventListeners();
211
250
  }
212
251
  /// Getters ///
252
+ get isModule() {
253
+ var _a, _b;
254
+ const isIframe = window !== window.top;
255
+ const hasPlatformDimensions = Object.keys((_b = (_a = window.Tecton) === null || _a === void 0 ? void 0 : _a.platformDimensions) !== null && _b !== void 0 ? _b : {}).length > 0;
256
+ return isIframe && hasPlatformDimensions;
257
+ }
213
258
  get innerInputField() {
214
259
  var _a, _b;
215
260
  return (_b = (_a = this.inputField) === null || _a === void 0 ? void 0 : _a.shadowRoot) === null || _b === void 0 ? void 0 : _b.querySelector('.input-field');
@@ -523,6 +568,9 @@ const Q2Select = /*@__PURE__*/ proxyCustomElement(class Q2Select extends HTMLEle
523
568
  var _a;
524
569
  (_a = this.inputField) === null || _a === void 0 ? void 0 : _a.dispatchEvent(new FocusEvent('focus'));
525
570
  }
571
+ handleOptionListExternalKeydown(event) {
572
+ this.optionList.handleExternalKeydown(event);
573
+ }
526
574
  setStatusMessage(message) {
527
575
  clearTimeout(this.statusMessageTimer);
528
576
  this.statusMessage = '';
@@ -590,11 +638,11 @@ const Q2Select = /*@__PURE__*/ proxyCustomElement(class Q2Select extends HTMLEle
590
638
  }
591
639
  render() {
592
640
  var _a;
593
- return (h("click-elsewhere", { key: 'cf3dd95373d2528d74dbb80da751d1e87dda8934', class: this.wrapperClasses, onChange: this.clickedElsewhere }, h("div", { key: '04db32f27a8cce31ce9ec6dd41c8602eb4312863', "aria-live": "polite", "aria-atomic": "true", role: "status", class: "sr" }, this.statusMessage), h("q2-input", { key: '016b5582ca7ae2d8d4af6ba40ce3961007956b20', ref: el => (this.inputField = el), class: "q2-select-input", label: (this.label && loc(this.label)) || '', value: this.selectedDisplay, clearable: (this.clearable && (!!this.value || !!((_a = this.selectedOptions) === null || _a === void 0 ? void 0 : _a.length))) || undefined, errors: (Array.isArray(this.errors) &&
641
+ return (h("click-elsewhere", { key: '5ddaca63309e27c07930462371702802c2144da5', class: this.wrapperClasses, onChange: this.clickedElsewhere }, h("div", { key: '351bce2f77eb7b94ea18b851550c1a5872cb22eb', "aria-live": "polite", "aria-atomic": "true", role: "status", class: "sr" }, this.statusMessage), h("q2-input", { key: '8fdc6ed733cfc89f38234313cd514413fe158e62', ref: el => (this.inputField = el), class: "q2-select-input", label: (this.label && loc(this.label)) || '', value: this.selectedDisplay, clearable: (this.clearable && (!!this.value || !!((_a = this.selectedOptions) === null || _a === void 0 ? void 0 : _a.length))) || undefined, errors: (Array.isArray(this.errors) &&
594
642
  this.errors.length > 0 &&
595
643
  this.errors.map(error => loc(error))) ||
596
644
  (this.invalid && ['tecton.element.select.invalid']) ||
597
- [], disabled: this.disabled, optional: this.optional, readonly: !!this.readonly, placeholder: this.placeholder || undefined, hideLabel: this.hideLabel, ariaExpanded: `${this.open}`, ariaControls: "option-list", ariaHaspopup: "listbox", "test-id": "toggleDropdown", "hide-messages": true, iconRight: "chevron-down", onClick: this.inputClickHandler, onInput: this.inputInputHandler, onKeyDown: this.inputKeydownHandler, onFocus: this.inputFocusHandler, onBlur: this.inputBlurHandler, onChange: this.inputChangeHandler, badgeValue: this.badgeValue, badgeTheme: this.inputFocused ? 'primary' : undefined, _role: "combobox", _preventEntry: !this.searchable }, this.renderCustomDisplay()), h("div", { key: '57d7e1301f3cfb4060c2818617a534679562e058', class: "custom-display-content", hidden: !this.hasCustomDisplay || !!this.searchText, onClick: this.onCustomDisplayClick }, h("slot", { key: '2e7ed4900fad5eda9cb39df1c5c7a8b3c9d9e656', name: "q2-select-display" })), this.optionsDropdown()));
645
+ [], disabled: this.disabled, optional: this.optional, readonly: !!this.readonly, placeholder: this.placeholder || undefined, hideLabel: this.hideLabel, ariaExpanded: `${this.open}`, ariaControls: "option-list", ariaHaspopup: "listbox", "test-id": "toggleDropdown", "hide-messages": true, iconRight: "chevron-down", onClick: this.inputClickHandler, onInput: this.inputInputHandler, onKeyDown: this.inputKeydownHandler, onFocus: this.inputFocusHandler, onBlur: this.inputBlurHandler, onChange: this.inputChangeHandler, badgeValue: this.badgeValue, badgeTheme: this.inputFocused ? 'primary' : undefined, _role: "combobox", _preventEntry: !this.searchable }, this.renderCustomDisplay()), h("div", { key: 'e5bc3a9153264328398ebca70bea6aa0b2253e80', class: "custom-display-content", hidden: !this.hasCustomDisplay || !!this.searchText, onClick: this.onCustomDisplayClick }, h("slot", { key: '0eb4f6c379375cf945594967246010cd2adcfdb5', name: "q2-select-display" })), this.optionsDropdown()));
598
646
  }
599
647
  optionsDropdown() {
600
648
  return (h("q2-popover", { ref: el => (this.popoverElement = el), controlElement: this.innerInputContainer, open: this.open, minHeight: this.popoverMinHeight, direction: this.popDirection, mode: this.popoverMode || undefined, block: true }, h("div", { class: "popover-content" }, h("q2-option-list", { onPopoverState: this.onPopoverState, ref: el => (this.optionList = el), type: "listbox", id: "option-list", "show-selected": this.showSelected, label: this.listLabel, multiple: this.multiple, selectedOptions: this.structuredSelectedOptions, onChange: this.onOptionListChange }, h("slot", null)), h("div", { class: "popover-top-container", ref: el => (this.popoverTopContainer = el), hidden: !this.multiple && !this.hasPopoverTop, tabindex: "-1" }, h("slot", { name: "popover-top" }), this.multiple && this.visibilityToggle())), h("div", { class: "popover-bottom-container", hidden: !this.hasPopoverBottom, tabindex: "-1" }, h("slot", { name: "popover-bottom" }))));
@@ -633,7 +681,7 @@ const Q2Select = /*@__PURE__*/ proxyCustomElement(class Q2Select extends HTMLEle
633
681
  "popDirection": [513, "pop-direction"],
634
682
  "popoverMode": [1025, "popover-mode"],
635
683
  "readonly": [516],
636
- "searchable": [516],
684
+ "searchable": [1540],
637
685
  "selectedOptions": [1040],
638
686
  "value": [1025],
639
687
  "ariaLabel": [1537, "aria-label"],