q2-tecton-elements 1.53.0 → 1.54.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 (325) hide show
  1. package/dist/bundle-report.json +43422 -0
  2. package/dist/cjs/{action-sheet-d32c41ae.js → action-sheet-8254c0fd.js} +6 -3
  3. package/dist/cjs/action-sheet-8254c0fd.js.map +1 -0
  4. package/dist/cjs/click-elsewhere.cjs.entry.js +96 -0
  5. package/dist/cjs/click-elsewhere.cjs.entry.js.map +1 -0
  6. package/dist/cjs/{index-07285783.js → index-76f63767.js} +1 -21
  7. package/dist/cjs/index-76f63767.js.map +1 -0
  8. package/dist/cjs/loader.cjs.js +1 -1
  9. package/dist/cjs/q2-action-group.cjs.entry.js +38 -17
  10. package/dist/cjs/q2-action-group.cjs.entry.js.map +1 -1
  11. package/dist/cjs/q2-action-sheet.cjs.entry.js +1 -1
  12. package/dist/cjs/q2-avatar.cjs.entry.js +1 -1
  13. package/dist/cjs/q2-avatar.cjs.entry.js.map +1 -1
  14. package/dist/cjs/q2-badge_7.cjs.entry.js +52 -18
  15. package/dist/cjs/q2-badge_7.cjs.entry.js.map +1 -1
  16. package/dist/cjs/q2-calendar.cjs.entry.js +1 -1
  17. package/dist/cjs/q2-card.cjs.entry.js +1 -1
  18. package/dist/cjs/q2-carousel-pane.cjs.entry.js +1 -1
  19. package/dist/cjs/q2-carousel.cjs.entry.js +1 -1
  20. package/dist/cjs/q2-chart-area.cjs.entry.js +1 -1
  21. package/dist/cjs/q2-chart-bar.cjs.entry.js +1 -1
  22. package/dist/cjs/q2-chart-donut.cjs.entry.js +1 -1
  23. package/dist/cjs/q2-checkbox-group.cjs.entry.js +1 -1
  24. package/dist/cjs/q2-checkbox.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 +1 -1
  27. package/dist/cjs/q2-dropdown-item.cjs.entry.js +17 -16
  28. package/dist/cjs/q2-dropdown-item.cjs.entry.js.map +1 -1
  29. package/dist/cjs/q2-dropdown.cjs.entry.js +48 -99
  30. package/dist/cjs/q2-dropdown.cjs.entry.js.map +1 -1
  31. package/dist/cjs/q2-editable-field.cjs.entry.js +1 -1
  32. package/dist/cjs/q2-file-picker.cjs.entry.js +3 -3
  33. package/dist/cjs/q2-file-picker.cjs.entry.js.map +1 -1
  34. package/dist/cjs/q2-item_3.cjs.entry.js +3 -2
  35. package/dist/cjs/q2-item_3.cjs.entry.js.map +1 -1
  36. package/dist/cjs/q2-loc.cjs.entry.js +1 -1
  37. package/dist/cjs/q2-message.cjs.entry.js +1 -1
  38. package/dist/cjs/q2-month-picker.cjs.entry.js +1 -1
  39. package/dist/cjs/q2-optgroup.cjs.entry.js +1 -1
  40. package/dist/cjs/{q2-option-list.cjs.entry.js → q2-option-list_2.cjs.entry.js} +355 -21
  41. package/dist/cjs/q2-option-list_2.cjs.entry.js.map +1 -0
  42. package/dist/cjs/q2-option.cjs.entry.js +18 -4
  43. package/dist/cjs/q2-option.cjs.entry.js.map +1 -1
  44. package/dist/cjs/q2-pagination.cjs.entry.js +4 -4
  45. package/dist/cjs/q2-pill.cjs.entry.js +8 -7
  46. package/dist/cjs/q2-pill.cjs.entry.js.map +1 -1
  47. package/dist/cjs/q2-radio-group.cjs.entry.js +1 -1
  48. package/dist/cjs/q2-radio.cjs.entry.js +1 -1
  49. package/dist/cjs/q2-relative-time.cjs.entry.js +2 -2
  50. package/dist/cjs/q2-resize-observer.cjs.entry.js +1 -1
  51. package/dist/cjs/q2-section.cjs.entry.js +3 -3
  52. package/dist/cjs/q2-select.cjs.entry.js +7 -5
  53. package/dist/cjs/q2-select.cjs.entry.js.map +1 -1
  54. package/dist/cjs/q2-stepper-pane.cjs.entry.js +1 -1
  55. package/dist/cjs/q2-stepper-vertical.cjs.entry.js +2 -2
  56. package/dist/cjs/q2-stepper.cjs.entry.js +2 -2
  57. package/dist/cjs/q2-tag.cjs.entry.js +7 -4
  58. package/dist/cjs/q2-tag.cjs.entry.js.map +1 -1
  59. package/dist/cjs/q2-tecton-elements.cjs.js +1 -1
  60. package/dist/cjs/q2-textarea.cjs.entry.js +1 -1
  61. package/dist/cjs/q2-tooltip.cjs.entry.js +1 -1
  62. package/dist/cjs/tecton-tab-pane.cjs.entry.js +2 -2
  63. package/dist/collection/components/q2-action-group/q2-action-group.css +25 -8
  64. package/dist/collection/components/q2-action-group/q2-action-group.js +55 -33
  65. package/dist/collection/components/q2-action-group/q2-action-group.js.map +1 -1
  66. package/dist/collection/components/q2-action-group/test/q2-action-group.e2e.js +142 -6
  67. package/dist/collection/components/q2-action-group/test/q2-action-group.e2e.js.map +1 -1
  68. package/dist/collection/components/q2-action-group/test/q2-action-group.spec.js +126 -62
  69. package/dist/collection/components/q2-action-group/test/q2-action-group.spec.js.map +1 -1
  70. package/dist/collection/components/q2-action-sheet/test/q2-action-sheet-test.e2e.js +1 -1
  71. package/dist/collection/components/q2-action-sheet/test/q2-action-sheet-test.e2e.js.map +1 -1
  72. package/dist/collection/components/q2-avatar/q2-avatar.css +5 -0
  73. package/dist/collection/components/q2-btn/q2-btn.css +74 -0
  74. package/dist/collection/components/q2-btn/q2-btn.js +50 -16
  75. package/dist/collection/components/q2-btn/q2-btn.js.map +1 -1
  76. package/dist/collection/components/q2-btn/test/q2-btn-test.e2e.js +29 -0
  77. package/dist/collection/components/q2-btn/test/q2-btn-test.e2e.js.map +1 -1
  78. package/dist/collection/components/q2-dropdown/q2-dropdown.js +83 -103
  79. package/dist/collection/components/q2-dropdown/q2-dropdown.js.map +1 -1
  80. package/dist/collection/components/q2-dropdown/test/q2-dropdown-test.e2e.js +188 -24
  81. package/dist/collection/components/q2-dropdown/test/q2-dropdown-test.e2e.js.map +1 -1
  82. package/dist/collection/components/q2-dropdown-item/q2-dropdown-item.css +1 -1
  83. package/dist/collection/components/q2-dropdown-item/q2-dropdown-item.js +54 -16
  84. package/dist/collection/components/q2-dropdown-item/q2-dropdown-item.js.map +1 -1
  85. package/dist/collection/components/q2-file-picker/q2-file-picker.css +29 -10
  86. package/dist/collection/components/q2-file-picker/q2-file-picker.js +1 -1
  87. package/dist/collection/components/q2-file-picker/q2-file-picker.js.map +1 -1
  88. package/dist/collection/components/q2-link/q2-link.js +26 -7
  89. package/dist/collection/components/q2-link/q2-link.js.map +1 -1
  90. package/dist/collection/components/q2-link/test/q2-link-test.e2e.js +20 -118
  91. package/dist/collection/components/q2-link/test/q2-link-test.e2e.js.map +1 -1
  92. package/dist/collection/components/q2-link/test/q2-link-test.spec.js +193 -0
  93. package/dist/collection/components/q2-link/test/q2-link-test.spec.js.map +1 -0
  94. package/dist/collection/components/q2-loading/q2-loading.js +1 -1
  95. package/dist/collection/components/q2-loading/q2-loading.js.map +1 -1
  96. package/dist/collection/components/q2-option/q2-option.css +9 -3
  97. package/dist/collection/components/q2-option/q2-option.js +37 -4
  98. package/dist/collection/components/q2-option/q2-option.js.map +1 -1
  99. package/dist/collection/components/q2-option/test/q2-option-test.spec.js +22 -0
  100. package/dist/collection/components/q2-option/test/q2-option-test.spec.js.map +1 -1
  101. package/dist/collection/components/q2-option-list/q2-option-list.js +56 -29
  102. package/dist/collection/components/q2-option-list/q2-option-list.js.map +1 -1
  103. package/dist/collection/components/q2-option-list/test/q2-option-list.spec.js +489 -0
  104. package/dist/collection/components/q2-option-list/test/q2-option-list.spec.js.map +1 -0
  105. package/dist/collection/components/q2-pagination/q2-pagination.js +3 -3
  106. package/dist/collection/components/q2-pill/q2-pill.js +6 -5
  107. package/dist/collection/components/q2-pill/q2-pill.js.map +1 -1
  108. package/dist/collection/components/q2-pill/test/q2-pill-test.e2e.js +1 -1
  109. package/dist/collection/components/q2-pill/test/q2-pill-test.e2e.js.map +1 -1
  110. package/dist/collection/components/q2-popover/q2-popover.js +1 -1
  111. package/dist/collection/components/q2-popover/q2-popover.js.map +1 -1
  112. package/dist/collection/components/q2-relative-time/q2-relative-time.js +1 -1
  113. package/dist/collection/components/q2-resize-observer/q2-resize-observer.js +1 -1
  114. package/dist/collection/components/q2-section/q2-section.js +2 -2
  115. package/dist/collection/components/q2-select/q2-select.js +6 -4
  116. package/dist/collection/components/q2-select/q2-select.js.map +1 -1
  117. package/dist/collection/components/q2-select/test/q2-select-test.e2e.js +1 -14
  118. package/dist/collection/components/q2-select/test/q2-select-test.e2e.js.map +1 -1
  119. package/dist/collection/components/q2-stepper/q2-stepper.js +1 -1
  120. package/dist/collection/components/q2-stepper-vertical/q2-stepper-vertical.js +1 -1
  121. package/dist/collection/components/q2-tab-container/q2-tab-container.js +1 -1
  122. package/dist/collection/components/q2-tab-pane/q2-tab-pane.js +1 -1
  123. package/dist/collection/components/q2-tag/q2-tag.js +5 -2
  124. package/dist/collection/components/q2-tag/q2-tag.js.map +1 -1
  125. package/dist/collection/components/q2-tag/test/q2-tag-test.e2e.js +1 -1
  126. package/dist/collection/components/q2-tag/test/q2-tag-test.e2e.js.map +1 -1
  127. package/dist/collection/components/tecton-tab-pane/tecton-tab-pane.js +2 -2
  128. package/dist/collection/utils/action-sheet.js +5 -2
  129. package/dist/collection/utils/action-sheet.js.map +1 -1
  130. package/dist/collection/utils/helpers.js +29 -3
  131. package/dist/collection/utils/helpers.js.map +1 -1
  132. package/dist/collection/utils/test/action-sheet-test.e2e.js +34 -6
  133. package/dist/collection/utils/test/action-sheet-test.e2e.js.map +1 -1
  134. package/dist/components/action-sheet.js +6 -3
  135. package/dist/components/action-sheet.js.map +1 -1
  136. package/dist/components/index2.js +1 -20
  137. package/dist/components/index2.js.map +1 -1
  138. package/dist/components/q2-action-group.js +41 -19
  139. package/dist/components/q2-action-group.js.map +1 -1
  140. package/dist/components/q2-avatar2.js +1 -1
  141. package/dist/components/q2-avatar2.js.map +1 -1
  142. package/dist/components/q2-btn2.js +50 -16
  143. package/dist/components/q2-btn2.js.map +1 -1
  144. package/dist/components/q2-dropdown-item2.js +19 -17
  145. package/dist/components/q2-dropdown-item2.js.map +1 -1
  146. package/dist/components/q2-dropdown.js +67 -110
  147. package/dist/components/q2-dropdown.js.map +1 -1
  148. package/dist/components/q2-file-picker.js +2 -2
  149. package/dist/components/q2-file-picker.js.map +1 -1
  150. package/dist/components/q2-link2.js +3 -1
  151. package/dist/components/q2-link2.js.map +1 -1
  152. package/dist/components/q2-loading2.js.map +1 -1
  153. package/dist/components/q2-option-list2.js +44 -19
  154. package/dist/components/q2-option-list2.js.map +1 -1
  155. package/dist/components/q2-option2.js +20 -4
  156. package/dist/components/q2-option2.js.map +1 -1
  157. package/dist/components/q2-pagination.js +3 -3
  158. package/dist/components/q2-pill.js +7 -6
  159. package/dist/components/q2-pill.js.map +1 -1
  160. package/dist/components/q2-popover2.js +1 -1
  161. package/dist/components/q2-popover2.js.map +1 -1
  162. package/dist/components/q2-relative-time.js +1 -1
  163. package/dist/components/q2-resize-observer2.js +1 -1
  164. package/dist/components/q2-section.js +2 -2
  165. package/dist/components/q2-select2.js +7 -5
  166. package/dist/components/q2-select2.js.map +1 -1
  167. package/dist/components/q2-stepper-vertical.js +1 -1
  168. package/dist/components/q2-stepper.js +1 -1
  169. package/dist/components/q2-tab-container.js +1 -1
  170. package/dist/components/q2-tab-pane.js +1 -1
  171. package/dist/components/q2-tag.js +6 -3
  172. package/dist/components/q2-tag.js.map +1 -1
  173. package/dist/components/tecton-tab-pane.js +2 -2
  174. package/dist/esm/{action-sheet-e64cb6f7.js → action-sheet-1e24cb38.js} +7 -4
  175. package/dist/esm/action-sheet-1e24cb38.js.map +1 -0
  176. package/dist/esm/click-elsewhere.entry.js +92 -0
  177. package/dist/esm/click-elsewhere.entry.js.map +1 -0
  178. package/dist/esm/{index-d18e2a20.js → index-504f1a9e.js} +2 -21
  179. package/dist/esm/index-504f1a9e.js.map +1 -0
  180. package/dist/esm/loader.js +1 -1
  181. package/dist/esm/q2-action-group.entry.js +39 -18
  182. package/dist/esm/q2-action-group.entry.js.map +1 -1
  183. package/dist/esm/q2-action-sheet.entry.js +1 -1
  184. package/dist/esm/q2-avatar.entry.js +1 -1
  185. package/dist/esm/q2-avatar.entry.js.map +1 -1
  186. package/dist/esm/q2-badge_7.entry.js +52 -18
  187. package/dist/esm/q2-badge_7.entry.js.map +1 -1
  188. package/dist/esm/q2-calendar.entry.js +1 -1
  189. package/dist/esm/q2-card.entry.js +1 -1
  190. package/dist/esm/q2-carousel-pane.entry.js +1 -1
  191. package/dist/esm/q2-carousel.entry.js +1 -1
  192. package/dist/esm/q2-chart-area.entry.js +1 -1
  193. package/dist/esm/q2-chart-bar.entry.js +1 -1
  194. package/dist/esm/q2-chart-donut.entry.js +1 -1
  195. package/dist/esm/q2-checkbox-group.entry.js +1 -1
  196. package/dist/esm/q2-checkbox.entry.js +1 -1
  197. package/dist/esm/q2-data-table.entry.js +1 -1
  198. package/dist/esm/q2-detail.entry.js +1 -1
  199. package/dist/esm/q2-dropdown-item.entry.js +18 -17
  200. package/dist/esm/q2-dropdown-item.entry.js.map +1 -1
  201. package/dist/esm/q2-dropdown.entry.js +48 -99
  202. package/dist/esm/q2-dropdown.entry.js.map +1 -1
  203. package/dist/esm/q2-editable-field.entry.js +1 -1
  204. package/dist/esm/q2-file-picker.entry.js +3 -3
  205. package/dist/esm/q2-file-picker.entry.js.map +1 -1
  206. package/dist/esm/q2-item_3.entry.js +3 -2
  207. package/dist/esm/q2-item_3.entry.js.map +1 -1
  208. package/dist/esm/q2-loc.entry.js +1 -1
  209. package/dist/esm/q2-message.entry.js +1 -1
  210. package/dist/esm/q2-month-picker.entry.js +1 -1
  211. package/dist/esm/q2-optgroup.entry.js +1 -1
  212. package/dist/esm/{q2-option-list.entry.js → q2-option-list_2.entry.js} +355 -22
  213. package/dist/esm/q2-option-list_2.entry.js.map +1 -0
  214. package/dist/esm/q2-option.entry.js +18 -4
  215. package/dist/esm/q2-option.entry.js.map +1 -1
  216. package/dist/esm/q2-pagination.entry.js +4 -4
  217. package/dist/esm/q2-pill.entry.js +8 -7
  218. package/dist/esm/q2-pill.entry.js.map +1 -1
  219. package/dist/esm/q2-radio-group.entry.js +1 -1
  220. package/dist/esm/q2-radio.entry.js +1 -1
  221. package/dist/esm/q2-relative-time.entry.js +2 -2
  222. package/dist/esm/q2-resize-observer.entry.js +1 -1
  223. package/dist/esm/q2-section.entry.js +3 -3
  224. package/dist/esm/q2-select.entry.js +7 -5
  225. package/dist/esm/q2-select.entry.js.map +1 -1
  226. package/dist/esm/q2-stepper-pane.entry.js +1 -1
  227. package/dist/esm/q2-stepper-vertical.entry.js +2 -2
  228. package/dist/esm/q2-stepper.entry.js +2 -2
  229. package/dist/esm/q2-tag.entry.js +7 -4
  230. package/dist/esm/q2-tag.entry.js.map +1 -1
  231. package/dist/esm/q2-tecton-elements.js +1 -1
  232. package/dist/esm/q2-textarea.entry.js +1 -1
  233. package/dist/esm/q2-tooltip.entry.js +1 -1
  234. package/dist/esm/tecton-tab-pane.entry.js +2 -2
  235. package/dist/q2-tecton-elements/action-sheet-1e24cb38.js +80 -0
  236. package/dist/q2-tecton-elements/action-sheet-1e24cb38.js.map +1 -0
  237. package/dist/q2-tecton-elements/click-elsewhere.entry.js +90 -0
  238. package/dist/q2-tecton-elements/click-elsewhere.entry.js.map +1 -0
  239. package/dist/q2-tecton-elements/{index-d18e2a20.js → index-504f1a9e.js} +51 -69
  240. package/dist/q2-tecton-elements/index-504f1a9e.js.map +1 -0
  241. package/dist/q2-tecton-elements/q2-action-group.entry.js +57 -33
  242. package/dist/q2-tecton-elements/q2-action-group.entry.js.map +1 -1
  243. package/dist/q2-tecton-elements/q2-action-sheet.entry.js +1 -1
  244. package/dist/q2-tecton-elements/q2-avatar.entry.js +1 -1
  245. package/dist/q2-tecton-elements/q2-avatar.entry.js.map +1 -1
  246. package/dist/q2-tecton-elements/q2-badge_7.entry.js +222 -181
  247. package/dist/q2-tecton-elements/q2-badge_7.entry.js.map +1 -1
  248. package/dist/q2-tecton-elements/q2-calendar.entry.js +1 -1
  249. package/dist/q2-tecton-elements/q2-card.entry.js +1 -1
  250. package/dist/q2-tecton-elements/q2-carousel-pane.entry.js +1 -1
  251. package/dist/q2-tecton-elements/q2-carousel.entry.js +1 -1
  252. package/dist/q2-tecton-elements/q2-chart-area.entry.js +1 -1
  253. package/dist/q2-tecton-elements/q2-chart-bar.entry.js +1 -1
  254. package/dist/q2-tecton-elements/q2-chart-donut.entry.js +1 -1
  255. package/dist/q2-tecton-elements/q2-checkbox-group.entry.js +1 -1
  256. package/dist/q2-tecton-elements/q2-checkbox.entry.js +1 -1
  257. package/dist/q2-tecton-elements/q2-data-table.entry.js +1 -1
  258. package/dist/q2-tecton-elements/q2-detail.entry.js +1 -1
  259. package/dist/q2-tecton-elements/q2-dropdown-item.entry.js +34 -34
  260. package/dist/q2-tecton-elements/q2-dropdown-item.entry.js.map +1 -1
  261. package/dist/q2-tecton-elements/q2-dropdown.entry.js +86 -137
  262. package/dist/q2-tecton-elements/q2-dropdown.entry.js.map +1 -1
  263. package/dist/q2-tecton-elements/q2-editable-field.entry.js +1 -1
  264. package/dist/q2-tecton-elements/q2-file-picker.entry.js +137 -136
  265. package/dist/q2-tecton-elements/q2-file-picker.entry.js.map +1 -1
  266. package/dist/q2-tecton-elements/q2-item_3.entry.js +3 -2
  267. package/dist/q2-tecton-elements/q2-item_3.entry.js.map +1 -1
  268. package/dist/q2-tecton-elements/q2-loc.entry.js +1 -1
  269. package/dist/q2-tecton-elements/q2-message.entry.js +1 -1
  270. package/dist/q2-tecton-elements/q2-month-picker.entry.js +1 -1
  271. package/dist/q2-tecton-elements/q2-optgroup.entry.js +1 -1
  272. package/dist/q2-tecton-elements/q2-option-list_2.entry.js +902 -0
  273. package/dist/q2-tecton-elements/q2-option-list_2.entry.js.map +1 -0
  274. package/dist/q2-tecton-elements/q2-option.entry.js +31 -21
  275. package/dist/q2-tecton-elements/q2-option.entry.js.map +1 -1
  276. package/dist/q2-tecton-elements/q2-pagination.entry.js +34 -34
  277. package/dist/q2-tecton-elements/q2-pill.entry.js +15 -15
  278. package/dist/q2-tecton-elements/q2-pill.entry.js.map +1 -1
  279. package/dist/q2-tecton-elements/q2-radio-group.entry.js +1 -1
  280. package/dist/q2-tecton-elements/q2-radio.entry.js +1 -1
  281. package/dist/q2-tecton-elements/q2-relative-time.entry.js +2 -2
  282. package/dist/q2-tecton-elements/q2-resize-observer.entry.js +1 -1
  283. package/dist/q2-tecton-elements/q2-section.entry.js +19 -19
  284. package/dist/q2-tecton-elements/q2-select.entry.js +20 -18
  285. package/dist/q2-tecton-elements/q2-select.entry.js.map +1 -1
  286. package/dist/q2-tecton-elements/q2-stepper-pane.entry.js +1 -1
  287. package/dist/q2-tecton-elements/q2-stepper-vertical.entry.js +37 -37
  288. package/dist/q2-tecton-elements/q2-stepper.entry.js +29 -29
  289. package/dist/q2-tecton-elements/q2-tag.entry.js +36 -34
  290. package/dist/q2-tecton-elements/q2-tag.entry.js.map +1 -1
  291. package/dist/q2-tecton-elements/q2-tecton-elements.esm.js +1 -1
  292. package/dist/q2-tecton-elements/q2-tecton-elements.esm.js.map +1 -1
  293. package/dist/q2-tecton-elements/q2-textarea.entry.js +1 -1
  294. package/dist/q2-tecton-elements/q2-tooltip.entry.js +1 -1
  295. package/dist/q2-tecton-elements/tecton-tab-pane.entry.js +6 -6
  296. package/dist/types/components/q2-action-group/q2-action-group.d.ts +19 -11
  297. package/dist/types/components/q2-btn/q2-btn.d.ts +8 -3
  298. package/dist/types/components/q2-dropdown/q2-dropdown.d.ts +18 -9
  299. package/dist/types/components/q2-dropdown-item/q2-dropdown-item.d.ts +14 -1
  300. package/dist/types/components/q2-link/q2-link.d.ts +8 -6
  301. package/dist/types/components/q2-loading/q2-loading.d.ts +2 -2
  302. package/dist/types/components/q2-option/q2-option.d.ts +10 -1
  303. package/dist/types/components/q2-option-list/q2-option-list.d.ts +9 -8
  304. package/dist/types/components/q2-pill/q2-pill.d.ts +1 -1
  305. package/dist/types/components.d.ts +91 -28
  306. package/dist/types/util.d.ts +1 -0
  307. package/dist/types/utils/helpers.d.ts +1 -1
  308. package/package.json +4 -3
  309. package/dist/cjs/action-sheet-d32c41ae.js.map +0 -1
  310. package/dist/cjs/click-elsewhere_2.cjs.entry.js +0 -406
  311. package/dist/cjs/click-elsewhere_2.cjs.entry.js.map +0 -1
  312. package/dist/cjs/index-07285783.js.map +0 -1
  313. package/dist/cjs/q2-option-list.cjs.entry.js.map +0 -1
  314. package/dist/esm/action-sheet-e64cb6f7.js.map +0 -1
  315. package/dist/esm/click-elsewhere_2.entry.js +0 -401
  316. package/dist/esm/click-elsewhere_2.entry.js.map +0 -1
  317. package/dist/esm/index-d18e2a20.js.map +0 -1
  318. package/dist/esm/q2-option-list.entry.js.map +0 -1
  319. package/dist/q2-tecton-elements/action-sheet-e64cb6f7.js +0 -77
  320. package/dist/q2-tecton-elements/action-sheet-e64cb6f7.js.map +0 -1
  321. package/dist/q2-tecton-elements/click-elsewhere_2.entry.js +0 -398
  322. package/dist/q2-tecton-elements/click-elsewhere_2.entry.js.map +0 -1
  323. package/dist/q2-tecton-elements/index-d18e2a20.js.map +0 -1
  324. package/dist/q2-tecton-elements/q2-option-list.entry.js +0 -585
  325. package/dist/q2-tecton-elements/q2-option-list.entry.js.map +0 -1
@@ -0,0 +1,902 @@
1
+ import { r as t, c as e, h as i, H as s, g as o } from "./index-7a5365e2.js";
2
+
3
+ import { n, l as r, o as a, i as h, w as c, v as l, h as p } from "./index-504f1a9e.js";
4
+
5
+ function sanitizeRegexString(t) {
6
+ return t.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
7
+ }
8
+
9
+ const d = "*{box-sizing:border-box}*:active{outline:none}*:focus{outline:none;box-shadow:var(--const-double-focus-ring, 0 0 0 2px #ffffff, 0 0 0 4px #0066cc)}:host{box-shadow:none !important}::-moz-focus-inner{border:none}input,textarea,button{font-family:inherit;font-size:inherit;font-stretch:inherit}:host(.sr),:host(.sr) button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.sr,.sr button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.hidden{display:none}:host([hidden]){display:none}.invisible{visibility:hidden}:host{position:relative;width:100%;display:block;line-height:var(--tct-option-list-line-height, var(--t-option-list-line-height, var(--app-line-height, 1.428571429em)))}.content{text-align:start}:host([is-sizeable]) .content{display:block;height:auto}";
10
+
11
+ const f = d;
12
+
13
+ const u = class {
14
+ constructor(i) {
15
+ t(this, i);
16
+ this.change = e(this, "change", 7);
17
+ this.popoverState = e(this, "popoverState", 7);
18
+ this.ready = e(this, "ready", 3);
19
+ this.keyStore = {
20
+ queue: [],
21
+ lastPressedAt: new Date
22
+ };
23
+ this.scheduledAfterRender = [];
24
+ this.clickHandler = t => {
25
+ const e = t.target;
26
+ const i = e.closest("q2-option:not([separator]):not([separator=true]), q2-dropdown-item:not([separator]):not([separator=true])");
27
+ this.selectOption(i);
28
+ if (this.multiple) return;
29
+ this.popoverState.emit({
30
+ open: false,
31
+ action: "select"
32
+ });
33
+ };
34
+ /* tslint:disable:cyclomatic-complexity */ this.externalKeydownHandler = t => {
35
+ t.stopPropagation();
36
+ const {activeIndex: e, customSearch: i, allOptions: s} = this;
37
+ const {key: o} = t;
38
+ let r;
39
+ switch (o) {
40
+ case " ":
41
+ if (this.searchString) {
42
+ if (i) break;
43
+ this.searchOptions(o, true);
44
+ break;
45
+ } else if (this.type === "menu") {
46
+ this.activeIndex = 0;
47
+ this.openDropdownWithActiveElement(0);
48
+ } else {
49
+ this.setDefaultActiveElement();
50
+ n((() => this.popoverState.emit({
51
+ open: true,
52
+ action: "open"
53
+ })));
54
+ }
55
+ break;
56
+
57
+ case "Enter":
58
+ if (this.type === "menu") {
59
+ this.activeIndex = 0;
60
+ this.openDropdownWithActiveElement(0);
61
+ } else {
62
+ this.setDefaultActiveElement();
63
+ n((() => this.popoverState.emit({
64
+ open: true,
65
+ action: "open"
66
+ })));
67
+ }
68
+ break;
69
+
70
+ case "ArrowUp":
71
+ t.preventDefault();
72
+ r = !!this.selectedOptions.length ? this.getDefaultActiveIndex() : this.getNextVisibleIndex(-1);
73
+ if (r === -1) break;
74
+ this.openDropdownWithActiveElement(r);
75
+ break;
76
+
77
+ case "ArrowDown":
78
+ t.preventDefault();
79
+ r = !!this.selectedOptions.length ? this.getDefaultActiveIndex() : this.getNextVisibleIndex(1);
80
+ if (r === -1) break;
81
+ this.openDropdownWithActiveElement(r);
82
+ break;
83
+
84
+ case "Home":
85
+ t.preventDefault();
86
+ this.openDropdownWithActiveElement(0);
87
+ break;
88
+
89
+ case "End":
90
+ t.preventDefault();
91
+ this.openDropdownWithActiveElement(s.length - 1);
92
+ break;
93
+
94
+ case "PageUp":
95
+ t.preventDefault();
96
+ this.openDropdownWithActiveElement(Math.max((e || 0) - 10, 0));
97
+ break;
98
+
99
+ case "PageDown":
100
+ t.preventDefault();
101
+ this.openDropdownWithActiveElement(Math.min((e || 0) + 10, s.length - 1));
102
+ break;
103
+
104
+ case "Tab":
105
+ this.popoverState.emit({
106
+ open: false,
107
+ action: "close"
108
+ });
109
+ break;
110
+
111
+ case "Esc":
112
+ case "Escape":
113
+ if (this.noSelect) this.setActiveElement(null);
114
+ this.popoverState.emit({
115
+ open: false,
116
+ action: "close"
117
+ });
118
+ break;
119
+
120
+ default:
121
+ if (i) break;
122
+ if (!o.match(/^[\w]$/)) break;
123
+ this.searchOptions(o, true);
124
+ break;
125
+ }
126
+ };
127
+ /* tslint:enable:cyclomatic-complexity */ this.focusoutHandler = t => {
128
+ const {relatedTarget: e} = t;
129
+ const i = this.allOptions.includes(e);
130
+ const s = !i && this.hostElement.contains(e);
131
+ if (i || s) {
132
+ t.stopPropagation();
133
+ }
134
+ };
135
+ this.internalKeydownHandler = t => {
136
+ t.stopPropagation();
137
+ const {activeIndex: e, customSearch: i, allOptions: s, allVisibleOptions: o, multiple: n} = this;
138
+ const {key: r, shiftKey: a} = t;
139
+ let h;
140
+ switch (r) {
141
+ case " ":
142
+ if (this.searchString && !this.multiple) {
143
+ if (i) break;
144
+ this.searchOptions(r, false);
145
+ break;
146
+ }
147
+ t.preventDefault();
148
+ h = s.find((t => t.active));
149
+ if (!h || h.disabled) break;
150
+ this.selectOption(h);
151
+ if (n) break;
152
+ this.popoverState.emit({
153
+ open: false,
154
+ action: "select"
155
+ });
156
+ break;
157
+
158
+ case "Enter":
159
+ t.preventDefault();
160
+ h = s.find((t => t.active));
161
+ if (!h || h.disabled) break;
162
+ this.selectOption(h);
163
+ if (n) break;
164
+ this.popoverState.emit({
165
+ open: false,
166
+ action: "select"
167
+ });
168
+ break;
169
+
170
+ case "ArrowUp":
171
+ t.preventDefault();
172
+ const c = o[0];
173
+ const l = c.active;
174
+ if (l) break;
175
+ if (e === undefined) {
176
+ this.setDefaultActiveElement();
177
+ break;
178
+ } else {
179
+ const t = this.getNextVisibleIndex(-1);
180
+ if (t === -1) break;
181
+ this.adjustActiveOptionAndScroll(t - e);
182
+ break;
183
+ }
184
+
185
+ case "ArrowDown":
186
+ t.preventDefault();
187
+ const p = o[o.length - 1];
188
+ const d = p.active;
189
+ if (d) break;
190
+ if (e === undefined) {
191
+ this.setDefaultActiveElement();
192
+ break;
193
+ } else {
194
+ const t = this.getNextVisibleIndex(1);
195
+ if (t === -1) break;
196
+ this.adjustActiveOptionAndScroll(t - e);
197
+ break;
198
+ }
199
+
200
+ case "Home":
201
+ t.preventDefault();
202
+ this.openDropdownWithActiveElement(0);
203
+ break;
204
+
205
+ case "End":
206
+ t.preventDefault();
207
+ this.openDropdownWithActiveElement(s.length - 1);
208
+ break;
209
+
210
+ case "PageUp":
211
+ t.preventDefault();
212
+ this.openDropdownWithActiveElement(Math.max(e - 10, 0));
213
+ break;
214
+
215
+ case "PageDown":
216
+ t.preventDefault();
217
+ this.openDropdownWithActiveElement(Math.min(e + 10, s.length - 1));
218
+ break;
219
+
220
+ case "Tab":
221
+ if (a) break;
222
+ if (this.multiple && this.type === "listbox") break;
223
+ if (this.type === "menu") {
224
+ this.popoverState.emit({
225
+ open: false,
226
+ action: "close"
227
+ });
228
+ break;
229
+ }
230
+ h = s.find((t => t.active));
231
+ if (!h || h.disabled) return;
232
+ this.selectOption(h);
233
+ break;
234
+
235
+ case "Esc":
236
+ case "Escape":
237
+ if (this.noSelect) this.setActiveElement(null);
238
+ this.popoverState.emit({
239
+ open: false,
240
+ action: "close"
241
+ });
242
+ break;
243
+
244
+ default:
245
+ if (i) break;
246
+ if (!r.match(/^[\w]$/)) break;
247
+ this.searchOptions(r, false);
248
+ break;
249
+ }
250
+ };
251
+ this.searchAndFocus = (t, e) => {
252
+ // pseudo search in non-searchable select
253
+ const reorder = () => {
254
+ this.pivotIndex = this.pivotIndex === undefined ? 0 : (this.activeIndex || 0) + 1;
255
+ const t = this.allOptions.map(((t, e) => ({
256
+ element: t,
257
+ index: e
258
+ })));
259
+ return [ ...t.slice(this.pivotIndex), ...t.slice(0, this.pivotIndex) ];
260
+ };
261
+ const buildQueue = () => {
262
+ const e = new Date;
263
+ if (e.getTime() - this.keyStore.lastPressedAt.getTime() > 1e3) {
264
+ // empty stored keys if delay > 1s
265
+ this.keyStore.queue.length = 0;
266
+ }
267
+ if (this.keyStore.queue.length !== 1 || this.keyStore.queue[0] !== t) {
268
+ this.keyStore.queue.push(t);
269
+ }
270
+ this.keyStore.lastPressedAt = e;
271
+ };
272
+ const searchIndex = t => {
273
+ const e = this.keyStore.queue.join("");
274
+ const i = sanitizeRegexString(e);
275
+ return t.find((t => !t.element.disabled && t.element.display && (t.element.display.match(new RegExp(`^${i}`, "i")) || t.element.display.replace(/\s/g, "").match(new RegExp(`^${i}`, "i")))));
276
+ };
277
+ const setFocus = ({index: t}) => {
278
+ if (this.multiple) {
279
+ // multiple: should open to make sure that which options are selected
280
+ this.openDropdownWithActiveElement(t);
281
+ } else {
282
+ this.activeIndex = t;
283
+ if (e) {
284
+ this.selectOption(this.allOptions[t]);
285
+ this.popoverState.emit({
286
+ open: false,
287
+ action: "select"
288
+ });
289
+ } else this.setActiveElement(t);
290
+ }
291
+ };
292
+ buildQueue();
293
+ const i = searchIndex(reorder());
294
+ if (i) {
295
+ setFocus(i);
296
+ }
297
+ };
298
+ this.hasOptions = undefined;
299
+ this.align = undefined;
300
+ this.customSearch = undefined;
301
+ this.disabled = undefined;
302
+ this.label = r("tecton.element.optionList.label");
303
+ this.multiple = undefined;
304
+ this.noSelect = undefined;
305
+ this.selectedOptions = [];
306
+ this.showSelected = undefined;
307
+ this.type = "listbox";
308
+ }
309
+ // #endregion
310
+ // #region Component Lifecycle Events
311
+ componentWillLoad() {
312
+ this.hasOptions = !!this.hostElement.querySelectorAll("q2-option:not([separator]):not([separator=true]), q2-dropdown-item:not([separator]):not([separator=true])").length;
313
+ }
314
+ componentDidLoad() {
315
+ a(this.hostElement);
316
+ this.checkOptions();
317
+ this.selectedOptionsUpdated();
318
+ this.ready.emit();
319
+ }
320
+ componentDidRender() {
321
+ this.scheduledAfterRender.forEach((t => t()));
322
+ this.scheduledAfterRender = [];
323
+ }
324
+ // #endregion
325
+ // #region Listeners
326
+ handleClick(t) {
327
+ t.stopPropagation();
328
+ }
329
+ delegateFocus(t) {
330
+ if (!h(t, this.hostElement)) return;
331
+ this.popoverState.emit({
332
+ open: true,
333
+ action: "open"
334
+ });
335
+ const {activeIndex: e} = this;
336
+ if (typeof e === "number" && e > -1) {
337
+ this.setActiveOption();
338
+ this.setFocusedOption();
339
+ } else {
340
+ this.setDefaultActiveElement();
341
+ }
342
+ }
343
+ // #endregion
344
+ // #region Public Methods API
345
+ async getContents() {
346
+ return this.allContents;
347
+ }
348
+ async getOptions() {
349
+ return this.allOptions;
350
+ }
351
+ async handleExternalKeydown(t) {
352
+ this.externalKeydownHandler(t);
353
+ }
354
+ async setActiveElement(t) {
355
+ this.activeIndex = t;
356
+ this.setActiveOption();
357
+ this.setFocusedOption();
358
+ }
359
+ async setDefaultActiveElement() {
360
+ this.activeIndex = this.getDefaultActiveIndex();
361
+ this.setActiveOption();
362
+ this.setFocusedOption();
363
+ }
364
+ // #endregion
365
+ // #region Watchers
366
+ selectedOptionsUpdated() {
367
+ if (this.multiple) {
368
+ this.updateMultipleOptionAttrs();
369
+ } else {
370
+ this.updateSingleOptionAttrs();
371
+ }
372
+ }
373
+ showSelectedUpdated(t) {
374
+ if (t && this.selectedOptions.length === 0) {
375
+ this.showSelected = false;
376
+ return;
377
+ }
378
+ this.allOptions.forEach((e => {
379
+ if (!("_multiSelectHidden" in e)) return;
380
+ e._multiSelectHidden = t ? !e.selected : false;
381
+ }));
382
+ }
383
+ // #endregion
384
+ // #region Local Methods
385
+ get allContents() {
386
+ const t = this.getRootSlot(this.hostElement);
387
+ const e = new Set([ "Q2-OPTGROUP", "Q2-OPTION", "Q2-DROPDOWN-ITEM" ]);
388
+ return t.filter((t => e.has(t.tagName)));
389
+ }
390
+ get allOptions() {
391
+ const t = this.allContents;
392
+ const extractOptions = t => t.reduce(((t, e) => {
393
+ if (e.tagName === "Q2-OPTION" || e.tagName === "Q2-DROPDOWN-ITEM") {
394
+ return e.separator ? t : [ ...t, e ];
395
+ } else if (e.tagName === "Q2-OPTGROUP") {
396
+ return [ ...t, ...extractOptions(Array.from(e.children)) ];
397
+ } else {
398
+ return t;
399
+ }
400
+ }), []);
401
+ return extractOptions(t);
402
+ }
403
+ get allVisibleOptions() {
404
+ return this.allOptions.filter((t => !t.hidden && (!("_multiSelectHidden" in t) || !t._multiSelectHidden) && !t.disabled && (!("disabledGroup" in t) || !t.disabledGroup)));
405
+ }
406
+ adjustActiveOptionAndScroll(t) {
407
+ this.activeIndex += t;
408
+ this.setActiveOption();
409
+ this.setFocusedOption();
410
+ this.scrollToActiveOption();
411
+ }
412
+ checkOptions() {
413
+ const {type: t} = this;
414
+ if (!t) return;
415
+ const e = t === "menu" ? "menuitem" : "option";
416
+ this.allOptions.forEach((t => {
417
+ t.role = e;
418
+ }));
419
+ }
420
+ focusSelectedSibling(t) {
421
+ const {allVisibleOptions: e, allOptions: i} = this;
422
+ const s = e.length < 2;
423
+ if (s) {
424
+ this.showSelected = false;
425
+ return;
426
+ }
427
+ const o = e.indexOf(t);
428
+ const n = o ? o - 1 : o + 1;
429
+ const r = e[n];
430
+ const a = i.indexOf(r);
431
+ this.activeIndex = a;
432
+ this.setFocusedOption();
433
+ this.scheduledAfterRender.push((() => {
434
+ if (!("_multiSelectHidden" in t)) return;
435
+ t._multiSelectHidden = !t.selected;
436
+ }));
437
+ }
438
+ getDefaultActiveIndex() {
439
+ const {allOptions: t} = this;
440
+ const e = t.findIndex((t => "selected" in t && t.selected));
441
+ if (e > -1) return e;
442
+ const i = t.findIndex((t => !t.hidden));
443
+ if (i > -1) return i;
444
+ return 0;
445
+ }
446
+ getNextVisibleIndex(t) {
447
+ const {allVisibleOptions: e, allOptions: i, activeIndex: s} = this;
448
+ const o = i[s];
449
+ const n = e.indexOf(o);
450
+ let r = n + t;
451
+ if (r < 0) {
452
+ r = e.length - 1;
453
+ } else if (r > e.length - 1) {
454
+ r = 0;
455
+ }
456
+ const a = e[r];
457
+ return i.indexOf(a);
458
+ }
459
+ getRootSlot(t) {
460
+ var e;
461
+ const i = t.querySelector("slot");
462
+ const s = (e = i === null || i === void 0 ? void 0 : i.assignedElements()) !== null && e !== void 0 ? e : Array.from(t.children);
463
+ const o = !!s.length && s[0].tagName === "SLOT";
464
+ if (o) {
465
+ return this.getRootSlot(s[0]);
466
+ } else {
467
+ return s;
468
+ }
469
+ }
470
+ async openDropdownWithActiveElement(t) {
471
+ if (this.disabled) return;
472
+ this.popoverState.emit({
473
+ open: true,
474
+ action: "open"
475
+ });
476
+ await c();
477
+ this.activeIndex = t;
478
+ this.setActiveOption();
479
+ this.setFocusedOption();
480
+ this.scrollToActiveOption();
481
+ }
482
+ resetTimer() {
483
+ if (this.searchStringTimer) {
484
+ clearTimeout(this.searchStringTimer);
485
+ }
486
+ this.searchStringTimer = window.setTimeout((() => {
487
+ this.searchString = null;
488
+ }), 2e3);
489
+ }
490
+ scrollToActiveOption() {
491
+ const t = this.allOptions[this.activeIndex];
492
+ t === null || t === void 0 ? void 0 : t.scrollIntoView({
493
+ block: "center"
494
+ });
495
+ }
496
+ searchOptions(t, e) {
497
+ this.searchString = t;
498
+ this.searchAndFocus(t, e);
499
+ }
500
+ selectOption(t) {
501
+ const {multiple: e, noSelect: i, showSelected: s} = this;
502
+ if (!t || t.disabled || "disabledGroup" in t && t.disabledGroup) return;
503
+ const o = t.value;
504
+ const n = "display" in t && t.display ? t.display : t.innerText.trim();
505
+ const r = {
506
+ value: o,
507
+ display: n
508
+ };
509
+ let a = [];
510
+ if (e) {
511
+ const {selectedOptions: e} = this;
512
+ const i = e.find((t => t.value === o));
513
+ if (i) {
514
+ a = e.filter((({value: t}) => t !== o));
515
+ } else {
516
+ a = [ ...e, r ];
517
+ }
518
+ if (s) this.focusSelectedSibling(t);
519
+ } else {
520
+ a = [ r ];
521
+ }
522
+ if (i) this.setActiveElement(null); else this.selectedOptions = a;
523
+ this.change.emit({
524
+ value: o,
525
+ values: a
526
+ });
527
+ }
528
+ setActiveOption() {
529
+ const t = this.activeIndex;
530
+ this.allOptions.forEach(((e, i) => {
531
+ e.active = t === i;
532
+ }));
533
+ }
534
+ setFocusedOption() {
535
+ const t = this.allOptions[this.activeIndex];
536
+ if (!t) return;
537
+ const e = l(t);
538
+ if (e) t.focus(); else n((() => t.focus()));
539
+ }
540
+ updateMultipleOptionAttrs() {
541
+ const {allOptions: t, selectedOptions: e} = this;
542
+ const i = e.map((({value: t}) => t));
543
+ if (this.noSelect) return;
544
+ t.forEach((t => {
545
+ if (!("selected" in t)) return;
546
+ t.selected = i.includes(t.value);
547
+ }));
548
+ }
549
+ updateSingleOptionAttrs() {
550
+ var t;
551
+ const {allOptions: e, selectedOptions: i} = this;
552
+ const s = ((t = i[0]) === null || t === void 0 ? void 0 : t.value) || undefined;
553
+ if (this.noSelect) return;
554
+ e.forEach((t => {
555
+ if (!("selected" in t)) return;
556
+ t.selected = t.value === s;
557
+ }));
558
+ }
559
+ // #endregion
560
+ // #region Render Methods
561
+ render() {
562
+ return i(s, {
563
+ key: "16e12e08dcd1d6514aa59ad8dd20dbf33d352bbe"
564
+ }, i("div", {
565
+ key: "b0eb152206ccb8b93e98d11c32894cb136ffc9a9",
566
+ class: "content",
567
+ ref: t => this.contentElement = t,
568
+ onFocusout: this.focusoutHandler
569
+ }, i("div", {
570
+ key: "bccbd0eb8bc8fc92db4629be02ab23e050e32fe9",
571
+ class: "options",
572
+ "aria-label": r("tecton.element.optionList.label", [ this.label ]),
573
+ "aria-multiselectable": `${!!this.multiple}`,
574
+ role: this.type || "listbox",
575
+ onKeyDown: this.internalKeydownHandler,
576
+ onClick: this.clickHandler
577
+ }, i("slot", {
578
+ key: "9b5a130d4d0a1a5f594b47669607febf39c0ea87"
579
+ }))));
580
+ }
581
+ get hostElement() {
582
+ return o(this);
583
+ }
584
+ static get watchers() {
585
+ return {
586
+ selectedOptions: [ "selectedOptionsUpdated" ],
587
+ showSelected: [ "showSelectedUpdated" ]
588
+ };
589
+ }
590
+ };
591
+
592
+ u.style = f;
593
+
594
+ const b = "*{box-sizing:border-box}*:active{outline:none}*:focus{outline:none;box-shadow:var(--const-double-focus-ring, 0 0 0 2px #ffffff, 0 0 0 4px #0066cc)}:host{box-shadow:none !important}::-moz-focus-inner{border:none}input,textarea,button{font-family:inherit;font-size:inherit;font-stretch:inherit}:host(.sr),:host(.sr) button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.sr,.sr button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.hidden{display:none}:host([hidden]){display:none}.invisible{visibility:hidden}.container{display:none}.show{display:block;position:fixed;z-index:var(--tct-popover-z-index, 50);margin:0;padding:0;overflow:auto;background:var(--tct-popover-background, var(--app-white, #ffffff));color:var(--tct-popover-font-color, var(--t-text, #4d4d4d));min-width:var(--tct-popover-min-width, 135px);margin-block:var(--tct-popover-margin-block, 0);box-shadow:var(--tct-popover-box-shadow, var(--app-shadow-1, 0px 0px 2px rgba(0, 0, 0, 0.12), 0px 2px 4px rgba(0, 0, 0, 0.14)));border-width:var(--tct-popover-border-width, 0);border-style:solid;border-color:var(--tct-popover-border-color, transparent);border-radius:var(--tct-popover-border-radius, 0);max-height:var(--comp-pop-max-height);left:var(--comp-pop-left);opacity:var(--comp-pop-opacity, 0);--comp-scrollbar-size:var(--tct-scrollbar-size, var(--t-scrollbar-size, var(--app-scale-1x, 5px)));--comp-scrollbar-border-radius:var(--tct-scrollbar-border-radius, var(--t-scrollbar-border-radius, var(--app-border-radius-1, 4px)));--comp-scrollbar-color:var(--tct-scrollbar-color, var(--t-scrollbar-color, var(--t-a11y-gray-color, #747474)));scrollbar-width:thin;scrollbar-color:var(--comp-scrollbar-color) transparent}:host([block]) .show{right:unset;width:var(--comp-pop-width);min-width:var(--tct-popover-min-width, unset)}:host([align=left]) .show{left:var(--comp-pop-left);right:unset}:host([align=right]) .show{right:var(--comp-pop-right);left:unset}.show.down{top:var(--tct-popover-top, var(--comp-pop-top));bottom:unset}.show.up{top:unset;bottom:var(--comp-pop-bottom)}.show.legacy{position:absolute}.show::-webkit-scrollbar{width:var(--comp-scrollbar-size);height:var(--comp-scrollbar-size);margin:5px}.show::-webkit-scrollbar-thumb{background:var(--comp-scrollbar-color);border-radius:var(--comp-scrollbar-border-radius)}.show::-webkit-scrollbar-track{background:transparent;border-radius:var(--comp-scrollbar-border-radius)}click-elsewhere{position:relative;display:block}";
595
+
596
+ const v = b;
597
+
598
+ const w = class {
599
+ constructor(i) {
600
+ t(this, i);
601
+ this.popoverStateChanged = e(this, "popoverStateChanged", 7);
602
+ /**
603
+ * The number of pixels to leave between the popover and the edge of the viewport
604
+ */ this.displayBuffer = 10;
605
+ /** remove when Popover API is supported in iOS */ this.orientationChanged = false;
606
+ this.handleMinHeight = () => {
607
+ if (this.minHeight) {
608
+ p(this, "minHeight", "prop");
609
+ }
610
+ };
611
+ this.setAbsoluteCSSProperties = async () => {
612
+ const {controlElement: t, containerElement: e, currentDirection: i, align: s} = this;
613
+ if (s === "right") {
614
+ e.style.setProperty("--comp-pop-right", "0");
615
+ e.style.setProperty("--comp-pop-left", "unset");
616
+ } else {
617
+ e.style.setProperty("--comp-pop-left", "0");
618
+ e.style.setProperty("--comp-pop-right", "unset");
619
+ }
620
+ if (this.block) {
621
+ e.style.setProperty("--comp-pop-width", "100%");
622
+ }
623
+ if (i === "up") {
624
+ const i = getComputedStyle(t);
625
+ const s = parseInt(i.height || "0") + parseInt(i.borderTopWidth || "0") + parseInt(i.borderBottomWidth || "0");
626
+ e.style.setProperty("--comp-pop-bottom", `${s}px`);
627
+ }
628
+ // Wait for one paint to prevent layout thrashing
629
+ await c();
630
+ e.style.setProperty("--comp-pop-opacity", "1");
631
+ };
632
+ this.setFixedCSSProperties = async () => {
633
+ var t, e;
634
+ const {controlElement: i, containerElement: s, currentDirection: o, rootElementRect: n} = this;
635
+ const {top: r, bottom: a, left: h, right: l} = (e = (t = i === null || i === void 0 ? void 0 : i.getBoundingClientRect) === null || t === void 0 ? void 0 : t.call(i)) !== null && e !== void 0 ? e : {
636
+ top: 0,
637
+ bottom: 0,
638
+ left: 0,
639
+ right: 0
640
+ };
641
+ const p = h - n.left;
642
+ if (this.block) s.style.setProperty("--comp-pop-width", `${(i === null || i === void 0 ? void 0 : i.offsetWidth) || 0}px`);
643
+ s.style.setProperty("--comp-pop-left", `${p}px`);
644
+ s.style.setProperty("--comp-pop-right", `${n.width + n.left - l}px`);
645
+ if (o === "up") {
646
+ s.style.setProperty("--comp-pop-bottom", `${n.height + n.top - r}px`);
647
+ }
648
+ if (o === "down") {
649
+ s.style.setProperty("--comp-pop-top", `${a - n.top}px`);
650
+ }
651
+ // Wait for one paint to prevent layout thrashing
652
+ await c();
653
+ s.style.setProperty("--comp-pop-opacity", "1");
654
+ };
655
+ this.viewPortChanged = () => {
656
+ if (!this.open) return;
657
+ this.determinePopDirection();
658
+ };
659
+ this.viewPortOrientationChanged = () => {
660
+ this.orientationChanged = true;
661
+ this.viewPortChanged();
662
+ };
663
+ this.currentDirection = undefined;
664
+ this.show = false;
665
+ this.align = undefined;
666
+ this.block = undefined;
667
+ this.controlElement = undefined;
668
+ this.direction = undefined;
669
+ this.maxHeight = undefined;
670
+ this.minHeight = undefined;
671
+ this.mode = null;
672
+ this.open = undefined;
673
+ }
674
+ // #endregion
675
+ // #region Component Lifecycle Events
676
+ disconnectedCallback() {
677
+ this.removeViewportListeners();
678
+ }
679
+ componentDidLoad() {
680
+ this.handleMinHeight();
681
+ if (this.open) this.determinePopDirection();
682
+ }
683
+ // #endregion
684
+ // #region Listeners
685
+ popoverStateHandler(t) {
686
+ const {detail: {open: e}} = t;
687
+ if (e === this.open) return;
688
+ this.open = e;
689
+ t.stopPropagation();
690
+ }
691
+ // #endregion
692
+ // #region Public Methods API
693
+ async scrollContainerTo(t) {
694
+ this.containerElement.scrollTo(t);
695
+ }
696
+ async toggle() {
697
+ this.open = !this.open;
698
+ }
699
+ // #endregion
700
+ // #region Watchers
701
+ minHeightProvided() {
702
+ this.handleMinHeight();
703
+ }
704
+ async openChanged(t) {
705
+ this.setRootElement();
706
+ this.popoverStateChanged.emit({
707
+ open: t
708
+ });
709
+ if (t) {
710
+ this.addViewportListeners();
711
+ this.determinePopDirection();
712
+ } else {
713
+ this.removeViewportListeners();
714
+ this.currentDirection = undefined;
715
+ this.show = false;
716
+ await c();
717
+ this.clearCSSProperties();
718
+ }
719
+ }
720
+ // #endregion
721
+ // #region Local Methods
722
+ get isModule() {
723
+ var t, e;
724
+ const i = window !== window.top;
725
+ const s = Object.keys((e = (t = window.Tecton) === null || t === void 0 ? void 0 : t.platformDimensions) !== null && e !== void 0 ? e : {}).length > 0;
726
+ return i && s;
727
+ }
728
+ get providedDirection() {
729
+ const {direction: t} = this;
730
+ switch (t) {
731
+ case "up":
732
+ case "down":
733
+ return t;
734
+
735
+ default:
736
+ return undefined;
737
+ }
738
+ }
739
+ get validatedMaxHeight() {
740
+ const {maxHeight: t} = this;
741
+ return isNaN(t) ? undefined : t;
742
+ }
743
+ addViewportListeners() {
744
+ var t;
745
+ window.addEventListener("resize", this.viewPortOrientationChanged);
746
+ // #region remove when Popover API is supported in iOS
747
+ window.addEventListener("scroll", this.viewPortChanged, {
748
+ passive: true,
749
+ capture: true
750
+ });
751
+ (t = screen === null || screen === void 0 ? void 0 : screen.orientation) === null || t === void 0 ? void 0 : t.addEventListener("change", this.viewPortOrientationChanged);
752
+ window.addEventListener("orientationchange", this.viewPortOrientationChanged);
753
+ // #endregion
754
+ }
755
+ clearCSSProperties() {
756
+ this.containerElement.style.removeProperty("--comp-pop-max-height");
757
+ this.containerElement.style.removeProperty("--comp-pop-top");
758
+ this.containerElement.style.removeProperty("--comp-pop-bottom");
759
+ this.containerElement.style.removeProperty("--comp-pop-left");
760
+ this.containerElement.style.removeProperty("--comp-pop-right");
761
+ this.containerElement.style.removeProperty("--comp-pop-width");
762
+ this.containerElement.style.removeProperty("--comp-pop-opacity");
763
+ }
764
+ async determinePopDirection() {
765
+ var t, e, i;
766
+ const {containerElement: s, controlElement: o, providedDirection: n, displayBuffer: r} = this;
767
+ if (s) s.style.maxHeight = null;
768
+ await c();
769
+ const {isModule: a} = this;
770
+ const {top: h, bottom: l} = (e = (t = o === null || o === void 0 ? void 0 : o.getBoundingClientRect) === null || t === void 0 ? void 0 : t.call(o)) !== null && e !== void 0 ? e : {
771
+ top: 0,
772
+ bottom: 0
773
+ };
774
+ let p;
775
+ let d;
776
+ let f;
777
+ if (a) {
778
+ const {outletOffset: t = 0, innerHeight: e = window.innerHeight} = ((i = window.Tecton) === null || i === void 0 ? void 0 : i.platformDimensions) || {};
779
+ const s = window.visualViewport.height - l;
780
+ const o = e - (t + l);
781
+ const n = s < o;
782
+ p = e;
783
+ // If the top of the module is below the top of the window we just use the controlTop
784
+ // Otherwise we need to add the outletOffset to the controlTop
785
+ d = (t > 0 ? h : h + t) - r;
786
+ f = n ? s - r : o - r;
787
+ } else {
788
+ p = window.visualViewport.height;
789
+ d = h - r;
790
+ f = p - l - r;
791
+ }
792
+ const u = d > f ? "up" : "down";
793
+ // We do not want to update the max height once the popover is open unless the page orientation shifts (resize or mobile use cases)
794
+ const b = !s.style.getPropertyValue("--comp-pop-max-height") || this.orientationChanged;
795
+ // we do not want to constantly update the max-height after an orientation change, so we switch this back to false
796
+ this.orientationChanged = false;
797
+ const v = this.currentDirection || n || u;
798
+ switch (v) {
799
+ case "up":
800
+ if (b) {
801
+ const t = this.validatedMaxHeight || d;
802
+ const e = Math.min(d, t);
803
+ s.style.setProperty("--comp-pop-max-height", `${e}px`);
804
+ }
805
+ this.setDirectionAndShow("up");
806
+ break;
807
+
808
+ case "down":
809
+ if (b) {
810
+ const t = this.validatedMaxHeight || f;
811
+ const e = Math.min(f, t);
812
+ s.style.setProperty("--comp-pop-max-height", `${e}px`);
813
+ }
814
+ this.setDirectionAndShow("down");
815
+ break;
816
+ }
817
+ }
818
+ removeViewportListeners() {
819
+ var t;
820
+ window.removeEventListener("resize", this.viewPortOrientationChanged);
821
+ // #region remove when Popover API is supported in iOS
822
+ window.removeEventListener("scroll", this.viewPortChanged);
823
+ (t = screen === null || screen === void 0 ? void 0 : screen.orientation) === null || t === void 0 ? void 0 : t.removeEventListener("orientationchange", this.viewPortOrientationChanged);
824
+ window.removeEventListener("orientationchange", this.viewPortOrientationChanged);
825
+ // #endregion
826
+ }
827
+ setDirectionAndShow(t) {
828
+ this.setRootElement();
829
+ // Due to some runtime inconsistency across devices/browsers we need to add one more check here because the
830
+ // popover can be closed between the time the popover is opened and the time the direction is determined
831
+ const e = this.open;
832
+ if (!e) return;
833
+ this.currentDirection = t;
834
+ this.show = true;
835
+ if (this.mode === "legacy") {
836
+ this.setAbsoluteCSSProperties();
837
+ } else {
838
+ this.setFixedCSSProperties();
839
+ }
840
+ }
841
+ setRootElement() {
842
+ let t = this.hostElement;
843
+ while (t && t !== document.documentElement) {
844
+ const e = window.getComputedStyle(t);
845
+ // Check if the element has any styles applied that create a new containg block
846
+ if (e.transform !== "none" || e.filter !== "none" || e.perspective !== "none" || e.containerType !== "normal" || [ "transform", "perspective", "filter" ].includes(e.willChange) || [ "layout", "paint", "strict", "content" ].includes(e.contain)) {
847
+ this.rootElementRect = t.getBoundingClientRect();
848
+ return;
849
+ }
850
+ const i = t.getRootNode();
851
+ const s = typeof ShadowRoot !== "undefined" && i instanceof ShadowRoot && i.host instanceof HTMLElement;
852
+ if (s) {
853
+ t = i.host;
854
+ } else {
855
+ t = t.parentElement;
856
+ }
857
+ }
858
+ // Return the document's bounding rect if no element is found
859
+ this.rootElementRect = {
860
+ top: 0,
861
+ bottom: 0,
862
+ left: 0,
863
+ right: 0,
864
+ height: window.visualViewport.height,
865
+ width: window.visualViewport.width
866
+ };
867
+ }
868
+ // #endregion
869
+ // #region Render Methods
870
+ render() {
871
+ const t = [ "container", this.currentDirection ];
872
+ if (this.show) t.push("show");
873
+ if (this.mode === "legacy") t.push("legacy");
874
+ return i("div", {
875
+ key: "ec69329181e23e7c8f46fc2d2f5b9453f0f866d1",
876
+ ref: t => this.containerElement = t,
877
+ class: t.join(" "),
878
+ "test-id": "outerContainer",
879
+ tabIndex: -1
880
+ }, i("div", {
881
+ key: "7814ab2ab64fe363d76d1ed34005b7512c877d17",
882
+ ref: t => this.contentElement = t,
883
+ class: "content"
884
+ }, i("slot", {
885
+ key: "7a3fec41c603d97be3bcaa0d7fd48c0517b92f7c"
886
+ })));
887
+ }
888
+ get hostElement() {
889
+ return o(this);
890
+ }
891
+ static get watchers() {
892
+ return {
893
+ minHeight: [ "minHeightProvided" ],
894
+ open: [ "openChanged" ]
895
+ };
896
+ }
897
+ };
898
+
899
+ w.style = v;
900
+
901
+ export { u as q2_option_list, w as q2_popover };
902
+ //# sourceMappingURL=q2-option-list_2.entry.js.map