q2-tecton-elements 1.48.1-alpha.0 → 1.48.1

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 (367) hide show
  1. package/dist/cjs/click-elsewhere_2.cjs.entry.js +73 -28
  2. package/dist/cjs/click-elsewhere_2.cjs.entry.js.map +1 -1
  3. package/dist/cjs/{index-c9a86a33.js → index-f69742cf.js} +1 -1
  4. package/dist/cjs/{index-c9a86a33.js.map → index-f69742cf.js.map} +1 -1
  5. package/dist/cjs/loader.cjs.js +1 -1
  6. package/dist/cjs/q2-action-sheet.cjs.entry.js +1 -1
  7. package/dist/cjs/q2-avatar.cjs.entry.js +1 -1
  8. package/dist/cjs/q2-calendar.cjs.entry.js +3 -3
  9. package/dist/cjs/q2-calendar.cjs.entry.js.map +1 -1
  10. package/dist/cjs/q2-carousel-pane.cjs.entry.js +2 -2
  11. package/dist/cjs/q2-carousel.cjs.entry.js +1 -1
  12. package/dist/cjs/q2-chart-area.cjs.entry.js +1 -1
  13. package/dist/cjs/q2-chart-bar.cjs.entry.js +1 -1
  14. package/dist/cjs/q2-chart-donut.cjs.entry.js +1 -1
  15. package/dist/cjs/q2-checkbox-group.cjs.entry.js +2 -2
  16. package/dist/cjs/q2-checkbox-group.cjs.entry.js.map +1 -1
  17. package/dist/cjs/q2-checkbox.cjs.entry.js +2 -2
  18. package/dist/cjs/q2-checkbox.cjs.entry.js.map +1 -1
  19. package/dist/cjs/q2-currency.cjs.entry.js +1 -1
  20. package/dist/cjs/q2-data-table.cjs.entry.js +1 -1
  21. package/dist/cjs/q2-detail.cjs.entry.js +1 -1
  22. package/dist/cjs/q2-dropdown.cjs.entry.js +1 -1
  23. package/dist/cjs/q2-editable-field.cjs.entry.js +1 -1
  24. package/dist/cjs/q2-input.cjs.entry.js +2 -2
  25. package/dist/cjs/q2-input.cjs.entry.js.map +1 -1
  26. package/dist/cjs/q2-item.cjs.entry.js +1 -1
  27. package/dist/cjs/q2-legend.cjs.entry.js +1 -1
  28. package/dist/cjs/q2-list.cjs.entry.js +1 -1
  29. package/dist/cjs/q2-loc.cjs.entry.js +1 -1
  30. package/dist/cjs/q2-message.cjs.entry.js +1 -1
  31. package/dist/cjs/q2-month-picker.cjs.entry.js +2 -2
  32. package/dist/cjs/q2-optgroup.cjs.entry.js +1 -1
  33. package/dist/cjs/q2-option-list.cjs.entry.js +1 -1
  34. package/dist/cjs/q2-option.cjs.entry.js +1 -1
  35. package/dist/cjs/q2-pagination.cjs.entry.js +2 -2
  36. package/dist/cjs/q2-pill.cjs.entry.js +1 -1
  37. package/dist/cjs/q2-radio-group.cjs.entry.js +2 -2
  38. package/dist/cjs/q2-radio-group.cjs.entry.js.map +1 -1
  39. package/dist/cjs/q2-radio.cjs.entry.js +1 -1
  40. package/dist/cjs/q2-relative-time.cjs.entry.js +2 -2
  41. package/dist/cjs/q2-section.cjs.entry.js +2 -2
  42. package/dist/cjs/q2-select.cjs.entry.js +56 -8
  43. package/dist/cjs/q2-select.cjs.entry.js.map +1 -1
  44. package/dist/cjs/q2-stepper-pane.cjs.entry.js +1 -1
  45. package/dist/cjs/q2-stepper-vertical.cjs.entry.js +1 -1
  46. package/dist/cjs/q2-stepper.cjs.entry.js +1 -1
  47. package/dist/cjs/q2-tab-container.cjs.entry.js +1 -1
  48. package/dist/cjs/q2-tab-pane.cjs.entry.js +1 -1
  49. package/dist/cjs/q2-tag.cjs.entry.js +1 -1
  50. package/dist/cjs/q2-tecton-elements.cjs.js +1 -1
  51. package/dist/cjs/q2-textarea.cjs.entry.js +2 -2
  52. package/dist/cjs/q2-textarea.cjs.entry.js.map +1 -1
  53. package/dist/cjs/tecton-tab-pane.cjs.entry.js +2 -2
  54. package/dist/collection/collection-manifest.json +5 -6
  55. package/dist/collection/components/q2-action-sheet/q2-action-sheet.js +1 -1
  56. package/dist/collection/components/q2-avatar/q2-avatar.js +1 -1
  57. package/dist/collection/components/q2-calendar/q2-calendar.css +0 -2
  58. package/dist/collection/components/q2-calendar/q2-calendar.js +1 -1
  59. package/dist/collection/components/q2-calendar/q2-month-picker.js +2 -2
  60. package/dist/collection/components/q2-carousel/q2-carousel.js +1 -1
  61. package/dist/collection/components/q2-carousel-pane/q2-carousel-pane.js +2 -2
  62. package/dist/collection/components/q2-chart-area/q2-chart-area.js +1 -1
  63. package/dist/collection/components/q2-chart-bar/q2-chart-bar.js +1 -1
  64. package/dist/collection/components/q2-chart-donut/q2-chart-donut.js +1 -1
  65. package/dist/collection/components/q2-checkbox/q2-checkbox.css +0 -2
  66. package/dist/collection/components/q2-checkbox/q2-checkbox.js +1 -1
  67. package/dist/collection/components/q2-checkbox-group/q2-checkbox-group.css +1 -7
  68. package/dist/collection/components/q2-checkbox-group/q2-checkbox-group.js +1 -1
  69. package/dist/collection/components/q2-currency/q2-currency.js +1 -1
  70. package/dist/collection/components/q2-data-table/q2-data-table.js +7 -7
  71. package/dist/collection/components/q2-detail/q2-detail.js +1 -1
  72. package/dist/collection/components/q2-dropdown/q2-dropdown.js +1 -1
  73. package/dist/collection/components/q2-editable-field/q2-editable-field.js +1 -1
  74. package/dist/collection/components/q2-input/q2-input.css +1 -1
  75. package/dist/collection/components/q2-input/q2-input.js +2 -2
  76. package/dist/collection/components/q2-item/q2-item.js +1 -1
  77. package/dist/collection/components/q2-legend/q2-legend.js +1 -1
  78. package/dist/collection/components/q2-list/q2-list.js +1 -1
  79. package/dist/collection/components/q2-loc/q2-loc.js +1 -1
  80. package/dist/collection/components/q2-message/q2-message.js +1 -1
  81. package/dist/collection/components/q2-optgroup/q2-optgroup.js +1 -1
  82. package/dist/collection/components/q2-option/q2-option.js +1 -1
  83. package/dist/collection/components/q2-option-list/q2-option-list.js +4 -4
  84. package/dist/collection/components/q2-pagination/q2-pagination.js +2 -2
  85. package/dist/collection/components/q2-pill/q2-pill.js +1 -1
  86. package/dist/collection/components/q2-popover/q2-popover.css +19 -11
  87. package/dist/collection/components/q2-popover/q2-popover.js +74 -28
  88. package/dist/collection/components/q2-popover/q2-popover.js.map +1 -1
  89. package/dist/collection/components/q2-radio/q2-radio.js +1 -1
  90. package/dist/collection/components/q2-radio-group/q2-radio-group.css +2 -4
  91. package/dist/collection/components/q2-radio-group/q2-radio-group.js +1 -1
  92. package/dist/collection/components/q2-relative-time/q2-relative-time.js +1 -1
  93. package/dist/collection/components/q2-section/q2-section.js +2 -2
  94. package/dist/collection/components/q2-select/q2-select.css +2 -2
  95. package/dist/collection/components/q2-select/q2-select.js +64 -9
  96. package/dist/collection/components/q2-select/q2-select.js.map +1 -1
  97. package/dist/collection/components/q2-stepper/q2-stepper.js +1 -1
  98. package/dist/collection/components/q2-stepper-pane/q2-stepper-pane.js +3 -3
  99. package/dist/collection/components/q2-stepper-vertical/q2-stepper-vertical.js +1 -1
  100. package/dist/collection/components/q2-tab-container/q2-tab-container.js +1 -1
  101. package/dist/collection/components/q2-tab-pane/q2-tab-pane.js +1 -1
  102. package/dist/collection/components/q2-tag/q2-tag.js +1 -1
  103. package/dist/collection/components/q2-textarea/q2-textarea.css +2 -2
  104. package/dist/collection/components/q2-textarea/q2-textarea.js +1 -1
  105. package/dist/collection/components/tecton-tab-pane/tecton-tab-pane.js +2 -2
  106. package/dist/components/index.js +0 -2
  107. package/dist/components/index.js.map +1 -1
  108. package/dist/components/q2-action-sheet.js +1 -1
  109. package/dist/components/q2-avatar2.js +1 -1
  110. package/dist/components/q2-calendar.js +2 -2
  111. package/dist/components/q2-calendar.js.map +1 -1
  112. package/dist/components/q2-carousel-pane.js +2 -2
  113. package/dist/components/q2-carousel.js +1 -1
  114. package/dist/components/q2-chart-area.js +1 -1
  115. package/dist/components/q2-chart-bar.js +1 -1
  116. package/dist/components/q2-chart-donut.js +1 -1
  117. package/dist/components/q2-checkbox-group.js +2 -2
  118. package/dist/components/q2-checkbox-group.js.map +1 -1
  119. package/dist/components/q2-checkbox2.js +2 -2
  120. package/dist/components/q2-checkbox2.js.map +1 -1
  121. package/dist/components/q2-currency.js +1 -1
  122. package/dist/components/q2-data-table.js +1 -1
  123. package/dist/components/q2-detail.js +1 -1
  124. package/dist/components/q2-dropdown.js +1 -1
  125. package/dist/components/q2-editable-field.js +1 -1
  126. package/dist/components/q2-input2.js +2 -2
  127. package/dist/components/q2-input2.js.map +1 -1
  128. package/dist/components/q2-item.js +1 -1
  129. package/dist/components/q2-legend2.js +1 -1
  130. package/dist/components/q2-list.js +1 -1
  131. package/dist/components/q2-loc.js +1 -1
  132. package/dist/components/q2-message2.js +1 -1
  133. package/dist/components/q2-month-picker.js +2 -2
  134. package/dist/components/q2-optgroup2.js +1 -1
  135. package/dist/components/q2-option-list2.js +1 -1
  136. package/dist/components/q2-option2.js +1 -1
  137. package/dist/components/q2-pagination.js +2 -2
  138. package/dist/components/q2-pill.js +1 -1
  139. package/dist/components/q2-popover2.js +73 -28
  140. package/dist/components/q2-popover2.js.map +1 -1
  141. package/dist/components/q2-radio-group.js +2 -2
  142. package/dist/components/q2-radio-group.js.map +1 -1
  143. package/dist/components/q2-radio.js +1 -1
  144. package/dist/components/q2-relative-time.js +1 -1
  145. package/dist/components/q2-section.js +2 -2
  146. package/dist/components/q2-select2.js +58 -10
  147. package/dist/components/q2-select2.js.map +1 -1
  148. package/dist/components/q2-stepper-pane.js +1 -1
  149. package/dist/components/q2-stepper-vertical.js +1 -1
  150. package/dist/components/q2-stepper.js +1 -1
  151. package/dist/components/q2-tab-container.js +1 -1
  152. package/dist/components/q2-tab-pane.js +1 -1
  153. package/dist/components/q2-tag.js +1 -1
  154. package/dist/components/q2-textarea.js +2 -2
  155. package/dist/components/q2-textarea.js.map +1 -1
  156. package/dist/components/tecton-tab-pane.js +2 -2
  157. package/dist/esm/click-elsewhere_2.entry.js +73 -28
  158. package/dist/esm/click-elsewhere_2.entry.js.map +1 -1
  159. package/dist/esm/{index-8582f46d.js → index-3184c760.js} +1 -1
  160. package/dist/esm/{index-8582f46d.js.map → index-3184c760.js.map} +1 -1
  161. package/dist/esm/loader.js +1 -1
  162. package/dist/esm/q2-action-sheet.entry.js +1 -1
  163. package/dist/esm/q2-avatar.entry.js +1 -1
  164. package/dist/esm/q2-calendar.entry.js +3 -3
  165. package/dist/esm/q2-calendar.entry.js.map +1 -1
  166. package/dist/esm/q2-carousel-pane.entry.js +2 -2
  167. package/dist/esm/q2-carousel.entry.js +1 -1
  168. package/dist/esm/q2-chart-area.entry.js +1 -1
  169. package/dist/esm/q2-chart-bar.entry.js +1 -1
  170. package/dist/esm/q2-chart-donut.entry.js +1 -1
  171. package/dist/esm/q2-checkbox-group.entry.js +2 -2
  172. package/dist/esm/q2-checkbox-group.entry.js.map +1 -1
  173. package/dist/esm/q2-checkbox.entry.js +2 -2
  174. package/dist/esm/q2-checkbox.entry.js.map +1 -1
  175. package/dist/esm/q2-currency.entry.js +1 -1
  176. package/dist/esm/q2-data-table.entry.js +1 -1
  177. package/dist/esm/q2-detail.entry.js +1 -1
  178. package/dist/esm/q2-dropdown.entry.js +1 -1
  179. package/dist/esm/q2-editable-field.entry.js +1 -1
  180. package/dist/esm/q2-input.entry.js +2 -2
  181. package/dist/esm/q2-input.entry.js.map +1 -1
  182. package/dist/esm/q2-item.entry.js +1 -1
  183. package/dist/esm/q2-legend.entry.js +1 -1
  184. package/dist/esm/q2-list.entry.js +1 -1
  185. package/dist/esm/q2-loc.entry.js +1 -1
  186. package/dist/esm/q2-message.entry.js +1 -1
  187. package/dist/esm/q2-month-picker.entry.js +2 -2
  188. package/dist/esm/q2-optgroup.entry.js +1 -1
  189. package/dist/esm/q2-option-list.entry.js +1 -1
  190. package/dist/esm/q2-option.entry.js +1 -1
  191. package/dist/esm/q2-pagination.entry.js +2 -2
  192. package/dist/esm/q2-pill.entry.js +1 -1
  193. package/dist/esm/q2-radio-group.entry.js +2 -2
  194. package/dist/esm/q2-radio-group.entry.js.map +1 -1
  195. package/dist/esm/q2-radio.entry.js +1 -1
  196. package/dist/esm/q2-relative-time.entry.js +2 -2
  197. package/dist/esm/q2-section.entry.js +2 -2
  198. package/dist/esm/q2-select.entry.js +57 -9
  199. package/dist/esm/q2-select.entry.js.map +1 -1
  200. package/dist/esm/q2-stepper-pane.entry.js +1 -1
  201. package/dist/esm/q2-stepper-vertical.entry.js +1 -1
  202. package/dist/esm/q2-stepper.entry.js +1 -1
  203. package/dist/esm/q2-tab-container.entry.js +1 -1
  204. package/dist/esm/q2-tab-pane.entry.js +1 -1
  205. package/dist/esm/q2-tag.entry.js +1 -1
  206. package/dist/esm/q2-tecton-elements.js +1 -1
  207. package/dist/esm/q2-textarea.entry.js +2 -2
  208. package/dist/esm/q2-textarea.entry.js.map +1 -1
  209. package/dist/esm/tecton-tab-pane.entry.js +2 -2
  210. package/dist/jest.setup.js +22 -0
  211. package/dist/jest.setup.js.map +1 -0
  212. package/dist/q2-tecton-elements/{p-7dafc5da.entry.js → p-044b8914.entry.js} +2 -2
  213. package/dist/q2-tecton-elements/{p-d35de465.entry.js → p-07f40176.entry.js} +2 -2
  214. package/dist/q2-tecton-elements/p-0a211fb4.entry.js +2 -0
  215. package/dist/q2-tecton-elements/p-0a211fb4.entry.js.map +1 -0
  216. package/dist/q2-tecton-elements/{p-e793a82c.entry.js → p-0d73466a.entry.js} +2 -2
  217. package/dist/q2-tecton-elements/{p-4008aceb.entry.js → p-11982614.entry.js} +2 -2
  218. package/dist/q2-tecton-elements/{p-35cc1039.entry.js → p-132005d2.entry.js} +2 -2
  219. package/dist/q2-tecton-elements/{p-fcffc029.entry.js → p-149044cd.entry.js} +2 -2
  220. package/dist/q2-tecton-elements/p-1a628982.entry.js +2 -0
  221. package/dist/q2-tecton-elements/p-1a628982.entry.js.map +1 -0
  222. package/dist/q2-tecton-elements/{p-828850c1.entry.js → p-1d824cdf.entry.js} +2 -2
  223. package/dist/q2-tecton-elements/p-25a0f807.entry.js +2 -0
  224. package/dist/q2-tecton-elements/p-25a0f807.entry.js.map +1 -0
  225. package/dist/q2-tecton-elements/{p-9b65cc28.entry.js → p-28b0de1c.entry.js} +2 -2
  226. package/dist/q2-tecton-elements/{p-ced89010.entry.js → p-3dff9fb0.entry.js} +2 -2
  227. package/dist/q2-tecton-elements/{p-d32f8e53.entry.js → p-432532fe.entry.js} +2 -2
  228. package/dist/q2-tecton-elements/{p-2d6a9a94.entry.js → p-46085a34.entry.js} +2 -2
  229. package/dist/q2-tecton-elements/{p-1b89b9c3.entry.js → p-4740e969.entry.js} +2 -2
  230. package/dist/q2-tecton-elements/{p-258f8c9c.entry.js → p-502af427.entry.js} +2 -2
  231. package/dist/q2-tecton-elements/{p-dfa489ba.entry.js → p-5214296a.entry.js} +2 -2
  232. package/dist/q2-tecton-elements/{p-32130845.entry.js → p-572805fc.entry.js} +2 -2
  233. package/dist/q2-tecton-elements/{p-6e313705.entry.js → p-644d5b2e.entry.js} +2 -2
  234. package/dist/q2-tecton-elements/{p-30d70f4a.entry.js → p-68276771.entry.js} +2 -2
  235. package/dist/q2-tecton-elements/{p-43236cac.entry.js → p-6af21a10.entry.js} +2 -2
  236. package/dist/q2-tecton-elements/{p-f57c4448.entry.js → p-6be0e333.entry.js} +2 -2
  237. package/dist/q2-tecton-elements/{p-400f6071.entry.js → p-77e6704d.entry.js} +2 -2
  238. package/dist/q2-tecton-elements/{p-400f6071.entry.js.map → p-77e6704d.entry.js.map} +1 -1
  239. package/dist/q2-tecton-elements/{p-9a5695db.entry.js → p-7deda459.entry.js} +2 -2
  240. package/dist/q2-tecton-elements/{p-3f665c56.entry.js → p-84fc61f5.entry.js} +2 -2
  241. package/dist/q2-tecton-elements/{p-d75e4752.entry.js → p-85a7b1ab.entry.js} +2 -2
  242. package/dist/q2-tecton-elements/{p-4f7e6e79.entry.js → p-8734e1cb.entry.js} +2 -2
  243. package/dist/q2-tecton-elements/{p-7cbb989e.entry.js → p-a2caa101.entry.js} +2 -2
  244. package/dist/q2-tecton-elements/{p-49ecdf18.entry.js → p-ca17f7ca.entry.js} +2 -2
  245. package/dist/q2-tecton-elements/{p-30296b0e.entry.js → p-cfabf5d1.entry.js} +2 -2
  246. package/dist/q2-tecton-elements/{p-0d6edd2a.entry.js → p-d5776227.entry.js} +2 -2
  247. package/dist/q2-tecton-elements/{p-56dd051a.entry.js → p-d5c182d8.entry.js} +2 -2
  248. package/dist/q2-tecton-elements/{p-bc73f69c.entry.js → p-d6c8d94d.entry.js} +2 -2
  249. package/dist/q2-tecton-elements/{p-861e83de.entry.js → p-de2f3111.entry.js} +2 -2
  250. package/dist/q2-tecton-elements/p-def9be7b.entry.js +2 -0
  251. package/dist/q2-tecton-elements/p-def9be7b.entry.js.map +1 -0
  252. package/dist/q2-tecton-elements/{p-aed969d4.entry.js → p-e654d2d6.entry.js} +2 -2
  253. package/dist/q2-tecton-elements/p-e786ba03.entry.js +2 -0
  254. package/dist/q2-tecton-elements/p-e786ba03.entry.js.map +1 -0
  255. package/dist/q2-tecton-elements/p-eb45704f.entry.js +2 -0
  256. package/dist/q2-tecton-elements/p-eb45704f.entry.js.map +1 -0
  257. package/dist/q2-tecton-elements/{p-b6bcef6a.js → p-f1e887f5.js} +1 -1
  258. package/dist/q2-tecton-elements/p-fe1f1ff4.entry.js +2 -0
  259. package/dist/q2-tecton-elements/p-fe1f1ff4.entry.js.map +1 -0
  260. package/dist/q2-tecton-elements/{p-4b47816d.entry.js → p-fe2fd83b.entry.js} +2 -2
  261. package/dist/q2-tecton-elements/{p-366a92d9.entry.js → p-ff39ba49.entry.js} +2 -2
  262. package/dist/q2-tecton-elements/q2-tecton-elements.esm.js +1 -1
  263. package/dist/q2-tecton-elements/q2-tecton-elements.esm.js.map +1 -1
  264. package/dist/test/elements/q2-calendar-test.e2e.js +2 -2
  265. package/dist/test/elements/q2-calendar-test.e2e.js.map +1 -1
  266. package/dist/test/elements/q2-dropdown-test.e2e.js +2 -14
  267. package/dist/test/elements/q2-dropdown-test.e2e.js.map +1 -1
  268. package/dist/test/elements/q2-pill-test.e2e.js +1 -1
  269. package/dist/test/elements/q2-pill-test.e2e.js.map +1 -1
  270. package/dist/test/elements/q2-popover-test.e2e.js +1 -34
  271. package/dist/test/elements/q2-popover-test.e2e.js.map +1 -1
  272. package/dist/test/elements/q2-popover-test.spec.js +750 -435
  273. package/dist/test/elements/q2-popover-test.spec.js.map +1 -1
  274. package/dist/test/elements/q2-relative-time-test.e2e.js.map +1 -1
  275. package/dist/test/elements/q2-select-test.e2e.js +1 -1
  276. package/dist/test/elements/q2-select-test.e2e.js.map +1 -1
  277. package/dist/test/elements/q2-select-test.spec.js +412 -0
  278. package/dist/test/elements/q2-select-test.spec.js.map +1 -0
  279. package/dist/test/elements/q2-tag-test.e2e.js +1 -1
  280. package/dist/test/elements/q2-tag-test.e2e.js.map +1 -1
  281. package/dist/types/builds/q2e/development/tecton/tecton/packages/q2-tecton-elements/.stencil/jest.setup.d.ts +1 -0
  282. package/dist/types/components/q2-action-sheet/q2-action-sheet.d.ts +60 -0
  283. package/dist/types/components/q2-calendar/q2-calendar.d.ts +324 -0
  284. package/dist/types/components/q2-carousel/q2-carousel.d.ts +2 -2
  285. package/dist/types/components/q2-data-table/q2-data-table.d.ts +223 -0
  286. package/dist/types/components/q2-dropdown/q2-dropdown.d.ts +130 -0
  287. package/dist/types/components/q2-dropdown-item/q2-dropdown-item.d.ts +50 -0
  288. package/dist/types/components/q2-editable-field/q2-editable-field.d.ts +140 -0
  289. package/dist/types/components/q2-loading/skeleton/shapes.d.ts +1 -0
  290. package/dist/types/components/q2-optgroup/q2-optgroup.d.ts +1 -1
  291. package/dist/types/components/q2-option-list/q2-option-list.d.ts +99 -0
  292. package/dist/types/components/q2-pagination/q2-pagination.d.ts +60 -0
  293. package/dist/types/components/q2-pill/q2-pill.d.ts +102 -0
  294. package/dist/types/components/q2-popover/q2-popover.d.ts +5 -3
  295. package/dist/types/components/q2-select/q2-select.d.ts +239 -0
  296. package/dist/types/components/q2-stepper/q2-stepper.d.ts +52 -0
  297. package/dist/types/components/q2-stepper-vertical/q2-stepper-vertical.d.ts +62 -0
  298. package/dist/types/components/q2-tab-container/q2-tab-container.d.ts +2 -2
  299. package/dist/types/components/q2-tag/q2-tag.d.ts +59 -0
  300. package/dist/types/components.d.ts +0 -21
  301. package/dist/types/utils/action-sheet.d.ts +12 -0
  302. package/package.json +5 -5
  303. package/dist/cjs/q2-form.cjs.entry.js +0 -23
  304. package/dist/cjs/q2-form.cjs.entry.js.map +0 -1
  305. package/dist/collection/components/q2-form/q2-form.css +0 -92
  306. package/dist/collection/components/q2-form/q2-form.js +0 -44
  307. package/dist/collection/components/q2-form/q2-form.js.map +0 -1
  308. package/dist/components/q2-form.d.ts +0 -11
  309. package/dist/components/q2-form.js +0 -39
  310. package/dist/components/q2-form.js.map +0 -1
  311. package/dist/esm/q2-form.entry.js +0 -19
  312. package/dist/esm/q2-form.entry.js.map +0 -1
  313. package/dist/q2-tecton-elements/p-19da46dc.entry.js +0 -2
  314. package/dist/q2-tecton-elements/p-19da46dc.entry.js.map +0 -1
  315. package/dist/q2-tecton-elements/p-2878a662.entry.js +0 -2
  316. package/dist/q2-tecton-elements/p-2878a662.entry.js.map +0 -1
  317. package/dist/q2-tecton-elements/p-2a8de00d.entry.js +0 -2
  318. package/dist/q2-tecton-elements/p-2a8de00d.entry.js.map +0 -1
  319. package/dist/q2-tecton-elements/p-79696bef.entry.js +0 -2
  320. package/dist/q2-tecton-elements/p-79696bef.entry.js.map +0 -1
  321. package/dist/q2-tecton-elements/p-8a8d51f1.entry.js +0 -2
  322. package/dist/q2-tecton-elements/p-8a8d51f1.entry.js.map +0 -1
  323. package/dist/q2-tecton-elements/p-8e60bcaa.entry.js +0 -2
  324. package/dist/q2-tecton-elements/p-8e60bcaa.entry.js.map +0 -1
  325. package/dist/q2-tecton-elements/p-fde11d9c.entry.js +0 -2
  326. package/dist/q2-tecton-elements/p-fde11d9c.entry.js.map +0 -1
  327. package/dist/q2-tecton-elements/p-fec9edc8.entry.js +0 -2
  328. package/dist/q2-tecton-elements/p-fec9edc8.entry.js.map +0 -1
  329. package/dist/test/elements/q2-form-test.e2e.js +0 -93
  330. package/dist/test/elements/q2-form-test.e2e.js.map +0 -1
  331. package/dist/types/components/q2-form/q2-form.d.ts +0 -6
  332. /package/dist/q2-tecton-elements/{p-7dafc5da.entry.js.map → p-044b8914.entry.js.map} +0 -0
  333. /package/dist/q2-tecton-elements/{p-d35de465.entry.js.map → p-07f40176.entry.js.map} +0 -0
  334. /package/dist/q2-tecton-elements/{p-e793a82c.entry.js.map → p-0d73466a.entry.js.map} +0 -0
  335. /package/dist/q2-tecton-elements/{p-4008aceb.entry.js.map → p-11982614.entry.js.map} +0 -0
  336. /package/dist/q2-tecton-elements/{p-35cc1039.entry.js.map → p-132005d2.entry.js.map} +0 -0
  337. /package/dist/q2-tecton-elements/{p-fcffc029.entry.js.map → p-149044cd.entry.js.map} +0 -0
  338. /package/dist/q2-tecton-elements/{p-828850c1.entry.js.map → p-1d824cdf.entry.js.map} +0 -0
  339. /package/dist/q2-tecton-elements/{p-9b65cc28.entry.js.map → p-28b0de1c.entry.js.map} +0 -0
  340. /package/dist/q2-tecton-elements/{p-ced89010.entry.js.map → p-3dff9fb0.entry.js.map} +0 -0
  341. /package/dist/q2-tecton-elements/{p-d32f8e53.entry.js.map → p-432532fe.entry.js.map} +0 -0
  342. /package/dist/q2-tecton-elements/{p-2d6a9a94.entry.js.map → p-46085a34.entry.js.map} +0 -0
  343. /package/dist/q2-tecton-elements/{p-1b89b9c3.entry.js.map → p-4740e969.entry.js.map} +0 -0
  344. /package/dist/q2-tecton-elements/{p-258f8c9c.entry.js.map → p-502af427.entry.js.map} +0 -0
  345. /package/dist/q2-tecton-elements/{p-dfa489ba.entry.js.map → p-5214296a.entry.js.map} +0 -0
  346. /package/dist/q2-tecton-elements/{p-32130845.entry.js.map → p-572805fc.entry.js.map} +0 -0
  347. /package/dist/q2-tecton-elements/{p-6e313705.entry.js.map → p-644d5b2e.entry.js.map} +0 -0
  348. /package/dist/q2-tecton-elements/{p-30d70f4a.entry.js.map → p-68276771.entry.js.map} +0 -0
  349. /package/dist/q2-tecton-elements/{p-43236cac.entry.js.map → p-6af21a10.entry.js.map} +0 -0
  350. /package/dist/q2-tecton-elements/{p-f57c4448.entry.js.map → p-6be0e333.entry.js.map} +0 -0
  351. /package/dist/q2-tecton-elements/{p-9a5695db.entry.js.map → p-7deda459.entry.js.map} +0 -0
  352. /package/dist/q2-tecton-elements/{p-3f665c56.entry.js.map → p-84fc61f5.entry.js.map} +0 -0
  353. /package/dist/q2-tecton-elements/{p-d75e4752.entry.js.map → p-85a7b1ab.entry.js.map} +0 -0
  354. /package/dist/q2-tecton-elements/{p-4f7e6e79.entry.js.map → p-8734e1cb.entry.js.map} +0 -0
  355. /package/dist/q2-tecton-elements/{p-7cbb989e.entry.js.map → p-a2caa101.entry.js.map} +0 -0
  356. /package/dist/q2-tecton-elements/{p-49ecdf18.entry.js.map → p-ca17f7ca.entry.js.map} +0 -0
  357. /package/dist/q2-tecton-elements/{p-30296b0e.entry.js.map → p-cfabf5d1.entry.js.map} +0 -0
  358. /package/dist/q2-tecton-elements/{p-0d6edd2a.entry.js.map → p-d5776227.entry.js.map} +0 -0
  359. /package/dist/q2-tecton-elements/{p-56dd051a.entry.js.map → p-d5c182d8.entry.js.map} +0 -0
  360. /package/dist/q2-tecton-elements/{p-bc73f69c.entry.js.map → p-d6c8d94d.entry.js.map} +0 -0
  361. /package/dist/q2-tecton-elements/{p-861e83de.entry.js.map → p-de2f3111.entry.js.map} +0 -0
  362. /package/dist/q2-tecton-elements/{p-aed969d4.entry.js.map → p-e654d2d6.entry.js.map} +0 -0
  363. /package/dist/q2-tecton-elements/{p-b6bcef6a.js.map → p-f1e887f5.js.map} +0 -0
  364. /package/dist/q2-tecton-elements/{p-4b47816d.entry.js.map → p-fe2fd83b.entry.js.map} +0 -0
  365. /package/dist/q2-tecton-elements/{p-366a92d9.entry.js.map → p-ff39ba49.entry.js.map} +0 -0
  366. /package/dist/types/{workspace/workspace/on-production_release_1.48.0-pre → builds/q2e/development/tecton/tecton}/packages/q2-tecton-elements/.stencil/test/elements/q2-detail/slot-component.d.ts +0 -0
  367. /package/dist/types/{workspace/workspace/on-production_release_1.48.0-pre → builds/q2e/development/tecton/tecton}/packages/q2-tecton-elements/.stencil/test/helpers.d.ts +0 -0
@@ -105,7 +105,7 @@ const Q2Item$1 = /*@__PURE__*/ proxyCustomElement(class Q2Item extends HTMLEleme
105
105
  // #region Render methods
106
106
  render() {
107
107
  const { clickable } = this;
108
- return (h("div", { key: '15663fca18a49a00d09c42acad45642691b23480', "test-id": "itemContainer", class: this.itemClasses, ref: el => (this.itemElement = el), role: clickable ? 'button' : undefined, tabIndex: clickable ? 0 : undefined }, this.hasBulletSlotContent && (h("div", { key: 'efe2ef2a8746e4cc4c06501d9ed4bdc7686746d1', class: this.bulletClasses }, h("slot", { key: '94c0d433073704018831a3d38735117830a26221', name: "bullet" }))), h("div", { key: 'c4860f9929d6e0a8ed8034bdd748c10689df68da', class: this.mainClasses }, this.hasHeaderSlotContent && (h("div", { key: 'b9119afb497965ea8b3f709404a4183045656081', class: "header" }, h("slot", { key: '0d85755369ff21ef1ae6def940cca219e254f424', name: "header" }))), this.hasBodySlotContent && (h("div", { key: '8514bc7a25b25b8d8d7c62f780c8bf876a241dcd', class: "body" }, h("slot", { key: 'ae2be69dc36f50e9fe765dec9748436f75a27206', name: "body" })))), this.hasActionSlotContent && (h("div", { key: '796b1f0aa2956c6794a3f8e4c628a3a403864177', class: this.actionClasses }, h("slot", { key: '637373b0e55b5819f3dbf1e21fe7847660ed2184', name: "action" }))), this.hasFooterSlotContent && (h("div", { key: 'e6ed0072a2906675ea3ce83edb7b3185a93b3e04', class: this.footerClasses }, h("slot", { key: 'db5d606d84d61c217ef5d97d756fe38f0044200a', name: "footer" })))));
108
+ return (h("div", { key: 'f69b991449d96d104dc6c43b11e10df54a1527e7', "test-id": "itemContainer", class: this.itemClasses, ref: el => (this.itemElement = el), role: clickable ? 'button' : undefined, tabIndex: clickable ? 0 : undefined }, this.hasBulletSlotContent && (h("div", { key: 'baddf236e22f36ce876f58e782f22e01e60c13db', class: this.bulletClasses }, h("slot", { key: '279c943ce1fd95f7257680e79ea6d043540fba1a', name: "bullet" }))), h("div", { key: '8d6e754680517434dda6b268865a0c8c5f3294ec', class: this.mainClasses }, this.hasHeaderSlotContent && (h("div", { key: '6e3cfb19fb9fecae91525e065e3b99cfcd90b969', class: "header" }, h("slot", { key: '367c35a42e95350f5c606f3dab3738dbc7aa2287', name: "header" }))), this.hasBodySlotContent && (h("div", { key: '6f155f0d3e4b06748dd4e130999be571df96d8f9', class: "body" }, h("slot", { key: 'c8158b2d6b8c5877756404dafe8421b3754f992a', name: "body" })))), this.hasActionSlotContent && (h("div", { key: '3d9f72340d671442e25f2cd9c7cbe8ad9695b386', class: this.actionClasses }, h("slot", { key: 'c0e49f50574786b679531f7228a8126289da0cc5', name: "action" }))), this.hasFooterSlotContent && (h("div", { key: 'c2bae2908f4c70d9fc11805176a27c23e2c3f3b9', class: this.footerClasses }, h("slot", { key: '3fdcf609c8729acc45549fca09ad090ad4f009a7', name: "footer" })))));
109
109
  }
110
110
  get hostElement() { return this; }
111
111
  static get style() { return Q2ItemStyle0; }
@@ -103,7 +103,7 @@ const Q2Legend = /*@__PURE__*/ proxyCustomElement(class Q2Legend extends HTMLEle
103
103
  // #endregion
104
104
  // #region Render methods
105
105
  render() {
106
- return (h("click-elsewhere", { key: '69ffafe23460f7a65f034d5369cb9d77bb379868', onChange: () => this.onClickElsewhere(this) }, h("ul", { key: 'd9fd700ec042ca39e9d3316145fb1137e4051a31' }, this.dataWithClasses.map(item => (h("li", { class: "item" }, h("button", { "test-id": "item", "aria-label": `${item.name} ${this.formatValue(item.value)}`, class: item.classes, onClick: event => this.onClick(event, item), onMouseEnter: event => this.onMouseEnter(event, item), onMouseLeave: event => this.onMouseLeave(event, item) }, h("span", { "test-id": "itemColor", class: "item-color-indicator", style: { backgroundColor: item.color }, "aria-hidden": "true" }), h("span", { "test-id": "itemName", class: "item-name" }, item.name), h("span", { id: `item-${item.id}`, "test-id": "itemValue", class: "item-value" }, this.formatValue(item.value)))))))));
106
+ return (h("click-elsewhere", { key: 'd55155e36588eddb86941a8a85c68fd04c880ac1', onChange: () => this.onClickElsewhere(this) }, h("ul", { key: '25c948213b4d6645741ef22e013149ee63a19e21' }, this.dataWithClasses.map(item => (h("li", { class: "item" }, h("button", { "test-id": "item", "aria-label": `${item.name} ${this.formatValue(item.value)}`, class: item.classes, onClick: event => this.onClick(event, item), onMouseEnter: event => this.onMouseEnter(event, item), onMouseLeave: event => this.onMouseLeave(event, item) }, h("span", { "test-id": "itemColor", class: "item-color-indicator", style: { backgroundColor: item.color }, "aria-hidden": "true" }), h("span", { "test-id": "itemName", class: "item-name" }, item.name), h("span", { id: `item-${item.id}`, "test-id": "itemValue", class: "item-value" }, this.formatValue(item.value)))))))));
107
107
  }
108
108
  static get watchers() { return {
109
109
  "hoveredItemId": ["watchHoveredItemId"],
@@ -71,7 +71,7 @@ const Q2List$1 = /*@__PURE__*/ proxyCustomElement(class Q2List extends HTMLEleme
71
71
  // #endregion
72
72
  // #region Render methods
73
73
  render() {
74
- return (h("div", { key: '03d62cc3436abd29994c02efef17db29f3043371', class: this.listClasses, ref: el => (this.listElement = el) }, (this.hasFilterSlot || this.hasLabelContent) && (h("div", { key: '62aa472c52425d9bd8474c9927ff1f018a94f588', class: this.headerClasses }, h("div", { key: 'a288af4640d75ae48443d390bd5a5b591f61732a', class: "label" }, this.label), this.hasFilterSlot && h("slot", { key: '44a788d43c1390890b6c1e1bce642fc9d252e517', name: "filter" }))), h("div", { key: '6dff69032b9f6b6d5cc9ed2e032a757a9690dc9d', role: "list" }, h("slot", { key: 'd1ae622b365cf5f071ea6b2ed1df6c700a977a64' }))));
74
+ return (h("div", { key: '4c5bdc8bf48c1f1dcbdada246bd021cfb4d52696', class: this.listClasses, ref: el => (this.listElement = el) }, (this.hasFilterSlot || this.hasLabelContent) && (h("div", { key: '691bf182d8abf74b9469d96969ae4a975df68f87', class: this.headerClasses }, h("div", { key: '1a3a06cdfe9445b4bf7b4f77c41b47ccc61b64a4', class: "label" }, this.label), this.hasFilterSlot && h("slot", { key: '9b7c05d747434e4cf24d123158edcb54517a2040', name: "filter" }))), h("div", { key: 'c7ba0cc52b865093eca667ed9003d52ebfa12f64', role: "list" }, h("slot", { key: '1b64bc65aca20e41fd50543df9b1217716a3becd' }))));
75
75
  }
76
76
  get hostElement() { return this; }
77
77
  static get style() { return Q2ListStyle0; }
@@ -13,7 +13,7 @@ const Q2Loc$1 = /*@__PURE__*/ proxyCustomElement(class Q2Loc extends HTMLElement
13
13
  this.value = undefined;
14
14
  }
15
15
  render() {
16
- return h("span", { key: 'e7e33263161d55ee672b136957687f7c4efba94e' }, loc(this.value, this.substitutions));
16
+ return h("span", { key: 'a983e0108524632f36c67d59ca55046889e959a1' }, loc(this.value, this.substitutions));
17
17
  }
18
18
  static get style() { return Q2LocStyle0; }
19
19
  }, [1, "q2-loc", {
@@ -44,7 +44,7 @@ const Q2Message = /*@__PURE__*/ proxyCustomElement(class Q2Message extends HTMLE
44
44
  const addDivForAriaLive = !isFirefox && this.presentToggle;
45
45
  const { description } = this;
46
46
  const messageLabel = loc(`tecton.element.message.type.${this.type ? this.type : 'info'}`);
47
- return (h("div", { key: 'e733984931d1a0b29f9a4fa9b8ad959b4814e6e1', tabindex: "-1", class: "message", role: description ? undefined : 'alert', "aria-live": description ? undefined : 'assertive', "aria-atomic": description ? undefined : 'true', "aria-relevant": description && addAriaHiddenForAriaLive ? undefined : 'all', "test-id": "messageContainer" }, this.appearance === 'standard' ? this.messageIcon(this.type) : '', addDivForAriaLive && h("div", { key: 'dd2c61b98c765148c351890975196facac5b5812', class: "sr" }), h("div", { key: 'cacf7152fc0e80ec76d24bec492d2826015f058b', class: "sr message-label" }, messageLabel), h("div", { key: '346f2b6a286682bc6da14794796de9beb4a3bcfa', class: "message-content", "aria-hidden": addAriaHiddenForAriaLive ? 'true' : undefined }, h("slot", { key: 'b51e48efb416326b0bb539a1e051be1897bcc580' }))));
47
+ return (h("div", { key: '7803d7b21356ca0c70883387b8add4a6babd192c', tabindex: "-1", class: "message", role: description ? undefined : 'alert', "aria-live": description ? undefined : 'assertive', "aria-atomic": description ? undefined : 'true', "aria-relevant": description && addAriaHiddenForAriaLive ? undefined : 'all', "test-id": "messageContainer" }, this.appearance === 'standard' ? this.messageIcon(this.type) : '', addDivForAriaLive && h("div", { key: '18bc8892294dc16d5668a2c10b80e2b3c21bf94c', class: "sr" }), h("div", { key: '00c9adcd0ce6a0021baf03041443a12d3673908a', class: "sr message-label" }, messageLabel), h("div", { key: '6d697ed20f5ceef552d819f2b22212ee750f06a6', class: "message-content", "aria-hidden": addAriaHiddenForAriaLive ? 'true' : undefined }, h("slot", { key: '789fd82fdd39c79b1ca48f3e353c7ebd3abe82b7' }))));
48
48
  }
49
49
  messageIcon(type) {
50
50
  const iconMap = {
@@ -139,10 +139,10 @@ const Q2MonthPicker$1 = /*@__PURE__*/ proxyCustomElement(class Q2MonthPicker ext
139
139
  overrideFocus(this.hostElement);
140
140
  }
141
141
  render() {
142
- return (h("div", { key: '9a58edaff34f92a675f9df129f843c21cb0d271d', class: "month-container", onKeyDown: this.onMonthKeydown }, h("div", { key: '0903f95ddacd18a43ca7219bc4cf610dd6386304', class: "navigation" }, h("q2-btn", { key: '54df6360507c598ab40592eb63e2412e8f571fb3', class: "year-btn", onClick: () => this.viewChange.emit({
142
+ return (h("div", { key: '39600ab8497f7c9763dbed6308cd2377168bdb63', class: "month-container", onKeyDown: this.onMonthKeydown }, h("div", { key: 'd250c850de8a4e501a7136e32b72d55c81c95b39', class: "navigation" }, h("q2-btn", { key: '36caef4e3cde69d0666cedc50014604d17d8b450', class: "year-btn", onClick: () => this.viewChange.emit({
143
143
  view: 'year',
144
144
  selectedYear: this.year,
145
- }) }, h("span", { key: 'bbb1a38a4e5a7a22a449700d2b9cb1ceadf52c29', class: "year" }, this.year), h("q2-icon", { key: 'eeccf64f25a569491e1a02f248e160e9ff8e769b', class: "year-icon off", type: "chevron-down" })), h("div", { key: 'de47dff959e5f3459c716e2f5d54aa911007e97e', class: "month-controller" }, h("div", { key: '5f8fcd7cce3a14e3f4edb0b060ba72d429a44cea', class: "cal-year-prev-next" }, h("q2-btn", { key: '18482f30f6905d858f59f00a073622b3fe40d45c', label: loc('tecton.element.calendar.previousYear'), "hide-label": true, class: "cal-nav-btn prev-year", "test-id": "previousYearButton", onClick: () => this.selectYear(this.year - 1) }, h("q2-icon", { key: '5daeea35c3a1af290bc65468f3f423b4765eb624', type: "arrow-left" })), h("q2-btn", { key: 'a2ea40ba55c61c7a80e50fc205e12940f40dd3e8', label: loc('tecton.element.calendar.nextYear'), "hide-label": true, class: "cal-nav-btn next-year", "test-id": "nextYearButton", onClick: () => this.selectYear(this.year + 1) }, h("q2-icon", { key: '05df41c89607c8efa7d645108c0ac6101a35f114', type: "arrow-right" }))))), h("div", { key: 'd46cba38180a70b7f1468fa34bafd6c04c5dd487', class: "month-list", onClick: this.onMonthSelection }, this.months.map((month, index) => (h("div", { class: "month" }, h("span", { role: "button", class: "month-button", "data-index": index, "aria-label": month.label, tabindex: index === this.focusedIndex ? 0 : -1 }, month.abbr))))), this.today && (h("div", { key: '24a1512f07d15a78ca900e6e5625fed2eda76ab7', class: "today-label" }, loc('tecton.element.calendar.today'), ": ", this.today))));
145
+ }) }, h("span", { key: '2ba93fdffa23e3d6749206562cba9ac95e1b0654', class: "year" }, this.year), h("q2-icon", { key: 'b510bccf4b540e745dc00f05715c2cdd51e7b784', class: "year-icon off", type: "chevron-down" })), h("div", { key: '34f887c634adbd14b864efa5e6aede7548092690', class: "month-controller" }, h("div", { key: '9cda711f14d714201bf1c41f3568cda25fb213f4', class: "cal-year-prev-next" }, h("q2-btn", { key: '2c5a3b53cc659ea1829f65811d253f66ca98d7f7', label: loc('tecton.element.calendar.previousYear'), "hide-label": true, class: "cal-nav-btn prev-year", "test-id": "previousYearButton", onClick: () => this.selectYear(this.year - 1) }, h("q2-icon", { key: '59105784727939d1683292686c7e4ad240e584bd', type: "arrow-left" })), h("q2-btn", { key: '8177788039df074a5dd64b158b78dd99dfca283b', label: loc('tecton.element.calendar.nextYear'), "hide-label": true, class: "cal-nav-btn next-year", "test-id": "nextYearButton", onClick: () => this.selectYear(this.year + 1) }, h("q2-icon", { key: '744017aa8f2b90d5b1e4ad41583fd61e290dfe78', type: "arrow-right" }))))), h("div", { key: 'd2d1223744da022129a5895def3608ff2680dd9d', class: "month-list", onClick: this.onMonthSelection }, this.months.map((month, index) => (h("div", { class: "month" }, h("span", { role: "button", class: "month-button", "data-index": index, "aria-label": month.label, tabindex: index === this.focusedIndex ? 0 : -1 }, month.abbr))))), this.today && (h("div", { key: '43e728ceda906af8a418f7c47a5e6214dacbdcf1', class: "today-label" }, loc('tecton.element.calendar.today'), ": ", this.today))));
146
146
  }
147
147
  get hostElement() { return this; }
148
148
  static get style() { return Q2MonthPickerStyle0; }
@@ -43,7 +43,7 @@ const Q2Optgroup = /*@__PURE__*/ proxyCustomElement(class Q2Optgroup extends HTM
43
43
  });
44
44
  }
45
45
  render() {
46
- return (h("div", { key: 'b8965c37e06ab4982edb4caa426806cf8485ce53', class: "q2-optgroup-container", hidden: this.hidden, "aria-labelledby": this.headerId, role: "group" }, h("div", { key: '85968a9f908e48d9529f4a1008b699e62aa0efb6', class: "q2-optgroup-header", id: this.headerId }, (this.label && loc(this.label)) || ''), h("div", { key: 'e38bc428fd9391c5be43688e8d352ae1639b6b5e', class: "q2-optgroup-options" }, h("slot", { key: '34ade8fcca59370ae20efc44678cadd417ceb3c7' }))));
46
+ return (h("div", { key: '7296e98c4ba1bf5b7d43a7a41bd71674b6a29786', class: "q2-optgroup-container", hidden: this.hidden, "aria-labelledby": this.headerId, role: "group" }, h("div", { key: '9f6acc6efc59b09550b809b2a47b2e8680ba8857', class: "q2-optgroup-header", id: this.headerId }, (this.label && loc(this.label)) || ''), h("div", { key: 'b2b13e828cf5974f021047dc08006d389518c7bc', class: "q2-optgroup-options" }, h("slot", { key: 'e0eb0eb5889abb67a65c514a4fd8054625fa3901' }))));
47
47
  }
48
48
  get hostElement() { return this; }
49
49
  static get watchers() { return {
@@ -537,7 +537,7 @@ const Q2OptionList = /*@__PURE__*/ proxyCustomElement(class Q2OptionList extends
537
537
  }
538
538
  /// DOM ///
539
539
  render() {
540
- return (h(Host, { key: '2a470de268f16262aa675475fd2425bd50b4edad' }, h("div", { key: '549deb2fbe009ea6cef0444a4867710b4ad1abf6', class: "content", ref: el => (this.contentElement = el), onFocusout: this.focusoutHandler }, h("div", { key: '0f5857df5db8f073ef28e2a6760d6d798ab3d1fd', class: "options", "aria-label": loc('tecton.element.optionList.label', [this.label]), "aria-multiselectable": `${!!this.multiple}`, role: this.type || 'listbox', onKeyDown: this.internalKeydownHandler, onClick: this.clickHandler }, h("slot", { key: 'cbee273a92302a2b8c9302d65444534a6c04b42f' })))));
540
+ return (h(Host, { key: '38a759a0589e0f90af160e0c5cd2bd21e29a44f1' }, h("div", { key: '0090c64f7fc14feb4dfece413f571da46417b40d', class: "content", ref: el => (this.contentElement = el), onFocusout: this.focusoutHandler }, h("div", { key: '90a3fdd55f2a0823ee5b0654a25bb1c80278091e', class: "options", "aria-label": loc('tecton.element.optionList.label', [this.label]), "aria-multiselectable": `${!!this.multiple}`, role: this.type || 'listbox', onKeyDown: this.internalKeydownHandler, onClick: this.clickHandler }, h("slot", { key: 'de7bc5452f74aeed9c0c45f1228defbeef6a7bba' })))));
541
541
  }
542
542
  get hostElement() { return this; }
543
543
  static get watchers() { return {
@@ -59,7 +59,7 @@ const Q2Option = /*@__PURE__*/ proxyCustomElement(class Q2Option extends HTMLEle
59
59
  render() {
60
60
  const { disabled, disabledGroup, selected, _multiSelectHidden } = this;
61
61
  const isDisabled = disabled || disabledGroup;
62
- return (h(Host, { key: 'd599e64ff4a1bac697748b0e7a16e8e7affbf183', tabindex: "-1", "aria-disabled": isDisabled ? 'true' : undefined, "aria-selected": `${!!selected}`, "aria-hidden": _multiSelectHidden ? 'true' : undefined, display: this.display }, this.selected && h("q2-icon", { key: 'fef1b2ef83c5688cbefdaf45d4333019504b8fc8', type: "checkmark" }), h("div", { key: '099582624892111f8b2e76075380b734ea30e799', class: "content" }, h("slot", { key: '69ef106032c733081d9d382e1277072431d86826' }))));
62
+ return (h(Host, { key: 'f151dcc4f6c384ed57f161201e4f47130c9352bf', tabindex: "-1", "aria-disabled": isDisabled ? 'true' : undefined, "aria-selected": `${!!selected}`, "aria-hidden": _multiSelectHidden ? 'true' : undefined, display: this.display }, this.selected && h("q2-icon", { key: '999146b64cc2827794339665aa3d4a91468bb07f', type: "checkmark" }), h("div", { key: '8fe4f1e3d064ce8b2b0c834ba3b2a5896a8f3d66', class: "content" }, h("slot", { key: '4c95a66a6b32b5b388a69fd235febcefda232772' }))));
63
63
  }
64
64
  get hostElement() { return this; }
65
65
  static get style() { return Q2OptionStyle0; }
@@ -187,7 +187,7 @@ const Q2Pagination$1 = /*@__PURE__*/ proxyCustomElement(class Q2Pagination exten
187
187
  total,
188
188
  });
189
189
  }
190
- return (h("nav", { key: 'eb5ae2f034170459a8a9e55ed8319eec524e00d9', class: "container", ref: el => (this.containerElement = el), "aria-label": loc('tecton.element.pagination.title') }, h("div", { key: '8a2fd2b864d1781d52002e14551f7535ab69c382', class: "description", "test-id": "description" }, pagesOnly
190
+ return (h("nav", { key: '492ad7b6180eec733d0a21266b4f21b5f032e1a7', class: "container", ref: el => (this.containerElement = el), "aria-label": loc('tecton.element.pagination.title') }, h("div", { key: '30c1287dccf3a2da6a32f17529075e4ce07ec3ed', class: "description", "test-id": "description" }, pagesOnly
191
191
  ? loc('tecton.element.pagination.pages', {
192
192
  current: page,
193
193
  total: totalPages,
@@ -196,7 +196,7 @@ const Q2Pagination$1 = /*@__PURE__*/ proxyCustomElement(class Q2Pagination exten
196
196
  range: currentRange,
197
197
  recordType: recordType.toLowerCase(),
198
198
  total: total.toLocaleString(),
199
- })), h("div", { key: '05266028eca03d46f3a1819bd6a8a070abfb3041', class: "btn-group" }, h("q2-btn", { key: '1ac49814e049309efe1a7b78e2dd244faa1199f0', label: loc('tecton.element.pagination.goToFirstPage'), disabled: onFirstPage, hidden: isFullViewHidden, onClick: () => this.handlePageChange(1), "test-id": "firstPageBtn", "hide-label": true }, h("q2-icon", { key: '938f0fb35c70c9795da1b27d07e3af4c6d9c7139', type: "chevron-double-left" })), h("q2-btn", { key: '52fbe1e8b33eed594b085a9cddfd3bf307ae6357', label: prevButtonLabel, disabled: onFirstPage, onClick: () => this.handlePageChange(page - 1), "test-id": "prevPageBtn", "hide-label": true }, h("q2-icon", { key: '8f032b0f98c409c54d39fda98dd79ae57cf1b9e8', type: "chevron-left" }))), h("div", { key: '330475f9f4e0d1a299146e5036183b79a7166f9e', class: "controls", hidden: isFullViewHidden, "test-id": "controls" }, h("span", { key: '1990bfc109c5d8d1600428a4c599cb8740188475', "aria-hidden": "true" }, loc('tecton.element.pagination.page')), h("div", { key: '3d9283ef551b4ece77e8087419a6f781ad18ff42', class: "input-wrapper", onClick: () => this.inputField.dispatchEvent(new FocusEvent('focus')) }, h("q2-input", { key: 'de9b80971137a1a00be8725fb2fbc82b066c627b', type: "number", value: `${page}`, min: 1, max: this.totalPages, hideLabel: true, optional: true, label: `${loc('tecton.element.pagination.page')} (${loc('tecton.element.pagination.ofPages', [totalPages.toLocaleString()])})`, onChange: event => this.handlePageChange(event.detail.value), "test-id": "pageInput", current: "page", ref: el => (this.inputField = el) })), h("span", { key: 'cad1410f606909ed08cd777749cd96350a0bd399', "aria-hidden": "true" }, loc('tecton.element.pagination.ofPages', [totalPages.toLocaleString()]))), h("div", { key: 'ce9f8dbbabc33ae3378010436c18c732a19fad79', class: "btn-group" }, h("q2-btn", { key: '0bc9878a7c58fead916e1a42b21aa9bb83454c30', label: nextButtonLabel, disabled: onLastPage, onClick: () => this.handlePageChange(page + 1), "test-id": "nextPageBtn", "hide-label": true }, h("q2-icon", { key: '27aec5617e575319127d4623769674fffab16290', type: "chevron-right" })), h("q2-btn", { key: '323affc87fea734ddf09aaafabd5ce6d34604b16', label: "tecton.element.pagination.goToLastPage", disabled: onLastPage, hidden: isFullViewHidden, onClick: () => this.handlePageChange(totalPages), "test-id": "lastPageBtn", "hide-label": true }, h("q2-icon", { key: 'cf951c67f49f8bed81e6c034fc6dabb33f3245ff', type: "chevron-double-right" }))), h("div", { key: 'e6d9edb327eb879d236dae0233320c0d2baac501', class: "per-page", hidden: isFullViewHidden || !((_a = this.perPageIncrements) === null || _a === void 0 ? void 0 : _a.length) }, this.renderPerPage())));
199
+ })), h("div", { key: '1e255884140a5fbb7ba51cb8046727ab8cb602a5', class: "btn-group" }, h("q2-btn", { key: '48fc8c61b04e0005b98cbffbc3320e4dd4f0855e', label: loc('tecton.element.pagination.goToFirstPage'), disabled: onFirstPage, hidden: isFullViewHidden, onClick: () => this.handlePageChange(1), "test-id": "firstPageBtn", "hide-label": true }, h("q2-icon", { key: '9c454decc6feadc6bbd3f21044c7bebd46d5a55a', type: "chevron-double-left" })), h("q2-btn", { key: '9214aee00653c2417a284292c5df431bcf9cdceb', label: prevButtonLabel, disabled: onFirstPage, onClick: () => this.handlePageChange(page - 1), "test-id": "prevPageBtn", "hide-label": true }, h("q2-icon", { key: '9761ca7c383a5ece9582fb07b30f0fb70eceba17', type: "chevron-left" }))), h("div", { key: 'd0749351d1ac3d1193a05a0f4b6f55860f98a220', class: "controls", hidden: isFullViewHidden, "test-id": "controls" }, h("span", { key: '2a160fdc5453904fcfb330b95ae548ab2df2a06a', "aria-hidden": "true" }, loc('tecton.element.pagination.page')), h("div", { key: '250476d5c0e4e4bb90065764c4e27bb49bf79076', class: "input-wrapper", onClick: () => this.inputField.dispatchEvent(new FocusEvent('focus')) }, h("q2-input", { key: '079e89b7938ae91ebf690d42a9ea0a6191decadc', type: "number", value: `${page}`, min: 1, max: this.totalPages, hideLabel: true, optional: true, label: `${loc('tecton.element.pagination.page')} (${loc('tecton.element.pagination.ofPages', [totalPages.toLocaleString()])})`, onChange: event => this.handlePageChange(event.detail.value), "test-id": "pageInput", current: "page", ref: el => (this.inputField = el) })), h("span", { key: 'f943840d83883da0908eed6cad0b0bbeeccee0a2', "aria-hidden": "true" }, loc('tecton.element.pagination.ofPages', [totalPages.toLocaleString()]))), h("div", { key: '8aa10edcf80ce32fb0252c133f28304cfbb0ccc9', class: "btn-group" }, h("q2-btn", { key: '2b97474ae891322efd074dae86881b09dac6eb62', label: nextButtonLabel, disabled: onLastPage, onClick: () => this.handlePageChange(page + 1), "test-id": "nextPageBtn", "hide-label": true }, h("q2-icon", { key: '47b3882a0c232fbe6737e8633adf8f4a0ad27b8d', type: "chevron-right" })), h("q2-btn", { key: '40604303f9479091821ee3390681d22c3d4507d0', label: "tecton.element.pagination.goToLastPage", disabled: onLastPage, hidden: isFullViewHidden, onClick: () => this.handlePageChange(totalPages), "test-id": "lastPageBtn", "hide-label": true }, h("q2-icon", { key: 'ecf929fe7b18bcd19c7e9045c82245d8c4764251', type: "chevron-double-right" }))), h("div", { key: '30c078a5b0224753dd5daaf0f83ca7efbe5fbaec', class: "per-page", hidden: isFullViewHidden || !((_a = this.perPageIncrements) === null || _a === void 0 ? void 0 : _a.length) }, this.renderPerPage())));
200
200
  }
201
201
  get hostElement() { return this; }
202
202
  static get watchers() { return {
@@ -266,7 +266,7 @@ const Q2Pill$1 = /*@__PURE__*/ proxyCustomElement(class Q2Pill extends HTMLEleme
266
266
  wrapperClassNames.push('has-icon');
267
267
  if (optionCount)
268
268
  wrapperClassNames.push('has-options');
269
- return (h("click-elsewhere", { key: 'f5bdb5a03edf9a51c98e96501252bdcfd6d381c8', onChange: this.onClickElsewhere }, h("div", { key: '8ba85c9fe953b029a6c163ab848b32b64e22e723', class: wrapperClassNames.join(' ') }, h("div", { key: 'cfb9465fc470956de4bcde213db63a2e96438006', class: "btn-height-wrapper", ref: el => (this.primaryBtnWrapper = el), onClick: this.handleWrapperClick, tabIndex: -1 }, h("button", { key: 'dbf923d8bdf4b84116f61ebbbd0519c4fe6df222', class: "btn-primary", "test-id": "btn-control", type: "button", role: (optionCount && 'combobox') || undefined, ref: el => (this.primaryBtn = el), onClick: this.handleClick, onKeyDown: this.handleKeydown, onFocusout: this.handleButtonFocusout, disabled: this.disabled, "aria-roledescription": !optionCount && 'filter', "aria-controls": (optionCount && 'option-list') || undefined, "aria-expanded": (optionCount && `${!!open}`) || undefined, "aria-label": this.buttonContent, "aria-describedby": (optionCount && 'option-description') || undefined }, this.truncatedButtonContent, !optionCount && active && h("span", { key: '973751830801c9da9bf316a0fc90b85d4c9dba0a', class: "sr" }, "(", loc('tecton.element.pill.active'), ")"))), this.generateIcon(), this.generateHiddenElement()), this.optionCount > 0 && (h("q2-popover", { key: 'a1286fe6dad6546d8f8573616a3c515ae2098d15', ref: el => (this.popoverElement = el), controlElement: this.primaryBtn, open: this.open, minHeight: this.popoverMinHeight, direction: this.popoverDirection, align: this.popoverAlignment }, h("q2-option-list", { key: '9e12ba61e5171c4f7269196f19d9a693fbd25523', type: "listbox", ref: el => (this.optionList = el), id: "option-list", onChange: this.handleChange, multiple: this.multiple, selectedOptions: this.selectedOptions, onReady: () => this.updateSelectedOptionElements(), label: loc('tecton.element.optionList.label', [this.optionListLabel]) }, h("slot", { key: 'c715c3f42233416bb59554630e3f5ef831a94f62' }))))));
269
+ return (h("click-elsewhere", { key: 'ca6bd41d2351dc05ba4e0ed87b69e335a11a4fe3', onChange: this.onClickElsewhere }, h("div", { key: 'cd9186c0d5f5b32f19f9221a7ba7f495c4a5a3fd', class: wrapperClassNames.join(' ') }, h("div", { key: '14d3658c8abe24567f42ffb82082ef1073326aa2', class: "btn-height-wrapper", ref: el => (this.primaryBtnWrapper = el), onClick: this.handleWrapperClick, tabIndex: -1 }, h("button", { key: '2e64deb6bc1caaa4f3b831060103532886f2d8a6', class: "btn-primary", "test-id": "btn-control", type: "button", role: (optionCount && 'combobox') || undefined, ref: el => (this.primaryBtn = el), onClick: this.handleClick, onKeyDown: this.handleKeydown, onFocusout: this.handleButtonFocusout, disabled: this.disabled, "aria-roledescription": !optionCount && 'filter', "aria-controls": (optionCount && 'option-list') || undefined, "aria-expanded": (optionCount && `${!!open}`) || undefined, "aria-label": this.buttonContent, "aria-describedby": (optionCount && 'option-description') || undefined }, this.truncatedButtonContent, !optionCount && active && h("span", { key: '42b583abcc318ab1027f7fb5a5cbd437291f8cb4', class: "sr" }, "(", loc('tecton.element.pill.active'), ")"))), this.generateIcon(), this.generateHiddenElement()), this.optionCount > 0 && (h("q2-popover", { key: '0c197bbe3f080cc5c8ef78df88d635848e7910e0', ref: el => (this.popoverElement = el), controlElement: this.primaryBtn, open: this.open, minHeight: this.popoverMinHeight, direction: this.popoverDirection, align: this.popoverAlignment }, h("q2-option-list", { key: 'd1d84d56b201242986c8de169fce79e64dd978ab', type: "listbox", ref: el => (this.optionList = el), id: "option-list", onChange: this.handleChange, multiple: this.multiple, selectedOptions: this.selectedOptions, onReady: () => this.updateSelectedOptionElements(), label: loc('tecton.element.optionList.label', [this.optionListLabel]) }, h("slot", { key: '4ed0fe54a2b3b2bc969bf2f2466633148ad20ad0' }))))));
270
270
  }
271
271
  get hostElement() { return this; }
272
272
  static get watchers() { return {
@@ -1,7 +1,7 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
2
2
  import { g as handleDeprecationWarning, w as waitForNextPaint } from './index2.js';
3
3
 
4
- const q2PopoverCss = "*{box-sizing:border-box}*:active{outline:none}*:focus{outline:none;box-shadow:var(--const-double-focus-ring, 0 0 0 2px #ffffff, 0 0 0 4px #0066cc)}:host{box-shadow:none !important}::-moz-focus-inner{border:none}input,textarea,button{font-family:inherit;font-size:inherit;font-stretch:inherit}:host(.sr),:host(.sr) button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.sr,.sr button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.hidden{display:none}:host([hidden]){display:none}.invisible{visibility:hidden}.container{display:none}.show{display:block;position:fixed;z-index:var(--tct-popover-z-index, 50);margin:0;padding:0;overflow:auto;background:var(--tct-popover-background, var(--app-white, #ffffff));color:var(--tct-popover-font-color, var(--t-text, #4d4d4d));min-width:var(--tct-popover-min-width, 135px);margin-block:var(--tct-popover-margin-block, 0);box-shadow:var(--tct-popover-box-shadow, var(--app-shadow-1, 0 2px 4px rgba(0, 0, 0, 0.3)));border-width:var(--tct-popover-border-width, 0);border-style:solid;border-color:var(--tct-popover-border-color, transparent);border-radius:var(--tct-popover-border-radius, 0);max-height:var(--comp-pop-max-height);left:var(--comp-pop-left);opacity:var(--comp-pop-opacity, 0);--comp-scrollbar-size:var(--tct-scrollbar-size, var(--t-scrollbar-size, var(--app-scale-1x, 5px)));--comp-scrollbar-border-radius:var(--tct-scrollbar-border-radius, var(--t-scrollbar-border-radius, var(--app-border-radius-1, 3px)));--comp-scrollbar-color:var(--tct-scrollbar-color, var(--t-scrollbar-color, var(--t-a11y-gray-color, #747474)));scrollbar-width:thin;scrollbar-color:var(--comp-scrollbar-color) transparent}:host([block]) .show{right:unset;width:var(--comp-pop-width);min-width:var(--tct-popover-min-width, unset)}:host([align=left]) .show{left:var(--comp-pop-left);right:unset}:host([align=right]) .show{right:var(--comp-pop-right);left:unset}.show.down{top:var(--tct-popover-top, var(--comp-pop-top));bottom:unset}.show.up{top:unset;bottom:var(--comp-pop-bottom)}.show.legacy{position:absolute}.show::-webkit-scrollbar{width:var(--comp-scrollbar-size);height:var(--comp-scrollbar-size);margin:5px}.show::-webkit-scrollbar-thumb{background:var(--comp-scrollbar-color);border-radius:var(--comp-scrollbar-border-radius)}.show::-webkit-scrollbar-track{background:transparent;border-radius:var(--comp-scrollbar-border-radius)}click-elsewhere{position:relative;display:block}";
4
+ const q2PopoverCss = "*{box-sizing:border-box}*:active{outline:none}*:focus{outline:none;box-shadow:var(--const-double-focus-ring, 0 0 0 2px #ffffff, 0 0 0 4px #0066cc)}:host{box-shadow:none !important}::-moz-focus-inner{border:none}input,textarea,button{font-family:inherit;font-size:inherit;font-stretch:inherit}:host(.sr),:host(.sr) button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.sr,.sr button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.hidden{display:none}:host([hidden]){display:none}.invisible{visibility:hidden}.legacy.container{display:none}.legacy.show{display:block;z-index:var(--tct-popover-z-index, 50)}:popover-open,.show{position:absolute;margin:0;padding:0;overflow:auto;background:var(--tct-popover-background, var(--app-white, #ffffff));color:var(--tct-popover-font-color, var(--t-text, #4d4d4d));min-width:var(--tct-popover-min-width, 135px);margin-block:var(--tct-popover-margin-block, 0);box-shadow:var(--tct-popover-box-shadow, var(--app-shadow-1, 0px 0px 2px rgba(0, 0, 0, 0.12), 0px 2px 4px rgba(0, 0, 0, 0.14)));border-width:var(--tct-popover-border-width, 0);border-style:solid;border-color:var(--tct-popover-border-color, transparent);border-radius:var(--tct-popover-border-radius, 0);max-height:var(--comp-pop-max-height);left:var(--comp-pop-left);opacity:var(--comp-pop-opacity, 0);--comp-scrollbar-size:var(--tct-scrollbar-size, var(--t-scrollbar-size, var(--app-scale-1x, 5px)));--comp-scrollbar-border-radius:var(--tct-scrollbar-border-radius, var(--t-scrollbar-border-radius, var(--app-border-radius-1, 3px)));--comp-scrollbar-color:var(--tct-scrollbar-color, var(--t-scrollbar-color, var(--t-a11y-gray-color, #747474)));scrollbar-width:thin;scrollbar-color:var(--comp-scrollbar-color) transparent}:popover-open.block,.show.block{right:unset;width:var(--comp-pop-width);min-width:var(--tct-popover-min-width, unset)}:popover-open.left,.show.left{left:var(--comp-pop-left);right:unset}:popover-open.right,.show.right{right:var(--comp-pop-right);left:unset}:popover-open.down,.show.down{top:var(--tct-popover-top, var(--comp-pop-top));bottom:unset}:popover-open.up,.show.up{top:unset;bottom:var(--comp-pop-bottom)}:popover-open::-webkit-scrollbar,.show::-webkit-scrollbar{width:var(--comp-scrollbar-size);height:var(--comp-scrollbar-size);margin:5px}:popover-open::-webkit-scrollbar-thumb,.show::-webkit-scrollbar-thumb{background:var(--comp-scrollbar-color);border-radius:var(--comp-scrollbar-border-radius)}:popover-open::-webkit-scrollbar-track,.show::-webkit-scrollbar-track{background:transparent;border-radius:var(--comp-scrollbar-border-radius)}click-elsewhere{position:relative;display:block}";
5
5
  const Q2PopoverStyle0 = q2PopoverCss;
6
6
 
7
7
  const Q2Popover = /*@__PURE__*/ proxyCustomElement(class Q2Popover extends HTMLElement {
@@ -14,7 +14,6 @@ const Q2Popover = /*@__PURE__*/ proxyCustomElement(class Q2Popover extends HTMLE
14
14
  * The number of pixels to leave between the popover and the edge of the viewport
15
15
  */
16
16
  this.displayBuffer = 10;
17
- /** remove when Popover API is supported in iOS */
18
17
  this.orientationChanged = false;
19
18
  /// Helpers ///
20
19
  this.handleMinHeight = () => {
@@ -22,6 +21,9 @@ const Q2Popover = /*@__PURE__*/ proxyCustomElement(class Q2Popover extends HTMLE
22
21
  handleDeprecationWarning(this, 'minHeight', 'prop');
23
22
  }
24
23
  };
24
+ this.handlePopoverToggleEvent = (event) => {
25
+ this.popoverStateChanged.emit({ open: event.newState === 'open' });
26
+ };
25
27
  this.viewPortChanged = () => {
26
28
  if (!this.open)
27
29
  return;
@@ -31,25 +33,42 @@ const Q2Popover = /*@__PURE__*/ proxyCustomElement(class Q2Popover extends HTMLE
31
33
  this.orientationChanged = true;
32
34
  this.viewPortChanged();
33
35
  };
34
- this.setFixedCSSProperties = async () => {
35
- var _a, _b;
36
- const { controlElement, containerElement, currentDirection, rootElementRect } = this;
36
+ this.setPopoverAPICSSProperties = async () => {
37
+ var _a, _b, _c, _d, _e, _f;
38
+ const { controlElement, containerElement, currentDirection, isModule, align } = this;
37
39
  const { top: controlTop, bottom: controlBottom, left: controlLeft, right: controlRight, } = (_b = (_a = controlElement === null || controlElement === void 0 ? void 0 : controlElement.getBoundingClientRect) === null || _a === void 0 ? void 0 : _a.call(controlElement)) !== null && _b !== void 0 ? _b : {
38
40
  top: 0,
39
41
  bottom: 0,
40
42
  left: 0,
41
43
  right: 0,
42
44
  };
43
- const popoverLeft = controlLeft - rootElementRect.left;
45
+ const popoverLeft = controlLeft;
46
+ const popoverRight = ((_c = window === null || window === void 0 ? void 0 : window.visualViewport) === null || _c === void 0 ? void 0 : _c.width) - controlRight;
47
+ if (align === 'right') {
48
+ containerElement.style.setProperty('--comp-pop-right', `${popoverRight - window.scrollX}px`);
49
+ containerElement.style.setProperty('--comp-pop-left', 'unset');
50
+ }
51
+ else {
52
+ containerElement.style.setProperty('--comp-pop-left', `${popoverLeft + window.scrollX}px`);
53
+ containerElement.style.setProperty('--comp-pop-right', 'unset');
54
+ }
44
55
  if (this.block)
45
- containerElement.style.setProperty('--comp-pop-width', `${controlElement.offsetWidth || 0}px`);
46
- containerElement.style.setProperty('--comp-pop-left', `${popoverLeft}px`);
47
- containerElement.style.setProperty('--comp-pop-right', `${rootElementRect.width + rootElementRect.left - controlRight}px`);
56
+ containerElement.style.setProperty('--comp-pop-width', `${(controlElement === null || controlElement === void 0 ? void 0 : controlElement.offsetWidth) || 0}px`);
48
57
  if (currentDirection === 'up') {
49
- containerElement.style.setProperty('--comp-pop-bottom', `${rootElementRect.height + rootElementRect.top - controlTop}px`);
58
+ if (isModule) {
59
+ containerElement.style.setProperty('--comp-pop-bottom', `${window.innerHeight - controlTop}px`);
60
+ }
61
+ else {
62
+ containerElement.style.setProperty('--comp-pop-bottom', `${window.innerHeight - controlTop - ((_d = window === null || window === void 0 ? void 0 : window.visualViewport) === null || _d === void 0 ? void 0 : _d.offsetTop) - window.scrollY}px`);
63
+ }
50
64
  }
51
65
  if (currentDirection === 'down') {
52
- containerElement.style.setProperty('--comp-pop-top', `${controlBottom - rootElementRect.top}px`);
66
+ if (isModule) {
67
+ containerElement.style.setProperty('--comp-pop-top', `${controlBottom}px`);
68
+ }
69
+ else {
70
+ containerElement.style.setProperty('--comp-pop-top', `${controlBottom + ((_f = (_e = window === null || window === void 0 ? void 0 : window.visualViewport) === null || _e === void 0 ? void 0 : _e.offsetTop) !== null && _f !== void 0 ? _f : 0) + window.scrollY}px`);
71
+ }
53
72
  }
54
73
  // Wait for one paint to prevent layout thrashing
55
74
  await waitForNextPaint();
@@ -80,7 +99,7 @@ const Q2Popover = /*@__PURE__*/ proxyCustomElement(class Q2Popover extends HTMLE
80
99
  containerElement.style.setProperty('--comp-pop-opacity', '1');
81
100
  };
82
101
  this.direction = undefined;
83
- this.align = undefined;
102
+ this.align = 'left';
84
103
  this.open = undefined;
85
104
  this.block = undefined;
86
105
  this.controlElement = undefined;
@@ -90,13 +109,25 @@ const Q2Popover = /*@__PURE__*/ proxyCustomElement(class Q2Popover extends HTMLE
90
109
  this.show = false;
91
110
  }
92
111
  /// Lifecycle hooks ///
112
+ componentWillLoad() {
113
+ if (!this.supportsPopoverAPI) {
114
+ console.warn('The Popover API is not supported in this browser. Please update your browser to the latest version. The component will use legacy mode.');
115
+ this.mode = 'legacy';
116
+ }
117
+ }
93
118
  componentDidLoad() {
94
119
  this.handleMinHeight();
120
+ if (this.supportsPopoverAPI)
121
+ this.containerElement.addEventListener('toggle', this.handlePopoverToggleEvent);
95
122
  if (this.open)
96
123
  this.determinePopDirection();
97
124
  }
98
125
  disconnectedCallback() {
99
126
  this.removeViewportListeners();
127
+ this.containerElement.removeEventListener('toggle', this.handlePopoverToggleEvent);
128
+ this.containerElement = null;
129
+ this.contentElement = null;
130
+ this.controlElement = null;
100
131
  }
101
132
  /// Methods ///
102
133
  async toggle() {
@@ -151,7 +182,12 @@ const Q2Popover = /*@__PURE__*/ proxyCustomElement(class Q2Popover extends HTMLE
151
182
  else {
152
183
  this.removeViewportListeners();
153
184
  this.currentDirection = undefined;
154
- this.show = false;
185
+ if (this.mode === 'legacy' || !this.supportsPopoverAPI) {
186
+ this.show = false;
187
+ }
188
+ else {
189
+ this.containerElement.hidePopover();
190
+ }
155
191
  await waitForNextPaint();
156
192
  this.clearCSSProperties();
157
193
  }
@@ -168,7 +204,7 @@ const Q2Popover = /*@__PURE__*/ proxyCustomElement(class Q2Popover extends HTMLE
168
204
  event.stopPropagation();
169
205
  }
170
206
  /// Getters ///
171
- get actualDirection() {
207
+ get providedDirection() {
172
208
  const { direction } = this;
173
209
  switch (direction) {
174
210
  case 'up':
@@ -184,23 +220,29 @@ const Q2Popover = /*@__PURE__*/ proxyCustomElement(class Q2Popover extends HTMLE
184
220
  const hasPlatformDimensions = Object.keys((_b = (_a = window.Tecton) === null || _a === void 0 ? void 0 : _a.platformDimensions) !== null && _b !== void 0 ? _b : {}).length > 0;
185
221
  return isIframe && hasPlatformDimensions;
186
222
  }
223
+ get supportsPopoverAPI() {
224
+ return Object.hasOwn(HTMLElement.prototype, 'popover');
225
+ }
187
226
  addViewportListeners() {
188
227
  var _a;
189
228
  window.addEventListener('resize', this.viewPortOrientationChanged);
190
- // #region remove when Popover API is supported in iOS
191
- window.addEventListener('scroll', this.viewPortChanged, { passive: true, capture: true });
192
- (_a = screen === null || screen === void 0 ? void 0 : screen.orientation) === null || _a === void 0 ? void 0 : _a.addEventListener('change', this.viewPortOrientationChanged);
229
+ visualViewport === null || visualViewport === void 0 ? void 0 : visualViewport.addEventListener('resize', this.viewPortChanged);
230
+ window.addEventListener('scroll', this.viewPortChanged, {
231
+ passive: true,
232
+ capture: true,
233
+ });
234
+ (_a = screen === null || screen === void 0 ? void 0 : screen.orientation) === null || _a === void 0 ? void 0 : _a.addEventListener('orientationchange', this.viewPortOrientationChanged);
193
235
  window.addEventListener('orientationchange', this.viewPortOrientationChanged);
194
- // #endregion
195
236
  }
196
237
  removeViewportListeners() {
197
238
  var _a;
198
239
  window.removeEventListener('resize', this.viewPortOrientationChanged);
199
- // #region remove when Popover API is supported in iOS
200
- window.removeEventListener('scroll', this.viewPortChanged);
240
+ visualViewport === null || visualViewport === void 0 ? void 0 : visualViewport.removeEventListener('resize', this.viewPortChanged);
241
+ window.removeEventListener('scroll', this.viewPortChanged, {
242
+ capture: true,
243
+ });
201
244
  (_a = screen === null || screen === void 0 ? void 0 : screen.orientation) === null || _a === void 0 ? void 0 : _a.removeEventListener('orientationchange', this.viewPortOrientationChanged);
202
245
  window.removeEventListener('orientationchange', this.viewPortOrientationChanged);
203
- // #endregion
204
246
  }
205
247
  clearCSSProperties() {
206
248
  this.containerElement.style.removeProperty('--comp-pop-max-height');
@@ -219,17 +261,18 @@ const Q2Popover = /*@__PURE__*/ proxyCustomElement(class Q2Popover extends HTMLE
219
261
  if (!isOpen)
220
262
  return;
221
263
  this.currentDirection = direction;
222
- this.show = true;
223
- if (this.mode === 'legacy') {
264
+ if (this.mode === 'legacy' || !this.supportsPopoverAPI) {
265
+ this.show = true;
224
266
  this.setAbsoluteCSSProperties();
225
267
  }
226
268
  else {
227
- this.setFixedCSSProperties();
269
+ this.setPopoverAPICSSProperties();
270
+ this.containerElement.showPopover();
228
271
  }
229
272
  }
230
273
  async determinePopDirection() {
231
274
  var _a, _b, _c;
232
- const { containerElement, controlElement, actualDirection, displayBuffer } = this;
275
+ const { containerElement, controlElement, providedDirection, displayBuffer } = this;
233
276
  if (containerElement)
234
277
  containerElement.style.maxHeight = null;
235
278
  await waitForNextPaint();
@@ -264,7 +307,7 @@ const Q2Popover = /*@__PURE__*/ proxyCustomElement(class Q2Popover extends HTMLE
264
307
  const shouldUpdateMaxHeight = !containerElement.style.getPropertyValue('--comp-pop-max-height') || this.orientationChanged;
265
308
  // we do not want to constantly update the max-height after an orientation change, so we switch this back to false
266
309
  this.orientationChanged = false;
267
- const currentOrDetermineDirection = this.currentDirection || actualDirection || directionWithMostSpace;
310
+ const currentOrDetermineDirection = this.currentDirection || providedDirection || directionWithMostSpace;
268
311
  switch (currentOrDetermineDirection) {
269
312
  case 'up':
270
313
  if (shouldUpdateMaxHeight) {
@@ -282,12 +325,14 @@ const Q2Popover = /*@__PURE__*/ proxyCustomElement(class Q2Popover extends HTMLE
282
325
  }
283
326
  /// DOM ///
284
327
  render() {
285
- const containerClasses = ['container', this.currentDirection];
328
+ const containerClasses = ['container', this.currentDirection, this.align];
286
329
  if (this.show)
287
330
  containerClasses.push('show');
331
+ if (this.block)
332
+ containerClasses.push('block');
288
333
  if (this.mode === 'legacy')
289
334
  containerClasses.push('legacy');
290
- return (h("div", { key: 'cae82b5d3654da661c49f1dc655a5d0721eb62ea', ref: el => (this.containerElement = el), class: containerClasses.join(' '), "test-id": "outerContainer" }, h("div", { key: '38627a57a05e6fa12fed42f2c1a4f1ac90b6760a', ref: el => (this.contentElement = el), class: "content" }, h("slot", { key: 'a7b96f27d1fd85fecef2f1aa53648d03bc3f7fb8' }))));
335
+ return (h("div", { key: '72de4e17657e0e9b7b3697ff7b1cdd8aa6c9c776', ref: el => (this.containerElement = el), class: containerClasses.join(' '), "test-id": "outerContainer", tabIndex: -1, popover: "auto" }, h("div", { key: 'e1c29594d6106380473e38fd11ff9720db93d03e', ref: el => (this.contentElement = el), class: "content" }, h("slot", { key: '35b98793008291b8b51780bb3167804365127b9e' }))));
291
336
  }
292
337
  get hostElement() { return this; }
293
338
  static get watchers() { return {
@@ -1 +1 @@
1
- {"file":"q2-popover2.js","mappings":";;;AAAA,MAAM,YAAY,GAAG,wgFAAwgF,CAAC;AAC9hF,wBAAe,YAAY;;MCed,SAAS;;;;;;;;;QA0ClB,kBAAa,GAAG,EAAE,CAAC;;QAGnB,uBAAkB,GAAY,KAAK,CAAC;;QAuHpC,oBAAe,GAAG;YACd,IAAI,IAAI,CAAC,SAAS,EAAE;gBAChB,wBAAwB,CAAC,IAAI,EAAE,WAAW,EAAE,MAAM,CAAC,CAAC;aACvD;SACJ,CAAC;QAEF,oBAAe,GAAG;YACd,IAAI,CAAC,IAAI,CAAC,IAAI;gBAAE,OAAO;YACvB,IAAI,CAAC,qBAAqB,EAAE,CAAC;SAChC,CAAC;QAEF,+BAA0B,GAAG;YACzB,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAC;YAC/B,IAAI,CAAC,eAAe,EAAE,CAAC;SA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,MAAM,2BAA2B,GAAG,IAAI,CAAC,gBAAgB,IAAI,eAAe,IAAI,sBAAsB,CAAC;QAEvG,QAAQ,2BAA2B;YAC/B,KAAK,IAAI;gBACL,IAAI,qBAAqB,EAAE;oBACvB,gBAAgB,CAAC,KAAK,CAAC,WAAW,CAAC,uBAAuB,EAAE,GAAG,aAAa,IAAI,CAAC,CAAC;iBACrF;gBACD,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,CAAC;gBAC/B,MAAM;YACV,KAAK,MAAM;gBACP,IAAI,qBAAqB,EAAE;oBACvB,gBAAgB,CAAC,KAAK,CAAC,WAAW,CAAC,uBAAuB,EAAE,GAAG,aAAa,IAAI,CAAC,CAAC;iBACrF;gBACD,IAAI,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAC;gBACjC,MAAM;SAGb;KACJ;;IAGD,MAAM;QACF,MAAM,gBAAgB,GAAG,CAAC,WAAW,EAAE,IAAI,CAAC,gBAAgB,CAAC,CAAC;QAC9D,IAAI,IAAI,CAAC,IAAI;YAAE,gBAAgB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAC7C,IAAI,IAAI,CAAC,IAAI,KAAK,QAAQ;YAAE,gBAAgB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAE5D,QACI,4DACI,GAAG,EAAE,EAAE,KAAK,IAAI,CAAC,gBAAgB,GAAG,EAAE,CAAC,EACvC,KAAK,EAAE,gBAAgB,CAAC,IAAI,CAAC,GAAG,CAAC,aACzB,gBAAgB,IAExB,4DACI,GAAG,EAAE,EAAE,KAAK,IAAI,CAAC,cAAc,GAAG,EAAE,CAAC,EACrC,KAAK,EAAC,SAAS,IAEf,8DAAQ,CACN,CACJ,EACR;KACL;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/q2-popover/q2-popover.scss?tag=q2-popover&encapsulation=shadow","src/components/q2-popover/q2-popover.tsx"],"sourcesContent":["@import '../../styles/host.scss';\n@import '../../styles/functions';\n\n.container {\n display: none;\n}\n\n.show {\n display: block;\n position: fixed;\n z-index: var-list(--tct-popover-z-index, 50);\n margin: 0;\n padding: 0;\n overflow: auto;\n background: var-list(--tct-popover-background, --app-white, #ffffff);\n color: var-list(--tct-popover-font-color, --t-text, #4d4d4d);\n min-width: var-list(--tct-popover-min-width, 135px);\n margin-block: var-list(--tct-popover-margin-block, 0);\n box-shadow: var-list(--tct-popover-box-shadow, --app-shadow-1, unquote('0 2px 4px rgba(0, 0, 0, 0.3)'));\n border-width: var-list(--tct-popover-border-width, 0);\n border-style: solid;\n border-color: var-list(--tct-popover-border-color, transparent);\n border-radius: var-list(--tct-popover-border-radius, 0);\n // the following --comp variables are set via JS\n max-height: var(--comp-pop-max-height);\n left: var(--comp-pop-left);\n opacity: var(--comp-pop-opacity, 0);\n\n :host([block]) & {\n right: unset;\n width: var(--comp-pop-width);\n min-width: var-list(--tct-popover-min-width, unset);\n }\n\n :host([align='left']) & {\n left: var(--comp-pop-left);\n right: unset;\n }\n\n :host([align='right']) & {\n right: var(--comp-pop-right);\n left: unset;\n }\n\n &.down {\n top: var-list(--tct-popover-top, --comp-pop-top);\n bottom: unset;\n }\n\n &.up {\n top: unset;\n bottom: var(--comp-pop-bottom);\n }\n\n &.legacy {\n position: absolute;\n }\n\n @include tiny-scrollbar();\n}\n\nclick-elsewhere {\n position: relative;\n display: block;\n}\n","import {\n Component,\n Prop,\n h,\n ComponentInterface,\n Element,\n Watch,\n Method,\n Listen,\n EventEmitter,\n Event,\n State,\n} from '@stencil/core';\nimport { handleDeprecationWarning, waitForNextPaint } from '../../utils';\n\n@Component({ tag: 'q2-popover', shadow: true, styleUrl: 'q2-popover.scss' })\nexport class Q2Popover implements ComponentInterface {\n /**\n * Force the direction of the popover when it opens.\n * If no value is passed, the component will auto-detect the direction based on available space.\n */\n @Prop({ reflect: true }) direction: 'up' | 'down';\n\n /** Aligns the popover to the left or right side of the control element. */\n @Prop({ reflect: true }) align: 'left' | 'right';\n\n /** Controls whether the popover is open or closed. */\n @Prop({ reflect: true, mutable: true }) open: boolean;\n\n /** Indicates the popover will match the width of its parent element. */\n @Prop({ reflect: true }) block: boolean;\n\n /** The element that controls the popover's behavior. */\n @Prop() controlElement: HTMLElement;\n\n @Prop() mode: 'legacy' = null;\n\n /** @deprecated */\n @Prop() minHeight: number;\n\n @Element() hostElement: HTMLElement;\n\n /**\n * Emitted when the popover is opened or closed.\n */\n @Event() popoverStateChanged: EventEmitter<{ open: boolean }>;\n\n @State() currentDirection: 'down' | 'up' = undefined;\n // remove `show` when Popover API is supported in iOS\n @State() show: boolean = false;\n\n containerElement: HTMLDivElement;\n contentElement: HTMLDivElement;\n rootElementRect: DOMRect;\n\n /**\n * The number of pixels to leave between the popover and the edge of the viewport\n */\n displayBuffer = 10;\n\n /** remove when Popover API is supported in iOS */\n orientationChanged: boolean = false;\n\n /// Lifecycle hooks ///\n componentDidLoad() {\n this.handleMinHeight();\n if (this.open) this.determinePopDirection();\n }\n\n disconnectedCallback() {\n this.removeViewportListeners();\n }\n\n /// Methods ///\n @Method()\n async toggle() {\n this.open = !this.open;\n }\n\n @Method()\n async scrollContainerTo(options: ScrollToOptions) {\n this.containerElement.scrollTo(options);\n }\n\n setRootElement() {\n let currentElement: HTMLElement = this.hostElement;\n\n while (currentElement && currentElement !== document.documentElement) {\n const computedStyle = window.getComputedStyle(currentElement);\n\n // Check if the element has any styles applied that create a new containg block\n if (\n computedStyle.transform !== 'none' ||\n computedStyle.filter !== 'none' ||\n computedStyle.perspective !== 'none' ||\n computedStyle.containerType !== 'normal' ||\n ['transform', 'perspective', 'filter'].includes(computedStyle.willChange) ||\n ['layout', 'paint', 'strict', 'content'].includes(computedStyle.contain)\n ) {\n this.rootElementRect = currentElement.getBoundingClientRect();\n return;\n }\n\n const rootNode = currentElement.getRootNode();\n const isRootNodeWebComponent =\n typeof ShadowRoot !== 'undefined' &&\n rootNode instanceof ShadowRoot &&\n rootNode.host instanceof HTMLElement;\n if (isRootNodeWebComponent) {\n currentElement = rootNode.host;\n } else {\n currentElement = currentElement.parentElement;\n }\n }\n\n // Return the document's bounding rect if no element is found\n this.rootElementRect = {\n top: 0,\n bottom: 0,\n left: 0,\n right: 0,\n height: window.visualViewport.height,\n width: window.visualViewport.width,\n } as DOMRect;\n }\n\n /// Watchers ///\n @Watch('open')\n async openChanged(open: boolean) {\n this.setRootElement();\n this.popoverStateChanged.emit({ open });\n\n if (open) {\n this.addViewportListeners();\n this.determinePopDirection();\n } else {\n this.removeViewportListeners();\n this.currentDirection = undefined;\n this.show = false;\n await waitForNextPaint();\n this.clearCSSProperties();\n }\n }\n\n @Watch('minHeight')\n minHeightProvided() {\n this.handleMinHeight();\n }\n\n /// Listeners ///\n @Listen('popoverState')\n popoverStateHandler(event: CustomEvent<{ open: boolean }>) {\n const {\n detail: { open },\n } = event;\n if (open === this.open) return;\n\n this.open = open;\n event.stopPropagation();\n }\n\n /// Getters ///\n get actualDirection(): 'up' | 'down' | undefined {\n const { direction } = this;\n switch (direction) {\n case 'up':\n case 'down':\n return direction;\n default:\n return undefined;\n }\n }\n\n get isModule() {\n const isIframe = window !== window.top;\n const hasPlatformDimensions = Object.keys(window.Tecton?.platformDimensions ?? {}).length > 0;\n return isIframe && hasPlatformDimensions;\n }\n\n /// Helpers ///\n handleMinHeight = () => {\n if (this.minHeight) {\n handleDeprecationWarning(this, 'minHeight', 'prop');\n }\n };\n\n viewPortChanged = () => {\n if (!this.open) return;\n this.determinePopDirection();\n };\n\n viewPortOrientationChanged = () => {\n this.orientationChanged = true;\n this.viewPortChanged();\n };\n\n addViewportListeners() {\n window.addEventListener('resize', this.viewPortOrientationChanged);\n // #region remove when Popover API is supported in iOS\n window.addEventListener('scroll', this.viewPortChanged, { passive: true, capture: true });\n screen?.orientation?.addEventListener('change', this.viewPortOrientationChanged);\n window.addEventListener('orientationchange', this.viewPortOrientationChanged);\n // #endregion\n }\n\n removeViewportListeners() {\n window.removeEventListener('resize', this.viewPortOrientationChanged);\n // #region remove when Popover API is supported in iOS\n window.removeEventListener('scroll', this.viewPortChanged);\n screen?.orientation?.removeEventListener('orientationchange', this.viewPortOrientationChanged);\n window.removeEventListener('orientationchange', this.viewPortOrientationChanged);\n // #endregion\n }\n\n setFixedCSSProperties = async () => {\n const { controlElement, containerElement, currentDirection, rootElementRect } = this;\n const {\n top: controlTop,\n bottom: controlBottom,\n left: controlLeft,\n right: controlRight,\n } = controlElement?.getBoundingClientRect?.() ?? {\n top: 0,\n bottom: 0,\n left: 0,\n right: 0,\n };\n const popoverLeft: number = controlLeft - rootElementRect.left;\n\n if (this.block) containerElement.style.setProperty('--comp-pop-width', `${controlElement.offsetWidth || 0}px`);\n containerElement.style.setProperty('--comp-pop-left', `${popoverLeft}px`);\n containerElement.style.setProperty(\n '--comp-pop-right',\n `${rootElementRect.width + rootElementRect.left - controlRight}px`\n );\n\n if (currentDirection === 'up') {\n containerElement.style.setProperty(\n '--comp-pop-bottom',\n `${rootElementRect.height + rootElementRect.top - controlTop}px`\n );\n }\n if (currentDirection === 'down') {\n containerElement.style.setProperty('--comp-pop-top', `${controlBottom - rootElementRect.top}px`);\n }\n\n // Wait for one paint to prevent layout thrashing\n await waitForNextPaint();\n containerElement.style.setProperty('--comp-pop-opacity', '1');\n };\n\n setAbsoluteCSSProperties = async () => {\n const { controlElement, containerElement, currentDirection, align } = this;\n\n if (align === 'right') {\n containerElement.style.setProperty('--comp-pop-right', '0');\n containerElement.style.setProperty('--comp-pop-left', 'unset');\n } else {\n containerElement.style.setProperty('--comp-pop-left', '0');\n containerElement.style.setProperty('--comp-pop-right', 'unset');\n }\n\n if (this.block) {\n containerElement.style.setProperty('--comp-pop-width', '100%');\n }\n\n if (currentDirection === 'up') {\n const controlStyle = getComputedStyle(controlElement);\n const controlSize =\n parseInt(controlStyle.height || '0') +\n parseInt(controlStyle.borderTopWidth || '0') +\n parseInt(controlStyle.borderBottomWidth || '0');\n\n containerElement.style.setProperty('--comp-pop-bottom', `${controlSize}px`);\n }\n\n // Wait for one paint to prevent layout thrashing\n await waitForNextPaint();\n containerElement.style.setProperty('--comp-pop-opacity', '1');\n };\n\n clearCSSProperties() {\n this.containerElement.style.removeProperty('--comp-pop-max-height');\n this.containerElement.style.removeProperty('--comp-pop-top');\n this.containerElement.style.removeProperty('--comp-pop-bottom');\n this.containerElement.style.removeProperty('--comp-pop-left');\n this.containerElement.style.removeProperty('--comp-pop-right');\n this.containerElement.style.removeProperty('--comp-pop-width');\n this.containerElement.style.removeProperty('--comp-pop-opacity');\n }\n\n setDirectionAndShow(direction: 'up' | 'down') {\n this.setRootElement();\n // Due to some runtime inconsistency across devices/browsers we need to add one more check here because the\n // popover can be closed between the time the popover is opened and the time the direction is determined\n const isOpen = this.open;\n if (!isOpen) return;\n\n this.currentDirection = direction;\n this.show = true;\n if (this.mode === 'legacy') {\n this.setAbsoluteCSSProperties();\n } else {\n this.setFixedCSSProperties();\n }\n }\n\n async determinePopDirection() {\n const { containerElement, controlElement, actualDirection, displayBuffer } = this;\n if (containerElement) containerElement.style.maxHeight = null;\n\n await waitForNextPaint();\n\n const { isModule } = this;\n const { top: controlTop, bottom: controlBottom } = controlElement?.getBoundingClientRect?.() ?? {\n top: 0,\n bottom: 0,\n };\n\n let windowHeight: number;\n let maxSpaceAbove: number;\n let maxSpaceBelow: number;\n\n if (isModule) {\n const { outletOffset = 0, innerHeight = window.innerHeight } = window.Tecton?.platformDimensions || {};\n const distanceToIframeBottom = window.visualViewport.height - controlBottom;\n const viewableSpaceBelow = innerHeight - (outletOffset + controlBottom);\n const isIframeShorterThanWindow = distanceToIframeBottom < viewableSpaceBelow;\n windowHeight = innerHeight;\n // If the top of the module is below the top of the window we just use the controlTop\n // Otherwise we need to add the outletOffset to the controlTop\n maxSpaceAbove = (outletOffset > 0 ? controlTop : controlTop + outletOffset) - displayBuffer;\n maxSpaceBelow = isIframeShorterThanWindow\n ? distanceToIframeBottom - displayBuffer\n : viewableSpaceBelow - displayBuffer;\n } else {\n windowHeight = window.visualViewport.height;\n maxSpaceAbove = controlTop - displayBuffer;\n maxSpaceBelow = windowHeight - controlBottom - displayBuffer;\n }\n\n const directionWithMostSpace: 'up' | 'down' = maxSpaceAbove > maxSpaceBelow ? 'up' : 'down';\n\n // We do not want to update the max height once the popover is open unless the page orientation shifts (resize or mobile use cases)\n const shouldUpdateMaxHeight =\n !containerElement.style.getPropertyValue('--comp-pop-max-height') || this.orientationChanged;\n // we do not want to constantly update the max-height after an orientation change, so we switch this back to false\n this.orientationChanged = false;\n const currentOrDetermineDirection = this.currentDirection || actualDirection || directionWithMostSpace;\n\n switch (currentOrDetermineDirection) {\n case 'up':\n if (shouldUpdateMaxHeight) {\n containerElement.style.setProperty('--comp-pop-max-height', `${maxSpaceAbove}px`);\n }\n this.setDirectionAndShow('up');\n break;\n case 'down':\n if (shouldUpdateMaxHeight) {\n containerElement.style.setProperty('--comp-pop-max-height', `${maxSpaceBelow}px`);\n }\n this.setDirectionAndShow('down');\n break;\n default:\n break;\n }\n }\n\n /// DOM ///\n render() {\n const containerClasses = ['container', this.currentDirection];\n if (this.show) containerClasses.push('show');\n if (this.mode === 'legacy') containerClasses.push('legacy');\n\n return (\n <div\n ref={el => (this.containerElement = el)}\n class={containerClasses.join(' ')}\n test-id=\"outerContainer\"\n >\n <div\n ref={el => (this.contentElement = el)}\n class=\"content\"\n >\n <slot />\n </div>\n </div>\n );\n }\n}\n"],"version":3}
1
+ {"file":"q2-popover2.js","mappings":";;;AAAA,MAAM,YAAY,GAAG,ytFAAytF,CAAC;AAC/uF,wBAAe,YAAY;;MCed,SAAS;;;;;;;;;QA0ClB,kBAAa,GAAG,EAAE,CAAC;QAEnB,uBAAkB,GAAY,KAAK,CAAC;;QA8IpC,oBAAe,GAAG;YACd,IAAI,IAAI,CAAC,SAAS,EAAE;gBAChB,wBAAwB,CAAC,IAAI,EAAE,WAAW,EAAE,MAAM,CAAC,CAAC;aACvD;SACJ,CAAC;QAEF,6BAAwB,GAAG,CAAC,KAAkB;YAC1C,I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AAa,IAAI,CAAC,CAAC;iBACrF;gBACD,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,CAAC;gBAC/B,MAAM;YACV,KAAK,MAAM;gBACP,IAAI,qBAAqB,EAAE;oBACvB,gBAAgB,CAAC,KAAK,CAAC,WAAW,CAAC,uBAAuB,EAAE,GAAG,aAAa,IAAI,CAAC,CAAC;iBACrF;gBACD,IAAI,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAC;gBACjC,MAAM;SAGb;KACJ;;IAGD,MAAM;QACF,MAAM,gBAAgB,GAAG,CAAC,WAAW,EAAE,IAAI,CAAC,gBAAgB,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;QAC1E,IAAI,IAAI,CAAC,IAAI;YAAE,gBAAgB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAC7C,IAAI,IAAI,CAAC,KAAK;YAAE,gBAAgB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC/C,IAAI,IAAI,CAAC,IAAI,KAAK,QAAQ;YAAE,gBAAgB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAE5D,QACI,4DACI,GAAG,EAAE,EAAE,KAAK,IAAI,CAAC,gBAAgB,GAAG,EAAE,CAAC,EACvC,KAAK,EAAE,gBAAgB,CAAC,IAAI,CAAC,GAAG,CAAC,aACzB,gBAAgB,EACxB,QAAQ,EAAE,CAAC,CAAC,EACZ,OAAO,EAAC,MAAM,IAEd,4DACI,GAAG,EAAE,EAAE,KAAK,IAAI,CAAC,cAAc,GAAG,EAAE,CAAC,EACrC,KAAK,EAAC,SAAS,IAEf,8DAAQ,CACN,CACJ,EACR;KACL;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/q2-popover/q2-popover.scss?tag=q2-popover&encapsulation=shadow","src/components/q2-popover/q2-popover.tsx"],"sourcesContent":["@import '../../styles/host.scss';\n@import '../../styles/functions';\n\n.legacy {\n &.container {\n display: none;\n }\n\n &.show {\n display: block;\n z-index: var-list(--tct-popover-z-index, 50);\n }\n}\n\n:popover-open,\n.show {\n position: absolute;\n margin: 0;\n padding: 0;\n overflow: auto;\n background: var-list(--tct-popover-background, --app-white, #ffffff);\n color: var-list(--tct-popover-font-color, --t-text, #4d4d4d);\n min-width: var-list(--tct-popover-min-width, 135px);\n margin-block: var-list(--tct-popover-margin-block, 0);\n box-shadow: var-list(\n --tct-popover-box-shadow,\n --app-shadow-1,\n unquote('0px 0px 2px rgba(0, 0, 0, 0.12), 0px 2px 4px rgba(0, 0, 0, 0.14)')\n );\n border-width: var-list(--tct-popover-border-width, 0);\n border-style: solid;\n border-color: var-list(--tct-popover-border-color, transparent);\n border-radius: var-list(--tct-popover-border-radius, 0);\n // the --comp variables are set via JS\n max-height: var(--comp-pop-max-height);\n left: var(--comp-pop-left);\n opacity: var(--comp-pop-opacity, 0);\n\n &.block {\n right: unset;\n width: var(--comp-pop-width);\n min-width: var-list(--tct-popover-min-width, unset);\n }\n\n &.left {\n left: var(--comp-pop-left);\n right: unset;\n }\n\n &.right {\n right: var(--comp-pop-right);\n left: unset;\n }\n\n &.down {\n top: var-list(--tct-popover-top, --comp-pop-top);\n bottom: unset;\n }\n\n &.up {\n top: unset;\n bottom: var(--comp-pop-bottom);\n }\n\n @include tiny-scrollbar();\n}\n\nclick-elsewhere {\n position: relative;\n display: block;\n}\n","import {\n Component,\n Prop,\n h,\n ComponentInterface,\n Element,\n Watch,\n Method,\n Listen,\n EventEmitter,\n Event,\n State,\n} from '@stencil/core';\nimport { handleDeprecationWarning, waitForNextPaint } from '../../utils';\n\n@Component({ tag: 'q2-popover', shadow: true, styleUrl: 'q2-popover.scss' })\nexport class Q2Popover implements ComponentInterface {\n /**\n * Force the direction of the popover when it opens.\n * If no value is passed, the component will auto-detect the direction based on available space.\n */\n @Prop({ reflect: true }) direction: 'up' | 'down';\n\n /** Aligns the popover to the left or right side of the control element. */\n @Prop({ reflect: true }) align: 'left' | 'right' = 'left';\n\n /** Controls whether the popover is open or closed. */\n @Prop({ reflect: true, mutable: true }) open: boolean;\n\n /** Indicates the popover will match the width of its parent element. */\n @Prop({ reflect: true }) block: boolean;\n\n /** The element that controls the popover's behavior. */\n @Prop() controlElement: HTMLElement;\n\n @Prop() mode: 'legacy' = null;\n\n /** @deprecated */\n @Prop() minHeight: number;\n\n @Element() hostElement: HTMLElement;\n\n /**\n * Emitted when the popover is opened or closed.\n */\n @Event() popoverStateChanged: EventEmitter<{ open: boolean }>;\n\n @State() currentDirection: 'down' | 'up' = undefined;\n // remove `show` when Popover API is supported in iOS\n @State() show: boolean = false;\n\n containerElement: HTMLDivElement;\n contentElement: HTMLDivElement;\n rootElementRect: DOMRect;\n\n /**\n * The number of pixels to leave between the popover and the edge of the viewport\n */\n displayBuffer = 10;\n\n orientationChanged: boolean = false;\n\n /// Lifecycle hooks ///\n componentWillLoad() {\n if (!this.supportsPopoverAPI) {\n console.warn(\n 'The Popover API is not supported in this browser. Please update your browser to the latest version. The component will use legacy mode.'\n );\n this.mode = 'legacy';\n }\n }\n\n componentDidLoad() {\n this.handleMinHeight();\n if (this.supportsPopoverAPI) this.containerElement.addEventListener('toggle', this.handlePopoverToggleEvent);\n if (this.open) this.determinePopDirection();\n }\n\n disconnectedCallback() {\n this.removeViewportListeners();\n this.containerElement.removeEventListener('toggle', this.handlePopoverToggleEvent);\n this.containerElement = null;\n this.contentElement = null;\n this.controlElement = null;\n }\n\n /// Methods ///\n @Method()\n async toggle() {\n this.open = !this.open;\n }\n\n @Method()\n async scrollContainerTo(options: ScrollToOptions) {\n this.containerElement.scrollTo(options);\n }\n\n setRootElement() {\n let currentElement: HTMLElement = this.hostElement;\n\n while (currentElement && currentElement !== document.documentElement) {\n const computedStyle = window.getComputedStyle(currentElement);\n\n // Check if the element has any styles applied that create a new containg block\n if (\n computedStyle.transform !== 'none' ||\n computedStyle.filter !== 'none' ||\n computedStyle.perspective !== 'none' ||\n computedStyle.containerType !== 'normal' ||\n ['transform', 'perspective', 'filter'].includes(computedStyle.willChange) ||\n ['layout', 'paint', 'strict', 'content'].includes(computedStyle.contain)\n ) {\n this.rootElementRect = currentElement.getBoundingClientRect();\n return;\n }\n\n const rootNode = currentElement.getRootNode();\n const isRootNodeWebComponent =\n typeof ShadowRoot !== 'undefined' &&\n rootNode instanceof ShadowRoot &&\n rootNode.host instanceof HTMLElement;\n if (isRootNodeWebComponent) {\n currentElement = rootNode.host;\n } else {\n currentElement = currentElement.parentElement;\n }\n }\n\n // Return the document's bounding rect if no element is found\n this.rootElementRect = {\n top: 0,\n bottom: 0,\n left: 0,\n right: 0,\n height: window.visualViewport.height,\n width: window.visualViewport.width,\n } as DOMRect;\n }\n\n /// Watchers ///\n @Watch('open')\n async openChanged(open: boolean) {\n this.setRootElement();\n this.popoverStateChanged.emit({ open });\n\n if (open) {\n this.addViewportListeners();\n this.determinePopDirection();\n } else {\n this.removeViewportListeners();\n this.currentDirection = undefined;\n if (this.mode === 'legacy' || !this.supportsPopoverAPI) {\n this.show = false;\n } else {\n this.containerElement.hidePopover();\n }\n\n await waitForNextPaint();\n this.clearCSSProperties();\n }\n }\n\n @Watch('minHeight')\n minHeightProvided() {\n this.handleMinHeight();\n }\n\n /// Listeners ///\n @Listen('popoverState')\n popoverStateHandler(event: CustomEvent<{ open: boolean }>) {\n const {\n detail: { open },\n } = event;\n if (open === this.open) return;\n\n this.open = open;\n event.stopPropagation();\n }\n\n /// Getters ///\n get providedDirection(): 'up' | 'down' | undefined {\n const { direction } = this;\n switch (direction) {\n case 'up':\n case 'down':\n return direction;\n default:\n return undefined;\n }\n }\n\n get isModule() {\n const isIframe = window !== window.top;\n const hasPlatformDimensions = Object.keys(window.Tecton?.platformDimensions ?? {}).length > 0;\n return isIframe && hasPlatformDimensions;\n }\n\n get supportsPopoverAPI(): boolean {\n return Object.hasOwn(HTMLElement.prototype, 'popover');\n }\n\n /// Helpers ///\n handleMinHeight = () => {\n if (this.minHeight) {\n handleDeprecationWarning(this, 'minHeight', 'prop');\n }\n };\n\n handlePopoverToggleEvent = (event: ToggleEvent) => {\n this.popoverStateChanged.emit({ open: event.newState === 'open' });\n };\n\n viewPortChanged = () => {\n if (!this.open) return;\n this.determinePopDirection();\n };\n\n viewPortOrientationChanged = () => {\n this.orientationChanged = true;\n this.viewPortChanged();\n };\n\n addViewportListeners() {\n window.addEventListener('resize', this.viewPortOrientationChanged);\n visualViewport?.addEventListener('resize', this.viewPortChanged);\n window.addEventListener('scroll', this.viewPortChanged, {\n passive: true,\n capture: true,\n });\n screen?.orientation?.addEventListener('orientationchange', this.viewPortOrientationChanged);\n window.addEventListener('orientationchange', this.viewPortOrientationChanged);\n }\n\n removeViewportListeners() {\n window.removeEventListener('resize', this.viewPortOrientationChanged);\n visualViewport?.removeEventListener('resize', this.viewPortChanged);\n window.removeEventListener('scroll', this.viewPortChanged, {\n capture: true,\n });\n screen?.orientation?.removeEventListener('orientationchange', this.viewPortOrientationChanged);\n window.removeEventListener('orientationchange', this.viewPortOrientationChanged);\n }\n\n setPopoverAPICSSProperties = async () => {\n const { controlElement, containerElement, currentDirection, isModule, align } = this;\n const {\n top: controlTop,\n bottom: controlBottom,\n left: controlLeft,\n right: controlRight,\n } = controlElement?.getBoundingClientRect?.() ?? {\n top: 0,\n bottom: 0,\n left: 0,\n right: 0,\n };\n\n const popoverLeft: number = controlLeft;\n const popoverRight: number = window?.visualViewport?.width - controlRight;\n\n if (align === 'right') {\n containerElement.style.setProperty('--comp-pop-right', `${popoverRight - window.scrollX}px`);\n containerElement.style.setProperty('--comp-pop-left', 'unset');\n } else {\n containerElement.style.setProperty('--comp-pop-left', `${popoverLeft + window.scrollX}px`);\n containerElement.style.setProperty('--comp-pop-right', 'unset');\n }\n\n if (this.block) containerElement.style.setProperty('--comp-pop-width', `${controlElement?.offsetWidth || 0}px`);\n\n if (currentDirection === 'up') {\n if (isModule) {\n containerElement.style.setProperty('--comp-pop-bottom', `${window.innerHeight - controlTop}px`);\n } else {\n containerElement.style.setProperty(\n '--comp-pop-bottom',\n `${window.innerHeight - controlTop - window?.visualViewport?.offsetTop - window.scrollY}px`\n );\n }\n }\n\n if (currentDirection === 'down') {\n if (isModule) {\n containerElement.style.setProperty('--comp-pop-top', `${controlBottom}px`);\n } else {\n containerElement.style.setProperty(\n '--comp-pop-top',\n `${controlBottom + (window?.visualViewport?.offsetTop ?? 0) + window.scrollY}px`\n );\n }\n }\n\n // Wait for one paint to prevent layout thrashing\n await waitForNextPaint();\n containerElement.style.setProperty('--comp-pop-opacity', '1');\n };\n\n setAbsoluteCSSProperties = async () => {\n const { controlElement, containerElement, currentDirection, align } = this;\n\n if (align === 'right') {\n containerElement.style.setProperty('--comp-pop-right', '0');\n containerElement.style.setProperty('--comp-pop-left', 'unset');\n } else {\n containerElement.style.setProperty('--comp-pop-left', '0');\n containerElement.style.setProperty('--comp-pop-right', 'unset');\n }\n\n if (this.block) {\n containerElement.style.setProperty('--comp-pop-width', '100%');\n }\n\n if (currentDirection === 'up') {\n const controlStyle = getComputedStyle(controlElement);\n const controlSize =\n parseInt(controlStyle.height || '0') +\n parseInt(controlStyle.borderTopWidth || '0') +\n parseInt(controlStyle.borderBottomWidth || '0');\n\n containerElement.style.setProperty('--comp-pop-bottom', `${controlSize}px`);\n }\n\n // Wait for one paint to prevent layout thrashing\n await waitForNextPaint();\n containerElement.style.setProperty('--comp-pop-opacity', '1');\n };\n\n clearCSSProperties() {\n this.containerElement.style.removeProperty('--comp-pop-max-height');\n this.containerElement.style.removeProperty('--comp-pop-top');\n this.containerElement.style.removeProperty('--comp-pop-bottom');\n this.containerElement.style.removeProperty('--comp-pop-left');\n this.containerElement.style.removeProperty('--comp-pop-right');\n this.containerElement.style.removeProperty('--comp-pop-width');\n this.containerElement.style.removeProperty('--comp-pop-opacity');\n }\n\n setDirectionAndShow(direction: 'up' | 'down') {\n this.setRootElement();\n // Due to some runtime inconsistency across devices/browsers we need to add one more check here because the\n // popover can be closed between the time the popover is opened and the time the direction is determined\n const isOpen = this.open;\n if (!isOpen) return;\n\n this.currentDirection = direction;\n if (this.mode === 'legacy' || !this.supportsPopoverAPI) {\n this.show = true;\n this.setAbsoluteCSSProperties();\n } else {\n this.setPopoverAPICSSProperties();\n this.containerElement.showPopover();\n }\n }\n\n async determinePopDirection() {\n const { containerElement, controlElement, providedDirection, displayBuffer } = this;\n if (containerElement) containerElement.style.maxHeight = null;\n\n await waitForNextPaint();\n\n const { isModule } = this;\n const { top: controlTop, bottom: controlBottom } = controlElement?.getBoundingClientRect?.() ?? {\n top: 0,\n bottom: 0,\n };\n\n let windowHeight: number;\n let maxSpaceAbove: number;\n let maxSpaceBelow: number;\n\n if (isModule) {\n const { outletOffset = 0, innerHeight = window.innerHeight } = window.Tecton?.platformDimensions || {};\n const distanceToIframeBottom = window.visualViewport.height - controlBottom;\n const viewableSpaceBelow = innerHeight - (outletOffset + controlBottom);\n const isIframeShorterThanWindow = distanceToIframeBottom < viewableSpaceBelow;\n windowHeight = innerHeight;\n // If the top of the module is below the top of the window we just use the controlTop\n // Otherwise we need to add the outletOffset to the controlTop\n maxSpaceAbove = (outletOffset > 0 ? controlTop : controlTop + outletOffset) - displayBuffer;\n maxSpaceBelow = isIframeShorterThanWindow\n ? distanceToIframeBottom - displayBuffer\n : viewableSpaceBelow - displayBuffer;\n } else {\n windowHeight = window.visualViewport.height;\n maxSpaceAbove = controlTop - displayBuffer;\n maxSpaceBelow = windowHeight - controlBottom - displayBuffer;\n }\n\n const directionWithMostSpace: 'up' | 'down' = maxSpaceAbove > maxSpaceBelow ? 'up' : 'down';\n\n // We do not want to update the max height once the popover is open unless the page orientation shifts (resize or mobile use cases)\n const shouldUpdateMaxHeight =\n !containerElement.style.getPropertyValue('--comp-pop-max-height') || this.orientationChanged;\n // we do not want to constantly update the max-height after an orientation change, so we switch this back to false\n this.orientationChanged = false;\n const currentOrDetermineDirection = this.currentDirection || providedDirection || directionWithMostSpace;\n\n switch (currentOrDetermineDirection) {\n case 'up':\n if (shouldUpdateMaxHeight) {\n containerElement.style.setProperty('--comp-pop-max-height', `${maxSpaceAbove}px`);\n }\n this.setDirectionAndShow('up');\n break;\n case 'down':\n if (shouldUpdateMaxHeight) {\n containerElement.style.setProperty('--comp-pop-max-height', `${maxSpaceBelow}px`);\n }\n this.setDirectionAndShow('down');\n break;\n default:\n break;\n }\n }\n\n /// DOM ///\n render() {\n const containerClasses = ['container', this.currentDirection, this.align];\n if (this.show) containerClasses.push('show');\n if (this.block) containerClasses.push('block');\n if (this.mode === 'legacy') containerClasses.push('legacy');\n\n return (\n <div\n ref={el => (this.containerElement = el)}\n class={containerClasses.join(' ')}\n test-id=\"outerContainer\"\n tabIndex={-1}\n popover=\"auto\"\n >\n <div\n ref={el => (this.contentElement = el)}\n class=\"content\"\n >\n <slot />\n </div>\n </div>\n );\n }\n}\n"],"version":3}
@@ -2,7 +2,7 @@ import { proxyCustomElement, HTMLElement, createEvent, h, Fragment } from '@sten
2
2
  import { c as createGuid, o as overrideFocus, i as isEventFromElement, e as labelDOM } from './index2.js';
3
3
  import { d as defineCustomElement$2 } from './q2-icon2.js';
4
4
 
5
- const q2RadioGroupCss = "*{box-sizing:border-box}*:active{outline:none}*:focus{outline:none;box-shadow:var(--const-double-focus-ring, 0 0 0 2px #ffffff, 0 0 0 4px #0066cc)}:host{box-shadow:none !important}::-moz-focus-inner{border:none}input,textarea,button{font-family:inherit;font-size:inherit;font-stretch:inherit}:host(.sr),:host(.sr) button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.sr,.sr button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.hidden{display:none}:host([hidden]){display:none}.invisible{visibility:hidden}:host{--comp-default-radio-group-margin:var(--tct-radio-group-margin-top, var(--t-radio-group-margin-top, var(--app-scale-5x, 25px))) 0 var(--tct-radio-group-margin-bottom, var(--t-radio-group-margin-bottom, var(--app-scale-5x, 25px)));display:block;margin:var(--tct-radio-group-margin, var(--comp-default-radio-group-margin))}fieldset{padding:0;margin:0;border:0;position:relative}.label-row{display:grid;grid-template-columns:1fr 24px;grid-template-areas:\"label icon\";gap:var(--app-scale-1x, 5px)}.label-row q2-icon{grid-area:icon;margin-top:-2px;margin-bottom:-2px}.group-legend{font-weight:600}.optional-tag{margin-left:var(--tct-input-label-optional-margin-left, var(--t-input-label-optional-margin-left, var(--tct-scale-1, var(--app-scale-1x, 5px))));color:var(--tct-input-label-optional-font-color, var(--t-input-label-optional-font-color, var(--t-textA, var(--t-a11y-gray-color, rgba(77, 77, 77, 0.77)))));font-size:var(--tct-input-label-optional-font-size, var(--t-input-label-optional-font-size, 12px));font-weight:var(--tct-input-label-optional-font-weight, var(--t-input-label-optional-font-weight, 400))}.tile-container,.tile-container .options-container{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;flex-grow:1}.options-container{--comp-default-margin:var(--app-scale-1x, 5px) 0;--comp-options-margin:var(--tct-radio-group-options-margin, var(--t-radio-group-options-margin, var(--comp-default-margin, 5px 0)));margin:var(--comp-options-margin);padding:var(--tct-radio-group-options-padding, var(--t-radio-group-options-padding, var(--app-scale-0x, 0px)));border-width:1px;border-color:transparent;border-style:solid;border-radius:var(--tct-border-radius-1, var(--app-border-radius-1, 2px))}:host([has-error]) .options-container{border-color:var(--tct-input-error-border-color, var(--const-stoplight-alert, #d20a0a))}:host([has-error=false]) .options-container{border-color:transparent}.tile-container.left{justify-content:start}.tile-container.right{justify-content:end}.tile-container .options-container{gap:var(--tct-radio-group-tile-gap, var(--t-radio-group-tile-gap, var(--app-scale-2x, 10px)));justify-content:inherit}";
5
+ const q2RadioGroupCss = "*{box-sizing:border-box}*:active{outline:none}*:focus{outline:none;box-shadow:var(--const-double-focus-ring, 0 0 0 2px #ffffff, 0 0 0 4px #0066cc)}:host{box-shadow:none !important}::-moz-focus-inner{border:none}input,textarea,button{font-family:inherit;font-size:inherit;font-stretch:inherit}:host(.sr),:host(.sr) button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.sr,.sr button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.hidden{display:none}:host([hidden]){display:none}.invisible{visibility:hidden}:host{margin-top:var(--tct-scale-2, var(--app-scale-2x, 10px))}fieldset{padding:0;margin:0;border:0;position:relative}.label-row{display:grid;grid-template-columns:1fr 24px;grid-template-areas:\"label icon\";gap:var(--app-scale-1x, 5px)}.label-row q2-icon{grid-area:icon;margin-top:-2px;margin-bottom:-2px}.group-legend{font-weight:600}.optional-tag{margin-left:var(--tct-input-label-optional-margin-left, var(--t-input-label-optional-margin-left, var(--tct-scale-1, var(--app-scale-1x, 5px))));color:var(--tct-input-label-optional-font-color, var(--t-input-label-optional-font-color, var(--t-textA, var(--t-a11y-gray-color, rgba(77, 77, 77, 0.77)))));font-size:var(--tct-input-label-optional-font-size, var(--t-input-label-optional-font-size, 12px));font-weight:var(--tct-input-label-optional-font-weight, var(--t-input-label-optional-font-weight, 400))}.tile-container,.tile-container .options-container{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;flex-grow:1}.options-container{--comp-default-margin:var(--app-scale-1x, 5px) 0;--comp-options-margin:var(--tct-radio-group-options-margin, var(--t-radio-group-options-margin, var(--comp-default-margin, 5px 0)));margin:var(--comp-options-margin);padding:var(--tct-radio-group-options-padding, var(--t-radio-group-options-padding, var(--app-scale-1x, 5px)));border-width:1px;border-color:transparent;border-style:solid;border-radius:var(--tct-border-radius-1, var(--app-border-radius-1, 2px))}:host([has-error]) .options-container{border-color:var(--tct-input-error-border-color, var(--const-stoplight-alert, #d20a0a))}:host([has-error=false]) .options-container{border-color:transparent}.tile-container.left{justify-content:start}.tile-container.right{justify-content:end}.tile-container .options-container{gap:var(--tct-radio-group-tile-gap, var(--t-radio-group-tile-gap, var(--app-scale-2x, 10px)));justify-content:inherit}";
6
6
  const Q2RadioGroupStyle0 = q2RadioGroupCss;
7
7
 
8
8
  const Q2RadioGroup$1 = /*@__PURE__*/ proxyCustomElement(class Q2RadioGroup extends HTMLElement {
@@ -163,7 +163,7 @@ const Q2RadioGroup$1 = /*@__PURE__*/ proxyCustomElement(class Q2RadioGroup exten
163
163
  const showLabel = this.label || this.optional || this.readonly;
164
164
  const { hasError } = this;
165
165
  const showLabelRow = showLabel || hasError;
166
- return (h(Fragment, { key: '5fc0ba8dc6df9631a891e6997e520e663671dbf8' }, showLabelRow && (h("div", { key: 'd65d48917b4dfa90b498467baf1b0d546f57df1b', class: "label-row" }, showLabel && h("div", { key: '43e5db86c270d7e0822c1683d1eca97cb64e72c2', class: "group-legend" }, labelDOM(this)), hasError && (h("q2-icon", { key: 'f57ca3a0da21160ac81d00cac3c85a069fd3d9e5', type: "error", "test-id": "iconError" })))), h("fieldset", { key: 'e85a89714c71b43670d392ba311d436a4c73038b', onChange: this.onInnerRadioChange, "aria-invalid": `${this.hasError}` }, showLabel && h("legend", { key: '701af7a401c2871f9cbc472ffa27edac8b3e109e', class: "sr" }, labelDOM(this)), this.inputDom())));
166
+ return (h(Fragment, { key: '89b900da542fcef23c5b83f79a5f9d0a94c46b94' }, showLabelRow && (h("div", { key: 'c8b042825052f086c86daeea2a4785a935e89669', class: "label-row" }, showLabel && h("div", { key: '0b76b8f8da79ef43aaaac6fb9dbd55deb98ae4f0', class: "group-legend" }, labelDOM(this)), hasError && (h("q2-icon", { key: '114c828a9a38c6e967f309a9cc33e36b81c6688f', type: "error", "test-id": "iconError" })))), h("fieldset", { key: '08ea4a163a783340e50f9cb7c89b30fb1cd1e8a7', onChange: this.onInnerRadioChange, "aria-invalid": `${this.hasError}` }, showLabel && h("legend", { key: '668f4d97c9b8e8056589260ebac95d060709f490', class: "sr" }, labelDOM(this)), this.inputDom())));
167
167
  }
168
168
  inputDom() {
169
169
  if (this.tileLayout) {