q2-tecton-elements 1.45.3 → 1.46.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 (285) hide show
  1. package/dist/cjs/click-elsewhere_2.cjs.entry.js +1 -1
  2. package/dist/cjs/click-elsewhere_2.cjs.entry.js.map +1 -1
  3. package/dist/cjs/{index-0430339e.js → index-c385e32f.js} +1 -1
  4. package/dist/cjs/{index-0430339e.js.map → index-c385e32f.js.map} +1 -1
  5. package/dist/cjs/loader.cjs.js +1 -1
  6. package/dist/cjs/q2-btn_2.cjs.entry.js +2 -1
  7. package/dist/cjs/q2-btn_2.cjs.entry.js.map +1 -1
  8. package/dist/cjs/q2-calendar.cjs.entry.js +3 -3
  9. package/dist/cjs/q2-calendar.cjs.entry.js.map +1 -1
  10. package/dist/cjs/q2-carousel.cjs.entry.js +33 -2
  11. package/dist/cjs/q2-carousel.cjs.entry.js.map +1 -1
  12. package/dist/cjs/q2-currency.cjs.entry.js +1 -1
  13. package/dist/cjs/q2-currency.cjs.entry.js.map +1 -1
  14. package/dist/cjs/q2-dropdown.cjs.entry.js +1 -1
  15. package/dist/cjs/q2-dropdown.cjs.entry.js.map +1 -1
  16. package/dist/cjs/q2-input.cjs.entry.js +17 -10
  17. package/dist/cjs/q2-input.cjs.entry.js.map +1 -1
  18. package/dist/cjs/q2-item.cjs.entry.js +1 -1
  19. package/dist/cjs/q2-item.cjs.entry.js.map +1 -1
  20. package/dist/cjs/q2-list.cjs.entry.js +1 -1
  21. package/dist/cjs/q2-list.cjs.entry.js.map +1 -1
  22. package/dist/cjs/q2-optgroup.cjs.entry.js +59 -0
  23. package/dist/cjs/q2-optgroup.cjs.entry.js.map +1 -0
  24. package/dist/cjs/{q2-optgroup_2.cjs.entry.js → q2-option.cjs.entry.js} +1 -52
  25. package/dist/cjs/q2-option.cjs.entry.js.map +1 -0
  26. package/dist/cjs/q2-pagination.cjs.entry.js +22 -3
  27. package/dist/cjs/q2-pagination.cjs.entry.js.map +1 -1
  28. package/dist/cjs/q2-pill.cjs.entry.js +2 -2
  29. package/dist/cjs/q2-pill.cjs.entry.js.map +1 -1
  30. package/dist/cjs/q2-relative-time.cjs.entry.js +2 -2
  31. package/dist/cjs/q2-section.cjs.entry.js +2 -2
  32. package/dist/cjs/q2-select.cjs.entry.js +4 -5
  33. package/dist/cjs/q2-select.cjs.entry.js.map +1 -1
  34. package/dist/cjs/q2-stepper-pane.cjs.entry.js +1 -1
  35. package/dist/cjs/q2-stepper-pane.cjs.entry.js.map +1 -1
  36. package/dist/cjs/q2-stepper-vertical.cjs.entry.js +6 -6
  37. package/dist/cjs/q2-stepper-vertical.cjs.entry.js.map +1 -1
  38. package/dist/cjs/q2-stepper.cjs.entry.js +2 -2
  39. package/dist/cjs/q2-stepper.cjs.entry.js.map +1 -1
  40. package/dist/cjs/q2-tab-container.cjs.entry.js +2 -2
  41. package/dist/cjs/q2-tab-container.cjs.entry.js.map +1 -1
  42. package/dist/cjs/q2-tab-pane.cjs.entry.js +1 -1
  43. package/dist/cjs/q2-tag.cjs.entry.js +1 -1
  44. package/dist/cjs/q2-tecton-elements.cjs.js +1 -1
  45. package/dist/cjs/q2-textarea.cjs.entry.js +1 -1
  46. package/dist/cjs/q2-textarea.cjs.entry.js.map +1 -1
  47. package/dist/cjs/tecton-tab-pane.cjs.entry.js +2 -2
  48. package/dist/collection/components/click-elsewhere/click-elsewhere.js.map +1 -1
  49. package/dist/collection/components/q2-btn/q2-btn.js +29 -5
  50. package/dist/collection/components/q2-btn/q2-btn.js.map +1 -1
  51. package/dist/collection/components/q2-calendar/q2-calendar.css +3 -0
  52. package/dist/collection/components/q2-calendar/q2-calendar.js +1 -1
  53. package/dist/collection/components/q2-calendar/q2-calendar.js.map +1 -1
  54. package/dist/collection/components/q2-carousel/q2-carousel.js +33 -2
  55. package/dist/collection/components/q2-carousel/q2-carousel.js.map +1 -1
  56. package/dist/collection/components/q2-currency/q2-currency.css +4 -0
  57. package/dist/collection/components/q2-data-table/q2-data-table.js +6 -6
  58. package/dist/collection/components/q2-dropdown/q2-dropdown.js +1 -1
  59. package/dist/collection/components/q2-dropdown/q2-dropdown.js.map +1 -1
  60. package/dist/collection/components/q2-input/q2-input.js +43 -15
  61. package/dist/collection/components/q2-input/q2-input.js.map +1 -1
  62. package/dist/collection/components/q2-item/q2-item.css +11 -11
  63. package/dist/collection/components/q2-list/q2-list.css +8 -5
  64. package/dist/collection/components/q2-option-list/q2-option-list.js +2 -2
  65. package/dist/collection/components/q2-pagination/q2-pagination.css +17 -2
  66. package/dist/collection/components/q2-pagination/q2-pagination.js +53 -2
  67. package/dist/collection/components/q2-pagination/q2-pagination.js.map +1 -1
  68. package/dist/collection/components/q2-pill/q2-pill.js +2 -2
  69. package/dist/collection/components/q2-pill/q2-pill.js.map +1 -1
  70. package/dist/collection/components/q2-popover/q2-popover.js +1 -1
  71. package/dist/collection/components/q2-relative-time/q2-relative-time.js +1 -1
  72. package/dist/collection/components/q2-section/q2-section.js +2 -2
  73. package/dist/collection/components/q2-select/q2-select.js +21 -5
  74. package/dist/collection/components/q2-select/q2-select.js.map +1 -1
  75. package/dist/collection/components/q2-stepper/q2-stepper.js +2 -2
  76. package/dist/collection/components/q2-stepper/q2-stepper.js.map +1 -1
  77. package/dist/collection/components/q2-stepper-pane/q2-stepper-pane.js +4 -4
  78. package/dist/collection/components/q2-stepper-pane/q2-stepper-pane.js.map +1 -1
  79. package/dist/collection/components/q2-stepper-vertical/q2-stepper-vertical.js +6 -6
  80. package/dist/collection/components/q2-stepper-vertical/q2-stepper-vertical.js.map +1 -1
  81. package/dist/collection/components/q2-tab-container/q2-tab-container.js +2 -2
  82. package/dist/collection/components/q2-tab-container/q2-tab-container.js.map +1 -1
  83. package/dist/collection/components/q2-tab-pane/q2-tab-pane.js +1 -1
  84. package/dist/collection/components/q2-tag/q2-tag.js +1 -1
  85. package/dist/collection/components/q2-textarea/q2-textarea.css +2 -2
  86. package/dist/collection/components/tecton-tab-pane/tecton-tab-pane.js +2 -2
  87. package/dist/components/click-elsewhere2.js.map +1 -1
  88. package/dist/components/index2.js +1 -1
  89. package/dist/components/q2-btn2.js +4 -2
  90. package/dist/components/q2-btn2.js.map +1 -1
  91. package/dist/components/q2-calendar.js +2 -2
  92. package/dist/components/q2-calendar.js.map +1 -1
  93. package/dist/components/q2-carousel.js +33 -2
  94. package/dist/components/q2-carousel.js.map +1 -1
  95. package/dist/components/q2-currency.js +1 -1
  96. package/dist/components/q2-currency.js.map +1 -1
  97. package/dist/components/q2-dropdown.js +1 -1
  98. package/dist/components/q2-dropdown.js.map +1 -1
  99. package/dist/components/q2-input2.js +20 -12
  100. package/dist/components/q2-input2.js.map +1 -1
  101. package/dist/components/q2-item.js +1 -1
  102. package/dist/components/q2-item.js.map +1 -1
  103. package/dist/components/q2-list.js +1 -1
  104. package/dist/components/q2-list.js.map +1 -1
  105. package/dist/components/q2-message2.js +1 -1
  106. package/dist/components/q2-option-list2.js +1 -1
  107. package/dist/components/q2-pagination.js +64 -13
  108. package/dist/components/q2-pagination.js.map +1 -1
  109. package/dist/components/q2-pill.js +2 -2
  110. package/dist/components/q2-pill.js.map +1 -1
  111. package/dist/components/q2-popover2.js +2 -2
  112. package/dist/components/q2-relative-time.js +1 -1
  113. package/dist/components/q2-section.js +2 -2
  114. package/dist/components/q2-select.js +1 -711
  115. package/dist/components/q2-select.js.map +1 -1
  116. package/dist/components/q2-select2.js +715 -0
  117. package/dist/components/q2-select2.js.map +1 -0
  118. package/dist/components/q2-stepper-pane.js +2 -2
  119. package/dist/components/q2-stepper-pane.js.map +1 -1
  120. package/dist/components/q2-stepper-vertical.js +6 -6
  121. package/dist/components/q2-stepper-vertical.js.map +1 -1
  122. package/dist/components/q2-stepper.js +2 -2
  123. package/dist/components/q2-stepper.js.map +1 -1
  124. package/dist/components/q2-tab-container.js +2 -2
  125. package/dist/components/q2-tab-container.js.map +1 -1
  126. package/dist/components/q2-tab-pane.js +1 -1
  127. package/dist/components/q2-tag.js +1 -1
  128. package/dist/components/q2-textarea.js +1 -1
  129. package/dist/components/q2-textarea.js.map +1 -1
  130. package/dist/components/tecton-tab-pane.js +2 -2
  131. package/dist/esm/click-elsewhere_2.entry.js +1 -1
  132. package/dist/esm/click-elsewhere_2.entry.js.map +1 -1
  133. package/dist/esm/{index-e940b40e.js → index-f0dfb099.js} +1 -1
  134. package/dist/esm/{index-e940b40e.js.map → index-f0dfb099.js.map} +1 -1
  135. package/dist/esm/loader.js +1 -1
  136. package/dist/esm/q2-btn_2.entry.js +2 -1
  137. package/dist/esm/q2-btn_2.entry.js.map +1 -1
  138. package/dist/esm/q2-calendar.entry.js +3 -3
  139. package/dist/esm/q2-calendar.entry.js.map +1 -1
  140. package/dist/esm/q2-carousel.entry.js +33 -2
  141. package/dist/esm/q2-carousel.entry.js.map +1 -1
  142. package/dist/esm/q2-currency.entry.js +1 -1
  143. package/dist/esm/q2-currency.entry.js.map +1 -1
  144. package/dist/esm/q2-dropdown.entry.js +1 -1
  145. package/dist/esm/q2-dropdown.entry.js.map +1 -1
  146. package/dist/esm/q2-input.entry.js +17 -10
  147. package/dist/esm/q2-input.entry.js.map +1 -1
  148. package/dist/esm/q2-item.entry.js +1 -1
  149. package/dist/esm/q2-item.entry.js.map +1 -1
  150. package/dist/esm/q2-list.entry.js +1 -1
  151. package/dist/esm/q2-list.entry.js.map +1 -1
  152. package/dist/esm/q2-optgroup.entry.js +55 -0
  153. package/dist/esm/q2-optgroup.entry.js.map +1 -0
  154. package/dist/esm/{q2-optgroup_2.entry.js → q2-option.entry.js} +3 -53
  155. package/dist/esm/q2-option.entry.js.map +1 -0
  156. package/dist/esm/q2-pagination.entry.js +22 -3
  157. package/dist/esm/q2-pagination.entry.js.map +1 -1
  158. package/dist/esm/q2-pill.entry.js +2 -2
  159. package/dist/esm/q2-pill.entry.js.map +1 -1
  160. package/dist/esm/q2-relative-time.entry.js +2 -2
  161. package/dist/esm/q2-section.entry.js +2 -2
  162. package/dist/esm/q2-select.entry.js +4 -5
  163. package/dist/esm/q2-select.entry.js.map +1 -1
  164. package/dist/esm/q2-stepper-pane.entry.js +2 -2
  165. package/dist/esm/q2-stepper-pane.entry.js.map +1 -1
  166. package/dist/esm/q2-stepper-vertical.entry.js +6 -6
  167. package/dist/esm/q2-stepper-vertical.entry.js.map +1 -1
  168. package/dist/esm/q2-stepper.entry.js +2 -2
  169. package/dist/esm/q2-stepper.entry.js.map +1 -1
  170. package/dist/esm/q2-tab-container.entry.js +2 -2
  171. package/dist/esm/q2-tab-container.entry.js.map +1 -1
  172. package/dist/esm/q2-tab-pane.entry.js +1 -1
  173. package/dist/esm/q2-tag.entry.js +1 -1
  174. package/dist/esm/q2-tecton-elements.js +1 -1
  175. package/dist/esm/q2-textarea.entry.js +1 -1
  176. package/dist/esm/q2-textarea.entry.js.map +1 -1
  177. package/dist/esm/tecton-tab-pane.entry.js +2 -2
  178. package/dist/q2-tecton-elements/{p-685b821c.entry.js → p-0eff37c6.entry.js} +2 -2
  179. package/dist/q2-tecton-elements/{p-fcc84527.entry.js → p-12326313.entry.js} +2 -2
  180. package/dist/q2-tecton-elements/p-12326313.entry.js.map +1 -0
  181. package/dist/q2-tecton-elements/p-176ad382.entry.js +2 -0
  182. package/dist/q2-tecton-elements/p-176ad382.entry.js.map +1 -0
  183. package/dist/q2-tecton-elements/{p-f4d77672.entry.js → p-195a133c.entry.js} +2 -2
  184. package/dist/q2-tecton-elements/p-1b37b8c6.entry.js +2 -0
  185. package/dist/q2-tecton-elements/p-1b37b8c6.entry.js.map +1 -0
  186. package/dist/q2-tecton-elements/{p-bfe9d688.entry.js → p-1c4aa7e3.entry.js} +2 -2
  187. package/dist/q2-tecton-elements/p-1c4aa7e3.entry.js.map +1 -0
  188. package/dist/q2-tecton-elements/p-1e927478.entry.js +2 -0
  189. package/dist/q2-tecton-elements/p-1e927478.entry.js.map +1 -0
  190. package/dist/q2-tecton-elements/p-36398b59.entry.js +2 -0
  191. package/dist/q2-tecton-elements/p-36398b59.entry.js.map +1 -0
  192. package/dist/q2-tecton-elements/{p-7ce6e587.js → p-3c42c90f.js} +1 -1
  193. package/dist/q2-tecton-elements/p-66af375f.entry.js +2 -0
  194. package/dist/q2-tecton-elements/p-66af375f.entry.js.map +1 -0
  195. package/dist/q2-tecton-elements/p-6ebe37ea.entry.js +2 -0
  196. package/dist/q2-tecton-elements/p-6ebe37ea.entry.js.map +1 -0
  197. package/dist/q2-tecton-elements/p-79df783e.entry.js +2 -0
  198. package/dist/q2-tecton-elements/p-79df783e.entry.js.map +1 -0
  199. package/dist/q2-tecton-elements/p-7e1dc7e8.entry.js +2 -0
  200. package/dist/q2-tecton-elements/p-7e1dc7e8.entry.js.map +1 -0
  201. package/dist/q2-tecton-elements/{p-05b015a8.entry.js → p-87bbeb9c.entry.js} +2 -2
  202. package/dist/q2-tecton-elements/{p-05b015a8.entry.js.map → p-87bbeb9c.entry.js.map} +1 -1
  203. package/dist/q2-tecton-elements/p-89305707.entry.js +2 -0
  204. package/dist/q2-tecton-elements/p-89305707.entry.js.map +1 -0
  205. package/dist/q2-tecton-elements/{p-debd5249.entry.js → p-ad274c67.entry.js} +2 -2
  206. package/dist/q2-tecton-elements/{p-debd5249.entry.js.map → p-ad274c67.entry.js.map} +1 -1
  207. package/dist/q2-tecton-elements/{p-68556733.entry.js → p-c56b58e9.entry.js} +2 -2
  208. package/dist/q2-tecton-elements/p-c56b58e9.entry.js.map +1 -0
  209. package/dist/q2-tecton-elements/{p-2436c843.entry.js → p-cb4f9b33.entry.js} +2 -2
  210. package/dist/q2-tecton-elements/p-cb4f9b33.entry.js.map +1 -0
  211. package/dist/q2-tecton-elements/{p-5dc5c4e2.entry.js → p-d013e05d.entry.js} +2 -2
  212. package/dist/q2-tecton-elements/p-d013e05d.entry.js.map +1 -0
  213. package/dist/q2-tecton-elements/p-d1522382.entry.js +2 -0
  214. package/dist/q2-tecton-elements/p-d1522382.entry.js.map +1 -0
  215. package/dist/q2-tecton-elements/{p-63192fac.entry.js → p-da7fc914.entry.js} +2 -2
  216. package/dist/q2-tecton-elements/p-e3230823.entry.js +2 -0
  217. package/dist/q2-tecton-elements/p-e3230823.entry.js.map +1 -0
  218. package/dist/q2-tecton-elements/{p-b376c111.entry.js → p-e47dbfbe.entry.js} +2 -2
  219. package/dist/q2-tecton-elements/{p-a214077c.entry.js → p-e4a2469f.entry.js} +2 -2
  220. package/dist/q2-tecton-elements/p-fc9f43f8.entry.js +2 -0
  221. package/dist/q2-tecton-elements/p-fc9f43f8.entry.js.map +1 -0
  222. package/dist/q2-tecton-elements/q2-tecton-elements.esm.js +1 -1
  223. package/dist/q2-tecton-elements/q2-tecton-elements.esm.js.map +1 -1
  224. package/dist/test/elements/q2-calendar-test.e2e.js +1 -1
  225. package/dist/test/elements/q2-calendar-test.e2e.js.map +1 -1
  226. package/dist/test/elements/q2-carousel-test.e2e.js +67 -1
  227. package/dist/test/elements/q2-carousel-test.e2e.js.map +1 -1
  228. package/dist/test/elements/q2-detail/q2-list-test.e2e.js +1 -1
  229. package/dist/test/elements/q2-detail/q2-list-test.e2e.js.map +1 -1
  230. package/dist/test/elements/q2-input-test.e2e.js +25 -2
  231. package/dist/test/elements/q2-input-test.e2e.js.map +1 -1
  232. package/dist/test/elements/q2-pagination-test.e2e.js +22 -0
  233. package/dist/test/elements/q2-pagination-test.e2e.js.map +1 -1
  234. package/dist/test/elements/q2-pill-test.e2e.js +21 -2
  235. package/dist/test/elements/q2-pill-test.e2e.js.map +1 -1
  236. package/dist/test/elements/q2-select-test.e2e.js +26 -8
  237. package/dist/test/elements/q2-select-test.e2e.js.map +1 -1
  238. package/dist/test/elements/q2-stepper-test.e2e.js +10 -17
  239. package/dist/test/elements/q2-stepper-test.e2e.js.map +1 -1
  240. package/dist/test/elements/q2-stepper-vertical-test.e2e.js +20 -4
  241. package/dist/test/elements/q2-stepper-vertical-test.e2e.js.map +1 -1
  242. package/dist/test/elements/q2-tab-container-test.e2e.js +10 -4
  243. package/dist/test/elements/q2-tab-container-test.e2e.js.map +1 -1
  244. package/dist/types/components/q2-btn/q2-btn.d.ts +14 -3
  245. package/dist/types/components/q2-carousel/q2-carousel.d.ts +2 -0
  246. package/dist/types/components/q2-input/q2-input.d.ts +10 -3
  247. package/dist/types/components.d.ts +50 -4
  248. package/package.json +3 -3
  249. package/dist/cjs/q2-optgroup_2.cjs.entry.js.map +0 -1
  250. package/dist/esm/q2-optgroup_2.entry.js.map +0 -1
  251. package/dist/q2-tecton-elements/p-1c17d118.entry.js +0 -2
  252. package/dist/q2-tecton-elements/p-1c17d118.entry.js.map +0 -1
  253. package/dist/q2-tecton-elements/p-2436c843.entry.js.map +0 -1
  254. package/dist/q2-tecton-elements/p-3b1ea100.entry.js +0 -2
  255. package/dist/q2-tecton-elements/p-3b1ea100.entry.js.map +0 -1
  256. package/dist/q2-tecton-elements/p-445990a8.entry.js +0 -2
  257. package/dist/q2-tecton-elements/p-445990a8.entry.js.map +0 -1
  258. package/dist/q2-tecton-elements/p-4b81a121.entry.js +0 -2
  259. package/dist/q2-tecton-elements/p-4b81a121.entry.js.map +0 -1
  260. package/dist/q2-tecton-elements/p-50bd4437.entry.js +0 -2
  261. package/dist/q2-tecton-elements/p-50bd4437.entry.js.map +0 -1
  262. package/dist/q2-tecton-elements/p-5dc5c4e2.entry.js.map +0 -1
  263. package/dist/q2-tecton-elements/p-68556733.entry.js.map +0 -1
  264. package/dist/q2-tecton-elements/p-7c12ba02.entry.js +0 -2
  265. package/dist/q2-tecton-elements/p-7c12ba02.entry.js.map +0 -1
  266. package/dist/q2-tecton-elements/p-a977e723.entry.js +0 -2
  267. package/dist/q2-tecton-elements/p-a977e723.entry.js.map +0 -1
  268. package/dist/q2-tecton-elements/p-b3d10d52.entry.js +0 -2
  269. package/dist/q2-tecton-elements/p-b3d10d52.entry.js.map +0 -1
  270. package/dist/q2-tecton-elements/p-bfe9d688.entry.js.map +0 -1
  271. package/dist/q2-tecton-elements/p-bffda54d.entry.js +0 -2
  272. package/dist/q2-tecton-elements/p-bffda54d.entry.js.map +0 -1
  273. package/dist/q2-tecton-elements/p-cadceb00.entry.js +0 -2
  274. package/dist/q2-tecton-elements/p-cadceb00.entry.js.map +0 -1
  275. package/dist/q2-tecton-elements/p-d1a9ed3d.entry.js +0 -2
  276. package/dist/q2-tecton-elements/p-d1a9ed3d.entry.js.map +0 -1
  277. package/dist/q2-tecton-elements/p-fcc84527.entry.js.map +0 -1
  278. /package/dist/q2-tecton-elements/{p-685b821c.entry.js.map → p-0eff37c6.entry.js.map} +0 -0
  279. /package/dist/q2-tecton-elements/{p-f4d77672.entry.js.map → p-195a133c.entry.js.map} +0 -0
  280. /package/dist/q2-tecton-elements/{p-7ce6e587.js.map → p-3c42c90f.js.map} +0 -0
  281. /package/dist/q2-tecton-elements/{p-63192fac.entry.js.map → p-da7fc914.entry.js.map} +0 -0
  282. /package/dist/q2-tecton-elements/{p-b376c111.entry.js.map → p-e47dbfbe.entry.js.map} +0 -0
  283. /package/dist/q2-tecton-elements/{p-a214077c.entry.js.map → p-e4a2469f.entry.js.map} +0 -0
  284. /package/dist/types/workspace/workspace/{tecton-production_release_1.45.x → _Gitlab_tecton-production_master}/packages/q2-tecton-elements/.stencil/test/elements/q2-detail/slot-component.d.ts +0 -0
  285. /package/dist/types/workspace/workspace/{tecton-production_release_1.45.x → _Gitlab_tecton-production_master}/packages/q2-tecton-elements/.stencil/test/helpers.d.ts +0 -0
@@ -46,6 +46,7 @@ export declare class Q2Carousel implements ComponentInterface {
46
46
  get realIndex(): number;
47
47
  get paginationBtns(): NodeListOf<HTMLButtonElement>;
48
48
  get activeCarouselOptions(): SwiperOptions;
49
+ get activePane(): HTMLElement;
49
50
  get dynamicPaginationDots(): boolean;
50
51
  get paneCollection(): NodeListOf<Element>;
51
52
  get paneArray(): Element[];
@@ -60,6 +61,7 @@ export declare class Q2Carousel implements ComponentInterface {
60
61
  change: EventEmitter<{
61
62
  index: number;
62
63
  }>;
64
+ handlePopovers: (event: CustomEvent) => void;
63
65
  onMutationObserved: () => void;
64
66
  setCarouselWrapperWidth: () => void;
65
67
  handleSlideChange: (newIndex: number) => void;
@@ -158,6 +158,13 @@ export declare class Q2Input {
158
158
  textHidden: boolean;
159
159
  /** Specifies the field's expeted [input type](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Form_%3Cinput%3E_types), and provides the optimal keyboard on mobile devices. */
160
160
  type: InputType;
161
+ /**
162
+ * Allows for correct semantics of q2-input element when aria-expanded.
163
+ * @private
164
+ * Defaults to undefined
165
+ * Will assign role to combobox when used inside q2-select and q2-calendar.
166
+ */
167
+ _role: 'combobox' | undefined;
161
168
  /**
162
169
  * The value of the input field.
163
170
  * @info
@@ -171,8 +178,8 @@ export declare class Q2Input {
171
178
  *
172
179
  */
173
180
  value: string;
174
- ariaControls: string;
175
181
  ariaOwns: string;
182
+ ariaControls: string;
176
183
  ariaHaspopup: string;
177
184
  ariaExpanded: string;
178
185
  ariaActivedescendant: string;
@@ -196,14 +203,13 @@ export declare class Q2Input {
196
203
  onMutationObserved: () => void;
197
204
  getFormattedValue(value: string, valueChangedFromProperty: boolean): IFormatterValueObject;
198
205
  get ariaAttributes(): {
199
- ariaControls: string;
200
206
  ariaOwns: string;
201
207
  ariaHaspopup: string;
202
208
  ariaExpanded: string;
203
209
  ariaActivedescendant: string;
204
210
  };
205
211
  get hasCustomDisplaySlot(): boolean;
206
- get canClear(): boolean;
212
+ get clearClasses(): string[];
207
213
  get shouldCursorStartAtEnd(): boolean;
208
214
  get shouldCursorStayAtEnd(): boolean;
209
215
  get hasError(): boolean;
@@ -225,6 +231,7 @@ export declare class Q2Input {
225
231
  get stringValue(): string;
226
232
  get canSetSelection(): boolean;
227
233
  get visibilityToggleText(): string;
234
+ get visibilityToggleAriaLabel(): string;
228
235
  formatAndUpdateValueFromProp(): void;
229
236
  get inputMode(): any;
230
237
  manageClearableResizeObserver(clearable?: boolean): void;
@@ -81,9 +81,14 @@ export namespace Components {
81
81
  "value": number;
82
82
  }
83
83
  interface Q2Btn {
84
+ /**
85
+ * @private Role attribute for better semantic accessibility support
86
+ */
87
+ "_role": string;
84
88
  /**
85
89
  * Displays the component in an active state.
86
90
  * @info Only intended for use with the `badge` property.
91
+ * @deprecated
87
92
  */
88
93
  "active": boolean;
89
94
  "ariaControls": string;
@@ -97,6 +102,7 @@ export namespace Components {
97
102
  "ariaSelected": string;
98
103
  /**
99
104
  * Displays the component in a smaller, badge style.
105
+ * @deprecated
100
106
  */
101
107
  "badge": boolean;
102
108
  /**
@@ -139,9 +145,9 @@ export namespace Components {
139
145
  */
140
146
  "loading": boolean;
141
147
  /**
142
- * @deprecated
148
+ * Defines the size of q2-btn, it renders as default size if not provided.
143
149
  */
144
- "size": string;
150
+ "size": 'small' | 'medium' | 'large';
145
151
  "tabIndex": number;
146
152
  /**
147
153
  * The default behavior of the button.
@@ -1074,6 +1080,11 @@ export namespace Components {
1074
1080
  "type": string;
1075
1081
  }
1076
1082
  interface Q2Input {
1083
+ /**
1084
+ * Allows for correct semantics of q2-input element when aria-expanded.
1085
+ * @private Defaults to undefined Will assign role to combobox when used inside q2-select and q2-calendar.
1086
+ */
1087
+ "_role": 'combobox' | undefined;
1077
1088
  "ariaActivedescendant": string;
1078
1089
  "ariaControls": string;
1079
1090
  "ariaExpanded": string;
@@ -1413,6 +1424,10 @@ export namespace Components {
1413
1424
  "type": 'menu' | 'listbox';
1414
1425
  }
1415
1426
  interface Q2Pagination {
1427
+ /**
1428
+ * Indicates the horizontal alignment of children elements
1429
+ */
1430
+ "alignment": string;
1416
1431
  /**
1417
1432
  * Determines whether the component uses the dynamic resizing behavior.
1418
1433
  */
@@ -1434,6 +1449,10 @@ export namespace Components {
1434
1449
  * The total number of records displayed on each page.
1435
1450
  */
1436
1451
  "perPage": number;
1452
+ /**
1453
+ * The list of perPage to operate pagination. e.g.) [10, 25, 50]
1454
+ */
1455
+ "perPageIncrements": number[];
1437
1456
  /**
1438
1457
  * Description of the record type to be displayed alongside the record count.
1439
1458
  */
@@ -1711,6 +1730,10 @@ export namespace Components {
1711
1730
  * @deprecated
1712
1731
  */
1713
1732
  "ariaLabel": string;
1733
+ /**
1734
+ * Renders an icon button when the field is non-empty. Pressing the button clears all input from the field.
1735
+ */
1736
+ "clearable": boolean;
1714
1737
  /**
1715
1738
  * Emulates clicking the `<input>` to hide the popover if it is visible.
1716
1739
  * @testOnly
@@ -3018,9 +3041,14 @@ declare namespace LocalJSX {
3018
3041
  "value"?: number;
3019
3042
  }
3020
3043
  interface Q2Btn {
3044
+ /**
3045
+ * @private Role attribute for better semantic accessibility support
3046
+ */
3047
+ "_role"?: string;
3021
3048
  /**
3022
3049
  * Displays the component in an active state.
3023
3050
  * @info Only intended for use with the `badge` property.
3051
+ * @deprecated
3024
3052
  */
3025
3053
  "active"?: boolean;
3026
3054
  "ariaControls"?: string;
@@ -3034,6 +3062,7 @@ declare namespace LocalJSX {
3034
3062
  "ariaSelected"?: string;
3035
3063
  /**
3036
3064
  * Displays the component in a smaller, badge style.
3065
+ * @deprecated
3037
3066
  */
3038
3067
  "badge"?: boolean;
3039
3068
  /**
@@ -3076,9 +3105,9 @@ declare namespace LocalJSX {
3076
3105
  */
3077
3106
  "loading"?: boolean;
3078
3107
  /**
3079
- * @deprecated
3108
+ * Defines the size of q2-btn, it renders as default size if not provided.
3080
3109
  */
3081
- "size"?: string;
3110
+ "size"?: 'small' | 'medium' | 'large';
3082
3111
  "tabIndex"?: number;
3083
3112
  /**
3084
3113
  * The default behavior of the button.
@@ -4037,6 +4066,11 @@ declare namespace LocalJSX {
4037
4066
  "type"?: string;
4038
4067
  }
4039
4068
  interface Q2Input {
4069
+ /**
4070
+ * Allows for correct semantics of q2-input element when aria-expanded.
4071
+ * @private Defaults to undefined Will assign role to combobox when used inside q2-select and q2-calendar.
4072
+ */
4073
+ "_role"?: 'combobox' | undefined;
4040
4074
  "ariaActivedescendant"?: string;
4041
4075
  "ariaControls"?: string;
4042
4076
  "ariaExpanded"?: string;
@@ -4395,6 +4429,10 @@ declare namespace LocalJSX {
4395
4429
  "type"?: 'menu' | 'listbox';
4396
4430
  }
4397
4431
  interface Q2Pagination {
4432
+ /**
4433
+ * Indicates the horizontal alignment of children elements
4434
+ */
4435
+ "alignment"?: string;
4398
4436
  /**
4399
4437
  * Determines whether the component uses the dynamic resizing behavior.
4400
4438
  */
@@ -4421,6 +4459,10 @@ declare namespace LocalJSX {
4421
4459
  * The total number of records displayed on each page.
4422
4460
  */
4423
4461
  "perPage"?: number;
4462
+ /**
4463
+ * The list of perPage to operate pagination. e.g.) [10, 25, 50]
4464
+ */
4465
+ "perPageIncrements"?: number[];
4424
4466
  /**
4425
4467
  * Description of the record type to be displayed alongside the record count.
4426
4468
  */
@@ -4710,6 +4752,10 @@ declare namespace LocalJSX {
4710
4752
  * @deprecated
4711
4753
  */
4712
4754
  "ariaLabel"?: string;
4755
+ /**
4756
+ * Renders an icon button when the field is non-empty. Pressing the button clears all input from the field.
4757
+ */
4758
+ "clearable"?: boolean;
4713
4759
  /**
4714
4760
  * Disables all interaction with the field and leverages the disabled visual style of `q2-input`.
4715
4761
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "q2-tecton-elements",
3
- "version": "1.45.3",
3
+ "version": "1.46.0",
4
4
  "description": "Q2 Tecton Custom Elements",
5
5
  "license": "MIT",
6
6
  "author": "Q2 Tecton Team",
@@ -33,7 +33,7 @@
33
33
  },
34
34
  "dependencies": {
35
35
  "@stencil/core": "4.18.0",
36
- "q2-tecton-common": "1.45.3",
36
+ "q2-tecton-common": "1.46.0",
37
37
  "swiper": "8.4.4"
38
38
  },
39
39
  "devDependencies": {
@@ -54,5 +54,5 @@
54
54
  "typescript": "5.4.5",
55
55
  "typescript-eslint": "^7.11.0"
56
56
  },
57
- "gitHead": "321dc27427d9dd6fe9a699591671c729027c2bd1"
57
+ "gitHead": "b305e9496eddffe68155563daa5773603b8684c8"
58
58
  }
@@ -1 +0,0 @@
1
- {"file":"q2-optgroup.q2-option.entry.cjs.js","mappings":";;;;;;;A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,EAAC,WAAW,GAAG,EAC9CA,kEAAK,KAAK,EAAC,SAAS,IAChBA,oEAAQ,CACN,CACH,EACT;KACL;;;;;;;;","names":["createGuid","h","loc","Host"],"sources":["src/components/q2-optgroup/q2-optgroup.scss?tag=q2-optgroup&encapsulation=shadow","src/components/q2-optgroup/q2-optgroup.tsx","src/components/q2-option/q2-option.scss?tag=q2-option&encapsulation=shadow","src/components/q2-option/q2-option.tsx"],"sourcesContent":["@import '../../styles/host.scss';\n@import '../../styles/functions';\n\n:host {\n display: block;\n}\n\n.q2-optgroup-header {\n --comp-header-padding: #{var-list(--tct-scale-1, --app-scale-1x, 5px) var-list(--tct-scale-2, --app-scale-2x, 10px)};\n background: var-list(\n --tct-optgroup-header-background,\n var-prefixer(optgroup-header-bg),\n --tct-gray-13,\n --t-gray-13,\n --tct-gray-l2,\n --app-gray-l2,\n #e6e6e6\n );\n color: var-list(--tct-optgroup-header-color, inherit);\n padding: var-list(var-prefixer(optgroup-header-padding), --comp-header-padding);\n font-weight: var-list(var-prefixer(optgroup-header-font-weight), 600);\n text-transform: var-list(var-prefixer(optgroup-header-text-transform), uppercase);\n position: sticky;\n top: calc(var(--comp-popover-top-container-height, 0px) + var-list(var-prefixer(optgroup-top), 0px));\n z-index: 5; // Keeps the optgroup over any hover or focus states\n}\n","import { Component, h, ComponentInterface, Prop, Element, Watch, State } from '@stencil/core';\nimport { createGuid, loc } from 'src/utils';\n\n@Component({ tag: 'q2-optgroup', shadow: true, styleUrl: 'q2-optgroup.scss' })\nexport class Q2Optgroup implements ComponentInterface {\n /** Serves as the group header text. */\n @Prop({ reflect: true }) disabled: boolean = false;\n\n /** Determines whether all nested options are disabled. */\n @Prop({ reflect: true }) label: string;\n\n @Element() hostElement: HTMLElement;\n @State() hidden: boolean = false;\n guid: number = createGuid();\n mutationObserver: MutationObserver;\n\n /// LIFECYCLE HOOKS ///\n\n componentWillLoad() {\n const observer = new MutationObserver(this.setHidden);\n observer.observe(this.hostElement, { childList: true, attributes: true, subtree: true });\n this.mutationObserver = observer;\n\n // set initially\n this.setHidden();\n this.disabledWatcher(this.disabled);\n }\n\n disconnectedCallback() {\n this.mutationObserver.disconnect();\n this.mutationObserver = null;\n }\n\n setHidden = () => {\n this.hidden = this.options.every(opt => opt.hidden || opt._multiSelectHidden);\n };\n\n get headerId() {\n return `q2-optgroup-header-${this.guid}`;\n }\n\n get options() {\n return Array.from(this.hostElement.querySelectorAll('q2-option'));\n }\n\n ///// OBSERVERS ///////\n\n @Watch('disabled')\n disabledWatcher(disabled: boolean) {\n this.options.forEach(opt => {\n opt.disabledGroup = !!disabled;\n });\n }\n\n render() {\n return (\n <div\n class=\"q2-optgroup-container\"\n hidden={this.hidden}\n aria-labelledby={this.headerId}\n role=\"group\"\n >\n <div\n class=\"q2-optgroup-header\"\n id={this.headerId}\n >\n {(this.label && loc(this.label)) || ''}\n </div>\n <div class=\"q2-optgroup-options\">\n <slot />\n </div>\n </div>\n );\n }\n}\n","@import '../../styles/host.scss';\n@import '../../styles/functions';\n\n:host {\n --comp-padding: #{0 var-list(--app-scale-2x, 10px)};\n --comp-selected-icon-size: #{var-list(var-prefixer(option-selected-icon-size), --tct-scale-3, --app-scale-3x, 15px)};\n padding: var-list(var-prefixer(option-padding), --comp-padding);\n min-height: 44px;\n align-items: center;\n cursor: pointer;\n grid-template-columns:\n var(--comp-selected-icon-size)\n 1fr;\n align-items: center;\n grid-template-areas: 'icon content';\n gap: var-list(--tct-scale-1, --app-scale-1x, 5px);\n}\n\n:host(:focus),\n:host(:hover),\n:host([active]) {\n position: relative;\n z-index: 1; // Puts the option above any scroll shadows on the `q2-action-sheet`\n}\n\n:host([multiline]) {\n --comp-padding: #{var-list(--app-scale-2, 10px) var-list(--app-scale-2, 10px)};\n --comp-selected-icon-size: #{var-list(\n var-prefixer(option-selected-multiline-icon-size),\n var-prefixer(option-selected-icon-size),\n 26px\n )};\n}\n\n:host([_no-select]) {\n grid-template-columns: 1fr;\n grid-template-areas: 'content';\n}\n\n:host([aria-disabled]) {\n cursor: not-allowed;\n opacity: var-list(--tct-disabled-opacity, --app-disabled-opacity, 0.4);\n pointer-events: none;\n}\n\n:host([aria-hidden]) {\n display: none;\n}\n\n:host(:not([hidden]):not([aria-hidden])) {\n display: grid;\n}\n\n:host(:not([aria-disabled]):hover),\n:host([active]),\n:host(:focus) {\n background: var-list(\n --tct-option-active-background,\n --tct-option-active-bg,\n --tct-gray-14,\n --t-gray-14,\n --tct-gray-l3,\n --app-gray-l3,\n #f2f2f2\n );\n color: var(--tct-option-active-color, inherit);\n}\n\n:host(:focus) {\n box-shadow: var-list(\n --tct-option-focus-box-shadow,\n unquote('inset var(--const-global-focus, 0 0 0 2px var(--const-focus-color, #0066CC))')\n ) !important;\n}\n\nq2-icon {\n grid-area: icon;\n --tct-icon-size: var(--comp-selected-icon-size);\n}\n\n.content {\n display: block;\n grid-area: content;\n\n :host(:not([multiline])) & {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n}\n","import { Component, Prop, h, Element, ComponentInterface, Host, Event, EventEmitter } from '@stencil/core';\n\n@Component({ tag: 'q2-option', shadow: true, styleUrl: 'q2-option.scss' })\nexport class Q2Option implements ComponentInterface {\n /**\n * Used by q2-option-list to set a role on the option\n * @type {('option' | 'menuitem')}\n * @private\n */\n @Prop({ reflect: true }) role: string = 'option';\n\n /** Disables the option. */\n @Prop({ reflect: true }) disabled: boolean;\n\n /** The text that is presented in the field when selected. If not set, the text inside the element will be used. */\n @Prop({ mutable: true }) display: string;\n\n /** Serves as the option's value. */\n @Prop({ reflect: true }) value: string;\n\n /**\n * Used by consuming elements to disable all options in the group\n * @private\n */\n @Prop({ reflect: true }) disabledGroup: boolean;\n /**\n * Used by q2-option-list to indicate the option is selected\n * @private\n */\n @Prop({ reflect: true }) selected: boolean;\n /**\n * Used by consuming elements to enable multiline content support\n * @private\n */\n @Prop({ reflect: true }) multiline: boolean;\n /**\n * Used by q2-option-list to indicate the option is active\n * @private\n */\n @Prop({ reflect: true }) active: boolean;\n @Prop({ reflect: true, attribute: '_multiSelectHidden' }) _multiSelectHidden: boolean = false;\n\n @Element() hostElement: HTMLElement;\n\n /**\n * Used by consuming elements to indicate the display value of the option has changed.\n * @private\n */\n @Event() displayChanged: EventEmitter<{ value: string; display: string }>;\n\n mutationObserver: MutationObserver;\n\n componentWillLoad() {\n this.initDisplay();\n }\n\n componentDidLoad() {\n const observer = new MutationObserver(this.mutationHandler);\n observer.observe(this.hostElement, { childList: true, subtree: true, attributes: true, characterData: true });\n this.mutationObserver = observer;\n }\n\n initDisplay() {\n if (this.multiline) return;\n if (this.display && !this.hostElement?.textContent?.trim()) {\n this.hostElement.textContent = this.display;\n } else if (!this.display && this.hostElement.textContent.trim()) {\n this.display = this.hostElement.textContent.trim();\n }\n }\n\n mutationHandler = (mutations: MutationRecord[]) => {\n const display = (this.display || '').trim();\n const textContent = (this.hostElement?.textContent || '').trim();\n if (display === textContent || this.multiline) return;\n for (const mut of mutations) {\n if (mut.type === 'childList' || mut.type === 'characterData') {\n this.display = textContent;\n } else if (mut.type === 'attributes' && mut.attributeName === 'display') {\n this.hostElement.textContent = display;\n }\n }\n if (this.hostElement.ariaSelected) this.displayChanged.emit({ display: this.display, value: this.value });\n };\n\n render() {\n const { disabled, disabledGroup, selected, _multiSelectHidden } = this;\n const isDisabled = disabled || disabledGroup;\n\n return (\n <Host\n tabindex=\"-1\"\n aria-disabled={isDisabled ? 'true' : undefined}\n aria-selected={`${!!selected}`}\n aria-hidden={_multiSelectHidden ? 'true' : undefined}\n display={this.display}\n >\n {this.selected && <q2-icon type=\"checkmark\" />}\n <div class=\"content\">\n <slot />\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
@@ -1 +0,0 @@
1
- {"file":"q2-optgroup.q2-option.entry.js","mappings":";;;AAAA,MAAM,aAAa,GAAG,k+CAAk+C,CAAC;AACz/C,yBAAe,aAAa;;MCGf,UAAU;;;QASnB,SAAI,GAAW,UAAU,EAAE,CAAC;QAoB5B,cAA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tag=q2-optgroup&encapsulation=shadow","src/components/q2-optgroup/q2-optgroup.tsx","src/components/q2-option/q2-option.scss?tag=q2-option&encapsulation=shadow","src/components/q2-option/q2-option.tsx"],"sourcesContent":["@import '../../styles/host.scss';\n@import '../../styles/functions';\n\n:host {\n display: block;\n}\n\n.q2-optgroup-header {\n --comp-header-padding: #{var-list(--tct-scale-1, --app-scale-1x, 5px) var-list(--tct-scale-2, --app-scale-2x, 10px)};\n background: var-list(\n --tct-optgroup-header-background,\n var-prefixer(optgroup-header-bg),\n --tct-gray-13,\n --t-gray-13,\n --tct-gray-l2,\n --app-gray-l2,\n #e6e6e6\n );\n color: var-list(--tct-optgroup-header-color, inherit);\n padding: var-list(var-prefixer(optgroup-header-padding), --comp-header-padding);\n font-weight: var-list(var-prefixer(optgroup-header-font-weight), 600);\n text-transform: var-list(var-prefixer(optgroup-header-text-transform), uppercase);\n position: sticky;\n top: calc(var(--comp-popover-top-container-height, 0px) + var-list(var-prefixer(optgroup-top), 0px));\n z-index: 5; // Keeps the optgroup over any hover or focus states\n}\n","import { Component, h, ComponentInterface, Prop, Element, Watch, State } from '@stencil/core';\nimport { createGuid, loc } from 'src/utils';\n\n@Component({ tag: 'q2-optgroup', shadow: true, styleUrl: 'q2-optgroup.scss' })\nexport class Q2Optgroup implements ComponentInterface {\n /** Serves as the group header text. */\n @Prop({ reflect: true }) disabled: boolean = false;\n\n /** Determines whether all nested options are disabled. */\n @Prop({ reflect: true }) label: string;\n\n @Element() hostElement: HTMLElement;\n @State() hidden: boolean = false;\n guid: number = createGuid();\n mutationObserver: MutationObserver;\n\n /// LIFECYCLE HOOKS ///\n\n componentWillLoad() {\n const observer = new MutationObserver(this.setHidden);\n observer.observe(this.hostElement, { childList: true, attributes: true, subtree: true });\n this.mutationObserver = observer;\n\n // set initially\n this.setHidden();\n this.disabledWatcher(this.disabled);\n }\n\n disconnectedCallback() {\n this.mutationObserver.disconnect();\n this.mutationObserver = null;\n }\n\n setHidden = () => {\n this.hidden = this.options.every(opt => opt.hidden || opt._multiSelectHidden);\n };\n\n get headerId() {\n return `q2-optgroup-header-${this.guid}`;\n }\n\n get options() {\n return Array.from(this.hostElement.querySelectorAll('q2-option'));\n }\n\n ///// OBSERVERS ///////\n\n @Watch('disabled')\n disabledWatcher(disabled: boolean) {\n this.options.forEach(opt => {\n opt.disabledGroup = !!disabled;\n });\n }\n\n render() {\n return (\n <div\n class=\"q2-optgroup-container\"\n hidden={this.hidden}\n aria-labelledby={this.headerId}\n role=\"group\"\n >\n <div\n class=\"q2-optgroup-header\"\n id={this.headerId}\n >\n {(this.label && loc(this.label)) || ''}\n </div>\n <div class=\"q2-optgroup-options\">\n <slot />\n </div>\n </div>\n );\n }\n}\n","@import '../../styles/host.scss';\n@import '../../styles/functions';\n\n:host {\n --comp-padding: #{0 var-list(--app-scale-2x, 10px)};\n --comp-selected-icon-size: #{var-list(var-prefixer(option-selected-icon-size), --tct-scale-3, --app-scale-3x, 15px)};\n padding: var-list(var-prefixer(option-padding), --comp-padding);\n min-height: 44px;\n align-items: center;\n cursor: pointer;\n grid-template-columns:\n var(--comp-selected-icon-size)\n 1fr;\n align-items: center;\n grid-template-areas: 'icon content';\n gap: var-list(--tct-scale-1, --app-scale-1x, 5px);\n}\n\n:host(:focus),\n:host(:hover),\n:host([active]) {\n position: relative;\n z-index: 1; // Puts the option above any scroll shadows on the `q2-action-sheet`\n}\n\n:host([multiline]) {\n --comp-padding: #{var-list(--app-scale-2, 10px) var-list(--app-scale-2, 10px)};\n --comp-selected-icon-size: #{var-list(\n var-prefixer(option-selected-multiline-icon-size),\n var-prefixer(option-selected-icon-size),\n 26px\n )};\n}\n\n:host([_no-select]) {\n grid-template-columns: 1fr;\n grid-template-areas: 'content';\n}\n\n:host([aria-disabled]) {\n cursor: not-allowed;\n opacity: var-list(--tct-disabled-opacity, --app-disabled-opacity, 0.4);\n pointer-events: none;\n}\n\n:host([aria-hidden]) {\n display: none;\n}\n\n:host(:not([hidden]):not([aria-hidden])) {\n display: grid;\n}\n\n:host(:not([aria-disabled]):hover),\n:host([active]),\n:host(:focus) {\n background: var-list(\n --tct-option-active-background,\n --tct-option-active-bg,\n --tct-gray-14,\n --t-gray-14,\n --tct-gray-l3,\n --app-gray-l3,\n #f2f2f2\n );\n color: var(--tct-option-active-color, inherit);\n}\n\n:host(:focus) {\n box-shadow: var-list(\n --tct-option-focus-box-shadow,\n unquote('inset var(--const-global-focus, 0 0 0 2px var(--const-focus-color, #0066CC))')\n ) !important;\n}\n\nq2-icon {\n grid-area: icon;\n --tct-icon-size: var(--comp-selected-icon-size);\n}\n\n.content {\n display: block;\n grid-area: content;\n\n :host(:not([multiline])) & {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n}\n","import { Component, Prop, h, Element, ComponentInterface, Host, Event, EventEmitter } from '@stencil/core';\n\n@Component({ tag: 'q2-option', shadow: true, styleUrl: 'q2-option.scss' })\nexport class Q2Option implements ComponentInterface {\n /**\n * Used by q2-option-list to set a role on the option\n * @type {('option' | 'menuitem')}\n * @private\n */\n @Prop({ reflect: true }) role: string = 'option';\n\n /** Disables the option. */\n @Prop({ reflect: true }) disabled: boolean;\n\n /** The text that is presented in the field when selected. If not set, the text inside the element will be used. */\n @Prop({ mutable: true }) display: string;\n\n /** Serves as the option's value. */\n @Prop({ reflect: true }) value: string;\n\n /**\n * Used by consuming elements to disable all options in the group\n * @private\n */\n @Prop({ reflect: true }) disabledGroup: boolean;\n /**\n * Used by q2-option-list to indicate the option is selected\n * @private\n */\n @Prop({ reflect: true }) selected: boolean;\n /**\n * Used by consuming elements to enable multiline content support\n * @private\n */\n @Prop({ reflect: true }) multiline: boolean;\n /**\n * Used by q2-option-list to indicate the option is active\n * @private\n */\n @Prop({ reflect: true }) active: boolean;\n @Prop({ reflect: true, attribute: '_multiSelectHidden' }) _multiSelectHidden: boolean = false;\n\n @Element() hostElement: HTMLElement;\n\n /**\n * Used by consuming elements to indicate the display value of the option has changed.\n * @private\n */\n @Event() displayChanged: EventEmitter<{ value: string; display: string }>;\n\n mutationObserver: MutationObserver;\n\n componentWillLoad() {\n this.initDisplay();\n }\n\n componentDidLoad() {\n const observer = new MutationObserver(this.mutationHandler);\n observer.observe(this.hostElement, { childList: true, subtree: true, attributes: true, characterData: true });\n this.mutationObserver = observer;\n }\n\n initDisplay() {\n if (this.multiline) return;\n if (this.display && !this.hostElement?.textContent?.trim()) {\n this.hostElement.textContent = this.display;\n } else if (!this.display && this.hostElement.textContent.trim()) {\n this.display = this.hostElement.textContent.trim();\n }\n }\n\n mutationHandler = (mutations: MutationRecord[]) => {\n const display = (this.display || '').trim();\n const textContent = (this.hostElement?.textContent || '').trim();\n if (display === textContent || this.multiline) return;\n for (const mut of mutations) {\n if (mut.type === 'childList' || mut.type === 'characterData') {\n this.display = textContent;\n } else if (mut.type === 'attributes' && mut.attributeName === 'display') {\n this.hostElement.textContent = display;\n }\n }\n if (this.hostElement.ariaSelected) this.displayChanged.emit({ display: this.display, value: this.value });\n };\n\n render() {\n const { disabled, disabledGroup, selected, _multiSelectHidden } = this;\n const isDisabled = disabled || disabledGroup;\n\n return (\n <Host\n tabindex=\"-1\"\n aria-disabled={isDisabled ? 'true' : undefined}\n aria-selected={`${!!selected}`}\n aria-hidden={_multiSelectHidden ? 'true' : undefined}\n display={this.display}\n >\n {this.selected && <q2-icon type=\"checkmark\" />}\n <div class=\"content\">\n <slot />\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
@@ -1,2 +0,0 @@
1
- import{r as t,h as e,g as i,c as o,H as a}from"./p-a5f18e27.js";import{c as s,l as r}from"./p-42302f6f.js";const n="*{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{display:block}.q2-optgroup-header{--comp-header-padding:var(--tct-scale-1, var(--app-scale-1x, 5px)) var(--tct-scale-2, var(--app-scale-2x, 10px));background:var(--tct-optgroup-header-background, var(--tct-optgroup-header-bg, var(--t-optgroup-header-bg, var(--tct-gray-13, var(--t-gray-13, var(--tct-gray-l2, var(--app-gray-l2, #e6e6e6)))))));color:var(--tct-optgroup-header-color, inherit);padding:var(--tct-optgroup-header-padding, var(--t-optgroup-header-padding, var(--comp-header-padding)));font-weight:var(--tct-optgroup-header-font-weight, var(--t-optgroup-header-font-weight, 600));text-transform:var(--tct-optgroup-header-text-transform, var(--t-optgroup-header-text-transform, uppercase));position:sticky;top:calc(var(--comp-popover-top-container-height, 0px) + var(--tct-optgroup-top, var(--t-optgroup-top, 0px)));z-index:5}";const d=n;const c=class{constructor(e){t(this,e);this.guid=s();this.setHidden=()=>{this.hidden=this.options.every((t=>t.hidden||t._multiSelectHidden))};this.disabled=false;this.label=undefined;this.hidden=false}componentWillLoad(){const t=new MutationObserver(this.setHidden);t.observe(this.hostElement,{childList:true,attributes:true,subtree:true});this.mutationObserver=t;this.setHidden();this.disabledWatcher(this.disabled)}disconnectedCallback(){this.mutationObserver.disconnect();this.mutationObserver=null}get headerId(){return`q2-optgroup-header-${this.guid}`}get options(){return Array.from(this.hostElement.querySelectorAll("q2-option"))}disabledWatcher(t){this.options.forEach((e=>{e.disabledGroup=!!t}))}render(){return e("div",{key:"f90275607d9a96d441d38a0580ce1b93e662634e",class:"q2-optgroup-container",hidden:this.hidden,"aria-labelledby":this.headerId,role:"group"},e("div",{key:"d7ebce6b9dca35f1a41c500942f6b21b6277d7b8",class:"q2-optgroup-header",id:this.headerId},this.label&&r(this.label)||""),e("div",{key:"1f617b24906eb0ebe0e14520a45ae5de2e6757b5",class:"q2-optgroup-options"},e("slot",{key:"b90f24f7d8c10e3289041cb948587436c75a19f2"})))}get hostElement(){return i(this)}static get watchers(){return{disabled:["disabledWatcher"]}}};c.style=d;const p='*{box-sizing:border-box}*:active{outline:none}*:focus{outline:none;box-shadow:var(--const-double-focus-ring, 0 0 0 2px #ffffff, 0 0 0 4px #0066cc)}:host{box-shadow:none !important}::-moz-focus-inner{border:none}input,textarea,button{font-family:inherit;font-size:inherit;font-stretch:inherit}:host(.sr),:host(.sr) button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.sr,.sr button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.hidden{display:none}:host([hidden]){display:none}.invisible{visibility:hidden}:host{--comp-padding:0 var(--app-scale-2x, 10px);--comp-selected-icon-size:var(--tct-option-selected-icon-size, var(--t-option-selected-icon-size, var(--tct-scale-3, var(--app-scale-3x, 15px))));padding:var(--tct-option-padding, var(--t-option-padding, var(--comp-padding)));min-height:44px;align-items:center;cursor:pointer;grid-template-columns:var(--comp-selected-icon-size) 1fr;align-items:center;grid-template-areas:"icon content";gap:var(--tct-scale-1, var(--app-scale-1x, 5px))}:host(:focus),:host(:hover),:host([active]){position:relative;z-index:1}:host([multiline]){--comp-padding:var(--app-scale-2, 10px) var(--app-scale-2, 10px);--comp-selected-icon-size:var(--tct-option-selected-multiline-icon-size, var(--t-option-selected-multiline-icon-size, var(--tct-option-selected-icon-size, var(--t-option-selected-icon-size, 26px))))}:host([_no-select]){grid-template-columns:1fr;grid-template-areas:"content"}:host([aria-disabled]){cursor:not-allowed;opacity:var(--tct-disabled-opacity, var(--app-disabled-opacity, 0.4));pointer-events:none}:host([aria-hidden]){display:none}:host(:not([hidden]):not([aria-hidden])){display:grid}:host(:not([aria-disabled]):hover),:host([active]),:host(:focus){background:var(--tct-option-active-background, var(--tct-option-active-bg, var(--tct-gray-14, var(--t-gray-14, var(--tct-gray-l3, var(--app-gray-l3, #f2f2f2))))));color:var(--tct-option-active-color, inherit)}:host(:focus){box-shadow:var(--tct-option-focus-box-shadow, inset var(--const-global-focus, 0 0 0 2px var(--const-focus-color, #0066CC))) !important}q2-icon{grid-area:icon;--tct-icon-size:var(--comp-selected-icon-size)}.content{display:block;grid-area:content}:host(:not([multiline])) .content{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}';const h=p;const l=class{constructor(e){t(this,e);this.displayChanged=o(this,"displayChanged",7);this.mutationHandler=t=>{var e;const i=(this.display||"").trim();const o=(((e=this.hostElement)===null||e===void 0?void 0:e.textContent)||"").trim();if(i===o||this.multiline)return;for(const e of t){if(e.type==="childList"||e.type==="characterData"){this.display=o}else if(e.type==="attributes"&&e.attributeName==="display"){this.hostElement.textContent=i}}if(this.hostElement.ariaSelected)this.displayChanged.emit({display:this.display,value:this.value})};this.role="option";this.disabled=undefined;this.display=undefined;this.value=undefined;this.disabledGroup=undefined;this.selected=undefined;this.multiline=undefined;this.active=undefined;this._multiSelectHidden=false}componentWillLoad(){this.initDisplay()}componentDidLoad(){const t=new MutationObserver(this.mutationHandler);t.observe(this.hostElement,{childList:true,subtree:true,attributes:true,characterData:true});this.mutationObserver=t}initDisplay(){var t,e;if(this.multiline)return;if(this.display&&!((e=(t=this.hostElement)===null||t===void 0?void 0:t.textContent)===null||e===void 0?void 0:e.trim())){this.hostElement.textContent=this.display}else if(!this.display&&this.hostElement.textContent.trim()){this.display=this.hostElement.textContent.trim()}}render(){const{disabled:t,disabledGroup:i,selected:o,_multiSelectHidden:s}=this;const r=t||i;return e(a,{key:"b6ca0e5f1a15c594a6577769c7549369573541bd",tabindex:"-1","aria-disabled":r?"true":undefined,"aria-selected":`${!!o}`,"aria-hidden":s?"true":undefined,display:this.display},this.selected&&e("q2-icon",{key:"d4ddab403a45207e8f7e1c2b3611fd9ad5eafa52",type:"checkmark"}),e("div",{key:"4d10f04c3cc686a21f7e6e5d19106b61af89f6f2",class:"content"},e("slot",{key:"2290b5fe8bbce6a3cb64c70d31df2376d51dd129"})))}get hostElement(){return i(this)}};l.style=h;export{c as q2_optgroup,l as q2_option};
2
- //# sourceMappingURL=p-1c17d118.entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["q2OptgroupCss","Q2OptgroupStyle0","Q2Optgroup","this","guid","createGuid","setHidden","hidden","options","every","opt","_multiSelectHidden","componentWillLoad","observer","MutationObserver","observe","hostElement","childList","attributes","subtree","mutationObserver","disabledWatcher","disabled","disconnectedCallback","disconnect","headerId","Array","from","querySelectorAll","forEach","disabledGroup","render","h","key","class","role","id","label","loc","q2OptionCss","Q2OptionStyle0","Q2Option","mutationHandler","mutations","display","trim","textContent","_a","multiline","mut","type","attributeName","ariaSelected","displayChanged","emit","value","initDisplay","componentDidLoad","characterData","_b","selected","isDisabled","Host","tabindex","undefined"],"sources":["src/components/q2-optgroup/q2-optgroup.scss?tag=q2-optgroup&encapsulation=shadow","src/components/q2-optgroup/q2-optgroup.tsx","src/components/q2-option/q2-option.scss?tag=q2-option&encapsulation=shadow","src/components/q2-option/q2-option.tsx"],"sourcesContent":["@import '../../styles/host.scss';\n@import '../../styles/functions';\n\n:host {\n display: block;\n}\n\n.q2-optgroup-header {\n --comp-header-padding: #{var-list(--tct-scale-1, --app-scale-1x, 5px) var-list(--tct-scale-2, --app-scale-2x, 10px)};\n background: var-list(\n --tct-optgroup-header-background,\n var-prefixer(optgroup-header-bg),\n --tct-gray-13,\n --t-gray-13,\n --tct-gray-l2,\n --app-gray-l2,\n #e6e6e6\n );\n color: var-list(--tct-optgroup-header-color, inherit);\n padding: var-list(var-prefixer(optgroup-header-padding), --comp-header-padding);\n font-weight: var-list(var-prefixer(optgroup-header-font-weight), 600);\n text-transform: var-list(var-prefixer(optgroup-header-text-transform), uppercase);\n position: sticky;\n top: calc(var(--comp-popover-top-container-height, 0px) + var-list(var-prefixer(optgroup-top), 0px));\n z-index: 5; // Keeps the optgroup over any hover or focus states\n}\n","import { Component, h, ComponentInterface, Prop, Element, Watch, State } from '@stencil/core';\nimport { createGuid, loc } from 'src/utils';\n\n@Component({ tag: 'q2-optgroup', shadow: true, styleUrl: 'q2-optgroup.scss' })\nexport class Q2Optgroup implements ComponentInterface {\n /** Serves as the group header text. */\n @Prop({ reflect: true }) disabled: boolean = false;\n\n /** Determines whether all nested options are disabled. */\n @Prop({ reflect: true }) label: string;\n\n @Element() hostElement: HTMLElement;\n @State() hidden: boolean = false;\n guid: number = createGuid();\n mutationObserver: MutationObserver;\n\n /// LIFECYCLE HOOKS ///\n\n componentWillLoad() {\n const observer = new MutationObserver(this.setHidden);\n observer.observe(this.hostElement, { childList: true, attributes: true, subtree: true });\n this.mutationObserver = observer;\n\n // set initially\n this.setHidden();\n this.disabledWatcher(this.disabled);\n }\n\n disconnectedCallback() {\n this.mutationObserver.disconnect();\n this.mutationObserver = null;\n }\n\n setHidden = () => {\n this.hidden = this.options.every(opt => opt.hidden || opt._multiSelectHidden);\n };\n\n get headerId() {\n return `q2-optgroup-header-${this.guid}`;\n }\n\n get options() {\n return Array.from(this.hostElement.querySelectorAll('q2-option'));\n }\n\n ///// OBSERVERS ///////\n\n @Watch('disabled')\n disabledWatcher(disabled: boolean) {\n this.options.forEach(opt => {\n opt.disabledGroup = !!disabled;\n });\n }\n\n render() {\n return (\n <div\n class=\"q2-optgroup-container\"\n hidden={this.hidden}\n aria-labelledby={this.headerId}\n role=\"group\"\n >\n <div\n class=\"q2-optgroup-header\"\n id={this.headerId}\n >\n {(this.label && loc(this.label)) || ''}\n </div>\n <div class=\"q2-optgroup-options\">\n <slot />\n </div>\n </div>\n );\n }\n}\n","@import '../../styles/host.scss';\n@import '../../styles/functions';\n\n:host {\n --comp-padding: #{0 var-list(--app-scale-2x, 10px)};\n --comp-selected-icon-size: #{var-list(var-prefixer(option-selected-icon-size), --tct-scale-3, --app-scale-3x, 15px)};\n padding: var-list(var-prefixer(option-padding), --comp-padding);\n min-height: 44px;\n align-items: center;\n cursor: pointer;\n grid-template-columns:\n var(--comp-selected-icon-size)\n 1fr;\n align-items: center;\n grid-template-areas: 'icon content';\n gap: var-list(--tct-scale-1, --app-scale-1x, 5px);\n}\n\n:host(:focus),\n:host(:hover),\n:host([active]) {\n position: relative;\n z-index: 1; // Puts the option above any scroll shadows on the `q2-action-sheet`\n}\n\n:host([multiline]) {\n --comp-padding: #{var-list(--app-scale-2, 10px) var-list(--app-scale-2, 10px)};\n --comp-selected-icon-size: #{var-list(\n var-prefixer(option-selected-multiline-icon-size),\n var-prefixer(option-selected-icon-size),\n 26px\n )};\n}\n\n:host([_no-select]) {\n grid-template-columns: 1fr;\n grid-template-areas: 'content';\n}\n\n:host([aria-disabled]) {\n cursor: not-allowed;\n opacity: var-list(--tct-disabled-opacity, --app-disabled-opacity, 0.4);\n pointer-events: none;\n}\n\n:host([aria-hidden]) {\n display: none;\n}\n\n:host(:not([hidden]):not([aria-hidden])) {\n display: grid;\n}\n\n:host(:not([aria-disabled]):hover),\n:host([active]),\n:host(:focus) {\n background: var-list(\n --tct-option-active-background,\n --tct-option-active-bg,\n --tct-gray-14,\n --t-gray-14,\n --tct-gray-l3,\n --app-gray-l3,\n #f2f2f2\n );\n color: var(--tct-option-active-color, inherit);\n}\n\n:host(:focus) {\n box-shadow: var-list(\n --tct-option-focus-box-shadow,\n unquote('inset var(--const-global-focus, 0 0 0 2px var(--const-focus-color, #0066CC))')\n ) !important;\n}\n\nq2-icon {\n grid-area: icon;\n --tct-icon-size: var(--comp-selected-icon-size);\n}\n\n.content {\n display: block;\n grid-area: content;\n\n :host(:not([multiline])) & {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n}\n","import { Component, Prop, h, Element, ComponentInterface, Host, Event, EventEmitter } from '@stencil/core';\n\n@Component({ tag: 'q2-option', shadow: true, styleUrl: 'q2-option.scss' })\nexport class Q2Option implements ComponentInterface {\n /**\n * Used by q2-option-list to set a role on the option\n * @type {('option' | 'menuitem')}\n * @private\n */\n @Prop({ reflect: true }) role: string = 'option';\n\n /** Disables the option. */\n @Prop({ reflect: true }) disabled: boolean;\n\n /** The text that is presented in the field when selected. If not set, the text inside the element will be used. */\n @Prop({ mutable: true }) display: string;\n\n /** Serves as the option's value. */\n @Prop({ reflect: true }) value: string;\n\n /**\n * Used by consuming elements to disable all options in the group\n * @private\n */\n @Prop({ reflect: true }) disabledGroup: boolean;\n /**\n * Used by q2-option-list to indicate the option is selected\n * @private\n */\n @Prop({ reflect: true }) selected: boolean;\n /**\n * Used by consuming elements to enable multiline content support\n * @private\n */\n @Prop({ reflect: true }) multiline: boolean;\n /**\n * Used by q2-option-list to indicate the option is active\n * @private\n */\n @Prop({ reflect: true }) active: boolean;\n @Prop({ reflect: true, attribute: '_multiSelectHidden' }) _multiSelectHidden: boolean = false;\n\n @Element() hostElement: HTMLElement;\n\n /**\n * Used by consuming elements to indicate the display value of the option has changed.\n * @private\n */\n @Event() displayChanged: EventEmitter<{ value: string; display: string }>;\n\n mutationObserver: MutationObserver;\n\n componentWillLoad() {\n this.initDisplay();\n }\n\n componentDidLoad() {\n const observer = new MutationObserver(this.mutationHandler);\n observer.observe(this.hostElement, { childList: true, subtree: true, attributes: true, characterData: true });\n this.mutationObserver = observer;\n }\n\n initDisplay() {\n if (this.multiline) return;\n if (this.display && !this.hostElement?.textContent?.trim()) {\n this.hostElement.textContent = this.display;\n } else if (!this.display && this.hostElement.textContent.trim()) {\n this.display = this.hostElement.textContent.trim();\n }\n }\n\n mutationHandler = (mutations: MutationRecord[]) => {\n const display = (this.display || '').trim();\n const textContent = (this.hostElement?.textContent || '').trim();\n if (display === textContent || this.multiline) return;\n for (const mut of mutations) {\n if (mut.type === 'childList' || mut.type === 'characterData') {\n this.display = textContent;\n } else if (mut.type === 'attributes' && mut.attributeName === 'display') {\n this.hostElement.textContent = display;\n }\n }\n if (this.hostElement.ariaSelected) this.displayChanged.emit({ display: this.display, value: this.value });\n };\n\n render() {\n const { disabled, disabledGroup, selected, _multiSelectHidden } = this;\n const isDisabled = disabled || disabledGroup;\n\n return (\n <Host\n tabindex=\"-1\"\n aria-disabled={isDisabled ? 'true' : undefined}\n aria-selected={`${!!selected}`}\n aria-hidden={_multiSelectHidden ? 'true' : undefined}\n display={this.display}\n >\n {this.selected && <q2-icon type=\"checkmark\" />}\n <div class=\"content\">\n <slot />\n </div>\n </Host>\n );\n }\n}\n"],"mappings":"2GAAA,MAAMA,EAAgB,m+CACtB,MAAAC,EAAeD,E,MCGFE,EAAU,M,yBASnBC,KAAAC,KAAeC,IAoBfF,KAAAG,UAAY,KACRH,KAAKI,OAASJ,KAAKK,QAAQC,OAAMC,GAAOA,EAAIH,QAAUG,EAAIC,oBAAmB,E,cA5BpC,M,iCAMlB,K,CAM3B,iBAAAC,GACI,MAAMC,EAAW,IAAIC,iBAAiBX,KAAKG,WAC3CO,EAASE,QAAQZ,KAAKa,YAAa,CAAEC,UAAW,KAAMC,WAAY,KAAMC,QAAS,OACjFhB,KAAKiB,iBAAmBP,EAGxBV,KAAKG,YACLH,KAAKkB,gBAAgBlB,KAAKmB,S,CAG9B,oBAAAC,GACIpB,KAAKiB,iBAAiBI,aACtBrB,KAAKiB,iBAAmB,I,CAO5B,YAAIK,GACA,MAAO,sBAAsBtB,KAAKC,M,CAGtC,WAAII,GACA,OAAOkB,MAAMC,KAAKxB,KAAKa,YAAYY,iBAAiB,a,CAMxD,eAAAP,CAAgBC,GACZnB,KAAKK,QAAQqB,SAAQnB,IACjBA,EAAIoB,gBAAkBR,CAAQ,G,CAItC,MAAAS,GACI,OACIC,EAAA,OAAAC,IAAA,2CACIC,MAAM,wBACN3B,OAAQJ,KAAKI,OAAM,kBACFJ,KAAKsB,SACtBU,KAAK,SAELH,EAAA,OAAAC,IAAA,2CACIC,MAAM,qBACNE,GAAIjC,KAAKsB,UAEPtB,KAAKkC,OAASC,EAAInC,KAAKkC,QAAW,IAExCL,EAAA,OAAAC,IAAA,2CAAKC,MAAM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