q2-tecton-elements 1.67.2 → 1.68.0

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 (807) hide show
  1. package/dist/bundle-report.json +22598 -10670
  2. package/dist/cjs/click-elsewhere.q2-option-list.q2-popover.entry.cjs.js.map +1 -1
  3. package/dist/cjs/click-elsewhere_3.cjs.entry.js +46 -32
  4. package/dist/cjs/click-elsewhere_3.cjs.entry.js.map +1 -1
  5. package/dist/cjs/{component-DRAntnCA.js → component-iASoq6gx.js} +9 -3
  6. package/dist/cjs/component-iASoq6gx.js.map +1 -0
  7. package/dist/cjs/{index-YvKoRT-t.js → index-DmGkqdX2.js} +3 -3
  8. package/dist/cjs/index-DmGkqdX2.js.map +1 -0
  9. package/dist/cjs/loader.cjs.js +1 -1
  10. package/dist/cjs/q2-action-group.q2-resize-observer.entry.cjs.js.map +1 -1
  11. package/dist/cjs/q2-action-group_2.cjs.entry.js +2 -2
  12. package/dist/cjs/q2-action-group_2.cjs.entry.js.map +1 -1
  13. package/dist/cjs/q2-action-sheet.cjs.entry.js +109 -4
  14. package/dist/cjs/q2-action-sheet.cjs.entry.js.map +1 -1
  15. package/dist/cjs/q2-action-sheet.entry.cjs.js.map +1 -1
  16. package/dist/cjs/q2-avatar.cjs.entry.js.map +1 -1
  17. package/dist/cjs/q2-avatar.entry.cjs.js.map +1 -1
  18. package/dist/cjs/q2-badge.cjs.entry.js +1 -1
  19. package/dist/cjs/q2-badge.cjs.entry.js.map +1 -1
  20. package/dist/cjs/q2-badge.entry.cjs.js.map +1 -1
  21. package/dist/cjs/q2-btn.q2-loading.entry.cjs.js.map +1 -1
  22. package/dist/cjs/q2-btn_2.cjs.entry.js +1 -1
  23. package/dist/cjs/q2-btn_2.cjs.entry.js.map +1 -1
  24. package/dist/cjs/q2-calendar.cjs.entry.js +6 -3
  25. package/dist/cjs/q2-calendar.cjs.entry.js.map +1 -1
  26. package/dist/cjs/q2-calendar.entry.cjs.js.map +1 -1
  27. package/dist/cjs/q2-card-image.cjs.entry.js +2 -2
  28. package/dist/cjs/q2-card-image.cjs.entry.js.map +1 -1
  29. package/dist/cjs/q2-card-image.entry.cjs.js.map +1 -1
  30. package/dist/cjs/q2-card.cjs.entry.js +1 -1
  31. package/dist/cjs/q2-card.cjs.entry.js.map +1 -1
  32. package/dist/cjs/q2-card.entry.cjs.js.map +1 -1
  33. package/dist/cjs/q2-carousel-pane.cjs.entry.js +3 -3
  34. package/dist/cjs/q2-carousel-pane.cjs.entry.js.map +1 -1
  35. package/dist/cjs/q2-carousel-pane.entry.cjs.js.map +1 -1
  36. package/dist/cjs/q2-carousel.cjs.entry.js +162 -29
  37. package/dist/cjs/q2-carousel.cjs.entry.js.map +1 -1
  38. package/dist/cjs/q2-carousel.entry.cjs.js.map +1 -1
  39. package/dist/cjs/q2-chart-area.cjs.entry.js +1 -1
  40. package/dist/cjs/q2-chart-bar.cjs.entry.js +1 -1
  41. package/dist/cjs/q2-chart-donut.cjs.entry.js +3 -2
  42. package/dist/cjs/q2-chart-donut.cjs.entry.js.map +1 -1
  43. package/dist/cjs/q2-chart-donut.entry.cjs.js.map +1 -1
  44. package/dist/cjs/q2-checkbox-group.cjs.entry.js +2 -2
  45. package/dist/cjs/q2-checkbox-group.cjs.entry.js.map +1 -1
  46. package/dist/cjs/q2-checkbox-group.entry.cjs.js.map +1 -1
  47. package/dist/cjs/q2-checkbox.q2-tag.entry.cjs.js.map +1 -1
  48. package/dist/cjs/q2-checkbox_2.cjs.entry.js +3 -3
  49. package/dist/cjs/q2-checkbox_2.cjs.entry.js.map +1 -1
  50. package/dist/cjs/q2-context.cjs.entry.js +2 -2
  51. package/dist/cjs/q2-context.cjs.entry.js.map +1 -1
  52. package/dist/cjs/q2-context.entry.cjs.js.map +1 -1
  53. package/dist/cjs/q2-currency.cjs.entry.js +2 -3
  54. package/dist/cjs/q2-currency.cjs.entry.js.map +1 -1
  55. package/dist/cjs/q2-currency.entry.cjs.js.map +1 -1
  56. package/dist/cjs/q2-data-table.cjs.entry.js +2 -2
  57. package/dist/cjs/q2-data-table.cjs.entry.js.map +1 -1
  58. package/dist/cjs/q2-data-table.entry.cjs.js.map +1 -1
  59. package/dist/cjs/q2-detail.cjs.entry.js +2 -2
  60. package/dist/cjs/q2-detail.cjs.entry.js.map +1 -1
  61. package/dist/cjs/q2-detail.entry.cjs.js.map +1 -1
  62. package/dist/cjs/q2-dropdown-item.cjs.entry.js +2 -2
  63. package/dist/cjs/q2-dropdown-item.cjs.entry.js.map +1 -1
  64. package/dist/cjs/q2-dropdown-item.entry.cjs.js.map +1 -1
  65. package/dist/cjs/q2-dropdown.cjs.entry.js +3 -5
  66. package/dist/cjs/q2-dropdown.cjs.entry.js.map +1 -1
  67. package/dist/cjs/q2-dropdown.entry.cjs.js.map +1 -1
  68. package/dist/cjs/q2-editable-field.cjs.entry.js +1 -1
  69. package/dist/cjs/q2-editable-field.cjs.entry.js.map +1 -1
  70. package/dist/cjs/q2-editable-field.entry.cjs.js.map +1 -1
  71. package/dist/cjs/q2-example.cjs.entry.js +1 -1
  72. package/dist/cjs/q2-file-picker.cjs.entry.js +1 -1
  73. package/dist/cjs/q2-file-picker.cjs.entry.js.map +1 -1
  74. package/dist/cjs/q2-file-picker.entry.cjs.js.map +1 -1
  75. package/dist/cjs/q2-form.cjs.entry.js +2 -2
  76. package/dist/cjs/q2-form.cjs.entry.js.map +1 -1
  77. package/dist/cjs/q2-form.entry.cjs.js.map +1 -1
  78. package/dist/cjs/q2-formatted-text.cjs.entry.js +1 -1
  79. package/dist/cjs/q2-formatted-text.cjs.entry.js.map +1 -1
  80. package/dist/cjs/q2-formatted-text.entry.cjs.js.map +1 -1
  81. package/dist/cjs/q2-grid-area.cjs.entry.js +1 -1
  82. package/dist/cjs/q2-grid.cjs.entry.js +32 -8
  83. package/dist/cjs/q2-grid.cjs.entry.js.map +1 -1
  84. package/dist/cjs/q2-grid.entry.cjs.js.map +1 -1
  85. package/dist/cjs/q2-icon.cjs.entry.js +1 -1
  86. package/dist/cjs/q2-icon.cjs.entry.js.map +1 -1
  87. package/dist/cjs/q2-icon.entry.cjs.js.map +1 -1
  88. package/dist/cjs/q2-input.cjs.entry.js +8 -5
  89. package/dist/cjs/q2-input.cjs.entry.js.map +1 -1
  90. package/dist/cjs/q2-input.entry.cjs.js.map +1 -1
  91. package/dist/cjs/q2-item.cjs.entry.js +2 -2
  92. package/dist/cjs/q2-item.cjs.entry.js.map +1 -1
  93. package/dist/cjs/q2-item.entry.cjs.js.map +1 -1
  94. package/dist/cjs/q2-legend.cjs.entry.js +2 -3
  95. package/dist/cjs/q2-legend.cjs.entry.js.map +1 -1
  96. package/dist/cjs/q2-legend.entry.cjs.js.map +1 -1
  97. package/dist/cjs/q2-link.q2-list.entry.cjs.js.map +1 -1
  98. package/dist/cjs/q2-link_2.cjs.entry.js +2 -2
  99. package/dist/cjs/q2-link_2.cjs.entry.js.map +1 -1
  100. package/dist/cjs/q2-loc.cjs.entry.js +1 -1
  101. package/dist/cjs/q2-message.cjs.entry.js +3 -3
  102. package/dist/cjs/q2-message.cjs.entry.js.map +1 -1
  103. package/dist/cjs/q2-message.entry.cjs.js.map +1 -1
  104. package/dist/cjs/q2-meter.cjs.entry.js +2 -2
  105. package/dist/cjs/q2-meter.cjs.entry.js.map +1 -1
  106. package/dist/cjs/q2-meter.entry.cjs.js.map +1 -1
  107. package/dist/cjs/q2-modal.cjs.entry.js +3 -3
  108. package/dist/cjs/q2-modal.cjs.entry.js.map +1 -1
  109. package/dist/cjs/q2-modal.entry.cjs.js.map +1 -1
  110. package/dist/cjs/q2-month-picker.cjs.entry.js +1 -1
  111. package/dist/cjs/q2-mutation-observer.cjs.entry.js +1 -1
  112. package/dist/cjs/q2-optgroup.cjs.entry.js +3 -3
  113. package/dist/cjs/q2-optgroup.cjs.entry.js.map +1 -1
  114. package/dist/cjs/q2-optgroup.entry.cjs.js.map +1 -1
  115. package/dist/cjs/q2-option.cjs.entry.js +3 -3
  116. package/dist/cjs/q2-option.cjs.entry.js.map +1 -1
  117. package/dist/cjs/q2-option.entry.cjs.js.map +1 -1
  118. package/dist/cjs/q2-otp.cjs.entry.js +373 -0
  119. package/dist/cjs/q2-otp.cjs.entry.js.map +1 -0
  120. package/dist/cjs/q2-otp.entry.cjs.js.map +1 -0
  121. package/dist/cjs/q2-pagination.cjs.entry.js +4 -4
  122. package/dist/cjs/q2-pagination.cjs.entry.js.map +1 -1
  123. package/dist/cjs/q2-pagination.entry.cjs.js.map +1 -1
  124. package/dist/cjs/q2-pill.cjs.entry.js +24 -15
  125. package/dist/cjs/q2-pill.cjs.entry.js.map +1 -1
  126. package/dist/cjs/q2-pill.entry.cjs.js.map +1 -1
  127. package/dist/cjs/q2-radio-group.cjs.entry.js +1 -1
  128. package/dist/cjs/q2-radio-group.cjs.entry.js.map +1 -1
  129. package/dist/cjs/q2-radio-group.entry.cjs.js.map +1 -1
  130. package/dist/cjs/q2-radio.cjs.entry.js +3 -3
  131. package/dist/cjs/q2-radio.cjs.entry.js.map +1 -1
  132. package/dist/cjs/q2-radio.entry.cjs.js.map +1 -1
  133. package/dist/cjs/q2-relative-time.cjs.entry.js +2 -2
  134. package/dist/cjs/q2-section-container.cjs.entry.js +1 -1
  135. package/dist/cjs/q2-section.cjs.entry.js +3 -3
  136. package/dist/cjs/q2-section.cjs.entry.js.map +1 -1
  137. package/dist/cjs/q2-section.entry.cjs.js.map +1 -1
  138. package/dist/cjs/q2-select.cjs.entry.js +1 -1
  139. package/dist/cjs/q2-select.cjs.entry.js.map +1 -1
  140. package/dist/cjs/q2-select.entry.cjs.js.map +1 -1
  141. package/dist/cjs/q2-stepper-pane.cjs.entry.js +3 -3
  142. package/dist/cjs/q2-stepper-vertical.cjs.entry.js +2 -2
  143. package/dist/cjs/q2-stepper-vertical.cjs.entry.js.map +1 -1
  144. package/dist/cjs/q2-stepper-vertical.entry.cjs.js.map +1 -1
  145. package/dist/cjs/q2-stepper.cjs.entry.js +2 -2
  146. package/dist/cjs/q2-stepper.cjs.entry.js.map +1 -1
  147. package/dist/cjs/q2-stepper.entry.cjs.js.map +1 -1
  148. package/dist/cjs/q2-tab-container.cjs.entry.js +3 -3
  149. package/dist/cjs/q2-tab-container.cjs.entry.js.map +1 -1
  150. package/dist/cjs/q2-tab-container.entry.cjs.js.map +1 -1
  151. package/dist/cjs/q2-tab-pane.cjs.entry.js +2 -2
  152. package/dist/cjs/q2-tecton-elements.cjs.js +1 -1
  153. package/dist/cjs/q2-textarea.cjs.entry.js +1 -1
  154. package/dist/cjs/q2-textarea.cjs.entry.js.map +1 -1
  155. package/dist/cjs/q2-textarea.entry.cjs.js.map +1 -1
  156. package/dist/cjs/q2-toast.cjs.entry.js +1 -1
  157. package/dist/cjs/q2-toast.cjs.entry.js.map +1 -1
  158. package/dist/cjs/q2-toast.entry.cjs.js.map +1 -1
  159. package/dist/cjs/q2-tooltip.cjs.entry.js +124 -5
  160. package/dist/cjs/q2-tooltip.cjs.entry.js.map +1 -1
  161. package/dist/cjs/q2-tooltip.entry.cjs.js.map +1 -1
  162. package/dist/cjs/{sanitize-html-string-CW6y5624.js → sanitize-html-string-D17Pr7-c.js} +21 -4
  163. package/dist/cjs/{sanitize-html-string-CW6y5624.js.map → sanitize-html-string-D17Pr7-c.js.map} +1 -1
  164. package/dist/cjs/tecton-tab-pane.cjs.entry.js +2 -2
  165. package/dist/collection/collection-manifest.json +1 -0
  166. package/dist/collection/components/click-elsewhere/click-elsewhere.js +2 -0
  167. package/dist/collection/components/click-elsewhere/click-elsewhere.js.map +1 -1
  168. package/dist/collection/components/q2-action-group/q2-action-group.css +14 -0
  169. package/dist/collection/components/q2-action-sheet/q2-action-sheet.css +16 -0
  170. package/dist/collection/components/q2-action-sheet/q2-action-sheet.js +107 -2
  171. package/dist/collection/components/q2-action-sheet/q2-action-sheet.js.map +1 -1
  172. package/dist/collection/components/q2-avatar/q2-avatar.css +24 -0
  173. package/dist/collection/components/q2-avatar/test/q2-avatar-test.vr.js +61 -0
  174. package/dist/collection/components/q2-avatar/test/q2-avatar-test.vr.js.map +1 -0
  175. package/dist/collection/components/q2-badge/q2-badge.css +30 -0
  176. package/dist/collection/components/q2-badge/test/q2-badge-test.vr.js +34 -0
  177. package/dist/collection/components/q2-badge/test/q2-badge-test.vr.js.map +1 -0
  178. package/dist/collection/components/q2-btn/q2-btn.css +279 -0
  179. package/dist/collection/components/q2-btn/test/q2-btn-test.vr.js +80 -0
  180. package/dist/collection/components/q2-btn/test/q2-btn-test.vr.js.map +1 -0
  181. package/dist/collection/components/q2-calendar/q2-calendar.css +36 -0
  182. package/dist/collection/components/q2-calendar/q2-calendar.js +5 -2
  183. package/dist/collection/components/q2-calendar/q2-calendar.js.map +1 -1
  184. package/dist/collection/components/q2-calendar/test/q2-calendar-test.vr.js +170 -0
  185. package/dist/collection/components/q2-calendar/test/q2-calendar-test.vr.js.map +1 -0
  186. package/dist/collection/components/q2-card/q2-card.css +62 -0
  187. package/dist/collection/components/q2-card/test/q2-card-test.vr.js +72 -0
  188. package/dist/collection/components/q2-card/test/q2-card-test.vr.js.map +1 -0
  189. package/dist/collection/components/q2-card-image/q2-card-image.css +74 -13
  190. package/dist/collection/components/q2-card-image/test/q2-card-image-test.vr.js +152 -0
  191. package/dist/collection/components/q2-card-image/test/q2-card-image-test.vr.js.map +1 -0
  192. package/dist/collection/components/q2-carousel/q2-carousel.css +78 -13
  193. package/dist/collection/components/q2-carousel/q2-carousel.js +241 -27
  194. package/dist/collection/components/q2-carousel/q2-carousel.js.map +1 -1
  195. package/dist/collection/components/q2-carousel/test/q2-carousel-test.vr.js +104 -0
  196. package/dist/collection/components/q2-carousel/test/q2-carousel-test.vr.js.map +1 -0
  197. package/dist/collection/components/q2-carousel-pane/q2-carousel-pane.css +26 -1
  198. package/dist/collection/components/q2-chart-area/test/q2-chart-area-test.vr.js +126 -0
  199. package/dist/collection/components/q2-chart-area/test/q2-chart-area-test.vr.js.map +1 -0
  200. package/dist/collection/components/q2-chart-bar/test/q2-chart-bar-test.vr.js +105 -0
  201. package/dist/collection/components/q2-chart-bar/test/q2-chart-bar-test.vr.js.map +1 -0
  202. package/dist/collection/components/q2-chart-donut/q2-chart-donut.css +29 -0
  203. package/dist/collection/components/q2-chart-donut/q2-chart-donut.js +21 -1
  204. package/dist/collection/components/q2-chart-donut/q2-chart-donut.js.map +1 -1
  205. package/dist/collection/components/q2-chart-donut/test/q2-chart-donut-test.vr.js +151 -0
  206. package/dist/collection/components/q2-chart-donut/test/q2-chart-donut-test.vr.js.map +1 -0
  207. package/dist/collection/components/q2-checkbox/q2-checkbox.css +128 -0
  208. package/dist/collection/components/q2-checkbox/test/q2-checkbox-test.vr.js +69 -0
  209. package/dist/collection/components/q2-checkbox/test/q2-checkbox-test.vr.js.map +1 -0
  210. package/dist/collection/components/q2-checkbox-group/q2-checkbox-group.css +21 -0
  211. package/dist/collection/components/q2-checkbox-group/test/q2-checkbox-group-test.vr.js +61 -0
  212. package/dist/collection/components/q2-checkbox-group/test/q2-checkbox-group-test.vr.js.map +1 -0
  213. package/dist/collection/components/q2-context/q2-context.css +16 -0
  214. package/dist/collection/components/q2-context/test/q2-context-test.vr.js +95 -0
  215. package/dist/collection/components/q2-context/test/q2-context-test.vr.js.map +1 -0
  216. package/dist/collection/components/q2-currency/q2-currency.css +31 -0
  217. package/dist/collection/components/q2-currency/q2-currency.js +3 -4
  218. package/dist/collection/components/q2-currency/q2-currency.js.map +1 -1
  219. package/dist/collection/components/q2-currency/test/q2-currency-test.vr.js +79 -0
  220. package/dist/collection/components/q2-currency/test/q2-currency-test.vr.js.map +1 -0
  221. package/dist/collection/components/q2-data-table/q2-data-table.css +51 -0
  222. package/dist/collection/components/q2-data-table/q2-data-table.js +1 -1
  223. package/dist/collection/components/q2-data-table/test/q2-data-table-test.vr.js +79 -0
  224. package/dist/collection/components/q2-data-table/test/q2-data-table-test.vr.js.map +1 -0
  225. package/dist/collection/components/q2-detail/q2-detail.css +42 -0
  226. package/dist/collection/components/q2-detail/q2-detail.js +1 -1
  227. package/dist/collection/components/q2-dropdown/q2-dropdown.css +8 -0
  228. package/dist/collection/components/q2-dropdown/q2-dropdown.js +2 -4
  229. package/dist/collection/components/q2-dropdown/q2-dropdown.js.map +1 -1
  230. package/dist/collection/components/q2-dropdown-item/q2-dropdown-item.css +11 -0
  231. package/dist/collection/components/q2-editable-field/q2-editable-field.css +5 -0
  232. package/dist/collection/components/q2-editable-field/test/q2-editable-field-test.vr.js +89 -0
  233. package/dist/collection/components/q2-editable-field/test/q2-editable-field-test.vr.js.map +1 -0
  234. package/dist/collection/components/q2-example/q2-example.js +1 -1
  235. package/dist/collection/components/q2-file-picker/q2-file-picker.css +64 -0
  236. package/dist/collection/components/q2-file-picker/test/q2-file-picker-test.vr.js +92 -0
  237. package/dist/collection/components/q2-file-picker/test/q2-file-picker-test.vr.js.map +1 -0
  238. package/dist/collection/components/q2-form/q2-form.css +34 -20
  239. package/dist/collection/components/q2-form/q2-form.js +1 -1
  240. package/dist/collection/components/q2-formatted-text/q2-formatted-text.css +14 -0
  241. package/dist/collection/components/q2-formatted-text/q2-formatted-text.js +1 -1
  242. package/dist/collection/components/q2-formatted-text/test/q2-formatted-text-test.vr.js +55 -0
  243. package/dist/collection/components/q2-formatted-text/test/q2-formatted-text-test.vr.js.map +1 -0
  244. package/dist/collection/components/q2-grid/q2-grid.css +13 -0
  245. package/dist/collection/components/q2-grid/q2-grid.js +31 -7
  246. package/dist/collection/components/q2-grid/q2-grid.js.map +1 -1
  247. package/dist/collection/components/q2-icon/assets/standard.symbol.svg +1 -1
  248. package/dist/collection/components/q2-icon/q2-icon.css +15 -0
  249. package/dist/collection/components/q2-icon/test/q2-icon-test.vr.js +55 -0
  250. package/dist/collection/components/q2-icon/test/q2-icon-test.vr.js.map +1 -0
  251. package/dist/collection/components/q2-input/q2-input.css +104 -0
  252. package/dist/collection/components/q2-input/q2-input.js +6 -3
  253. package/dist/collection/components/q2-input/q2-input.js.map +1 -1
  254. package/dist/collection/components/q2-input/test/q2-input-test.vr.js +97 -0
  255. package/dist/collection/components/q2-input/test/q2-input-test.vr.js.map +1 -0
  256. package/dist/collection/components/q2-item/q2-item.css +28 -0
  257. package/dist/collection/components/q2-item/q2-item.js +1 -1
  258. package/dist/collection/components/q2-legend/q2-legend.css +16 -0
  259. package/dist/collection/components/q2-legend/q2-legend.js +21 -3
  260. package/dist/collection/components/q2-legend/q2-legend.js.map +1 -1
  261. package/dist/collection/components/q2-link/q2-link.css +20 -0
  262. package/dist/collection/components/q2-link/test/q2-link-test.vr.js +70 -0
  263. package/dist/collection/components/q2-link/test/q2-link-test.vr.js.map +1 -0
  264. package/dist/collection/components/q2-list/q2-list.css +14 -0
  265. package/dist/collection/components/q2-list/q2-list.js +1 -1
  266. package/dist/collection/components/q2-list/test/q2-list-test.vr.js +58 -0
  267. package/dist/collection/components/q2-list/test/q2-list-test.vr.js.map +1 -0
  268. package/dist/collection/components/q2-loading/q2-loading.css +9 -0
  269. package/dist/collection/components/q2-message/q2-message.css +29 -1
  270. package/dist/collection/components/q2-message/q2-message.js +1 -1
  271. package/dist/collection/components/q2-message/test/q2-message-test.vr.js +57 -0
  272. package/dist/collection/components/q2-message/test/q2-message-test.vr.js.map +1 -0
  273. package/dist/collection/components/q2-meter/q2-meter.css +40 -0
  274. package/dist/collection/components/q2-meter/q2-meter.js +1 -1
  275. package/dist/collection/components/q2-meter/test/q2-meter-test.vr.js +78 -0
  276. package/dist/collection/components/q2-meter/test/q2-meter-test.vr.js.map +1 -0
  277. package/dist/collection/components/q2-modal/q2-modal.css +21 -0
  278. package/dist/collection/components/q2-modal/q2-modal.js +1 -1
  279. package/dist/collection/components/q2-modal/test/q2-modal-test.vr.js +107 -0
  280. package/dist/collection/components/q2-modal/test/q2-modal-test.vr.js.map +1 -0
  281. package/dist/collection/components/q2-mutation-observer/q2-mutation-observer.js +1 -1
  282. package/dist/collection/components/q2-optgroup/q2-optgroup.css +11 -0
  283. package/dist/collection/components/q2-optgroup/q2-optgroup.js +1 -1
  284. package/dist/collection/components/q2-option/q2-option.css +9 -0
  285. package/dist/collection/components/q2-option/q2-option.js +1 -1
  286. package/dist/collection/components/q2-option/q2-option.js.map +1 -1
  287. package/dist/collection/components/q2-option-list/q2-option-list.css +3 -0
  288. package/dist/collection/components/q2-option-list/q2-option-list.js +37 -28
  289. package/dist/collection/components/q2-option-list/q2-option-list.js.map +1 -1
  290. package/dist/collection/components/q2-otp/q2-otp.css +312 -0
  291. package/dist/collection/components/q2-otp/q2-otp.js +873 -0
  292. package/dist/collection/components/q2-otp/q2-otp.js.map +1 -0
  293. package/dist/collection/components/q2-pagination/q2-pagination.css +22 -0
  294. package/dist/collection/components/q2-pagination/q2-pagination.js +3 -3
  295. package/dist/collection/components/q2-pagination/test/q2-pagination-test.vr.js +145 -0
  296. package/dist/collection/components/q2-pagination/test/q2-pagination-test.vr.js.map +1 -0
  297. package/dist/collection/components/q2-pill/q2-pill.css +53 -0
  298. package/dist/collection/components/q2-pill/q2-pill.js +23 -14
  299. package/dist/collection/components/q2-pill/q2-pill.js.map +1 -1
  300. package/dist/collection/components/q2-pill/test/q2-pill-test.vr.js +110 -0
  301. package/dist/collection/components/q2-pill/test/q2-pill-test.vr.js.map +1 -0
  302. package/dist/collection/components/q2-popover/q2-popover.css +20 -0
  303. package/dist/collection/components/q2-popover/q2-popover.js +5 -2
  304. package/dist/collection/components/q2-popover/q2-popover.js.map +1 -1
  305. package/dist/collection/components/q2-radio/q2-radio.css +52 -1
  306. package/dist/collection/components/q2-radio/q2-radio.js +2 -2
  307. package/dist/collection/components/q2-radio/q2-radio.js.map +1 -1
  308. package/dist/collection/components/q2-radio/test/q2-radio-test.vr.js +73 -0
  309. package/dist/collection/components/q2-radio/test/q2-radio-test.vr.js.map +1 -0
  310. package/dist/collection/components/q2-radio-group/q2-radio-group.css +22 -0
  311. package/dist/collection/components/q2-radio-group/test/q2-radio-group-test.vr.js +99 -0
  312. package/dist/collection/components/q2-radio-group/test/q2-radio-group-test.vr.js.map +1 -0
  313. package/dist/collection/components/q2-relative-time/q2-relative-time.js +1 -1
  314. package/dist/collection/components/q2-resize-observer/q2-resize-observer.js +1 -1
  315. package/dist/collection/components/q2-section/q2-section.css +26 -0
  316. package/dist/collection/components/q2-section/q2-section.js +2 -2
  317. package/dist/collection/components/q2-section/test/q2-section-test.vr.js +68 -0
  318. package/dist/collection/components/q2-section/test/q2-section-test.vr.js.map +1 -0
  319. package/dist/collection/components/q2-select/q2-select.css +17 -0
  320. package/dist/collection/components/q2-select/test/q2-select-test.vr.js +107 -0
  321. package/dist/collection/components/q2-select/test/q2-select-test.vr.js.map +1 -0
  322. package/dist/collection/components/q2-stepper/q2-stepper.css +36 -0
  323. package/dist/collection/components/q2-stepper/q2-stepper.js +1 -1
  324. package/dist/collection/components/q2-stepper/test/q2-stepper-test.vr.js +86 -0
  325. package/dist/collection/components/q2-stepper/test/q2-stepper-test.vr.js.map +1 -0
  326. package/dist/collection/components/q2-stepper-pane/q2-stepper-pane.js +1 -1
  327. package/dist/collection/components/q2-stepper-vertical/q2-stepper-vertical.css +31 -0
  328. package/dist/collection/components/q2-stepper-vertical/q2-stepper-vertical.js +1 -1
  329. package/dist/collection/components/q2-stepper-vertical/test/q2-stepper-vertical-test.vr.js +97 -0
  330. package/dist/collection/components/q2-stepper-vertical/test/q2-stepper-vertical-test.vr.js.map +1 -0
  331. package/dist/collection/components/q2-tab-container/q2-tab-container.css +38 -0
  332. package/dist/collection/components/q2-tab-container/q2-tab-container.js +1 -1
  333. package/dist/collection/components/q2-tab-container/test/q2-tab-container-test.vr.js +78 -0
  334. package/dist/collection/components/q2-tab-container/test/q2-tab-container-test.vr.js.map +1 -0
  335. package/dist/collection/components/q2-tab-pane/q2-tab-pane.js +1 -1
  336. package/dist/collection/components/q2-tag/q2-tag.css +30 -1
  337. package/dist/collection/components/q2-tag/q2-tag.js +1 -1
  338. package/dist/collection/components/q2-tag/test/q2-tag-test.vr.js +83 -0
  339. package/dist/collection/components/q2-tag/test/q2-tag-test.vr.js.map +1 -0
  340. package/dist/collection/components/q2-textarea/q2-textarea.css +80 -0
  341. package/dist/collection/components/q2-textarea/test/q2-textarea-test.vr.js +102 -0
  342. package/dist/collection/components/q2-textarea/test/q2-textarea-test.vr.js.map +1 -0
  343. package/dist/collection/components/q2-toast/q2-toast.css +15 -0
  344. package/dist/collection/components/q2-tooltip/q2-tooltip.css +31 -0
  345. package/dist/collection/components/q2-tooltip/q2-tooltip.js +135 -4
  346. package/dist/collection/components/q2-tooltip/q2-tooltip.js.map +1 -1
  347. package/dist/collection/components/q2-tooltip/test/q2-tooltip-test.vr.js +76 -0
  348. package/dist/collection/components/q2-tooltip/test/q2-tooltip-test.vr.js.map +1 -0
  349. package/dist/collection/components/tecton-tab-pane/tecton-tab-pane.js +2 -2
  350. package/dist/collection/utils/component.js +7 -1
  351. package/dist/collection/utils/component.js.map +1 -1
  352. package/dist/collection/utils/index.js +1 -1
  353. package/dist/collection/utils/index.js.map +1 -1
  354. package/dist/collection/utils/sanitize-html-string.js +19 -2
  355. package/dist/collection/utils/sanitize-html-string.js.map +1 -1
  356. package/dist/collection/utils/test/vr-helpers.js +98 -0
  357. package/dist/collection/utils/test/vr-helpers.js.map +1 -0
  358. package/dist/components/click-elsewhere2.js +2 -0
  359. package/dist/components/click-elsewhere2.js.map +1 -1
  360. package/dist/components/component.js +7 -1
  361. package/dist/components/component.js.map +1 -1
  362. package/dist/components/index.js +2 -0
  363. package/dist/components/index.js.map +1 -1
  364. package/dist/components/index2.js +1 -1
  365. package/dist/components/index2.js.map +1 -1
  366. package/dist/components/q2-action-group2.js.map +1 -1
  367. package/dist/components/q2-action-sheet.js +107 -2
  368. package/dist/components/q2-action-sheet.js.map +1 -1
  369. package/dist/components/q2-avatar2.js.map +1 -1
  370. package/dist/components/q2-badge2.js.map +1 -1
  371. package/dist/components/q2-btn2.js.map +1 -1
  372. package/dist/components/q2-calendar.js +5 -2
  373. package/dist/components/q2-calendar.js.map +1 -1
  374. package/dist/components/q2-card-image.js +1 -1
  375. package/dist/components/q2-card-image.js.map +1 -1
  376. package/dist/components/q2-card.js.map +1 -1
  377. package/dist/components/q2-carousel-pane.js +1 -135
  378. package/dist/components/q2-carousel-pane.js.map +1 -1
  379. package/dist/components/q2-carousel-pane2.js +140 -0
  380. package/dist/components/q2-carousel-pane2.js.map +1 -0
  381. package/dist/components/q2-carousel.js +173 -29
  382. package/dist/components/q2-carousel.js.map +1 -1
  383. package/dist/components/q2-chart-donut.js +3 -1
  384. package/dist/components/q2-chart-donut.js.map +1 -1
  385. package/dist/components/q2-checkbox-group.js.map +1 -1
  386. package/dist/components/q2-checkbox2.js.map +1 -1
  387. package/dist/components/q2-context.js +1 -1
  388. package/dist/components/q2-context.js.map +1 -1
  389. package/dist/components/q2-currency.js +3 -4
  390. package/dist/components/q2-currency.js.map +1 -1
  391. package/dist/components/q2-data-table.js +1 -1
  392. package/dist/components/q2-data-table.js.map +1 -1
  393. package/dist/components/q2-detail.js +1 -1
  394. package/dist/components/q2-detail.js.map +1 -1
  395. package/dist/components/q2-dropdown-item2.js.map +1 -1
  396. package/dist/components/q2-dropdown.js +2 -4
  397. package/dist/components/q2-dropdown.js.map +1 -1
  398. package/dist/components/q2-editable-field.js.map +1 -1
  399. package/dist/components/q2-example.js +1 -1
  400. package/dist/components/q2-file-picker.js.map +1 -1
  401. package/dist/components/q2-form.js +2 -2
  402. package/dist/components/q2-form.js.map +1 -1
  403. package/dist/components/q2-formatted-text.js +1 -1
  404. package/dist/components/q2-formatted-text.js.map +1 -1
  405. package/dist/components/q2-grid.js +32 -8
  406. package/dist/components/q2-grid.js.map +1 -1
  407. package/dist/components/q2-icon2.js.map +1 -1
  408. package/dist/components/q2-input2.js +7 -4
  409. package/dist/components/q2-input2.js.map +1 -1
  410. package/dist/components/q2-item2.js +1 -1
  411. package/dist/components/q2-item2.js.map +1 -1
  412. package/dist/components/q2-legend2.js +3 -3
  413. package/dist/components/q2-legend2.js.map +1 -1
  414. package/dist/components/q2-link2.js.map +1 -1
  415. package/dist/components/q2-list2.js +1 -1
  416. package/dist/components/q2-list2.js.map +1 -1
  417. package/dist/components/q2-loading2.js.map +1 -1
  418. package/dist/components/q2-message2.js +2 -2
  419. package/dist/components/q2-message2.js.map +1 -1
  420. package/dist/components/q2-meter.js +1 -1
  421. package/dist/components/q2-meter.js.map +1 -1
  422. package/dist/components/q2-modal.js +1 -1
  423. package/dist/components/q2-modal.js.map +1 -1
  424. package/dist/components/q2-mutation-observer.js +1 -1
  425. package/dist/components/q2-optgroup2.js +1 -1
  426. package/dist/components/q2-optgroup2.js.map +1 -1
  427. package/dist/components/q2-option-list2.js +37 -28
  428. package/dist/components/q2-option-list2.js.map +1 -1
  429. package/dist/components/q2-option2.js +1 -1
  430. package/dist/components/q2-option2.js.map +1 -1
  431. package/dist/components/q2-otp.d.ts +11 -0
  432. package/dist/components/q2-otp.js +439 -0
  433. package/dist/components/q2-otp.js.map +1 -0
  434. package/dist/components/q2-pagination.js +3 -3
  435. package/dist/components/q2-pagination.js.map +1 -1
  436. package/dist/components/q2-pill.js +23 -14
  437. package/dist/components/q2-pill.js.map +1 -1
  438. package/dist/components/q2-popover2.js +5 -2
  439. package/dist/components/q2-popover2.js.map +1 -1
  440. package/dist/components/q2-radio-group.js.map +1 -1
  441. package/dist/components/q2-radio.js +2 -2
  442. package/dist/components/q2-radio.js.map +1 -1
  443. package/dist/components/q2-relative-time.js +1 -1
  444. package/dist/components/q2-resize-observer2.js +1 -1
  445. package/dist/components/q2-section.js +2 -2
  446. package/dist/components/q2-section.js.map +1 -1
  447. package/dist/components/q2-select2.js.map +1 -1
  448. package/dist/components/q2-stepper-pane.js +1 -1
  449. package/dist/components/q2-stepper-vertical.js +1 -1
  450. package/dist/components/q2-stepper-vertical.js.map +1 -1
  451. package/dist/components/q2-stepper.js +1 -1
  452. package/dist/components/q2-stepper.js.map +1 -1
  453. package/dist/components/q2-tab-container.js +1 -1
  454. package/dist/components/q2-tab-container.js.map +1 -1
  455. package/dist/components/q2-tab-pane.js +1 -1
  456. package/dist/components/q2-tag2.js +2 -2
  457. package/dist/components/q2-tag2.js.map +1 -1
  458. package/dist/components/q2-textarea.js.map +1 -1
  459. package/dist/components/q2-toast.js.map +1 -1
  460. package/dist/components/q2-tooltip2.js +124 -5
  461. package/dist/components/q2-tooltip2.js.map +1 -1
  462. package/dist/components/sanitize-html-string.js +19 -2
  463. package/dist/components/sanitize-html-string.js.map +1 -1
  464. package/dist/components/tecton-tab-pane.js +2 -2
  465. package/dist/esm/click-elsewhere.q2-option-list.q2-popover.entry.js.map +1 -1
  466. package/dist/esm/click-elsewhere_3.entry.js +46 -32
  467. package/dist/esm/click-elsewhere_3.entry.js.map +1 -1
  468. package/dist/esm/{component-DVxzK3WH.js → component-DaQM9u3s.js} +9 -3
  469. package/dist/esm/component-DaQM9u3s.js.map +1 -0
  470. package/dist/esm/{index-C4PILj1_.js → index-C5gj0T_3.js} +4 -4
  471. package/dist/esm/index-C5gj0T_3.js.map +1 -0
  472. package/dist/esm/loader.js +1 -1
  473. package/dist/esm/q2-action-group.q2-resize-observer.entry.js.map +1 -1
  474. package/dist/esm/q2-action-group_2.entry.js +2 -2
  475. package/dist/esm/q2-action-group_2.entry.js.map +1 -1
  476. package/dist/esm/q2-action-sheet.entry.js +109 -4
  477. package/dist/esm/q2-action-sheet.entry.js.map +1 -1
  478. package/dist/esm/q2-avatar.entry.js.map +1 -1
  479. package/dist/esm/q2-badge.entry.js +1 -1
  480. package/dist/esm/q2-badge.entry.js.map +1 -1
  481. package/dist/esm/q2-btn.q2-loading.entry.js.map +1 -1
  482. package/dist/esm/q2-btn_2.entry.js +1 -1
  483. package/dist/esm/q2-btn_2.entry.js.map +1 -1
  484. package/dist/esm/q2-calendar.entry.js +6 -3
  485. package/dist/esm/q2-calendar.entry.js.map +1 -1
  486. package/dist/esm/q2-card-image.entry.js +2 -2
  487. package/dist/esm/q2-card-image.entry.js.map +1 -1
  488. package/dist/esm/q2-card.entry.js +1 -1
  489. package/dist/esm/q2-card.entry.js.map +1 -1
  490. package/dist/esm/q2-carousel-pane.entry.js +3 -3
  491. package/dist/esm/q2-carousel-pane.entry.js.map +1 -1
  492. package/dist/esm/q2-carousel.entry.js +162 -29
  493. package/dist/esm/q2-carousel.entry.js.map +1 -1
  494. package/dist/esm/q2-chart-area.entry.js +1 -1
  495. package/dist/esm/q2-chart-bar.entry.js +1 -1
  496. package/dist/esm/q2-chart-donut.entry.js +3 -2
  497. package/dist/esm/q2-chart-donut.entry.js.map +1 -1
  498. package/dist/esm/q2-checkbox-group.entry.js +2 -2
  499. package/dist/esm/q2-checkbox-group.entry.js.map +1 -1
  500. package/dist/esm/q2-checkbox.q2-tag.entry.js.map +1 -1
  501. package/dist/esm/q2-checkbox_2.entry.js +3 -3
  502. package/dist/esm/q2-checkbox_2.entry.js.map +1 -1
  503. package/dist/esm/q2-context.entry.js +2 -2
  504. package/dist/esm/q2-context.entry.js.map +1 -1
  505. package/dist/esm/q2-currency.entry.js +3 -4
  506. package/dist/esm/q2-currency.entry.js.map +1 -1
  507. package/dist/esm/q2-data-table.entry.js +2 -2
  508. package/dist/esm/q2-data-table.entry.js.map +1 -1
  509. package/dist/esm/q2-detail.entry.js +2 -2
  510. package/dist/esm/q2-detail.entry.js.map +1 -1
  511. package/dist/esm/q2-dropdown-item.entry.js +2 -2
  512. package/dist/esm/q2-dropdown-item.entry.js.map +1 -1
  513. package/dist/esm/q2-dropdown.entry.js +3 -5
  514. package/dist/esm/q2-dropdown.entry.js.map +1 -1
  515. package/dist/esm/q2-editable-field.entry.js +1 -1
  516. package/dist/esm/q2-editable-field.entry.js.map +1 -1
  517. package/dist/esm/q2-example.entry.js +1 -1
  518. package/dist/esm/q2-file-picker.entry.js +1 -1
  519. package/dist/esm/q2-file-picker.entry.js.map +1 -1
  520. package/dist/esm/q2-form.entry.js +2 -2
  521. package/dist/esm/q2-form.entry.js.map +1 -1
  522. package/dist/esm/q2-formatted-text.entry.js +1 -1
  523. package/dist/esm/q2-formatted-text.entry.js.map +1 -1
  524. package/dist/esm/q2-grid-area.entry.js +1 -1
  525. package/dist/esm/q2-grid.entry.js +33 -9
  526. package/dist/esm/q2-grid.entry.js.map +1 -1
  527. package/dist/esm/q2-icon.entry.js +1 -1
  528. package/dist/esm/q2-icon.entry.js.map +1 -1
  529. package/dist/esm/q2-input.entry.js +8 -5
  530. package/dist/esm/q2-input.entry.js.map +1 -1
  531. package/dist/esm/q2-item.entry.js +2 -2
  532. package/dist/esm/q2-item.entry.js.map +1 -1
  533. package/dist/esm/q2-legend.entry.js +2 -3
  534. package/dist/esm/q2-legend.entry.js.map +1 -1
  535. package/dist/esm/q2-link.q2-list.entry.js.map +1 -1
  536. package/dist/esm/q2-link_2.entry.js +2 -2
  537. package/dist/esm/q2-link_2.entry.js.map +1 -1
  538. package/dist/esm/q2-loc.entry.js +1 -1
  539. package/dist/esm/q2-message.entry.js +3 -3
  540. package/dist/esm/q2-message.entry.js.map +1 -1
  541. package/dist/esm/q2-meter.entry.js +2 -2
  542. package/dist/esm/q2-meter.entry.js.map +1 -1
  543. package/dist/esm/q2-modal.entry.js +3 -3
  544. package/dist/esm/q2-modal.entry.js.map +1 -1
  545. package/dist/esm/q2-month-picker.entry.js +1 -1
  546. package/dist/esm/q2-mutation-observer.entry.js +1 -1
  547. package/dist/esm/q2-optgroup.entry.js +3 -3
  548. package/dist/esm/q2-optgroup.entry.js.map +1 -1
  549. package/dist/esm/q2-option.entry.js +3 -3
  550. package/dist/esm/q2-option.entry.js.map +1 -1
  551. package/dist/esm/q2-otp.entry.js +371 -0
  552. package/dist/esm/q2-otp.entry.js.map +1 -0
  553. package/dist/esm/q2-pagination.entry.js +4 -4
  554. package/dist/esm/q2-pagination.entry.js.map +1 -1
  555. package/dist/esm/q2-pill.entry.js +24 -15
  556. package/dist/esm/q2-pill.entry.js.map +1 -1
  557. package/dist/esm/q2-radio-group.entry.js +1 -1
  558. package/dist/esm/q2-radio-group.entry.js.map +1 -1
  559. package/dist/esm/q2-radio.entry.js +3 -3
  560. package/dist/esm/q2-radio.entry.js.map +1 -1
  561. package/dist/esm/q2-relative-time.entry.js +2 -2
  562. package/dist/esm/q2-section-container.entry.js +1 -1
  563. package/dist/esm/q2-section.entry.js +3 -3
  564. package/dist/esm/q2-section.entry.js.map +1 -1
  565. package/dist/esm/q2-select.entry.js +1 -1
  566. package/dist/esm/q2-select.entry.js.map +1 -1
  567. package/dist/esm/q2-stepper-pane.entry.js +3 -3
  568. package/dist/esm/q2-stepper-vertical.entry.js +2 -2
  569. package/dist/esm/q2-stepper-vertical.entry.js.map +1 -1
  570. package/dist/esm/q2-stepper.entry.js +2 -2
  571. package/dist/esm/q2-stepper.entry.js.map +1 -1
  572. package/dist/esm/q2-tab-container.entry.js +3 -3
  573. package/dist/esm/q2-tab-container.entry.js.map +1 -1
  574. package/dist/esm/q2-tab-pane.entry.js +2 -2
  575. package/dist/esm/q2-tecton-elements.js +1 -1
  576. package/dist/esm/q2-textarea.entry.js +1 -1
  577. package/dist/esm/q2-textarea.entry.js.map +1 -1
  578. package/dist/esm/q2-toast.entry.js +1 -1
  579. package/dist/esm/q2-toast.entry.js.map +1 -1
  580. package/dist/esm/q2-tooltip.entry.js +124 -5
  581. package/dist/esm/q2-tooltip.entry.js.map +1 -1
  582. package/dist/esm/{sanitize-html-string-B35VmRc9.js → sanitize-html-string-DPHNpMWE.js} +21 -4
  583. package/dist/{q2-tecton-elements/sanitize-html-string-B35VmRc9.js.map → esm/sanitize-html-string-DPHNpMWE.js.map} +1 -1
  584. package/dist/esm/tecton-tab-pane.entry.js +2 -2
  585. package/dist/playwright.config.js +12 -0
  586. package/dist/playwright.config.js.map +1 -0
  587. package/dist/q2-tecton-elements/assets/standard.symbol.svg +1 -1
  588. package/dist/q2-tecton-elements/click-elsewhere.q2-option-list.q2-popover.entry.esm.js.map +1 -1
  589. package/dist/q2-tecton-elements/click-elsewhere_3.entry.js +44 -35
  590. package/dist/q2-tecton-elements/click-elsewhere_3.entry.js.map +1 -1
  591. package/dist/q2-tecton-elements/component-DaQM9u3s.js +46 -0
  592. package/dist/q2-tecton-elements/component-DaQM9u3s.js.map +1 -0
  593. package/dist/q2-tecton-elements/{index-C4PILj1_.js → index-C5gj0T_3.js} +4 -4
  594. package/dist/q2-tecton-elements/index-C5gj0T_3.js.map +1 -0
  595. package/dist/q2-tecton-elements/q2-action-group.q2-resize-observer.entry.esm.js.map +1 -1
  596. package/dist/q2-tecton-elements/q2-action-group_2.entry.js +2 -2
  597. package/dist/q2-tecton-elements/q2-action-group_2.entry.js.map +1 -1
  598. package/dist/q2-tecton-elements/q2-action-sheet.entry.esm.js.map +1 -1
  599. package/dist/q2-tecton-elements/q2-action-sheet.entry.js +166 -70
  600. package/dist/q2-tecton-elements/q2-action-sheet.entry.js.map +1 -1
  601. package/dist/q2-tecton-elements/q2-avatar.entry.esm.js.map +1 -1
  602. package/dist/q2-tecton-elements/q2-avatar.entry.js.map +1 -1
  603. package/dist/q2-tecton-elements/q2-badge.entry.esm.js.map +1 -1
  604. package/dist/q2-tecton-elements/q2-badge.entry.js +1 -1
  605. package/dist/q2-tecton-elements/q2-badge.entry.js.map +1 -1
  606. package/dist/q2-tecton-elements/q2-btn.q2-loading.entry.esm.js.map +1 -1
  607. package/dist/q2-tecton-elements/q2-btn_2.entry.js +1 -1
  608. package/dist/q2-tecton-elements/q2-btn_2.entry.js.map +1 -1
  609. package/dist/q2-tecton-elements/q2-calendar.entry.esm.js.map +1 -1
  610. package/dist/q2-tecton-elements/q2-calendar.entry.js +4 -4
  611. package/dist/q2-tecton-elements/q2-calendar.entry.js.map +1 -1
  612. package/dist/q2-tecton-elements/q2-card-image.entry.esm.js.map +1 -1
  613. package/dist/q2-tecton-elements/q2-card-image.entry.js +2 -2
  614. package/dist/q2-tecton-elements/q2-card-image.entry.js.map +1 -1
  615. package/dist/q2-tecton-elements/q2-card.entry.esm.js.map +1 -1
  616. package/dist/q2-tecton-elements/q2-card.entry.js +1 -1
  617. package/dist/q2-tecton-elements/q2-card.entry.js.map +1 -1
  618. package/dist/q2-tecton-elements/q2-carousel-pane.entry.esm.js.map +1 -1
  619. package/dist/q2-tecton-elements/q2-carousel-pane.entry.js +6 -6
  620. package/dist/q2-tecton-elements/q2-carousel-pane.entry.js.map +1 -1
  621. package/dist/q2-tecton-elements/q2-carousel.entry.esm.js.map +1 -1
  622. package/dist/q2-tecton-elements/q2-carousel.entry.js +402 -271
  623. package/dist/q2-tecton-elements/q2-carousel.entry.js.map +1 -1
  624. package/dist/q2-tecton-elements/q2-chart-area.entry.js +1 -1
  625. package/dist/q2-tecton-elements/q2-chart-bar.entry.js +1 -1
  626. package/dist/q2-tecton-elements/q2-chart-donut.entry.esm.js.map +1 -1
  627. package/dist/q2-tecton-elements/q2-chart-donut.entry.js +18 -16
  628. package/dist/q2-tecton-elements/q2-chart-donut.entry.js.map +1 -1
  629. package/dist/q2-tecton-elements/q2-checkbox-group.entry.esm.js.map +1 -1
  630. package/dist/q2-tecton-elements/q2-checkbox-group.entry.js +2 -2
  631. package/dist/q2-tecton-elements/q2-checkbox-group.entry.js.map +1 -1
  632. package/dist/q2-tecton-elements/q2-checkbox.q2-tag.entry.esm.js.map +1 -1
  633. package/dist/q2-tecton-elements/q2-checkbox_2.entry.js +7 -7
  634. package/dist/q2-tecton-elements/q2-checkbox_2.entry.js.map +1 -1
  635. package/dist/q2-tecton-elements/q2-context.entry.esm.js.map +1 -1
  636. package/dist/q2-tecton-elements/q2-context.entry.js +2 -2
  637. package/dist/q2-tecton-elements/q2-context.entry.js.map +1 -1
  638. package/dist/q2-tecton-elements/q2-currency.entry.esm.js.map +1 -1
  639. package/dist/q2-tecton-elements/q2-currency.entry.js +34 -33
  640. package/dist/q2-tecton-elements/q2-currency.entry.js.map +1 -1
  641. package/dist/q2-tecton-elements/q2-data-table.entry.esm.js.map +1 -1
  642. package/dist/q2-tecton-elements/q2-data-table.entry.js +4 -4
  643. package/dist/q2-tecton-elements/q2-data-table.entry.js.map +1 -1
  644. package/dist/q2-tecton-elements/q2-detail.entry.esm.js.map +1 -1
  645. package/dist/q2-tecton-elements/q2-detail.entry.js +4 -4
  646. package/dist/q2-tecton-elements/q2-detail.entry.js.map +1 -1
  647. package/dist/q2-tecton-elements/q2-dropdown-item.entry.esm.js.map +1 -1
  648. package/dist/q2-tecton-elements/q2-dropdown-item.entry.js +2 -2
  649. package/dist/q2-tecton-elements/q2-dropdown-item.entry.js.map +1 -1
  650. package/dist/q2-tecton-elements/q2-dropdown.entry.esm.js.map +1 -1
  651. package/dist/q2-tecton-elements/q2-dropdown.entry.js +18 -19
  652. package/dist/q2-tecton-elements/q2-dropdown.entry.js.map +1 -1
  653. package/dist/q2-tecton-elements/q2-editable-field.entry.esm.js.map +1 -1
  654. package/dist/q2-tecton-elements/q2-editable-field.entry.js +1 -1
  655. package/dist/q2-tecton-elements/q2-editable-field.entry.js.map +1 -1
  656. package/dist/q2-tecton-elements/q2-example.entry.js +1 -1
  657. package/dist/q2-tecton-elements/q2-file-picker.entry.esm.js.map +1 -1
  658. package/dist/q2-tecton-elements/q2-file-picker.entry.js +1 -1
  659. package/dist/q2-tecton-elements/q2-file-picker.entry.js.map +1 -1
  660. package/dist/q2-tecton-elements/q2-form.entry.esm.js.map +1 -1
  661. package/dist/q2-tecton-elements/q2-form.entry.js +9 -9
  662. package/dist/q2-tecton-elements/q2-form.entry.js.map +1 -1
  663. package/dist/q2-tecton-elements/q2-formatted-text.entry.esm.js.map +1 -1
  664. package/dist/q2-tecton-elements/q2-formatted-text.entry.js +2 -2
  665. package/dist/q2-tecton-elements/q2-formatted-text.entry.js.map +1 -1
  666. package/dist/q2-tecton-elements/q2-grid-area.entry.js +1 -1
  667. package/dist/q2-tecton-elements/q2-grid.entry.esm.js.map +1 -1
  668. package/dist/q2-tecton-elements/q2-grid.entry.js +39 -14
  669. package/dist/q2-tecton-elements/q2-grid.entry.js.map +1 -1
  670. package/dist/q2-tecton-elements/q2-icon.entry.esm.js.map +1 -1
  671. package/dist/q2-tecton-elements/q2-icon.entry.js +52 -52
  672. package/dist/q2-tecton-elements/q2-icon.entry.js.map +1 -1
  673. package/dist/q2-tecton-elements/q2-input.entry.esm.js.map +1 -1
  674. package/dist/q2-tecton-elements/q2-input.entry.js +10 -6
  675. package/dist/q2-tecton-elements/q2-input.entry.js.map +1 -1
  676. package/dist/q2-tecton-elements/q2-item.entry.esm.js.map +1 -1
  677. package/dist/q2-tecton-elements/q2-item.entry.js +14 -14
  678. package/dist/q2-tecton-elements/q2-item.entry.js.map +1 -1
  679. package/dist/q2-tecton-elements/q2-legend.entry.esm.js.map +1 -1
  680. package/dist/q2-tecton-elements/q2-legend.entry.js +4 -5
  681. package/dist/q2-tecton-elements/q2-legend.entry.js.map +1 -1
  682. package/dist/q2-tecton-elements/q2-link.q2-list.entry.esm.js.map +1 -1
  683. package/dist/q2-tecton-elements/q2-link_2.entry.js +7 -7
  684. package/dist/q2-tecton-elements/q2-link_2.entry.js.map +1 -1
  685. package/dist/q2-tecton-elements/q2-loc.entry.js +1 -1
  686. package/dist/q2-tecton-elements/q2-message.entry.esm.js.map +1 -1
  687. package/dist/q2-tecton-elements/q2-message.entry.js +28 -28
  688. package/dist/q2-tecton-elements/q2-message.entry.js.map +1 -1
  689. package/dist/q2-tecton-elements/q2-meter.entry.esm.js.map +1 -1
  690. package/dist/q2-tecton-elements/q2-meter.entry.js +8 -8
  691. package/dist/q2-tecton-elements/q2-meter.entry.js.map +1 -1
  692. package/dist/q2-tecton-elements/q2-modal.entry.esm.js.map +1 -1
  693. package/dist/q2-tecton-elements/q2-modal.entry.js +53 -53
  694. package/dist/q2-tecton-elements/q2-modal.entry.js.map +1 -1
  695. package/dist/q2-tecton-elements/q2-month-picker.entry.js +1 -1
  696. package/dist/q2-tecton-elements/q2-mutation-observer.entry.js +1 -1
  697. package/dist/q2-tecton-elements/q2-optgroup.entry.esm.js.map +1 -1
  698. package/dist/q2-tecton-elements/q2-optgroup.entry.js +6 -6
  699. package/dist/q2-tecton-elements/q2-optgroup.entry.js.map +1 -1
  700. package/dist/q2-tecton-elements/q2-option.entry.esm.js.map +1 -1
  701. package/dist/q2-tecton-elements/q2-option.entry.js +3 -3
  702. package/dist/q2-tecton-elements/q2-option.entry.js.map +1 -1
  703. package/dist/q2-tecton-elements/q2-otp.entry.esm.js.map +1 -0
  704. package/dist/q2-tecton-elements/q2-otp.entry.js +453 -0
  705. package/dist/q2-tecton-elements/q2-otp.entry.js.map +1 -0
  706. package/dist/q2-tecton-elements/q2-pagination.entry.esm.js.map +1 -1
  707. package/dist/q2-tecton-elements/q2-pagination.entry.js +29 -29
  708. package/dist/q2-tecton-elements/q2-pagination.entry.js.map +1 -1
  709. package/dist/q2-tecton-elements/q2-pill.entry.esm.js.map +1 -1
  710. package/dist/q2-tecton-elements/q2-pill.entry.js +43 -28
  711. package/dist/q2-tecton-elements/q2-pill.entry.js.map +1 -1
  712. package/dist/q2-tecton-elements/q2-radio-group.entry.esm.js.map +1 -1
  713. package/dist/q2-tecton-elements/q2-radio-group.entry.js +1 -1
  714. package/dist/q2-tecton-elements/q2-radio-group.entry.js.map +1 -1
  715. package/dist/q2-tecton-elements/q2-radio.entry.esm.js.map +1 -1
  716. package/dist/q2-tecton-elements/q2-radio.entry.js +10 -10
  717. package/dist/q2-tecton-elements/q2-radio.entry.js.map +1 -1
  718. package/dist/q2-tecton-elements/q2-relative-time.entry.js +2 -2
  719. package/dist/q2-tecton-elements/q2-section-container.entry.js +1 -1
  720. package/dist/q2-tecton-elements/q2-section.entry.esm.js.map +1 -1
  721. package/dist/q2-tecton-elements/q2-section.entry.js +21 -21
  722. package/dist/q2-tecton-elements/q2-section.entry.js.map +1 -1
  723. package/dist/q2-tecton-elements/q2-select.entry.esm.js.map +1 -1
  724. package/dist/q2-tecton-elements/q2-select.entry.js +1 -1
  725. package/dist/q2-tecton-elements/q2-select.entry.js.map +1 -1
  726. package/dist/q2-tecton-elements/q2-stepper-pane.entry.js +10 -10
  727. package/dist/q2-tecton-elements/q2-stepper-vertical.entry.esm.js.map +1 -1
  728. package/dist/q2-tecton-elements/q2-stepper-vertical.entry.js +5 -5
  729. package/dist/q2-tecton-elements/q2-stepper-vertical.entry.js.map +1 -1
  730. package/dist/q2-tecton-elements/q2-stepper.entry.esm.js.map +1 -1
  731. package/dist/q2-tecton-elements/q2-stepper.entry.js +33 -33
  732. package/dist/q2-tecton-elements/q2-stepper.entry.js.map +1 -1
  733. package/dist/q2-tecton-elements/q2-tab-container.entry.esm.js.map +1 -1
  734. package/dist/q2-tecton-elements/q2-tab-container.entry.js +14 -14
  735. package/dist/q2-tecton-elements/q2-tab-container.entry.js.map +1 -1
  736. package/dist/q2-tecton-elements/q2-tab-pane.entry.js +6 -6
  737. package/dist/q2-tecton-elements/q2-tecton-elements.esm.js +1 -1
  738. package/dist/q2-tecton-elements/q2-textarea.entry.esm.js.map +1 -1
  739. package/dist/q2-tecton-elements/q2-textarea.entry.js +1 -1
  740. package/dist/q2-tecton-elements/q2-textarea.entry.js.map +1 -1
  741. package/dist/q2-tecton-elements/q2-toast.entry.esm.js.map +1 -1
  742. package/dist/q2-tecton-elements/q2-toast.entry.js +1 -1
  743. package/dist/q2-tecton-elements/q2-toast.entry.js.map +1 -1
  744. package/dist/q2-tecton-elements/q2-tooltip.entry.esm.js.map +1 -1
  745. package/dist/q2-tecton-elements/q2-tooltip.entry.js +136 -20
  746. package/dist/q2-tecton-elements/q2-tooltip.entry.js.map +1 -1
  747. package/dist/q2-tecton-elements/{sanitize-html-string-B35VmRc9.js → sanitize-html-string-DPHNpMWE.js} +147 -142
  748. package/dist/{esm/sanitize-html-string-B35VmRc9.js.map → q2-tecton-elements/sanitize-html-string-DPHNpMWE.js.map} +1 -1
  749. package/dist/q2-tecton-elements/tecton-tab-pane.entry.js +6 -6
  750. package/dist/types/builds/q2e/development/tecton/tecton/packages/q2-tecton-elements/.stencil/playwright.config.d.ts +2 -0
  751. package/dist/types/components/q2-action-sheet/q2-action-sheet.d.ts +22 -0
  752. package/dist/types/components/q2-avatar/test/q2-avatar-test.vr.d.ts +1 -0
  753. package/dist/types/components/q2-badge/test/q2-badge-test.vr.d.ts +1 -0
  754. package/dist/types/components/q2-btn/test/q2-btn-test.vr.d.ts +1 -0
  755. package/dist/types/components/q2-calendar/test/q2-calendar-test.vr.d.ts +1 -0
  756. package/dist/types/components/q2-card/test/q2-card-test.vr.d.ts +1 -0
  757. package/dist/types/components/q2-card-image/test/q2-card-image-test.vr.d.ts +1 -0
  758. package/dist/types/components/q2-carousel/q2-carousel.d.ts +29 -0
  759. package/dist/types/components/q2-carousel/test/q2-carousel-test.vr.d.ts +1 -0
  760. package/dist/types/components/q2-chart-area/test/q2-chart-area-test.vr.d.ts +1 -0
  761. package/dist/types/components/q2-chart-bar/test/q2-chart-bar-test.vr.d.ts +1 -0
  762. package/dist/types/components/q2-chart-donut/q2-chart-donut.d.ts +2 -0
  763. package/dist/types/components/q2-chart-donut/test/q2-chart-donut-test.vr.d.ts +1 -0
  764. package/dist/types/components/q2-checkbox/test/q2-checkbox-test.vr.d.ts +1 -0
  765. package/dist/types/components/q2-checkbox-group/test/q2-checkbox-group-test.vr.d.ts +1 -0
  766. package/dist/types/components/q2-context/test/q2-context-test.vr.d.ts +1 -0
  767. package/dist/types/components/q2-currency/test/q2-currency-test.vr.d.ts +1 -0
  768. package/dist/types/components/q2-data-table/test/q2-data-table-test.vr.d.ts +1 -0
  769. package/dist/types/components/q2-editable-field/test/q2-editable-field-test.vr.d.ts +1 -0
  770. package/dist/types/components/q2-file-picker/test/q2-file-picker-test.vr.d.ts +1 -0
  771. package/dist/types/components/q2-formatted-text/test/q2-formatted-text-test.vr.d.ts +1 -0
  772. package/dist/types/components/q2-grid/q2-grid.d.ts +10 -0
  773. package/dist/types/components/q2-icon/test/q2-icon-test.vr.d.ts +1 -0
  774. package/dist/types/components/q2-input/test/q2-input-test.vr.d.ts +1 -0
  775. package/dist/types/components/q2-legend/q2-legend.d.ts +2 -0
  776. package/dist/types/components/q2-link/test/q2-link-test.vr.d.ts +1 -0
  777. package/dist/types/components/q2-list/test/q2-list-test.vr.d.ts +1 -0
  778. package/dist/types/components/q2-message/test/q2-message-test.vr.d.ts +1 -0
  779. package/dist/types/components/q2-meter/test/q2-meter-test.vr.d.ts +1 -0
  780. package/dist/types/components/q2-modal/test/q2-modal-test.vr.d.ts +1 -0
  781. package/dist/types/components/q2-otp/q2-otp.d.ts +159 -0
  782. package/dist/types/components/q2-pagination/test/q2-pagination-test.vr.d.ts +1 -0
  783. package/dist/types/components/q2-pill/q2-pill.d.ts +5 -2
  784. package/dist/types/components/q2-pill/test/q2-pill-test.vr.d.ts +1 -0
  785. package/dist/types/components/q2-radio/q2-radio.d.ts +1 -1
  786. package/dist/types/components/q2-radio/test/q2-radio-test.vr.d.ts +1 -0
  787. package/dist/types/components/q2-radio-group/test/q2-radio-group-test.vr.d.ts +1 -0
  788. package/dist/types/components/q2-section/test/q2-section-test.vr.d.ts +1 -0
  789. package/dist/types/components/q2-select/test/q2-select-test.vr.d.ts +1 -0
  790. package/dist/types/components/q2-stepper/test/q2-stepper-test.vr.d.ts +1 -0
  791. package/dist/types/components/q2-stepper-vertical/test/q2-stepper-vertical-test.vr.d.ts +1 -0
  792. package/dist/types/components/q2-tab-container/test/q2-tab-container-test.vr.d.ts +1 -0
  793. package/dist/types/components/q2-tag/test/q2-tag-test.vr.d.ts +1 -0
  794. package/dist/types/components/q2-textarea/test/q2-textarea-test.vr.d.ts +1 -0
  795. package/dist/types/components/q2-tooltip/q2-tooltip.d.ts +4 -0
  796. package/dist/types/components/q2-tooltip/test/q2-tooltip-test.vr.d.ts +1 -0
  797. package/dist/types/components.d.ts +306 -2
  798. package/dist/types/utils/component.d.ts +1 -1
  799. package/dist/types/utils/test/vr-helpers.d.ts +14 -0
  800. package/package.json +12 -3
  801. package/dist/cjs/component-DRAntnCA.js.map +0 -1
  802. package/dist/cjs/index-YvKoRT-t.js.map +0 -1
  803. package/dist/esm/component-DVxzK3WH.js.map +0 -1
  804. package/dist/esm/index-C4PILj1_.js.map +0 -1
  805. package/dist/q2-tecton-elements/component-DVxzK3WH.js +0 -40
  806. package/dist/q2-tecton-elements/component-DVxzK3WH.js.map +0 -1
  807. package/dist/q2-tecton-elements/index-C4PILj1_.js.map +0 -1
@@ -9,6 +9,7 @@ export class Q2Tooltip {
9
9
  constructor() {
10
10
  // #region Own Properties
11
11
  this.animationEndCount = 0;
12
+ this.cachedTooltipHeight = null;
12
13
  /**
13
14
  * Makes the component focusable, thereby putting it in the tab order of the keyboard.
14
15
  * @warning
@@ -31,6 +32,19 @@ export class Q2Tooltip {
31
32
  }
32
33
  // #endregion
33
34
  // #region Listeners
35
+ documentPointerHandler(event) {
36
+ var _a;
37
+ if (!this.focusClass || this.persistent)
38
+ return;
39
+ const isEventInsideTooltip = ((_a = event.composedPath) === null || _a === void 0 ? void 0 : _a.call(event).includes(this.hostElement)) ||
40
+ (event.target instanceof Node && this.hostElement.contains(event.target));
41
+ if (isEventInsideTooltip) {
42
+ this.persistOnHoverDismissed = false;
43
+ return;
44
+ }
45
+ this.persistOnHoverDismissed = true;
46
+ this.hideTooltip();
47
+ }
34
48
  focusCaptureHandler() {
35
49
  this.checkFocusClass();
36
50
  }
@@ -69,6 +83,10 @@ export class Q2Tooltip {
69
83
  // #region Watchers
70
84
  labelChanged() {
71
85
  this.propagateTooltip();
86
+ this.cachedTooltipHeight = null; // Invalidate cache
87
+ if (this.shouldBeVisible || this.persistent) {
88
+ this.adjustSide();
89
+ }
72
90
  }
73
91
  // #endregion
74
92
  // #region Local Methods
@@ -78,16 +96,38 @@ export class Q2Tooltip {
78
96
  return this.hostElement.matches(':hover, :focus-within') && !this.persistOnHoverDismissed;
79
97
  }
80
98
  adjustSide() {
81
- const { left: hostLeft, right: hostRight, width: hostWidth } = this.hostElement.getBoundingClientRect();
99
+ const { left: hostLeft, right: hostRight, width: hostWidth, top: hostTop, bottom: hostBottom, } = this.hostElement.getBoundingClientRect();
82
100
  if (!hostLeft || !hostWidth)
83
101
  return;
102
+ // Find the constraining container (modal, dialog, or any overflow:hidden ancestor)
103
+ const constrainingContainer = this.findConstrainingContainer();
104
+ const containerRect = constrainingContainer.getBoundingClientRect();
84
105
  const { width, paddingLeft, paddingRight } = window.getComputedStyle(this.tooltipElement, '::after');
85
106
  const tooltipWidth = Number(width.replace(/[px]/g, '')) +
86
107
  Number(paddingLeft.replace(/[px]/g, '')) +
87
108
  Number(paddingRight.replace(/[px]/g, ''));
88
109
  const extraMargin = ['se', 'sw', 'ne', 'nw'].includes(this.position) ? 0 : 15;
89
- const distanceLeft = hostLeft + hostWidth / 2;
90
- const distanceRight = window.innerWidth - hostRight + +hostWidth / 2;
110
+ // Calculate available space relative to constraining container
111
+ const distanceLeft = hostLeft - containerRect.left + hostWidth / 2;
112
+ const distanceRight = containerRect.right - hostRight + hostWidth / 2;
113
+ const distanceTop = hostTop - containerRect.top;
114
+ const distanceBottom = containerRect.bottom - hostBottom;
115
+ // Calculate tooltip height dynamically
116
+ const tooltipHeight = this.calculateTooltipHeight();
117
+ // Check if we need to flip vertical position
118
+ if (['n', 'ne', 'nw'].includes(this.position) && distanceTop < tooltipHeight) {
119
+ // Not enough space above, try flipping to bottom
120
+ if (distanceBottom >= tooltipHeight) {
121
+ this.position = this.position.replace('n', 's');
122
+ }
123
+ }
124
+ else if (['s', 'se', 'sw'].includes(this.position) && distanceBottom < tooltipHeight) {
125
+ // Not enough space below, try flipping to top
126
+ if (distanceTop >= tooltipHeight) {
127
+ this.position = this.position.replace('s', 'n');
128
+ }
129
+ }
130
+ // Adjust horizontal positioning
91
131
  if (['ne', 'se'].includes(this.position)) {
92
132
  if (tooltipWidth > distanceRight) {
93
133
  this.tooltipElement.style.setProperty('--comp-offset-translate', `-${Math.round(tooltipWidth - distanceRight + extraMargin)}px`);
@@ -109,6 +149,19 @@ export class Q2Tooltip {
109
149
  this.tooltipElement.style.setProperty('--comp-offset-translate', `0px`);
110
150
  }
111
151
  }
152
+ // Handle east/west positioning
153
+ if (this.position === 'e' && tooltipWidth > distanceRight) {
154
+ // Not enough space on right, flip to left
155
+ if (distanceLeft >= tooltipWidth) {
156
+ this.position = 'w';
157
+ }
158
+ }
159
+ else if (this.position === 'w' && tooltipWidth > distanceLeft) {
160
+ // Not enough space on left, flip to right
161
+ if (distanceRight >= tooltipWidth) {
162
+ this.position = 'e';
163
+ }
164
+ }
112
165
  }
113
166
  animationEndHandler() {
114
167
  this.animationEndCount = this.animationEndCount + 1;
@@ -121,6 +174,54 @@ export class Q2Tooltip {
121
174
  this.animationEndCount = 0;
122
175
  }
123
176
  }
177
+ calculateTooltipHeight() {
178
+ if (this.cachedTooltipHeight !== null) {
179
+ return this.cachedTooltipHeight;
180
+ }
181
+ try {
182
+ const styles = window.getComputedStyle(this.tooltipElement, '::after');
183
+ // Try to get computed height first
184
+ const computedHeight = styles.height;
185
+ if (computedHeight && computedHeight !== 'auto' && computedHeight !== '0px') {
186
+ const height = Number(computedHeight.replace(/px/g, ''));
187
+ const paddingTop = Number(styles.paddingTop.replace(/px/g, ''));
188
+ const paddingBottom = Number(styles.paddingBottom.replace(/px/g, ''));
189
+ this.cachedTooltipHeight = height + paddingTop + paddingBottom;
190
+ return this.cachedTooltipHeight;
191
+ }
192
+ // Fallback: Calculate based on text and wrapping
193
+ const width = Number(styles.width.replace(/px/g, ''));
194
+ const paddingLeft = Number(styles.paddingLeft.replace(/px/g, ''));
195
+ const paddingRight = Number(styles.paddingRight.replace(/px/g, ''));
196
+ const paddingTop = Number(styles.paddingTop.replace(/px/g, ''));
197
+ const paddingBottom = Number(styles.paddingBottom.replace(/px/g, ''));
198
+ const fontSize = Number(styles.fontSize.replace(/px/g, ''));
199
+ const lineHeightStr = styles.lineHeight;
200
+ const lineHeight = lineHeightStr === 'normal' ? fontSize * 1.5 : Number(lineHeightStr.replace(/px/g, ''));
201
+ const contentWidth = width - paddingLeft - paddingRight;
202
+ const whiteSpace = styles.whiteSpace;
203
+ // Single-line tooltip (white-space: pre)
204
+ if (whiteSpace === 'pre' || !this.multiline) {
205
+ return lineHeight + paddingTop + paddingBottom;
206
+ }
207
+ // Multi-line tooltip: estimate line count
208
+ const text = this.label || '';
209
+ const avgCharWidth = fontSize * 0.5; // Approximation for character width
210
+ const charsPerLine = Math.floor(contentWidth / avgCharWidth);
211
+ const estimatedLines = Math.max(1, Math.ceil(text.length / charsPerLine));
212
+ const totalHeight = estimatedLines * lineHeight + paddingTop + paddingBottom;
213
+ // Add some buffer for safety (10px)
214
+ this.cachedTooltipHeight = Math.ceil(totalHeight) + 10;
215
+ return this.cachedTooltipHeight;
216
+ }
217
+ catch (error) {
218
+ console.warn('Failed to calculate tooltip height, using fallback', error);
219
+ // Fallback based on multiline mode
220
+ const fallbackHeight = this.multiline ? 80 : 50;
221
+ this.cachedTooltipHeight = fallbackHeight;
222
+ return fallbackHeight;
223
+ }
224
+ }
124
225
  checkFocusClass() {
125
226
  if (!this.shouldBeVisible)
126
227
  return;
@@ -137,6 +238,24 @@ export class Q2Tooltip {
137
238
  }
138
239
  }
139
240
  }
241
+ findConstrainingContainer() {
242
+ let element = this.hostElement.parentElement;
243
+ while (element && element !== document.body) {
244
+ const style = window.getComputedStyle(element);
245
+ const overflow = style.overflow + style.overflowX + style.overflowY;
246
+ // Check if this element constrains overflow
247
+ if (overflow.includes('hidden') || overflow.includes('auto') || overflow.includes('scroll')) {
248
+ return element;
249
+ }
250
+ // Check for q2-modal interior element
251
+ if (element.tagName === 'DIALOG' || element.classList.contains('interior')) {
252
+ return element;
253
+ }
254
+ element = element.parentElement;
255
+ }
256
+ // If no constraining container found, use the viewport
257
+ return document.documentElement;
258
+ }
140
259
  findFocusVisibleElement(element) {
141
260
  if (!element)
142
261
  return;
@@ -359,6 +478,18 @@ export class Q2Tooltip {
359
478
  }
360
479
  static get listeners() {
361
480
  return [{
481
+ "name": "click",
482
+ "method": "documentPointerHandler",
483
+ "target": "document",
484
+ "capture": false,
485
+ "passive": false
486
+ }, {
487
+ "name": "touchstart",
488
+ "method": "documentPointerHandler",
489
+ "target": "document",
490
+ "capture": false,
491
+ "passive": true
492
+ }, {
362
493
  "name": "focus",
363
494
  "method": "focusCaptureHandler",
364
495
  "target": undefined,
@@ -395,7 +526,7 @@ export class Q2Tooltip {
395
526
  "capture": false,
396
527
  "passive": true
397
528
  }, {
398
- "name": "mouseclick",
529
+ "name": "click",
399
530
  "method": "handleMouseOver",
400
531
  "target": undefined,
401
532
  "capture": false,
@@ -1 +1 @@
1
- {"version":3,"file":"q2-tooltip.js","sourceRoot":"","sources":["../../../../src/components/q2-tooltip/q2-tooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAsB,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtG,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE9D;;;;GAIG;AAEH,MAAM,OAAO,SAAS;IADtB;QAEI,yBAAyB;QAEzB,sBAAiB,GAAG,CAAC,CAAC;QAyBtB;;;;WAIG;QAEH,cAAS,GAAY,KAAK,CAAC;QAyB3B,sIAAsI;QAEtI,aAAQ,GAAsD,GAAG,CAAC;KAqMrE;IAnMG,aAAa;IACb,qCAAqC;IAErC,oBAAoB;QAChB,IAAI,CAAC,sBAAsB,EAAE,CAAC;IAClC,CAAC;IAED,gBAAgB;QACZ,aAAa,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QAChC,IAAI,CAAC,gBAAgB,EAAE,CAAC;QACxB,IAAI,IAAI,CAAC,UAAU;YAAE,IAAI,CAAC,UAAU,EAAE,CAAC;IAC3C,CAAC;IAED,aAAa;IACb,oBAAoB;IAGpB,mBAAmB;QACf,IAAI,CAAC,eAAe,EAAE,CAAC;IAC3B,CAAC;IAGD,YAAY,CAAC,KAAK;QACd,IAAI,CAAC,kBAAkB,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC;YAAE,OAAO;QACzD,IAAI,CAAC,IAAI,CAAC,SAAS;YAAE,O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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGJ","sourcesContent":["import { Component, Prop, h, ComponentInterface, Element, Listen, State, Watch } from '@stencil/core';\nimport { isEventFromElement, overrideFocus } from 'src/utils';\n\n/**\n * @name Tooltip\n * @category Feedback\n * @summary Use for brief hints or explanations shown on hover or focus.\n */\n@Component({ tag: 'q2-tooltip', shadow: true, styleUrl: 'q2-tooltip.scss' })\nexport class Q2Tooltip implements ComponentInterface {\n // #region Own Properties\n\n animationEndCount = 0;\n tooltipElement: HTMLDivElement;\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 focusClass: 'has-keyboard-focus' | 'has-generic-focus' | 'has-generic-focus-out';\n\n @State()\n persistOnHoverDismissed: boolean;\n\n // #endregion\n // #region Public Property API\n\n /** Displays the element as a block, making it take up the full width of its container. */\n @Prop({ reflect: true })\n block: boolean;\n\n /**\n * Makes the component focusable, thereby putting it in the tab order of the keyboard.\n * @warning\n * This is only meant to be used when the `q2-tooltip` is wrapped around an element that is not focusable (e.g., icons, static text, badges, etc.).\n */\n @Prop({ reflect: true })\n focusable: boolean = false;\n\n /** Whether to show the tooltip immediately upon hover. */\n @Prop({ reflect: true })\n immediate: boolean;\n\n /** text that is displayed when the tooltip is activated. */\n @Prop({ reflect: true })\n label: string;\n\n /** Enables the use of multi-line tooltips with a default `max-width` of `200px`. */\n @Prop({ reflect: true })\n multiline: boolean;\n\n /** Displays the tooltip persistently. */\n @Prop({ reflect: true })\n persistent: boolean;\n\n /**\n * Allows the tooltip bubble itself to be hovered.\n * When enabled, the tooltip remains visible while moving between the trigger and the tooltip bubble.\n */\n @Prop({ reflect: true })\n persistOnHover: boolean;\n\n /** The position of the tooltip based on [cardinal and intercardinal directions](https://en.wikipedia.org/wiki/Cardinal_direction). */\n @Prop({ reflect: true })\n position: 'n' | 's' | 'e' | 'w' | 'nw' | 'ne' | 'sw' | 'se' = 'n';\n\n // #endregion\n // #region Component Lifecycle Events\n\n disconnectedCallback(): void {\n this.clearTooltipOnChildren();\n }\n\n componentDidLoad(): void {\n overrideFocus(this.hostElement);\n this.propagateTooltip();\n if (this.persistent) this.adjustSide();\n }\n\n // #endregion\n // #region Listeners\n\n @Listen('focus', { capture: true })\n focusCaptureHandler() {\n this.checkFocusClass();\n }\n\n @Listen('focus')\n focusHandler(event) {\n if (!isEventFromElement(event, this.hostElement)) return;\n if (!this.focusable) return;\n this.tooltipElement.focus();\n }\n\n @Listen('focusout')\n focusOutHandler() {\n if (this.shouldBeVisible) return;\n if (this.focusClass === 'has-generic-focus') this.focusClass = 'has-generic-focus-out';\n else this.focusClass = null;\n }\n\n // Escape must be handled on `document` so it still dismisses when the tooltip is visible by hover only and focus is not inside the tooltip host.\n @Listen('keydown', { target: 'document' })\n keyDownDocumentHandler(event: KeyboardEvent) {\n if (!['Esc', 'Escape'].includes(event.key)) return;\n if (!this.shouldBeVisible) return;\n if (this.persistOnHover) this.persistOnHoverDismissed = true;\n this.hideTooltip();\n }\n\n @Listen('mouseenter')\n mouseEnterHandler() {\n this.persistOnHoverDismissed = false;\n }\n\n @Listen('mouseover')\n @Listen('mouseclick')\n handleMouseOver() {\n this.adjustSide();\n }\n\n // #endregion\n // #region Watchers\n\n @Watch('label')\n labelChanged() {\n this.propagateTooltip();\n }\n\n // #endregion\n // #region Local Methods\n\n get shouldBeVisible() {\n if (this.persistent) return true;\n return this.hostElement.matches(':hover, :focus-within') && !this.persistOnHoverDismissed;\n }\n\n adjustSide() {\n const { left: hostLeft, right: hostRight, width: hostWidth } = this.hostElement.getBoundingClientRect();\n if (!hostLeft || !hostWidth) return;\n\n const { width, paddingLeft, paddingRight } = window.getComputedStyle(this.tooltipElement, '::after');\n\n const tooltipWidth =\n Number(width.replace(/[px]/g, '')) +\n Number(paddingLeft.replace(/[px]/g, '')) +\n Number(paddingRight.replace(/[px]/g, ''));\n const extraMargin = ['se', 'sw', 'ne', 'nw'].includes(this.position) ? 0 : 15;\n\n const distanceLeft = hostLeft + hostWidth / 2;\n const distanceRight = window.innerWidth - hostRight + +hostWidth / 2;\n\n if (['ne', 'se'].includes(this.position)) {\n if (tooltipWidth > distanceRight) {\n this.tooltipElement.style.setProperty(\n '--comp-offset-translate',\n `-${Math.round(tooltipWidth - distanceRight + extraMargin)}px`\n );\n }\n } else if (['nw', 'sw'].includes(this.position)) {\n if (tooltipWidth > distanceLeft) {\n this.tooltipElement.style.setProperty(\n '--comp-offset-translate',\n `${Math.round(tooltipWidth - distanceLeft + extraMargin)}px`\n );\n }\n } else if (['n', 's'].includes(this.position)) {\n if (tooltipWidth / 2 > distanceLeft) {\n this.tooltipElement.style.setProperty(\n '--comp-offset-translate',\n `${Math.round(tooltipWidth / 2 - distanceLeft + extraMargin)}px`\n );\n } else if (tooltipWidth / 2 > distanceRight) {\n this.tooltipElement.style.setProperty(\n '--comp-offset-translate',\n `-${Math.round(tooltipWidth / 2 - distanceRight + extraMargin)}px`\n );\n } else {\n this.tooltipElement.style.setProperty('--comp-offset-translate', `0px`);\n }\n }\n }\n\n animationEndHandler() {\n this.animationEndCount = this.animationEndCount + 1;\n const { focusClass, animationEndCount } = this;\n\n // animationEnd is fired once for :before and once for :after pseudo elements\n // there are multiple animations defined for .has-generic-focus\n // so we need to wait for all of them to finish before we can remove the class\n if (focusClass === 'has-generic-focus-out' || (focusClass === 'has-generic-focus' && animationEndCount === 4)) {\n this.focusClass = null;\n this.animationEndCount = 0;\n }\n }\n\n checkFocusClass() {\n if (!this.shouldBeVisible) return;\n const isKeyboardFocus = !!this.findFocusVisibleElement(document.activeElement);\n this.focusClass = isKeyboardFocus ? 'has-keyboard-focus' : 'has-generic-focus';\n if (isKeyboardFocus) return;\n }\n\n clearTooltipOnChildren() {\n const children = Array.from(this.hostElement.children);\n for (const child of children) {\n if ('_tooltip' in child) {\n (child as HTMLElement & { _tooltip: string })._tooltip = undefined;\n }\n }\n }\n\n findFocusVisibleElement(element: Element) {\n if (!element) return;\n if (element.shadowRoot) element = this.findFocusVisibleElement(element.shadowRoot.activeElement);\n return element?.matches(':focus-visible') ? element : null;\n }\n\n hideTooltip() {\n if (this.focusClass === 'has-generic-focus') this.focusClass = 'has-generic-focus-out';\n else this.focusClass = null;\n }\n\n propagateTooltip() {\n if (this.focusable) return;\n const children = Array.from(this.hostElement.children);\n for (const child of children) {\n if ('_tooltip' in child) {\n (child as HTMLElement & { _tooltip: string })._tooltip = this.label || undefined;\n }\n }\n }\n\n // #endregion\n // #region Render Methods\n\n render() {\n const { focusClass } = this;\n const classes = ['tooltip'];\n if (focusClass) classes.push(focusClass);\n if (this.persistOnHoverDismissed) classes.push('dismissed');\n\n return this.label ? (\n <div\n tabindex={this.focusable ? 0 : undefined}\n ref={el => (this.tooltipElement = el)}\n class={classes.join(' ')}\n aria-label={this.focusable ? this.label : undefined}\n data-label={this.label}\n onAnimationEnd={() => this.animationEndHandler()}\n role={this.focusable ? 'tooltip' : undefined}\n test-id=\"tooltipContainer\"\n >\n <slot onSlotchange={() => this.propagateTooltip()} />\n </div>\n ) : (\n <slot onSlotchange={() => this.propagateTooltip()} />\n );\n }\n\n // #endregion\n}\n"]}
1
+ {"version":3,"file":"q2-tooltip.js","sourceRoot":"","sources":["../../../../src/components/q2-tooltip/q2-tooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAsB,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtG,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE9D;;;;GAIG;AAEH,MAAM,OAAO,SAAS;IADtB;QAEI,yBAAyB;QAEzB,sBA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,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,aACpC,kBAAkB;YAE1B,YAAM,YAAY,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,gBAAgB,EAAE,GAAI,CACnD,CACT,CAAC,CAAC,CAAC,CACA,YAAM,YAAY,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,gBAAgB,EAAE,GAAI,CACxD,CAAC;IACN,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGJ","sourcesContent":["import { Component, Prop, h, ComponentInterface, Element, Listen, State, Watch } from '@stencil/core';\nimport { isEventFromElement, overrideFocus } from 'src/utils';\n\n/**\n * @name Tooltip\n * @category Feedback\n * @summary Use for brief hints or explanations shown on hover or focus.\n */\n@Component({ tag: 'q2-tooltip', shadow: true, styleUrl: 'q2-tooltip.scss' })\nexport class Q2Tooltip implements ComponentInterface {\n // #region Own Properties\n\n animationEndCount = 0;\n cachedTooltipHeight: number | null = null;\n tooltipElement: HTMLDivElement;\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 focusClass: 'has-keyboard-focus' | 'has-generic-focus' | 'has-generic-focus-out';\n\n @State()\n persistOnHoverDismissed: boolean;\n\n // #endregion\n // #region Public Property API\n\n /** Displays the element as a block, making it take up the full width of its container. */\n @Prop({ reflect: true })\n block: boolean;\n\n /**\n * Makes the component focusable, thereby putting it in the tab order of the keyboard.\n * @warning\n * This is only meant to be used when the `q2-tooltip` is wrapped around an element that is not focusable (e.g., icons, static text, badges, etc.).\n */\n @Prop({ reflect: true })\n focusable: boolean = false;\n\n /** Whether to show the tooltip immediately upon hover. */\n @Prop({ reflect: true })\n immediate: boolean;\n\n /** text that is displayed when the tooltip is activated. */\n @Prop({ reflect: true })\n label: string;\n\n /** Enables the use of multi-line tooltips with a default `max-width` of `200px`. */\n @Prop({ reflect: true })\n multiline: boolean;\n\n /** Displays the tooltip persistently. */\n @Prop({ reflect: true })\n persistent: boolean;\n\n /**\n * Allows the tooltip bubble itself to be hovered.\n * When enabled, the tooltip remains visible while moving between the trigger and the tooltip bubble.\n */\n @Prop({ reflect: true })\n persistOnHover: boolean;\n\n /** The position of the tooltip based on [cardinal and intercardinal directions](https://en.wikipedia.org/wiki/Cardinal_direction). */\n @Prop({ reflect: true })\n position: 'n' | 's' | 'e' | 'w' | 'nw' | 'ne' | 'sw' | 'se' = 'n';\n\n // #endregion\n // #region Component Lifecycle Events\n\n disconnectedCallback(): void {\n this.clearTooltipOnChildren();\n }\n\n componentDidLoad(): void {\n overrideFocus(this.hostElement);\n this.propagateTooltip();\n if (this.persistent) this.adjustSide();\n }\n\n // #endregion\n // #region Listeners\n\n @Listen('click', { target: 'document' })\n @Listen('touchstart', { target: 'document' })\n documentPointerHandler(event: Event) {\n if (!this.focusClass || this.persistent) return;\n const isEventInsideTooltip =\n event.composedPath?.().includes(this.hostElement) ||\n (event.target instanceof Node && this.hostElement.contains(event.target));\n if (isEventInsideTooltip) {\n this.persistOnHoverDismissed = false;\n return;\n }\n this.persistOnHoverDismissed = true;\n this.hideTooltip();\n }\n\n @Listen('focus', { capture: true })\n focusCaptureHandler() {\n this.checkFocusClass();\n }\n\n @Listen('focus')\n focusHandler(event) {\n if (!isEventFromElement(event, this.hostElement)) return;\n if (!this.focusable) return;\n this.tooltipElement.focus();\n }\n\n @Listen('focusout')\n focusOutHandler() {\n if (this.shouldBeVisible) return;\n if (this.focusClass === 'has-generic-focus') this.focusClass = 'has-generic-focus-out';\n else this.focusClass = null;\n }\n\n // Escape must be handled on `document` so it still dismisses when the tooltip is visible by hover only and focus is not inside the tooltip host.\n @Listen('keydown', { target: 'document' })\n keyDownDocumentHandler(event: KeyboardEvent) {\n if (!['Esc', 'Escape'].includes(event.key)) return;\n if (!this.shouldBeVisible) return;\n if (this.persistOnHover) this.persistOnHoverDismissed = true;\n this.hideTooltip();\n }\n\n @Listen('mouseenter')\n mouseEnterHandler() {\n this.persistOnHoverDismissed = false;\n }\n\n @Listen('mouseover')\n @Listen('click')\n handleMouseOver() {\n this.adjustSide();\n }\n\n // #endregion\n // #region Watchers\n\n @Watch('label')\n labelChanged() {\n this.propagateTooltip();\n this.cachedTooltipHeight = null; // Invalidate cache\n if (this.shouldBeVisible || this.persistent) {\n this.adjustSide();\n }\n }\n\n // #endregion\n // #region Local Methods\n\n get shouldBeVisible() {\n if (this.persistent) return true;\n return this.hostElement.matches(':hover, :focus-within') && !this.persistOnHoverDismissed;\n }\n\n adjustSide() {\n const {\n left: hostLeft,\n right: hostRight,\n width: hostWidth,\n top: hostTop,\n bottom: hostBottom,\n } = this.hostElement.getBoundingClientRect();\n if (!hostLeft || !hostWidth) return;\n\n // Find the constraining container (modal, dialog, or any overflow:hidden ancestor)\n const constrainingContainer = this.findConstrainingContainer();\n const containerRect = constrainingContainer.getBoundingClientRect();\n\n const { width, paddingLeft, paddingRight } = window.getComputedStyle(this.tooltipElement, '::after');\n\n const tooltipWidth =\n Number(width.replace(/[px]/g, '')) +\n Number(paddingLeft.replace(/[px]/g, '')) +\n Number(paddingRight.replace(/[px]/g, ''));\n const extraMargin = ['se', 'sw', 'ne', 'nw'].includes(this.position) ? 0 : 15;\n\n // Calculate available space relative to constraining container\n const distanceLeft = hostLeft - containerRect.left + hostWidth / 2;\n const distanceRight = containerRect.right - hostRight + hostWidth / 2;\n const distanceTop = hostTop - containerRect.top;\n const distanceBottom = containerRect.bottom - hostBottom;\n\n // Calculate tooltip height dynamically\n const tooltipHeight = this.calculateTooltipHeight();\n\n // Check if we need to flip vertical position\n if (['n', 'ne', 'nw'].includes(this.position) && distanceTop < tooltipHeight) {\n // Not enough space above, try flipping to bottom\n if (distanceBottom >= tooltipHeight) {\n this.position = this.position.replace('n', 's') as any;\n }\n } else if (['s', 'se', 'sw'].includes(this.position) && distanceBottom < tooltipHeight) {\n // Not enough space below, try flipping to top\n if (distanceTop >= tooltipHeight) {\n this.position = this.position.replace('s', 'n') as any;\n }\n }\n\n // Adjust horizontal positioning\n if (['ne', 'se'].includes(this.position)) {\n if (tooltipWidth > distanceRight) {\n this.tooltipElement.style.setProperty(\n '--comp-offset-translate',\n `-${Math.round(tooltipWidth - distanceRight + extraMargin)}px`\n );\n }\n } else if (['nw', 'sw'].includes(this.position)) {\n if (tooltipWidth > distanceLeft) {\n this.tooltipElement.style.setProperty(\n '--comp-offset-translate',\n `${Math.round(tooltipWidth - distanceLeft + extraMargin)}px`\n );\n }\n } else if (['n', 's'].includes(this.position)) {\n if (tooltipWidth / 2 > distanceLeft) {\n this.tooltipElement.style.setProperty(\n '--comp-offset-translate',\n `${Math.round(tooltipWidth / 2 - distanceLeft + extraMargin)}px`\n );\n } else if (tooltipWidth / 2 > distanceRight) {\n this.tooltipElement.style.setProperty(\n '--comp-offset-translate',\n `-${Math.round(tooltipWidth / 2 - distanceRight + extraMargin)}px`\n );\n } else {\n this.tooltipElement.style.setProperty('--comp-offset-translate', `0px`);\n }\n }\n\n // Handle east/west positioning\n if (this.position === 'e' && tooltipWidth > distanceRight) {\n // Not enough space on right, flip to left\n if (distanceLeft >= tooltipWidth) {\n this.position = 'w';\n }\n } else if (this.position === 'w' && tooltipWidth > distanceLeft) {\n // Not enough space on left, flip to right\n if (distanceRight >= tooltipWidth) {\n this.position = 'e';\n }\n }\n }\n\n animationEndHandler() {\n this.animationEndCount = this.animationEndCount + 1;\n const { focusClass, animationEndCount } = this;\n\n // animationEnd is fired once for :before and once for :after pseudo elements\n // there are multiple animations defined for .has-generic-focus\n // so we need to wait for all of them to finish before we can remove the class\n if (focusClass === 'has-generic-focus-out' || (focusClass === 'has-generic-focus' && animationEndCount === 4)) {\n this.focusClass = null;\n this.animationEndCount = 0;\n }\n }\n\n calculateTooltipHeight(): number {\n if (this.cachedTooltipHeight !== null) {\n return this.cachedTooltipHeight;\n }\n\n try {\n const styles = window.getComputedStyle(this.tooltipElement, '::after');\n\n // Try to get computed height first\n const computedHeight = styles.height;\n if (computedHeight && computedHeight !== 'auto' && computedHeight !== '0px') {\n const height = Number(computedHeight.replace(/px/g, ''));\n const paddingTop = Number(styles.paddingTop.replace(/px/g, ''));\n const paddingBottom = Number(styles.paddingBottom.replace(/px/g, ''));\n this.cachedTooltipHeight = height + paddingTop + paddingBottom;\n return this.cachedTooltipHeight;\n }\n\n // Fallback: Calculate based on text and wrapping\n const width = Number(styles.width.replace(/px/g, ''));\n const paddingLeft = Number(styles.paddingLeft.replace(/px/g, ''));\n const paddingRight = Number(styles.paddingRight.replace(/px/g, ''));\n const paddingTop = Number(styles.paddingTop.replace(/px/g, ''));\n const paddingBottom = Number(styles.paddingBottom.replace(/px/g, ''));\n\n const fontSize = Number(styles.fontSize.replace(/px/g, ''));\n const lineHeightStr = styles.lineHeight;\n const lineHeight = lineHeightStr === 'normal' ? fontSize * 1.5 : Number(lineHeightStr.replace(/px/g, ''));\n\n const contentWidth = width - paddingLeft - paddingRight;\n const whiteSpace = styles.whiteSpace;\n\n // Single-line tooltip (white-space: pre)\n if (whiteSpace === 'pre' || !this.multiline) {\n return lineHeight + paddingTop + paddingBottom;\n }\n\n // Multi-line tooltip: estimate line count\n const text = this.label || '';\n const avgCharWidth = fontSize * 0.5; // Approximation for character width\n const charsPerLine = Math.floor(contentWidth / avgCharWidth);\n const estimatedLines = Math.max(1, Math.ceil(text.length / charsPerLine));\n\n const totalHeight = estimatedLines * lineHeight + paddingTop + paddingBottom;\n\n // Add some buffer for safety (10px)\n this.cachedTooltipHeight = Math.ceil(totalHeight) + 10;\n return this.cachedTooltipHeight;\n } catch (error) {\n console.warn('Failed to calculate tooltip height, using fallback', error);\n // Fallback based on multiline mode\n const fallbackHeight = this.multiline ? 80 : 50;\n this.cachedTooltipHeight = fallbackHeight;\n return fallbackHeight;\n }\n }\n\n checkFocusClass() {\n if (!this.shouldBeVisible) return;\n const isKeyboardFocus = !!this.findFocusVisibleElement(document.activeElement);\n this.focusClass = isKeyboardFocus ? 'has-keyboard-focus' : 'has-generic-focus';\n if (isKeyboardFocus) return;\n }\n\n clearTooltipOnChildren() {\n const children = Array.from(this.hostElement.children);\n for (const child of children) {\n if ('_tooltip' in child) {\n (child as HTMLElement & { _tooltip: string })._tooltip = undefined;\n }\n }\n }\n\n findConstrainingContainer(): Element {\n let element: Element = this.hostElement.parentElement;\n\n while (element && element !== document.body) {\n const style = window.getComputedStyle(element);\n const overflow = style.overflow + style.overflowX + style.overflowY;\n\n // Check if this element constrains overflow\n if (overflow.includes('hidden') || overflow.includes('auto') || overflow.includes('scroll')) {\n return element;\n }\n\n // Check for q2-modal interior element\n if (element.tagName === 'DIALOG' || element.classList.contains('interior')) {\n return element;\n }\n\n element = element.parentElement;\n }\n\n // If no constraining container found, use the viewport\n return document.documentElement;\n }\n\n findFocusVisibleElement(element: Element) {\n if (!element) return;\n if (element.shadowRoot) element = this.findFocusVisibleElement(element.shadowRoot.activeElement);\n return element?.matches(':focus-visible') ? element : null;\n }\n\n hideTooltip() {\n if (this.focusClass === 'has-generic-focus') this.focusClass = 'has-generic-focus-out';\n else this.focusClass = null;\n }\n\n propagateTooltip() {\n if (this.focusable) return;\n const children = Array.from(this.hostElement.children);\n for (const child of children) {\n if ('_tooltip' in child) {\n (child as HTMLElement & { _tooltip: string })._tooltip = this.label || undefined;\n }\n }\n }\n\n // #endregion\n // #region Render Methods\n\n render() {\n const { focusClass } = this;\n const classes = ['tooltip'];\n if (focusClass) classes.push(focusClass);\n if (this.persistOnHoverDismissed) classes.push('dismissed');\n\n return this.label ? (\n <div\n tabindex={this.focusable ? 0 : undefined}\n ref={el => (this.tooltipElement = el)}\n class={classes.join(' ')}\n aria-label={this.focusable ? this.label : undefined}\n data-label={this.label}\n onAnimationEnd={() => this.animationEndHandler()}\n role={this.focusable ? 'tooltip' : undefined}\n test-id=\"tooltipContainer\"\n >\n <slot onSlotchange={() => this.propagateTooltip()} />\n </div>\n ) : (\n <slot onSlotchange={() => this.propagateTooltip()} />\n );\n }\n\n // #endregion\n}\n"]}
@@ -0,0 +1,76 @@
1
+ import { expect } from "@playwright/test";
2
+ import { test } from "@stencil/playwright";
3
+ import { setupPage, THEMES } from "../../../utils/test/vr-helpers";
4
+ const TRIGGER = `<q2-btn intent="workflow-primary"><span>Trigger</span></q2-btn>`;
5
+ // Pad the wrapper so the tooltip has room to render in any direction without clipping.
6
+ const wrap = (inner) => `<div style="padding: 80px; display: inline-block;">${inner}</div>`;
7
+ // Use `immediate` so hover doesn't have to wait through the 1s delay before the
8
+ // tooltip appears. Don't use `persistent` — it skips animation but also doesn't
9
+ // trigger the same render path as a real hover, which causes positioning bugs.
10
+ const tooltipHtml = (position, label = 'Tooltip text') => wrap(`<q2-tooltip label="${label}" position="${position}" immediate>${TRIGGER}</q2-tooltip>`);
11
+ const VARIANTS = [
12
+ { name: 'position-n', html: tooltipHtml('n'), states: ['resting'] },
13
+ { name: 'position-s', html: tooltipHtml('s'), states: ['resting'] },
14
+ { name: 'position-e', html: tooltipHtml('e'), states: ['resting'] },
15
+ { name: 'position-w', html: tooltipHtml('w'), states: ['resting'] },
16
+ { name: 'position-ne', html: tooltipHtml('ne'), states: ['resting'] },
17
+ { name: 'position-nw', html: tooltipHtml('nw'), states: ['resting'] },
18
+ { name: 'position-se', html: tooltipHtml('se'), states: ['resting'] },
19
+ { name: 'position-sw', html: tooltipHtml('sw'), states: ['resting'] },
20
+ {
21
+ name: 'multiline',
22
+ html: wrap(`<q2-tooltip label="A long tooltip that wraps across multiple lines for readability." position="n" immediate multiline>${TRIGGER}</q2-tooltip>`),
23
+ states: ['resting'],
24
+ multiline: true,
25
+ },
26
+ {
27
+ name: 'block',
28
+ html: `<div style="padding: 80px;"><q2-tooltip label="Block tooltip" position="n" immediate block>${TRIGGER}</q2-tooltip></div>`,
29
+ states: ['resting'],
30
+ block: true,
31
+ },
32
+ {
33
+ name: 'focusable',
34
+ html: wrap(`<q2-tooltip label="Focusable tooltip" position="n" focusable><span>Static text</span></q2-tooltip>`),
35
+ states: ['focus'],
36
+ },
37
+ ];
38
+ // Hover the q2-tooltip host element to surface the bubble. waitForFunction
39
+ // confirms the bubble is visible (opacity > 0) before snapshotting.
40
+ const hoverToShow = async (page) => {
41
+ await page.locator('q2-tooltip').first().hover();
42
+ await page.waitForFunction(() => {
43
+ var _a;
44
+ const tt = document.querySelector('q2-tooltip');
45
+ const bubble = (_a = tt === null || tt === void 0 ? void 0 : tt.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('.tooltip');
46
+ if (!bubble)
47
+ return false;
48
+ const after = window.getComputedStyle(bubble, '::after');
49
+ return after.opacity === '1' && after.visibility === 'visible';
50
+ });
51
+ };
52
+ const restingCase = (variant, theme) => {
53
+ test(`q2-tooltip--${variant.name}--resting — ${theme}`, async ({ page }) => {
54
+ await setupPage(page, variant.html, { theme });
55
+ await hoverToShow(page);
56
+ await expect(page).toHaveScreenshot(`q2-tooltip--${variant.name}--resting--${theme}.png`);
57
+ });
58
+ };
59
+ const focusCase = (variant, theme) => {
60
+ test(`q2-tooltip--${variant.name}--focus — ${theme}`, async ({ page }) => {
61
+ await setupPage(page, variant.html, { theme });
62
+ await page.keyboard.press('Tab');
63
+ await expect(page).toHaveScreenshot(`q2-tooltip--${variant.name}--focus--${theme}.png`);
64
+ });
65
+ };
66
+ test.describe('q2-tooltip — variants × themes', () => {
67
+ for (const variant of VARIANTS) {
68
+ for (const theme of THEMES) {
69
+ if (variant.states.includes('resting'))
70
+ restingCase(variant, theme);
71
+ if (variant.states.includes('focus'))
72
+ focusCase(variant, theme);
73
+ }
74
+ }
75
+ });
76
+ //# sourceMappingURL=q2-tooltip-test.vr.js.map
@@ -0,0 +1 @@
1
+ {"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;YACzB,IAAI,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC;gBAAE,WAAW,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;YACpE,IAAI,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC;gBAAE,SAAS,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;QACpE,CAAC;IACL,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { expect } from '@playwright/test';\nimport { test } from '@stencil/playwright';\nimport { setupPage, THEMES, Theme } from '../../../utils/test/vr-helpers';\n\ntype State = 'resting' | 'focus';\ntype Variant = { name: string; html: string; states: State[]; multiline?: boolean; block?: boolean };\n\nconst TRIGGER = `<q2-btn intent=\"workflow-primary\"><span>Trigger</span></q2-btn>`;\n\n// Pad the wrapper so the tooltip has room to render in any direction without clipping.\nconst wrap = (inner: string) => `<div style=\"padding: 80px; display: inline-block;\">${inner}</div>`;\n\n// Use `immediate` so hover doesn't have to wait through the 1s delay before the\n// tooltip appears. Don't use `persistent` — it skips animation but also doesn't\n// trigger the same render path as a real hover, which causes positioning bugs.\nconst tooltipHtml = (position: string, label = 'Tooltip text') =>\n wrap(`<q2-tooltip label=\"${label}\" position=\"${position}\" immediate>${TRIGGER}</q2-tooltip>`);\n\nconst VARIANTS: Variant[] = [\n { name: 'position-n', html: tooltipHtml('n'), states: ['resting'] },\n { name: 'position-s', html: tooltipHtml('s'), states: ['resting'] },\n { name: 'position-e', html: tooltipHtml('e'), states: ['resting'] },\n { name: 'position-w', html: tooltipHtml('w'), states: ['resting'] },\n { name: 'position-ne', html: tooltipHtml('ne'), states: ['resting'] },\n { name: 'position-nw', html: tooltipHtml('nw'), states: ['resting'] },\n { name: 'position-se', html: tooltipHtml('se'), states: ['resting'] },\n { name: 'position-sw', html: tooltipHtml('sw'), states: ['resting'] },\n {\n name: 'multiline',\n html: wrap(\n `<q2-tooltip label=\"A long tooltip that wraps across multiple lines for readability.\" position=\"n\" immediate multiline>${TRIGGER}</q2-tooltip>`\n ),\n states: ['resting'],\n multiline: true,\n },\n {\n name: 'block',\n html: `<div style=\"padding: 80px;\"><q2-tooltip label=\"Block tooltip\" position=\"n\" immediate block>${TRIGGER}</q2-tooltip></div>`,\n states: ['resting'],\n block: true,\n },\n {\n name: 'focusable',\n html: wrap(\n `<q2-tooltip label=\"Focusable tooltip\" position=\"n\" focusable><span>Static text</span></q2-tooltip>`\n ),\n states: ['focus'],\n },\n];\n\n// Hover the q2-tooltip host element to surface the bubble. waitForFunction\n// confirms the bubble is visible (opacity > 0) before snapshotting.\nconst hoverToShow = async (page: import('@playwright/test').Page) => {\n await page.locator('q2-tooltip').first().hover();\n await page.waitForFunction(() => {\n const tt = document.querySelector('q2-tooltip');\n const bubble = tt?.shadowRoot?.querySelector<HTMLElement>('.tooltip');\n if (!bubble) return false;\n const after = window.getComputedStyle(bubble, '::after');\n return after.opacity === '1' && after.visibility === 'visible';\n });\n};\n\nconst restingCase = (variant: Variant, theme: Theme) => {\n test(`q2-tooltip--${variant.name}--resting — ${theme}`, async ({ page }) => {\n await setupPage(page, variant.html, { theme });\n await hoverToShow(page);\n await expect(page).toHaveScreenshot(`q2-tooltip--${variant.name}--resting--${theme}.png`);\n });\n};\n\nconst focusCase = (variant: Variant, theme: Theme) => {\n test(`q2-tooltip--${variant.name}--focus — ${theme}`, async ({ page }) => {\n await setupPage(page, variant.html, { theme });\n await page.keyboard.press('Tab');\n await expect(page).toHaveScreenshot(`q2-tooltip--${variant.name}--focus--${theme}.png`);\n });\n};\n\ntest.describe('q2-tooltip — variants × themes', () => {\n for (const variant of VARIANTS) {\n for (const theme of THEMES) {\n if (variant.states.includes('resting')) restingCase(variant, theme);\n if (variant.states.includes('focus')) focusCase(variant, theme);\n }\n }\n});\n"]}
@@ -49,9 +49,9 @@ export class TectonTabPane {
49
49
  // #endregion
50
50
  // #region Render Methods
51
51
  render() {
52
- return (h("div", { key: '58a67b201accff4cdb0cf19172f3a91a6c8effd5', id: `tab-pane-${this.guid}-${this.index}`, class: `tab-pane${this.selected ? '' : ' hidden'}`, role: "tabpanel", tabindex: "-1", "aria-hidden": `${!this.selected}`, "aria-labelledby": `tab-${this.guid}-${this.index}` }, this.selected && this.provided !== undefined && !this.provided && (h("div", { key: '14ea6040e9a7c5c019d982e3f9e84227f0144d19' }, h("slot", { key: '2f23163c833f14e5b787f35d7af3fe162a6d3fb7', name: "loading-wrapper" }), h("iframe", { key: '9bdaf2ad2df5d0a0763aae906c7227d7e05052b7', hidden: true, name: this.moduleId, scrolling: "no", src: this.showForm && this.authPayload.length ? '' : this.url || '', "data-module-id": this.moduleId, style: this.minHeight ? { minHeight: this.minHeight } : null, onLoad: this.onIFrameLoad, title: this.iframeTitle, allow: "geolocation; camera" }), this._showForm && this.authPayload ? (h("form", { hidden: true, method: "post", action: this.url, target: this.moduleId, encType: "multipart/form-data" }, this.authPayload.map(element => {
52
+ return (h("div", { key: '064545f0fed8a7d7b7aac0ec36179d745fc350af', id: `tab-pane-${this.guid}-${this.index}`, class: `tab-pane${this.selected ? '' : ' hidden'}`, role: "tabpanel", tabindex: "-1", "aria-hidden": `${!this.selected}`, "aria-labelledby": `tab-${this.guid}-${this.index}` }, this.selected && this.provided !== undefined && !this.provided && (h("div", { key: 'b74988726b4e15f377d76d9af1921a0c68027d8d' }, h("slot", { key: 'e4e020b962bc6d21520a5d394a4b0a4ecc060476', name: "loading-wrapper" }), h("iframe", { key: 'c33f35f9c4a49e23bfe5ee9b1ad2100a746e2a1f', hidden: true, name: this.moduleId, scrolling: "no", src: this.showForm && this.authPayload.length ? '' : this.url || '', "data-module-id": this.moduleId, style: this.minHeight ? { minHeight: this.minHeight } : null, onLoad: this.onIFrameLoad, title: this.iframeTitle, allow: "geolocation; camera" }), this._showForm && this.authPayload ? (h("form", { hidden: true, method: "post", action: this.url, target: this.moduleId, encType: "multipart/form-data" }, this.authPayload.map(element => {
53
53
  return (h("input", { type: "hidden", value: element.value, name: element.key }));
54
- }))) : (''))), h("div", { key: '8aeea96ffde0dfb337dd84e0346951d075b4d233', class: "slot-wrapper", hidden: this.selected && this.provided !== undefined && !this.provided }, h("slot", { key: 'c81c5ad3f2c93436284fe928be54b58836ff0fff' }))));
54
+ }))) : (''))), h("div", { key: 'c6e4e3295cbf6dbdcddb7f8109a19bfe3a4975dd', class: "slot-wrapper", hidden: this.selected && this.provided !== undefined && !this.provided }, h("slot", { key: 'd2db52e88ddfe939b119217ca3c69ed93e9d4e38' }))));
55
55
  }
56
56
  static get is() { return "tecton-tab-pane"; }
57
57
  static get encapsulation() { return "shadow"; }
@@ -8,7 +8,13 @@ export const hasValidParent = (hostElement, requiredParents) => {
8
8
  };
9
9
  export const hasValidAncestor = (hostElement, requiredParents) => {
10
10
  const selector = Array.isArray(requiredParents) ? requiredParents.join(',').toLowerCase() : requiredParents;
11
- const isValid = !!hostElement.closest(selector);
11
+ // First try closest() for direct ancestors (works for non-shadow cases)
12
+ let isValid = !!hostElement.closest(selector);
13
+ // If not found and element is slotted, check the slot's parent
14
+ if (!isValid && hostElement.assignedSlot) {
15
+ // Walk up from the slot through its ancestors
16
+ isValid = !!hostElement.assignedSlot.closest(selector);
17
+ }
12
18
  if (!isValid) {
13
19
  console.warn(`${hostElement.tagName} requires ${selector} as a parent`);
14
20
  }
@@ -1 +1 @@
1
- {"version":3,"file":"component.js","sourceRoot":"","sources":["../../../src/utils/component.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,WAAoB,EAAE,eAAkC,EAAW,EAAE;IAChG,MAAM,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,eAAe,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,eAAe,CAAC;IAC5G,MAAM,OAAO,GAAG,CAAC,CAAC,WAAW,CAAC,aAAa,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IAC9D,IAAI,CAAC,OAAO,EA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AO,iBAAiB,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IACjF,CAAC;IACD,OAAO,OAAO,CAAC;AACnB,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,OAAgB,EAAE,eAAkC,EAAQ,EAAE;IACzF,MAAM,GAAG,GAAG,KAAK,CAAC,OAAO,CAAC,eAAe,CAAC;QACtC,CAAC,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;QAC3C,CAAC,CAAC,CAAC,eAAe,CAAC,WAAW,EAAE,CAAC,CAAC;IAEtC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE;QACtC,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC,EAAE,CAAC;YAC1C,OAAO,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,OAAO,iCAAiC,OAAO,CAAC,OAAO,wBAAwB,CAAC,CAAC;YACpG,EAAE,CAAC,MAAM,EAAE,CAAC;QAChB,CAAC;IACL,CAAC,CAAC,CAAC;AACP,CAAC,CAAC","sourcesContent":["export const hasValidParent = (hostElement: Element, requiredParents: string | string[]): boolean => {\n const selector = Array.isArray(requiredParents) ? requiredParents.join(',').toLowerCase() : requiredParents;\n const isValid = !!hostElement.parentElement.matches(selector);\n if (!isValid) {\n console.warn(`${hostElement.tagName} requires ${selector} as a parent`);\n }\n return isValid;\n};\n\nexport const hasValidAncestor = (hostElement: Element, requiredParents: string | string[]): boolean => {\n const selector = Array.isArray(requiredParents) ? requiredParents.join(',').toLowerCase() : requiredParents;\n const isValid = !!hostElement.closest(selector);\n if (!isValid) {\n console.warn(`${hostElement.tagName} requires ${selector} as a parent`);\n }\n return isValid;\n};\n\nexport const hasValidChildren = (element: Element, allowedChildren: string | string[]): boolean => {\n const app = Array.isArray(allowedChildren)\n ? allowedChildren.map(x => x.toLowerCase())\n : [allowedChildren.toLowerCase()];\n const isValid = !Array.from(element.children).some(x => !app.includes(x.tagName.toLowerCase()));\n if (!isValid) {\n console.warn(`${element.tagName} expects only ${app.join(',')} as children`);\n }\n return isValid;\n};\n\nexport const filterChildren = (element: Element, allowedChildren: string | string[]): void => {\n const app = Array.isArray(allowedChildren)\n ? allowedChildren.map(x => x.toLowerCase())\n : [allowedChildren.toLowerCase()];\n\n Array.from(element.children).forEach(el => {\n if (!app.includes(el.tagName.toLowerCase())) {\n console.warn(`${el.tagName} is not allowed as a child of ${element.tagName} and has been removed.`);\n el.remove();\n }\n });\n};\n"]}
1
+ {"version":3,"file":"component.js","sourceRoot":"","sources":["../../../src/utils/component.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,WAAoB,EAAE,eAAkC,EAAW,EAAE;IAChG,MAAM,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,eAAe,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,eAAe,CAAC;IAC5G,MAAM,OAAO,GAAG,CAAC,CAAC,WAAW,CAAC,aAAa,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IAC9D,IAAI,CAAC,OAAO,EAAE,CAAC;QACX,OAAO,CAAC,IAAI,CAAC,GAAG,WAAW,CAAC,OAAO,aAAa,QAAQ,cAAc,CAAC,CAAC;IAC5E,CAAC;IACD,OAAO,OAAO,CAAC;AACnB,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,WAAwB,EAAE,eAAkC,EAAW,EAAE;IACtG,MAAM,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,eAAe,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC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gB,EAAE,eAAkC,EAAQ,EAAE;IACzF,MAAM,GAAG,GAAG,KAAK,CAAC,OAAO,CAAC,eAAe,CAAC;QACtC,CAAC,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;QAC3C,CAAC,CAAC,CAAC,eAAe,CAAC,WAAW,EAAE,CAAC,CAAC;IAEtC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE;QACtC,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC,EAAE,CAAC;YAC1C,OAAO,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,OAAO,iCAAiC,OAAO,CAAC,OAAO,wBAAwB,CAAC,CAAC;YACpG,EAAE,CAAC,MAAM,EAAE,CAAC;QAChB,CAAC;IACL,CAAC,CAAC,CAAC;AACP,CAAC,CAAC","sourcesContent":["export const hasValidParent = (hostElement: Element, requiredParents: string | string[]): boolean => {\n const selector = Array.isArray(requiredParents) ? requiredParents.join(',').toLowerCase() : requiredParents;\n const isValid = !!hostElement.parentElement.matches(selector);\n if (!isValid) {\n console.warn(`${hostElement.tagName} requires ${selector} as a parent`);\n }\n return isValid;\n};\n\nexport const hasValidAncestor = (hostElement: HTMLElement, requiredParents: string | string[]): boolean => {\n const selector = Array.isArray(requiredParents) ? requiredParents.join(',').toLowerCase() : requiredParents;\n\n // First try closest() for direct ancestors (works for non-shadow cases)\n let isValid = !!hostElement.closest(selector);\n\n // If not found and element is slotted, check the slot's parent\n if (!isValid && hostElement.assignedSlot) {\n // Walk up from the slot through its ancestors\n isValid = !!hostElement.assignedSlot.closest(selector);\n }\n\n if (!isValid) {\n console.warn(`${hostElement.tagName} requires ${selector} as a parent`);\n }\n return isValid;\n};\n\nexport const hasValidChildren = (element: Element, allowedChildren: string | string[]): boolean => {\n const app = Array.isArray(allowedChildren)\n ? allowedChildren.map(x => x.toLowerCase())\n : [allowedChildren.toLowerCase()];\n const isValid = !Array.from(element.children).some(x => !app.includes(x.tagName.toLowerCase()));\n if (!isValid) {\n console.warn(`${element.tagName} expects only ${app.join(',')} as children`);\n }\n return isValid;\n};\n\nexport const filterChildren = (element: Element, allowedChildren: string | string[]): void => {\n const app = Array.isArray(allowedChildren)\n ? allowedChildren.map(x => x.toLowerCase())\n : [allowedChildren.toLowerCase()];\n\n Array.from(element.children).forEach(el => {\n if (!app.includes(el.tagName.toLowerCase())) {\n console.warn(`${el.tagName} is not allowed as a child of ${element.tagName} and has been removed.`);\n el.remove();\n }\n });\n};\n"]}
@@ -174,7 +174,7 @@ export function getBrowserInfo() {
174
174
  if (userAgent.includes(' iPhone OS') && !userAgent.includes('Safari')) {
175
175
  // iOS app WebView — no "Safari" token in userAgent
176
176
  name = 'Safari';
177
- version = userAgent.split(' iPhone OS')[1].trim().split(/\s/)[0].replaceAll('_', '.');
177
+ version = userAgent.split(' iPhone OS')[1].trim().split(/\s/)[0].replace(/_/g, '.');
178
178
  }
179
179
  else if (userAgent.includes(' iOS/')) {
180
180
  // Alternate iOS app userAgent format (e.g. ngam-ios/26.5.0.107 arm64 iOS/26.4 CFNetwork/1.0 Darwin/25.4.0)