q2-tecton-elements 1.49.2 → 1.49.4

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 (363) hide show
  1. package/dist/cjs/click-elsewhere_2.cjs.entry.js +151 -148
  2. package/dist/cjs/click-elsewhere_2.cjs.entry.js.map +1 -1
  3. package/dist/cjs/{index-a93362ed.js → index-4b69f62d.js} +30 -18
  4. package/dist/{q2-tecton-elements/p-84190698.js.map → cjs/index-4b69f62d.js.map} +1 -1
  5. package/dist/cjs/{index-42fcd170.js → index-f69742cf.js} +1 -1
  6. package/dist/cjs/{index-42fcd170.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-legend.cjs.entry.js +1 -1
  31. package/dist/cjs/q2-list.cjs.entry.js +2 -2
  32. package/dist/cjs/q2-loc.cjs.entry.js +2 -2
  33. package/dist/cjs/q2-message.cjs.entry.js +2 -2
  34. package/dist/cjs/q2-month-picker.cjs.entry.js +3 -3
  35. package/dist/cjs/q2-optgroup.cjs.entry.js +2 -2
  36. package/dist/cjs/q2-option-list.cjs.entry.js +13 -11
  37. package/dist/cjs/q2-option-list.cjs.entry.js.map +1 -1
  38. package/dist/cjs/q2-option.cjs.entry.js +1 -1
  39. package/dist/cjs/q2-pagination.cjs.entry.js +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 +3 -3
  44. package/dist/cjs/q2-section.cjs.entry.js +3 -3
  45. package/dist/cjs/q2-select.cjs.entry.js +149 -30
  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 +2 -2
  49. package/dist/cjs/q2-stepper.cjs.entry.js +2 -2
  50. package/dist/cjs/q2-tab-container.cjs.entry.js +2 -2
  51. package/dist/cjs/q2-tab-pane.cjs.entry.js +1 -1
  52. package/dist/cjs/q2-tag.cjs.entry.js +2 -2
  53. package/dist/cjs/q2-tecton-elements.cjs.js +1 -1
  54. package/dist/cjs/q2-textarea.cjs.entry.js +2 -2
  55. package/dist/cjs/q2-tooltip.cjs.entry.js +1 -1
  56. package/dist/cjs/tecton-tab-pane.cjs.entry.js +2 -2
  57. package/dist/collection/collection-manifest.json +5 -5
  58. package/dist/collection/components/q2-action-sheet/q2-action-sheet.js +1 -1
  59. package/dist/collection/components/q2-avatar/q2-avatar.js +1 -1
  60. package/dist/collection/components/q2-calendar/q2-calendar.js +1 -1
  61. package/dist/collection/components/q2-calendar/q2-month-picker.js +2 -2
  62. package/dist/collection/components/q2-carousel/q2-carousel.js +1 -1
  63. package/dist/collection/components/q2-carousel-pane/q2-carousel-pane.js +2 -2
  64. package/dist/collection/components/q2-chart-area/q2-chart-area.js +1 -1
  65. package/dist/collection/components/q2-chart-bar/q2-chart-bar.js +1 -1
  66. package/dist/collection/components/q2-chart-donut/q2-chart-donut.js +1 -1
  67. package/dist/collection/components/q2-checkbox/q2-checkbox.js +1 -1
  68. package/dist/collection/components/q2-checkbox-group/q2-checkbox-group.js +1 -1
  69. package/dist/collection/components/q2-currency/q2-currency.js +1 -1
  70. package/dist/collection/components/q2-data-table/q2-data-table.js +7 -7
  71. package/dist/collection/components/q2-detail/q2-detail.js +1 -1
  72. package/dist/collection/components/q2-dropdown/q2-dropdown.js +3 -1
  73. package/dist/collection/components/q2-dropdown/q2-dropdown.js.map +1 -1
  74. package/dist/collection/components/q2-editable-field/q2-editable-field.js +1 -1
  75. package/dist/collection/components/q2-input/q2-input.js +2 -2
  76. package/dist/collection/components/q2-item/q2-item.js +1 -1
  77. package/dist/collection/components/q2-legend/q2-legend.js +1 -1
  78. package/dist/collection/components/q2-list/q2-list.js +1 -1
  79. package/dist/collection/components/q2-loc/q2-loc.js +1 -1
  80. package/dist/collection/components/q2-message/q2-message.js +1 -1
  81. package/dist/collection/components/q2-optgroup/q2-optgroup.js +1 -1
  82. package/dist/collection/components/q2-option/q2-option.js +1 -1
  83. package/dist/collection/components/q2-option-list/q2-option-list.js +15 -13
  84. package/dist/collection/components/q2-option-list/q2-option-list.js.map +1 -1
  85. package/dist/collection/components/q2-pagination/q2-pagination.js +2 -2
  86. package/dist/collection/components/q2-pill/q2-pill.js +1 -1
  87. package/dist/collection/components/q2-popover/q2-popover.css +18 -10
  88. package/dist/collection/components/q2-popover/q2-popover.js +207 -203
  89. package/dist/collection/components/q2-popover/q2-popover.js.map +1 -1
  90. package/dist/collection/components/q2-radio/q2-radio.js +1 -1
  91. package/dist/collection/components/q2-radio-group/q2-radio-group.js +1 -1
  92. package/dist/collection/components/q2-relative-time/q2-relative-time.js +1 -1
  93. package/dist/collection/components/q2-section/q2-section.js +2 -2
  94. package/dist/collection/components/q2-select/q2-select.js +187 -32
  95. package/dist/collection/components/q2-select/q2-select.js.map +1 -1
  96. package/dist/collection/components/q2-stepper/q2-stepper.js +1 -1
  97. package/dist/collection/components/q2-stepper-pane/q2-stepper-pane.js +3 -3
  98. package/dist/collection/components/q2-stepper-vertical/q2-stepper-vertical.js +1 -1
  99. package/dist/collection/components/q2-tab-container/q2-tab-container.js +1 -1
  100. package/dist/collection/components/q2-tab-pane/q2-tab-pane.js +1 -1
  101. package/dist/collection/components/q2-tag/q2-tag.js +1 -1
  102. package/dist/collection/components/q2-textarea/q2-textarea.js +1 -1
  103. package/dist/collection/components/tecton-tab-pane/tecton-tab-pane.js +2 -2
  104. package/dist/collection/utils/index.js +46 -0
  105. package/dist/collection/utils/index.js.map +1 -1
  106. package/dist/components/index2.js +29 -17
  107. package/dist/components/index2.js.map +1 -1
  108. package/dist/components/q2-action-sheet.js +1 -1
  109. package/dist/components/q2-avatar2.js +1 -1
  110. package/dist/components/q2-calendar.js +1 -1
  111. package/dist/components/q2-carousel-pane.js +2 -2
  112. package/dist/components/q2-carousel.js +1 -1
  113. package/dist/components/q2-chart-area.js +1 -1
  114. package/dist/components/q2-chart-bar.js +1 -1
  115. package/dist/components/q2-chart-donut.js +1 -1
  116. package/dist/components/q2-checkbox-group.js +1 -1
  117. package/dist/components/q2-checkbox2.js +1 -1
  118. package/dist/components/q2-currency.js +1 -1
  119. package/dist/components/q2-data-table.js +1 -1
  120. package/dist/components/q2-detail.js +1 -1
  121. package/dist/components/q2-dropdown.js +3 -1
  122. package/dist/components/q2-dropdown.js.map +1 -1
  123. package/dist/components/q2-editable-field.js +1 -1
  124. package/dist/components/q2-input2.js +1 -1
  125. package/dist/components/q2-item.js +1 -1
  126. package/dist/components/q2-legend2.js +1 -1
  127. package/dist/components/q2-list.js +1 -1
  128. package/dist/components/q2-loc.js +1 -1
  129. package/dist/components/q2-message2.js +1 -1
  130. package/dist/components/q2-month-picker.js +2 -2
  131. package/dist/components/q2-optgroup2.js +1 -1
  132. package/dist/components/q2-option-list2.js +12 -10
  133. package/dist/components/q2-option-list2.js.map +1 -1
  134. package/dist/components/q2-option2.js +1 -1
  135. package/dist/components/q2-pagination.js +2 -2
  136. package/dist/components/q2-pill.js +1 -1
  137. package/dist/components/q2-popover2.js +158 -155
  138. package/dist/components/q2-popover2.js.map +1 -1
  139. package/dist/components/q2-radio-group.js +1 -1
  140. package/dist/components/q2-radio.js +1 -1
  141. package/dist/components/q2-relative-time.js +1 -1
  142. package/dist/components/q2-section.js +2 -2
  143. package/dist/components/q2-select2.js +153 -33
  144. package/dist/components/q2-select2.js.map +1 -1
  145. package/dist/components/q2-stepper-pane.js +1 -1
  146. package/dist/components/q2-stepper-vertical.js +1 -1
  147. package/dist/components/q2-stepper.js +1 -1
  148. package/dist/components/q2-tab-container.js +1 -1
  149. package/dist/components/q2-tab-pane.js +1 -1
  150. package/dist/components/q2-tag.js +1 -1
  151. package/dist/components/q2-textarea.js +1 -1
  152. package/dist/components/tecton-tab-pane.js +2 -2
  153. package/dist/esm/click-elsewhere_2.entry.js +151 -148
  154. package/dist/esm/click-elsewhere_2.entry.js.map +1 -1
  155. package/dist/esm/{index-1c019b24.js → index-3184c760.js} +1 -1
  156. package/dist/esm/{index-1c019b24.js.map → index-3184c760.js.map} +1 -1
  157. package/dist/esm/{index-3c5cd75e.js → index-73081b4d.js} +30 -18
  158. package/dist/esm/index-73081b4d.js.map +1 -0
  159. package/dist/esm/loader.js +1 -1
  160. package/dist/esm/q2-action-sheet.entry.js +2 -2
  161. package/dist/esm/q2-avatar.entry.js +1 -1
  162. package/dist/esm/q2-btn_2.entry.js +1 -1
  163. package/dist/esm/q2-calendar.entry.js +3 -3
  164. package/dist/esm/q2-card.entry.js +1 -1
  165. package/dist/esm/q2-carousel-pane.entry.js +3 -3
  166. package/dist/esm/q2-carousel.entry.js +2 -2
  167. package/dist/esm/q2-chart-area.entry.js +2 -2
  168. package/dist/esm/q2-chart-bar.entry.js +2 -2
  169. package/dist/esm/q2-chart-donut.entry.js +2 -2
  170. package/dist/esm/q2-checkbox-group.entry.js +2 -2
  171. package/dist/esm/q2-checkbox.entry.js +2 -2
  172. package/dist/esm/q2-currency.entry.js +1 -1
  173. package/dist/esm/q2-data-table.entry.js +2 -2
  174. package/dist/esm/q2-detail.entry.js +2 -2
  175. package/dist/esm/q2-dropdown-item.entry.js +1 -1
  176. package/dist/esm/q2-dropdown.entry.js +4 -2
  177. package/dist/esm/q2-dropdown.entry.js.map +1 -1
  178. package/dist/esm/q2-editable-field.entry.js +2 -2
  179. package/dist/esm/q2-icon.entry.js +1 -1
  180. package/dist/esm/q2-input.entry.js +2 -2
  181. package/dist/esm/q2-item.entry.js +2 -2
  182. package/dist/esm/q2-legend.entry.js +1 -1
  183. package/dist/esm/q2-list.entry.js +2 -2
  184. package/dist/esm/q2-loc.entry.js +2 -2
  185. package/dist/esm/q2-message.entry.js +2 -2
  186. package/dist/esm/q2-month-picker.entry.js +3 -3
  187. package/dist/esm/q2-optgroup.entry.js +2 -2
  188. package/dist/esm/q2-option-list.entry.js +13 -11
  189. package/dist/esm/q2-option-list.entry.js.map +1 -1
  190. package/dist/esm/q2-option.entry.js +1 -1
  191. package/dist/esm/q2-pagination.entry.js +3 -3
  192. package/dist/esm/q2-pill.entry.js +2 -2
  193. package/dist/esm/q2-radio-group.entry.js +2 -2
  194. package/dist/esm/q2-radio.entry.js +2 -2
  195. package/dist/esm/q2-relative-time.entry.js +3 -3
  196. package/dist/esm/q2-section.entry.js +3 -3
  197. package/dist/esm/q2-select.entry.js +150 -31
  198. package/dist/esm/q2-select.entry.js.map +1 -1
  199. package/dist/esm/q2-stepper-pane.entry.js +2 -2
  200. package/dist/esm/q2-stepper-vertical.entry.js +2 -2
  201. package/dist/esm/q2-stepper.entry.js +2 -2
  202. package/dist/esm/q2-tab-container.entry.js +2 -2
  203. package/dist/esm/q2-tab-pane.entry.js +1 -1
  204. package/dist/esm/q2-tag.entry.js +2 -2
  205. package/dist/esm/q2-tecton-elements.js +1 -1
  206. package/dist/esm/q2-textarea.entry.js +2 -2
  207. package/dist/esm/q2-tooltip.entry.js +1 -1
  208. package/dist/esm/tecton-tab-pane.entry.js +2 -2
  209. package/dist/jest.setup.js +33 -0
  210. package/dist/jest.setup.js.map +1 -0
  211. package/dist/q2-tecton-elements/{p-d8d9ba1f.entry.js → p-014c6454.entry.js} +2 -2
  212. package/dist/q2-tecton-elements/{p-e4b8f4b3.entry.js → p-01b436c4.entry.js} +2 -2
  213. package/dist/q2-tecton-elements/p-03fcf787.entry.js +2 -0
  214. package/dist/q2-tecton-elements/{p-a657277b.entry.js.map → p-03fcf787.entry.js.map} +1 -1
  215. package/dist/q2-tecton-elements/p-0b33965c.entry.js +2 -0
  216. package/dist/q2-tecton-elements/{p-4da4cb5d.entry.js.map → p-0b33965c.entry.js.map} +1 -1
  217. package/dist/q2-tecton-elements/{p-a177d812.entry.js → p-0c5ff345.entry.js} +2 -2
  218. package/dist/q2-tecton-elements/p-0d46b95e.js +2 -0
  219. package/dist/q2-tecton-elements/p-0d46b95e.js.map +1 -0
  220. package/dist/q2-tecton-elements/{p-db79c056.entry.js → p-152641b0.entry.js} +2 -2
  221. package/dist/q2-tecton-elements/p-19d02441.entry.js +2 -0
  222. package/dist/q2-tecton-elements/p-19d02441.entry.js.map +1 -0
  223. package/dist/q2-tecton-elements/p-1bb08555.entry.js +2 -0
  224. package/dist/q2-tecton-elements/p-1bb08555.entry.js.map +1 -0
  225. package/dist/q2-tecton-elements/{p-dbfab45b.entry.js → p-1be2778a.entry.js} +2 -2
  226. package/dist/q2-tecton-elements/{p-630613c7.entry.js → p-26a23f08.entry.js} +2 -2
  227. package/dist/q2-tecton-elements/{p-da711c59.entry.js → p-2a21bb2a.entry.js} +2 -2
  228. package/dist/q2-tecton-elements/{p-bbf9d36d.entry.js → p-2a471072.entry.js} +2 -2
  229. package/dist/q2-tecton-elements/{p-0852e6fe.entry.js → p-2cd69fc5.entry.js} +2 -2
  230. package/dist/q2-tecton-elements/{p-f6358905.entry.js → p-2cdc1c18.entry.js} +2 -2
  231. package/dist/q2-tecton-elements/p-3b8fbd85.entry.js +2 -0
  232. package/dist/q2-tecton-elements/p-3b8fbd85.entry.js.map +1 -0
  233. package/dist/q2-tecton-elements/{p-1e7fa870.entry.js → p-408f5dd0.entry.js} +2 -2
  234. package/dist/q2-tecton-elements/{p-ea7876eb.entry.js → p-45cf9f0b.entry.js} +2 -2
  235. package/dist/q2-tecton-elements/{p-08176bd0.entry.js → p-4635d8fd.entry.js} +2 -2
  236. package/dist/q2-tecton-elements/{p-333a41ca.entry.js → p-55554655.entry.js} +2 -2
  237. package/dist/q2-tecton-elements/{p-2bcb7e89.entry.js → p-6443ae6f.entry.js} +2 -2
  238. package/dist/q2-tecton-elements/{p-4388e521.entry.js → p-6c64c5e9.entry.js} +2 -2
  239. package/dist/q2-tecton-elements/{p-793a453e.entry.js → p-6e4b1bfe.entry.js} +2 -2
  240. package/dist/q2-tecton-elements/{p-da0cacef.entry.js → p-79cc72fc.entry.js} +2 -2
  241. package/dist/q2-tecton-elements/{p-c8b4f5f7.entry.js → p-7db2c188.entry.js} +2 -2
  242. package/dist/q2-tecton-elements/{p-9ecabc7a.entry.js → p-818fc8a7.entry.js} +2 -2
  243. package/dist/q2-tecton-elements/{p-9c589ab3.entry.js → p-835cf95a.entry.js} +2 -2
  244. package/dist/q2-tecton-elements/{p-e0a6baea.entry.js → p-88ae4e26.entry.js} +2 -2
  245. package/dist/q2-tecton-elements/{p-ec8a0b64.entry.js → p-8feb8b28.entry.js} +2 -2
  246. package/dist/q2-tecton-elements/p-926bf280.entry.js +2 -0
  247. package/dist/q2-tecton-elements/{p-9e90a38a.entry.js.map → p-926bf280.entry.js.map} +1 -1
  248. package/dist/q2-tecton-elements/{p-6c933b14.entry.js → p-97ab03d0.entry.js} +2 -2
  249. package/dist/q2-tecton-elements/{p-e44560d9.entry.js → p-9c9a2662.entry.js} +2 -2
  250. package/dist/q2-tecton-elements/{p-a8e7e591.entry.js → p-a531a983.entry.js} +2 -2
  251. package/dist/q2-tecton-elements/{p-baa2eaa9.entry.js → p-aa7d16b8.entry.js} +2 -2
  252. package/dist/q2-tecton-elements/{p-d78669df.entry.js → p-adf615fc.entry.js} +2 -2
  253. package/dist/q2-tecton-elements/{p-40df4468.entry.js → p-b6e531bb.entry.js} +2 -2
  254. package/dist/q2-tecton-elements/{p-e3ad770b.entry.js → p-b7805a04.entry.js} +2 -2
  255. package/dist/q2-tecton-elements/{p-77a763eb.entry.js → p-bdaa03ca.entry.js} +2 -2
  256. package/dist/q2-tecton-elements/{p-25bfe0b2.entry.js → p-be03e61f.entry.js} +2 -2
  257. package/dist/q2-tecton-elements/{p-05b30f98.entry.js → p-c08dba38.entry.js} +2 -2
  258. package/dist/q2-tecton-elements/{p-5037fa67.entry.js → p-dba6c931.entry.js} +2 -2
  259. package/dist/q2-tecton-elements/{p-93680d12.entry.js → p-e3d214f7.entry.js} +2 -2
  260. package/dist/q2-tecton-elements/{p-76b98623.entry.js → p-e5e9718c.entry.js} +2 -2
  261. package/dist/q2-tecton-elements/{p-2810ba28.entry.js → p-e844e6f1.entry.js} +2 -2
  262. package/dist/q2-tecton-elements/{p-7b9a6bb7.entry.js → p-ecddccef.entry.js} +2 -2
  263. package/dist/q2-tecton-elements/{p-be518818.js → p-f1e887f5.js} +1 -1
  264. package/dist/q2-tecton-elements/{p-c5aac064.entry.js → p-f6a9e28d.entry.js} +2 -2
  265. package/dist/q2-tecton-elements/{p-5775b02b.entry.js → p-fdf819d2.entry.js} +2 -2
  266. package/dist/q2-tecton-elements/q2-tecton-elements.esm.js +1 -1
  267. package/dist/q2-tecton-elements/q2-tecton-elements.esm.js.map +1 -1
  268. package/dist/test/elements/q2-calendar-test.e2e.js +2 -2
  269. package/dist/test/elements/q2-calendar-test.e2e.js.map +1 -1
  270. package/dist/test/elements/q2-dropdown-test.e2e.js +2 -14
  271. package/dist/test/elements/q2-dropdown-test.e2e.js.map +1 -1
  272. package/dist/test/elements/q2-pagination-test.e2e.js +1 -0
  273. package/dist/test/elements/q2-pagination-test.e2e.js.map +1 -1
  274. package/dist/test/elements/q2-pill-test.e2e.js +1 -1
  275. package/dist/test/elements/q2-pill-test.e2e.js.map +1 -1
  276. package/dist/test/elements/q2-popover-test.e2e.js +1 -34
  277. package/dist/test/elements/q2-popover-test.e2e.js.map +1 -1
  278. package/dist/test/elements/q2-popover-test.spec.js +902 -511
  279. package/dist/test/elements/q2-popover-test.spec.js.map +1 -1
  280. package/dist/test/elements/q2-select-test.e2e.js +1 -15
  281. package/dist/test/elements/q2-select-test.e2e.js.map +1 -1
  282. package/dist/test/elements/q2-select-test.spec.js +552 -0
  283. package/dist/test/elements/q2-select-test.spec.js.map +1 -0
  284. package/dist/test/elements/q2-tag-test.e2e.js +1 -1
  285. package/dist/test/elements/q2-tag-test.e2e.js.map +1 -1
  286. package/dist/types/builds/q2e/development/tecton/tecton/packages/q2-tecton-elements/.stencil/jest.setup.d.ts +10 -0
  287. package/dist/types/components/q2-action-sheet/q2-action-sheet.d.ts +60 -0
  288. package/dist/types/components/q2-calendar/q2-calendar.d.ts +324 -0
  289. package/dist/types/components/q2-carousel/q2-carousel.d.ts +2 -2
  290. package/dist/types/components/q2-data-table/q2-data-table.d.ts +223 -0
  291. package/dist/types/components/q2-dropdown/q2-dropdown.d.ts +130 -0
  292. package/dist/types/components/q2-dropdown-item/q2-dropdown-item.d.ts +50 -0
  293. package/dist/types/components/q2-editable-field/q2-editable-field.d.ts +140 -0
  294. package/dist/types/components/q2-loading/skeleton/shapes.d.ts +1 -0
  295. package/dist/types/components/q2-optgroup/q2-optgroup.d.ts +1 -1
  296. package/dist/types/components/q2-option-list/q2-option-list.d.ts +99 -0
  297. package/dist/types/components/q2-pagination/q2-pagination.d.ts +60 -0
  298. package/dist/types/components/q2-pill/q2-pill.d.ts +102 -0
  299. package/dist/types/components/q2-popover/q2-popover.d.ts +31 -31
  300. package/dist/types/components/q2-select/q2-select.d.ts +260 -0
  301. package/dist/types/components/q2-stepper/q2-stepper.d.ts +52 -0
  302. package/dist/types/components/q2-stepper-vertical/q2-stepper-vertical.d.ts +62 -0
  303. package/dist/types/components/q2-tab-container/q2-tab-container.d.ts +2 -2
  304. package/dist/types/components/q2-tag/q2-tag.d.ts +59 -0
  305. package/dist/types/components.d.ts +8 -0
  306. package/dist/types/utils/action-sheet.d.ts +12 -0
  307. package/dist/types/utils/index.d.ts +4 -0
  308. package/package.json +3 -3
  309. package/dist/cjs/index-a93362ed.js.map +0 -1
  310. package/dist/esm/index-3c5cd75e.js.map +0 -1
  311. package/dist/q2-tecton-elements/p-089a7a1e.entry.js +0 -2
  312. package/dist/q2-tecton-elements/p-089a7a1e.entry.js.map +0 -1
  313. package/dist/q2-tecton-elements/p-2e6669a7.entry.js +0 -2
  314. package/dist/q2-tecton-elements/p-2e6669a7.entry.js.map +0 -1
  315. package/dist/q2-tecton-elements/p-4da4cb5d.entry.js +0 -2
  316. package/dist/q2-tecton-elements/p-84190698.js +0 -2
  317. package/dist/q2-tecton-elements/p-9e90a38a.entry.js +0 -2
  318. package/dist/q2-tecton-elements/p-a657277b.entry.js +0 -2
  319. package/dist/q2-tecton-elements/p-d2d3d95b.entry.js +0 -2
  320. package/dist/q2-tecton-elements/p-d2d3d95b.entry.js.map +0 -1
  321. /package/dist/q2-tecton-elements/{p-d8d9ba1f.entry.js.map → p-014c6454.entry.js.map} +0 -0
  322. /package/dist/q2-tecton-elements/{p-e4b8f4b3.entry.js.map → p-01b436c4.entry.js.map} +0 -0
  323. /package/dist/q2-tecton-elements/{p-a177d812.entry.js.map → p-0c5ff345.entry.js.map} +0 -0
  324. /package/dist/q2-tecton-elements/{p-db79c056.entry.js.map → p-152641b0.entry.js.map} +0 -0
  325. /package/dist/q2-tecton-elements/{p-dbfab45b.entry.js.map → p-1be2778a.entry.js.map} +0 -0
  326. /package/dist/q2-tecton-elements/{p-630613c7.entry.js.map → p-26a23f08.entry.js.map} +0 -0
  327. /package/dist/q2-tecton-elements/{p-da711c59.entry.js.map → p-2a21bb2a.entry.js.map} +0 -0
  328. /package/dist/q2-tecton-elements/{p-bbf9d36d.entry.js.map → p-2a471072.entry.js.map} +0 -0
  329. /package/dist/q2-tecton-elements/{p-0852e6fe.entry.js.map → p-2cd69fc5.entry.js.map} +0 -0
  330. /package/dist/q2-tecton-elements/{p-f6358905.entry.js.map → p-2cdc1c18.entry.js.map} +0 -0
  331. /package/dist/q2-tecton-elements/{p-1e7fa870.entry.js.map → p-408f5dd0.entry.js.map} +0 -0
  332. /package/dist/q2-tecton-elements/{p-ea7876eb.entry.js.map → p-45cf9f0b.entry.js.map} +0 -0
  333. /package/dist/q2-tecton-elements/{p-08176bd0.entry.js.map → p-4635d8fd.entry.js.map} +0 -0
  334. /package/dist/q2-tecton-elements/{p-333a41ca.entry.js.map → p-55554655.entry.js.map} +0 -0
  335. /package/dist/q2-tecton-elements/{p-2bcb7e89.entry.js.map → p-6443ae6f.entry.js.map} +0 -0
  336. /package/dist/q2-tecton-elements/{p-4388e521.entry.js.map → p-6c64c5e9.entry.js.map} +0 -0
  337. /package/dist/q2-tecton-elements/{p-793a453e.entry.js.map → p-6e4b1bfe.entry.js.map} +0 -0
  338. /package/dist/q2-tecton-elements/{p-da0cacef.entry.js.map → p-79cc72fc.entry.js.map} +0 -0
  339. /package/dist/q2-tecton-elements/{p-c8b4f5f7.entry.js.map → p-7db2c188.entry.js.map} +0 -0
  340. /package/dist/q2-tecton-elements/{p-9ecabc7a.entry.js.map → p-818fc8a7.entry.js.map} +0 -0
  341. /package/dist/q2-tecton-elements/{p-9c589ab3.entry.js.map → p-835cf95a.entry.js.map} +0 -0
  342. /package/dist/q2-tecton-elements/{p-e0a6baea.entry.js.map → p-88ae4e26.entry.js.map} +0 -0
  343. /package/dist/q2-tecton-elements/{p-ec8a0b64.entry.js.map → p-8feb8b28.entry.js.map} +0 -0
  344. /package/dist/q2-tecton-elements/{p-6c933b14.entry.js.map → p-97ab03d0.entry.js.map} +0 -0
  345. /package/dist/q2-tecton-elements/{p-e44560d9.entry.js.map → p-9c9a2662.entry.js.map} +0 -0
  346. /package/dist/q2-tecton-elements/{p-a8e7e591.entry.js.map → p-a531a983.entry.js.map} +0 -0
  347. /package/dist/q2-tecton-elements/{p-baa2eaa9.entry.js.map → p-aa7d16b8.entry.js.map} +0 -0
  348. /package/dist/q2-tecton-elements/{p-d78669df.entry.js.map → p-adf615fc.entry.js.map} +0 -0
  349. /package/dist/q2-tecton-elements/{p-40df4468.entry.js.map → p-b6e531bb.entry.js.map} +0 -0
  350. /package/dist/q2-tecton-elements/{p-e3ad770b.entry.js.map → p-b7805a04.entry.js.map} +0 -0
  351. /package/dist/q2-tecton-elements/{p-77a763eb.entry.js.map → p-bdaa03ca.entry.js.map} +0 -0
  352. /package/dist/q2-tecton-elements/{p-25bfe0b2.entry.js.map → p-be03e61f.entry.js.map} +0 -0
  353. /package/dist/q2-tecton-elements/{p-05b30f98.entry.js.map → p-c08dba38.entry.js.map} +0 -0
  354. /package/dist/q2-tecton-elements/{p-5037fa67.entry.js.map → p-dba6c931.entry.js.map} +0 -0
  355. /package/dist/q2-tecton-elements/{p-93680d12.entry.js.map → p-e3d214f7.entry.js.map} +0 -0
  356. /package/dist/q2-tecton-elements/{p-76b98623.entry.js.map → p-e5e9718c.entry.js.map} +0 -0
  357. /package/dist/q2-tecton-elements/{p-2810ba28.entry.js.map → p-e844e6f1.entry.js.map} +0 -0
  358. /package/dist/q2-tecton-elements/{p-7b9a6bb7.entry.js.map → p-ecddccef.entry.js.map} +0 -0
  359. /package/dist/q2-tecton-elements/{p-be518818.js.map → p-f1e887f5.js.map} +0 -0
  360. /package/dist/q2-tecton-elements/{p-c5aac064.entry.js.map → p-f6a9e28d.entry.js.map} +0 -0
  361. /package/dist/q2-tecton-elements/{p-5775b02b.entry.js.map → p-fdf819d2.entry.js.map} +0 -0
  362. /package/dist/types/{workspace/workspace/tecton-production_release_1.49.x → builds/q2e/development/tecton/tecton}/packages/q2-tecton-elements/.stencil/test/elements/q2-detail/slot-component.d.ts +0 -0
  363. /package/dist/types/{workspace/workspace/tecton-production_release_1.49.x → builds/q2e/development/tecton/tecton}/packages/q2-tecton-elements/.stencil/test/helpers.d.ts +0 -0
@@ -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;;QAKlB;;WAEG;QACH,kBAAa,GAAG,EAAE,CAAC;QACnB,kDAAkD;QAClD,uBAAkB,GAAY,KAAK,CAAC;QAkOpC,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;QAYF,6BAAwB,GAAG,KAAK,IAAI,EAAE;YAClC,MAAM,EAAE,cAAc,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC;YAE3E,IAAI,KAAK,KAAK,OAAO,EAAE,CAAC;gBACpB,gBAAgB,CAAC,KAAK,CAAC,WAAW,CAAC,kBAAkB,EAAE,GAAG,CAAC,CAAC;gBAC5D,gBAAgB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,MAAM,CAAC,cAAc,CAAC,MAAM;YACpC,KAAK,EAAE,MAAM,CAAC,cAAc,CAAC,KAAK;SAC1B,CAAC;IACjB,CAAC;IAYD,aAAa;IACb,yBAAyB;IAEzB,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,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;YAExB,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGJ","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 } from '../../utils';\n\n@Component({ tag: 'q2-popover', shadow: true, styleUrl: 'q2-popover.scss' })\nexport class Q2Popover implements ComponentInterface {\n // #region Own Properties\n\n containerElement: HTMLDivElement;\n contentElement: HTMLDivElement;\n /**\n * The number of pixels to leave between the popover and the edge of the viewport\n */\n displayBuffer = 10;\n /** remove when Popover API is supported in iOS */\n orientationChanged: boolean = false;\n rootElementRect: DOMRect;\n\n // #endregion\n // #region Host HTML Element\n\n @Element()\n hostElement: HTMLElement;\n\n // #endregion\n // #region State Properties\n\n @State()\n currentDirection: 'down' | 'up' = undefined;\n\n // remove `show` when Popover API is supported in iOS\n @State()\n show: boolean = false;\n\n // #endregion\n // #region Public Property API\n\n /** Aligns the popover to the left or right side of the control element. */\n @Prop({ reflect: true })\n align: 'left' | 'right';\n\n /** Indicates the popover will match the width of its parent element. */\n @Prop({ reflect: true })\n block: boolean;\n\n /** The element that controls the popover's behavior. */\n @Prop()\n controlElement: HTMLElement;\n\n /**\n * Force the direction of the popover when it opens.\n * If no value is passed, the component will auto-detect the direction based on available space.\n */\n @Prop({ reflect: true })\n direction: 'up' | 'down';\n\n /** @deprecated */\n @Prop()\n minHeight: number;\n\n @Prop()\n mode: 'legacy' = null;\n\n /** Controls whether the popover is open or closed. */\n @Prop({ reflect: true, mutable: true })\n open: boolean;\n\n // #endregion\n // #region Events\n\n /**\n * Emitted when the popover is opened or closed.\n */\n @Event()\n popoverStateChanged: EventEmitter<{ open: boolean }>;\n\n // #endregion\n // #region Component Lifecycle Events\n\n disconnectedCallback() {\n this.removeViewportListeners();\n }\n\n componentDidLoad() {\n this.handleMinHeight();\n if (this.open) this.determinePopDirection();\n }\n\n // #endregion\n // #region Listeners\n\n @Listen('popoverState')\n popoverStateHandler(event: CustomEvent<{ open: boolean }>) {\n const {\n detail: { open },\n } = event;\n if (open === this.open) return;\n\n this.open = open;\n event.stopPropagation();\n }\n\n // #endregion\n // #region Public Methods API\n\n @Method()\n async scrollContainerTo(options: ScrollToOptions) {\n this.containerElement.scrollTo(options);\n }\n\n @Method()\n async toggle() {\n this.open = !this.open;\n }\n\n // #endregion\n // #region Watchers\n\n @Watch('minHeight')\n minHeightProvided() {\n this.handleMinHeight();\n }\n\n @Watch('open')\n async openChanged(open: boolean) {\n this.setRootElement();\n this.popoverStateChanged.emit({ open });\n\n if (open) {\n this.addViewportListeners();\n this.determinePopDirection();\n } else {\n this.removeViewportListeners();\n this.currentDirection = undefined;\n this.show = false;\n await waitForNextPaint();\n this.clearCSSProperties();\n }\n }\n\n // #endregion\n // #region Local Methods\n\n get 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 addViewportListeners() {\n window.addEventListener('resize', this.viewPortOrientationChanged);\n // #region remove when Popover API is supported in iOS\n window.addEventListener('scroll', this.viewPortChanged, { passive: true, capture: true });\n screen?.orientation?.addEventListener('change', this.viewPortOrientationChanged);\n window.addEventListener('orientationchange', this.viewPortOrientationChanged);\n\n // #endregion\n }\n\n clearCSSProperties() {\n this.containerElement.style.removeProperty('--comp-pop-max-height');\n this.containerElement.style.removeProperty('--comp-pop-top');\n this.containerElement.style.removeProperty('--comp-pop-bottom');\n this.containerElement.style.removeProperty('--comp-pop-left');\n this.containerElement.style.removeProperty('--comp-pop-right');\n this.containerElement.style.removeProperty('--comp-pop-width');\n this.containerElement.style.removeProperty('--comp-pop-opacity');\n }\n\n async determinePopDirection() {\n const { containerElement, controlElement, 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 handleMinHeight = () => {\n if (this.minHeight) {\n handleDeprecationWarning(this, 'minHeight', 'prop');\n }\n };\n\n removeViewportListeners() {\n window.removeEventListener('resize', this.viewPortOrientationChanged);\n // #region remove when Popover API is supported in iOS\n window.removeEventListener('scroll', this.viewPortChanged);\n screen?.orientation?.removeEventListener('orientationchange', this.viewPortOrientationChanged);\n window.removeEventListener('orientationchange', this.viewPortOrientationChanged);\n\n // #endregion\n }\n\n setAbsoluteCSSProperties = async () => {\n const { controlElement, containerElement, currentDirection, align } = this;\n\n if (align === 'right') {\n containerElement.style.setProperty('--comp-pop-right', '0');\n containerElement.style.setProperty('--comp-pop-left', 'unset');\n } else {\n containerElement.style.setProperty('--comp-pop-left', '0');\n containerElement.style.setProperty('--comp-pop-right', 'unset');\n }\n\n if (this.block) {\n containerElement.style.setProperty('--comp-pop-width', '100%');\n }\n\n if (currentDirection === 'up') {\n const controlStyle = getComputedStyle(controlElement);\n const controlSize =\n parseInt(controlStyle.height || '0') +\n parseInt(controlStyle.borderTopWidth || '0') +\n parseInt(controlStyle.borderBottomWidth || '0');\n\n containerElement.style.setProperty('--comp-pop-bottom', `${controlSize}px`);\n }\n\n // Wait for one paint to prevent layout thrashing\n await waitForNextPaint();\n containerElement.style.setProperty('--comp-pop-opacity', '1');\n };\n\n setDirectionAndShow(direction: 'up' | 'down') {\n this.setRootElement();\n // Due to some runtime inconsistency across devices/browsers we need to add one more check here because the\n // popover can be closed between the time the popover is opened and the time the direction is determined\n const isOpen = this.open;\n if (!isOpen) return;\n\n this.currentDirection = direction;\n this.show = true;\n if (this.mode === 'legacy') {\n this.setAbsoluteCSSProperties();\n } else {\n this.setFixedCSSProperties();\n }\n }\n\n setFixedCSSProperties = async () => {\n const { controlElement, containerElement, currentDirection, rootElementRect } = this;\n const {\n top: controlTop,\n bottom: controlBottom,\n left: controlLeft,\n right: controlRight,\n } = controlElement?.getBoundingClientRect?.() ?? {\n top: 0,\n bottom: 0,\n left: 0,\n right: 0,\n };\n const popoverLeft: number = controlLeft - rootElementRect.left;\n\n if (this.block) containerElement.style.setProperty('--comp-pop-width', `${controlElement.offsetWidth || 0}px`);\n containerElement.style.setProperty('--comp-pop-left', `${popoverLeft}px`);\n containerElement.style.setProperty(\n '--comp-pop-right',\n `${rootElementRect.width + rootElementRect.left - controlRight}px`\n );\n\n if (currentDirection === 'up') {\n containerElement.style.setProperty(\n '--comp-pop-bottom',\n `${rootElementRect.height + rootElementRect.top - controlTop}px`\n );\n }\n if (currentDirection === 'down') {\n containerElement.style.setProperty('--comp-pop-top', `${controlBottom - rootElementRect.top}px`);\n }\n\n // Wait for one paint to prevent layout thrashing\n await waitForNextPaint();\n containerElement.style.setProperty('--comp-pop-opacity', '1');\n };\n\n setRootElement() {\n let currentElement: HTMLElement = this.hostElement;\n\n while (currentElement && currentElement !== document.documentElement) {\n const computedStyle = window.getComputedStyle(currentElement);\n\n // Check if the element has any styles applied that create a new containg block\n if (\n computedStyle.transform !== 'none' ||\n computedStyle.filter !== 'none' ||\n computedStyle.perspective !== 'none' ||\n computedStyle.containerType !== 'normal' ||\n ['transform', 'perspective', 'filter'].includes(computedStyle.willChange) ||\n ['layout', 'paint', 'strict', 'content'].includes(computedStyle.contain)\n ) {\n this.rootElementRect = currentElement.getBoundingClientRect();\n return;\n }\n\n const rootNode = currentElement.getRootNode();\n const isRootNodeWebComponent =\n typeof ShadowRoot !== 'undefined' &&\n rootNode instanceof ShadowRoot &&\n rootNode.host instanceof HTMLElement;\n if (isRootNodeWebComponent) {\n currentElement = rootNode.host;\n } else {\n currentElement = currentElement.parentElement;\n }\n }\n\n // Return the document's bounding rect if no element is found\n this.rootElementRect = {\n top: 0,\n bottom: 0,\n left: 0,\n right: 0,\n height: window.visualViewport.height,\n width: window.visualViewport.width,\n } as DOMRect;\n }\n\n viewPortChanged = () => {\n if (!this.open) return;\n this.determinePopDirection();\n };\n\n viewPortOrientationChanged = () => {\n this.orientationChanged = true;\n this.viewPortChanged();\n };\n\n // #endregion\n // #region Render Methods\n\n render() {\n const containerClasses = ['container', this.currentDirection];\n if (this.show) containerClasses.push('show');\n if (this.mode === 'legacy') containerClasses.push('legacy');\n\n return (\n <div\n ref={el => (this.containerElement = el)}\n class={containerClasses.join(' ')}\n test-id=\"outerContainer\"\n >\n <div\n ref={el => (this.contentElement = el)}\n class=\"content\"\n >\n <slot />\n </div>\n </div>\n );\n }\n\n // #endregion\n}\n"]}
1
+ {"version":3,"file":"q2-popover.js","s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K,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, { 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 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"]}
@@ -75,7 +75,7 @@ export class Q2Radio {
75
75
  // #endregion
76
76
  // #region Render Methods
77
77
  render() {
78
- return (h("div", { key: '210cc7331f317028a89673653eef957e002bccfc', class: this.groupTileLayout ? 'radio-tile' : 'radio-container' }, h("input", { key: '2323fefb73a45336442e51e02e07cc20d8ff7237', 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: 'a79888b871fcbcd8234779f508edbdfbb8a6d778', htmlFor: this._id, class: this.hideLabel ? 'label-hidden' : undefined, "test-id": "radioButton" }, !this.groupTileLayout && (h("svg", { key: 'a7268ee6225beeeea0cb719d7c6d2feca48614de', viewBox: "0 0 18 18" }, h("circle", { key: '41c33face1190dc510c7f9f2f53fe1796a918188', stroke: "none", fill: "none", cx: "9", cy: "9", r: "8" }), h("circle", { key: '947c9fbc47945c59678d9fa08c042d9e47a56a51', stroke: "none", fill: "none", cx: "9", cy: "9", r: "4" }))), !this.hideLabel && (h("div", { key: '46654e6f4ff3596983f1e20b8a501bedf882bcec', class: "label-content" }, (this.label && loc(this.label)) || '', h("slot", { key: 'aef00a9fc70c904d4d09561c430c3df65fc36121' }))))));
78
+ return (h("div", { key: '76206e3b68f37c2cb2b3f250baaeeb3ab527e7dd', class: this.groupTileLayout ? 'radio-tile' : 'radio-container' }, h("input", { key: '8eb165ce7393d49b3392d31dbf627ba4f41e55ac', 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: '68b886ae9d8dd3c8f81a303efa134032f5202861', htmlFor: this._id, class: this.hideLabel ? 'label-hidden' : undefined, "test-id": "radioButton" }, !this.groupTileLayout && (h("svg", { key: '3347f80f5b1db0618ef9f1e47b107348c78739c1', viewBox: "0 0 18 18" }, h("circle", { key: 'c28f245892d655e8e9ace735ed99dd38f2e52885', stroke: "none", fill: "none", cx: "9", cy: "9", r: "8" }), h("circle", { key: '2cc9cb7577e78fc7fce8cf7c301c6cc5a052439e', stroke: "none", fill: "none", cx: "9", cy: "9", r: "4" }))), !this.hideLabel && (h("div", { key: 'c4b26258a82523f7cc5517409b23443b85eff770', class: "label-content" }, (this.label && loc(this.label)) || '', h("slot", { key: '29b3cc0b2466a43eec80a076e5a0b798bb2ca6ac' }))))));
79
79
  }
80
80
  static get is() { return "q2-radio"; }
81
81
  static get encapsulation() { return "shadow"; }
@@ -174,7 +174,7 @@ export class Q2RadioGroup {
174
174
  const showLabel = this.label || this.optional || this.readonly;
175
175
  const { hasError } = this;
176
176
  const showLabelRow = showLabel || hasError;
177
- return (h(Fragment, { key: '391daee73ed99703223e6d72ea8109cdb0f3a728' }, showLabelRow && (h("div", { key: '7e9b358ff98e87551783c7ccfeb789a27c9282cc', class: "label-row" }, showLabel && h("div", { key: '198215d1006af99957bd108540f58b36162c102a', class: "group-legend" }, labelDOM(this)), hasError && (h("q2-icon", { key: 'bb6e82ecc48c28eb6efae09d8f8cd03f1a4bc957', type: "error", "test-id": "iconError" })))), h("fieldset", { key: 'fe4e72b6c8cbd827909f4b6caa47e96699f29163', onChange: this.onInnerRadioChange, "aria-invalid": `${this.hasError}` }, showLabel && h("legend", { key: '963d3f6d55511c5cf5ca99218addaaa12a34f505', class: "sr" }, labelDOM(this)), this.inputDom())));
177
+ return (h(Fragment, { key: '3536f41532e1cc18001e2e1d8f8f4c9e8223dd67' }, showLabelRow && (h("div", { key: '4ec07666943cb4b0a25ad2dd70fdc26b072affb0', class: "label-row" }, showLabel && h("div", { key: '0442988f9575a44d0d0de1e7885be9239e06ba64', class: "group-legend" }, labelDOM(this)), hasError && (h("q2-icon", { key: 'e455ee3337a5e401c5a4a4a9f8276bff189b26f2', type: "error", "test-id": "iconError" })))), h("fieldset", { key: '2f849878d217decc154d9d04fa8182b3d1b1d79a', onChange: this.onInnerRadioChange, "aria-invalid": `${this.hasError}` }, showLabel && h("legend", { key: '95e7c2f3fcb370048801b4f6be953047011a83f2', class: "sr" }, labelDOM(this)), this.inputDom())));
178
178
  }
179
179
  static get is() { return "q2-radio-group"; }
180
180
  static get encapsulation() { return "shadow"; }
@@ -136,7 +136,7 @@ export class Q2RelativeTime {
136
136
  // #region Render Methods
137
137
  render() {
138
138
  const { shouldShow, displayedMessage } = this;
139
- return h(Fragment, { key: '26038fa24d32109482710ec28cb689e1db340abd' }, shouldShow ? h("time", { dateTime: displayedMessage }, displayedMessage) : null);
139
+ return h(Fragment, { key: '14b866b175302504dfb838edd3181ff68ffd004d' }, shouldShow ? h("time", { dateTime: displayedMessage }, displayedMessage) : null);
140
140
  }
141
141
  static get is() { return "q2-relative-time"; }
142
142
  static get encapsulation() { return "shadow"; }
@@ -158,9 +158,9 @@ export class Q2Section {
158
158
  wrapperClasses.push('is-transitioning');
159
159
  }
160
160
  const showDefaultHeader = !this.hasYieldedHeader && !!this.label;
161
- return (h("section", { key: '550b55c43f6a037c30df83d5bdd3c5f6c18b548a', class: "wrapper" }, h("header", { key: '74a281cd6434a7e33d32ed35d46752d313b7e226', class: hasHeader ? 'has-header' : '' }, h("div", { key: 'bccad40c23075adf4d25eedfb6acc733a3a8f57e', class: "header-content", id: this.titleId, onClick: this.collapsible && this.onHeaderClick }, showDefaultHeader && h("h2", { key: '0b7c240a0b9cc245d2d8426092c805146f15b553', class: "title" }, loc(this.label)), h("div", { key: '2aacff31aadee0770129b767d3aed1f43fc626de', ref: el => (this.headerSlotWrapper = el), class: "header-slot-wrapper" }, h("slot", { key: '3317e6865bc814005f03ea7dd0b431885739f5d1', ref: (el) => (this.headerSlot = el), name: "q2-section-header" }))), this.collapsible && !this.noCollapseIcon && (h("q2-btn", { key: '1462f06ccc824c1db7439e015a887763d323620d', 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: '21efcebc32fc92ee1912532552f8efa8fc1552eb', type: "chevron-up" })))), h("div", { key: '6a6de47b233079f00743e6a23fd25dc66acce2c2', class: wrapperClasses.join(' '), id: this.contentId, "aria-labelledby": this.titleId, role: "region", onTransitionEnd: this.onTransitionEnd, style: this.collapsible && {
161
+ return (h("section", { key: '15ae06a9de2e0b3c562490d81a3898a0707f2cce', class: "wrapper" }, h("header", { key: 'e33c31b58b6235d4042fb1b4e1eea9bb47f92be2', class: hasHeader ? 'has-header' : '' }, h("div", { key: '31982f44c7b40194c2477cdf32637c9d2e8677f1', class: "header-content", id: this.titleId, onClick: this.collapsible && this.onHeaderClick }, showDefaultHeader && h("h2", { key: 'a95970510134e283b405a4324fd9c44069a7ea2c', class: "title" }, loc(this.label)), h("div", { key: 'bbcfe0d2ed8c999602a00b3eaa5742ab5289d176', ref: el => (this.headerSlotWrapper = el), class: "header-slot-wrapper" }, h("slot", { key: 'b265fc36e484af03a45fb8012f2a158f85929122', ref: (el) => (this.headerSlot = el), name: "q2-section-header" }))), this.collapsible && !this.noCollapseIcon && (h("q2-btn", { key: 'e9b2dafa5001089919419016ff2c7bb1c4bdb443', 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: '51902e05e71e027d27e28882c7be8a216cb5e907', type: "chevron-up" })))), h("div", { key: 'c16a8a3c128854b16cfc0c299b660efc94b139d9', class: wrapperClasses.join(' '), id: this.contentId, "aria-labelledby": this.titleId, role: "region", onTransitionEnd: this.onTransitionEnd, style: this.collapsible && {
162
162
  height: this.contentHeight,
163
- } }, h("div", { key: '8d70829cef7eb0f671779ce89ecab354bb33a028', ref: el => (this.contentContainer = el), class: "content", tabindex: "-1" }, h("slot", { key: '88e723ba02fecd1c3845c9956c9e2b1769623d7a', ref: (el) => (this.contentSlot = el) })))));
163
+ } }, h("div", { key: 'acb0567f7096086de10cc777438cfa2052586bc7', ref: el => (this.contentContainer = el), class: "content", tabindex: "-1" }, h("slot", { key: 'e13d27b6f075bc8b50baa382b620843dea4db57f', ref: (el) => (this.contentSlot = el) })))));
164
164
  }
165
165
  static get is() { return "q2-section"; }
166
166
  static get encapsulation() { return "shadow"; }
@@ -1,15 +1,82 @@
1
- import { h, } from "@stencil/core";
2
- import { handleAriaLabel, isEventFromElement, isHostLosingFocus, isRelatedTargetWithinHost, loc, overrideFocus, waitForNextPaint, } from "../../utils";
1
+ import { h, Fragment, } from "@stencil/core";
2
+ import { createGuid, handleAriaLabel, isEventFromElement, isMobile, isRelatedTargetWithinHost, loc, overrideFocus, waitForNextPaint, } from "../../utils";
3
3
  import { shouldShowActionSheet, showActionSheetList } from "../../utils/action-sheet";
4
+ /**
5
+ * @slot popover-top - An optional slot to display custom content persistently at the top of the popover. This is **not** compatible with the action sheet workflow.
6
+ * @slot popover-bottom - An optional slot to display custom content persistently at the bottom of the popover. This is **not** compatible with the action sheet workflow.
7
+ * @slot q2-select-display - An optional slot to display custom HTML content in the display area.
8
+ */
4
9
  export class Q2Select {
5
10
  constructor() {
6
11
  var _a;
12
+ // #region Own Properties
13
+ this.guid = createGuid();
14
+ this.lastTouchWasInPopover = false;
7
15
  this.scheduledAfterRender = [];
16
+ this.addTouchEventListeners = () => {
17
+ if (!isMobile() || !this.popoverElement)
18
+ return;
19
+ this.popoverElement.addEventListener('touchstart', this.handleTouchStart, { passive: true });
20
+ };
8
21
  this.clickedElsewhere = (event) => {
9
22
  const target = event.target;
10
23
  if (target.localName !== 'click-elsewhere')
11
24
  return;
12
25
  event.stopPropagation();
26
+ const { popoverElement } = this;
27
+ if (!popoverElement)
28
+ return;
29
+ popoverElement.open = false;
30
+ this.innerInputField.blur();
31
+ };
32
+ this.destroyEventListeners = () => {
33
+ var _a;
34
+ if (!isMobile())
35
+ return;
36
+ (_a = screen === null || screen === void 0 ? void 0 : screen.orientation) === null || _a === void 0 ? void 0 : _a.removeEventListener('change', this.handleOrientationChange);
37
+ window.removeEventListener('resize', this.handleOrientationChange);
38
+ visualViewport === null || visualViewport === void 0 ? void 0 : visualViewport.removeEventListener('resize', this.handleOrientationChange);
39
+ this.removeTouchEventListeners();
40
+ };
41
+ this.handleOrientationChange = () => {
42
+ var _a, _b, _c;
43
+ if (!isMobile())
44
+ return;
45
+ let isLandscape;
46
+ if (this.isModule) {
47
+ isLandscape = (_a = window.Tecton) === null || _a === void 0 ? void 0 : _a.platformDimensions.orientationType.includes('landscape');
48
+ }
49
+ else {
50
+ 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');
51
+ }
52
+ if (isLandscape && this.searchable)
53
+ this.searchable = false;
54
+ if (!isLandscape)
55
+ this.searchable = this.originalSearchable;
56
+ };
57
+ this.handleTouchStart = (event) => {
58
+ if (document.activeElement === this.hostElement) {
59
+ const target = event.target;
60
+ if (target && target !== this.hostElement) {
61
+ this.inputFocused = false;
62
+ this.lastTouchWasInPopover = true;
63
+ target.focus();
64
+ }
65
+ }
66
+ };
67
+ this.initEventListeners = () => {
68
+ var _a;
69
+ if (!isMobile())
70
+ return;
71
+ (_a = screen === null || screen === void 0 ? void 0 : screen.orientation) === null || _a === void 0 ? void 0 : _a.addEventListener('change', this.handleOrientationChange);
72
+ window.addEventListener('resize', this.handleOrientationChange);
73
+ visualViewport === null || visualViewport === void 0 ? void 0 : visualViewport.addEventListener('resize', this.handleOrientationChange);
74
+ };
75
+ this.initMutationObserver = () => {
76
+ const observer = new MutationObserver(this.onMutationObserved);
77
+ observer.observe(this.hostElement, { childList: true, subtree: true });
78
+ this.mutationObserver = observer;
79
+ this.onMutationObserved();
13
80
  };
14
81
  this.inputBlurHandler = () => {
15
82
  this.inputFocused = false;
@@ -19,6 +86,16 @@ export class Q2Select {
19
86
  };
20
87
  this.inputClickHandler = async (event) => {
21
88
  event.stopPropagation();
89
+ // Check if the last interaction was a touch within the popover
90
+ // If so, don't toggle the dropdown as the user is likely continuing to interact
91
+ if (this.lastTouchWasInPopover && this.open && this.searchable) {
92
+ // Reset the flag and don't toggle
93
+ this.lastTouchWasInPopover = false;
94
+ this.focusInput();
95
+ return;
96
+ }
97
+ // Reset the flag for any other click
98
+ this.lastTouchWasInPopover = false;
22
99
  if (shouldShowActionSheet(this)) {
23
100
  return this.executeActionSheet(event);
24
101
  }
@@ -43,12 +120,13 @@ export class Q2Select {
43
120
  this.inputKeydownHandler = (event) => {
44
121
  if (this.readonly || this.disabled)
45
122
  return;
46
- const key = event.key;
123
+ const { key, shiftKey } = event;
124
+ const isShiftTab = key === 'Tab' && shiftKey;
47
125
  const hasSlot = this.hasPopoverTop || this.hasPopoverBottom;
48
- const isShiftTab = key === 'Tab' && event.shiftKey;
49
- if (hasSlot && (key === 'Tab' || key === 'Enter' || isShiftTab))
126
+ if (hasSlot && (key === 'Tab' || isShiftTab))
50
127
  return;
51
- if (shouldShowActionSheet(this, event)) {
128
+ // slots are incompatible with action sheet
129
+ if (shouldShowActionSheet(this, event) && !hasSlot) {
52
130
  return this.executeActionSheet(event);
53
131
  }
54
132
  const keysForOptionListToHandle = [
@@ -73,7 +151,7 @@ export class Q2Select {
73
151
  // Prevent click event from firing when spacebar is pressed
74
152
  if (key === ' ')
75
153
  event.preventDefault();
76
- this.optionList.handleExternalKeydown(event);
154
+ this.handleOptionListExternalKeydown(event);
77
155
  };
78
156
  this.onCustomDisplayClick = (event) => {
79
157
  event.stopPropagation();
@@ -91,12 +169,12 @@ export class Q2Select {
91
169
  this.hasCustomDisplay = hasCustomDisplay;
92
170
  }
93
171
  const popTopSlot = hostElement.shadowRoot.querySelector('slot[name="popover-top"]');
94
- const topSlotHasNode = popTopSlot.assignedNodes().length > 0;
172
+ const topSlotHasNode = (popTopSlot === null || popTopSlot === void 0 ? void 0 : popTopSlot.assignedNodes().length) > 0;
95
173
  if (hasPopoverTop !== topSlotHasNode) {
96
174
  this.hasPopoverTop = topSlotHasNode;
97
175
  }
98
176
  const popBottomSlot = hostElement.shadowRoot.querySelector('slot[name="popover-bottom"]');
99
- const bottomSlotHasNode = popBottomSlot.assignedNodes().length > 0;
177
+ const bottomSlotHasNode = (popBottomSlot === null || popBottomSlot === void 0 ? void 0 : popBottomSlot.assignedNodes().length) > 0;
100
178
  if (hasPopoverBottom !== bottomSlotHasNode) {
101
179
  this.hasPopoverBottom = bottomSlotHasNode;
102
180
  }
@@ -120,6 +198,11 @@ export class Q2Select {
120
198
  return;
121
199
  this.open = open;
122
200
  };
201
+ this.removeTouchEventListeners = () => {
202
+ if (!isMobile() || !this.popoverElement)
203
+ return;
204
+ this.popoverElement.removeEventListener('touchstart', this.handleTouchStart);
205
+ };
123
206
  this.showAllOptions = () => {
124
207
  this.showSelected = false;
125
208
  };
@@ -165,6 +248,7 @@ export class Q2Select {
165
248
  this.optional = false;
166
249
  this.placeholder = undefined;
167
250
  this.popDirection = undefined;
251
+ this.popoverMaxHeight = undefined;
168
252
  this.popoverMode = null;
169
253
  this.readonly = false;
170
254
  this.searchable = false;
@@ -177,19 +261,21 @@ export class Q2Select {
177
261
  var _a;
178
262
  (_a = this.mutationObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
179
263
  this.mutationObserver = null;
264
+ this.destroyEventListeners();
180
265
  }
181
266
  componentWillLoad() {
267
+ this.originalSearchable = this.searchable;
182
268
  handleAriaLabel(this);
269
+ this.handleOrientationChange();
183
270
  this.buildStructuredSelectedOptions();
184
271
  this.handleMultilineOptionsUpdate(this.multilineOptions, false);
185
272
  }
186
273
  componentDidLoad() {
187
- const observer = new MutationObserver(this.onMutationObserved);
188
- observer.observe(this.hostElement, { childList: true, subtree: true });
189
- this.mutationObserver = observer;
190
- this.onMutationObserved();
274
+ this.initMutationObserver();
275
+ this.initEventListeners();
191
276
  overrideFocus(this.hostElement);
192
277
  setTimeout(() => this.checkSelectedDisplay(), 0);
278
+ this.setCustomLabel();
193
279
  }
194
280
  componentDidRender() {
195
281
  setTimeout(() => {
@@ -217,9 +303,9 @@ export class Q2Select {
217
303
  this.clearValue();
218
304
  }
219
305
  handleSelectedDisplay(event) {
220
- if (this.multiple)
221
- return;
222
- this.inputField.value = event.detail.display;
306
+ if (!this.multiple && !!this.value && this.value === event.detail.value) {
307
+ this.inputField.value = event.detail.display;
308
+ }
223
309
  }
224
310
  delegateFocus(event) {
225
311
  const fromHost = isRelatedTargetWithinHost(event, this.hostElement);
@@ -228,11 +314,13 @@ export class Q2Select {
228
314
  this.clearSelectedDisplay();
229
315
  }
230
316
  else if (isEventFromElement(event, this.hostElement)) {
231
- this.inputField.shadowRoot.querySelector('.input-field').focus();
317
+ this.innerInputField.focus();
232
318
  }
233
319
  }
234
320
  handleFocusout(event) {
235
- const isLeavingHost = isHostLosingFocus(event, this.hostElement);
321
+ var _a;
322
+ const relatedTarget = event.relatedTarget;
323
+ const isLeavingHost = !((_a = this.popoverElement) === null || _a === void 0 ? void 0 : _a.contains(relatedTarget)) && !this.hostElement.contains(relatedTarget);
236
324
  if (isLeavingHost)
237
325
  this.closeDropdown();
238
326
  this.prioritizeSearch = !isLeavingHost && this.searchable;
@@ -268,6 +356,10 @@ export class Q2Select {
268
356
  keydownHandler(event) {
269
357
  this.inputKeydownHandler(event);
270
358
  }
359
+ popoverStateChanged({ detail: { open } }) {
360
+ if (this.open !== open)
361
+ this.open = open;
362
+ }
271
363
  // #endregion
272
364
  // #region Public Methods API
273
365
  /**
@@ -341,6 +433,12 @@ export class Q2Select {
341
433
  this.optionElements.forEach(element => (element.multiline = newValue));
342
434
  }
343
435
  openChanged(isOpen) {
436
+ if (isOpen) {
437
+ this.addTouchEventListeners();
438
+ }
439
+ else {
440
+ this.removeTouchEventListeners();
441
+ }
344
442
  this.scheduledAfterRender.push(async () => {
345
443
  await waitForNextPaint();
346
444
  const { popoverTopContainer, popoverElement } = this;
@@ -397,6 +495,15 @@ export class Q2Select {
397
495
  var _a, _b;
398
496
  return (_b = (_a = this.inputField) === null || _a === void 0 ? void 0 : _a.shadowRoot) === null || _b === void 0 ? void 0 : _b.querySelector('.input-field');
399
497
  }
498
+ get inputId() {
499
+ return `select-guid-${this.guid}`;
500
+ }
501
+ get isModule() {
502
+ var _a, _b;
503
+ const isIframe = window !== window.top;
504
+ const hasPlatformDimensions = Object.keys((_b = (_a = window.Tecton) === null || _a === void 0 ? void 0 : _a.platformDimensions) !== null && _b !== void 0 ? _b : {}).length > 0;
505
+ return isIframe && hasPlatformDimensions;
506
+ }
400
507
  get optionElements() {
401
508
  return Array.from(this.hostElement.querySelectorAll('q2-option'));
402
509
  }
@@ -463,6 +570,13 @@ export class Q2Select {
463
570
  }
464
571
  }
465
572
  checkSelectedDisplay() {
573
+ // This prevents an undefined property error when the spec tests are run
574
+ try {
575
+ this.hostElement;
576
+ }
577
+ catch (error) {
578
+ return null;
579
+ }
466
580
  let namedSlot = this.selectedDisplaySlot;
467
581
  const { value, multiple, selectedOptions, multilineOptions, firstSelectedOptionElement, prioritizeSearch } = this;
468
582
  const hasNoValue = !value && multiple && !(selectedOptions === null || selectedOptions === void 0 ? void 0 : selectedOptions.length);
@@ -523,16 +637,22 @@ export class Q2Select {
523
637
  }
524
638
  closeDropdown() {
525
639
  this.open = false;
640
+ this.lastTouchWasInPopover = false;
526
641
  this.clearSearchText();
527
642
  }
528
643
  async executeActionSheet(event) {
529
644
  const result = await showActionSheetList(this, event);
645
+ this.focusInput();
530
646
  this.handleSelectionChanges(result);
531
647
  }
532
648
  focusInput() {
533
649
  var _a;
534
650
  (_a = this.inputField) === null || _a === void 0 ? void 0 : _a.dispatchEvent(new FocusEvent('focus'));
535
651
  }
652
+ // Helps with checking for calls to handleExternalKeydown in spec tests
653
+ handleOptionListExternalKeydown(event) {
654
+ this.optionList.handleExternalKeydown(event);
655
+ }
536
656
  handleSelectionChanges(changeDetails) {
537
657
  const { value = '', values = [] } = changeDetails;
538
658
  const selectedOptionValues = values.map(value => value.value);
@@ -551,8 +671,13 @@ export class Q2Select {
551
671
  this.optionList.setActiveElement(null);
552
672
  this.open = true;
553
673
  }
554
- optionsDropdown() {
555
- 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" }))));
674
+ setCustomLabel() {
675
+ var _a;
676
+ const customLabel = this.hostElement.querySelector('[slot="label"]');
677
+ if (customLabel) {
678
+ (_a = this.inputField) === null || _a === void 0 ? void 0 : _a.appendChild(customLabel.cloneNode(true));
679
+ this.hostElement.removeChild(customLabel);
680
+ }
556
681
  }
557
682
  setStatusMessage(message) {
558
683
  clearTimeout(this.statusMessageTimer);
@@ -574,14 +699,6 @@ export class Q2Select {
574
699
  this.openDropdownWithoutActiveElement();
575
700
  }
576
701
  }
577
- visibilityToggle() {
578
- var _a, _b;
579
- const selectedOptionsCount = (_b = (_a = this.selectedOptions) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0;
580
- const { showSelected } = this;
581
- return (h("div", { class: "multi-select-header" }, h("fieldset", null, h("legend", { "aria-label": loc('tecton.element.select.multiHeader.showing') }, loc('tecton.element.select.multiHeader.showing')), h("div", null, h("input", { class: "sr", type: "radio", id: "all", name: "viewDisplay", value: "all", checked: !showSelected, "aria-label": loc('tecton.element.select.multiHeader.allAriaLabel'), "test-id": "allOptionsButton", onClick: this.showAllOptions, onKeyDown: this.visibilityToggleKeyDown }), h("label", { htmlFor: "all" }, loc('tecton.element.select.multiHeader.all'))), h("div", null, h("input", { class: "sr", type: "radio", id: "selected", disabled: selectedOptionsCount === 0, name: "viewDisplay", value: "selected", "aria-label": loc('tecton.element.select.multiHeader.selectedAriaLabel', [
582
- selectedOptionsCount,
583
- ]), checked: showSelected, "test-id": "selectedOptionsButton", onClick: this.showSelectedOptions, onKeyDown: this.visibilityToggleKeyDown }), h("label", { htmlFor: "selected" }, loc('tecton.element.select.multiHeader.selected', [selectedOptionsCount]))))));
584
- }
585
702
  // #endregion
586
703
  // #region Render Methods
587
704
  renderCustomDisplay() {
@@ -591,13 +708,27 @@ export class Q2Select {
591
708
  this.checkSelectedDisplayHeight();
592
709
  return (h("slot", { name: "_selected-display", slot: "custom-display" }));
593
710
  }
594
- render() {
711
+ renderOptionsDropdown() {
712
+ return (h("q2-popover", { ref: el => (this.popoverElement = el), controlElement: this.innerInputContainer, open: this.open, "max-height": this.popoverMaxHeight, 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.renderVisibilityToggle())), h("div", { class: "popover-bottom-container", hidden: !this.hasPopoverBottom, tabindex: "-1" }, h("slot", { name: "popover-bottom" }))));
713
+ }
714
+ renderSelectField() {
595
715
  var _a;
596
- return (h("click-elsewhere", { key: 'ee1f153325884056a488d4bdfda9b5ef501cf3be', class: this.wrapperClasses, onChange: this.clickedElsewhere }, h("div", { key: 'd60cf7a63ba2d5af7f67e2a811336255506ad422', "aria-live": "polite", "aria-atomic": "true", role: "status", class: "sr" }, this.statusMessage), h("q2-input", { key: '2a6c022291b99e1561e090bc74c5014fd5628bc4', 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) &&
716
+ return (h(Fragment, null, h("div", { "aria-live": "polite", "aria-atomic": "true", role: "status", class: "sr" }, this.statusMessage), h("q2-input", { 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) &&
597
717
  this.errors.length > 0 &&
598
718
  this.errors.map(error => loc(error))) ||
599
719
  (this.invalid && ['tecton.element.select.invalid']) ||
600
- [], 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: 'a29711927968b10f9225994ed41367d8ad35c1a9', class: "custom-display-content", hidden: !this.hasCustomDisplay || !!this.searchText, onClick: this.onCustomDisplayClick }, h("slot", { key: '3e63c82e5bb6a12638f6d5a8f6af8eb246b105a6', name: "q2-select-display" })), this.optionsDropdown()));
720
+ [], 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", { class: "custom-display-content", hidden: !this.hasCustomDisplay || !!this.searchText, onClick: this.onCustomDisplayClick }, h("slot", { name: "q2-select-display" })), this.renderOptionsDropdown()));
721
+ }
722
+ renderVisibilityToggle() {
723
+ var _a, _b;
724
+ const selectedOptionsCount = (_b = (_a = this.selectedOptions) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0;
725
+ const { showSelected } = this;
726
+ return (h("div", { class: "multi-select-header" }, h("fieldset", null, h("legend", { "aria-label": loc('tecton.element.select.multiHeader.showing') }, loc('tecton.element.select.multiHeader.showing')), h("div", null, h("input", { class: "sr", type: "radio", id: "all", name: "viewDisplay", value: "all", checked: !showSelected, "aria-label": loc('tecton.element.select.multiHeader.allAriaLabel'), "test-id": "allOptionsButton", onClick: this.showAllOptions, onKeyDown: this.visibilityToggleKeyDown }), h("label", { htmlFor: "all" }, loc('tecton.element.select.multiHeader.all'))), h("div", null, h("input", { class: "sr", type: "radio", id: "selected", disabled: selectedOptionsCount === 0, name: "viewDisplay", value: "selected", "aria-label": loc('tecton.element.select.multiHeader.selectedAriaLabel', [
727
+ selectedOptionsCount,
728
+ ]), checked: showSelected, "test-id": "selectedOptionsButton", onClick: this.showSelectedOptions, onKeyDown: this.visibilityToggleKeyDown }), h("label", { htmlFor: "selected" }, loc('tecton.element.select.multiHeader.selected', [selectedOptionsCount]))))));
729
+ }
730
+ render() {
731
+ return (h("click-elsewhere", { key: 'fc1a03ff20dbce5b036f753bf5eee835004b16b6', class: this.wrapperClasses, onChange: this.clickedElsewhere }, this.renderSelectField()));
601
732
  }
602
733
  static get is() { return "q2-select"; }
603
734
  static get encapsulation() { return "shadow"; }
@@ -897,6 +1028,23 @@ export class Q2Select {
897
1028
  "attribute": "pop-direction",
898
1029
  "reflect": true
899
1030
  },
1031
+ "popoverMaxHeight": {
1032
+ "type": "number",
1033
+ "mutable": false,
1034
+ "complexType": {
1035
+ "original": "number",
1036
+ "resolved": "number",
1037
+ "references": {}
1038
+ },
1039
+ "required": false,
1040
+ "optional": false,
1041
+ "docs": {
1042
+ "tags": [],
1043
+ "text": "Force the maximum height of the popover. This value will be interpreted as pixels.\nIf no value is passed, or the value exceeds available space, the component will auto-detect the maximum height based on available space."
1044
+ },
1045
+ "attribute": "popover-max-height",
1046
+ "reflect": false
1047
+ },
900
1048
  "popoverMode": {
901
1049
  "type": "string",
902
1050
  "mutable": true,
@@ -938,7 +1086,7 @@ export class Q2Select {
938
1086
  },
939
1087
  "searchable": {
940
1088
  "type": "boolean",
941
- "mutable": false,
1089
+ "mutable": true,
942
1090
  "complexType": {
943
1091
  "original": "boolean",
944
1092
  "resolved": "boolean",
@@ -1198,7 +1346,14 @@ export class Q2Select {
1198
1346
  "target": undefined,
1199
1347
  "capture": false,
1200
1348
  "passive": false
1349
+ }, {
1350
+ "name": "popoverStateChanged",
1351
+ "method": "popoverStateChanged",
1352
+ "target": undefined,
1353
+ "capture": false,
1354
+ "passive": false
1201
1355
  }];
1202
1356
  }
1203
1357
  }
1358
+ // #endregion
1204
1359
  //# sourceMappingURL=q2-select.js.map