q2-tecton-elements 1.53.1 → 1.53.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (413) hide show
  1. package/dist/cjs/click-elsewhere_2.cjs.entry.js +59 -60
  2. package/dist/cjs/click-elsewhere_2.cjs.entry.js.map +1 -1
  3. package/dist/cjs/{index-07285783.js → index-76f63767.js} +1 -21
  4. package/dist/cjs/index-76f63767.js.map +1 -0
  5. package/dist/cjs/loader.cjs.js +1 -1
  6. package/dist/cjs/q2-action-group.cjs.entry.js +2 -2
  7. package/dist/cjs/q2-action-sheet.cjs.entry.js +2 -2
  8. package/dist/cjs/q2-avatar.cjs.entry.js +1 -1
  9. package/dist/cjs/q2-badge_7.cjs.entry.js +4 -4
  10. package/dist/cjs/q2-calendar.cjs.entry.js +1 -1
  11. package/dist/cjs/q2-card.cjs.entry.js +1 -1
  12. package/dist/cjs/q2-carousel-pane.cjs.entry.js +3 -3
  13. package/dist/cjs/q2-carousel.cjs.entry.js +1 -1
  14. package/dist/cjs/q2-chart-area.cjs.entry.js +2 -2
  15. package/dist/cjs/q2-chart-bar.cjs.entry.js +2 -2
  16. package/dist/cjs/q2-chart-donut.cjs.entry.js +2 -2
  17. package/dist/cjs/q2-checkbox-group.cjs.entry.js +1 -1
  18. package/dist/cjs/q2-checkbox.cjs.entry.js +1 -1
  19. package/dist/cjs/q2-currency.cjs.entry.js +1 -1
  20. package/dist/cjs/q2-data-table.cjs.entry.js +1 -1
  21. package/dist/cjs/q2-detail.cjs.entry.js +2 -2
  22. package/dist/cjs/q2-dropdown-item.cjs.entry.js +1 -1
  23. package/dist/cjs/q2-dropdown.cjs.entry.js +1 -1
  24. package/dist/cjs/q2-editable-field.cjs.entry.js +1 -1
  25. package/dist/cjs/q2-example.cjs.entry.js +1 -1
  26. package/dist/cjs/q2-file-picker.cjs.entry.js +1 -1
  27. package/dist/cjs/q2-formatted-text.cjs.entry.js +1 -1
  28. package/dist/cjs/q2-item_3.cjs.entry.js +3 -3
  29. package/dist/cjs/q2-legend.cjs.entry.js +1 -1
  30. package/dist/cjs/q2-loc.cjs.entry.js +2 -2
  31. package/dist/cjs/q2-message.cjs.entry.js +2 -2
  32. package/dist/cjs/q2-month-picker.cjs.entry.js +3 -3
  33. package/dist/cjs/q2-optgroup.cjs.entry.js +2 -2
  34. package/dist/cjs/q2-option-list.cjs.entry.js +1 -1
  35. package/dist/cjs/q2-option.cjs.entry.js +2 -2
  36. package/dist/cjs/q2-pagination.cjs.entry.js +4 -4
  37. package/dist/cjs/q2-pill.cjs.entry.js +2 -2
  38. package/dist/cjs/q2-radio-group.cjs.entry.js +1 -1
  39. package/dist/cjs/q2-radio.cjs.entry.js +1 -1
  40. package/dist/cjs/q2-relative-time.cjs.entry.js +2 -2
  41. package/dist/cjs/q2-resize-observer.cjs.entry.js +1 -1
  42. package/dist/cjs/q2-section.cjs.entry.js +3 -3
  43. package/dist/cjs/q2-select.cjs.entry.js +89 -13
  44. package/dist/cjs/q2-select.cjs.entry.js.map +1 -1
  45. package/dist/cjs/q2-stepper-pane.cjs.entry.js +1 -1
  46. package/dist/cjs/q2-stepper-vertical.cjs.entry.js +2 -2
  47. package/dist/cjs/q2-stepper.cjs.entry.js +2 -2
  48. package/dist/cjs/q2-tag.cjs.entry.js +2 -2
  49. package/dist/cjs/q2-tecton-elements.cjs.js +1 -1
  50. package/dist/cjs/q2-textarea.cjs.entry.js +2 -2
  51. package/dist/cjs/q2-tooltip.cjs.entry.js +1 -1
  52. package/dist/cjs/tecton-tab-pane.cjs.entry.js +2 -2
  53. package/dist/collection/components/click-elsewhere/click-elsewhere.js.map +1 -1
  54. package/dist/collection/components/click-elsewhere/test/click-elsewhere-test.e2e.js.map +1 -1
  55. package/dist/collection/components/q2-action-group/q2-action-group.js +1 -1
  56. package/dist/collection/components/q2-action-group/q2-action-group.js.map +1 -1
  57. package/dist/collection/components/q2-action-group/test/q2-action-group.e2e.js.map +1 -1
  58. package/dist/collection/components/q2-action-group/test/q2-action-group.spec.js.map +1 -1
  59. package/dist/collection/components/q2-action-sheet/q2-action-sheet.js +1 -1
  60. package/dist/collection/components/q2-action-sheet/q2-action-sheet.js.map +1 -1
  61. package/dist/collection/components/q2-action-sheet/test/q2-action-sheet-test.e2e.js.map +1 -1
  62. package/dist/collection/components/q2-avatar/q2-avatar.js +1 -1
  63. package/dist/collection/components/q2-avatar/q2-avatar.js.map +1 -1
  64. package/dist/collection/components/q2-avatar/test/q2-avatar-test.e2e.js.map +1 -1
  65. package/dist/collection/components/q2-badge/q2-badge.js.map +1 -1
  66. package/dist/collection/components/q2-badge/test/q2-badge-test.e2e.js.map +1 -1
  67. package/dist/collection/components/q2-btn/q2-btn.js.map +1 -1
  68. package/dist/collection/components/q2-btn/test/q2-btn-test.e2e.js.map +1 -1
  69. package/dist/collection/components/q2-calendar/q2-calendar-helpers.js.map +1 -1
  70. package/dist/collection/components/q2-calendar/q2-calendar-types.js.map +1 -1
  71. package/dist/collection/components/q2-calendar/q2-calendar-validation.js.map +1 -1
  72. package/dist/collection/components/q2-calendar/q2-calendar.js.map +1 -1
  73. package/dist/collection/components/q2-calendar/q2-month-picker.js +2 -2
  74. package/dist/collection/components/q2-calendar/q2-month-picker.js.map +1 -1
  75. package/dist/collection/components/q2-calendar/test/helpers-test.e2e.js.map +1 -1
  76. package/dist/collection/components/q2-calendar/test/q2-calendar-month-picker-test.e2e.js.map +1 -1
  77. package/dist/collection/components/q2-calendar/test/q2-calendar-test.e2e.js +2 -2
  78. package/dist/collection/components/q2-calendar/test/q2-calendar-test.e2e.js.map +1 -1
  79. package/dist/collection/components/q2-calendar/test/validation-test.e2e.js.map +1 -1
  80. package/dist/collection/components/q2-card/q2-card.js.map +1 -1
  81. package/dist/collection/components/q2-card/test/q2-card-test.e2e.js.map +1 -1
  82. package/dist/collection/components/q2-carousel/q2-carousel.js.map +1 -1
  83. package/dist/collection/components/q2-carousel/test/q2-carousel-test.e2e.js.map +1 -1
  84. package/dist/collection/components/q2-carousel-pane/q2-carousel-pane.js +2 -2
  85. package/dist/collection/components/q2-carousel-pane/q2-carousel-pane.js.map +1 -1
  86. package/dist/collection/components/q2-carousel-pane/test/q2-carousel-pane-test.e2e.js.map +1 -1
  87. package/dist/collection/components/q2-carousel-pane/test/q2-carousel-pane-test.spec.js.map +1 -1
  88. package/dist/collection/components/q2-chart-area/q2-chart-area.js +1 -1
  89. package/dist/collection/components/q2-chart-area/q2-chart-area.js.map +1 -1
  90. package/dist/collection/components/q2-chart-area/test/q2-chart-area-test.e2e.js.map +1 -1
  91. package/dist/collection/components/q2-chart-bar/q2-chart-bar.js +1 -1
  92. package/dist/collection/components/q2-chart-bar/q2-chart-bar.js.map +1 -1
  93. package/dist/collection/components/q2-chart-bar/test/q2-chart-bar-test.e2e.js.map +1 -1
  94. package/dist/collection/components/q2-chart-donut/q2-chart-donut.js +1 -1
  95. package/dist/collection/components/q2-chart-donut/q2-chart-donut.js.map +1 -1
  96. package/dist/collection/components/q2-chart-donut/test/q2-chart-donut-test.e2e.js.map +1 -1
  97. package/dist/collection/components/q2-checkbox/q2-checkbox.js.map +1 -1
  98. package/dist/collection/components/q2-checkbox/test/q2-checkbox-test.e2e.js.map +1 -1
  99. package/dist/collection/components/q2-checkbox-group/q2-checkbox-group.js.map +1 -1
  100. package/dist/collection/components/q2-checkbox-group/test/q2-checkbox-group-test.e2e.js.map +1 -1
  101. package/dist/collection/components/q2-currency/q2-currency.js +1 -1
  102. package/dist/collection/components/q2-currency/q2-currency.js.map +1 -1
  103. package/dist/collection/components/q2-currency/test/q2-currency-test.e2e.js.map +1 -1
  104. package/dist/collection/components/q2-data-table/q2-data-table.js.map +1 -1
  105. package/dist/collection/components/q2-data-table/test/q2-data-table-test.e2e.js.map +1 -1
  106. package/dist/collection/components/q2-detail/q2-detail.js +1 -1
  107. package/dist/collection/components/q2-detail/q2-detail.js.map +1 -1
  108. package/dist/collection/components/q2-detail/test/q2-detail-test.e2e.js.map +1 -1
  109. package/dist/collection/components/q2-dropdown/q2-dropdown.js.map +1 -1
  110. package/dist/collection/components/q2-dropdown/test/q2-dropdown-test.e2e.js +5 -17
  111. package/dist/collection/components/q2-dropdown/test/q2-dropdown-test.e2e.js.map +1 -1
  112. package/dist/collection/components/q2-dropdown-item/q2-dropdown-item.js.map +1 -1
  113. package/dist/collection/components/q2-dropdown-item/test/q2-dropdown-item-test.e2e.js.map +1 -1
  114. package/dist/collection/components/q2-editable-field/q2-editable-field.js.map +1 -1
  115. package/dist/collection/components/q2-editable-field/test/q2-editable-field-test.e2e.js.map +1 -1
  116. package/dist/collection/components/q2-example/q2-example.js +1 -1
  117. package/dist/collection/components/q2-example/q2-example.js.map +1 -1
  118. package/dist/collection/components/q2-example/test/q2-example.e2e.js.map +1 -1
  119. package/dist/collection/components/q2-example/test/q2-example.spec.js.map +1 -1
  120. package/dist/collection/components/q2-file-picker/q2-file-picker.js.map +1 -1
  121. package/dist/collection/components/q2-file-picker/test/q2-file-picker-test.e2e.js.map +1 -1
  122. package/dist/collection/components/q2-file-picker/test/q2-file-picker-test.spec.js.map +1 -1
  123. package/dist/collection/components/q2-formatted-text/q2-formatted-text.js +1 -1
  124. package/dist/collection/components/q2-formatted-text/q2-formatted-text.js.map +1 -1
  125. package/dist/collection/components/q2-formatted-text/test/q2-formatted-text-test.e2e.js.map +1 -1
  126. package/dist/collection/components/q2-icon/q2-icon-types.js.map +1 -1
  127. package/dist/collection/components/q2-icon/q2-icon.js.map +1 -1
  128. package/dist/collection/components/q2-icon/test/q2-icon-test.e2e.js.map +1 -1
  129. package/dist/collection/components/q2-input/formatting/alpha.js.map +1 -1
  130. package/dist/collection/components/q2-input/formatting/alpha.spec.js.map +1 -1
  131. package/dist/collection/components/q2-input/formatting/alphanumeric.js.map +1 -1
  132. package/dist/collection/components/q2-input/formatting/alphanumeric.spec.js.map +1 -1
  133. package/dist/collection/components/q2-input/formatting/credit-card.js.map +1 -1
  134. package/dist/collection/components/q2-input/formatting/credit-card.spec.js.map +1 -1
  135. package/dist/collection/components/q2-input/formatting/currency.js.map +1 -1
  136. package/dist/collection/components/q2-input/formatting/currency.spec.js.map +1 -1
  137. package/dist/collection/components/q2-input/formatting/date.js.map +1 -1
  138. package/dist/collection/components/q2-input/formatting/date.spec.js.map +1 -1
  139. package/dist/collection/components/q2-input/formatting/generic.js.map +1 -1
  140. package/dist/collection/components/q2-input/formatting/number.js.map +1 -1
  141. package/dist/collection/components/q2-input/formatting/numeric.js.map +1 -1
  142. package/dist/collection/components/q2-input/formatting/numeric.spec.js.map +1 -1
  143. package/dist/collection/components/q2-input/formatting/phone.js.map +1 -1
  144. package/dist/collection/components/q2-input/formatting/phone.spec.js.map +1 -1
  145. package/dist/collection/components/q2-input/formatting/postal.js.map +1 -1
  146. package/dist/collection/components/q2-input/formatting/postal.spec.js.map +1 -1
  147. package/dist/collection/components/q2-input/formatting/ssn.js.map +1 -1
  148. package/dist/collection/components/q2-input/formatting/ssn.spec.js.map +1 -1
  149. package/dist/collection/components/q2-input/formatting/tin.js.map +1 -1
  150. package/dist/collection/components/q2-input/formatting/tin.spec.js.map +1 -1
  151. package/dist/collection/components/q2-input/q2-input-types.js.map +1 -1
  152. package/dist/collection/components/q2-input/q2-input.js +1 -1
  153. package/dist/collection/components/q2-input/q2-input.js.map +1 -1
  154. package/dist/collection/components/q2-input/test/q2-input-credit-card-test.e2e.js.map +1 -1
  155. package/dist/collection/components/q2-input/test/q2-input-test.e2e.js.map +1 -1
  156. package/dist/collection/components/q2-input/test/q2-input-test.spec.js.map +1 -1
  157. package/dist/collection/components/q2-item/q2-item.js +1 -1
  158. package/dist/collection/components/q2-item/q2-item.js.map +1 -1
  159. package/dist/collection/components/q2-item/test/q2-item-test.e2e.js.map +1 -1
  160. package/dist/collection/components/q2-item/test/q2-item-test.spec.js.map +1 -1
  161. package/dist/collection/components/q2-legend/q2-legend.js +1 -1
  162. package/dist/collection/components/q2-legend/q2-legend.js.map +1 -1
  163. package/dist/collection/components/q2-legend/test/q2-legend-test.e2e.js.map +1 -1
  164. package/dist/collection/components/q2-legend/test/q2-legend-test.spec.js.map +1 -1
  165. package/dist/collection/components/q2-link/q2-link.js.map +1 -1
  166. package/dist/collection/components/q2-link/test/q2-link-test.e2e.js.map +1 -1
  167. package/dist/collection/components/q2-list/q2-list.js +1 -1
  168. package/dist/collection/components/q2-list/q2-list.js.map +1 -1
  169. package/dist/collection/components/q2-list/test/q2-list-test.e2e.js.map +1 -1
  170. package/dist/collection/components/q2-loading/q2-loading.js.map +1 -1
  171. package/dist/collection/components/q2-loading/skeleton/q2-loading-element/index.js.map +1 -1
  172. package/dist/collection/components/q2-loading/skeleton/shapes.js.map +1 -1
  173. package/dist/collection/components/q2-loading/test/q2-loading-element-test.e2e.js.map +1 -1
  174. package/dist/collection/components/q2-loading/test/q2-loading-test.e2e.js.map +1 -1
  175. package/dist/collection/components/q2-loc/q2-loc.js +1 -1
  176. package/dist/collection/components/q2-loc/q2-loc.js.map +1 -1
  177. package/dist/collection/components/q2-loc/test/q2-loc-test.e2e.js.map +1 -1
  178. package/dist/collection/components/q2-loc/test/q2-loc-test.spec.js.map +1 -1
  179. package/dist/collection/components/q2-message/q2-message.js +1 -1
  180. package/dist/collection/components/q2-message/q2-message.js.map +1 -1
  181. package/dist/collection/components/q2-message/test/q2-message-test.e2e.js.map +1 -1
  182. package/dist/collection/components/q2-optgroup/q2-optgroup.js +1 -1
  183. package/dist/collection/components/q2-optgroup/q2-optgroup.js.map +1 -1
  184. package/dist/collection/components/q2-optgroup/test/q2-optgroup-test.e2e.js.map +1 -1
  185. package/dist/collection/components/q2-option/q2-option.js +1 -1
  186. package/dist/collection/components/q2-option/q2-option.js.map +1 -1
  187. package/dist/collection/components/q2-option/test/q2-option-test.e2e.js.map +1 -1
  188. package/dist/collection/components/q2-option/test/q2-option-test.spec.js.map +1 -1
  189. package/dist/collection/components/q2-option-list/q2-option-list.js.map +1 -1
  190. package/dist/collection/components/q2-option-list/test/q2-option-list-test.e2e.js.map +1 -1
  191. package/dist/collection/components/q2-pagination/q2-pagination.js +3 -3
  192. package/dist/collection/components/q2-pagination/q2-pagination.js.map +1 -1
  193. package/dist/collection/components/q2-pagination/test/q2-pagination-test.e2e.js +1 -0
  194. package/dist/collection/components/q2-pagination/test/q2-pagination-test.e2e.js.map +1 -1
  195. package/dist/collection/components/q2-pill/q2-pill.js +1 -1
  196. package/dist/collection/components/q2-pill/q2-pill.js.map +1 -1
  197. package/dist/collection/components/q2-pill/test/q2-pill-test.e2e.js +1 -1
  198. package/dist/collection/components/q2-pill/test/q2-pill-test.e2e.js.map +1 -1
  199. package/dist/collection/components/q2-popover/q2-popover.css +18 -10
  200. package/dist/collection/components/q2-popover/q2-popover.js +59 -59
  201. package/dist/collection/components/q2-popover/q2-popover.js.map +1 -1
  202. package/dist/collection/components/q2-popover/test/q2-popover-test.e2e.js +1 -34
  203. package/dist/collection/components/q2-popover/test/q2-popover-test.e2e.js.map +1 -1
  204. package/dist/collection/components/q2-popover/test/q2-popover-test.spec.js +743 -435
  205. package/dist/collection/components/q2-popover/test/q2-popover-test.spec.js.map +1 -1
  206. package/dist/collection/components/q2-radio/q2-radio.js.map +1 -1
  207. package/dist/collection/components/q2-radio/test/q2-radio-test.e2e.js.map +1 -1
  208. package/dist/collection/components/q2-radio-group/q2-radio-group.js.map +1 -1
  209. package/dist/collection/components/q2-radio-group/test/q2-radio-group-test.e2e.js.map +1 -1
  210. package/dist/collection/components/q2-relative-time/q2-relative-time.js +1 -1
  211. package/dist/collection/components/q2-relative-time/q2-relative-time.js.map +1 -1
  212. package/dist/collection/components/q2-relative-time/test/q2-relative-time-test.e2e.js.map +1 -1
  213. package/dist/collection/components/q2-resize-observer/q2-resize-observer.js +1 -1
  214. package/dist/collection/components/q2-resize-observer/q2-resize-observer.js.map +1 -1
  215. package/dist/collection/components/q2-resize-observer/test/q2-resize-observer.e2e.js.map +1 -1
  216. package/dist/collection/components/q2-resize-observer/test/q2-resize-observer.spec.js.map +1 -1
  217. package/dist/collection/components/q2-section/q2-section.js +2 -2
  218. package/dist/collection/components/q2-section/q2-section.js.map +1 -1
  219. package/dist/collection/components/q2-section/test/q2-section-test.e2e.js.map +1 -1
  220. package/dist/collection/components/q2-select/q2-select.js +110 -15
  221. package/dist/collection/components/q2-select/q2-select.js.map +1 -1
  222. package/dist/collection/components/q2-select/test/q2-select-test.e2e.js +1 -1
  223. package/dist/collection/components/q2-select/test/q2-select-test.e2e.js.map +1 -1
  224. package/dist/collection/components/q2-select/test/q2-select-test.spec.js +412 -0
  225. package/dist/collection/components/q2-select/test/q2-select-test.spec.js.map +1 -0
  226. package/dist/collection/components/q2-stepper/q2-stepper.js +1 -1
  227. package/dist/collection/components/q2-stepper/q2-stepper.js.map +1 -1
  228. package/dist/collection/components/q2-stepper/test/q2-stepper-test.e2e.js.map +1 -1
  229. package/dist/collection/components/q2-stepper-pane/q2-stepper-pane.js.map +1 -1
  230. package/dist/collection/components/q2-stepper-pane/test/q2-stepper-pane-test.e2e.js.map +1 -1
  231. package/dist/collection/components/q2-stepper-vertical/q2-stepper-vertical.js +1 -1
  232. package/dist/collection/components/q2-stepper-vertical/q2-stepper-vertical.js.map +1 -1
  233. package/dist/collection/components/q2-stepper-vertical/test/q2-stepper-vertical-test.e2e.js.map +1 -1
  234. package/dist/collection/components/q2-tab-container/q2-tab-container.js +1 -1
  235. package/dist/collection/components/q2-tab-container/q2-tab-container.js.map +1 -1
  236. package/dist/collection/components/q2-tab-container/test/q2-tab-container-test.e2e.js.map +1 -1
  237. package/dist/collection/components/q2-tab-container/test/q2-tab-container-test.spec.js.map +1 -1
  238. package/dist/collection/components/q2-tab-pane/q2-tab-pane.js +1 -1
  239. package/dist/collection/components/q2-tab-pane/q2-tab-pane.js.map +1 -1
  240. package/dist/collection/components/q2-tab-pane/test/q2-tab-pane-test.e2e.js.map +1 -1
  241. package/dist/collection/components/q2-tag/q2-tag.js +1 -1
  242. package/dist/collection/components/q2-tag/q2-tag.js.map +1 -1
  243. package/dist/collection/components/q2-tag/test/q2-tag-test.e2e.js +6 -1
  244. package/dist/collection/components/q2-tag/test/q2-tag-test.e2e.js.map +1 -1
  245. package/dist/collection/components/q2-textarea/q2-textarea.js +1 -1
  246. package/dist/collection/components/q2-textarea/q2-textarea.js.map +1 -1
  247. package/dist/collection/components/q2-textarea/test/q2-textarea-test.e2e.js.map +1 -1
  248. package/dist/collection/components/q2-tooltip/q2-tooltip.js.map +1 -1
  249. package/dist/collection/components/q2-tooltip/test/q2-tooltip-test.e2e.js.map +1 -1
  250. package/dist/collection/components/tecton-tab-pane/tecton-tab-pane-types.js.map +1 -1
  251. package/dist/collection/components/tecton-tab-pane/tecton-tab-pane.js +2 -2
  252. package/dist/collection/components/tecton-tab-pane/tecton-tab-pane.js.map +1 -1
  253. package/dist/collection/components/tecton-tab-pane/test/tecton-tab-pane-test.e2e.js.map +1 -1
  254. package/dist/collection/index.js.map +1 -1
  255. package/dist/collection/utils/action-sheet.js.map +1 -1
  256. package/dist/collection/utils/charting.js.map +1 -1
  257. package/dist/collection/utils/helpers.js.map +1 -1
  258. package/dist/collection/utils/index.js.map +1 -1
  259. package/dist/collection/utils/sanitize-html-string.js.map +1 -1
  260. package/dist/collection/utils/sanitize-regex-string.js.map +1 -1
  261. package/dist/collection/utils/test/action-sheet-test.e2e.js.map +1 -1
  262. package/dist/collection/utils/test/index.spec.js.map +1 -1
  263. package/dist/components/index2.js +1 -20
  264. package/dist/components/index2.js.map +1 -1
  265. package/dist/components/q2-action-group.js +1 -1
  266. package/dist/components/q2-action-sheet.js +1 -1
  267. package/dist/components/q2-avatar2.js +1 -1
  268. package/dist/components/q2-carousel-pane.js +2 -2
  269. package/dist/components/q2-chart-area.js +1 -1
  270. package/dist/components/q2-chart-bar.js +1 -1
  271. package/dist/components/q2-chart-donut.js +1 -1
  272. package/dist/components/q2-currency.js +1 -1
  273. package/dist/components/q2-detail.js +1 -1
  274. package/dist/components/q2-example.js +1 -1
  275. package/dist/components/q2-formatted-text.js +1 -1
  276. package/dist/components/q2-input2.js +1 -1
  277. package/dist/components/q2-item2.js +1 -1
  278. package/dist/components/q2-legend2.js +1 -1
  279. package/dist/components/q2-list2.js +1 -1
  280. package/dist/components/q2-loc.js +1 -1
  281. package/dist/components/q2-message2.js +1 -1
  282. package/dist/components/q2-month-picker.js +2 -2
  283. package/dist/components/q2-optgroup2.js +1 -1
  284. package/dist/components/q2-option2.js +1 -1
  285. package/dist/components/q2-pagination.js +3 -3
  286. package/dist/components/q2-pill.js +1 -1
  287. package/dist/components/q2-popover2.js +58 -59
  288. package/dist/components/q2-popover2.js.map +1 -1
  289. package/dist/components/q2-relative-time.js +1 -1
  290. package/dist/components/q2-resize-observer2.js +1 -1
  291. package/dist/components/q2-section.js +2 -2
  292. package/dist/components/q2-select2.js +92 -16
  293. package/dist/components/q2-select2.js.map +1 -1
  294. package/dist/components/q2-stepper-vertical.js +1 -1
  295. package/dist/components/q2-stepper.js +1 -1
  296. package/dist/components/q2-tab-container.js +1 -1
  297. package/dist/components/q2-tab-pane.js +1 -1
  298. package/dist/components/q2-tag.js +1 -1
  299. package/dist/components/q2-textarea.js +1 -1
  300. package/dist/components/tecton-tab-pane.js +2 -2
  301. package/dist/esm/click-elsewhere_2.entry.js +59 -60
  302. package/dist/esm/click-elsewhere_2.entry.js.map +1 -1
  303. package/dist/esm/{index-d18e2a20.js → index-504f1a9e.js} +2 -21
  304. package/dist/esm/index-504f1a9e.js.map +1 -0
  305. package/dist/esm/loader.js +1 -1
  306. package/dist/esm/q2-action-group.entry.js +2 -2
  307. package/dist/esm/q2-action-sheet.entry.js +2 -2
  308. package/dist/esm/q2-avatar.entry.js +1 -1
  309. package/dist/esm/q2-badge_7.entry.js +4 -4
  310. package/dist/esm/q2-calendar.entry.js +1 -1
  311. package/dist/esm/q2-card.entry.js +1 -1
  312. package/dist/esm/q2-carousel-pane.entry.js +3 -3
  313. package/dist/esm/q2-carousel.entry.js +1 -1
  314. package/dist/esm/q2-chart-area.entry.js +2 -2
  315. package/dist/esm/q2-chart-bar.entry.js +2 -2
  316. package/dist/esm/q2-chart-donut.entry.js +2 -2
  317. package/dist/esm/q2-checkbox-group.entry.js +1 -1
  318. package/dist/esm/q2-checkbox.entry.js +1 -1
  319. package/dist/esm/q2-currency.entry.js +1 -1
  320. package/dist/esm/q2-data-table.entry.js +1 -1
  321. package/dist/esm/q2-detail.entry.js +2 -2
  322. package/dist/esm/q2-dropdown-item.entry.js +1 -1
  323. package/dist/esm/q2-dropdown.entry.js +1 -1
  324. package/dist/esm/q2-editable-field.entry.js +1 -1
  325. package/dist/esm/q2-example.entry.js +1 -1
  326. package/dist/esm/q2-file-picker.entry.js +1 -1
  327. package/dist/esm/q2-formatted-text.entry.js +1 -1
  328. package/dist/esm/q2-item_3.entry.js +3 -3
  329. package/dist/esm/q2-legend.entry.js +1 -1
  330. package/dist/esm/q2-loc.entry.js +2 -2
  331. package/dist/esm/q2-message.entry.js +2 -2
  332. package/dist/esm/q2-month-picker.entry.js +3 -3
  333. package/dist/esm/q2-optgroup.entry.js +2 -2
  334. package/dist/esm/q2-option-list.entry.js +1 -1
  335. package/dist/esm/q2-option.entry.js +2 -2
  336. package/dist/esm/q2-pagination.entry.js +4 -4
  337. package/dist/esm/q2-pill.entry.js +2 -2
  338. package/dist/esm/q2-radio-group.entry.js +1 -1
  339. package/dist/esm/q2-radio.entry.js +1 -1
  340. package/dist/esm/q2-relative-time.entry.js +2 -2
  341. package/dist/esm/q2-resize-observer.entry.js +1 -1
  342. package/dist/esm/q2-section.entry.js +3 -3
  343. package/dist/esm/q2-select.entry.js +90 -14
  344. package/dist/esm/q2-select.entry.js.map +1 -1
  345. package/dist/esm/q2-stepper-pane.entry.js +1 -1
  346. package/dist/esm/q2-stepper-vertical.entry.js +2 -2
  347. package/dist/esm/q2-stepper.entry.js +2 -2
  348. package/dist/esm/q2-tag.entry.js +2 -2
  349. package/dist/esm/q2-tecton-elements.js +1 -1
  350. package/dist/esm/q2-textarea.entry.js +2 -2
  351. package/dist/esm/q2-tooltip.entry.js +1 -1
  352. package/dist/esm/tecton-tab-pane.entry.js +2 -2
  353. package/dist/jest.setup.js +22 -0
  354. package/dist/jest.setup.js.map +1 -0
  355. package/dist/q2-tecton-elements/click-elsewhere_2.entry.js +170 -164
  356. package/dist/q2-tecton-elements/click-elsewhere_2.entry.js.map +1 -1
  357. package/dist/q2-tecton-elements/{index-d18e2a20.js → index-504f1a9e.js} +51 -69
  358. package/dist/q2-tecton-elements/index-504f1a9e.js.map +1 -0
  359. package/dist/q2-tecton-elements/q2-action-group.entry.js +4 -4
  360. package/dist/q2-tecton-elements/q2-action-sheet.entry.js +34 -34
  361. package/dist/q2-tecton-elements/q2-avatar.entry.js +6 -6
  362. package/dist/q2-tecton-elements/q2-badge_7.entry.js +17 -17
  363. package/dist/q2-tecton-elements/q2-calendar.entry.js +1 -1
  364. package/dist/q2-tecton-elements/q2-card.entry.js +1 -1
  365. package/dist/q2-tecton-elements/q2-carousel-pane.entry.js +21 -21
  366. package/dist/q2-tecton-elements/q2-carousel.entry.js +1 -1
  367. package/dist/q2-tecton-elements/q2-chart-area.entry.js +3 -3
  368. package/dist/q2-tecton-elements/q2-chart-bar.entry.js +3 -3
  369. package/dist/q2-tecton-elements/q2-chart-donut.entry.js +101 -101
  370. package/dist/q2-tecton-elements/q2-checkbox-group.entry.js +1 -1
  371. package/dist/q2-tecton-elements/q2-checkbox.entry.js +1 -1
  372. package/dist/q2-tecton-elements/q2-currency.entry.js +6 -6
  373. package/dist/q2-tecton-elements/q2-data-table.entry.js +1 -1
  374. package/dist/q2-tecton-elements/q2-detail.entry.js +39 -39
  375. package/dist/q2-tecton-elements/q2-dropdown-item.entry.js +1 -1
  376. package/dist/q2-tecton-elements/q2-dropdown.entry.js +1 -1
  377. package/dist/q2-tecton-elements/q2-editable-field.entry.js +8 -8
  378. package/dist/q2-tecton-elements/q2-example.entry.js +1 -1
  379. package/dist/q2-tecton-elements/q2-file-picker.entry.js +1 -1
  380. package/dist/q2-tecton-elements/q2-formatted-text.entry.js +2 -2
  381. package/dist/q2-tecton-elements/q2-item_3.entry.js +19 -19
  382. package/dist/q2-tecton-elements/q2-legend.entry.js +2 -2
  383. package/dist/q2-tecton-elements/q2-loc.entry.js +5 -5
  384. package/dist/q2-tecton-elements/q2-message.entry.js +21 -21
  385. package/dist/q2-tecton-elements/q2-month-picker.entry.js +14 -14
  386. package/dist/q2-tecton-elements/q2-optgroup.entry.js +8 -8
  387. package/dist/q2-tecton-elements/q2-option-list.entry.js +1 -1
  388. package/dist/q2-tecton-elements/q2-option.entry.js +14 -14
  389. package/dist/q2-tecton-elements/q2-pagination.entry.js +34 -34
  390. package/dist/q2-tecton-elements/q2-pill.entry.js +14 -14
  391. package/dist/q2-tecton-elements/q2-radio-group.entry.js +1 -1
  392. package/dist/q2-tecton-elements/q2-radio.entry.js +1 -1
  393. package/dist/q2-tecton-elements/q2-relative-time.entry.js +2 -2
  394. package/dist/q2-tecton-elements/q2-resize-observer.entry.js +1 -1
  395. package/dist/q2-tecton-elements/q2-section.entry.js +19 -19
  396. package/dist/q2-tecton-elements/q2-select.entry.js +156 -92
  397. package/dist/q2-tecton-elements/q2-select.entry.js.map +1 -1
  398. package/dist/q2-tecton-elements/q2-stepper-pane.entry.js +1 -1
  399. package/dist/q2-tecton-elements/q2-stepper-vertical.entry.js +37 -37
  400. package/dist/q2-tecton-elements/q2-stepper.entry.js +29 -29
  401. package/dist/q2-tecton-elements/q2-tag.entry.js +25 -25
  402. package/dist/q2-tecton-elements/q2-tecton-elements.esm.js +1 -1
  403. package/dist/q2-tecton-elements/q2-tecton-elements.esm.js.map +1 -1
  404. package/dist/q2-tecton-elements/q2-textarea.entry.js +3 -3
  405. package/dist/q2-tecton-elements/q2-tooltip.entry.js +1 -1
  406. package/dist/q2-tecton-elements/tecton-tab-pane.entry.js +6 -6
  407. package/dist/types/builds/q2e/development/tecton/tecton/packages/q2-tecton-elements/.stencil/jest.setup.d.ts +1 -0
  408. package/dist/types/components/q2-popover/q2-popover.d.ts +4 -4
  409. package/dist/types/components/q2-select/q2-select.d.ts +19 -0
  410. package/package.json +3 -3
  411. package/dist/cjs/index-07285783.js.map +0 -1
  412. package/dist/esm/index-d18e2a20.js.map +0 -1
  413. package/dist/q2-tecton-elements/index-d18e2a20.js.map +0 -1
@@ -0,0 +1,412 @@
1
+ import { newSpecPage } from "@stencil/core/testing";
2
+ import { Q2Select } from "../q2-select";
3
+ import { Q2OptionList } from "../../q2-option-list/q2-option-list";
4
+ import * as utils from "../../../utils/index";
5
+ // Set up global screen object for testing
6
+ const mockScreen = {
7
+ orientation: {
8
+ type: 'portrait-primary',
9
+ addEventListener: jest.fn(),
10
+ removeEventListener: jest.fn(),
11
+ },
12
+ };
13
+ global.screen = mockScreen;
14
+ Object.defineProperty(window, 'screen', {
15
+ writable: true,
16
+ value: mockScreen,
17
+ });
18
+ // Set up global visualViewport for testing
19
+ const mockVisualViewport = {
20
+ addEventListener: jest.fn(),
21
+ removeEventListener: jest.fn(),
22
+ width: 800,
23
+ height: 600,
24
+ };
25
+ global.visualViewport = mockVisualViewport;
26
+ Object.defineProperty(window, 'visualViewport', {
27
+ value: mockVisualViewport,
28
+ configurable: true,
29
+ });
30
+ const samplePlatformDimensions = {
31
+ scrollY: 0,
32
+ innerHeight: 800,
33
+ innerWidth: 600,
34
+ outletOffset: 20,
35
+ };
36
+ const sampleTectonWindow = {
37
+ inMobileApp: false,
38
+ noStrings: false,
39
+ platformUrl: '',
40
+ platformDimensions: samplePlatformDimensions,
41
+ };
42
+ describe('q2-select', () => {
43
+ let specPage;
44
+ let specSelect;
45
+ let specElement;
46
+ let isMobileSpy;
47
+ let handleAriaLabelSpy;
48
+ let overrideFocusSpy;
49
+ // Helper function to set screen orientation type
50
+ const setOrientationType = (type) => {
51
+ mockScreen.orientation.type = type;
52
+ };
53
+ beforeEach(() => {
54
+ isMobileSpy = jest.spyOn(utils, 'isMobile').mockReturnValue(false);
55
+ handleAriaLabelSpy = jest.spyOn(utils, 'handleAriaLabel');
56
+ overrideFocusSpy = jest.spyOn(utils, 'overrideFocus');
57
+ setOrientationType('landscape-primary');
58
+ mockScreen.orientation.addEventListener.mockClear();
59
+ mockScreen.orientation.removeEventListener.mockClear();
60
+ });
61
+ afterEach(() => {
62
+ isMobileSpy.mockRestore();
63
+ handleAriaLabelSpy.mockRestore();
64
+ overrideFocusSpy.mockRestore();
65
+ });
66
+ describe('Props', () => { });
67
+ describe('Events', () => { });
68
+ describe('Component Lifecycle Events', () => {
69
+ describe('disconnectedCallback', () => {
70
+ it('calls disconnect() on mutationObserver', async () => {
71
+ specSelect = new Q2Select();
72
+ specSelect.mutationObserver = new MutationObserver(() => { });
73
+ const disconnectSpy = jest.spyOn(specSelect.mutationObserver, 'disconnect');
74
+ specSelect.disconnectedCallback();
75
+ expect(disconnectSpy).toHaveBeenCalled();
76
+ });
77
+ it('sets mutationObserver to null', async () => {
78
+ specSelect = new Q2Select();
79
+ specSelect.mutationObserver = new MutationObserver(() => { });
80
+ expect(specSelect.mutationObserver).not.toBeNull();
81
+ specSelect.disconnectedCallback();
82
+ expect(specSelect.mutationObserver).toBeNull();
83
+ });
84
+ it('calls destroyEventListeners', async () => {
85
+ specSelect = new Q2Select();
86
+ const destroyEventListenersSpy = jest.spyOn(specSelect, 'destroyEventListeners');
87
+ specSelect.disconnectedCallback();
88
+ expect(destroyEventListenersSpy).toHaveBeenCalled();
89
+ });
90
+ });
91
+ describe('componentWillLoad', () => {
92
+ it('calls handleAriaLabel() helper function', async () => {
93
+ specSelect = new Q2Select();
94
+ specSelect.componentWillLoad();
95
+ expect(handleAriaLabelSpy).toHaveBeenCalled();
96
+ });
97
+ it('calls handleOrientationChange', async () => {
98
+ specSelect = new Q2Select();
99
+ const handleOrientationChangeSpy = jest.spyOn(specSelect, 'handleOrientationChange');
100
+ specSelect.componentWillLoad();
101
+ expect(handleOrientationChangeSpy).toHaveBeenCalled();
102
+ });
103
+ it('calls buildStructuredSelectedOptions', async () => {
104
+ specSelect = new Q2Select();
105
+ const buildOptionsSpy = jest.spyOn(specSelect, 'buildStructuredSelectedOptions');
106
+ specSelect.componentWillLoad();
107
+ expect(buildOptionsSpy).toHaveBeenCalled();
108
+ });
109
+ it('calls handleMultilineOptionsUpdate', async () => {
110
+ specSelect = new Q2Select();
111
+ const handleUpdateSpy = jest.spyOn(specSelect, 'handleMultilineOptionsUpdate');
112
+ specSelect.componentWillLoad();
113
+ expect(handleUpdateSpy).toHaveBeenCalled();
114
+ });
115
+ });
116
+ describe('componentDidLoad', () => {
117
+ it('calls initMutationObserver', async () => {
118
+ specPage = await newSpecPage({
119
+ components: [Q2Select, Q2OptionList],
120
+ html: `<q2-select></q2-select>`,
121
+ });
122
+ specSelect = specPage.rootInstance;
123
+ const initMutationObserverSpy = jest.spyOn(specSelect, 'initMutationObserver');
124
+ specSelect.componentDidLoad();
125
+ expect(initMutationObserverSpy).toHaveBeenCalled();
126
+ });
127
+ it('calls initEventListeners', async () => {
128
+ specPage = await newSpecPage({
129
+ components: [Q2Select],
130
+ html: `<q2-select></q2-select>`,
131
+ });
132
+ specSelect = specPage.rootInstance;
133
+ const initEventListenersSpy = jest.spyOn(specSelect, 'initEventListeners');
134
+ specSelect.componentDidLoad();
135
+ expect(initEventListenersSpy).toHaveBeenCalled();
136
+ });
137
+ it('calls overrideFocus helper', async () => {
138
+ specPage = await newSpecPage({
139
+ components: [Q2Select],
140
+ html: `<q2-select></q2-select>`,
141
+ });
142
+ specSelect = specPage.rootInstance;
143
+ specElement = specPage.root;
144
+ specSelect.componentDidLoad();
145
+ expect(overrideFocusSpy).toHaveBeenCalledWith(specElement);
146
+ });
147
+ it('setTimeout calls checkSelectedDisplay', async () => {
148
+ specPage = await newSpecPage({
149
+ components: [Q2Select],
150
+ html: `<q2-select></q2-select>`,
151
+ });
152
+ specSelect = specPage.rootInstance;
153
+ const checkSelectedDisplaySpy = jest.spyOn(specSelect, 'checkSelectedDisplay');
154
+ jest.useFakeTimers();
155
+ specSelect.componentDidLoad();
156
+ jest.runAllTimers();
157
+ expect(checkSelectedDisplaySpy).toHaveBeenCalled();
158
+ jest.useRealTimers();
159
+ });
160
+ });
161
+ describe('componentDidRender', () => {
162
+ it('calls forEach on scheduledAfterRender', async () => {
163
+ specSelect = new Q2Select();
164
+ specSelect.scheduledAfterRender = [jest.fn()];
165
+ const forEachSpy = jest.spyOn(specSelect.scheduledAfterRender, 'forEach');
166
+ jest.useFakeTimers();
167
+ specSelect.componentDidRender();
168
+ jest.runAllTimers();
169
+ expect(forEachSpy).toHaveBeenCalled();
170
+ jest.useRealTimers();
171
+ });
172
+ });
173
+ });
174
+ describe('Listeners', () => { });
175
+ describe('Public Methods API', () => {
176
+ describe('Public Methods', () => { });
177
+ describe('Test Methods', () => { });
178
+ });
179
+ describe('Watchers', () => { });
180
+ describe('Local Methods', () => {
181
+ describe('Getters', () => {
182
+ describe('isModule', () => {
183
+ beforeEach(() => {
184
+ specSelect = new Q2Select();
185
+ });
186
+ it('returns false when window top matches window and platformDimensions is not defined', async () => {
187
+ expect(window.top).toBe(window);
188
+ expect(window.Tecton).toBeUndefined();
189
+ expect(specSelect.isModule).toBe(false);
190
+ });
191
+ it('returns false when window top does not match window and platformDimensions is not defined', async () => {
192
+ const windowSpy = jest.spyOn(window, 'top', 'get').mockReturnValue({});
193
+ expect(window.top).not.toEqual(window);
194
+ expect(window.Tecton).toBeUndefined();
195
+ expect(specSelect.isModule).toBe(false);
196
+ windowSpy.mockRestore();
197
+ });
198
+ it('returns false when window top matches window and platformDimensions is defined', async () => {
199
+ window.Tecton = sampleTectonWindow;
200
+ expect(window.top).toBe(window);
201
+ expect(window.Tecton.platformDimensions).toBeTruthy();
202
+ expect(specSelect.isModule).toBe(false);
203
+ });
204
+ it('returns true when window top does not match window and platformDimensions is defined', async () => {
205
+ const windowSpy = jest.spyOn(window, 'top', 'get').mockReturnValue({});
206
+ window.Tecton = sampleTectonWindow;
207
+ expect(specSelect.isModule).toBe(true);
208
+ windowSpy.mockRestore();
209
+ });
210
+ });
211
+ });
212
+ describe('Methods', () => {
213
+ describe('destroyEventListeners', () => {
214
+ let windowRemoveEventListenerSpy;
215
+ beforeEach(() => {
216
+ isMobileSpy.mockReturnValue(true);
217
+ specSelect = new Q2Select();
218
+ mockScreen.orientation.removeEventListener.mockClear();
219
+ windowRemoveEventListenerSpy = jest.spyOn(window, 'removeEventListener');
220
+ mockVisualViewport.removeEventListener.mockClear();
221
+ });
222
+ it('checks if isMobile', async () => {
223
+ specSelect = new Q2Select();
224
+ specSelect.destroyEventListeners();
225
+ expect(isMobileSpy).toHaveBeenCalled();
226
+ });
227
+ describe('when in mobile environment', () => {
228
+ it('calls removeEventListener on screen.orientation ', async () => {
229
+ specSelect.destroyEventListeners();
230
+ expect(mockScreen.orientation.removeEventListener).toHaveBeenCalledWith('change', specSelect.handleOrientationChange);
231
+ });
232
+ it('calls removeEventListener on window', async () => {
233
+ specSelect.destroyEventListeners();
234
+ expect(windowRemoveEventListenerSpy).toHaveBeenCalledWith('resize', specSelect.handleOrientationChange);
235
+ });
236
+ it('calls removeEventListener on visualViewport', async () => {
237
+ mockVisualViewport.removeEventListener.mockClear();
238
+ specSelect.destroyEventListeners();
239
+ expect(mockVisualViewport.removeEventListener).toHaveBeenCalledWith('resize', specSelect.handleOrientationChange);
240
+ });
241
+ });
242
+ it('does NOT remove event listener when NOT mobile', async () => {
243
+ isMobileSpy.mockReturnValue(false);
244
+ specSelect = new Q2Select();
245
+ specSelect.destroyEventListeners();
246
+ expect(mockScreen.orientation.removeEventListener).not.toHaveBeenCalled();
247
+ expect(windowRemoveEventListenerSpy).not.toHaveBeenCalled();
248
+ expect(mockVisualViewport.removeEventListener).not.toHaveBeenCalled();
249
+ });
250
+ });
251
+ describe('handleOrientationChange', () => {
252
+ beforeEach(() => {
253
+ isMobileSpy.mockReturnValue(true);
254
+ specSelect = new Q2Select();
255
+ });
256
+ it('checks if isMobile', async () => {
257
+ specSelect.handleOrientationChange();
258
+ expect(isMobileSpy).toHaveBeenCalled();
259
+ });
260
+ describe('when searchable is initially true', () => {
261
+ beforeEach(() => {
262
+ specSelect.searchable = true;
263
+ specSelect.originalSearchable = true;
264
+ });
265
+ it('sets "searchable" to false if in landscape orientation', async () => {
266
+ setOrientationType('landscape-primary');
267
+ specSelect.handleOrientationChange();
268
+ expect(specSelect.searchable).toBe(false);
269
+ });
270
+ it('does nothing in portrait orientation', async () => {
271
+ setOrientationType('portrait-primary');
272
+ specSelect.handleOrientationChange();
273
+ expect(specSelect.searchable).toBe(true);
274
+ });
275
+ it('restores searchable when returning to portrait', async () => {
276
+ setOrientationType('landscape-primary');
277
+ specSelect.handleOrientationChange();
278
+ expect(specSelect.searchable).toBe(false);
279
+ setOrientationType('portrait-primary');
280
+ specSelect.handleOrientationChange();
281
+ expect(specSelect.searchable).toBe(true);
282
+ });
283
+ });
284
+ describe('when searchable is initially undefined/false', () => {
285
+ it('does nothing', async () => {
286
+ specSelect.originalSearchable = false;
287
+ setOrientationType('landscape-primary');
288
+ specSelect.handleOrientationChange();
289
+ expect(specSelect.searchable).toBe(false);
290
+ });
291
+ });
292
+ });
293
+ describe('initEventListeners', () => {
294
+ let windowAddEventListenerSpy;
295
+ beforeEach(() => {
296
+ isMobileSpy.mockReturnValue(true);
297
+ specSelect = new Q2Select();
298
+ mockScreen.orientation.addEventListener.mockClear();
299
+ windowAddEventListenerSpy = jest.spyOn(window, 'addEventListener');
300
+ mockVisualViewport.addEventListener.mockClear();
301
+ });
302
+ it('checks if isMobile', async () => {
303
+ specSelect = new Q2Select();
304
+ specSelect.initEventListeners();
305
+ expect(isMobileSpy).toHaveBeenCalled();
306
+ });
307
+ describe('when in mobile environment', () => {
308
+ it('calls addEventListener on screen.orientation', async () => {
309
+ specSelect.initEventListeners();
310
+ expect(mockScreen.orientation.addEventListener).toHaveBeenCalledWith('change', specSelect.handleOrientationChange);
311
+ });
312
+ it('calls addEventListener on window', async () => {
313
+ specSelect.initEventListeners();
314
+ expect(windowAddEventListenerSpy).toHaveBeenCalledWith('resize', specSelect.handleOrientationChange);
315
+ });
316
+ it('calls addEventListener on visualViewport', async () => {
317
+ specSelect.initEventListeners();
318
+ expect(mockVisualViewport.addEventListener).toHaveBeenCalledWith('resize', specSelect.handleOrientationChange);
319
+ });
320
+ });
321
+ it('does NOT add event listener when NOT mobile', async () => {
322
+ isMobileSpy.mockReturnValue(false);
323
+ specSelect = new Q2Select();
324
+ specSelect.initEventListeners();
325
+ expect(mockScreen.orientation.addEventListener).not.toHaveBeenCalled();
326
+ expect(mockVisualViewport.addEventListener).not.toHaveBeenCalled();
327
+ expect(windowAddEventListenerSpy).not.toHaveBeenCalled();
328
+ });
329
+ });
330
+ });
331
+ });
332
+ describe('Render Methods', () => { });
333
+ describe('Accessibility', () => {
334
+ describe('Keyboard Controls', () => {
335
+ let handleOptionListExternalKeydownSpy;
336
+ let q2Select;
337
+ beforeEach(async () => {
338
+ specPage = await newSpecPage({
339
+ components: [Q2Select, Q2OptionList],
340
+ html: `<q2-select></q2-select>`,
341
+ });
342
+ q2Select = specPage.root;
343
+ const q2SelectInstance = specPage.rootInstance;
344
+ handleOptionListExternalKeydownSpy = jest.spyOn(q2SelectInstance, 'handleOptionListExternalKeydown');
345
+ });
346
+ afterEach(() => {
347
+ handleOptionListExternalKeydownSpy.mockRestore();
348
+ });
349
+ it("'Tab' keypress not handled by q2-option-list", async () => {
350
+ const event = new KeyboardEvent('keydown', { key: 'Tab' });
351
+ q2Select.dispatchEvent(event);
352
+ await specPage.waitForChanges();
353
+ expect(handleOptionListExternalKeydownSpy).toHaveBeenCalledWith(event);
354
+ });
355
+ it("'Enter' keypress handled by q2-option-list", async () => {
356
+ const event = new KeyboardEvent('keydown', { key: 'Enter' });
357
+ q2Select.dispatchEvent(event);
358
+ await specPage.waitForChanges();
359
+ expect(handleOptionListExternalKeydownSpy).toHaveBeenCalledWith(event);
360
+ });
361
+ it("'ArrowUp' keypress handled by q2-option-list", async () => {
362
+ const event = new KeyboardEvent('keydown', { key: 'ArrowUp' });
363
+ q2Select.dispatchEvent(event);
364
+ await specPage.waitForChanges();
365
+ expect(handleOptionListExternalKeydownSpy).toHaveBeenCalledWith(event);
366
+ });
367
+ it("'ArrowDown' keypress handled by q2-option-list", async () => {
368
+ const event = new KeyboardEvent('keydown', { key: 'ArrowDown' });
369
+ q2Select.dispatchEvent(event);
370
+ await specPage.waitForChanges();
371
+ expect(handleOptionListExternalKeydownSpy).toHaveBeenCalledWith(event);
372
+ });
373
+ it("'Home' keypress handled by q2-option-list", async () => {
374
+ const event = new KeyboardEvent('keydown', { key: 'Home' });
375
+ q2Select.dispatchEvent(event);
376
+ await specPage.waitForChanges();
377
+ expect(handleOptionListExternalKeydownSpy).toHaveBeenCalledWith(event);
378
+ });
379
+ it("'End' keypress handled by q2-option-list", async () => {
380
+ const event = new KeyboardEvent('keydown', { key: 'End' });
381
+ q2Select.dispatchEvent(event);
382
+ await specPage.waitForChanges();
383
+ expect(handleOptionListExternalKeydownSpy).toHaveBeenCalledWith(event);
384
+ });
385
+ it("'PageUp' keypress handled by q2-option-list", async () => {
386
+ const event = new KeyboardEvent('keydown', { key: 'PageUp' });
387
+ q2Select.dispatchEvent(event);
388
+ await specPage.waitForChanges();
389
+ expect(handleOptionListExternalKeydownSpy).toHaveBeenCalledWith(event);
390
+ });
391
+ it("'PageDown' keypress handled by q2-option-list", async () => {
392
+ const event = new KeyboardEvent('keydown', { key: 'PageDown' });
393
+ q2Select.dispatchEvent(event);
394
+ await specPage.waitForChanges();
395
+ expect(handleOptionListExternalKeydownSpy).toHaveBeenCalledWith(event);
396
+ });
397
+ it("'Esc' keypress handled by q2-option-list", async () => {
398
+ const event = new KeyboardEvent('keydown', { key: 'Esc' });
399
+ q2Select.dispatchEvent(event);
400
+ await specPage.waitForChanges();
401
+ expect(handleOptionListExternalKeydownSpy).toHaveBeenCalledWith(event);
402
+ });
403
+ it("'Space' keypress handled by q2-option-list", async () => {
404
+ const event = new KeyboardEvent('keydown', { key: 'Space' });
405
+ q2Select.dispatchEvent(event);
406
+ await specPage.waitForChanges();
407
+ expect(handleOptionListExternalKeydownSpy).toHaveBeenCalledWith(event);
408
+ });
409
+ });
410
+ });
411
+ });
412
+ //# sourceMappingURL=q2-select-test.spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"q2-select-test.spec.js","sourceRoot":"","sources":["../../../../../src/components/q2-select/test/q2-select-test.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EAAE,QAAQ,EAAE,MAAM,oCAAoC,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,8CAA8C,CAAC;AAC5E,OAAO,KAAK,KAAK,MAAM,WAAW,CAAC;AAEnC,0CAA0C;AAC1C,MAAM,UAAU,GAAG;IACf,WAAW,EAAE;QACT,IAAI,EAAE,kBAAkB;QACxB,gBAAgB,EAAE,IAAI,CAAC,EAAE,EAAE;QAC3B,mBAAmB,EAAE,IAAI,CAAC,EAAE,EAAE;KACjC;CACJ,CAAC;AACD,MAAc,CAAC,MAAM,GAAG,UAAU,CAAC;AACpC,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,QAAQ,EAAE;IACpC,QAAQ,EAAE,IAAI;IACd,KAAK,EAAE,UAAU;CACpB,CAAC,CAAC;AAEH,2CAA2C;AAC3C,MAAM,kBAAkB,GAAG;IACvB,gBAAgB,EAAE,IAAI,CAAC,EAAE,EAAE;IAC3B,mBAAmB,EAAE,IAAI,CAAC,EAAE,EAAE;IAC9B,KAAK,EAAE,GAAG;IACV,MAAM,EAAE,GAAG;CACd,CAAC;AACD,MAAc,CAAC,cAAc,GAAG,kBAAkB,CAAC;AACpD,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,gBAAgB,EAAE;IAC5C,KAAK,EAAE,kBAAkB;IACzB,YAAY,EAAE,IAAI;CACrB,CAAC,CAAC;AAEH,MAAM,wBAAwB,GAAG;IAC7B,OAAO,EAAE,CAAC;IACV,WAAW,EAAE,GAAG;IAChB,UAA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E,KAAK,IAAI,EAAE;gBAC3D,MAAM,KAAK,GAAG,IAAI,aAAa,CAAC,SAAS,EAAE,EAAE,GAAG,EAAE,UAAU,EAAE,CAAC,CAAC;gBAChE,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;gBAC9B,MAAM,QAAQ,CAAC,cAAc,EAAE,CAAC;gBAEhC,MAAM,CAAC,kCAAkC,CAAC,CAAC,oBAAoB,CAAC,KAAK,CAAC,CAAC;YAC3E,CAAC,CAAC,CAAC;YACH,EAAE,CAAC,0CAA0C,EAAE,KAAK,IAAI,EAAE;gBACtD,MAAM,KAAK,GAAG,IAAI,aAAa,CAAC,SAAS,EAAE,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC,CAAC;gBAC3D,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;gBAC9B,MAAM,QAAQ,CAAC,cAAc,EAAE,CAAC;gBAEhC,MAAM,CAAC,kCAAkC,CAAC,CAAC,oBAAoB,CAAC,KAAK,CAAC,CAAC;YAC3E,CAAC,CAAC,CAAC;YACH,EAAE,CAAC,4CAA4C,EAAE,KAAK,IAAI,EAAE;gBACxD,MAAM,KAAK,GAAG,IAAI,aAAa,CAAC,SAAS,EAAE,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC,CAAC;gBAC7D,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;gBAC9B,MAAM,QAAQ,CAAC,cAAc,EAAE,CAAC;gBAEhC,MAAM,CAAC,kCAAkC,CAAC,CAAC,oBAAoB,CAAC,KAAK,CAAC,CAAC;YAC3E,CAAC,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC","sourcesContent":["import { SpecPage, newSpecPage } from '@stencil/core/testing';\nimport { Q2Select } from 'src/components/q2-select/q2-select';\nimport { Q2OptionList } from 'src/components/q2-option-list/q2-option-list';\nimport * as utils from 'src/utils';\n\n// Set up global screen object for testing\nconst mockScreen = {\n orientation: {\n type: 'portrait-primary',\n addEventListener: jest.fn(),\n removeEventListener: jest.fn(),\n },\n};\n(global as any).screen = mockScreen;\nObject.defineProperty(window, 'screen', {\n writable: true,\n value: mockScreen,\n});\n\n// Set up global visualViewport for testing\nconst mockVisualViewport = {\n addEventListener: jest.fn(),\n removeEventListener: jest.fn(),\n width: 800,\n height: 600,\n};\n(global as any).visualViewport = mockVisualViewport;\nObject.defineProperty(window, 'visualViewport', {\n value: mockVisualViewport,\n configurable: true,\n});\n\nconst samplePlatformDimensions = {\n scrollY: 0,\n innerHeight: 800,\n innerWidth: 600,\n outletOffset: 20,\n};\n\nconst sampleTectonWindow = {\n inMobileApp: false,\n noStrings: false,\n platformUrl: '',\n platformDimensions: samplePlatformDimensions,\n};\n\ndescribe('q2-select', () => {\n let specPage: SpecPage;\n let specSelect: Q2Select;\n let specElement;\n let isMobileSpy: jest.SpyInstance;\n let handleAriaLabelSpy: jest.SpyInstance;\n let overrideFocusSpy: jest.SpyInstance;\n\n // Helper function to set screen orientation type\n const setOrientationType = (type: string) => {\n mockScreen.orientation.type = type;\n };\n\n beforeEach(() => {\n isMobileSpy = jest.spyOn(utils, 'isMobile').mockReturnValue(false);\n handleAriaLabelSpy = jest.spyOn(utils, 'handleAriaLabel');\n overrideFocusSpy = jest.spyOn(utils, 'overrideFocus');\n\n setOrientationType('landscape-primary');\n\n (mockScreen.orientation.addEventListener as jest.Mock).mockClear();\n (mockScreen.orientation.removeEventListener as jest.Mock).mockClear();\n });\n\n afterEach(() => {\n isMobileSpy.mockRestore();\n handleAriaLabelSpy.mockRestore();\n overrideFocusSpy.mockRestore();\n });\n\n describe('Props', () => {});\n describe('Events', () => {});\n describe('Component Lifecycle Events', () => {\n describe('disconnectedCallback', () => {\n it('calls disconnect() on mutationObserver', async () => {\n specSelect = new Q2Select();\n specSelect.mutationObserver = new MutationObserver(() => {});\n const disconnectSpy = jest.spyOn(specSelect.mutationObserver, 'disconnect');\n specSelect.disconnectedCallback();\n\n expect(disconnectSpy).toHaveBeenCalled();\n });\n\n it('sets mutationObserver to null', async () => {\n specSelect = new Q2Select();\n specSelect.mutationObserver = new MutationObserver(() => {});\n\n expect(specSelect.mutationObserver).not.toBeNull();\n\n specSelect.disconnectedCallback();\n\n expect(specSelect.mutationObserver).toBeNull();\n });\n\n it('calls destroyEventListeners', async () => {\n specSelect = new Q2Select();\n const destroyEventListenersSpy = jest.spyOn(specSelect, 'destroyEventListeners');\n specSelect.disconnectedCallback();\n\n expect(destroyEventListenersSpy).toHaveBeenCalled();\n });\n });\n\n describe('componentWillLoad', () => {\n it('calls handleAriaLabel() helper function', async () => {\n specSelect = new Q2Select();\n specSelect.componentWillLoad();\n\n expect(handleAriaLabelSpy).toHaveBeenCalled();\n });\n\n it('calls handleOrientationChange', async () => {\n specSelect = new Q2Select();\n const handleOrientationChangeSpy = jest.spyOn(specSelect, 'handleOrientationChange');\n specSelect.componentWillLoad();\n\n expect(handleOrientationChangeSpy).toHaveBeenCalled();\n });\n\n it('calls buildStructuredSelectedOptions', async () => {\n specSelect = new Q2Select();\n const buildOptionsSpy = jest.spyOn(specSelect, 'buildStructuredSelectedOptions');\n specSelect.componentWillLoad();\n\n expect(buildOptionsSpy).toHaveBeenCalled();\n });\n\n it('calls handleMultilineOptionsUpdate', async () => {\n specSelect = new Q2Select();\n const handleUpdateSpy = jest.spyOn(specSelect, 'handleMultilineOptionsUpdate');\n specSelect.componentWillLoad();\n\n expect(handleUpdateSpy).toHaveBeenCalled();\n });\n });\n describe('componentDidLoad', () => {\n it('calls initMutationObserver', async () => {\n specPage = await newSpecPage({\n components: [Q2Select, Q2OptionList],\n html: `<q2-select></q2-select>`,\n });\n specSelect = specPage.rootInstance;\n const initMutationObserverSpy = jest.spyOn(specSelect, 'initMutationObserver');\n specSelect.componentDidLoad();\n\n expect(initMutationObserverSpy).toHaveBeenCalled();\n });\n\n it('calls initEventListeners', async () => {\n specPage = await newSpecPage({\n components: [Q2Select],\n html: `<q2-select></q2-select>`,\n });\n specSelect = specPage.rootInstance;\n const initEventListenersSpy = jest.spyOn(specSelect, 'initEventListeners');\n specSelect.componentDidLoad();\n\n expect(initEventListenersSpy).toHaveBeenCalled();\n });\n\n it('calls overrideFocus helper', async () => {\n specPage = await newSpecPage({\n components: [Q2Select],\n html: `<q2-select></q2-select>`,\n });\n specSelect = specPage.rootInstance;\n specElement = specPage.root;\n specSelect.componentDidLoad();\n\n expect(overrideFocusSpy).toHaveBeenCalledWith(specElement);\n });\n\n it('setTimeout calls checkSelectedDisplay', async () => {\n specPage = await newSpecPage({\n components: [Q2Select],\n html: `<q2-select></q2-select>`,\n });\n specSelect = specPage.rootInstance;\n const checkSelectedDisplaySpy = jest.spyOn(specSelect, 'checkSelectedDisplay');\n\n jest.useFakeTimers();\n specSelect.componentDidLoad();\n jest.runAllTimers();\n\n expect(checkSelectedDisplaySpy).toHaveBeenCalled();\n jest.useRealTimers();\n });\n });\n describe('componentDidRender', () => {\n it('calls forEach on scheduledAfterRender', async () => {\n specSelect = new Q2Select();\n specSelect.scheduledAfterRender = [jest.fn()];\n const forEachSpy = jest.spyOn(specSelect.scheduledAfterRender, 'forEach');\n\n jest.useFakeTimers();\n specSelect.componentDidRender();\n jest.runAllTimers();\n\n expect(forEachSpy).toHaveBeenCalled();\n jest.useRealTimers();\n });\n });\n });\n describe('Listeners', () => {});\n describe('Public Methods API', () => {\n describe('Public Methods', () => {});\n describe('Test Methods', () => {});\n });\n describe('Watchers', () => {});\n describe('Local Methods', () => {\n describe('Getters', () => {\n describe('isModule', () => {\n beforeEach(() => {\n specSelect = new Q2Select();\n });\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(specSelect.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(specSelect.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(specSelect.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(specSelect.isModule).toBe(true);\n windowSpy.mockRestore();\n });\n });\n });\n describe('Methods', () => {\n describe('destroyEventListeners', () => {\n let windowRemoveEventListenerSpy: jest.SpyInstance;\n beforeEach(() => {\n isMobileSpy.mockReturnValue(true);\n specSelect = new Q2Select();\n mockScreen.orientation.removeEventListener.mockClear();\n windowRemoveEventListenerSpy = jest.spyOn(window, 'removeEventListener');\n mockVisualViewport.removeEventListener.mockClear();\n });\n\n it('checks if isMobile', async () => {\n specSelect = new Q2Select();\n specSelect.destroyEventListeners();\n\n expect(isMobileSpy).toHaveBeenCalled();\n });\n\n describe('when in mobile environment', () => {\n it('calls removeEventListener on screen.orientation ', async () => {\n specSelect.destroyEventListeners();\n\n expect(mockScreen.orientation.removeEventListener).toHaveBeenCalledWith(\n 'change',\n specSelect.handleOrientationChange\n );\n });\n\n it('calls removeEventListener on window', async () => {\n specSelect.destroyEventListeners();\n\n expect(windowRemoveEventListenerSpy).toHaveBeenCalledWith(\n 'resize',\n specSelect.handleOrientationChange\n );\n });\n\n it('calls removeEventListener on visualViewport', async () => {\n mockVisualViewport.removeEventListener.mockClear();\n specSelect.destroyEventListeners();\n expect(mockVisualViewport.removeEventListener).toHaveBeenCalledWith(\n 'resize',\n specSelect.handleOrientationChange\n );\n });\n });\n\n it('does NOT remove event listener when NOT mobile', async () => {\n isMobileSpy.mockReturnValue(false);\n specSelect = new Q2Select();\n specSelect.destroyEventListeners();\n\n expect(mockScreen.orientation.removeEventListener).not.toHaveBeenCalled();\n expect(windowRemoveEventListenerSpy).not.toHaveBeenCalled();\n expect(mockVisualViewport.removeEventListener).not.toHaveBeenCalled();\n });\n });\n\n describe('handleOrientationChange', () => {\n beforeEach(() => {\n isMobileSpy.mockReturnValue(true);\n specSelect = new Q2Select();\n });\n\n it('checks if isMobile', async () => {\n specSelect.handleOrientationChange();\n\n expect(isMobileSpy).toHaveBeenCalled();\n });\n\n describe('when searchable is initially true', () => {\n beforeEach(() => {\n specSelect.searchable = true;\n specSelect.originalSearchable = true;\n });\n\n it('sets \"searchable\" to false if in landscape orientation', async () => {\n setOrientationType('landscape-primary');\n specSelect.handleOrientationChange();\n\n expect(specSelect.searchable).toBe(false);\n });\n\n it('does nothing in portrait orientation', async () => {\n setOrientationType('portrait-primary');\n specSelect.handleOrientationChange();\n\n expect(specSelect.searchable).toBe(true);\n });\n\n it('restores searchable when returning to portrait', async () => {\n setOrientationType('landscape-primary');\n specSelect.handleOrientationChange();\n\n expect(specSelect.searchable).toBe(false);\n\n setOrientationType('portrait-primary');\n specSelect.handleOrientationChange();\n\n expect(specSelect.searchable).toBe(true);\n });\n });\n\n describe('when searchable is initially undefined/false', () => {\n it('does nothing', async () => {\n specSelect.originalSearchable = false;\n setOrientationType('landscape-primary');\n specSelect.handleOrientationChange();\n\n expect(specSelect.searchable).toBe(false);\n });\n });\n });\n\n describe('initEventListeners', () => {\n let windowAddEventListenerSpy: jest.SpyInstance;\n beforeEach(() => {\n isMobileSpy.mockReturnValue(true);\n specSelect = new Q2Select();\n mockScreen.orientation.addEventListener.mockClear();\n windowAddEventListenerSpy = jest.spyOn(window, 'addEventListener');\n mockVisualViewport.addEventListener.mockClear();\n });\n\n it('checks if isMobile', async () => {\n specSelect = new Q2Select();\n specSelect.initEventListeners();\n\n expect(isMobileSpy).toHaveBeenCalled();\n });\n\n describe('when in mobile environment', () => {\n it('calls addEventListener on screen.orientation', async () => {\n specSelect.initEventListeners();\n\n expect(mockScreen.orientation.addEventListener).toHaveBeenCalledWith(\n 'change',\n specSelect.handleOrientationChange\n );\n });\n\n it('calls addEventListener on window', async () => {\n specSelect.initEventListeners();\n\n expect(windowAddEventListenerSpy).toHaveBeenCalledWith(\n 'resize',\n specSelect.handleOrientationChange\n );\n });\n\n it('calls addEventListener on visualViewport', async () => {\n specSelect.initEventListeners();\n\n expect(mockVisualViewport.addEventListener).toHaveBeenCalledWith(\n 'resize',\n specSelect.handleOrientationChange\n );\n });\n });\n\n it('does NOT add event listener when NOT mobile', async () => {\n isMobileSpy.mockReturnValue(false);\n specSelect = new Q2Select();\n specSelect.initEventListeners();\n\n expect(mockScreen.orientation.addEventListener).not.toHaveBeenCalled();\n expect(mockVisualViewport.addEventListener).not.toHaveBeenCalled();\n expect(windowAddEventListenerSpy).not.toHaveBeenCalled();\n });\n });\n });\n });\n describe('Render Methods', () => {});\n\n describe('Accessibility', () => {\n describe('Keyboard Controls', () => {\n let handleOptionListExternalKeydownSpy: jest.SpyInstance;\n let q2Select: HTMLQ2SelectElement;\n beforeEach(async () => {\n specPage = await newSpecPage({\n components: [Q2Select, Q2OptionList],\n html: `<q2-select></q2-select>`,\n });\n q2Select = specPage.root as HTMLQ2SelectElement;\n const q2SelectInstance = specPage.rootInstance as Q2Select;\n handleOptionListExternalKeydownSpy = jest.spyOn(q2SelectInstance, 'handleOptionListExternalKeydown');\n });\n afterEach(() => {\n handleOptionListExternalKeydownSpy.mockRestore();\n });\n it(\"'Tab' keypress not handled by q2-option-list\", async () => {\n const event = new KeyboardEvent('keydown', { key: 'Tab' });\n q2Select.dispatchEvent(event);\n await specPage.waitForChanges();\n\n expect(handleOptionListExternalKeydownSpy).toHaveBeenCalledWith(event);\n });\n it(\"'Enter' keypress handled by q2-option-list\", async () => {\n const event = new KeyboardEvent('keydown', { key: 'Enter' });\n q2Select.dispatchEvent(event);\n await specPage.waitForChanges();\n\n expect(handleOptionListExternalKeydownSpy).toHaveBeenCalledWith(event);\n });\n it(\"'ArrowUp' keypress handled by q2-option-list\", async () => {\n const event = new KeyboardEvent('keydown', { key: 'ArrowUp' });\n q2Select.dispatchEvent(event);\n await specPage.waitForChanges();\n\n expect(handleOptionListExternalKeydownSpy).toHaveBeenCalledWith(event);\n });\n it(\"'ArrowDown' keypress handled by q2-option-list\", async () => {\n const event = new KeyboardEvent('keydown', { key: 'ArrowDown' });\n q2Select.dispatchEvent(event);\n await specPage.waitForChanges();\n\n expect(handleOptionListExternalKeydownSpy).toHaveBeenCalledWith(event);\n });\n it(\"'Home' keypress handled by q2-option-list\", async () => {\n const event = new KeyboardEvent('keydown', { key: 'Home' });\n q2Select.dispatchEvent(event);\n await specPage.waitForChanges();\n\n expect(handleOptionListExternalKeydownSpy).toHaveBeenCalledWith(event);\n });\n it(\"'End' keypress handled by q2-option-list\", async () => {\n const event = new KeyboardEvent('keydown', { key: 'End' });\n q2Select.dispatchEvent(event);\n await specPage.waitForChanges();\n\n expect(handleOptionListExternalKeydownSpy).toHaveBeenCalledWith(event);\n });\n it(\"'PageUp' keypress handled by q2-option-list\", async () => {\n const event = new KeyboardEvent('keydown', { key: 'PageUp' });\n q2Select.dispatchEvent(event);\n await specPage.waitForChanges();\n\n expect(handleOptionListExternalKeydownSpy).toHaveBeenCalledWith(event);\n });\n it(\"'PageDown' keypress handled by q2-option-list\", async () => {\n const event = new KeyboardEvent('keydown', { key: 'PageDown' });\n q2Select.dispatchEvent(event);\n await specPage.waitForChanges();\n\n expect(handleOptionListExternalKeydownSpy).toHaveBeenCalledWith(event);\n });\n it(\"'Esc' keypress handled by q2-option-list\", async () => {\n const event = new KeyboardEvent('keydown', { key: 'Esc' });\n q2Select.dispatchEvent(event);\n await specPage.waitForChanges();\n\n expect(handleOptionListExternalKeydownSpy).toHaveBeenCalledWith(event);\n });\n it(\"'Space' keypress handled by q2-option-list\", async () => {\n const event = new KeyboardEvent('keydown', { key: 'Space' });\n q2Select.dispatchEvent(event);\n await specPage.waitForChanges();\n\n expect(handleOptionListExternalKeydownSpy).toHaveBeenCalledWith(event);\n });\n });\n });\n});\n"]}
@@ -245,7 +245,7 @@ export class Q2Stepper {
245
245
  const containerClasses = ['step-container'];
246
246
  if (scrollEnabled)
247
247
  containerClasses.push('has-scroll');
248
- return (h(Fragment, { key: '6d0d42f27d4436e93b7db71d712ae3e5bf7cadef' }, h("div", { key: '2952abf0254fee877c0a01410566b6565a70aece', class: containerClasses.join(' ') }, scrollEnabled && (h(Fragment, { key: '78b2987cba124bb01dc0750a730cbc565faf84fe' }, h("div", { key: '279b093250a1fe4c9ec691d11925bc4d93623e51', class: "gradient-left", hidden: !showScrollLeft }), h("div", { key: 'd3f2cbd219c30d6cdfc5d5ea65b9c3499797c586', class: "gradient-right", hidden: !showScrollRight }), h("q2-btn", { key: 'bd12aacdf58cd14fe08cc1ecd685601b4c26f819', class: "btn-left", hideLabel: true, hidden: !this.showScrollLeft, label: loc('tecton.element.stepper.scrollLeft'), onClick: () => this.onScrollBtnClick('left') }, h("q2-icon", { key: '49de401623341d7bca00bab0c73b37060721fba8', type: "chevron-left" })), h("q2-btn", { key: '86f643a3ef1941d90e21fc91fb48e8777eb76cc0', class: "btn-right", hideLabel: true, hidden: !this.showScrollRight, label: loc('tecton.element.stepper.scrollRight'), onClick: () => this.onScrollBtnClick('right') }, h("q2-icon", { key: '1513aa1fe84ad10a18736ba55ea0d566047e6198', type: "chevron-right" })))), h("ul", { key: '849990a3dfeda33180c820f1cc1ee9712707fce5', onScroll: this.checkScrollState, ref: el => (this.listElement = el), role: "tablist" }, stepCount > 0 && [...Array(stepCount).keys()].map(stepIndex => this.renderStepBtn(stepIndex)))), h("div", { key: '91abf7d1621b76b80fb698543d9f63af4a81f22b', role: "list" }, h("slot", { key: 'da162b8adde663dd483300f868679dcabde0cf09', onSlotchange: () => this.onSlotChange() }))));
248
+ return (h(Fragment, { key: '4d126ea8a5c6c2092cffbb07f96ea2d89e28173b' }, h("div", { key: 'b064b463a678328e278fc624d99faa28fa84c8bb', class: containerClasses.join(' ') }, scrollEnabled && (h(Fragment, { key: '92912f5bf8805d61d497622f6fd3a656410a623a' }, h("div", { key: 'e0e0314b7fd76b6da5937de638604f05c579d7f6', class: "gradient-left", hidden: !showScrollLeft }), h("div", { key: '8c57359b3b1e9f352e4819e47da81c4edba0a076', class: "gradient-right", hidden: !showScrollRight }), h("q2-btn", { key: '9eba2ab47b2ccc8d90c9e37fb4c5859b157af5ac', class: "btn-left", hideLabel: true, hidden: !this.showScrollLeft, label: loc('tecton.element.stepper.scrollLeft'), onClick: () => this.onScrollBtnClick('left') }, h("q2-icon", { key: '48f07c60f769c7fb950bbf21c7e0400d3e2293f5', type: "chevron-left" })), h("q2-btn", { key: 'b574e2f3bf489caa1a4f47c8c115b379a1772f35', class: "btn-right", hideLabel: true, hidden: !this.showScrollRight, label: loc('tecton.element.stepper.scrollRight'), onClick: () => this.onScrollBtnClick('right') }, h("q2-icon", { key: 'cd3e251102eb5b89fa6933f2885fc9e9a5b213db', type: "chevron-right" })))), h("ul", { key: '57b5e6e7906498359549d30bc0ac0fbdb966de87', onScroll: this.checkScrollState, ref: el => (this.listElement = el), role: "tablist" }, stepCount > 0 && [...Array(stepCount).keys()].map(stepIndex => this.renderStepBtn(stepIndex)))), h("div", { key: '7db723abc9a5176f548981d410108f32d6eb555a', role: "list" }, h("slot", { key: 'dc5cd4396673c1acf789a2b7065fb3e349cd4e0a', onSlotchange: () => this.onSlotChange() }))));
249
249
  }
250
250
  static get is() { return "q2-stepper"; }
251
251
  static get encapsulation() { return "shadow"; }