q2-tecton-elements 1.46.0 → 1.46.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 (427) hide show
  1. package/dist/cjs/click-elsewhere_2.cjs.entry.js +71 -40
  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-calendar.cjs.entry.js +2 -2
  9. package/dist/cjs/q2-carousel-pane.cjs.entry.js +36 -6
  10. package/dist/cjs/q2-carousel-pane.cjs.entry.js.map +1 -1
  11. package/dist/cjs/q2-carousel.cjs.entry.js +2 -2
  12. package/dist/cjs/q2-carousel.cjs.entry.js.map +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 +69 -3
  16. package/dist/cjs/q2-chart-donut.cjs.entry.js.map +1 -1
  17. package/dist/cjs/q2-checkbox-group.cjs.entry.js +3 -2
  18. package/dist/cjs/q2-checkbox-group.cjs.entry.js.map +1 -1
  19. package/dist/cjs/q2-checkbox.cjs.entry.js +3 -2
  20. package/dist/cjs/q2-checkbox.cjs.entry.js.map +1 -1
  21. package/dist/cjs/q2-currency.cjs.entry.js +1 -1
  22. package/dist/cjs/q2-data-table.cjs.entry.js +1 -1
  23. package/dist/cjs/q2-detail.cjs.entry.js +1 -1
  24. package/dist/cjs/q2-dropdown-item.cjs.entry.js +1 -1
  25. package/dist/cjs/q2-dropdown-item.cjs.entry.js.map +1 -1
  26. package/dist/cjs/q2-dropdown.cjs.entry.js +1 -1
  27. package/dist/cjs/q2-dropdown.cjs.entry.js.map +1 -1
  28. package/dist/cjs/q2-editable-field.cjs.entry.js +1 -1
  29. package/dist/cjs/q2-icon.cjs.entry.js +1 -1
  30. package/dist/cjs/q2-icon.cjs.entry.js.map +1 -1
  31. package/dist/cjs/q2-input.cjs.entry.js +3 -3
  32. package/dist/cjs/q2-input.cjs.entry.js.map +1 -1
  33. package/dist/cjs/q2-item.cjs.entry.js +12 -14
  34. package/dist/cjs/q2-item.cjs.entry.js.map +1 -1
  35. package/dist/cjs/q2-legend.cjs.entry.js +118 -0
  36. package/dist/cjs/q2-legend.cjs.entry.js.map +1 -0
  37. package/dist/cjs/q2-list.cjs.entry.js +7 -7
  38. package/dist/cjs/q2-list.cjs.entry.js.map +1 -1
  39. package/dist/cjs/q2-loc.cjs.entry.js +1 -1
  40. package/dist/cjs/q2-message.cjs.entry.js +1 -1
  41. package/dist/cjs/q2-month-picker.cjs.entry.js +2 -2
  42. package/dist/cjs/q2-optgroup.cjs.entry.js +1 -1
  43. package/dist/cjs/q2-option-list.cjs.entry.js +1 -1
  44. package/dist/cjs/q2-option.cjs.entry.js +1 -1
  45. package/dist/cjs/q2-pagination.cjs.entry.js +2 -2
  46. package/dist/cjs/q2-pill.cjs.entry.js +1 -1
  47. package/dist/cjs/q2-radio-group.cjs.entry.js +1 -1
  48. package/dist/cjs/q2-radio.cjs.entry.js +1 -1
  49. package/dist/cjs/q2-relative-time.cjs.entry.js +2 -2
  50. package/dist/cjs/q2-section.cjs.entry.js +2 -2
  51. package/dist/cjs/q2-select.cjs.entry.js +55 -7
  52. package/dist/cjs/q2-select.cjs.entry.js.map +1 -1
  53. package/dist/cjs/q2-stepper-pane.cjs.entry.js +1 -1
  54. package/dist/cjs/q2-stepper-vertical.cjs.entry.js +1 -1
  55. package/dist/cjs/q2-stepper.cjs.entry.js +1 -1
  56. package/dist/cjs/q2-tab-container.cjs.entry.js +1 -1
  57. package/dist/cjs/q2-tab-pane.cjs.entry.js +1 -1
  58. package/dist/cjs/q2-tag.cjs.entry.js +1 -1
  59. package/dist/cjs/q2-tecton-elements.cjs.js +1 -1
  60. package/dist/cjs/q2-textarea.cjs.entry.js +1 -1
  61. package/dist/cjs/tecton-tab-pane.cjs.entry.js +2 -2
  62. package/dist/collection/collection-manifest.json +6 -5
  63. package/dist/collection/components/click-elsewhere/click-elsewhere.js +2 -8
  64. package/dist/collection/components/click-elsewhere/click-elsewhere.js.map +1 -1
  65. package/dist/collection/components/q2-action-sheet/q2-action-sheet.js +1 -1
  66. package/dist/collection/components/q2-avatar/q2-avatar.js +1 -1
  67. package/dist/collection/components/q2-calendar/q2-calendar.js +1 -1
  68. package/dist/collection/components/q2-calendar/q2-month-picker.js +2 -2
  69. package/dist/collection/components/q2-carousel/q2-carousel.js +2 -2
  70. package/dist/collection/components/q2-carousel/q2-carousel.js.map +1 -1
  71. package/dist/collection/components/q2-carousel-pane/q2-carousel-pane.js +36 -6
  72. package/dist/collection/components/q2-carousel-pane/q2-carousel-pane.js.map +1 -1
  73. package/dist/collection/components/q2-chart-area/q2-chart-area.js +1 -1
  74. package/dist/collection/components/q2-chart-bar/q2-chart-bar.js +1 -1
  75. package/dist/collection/components/q2-chart-donut/q2-chart-donut.css +9 -0
  76. package/dist/collection/components/q2-chart-donut/q2-chart-donut.js +91 -3
  77. package/dist/collection/components/q2-chart-donut/q2-chart-donut.js.map +1 -1
  78. package/dist/collection/components/q2-checkbox/q2-checkbox.js +20 -2
  79. package/dist/collection/components/q2-checkbox/q2-checkbox.js.map +1 -1
  80. package/dist/collection/components/q2-checkbox-group/q2-checkbox-group.js +3 -2
  81. package/dist/collection/components/q2-checkbox-group/q2-checkbox-group.js.map +1 -1
  82. package/dist/collection/components/q2-currency/q2-currency.js +1 -1
  83. package/dist/collection/components/q2-data-table/q2-data-table.js +7 -7
  84. package/dist/collection/components/q2-detail/q2-detail.js +1 -1
  85. package/dist/collection/components/q2-dropdown/q2-dropdown.js +1 -1
  86. package/dist/collection/components/q2-dropdown/q2-dropdown.js.map +1 -1
  87. package/dist/collection/components/q2-dropdown-item/q2-dropdown-item.js +1 -1
  88. package/dist/collection/components/q2-dropdown-item/q2-dropdown-item.js.map +1 -1
  89. package/dist/collection/components/q2-editable-field/q2-editable-field.js +2 -2
  90. package/dist/collection/components/q2-icon/q2-icon.js +1 -1
  91. package/dist/collection/components/q2-icon/q2-icon.js.map +1 -1
  92. package/dist/collection/components/q2-input/q2-input.js +4 -4
  93. package/dist/collection/components/q2-input/q2-input.js.map +1 -1
  94. package/dist/collection/components/q2-item/q2-item.js +23 -16
  95. package/dist/collection/components/q2-item/q2-item.js.map +1 -1
  96. package/dist/collection/components/q2-legend/q2-legend.css +126 -0
  97. package/dist/collection/components/q2-legend/q2-legend.js +271 -0
  98. package/dist/collection/components/q2-legend/q2-legend.js.map +1 -0
  99. package/dist/collection/components/q2-list/q2-list.js +7 -7
  100. package/dist/collection/components/q2-list/q2-list.js.map +1 -1
  101. package/dist/collection/components/q2-loc/q2-loc.js +1 -1
  102. package/dist/collection/components/q2-message/q2-message.js +1 -1
  103. package/dist/collection/components/q2-optgroup/q2-optgroup.js +1 -1
  104. package/dist/collection/components/q2-option/q2-option.js +1 -1
  105. package/dist/collection/components/q2-option-list/q2-option-list.js +4 -4
  106. package/dist/collection/components/q2-pagination/q2-pagination.js +2 -2
  107. package/dist/collection/components/q2-pill/q2-pill.js +1 -1
  108. package/dist/collection/components/q2-popover/q2-popover.css +19 -11
  109. package/dist/collection/components/q2-popover/q2-popover.js +70 -32
  110. package/dist/collection/components/q2-popover/q2-popover.js.map +1 -1
  111. package/dist/collection/components/q2-radio/q2-radio.js +1 -1
  112. package/dist/collection/components/q2-radio-group/q2-radio-group.js +1 -1
  113. package/dist/collection/components/q2-relative-time/q2-relative-time.js +1 -1
  114. package/dist/collection/components/q2-section/q2-section.js +2 -2
  115. package/dist/collection/components/q2-select/q2-select.js +64 -9
  116. package/dist/collection/components/q2-select/q2-select.js.map +1 -1
  117. package/dist/collection/components/q2-stepper/q2-stepper.js +1 -1
  118. package/dist/collection/components/q2-stepper-pane/q2-stepper-pane.js +3 -3
  119. package/dist/collection/components/q2-stepper-vertical/q2-stepper-vertical.js +1 -1
  120. package/dist/collection/components/q2-tab-container/q2-tab-container.js +1 -1
  121. package/dist/collection/components/q2-tab-pane/q2-tab-pane.js +1 -1
  122. package/dist/collection/components/q2-tag/q2-tag.js +1 -1
  123. package/dist/collection/components/q2-textarea/q2-textarea.js +1 -1
  124. package/dist/collection/components/tecton-tab-pane/tecton-tab-pane.js +2 -2
  125. package/dist/components/click-elsewhere2.js +2 -8
  126. package/dist/components/click-elsewhere2.js.map +1 -1
  127. package/dist/components/index.js +2 -0
  128. package/dist/components/index.js.map +1 -1
  129. package/dist/components/q2-action-sheet.js +1 -1
  130. package/dist/components/q2-avatar2.js +1 -1
  131. package/dist/components/q2-calendar.js +1 -1
  132. package/dist/components/q2-carousel-pane.js +36 -6
  133. package/dist/components/q2-carousel-pane.js.map +1 -1
  134. package/dist/components/q2-carousel.js +2 -2
  135. package/dist/components/q2-carousel.js.map +1 -1
  136. package/dist/components/q2-chart-area.js +1 -1
  137. package/dist/components/q2-chart-bar.js +1 -1
  138. package/dist/components/q2-chart-donut.js +81 -7
  139. package/dist/components/q2-chart-donut.js.map +1 -1
  140. package/dist/components/q2-checkbox-group.js +3 -2
  141. package/dist/components/q2-checkbox-group.js.map +1 -1
  142. package/dist/components/q2-checkbox2.js +4 -2
  143. package/dist/components/q2-checkbox2.js.map +1 -1
  144. package/dist/components/q2-currency.js +1 -1
  145. package/dist/components/q2-data-table.js +1 -1
  146. package/dist/components/q2-detail.js +1 -1
  147. package/dist/components/q2-dropdown-item2.js +1 -1
  148. package/dist/components/q2-dropdown-item2.js.map +1 -1
  149. package/dist/components/q2-dropdown.js +1 -1
  150. package/dist/components/q2-dropdown.js.map +1 -1
  151. package/dist/components/q2-editable-field.js +1 -1
  152. package/dist/components/q2-icon2.js +1 -1
  153. package/dist/components/q2-icon2.js.map +1 -1
  154. package/dist/components/q2-input2.js +3 -3
  155. package/dist/components/q2-input2.js.map +1 -1
  156. package/dist/components/q2-item.js +15 -17
  157. package/dist/components/q2-item.js.map +1 -1
  158. package/dist/components/q2-legend.d.ts +11 -0
  159. package/dist/components/q2-legend.js +8 -0
  160. package/dist/components/q2-legend.js.map +1 -0
  161. package/dist/components/q2-legend2.js +145 -0
  162. package/dist/components/q2-legend2.js.map +1 -0
  163. package/dist/components/q2-list.js +7 -7
  164. package/dist/components/q2-list.js.map +1 -1
  165. package/dist/components/q2-loc.js +1 -1
  166. package/dist/components/q2-message2.js +1 -1
  167. package/dist/components/q2-month-picker.js +2 -2
  168. package/dist/components/q2-optgroup2.js +1 -1
  169. package/dist/components/q2-option-list2.js +1 -1
  170. package/dist/components/q2-option2.js +1 -1
  171. package/dist/components/q2-pagination.js +2 -2
  172. package/dist/components/q2-pill.js +1 -1
  173. package/dist/components/q2-popover2.js +69 -32
  174. package/dist/components/q2-popover2.js.map +1 -1
  175. package/dist/components/q2-radio-group.js +1 -1
  176. package/dist/components/q2-radio.js +1 -1
  177. package/dist/components/q2-relative-time.js +1 -1
  178. package/dist/components/q2-section.js +2 -2
  179. package/dist/components/q2-select2.js +57 -9
  180. package/dist/components/q2-select2.js.map +1 -1
  181. package/dist/components/q2-stepper-pane.js +1 -1
  182. package/dist/components/q2-stepper-vertical.js +1 -1
  183. package/dist/components/q2-stepper.js +1 -1
  184. package/dist/components/q2-tab-container.js +1 -1
  185. package/dist/components/q2-tab-pane.js +1 -1
  186. package/dist/components/q2-tag.js +1 -1
  187. package/dist/components/q2-textarea.js +1 -1
  188. package/dist/components/tecton-tab-pane.js +2 -2
  189. package/dist/esm/click-elsewhere_2.entry.js +71 -40
  190. package/dist/esm/click-elsewhere_2.entry.js.map +1 -1
  191. package/dist/esm/{index-f0dfb099.js → index-3184c760.js} +1 -1
  192. package/dist/esm/{index-f0dfb099.js.map → index-3184c760.js.map} +1 -1
  193. package/dist/esm/loader.js +1 -1
  194. package/dist/esm/q2-action-sheet.entry.js +1 -1
  195. package/dist/esm/q2-avatar.entry.js +1 -1
  196. package/dist/esm/q2-calendar.entry.js +2 -2
  197. package/dist/esm/q2-carousel-pane.entry.js +36 -6
  198. package/dist/esm/q2-carousel-pane.entry.js.map +1 -1
  199. package/dist/esm/q2-carousel.entry.js +2 -2
  200. package/dist/esm/q2-carousel.entry.js.map +1 -1
  201. package/dist/esm/q2-chart-area.entry.js +1 -1
  202. package/dist/esm/q2-chart-bar.entry.js +1 -1
  203. package/dist/esm/q2-chart-donut.entry.js +69 -3
  204. package/dist/esm/q2-chart-donut.entry.js.map +1 -1
  205. package/dist/esm/q2-checkbox-group.entry.js +3 -2
  206. package/dist/esm/q2-checkbox-group.entry.js.map +1 -1
  207. package/dist/esm/q2-checkbox.entry.js +3 -2
  208. package/dist/esm/q2-checkbox.entry.js.map +1 -1
  209. package/dist/esm/q2-currency.entry.js +1 -1
  210. package/dist/esm/q2-data-table.entry.js +1 -1
  211. package/dist/esm/q2-detail.entry.js +1 -1
  212. package/dist/esm/q2-dropdown-item.entry.js +1 -1
  213. package/dist/esm/q2-dropdown-item.entry.js.map +1 -1
  214. package/dist/esm/q2-dropdown.entry.js +1 -1
  215. package/dist/esm/q2-dropdown.entry.js.map +1 -1
  216. package/dist/esm/q2-editable-field.entry.js +1 -1
  217. package/dist/esm/q2-icon.entry.js +1 -1
  218. package/dist/esm/q2-icon.entry.js.map +1 -1
  219. package/dist/esm/q2-input.entry.js +3 -3
  220. package/dist/esm/q2-input.entry.js.map +1 -1
  221. package/dist/esm/q2-item.entry.js +14 -16
  222. package/dist/esm/q2-item.entry.js.map +1 -1
  223. package/dist/esm/q2-legend.entry.js +114 -0
  224. package/dist/esm/q2-legend.entry.js.map +1 -0
  225. package/dist/esm/q2-list.entry.js +7 -7
  226. package/dist/esm/q2-list.entry.js.map +1 -1
  227. package/dist/esm/q2-loc.entry.js +1 -1
  228. package/dist/esm/q2-message.entry.js +1 -1
  229. package/dist/esm/q2-month-picker.entry.js +2 -2
  230. package/dist/esm/q2-optgroup.entry.js +1 -1
  231. package/dist/esm/q2-option-list.entry.js +1 -1
  232. package/dist/esm/q2-option.entry.js +1 -1
  233. package/dist/esm/q2-pagination.entry.js +2 -2
  234. package/dist/esm/q2-pill.entry.js +1 -1
  235. package/dist/esm/q2-radio-group.entry.js +1 -1
  236. package/dist/esm/q2-radio.entry.js +1 -1
  237. package/dist/esm/q2-relative-time.entry.js +2 -2
  238. package/dist/esm/q2-section.entry.js +2 -2
  239. package/dist/esm/q2-select.entry.js +56 -8
  240. package/dist/esm/q2-select.entry.js.map +1 -1
  241. package/dist/esm/q2-stepper-pane.entry.js +1 -1
  242. package/dist/esm/q2-stepper-vertical.entry.js +1 -1
  243. package/dist/esm/q2-stepper.entry.js +1 -1
  244. package/dist/esm/q2-tab-container.entry.js +1 -1
  245. package/dist/esm/q2-tab-pane.entry.js +1 -1
  246. package/dist/esm/q2-tag.entry.js +1 -1
  247. package/dist/esm/q2-tecton-elements.js +1 -1
  248. package/dist/esm/q2-textarea.entry.js +1 -1
  249. package/dist/esm/tecton-tab-pane.entry.js +2 -2
  250. package/dist/jest.setup.js +22 -0
  251. package/dist/jest.setup.js.map +1 -0
  252. package/dist/q2-tecton-elements/{p-7e1dc7e8.entry.js → p-149044cd.entry.js} +2 -2
  253. package/dist/q2-tecton-elements/{p-57bf9342.entry.js → p-16f10398.entry.js} +2 -2
  254. package/dist/q2-tecton-elements/{p-e4a2469f.entry.js → p-18ec54c0.entry.js} +2 -2
  255. package/dist/q2-tecton-elements/{p-515d424b.entry.js → p-2862b698.entry.js} +2 -2
  256. package/dist/q2-tecton-elements/{p-71180fcd.entry.js → p-2967ec81.entry.js} +2 -2
  257. package/dist/q2-tecton-elements/p-2967ec81.entry.js.map +1 -0
  258. package/dist/q2-tecton-elements/{p-d1522382.entry.js → p-2a248a3f.entry.js} +2 -2
  259. package/dist/q2-tecton-elements/{p-d9e19f70.entry.js → p-2e146575.entry.js} +2 -2
  260. package/dist/q2-tecton-elements/{p-66af375f.entry.js → p-34d6977d.entry.js} +2 -2
  261. package/dist/q2-tecton-elements/p-34d6977d.entry.js.map +1 -0
  262. package/dist/q2-tecton-elements/{p-22661533.entry.js → p-38bd430f.entry.js} +2 -2
  263. package/dist/q2-tecton-elements/p-38bd430f.entry.js.map +1 -0
  264. package/dist/q2-tecton-elements/{p-fc9f43f8.entry.js → p-3dff9fb0.entry.js} +2 -2
  265. package/dist/q2-tecton-elements/{p-7523305d.entry.js → p-42f06b03.entry.js} +2 -2
  266. package/dist/q2-tecton-elements/{p-f0813fb4.entry.js → p-4f2dfb4d.entry.js} +2 -2
  267. package/dist/q2-tecton-elements/p-4f2dfb4d.entry.js.map +1 -0
  268. package/dist/q2-tecton-elements/{p-da7fc914.entry.js → p-5945d04a.entry.js} +2 -2
  269. package/dist/q2-tecton-elements/p-5a786cd9.entry.js +2 -0
  270. package/dist/q2-tecton-elements/p-5a786cd9.entry.js.map +1 -0
  271. package/dist/q2-tecton-elements/{p-1b37b8c6.entry.js → p-5c13ed85.entry.js} +2 -2
  272. package/dist/q2-tecton-elements/p-5c13ed85.entry.js.map +1 -0
  273. package/dist/q2-tecton-elements/{p-e47dbfbe.entry.js → p-6468801f.entry.js} +2 -2
  274. package/dist/q2-tecton-elements/{p-391acc00.entry.js → p-65ed80a5.entry.js} +2 -2
  275. package/dist/q2-tecton-elements/p-65ed80a5.entry.js.map +1 -0
  276. package/dist/q2-tecton-elements/p-6930d8ed.entry.js +2 -0
  277. package/dist/q2-tecton-elements/p-6930d8ed.entry.js.map +1 -0
  278. package/dist/q2-tecton-elements/{p-c016bd18.entry.js → p-6d48e71d.entry.js} +2 -2
  279. package/dist/q2-tecton-elements/{p-4570ff06.entry.js → p-6e3887c7.entry.js} +2 -2
  280. package/dist/q2-tecton-elements/{p-79df783e.entry.js → p-7922dd0f.entry.js} +2 -2
  281. package/dist/q2-tecton-elements/{p-87bbeb9c.entry.js → p-80832cb1.entry.js} +2 -2
  282. package/dist/q2-tecton-elements/{p-aec64fcb.entry.js → p-86ebd308.entry.js} +2 -2
  283. package/dist/q2-tecton-elements/{p-dc057a9c.entry.js → p-87f07a6d.entry.js} +2 -2
  284. package/dist/q2-tecton-elements/{p-176ad382.entry.js → p-912b4cad.entry.js} +2 -2
  285. package/dist/q2-tecton-elements/{p-4bbe563f.entry.js → p-91addc0e.entry.js} +2 -2
  286. package/dist/q2-tecton-elements/p-91addc0e.entry.js.map +1 -0
  287. package/dist/q2-tecton-elements/{p-1e927478.entry.js → p-92092954.entry.js} +2 -2
  288. package/dist/q2-tecton-elements/p-968b008b.entry.js +2 -0
  289. package/dist/q2-tecton-elements/p-968b008b.entry.js.map +1 -0
  290. package/dist/q2-tecton-elements/{p-cb4f9b33.entry.js → p-a1ead8cd.entry.js} +2 -2
  291. package/dist/q2-tecton-elements/{p-cb4f9b33.entry.js.map → p-a1ead8cd.entry.js.map} +1 -1
  292. package/dist/q2-tecton-elements/{p-f1265647.entry.js → p-ad090a05.entry.js} +2 -2
  293. package/dist/q2-tecton-elements/{p-d013e05d.entry.js → p-ae0ddc57.entry.js} +2 -2
  294. package/dist/q2-tecton-elements/{p-d013e05d.entry.js.map → p-ae0ddc57.entry.js.map} +1 -1
  295. package/dist/q2-tecton-elements/p-c0c8f418.entry.js +2 -0
  296. package/dist/q2-tecton-elements/p-c0c8f418.entry.js.map +1 -0
  297. package/dist/q2-tecton-elements/{p-df297a77.entry.js → p-c30bfa77.entry.js} +2 -2
  298. package/dist/q2-tecton-elements/{p-6ebe37ea.entry.js → p-c575f3f9.entry.js} +2 -2
  299. package/dist/q2-tecton-elements/{p-e3230823.entry.js → p-cfe64a8e.entry.js} +2 -2
  300. package/dist/q2-tecton-elements/{p-195a133c.entry.js → p-d5776227.entry.js} +2 -2
  301. package/dist/q2-tecton-elements/{p-47868d6d.entry.js → p-d5b0aeed.entry.js} +2 -2
  302. package/dist/q2-tecton-elements/{p-1c4aa7e3.entry.js → p-e2337018.entry.js} +2 -2
  303. package/dist/q2-tecton-elements/p-e2337018.entry.js.map +1 -0
  304. package/dist/q2-tecton-elements/{p-aed969d4.entry.js → p-e654d2d6.entry.js} +2 -2
  305. package/dist/q2-tecton-elements/{p-e762526f.entry.js → p-ed974a59.entry.js} +2 -2
  306. package/dist/q2-tecton-elements/{p-3c42c90f.js → p-f1e887f5.js} +1 -1
  307. package/dist/q2-tecton-elements/{p-ad274c67.entry.js → p-f45b3488.entry.js} +2 -2
  308. package/dist/q2-tecton-elements/{p-89305707.entry.js → p-f8f0b32f.entry.js} +2 -2
  309. package/dist/q2-tecton-elements/{p-0eff37c6.entry.js → p-ff39ba49.entry.js} +2 -2
  310. package/dist/q2-tecton-elements/q2-tecton-elements.esm.js +1 -1
  311. package/dist/q2-tecton-elements/q2-tecton-elements.esm.js.map +1 -1
  312. package/dist/test/elements/click-elsewhere-test.e2e.js +0 -18
  313. package/dist/test/elements/click-elsewhere-test.e2e.js.map +1 -1
  314. package/dist/test/elements/q2-btn-test.e2e.js +16 -0
  315. package/dist/test/elements/q2-btn-test.e2e.js.map +1 -1
  316. package/dist/test/elements/q2-calendar-test.e2e.js +2 -2
  317. package/dist/test/elements/q2-calendar-test.e2e.js.map +1 -1
  318. package/dist/test/elements/q2-carousel-pane-test.e2e.js +49 -1
  319. package/dist/test/elements/q2-carousel-pane-test.e2e.js.map +1 -1
  320. package/dist/test/elements/q2-carousel-pane-test.spec.js +4 -1
  321. package/dist/test/elements/q2-carousel-pane-test.spec.js.map +1 -1
  322. package/dist/test/elements/q2-chart-donut-test.e2e.js +56 -0
  323. package/dist/test/elements/q2-chart-donut-test.e2e.js.map +1 -1
  324. package/dist/test/elements/q2-checkbox-group-test.e2e.js +13 -10
  325. package/dist/test/elements/q2-checkbox-group-test.e2e.js.map +1 -1
  326. package/dist/test/elements/q2-dropdown-item-test.e2e.js +16 -3
  327. package/dist/test/elements/q2-dropdown-item-test.e2e.js.map +1 -1
  328. package/dist/test/elements/q2-dropdown-test.e2e.js +2 -14
  329. package/dist/test/elements/q2-dropdown-test.e2e.js.map +1 -1
  330. package/dist/test/elements/q2-icon-test.e2e.js +3 -3
  331. package/dist/test/elements/q2-icon-test.e2e.js.map +1 -1
  332. package/dist/test/elements/q2-input-test.e2e.js +68 -54
  333. package/dist/test/elements/q2-input-test.e2e.js.map +1 -1
  334. package/dist/test/elements/{q2-detail/q2-item-test.e2e.js → q2-item-test.e2e.js} +29 -1
  335. package/dist/test/elements/q2-item-test.e2e.js.map +1 -0
  336. package/dist/test/elements/q2-item-test.spec.js +32 -0
  337. package/dist/test/elements/q2-item-test.spec.js.map +1 -0
  338. package/dist/test/elements/q2-legend-test.e2e.js +19 -0
  339. package/dist/test/elements/q2-legend-test.e2e.js.map +1 -0
  340. package/dist/test/elements/q2-legend-test.spec.js +271 -0
  341. package/dist/test/elements/q2-legend-test.spec.js.map +1 -0
  342. package/dist/test/elements/q2-pill-test.e2e.js +1 -1
  343. package/dist/test/elements/q2-pill-test.e2e.js.map +1 -1
  344. package/dist/test/elements/q2-popover-test.e2e.js +1 -34
  345. package/dist/test/elements/q2-popover-test.e2e.js.map +1 -1
  346. package/dist/test/elements/q2-popover-test.spec.js +739 -296
  347. package/dist/test/elements/q2-popover-test.spec.js.map +1 -1
  348. package/dist/test/elements/q2-select-test.e2e.js +1 -1
  349. package/dist/test/elements/q2-select-test.e2e.js.map +1 -1
  350. package/dist/test/elements/q2-select-test.spec.js +412 -0
  351. package/dist/test/elements/q2-select-test.spec.js.map +1 -0
  352. package/dist/test/elements/q2-tag-test.e2e.js +1 -1
  353. package/dist/test/elements/q2-tag-test.e2e.js.map +1 -1
  354. package/dist/types/builds/q2e/development/tecton/tecton/packages/q2-tecton-elements/.stencil/jest.setup.d.ts +1 -0
  355. package/dist/types/components/q2-action-sheet/q2-action-sheet.d.ts +60 -0
  356. package/dist/types/components/q2-calendar/q2-calendar.d.ts +324 -0
  357. package/dist/types/components/q2-carousel/q2-carousel.d.ts +2 -2
  358. package/dist/types/components/q2-carousel-pane/q2-carousel-pane.d.ts +7 -0
  359. package/dist/types/components/q2-chart-donut/q2-chart-donut.d.ts +14 -0
  360. package/dist/types/components/q2-checkbox/q2-checkbox.d.ts +2 -0
  361. package/dist/types/components/q2-data-table/q2-data-table.d.ts +221 -0
  362. package/dist/types/components/q2-dropdown/q2-dropdown.d.ts +130 -0
  363. package/dist/types/components/q2-dropdown-item/q2-dropdown-item.d.ts +45 -0
  364. package/dist/types/components/q2-editable-field/q2-editable-field.d.ts +136 -0
  365. package/dist/types/components/q2-item/q2-item.d.ts +1 -1
  366. package/dist/types/components/q2-legend/q2-legend.d.ts +41 -0
  367. package/dist/types/components/q2-loading/skeleton/shapes.d.ts +1 -0
  368. package/dist/types/components/q2-optgroup/q2-optgroup.d.ts +1 -1
  369. package/dist/types/components/q2-option-list/q2-option-list.d.ts +99 -0
  370. package/dist/types/components/q2-pagination/q2-pagination.d.ts +60 -0
  371. package/dist/types/components/q2-pill/q2-pill.d.ts +102 -0
  372. package/dist/types/components/q2-popover/q2-popover.d.ts +5 -3
  373. package/dist/types/components/q2-select/q2-select.d.ts +238 -0
  374. package/dist/types/components/q2-stepper/q2-stepper.d.ts +52 -0
  375. package/dist/types/components/q2-stepper-vertical/q2-stepper-vertical.d.ts +62 -0
  376. package/dist/types/components/q2-tab-container/q2-tab-container.d.ts +2 -2
  377. package/dist/types/components/q2-tag/q2-tag.d.ts +59 -0
  378. package/dist/types/components.d.ts +83 -0
  379. package/dist/types/utils/action-sheet.d.ts +12 -0
  380. package/package.json +3 -3
  381. package/dist/q2-tecton-elements/p-1b37b8c6.entry.js.map +0 -1
  382. package/dist/q2-tecton-elements/p-1c4aa7e3.entry.js.map +0 -1
  383. package/dist/q2-tecton-elements/p-22661533.entry.js.map +0 -1
  384. package/dist/q2-tecton-elements/p-36398b59.entry.js +0 -2
  385. package/dist/q2-tecton-elements/p-36398b59.entry.js.map +0 -1
  386. package/dist/q2-tecton-elements/p-391acc00.entry.js.map +0 -1
  387. package/dist/q2-tecton-elements/p-4bbe563f.entry.js.map +0 -1
  388. package/dist/q2-tecton-elements/p-66af375f.entry.js.map +0 -1
  389. package/dist/q2-tecton-elements/p-71180fcd.entry.js.map +0 -1
  390. package/dist/q2-tecton-elements/p-b7d5fd12.entry.js +0 -2
  391. package/dist/q2-tecton-elements/p-b7d5fd12.entry.js.map +0 -1
  392. package/dist/q2-tecton-elements/p-c56b58e9.entry.js +0 -2
  393. package/dist/q2-tecton-elements/p-c56b58e9.entry.js.map +0 -1
  394. package/dist/q2-tecton-elements/p-f0813fb4.entry.js.map +0 -1
  395. package/dist/test/elements/q2-detail/q2-item-test.e2e.js.map +0 -1
  396. /package/dist/q2-tecton-elements/{p-7e1dc7e8.entry.js.map → p-149044cd.entry.js.map} +0 -0
  397. /package/dist/q2-tecton-elements/{p-57bf9342.entry.js.map → p-16f10398.entry.js.map} +0 -0
  398. /package/dist/q2-tecton-elements/{p-e4a2469f.entry.js.map → p-18ec54c0.entry.js.map} +0 -0
  399. /package/dist/q2-tecton-elements/{p-515d424b.entry.js.map → p-2862b698.entry.js.map} +0 -0
  400. /package/dist/q2-tecton-elements/{p-d1522382.entry.js.map → p-2a248a3f.entry.js.map} +0 -0
  401. /package/dist/q2-tecton-elements/{p-d9e19f70.entry.js.map → p-2e146575.entry.js.map} +0 -0
  402. /package/dist/q2-tecton-elements/{p-fc9f43f8.entry.js.map → p-3dff9fb0.entry.js.map} +0 -0
  403. /package/dist/q2-tecton-elements/{p-7523305d.entry.js.map → p-42f06b03.entry.js.map} +0 -0
  404. /package/dist/q2-tecton-elements/{p-da7fc914.entry.js.map → p-5945d04a.entry.js.map} +0 -0
  405. /package/dist/q2-tecton-elements/{p-e47dbfbe.entry.js.map → p-6468801f.entry.js.map} +0 -0
  406. /package/dist/q2-tecton-elements/{p-c016bd18.entry.js.map → p-6d48e71d.entry.js.map} +0 -0
  407. /package/dist/q2-tecton-elements/{p-4570ff06.entry.js.map → p-6e3887c7.entry.js.map} +0 -0
  408. /package/dist/q2-tecton-elements/{p-79df783e.entry.js.map → p-7922dd0f.entry.js.map} +0 -0
  409. /package/dist/q2-tecton-elements/{p-87bbeb9c.entry.js.map → p-80832cb1.entry.js.map} +0 -0
  410. /package/dist/q2-tecton-elements/{p-aec64fcb.entry.js.map → p-86ebd308.entry.js.map} +0 -0
  411. /package/dist/q2-tecton-elements/{p-dc057a9c.entry.js.map → p-87f07a6d.entry.js.map} +0 -0
  412. /package/dist/q2-tecton-elements/{p-176ad382.entry.js.map → p-912b4cad.entry.js.map} +0 -0
  413. /package/dist/q2-tecton-elements/{p-1e927478.entry.js.map → p-92092954.entry.js.map} +0 -0
  414. /package/dist/q2-tecton-elements/{p-f1265647.entry.js.map → p-ad090a05.entry.js.map} +0 -0
  415. /package/dist/q2-tecton-elements/{p-df297a77.entry.js.map → p-c30bfa77.entry.js.map} +0 -0
  416. /package/dist/q2-tecton-elements/{p-6ebe37ea.entry.js.map → p-c575f3f9.entry.js.map} +0 -0
  417. /package/dist/q2-tecton-elements/{p-e3230823.entry.js.map → p-cfe64a8e.entry.js.map} +0 -0
  418. /package/dist/q2-tecton-elements/{p-195a133c.entry.js.map → p-d5776227.entry.js.map} +0 -0
  419. /package/dist/q2-tecton-elements/{p-47868d6d.entry.js.map → p-d5b0aeed.entry.js.map} +0 -0
  420. /package/dist/q2-tecton-elements/{p-aed969d4.entry.js.map → p-e654d2d6.entry.js.map} +0 -0
  421. /package/dist/q2-tecton-elements/{p-e762526f.entry.js.map → p-ed974a59.entry.js.map} +0 -0
  422. /package/dist/q2-tecton-elements/{p-3c42c90f.js.map → p-f1e887f5.js.map} +0 -0
  423. /package/dist/q2-tecton-elements/{p-ad274c67.entry.js.map → p-f45b3488.entry.js.map} +0 -0
  424. /package/dist/q2-tecton-elements/{p-89305707.entry.js.map → p-f8f0b32f.entry.js.map} +0 -0
  425. /package/dist/q2-tecton-elements/{p-0eff37c6.entry.js.map → p-ff39ba49.entry.js.map} +0 -0
  426. /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
  427. /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
@@ -25,14 +25,8 @@ const ClickElsewhere = class {
25
25
  this.isCurrentlyFocused = aboutToBeFocused || isCurrentlyFocused;
26
26
  };
27
27
  this.windowBlurHandler = () => {
28
- const activeElement = this.findActiveElement();
29
- if ((activeElement === document.body && this.isCurrentlyFocused) || // clicked parent frame
30
- (activeElement !== document.body && (activeElement === null || activeElement === void 0 ? void 0 : activeElement.tagName) === 'IFRAME') // clicked child frame
31
- ) {
32
- this.isCurrentlyFocused = false;
33
- this.change.emit();
34
- return;
35
- }
28
+ this.isCurrentlyFocused = false;
29
+ this.change.emit();
36
30
  };
37
31
  }
38
32
  /* TODO: Stencil/Rollup is having issues compiling without this here. Will try to remove in future Stencil upgrade. */
@@ -93,7 +87,7 @@ const ClickElsewhere = class {
93
87
  get hostElement() { return index.getElement(this); }
94
88
  };
95
89
 
96
- 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}";
90
+ 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}";
97
91
  const Q2PopoverStyle0 = q2PopoverCss;
98
92
 
99
93
  const Q2Popover = class {
@@ -104,7 +98,6 @@ const Q2Popover = class {
104
98
  * The number of pixels to leave between the popover and the edge of the viewport
105
99
  */
106
100
  this.displayBuffer = 10;
107
- /** remove when Popover API is supported in iOS */
108
101
  this.orientationChanged = false;
109
102
  /// Helpers ///
110
103
  this.handleMinHeight = () => {
@@ -112,6 +105,9 @@ const Q2Popover = class {
112
105
  index$1.handleDeprecationWarning(this, 'minHeight', 'prop');
113
106
  }
114
107
  };
108
+ this.handlePopoverToggleEvent = (event) => {
109
+ this.popoverStateChanged.emit({ open: event.newState === 'open' });
110
+ };
115
111
  this.viewPortChanged = () => {
116
112
  if (!this.open)
117
113
  return;
@@ -121,9 +117,9 @@ const Q2Popover = class {
121
117
  this.orientationChanged = true;
122
118
  this.viewPortChanged();
123
119
  };
124
- this.setFixedCSSProperties = async () => {
125
- var _a, _b;
126
- const { controlElement, containerElement, currentDirection } = this;
120
+ this.setPopoverAPICSSProperties = async () => {
121
+ var _a, _b, _c, _d, _e, _f;
122
+ const { controlElement, containerElement, currentDirection, isModule, align } = this;
127
123
  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 : {
128
124
  top: 0,
129
125
  bottom: 0,
@@ -131,16 +127,32 @@ const Q2Popover = class {
131
127
  right: 0,
132
128
  };
133
129
  const popoverLeft = controlLeft;
134
- const popoverRight = window.visualViewport.width - controlRight;
130
+ const popoverRight = ((_c = window === null || window === void 0 ? void 0 : window.visualViewport) === null || _c === void 0 ? void 0 : _c.width) - controlRight;
131
+ if (align === 'right') {
132
+ containerElement.style.setProperty('--comp-pop-right', `${popoverRight - window.scrollX}px`);
133
+ containerElement.style.setProperty('--comp-pop-left', 'unset');
134
+ }
135
+ else {
136
+ containerElement.style.setProperty('--comp-pop-left', `${popoverLeft + window.scrollX}px`);
137
+ containerElement.style.setProperty('--comp-pop-right', 'unset');
138
+ }
135
139
  if (this.block)
136
- containerElement.style.setProperty('--comp-pop-width', `${controlElement.offsetWidth || 0}px`);
137
- containerElement.style.setProperty('--comp-pop-left', `${popoverLeft}px`);
138
- containerElement.style.setProperty('--comp-pop-right', `${popoverRight}px`);
140
+ containerElement.style.setProperty('--comp-pop-width', `${(controlElement === null || controlElement === void 0 ? void 0 : controlElement.offsetWidth) || 0}px`);
139
141
  if (currentDirection === 'up') {
140
- containerElement.style.setProperty('--comp-pop-bottom', `${window.visualViewport.height - controlTop}px`);
142
+ if (isModule) {
143
+ containerElement.style.setProperty('--comp-pop-bottom', `${window.innerHeight - controlTop}px`);
144
+ }
145
+ else {
146
+ 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`);
147
+ }
141
148
  }
142
149
  if (currentDirection === 'down') {
143
- containerElement.style.setProperty('--comp-pop-top', `${controlBottom}px`);
150
+ if (isModule) {
151
+ containerElement.style.setProperty('--comp-pop-top', `${controlBottom}px`);
152
+ }
153
+ else {
154
+ 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`);
155
+ }
144
156
  }
145
157
  // Wait for one paint to prevent layout thrashing
146
158
  await index$1.waitForNextPaint();
@@ -171,7 +183,7 @@ const Q2Popover = class {
171
183
  containerElement.style.setProperty('--comp-pop-opacity', '1');
172
184
  };
173
185
  this.direction = undefined;
174
- this.align = undefined;
186
+ this.align = 'left';
175
187
  this.open = undefined;
176
188
  this.block = undefined;
177
189
  this.controlElement = undefined;
@@ -181,13 +193,25 @@ const Q2Popover = class {
181
193
  this.show = false;
182
194
  }
183
195
  /// Lifecycle hooks ///
196
+ componentWillLoad() {
197
+ if (!this.supportsPopoverAPI) {
198
+ 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.');
199
+ this.mode = 'legacy';
200
+ }
201
+ }
184
202
  componentDidLoad() {
185
203
  this.handleMinHeight();
204
+ if (this.supportsPopoverAPI)
205
+ this.containerElement.addEventListener('toggle', this.handlePopoverToggleEvent);
186
206
  if (this.open)
187
207
  this.determinePopDirection();
188
208
  }
189
209
  disconnectedCallback() {
190
210
  this.removeViewportListeners();
211
+ this.containerElement.removeEventListener('toggle', this.handlePopoverToggleEvent);
212
+ this.containerElement = null;
213
+ this.contentElement = null;
214
+ this.controlElement = null;
191
215
  }
192
216
  /// Methods ///
193
217
  async toggle() {
@@ -206,7 +230,12 @@ const Q2Popover = class {
206
230
  else {
207
231
  this.removeViewportListeners();
208
232
  this.currentDirection = undefined;
209
- this.show = false;
233
+ if (this.mode === 'legacy' || !this.supportsPopoverAPI) {
234
+ this.show = false;
235
+ }
236
+ else {
237
+ this.containerElement.hidePopover();
238
+ }
210
239
  await index$1.waitForNextPaint();
211
240
  this.clearCSSProperties();
212
241
  }
@@ -223,7 +252,7 @@ const Q2Popover = class {
223
252
  event.stopPropagation();
224
253
  }
225
254
  /// Getters ///
226
- get actualDirection() {
255
+ get providedDirection() {
227
256
  const { direction } = this;
228
257
  switch (direction) {
229
258
  case 'up':
@@ -239,23 +268,24 @@ const Q2Popover = class {
239
268
  const hasPlatformDimensions = Object.keys((_b = (_a = window.Tecton) === null || _a === void 0 ? void 0 : _a.platformDimensions) !== null && _b !== void 0 ? _b : {}).length > 0;
240
269
  return isIframe && hasPlatformDimensions;
241
270
  }
271
+ get supportsPopoverAPI() {
272
+ return Object.hasOwn(HTMLElement.prototype, 'popover');
273
+ }
242
274
  addViewportListeners() {
243
275
  var _a;
244
276
  window.addEventListener('resize', this.viewPortOrientationChanged);
245
- // #region remove when Popover API is supported in iOS
277
+ visualViewport === null || visualViewport === void 0 ? void 0 : visualViewport.addEventListener('resize', this.viewPortChanged);
246
278
  window.addEventListener('scroll', this.viewPortChanged, { passive: true, capture: true });
247
- (_a = screen === null || screen === void 0 ? void 0 : screen.orientation) === null || _a === void 0 ? void 0 : _a.addEventListener('change', this.viewPortOrientationChanged);
279
+ (_a = screen === null || screen === void 0 ? void 0 : screen.orientation) === null || _a === void 0 ? void 0 : _a.addEventListener('orientationchange', this.viewPortOrientationChanged);
248
280
  window.addEventListener('orientationchange', this.viewPortOrientationChanged);
249
- // #endregion
250
281
  }
251
282
  removeViewportListeners() {
252
283
  var _a;
253
284
  window.removeEventListener('resize', this.viewPortOrientationChanged);
254
- // #region remove when Popover API is supported in iOS
285
+ visualViewport === null || visualViewport === void 0 ? void 0 : visualViewport.removeEventListener('resize', this.viewPortChanged);
255
286
  window.removeEventListener('scroll', this.viewPortChanged);
256
287
  (_a = screen === null || screen === void 0 ? void 0 : screen.orientation) === null || _a === void 0 ? void 0 : _a.removeEventListener('orientationchange', this.viewPortOrientationChanged);
257
288
  window.removeEventListener('orientationchange', this.viewPortOrientationChanged);
258
- // #endregion
259
289
  }
260
290
  clearCSSProperties() {
261
291
  this.containerElement.style.removeProperty('--comp-pop-max-height');
@@ -273,17 +303,18 @@ const Q2Popover = class {
273
303
  if (!isOpen)
274
304
  return;
275
305
  this.currentDirection = direction;
276
- this.show = true;
277
- if (this.mode === 'legacy') {
306
+ if (this.mode === 'legacy' || !this.supportsPopoverAPI) {
307
+ this.show = true;
278
308
  this.setAbsoluteCSSProperties();
279
309
  }
280
310
  else {
281
- this.setFixedCSSProperties();
311
+ this.setPopoverAPICSSProperties();
312
+ this.containerElement.showPopover();
282
313
  }
283
314
  }
284
315
  async determinePopDirection() {
285
316
  var _a, _b, _c;
286
- const { containerElement, controlElement, actualDirection, displayBuffer } = this;
317
+ const { containerElement, controlElement, providedDirection, displayBuffer } = this;
287
318
  if (containerElement)
288
319
  containerElement.style.maxHeight = null;
289
320
  await index$1.waitForNextPaint();
@@ -296,16 +327,14 @@ const Q2Popover = class {
296
327
  let maxSpaceAbove;
297
328
  let maxSpaceBelow;
298
329
  if (isModule) {
299
- const platformDimensions = (_c = window.Tecton) === null || _c === void 0 ? void 0 : _c.platformDimensions;
330
+ const { outletOffset = 0, innerHeight = window.innerHeight } = ((_c = window.Tecton) === null || _c === void 0 ? void 0 : _c.platformDimensions) || {};
300
331
  const distanceToIframeBottom = window.visualViewport.height - controlBottom;
301
- const viewableSpaceBelow = platformDimensions.innerHeight - (platformDimensions.outletOffset + controlBottom);
332
+ const viewableSpaceBelow = innerHeight - (outletOffset + controlBottom);
302
333
  const isIframeShorterThanWindow = distanceToIframeBottom < viewableSpaceBelow;
303
- windowHeight = platformDimensions.innerHeight;
334
+ windowHeight = innerHeight;
304
335
  // If the top of the module is below the top of the window we just use the controlTop
305
336
  // Otherwise we need to add the outletOffset to the controlTop
306
- maxSpaceAbove =
307
- (platformDimensions.outletOffset > 0 ? controlTop : controlTop + platformDimensions.outletOffset) -
308
- displayBuffer;
337
+ maxSpaceAbove = (outletOffset > 0 ? controlTop : controlTop + outletOffset) - displayBuffer;
309
338
  maxSpaceBelow = isIframeShorterThanWindow
310
339
  ? distanceToIframeBottom - displayBuffer
311
340
  : viewableSpaceBelow - displayBuffer;
@@ -320,7 +349,7 @@ const Q2Popover = class {
320
349
  const shouldUpdateMaxHeight = !containerElement.style.getPropertyValue('--comp-pop-max-height') || this.orientationChanged;
321
350
  // we do not want to constantly update the max-height after an orientation change, so we switch this back to false
322
351
  this.orientationChanged = false;
323
- const currentOrDetermineDirection = this.currentDirection || actualDirection || directionWithMostSpace;
352
+ const currentOrDetermineDirection = this.currentDirection || providedDirection || directionWithMostSpace;
324
353
  switch (currentOrDetermineDirection) {
325
354
  case 'up':
326
355
  if (shouldUpdateMaxHeight) {
@@ -338,12 +367,14 @@ const Q2Popover = class {
338
367
  }
339
368
  /// DOM ///
340
369
  render() {
341
- const containerClasses = ['container', this.currentDirection];
370
+ const containerClasses = ['container', this.currentDirection, this.align];
342
371
  if (this.show)
343
372
  containerClasses.push('show');
373
+ if (this.block)
374
+ containerClasses.push('block');
344
375
  if (this.mode === 'legacy')
345
376
  containerClasses.push('legacy');
346
- return (index.h("div", { key: 'fe42de88a749c3ada361f2616a8f3b2559cb222e', ref: el => (this.containerElement = el), class: containerClasses.join(' '), "test-id": "outerContainer" }, index.h("div", { key: 'b6a51c4612e0ab2615419896c89b49bc4a00baec', ref: el => (this.contentElement = el), class: "content" }, index.h("slot", { key: '0a9780e4386d95df7eb8334e788f6a451738c995' }))));
377
+ return (index.h("div", { key: '3e64595abda5e8b4bb38224bc23b53edd68c0da5', ref: el => (this.containerElement = el), class: containerClasses.join(' '), "test-id": "outerContainer", tabIndex: -1, popover: "auto" }, index.h("div", { key: '04ca94bbec46e804aac7ee4292b70a674fdcb99c', ref: el => (this.contentElement = el), class: "content" }, index.h("slot", { key: 'cab4e986463062c54c2e84c12ca95fc842cff31f' }))));
347
378
  }
348
379
  get hostElement() { return index.getElement(this); }
349
380
  static get watchers() { return {
@@ -1 +1 @@
1
- {"file":"click-elsewhere.q2-popover.entry.cjs.js","mappings":";;;;;;;MAMa,cAAc;IAJ3B;;;;;;QAQI,mBAAc,GAAa,CAAC,WAAW,EAAE,WAAW,EAAE,YAAY,CAAC,CAAC;QACpE,uBAAkB,GAAY,KAAK,CAAC;QA0EpC,iBAAY,GAAG,CAAC,KAAY;YACxB,MAAM,kBAAkB,GAAG,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,iBAAiB,EAAE,CAAC,CAAC;YACzE,MAAM,gBAAgB,GAClB,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAC,IAAI,IAAI,CAAC,iBAAiB,CAAC,KA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BAAgB,CAAC,IAAI,CAAC,GAAG,CAAC,aACzB,gBAAgB,IAExBA,kEACI,GAAG,EAAE,EAAE,KAAK,IAAI,CAAC,cAAc,GAAG,EAAE,CAAC,EACrC,KAAK,EAAC,SAAS,IAEfA,oEAAQ,CACN,CACJ,EACR;KACL;;;;;;;;;;;;","names":["handleDeprecationWarning","waitForNextPaint","h"],"sources":["src/components/click-elsewhere/click-elsewhere.tsx","src/components/q2-popover/q2-popover.scss?tag=q2-popover&encapsulation=shadow","src/components/q2-popover/q2-popover.tsx"],"sourcesContent":["import { Component, ComponentInterface, Element, Event, EventEmitter } from '@stencil/core';\n\n@Component({\n tag: 'click-elsewhere',\n shadow: false,\n})\nexport class ClickElsewhere implements ComponentInterface {\n /**\n * Listens for mouse and window events that happen outside this click-elsewhere element so we can close popovers when users click outside them\n */\n mouseEventList: string[] = ['mousedown', 'dragstart', 'touchstart'];\n isCurrentlyFocused: boolean = false;\n\n @Element() hostElement: HTMLElement;\n\n /**\n * Emitted when the user clicks outside the element\n */\n @Event() change: EventEmitter;\n\n /* TODO: Stencil/Rollup is having issues compiling without this here. Will try to remove in future Stencil upgrade. */\n /* tslint:disable:no-empty */\n componentWillLoad() {}\n /* tslint:enable:no-empty */\n\n connectedCallback() {\n this.mouseEventList.forEach((eventName: string) => {\n document.addEventListener(eventName, this.mouseHandler);\n });\n window.addEventListener('blur', this.windowBlurHandler);\n }\n\n disconnectedCallback() {\n this.mouseEventList.forEach((eventName: string) => {\n document.removeEventListener(eventName, this.mouseHandler);\n });\n window.removeEventListener('blur', this.windowBlurHandler);\n }\n\n findActiveElement(): Element | null {\n let workingElement = document.activeElement!;\n while (true) {\n if (!workingElement || !workingElement.shadowRoot) {\n return workingElement;\n }\n workingElement = workingElement.shadowRoot.activeElement;\n }\n }\n\n shadowEventTarget(event: any): Element {\n return event.composedPath()[0] || event.target;\n }\n\n shadowContains(child: any): boolean {\n /**\n * shadow-dom enabled version of Node.contains()\n */\n\n while (true) {\n if (child === this.hostElement) {\n return true;\n }\n if (!child) {\n return false;\n }\n child = child.parentNode || child.host;\n }\n }\n\n originatesInSlots(target: Element): boolean {\n const slots = this.hostElement.querySelectorAll('slot');\n for (const currentSlot of Array.from(slots)) {\n const lightNodes =\n (currentSlot && currentSlot.assignedNodes && currentSlot.assignedNodes()) ||\n this.hostElement.childNodes;\n\n for (const currentNode of Array.from(lightNodes)) {\n if (currentNode.contains(target)) {\n return true;\n }\n }\n }\n return false;\n }\n\n mouseHandler = (event: Event): void => {\n const isCurrentlyFocused = this.shadowContains(this.findActiveElement());\n const aboutToBeFocused =\n this.shadowContains(this.shadowEventTarget(event)) || this.originatesInSlots(event.target as Element);\n\n if (!aboutToBeFocused && (this.isCurrentlyFocused || isCurrentlyFocused)) {\n this.isCurrentlyFocused = false;\n this.change.emit();\n return;\n }\n this.isCurrentlyFocused = aboutToBeFocused || isCurrentlyFocused;\n };\n\n windowBlurHandler = (): void => {\n const activeElement = this.findActiveElement();\n if (\n (activeElement === document.body && this.isCurrentlyFocused) || // clicked parent frame\n (activeElement !== document.body && activeElement?.tagName === 'IFRAME') // clicked child frame\n ) {\n this.isCurrentlyFocused = false;\n this.change.emit();\n return;\n }\n };\n}\n","@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 platformDimensions = window.Tecton?.platformDimensions;\n const distanceToIframeBottom = window.visualViewport.height - controlBottom;\n const viewableSpaceBelow =\n platformDimensions.innerHeight - (platformDimensions.outletOffset + controlBottom);\n const isIframeShorterThanWindow = distanceToIframeBottom < viewableSpaceBelow;\n windowHeight = platformDimensions.innerHeight;\n // If the top of the module is below the top of the window we just use the controlTop\n // Otherwise we need to add the outletOffset to the controlTop\n maxSpaceAbove =\n (platformDimensions.outletOffset > 0 ? controlTop : controlTop + platformDimensions.outletOffset) -\n displayBuffer;\n maxSpaceBelow = isIframeShorterThanWindow\n ? distanceToIframeBottom - displayBuffer\n : viewableSpaceBelow - displayBuffer;\n } else {\n windowHeight = window.visualViewport.height;\n maxSpaceAbove = controlTop - displayBuffer;\n maxSpaceBelow = windowHeight - controlBottom - displayBuffer;\n }\n\n const directionWithMostSpace: 'up' | 'down' = maxSpaceAbove > maxSpaceBelow ? 'up' : 'down';\n\n // We do not want to update the max height once the popover is open unless the page orientation shifts (resize or mobile use cases)\n const shouldUpdateMaxHeight =\n !containerElement.style.getPropertyValue('--comp-pop-max-height') || this.orientationChanged;\n // we do not want to constantly update the max-height after an orientation change, so we switch this back to false\n this.orientationChanged = false;\n const currentOrDetermineDirection = this.currentDirection || actualDirection || directionWithMostSpace;\n\n switch (currentOrDetermineDirection) {\n case 'up':\n if (shouldUpdateMaxHeight) {\n containerElement.style.setProperty('--comp-pop-max-height', `${maxSpaceAbove}px`);\n }\n this.setDirectionAndShow('up');\n break;\n case 'down':\n if (shouldUpdateMaxHeight) {\n containerElement.style.setProperty('--comp-pop-max-height', `${maxSpaceBelow}px`);\n }\n this.setDirectionAndShow('down');\n break;\n default:\n break;\n }\n }\n\n /// DOM ///\n render() {\n const containerClasses = ['container', this.currentDirection];\n if (this.show) containerClasses.push('show');\n if (this.mode === 'legacy') containerClasses.push('legacy');\n\n return (\n <div\n ref={el => (this.containerElement = el)}\n class={containerClasses.join(' ')}\n test-id=\"outerContainer\"\n >\n <div\n ref={el => (this.contentElement = el)}\n class=\"content\"\n >\n <slot />\n </div>\n </div>\n );\n }\n}\n"],"version":3}
1
+ {"file":"click-elsewhere.q2-popover.entry.cjs.js","mappings":";;;;;;;MAMa,cAAc;IAJ3B;;;;;;QAQI,mBAAc,GAAa,CAAC,WAAW,EAAE,WAAW,EAAE,YAAY,CAAC,CAAC;QACpE,uBAAkB,GAAY,KAAK,CAAC;QA0EpC,iBAAY,GAAG,CAAC,KAAY;YACxB,MAAM,kBAAkB,GAAG,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,iBAAiB,EAAE,CAAC,CAAC;YACzE,MAAM,gBAA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uB,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,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;QAC1E,IAAI,IAAI,CAAC,IAAI;YAAE,gBAAgB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAC7C,IAAI,IAAI,CAAC,KAAK;YAAE,gBAAgB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC/C,IAAI,IAAI,CAAC,IAAI,KAAK,QAAQ;YAAE,gBAAgB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAE5D,QACIC,kEACI,GAAG,EAAE,EAAE,KAAK,IAAI,CAAC,gBAAgB,GAAG,EAAE,CAAC,EACvC,KAAK,EAAE,gBAAgB,CAAC,IAAI,CAAC,GAAG,CAAC,aACzB,gBAAgB,EACxB,QAAQ,EAAE,CAAC,CAAC,EACZ,OAAO,EAAC,MAAM,IAEdA,kEACI,GAAG,EAAE,EAAE,KAAK,IAAI,CAAC,cAAc,GAAG,EAAE,CAAC,EACrC,KAAK,EAAC,SAAS,IAEfA,oEAAQ,CACN,CACJ,EACR;KACL;;;;;;;;;;;;","names":["handleDeprecationWarning","waitForNextPaint","h"],"sources":["src/components/click-elsewhere/click-elsewhere.tsx","src/components/q2-popover/q2-popover.scss?tag=q2-popover&encapsulation=shadow","src/components/q2-popover/q2-popover.tsx"],"sourcesContent":["import { Component, ComponentInterface, Element, Event, EventEmitter } from '@stencil/core';\n\n@Component({\n tag: 'click-elsewhere',\n shadow: false,\n})\nexport class ClickElsewhere implements ComponentInterface {\n /**\n * Listens for mouse and window events that happen outside this click-elsewhere element so we can close popovers when users click outside them\n */\n mouseEventList: string[] = ['mousedown', 'dragstart', 'touchstart'];\n isCurrentlyFocused: boolean = false;\n\n @Element() hostElement: HTMLElement;\n\n /**\n * Emitted when the user clicks outside the element\n */\n @Event() change: EventEmitter;\n\n /* TODO: Stencil/Rollup is having issues compiling without this here. Will try to remove in future Stencil upgrade. */\n /* tslint:disable:no-empty */\n componentWillLoad() {}\n /* tslint:enable:no-empty */\n\n connectedCallback() {\n this.mouseEventList.forEach((eventName: string) => {\n document.addEventListener(eventName, this.mouseHandler);\n });\n window.addEventListener('blur', this.windowBlurHandler);\n }\n\n disconnectedCallback() {\n this.mouseEventList.forEach((eventName: string) => {\n document.removeEventListener(eventName, this.mouseHandler);\n });\n window.removeEventListener('blur', this.windowBlurHandler);\n }\n\n findActiveElement(): Element | null {\n let workingElement = document.activeElement!;\n while (true) {\n if (!workingElement || !workingElement.shadowRoot) {\n return workingElement;\n }\n workingElement = workingElement.shadowRoot.activeElement;\n }\n }\n\n shadowEventTarget(event: any): Element {\n return event.composedPath()[0] || event.target;\n }\n\n shadowContains(child: any): boolean {\n /**\n * shadow-dom enabled version of Node.contains()\n */\n\n while (true) {\n if (child === this.hostElement) {\n return true;\n }\n if (!child) {\n return false;\n }\n child = child.parentNode || child.host;\n }\n }\n\n originatesInSlots(target: Element): boolean {\n const slots = this.hostElement.querySelectorAll('slot');\n for (const currentSlot of Array.from(slots)) {\n const lightNodes =\n (currentSlot && currentSlot.assignedNodes && currentSlot.assignedNodes()) ||\n this.hostElement.childNodes;\n\n for (const currentNode of Array.from(lightNodes)) {\n if (currentNode.contains(target)) {\n return true;\n }\n }\n }\n return false;\n }\n\n mouseHandler = (event: Event): void => {\n const isCurrentlyFocused = this.shadowContains(this.findActiveElement());\n const aboutToBeFocused =\n this.shadowContains(this.shadowEventTarget(event)) || this.originatesInSlots(event.target as Element);\n\n if (!aboutToBeFocused && (this.isCurrentlyFocused || isCurrentlyFocused)) {\n this.isCurrentlyFocused = false;\n this.change.emit();\n return;\n }\n this.isCurrentlyFocused = aboutToBeFocused || isCurrentlyFocused;\n };\n\n windowBlurHandler = (): void => {\n this.isCurrentlyFocused = false;\n this.change.emit();\n };\n}\n","@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);\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}
@@ -19269,4 +19269,4 @@ Object.keys(_index245).forEach(function (key) {
19269
19269
 
19270
19270
  exports.dateFns = dateFns;
19271
19271
 
19272
- //# sourceMappingURL=index-c385e32f.js.map
19272
+ //# sourceMappingURL=index-f69742cf.js.map