q2-tecton-elements 1.56.3 → 1.56.5

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