q2-tecton-elements 1.54.4 → 1.55.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (559) hide show
  1. package/dist/bundle-report.json +2047 -769
  2. package/dist/cjs/{index-76f63767.js → index-905f4c87.js} +3 -2
  3. package/dist/cjs/index-905f4c87.js.map +1 -0
  4. package/dist/cjs/loader.cjs.js +1 -1
  5. package/dist/cjs/q2-action-group.cjs.entry.js +45 -14
  6. package/dist/cjs/q2-action-group.cjs.entry.js.map +1 -1
  7. package/dist/cjs/q2-action-sheet.cjs.entry.js +4 -1364
  8. package/dist/cjs/q2-action-sheet.cjs.entry.js.map +1 -1
  9. package/dist/cjs/q2-avatar.cjs.entry.js +1 -1
  10. package/dist/cjs/q2-badge_7.cjs.entry.js +59 -22
  11. package/dist/cjs/q2-badge_7.cjs.entry.js.map +1 -1
  12. package/dist/cjs/q2-calendar.cjs.entry.js +2 -2
  13. package/dist/cjs/q2-calendar.cjs.entry.js.map +1 -1
  14. package/dist/cjs/q2-card.cjs.entry.js +1 -1
  15. package/dist/cjs/q2-carousel-pane.cjs.entry.js +3 -3
  16. package/dist/cjs/q2-carousel.cjs.entry.js +1 -1
  17. package/dist/cjs/q2-chart-area.cjs.entry.js +2 -2
  18. package/dist/cjs/q2-chart-bar.cjs.entry.js +2 -2
  19. package/dist/cjs/q2-chart-donut.cjs.entry.js +2 -2
  20. package/dist/cjs/q2-checkbox-group.cjs.entry.js +2 -2
  21. package/dist/cjs/q2-checkbox-group.cjs.entry.js.map +1 -1
  22. package/dist/cjs/q2-checkbox.cjs.entry.js +21 -21
  23. package/dist/cjs/q2-checkbox.cjs.entry.js.map +1 -1
  24. package/dist/cjs/q2-currency.cjs.entry.js +1 -1
  25. package/dist/cjs/q2-data-table.cjs.entry.js +1 -1
  26. package/dist/cjs/q2-detail.cjs.entry.js +2 -2
  27. package/dist/cjs/q2-dropdown-item.cjs.entry.js +1 -1
  28. package/dist/cjs/q2-dropdown.cjs.entry.js +1 -1
  29. package/dist/cjs/q2-editable-field.cjs.entry.js +1 -1
  30. package/dist/cjs/q2-file-picker.cjs.entry.js +2 -2
  31. package/dist/cjs/q2-file-picker.cjs.entry.js.map +1 -1
  32. package/dist/cjs/q2-form.cjs.entry.js +23 -0
  33. package/dist/cjs/q2-form.cjs.entry.js.map +1 -0
  34. package/dist/cjs/q2-formatted-text.cjs.entry.js +1 -1
  35. package/dist/cjs/q2-item_3.cjs.entry.js +3 -3
  36. package/dist/cjs/q2-legend.cjs.entry.js +2 -2
  37. package/dist/cjs/q2-legend.cjs.entry.js.map +1 -1
  38. package/dist/cjs/q2-loc.cjs.entry.js +20 -26
  39. package/dist/cjs/q2-loc.cjs.entry.js.map +1 -1
  40. package/dist/cjs/q2-message.cjs.entry.js +2 -2
  41. package/dist/cjs/q2-modal.cjs.entry.js +172 -0
  42. package/dist/cjs/q2-modal.cjs.entry.js.map +1 -0
  43. package/dist/cjs/q2-month-picker.cjs.entry.js +3 -3
  44. package/dist/cjs/q2-optgroup.cjs.entry.js +2 -2
  45. package/dist/cjs/q2-option-list_2.cjs.entry.js +2 -2
  46. package/dist/cjs/q2-option.cjs.entry.js +22 -24
  47. package/dist/cjs/q2-option.cjs.entry.js.map +1 -1
  48. package/dist/cjs/q2-pagination.cjs.entry.js +4 -4
  49. package/dist/cjs/q2-pill.cjs.entry.js +2 -2
  50. package/dist/cjs/q2-radio-group.cjs.entry.js +2 -2
  51. package/dist/cjs/q2-radio-group.cjs.entry.js.map +1 -1
  52. package/dist/cjs/q2-radio.cjs.entry.js +1 -1
  53. package/dist/cjs/q2-relative-time.cjs.entry.js +2 -2
  54. package/dist/cjs/q2-resize-observer.cjs.entry.js +2 -2
  55. package/dist/cjs/q2-resize-observer.cjs.entry.js.map +1 -1
  56. package/dist/cjs/q2-section.cjs.entry.js +3 -3
  57. package/dist/cjs/q2-select.cjs.entry.js +10 -6
  58. package/dist/cjs/q2-select.cjs.entry.js.map +1 -1
  59. package/dist/cjs/q2-stepper-pane.cjs.entry.js +1 -1
  60. package/dist/cjs/q2-stepper-vertical.cjs.entry.js +2 -2
  61. package/dist/cjs/q2-stepper.cjs.entry.js +2 -2
  62. package/dist/cjs/q2-tag.cjs.entry.js +51 -9
  63. package/dist/cjs/q2-tag.cjs.entry.js.map +1 -1
  64. package/dist/cjs/q2-tecton-elements.cjs.js +1 -1
  65. package/dist/cjs/q2-textarea.cjs.entry.js +3 -3
  66. package/dist/cjs/q2-textarea.cjs.entry.js.map +1 -1
  67. package/dist/cjs/q2-tooltip.cjs.entry.js +2 -2
  68. package/dist/cjs/q2-tooltip.cjs.entry.js.map +1 -1
  69. package/dist/cjs/sanitize-html-string-b8e3b24b.js +1366 -0
  70. package/dist/cjs/sanitize-html-string-b8e3b24b.js.map +1 -0
  71. package/dist/cjs/tecton-tab-pane.cjs.entry.js +2 -2
  72. package/dist/collection/collection-manifest.json +3 -1
  73. package/dist/collection/components/click-elsewhere/click-elsewhere.js.map +1 -1
  74. package/dist/collection/components/click-elsewhere/test/click-elsewhere-test.e2e.js.map +1 -1
  75. package/dist/collection/components/q2-action-group/q2-action-group.css +11 -4
  76. package/dist/collection/components/q2-action-group/q2-action-group.js +47 -13
  77. package/dist/collection/components/q2-action-group/q2-action-group.js.map +1 -1
  78. package/dist/collection/components/q2-action-group/test/q2-action-group-test.e2e.js +365 -0
  79. package/dist/collection/components/q2-action-group/test/q2-action-group-test.e2e.js.map +1 -0
  80. package/dist/collection/components/q2-action-group/test/{q2-action-group.spec.js → q2-action-group-test.spec.js} +67 -26
  81. package/dist/collection/components/q2-action-group/test/q2-action-group-test.spec.js.map +1 -0
  82. package/dist/collection/components/q2-action-sheet/q2-action-sheet.js +1 -1
  83. package/dist/collection/components/q2-action-sheet/q2-action-sheet.js.map +1 -1
  84. package/dist/collection/components/q2-action-sheet/test/q2-action-sheet-test.e2e.js.map +1 -1
  85. package/dist/collection/components/q2-avatar/q2-avatar.js +1 -1
  86. package/dist/collection/components/q2-avatar/q2-avatar.js.map +1 -1
  87. package/dist/collection/components/q2-avatar/test/q2-avatar-test.e2e.js.map +1 -1
  88. package/dist/collection/components/q2-badge/q2-badge.css +52 -41
  89. package/dist/collection/components/q2-badge/q2-badge.js +88 -22
  90. package/dist/collection/components/q2-badge/q2-badge.js.map +1 -1
  91. package/dist/collection/components/q2-badge/test/q2-badge-test.e2e.js +35 -126
  92. package/dist/collection/components/q2-badge/test/q2-badge-test.e2e.js.map +1 -1
  93. package/dist/collection/components/q2-badge/test/q2-badge-test.spec.js +415 -0
  94. package/dist/collection/components/q2-badge/test/q2-badge-test.spec.js.map +1 -0
  95. package/dist/collection/components/q2-btn/q2-btn.css +12 -10
  96. package/dist/collection/components/q2-btn/q2-btn.js.map +1 -1
  97. package/dist/collection/components/q2-btn/test/q2-btn-test.e2e.js.map +1 -1
  98. package/dist/collection/components/q2-calendar/q2-calendar-helpers.js.map +1 -1
  99. package/dist/collection/components/q2-calendar/q2-calendar-types.js.map +1 -1
  100. package/dist/collection/components/q2-calendar/q2-calendar-validation.js.map +1 -1
  101. package/dist/collection/components/q2-calendar/q2-calendar.css +2 -0
  102. package/dist/collection/components/q2-calendar/q2-calendar.js.map +1 -1
  103. package/dist/collection/components/q2-calendar/q2-month-picker.js +2 -2
  104. package/dist/collection/components/q2-calendar/q2-month-picker.js.map +1 -1
  105. package/dist/collection/components/q2-calendar/test/helpers-test.e2e.js.map +1 -1
  106. package/dist/collection/components/q2-calendar/test/q2-calendar-month-picker-test.e2e.js.map +1 -1
  107. package/dist/collection/components/q2-calendar/test/q2-calendar-test.e2e.js.map +1 -1
  108. package/dist/collection/components/q2-calendar/test/validation-test.e2e.js.map +1 -1
  109. package/dist/collection/components/q2-card/q2-card.js.map +1 -1
  110. package/dist/collection/components/q2-card/test/q2-card-test.e2e.js.map +1 -1
  111. package/dist/collection/components/q2-carousel/q2-carousel.js.map +1 -1
  112. package/dist/collection/components/q2-carousel/test/q2-carousel-test.e2e.js.map +1 -1
  113. package/dist/collection/components/q2-carousel-pane/q2-carousel-pane.js +2 -2
  114. package/dist/collection/components/q2-carousel-pane/q2-carousel-pane.js.map +1 -1
  115. package/dist/collection/components/q2-carousel-pane/test/q2-carousel-pane-test.e2e.js.map +1 -1
  116. package/dist/collection/components/q2-carousel-pane/test/q2-carousel-pane-test.spec.js.map +1 -1
  117. package/dist/collection/components/q2-chart-area/q2-chart-area.js +1 -1
  118. package/dist/collection/components/q2-chart-area/q2-chart-area.js.map +1 -1
  119. package/dist/collection/components/q2-chart-area/test/q2-chart-area-test.e2e.js.map +1 -1
  120. package/dist/collection/components/q2-chart-bar/q2-chart-bar.js +1 -1
  121. package/dist/collection/components/q2-chart-bar/q2-chart-bar.js.map +1 -1
  122. package/dist/collection/components/q2-chart-bar/test/q2-chart-bar-test.e2e.js.map +1 -1
  123. package/dist/collection/components/q2-chart-donut/q2-chart-donut.js +1 -1
  124. package/dist/collection/components/q2-chart-donut/q2-chart-donut.js.map +1 -1
  125. package/dist/collection/components/q2-chart-donut/test/q2-chart-donut-test.e2e.js.map +1 -1
  126. package/dist/collection/components/q2-checkbox/q2-checkbox.css +99 -62
  127. package/dist/collection/components/q2-checkbox/q2-checkbox.js +19 -19
  128. package/dist/collection/components/q2-checkbox/q2-checkbox.js.map +1 -1
  129. package/dist/collection/components/q2-checkbox/test/q2-checkbox-test.e2e.js +227 -208
  130. package/dist/collection/components/q2-checkbox/test/q2-checkbox-test.e2e.js.map +1 -1
  131. package/dist/collection/components/q2-checkbox-group/q2-checkbox-group.css +8 -1
  132. package/dist/collection/components/q2-checkbox-group/q2-checkbox-group.js.map +1 -1
  133. package/dist/collection/components/q2-checkbox-group/test/q2-checkbox-group-test.e2e.js.map +1 -1
  134. package/dist/collection/components/q2-currency/q2-currency.js +1 -1
  135. package/dist/collection/components/q2-currency/q2-currency.js.map +1 -1
  136. package/dist/collection/components/q2-currency/test/q2-currency-test.e2e.js.map +1 -1
  137. package/dist/collection/components/q2-data-table/q2-data-table.js.map +1 -1
  138. package/dist/collection/components/q2-data-table/test/q2-data-table-test.e2e.js.map +1 -1
  139. package/dist/collection/components/q2-detail/q2-detail.js +1 -1
  140. package/dist/collection/components/q2-detail/q2-detail.js.map +1 -1
  141. package/dist/collection/components/q2-detail/test/q2-detail-test.e2e.js.map +1 -1
  142. package/dist/collection/components/q2-dropdown/q2-dropdown.js.map +1 -1
  143. package/dist/collection/components/q2-dropdown/test/q2-dropdown-test.e2e.js.map +1 -1
  144. package/dist/collection/components/q2-dropdown-item/q2-dropdown-item.js.map +1 -1
  145. package/dist/collection/components/q2-dropdown-item/test/q2-dropdown-item-test.e2e.js.map +1 -1
  146. package/dist/collection/components/q2-editable-field/q2-editable-field.js.map +1 -1
  147. package/dist/collection/components/q2-editable-field/test/q2-editable-field-test.e2e.js.map +1 -1
  148. package/dist/collection/components/q2-example/q2-example.js.map +1 -1
  149. package/dist/collection/components/q2-example/test/q2-example.e2e.js.map +1 -1
  150. package/dist/collection/components/q2-example/test/q2-example.spec.js.map +1 -1
  151. package/dist/collection/components/q2-file-picker/q2-file-picker.css +2 -0
  152. package/dist/collection/components/q2-file-picker/q2-file-picker.js.map +1 -1
  153. package/dist/collection/components/q2-file-picker/test/q2-file-picker-test.e2e.js.map +1 -1
  154. package/dist/collection/components/q2-file-picker/test/q2-file-picker-test.spec.js.map +1 -1
  155. package/dist/collection/components/q2-form/q2-form.css +93 -0
  156. package/dist/collection/components/q2-form/q2-form.js +44 -0
  157. package/dist/collection/components/q2-form/q2-form.js.map +1 -0
  158. package/dist/collection/components/q2-form/test/q2-form-test.e2e.js +93 -0
  159. package/dist/collection/components/q2-form/test/q2-form-test.e2e.js.map +1 -0
  160. package/dist/collection/components/q2-formatted-text/q2-formatted-text.js +1 -1
  161. package/dist/collection/components/q2-formatted-text/q2-formatted-text.js.map +1 -1
  162. package/dist/collection/components/q2-formatted-text/test/q2-formatted-text-test.e2e.js.map +1 -1
  163. package/dist/collection/components/q2-icon/q2-icon-types.js.map +1 -1
  164. package/dist/collection/components/q2-icon/q2-icon.js.map +1 -1
  165. package/dist/collection/components/q2-icon/test/q2-icon-test.e2e.js +1 -352
  166. package/dist/collection/components/q2-icon/test/q2-icon-test.e2e.js.map +1 -1
  167. package/dist/collection/components/q2-icon/test/q2-icon-test.spec.js +464 -0
  168. package/dist/collection/components/q2-icon/test/q2-icon-test.spec.js.map +1 -0
  169. package/dist/collection/components/q2-input/formatting/alpha.js.map +1 -1
  170. package/dist/collection/components/q2-input/formatting/alpha.spec.js.map +1 -1
  171. package/dist/collection/components/q2-input/formatting/alphanumeric.js.map +1 -1
  172. package/dist/collection/components/q2-input/formatting/alphanumeric.spec.js.map +1 -1
  173. package/dist/collection/components/q2-input/formatting/credit-card.js.map +1 -1
  174. package/dist/collection/components/q2-input/formatting/credit-card.spec.js.map +1 -1
  175. package/dist/collection/components/q2-input/formatting/currency.js.map +1 -1
  176. package/dist/collection/components/q2-input/formatting/currency.spec.js.map +1 -1
  177. package/dist/collection/components/q2-input/formatting/date.js.map +1 -1
  178. package/dist/collection/components/q2-input/formatting/date.spec.js.map +1 -1
  179. package/dist/collection/components/q2-input/formatting/generic.js.map +1 -1
  180. package/dist/collection/components/q2-input/formatting/number.js.map +1 -1
  181. package/dist/collection/components/q2-input/formatting/numeric.js.map +1 -1
  182. package/dist/collection/components/q2-input/formatting/numeric.spec.js.map +1 -1
  183. package/dist/collection/components/q2-input/formatting/phone.js.map +1 -1
  184. package/dist/collection/components/q2-input/formatting/phone.spec.js.map +1 -1
  185. package/dist/collection/components/q2-input/formatting/postal.js.map +1 -1
  186. package/dist/collection/components/q2-input/formatting/postal.spec.js.map +1 -1
  187. package/dist/collection/components/q2-input/formatting/ssn.js.map +1 -1
  188. package/dist/collection/components/q2-input/formatting/ssn.spec.js.map +1 -1
  189. package/dist/collection/components/q2-input/formatting/tin.js.map +1 -1
  190. package/dist/collection/components/q2-input/formatting/tin.spec.js.map +1 -1
  191. package/dist/collection/components/q2-input/q2-input-types.js.map +1 -1
  192. package/dist/collection/components/q2-input/q2-input.css +3 -2
  193. package/dist/collection/components/q2-input/q2-input.js +4 -3
  194. package/dist/collection/components/q2-input/q2-input.js.map +1 -1
  195. package/dist/collection/components/q2-input/test/q2-input-credit-card-test.e2e.js.map +1 -1
  196. package/dist/collection/components/q2-input/test/q2-input-test.e2e.js.map +1 -1
  197. package/dist/collection/components/q2-input/test/q2-input-test.spec.js +10 -0
  198. package/dist/collection/components/q2-input/test/q2-input-test.spec.js.map +1 -1
  199. package/dist/collection/components/q2-item/q2-item.js +1 -1
  200. package/dist/collection/components/q2-item/q2-item.js.map +1 -1
  201. package/dist/collection/components/q2-item/test/q2-item-test.e2e.js.map +1 -1
  202. package/dist/collection/components/q2-item/test/q2-item-test.spec.js.map +1 -1
  203. package/dist/collection/components/q2-legend/q2-legend.css +1 -1
  204. package/dist/collection/components/q2-legend/q2-legend.js +1 -1
  205. package/dist/collection/components/q2-legend/q2-legend.js.map +1 -1
  206. package/dist/collection/components/q2-legend/test/q2-legend-test.e2e.js.map +1 -1
  207. package/dist/collection/components/q2-legend/test/q2-legend-test.spec.js.map +1 -1
  208. package/dist/collection/components/q2-link/q2-link.js.map +1 -1
  209. package/dist/collection/components/q2-link/test/q2-link-test.e2e.js.map +1 -1
  210. package/dist/collection/components/q2-link/test/q2-link-test.spec.js.map +1 -1
  211. package/dist/collection/components/q2-list/q2-list.js +1 -1
  212. package/dist/collection/components/q2-list/q2-list.js.map +1 -1
  213. package/dist/collection/components/q2-list/test/q2-list-test.e2e.js.map +1 -1
  214. package/dist/collection/components/q2-loading/q2-loading.js.map +1 -1
  215. package/dist/collection/components/q2-loading/skeleton/q2-loading-element/index.js.map +1 -1
  216. package/dist/collection/components/q2-loading/skeleton/shapes.js.map +1 -1
  217. package/dist/collection/components/q2-loading/test/q2-loading-element-test.e2e.js.map +1 -1
  218. package/dist/collection/components/q2-loading/test/q2-loading-test.e2e.js.map +1 -1
  219. package/dist/collection/components/q2-loc/q2-loc.js +19 -37
  220. package/dist/collection/components/q2-loc/q2-loc.js.map +1 -1
  221. package/dist/collection/components/q2-loc/test/q2-loc-test.e2e.js +1 -7
  222. package/dist/collection/components/q2-loc/test/q2-loc-test.e2e.js.map +1 -1
  223. package/dist/collection/components/q2-loc/test/q2-loc-test.spec.js +140 -82
  224. package/dist/collection/components/q2-loc/test/q2-loc-test.spec.js.map +1 -1
  225. package/dist/collection/components/q2-message/q2-message.js +1 -1
  226. package/dist/collection/components/q2-message/q2-message.js.map +1 -1
  227. package/dist/collection/components/q2-message/test/q2-message-test.e2e.js.map +1 -1
  228. package/dist/collection/components/q2-modal/q2-modal.css +223 -0
  229. package/dist/collection/components/q2-modal/q2-modal.js +470 -0
  230. package/dist/collection/components/q2-modal/q2-modal.js.map +1 -0
  231. package/dist/collection/components/q2-modal/test/q2-modal-test.e2e.js +102 -0
  232. package/dist/collection/components/q2-modal/test/q2-modal-test.e2e.js.map +1 -0
  233. package/dist/collection/components/q2-modal/test/q2-modal-test.spec.js +127 -0
  234. package/dist/collection/components/q2-modal/test/q2-modal-test.spec.js.map +1 -0
  235. package/dist/collection/components/q2-optgroup/q2-optgroup.js +1 -1
  236. package/dist/collection/components/q2-optgroup/q2-optgroup.js.map +1 -1
  237. package/dist/collection/components/q2-optgroup/test/q2-optgroup-test.e2e.js.map +1 -1
  238. package/dist/collection/components/q2-option/q2-option.js +22 -24
  239. package/dist/collection/components/q2-option/q2-option.js.map +1 -1
  240. package/dist/collection/components/q2-option/test/q2-option-test.e2e.js +32 -5
  241. package/dist/collection/components/q2-option/test/q2-option-test.e2e.js.map +1 -1
  242. package/dist/collection/components/q2-option/test/q2-option-test.spec.js +137 -19
  243. package/dist/collection/components/q2-option/test/q2-option-test.spec.js.map +1 -1
  244. package/dist/collection/components/q2-option-list/q2-option-list.js.map +1 -1
  245. package/dist/collection/components/q2-option-list/test/q2-option-list-test.e2e.js.map +1 -1
  246. package/dist/collection/components/q2-option-list/test/q2-option-list.spec.js.map +1 -1
  247. package/dist/collection/components/q2-pagination/q2-pagination.js +3 -3
  248. package/dist/collection/components/q2-pagination/q2-pagination.js.map +1 -1
  249. package/dist/collection/components/q2-pagination/test/q2-pagination-test.e2e.js.map +1 -1
  250. package/dist/collection/components/q2-pill/q2-pill.js +1 -1
  251. package/dist/collection/components/q2-pill/q2-pill.js.map +1 -1
  252. package/dist/collection/components/q2-pill/test/q2-pill-test.e2e.js.map +1 -1
  253. package/dist/collection/components/q2-popover/q2-popover.js +1 -1
  254. package/dist/collection/components/q2-popover/q2-popover.js.map +1 -1
  255. package/dist/collection/components/q2-popover/test/q2-popover-test.e2e.js.map +1 -1
  256. package/dist/collection/components/q2-popover/test/q2-popover-test.spec.js.map +1 -1
  257. package/dist/collection/components/q2-radio/q2-radio.js.map +1 -1
  258. package/dist/collection/components/q2-radio/test/q2-radio-test.e2e.js.map +1 -1
  259. package/dist/collection/components/q2-radio-group/q2-radio-group.css +4 -2
  260. package/dist/collection/components/q2-radio-group/q2-radio-group.js.map +1 -1
  261. package/dist/collection/components/q2-radio-group/test/q2-radio-group-test.e2e.js.map +1 -1
  262. package/dist/collection/components/q2-relative-time/q2-relative-time.js +1 -1
  263. package/dist/collection/components/q2-relative-time/q2-relative-time.js.map +1 -1
  264. package/dist/collection/components/q2-relative-time/test/q2-relative-time-test.e2e.js.map +1 -1
  265. package/dist/collection/components/q2-resize-observer/q2-resize-observer.js +2 -2
  266. package/dist/collection/components/q2-resize-observer/q2-resize-observer.js.map +1 -1
  267. package/dist/collection/components/q2-resize-observer/test/q2-resize-observer.e2e.js.map +1 -1
  268. package/dist/collection/components/q2-resize-observer/test/q2-resize-observer.spec.js.map +1 -1
  269. package/dist/collection/components/q2-section/q2-section.js +2 -2
  270. package/dist/collection/components/q2-section/q2-section.js.map +1 -1
  271. package/dist/collection/components/q2-section/test/q2-section-test.e2e.js.map +1 -1
  272. package/dist/collection/components/q2-select/q2-select.css +2 -2
  273. package/dist/collection/components/q2-select/q2-select.js +15 -4
  274. package/dist/collection/components/q2-select/q2-select.js.map +1 -1
  275. package/dist/collection/components/q2-select/test/q2-select-test.e2e.js +5 -1
  276. package/dist/collection/components/q2-select/test/q2-select-test.e2e.js.map +1 -1
  277. package/dist/collection/components/q2-select/test/q2-select-test.spec.js +85 -0
  278. package/dist/collection/components/q2-select/test/q2-select-test.spec.js.map +1 -0
  279. package/dist/collection/components/q2-stepper/q2-stepper.js +1 -1
  280. package/dist/collection/components/q2-stepper/q2-stepper.js.map +1 -1
  281. package/dist/collection/components/q2-stepper/test/q2-stepper-test.e2e.js.map +1 -1
  282. package/dist/collection/components/q2-stepper-pane/q2-stepper-pane.js.map +1 -1
  283. package/dist/collection/components/q2-stepper-pane/test/q2-stepper-pane-test.e2e.js.map +1 -1
  284. package/dist/collection/components/q2-stepper-vertical/q2-stepper-vertical.js +1 -1
  285. package/dist/collection/components/q2-stepper-vertical/q2-stepper-vertical.js.map +1 -1
  286. package/dist/collection/components/q2-stepper-vertical/test/q2-stepper-vertical-test.e2e.js.map +1 -1
  287. package/dist/collection/components/q2-tab-container/q2-tab-container.js +1 -1
  288. package/dist/collection/components/q2-tab-container/q2-tab-container.js.map +1 -1
  289. package/dist/collection/components/q2-tab-container/test/q2-tab-container-test.e2e.js.map +1 -1
  290. package/dist/collection/components/q2-tab-container/test/q2-tab-container-test.spec.js.map +1 -1
  291. package/dist/collection/components/q2-tab-pane/q2-tab-pane.js +1 -1
  292. package/dist/collection/components/q2-tab-pane/q2-tab-pane.js.map +1 -1
  293. package/dist/collection/components/q2-tab-pane/test/q2-tab-pane-test.e2e.js.map +1 -1
  294. package/dist/collection/components/q2-tag/q2-tag.css +9 -0
  295. package/dist/collection/components/q2-tag/q2-tag.js +65 -15
  296. package/dist/collection/components/q2-tag/q2-tag.js.map +1 -1
  297. package/dist/collection/components/q2-tag/test/q2-tag-test.e2e.js +131 -341
  298. package/dist/collection/components/q2-tag/test/q2-tag-test.e2e.js.map +1 -1
  299. package/dist/collection/components/q2-tag/test/q2-tag-test.spec.js +719 -0
  300. package/dist/collection/components/q2-tag/test/q2-tag-test.spec.js.map +1 -0
  301. package/dist/collection/components/q2-textarea/q2-textarea.css +2 -2
  302. package/dist/collection/components/q2-textarea/q2-textarea.js +1 -1
  303. package/dist/collection/components/q2-textarea/q2-textarea.js.map +1 -1
  304. package/dist/collection/components/q2-textarea/test/q2-textarea-test.e2e.js.map +1 -1
  305. package/dist/collection/components/q2-tooltip/q2-tooltip.css +0 -1
  306. package/dist/collection/components/q2-tooltip/q2-tooltip.js.map +1 -1
  307. package/dist/collection/components/q2-tooltip/test/q2-tooltip-test.e2e.js.map +1 -1
  308. package/dist/collection/components/tecton-tab-pane/tecton-tab-pane-types.js.map +1 -1
  309. package/dist/collection/components/tecton-tab-pane/tecton-tab-pane.js +2 -2
  310. package/dist/collection/components/tecton-tab-pane/tecton-tab-pane.js.map +1 -1
  311. package/dist/collection/components/tecton-tab-pane/test/tecton-tab-pane-test.e2e.js.map +1 -1
  312. package/dist/collection/index.js.map +1 -1
  313. package/dist/collection/utils/action-sheet.js.map +1 -1
  314. package/dist/collection/utils/charting.js.map +1 -1
  315. package/dist/collection/utils/helpers.js +1 -25
  316. package/dist/collection/utils/helpers.js.map +1 -1
  317. package/dist/collection/utils/index.js +2 -1
  318. package/dist/collection/utils/index.js.map +1 -1
  319. package/dist/collection/utils/mirror-emit.js.map +1 -1
  320. package/dist/collection/utils/sanitize-html-string.js.map +1 -1
  321. package/dist/collection/utils/sanitize-regex-string.js.map +1 -1
  322. package/dist/collection/utils/test/action-sheet-test.e2e.js.map +1 -1
  323. package/dist/collection/utils/test/index.spec.js.map +1 -1
  324. package/dist/components/index.js +4 -0
  325. package/dist/components/index.js.map +1 -1
  326. package/dist/components/index2.js +2 -1
  327. package/dist/components/index2.js.map +1 -1
  328. package/dist/components/q2-action-group.js +1 -116
  329. package/dist/components/q2-action-group.js.map +1 -1
  330. package/dist/components/q2-action-group2.js +151 -0
  331. package/dist/components/q2-action-group2.js.map +1 -0
  332. package/dist/components/q2-action-sheet.js +2 -1362
  333. package/dist/components/q2-action-sheet.js.map +1 -1
  334. package/dist/components/q2-avatar2.js +1 -1
  335. package/dist/components/q2-badge2.js +54 -16
  336. package/dist/components/q2-badge2.js.map +1 -1
  337. package/dist/components/q2-btn2.js +1 -1
  338. package/dist/components/q2-btn2.js.map +1 -1
  339. package/dist/components/q2-calendar.js +1 -1
  340. package/dist/components/q2-calendar.js.map +1 -1
  341. package/dist/components/q2-carousel-pane.js +2 -2
  342. package/dist/components/q2-chart-area.js +1 -1
  343. package/dist/components/q2-chart-bar.js +1 -1
  344. package/dist/components/q2-chart-donut.js +1 -1
  345. package/dist/components/q2-checkbox-group.js +1 -1
  346. package/dist/components/q2-checkbox-group.js.map +1 -1
  347. package/dist/components/q2-checkbox2.js +20 -20
  348. package/dist/components/q2-checkbox2.js.map +1 -1
  349. package/dist/components/q2-currency.js +1 -1
  350. package/dist/components/q2-detail.js +1 -1
  351. package/dist/components/q2-file-picker.js +1 -1
  352. package/dist/components/q2-file-picker.js.map +1 -1
  353. package/dist/components/q2-form.d.ts +11 -0
  354. package/dist/components/q2-form.js +39 -0
  355. package/dist/components/q2-form.js.map +1 -0
  356. package/dist/components/q2-formatted-text.js +1 -1
  357. package/dist/components/q2-input2.js +5 -4
  358. package/dist/components/q2-input2.js.map +1 -1
  359. package/dist/components/q2-item2.js +1 -1
  360. package/dist/components/q2-legend2.js +2 -2
  361. package/dist/components/q2-legend2.js.map +1 -1
  362. package/dist/components/q2-list2.js +1 -1
  363. package/dist/components/q2-loc.js +22 -33
  364. package/dist/components/q2-loc.js.map +1 -1
  365. package/dist/components/q2-message2.js +1 -1
  366. package/dist/components/q2-modal.d.ts +11 -0
  367. package/dist/components/q2-modal.js +231 -0
  368. package/dist/components/q2-modal.js.map +1 -0
  369. package/dist/components/q2-month-picker.js +2 -2
  370. package/dist/components/q2-optgroup2.js +1 -1
  371. package/dist/components/q2-option2.js +23 -25
  372. package/dist/components/q2-option2.js.map +1 -1
  373. package/dist/components/q2-pagination.js +3 -3
  374. package/dist/components/q2-pill.js +1 -1
  375. package/dist/components/q2-popover2.js +1 -1
  376. package/dist/components/q2-radio-group.js +1 -1
  377. package/dist/components/q2-radio-group.js.map +1 -1
  378. package/dist/components/q2-relative-time.js +1 -1
  379. package/dist/components/q2-resize-observer2.js +2 -2
  380. package/dist/components/q2-resize-observer2.js.map +1 -1
  381. package/dist/components/q2-section.js +2 -2
  382. package/dist/components/q2-select2.js +9 -5
  383. package/dist/components/q2-select2.js.map +1 -1
  384. package/dist/components/q2-stepper-vertical.js +1 -1
  385. package/dist/components/q2-stepper.js +1 -1
  386. package/dist/components/q2-tab-container.js +1 -1
  387. package/dist/components/q2-tab-pane.js +1 -1
  388. package/dist/components/q2-tag.js +50 -8
  389. package/dist/components/q2-tag.js.map +1 -1
  390. package/dist/components/q2-textarea.js +2 -2
  391. package/dist/components/q2-textarea.js.map +1 -1
  392. package/dist/components/q2-tooltip.js +1 -1
  393. package/dist/components/q2-tooltip.js.map +1 -1
  394. package/dist/components/sanitize-html-string.js +1364 -0
  395. package/dist/components/sanitize-html-string.js.map +1 -0
  396. package/dist/components/tecton-tab-pane.js +2 -2
  397. package/dist/esm/{index-504f1a9e.js → index-f2a66217.js} +3 -2
  398. package/dist/esm/index-f2a66217.js.map +1 -0
  399. package/dist/esm/loader.js +1 -1
  400. package/dist/esm/q2-action-group.entry.js +45 -14
  401. package/dist/esm/q2-action-group.entry.js.map +1 -1
  402. package/dist/esm/q2-action-sheet.entry.js +3 -1363
  403. package/dist/esm/q2-action-sheet.entry.js.map +1 -1
  404. package/dist/esm/q2-avatar.entry.js +1 -1
  405. package/dist/esm/q2-badge_7.entry.js +59 -22
  406. package/dist/esm/q2-badge_7.entry.js.map +1 -1
  407. package/dist/esm/q2-calendar.entry.js +2 -2
  408. package/dist/esm/q2-calendar.entry.js.map +1 -1
  409. package/dist/esm/q2-card.entry.js +1 -1
  410. package/dist/esm/q2-carousel-pane.entry.js +3 -3
  411. package/dist/esm/q2-carousel.entry.js +1 -1
  412. package/dist/esm/q2-chart-area.entry.js +2 -2
  413. package/dist/esm/q2-chart-bar.entry.js +2 -2
  414. package/dist/esm/q2-chart-donut.entry.js +2 -2
  415. package/dist/esm/q2-checkbox-group.entry.js +2 -2
  416. package/dist/esm/q2-checkbox-group.entry.js.map +1 -1
  417. package/dist/esm/q2-checkbox.entry.js +21 -21
  418. package/dist/esm/q2-checkbox.entry.js.map +1 -1
  419. package/dist/esm/q2-currency.entry.js +1 -1
  420. package/dist/esm/q2-data-table.entry.js +1 -1
  421. package/dist/esm/q2-detail.entry.js +2 -2
  422. package/dist/esm/q2-dropdown-item.entry.js +1 -1
  423. package/dist/esm/q2-dropdown.entry.js +1 -1
  424. package/dist/esm/q2-editable-field.entry.js +1 -1
  425. package/dist/esm/q2-file-picker.entry.js +2 -2
  426. package/dist/esm/q2-file-picker.entry.js.map +1 -1
  427. package/dist/esm/q2-form.entry.js +19 -0
  428. package/dist/esm/q2-form.entry.js.map +1 -0
  429. package/dist/esm/q2-formatted-text.entry.js +1 -1
  430. package/dist/esm/q2-item_3.entry.js +3 -3
  431. package/dist/esm/q2-legend.entry.js +2 -2
  432. package/dist/esm/q2-legend.entry.js.map +1 -1
  433. package/dist/esm/q2-loc.entry.js +21 -27
  434. package/dist/esm/q2-loc.entry.js.map +1 -1
  435. package/dist/esm/q2-message.entry.js +2 -2
  436. package/dist/esm/q2-modal.entry.js +168 -0
  437. package/dist/esm/q2-modal.entry.js.map +1 -0
  438. package/dist/esm/q2-month-picker.entry.js +3 -3
  439. package/dist/esm/q2-optgroup.entry.js +2 -2
  440. package/dist/esm/q2-option-list_2.entry.js +2 -2
  441. package/dist/esm/q2-option.entry.js +22 -24
  442. package/dist/esm/q2-option.entry.js.map +1 -1
  443. package/dist/esm/q2-pagination.entry.js +4 -4
  444. package/dist/esm/q2-pill.entry.js +2 -2
  445. package/dist/esm/q2-radio-group.entry.js +2 -2
  446. package/dist/esm/q2-radio-group.entry.js.map +1 -1
  447. package/dist/esm/q2-radio.entry.js +1 -1
  448. package/dist/esm/q2-relative-time.entry.js +2 -2
  449. package/dist/esm/q2-resize-observer.entry.js +2 -2
  450. package/dist/esm/q2-resize-observer.entry.js.map +1 -1
  451. package/dist/esm/q2-section.entry.js +3 -3
  452. package/dist/esm/q2-select.entry.js +10 -6
  453. package/dist/esm/q2-select.entry.js.map +1 -1
  454. package/dist/esm/q2-stepper-pane.entry.js +1 -1
  455. package/dist/esm/q2-stepper-vertical.entry.js +2 -2
  456. package/dist/esm/q2-stepper.entry.js +2 -2
  457. package/dist/esm/q2-tag.entry.js +51 -9
  458. package/dist/esm/q2-tag.entry.js.map +1 -1
  459. package/dist/esm/q2-tecton-elements.js +1 -1
  460. package/dist/esm/q2-textarea.entry.js +3 -3
  461. package/dist/esm/q2-textarea.entry.js.map +1 -1
  462. package/dist/esm/q2-tooltip.entry.js +2 -2
  463. package/dist/esm/q2-tooltip.entry.js.map +1 -1
  464. package/dist/esm/sanitize-html-string-735c19f5.js +1364 -0
  465. package/dist/esm/sanitize-html-string-735c19f5.js.map +1 -0
  466. package/dist/esm/tecton-tab-pane.entry.js +2 -2
  467. package/dist/jest.setup.js +22 -0
  468. package/dist/jest.setup.js.map +1 -0
  469. package/dist/q2-tecton-elements/{index-504f1a9e.js → index-f2a66217.js} +9 -8
  470. package/dist/q2-tecton-elements/index-f2a66217.js.map +1 -0
  471. package/dist/q2-tecton-elements/q2-action-group.entry.js +49 -17
  472. package/dist/q2-tecton-elements/q2-action-group.entry.js.map +1 -1
  473. package/dist/q2-tecton-elements/q2-action-sheet.entry.js +121 -1331
  474. package/dist/q2-tecton-elements/q2-action-sheet.entry.js.map +1 -1
  475. package/dist/q2-tecton-elements/q2-avatar.entry.js +6 -6
  476. package/dist/q2-tecton-elements/q2-badge_7.entry.js +199 -164
  477. package/dist/q2-tecton-elements/q2-badge_7.entry.js.map +1 -1
  478. package/dist/q2-tecton-elements/q2-calendar.entry.js +180 -180
  479. package/dist/q2-tecton-elements/q2-calendar.entry.js.map +1 -1
  480. package/dist/q2-tecton-elements/q2-card.entry.js +1 -1
  481. package/dist/q2-tecton-elements/q2-carousel-pane.entry.js +21 -21
  482. package/dist/q2-tecton-elements/q2-carousel.entry.js +1 -1
  483. package/dist/q2-tecton-elements/q2-chart-area.entry.js +3 -3
  484. package/dist/q2-tecton-elements/q2-chart-bar.entry.js +3 -3
  485. package/dist/q2-tecton-elements/q2-chart-donut.entry.js +7 -7
  486. package/dist/q2-tecton-elements/q2-checkbox-group.entry.js +5 -5
  487. package/dist/q2-tecton-elements/q2-checkbox-group.entry.js.map +1 -1
  488. package/dist/q2-tecton-elements/q2-checkbox.entry.js +92 -88
  489. package/dist/q2-tecton-elements/q2-checkbox.entry.js.map +1 -1
  490. package/dist/q2-tecton-elements/q2-currency.entry.js +6 -6
  491. package/dist/q2-tecton-elements/q2-data-table.entry.js +1 -1
  492. package/dist/q2-tecton-elements/q2-detail.entry.js +39 -39
  493. package/dist/q2-tecton-elements/q2-dropdown-item.entry.js +1 -1
  494. package/dist/q2-tecton-elements/q2-dropdown.entry.js +1 -1
  495. package/dist/q2-tecton-elements/q2-editable-field.entry.js +1 -1
  496. package/dist/q2-tecton-elements/q2-file-picker.entry.js +2 -2
  497. package/dist/q2-tecton-elements/q2-file-picker.entry.js.map +1 -1
  498. package/dist/q2-tecton-elements/q2-form.entry.js +25 -0
  499. package/dist/q2-tecton-elements/q2-form.entry.js.map +1 -0
  500. package/dist/q2-tecton-elements/q2-formatted-text.entry.js +2 -2
  501. package/dist/q2-tecton-elements/q2-item_3.entry.js +22 -22
  502. package/dist/q2-tecton-elements/q2-legend.entry.js +6 -6
  503. package/dist/q2-tecton-elements/q2-legend.entry.js.map +1 -1
  504. package/dist/q2-tecton-elements/q2-loc.entry.js +23 -32
  505. package/dist/q2-tecton-elements/q2-loc.entry.js.map +1 -1
  506. package/dist/q2-tecton-elements/q2-message.entry.js +21 -21
  507. package/dist/q2-tecton-elements/q2-modal.entry.js +226 -0
  508. package/dist/q2-tecton-elements/q2-modal.entry.js.map +1 -0
  509. package/dist/q2-tecton-elements/q2-month-picker.entry.js +14 -14
  510. package/dist/q2-tecton-elements/q2-optgroup.entry.js +8 -8
  511. package/dist/q2-tecton-elements/q2-option-list_2.entry.js +4 -4
  512. package/dist/q2-tecton-elements/q2-option.entry.js +38 -38
  513. package/dist/q2-tecton-elements/q2-option.entry.js.map +1 -1
  514. package/dist/q2-tecton-elements/q2-pagination.entry.js +38 -38
  515. package/dist/q2-tecton-elements/q2-pill.entry.js +14 -14
  516. package/dist/q2-tecton-elements/q2-radio-group.entry.js +28 -28
  517. package/dist/q2-tecton-elements/q2-radio-group.entry.js.map +1 -1
  518. package/dist/q2-tecton-elements/q2-radio.entry.js +1 -1
  519. package/dist/q2-tecton-elements/q2-relative-time.entry.js +5 -5
  520. package/dist/q2-tecton-elements/q2-resize-observer.entry.js +5 -2
  521. package/dist/q2-tecton-elements/q2-resize-observer.entry.js.map +1 -1
  522. package/dist/q2-tecton-elements/q2-section.entry.js +19 -19
  523. package/dist/q2-tecton-elements/q2-select.entry.js +13 -9
  524. package/dist/q2-tecton-elements/q2-select.entry.js.map +1 -1
  525. package/dist/q2-tecton-elements/q2-stepper-pane.entry.js +1 -1
  526. package/dist/q2-tecton-elements/q2-stepper-vertical.entry.js +5 -5
  527. package/dist/q2-tecton-elements/q2-stepper.entry.js +22 -22
  528. package/dist/q2-tecton-elements/q2-tag.entry.js +84 -45
  529. package/dist/q2-tecton-elements/q2-tag.entry.js.map +1 -1
  530. package/dist/q2-tecton-elements/q2-tecton-elements.esm.js +1 -1
  531. package/dist/q2-tecton-elements/q2-tecton-elements.esm.js.map +1 -1
  532. package/dist/q2-tecton-elements/q2-textarea.entry.js +4 -4
  533. package/dist/q2-tecton-elements/q2-textarea.entry.js.map +1 -1
  534. package/dist/q2-tecton-elements/q2-tooltip.entry.js +2 -2
  535. package/dist/q2-tecton-elements/q2-tooltip.entry.js.map +1 -1
  536. package/dist/q2-tecton-elements/sanitize-html-string-735c19f5.js +1214 -0
  537. package/dist/q2-tecton-elements/sanitize-html-string-735c19f5.js.map +1 -0
  538. package/dist/q2-tecton-elements/tecton-tab-pane.entry.js +9 -9
  539. package/dist/types/builds/q2e/development/tecton/tecton/packages/q2-tecton-elements/.stencil/jest.setup.d.ts +1 -0
  540. package/dist/types/components/q2-action-group/q2-action-group.d.ts +5 -2
  541. package/dist/types/components/q2-badge/q2-badge.d.ts +17 -3
  542. package/dist/types/components/q2-checkbox/q2-checkbox.d.ts +3 -3
  543. package/dist/types/components/q2-form/q2-form.d.ts +6 -0
  544. package/dist/types/components/q2-loc/q2-loc.d.ts +5 -5
  545. package/dist/types/components/q2-modal/q2-modal.d.ts +80 -0
  546. package/dist/types/components/q2-option/q2-option.d.ts +4 -4
  547. package/dist/types/components/q2-select/q2-select.d.ts +1 -0
  548. package/dist/types/components/q2-tag/q2-tag.d.ts +19 -0
  549. package/dist/types/components.d.ts +182 -6
  550. package/dist/types/util.d.ts +1 -8
  551. package/dist/types/utils/helpers.d.ts +1 -13
  552. package/dist/types/utils/index.d.ts +3 -2
  553. package/package.json +3 -3
  554. package/dist/cjs/index-76f63767.js.map +0 -1
  555. package/dist/collection/components/q2-action-group/test/q2-action-group.e2e.js +0 -166
  556. package/dist/collection/components/q2-action-group/test/q2-action-group.e2e.js.map +0 -1
  557. package/dist/collection/components/q2-action-group/test/q2-action-group.spec.js.map +0 -1
  558. package/dist/esm/index-504f1a9e.js.map +0 -1
  559. package/dist/q2-tecton-elements/index-504f1a9e.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"q2-popover-test.spec.js","sourceRoot":"","sources":["../../../../src/components/q2-popover/test/q2-popover-test.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE1C,QAAQ,CAAC,SAAS,EAAE,GAAG,EAAE;IACrB,IAAI,WAAsB,CAAC;IAE3B,MAAM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a,GAAG,MAAM,CAAC;gBACzC,MAAM,WAAW,CAAC,cAAc,EAAE,CAAC;gBACnC,MAAM,CAAC,WAAW,CAAC,eAAe,CAAC,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC;YAChE,CAAC,CAAC,CAAC;YAEH,EAAE,CAAC,2DAA2D,EAAE,KAAK,IAAI,EAAE;gBACvE,iBAAiB,CAAC,UAAU,GAAG,WAAW,CAAC;gBAC3C,MAAM,WAAW,CAAC,cAAc,EAAE,CAAC;gBACnC,MAAM,CAAC,WAAW,CAAC,eAAe,CAAC,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC;YAChE,CAAC,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC","sourcesContent":["import { newSpecPage } from '@stencil/core/testing';\nimport { Q2Popover } from '../q2-popover';\n\ndescribe('popover', () => {\n let specPopover: Q2Popover;\n\n const samplePlatformDimensions = {\n scrollY: 0,\n innerHeight: 800,\n innerWidth: 600,\n outletOffset: 20,\n };\n\n const sampleTectonWindow = {\n inMobileApp: false,\n noStrings: false,\n platformUrl: '',\n platformDimensions: samplePlatformDimensions,\n };\n\n describe('Props', () => {\n describe('mode', () => {\n it('does not add the legacy class on the container (default)', async () => {\n const page = await newSpecPage({\n components: [Q2Popover],\n html: `<q2-popover></q2-popover>`,\n });\n expect(page.root.shadowRoot.firstElementChild.classList.contains('legacy')).toBeFalsy();\n });\n\n it('adds the legacy class on the container when mode is \"legacy\"', async () => {\n const page = await newSpecPage({\n components: [Q2Popover],\n html: `<q2-popover mode=\"legacy\"></q2-popover>`,\n });\n expect(page.root.shadowRoot.firstElementChild.classList.contains('legacy')).toBeTruthy();\n });\n });\n });\n\n describe('Methods', () => {\n beforeEach(() => {\n specPopover = new Q2Popover();\n });\n\n describe('toggle', () => {\n it('sets open to true when open is false', async () => {\n specPopover.open = false;\n await specPopover.toggle();\n expect(specPopover.open).toBe(true);\n });\n\n it('sets open to false when open is true', async () => {\n specPopover.open = true;\n await specPopover.toggle();\n expect(specPopover.open).toBe(false);\n });\n });\n\n describe('scrollContainerTo', () => {\n it('scrolls the container to the given position', async () => {\n const containerElement = document.createElement('div');\n containerElement.scrollTo = jest.fn();\n specPopover.containerElement = containerElement;\n await specPopover.scrollContainerTo({ top: 100, left: 50 });\n expect(containerElement.scrollTo).toHaveBeenCalledWith({ top: 100, left: 50 });\n });\n });\n });\n\n describe('Getters', () => {\n beforeEach(() => {\n specPopover = new Q2Popover();\n });\n\n describe('actualDirection', () => {\n it('returns direction when \"up\"', async () => {\n specPopover.direction = 'up';\n expect(specPopover.providedDirection).toBe('up');\n });\n\n it('returns direction when \"down\"', async () => {\n specPopover.direction = 'down';\n expect(specPopover.providedDirection).toBe('down');\n });\n\n it('returns undefined when not \"up\" or \"down\"', async () => {\n (specPopover.direction as any) = 'bottom';\n expect(specPopover.providedDirection).toBeUndefined();\n });\n });\n\n describe('isModule', () => {\n it('returns false when window top matches window and platformDimensions is not defined', async () => {\n expect(window.top).toBe(window);\n expect(window.Tecton).toBeUndefined();\n expect(specPopover.isModule).toBe(false);\n });\n\n it('returns false when window top does not match window and platformDimensions is not defined', async () => {\n const windowSpy = jest.spyOn(window, 'top', 'get').mockReturnValue({} as any);\n expect(window.top).not.toEqual(window);\n expect(window.Tecton).toBeUndefined();\n expect(specPopover.isModule).toBe(false);\n windowSpy.mockRestore();\n });\n\n it('returns false when window top matches window and platformDimensions is defined', async () => {\n window.Tecton = sampleTectonWindow;\n expect(window.top).toBe(window);\n expect(window.Tecton.platformDimensions).toBeTruthy();\n expect(specPopover.isModule).toBe(false);\n });\n\n it('returns true when window top does not match window and platformDimensions is defined', async () => {\n const windowSpy = jest.spyOn(window, 'top', 'get').mockReturnValue({} as any);\n window.Tecton = sampleTectonWindow;\n expect(specPopover.isModule).toBe(true);\n windowSpy.mockRestore();\n });\n });\n });\n\n describe('when in a module', () => {\n let specPopover: Q2Popover;\n let windowSpy: jest.SpyInstance;\n let controlElement: HTMLDivElement;\n let containerElement: HTMLDivElement;\n\n beforeEach(async () => {\n specPopover = new Q2Popover();\n windowSpy = jest.spyOn(window, 'top', 'get').mockReturnValue({} as any);\n window.Tecton = sampleTectonWindow;\n expect(specPopover.isModule).toBe(true);\n\n controlElement = document.createElement('div');\n specPopover.controlElement = controlElement;\n\n containerElement = document.createElement('div');\n specPopover.containerElement = containerElement;\n });\n\n afterEach(() => {\n windowSpy.mockRestore();\n });\n\n describe(\"when the module is taller than the window's viewport\", () => {\n beforeEach(() => {\n specPopover.open = true;\n window.visualViewport = { height: 1200 } as any;\n });\n\n it('sets the direction to down when control element has more space below it', async () => {\n const controlSpy = jest.spyOn(controlElement, 'getBoundingClientRect').mockReturnValue({\n top: 20,\n bottom: 70,\n } as any);\n await specPopover.determinePopDirection();\n\n expect(containerElement.style.getPropertyValue('--comp-pop-max-height')).toBe('700px');\n expect(specPopover.currentDirection).toBe('down');\n\n controlSpy.mockRestore();\n });\n\n it('sets the direction to up when control element has more space above it', async () => {\n const controlSpy = jest.spyOn(controlElement, 'getBoundingClientRect').mockReturnValue({\n top: 600,\n bottom: 650,\n } as any);\n await specPopover.determinePopDirection();\n\n expect(containerElement.style.getPropertyValue('--comp-pop-max-height')).toBe('590px');\n expect(specPopover.currentDirection).toBe('up');\n\n controlSpy.mockRestore();\n });\n\n describe('when the outletOffset is less than 0', () => {\n beforeEach(() => {\n window.Tecton = {\n ...sampleTectonWindow,\n platformDimensions: { ...samplePlatformDimensions, outletOffset: -50 },\n };\n });\n\n it('sets the direction to down when control element has more space below it', async () => {\n const controlSpy = jest.spyOn(controlElement, 'getBoundingClientRect').mockReturnValue({\n top: 20,\n bottom: 70,\n } as any);\n await specPopover.determinePopDirection();\n\n expect(containerElement.style.getPropertyValue('--comp-pop-max-height')).toBe('770px');\n expect(specPopover.currentDirection).toBe('down');\n\n controlSpy.mockRestore();\n });\n\n it('sets the direction to up when control element has more space above it', async () => {\n const controlSpy = jest.spyOn(controlElement, 'getBoundingClientRect').mockReturnValue({\n top: 600,\n bottom: 650,\n } as any);\n await specPopover.determinePopDirection();\n\n expect(containerElement.style.getPropertyValue('--comp-pop-max-height')).toBe('540px');\n expect(specPopover.currentDirection).toBe('up');\n\n controlSpy.mockRestore();\n });\n });\n });\n\n describe(\"when the module is shorter than the window's viewport\", () => {\n beforeEach(() => {\n specPopover.open = true;\n window.visualViewport = { height: 600 } as any;\n });\n\n it('sets the direction to down when control element has more space below it', async () => {\n const controlSpy = jest.spyOn(controlElement, 'getBoundingClientRect').mockReturnValue({\n top: 20,\n bottom: 70,\n } as any);\n await specPopover.determinePopDirection();\n\n expect(containerElement.style.getPropertyValue('--comp-pop-max-height')).toBe('520px');\n expect(specPopover.currentDirection).toBe('down');\n\n controlSpy.mockRestore();\n });\n\n it('sets the direction to up when control element has more space above it', async () => {\n const controlSpy = jest.spyOn(controlElement, 'getBoundingClientRect').mockReturnValue({\n top: 500,\n bottom: 550,\n } as any);\n await specPopover.determinePopDirection();\n\n expect(containerElement.style.getPropertyValue('--comp-pop-max-height')).toBe('490px');\n expect(specPopover.currentDirection).toBe('up');\n\n controlSpy.mockRestore();\n });\n });\n });\n\n describe('viewPortChanged', () => {\n let specPopover: Q2Popover;\n let windowSpy: jest.SpyInstance;\n\n beforeEach(() => {\n specPopover = new Q2Popover();\n windowSpy = jest.spyOn(window, 'top', 'get').mockReturnValue({} as any);\n window.Tecton = sampleTectonWindow;\n expect(specPopover.isModule).toBe(true);\n specPopover.determinePopDirection = jest.fn();\n });\n\n afterEach(() => {\n windowSpy.mockRestore();\n });\n\n it('calls determinePopDirection when open is true', async () => {\n specPopover.open = true;\n await specPopover.viewPortChanged();\n expect(specPopover.determinePopDirection).toHaveBeenCalled();\n });\n\n it('does nothing when open is false', async () => {\n specPopover.open = false;\n await specPopover.viewPortChanged();\n expect(specPopover.determinePopDirection).not.toHaveBeenCalled();\n });\n });\n\n describe('viewPortOrientationChanged', () => {\n let specPopover: Q2Popover;\n\n beforeEach(() => {\n specPopover = new Q2Popover();\n specPopover.viewPortChanged = jest.fn();\n });\n\n it('sets orientationChanged to true and calls viewportChanged', async () => {\n await specPopover.viewPortOrientationChanged();\n expect(specPopover.orientationChanged).toBe(true);\n expect(specPopover.viewPortChanged).toHaveBeenCalled();\n });\n });\n\n describe('setFixedCSSProperties', () => {\n let specPopover: Q2Popover;\n let containerElement: HTMLDivElement;\n\n beforeEach(() => {\n window.visualViewport = { width: 800, height: 600 } as VisualViewport;\n specPopover = new Q2Popover();\n containerElement = document.createElement('div');\n specPopover.containerElement = containerElement;\n specPopover.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 const controlElement = document.createElement('div');\n controlElement.getBoundingClientRect = jest.fn().mockReturnValue({\n top: 20,\n bottom: 70,\n left: 30,\n right: 80,\n } as DOMRect);\n specPopover.controlElement = controlElement;\n });\n\n it('sets the necessary CSS properties', async () => {\n await specPopover.setFixedCSSProperties();\n expect(containerElement.style.getPropertyValue('--comp-pop-max-height')).toBeFalsy();\n expect(containerElement.style.getPropertyValue('--comp-pop-top')).toBeFalsy();\n expect(containerElement.style.getPropertyValue('--comp-pop-bottom')).toBeFalsy();\n expect(containerElement.style.getPropertyValue('--comp-pop-left')).toBe('30px');\n expect(containerElement.style.getPropertyValue('--comp-pop-right')).toBe('720px');\n expect(containerElement.style.getPropertyValue('--comp-pop-width')).toBeFalsy();\n expect(containerElement.style.getPropertyValue('--comp-pop-opacity')).toBe('1');\n });\n\n it('sets --comp-pop-bottom when direction is up', async () => {\n specPopover.currentDirection = 'up';\n await specPopover.setFixedCSSProperties();\n expect(containerElement.style.getPropertyValue('--comp-pop-top')).toBeFalsy();\n expect(containerElement.style.getPropertyValue('--comp-pop-bottom')).toBe('580px');\n });\n\n it('sets --comp-pop-top when direction is down', async () => {\n specPopover.currentDirection = 'down';\n await specPopover.setFixedCSSProperties();\n expect(containerElement.style.getPropertyValue('--comp-pop-top')).toBe('70px');\n expect(containerElement.style.getPropertyValue('--comp-pop-bottom')).toBeFalsy();\n });\n\n it('sets --comp-pop-width when block is true', async () => {\n specPopover.block = true;\n await specPopover.setFixedCSSProperties();\n expect(containerElement.style.getPropertyValue('--comp-pop-width')).toBe('0px');\n });\n\n describe('when rootElementRect is bonkers', () => {\n beforeEach(() => {\n specPopover.rootElementRect = {\n top: 50,\n bottom: 650,\n left: 50,\n right: 750,\n height: 600,\n width: 700,\n } as DOMRect;\n const controlElement = document.createElement('div');\n controlElement.getBoundingClientRect = jest.fn().mockReturnValue({\n top: 70,\n bottom: 120,\n left: 80,\n right: 130,\n } as DOMRect);\n specPopover.controlElement = controlElement;\n });\n\n it('sets the necessary CSS properties', async () => {\n await specPopover.setFixedCSSProperties();\n expect(containerElement.style.getPropertyValue('--comp-pop-max-height')).toBeFalsy();\n expect(containerElement.style.getPropertyValue('--comp-pop-top')).toBeFalsy();\n expect(containerElement.style.getPropertyValue('--comp-pop-bottom')).toBeFalsy();\n expect(containerElement.style.getPropertyValue('--comp-pop-left')).toBe('30px');\n expect(containerElement.style.getPropertyValue('--comp-pop-right')).toBe('620px');\n expect(containerElement.style.getPropertyValue('--comp-pop-width')).toBeFalsy();\n expect(containerElement.style.getPropertyValue('--comp-pop-opacity')).toBe('1');\n });\n\n it('sets --comp-pop-bottom when direction is up', async () => {\n specPopover.currentDirection = 'up';\n await specPopover.setFixedCSSProperties();\n expect(containerElement.style.getPropertyValue('--comp-pop-top')).toBeFalsy();\n expect(containerElement.style.getPropertyValue('--comp-pop-bottom')).toBe('580px');\n });\n\n it('sets --comp-pop-top when direction is down', async () => {\n specPopover.currentDirection = 'down';\n await specPopover.setFixedCSSProperties();\n expect(containerElement.style.getPropertyValue('--comp-pop-top')).toBe('70px');\n expect(containerElement.style.getPropertyValue('--comp-pop-bottom')).toBeFalsy();\n });\n\n it('sets --comp-pop-width when block is true', async () => {\n specPopover.block = true;\n await specPopover.setFixedCSSProperties();\n expect(containerElement.style.getPropertyValue('--comp-pop-width')).toBe('0px');\n });\n });\n });\n\n describe('setAbsoluteCSSProperties', () => {\n let specPopover: Q2Popover;\n let containerElement: HTMLDivElement;\n\n beforeEach(() => {\n specPopover = new Q2Popover();\n containerElement = document.createElement('div');\n specPopover.mode = 'legacy';\n specPopover.containerElement = containerElement;\n\n const controlElement = document.createElement('div');\n controlElement.getBoundingClientRect = jest.fn().mockReturnValue({\n top: 20,\n bottom: 70,\n left: 30,\n right: 80,\n } as DOMRect);\n specPopover.controlElement = controlElement;\n window.visualViewport = { width: 800, height: 600 } as VisualViewport;\n });\n\n it('sets the necessary CSS properties', async () => {\n await specPopover.setAbsoluteCSSProperties();\n expect(containerElement.style.getPropertyValue('--comp-pop-max-height')).toBeFalsy();\n expect(containerElement.style.getPropertyValue('--comp-pop-top')).toBeFalsy();\n expect(containerElement.style.getPropertyValue('--comp-pop-bottom')).toBeFalsy();\n expect(containerElement.style.getPropertyValue('--comp-pop-left')).toBe('0');\n expect(containerElement.style.getPropertyValue('--comp-pop-right')).toBe('unset');\n expect(containerElement.style.getPropertyValue('--comp-pop-width')).toBe('');\n expect(containerElement.style.getPropertyValue('--comp-pop-opacity')).toBe('1');\n });\n\n it('sets the necessary CSS properties when align is right', async () => {\n specPopover.align = 'right';\n await specPopover.setAbsoluteCSSProperties();\n expect(containerElement.style.getPropertyValue('--comp-pop-left')).toBe('unset');\n expect(containerElement.style.getPropertyValue('--comp-pop-right')).toBe('0');\n });\n\n it('sets --comp-pop-bottom when direction is up', async () => {\n specPopover.currentDirection = 'up';\n await specPopover.setAbsoluteCSSProperties();\n expect(containerElement.style.getPropertyValue('--comp-pop-top')).toBeFalsy();\n expect(containerElement.style.getPropertyValue('--comp-pop-bottom')).toBe('0px');\n });\n\n it('does not set --comp-pop-top when direction is down', async () => {\n specPopover.currentDirection = 'down';\n await specPopover.setAbsoluteCSSProperties();\n expect(containerElement.style.getPropertyValue('--comp-pop-top')).toBe('');\n expect(containerElement.style.getPropertyValue('--comp-pop-bottom')).toBe('');\n });\n\n it('sets --comp-pop-width when block is true', async () => {\n specPopover.block = true;\n await specPopover.setAbsoluteCSSProperties();\n expect(containerElement.style.getPropertyValue('--comp-pop-width')).toBe('100%');\n });\n });\n\n describe('clearCSSProperties', () => {\n let specPopover: Q2Popover;\n let containerElement: HTMLDivElement;\n\n beforeEach(() => {\n specPopover = new Q2Popover();\n containerElement = document.createElement('div');\n containerElement.style.setProperty('--comp-pop-max-height', '100px');\n containerElement.style.setProperty('--comp-pop-top', '20px');\n containerElement.style.setProperty('--comp-pop-bottom', '25px');\n containerElement.style.setProperty('--comp-pop-left', '30px');\n containerElement.style.setProperty('--comp-pop-right', '35px');\n containerElement.style.setProperty('--comp-pop-width', '200px');\n containerElement.style.setProperty('--comp-pop-opacity', '1');\n specPopover.containerElement = containerElement;\n });\n\n it('clears the necessary CSS properties', async () => {\n await specPopover.clearCSSProperties();\n expect(containerElement.style.getPropertyValue('--comp-pop-max-height')).toBeFalsy();\n expect(containerElement.style.getPropertyValue('--comp-pop-top')).toBeFalsy();\n expect(containerElement.style.getPropertyValue('--comp-pop-bottom')).toBeFalsy();\n expect(containerElement.style.getPropertyValue('--comp-pop-left')).toBeFalsy();\n expect(containerElement.style.getPropertyValue('--comp-pop-right')).toBeFalsy();\n expect(containerElement.style.getPropertyValue('--comp-pop-width')).toBeFalsy();\n expect(containerElement.style.getPropertyValue('--comp-pop-opacity')).toBeFalsy();\n });\n });\n\n describe('setDirectionAndShow', () => {\n let specPopover: Q2Popover;\n let containerElement: HTMLDivElement;\n\n beforeEach(() => {\n specPopover = new Q2Popover();\n containerElement = document.createElement('div');\n specPopover.containerElement = containerElement;\n specPopover.setRootElement = jest.fn();\n specPopover.setFixedCSSProperties = jest.fn();\n specPopover.setAbsoluteCSSProperties = jest.fn();\n specPopover.scrollContainerTo = jest.fn();\n });\n\n it('does nothing when open is false', async () => {\n specPopover.open = false;\n await specPopover.setDirectionAndShow('up');\n expect(specPopover.currentDirection).toBeUndefined();\n expect(specPopover.show).toBe(false);\n expect(specPopover.setRootElement).toHaveBeenCalled();\n expect(specPopover.setFixedCSSProperties).not.toHaveBeenCalled();\n expect(specPopover.setAbsoluteCSSProperties).not.toHaveBeenCalled();\n });\n\n describe('when open is true', () => {\n beforeEach(() => {\n specPopover.open = true;\n });\n\n it('sets the direction, shows the popover, and sets fixed position properties', async () => {\n await specPopover.setDirectionAndShow('up');\n expect(specPopover.currentDirection).toBe('up');\n expect(specPopover.show).toBe(true);\n expect(specPopover.setRootElement).toHaveBeenCalled();\n expect(specPopover.setFixedCSSProperties).toHaveBeenCalled();\n expect(specPopover.setAbsoluteCSSProperties).not.toHaveBeenCalled();\n });\n\n it('sets the direction, shows the popover, and sets absolute position properties when mode is \"legacy\"', async () => {\n specPopover.mode = 'legacy';\n await specPopover.setDirectionAndShow('up');\n expect(specPopover.currentDirection).toBe('up');\n expect(specPopover.show).toBe(true);\n expect(specPopover.setRootElement).toHaveBeenCalled();\n expect(specPopover.setFixedCSSProperties).not.toHaveBeenCalled();\n expect(specPopover.setAbsoluteCSSProperties).toHaveBeenCalled();\n });\n });\n });\n\n describe('determinePopDirection', () => {\n let specPopover: Q2Popover;\n let controlElement: HTMLDivElement;\n let containerElement: HTMLDivElement;\n\n beforeEach(() => {\n specPopover = new Q2Popover();\n controlElement = document.createElement('div');\n containerElement = document.createElement('div');\n specPopover.controlElement = controlElement;\n specPopover.containerElement = containerElement;\n window.visualViewport = { width: 800, height: 600 } as VisualViewport;\n specPopover.setDirectionAndShow = jest.fn();\n });\n\n it('sets the direction to up when control element has more space above it', async () => {\n const controlSpy = jest.spyOn(controlElement, 'getBoundingClientRect').mockReturnValue({\n top: 500,\n bottom: 550,\n } as DOMRect);\n await specPopover.determinePopDirection();\n\n expect(containerElement.style.getPropertyValue('--comp-pop-max-height')).toBe('490px');\n expect(specPopover.setDirectionAndShow).toHaveBeenCalledWith('up');\n\n controlSpy.mockRestore();\n });\n\n it('sets the direction to down when control element has more space below it', async () => {\n const controlSpy = jest.spyOn(controlElement, 'getBoundingClientRect').mockReturnValue({\n top: 100,\n bottom: 150,\n } as DOMRect);\n await specPopover.determinePopDirection();\n\n expect(containerElement.style.getPropertyValue('--comp-pop-max-height')).toBe('440px');\n expect(specPopover.setDirectionAndShow).toHaveBeenCalledWith('down');\n\n controlSpy.mockRestore();\n });\n });\n\n describe('openChanged', () => {\n beforeEach(() => {\n specPopover = new Q2Popover();\n specPopover.setRootElement = jest.fn();\n specPopover.addViewportListeners = jest.fn();\n specPopover.determinePopDirection = jest.fn();\n specPopover.removeViewportListeners = jest.fn();\n specPopover.clearCSSProperties = jest.fn();\n });\n\n it('sets open to true when open is false', async () => {\n specPopover.currentDirection = 'down';\n specPopover.show = true;\n await specPopover.openChanged(true);\n expect(specPopover.currentDirection).toBe('down');\n expect(specPopover.show).toBeTruthy();\n expect(specPopover.setRootElement).toHaveBeenCalled();\n expect(specPopover.addViewportListeners).toHaveBeenCalled();\n expect(specPopover.determinePopDirection).toHaveBeenCalled();\n expect(specPopover.removeViewportListeners).not.toHaveBeenCalled();\n expect(specPopover.clearCSSProperties).not.toHaveBeenCalled();\n });\n\n it('sets open to false when open is true', async () => {\n specPopover.currentDirection = 'down';\n specPopover.show = true;\n await specPopover.openChanged(false);\n expect(specPopover.currentDirection).toBeUndefined();\n expect(specPopover.show).toBeFalsy();\n expect(specPopover.setRootElement).toHaveBeenCalled();\n expect(specPopover.addViewportListeners).not.toHaveBeenCalled();\n expect(specPopover.determinePopDirection).not.toHaveBeenCalled();\n expect(specPopover.clearCSSProperties).toHaveBeenCalled();\n expect(specPopover.clearCSSProperties).toHaveBeenCalled();\n });\n });\n\n describe('setRootElement', () => {\n let computedStyleStub: any = {};\n const popoverDOMRect = {\n top: 50,\n bottom: 125,\n left: 50,\n right: 50,\n height: 75,\n width: 700,\n } as DOMRect;\n\n beforeEach(() => {\n computedStyleStub = {\n transform: 'none',\n filter: 'none',\n perspective: 'none',\n contain: 'none',\n containerType: 'normal',\n willChange: 'auto',\n };\n window.visualViewport = { width: 800, height: 600 } as VisualViewport;\n specPopover = new Q2Popover();\n window.getComputedStyle = jest.fn().mockReturnValue(computedStyleStub);\n specPopover.hostElement.getBoundingClientRect = jest.fn().mockReturnValue(popoverDOMRect);\n });\n\n it('sets the rootElementRect by default', async () => {\n await specPopover.setRootElement();\n expect(specPopover.rootElementRect).toEqual({\n top: 0,\n bottom: 0,\n left: 0,\n right: 0,\n height: 600,\n width: 800,\n });\n });\n\n describe('when a containing block is created by applying CSS properties', () => {\n it('returns the currentElementRect when transform is applied', async () => {\n computedStyleStub.transform = 'translate(10px, 20px)';\n await specPopover.setRootElement();\n expect(specPopover.rootElementRect).toEqual(popoverDOMRect);\n });\n\n it('returns the currentElementRect when filter is applied', async () => {\n computedStyleStub.filter = 'blur(5px)';\n await specPopover.setRootElement();\n expect(specPopover.rootElementRect).toEqual(popoverDOMRect);\n });\n\n it('returns the currentElementRect when perspective is applied', async () => {\n computedStyleStub.perspective = '100px';\n await specPopover.setRootElement();\n expect(specPopover.rootElementRect).toEqual(popoverDOMRect);\n });\n\n it('returns the currentElementRect when contain is applied', async () => {\n computedStyleStub.contain = 'layout';\n await specPopover.setRootElement();\n expect(specPopover.rootElementRect).toEqual(popoverDOMRect);\n });\n\n it('returns the currentElementRect when containerType is applied', async () => {\n computedStyleStub.containerType = 'none';\n await specPopover.setRootElement();\n expect(specPopover.rootElementRect).toEqual(popoverDOMRect);\n });\n\n it('returns the currentElementRect when willChange is applied', async () => {\n computedStyleStub.willChange = 'transform';\n await specPopover.setRootElement();\n expect(specPopover.rootElementRect).toEqual(popoverDOMRect);\n });\n });\n });\n});\n"]}
1
+ {"version":3,"file":"q2-popover-test.spec.js","sourceRoot":"","sources":["../../../../../src/components/q2-popover/test/q2-popover-test.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE1C,QAAQ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AE,CAAC,8DAA8D,EAAE,KAAK,IAAI,EAAE;gBAC1E,iBAAiB,CAAC,aAAa,GAAG,MAAM,CAAC;gBACzC,MAAM,WAAW,CAAC,cAAc,EAAE,CAAC;gBACnC,MAAM,CAAC,WAAW,CAAC,eAAe,CAAC,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC;YAChE,CAAC,CAAC,CAAC;YAEH,EAAE,CAAC,2DAA2D,EAAE,KAAK,IAAI,EAAE;gBACvE,iBAAiB,CAAC,UAAU,GAAG,WAAW,CAAC;gBAC3C,MAAM,WAAW,CAAC,cAAc,EAAE,CAAC;gBACnC,MAAM,CAAC,WAAW,CAAC,eAAe,CAAC,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC;YAChE,CAAC,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC","sourcesContent":["import { newSpecPage } from '@stencil/core/testing';\nimport { Q2Popover } from '../q2-popover';\n\ndescribe('popover', () => {\n let specPopover: Q2Popover;\n\n const samplePlatformDimensions = {\n scrollY: 0,\n innerHeight: 800,\n innerWidth: 600,\n outletOffset: 20,\n };\n\n const sampleTectonWindow = {\n inMobileApp: false,\n noStrings: false,\n platformUrl: '',\n platformDimensions: samplePlatformDimensions,\n };\n\n describe('Props', () => {\n describe('mode', () => {\n it('does not add the legacy class on the container (default)', async () => {\n const page = await newSpecPage({\n components: [Q2Popover],\n html: `<q2-popover></q2-popover>`,\n });\n expect(page.root.shadowRoot.firstElementChild.classList.contains('legacy')).toBeFalsy();\n });\n\n it('adds the legacy class on the container when mode is \"legacy\"', async () => {\n const page = await newSpecPage({\n components: [Q2Popover],\n html: `<q2-popover mode=\"legacy\"></q2-popover>`,\n });\n expect(page.root.shadowRoot.firstElementChild.classList.contains('legacy')).toBeTruthy();\n });\n });\n });\n\n describe('Methods', () => {\n beforeEach(() => {\n specPopover = new Q2Popover();\n });\n\n describe('toggle', () => {\n it('sets open to true when open is false', async () => {\n specPopover.open = false;\n await specPopover.toggle();\n expect(specPopover.open).toBe(true);\n });\n\n it('sets open to false when open is true', async () => {\n specPopover.open = true;\n await specPopover.toggle();\n expect(specPopover.open).toBe(false);\n });\n });\n\n describe('scrollContainerTo', () => {\n it('scrolls the container to the given position', async () => {\n const containerElement = document.createElement('div');\n containerElement.scrollTo = jest.fn();\n specPopover.containerElement = containerElement;\n await specPopover.scrollContainerTo({ top: 100, left: 50 });\n expect(containerElement.scrollTo).toHaveBeenCalledWith({ top: 100, left: 50 });\n });\n });\n });\n\n describe('Getters', () => {\n beforeEach(() => {\n specPopover = new Q2Popover();\n });\n\n describe('actualDirection', () => {\n it('returns direction when \"up\"', async () => {\n specPopover.direction = 'up';\n expect(specPopover.providedDirection).toBe('up');\n });\n\n it('returns direction when \"down\"', async () => {\n specPopover.direction = 'down';\n expect(specPopover.providedDirection).toBe('down');\n });\n\n it('returns undefined when not \"up\" or \"down\"', async () => {\n (specPopover.direction as any) = 'bottom';\n expect(specPopover.providedDirection).toBeUndefined();\n });\n });\n\n describe('isModule', () => {\n it('returns false when window top matches window and platformDimensions is not defined', async () => {\n expect(window.top).toBe(window);\n expect(window.Tecton).toBeUndefined();\n expect(specPopover.isModule).toBe(false);\n });\n\n it('returns false when window top does not match window and platformDimensions is not defined', async () => {\n const windowSpy = jest.spyOn(window, 'top', 'get').mockReturnValue({} as any);\n expect(window.top).not.toEqual(window);\n expect(window.Tecton).toBeUndefined();\n expect(specPopover.isModule).toBe(false);\n windowSpy.mockRestore();\n });\n\n it('returns false when window top matches window and platformDimensions is defined', async () => {\n window.Tecton = sampleTectonWindow;\n expect(window.top).toBe(window);\n expect(window.Tecton.platformDimensions).toBeTruthy();\n expect(specPopover.isModule).toBe(false);\n });\n\n it('returns true when window top does not match window and platformDimensions is defined', async () => {\n const windowSpy = jest.spyOn(window, 'top', 'get').mockReturnValue({} as any);\n window.Tecton = sampleTectonWindow;\n expect(specPopover.isModule).toBe(true);\n windowSpy.mockRestore();\n });\n });\n });\n\n describe('when in a module', () => {\n let specPopover: Q2Popover;\n let windowSpy: jest.SpyInstance;\n let controlElement: HTMLDivElement;\n let containerElement: HTMLDivElement;\n\n beforeEach(async () => {\n specPopover = new Q2Popover();\n windowSpy = jest.spyOn(window, 'top', 'get').mockReturnValue({} as any);\n window.Tecton = sampleTectonWindow;\n expect(specPopover.isModule).toBe(true);\n\n controlElement = document.createElement('div');\n specPopover.controlElement = controlElement;\n\n containerElement = document.createElement('div');\n specPopover.containerElement = containerElement;\n });\n\n afterEach(() => {\n windowSpy.mockRestore();\n });\n\n describe(\"when the module is taller than the window's viewport\", () => {\n beforeEach(() => {\n specPopover.open = true;\n window.visualViewport = { height: 1200 } as any;\n });\n\n it('sets the direction to down when control element has more space below it', async () => {\n const controlSpy = jest.spyOn(controlElement, 'getBoundingClientRect').mockReturnValue({\n top: 20,\n bottom: 70,\n } as any);\n await specPopover.determinePopDirection();\n\n expect(containerElement.style.getPropertyValue('--comp-pop-max-height')).toBe('700px');\n expect(specPopover.currentDirection).toBe('down');\n\n controlSpy.mockRestore();\n });\n\n it('sets the direction to up when control element has more space above it', async () => {\n const controlSpy = jest.spyOn(controlElement, 'getBoundingClientRect').mockReturnValue({\n top: 600,\n bottom: 650,\n } as any);\n await specPopover.determinePopDirection();\n\n expect(containerElement.style.getPropertyValue('--comp-pop-max-height')).toBe('590px');\n expect(specPopover.currentDirection).toBe('up');\n\n controlSpy.mockRestore();\n });\n\n describe('when the outletOffset is less than 0', () => {\n beforeEach(() => {\n window.Tecton = {\n ...sampleTectonWindow,\n platformDimensions: { ...samplePlatformDimensions, outletOffset: -50 },\n };\n });\n\n it('sets the direction to down when control element has more space below it', async () => {\n const controlSpy = jest.spyOn(controlElement, 'getBoundingClientRect').mockReturnValue({\n top: 20,\n bottom: 70,\n } as any);\n await specPopover.determinePopDirection();\n\n expect(containerElement.style.getPropertyValue('--comp-pop-max-height')).toBe('770px');\n expect(specPopover.currentDirection).toBe('down');\n\n controlSpy.mockRestore();\n });\n\n it('sets the direction to up when control element has more space above it', async () => {\n const controlSpy = jest.spyOn(controlElement, 'getBoundingClientRect').mockReturnValue({\n top: 600,\n bottom: 650,\n } as any);\n await specPopover.determinePopDirection();\n\n expect(containerElement.style.getPropertyValue('--comp-pop-max-height')).toBe('540px');\n expect(specPopover.currentDirection).toBe('up');\n\n controlSpy.mockRestore();\n });\n });\n });\n\n describe(\"when the module is shorter than the window's viewport\", () => {\n beforeEach(() => {\n specPopover.open = true;\n window.visualViewport = { height: 600 } as any;\n });\n\n it('sets the direction to down when control element has more space below it', async () => {\n const controlSpy = jest.spyOn(controlElement, 'getBoundingClientRect').mockReturnValue({\n top: 20,\n bottom: 70,\n } as any);\n await specPopover.determinePopDirection();\n\n expect(containerElement.style.getPropertyValue('--comp-pop-max-height')).toBe('520px');\n expect(specPopover.currentDirection).toBe('down');\n\n controlSpy.mockRestore();\n });\n\n it('sets the direction to up when control element has more space above it', async () => {\n const controlSpy = jest.spyOn(controlElement, 'getBoundingClientRect').mockReturnValue({\n top: 500,\n bottom: 550,\n } as any);\n await specPopover.determinePopDirection();\n\n expect(containerElement.style.getPropertyValue('--comp-pop-max-height')).toBe('490px');\n expect(specPopover.currentDirection).toBe('up');\n\n controlSpy.mockRestore();\n });\n });\n });\n\n describe('viewPortChanged', () => {\n let specPopover: Q2Popover;\n let windowSpy: jest.SpyInstance;\n\n beforeEach(() => {\n specPopover = new Q2Popover();\n windowSpy = jest.spyOn(window, 'top', 'get').mockReturnValue({} as any);\n window.Tecton = sampleTectonWindow;\n expect(specPopover.isModule).toBe(true);\n specPopover.determinePopDirection = jest.fn();\n });\n\n afterEach(() => {\n windowSpy.mockRestore();\n });\n\n it('calls determinePopDirection when open is true', async () => {\n specPopover.open = true;\n await specPopover.viewPortChanged();\n expect(specPopover.determinePopDirection).toHaveBeenCalled();\n });\n\n it('does nothing when open is false', async () => {\n specPopover.open = false;\n await specPopover.viewPortChanged();\n expect(specPopover.determinePopDirection).not.toHaveBeenCalled();\n });\n });\n\n describe('viewPortOrientationChanged', () => {\n let specPopover: Q2Popover;\n\n beforeEach(() => {\n specPopover = new Q2Popover();\n specPopover.viewPortChanged = jest.fn();\n });\n\n it('sets orientationChanged to true and calls viewportChanged', async () => {\n await specPopover.viewPortOrientationChanged();\n expect(specPopover.orientationChanged).toBe(true);\n expect(specPopover.viewPortChanged).toHaveBeenCalled();\n });\n });\n\n describe('setFixedCSSProperties', () => {\n let specPopover: Q2Popover;\n let containerElement: HTMLDivElement;\n\n beforeEach(() => {\n window.visualViewport = { width: 800, height: 600 } as VisualViewport;\n specPopover = new Q2Popover();\n containerElement = document.createElement('div');\n specPopover.containerElement = containerElement;\n specPopover.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 const controlElement = document.createElement('div');\n controlElement.getBoundingClientRect = jest.fn().mockReturnValue({\n top: 20,\n bottom: 70,\n left: 30,\n right: 80,\n } as DOMRect);\n specPopover.controlElement = controlElement;\n });\n\n it('sets the necessary CSS properties', async () => {\n await specPopover.setFixedCSSProperties();\n expect(containerElement.style.getPropertyValue('--comp-pop-max-height')).toBeFalsy();\n expect(containerElement.style.getPropertyValue('--comp-pop-top')).toBeFalsy();\n expect(containerElement.style.getPropertyValue('--comp-pop-bottom')).toBeFalsy();\n expect(containerElement.style.getPropertyValue('--comp-pop-left')).toBe('30px');\n expect(containerElement.style.getPropertyValue('--comp-pop-right')).toBe('720px');\n expect(containerElement.style.getPropertyValue('--comp-pop-width')).toBeFalsy();\n expect(containerElement.style.getPropertyValue('--comp-pop-opacity')).toBe('1');\n });\n\n it('sets --comp-pop-bottom when direction is up', async () => {\n specPopover.currentDirection = 'up';\n await specPopover.setFixedCSSProperties();\n expect(containerElement.style.getPropertyValue('--comp-pop-top')).toBeFalsy();\n expect(containerElement.style.getPropertyValue('--comp-pop-bottom')).toBe('580px');\n });\n\n it('sets --comp-pop-top when direction is down', async () => {\n specPopover.currentDirection = 'down';\n await specPopover.setFixedCSSProperties();\n expect(containerElement.style.getPropertyValue('--comp-pop-top')).toBe('70px');\n expect(containerElement.style.getPropertyValue('--comp-pop-bottom')).toBeFalsy();\n });\n\n it('sets --comp-pop-width when block is true', async () => {\n specPopover.block = true;\n await specPopover.setFixedCSSProperties();\n expect(containerElement.style.getPropertyValue('--comp-pop-width')).toBe('0px');\n });\n\n describe('when rootElementRect is bonkers', () => {\n beforeEach(() => {\n specPopover.rootElementRect = {\n top: 50,\n bottom: 650,\n left: 50,\n right: 750,\n height: 600,\n width: 700,\n } as DOMRect;\n const controlElement = document.createElement('div');\n controlElement.getBoundingClientRect = jest.fn().mockReturnValue({\n top: 70,\n bottom: 120,\n left: 80,\n right: 130,\n } as DOMRect);\n specPopover.controlElement = controlElement;\n });\n\n it('sets the necessary CSS properties', async () => {\n await specPopover.setFixedCSSProperties();\n expect(containerElement.style.getPropertyValue('--comp-pop-max-height')).toBeFalsy();\n expect(containerElement.style.getPropertyValue('--comp-pop-top')).toBeFalsy();\n expect(containerElement.style.getPropertyValue('--comp-pop-bottom')).toBeFalsy();\n expect(containerElement.style.getPropertyValue('--comp-pop-left')).toBe('30px');\n expect(containerElement.style.getPropertyValue('--comp-pop-right')).toBe('620px');\n expect(containerElement.style.getPropertyValue('--comp-pop-width')).toBeFalsy();\n expect(containerElement.style.getPropertyValue('--comp-pop-opacity')).toBe('1');\n });\n\n it('sets --comp-pop-bottom when direction is up', async () => {\n specPopover.currentDirection = 'up';\n await specPopover.setFixedCSSProperties();\n expect(containerElement.style.getPropertyValue('--comp-pop-top')).toBeFalsy();\n expect(containerElement.style.getPropertyValue('--comp-pop-bottom')).toBe('580px');\n });\n\n it('sets --comp-pop-top when direction is down', async () => {\n specPopover.currentDirection = 'down';\n await specPopover.setFixedCSSProperties();\n expect(containerElement.style.getPropertyValue('--comp-pop-top')).toBe('70px');\n expect(containerElement.style.getPropertyValue('--comp-pop-bottom')).toBeFalsy();\n });\n\n it('sets --comp-pop-width when block is true', async () => {\n specPopover.block = true;\n await specPopover.setFixedCSSProperties();\n expect(containerElement.style.getPropertyValue('--comp-pop-width')).toBe('0px');\n });\n });\n });\n\n describe('setAbsoluteCSSProperties', () => {\n let specPopover: Q2Popover;\n let containerElement: HTMLDivElement;\n\n beforeEach(() => {\n specPopover = new Q2Popover();\n containerElement = document.createElement('div');\n specPopover.mode = 'legacy';\n specPopover.containerElement = containerElement;\n\n const controlElement = document.createElement('div');\n controlElement.getBoundingClientRect = jest.fn().mockReturnValue({\n top: 20,\n bottom: 70,\n left: 30,\n right: 80,\n } as DOMRect);\n specPopover.controlElement = controlElement;\n window.visualViewport = { width: 800, height: 600 } as VisualViewport;\n });\n\n it('sets the necessary CSS properties', async () => {\n await specPopover.setAbsoluteCSSProperties();\n expect(containerElement.style.getPropertyValue('--comp-pop-max-height')).toBeFalsy();\n expect(containerElement.style.getPropertyValue('--comp-pop-top')).toBeFalsy();\n expect(containerElement.style.getPropertyValue('--comp-pop-bottom')).toBeFalsy();\n expect(containerElement.style.getPropertyValue('--comp-pop-left')).toBe('0');\n expect(containerElement.style.getPropertyValue('--comp-pop-right')).toBe('unset');\n expect(containerElement.style.getPropertyValue('--comp-pop-width')).toBe('');\n expect(containerElement.style.getPropertyValue('--comp-pop-opacity')).toBe('1');\n });\n\n it('sets the necessary CSS properties when align is right', async () => {\n specPopover.align = 'right';\n await specPopover.setAbsoluteCSSProperties();\n expect(containerElement.style.getPropertyValue('--comp-pop-left')).toBe('unset');\n expect(containerElement.style.getPropertyValue('--comp-pop-right')).toBe('0');\n });\n\n it('sets --comp-pop-bottom when direction is up', async () => {\n specPopover.currentDirection = 'up';\n await specPopover.setAbsoluteCSSProperties();\n expect(containerElement.style.getPropertyValue('--comp-pop-top')).toBeFalsy();\n expect(containerElement.style.getPropertyValue('--comp-pop-bottom')).toBe('0px');\n });\n\n it('does not set --comp-pop-top when direction is down', async () => {\n specPopover.currentDirection = 'down';\n await specPopover.setAbsoluteCSSProperties();\n expect(containerElement.style.getPropertyValue('--comp-pop-top')).toBe('');\n expect(containerElement.style.getPropertyValue('--comp-pop-bottom')).toBe('');\n });\n\n it('sets --comp-pop-width when block is true', async () => {\n specPopover.block = true;\n await specPopover.setAbsoluteCSSProperties();\n expect(containerElement.style.getPropertyValue('--comp-pop-width')).toBe('100%');\n });\n });\n\n describe('clearCSSProperties', () => {\n let specPopover: Q2Popover;\n let containerElement: HTMLDivElement;\n\n beforeEach(() => {\n specPopover = new Q2Popover();\n containerElement = document.createElement('div');\n containerElement.style.setProperty('--comp-pop-max-height', '100px');\n containerElement.style.setProperty('--comp-pop-top', '20px');\n containerElement.style.setProperty('--comp-pop-bottom', '25px');\n containerElement.style.setProperty('--comp-pop-left', '30px');\n containerElement.style.setProperty('--comp-pop-right', '35px');\n containerElement.style.setProperty('--comp-pop-width', '200px');\n containerElement.style.setProperty('--comp-pop-opacity', '1');\n specPopover.containerElement = containerElement;\n });\n\n it('clears the necessary CSS properties', async () => {\n await specPopover.clearCSSProperties();\n expect(containerElement.style.getPropertyValue('--comp-pop-max-height')).toBeFalsy();\n expect(containerElement.style.getPropertyValue('--comp-pop-top')).toBeFalsy();\n expect(containerElement.style.getPropertyValue('--comp-pop-bottom')).toBeFalsy();\n expect(containerElement.style.getPropertyValue('--comp-pop-left')).toBeFalsy();\n expect(containerElement.style.getPropertyValue('--comp-pop-right')).toBeFalsy();\n expect(containerElement.style.getPropertyValue('--comp-pop-width')).toBeFalsy();\n expect(containerElement.style.getPropertyValue('--comp-pop-opacity')).toBeFalsy();\n });\n });\n\n describe('setDirectionAndShow', () => {\n let specPopover: Q2Popover;\n let containerElement: HTMLDivElement;\n\n beforeEach(() => {\n specPopover = new Q2Popover();\n containerElement = document.createElement('div');\n specPopover.containerElement = containerElement;\n specPopover.setRootElement = jest.fn();\n specPopover.setFixedCSSProperties = jest.fn();\n specPopover.setAbsoluteCSSProperties = jest.fn();\n specPopover.scrollContainerTo = jest.fn();\n });\n\n it('does nothing when open is false', async () => {\n specPopover.open = false;\n await specPopover.setDirectionAndShow('up');\n expect(specPopover.currentDirection).toBeUndefined();\n expect(specPopover.show).toBe(false);\n expect(specPopover.setRootElement).toHaveBeenCalled();\n expect(specPopover.setFixedCSSProperties).not.toHaveBeenCalled();\n expect(specPopover.setAbsoluteCSSProperties).not.toHaveBeenCalled();\n });\n\n describe('when open is true', () => {\n beforeEach(() => {\n specPopover.open = true;\n });\n\n it('sets the direction, shows the popover, and sets fixed position properties', async () => {\n await specPopover.setDirectionAndShow('up');\n expect(specPopover.currentDirection).toBe('up');\n expect(specPopover.show).toBe(true);\n expect(specPopover.setRootElement).toHaveBeenCalled();\n expect(specPopover.setFixedCSSProperties).toHaveBeenCalled();\n expect(specPopover.setAbsoluteCSSProperties).not.toHaveBeenCalled();\n });\n\n it('sets the direction, shows the popover, and sets absolute position properties when mode is \"legacy\"', async () => {\n specPopover.mode = 'legacy';\n await specPopover.setDirectionAndShow('up');\n expect(specPopover.currentDirection).toBe('up');\n expect(specPopover.show).toBe(true);\n expect(specPopover.setRootElement).toHaveBeenCalled();\n expect(specPopover.setFixedCSSProperties).not.toHaveBeenCalled();\n expect(specPopover.setAbsoluteCSSProperties).toHaveBeenCalled();\n });\n });\n });\n\n describe('determinePopDirection', () => {\n let specPopover: Q2Popover;\n let controlElement: HTMLDivElement;\n let containerElement: HTMLDivElement;\n\n beforeEach(() => {\n specPopover = new Q2Popover();\n controlElement = document.createElement('div');\n containerElement = document.createElement('div');\n specPopover.controlElement = controlElement;\n specPopover.containerElement = containerElement;\n window.visualViewport = { width: 800, height: 600 } as VisualViewport;\n specPopover.setDirectionAndShow = jest.fn();\n });\n\n it('sets the direction to up when control element has more space above it', async () => {\n const controlSpy = jest.spyOn(controlElement, 'getBoundingClientRect').mockReturnValue({\n top: 500,\n bottom: 550,\n } as DOMRect);\n await specPopover.determinePopDirection();\n\n expect(containerElement.style.getPropertyValue('--comp-pop-max-height')).toBe('490px');\n expect(specPopover.setDirectionAndShow).toHaveBeenCalledWith('up');\n\n controlSpy.mockRestore();\n });\n\n it('sets the direction to down when control element has more space below it', async () => {\n const controlSpy = jest.spyOn(controlElement, 'getBoundingClientRect').mockReturnValue({\n top: 100,\n bottom: 150,\n } as DOMRect);\n await specPopover.determinePopDirection();\n\n expect(containerElement.style.getPropertyValue('--comp-pop-max-height')).toBe('440px');\n expect(specPopover.setDirectionAndShow).toHaveBeenCalledWith('down');\n\n controlSpy.mockRestore();\n });\n });\n\n describe('openChanged', () => {\n beforeEach(() => {\n specPopover = new Q2Popover();\n specPopover.setRootElement = jest.fn();\n specPopover.addViewportListeners = jest.fn();\n specPopover.determinePopDirection = jest.fn();\n specPopover.removeViewportListeners = jest.fn();\n specPopover.clearCSSProperties = jest.fn();\n });\n\n it('sets open to true when open is false', async () => {\n specPopover.currentDirection = 'down';\n specPopover.show = true;\n await specPopover.openChanged(true);\n expect(specPopover.currentDirection).toBe('down');\n expect(specPopover.show).toBeTruthy();\n expect(specPopover.setRootElement).toHaveBeenCalled();\n expect(specPopover.addViewportListeners).toHaveBeenCalled();\n expect(specPopover.determinePopDirection).toHaveBeenCalled();\n expect(specPopover.removeViewportListeners).not.toHaveBeenCalled();\n expect(specPopover.clearCSSProperties).not.toHaveBeenCalled();\n });\n\n it('sets open to false when open is true', async () => {\n specPopover.currentDirection = 'down';\n specPopover.show = true;\n await specPopover.openChanged(false);\n expect(specPopover.currentDirection).toBeUndefined();\n expect(specPopover.show).toBeFalsy();\n expect(specPopover.setRootElement).toHaveBeenCalled();\n expect(specPopover.addViewportListeners).not.toHaveBeenCalled();\n expect(specPopover.determinePopDirection).not.toHaveBeenCalled();\n expect(specPopover.clearCSSProperties).toHaveBeenCalled();\n expect(specPopover.clearCSSProperties).toHaveBeenCalled();\n });\n });\n\n describe('setRootElement', () => {\n let computedStyleStub: any = {};\n const popoverDOMRect = {\n top: 50,\n bottom: 125,\n left: 50,\n right: 50,\n height: 75,\n width: 700,\n } as DOMRect;\n\n beforeEach(() => {\n computedStyleStub = {\n transform: 'none',\n filter: 'none',\n perspective: 'none',\n contain: 'none',\n containerType: 'normal',\n willChange: 'auto',\n };\n window.visualViewport = { width: 800, height: 600 } as VisualViewport;\n specPopover = new Q2Popover();\n window.getComputedStyle = jest.fn().mockReturnValue(computedStyleStub);\n specPopover.hostElement.getBoundingClientRect = jest.fn().mockReturnValue(popoverDOMRect);\n });\n\n it('sets the rootElementRect by default', async () => {\n await specPopover.setRootElement();\n expect(specPopover.rootElementRect).toEqual({\n top: 0,\n bottom: 0,\n left: 0,\n right: 0,\n height: 600,\n width: 800,\n });\n });\n\n describe('when a containing block is created by applying CSS properties', () => {\n it('returns the currentElementRect when transform is applied', async () => {\n computedStyleStub.transform = 'translate(10px, 20px)';\n await specPopover.setRootElement();\n expect(specPopover.rootElementRect).toEqual(popoverDOMRect);\n });\n\n it('returns the currentElementRect when filter is applied', async () => {\n computedStyleStub.filter = 'blur(5px)';\n await specPopover.setRootElement();\n expect(specPopover.rootElementRect).toEqual(popoverDOMRect);\n });\n\n it('returns the currentElementRect when perspective is applied', async () => {\n computedStyleStub.perspective = '100px';\n await specPopover.setRootElement();\n expect(specPopover.rootElementRect).toEqual(popoverDOMRect);\n });\n\n it('returns the currentElementRect when contain is applied', async () => {\n computedStyleStub.contain = 'layout';\n await specPopover.setRootElement();\n expect(specPopover.rootElementRect).toEqual(popoverDOMRect);\n });\n\n it('returns the currentElementRect when containerType is applied', async () => {\n computedStyleStub.containerType = 'none';\n await specPopover.setRootElement();\n expect(specPopover.rootElementRect).toEqual(popoverDOMRect);\n });\n\n it('returns the currentElementRect when willChange is applied', async () => {\n computedStyleStub.willChange = 'transform';\n await specPopover.setRootElement();\n expect(specPopover.rootElementRect).toEqual(popoverDOMRect);\n });\n });\n });\n});\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"q2-radio.js","sourceRoot":"","sources":["../../../src/components/q2-radio/q2-radio.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAA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;;;;;;;;;;CAGJ","sourcesContent":["import { Component, Prop, h, Element, ComponentInterface, Listen, Watch, Event, EventEmitter } from '@stencil/core';\nimport { createGuid, handleAriaLabel, loc, overrideFocus } from 'src/utils';\n\n@Component({ tag: 'q2-radio', shadow: true, styleUrl: 'q2-radio.scss' })\nexport class Q2Radio implements ComponentInterface {\n // #region Own Properties\n\n _id: string = `radio-${createGuid()}`;\n inputField: HTMLInputElement;\n isLoaded: boolean = false;\n\n // #endregion\n // #region Host HTML Element\n\n @Element()\n hostElement: HTMLElement;\n\n // #endregion\n // #region Public Property API\n\n /** @deprecated */\n @Prop({ reflect: true, mutable: true })\n ariaLabel: string;\n\n /** The state of the radio. This modifies the visual appearance of the element. */\n @Prop({ reflect: true, mutable: true })\n checked: boolean = false;\n\n /** Disables the radio and prevents interaction. */\n @Prop({ reflect: true })\n disabled: boolean = false;\n\n /**\n * Used by q2-radio-group to disable all options in the group\n * @private\n */\n @Prop({ reflect: false })\n groupDisabled: boolean = false;\n\n /**\n * Used by q2-radio-group to make all options in the group readonly\n * @private\n */\n @Prop({ reflect: false })\n groupReadonly: boolean = false;\n\n /**\n * Used by q2-radio-group to make the options display as tiles\n * @private\n */\n @Prop({ reflect: false })\n groupTileLayout: boolean = false;\n\n /**\n * Hide's the field's `<label>` element from view.\n *\n * @warning\n * Only use when a visible label is impractical.\n */\n @Prop({ reflect: true, mutable: true })\n hideLabel: boolean;\n\n /**\n * The text that describes the individual radio option.\n * @localizable\n */\n @Prop({ reflect: true, mutable: true })\n label: string;\n\n /**\n * Used by q2-radio-group to apply a name to all options in the group\n * @private\n */\n @Prop({ reflect: true })\n name: string;\n\n /** The radio is non-interactive, but remains focusable. */\n @Prop({ reflect: true })\n readonly: boolean;\n\n /** @private */\n @Prop()\n tabIndex: number = 0;\n\n /** The value that is returned in the `change` event that is emitted from the `q2-radio-group`. */\n @Prop({ reflect: true })\n value: string;\n\n // #endregion\n // #region Events\n\n /**\n * Emitted when the radio is checked.\n */\n @Event()\n change: EventEmitter<{ value: string }>;\n\n // #endregion\n // #region Component Lifecycle Events\n\n componentWillLoad() {\n handleAriaLabel(this);\n }\n\n componentDidLoad(): void {\n this.isLoaded = true;\n overrideFocus(this.hostElement);\n this.hostElement.click = () => {\n this.inputField.focus();\n this.inputField.click();\n };\n }\n\n // #endregion\n // #region Listeners\n\n @Listen('click')\n onHostClick(event: Event) {\n if (this.disabled) {\n event.stopImmediatePropagation();\n } else if (this.groupReadonly) {\n event.preventDefault();\n event.stopImmediatePropagation();\n this.inputField.focus();\n }\n }\n\n @Listen('focus')\n delegateFocus(event: FocusEvent) {\n if (event.target === this.hostElement) {\n this.inputField.focus();\n }\n }\n\n // #endregion\n // #region Watchers\n\n @Watch('ariaLabel')\n ariaLabelObserver() {\n handleAriaLabel(this);\n }\n\n @Watch('checked')\n checkedObserver() {\n if (!this.isLoaded) return;\n if (!this.checked) return;\n this.change.emit({ value: this.value });\n }\n\n // #endregion\n // #region Local Methods\n\n inputChange = (event: Event) => {\n event.stopPropagation();\n if (this.disabled || this.readonly || this.groupReadonly || this.groupDisabled) {\n event.preventDefault();\n return false;\n }\n\n if (event.target instanceof HTMLInputElement) {\n this.checked = event.target.checked;\n }\n };\n\n // #endregion\n // #region Render Methods\n\n render() {\n return (\n <div class={this.groupTileLayout ? 'radio-tile' : 'radio-container'}>\n <input\n ref={el => (this.inputField = el)}\n class=\"sr\"\n id={this._id}\n type=\"radio\"\n name={this.name}\n value={this.value}\n disabled={this.disabled || this.groupDisabled}\n checked={this.checked}\n aria-label={this.label && this.hideLabel ? loc(this.label) : undefined}\n onChange={this.inputChange}\n test-id=\"q2RadioInnerRadioBox\"\n ></input>\n\n <label\n htmlFor={this._id}\n class={this.hideLabel ? 'label-hidden' : undefined}\n test-id=\"radioButton\"\n >\n {!this.groupTileLayout && (\n <svg viewBox=\"0 0 18 18\">\n <circle\n stroke=\"none\"\n fill=\"none\"\n cx=\"9\"\n cy=\"9\"\n r=\"8\"\n />\n <circle\n stroke=\"none\"\n fill=\"none\"\n cx=\"9\"\n cy=\"9\"\n r=\"4\"\n />\n </svg>\n )}\n {!this.hideLabel && (\n <div class=\"label-content\">\n {(this.label && loc(this.label)) || ''}\n <slot></slot>\n </div>\n )}\n </label>\n </div>\n );\n }\n\n // #endregion\n}\n"]}
1
+ {"version":3,"file":"q2-radio.js","sourceRoot":"","sources":["../../../../src/components/q2-radio/q2-radio.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAsB,MAAM,EAAE,KAAK,EAAE,KAAK,EAAgB,MAAM,eAAe,CAAC;AACpH,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,GAAG,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAG5E,MAAM,OAAO,OAAO;;QAChB,yBAAyB;QAEzB,QAAG,GAAW,SAAS,UAAU,EAAE,EAAE,CAAC;QAEtC,aAAQ,GAAY,KAAK,CAAC;QA4I1B,aAAa;QACb,wBAAwB;QAExB,gBAAW,GAAG,CAAC,KAAY,EAAE,EAAE;YAC3B,KAAK,CAAC,eAAe,EAAE,CAAC;YACxB,IAAI,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,aAAa,IAAI,IAAI,CAAC,aAAa,EAAE,CAAC;gBAC7E,KAAK,CAAC,cAAc,EAAE,CAAC;gBACvB,OAAO,KAAK,CAAC;YACjB,CAAC;YAED,IAAI,KAAK,CAAC,MAAM,YAAY,gBAAgB,EAAE,CAAC;gBAC3C,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC;YACxC,CAAC;QACL,CAAC,CAAC;;uBAxIiB,KAAK;wBAIJ,KAAK;6BAOA,KAAK;6BAOL,KAAK;+BAOH,KAAK;;;;;wBA+Bb,CAAC;;;IAepB,aAAa;IACb,qCAAqC;IAErC,iBAAiB;QACb,eAAe,CAAC,IAAI,CAAC,CAAC;IAC1B,CAAC;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGJ","sourcesContent":["import { Component, Prop, h, Element, ComponentInterface, Listen, Watch, Event, EventEmitter } from '@stencil/core';\nimport { createGuid, handleAriaLabel, loc, overrideFocus } from 'src/utils';\n\n@Component({ tag: 'q2-radio', shadow: true, styleUrl: 'q2-radio.scss' })\nexport class Q2Radio implements ComponentInterface {\n // #region Own Properties\n\n _id: string = `radio-${createGuid()}`;\n inputField: HTMLInputElement;\n isLoaded: boolean = false;\n\n // #endregion\n // #region Host HTML Element\n\n @Element()\n hostElement: HTMLElement;\n\n // #endregion\n // #region Public Property API\n\n /** @deprecated */\n @Prop({ reflect: true, mutable: true })\n ariaLabel: string;\n\n /** The state of the radio. This modifies the visual appearance of the element. */\n @Prop({ reflect: true, mutable: true })\n checked: boolean = false;\n\n /** Disables the radio and prevents interaction. */\n @Prop({ reflect: true })\n disabled: boolean = false;\n\n /**\n * Used by q2-radio-group to disable all options in the group\n * @private\n */\n @Prop({ reflect: false })\n groupDisabled: boolean = false;\n\n /**\n * Used by q2-radio-group to make all options in the group readonly\n * @private\n */\n @Prop({ reflect: false })\n groupReadonly: boolean = false;\n\n /**\n * Used by q2-radio-group to make the options display as tiles\n * @private\n */\n @Prop({ reflect: false })\n groupTileLayout: boolean = false;\n\n /**\n * Hide's the field's `<label>` element from view.\n *\n * @warning\n * Only use when a visible label is impractical.\n */\n @Prop({ reflect: true, mutable: true })\n hideLabel: boolean;\n\n /**\n * The text that describes the individual radio option.\n * @localizable\n */\n @Prop({ reflect: true, mutable: true })\n label: string;\n\n /**\n * Used by q2-radio-group to apply a name to all options in the group\n * @private\n */\n @Prop({ reflect: true })\n name: string;\n\n /** The radio is non-interactive, but remains focusable. */\n @Prop({ reflect: true })\n readonly: boolean;\n\n /** @private */\n @Prop()\n tabIndex: number = 0;\n\n /** The value that is returned in the `change` event that is emitted from the `q2-radio-group`. */\n @Prop({ reflect: true })\n value: string;\n\n // #endregion\n // #region Events\n\n /**\n * Emitted when the radio is checked.\n */\n @Event()\n change: EventEmitter<{ value: string }>;\n\n // #endregion\n // #region Component Lifecycle Events\n\n componentWillLoad() {\n handleAriaLabel(this);\n }\n\n componentDidLoad(): void {\n this.isLoaded = true;\n overrideFocus(this.hostElement);\n this.hostElement.click = () => {\n this.inputField.focus();\n this.inputField.click();\n };\n }\n\n // #endregion\n // #region Listeners\n\n @Listen('click')\n onHostClick(event: Event) {\n if (this.disabled) {\n event.stopImmediatePropagation();\n } else if (this.groupReadonly) {\n event.preventDefault();\n event.stopImmediatePropagation();\n this.inputField.focus();\n }\n }\n\n @Listen('focus')\n delegateFocus(event: FocusEvent) {\n if (event.target === this.hostElement) {\n this.inputField.focus();\n }\n }\n\n // #endregion\n // #region Watchers\n\n @Watch('ariaLabel')\n ariaLabelObserver() {\n handleAriaLabel(this);\n }\n\n @Watch('checked')\n checkedObserver() {\n if (!this.isLoaded) return;\n if (!this.checked) return;\n this.change.emit({ value: this.value });\n }\n\n // #endregion\n // #region Local Methods\n\n inputChange = (event: Event) => {\n event.stopPropagation();\n if (this.disabled || this.readonly || this.groupReadonly || this.groupDisabled) {\n event.preventDefault();\n return false;\n }\n\n if (event.target instanceof HTMLInputElement) {\n this.checked = event.target.checked;\n }\n };\n\n // #endregion\n // #region Render Methods\n\n render() {\n return (\n <div class={this.groupTileLayout ? 'radio-tile' : 'radio-container'}>\n <input\n ref={el => (this.inputField = el)}\n class=\"sr\"\n id={this._id}\n type=\"radio\"\n name={this.name}\n value={this.value}\n disabled={this.disabled || this.groupDisabled}\n checked={this.checked}\n aria-label={this.label && this.hideLabel ? loc(this.label) : undefined}\n onChange={this.inputChange}\n test-id=\"q2RadioInnerRadioBox\"\n ></input>\n\n <label\n htmlFor={this._id}\n class={this.hideLabel ? 'label-hidden' : undefined}\n test-id=\"radioButton\"\n >\n {!this.groupTileLayout && (\n <svg viewBox=\"0 0 18 18\">\n <circle\n stroke=\"none\"\n fill=\"none\"\n cx=\"9\"\n cy=\"9\"\n r=\"8\"\n />\n <circle\n stroke=\"none\"\n fill=\"none\"\n cx=\"9\"\n cy=\"9\"\n r=\"4\"\n />\n </svg>\n )}\n {!this.hideLabel && (\n <div class=\"label-content\">\n {(this.label && loc(this.label)) || ''}\n <slot></slot>\n </div>\n )}\n </label>\n </div>\n );\n }\n\n // #endregion\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"q2-radio-test.e2e.js","sourceRoot":"","sources":["../../../../src/components/q2-radio/test/q2-radio-test.e2e.ts"],"names":[],"mappings":"AACA,OAAO,EACH,YAAY,EACZ,sBAAsB,EACtB,+BAA+B,EAC/B,KAAK,EACL,uBAAuB,GAC1B,MAAM,iBAAiB,CAAC;AAEzB,QAAQ,CAAC,UAAU,EAAE,GAAG,EAAE;IACtB,IAAI,IAAa,CAAC;IAElB,MAAM,SAAS,GAAG,KAAK,EAAE,QAAgB,EAAE,EAAE,QAAgB,UAAU,EAAE,EAAE;QACvE,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,IAAI,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACjC,IAAI,GAAG,MAAM,KAAK,CAAC;YACf,IAAI,EAAE;+BACa,KAAK,IAAI,KAAK;SACpC;SACA,CAAC,CAAC;QACH,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;QAE5B,OAAO,IAAI,CAAC;IAChB,CAAC,CAAC;IAEF,MAAM,SAAS,GAAG,KAAK,EAAE,IAAa,EAAE,EAAE;QACtC,OAAO,IAAI,CAAC,KAAK,CAAC,UAAU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CAAC,CAAC;gBACjC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;gBACpC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACtC,CAAC,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;QACH,QAAQ,CAAC,mBAAmB,EAAE,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC;QACxC,QAAQ,CAAC,OAAO,EAAE,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC;IAChC,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC","sourcesContent":["import { E2EPage } from '@stencil/core/testing';\nimport {\n evaluateA11y,\n getActiveElementTestId,\n getListOfStyleCompilationIssues,\n setup,\n testDeprecatedAriaLabel,\n} from '@/utils/helpers';\n\ndescribe('q2-radio', () => {\n let page: E2EPage;\n\n const setupPage = async (props: string = '', label: string = 'My Radio') => {\n props = props ? ` ${props}` : '';\n page = await setup({\n html: `\n <q2-radio label=\"${label}\"${props}></q2-radio>\n `,\n });\n await page.waitForChanges();\n\n return page;\n };\n\n const isChecked = async (page: E2EPage) => {\n return page.$eval('q2-radio', el => el.shadowRoot.querySelector('input')?.checked ?? false);\n };\n\n const clickRadio = async (page: E2EPage) => {\n await page.$eval('q2-radio', (el: HTMLQ2RadioElement) => el.click());\n await page.waitForChanges();\n };\n\n it('properly compiles CSS vars and functions', async () => {\n const page = await setup({ html: '<q2-radio></q2-radio>' });\n expect(await getListOfStyleCompilationIssues(page, 'q2-radio')).toHaveLength(0);\n });\n\n it('renders with properties passed to inner input', async function (): Promise<void> {\n page = await setupPage('value=\"1\" disabled checked name=\"testName\"');\n const radio = await page.find('q2-radio');\n let radioLabel = await page.find('q2-radio >>> .label-content');\n const radioInput = await page.find('q2-radio >>> input');\n\n expect(radioLabel).toEqualText('My Radio');\n expect(radioInput).toEqualAttribute('name', 'testName');\n expect(radioInput).toHaveAttribute('disabled');\n expect(await radio.getProperty('hideLabel')).toBeUndefined();\n expect(await radio.getProperty('checked')).toEqual(true);\n expect(await radioInput.getProperty('checked')).toEqual(true);\n\n radio.setProperty('ariaLabel', 'My Aria Label');\n await page.waitForChanges();\n radioLabel = await page.find('q2-radio >>> .label-content');\n\n expect(await radio.getProperty('ariaLabel')).toBeUndefined();\n expect(await radio.getProperty('hideLabel')).toEqual(true);\n expect(await radio.getProperty('label')).toEqual('My Aria Label');\n expect(radioInput).toEqualAttribute('aria-label', 'My Aria Label');\n expect(radioLabel).toBeNull();\n\n radio.setProperty('hideLabel', false);\n radio.setProperty('disabled', false);\n await page.waitForChanges();\n radioLabel = await page.find('q2-radio >>> .label-content');\n\n expect(radioLabel).toEqualText('My Aria Label');\n expect(radioInput).not.toHaveAttribute('aria-label');\n expect(radioInput).not.toHaveAttribute('disabled');\n\n radio.setProperty('groupDisabled', true);\n await page.waitForChanges();\n\n expect(radioInput).toHaveAttribute('disabled');\n });\n\n describe('Methods', () => {\n describe('click', () => {\n it('selects the radio when called', async () => {\n page = await setupPage();\n const radio = await page.find('q2-radio');\n\n expect(await isChecked(page)).toBe(false);\n expect(radio).not.toHaveAttribute('checked');\n\n await clickRadio(page);\n\n expect(await isChecked(page)).toBe(true);\n expect(radio).toHaveAttribute('checked');\n });\n\n it('does not select the radio when readonly', async () => {\n const page = await setup({\n html: `<q2-radio label=\"Label\" readonly></q2-radio>`,\n });\n const radio = await page.find('q2-radio');\n const innerRadio = await page.find('q2-radio >>> input');\n\n expect(await getActiveElementTestId(page)).toBeNull();\n\n expect(radio).not.toHaveAttribute('checked');\n expect(innerRadio).not.toHaveAttribute('checked');\n\n await page.$eval('q2-radio', el => el.click());\n await page.waitForChanges();\n\n expect(radio).not.toHaveAttribute('checked');\n expect(innerRadio).not.toHaveAttribute('checked');\n expect(await getActiveElementTestId(page)).toEqual('q2RadioInnerRadioBox');\n });\n\n it('does not select the radio when disabled', async () => {\n const page = await setup({\n html: `<q2-radio label=\"Label\" disabled></q2-radio>`,\n });\n const radio = await page.find('q2-radio');\n const innerRadio = await page.find('q2-radio >>> input');\n\n expect(await getActiveElementTestId(page)).toBeNull();\n\n expect(radio).not.toHaveAttribute('checked');\n expect(innerRadio).not.toHaveAttribute('checked');\n\n await page.$eval('q2-radio', el => el.click());\n await page.waitForChanges();\n\n expect(radio).not.toHaveAttribute('checked');\n expect(innerRadio).not.toHaveAttribute('checked');\n expect(await getActiveElementTestId(page)).toBeNull();\n });\n });\n });\n\n describe('Props', () => {\n describe('groupReadonly', () => {\n describe('set to true', () => {\n it('on load does not check the radio when clicked', async () => {\n page = await setupPage('group-readonly');\n const radio = await page.find('q2-radio');\n\n expect(await isChecked(page)).toBe(false);\n expect(radio).not.toHaveAttribute('checked');\n\n await clickRadio(page);\n\n expect(await isChecked(page)).toBe(false);\n expect(radio).not.toHaveAttribute('checked');\n });\n it('after load does not check the radio when clicked', async () => {\n page = await setupPage();\n const radio = await page.find('q2-radio');\n\n expect(await isChecked(page)).toBe(false);\n expect(radio).not.toHaveAttribute('checked');\n\n radio.setProperty('groupReadonly', true);\n await page.waitForChanges();\n await clickRadio(page);\n\n expect(await isChecked(page)).toBe(false);\n expect(radio).not.toHaveAttribute('checked');\n });\n });\n describe('set to false', () => {\n it('on load checks the radio when clicked', async () => {\n page = await setupPage();\n const radio = await page.find('q2-radio');\n\n expect(await isChecked(page)).toBe(false);\n expect(radio).not.toHaveAttribute('checked');\n\n await clickRadio(page);\n\n expect(await isChecked(page)).toBe(true);\n expect(radio).toHaveAttribute('checked');\n });\n it('after load checks the radio when clicked', async () => {\n page = await setupPage('group-readonly');\n const radio = await page.find('q2-radio');\n\n expect(await isChecked(page)).toBe(false);\n expect(radio).not.toHaveAttribute('checked');\n\n radio.setProperty('groupReadonly', false);\n await page.waitForChanges();\n await clickRadio(page);\n\n expect(await isChecked(page)).toBe(true);\n expect(radio).toHaveAttribute('checked');\n });\n });\n });\n });\n\n describe('Regressions', () => {\n it('keeps the svg at 18px wide even with long labels', async function (): Promise<void> {\n const lotsOfText =\n 'Interdum et malesuada fames ac ante ipsum primis in faucibus. Praesent sed ipsum iaculis, dignissim orci quis, mollis nibh. Pellentesque eget dolor tristique, placerat nibh sollicitudin, vehicula sapien. ';\n page = await setupPage('value=\"1\" disabled checked name=\"testName\"', lotsOfText);\n const svg = await page.find('q2-radio >>> svg');\n const svgStyles = await svg.getComputedStyle();\n\n expect(svgStyles.width).toEqual('18px');\n });\n });\n\n describe('Deprecations', () => {\n it('handles deprecated `ariaLabel` prop', async () => {\n const label = 'My Label';\n page = await setupPage(`aria-label=\"${label}\"`);\n await testDeprecatedAriaLabel(await page.find('q2-radio'), label);\n\n expect(await page.find('q2-radio >>> input')).toEqualAttribute('aria-label', label);\n });\n });\n\n describe('Accessibility', () => {\n describe('aXe DevTools', () => {\n it('does not have accessibility violations', async () => {\n const page = await setupPage('value=\"1\" disabled checked name=\"testName\"');\n const hasViolations = await evaluateA11y(page);\n expect(hasViolations).toBe(false);\n });\n });\n describe('Accessibility Tree', () => {\n it('is correctly represented in the accessibility tree', async () => {\n page = await setupPage();\n const accessibilitySnapshot = await page.accessibility.snapshot();\n const radio = accessibilitySnapshot.children[0];\n\n expect(radio.role).toBe('radio');\n expect(radio.name).toBe('My Radio');\n expect(radio.checked).toBe(false);\n });\n });\n describe('Keyboard Controls', () => {});\n describe('Other', () => {});\n });\n});\n"]}
1
+ {"version":3,"file":"q2-radio-test.e2e.js","sourceRoot":"","sources":["../../../../../src/components/q2-radio/test/q2-radio-test.e2e.ts"],"names":[],"mappings":"AACA,OAAO,EACH,YAAY,EACZ,sBAAsB,EACtB,+BAA+B,EAC/B,KAAK,EACL,uBAAuB,GAC1B,MAAM,iBAAiB,CAAC;AAEzB,QAAQ,CAAC,UAAU,EAAE,GAAG,EAAE;IACtB,IAAI,IAAa,CAAC;IAElB,MAAM,SAAS,GAAG,KAAK,EAAE,QAAgB,EAAE,EAAE,QAAgB,UAAU,EAAE,EAAE;QACvE,KAAK,GAAG,KAA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AQ,CAAC,oBAAoB,EAAE,GAAG,EAAE;YAChC,EAAE,CAAC,oDAAoD,EAAE,KAAK,IAAI,EAAE;gBAChE,IAAI,GAAG,MAAM,SAAS,EAAE,CAAC;gBACzB,MAAM,qBAAqB,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,QAAQ,EAAE,CAAC;gBAClE,MAAM,KAAK,GAAG,qBAAqB,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;gBAEhD,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;gBACjC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;gBACpC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACtC,CAAC,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;QACH,QAAQ,CAAC,mBAAmB,EAAE,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC;QACxC,QAAQ,CAAC,OAAO,EAAE,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC;IAChC,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC","sourcesContent":["import { E2EPage } from '@stencil/core/testing';\nimport {\n evaluateA11y,\n getActiveElementTestId,\n getListOfStyleCompilationIssues,\n setup,\n testDeprecatedAriaLabel,\n} from '@/utils/helpers';\n\ndescribe('q2-radio', () => {\n let page: E2EPage;\n\n const setupPage = async (props: string = '', label: string = 'My Radio') => {\n props = props ? ` ${props}` : '';\n page = await setup({\n html: `\n <q2-radio label=\"${label}\"${props}></q2-radio>\n `,\n });\n await page.waitForChanges();\n\n return page;\n };\n\n const isChecked = async (page: E2EPage) => {\n return page.$eval('q2-radio', el => el.shadowRoot.querySelector('input')?.checked ?? false);\n };\n\n const clickRadio = async (page: E2EPage) => {\n await page.$eval('q2-radio', (el: HTMLQ2RadioElement) => el.click());\n await page.waitForChanges();\n };\n\n it('properly compiles CSS vars and functions', async () => {\n const page = await setup({ html: '<q2-radio></q2-radio>' });\n expect(await getListOfStyleCompilationIssues(page, 'q2-radio')).toHaveLength(0);\n });\n\n it('renders with properties passed to inner input', async function (): Promise<void> {\n page = await setupPage('value=\"1\" disabled checked name=\"testName\"');\n const radio = await page.find('q2-radio');\n let radioLabel = await page.find('q2-radio >>> .label-content');\n const radioInput = await page.find('q2-radio >>> input');\n\n expect(radioLabel).toEqualText('My Radio');\n expect(radioInput).toEqualAttribute('name', 'testName');\n expect(radioInput).toHaveAttribute('disabled');\n expect(await radio.getProperty('hideLabel')).toBeUndefined();\n expect(await radio.getProperty('checked')).toEqual(true);\n expect(await radioInput.getProperty('checked')).toEqual(true);\n\n radio.setProperty('ariaLabel', 'My Aria Label');\n await page.waitForChanges();\n radioLabel = await page.find('q2-radio >>> .label-content');\n\n expect(await radio.getProperty('ariaLabel')).toBeUndefined();\n expect(await radio.getProperty('hideLabel')).toEqual(true);\n expect(await radio.getProperty('label')).toEqual('My Aria Label');\n expect(radioInput).toEqualAttribute('aria-label', 'My Aria Label');\n expect(radioLabel).toBeNull();\n\n radio.setProperty('hideLabel', false);\n radio.setProperty('disabled', false);\n await page.waitForChanges();\n radioLabel = await page.find('q2-radio >>> .label-content');\n\n expect(radioLabel).toEqualText('My Aria Label');\n expect(radioInput).not.toHaveAttribute('aria-label');\n expect(radioInput).not.toHaveAttribute('disabled');\n\n radio.setProperty('groupDisabled', true);\n await page.waitForChanges();\n\n expect(radioInput).toHaveAttribute('disabled');\n });\n\n describe('Methods', () => {\n describe('click', () => {\n it('selects the radio when called', async () => {\n page = await setupPage();\n const radio = await page.find('q2-radio');\n\n expect(await isChecked(page)).toBe(false);\n expect(radio).not.toHaveAttribute('checked');\n\n await clickRadio(page);\n\n expect(await isChecked(page)).toBe(true);\n expect(radio).toHaveAttribute('checked');\n });\n\n it('does not select the radio when readonly', async () => {\n const page = await setup({\n html: `<q2-radio label=\"Label\" readonly></q2-radio>`,\n });\n const radio = await page.find('q2-radio');\n const innerRadio = await page.find('q2-radio >>> input');\n\n expect(await getActiveElementTestId(page)).toBeNull();\n\n expect(radio).not.toHaveAttribute('checked');\n expect(innerRadio).not.toHaveAttribute('checked');\n\n await page.$eval('q2-radio', el => el.click());\n await page.waitForChanges();\n\n expect(radio).not.toHaveAttribute('checked');\n expect(innerRadio).not.toHaveAttribute('checked');\n expect(await getActiveElementTestId(page)).toEqual('q2RadioInnerRadioBox');\n });\n\n it('does not select the radio when disabled', async () => {\n const page = await setup({\n html: `<q2-radio label=\"Label\" disabled></q2-radio>`,\n });\n const radio = await page.find('q2-radio');\n const innerRadio = await page.find('q2-radio >>> input');\n\n expect(await getActiveElementTestId(page)).toBeNull();\n\n expect(radio).not.toHaveAttribute('checked');\n expect(innerRadio).not.toHaveAttribute('checked');\n\n await page.$eval('q2-radio', el => el.click());\n await page.waitForChanges();\n\n expect(radio).not.toHaveAttribute('checked');\n expect(innerRadio).not.toHaveAttribute('checked');\n expect(await getActiveElementTestId(page)).toBeNull();\n });\n });\n });\n\n describe('Props', () => {\n describe('groupReadonly', () => {\n describe('set to true', () => {\n it('on load does not check the radio when clicked', async () => {\n page = await setupPage('group-readonly');\n const radio = await page.find('q2-radio');\n\n expect(await isChecked(page)).toBe(false);\n expect(radio).not.toHaveAttribute('checked');\n\n await clickRadio(page);\n\n expect(await isChecked(page)).toBe(false);\n expect(radio).not.toHaveAttribute('checked');\n });\n it('after load does not check the radio when clicked', async () => {\n page = await setupPage();\n const radio = await page.find('q2-radio');\n\n expect(await isChecked(page)).toBe(false);\n expect(radio).not.toHaveAttribute('checked');\n\n radio.setProperty('groupReadonly', true);\n await page.waitForChanges();\n await clickRadio(page);\n\n expect(await isChecked(page)).toBe(false);\n expect(radio).not.toHaveAttribute('checked');\n });\n });\n describe('set to false', () => {\n it('on load checks the radio when clicked', async () => {\n page = await setupPage();\n const radio = await page.find('q2-radio');\n\n expect(await isChecked(page)).toBe(false);\n expect(radio).not.toHaveAttribute('checked');\n\n await clickRadio(page);\n\n expect(await isChecked(page)).toBe(true);\n expect(radio).toHaveAttribute('checked');\n });\n it('after load checks the radio when clicked', async () => {\n page = await setupPage('group-readonly');\n const radio = await page.find('q2-radio');\n\n expect(await isChecked(page)).toBe(false);\n expect(radio).not.toHaveAttribute('checked');\n\n radio.setProperty('groupReadonly', false);\n await page.waitForChanges();\n await clickRadio(page);\n\n expect(await isChecked(page)).toBe(true);\n expect(radio).toHaveAttribute('checked');\n });\n });\n });\n });\n\n describe('Regressions', () => {\n it('keeps the svg at 18px wide even with long labels', async function (): Promise<void> {\n const lotsOfText =\n 'Interdum et malesuada fames ac ante ipsum primis in faucibus. Praesent sed ipsum iaculis, dignissim orci quis, mollis nibh. Pellentesque eget dolor tristique, placerat nibh sollicitudin, vehicula sapien. ';\n page = await setupPage('value=\"1\" disabled checked name=\"testName\"', lotsOfText);\n const svg = await page.find('q2-radio >>> svg');\n const svgStyles = await svg.getComputedStyle();\n\n expect(svgStyles.width).toEqual('18px');\n });\n });\n\n describe('Deprecations', () => {\n it('handles deprecated `ariaLabel` prop', async () => {\n const label = 'My Label';\n page = await setupPage(`aria-label=\"${label}\"`);\n await testDeprecatedAriaLabel(await page.find('q2-radio'), label);\n\n expect(await page.find('q2-radio >>> input')).toEqualAttribute('aria-label', label);\n });\n });\n\n describe('Accessibility', () => {\n describe('aXe DevTools', () => {\n it('does not have accessibility violations', async () => {\n const page = await setupPage('value=\"1\" disabled checked name=\"testName\"');\n const hasViolations = await evaluateA11y(page);\n expect(hasViolations).toBe(false);\n });\n });\n describe('Accessibility Tree', () => {\n it('is correctly represented in the accessibility tree', async () => {\n page = await setupPage();\n const accessibilitySnapshot = await page.accessibility.snapshot();\n const radio = accessibilitySnapshot.children[0];\n\n expect(radio.role).toBe('radio');\n expect(radio.name).toBe('My Radio');\n expect(radio.checked).toBe(false);\n });\n });\n describe('Keyboard Controls', () => {});\n describe('Other', () => {});\n });\n});\n"]}
@@ -66,7 +66,9 @@ button {
66
66
  }
67
67
 
68
68
  :host {
69
- margin-top: var(--tct-radio-group-margin-top, var(--app-scale-2x, 10px));
69
+ --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)));
70
+ display: block;
71
+ margin: var(--tct-radio-group-margin, var(--comp-default-radio-group-margin));
70
72
  }
71
73
 
72
74
  fieldset {
@@ -122,7 +124,7 @@ legend.sr-only {
122
124
  --comp-default-margin: var(--app-scale-1x, 5px) 0;
123
125
  --comp-options-margin: var(--tct-radio-group-options-margin, var(--t-radio-group-options-margin, var(--comp-default-margin, 5px 0)));
124
126
  margin: var(--comp-options-margin);
125
- padding: var(--tct-radio-group-options-padding, var(--t-radio-group-options-padding, var(--app-scale-1x, 5px)));
127
+ padding: var(--tct-radio-group-options-padding, var(--t-radio-group-options-padding, var(--app-scale-0x, 0px)));
126
128
  border-width: 1px;
127
129
  border-color: transparent;
128
130
  border-style: solid;
@@ -1 +1 @@
1
- {"version":3,"file":"q2-radio-group.js","sourceRoot":"","sources":["../../../src/components/q2-radio-group/q2-radio-group.tsx"],"names":[],"mappings":"AAAA,OAAO,EACH,SAAS,EACT,IAAI,EACJ,OAAO,EACP,CAAC,EACD,MAAM,EAEN,KAAK,EAEL,KAAK,EACL,QAAQ,EACR,MAAM,GACT,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAGvF,MAAM,OAAO,YAAY;;QACrB,yBAAyB;QAEzB,QAAG,GAAW,eAAe,UAAU,EAAE,EAAE,CAAC;QA0N5C,uBAAkB,GAAG,GAAG,EAAE;YACtB,2FAA2F;YAC3F,MAAM,iBAAiB,GAAG,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,OAAO,KAAK,IAA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AC,cAAc,IAAE,WAAW,CAAC,IAAI,CAAC,CAAO;gBACnF,QAAQ,IAAI,CACT,gEACI,IAAI,EAAC,OAAO,aACJ,WAAW,GACZ,CACd,CACC,CACT;YACD,iEACI,QAAQ,EAAE,IAAI,CAAC,kBAAkB,kBACnB,QAAQ,CAAC,CAAC,CAAC,GAAG,QAAQ,EAAE,CAAC,CAAC,CAAC,SAAS;gBAEjD,SAAS,IAAI,+DAAQ,KAAK,EAAC,SAAS,IAAE,WAAW,CAAC,IAAI,CAAC,CAAU;gBACjE,IAAI,CAAC,QAAQ,EAAE,CACT,CACJ,CACd,CAAC;IACN,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGJ","sourcesContent":["import {\n Component,\n Prop,\n Element,\n h,\n Listen,\n EventEmitter,\n Event,\n ComponentInterface,\n Watch,\n Fragment,\n Method,\n} from '@stencil/core';\nimport { createGuid, isEventFromElement, overrideFocus, renderLabel } from 'src/utils';\n\n@Component({ tag: 'q2-radio-group', shadow: true, styleUrl: 'q2-radio-group.scss' })\nexport class Q2RadioGroup implements ComponentInterface {\n // #region Own Properties\n\n _id: string = `radio-group-${createGuid()}`;\n mutationObserver: MutationObserver;\n\n // #endregion\n // #region Host HTML Element\n\n @Element()\n hostElement: HTMLElement;\n\n // #endregion\n // #region Public Property API\n\n /** Determines if all radios in the group are put into a `disabled` state. */\n @Prop({ reflect: true })\n disabled: boolean = false;\n\n /** Determines if the component should display in an errant state. */\n @Prop({ reflect: true })\n hasError: boolean = false;\n\n /**\n * Hide's the group's `<label>` element from view.\n * @warning\n * Only use when a visible label is impractical.\n */\n @Prop({ reflect: true, mutable: true })\n hideLabel: boolean;\n\n /**\n * Text for the fieldset legend describing the radio group.\n * @localizable\n */\n @Prop({ reflect: true })\n label: string;\n\n /** Identifier which ties all radios together for accessibility and DOM selection. */\n @Prop({ reflect: true })\n name: string;\n\n /** Appends \"(optional)\" to the group label, and sets `aria-required` on the nested input tag to `false`. */\n @Prop({ reflect: true })\n optional: boolean;\n\n /** Determines if all radios in the group can be focused, but not interacted with. */\n @Prop({ reflect: true })\n readonly: boolean;\n\n /** Provides alignment direction for tile-style radio group. */\n @Prop({ reflect: true })\n tileAlignment: 'left' | 'center' | 'right' = 'center';\n\n /** @deprecated */\n @Prop({ reflect: true, mutable: true })\n tilelayout: boolean;\n\n /** Show the radio group as a horizontal set of tiles. */\n @Prop({ reflect: true, mutable: true })\n tileLayout: boolean;\n\n /** The `value` of the currently selected `q2-radio` within the `q2-radio-group`. */\n @Prop({ mutable: true })\n value: string;\n\n // #endregion\n // #region Events\n\n /**\n * Emitted when the value of the radio group changes.\n * @legacyEvent\n */\n @Event()\n change: EventEmitter<{ value: string }>;\n\n // #endregion\n // #region Component Lifecycle Events\n\n componentWillLoad() {\n this.checkedRadioExists();\n this.onMutationObserved();\n this.handleDeprecatedTilelayout(this.tilelayout);\n }\n\n componentDidLoad() {\n const observer = new MutationObserver(this.onMutationObserved);\n observer.observe(this.hostElement, { childList: true });\n this.mutationObserver = observer;\n overrideFocus(this.hostElement);\n this.checkedRadioExists();\n }\n\n // #endregion\n // #region Listeners\n\n @Listen('change')\n onHostElementChange(event: CustomEvent) {\n if (event.target === this.hostElement) {\n if (!this.hostElement.onchange) {\n this.value = event.detail.value;\n }\n }\n }\n\n @Listen('focus')\n delegateFocus(event: FocusEvent) {\n if (!isEventFromElement(event, this.hostElement)) return;\n const radio = this.hostElement.querySelector('q2-radio[checked]') || this.hostElement.querySelector('q2-radio');\n radio?.dispatchEvent(new FocusEvent('focus'));\n }\n\n @Listen('keydown')\n keydownHandler(event: KeyboardEvent) {\n const currentValue = (event.target as HTMLElement).getAttribute('value') || this.value;\n let index = this.radioElements.findIndex(\n el => el === event.target || (el as HTMLElement).getAttribute('value') === currentValue\n );\n let sign = 0;\n switch (event.key) {\n case 'ArrowLeft':\n case 'ArrowUp':\n sign = -1;\n break;\n\n case 'ArrowRight':\n case 'ArrowDown':\n sign = 1;\n break;\n }\n\n if (index === -1 || sign === 0) {\n return;\n }\n index += sign;\n index = sign < 0 ? Math.max(0, index) : Math.min(this.radioElements.length - 1, index);\n event.preventDefault();\n if (!this.readonly) {\n this.value = this.radioElements[index].value;\n }\n this.radioElements[index].dispatchEvent(new FocusEvent('focus'));\n }\n\n // #endregion\n // #region Public Methods API\n\n /**\n * Emulates clicking the `<q2-radio>` option with the provided value.\n *\n * @testOnly\n */\n @Method()\n setValue(value: string) {\n this.radioElements.forEach(radio => {\n if (value !== radio.value) return;\n radio.click();\n });\n }\n\n // #endregion\n // #region Watchers\n\n @Watch('disabled')\n disabledUpdated() {\n this.radioElements.forEach(radio => {\n radio.groupDisabled = this.disabled;\n });\n }\n\n @Watch('name')\n nameUpdated() {\n this.radioElements.forEach(radio => {\n radio.name = this.name || this._id;\n });\n }\n\n @Watch('readonly')\n readonlyUpdated() {\n const readonly = this.readonly;\n this.radioElements.forEach(radio => (radio.groupReadonly = readonly));\n }\n\n @Watch('tilelayout')\n handleDeprecatedTilelayout(tilelayout: boolean) {\n if (typeof tilelayout !== 'boolean') return;\n this.tileLayout = tilelayout;\n this.tilelayout = undefined;\n }\n\n @Watch('tileLayout')\n tileLayoutUpdated(tileLayout: boolean) {\n this.radioElements.forEach(radio => {\n radio.groupTileLayout = tileLayout;\n });\n }\n\n @Watch('value')\n valueUpdated(newVal: string) {\n this.radioElements.forEach(radio => {\n radio.checked = newVal === radio.value;\n // Removes checked attribute from trailing radios, if multiple individual radio's are intially checked (checked={true}) at componentDidLoad\n if (!radio.checked) {\n radio.removeAttribute('checked');\n radio.tabIndex = -1;\n } else if (radio.checked) {\n radio.tabIndex = 0;\n }\n });\n }\n\n // #endregion\n // #region Local Methods\n\n get inputId() {\n return this._id;\n }\n\n get radioElements() {\n return Array.from(this.hostElement.querySelectorAll('q2-radio')) as HTMLQ2RadioElement[];\n }\n\n checkedRadioExists = () => {\n // Returns first checked individual q2-radio or undefined if none are set to checked={true}\n const firstCheckedRadio = this.radioElements.find(radio => radio.checked === true) || undefined;\n\n // Changes radio-group[\"value\"] if inital value is not set and if a any individual q2-radio is checked\n if (!this.value && !!firstCheckedRadio) {\n this.value = firstCheckedRadio.value;\n } else if (!this.value && !firstCheckedRadio) {\n // if no radios are meant to be checked, then assign first radio tabIndex of 0\n if (this.radioElements.length) this.radioElements[0].tabIndex = 0;\n }\n };\n\n inputDom() {\n if (this.tileLayout) {\n const { tileAlignment } = this;\n const alignment = ['left', 'center', 'right'].includes(tileAlignment) ? tileAlignment : 'center';\n return (\n <div class={`tile-container ${alignment}`}>\n <div class=\"options-container\">\n <slot />\n </div>\n </div>\n );\n } else {\n return (\n <div class=\"options-container\">\n <slot />\n </div>\n );\n }\n }\n\n onInnerRadioChange = (event: CustomEvent) => {\n event.stopImmediatePropagation();\n if (this.readonly) return;\n\n this.change.emit({ value: event.detail.value });\n };\n\n onMutationObserved = () => {\n this.valueUpdated(this.value);\n this.nameUpdated();\n this.disabledUpdated();\n this.readonlyUpdated();\n this.tileLayoutUpdated(this.tileLayout);\n };\n\n // #endregion\n // #region Render Methods\n\n render() {\n const showLabel = this.label || this.optional || this.readonly;\n const { hasError } = this;\n const showLabelRow = (showLabel && !this.hideLabel) || hasError;\n return (\n <Fragment>\n {showLabelRow && (\n <div class=\"label-row\">\n {showLabel && !this.hideLabel && <div class=\"group-legend\">{renderLabel(this)}</div>}\n {hasError && (\n <q2-icon\n type=\"error\"\n test-id=\"iconError\"\n ></q2-icon>\n )}\n </div>\n )}\n <fieldset\n onChange={this.onInnerRadioChange}\n aria-invalid={hasError ? `${hasError}` : undefined}\n >\n {showLabel && <legend class=\"sr-only\">{renderLabel(this)}</legend>}\n {this.inputDom()}\n </fieldset>\n </Fragment>\n );\n }\n\n // #endregion\n}\n"]}
1
+ {"version":3,"file":"q2-radio-group.js","sourceRoot":"","sources":["../../../../src/components/q2-radio-group/q2-radio-group.tsx"],"names":[],"mappings":"AAAA,OAAO,EACH,SAAS,EACT,IAAI,EACJ,OAAO,EACP,CAAC,EACD,MAAM,EAEN,KAAK,EAEL,KAAK,EACL,QAAQ,EACR,MAAM,GACT,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAGvF,MAAM,OAAO,YAAY;;QACrB,yBAAyB;QAEzB,QAAG,GAAW,eAAe,UAAU,EAAE,EAAE,CAAC;QA0N5C,uBAAkB,GAAG,GAAG,EAAE;YACtB,2FAA2F;YAC3F,MAAM,iBAAiB,GAAG,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,OAAO,KAAK,IAAI,CAAC,IAAI,SAAS,CAAC;YAEhG,sGAAsG;YACtG,IAAI,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC,CAAC,iBAAiB,EAAE,CAAC;gBACrC,IAAI,CAAC,KAAK,GAAG,iBAAiB,CAAC,KAAK,CAAC;YACzC,CAAC;iBAAM,IAAI,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC,iBAAiB,EAAE,CAAC;gBAC3C,8EAA8E;gBAC9E,IAAI,IAAI,CAAC,aAAa,CAAC,MAAM;oBAAE,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,QAAQ,GAAG,CAAC,CAAC;YACtE,CAAC;QACL,CAAC,CAAC;QAsBF,uBAAkB,GAAG,CAAC,KAAkB,EAAE,EAAE;YACxC,KAAK,CAAC,wBAAwB,EAAE,CAAC;YACjC,I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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGJ","sourcesContent":["import {\n Component,\n Prop,\n Element,\n h,\n Listen,\n EventEmitter,\n Event,\n ComponentInterface,\n Watch,\n Fragment,\n Method,\n} from '@stencil/core';\nimport { createGuid, isEventFromElement, overrideFocus, renderLabel } from 'src/utils';\n\n@Component({ tag: 'q2-radio-group', shadow: true, styleUrl: 'q2-radio-group.scss' })\nexport class Q2RadioGroup implements ComponentInterface {\n // #region Own Properties\n\n _id: string = `radio-group-${createGuid()}`;\n mutationObserver: MutationObserver;\n\n // #endregion\n // #region Host HTML Element\n\n @Element()\n hostElement: HTMLElement;\n\n // #endregion\n // #region Public Property API\n\n /** Determines if all radios in the group are put into a `disabled` state. */\n @Prop({ reflect: true })\n disabled: boolean = false;\n\n /** Determines if the component should display in an errant state. */\n @Prop({ reflect: true })\n hasError: boolean = false;\n\n /**\n * Hide's the group's `<label>` element from view.\n * @warning\n * Only use when a visible label is impractical.\n */\n @Prop({ reflect: true, mutable: true })\n hideLabel: boolean;\n\n /**\n * Text for the fieldset legend describing the radio group.\n * @localizable\n */\n @Prop({ reflect: true })\n label: string;\n\n /** Identifier which ties all radios together for accessibility and DOM selection. */\n @Prop({ reflect: true })\n name: string;\n\n /** Appends \"(optional)\" to the group label, and sets `aria-required` on the nested input tag to `false`. */\n @Prop({ reflect: true })\n optional: boolean;\n\n /** Determines if all radios in the group can be focused, but not interacted with. */\n @Prop({ reflect: true })\n readonly: boolean;\n\n /** Provides alignment direction for tile-style radio group. */\n @Prop({ reflect: true })\n tileAlignment: 'left' | 'center' | 'right' = 'center';\n\n /** @deprecated */\n @Prop({ reflect: true, mutable: true })\n tilelayout: boolean;\n\n /** Show the radio group as a horizontal set of tiles. */\n @Prop({ reflect: true, mutable: true })\n tileLayout: boolean;\n\n /** The `value` of the currently selected `q2-radio` within the `q2-radio-group`. */\n @Prop({ mutable: true })\n value: string;\n\n // #endregion\n // #region Events\n\n /**\n * Emitted when the value of the radio group changes.\n * @legacyEvent\n */\n @Event()\n change: EventEmitter<{ value: string }>;\n\n // #endregion\n // #region Component Lifecycle Events\n\n componentWillLoad() {\n this.checkedRadioExists();\n this.onMutationObserved();\n this.handleDeprecatedTilelayout(this.tilelayout);\n }\n\n componentDidLoad() {\n const observer = new MutationObserver(this.onMutationObserved);\n observer.observe(this.hostElement, { childList: true });\n this.mutationObserver = observer;\n overrideFocus(this.hostElement);\n this.checkedRadioExists();\n }\n\n // #endregion\n // #region Listeners\n\n @Listen('change')\n onHostElementChange(event: CustomEvent) {\n if (event.target === this.hostElement) {\n if (!this.hostElement.onchange) {\n this.value = event.detail.value;\n }\n }\n }\n\n @Listen('focus')\n delegateFocus(event: FocusEvent) {\n if (!isEventFromElement(event, this.hostElement)) return;\n const radio = this.hostElement.querySelector('q2-radio[checked]') || this.hostElement.querySelector('q2-radio');\n radio?.dispatchEvent(new FocusEvent('focus'));\n }\n\n @Listen('keydown')\n keydownHandler(event: KeyboardEvent) {\n const currentValue = (event.target as HTMLElement).getAttribute('value') || this.value;\n let index = this.radioElements.findIndex(\n el => el === event.target || (el as HTMLElement).getAttribute('value') === currentValue\n );\n let sign = 0;\n switch (event.key) {\n case 'ArrowLeft':\n case 'ArrowUp':\n sign = -1;\n break;\n\n case 'ArrowRight':\n case 'ArrowDown':\n sign = 1;\n break;\n }\n\n if (index === -1 || sign === 0) {\n return;\n }\n index += sign;\n index = sign < 0 ? Math.max(0, index) : Math.min(this.radioElements.length - 1, index);\n event.preventDefault();\n if (!this.readonly) {\n this.value = this.radioElements[index].value;\n }\n this.radioElements[index].dispatchEvent(new FocusEvent('focus'));\n }\n\n // #endregion\n // #region Public Methods API\n\n /**\n * Emulates clicking the `<q2-radio>` option with the provided value.\n *\n * @testOnly\n */\n @Method()\n setValue(value: string) {\n this.radioElements.forEach(radio => {\n if (value !== radio.value) return;\n radio.click();\n });\n }\n\n // #endregion\n // #region Watchers\n\n @Watch('disabled')\n disabledUpdated() {\n this.radioElements.forEach(radio => {\n radio.groupDisabled = this.disabled;\n });\n }\n\n @Watch('name')\n nameUpdated() {\n this.radioElements.forEach(radio => {\n radio.name = this.name || this._id;\n });\n }\n\n @Watch('readonly')\n readonlyUpdated() {\n const readonly = this.readonly;\n this.radioElements.forEach(radio => (radio.groupReadonly = readonly));\n }\n\n @Watch('tilelayout')\n handleDeprecatedTilelayout(tilelayout: boolean) {\n if (typeof tilelayout !== 'boolean') return;\n this.tileLayout = tilelayout;\n this.tilelayout = undefined;\n }\n\n @Watch('tileLayout')\n tileLayoutUpdated(tileLayout: boolean) {\n this.radioElements.forEach(radio => {\n radio.groupTileLayout = tileLayout;\n });\n }\n\n @Watch('value')\n valueUpdated(newVal: string) {\n this.radioElements.forEach(radio => {\n radio.checked = newVal === radio.value;\n // Removes checked attribute from trailing radios, if multiple individual radio's are intially checked (checked={true}) at componentDidLoad\n if (!radio.checked) {\n radio.removeAttribute('checked');\n radio.tabIndex = -1;\n } else if (radio.checked) {\n radio.tabIndex = 0;\n }\n });\n }\n\n // #endregion\n // #region Local Methods\n\n get inputId() {\n return this._id;\n }\n\n get radioElements() {\n return Array.from(this.hostElement.querySelectorAll('q2-radio')) as HTMLQ2RadioElement[];\n }\n\n checkedRadioExists = () => {\n // Returns first checked individual q2-radio or undefined if none are set to checked={true}\n const firstCheckedRadio = this.radioElements.find(radio => radio.checked === true) || undefined;\n\n // Changes radio-group[\"value\"] if inital value is not set and if a any individual q2-radio is checked\n if (!this.value && !!firstCheckedRadio) {\n this.value = firstCheckedRadio.value;\n } else if (!this.value && !firstCheckedRadio) {\n // if no radios are meant to be checked, then assign first radio tabIndex of 0\n if (this.radioElements.length) this.radioElements[0].tabIndex = 0;\n }\n };\n\n inputDom() {\n if (this.tileLayout) {\n const { tileAlignment } = this;\n const alignment = ['left', 'center', 'right'].includes(tileAlignment) ? tileAlignment : 'center';\n return (\n <div class={`tile-container ${alignment}`}>\n <div class=\"options-container\">\n <slot />\n </div>\n </div>\n );\n } else {\n return (\n <div class=\"options-container\">\n <slot />\n </div>\n );\n }\n }\n\n onInnerRadioChange = (event: CustomEvent) => {\n event.stopImmediatePropagation();\n if (this.readonly) return;\n\n this.change.emit({ value: event.detail.value });\n };\n\n onMutationObserved = () => {\n this.valueUpdated(this.value);\n this.nameUpdated();\n this.disabledUpdated();\n this.readonlyUpdated();\n this.tileLayoutUpdated(this.tileLayout);\n };\n\n // #endregion\n // #region Render Methods\n\n render() {\n const showLabel = this.label || this.optional || this.readonly;\n const { hasError } = this;\n const showLabelRow = (showLabel && !this.hideLabel) || hasError;\n return (\n <Fragment>\n {showLabelRow && (\n <div class=\"label-row\">\n {showLabel && !this.hideLabel && <div class=\"group-legend\">{renderLabel(this)}</div>}\n {hasError && (\n <q2-icon\n type=\"error\"\n test-id=\"iconError\"\n ></q2-icon>\n )}\n </div>\n )}\n <fieldset\n onChange={this.onInnerRadioChange}\n aria-invalid={hasError ? `${hasError}` : undefined}\n >\n {showLabel && <legend class=\"sr-only\">{renderLabel(this)}</legend>}\n {this.inputDom()}\n </fieldset>\n </Fragment>\n );\n }\n\n // #endregion\n}\n"]}