q2-tecton-elements 1.51.1 → 1.52.1

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 (613) hide show
  1. package/dist/cjs/click-elsewhere_2.cjs.entry.js +16 -5
  2. package/dist/cjs/click-elsewhere_2.cjs.entry.js.map +1 -1
  3. package/dist/cjs/{index-9aa4a776.js → index-07285783.js} +86 -2
  4. package/dist/cjs/index-07285783.js.map +1 -0
  5. package/dist/cjs/{index-14c3693c.js → index-e7e68b1e.js} +40 -5
  6. package/dist/cjs/index-e7e68b1e.js.map +1 -0
  7. package/dist/cjs/loader.cjs.js +2 -2
  8. package/dist/cjs/q2-action-group.cjs.entry.js +2 -2
  9. package/dist/cjs/q2-action-sheet.cjs.entry.js +3 -3
  10. package/dist/cjs/q2-avatar.cjs.entry.js +2 -2
  11. package/dist/cjs/q2-badge_7.cjs.entry.js +49 -44
  12. package/dist/cjs/q2-badge_7.cjs.entry.js.map +1 -1
  13. package/dist/cjs/q2-calendar.cjs.entry.js +17 -20
  14. package/dist/cjs/q2-calendar.cjs.entry.js.map +1 -1
  15. package/dist/cjs/q2-card.cjs.entry.js +4 -2
  16. package/dist/cjs/q2-card.cjs.entry.js.map +1 -1
  17. package/dist/cjs/q2-carousel-pane.cjs.entry.js +4 -4
  18. package/dist/cjs/q2-carousel.cjs.entry.js +2 -2
  19. package/dist/cjs/q2-chart-area.cjs.entry.js +16 -3
  20. package/dist/cjs/q2-chart-area.cjs.entry.js.map +1 -1
  21. package/dist/cjs/q2-chart-bar.cjs.entry.js +3 -3
  22. package/dist/cjs/q2-chart-donut.cjs.entry.js +19 -3
  23. package/dist/cjs/q2-chart-donut.cjs.entry.js.map +1 -1
  24. package/dist/cjs/q2-checkbox-group.cjs.entry.js +6 -5
  25. package/dist/cjs/q2-checkbox-group.cjs.entry.js.map +1 -1
  26. package/dist/cjs/q2-checkbox.cjs.entry.js +2 -2
  27. package/dist/cjs/q2-currency.cjs.entry.js +14 -2
  28. package/dist/cjs/q2-currency.cjs.entry.js.map +1 -1
  29. package/dist/cjs/q2-data-table.cjs.entry.js +3 -3
  30. package/dist/cjs/q2-data-table.cjs.entry.js.map +1 -1
  31. package/dist/cjs/q2-detail.cjs.entry.js +3 -3
  32. package/dist/cjs/q2-dropdown-item.cjs.entry.js +12 -14
  33. package/dist/cjs/q2-dropdown-item.cjs.entry.js.map +1 -1
  34. package/dist/cjs/q2-dropdown.cjs.entry.js +7 -5
  35. package/dist/cjs/q2-dropdown.cjs.entry.js.map +1 -1
  36. package/dist/cjs/q2-editable-field.cjs.entry.js +3 -3
  37. package/dist/cjs/q2-example.cjs.entry.js +145 -0
  38. package/dist/cjs/q2-example.cjs.entry.js.map +1 -0
  39. package/dist/cjs/q2-formatted-text.cjs.entry.js +2 -2
  40. package/dist/cjs/q2-item.cjs.entry.js +3 -3
  41. package/dist/cjs/q2-legend.cjs.entry.js +2 -2
  42. package/dist/cjs/q2-link.cjs.entry.js +4 -4
  43. package/dist/cjs/q2-link.cjs.entry.js.map +1 -1
  44. package/dist/cjs/q2-list.cjs.entry.js +6 -7
  45. package/dist/cjs/q2-list.cjs.entry.js.map +1 -1
  46. package/dist/cjs/q2-loading-element.cjs.entry.js +2 -2
  47. package/dist/cjs/q2-loc.cjs.entry.js +52 -3
  48. package/dist/cjs/q2-loc.cjs.entry.js.map +1 -1
  49. package/dist/cjs/q2-message.cjs.entry.js +3 -3
  50. package/dist/cjs/q2-month-picker.cjs.entry.js +4 -4
  51. package/dist/cjs/q2-optgroup.cjs.entry.js +5 -4
  52. package/dist/cjs/q2-optgroup.cjs.entry.js.map +1 -1
  53. package/dist/cjs/q2-option-list.cjs.entry.js +2 -2
  54. package/dist/cjs/q2-option.cjs.entry.js +50 -33
  55. package/dist/cjs/q2-option.cjs.entry.js.map +1 -1
  56. package/dist/cjs/q2-pagination.cjs.entry.js +11 -7
  57. package/dist/cjs/q2-pagination.cjs.entry.js.map +1 -1
  58. package/dist/cjs/q2-pill.cjs.entry.js +19 -18
  59. package/dist/cjs/q2-pill.cjs.entry.js.map +1 -1
  60. package/dist/cjs/q2-radio-group.cjs.entry.js +5 -5
  61. package/dist/cjs/q2-radio-group.cjs.entry.js.map +1 -1
  62. package/dist/cjs/q2-radio.cjs.entry.js +3 -3
  63. package/dist/cjs/q2-relative-time.cjs.entry.js +3 -3
  64. package/dist/cjs/q2-resize-observer.cjs.entry.js +2 -2
  65. package/dist/cjs/q2-section.cjs.entry.js +8 -6
  66. package/dist/cjs/q2-section.cjs.entry.js.map +1 -1
  67. package/dist/cjs/q2-select.cjs.entry.js +6 -5
  68. package/dist/cjs/q2-select.cjs.entry.js.map +1 -1
  69. package/dist/cjs/q2-stepper-pane.cjs.entry.js +5 -4
  70. package/dist/cjs/q2-stepper-pane.cjs.entry.js.map +1 -1
  71. package/dist/cjs/q2-stepper-vertical.cjs.entry.js +16 -4
  72. package/dist/cjs/q2-stepper-vertical.cjs.entry.js.map +1 -1
  73. package/dist/cjs/q2-stepper.cjs.entry.js +6 -4
  74. package/dist/cjs/q2-stepper.cjs.entry.js.map +1 -1
  75. package/dist/cjs/q2-tag.cjs.entry.js +6 -4
  76. package/dist/cjs/q2-tag.cjs.entry.js.map +1 -1
  77. package/dist/cjs/q2-tecton-elements.cjs.js +2 -2
  78. package/dist/cjs/q2-textarea.cjs.entry.js +3 -3
  79. package/dist/cjs/q2-tooltip.cjs.entry.js +2 -2
  80. package/dist/cjs/{shapes-be198cc0.js → shapes-5d45fc11.js} +2 -2
  81. package/dist/cjs/{shapes-be198cc0.js.map → shapes-5d45fc11.js.map} +1 -1
  82. package/dist/cjs/tecton-tab-pane.cjs.entry.js +3 -3
  83. package/dist/collection/collection-manifest.json +1 -0
  84. package/dist/collection/components/q2-action-group/q2-action-group.js +1 -1
  85. package/dist/collection/components/q2-action-sheet/q2-action-sheet.js +1 -1
  86. package/dist/collection/components/q2-avatar/q2-avatar.js +1 -1
  87. package/dist/collection/components/q2-calendar/q2-calendar.js +16 -18
  88. package/dist/collection/components/q2-calendar/q2-calendar.js.map +1 -1
  89. package/dist/collection/components/q2-calendar/q2-month-picker.js +2 -2
  90. package/dist/collection/components/q2-calendar/test/q2-calendar-test.e2e.js +27 -0
  91. package/dist/collection/components/q2-calendar/test/q2-calendar-test.e2e.js.map +1 -1
  92. package/dist/collection/components/q2-card/q2-card.js +2 -0
  93. package/dist/collection/components/q2-card/q2-card.js.map +1 -1
  94. package/dist/collection/components/q2-carousel-pane/q2-carousel-pane.js +2 -2
  95. package/dist/collection/components/q2-chart-area/q2-chart-area.js +42 -1
  96. package/dist/collection/components/q2-chart-area/q2-chart-area.js.map +1 -1
  97. package/dist/collection/components/q2-chart-area/test/q2-chart-area-test.e2e.js +15 -0
  98. package/dist/collection/components/q2-chart-area/test/q2-chart-area-test.e2e.js.map +1 -1
  99. package/dist/collection/components/q2-chart-bar/q2-chart-bar.js +1 -1
  100. package/dist/collection/components/q2-chart-donut/q2-chart-donut.js +41 -1
  101. package/dist/collection/components/q2-chart-donut/q2-chart-donut.js.map +1 -1
  102. package/dist/collection/components/q2-chart-donut/test/q2-chart-donut-test.e2e.js +11 -0
  103. package/dist/collection/components/q2-chart-donut/test/q2-chart-donut-test.e2e.js.map +1 -1
  104. package/dist/collection/components/q2-checkbox-group/q2-checkbox-group.css +30 -23
  105. package/dist/collection/components/q2-checkbox-group/q2-checkbox-group.js +4 -3
  106. package/dist/collection/components/q2-checkbox-group/q2-checkbox-group.js.map +1 -1
  107. package/dist/collection/components/q2-currency/q2-currency.js +37 -1
  108. package/dist/collection/components/q2-currency/q2-currency.js.map +1 -1
  109. package/dist/collection/components/q2-currency/test/q2-currency-test.e2e.js +34 -23
  110. package/dist/collection/components/q2-currency/test/q2-currency-test.e2e.js.map +1 -1
  111. package/dist/collection/components/q2-data-table/q2-data-table.js +1 -1
  112. package/dist/collection/components/q2-data-table/q2-data-table.js.map +1 -1
  113. package/dist/collection/components/q2-data-table/test/q2-data-table-test.e2e.js +6 -4
  114. package/dist/collection/components/q2-data-table/test/q2-data-table-test.e2e.js.map +1 -1
  115. package/dist/collection/components/q2-detail/q2-detail.js +1 -1
  116. package/dist/collection/components/q2-dropdown/q2-dropdown.css +5 -0
  117. package/dist/collection/components/q2-dropdown/q2-dropdown.js +10 -4
  118. package/dist/collection/components/q2-dropdown/q2-dropdown.js.map +1 -1
  119. package/dist/collection/components/q2-dropdown/test/q2-dropdown-test.e2e.js +59 -14
  120. package/dist/collection/components/q2-dropdown/test/q2-dropdown-test.e2e.js.map +1 -1
  121. package/dist/collection/components/q2-dropdown-item/q2-dropdown-item.css +29 -11
  122. package/dist/collection/components/q2-dropdown-item/q2-dropdown-item.js +9 -11
  123. package/dist/collection/components/q2-dropdown-item/q2-dropdown-item.js.map +1 -1
  124. package/dist/collection/components/q2-dropdown-item/test/q2-dropdown-item-test.e2e.js +108 -74
  125. package/dist/collection/components/q2-dropdown-item/test/q2-dropdown-item-test.e2e.js.map +1 -1
  126. package/dist/collection/components/q2-editable-field/q2-editable-field.js +1 -1
  127. package/dist/collection/components/q2-example/q2-example.css +66 -0
  128. package/dist/collection/components/q2-example/q2-example.js +312 -0
  129. package/dist/collection/components/q2-example/q2-example.js.map +1 -0
  130. package/dist/collection/components/q2-example/test/q2-example.e2e.js +27 -0
  131. package/dist/collection/components/q2-example/test/q2-example.e2e.js.map +1 -0
  132. package/dist/collection/components/q2-example/test/q2-example.spec.js +126 -0
  133. package/dist/collection/components/q2-example/test/q2-example.spec.js.map +1 -0
  134. package/dist/collection/components/q2-formatted-text/q2-formatted-text.js +1 -1
  135. package/dist/collection/components/q2-input/formatting/alpha.spec.js +10 -0
  136. package/dist/collection/components/q2-input/formatting/alpha.spec.js.map +1 -0
  137. package/dist/collection/components/q2-input/formatting/alphanumeric.spec.js +7 -0
  138. package/dist/collection/components/q2-input/formatting/alphanumeric.spec.js.map +1 -0
  139. package/dist/collection/components/q2-input/formatting/currency.spec.js +20 -0
  140. package/dist/collection/components/q2-input/formatting/currency.spec.js.map +1 -0
  141. package/dist/collection/components/q2-input/formatting/date.js +1 -1
  142. package/dist/collection/components/q2-input/formatting/date.js.map +1 -1
  143. package/dist/collection/components/q2-input/formatting/date.spec.js +17 -0
  144. package/dist/collection/components/q2-input/formatting/date.spec.js.map +1 -0
  145. package/dist/collection/components/q2-input/formatting/numeric.spec.js +32 -0
  146. package/dist/collection/components/q2-input/formatting/numeric.spec.js.map +1 -0
  147. package/dist/collection/components/q2-input/formatting/phone.spec.js +16 -0
  148. package/dist/collection/components/q2-input/formatting/phone.spec.js.map +1 -0
  149. package/dist/collection/components/q2-input/formatting/postal.js +1 -1
  150. package/dist/collection/components/q2-input/formatting/postal.js.map +1 -1
  151. package/dist/collection/components/q2-input/formatting/postal.spec.js +28 -0
  152. package/dist/collection/components/q2-input/formatting/postal.spec.js.map +1 -0
  153. package/dist/collection/components/q2-input/formatting/ssn.spec.js +7 -0
  154. package/dist/collection/components/q2-input/formatting/ssn.spec.js.map +1 -0
  155. package/dist/collection/components/q2-input/formatting/tin.spec.js +7 -0
  156. package/dist/collection/components/q2-input/formatting/tin.spec.js.map +1 -0
  157. package/dist/collection/components/q2-input/q2-input.js +58 -44
  158. package/dist/collection/components/q2-input/q2-input.js.map +1 -1
  159. package/dist/collection/components/q2-input/test/q2-input-test.e2e.js +259 -2106
  160. package/dist/collection/components/q2-input/test/q2-input-test.e2e.js.map +1 -1
  161. package/dist/collection/components/q2-input/test/q2-input-test.spec.js +4035 -0
  162. package/dist/collection/components/q2-input/test/q2-input-test.spec.js.map +1 -0
  163. package/dist/collection/components/q2-item/q2-item.js +1 -1
  164. package/dist/collection/components/q2-legend/q2-legend.js +1 -1
  165. package/dist/collection/components/q2-link/q2-link.css +17 -20
  166. package/dist/collection/components/q2-link/q2-link.js +2 -2
  167. package/dist/collection/components/q2-link/q2-link.js.map +1 -1
  168. package/dist/collection/components/q2-link/test/q2-link-test.e2e.js +6 -6
  169. package/dist/collection/components/q2-link/test/q2-link-test.e2e.js.map +1 -1
  170. package/dist/collection/components/q2-list/q2-list.js +4 -5
  171. package/dist/collection/components/q2-list/q2-list.js.map +1 -1
  172. package/dist/collection/components/q2-loc/q2-loc.js +66 -4
  173. package/dist/collection/components/q2-loc/q2-loc.js.map +1 -1
  174. package/dist/collection/components/q2-loc/test/q2-loc-test.e2e.js +19 -30
  175. package/dist/collection/components/q2-loc/test/q2-loc-test.e2e.js.map +1 -1
  176. package/dist/collection/components/q2-loc/test/q2-loc-test.spec.js +164 -0
  177. package/dist/collection/components/q2-loc/test/q2-loc-test.spec.js.map +1 -0
  178. package/dist/collection/components/q2-message/q2-message.js +1 -1
  179. package/dist/collection/components/q2-optgroup/q2-optgroup.js +3 -2
  180. package/dist/collection/components/q2-optgroup/q2-optgroup.js.map +1 -1
  181. package/dist/collection/components/q2-option/q2-option.css +1 -1
  182. package/dist/collection/components/q2-option/q2-option.js +57 -34
  183. package/dist/collection/components/q2-option/q2-option.js.map +1 -1
  184. package/dist/collection/components/q2-option/test/q2-option-test.e2e.js +110 -106
  185. package/dist/collection/components/q2-option/test/q2-option-test.e2e.js.map +1 -1
  186. package/dist/collection/components/q2-option/test/q2-option-test.spec.js +532 -0
  187. package/dist/collection/components/q2-option/test/q2-option-test.spec.js.map +1 -0
  188. package/dist/collection/components/q2-pagination/q2-pagination.js +9 -5
  189. package/dist/collection/components/q2-pagination/q2-pagination.js.map +1 -1
  190. package/dist/collection/components/q2-pagination/test/q2-pagination-test.e2e.js +18 -1
  191. package/dist/collection/components/q2-pagination/test/q2-pagination-test.e2e.js.map +1 -1
  192. package/dist/collection/components/q2-pill/q2-pill.js +18 -17
  193. package/dist/collection/components/q2-pill/q2-pill.js.map +1 -1
  194. package/dist/collection/components/q2-pill/test/q2-pill-test.e2e.js +128 -57
  195. package/dist/collection/components/q2-pill/test/q2-pill-test.e2e.js.map +1 -1
  196. package/dist/collection/components/q2-popover/q2-popover.js +17 -4
  197. package/dist/collection/components/q2-popover/q2-popover.js.map +1 -1
  198. package/dist/collection/components/q2-radio/q2-radio.js +1 -1
  199. package/dist/collection/components/q2-radio-group/q2-radio-group.css +19 -9
  200. package/dist/collection/components/q2-radio-group/q2-radio-group.js +2 -2
  201. package/dist/collection/components/q2-radio-group/q2-radio-group.js.map +1 -1
  202. package/dist/collection/components/q2-relative-time/q2-relative-time.js +1 -1
  203. package/dist/collection/components/q2-resize-observer/q2-resize-observer.js +1 -1
  204. package/dist/collection/components/q2-section/q2-section.js +6 -4
  205. package/dist/collection/components/q2-section/q2-section.js.map +1 -1
  206. package/dist/collection/components/q2-select/q2-select.js +5 -3
  207. package/dist/collection/components/q2-select/q2-select.js.map +1 -1
  208. package/dist/collection/components/q2-select/test/q2-select-test.e2e.js +123 -62
  209. package/dist/collection/components/q2-select/test/q2-select-test.e2e.js.map +1 -1
  210. package/dist/collection/components/q2-stepper/q2-stepper.js +4 -2
  211. package/dist/collection/components/q2-stepper/q2-stepper.js.map +1 -1
  212. package/dist/collection/components/q2-stepper-pane/q2-stepper-pane.js +3 -2
  213. package/dist/collection/components/q2-stepper-pane/q2-stepper-pane.js.map +1 -1
  214. package/dist/collection/components/q2-stepper-vertical/q2-stepper-vertical.js +46 -2
  215. package/dist/collection/components/q2-stepper-vertical/q2-stepper-vertical.js.map +1 -1
  216. package/dist/collection/components/q2-stepper-vertical/test/q2-stepper-vertical-test.e2e.js +26 -0
  217. package/dist/collection/components/q2-stepper-vertical/test/q2-stepper-vertical-test.e2e.js.map +1 -1
  218. package/dist/collection/components/q2-tab-container/q2-tab-container.js +4 -3
  219. package/dist/collection/components/q2-tab-container/q2-tab-container.js.map +1 -1
  220. package/dist/collection/components/q2-tab-pane/q2-tab-pane.js +1 -1
  221. package/dist/collection/components/q2-tag/q2-tag.js +5 -2
  222. package/dist/collection/components/q2-tag/q2-tag.js.map +1 -1
  223. package/dist/collection/components/q2-tag/test/q2-tag-test.e2e.js +55 -4
  224. package/dist/collection/components/q2-tag/test/q2-tag-test.e2e.js.map +1 -1
  225. package/dist/collection/components/q2-textarea/q2-textarea.js +1 -1
  226. package/dist/collection/components/tecton-tab-pane/tecton-tab-pane.js +2 -2
  227. package/dist/collection/utils/helpers.js +63 -41
  228. package/dist/collection/utils/helpers.js.map +1 -1
  229. package/dist/collection/utils/index.js +83 -0
  230. package/dist/collection/utils/index.js.map +1 -1
  231. package/dist/components/index.js +2 -0
  232. package/dist/components/index.js.map +1 -1
  233. package/dist/components/index2.js +84 -1
  234. package/dist/components/index2.js.map +1 -1
  235. package/dist/components/q2-action-group.js +1 -1
  236. package/dist/components/q2-action-sheet.js +1 -1
  237. package/dist/components/q2-avatar2.js +1 -1
  238. package/dist/components/q2-calendar.js +16 -18
  239. package/dist/components/q2-calendar.js.map +1 -1
  240. package/dist/components/q2-card.js +2 -0
  241. package/dist/components/q2-card.js.map +1 -1
  242. package/dist/components/q2-carousel-pane.js +2 -2
  243. package/dist/components/q2-chart-area.js +16 -2
  244. package/dist/components/q2-chart-area.js.map +1 -1
  245. package/dist/components/q2-chart-bar.js +1 -1
  246. package/dist/components/q2-chart-donut.js +19 -2
  247. package/dist/components/q2-chart-donut.js.map +1 -1
  248. package/dist/components/q2-checkbox-group.js +5 -4
  249. package/dist/components/q2-checkbox-group.js.map +1 -1
  250. package/dist/components/q2-currency.js +15 -2
  251. package/dist/components/q2-currency.js.map +1 -1
  252. package/dist/components/q2-data-table.js +1 -1
  253. package/dist/components/q2-data-table.js.map +1 -1
  254. package/dist/components/q2-detail.js +1 -1
  255. package/dist/components/q2-dropdown-item2.js +12 -26
  256. package/dist/components/q2-dropdown-item2.js.map +1 -1
  257. package/dist/components/q2-dropdown.js +6 -3
  258. package/dist/components/q2-dropdown.js.map +1 -1
  259. package/dist/components/q2-editable-field.js +1 -1
  260. package/dist/components/q2-example.d.ts +11 -0
  261. package/dist/components/q2-example.js +170 -0
  262. package/dist/components/q2-example.js.map +1 -0
  263. package/dist/components/q2-formatted-text.js +1 -1
  264. package/dist/components/q2-input2.js +41 -37
  265. package/dist/components/q2-input2.js.map +1 -1
  266. package/dist/components/q2-item.js +1 -1
  267. package/dist/components/q2-legend2.js +1 -1
  268. package/dist/components/q2-link.js +3 -3
  269. package/dist/components/q2-link.js.map +1 -1
  270. package/dist/components/q2-list.js +4 -5
  271. package/dist/components/q2-list.js.map +1 -1
  272. package/dist/components/q2-loc.js +55 -2
  273. package/dist/components/q2-loc.js.map +1 -1
  274. package/dist/components/q2-message2.js +1 -1
  275. package/dist/components/q2-month-picker.js +2 -2
  276. package/dist/components/q2-optgroup2.js +3 -2
  277. package/dist/components/q2-optgroup2.js.map +1 -1
  278. package/dist/components/q2-option-list2.js +1 -1
  279. package/dist/components/q2-option2.js +52 -33
  280. package/dist/components/q2-option2.js.map +1 -1
  281. package/dist/components/q2-pagination.js +9 -5
  282. package/dist/components/q2-pagination.js.map +1 -1
  283. package/dist/components/q2-pill.js +18 -17
  284. package/dist/components/q2-pill.js.map +1 -1
  285. package/dist/components/q2-popover2.js +16 -4
  286. package/dist/components/q2-popover2.js.map +1 -1
  287. package/dist/components/q2-radio-group.js +3 -3
  288. package/dist/components/q2-radio-group.js.map +1 -1
  289. package/dist/components/q2-radio.js +1 -1
  290. package/dist/components/q2-relative-time.js +1 -1
  291. package/dist/components/q2-resize-observer2.js +1 -1
  292. package/dist/components/q2-section.js +6 -4
  293. package/dist/components/q2-section.js.map +1 -1
  294. package/dist/components/q2-select2.js +6 -4
  295. package/dist/components/q2-select2.js.map +1 -1
  296. package/dist/components/q2-stepper-pane.js +3 -2
  297. package/dist/components/q2-stepper-pane.js.map +1 -1
  298. package/dist/components/q2-stepper-vertical.js +16 -3
  299. package/dist/components/q2-stepper-vertical.js.map +1 -1
  300. package/dist/components/q2-stepper.js +4 -2
  301. package/dist/components/q2-stepper.js.map +1 -1
  302. package/dist/components/q2-tab-container.js +4 -3
  303. package/dist/components/q2-tab-container.js.map +1 -1
  304. package/dist/components/q2-tab-pane.js +1 -1
  305. package/dist/components/q2-tag.js +5 -2
  306. package/dist/components/q2-tag.js.map +1 -1
  307. package/dist/components/q2-textarea.js +1 -1
  308. package/dist/components/tecton-tab-pane.js +2 -2
  309. package/dist/esm/click-elsewhere_2.entry.js +16 -5
  310. package/dist/esm/click-elsewhere_2.entry.js.map +1 -1
  311. package/dist/esm/{index-1e1ce94e.js → index-7a5365e2.js} +40 -5
  312. package/dist/esm/index-7a5365e2.js.map +1 -0
  313. package/dist/esm/{index-844fc010.js → index-d18e2a20.js} +86 -3
  314. package/dist/esm/index-d18e2a20.js.map +1 -0
  315. package/dist/esm/loader.js +3 -3
  316. package/dist/esm/q2-action-group.entry.js +2 -2
  317. package/dist/esm/q2-action-sheet.entry.js +3 -3
  318. package/dist/esm/q2-avatar.entry.js +2 -2
  319. package/dist/esm/q2-badge_7.entry.js +49 -44
  320. package/dist/esm/q2-badge_7.entry.js.map +1 -1
  321. package/dist/esm/q2-calendar.entry.js +17 -20
  322. package/dist/esm/q2-calendar.entry.js.map +1 -1
  323. package/dist/esm/q2-card.entry.js +4 -2
  324. package/dist/esm/q2-card.entry.js.map +1 -1
  325. package/dist/esm/q2-carousel-pane.entry.js +4 -4
  326. package/dist/esm/q2-carousel.entry.js +2 -2
  327. package/dist/esm/q2-chart-area.entry.js +16 -3
  328. package/dist/esm/q2-chart-area.entry.js.map +1 -1
  329. package/dist/esm/q2-chart-bar.entry.js +3 -3
  330. package/dist/esm/q2-chart-donut.entry.js +19 -3
  331. package/dist/esm/q2-chart-donut.entry.js.map +1 -1
  332. package/dist/esm/q2-checkbox-group.entry.js +6 -5
  333. package/dist/esm/q2-checkbox-group.entry.js.map +1 -1
  334. package/dist/esm/q2-checkbox.entry.js +2 -2
  335. package/dist/esm/q2-currency.entry.js +14 -2
  336. package/dist/esm/q2-currency.entry.js.map +1 -1
  337. package/dist/esm/q2-data-table.entry.js +3 -3
  338. package/dist/esm/q2-data-table.entry.js.map +1 -1
  339. package/dist/esm/q2-detail.entry.js +3 -3
  340. package/dist/esm/q2-dropdown-item.entry.js +12 -14
  341. package/dist/esm/q2-dropdown-item.entry.js.map +1 -1
  342. package/dist/esm/q2-dropdown.entry.js +7 -5
  343. package/dist/esm/q2-dropdown.entry.js.map +1 -1
  344. package/dist/esm/q2-editable-field.entry.js +3 -3
  345. package/dist/esm/q2-example.entry.js +141 -0
  346. package/dist/esm/q2-example.entry.js.map +1 -0
  347. package/dist/esm/q2-formatted-text.entry.js +2 -2
  348. package/dist/esm/q2-item.entry.js +3 -3
  349. package/dist/esm/q2-legend.entry.js +2 -2
  350. package/dist/esm/q2-link.entry.js +4 -4
  351. package/dist/esm/q2-link.entry.js.map +1 -1
  352. package/dist/esm/q2-list.entry.js +6 -7
  353. package/dist/esm/q2-list.entry.js.map +1 -1
  354. package/dist/esm/q2-loading-element.entry.js +2 -2
  355. package/dist/esm/q2-loc.entry.js +52 -3
  356. package/dist/esm/q2-loc.entry.js.map +1 -1
  357. package/dist/esm/q2-message.entry.js +3 -3
  358. package/dist/esm/q2-month-picker.entry.js +4 -4
  359. package/dist/esm/q2-optgroup.entry.js +5 -4
  360. package/dist/esm/q2-optgroup.entry.js.map +1 -1
  361. package/dist/esm/q2-option-list.entry.js +2 -2
  362. package/dist/esm/q2-option.entry.js +50 -33
  363. package/dist/esm/q2-option.entry.js.map +1 -1
  364. package/dist/esm/q2-pagination.entry.js +11 -7
  365. package/dist/esm/q2-pagination.entry.js.map +1 -1
  366. package/dist/esm/q2-pill.entry.js +19 -18
  367. package/dist/esm/q2-pill.entry.js.map +1 -1
  368. package/dist/esm/q2-radio-group.entry.js +5 -5
  369. package/dist/esm/q2-radio-group.entry.js.map +1 -1
  370. package/dist/esm/q2-radio.entry.js +3 -3
  371. package/dist/esm/q2-relative-time.entry.js +3 -3
  372. package/dist/esm/q2-resize-observer.entry.js +2 -2
  373. package/dist/esm/q2-section.entry.js +8 -6
  374. package/dist/esm/q2-section.entry.js.map +1 -1
  375. package/dist/esm/q2-select.entry.js +6 -5
  376. package/dist/esm/q2-select.entry.js.map +1 -1
  377. package/dist/esm/q2-stepper-pane.entry.js +5 -4
  378. package/dist/esm/q2-stepper-pane.entry.js.map +1 -1
  379. package/dist/esm/q2-stepper-vertical.entry.js +16 -4
  380. package/dist/esm/q2-stepper-vertical.entry.js.map +1 -1
  381. package/dist/esm/q2-stepper.entry.js +6 -4
  382. package/dist/esm/q2-stepper.entry.js.map +1 -1
  383. package/dist/esm/q2-tag.entry.js +6 -4
  384. package/dist/esm/q2-tag.entry.js.map +1 -1
  385. package/dist/esm/q2-tecton-elements.js +3 -3
  386. package/dist/esm/q2-textarea.entry.js +3 -3
  387. package/dist/esm/q2-tooltip.entry.js +2 -2
  388. package/dist/esm/{shapes-36183b2a.js → shapes-c7e1a3fa.js} +2 -2
  389. package/dist/esm/{shapes-36183b2a.js.map → shapes-c7e1a3fa.js.map} +1 -1
  390. package/dist/esm/tecton-tab-pane.entry.js +3 -3
  391. package/dist/q2-tecton-elements/action-sheet-e64cb6f7.js +77 -0
  392. package/dist/q2-tecton-elements/{p-b7554a79.js.map → action-sheet-e64cb6f7.js.map} +1 -1
  393. package/dist/q2-tecton-elements/app-globals-0f993ce5.js +4 -0
  394. package/dist/q2-tecton-elements/{p-e1255160.js.map → app-globals-0f993ce5.js.map} +1 -1
  395. package/dist/q2-tecton-elements/charting-1abfb877.js +34872 -0
  396. package/dist/q2-tecton-elements/{p-2941aafa.js.map → charting-1abfb877.js.map} +1 -1
  397. package/dist/q2-tecton-elements/click-elsewhere_2.entry.js +410 -0
  398. package/dist/q2-tecton-elements/click-elsewhere_2.entry.js.map +1 -0
  399. package/dist/q2-tecton-elements/dataSample-7b62e101.js +2602 -0
  400. package/dist/q2-tecton-elements/{p-ad80aef0.js.map → dataSample-7b62e101.js.map} +1 -1
  401. package/dist/q2-tecton-elements/index-3184c760.js +18168 -0
  402. package/dist/q2-tecton-elements/{p-f1e887f5.js.map → index-3184c760.js.map} +1 -1
  403. package/dist/q2-tecton-elements/index-7a5365e2.js +1792 -0
  404. package/dist/q2-tecton-elements/index-7a5365e2.js.map +1 -0
  405. package/dist/q2-tecton-elements/index-d18e2a20.js +323 -0
  406. package/dist/q2-tecton-elements/index-d18e2a20.js.map +1 -0
  407. package/dist/q2-tecton-elements/q2-action-group.entry.js +56 -0
  408. package/dist/q2-tecton-elements/{p-5637c486.entry.js.map → q2-action-group.entry.js.map} +1 -1
  409. package/dist/q2-tecton-elements/q2-action-sheet.entry.js +1480 -0
  410. package/dist/q2-tecton-elements/{p-188eb162.entry.js.map → q2-action-sheet.entry.js.map} +1 -1
  411. package/dist/q2-tecton-elements/q2-avatar.entry.js +101 -0
  412. package/dist/q2-tecton-elements/{p-07d1c3ae.entry.js.map → q2-avatar.entry.js.map} +1 -1
  413. package/dist/q2-tecton-elements/q2-badge_7.entry.js +5449 -0
  414. package/dist/q2-tecton-elements/q2-badge_7.entry.js.map +1 -0
  415. package/dist/q2-tecton-elements/q2-calendar.entry.js +1313 -0
  416. package/dist/q2-tecton-elements/q2-calendar.entry.js.map +1 -0
  417. package/dist/q2-tecton-elements/q2-card.entry.js +170 -0
  418. package/dist/q2-tecton-elements/q2-card.entry.js.map +1 -0
  419. package/dist/q2-tecton-elements/q2-carousel-pane.entry.js +130 -0
  420. package/dist/q2-tecton-elements/{p-7aef0c08.entry.js.map → q2-carousel-pane.entry.js.map} +1 -1
  421. package/dist/q2-tecton-elements/q2-carousel.entry.js +4613 -0
  422. package/dist/q2-tecton-elements/{p-e216ef3f.entry.js.map → q2-carousel.entry.js.map} +1 -1
  423. package/dist/q2-tecton-elements/q2-chart-area.entry.js +4330 -0
  424. package/dist/q2-tecton-elements/q2-chart-area.entry.js.map +1 -0
  425. package/dist/q2-tecton-elements/q2-chart-bar.entry.js +1479 -0
  426. package/dist/q2-tecton-elements/{p-7906f49e.entry.js.map → q2-chart-bar.entry.js.map} +1 -1
  427. package/dist/q2-tecton-elements/q2-chart-donut.entry.js +4537 -0
  428. package/dist/q2-tecton-elements/q2-chart-donut.entry.js.map +1 -0
  429. package/dist/q2-tecton-elements/q2-checkbox-group.entry.js +166 -0
  430. package/dist/q2-tecton-elements/q2-checkbox-group.entry.js.map +1 -0
  431. package/dist/q2-tecton-elements/q2-checkbox.entry.js +223 -0
  432. package/dist/q2-tecton-elements/{p-b7de110e.entry.js.map → q2-checkbox.entry.js.map} +1 -1
  433. package/dist/q2-tecton-elements/q2-currency.entry.js +153 -0
  434. package/dist/q2-tecton-elements/q2-currency.entry.js.map +1 -0
  435. package/dist/q2-tecton-elements/q2-data-table.entry.js +622 -0
  436. package/dist/q2-tecton-elements/{p-7903cd15.entry.js.map → q2-data-table.entry.js.map} +1 -1
  437. package/dist/q2-tecton-elements/q2-detail.entry.js +128 -0
  438. package/dist/q2-tecton-elements/{p-f5f23659.entry.js.map → q2-detail.entry.js.map} +1 -1
  439. package/dist/q2-tecton-elements/q2-dropdown-item.entry.js +146 -0
  440. package/dist/q2-tecton-elements/q2-dropdown-item.entry.js.map +1 -0
  441. package/dist/q2-tecton-elements/q2-dropdown.entry.js +430 -0
  442. package/dist/q2-tecton-elements/q2-dropdown.entry.js.map +1 -0
  443. package/dist/q2-tecton-elements/q2-editable-field.entry.js +296 -0
  444. package/dist/q2-tecton-elements/{p-896c7008.entry.js.map → q2-editable-field.entry.js.map} +1 -1
  445. package/dist/q2-tecton-elements/q2-example.entry.js +152 -0
  446. package/dist/q2-tecton-elements/q2-example.entry.js.map +1 -0
  447. package/dist/q2-tecton-elements/q2-formatted-text.entry.js +73 -0
  448. package/dist/q2-tecton-elements/{p-7c9f8b62.entry.js.map → q2-formatted-text.entry.js.map} +1 -1
  449. package/dist/q2-tecton-elements/q2-item.entry.js +158 -0
  450. package/dist/q2-tecton-elements/{p-7c9a0122.entry.js.map → q2-item.entry.js.map} +1 -1
  451. package/dist/q2-tecton-elements/q2-legend.entry.js +146 -0
  452. package/dist/q2-tecton-elements/{p-ff8f1a32.entry.js.map → q2-legend.entry.js.map} +1 -1
  453. package/dist/q2-tecton-elements/q2-link.entry.js +83 -0
  454. package/dist/q2-tecton-elements/q2-link.entry.js.map +1 -0
  455. package/dist/q2-tecton-elements/q2-list.entry.js +100 -0
  456. package/dist/q2-tecton-elements/q2-list.entry.js.map +1 -0
  457. package/dist/q2-tecton-elements/q2-loading-element.entry.js +36 -0
  458. package/dist/q2-tecton-elements/{p-a068c84c.entry.js.map → q2-loading-element.entry.js.map} +1 -1
  459. package/dist/q2-tecton-elements/q2-loc.entry.js +82 -0
  460. package/dist/q2-tecton-elements/q2-loc.entry.js.map +1 -0
  461. package/dist/q2-tecton-elements/q2-message.entry.js +99 -0
  462. package/dist/q2-tecton-elements/{p-8d2b02e1.entry.js.map → q2-message.entry.js.map} +1 -1
  463. package/dist/q2-tecton-elements/q2-month-picker.entry.js +198 -0
  464. package/dist/q2-tecton-elements/{p-8d07cf91.entry.js.map → q2-month-picker.entry.js.map} +1 -1
  465. package/dist/q2-tecton-elements/q2-optgroup.entry.js +88 -0
  466. package/dist/q2-tecton-elements/q2-optgroup.entry.js.map +1 -0
  467. package/dist/q2-tecton-elements/q2-option-list.entry.js +585 -0
  468. package/dist/q2-tecton-elements/{p-a5d0e252.entry.js.map → q2-option-list.entry.js.map} +1 -1
  469. package/dist/q2-tecton-elements/q2-option.entry.js +110 -0
  470. package/dist/q2-tecton-elements/q2-option.entry.js.map +1 -0
  471. package/dist/q2-tecton-elements/q2-pagination.entry.js +377 -0
  472. package/dist/q2-tecton-elements/q2-pagination.entry.js.map +1 -0
  473. package/dist/q2-tecton-elements/q2-pill.entry.js +434 -0
  474. package/dist/q2-tecton-elements/q2-pill.entry.js.map +1 -0
  475. package/dist/q2-tecton-elements/q2-radio-group.entry.js +227 -0
  476. package/dist/q2-tecton-elements/q2-radio-group.entry.js.map +1 -0
  477. package/dist/q2-tecton-elements/q2-radio.entry.js +144 -0
  478. package/dist/q2-tecton-elements/{p-c235ab3f.entry.js.map → q2-radio.entry.js.map} +1 -1
  479. package/dist/q2-tecton-elements/q2-relative-time.entry.js +162 -0
  480. package/dist/q2-tecton-elements/{p-95a7c042.entry.js.map → q2-relative-time.entry.js.map} +1 -1
  481. package/dist/q2-tecton-elements/q2-resize-observer.entry.js +100 -0
  482. package/dist/q2-tecton-elements/{p-e2c800ef.entry.js.map → q2-resize-observer.entry.js.map} +1 -1
  483. package/dist/q2-tecton-elements/q2-section.entry.js +256 -0
  484. package/dist/q2-tecton-elements/q2-section.entry.js.map +1 -0
  485. package/dist/q2-tecton-elements/q2-select.entry.js +684 -0
  486. package/dist/q2-tecton-elements/q2-select.entry.js.map +1 -0
  487. package/dist/q2-tecton-elements/q2-stepper-pane.entry.js +124 -0
  488. package/dist/q2-tecton-elements/q2-stepper-pane.entry.js.map +1 -0
  489. package/dist/q2-tecton-elements/q2-stepper-vertical.entry.js +356 -0
  490. package/dist/q2-tecton-elements/q2-stepper-vertical.entry.js.map +1 -0
  491. package/dist/q2-tecton-elements/q2-stepper.entry.js +332 -0
  492. package/dist/q2-tecton-elements/q2-stepper.entry.js.map +1 -0
  493. package/dist/q2-tecton-elements/q2-tag.entry.js +213 -0
  494. package/dist/q2-tecton-elements/q2-tag.entry.js.map +1 -0
  495. package/dist/q2-tecton-elements/q2-tecton-elements.esm.js +21 -1
  496. package/dist/q2-tecton-elements/q2-tecton-elements.esm.js.map +1 -1
  497. package/dist/q2-tecton-elements/q2-textarea.entry.js +364 -0
  498. package/dist/q2-tecton-elements/{p-f135b265.entry.js.map → q2-textarea.entry.js.map} +1 -1
  499. package/dist/q2-tecton-elements/q2-tooltip.entry.js +105 -0
  500. package/dist/q2-tecton-elements/{p-c5667d5d.entry.js.map → q2-tooltip.entry.js.map} +1 -1
  501. package/dist/q2-tecton-elements/sectorHelper-183cedd0.js +949 -0
  502. package/dist/q2-tecton-elements/{p-eea5aa01.js.map → sectorHelper-183cedd0.js.map} +1 -1
  503. package/dist/q2-tecton-elements/shapes-c7e1a3fa.js +132 -0
  504. package/dist/q2-tecton-elements/{p-50b425de.js.map → shapes-c7e1a3fa.js.map} +1 -1
  505. package/dist/q2-tecton-elements/tecton-tab-pane.entry.js +134 -0
  506. package/dist/q2-tecton-elements/{p-96b1406c.entry.js.map → tecton-tab-pane.entry.js.map} +1 -1
  507. package/dist/types/components/q2-calendar/q2-calendar.d.ts +4 -5
  508. package/dist/types/components/q2-chart-area/q2-chart-area.d.ts +6 -0
  509. package/dist/types/components/q2-chart-donut/q2-chart-donut.d.ts +6 -0
  510. package/dist/types/components/q2-currency/q2-currency.d.ts +7 -0
  511. package/dist/types/components/q2-dropdown/q2-dropdown.d.ts +1 -1
  512. package/dist/types/components/q2-dropdown-item/q2-dropdown-item.d.ts +2 -2
  513. package/dist/types/components/q2-example/q2-example.d.ts +119 -0
  514. package/dist/types/components/q2-input/formatting/date.d.ts +22 -0
  515. package/dist/types/components/q2-input/formatting/postal.d.ts +197 -0
  516. package/dist/types/components/q2-input/q2-input.d.ts +15 -12
  517. package/dist/types/components/q2-loc/q2-loc.d.ts +15 -1
  518. package/dist/types/components/q2-option/q2-option.d.ts +11 -3
  519. package/dist/types/components/q2-pill/q2-pill.d.ts +3 -3
  520. package/dist/types/components/q2-popover/q2-popover.d.ts +1 -0
  521. package/dist/types/components/q2-select/q2-select.d.ts +1 -1
  522. package/dist/types/components/q2-stepper-vertical/q2-stepper-vertical.d.ts +6 -0
  523. package/dist/types/components/q2-tag/q2-tag.d.ts +1 -1
  524. package/dist/types/components.d.ts +104 -14
  525. package/dist/types/utils/helpers.d.ts +13 -0
  526. package/dist/types/utils/index.d.ts +11 -0
  527. package/package.json +7 -7
  528. package/dist/cjs/index-14c3693c.js.map +0 -1
  529. package/dist/cjs/index-9aa4a776.js.map +0 -1
  530. package/dist/esm/index-1e1ce94e.js.map +0 -1
  531. package/dist/esm/index-844fc010.js.map +0 -1
  532. package/dist/q2-tecton-elements/p-06701928.entry.js +0 -2
  533. package/dist/q2-tecton-elements/p-06701928.entry.js.map +0 -1
  534. package/dist/q2-tecton-elements/p-07d1c3ae.entry.js +0 -2
  535. package/dist/q2-tecton-elements/p-1305f7ca.entry.js +0 -2
  536. package/dist/q2-tecton-elements/p-1305f7ca.entry.js.map +0 -1
  537. package/dist/q2-tecton-elements/p-15ac45d6.js +0 -2
  538. package/dist/q2-tecton-elements/p-15ac45d6.js.map +0 -1
  539. package/dist/q2-tecton-elements/p-16910682.entry.js +0 -2
  540. package/dist/q2-tecton-elements/p-16910682.entry.js.map +0 -1
  541. package/dist/q2-tecton-elements/p-188eb162.entry.js +0 -3
  542. package/dist/q2-tecton-elements/p-1c760a89.entry.js +0 -2
  543. package/dist/q2-tecton-elements/p-1c760a89.entry.js.map +0 -1
  544. package/dist/q2-tecton-elements/p-1c88d057.entry.js +0 -2
  545. package/dist/q2-tecton-elements/p-1c88d057.entry.js.map +0 -1
  546. package/dist/q2-tecton-elements/p-20a3d6ed.entry.js +0 -2
  547. package/dist/q2-tecton-elements/p-20a3d6ed.entry.js.map +0 -1
  548. package/dist/q2-tecton-elements/p-2733583e.entry.js +0 -2
  549. package/dist/q2-tecton-elements/p-2733583e.entry.js.map +0 -1
  550. package/dist/q2-tecton-elements/p-2941aafa.js +0 -39
  551. package/dist/q2-tecton-elements/p-3e428290.entry.js +0 -2
  552. package/dist/q2-tecton-elements/p-3e428290.entry.js.map +0 -1
  553. package/dist/q2-tecton-elements/p-4774e5b3.entry.js +0 -2
  554. package/dist/q2-tecton-elements/p-4774e5b3.entry.js.map +0 -1
  555. package/dist/q2-tecton-elements/p-490ef8e5.entry.js +0 -2
  556. package/dist/q2-tecton-elements/p-490ef8e5.entry.js.map +0 -1
  557. package/dist/q2-tecton-elements/p-4e10550d.entry.js +0 -2
  558. package/dist/q2-tecton-elements/p-4e10550d.entry.js.map +0 -1
  559. package/dist/q2-tecton-elements/p-50b425de.js +0 -2
  560. package/dist/q2-tecton-elements/p-50f7328f.entry.js +0 -2
  561. package/dist/q2-tecton-elements/p-50f7328f.entry.js.map +0 -1
  562. package/dist/q2-tecton-elements/p-5637c486.entry.js +0 -2
  563. package/dist/q2-tecton-elements/p-56df21b0.entry.js +0 -2
  564. package/dist/q2-tecton-elements/p-56df21b0.entry.js.map +0 -1
  565. package/dist/q2-tecton-elements/p-5a834214.entry.js +0 -2
  566. package/dist/q2-tecton-elements/p-5a834214.entry.js.map +0 -1
  567. package/dist/q2-tecton-elements/p-5f99a4a8.entry.js +0 -2
  568. package/dist/q2-tecton-elements/p-5f99a4a8.entry.js.map +0 -1
  569. package/dist/q2-tecton-elements/p-72d948b4.entry.js +0 -2
  570. package/dist/q2-tecton-elements/p-72d948b4.entry.js.map +0 -1
  571. package/dist/q2-tecton-elements/p-7903cd15.entry.js +0 -2
  572. package/dist/q2-tecton-elements/p-7906f49e.entry.js +0 -2
  573. package/dist/q2-tecton-elements/p-7aef0c08.entry.js +0 -2
  574. package/dist/q2-tecton-elements/p-7c9a0122.entry.js +0 -2
  575. package/dist/q2-tecton-elements/p-7c9f8b62.entry.js +0 -2
  576. package/dist/q2-tecton-elements/p-81fbe718.entry.js +0 -2
  577. package/dist/q2-tecton-elements/p-81fbe718.entry.js.map +0 -1
  578. package/dist/q2-tecton-elements/p-896c7008.entry.js +0 -2
  579. package/dist/q2-tecton-elements/p-8d07cf91.entry.js +0 -2
  580. package/dist/q2-tecton-elements/p-8d2b02e1.entry.js +0 -2
  581. package/dist/q2-tecton-elements/p-95a7c042.entry.js +0 -2
  582. package/dist/q2-tecton-elements/p-96b1406c.entry.js +0 -2
  583. package/dist/q2-tecton-elements/p-a068c84c.entry.js +0 -2
  584. package/dist/q2-tecton-elements/p-a47597dd.entry.js +0 -2
  585. package/dist/q2-tecton-elements/p-a47597dd.entry.js.map +0 -1
  586. package/dist/q2-tecton-elements/p-a5d0e252.entry.js +0 -2
  587. package/dist/q2-tecton-elements/p-a5f18e27.js +0 -3
  588. package/dist/q2-tecton-elements/p-a5f18e27.js.map +0 -1
  589. package/dist/q2-tecton-elements/p-ac6aa392.entry.js +0 -2
  590. package/dist/q2-tecton-elements/p-ac6aa392.entry.js.map +0 -1
  591. package/dist/q2-tecton-elements/p-ad057d10.entry.js +0 -2
  592. package/dist/q2-tecton-elements/p-ad057d10.entry.js.map +0 -1
  593. package/dist/q2-tecton-elements/p-ad80aef0.js +0 -2
  594. package/dist/q2-tecton-elements/p-b0e5e9dc.entry.js +0 -2
  595. package/dist/q2-tecton-elements/p-b0e5e9dc.entry.js.map +0 -1
  596. package/dist/q2-tecton-elements/p-b1784be3.entry.js +0 -2
  597. package/dist/q2-tecton-elements/p-b1784be3.entry.js.map +0 -1
  598. package/dist/q2-tecton-elements/p-b7554a79.js +0 -2
  599. package/dist/q2-tecton-elements/p-b7de110e.entry.js +0 -2
  600. package/dist/q2-tecton-elements/p-c235ab3f.entry.js +0 -2
  601. package/dist/q2-tecton-elements/p-c5667d5d.entry.js +0 -2
  602. package/dist/q2-tecton-elements/p-e1255160.js +0 -2
  603. package/dist/q2-tecton-elements/p-e216ef3f.entry.js +0 -2
  604. package/dist/q2-tecton-elements/p-e2c800ef.entry.js +0 -2
  605. package/dist/q2-tecton-elements/p-eea5aa01.js +0 -2
  606. package/dist/q2-tecton-elements/p-f135b265.entry.js +0 -2
  607. package/dist/q2-tecton-elements/p-f1e887f5.js +0 -2
  608. package/dist/q2-tecton-elements/p-f5f23659.entry.js +0 -2
  609. package/dist/q2-tecton-elements/p-f7867f21.entry.js +0 -2
  610. package/dist/q2-tecton-elements/p-f7867f21.entry.js.map +0 -1
  611. package/dist/q2-tecton-elements/p-ff8f1a32.entry.js +0 -2
  612. package/dist/q2-tecton-elements/p-fff01dc1.entry.js +0 -2
  613. package/dist/q2-tecton-elements/p-fff01dc1.entry.js.map +0 -1
@@ -1 +1 @@
1
- {"file":"q2-popover2.js","mappings":";;;AAAA,MAAM,YAAY,GAAG,4iFAA4iF,CAAC;AAClkF,wBAAe,YAAY;;MCed,SAAS;;;;;;;;;QAQlB,kBAAa,GAAG,EAAE,CAAC;;QAEnB,uBAAkB,GAAY,KAAK,CAAC;QAkPpC,oBAAe,GAAG;YACd,IAAI,IAAI,CAAC,SAAS,EAAE;gBAChB,wBAAwB,CAAC,IAAI,EAAE,WAAW,EAAE,MA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,CAAC;KAChB;;;IAeD,MAAM;QACF,MAAM,gBAAgB,GAAG,CAAC,WAAW,EAAE,IAAI,CAAC,gBAAgB,CAAC,CAAC;QAC9D,IAAI,IAAI,CAAC,IAAI;YAAE,gBAAgB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAC7C,IAAI,IAAI,CAAC,IAAI,KAAK,QAAQ;YAAE,gBAAgB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAE5D,QACI,4DACI,GAAG,EAAE,EAAE,KAAK,IAAI,CAAC,gBAAgB,GAAG,EAAE,CAAC,EACvC,KAAK,EAAE,gBAAgB,CAAC,IAAI,CAAC,GAAG,CAAC,aACzB,gBAAgB,IAExB,4DACI,GAAG,EAAE,EAAE,KAAK,IAAI,CAAC,cAAc,GAAG,EAAE,CAAC,EACrC,KAAK,EAAC,SAAS,IAEf,8DAAQ,CACN,CACJ,EACR;KACL;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/q2-popover/q2-popover.scss?tag=q2-popover&encapsulation=shadow","src/components/q2-popover/q2-popover.tsx"],"sourcesContent":["@import '../../styles/host.scss';\n@import '../../styles/functions';\n\n.container {\n display: none;\n}\n\n.show {\n display: block;\n position: fixed;\n z-index: var-list(--tct-popover-z-index, 50);\n margin: 0;\n padding: 0;\n overflow: auto;\n background: var-list(--tct-popover-background, --app-white, #ffffff);\n color: var-list(--tct-popover-font-color, --t-text, #4d4d4d);\n min-width: var-list(--tct-popover-min-width, 135px);\n margin-block: var-list(--tct-popover-margin-block, 0);\n box-shadow: var-list(--tct-popover-box-shadow, --app-shadow-1, unquote(\"0px 0px 2px rgba(0, 0, 0, 0.12), 0px 2px 4px rgba(0, 0, 0, 0.14)\"));\n border-width: var-list(--tct-popover-border-width, 0);\n border-style: solid;\n border-color: var-list(--tct-popover-border-color, transparent);\n border-radius: var-list(--tct-popover-border-radius, 0);\n // the following --comp variables are set via JS\n max-height: var(--comp-pop-max-height);\n left: var(--comp-pop-left);\n opacity: var(--comp-pop-opacity, 0);\n\n :host([block]) & {\n right: unset;\n width: var(--comp-pop-width);\n min-width: var-list(--tct-popover-min-width, unset);\n }\n\n :host([align='left']) & {\n left: var(--comp-pop-left);\n right: unset;\n }\n\n :host([align='right']) & {\n right: var(--comp-pop-right);\n left: unset;\n }\n\n &.down {\n top: var-list(--tct-popover-top, --comp-pop-top);\n bottom: unset;\n }\n\n &.up {\n top: unset;\n bottom: var(--comp-pop-bottom);\n }\n\n &.legacy {\n position: absolute;\n }\n\n @include tiny-scrollbar();\n}\n\nclick-elsewhere {\n position: relative;\n display: block;\n}\n","import {\n Component,\n Prop,\n h,\n ComponentInterface,\n Element,\n Watch,\n Method,\n Listen,\n EventEmitter,\n Event,\n State,\n} from '@stencil/core';\nimport { handleDeprecationWarning, waitForNextPaint } from '../../utils';\n\n@Component({ tag: 'q2-popover', shadow: true, styleUrl: 'q2-popover.scss' })\nexport class Q2Popover implements ComponentInterface {\n // #region Own Properties\n\n containerElement: HTMLDivElement;\n contentElement: HTMLDivElement;\n /**\n * The number of pixels to leave between the popover and the edge of the viewport\n */\n displayBuffer = 10;\n /** remove when Popover API is supported in iOS */\n orientationChanged: boolean = false;\n rootElementRect: DOMRect;\n\n // #endregion\n // #region Host HTML Element\n\n @Element()\n hostElement: HTMLElement;\n\n // #endregion\n // #region State Properties\n\n @State()\n currentDirection: 'down' | 'up' = undefined;\n\n // remove `show` when Popover API is supported in iOS\n @State()\n show: boolean = false;\n\n // #endregion\n // #region Public Property API\n\n /** Aligns the popover to the left or right side of the control element. */\n @Prop({ reflect: true })\n align: 'left' | 'right';\n\n /** Indicates the popover will match the width of its parent element. */\n @Prop({ reflect: true })\n block: boolean;\n\n /** The element that controls the popover's behavior. */\n @Prop()\n controlElement: HTMLElement;\n\n /**\n * Force the direction of the popover when it opens.\n * If no value is passed, the component will auto-detect the direction based on available space.\n */\n @Prop({ reflect: true })\n direction: 'up' | 'down';\n\n /**\n * Force the maximum height of the popover. This value will be interpreted as pixels.\n * If no value is passed, or the value exceeds available space, the component will auto-detect the maximum height based on available space.\n */\n @Prop()\n maxHeight: number;\n\n /** @deprecated */\n @Prop()\n minHeight: number;\n\n @Prop()\n mode: 'legacy' = null;\n\n /** Controls whether the popover is open or closed. */\n @Prop({ reflect: true, mutable: true })\n open: boolean;\n\n // #endregion\n // #region Events\n\n /**\n * Emitted when the popover is opened or closed.\n */\n @Event()\n popoverStateChanged: EventEmitter<{ open: boolean }>;\n\n // #endregion\n // #region Component Lifecycle Events\n\n disconnectedCallback() {\n this.removeViewportListeners();\n }\n\n componentDidLoad() {\n this.handleMinHeight();\n if (this.open) this.determinePopDirection();\n }\n\n // #endregion\n // #region Listeners\n\n @Listen('popoverState')\n popoverStateHandler(event: CustomEvent<{ open: boolean }>) {\n const {\n detail: { open },\n } = event;\n if (open === this.open) return;\n\n this.open = open;\n event.stopPropagation();\n }\n\n // #endregion\n // #region Public Methods API\n\n @Method()\n async scrollContainerTo(options: ScrollToOptions) {\n this.containerElement.scrollTo(options);\n }\n\n @Method()\n async toggle() {\n this.open = !this.open;\n }\n\n // #endregion\n // #region Watchers\n\n @Watch('minHeight')\n minHeightProvided() {\n this.handleMinHeight();\n }\n\n @Watch('open')\n async openChanged(open: boolean) {\n this.setRootElement();\n this.popoverStateChanged.emit({ open });\n\n if (open) {\n this.addViewportListeners();\n this.determinePopDirection();\n } else {\n this.removeViewportListeners();\n this.currentDirection = undefined;\n this.show = false;\n await waitForNextPaint();\n this.clearCSSProperties();\n }\n }\n\n // #endregion\n // #region Local Methods\n\n get isModule() {\n const isIframe = window !== window.top;\n const hasPlatformDimensions = Object.keys(window.Tecton?.platformDimensions ?? {}).length > 0;\n return isIframe && hasPlatformDimensions;\n }\n\n get providedDirection(): 'up' | 'down' | undefined {\n const { direction } = this;\n switch (direction) {\n case 'up':\n case 'down':\n return direction;\n default:\n return undefined;\n }\n }\n\n get validatedMaxHeight(): number | undefined {\n const { maxHeight } = this;\n return isNaN(maxHeight) ? undefined : maxHeight;\n }\n\n addViewportListeners() {\n window.addEventListener('resize', this.viewPortOrientationChanged);\n // #region remove when Popover API is supported in iOS\n window.addEventListener('scroll', this.viewPortChanged, { passive: true, capture: true });\n screen?.orientation?.addEventListener('change', this.viewPortOrientationChanged);\n window.addEventListener('orientationchange', this.viewPortOrientationChanged);\n\n // #endregion\n }\n\n clearCSSProperties() {\n this.containerElement.style.removeProperty('--comp-pop-max-height');\n this.containerElement.style.removeProperty('--comp-pop-top');\n this.containerElement.style.removeProperty('--comp-pop-bottom');\n this.containerElement.style.removeProperty('--comp-pop-left');\n this.containerElement.style.removeProperty('--comp-pop-right');\n this.containerElement.style.removeProperty('--comp-pop-width');\n this.containerElement.style.removeProperty('--comp-pop-opacity');\n }\n\n async determinePopDirection() {\n const { containerElement, controlElement, providedDirection, displayBuffer } = this;\n if (containerElement) containerElement.style.maxHeight = null;\n\n await waitForNextPaint();\n\n const { isModule } = this;\n const { top: controlTop, bottom: controlBottom } = controlElement?.getBoundingClientRect?.() ?? {\n top: 0,\n bottom: 0,\n };\n\n let windowHeight: number;\n let maxSpaceAbove: number;\n let maxSpaceBelow: number;\n\n if (isModule) {\n const { outletOffset = 0, innerHeight = window.innerHeight } = window.Tecton?.platformDimensions || {};\n const distanceToIframeBottom = window.visualViewport.height - controlBottom;\n const viewableSpaceBelow = innerHeight - (outletOffset + controlBottom);\n const isIframeShorterThanWindow = distanceToIframeBottom < viewableSpaceBelow;\n windowHeight = innerHeight;\n // If the top of the module is below the top of the window we just use the controlTop\n // Otherwise we need to add the outletOffset to the controlTop\n maxSpaceAbove = (outletOffset > 0 ? controlTop : controlTop + outletOffset) - displayBuffer;\n maxSpaceBelow = isIframeShorterThanWindow\n ? distanceToIframeBottom - displayBuffer\n : viewableSpaceBelow - displayBuffer;\n } else {\n windowHeight = window.visualViewport.height;\n maxSpaceAbove = controlTop - displayBuffer;\n maxSpaceBelow = windowHeight - controlBottom - displayBuffer;\n }\n\n const directionWithMostSpace: 'up' | 'down' = maxSpaceAbove > maxSpaceBelow ? 'up' : 'down';\n\n // We do not want to update the max height once the popover is open unless the page orientation shifts (resize or mobile use cases)\n const shouldUpdateMaxHeight =\n !containerElement.style.getPropertyValue('--comp-pop-max-height') || this.orientationChanged;\n // we do not want to constantly update the max-height after an orientation change, so we switch this back to false\n this.orientationChanged = false;\n const currentOrDetermineDirection = this.currentDirection || providedDirection || directionWithMostSpace;\n\n switch (currentOrDetermineDirection) {\n case 'up':\n if (shouldUpdateMaxHeight) {\n const priorityMaxHeight = this.validatedMaxHeight || maxSpaceAbove;\n const maxHeight = Math.min(maxSpaceAbove, priorityMaxHeight);\n containerElement.style.setProperty('--comp-pop-max-height', `${maxHeight}px`);\n }\n this.setDirectionAndShow('up');\n break;\n case 'down':\n if (shouldUpdateMaxHeight) {\n const priorityMaxHeight = this.validatedMaxHeight || maxSpaceBelow;\n const maxHeight = Math.min(maxSpaceBelow, priorityMaxHeight);\n containerElement.style.setProperty('--comp-pop-max-height', `${maxHeight}px`);\n }\n this.setDirectionAndShow('down');\n break;\n default:\n break;\n }\n }\n\n handleMinHeight = () => {\n if (this.minHeight) {\n handleDeprecationWarning(this, 'minHeight', 'prop');\n }\n };\n\n removeViewportListeners() {\n window.removeEventListener('resize', this.viewPortOrientationChanged);\n // #region remove when Popover API is supported in iOS\n window.removeEventListener('scroll', this.viewPortChanged);\n screen?.orientation?.removeEventListener('orientationchange', this.viewPortOrientationChanged);\n window.removeEventListener('orientationchange', this.viewPortOrientationChanged);\n\n // #endregion\n }\n\n setAbsoluteCSSProperties = async () => {\n const { controlElement, containerElement, currentDirection, align } = this;\n\n if (align === 'right') {\n containerElement.style.setProperty('--comp-pop-right', '0');\n containerElement.style.setProperty('--comp-pop-left', 'unset');\n } else {\n containerElement.style.setProperty('--comp-pop-left', '0');\n containerElement.style.setProperty('--comp-pop-right', 'unset');\n }\n\n if (this.block) {\n containerElement.style.setProperty('--comp-pop-width', '100%');\n }\n\n if (currentDirection === 'up') {\n const controlStyle = getComputedStyle(controlElement);\n const controlSize =\n parseInt(controlStyle.height || '0') +\n parseInt(controlStyle.borderTopWidth || '0') +\n parseInt(controlStyle.borderBottomWidth || '0');\n\n containerElement.style.setProperty('--comp-pop-bottom', `${controlSize}px`);\n }\n\n // Wait for one paint to prevent layout thrashing\n await waitForNextPaint();\n containerElement.style.setProperty('--comp-pop-opacity', '1');\n };\n\n setDirectionAndShow(direction: 'up' | 'down') {\n this.setRootElement();\n // Due to some runtime inconsistency across devices/browsers we need to add one more check here because the\n // popover can be closed between the time the popover is opened and the time the direction is determined\n const isOpen = this.open;\n if (!isOpen) return;\n\n this.currentDirection = direction;\n this.show = true;\n if (this.mode === 'legacy') {\n this.setAbsoluteCSSProperties();\n } else {\n this.setFixedCSSProperties();\n }\n }\n\n setFixedCSSProperties = async () => {\n const { controlElement, containerElement, currentDirection, rootElementRect } = this;\n const {\n top: controlTop,\n bottom: controlBottom,\n left: controlLeft,\n right: controlRight,\n } = controlElement?.getBoundingClientRect?.() ?? {\n top: 0,\n bottom: 0,\n left: 0,\n right: 0,\n };\n const popoverLeft: number = controlLeft - rootElementRect.left;\n\n if (this.block) containerElement.style.setProperty('--comp-pop-width', `${controlElement.offsetWidth || 0}px`);\n containerElement.style.setProperty('--comp-pop-left', `${popoverLeft}px`);\n containerElement.style.setProperty(\n '--comp-pop-right',\n `${rootElementRect.width + rootElementRect.left - controlRight}px`\n );\n\n if (currentDirection === 'up') {\n containerElement.style.setProperty(\n '--comp-pop-bottom',\n `${rootElementRect.height + rootElementRect.top - controlTop}px`\n );\n }\n if (currentDirection === 'down') {\n containerElement.style.setProperty('--comp-pop-top', `${controlBottom - rootElementRect.top}px`);\n }\n\n // Wait for one paint to prevent layout thrashing\n await waitForNextPaint();\n containerElement.style.setProperty('--comp-pop-opacity', '1');\n };\n\n setRootElement() {\n let currentElement: HTMLElement = this.hostElement;\n\n while (currentElement && currentElement !== document.documentElement) {\n const computedStyle = window.getComputedStyle(currentElement);\n\n // Check if the element has any styles applied that create a new containg block\n if (\n computedStyle.transform !== 'none' ||\n computedStyle.filter !== 'none' ||\n computedStyle.perspective !== 'none' ||\n computedStyle.containerType !== 'normal' ||\n ['transform', 'perspective', 'filter'].includes(computedStyle.willChange) ||\n ['layout', 'paint', 'strict', 'content'].includes(computedStyle.contain)\n ) {\n this.rootElementRect = currentElement.getBoundingClientRect();\n return;\n }\n\n const rootNode = currentElement.getRootNode();\n const isRootNodeWebComponent =\n typeof ShadowRoot !== 'undefined' &&\n rootNode instanceof ShadowRoot &&\n rootNode.host instanceof HTMLElement;\n if (isRootNodeWebComponent) {\n currentElement = rootNode.host;\n } else {\n currentElement = currentElement.parentElement;\n }\n }\n\n // Return the document's bounding rect if no element is found\n this.rootElementRect = {\n top: 0,\n bottom: 0,\n left: 0,\n right: 0,\n height: window.visualViewport.height,\n width: window.visualViewport.width,\n } as DOMRect;\n }\n\n viewPortChanged = () => {\n if (!this.open) return;\n this.determinePopDirection();\n };\n\n viewPortOrientationChanged = () => {\n this.orientationChanged = true;\n this.viewPortChanged();\n };\n\n // #endregion\n // #region Render Methods\n\n render() {\n const containerClasses = ['container', this.currentDirection];\n if (this.show) containerClasses.push('show');\n if (this.mode === 'legacy') containerClasses.push('legacy');\n\n return (\n <div\n ref={el => (this.containerElement = el)}\n class={containerClasses.join(' ')}\n test-id=\"outerContainer\"\n >\n <div\n ref={el => (this.contentElement = el)}\n class=\"content\"\n >\n <slot />\n </div>\n </div>\n );\n }\n\n // #endregion\n}\n"],"version":3}
1
+ {"file":"q2-popover2.js","mappings":";;;AAAA,MAAM,YAAY,GAAG,4iFAA4iF,CAAC;AAClkF,wBAAe,YAAY;;MCed,SAAS;;;;;;;;;QAQlB,kBAAa,GAAG,EAAE,CAAC;;QAEnB,uBAAkB,GAAY,KAAK,CAAC;QA8PpC,oBAAe,GAAG;YACd,IAAI,IAAI,CAAC,SAAS,EAAE;gBAChB,wBAAwB,CAAC,IAAI,EAAE,WAAW,EAAE,MAAM,CAAC,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AsB,EAAE;gBACxB,cAAc,GAAG,QAAQ,CAAC,IAAI,CAAC;aAClC;iBAAM;gBACH,cAAc,GAAG,cAAc,CAAC,aAAa,CAAC;aACjD;SACJ;;QAGD,IAAI,CAAC,eAAe,GAAG;YACnB,GAAG,EAAE,CAAC;YACN,MAAM,EAAE,CAAC;YACT,IAAI,EAAE,CAAC;YACP,KAAK,EAAE,CAAC;YACR,MAAM,EAAE,MAAM,CAAC,cAAc,CAAC,MAAM;YACpC,KAAK,EAAE,MAAM,CAAC,cAAc,CAAC,KAAK;SAC1B,CAAC;KAChB;;;IAeD,MAAM;QACF,MAAM,gBAAgB,GAAG,CAAC,WAAW,EAAE,IAAI,CAAC,gBAAgB,CAAC,CAAC;QAC9D,IAAI,IAAI,CAAC,IAAI;YAAE,gBAAgB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAC7C,IAAI,IAAI,CAAC,IAAI,KAAK,QAAQ;YAAE,gBAAgB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAE5D,QACI,4DACI,GAAG,EAAE,EAAE,KAAK,IAAI,CAAC,gBAAgB,GAAG,EAAE,CAAC,EACvC,KAAK,EAAE,gBAAgB,CAAC,IAAI,CAAC,GAAG,CAAC,aACzB,gBAAgB,IAExB,4DACI,GAAG,EAAE,EAAE,KAAK,IAAI,CAAC,cAAc,GAAG,EAAE,CAAC,EACrC,KAAK,EAAC,SAAS,IAEf,8DAAQ,CACN,CACJ,EACR;KACL;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/q2-popover/q2-popover.scss?tag=q2-popover&encapsulation=shadow","src/components/q2-popover/q2-popover.tsx"],"sourcesContent":["@import '../../styles/host.scss';\n@import '../../styles/functions';\n\n.container {\n display: none;\n}\n\n.show {\n display: block;\n position: fixed;\n z-index: var-list(--tct-popover-z-index, 50);\n margin: 0;\n padding: 0;\n overflow: auto;\n background: var-list(--tct-popover-background, --app-white, #ffffff);\n color: var-list(--tct-popover-font-color, --t-text, #4d4d4d);\n min-width: var-list(--tct-popover-min-width, 135px);\n margin-block: var-list(--tct-popover-margin-block, 0);\n box-shadow: var-list(--tct-popover-box-shadow, --app-shadow-1, unquote(\"0px 0px 2px rgba(0, 0, 0, 0.12), 0px 2px 4px rgba(0, 0, 0, 0.14)\"));\n border-width: var-list(--tct-popover-border-width, 0);\n border-style: solid;\n border-color: var-list(--tct-popover-border-color, transparent);\n border-radius: var-list(--tct-popover-border-radius, 0);\n // the following --comp variables are set via JS\n max-height: var(--comp-pop-max-height);\n left: var(--comp-pop-left);\n opacity: var(--comp-pop-opacity, 0);\n\n :host([block]) & {\n right: unset;\n width: var(--comp-pop-width);\n min-width: var-list(--tct-popover-min-width, unset);\n }\n\n :host([align='left']) & {\n left: var(--comp-pop-left);\n right: unset;\n }\n\n :host([align='right']) & {\n right: var(--comp-pop-right);\n left: unset;\n }\n\n &.down {\n top: var-list(--tct-popover-top, --comp-pop-top);\n bottom: unset;\n }\n\n &.up {\n top: unset;\n bottom: var(--comp-pop-bottom);\n }\n\n &.legacy {\n position: absolute;\n }\n\n @include tiny-scrollbar();\n}\n\nclick-elsewhere {\n position: relative;\n display: block;\n}\n","import {\n Component,\n Prop,\n h,\n ComponentInterface,\n Element,\n Watch,\n Method,\n Listen,\n EventEmitter,\n Event,\n State,\n} from '@stencil/core';\nimport { handleDeprecationWarning, waitForNextPaint } from '../../utils';\n\n@Component({ tag: 'q2-popover', shadow: true, styleUrl: 'q2-popover.scss' })\nexport class Q2Popover implements ComponentInterface {\n // #region Own Properties\n\n containerElement: HTMLDivElement;\n contentElement: HTMLDivElement;\n /**\n * The number of pixels to leave between the popover and the edge of the viewport\n */\n displayBuffer = 10;\n /** remove when Popover API is supported in iOS */\n orientationChanged: boolean = false;\n rootElementRect: DOMRect;\n\n // #endregion\n // #region Host HTML Element\n\n @Element()\n hostElement: HTMLElement;\n\n // #endregion\n // #region State Properties\n\n @State()\n currentDirection: 'down' | 'up' = undefined;\n\n // remove `show` when Popover API is supported in iOS\n @State()\n show: boolean = false;\n\n // #endregion\n // #region Public Property API\n\n /** Aligns the popover to the left or right side of the control element. */\n @Prop({ reflect: true })\n align: 'left' | 'right';\n\n /** Indicates the popover will match the width of its parent element. */\n @Prop({ reflect: true })\n block: boolean;\n\n /** The element that controls the popover's behavior. */\n @Prop({ mutable: true })\n controlElement: HTMLElement;\n\n /**\n * Force the direction of the popover when it opens.\n * If no value is passed, the component will auto-detect the direction based on available space.\n */\n @Prop({ reflect: true })\n direction: 'up' | 'down';\n\n /**\n * Force the maximum height of the popover. This value will be interpreted as pixels.\n * If no value is passed, or the value exceeds available space, the component will auto-detect the maximum height based on available space.\n */\n @Prop()\n maxHeight: number;\n\n /** @deprecated */\n @Prop()\n minHeight: number;\n\n @Prop()\n mode: 'legacy' = null;\n\n /** Controls whether the popover is open or closed. */\n @Prop({ reflect: true, mutable: true })\n open: boolean;\n\n // #endregion\n // #region Events\n\n /**\n * Emitted when the popover is opened or closed.\n */\n @Event()\n popoverStateChanged: EventEmitter<{ open: boolean }>;\n\n // #endregion\n // #region Component Lifecycle Events\n\n disconnectedCallback() {\n this.removeViewportListeners();\n }\n\n componentDidLoad() {\n this.handleMinHeight();\n this.handleControlElement();\n if (this.open) {\n this.setRootElement();\n this.addViewportListeners();\n this.determinePopDirection();\n }\n }\n\n // #endregion\n // #region Listeners\n\n @Listen('popoverState')\n popoverStateHandler(event: CustomEvent<{ open: boolean }>) {\n const {\n detail: { open },\n } = event;\n if (open === this.open) return;\n\n this.open = open;\n event.stopPropagation();\n }\n\n // #endregion\n // #region Public Methods API\n\n @Method()\n async scrollContainerTo(options: ScrollToOptions) {\n this.containerElement.scrollTo(options);\n }\n\n @Method()\n async toggle() {\n this.open = !this.open;\n }\n\n // #endregion\n // #region Watchers\n\n @Watch('controlElement')\n handleControlElement() {\n if (this.controlElement?.tagName === 'Q2-INPUT') {\n this.controlElement = this.controlElement.shadowRoot.querySelector('.input-container');\n }\n }\n\n @Watch('minHeight')\n minHeightProvided() {\n this.handleMinHeight();\n }\n\n @Watch('open')\n async openChanged(open: boolean) {\n this.setRootElement();\n this.popoverStateChanged.emit({ open });\n\n if (open) {\n this.addViewportListeners();\n this.determinePopDirection();\n } else {\n this.removeViewportListeners();\n this.currentDirection = undefined;\n this.show = false;\n await waitForNextPaint();\n this.clearCSSProperties();\n }\n }\n\n // #endregion\n // #region Local Methods\n\n get isModule() {\n const isIframe = window !== window.top;\n const hasPlatformDimensions = Object.keys(window.Tecton?.platformDimensions ?? {}).length > 0;\n return isIframe && hasPlatformDimensions;\n }\n\n get providedDirection(): 'up' | 'down' | undefined {\n const { direction } = this;\n switch (direction) {\n case 'up':\n case 'down':\n return direction;\n default:\n return undefined;\n }\n }\n\n get validatedMaxHeight(): number | undefined {\n const { maxHeight } = this;\n return isNaN(maxHeight) ? undefined : maxHeight;\n }\n\n addViewportListeners() {\n window.addEventListener('resize', this.viewPortOrientationChanged);\n // #region remove when Popover API is supported in iOS\n window.addEventListener('scroll', this.viewPortChanged, { passive: true, capture: true });\n screen?.orientation?.addEventListener('change', this.viewPortOrientationChanged);\n window.addEventListener('orientationchange', this.viewPortOrientationChanged);\n\n // #endregion\n }\n\n clearCSSProperties() {\n this.containerElement.style.removeProperty('--comp-pop-max-height');\n this.containerElement.style.removeProperty('--comp-pop-top');\n this.containerElement.style.removeProperty('--comp-pop-bottom');\n this.containerElement.style.removeProperty('--comp-pop-left');\n this.containerElement.style.removeProperty('--comp-pop-right');\n this.containerElement.style.removeProperty('--comp-pop-width');\n this.containerElement.style.removeProperty('--comp-pop-opacity');\n }\n\n async determinePopDirection() {\n const { containerElement, controlElement, providedDirection, displayBuffer } = this;\n if (containerElement) containerElement.style.maxHeight = null;\n\n await waitForNextPaint();\n\n const { isModule } = this;\n const { top: controlTop, bottom: controlBottom } = controlElement?.getBoundingClientRect?.() ?? {\n top: 0,\n bottom: 0,\n };\n\n let windowHeight: number;\n let maxSpaceAbove: number;\n let maxSpaceBelow: number;\n\n if (isModule) {\n const { outletOffset = 0, innerHeight = window.innerHeight } = window.Tecton?.platformDimensions || {};\n const distanceToIframeBottom = window.visualViewport.height - controlBottom;\n const viewableSpaceBelow = innerHeight - (outletOffset + controlBottom);\n const isIframeShorterThanWindow = distanceToIframeBottom < viewableSpaceBelow;\n windowHeight = innerHeight;\n // If the top of the module is below the top of the window we just use the controlTop\n // Otherwise we need to add the outletOffset to the controlTop\n maxSpaceAbove = (outletOffset > 0 ? controlTop : controlTop + outletOffset) - displayBuffer;\n maxSpaceBelow = isIframeShorterThanWindow\n ? distanceToIframeBottom - displayBuffer\n : viewableSpaceBelow - displayBuffer;\n } else {\n windowHeight = window.visualViewport.height;\n maxSpaceAbove = controlTop - displayBuffer;\n maxSpaceBelow = windowHeight - controlBottom - displayBuffer;\n }\n\n const directionWithMostSpace: 'up' | 'down' = maxSpaceAbove > maxSpaceBelow ? 'up' : 'down';\n\n // We do not want to update the max height once the popover is open unless the page orientation shifts (resize or mobile use cases)\n const shouldUpdateMaxHeight =\n !containerElement.style.getPropertyValue('--comp-pop-max-height') || this.orientationChanged;\n // we do not want to constantly update the max-height after an orientation change, so we switch this back to false\n this.orientationChanged = false;\n const currentOrDetermineDirection = this.currentDirection || providedDirection || directionWithMostSpace;\n\n switch (currentOrDetermineDirection) {\n case 'up':\n if (shouldUpdateMaxHeight) {\n const priorityMaxHeight = this.validatedMaxHeight || maxSpaceAbove;\n const maxHeight = Math.min(maxSpaceAbove, priorityMaxHeight);\n containerElement.style.setProperty('--comp-pop-max-height', `${maxHeight}px`);\n }\n this.setDirectionAndShow('up');\n break;\n case 'down':\n if (shouldUpdateMaxHeight) {\n const priorityMaxHeight = this.validatedMaxHeight || maxSpaceBelow;\n const maxHeight = Math.min(maxSpaceBelow, priorityMaxHeight);\n containerElement.style.setProperty('--comp-pop-max-height', `${maxHeight}px`);\n }\n this.setDirectionAndShow('down');\n break;\n default:\n break;\n }\n }\n\n handleMinHeight = () => {\n if (this.minHeight) {\n handleDeprecationWarning(this, 'minHeight', 'prop');\n }\n };\n\n removeViewportListeners() {\n window.removeEventListener('resize', this.viewPortOrientationChanged);\n // #region remove when Popover API is supported in iOS\n window.removeEventListener('scroll', this.viewPortChanged);\n screen?.orientation?.removeEventListener('orientationchange', this.viewPortOrientationChanged);\n window.removeEventListener('orientationchange', this.viewPortOrientationChanged);\n\n // #endregion\n }\n\n setAbsoluteCSSProperties = async () => {\n const { controlElement, containerElement, currentDirection, align } = this;\n\n if (align === 'right') {\n containerElement.style.setProperty('--comp-pop-right', '0');\n containerElement.style.setProperty('--comp-pop-left', 'unset');\n } else {\n containerElement.style.setProperty('--comp-pop-left', '0');\n containerElement.style.setProperty('--comp-pop-right', 'unset');\n }\n\n if (this.block) {\n containerElement.style.setProperty('--comp-pop-width', '100%');\n }\n\n if (currentDirection === 'up') {\n const controlStyle = getComputedStyle(controlElement);\n const controlSize =\n parseInt(controlStyle.height || '0') +\n parseInt(controlStyle.borderTopWidth || '0') +\n parseInt(controlStyle.borderBottomWidth || '0');\n\n containerElement.style.setProperty('--comp-pop-bottom', `${controlSize}px`);\n }\n\n // Wait for one paint to prevent layout thrashing\n await waitForNextPaint();\n containerElement.style.setProperty('--comp-pop-opacity', '1');\n };\n\n setDirectionAndShow(direction: 'up' | 'down') {\n this.setRootElement();\n // Due to some runtime inconsistency across devices/browsers we need to add one more check here because the\n // popover can be closed between the time the popover is opened and the time the direction is determined\n const isOpen = this.open;\n if (!isOpen) return;\n\n this.currentDirection = direction;\n this.show = true;\n if (this.mode === 'legacy') {\n this.setAbsoluteCSSProperties();\n } else {\n this.setFixedCSSProperties();\n }\n }\n\n setFixedCSSProperties = async () => {\n const { controlElement, containerElement, currentDirection, rootElementRect } = this;\n const {\n top: controlTop,\n bottom: controlBottom,\n left: controlLeft,\n right: controlRight,\n } = controlElement?.getBoundingClientRect?.() ?? {\n top: 0,\n bottom: 0,\n left: 0,\n right: 0,\n };\n const popoverLeft: number = controlLeft - rootElementRect.left;\n\n if (this.block) containerElement.style.setProperty('--comp-pop-width', `${controlElement?.offsetWidth || 0}px`);\n containerElement.style.setProperty('--comp-pop-left', `${popoverLeft}px`);\n containerElement.style.setProperty(\n '--comp-pop-right',\n `${rootElementRect.width + rootElementRect.left - controlRight}px`\n );\n\n if (currentDirection === 'up') {\n containerElement.style.setProperty(\n '--comp-pop-bottom',\n `${rootElementRect.height + rootElementRect.top - controlTop}px`\n );\n }\n if (currentDirection === 'down') {\n containerElement.style.setProperty('--comp-pop-top', `${controlBottom - rootElementRect.top}px`);\n }\n\n // Wait for one paint to prevent layout thrashing\n await waitForNextPaint();\n containerElement.style.setProperty('--comp-pop-opacity', '1');\n };\n\n setRootElement() {\n let currentElement: HTMLElement = this.hostElement;\n\n while (currentElement && currentElement !== document.documentElement) {\n const computedStyle = window.getComputedStyle(currentElement);\n\n // Check if the element has any styles applied that create a new containg block\n if (\n computedStyle.transform !== 'none' ||\n computedStyle.filter !== 'none' ||\n computedStyle.perspective !== 'none' ||\n computedStyle.containerType !== 'normal' ||\n ['transform', 'perspective', 'filter'].includes(computedStyle.willChange) ||\n ['layout', 'paint', 'strict', 'content'].includes(computedStyle.contain)\n ) {\n this.rootElementRect = currentElement.getBoundingClientRect();\n return;\n }\n\n const rootNode = currentElement.getRootNode();\n const isRootNodeWebComponent =\n typeof ShadowRoot !== 'undefined' &&\n rootNode instanceof ShadowRoot &&\n rootNode.host instanceof HTMLElement;\n if (isRootNodeWebComponent) {\n currentElement = rootNode.host;\n } else {\n currentElement = currentElement.parentElement;\n }\n }\n\n // Return the document's bounding rect if no element is found\n this.rootElementRect = {\n top: 0,\n bottom: 0,\n left: 0,\n right: 0,\n height: window.visualViewport.height,\n width: window.visualViewport.width,\n } as DOMRect;\n }\n\n viewPortChanged = () => {\n if (!this.open) return;\n this.determinePopDirection();\n };\n\n viewPortOrientationChanged = () => {\n this.orientationChanged = true;\n this.viewPortChanged();\n };\n\n // #endregion\n // #region Render Methods\n\n render() {\n const containerClasses = ['container', this.currentDirection];\n if (this.show) containerClasses.push('show');\n if (this.mode === 'legacy') containerClasses.push('legacy');\n\n return (\n <div\n ref={el => (this.containerElement = el)}\n class={containerClasses.join(' ')}\n test-id=\"outerContainer\"\n >\n <div\n ref={el => (this.contentElement = el)}\n class=\"content\"\n >\n <slot />\n </div>\n </div>\n );\n }\n\n // #endregion\n}\n"],"version":3}
@@ -2,7 +2,7 @@ import { proxyCustomElement, HTMLElement, createEvent, h, Fragment } from '@sten
2
2
  import { c as createGuid, o as overrideFocus, i as isEventFromElement, r as renderLabel } from './index2.js';
3
3
  import { d as defineCustomElement$2 } from './q2-icon2.js';
4
4
 
5
- const q2RadioGroupCss = "*{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{margin-top:var(--tct-scale-2, var(--app-scale-2x, 10px))}fieldset{padding:0;margin:0;border:0;position:relative}.label-row{display:grid;grid-template-columns:1fr 24px;grid-template-areas:\"label icon\";gap:var(--app-scale-1x, 5px)}.label-row q2-icon{grid-area:icon;margin-top:-2px;margin-bottom:-2px}.group-legend{font-weight:600}.optional-tag{margin-left:var(--tct-input-label-optional-margin-left, var(--t-input-label-optional-margin-left, var(--tct-scale-1, var(--app-scale-1x, 5px))));color:var(--tct-input-label-optional-font-color, var(--t-input-label-optional-font-color, var(--t-textA, var(--t-a11y-gray-color, rgba(77, 77, 77, 0.77)))));font-size:var(--tct-input-label-optional-font-size, var(--t-input-label-optional-font-size, 12px));font-weight:var(--tct-input-label-optional-font-weight, var(--t-input-label-optional-font-weight, 400))}.tile-container,.tile-container .options-container{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;flex-grow:1}.options-container{--comp-default-margin:var(--app-scale-1x, 5px) 0;--comp-options-margin:var(--tct-radio-group-options-margin, var(--t-radio-group-options-margin, var(--comp-default-margin, 5px 0)));margin:var(--comp-options-margin);padding:var(--tct-radio-group-options-padding, var(--t-radio-group-options-padding, var(--app-scale-1x, 5px)));border-width:1px;border-color:transparent;border-style:solid;border-radius:var(--tct-border-radius-1, var(--app-border-radius-1, 4px))}:host([has-error]) .options-container{border-color:var(--tct-input-error-border-color, var(--const-stoplight-alert, #d20a0a))}:host([has-error=false]) .options-container{border-color:transparent}.tile-container.left{justify-content:start}.tile-container.right{justify-content:end}.tile-container .options-container{gap:var(--tct-radio-group-tile-gap, var(--t-radio-group-tile-gap, var(--app-scale-2x, 10px)));justify-content:inherit}";
5
+ const q2RadioGroupCss = "*{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{margin-top:var(--tct-radio-group-margin-top, var(--app-scale-2x, 10px))}fieldset{padding:var(--tct-radio-group-fieldset-padding, 0);margin:0;border:0;position:relative}.label-row{display:grid;grid-template-columns:1fr 24px;grid-template-areas:\"label icon\";column-gap:var(--tct-radio-group-label-column-gap, var(--app-scale-2x, 10px))}.label-row q2-icon{grid-area:icon;margin-top:-2px;margin-bottom:-2px}.group-legend{font-weight:600}legend.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;border:0}.optional-tag{margin-left:var(--tct-radio-group-label-optional-margin-left, var(--app-scale-1x, 5px));color:var(--tct-radio-group-label-optional-color, var(--t-radio-group-label-optional-color, var(--tct-a11y-color, var(--t-a11y-color, var(--tct-a11y-gray-color, var(--t-a11y-gray-color, var(--tct-gray-7, var(--t-gray-7, var(--tct-gray-d1, var(--t-gray-d1, var(--app-gray-d1, rgba(77, 77, 77, 0.77))))))))))));font-size:var(--tct-radio-group-label-optional-font-size, var(--t-radio-group-label-optional-font-size, 12px));font-weight:var(--tct-radio-group-label-optional-font-weight, var(--t-radio-group-label-optional-font-weight, 400))}.tile-container,.tile-container .options-container{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;flex-grow:1}.options-container{--comp-default-margin:var(--app-scale-1x, 5px) 0;--comp-options-margin:var(--tct-radio-group-options-margin, var(--t-radio-group-options-margin, var(--comp-default-margin, 5px 0)));margin:var(--comp-options-margin);padding:var(--tct-radio-group-options-padding, var(--t-radio-group-options-padding, var(--app-scale-1x, 5px)));border-width:1px;border-color:transparent;border-style:solid;border-radius:var(--tct-radio-group-border-radius, var(--app-border-radius-1, 4px))}:host([has-error]) .options-container{border-color:var(--tct-radio-group-error-border-color, var(--const-stoplight-alert, #d20a0a))}:host([has-error=false]) .options-container{border-color:transparent}.tile-container.left{justify-content:start}.tile-container.right{justify-content:end}.tile-container .options-container{gap:var(--tct-radio-group-tile-gap, var(--t-radio-group-tile-gap, var(--app-scale-2x, 10px)));justify-content:inherit}";
6
6
  const Q2RadioGroupStyle0 = q2RadioGroupCss;
7
7
 
8
8
  const Q2RadioGroup$1 = /*@__PURE__*/ proxyCustomElement(class Q2RadioGroup extends HTMLElement {
@@ -182,8 +182,8 @@ const Q2RadioGroup$1 = /*@__PURE__*/ proxyCustomElement(class Q2RadioGroup exten
182
182
  render() {
183
183
  const showLabel = this.label || this.optional || this.readonly;
184
184
  const { hasError } = this;
185
- const showLabelRow = showLabel || hasError;
186
- return (h(Fragment, { key: '17664abacfe3cdee9bf47664d76bd293a32cdf44' }, showLabelRow && (h("div", { key: 'f6517c291e66c8980e3adfa3ae6f192a6932e171', class: "label-row" }, showLabel && h("div", { key: 'd7f90dfc20636f4c5a6a45bed929607f3c0c5f49', class: "group-legend" }, renderLabel(this)), hasError && (h("q2-icon", { key: '864800b57dbc581a8ec8ac251e03b5277d615165', type: "error", "test-id": "iconError" })))), h("fieldset", { key: '0598273c1532aa0abfcd92a38576299a6bdc6fea', onChange: this.onInnerRadioChange, "aria-invalid": `${this.hasError}` }, showLabel && h("legend", { key: 'fd192a0ee8d2b34828edc1eadfacb660571df83e', class: "sr" }, renderLabel(this)), this.inputDom())));
185
+ const showLabelRow = (showLabel && !this.hideLabel) || hasError;
186
+ return (h(Fragment, { key: 'd1d5bc5ec6dd3fc33332fa49e64ccb1dac4b542e' }, showLabelRow && (h("div", { key: 'f2de38984a59682953612d73981a2de1afa1bc58', class: "label-row" }, showLabel && !this.hideLabel && h("div", { key: '24d1a40c5ad7546e5901dd96e46a15e71d8ca4c3', class: "group-legend" }, renderLabel(this)), hasError && (h("q2-icon", { key: '24be48ddc9c8cc60fa356056da6c59224a358a59', type: "error", "test-id": "iconError" })))), h("fieldset", { key: '48da393294f67ac8349606b563a122e0b6e70917', onChange: this.onInnerRadioChange, "aria-invalid": hasError ? `${hasError}` : undefined }, showLabel && h("legend", { key: '544ba2b62bebcb501806527fec2354aaa70c3dd9', class: "sr-only" }, renderLabel(this)), this.inputDom())));
187
187
  }
188
188
  get hostElement() { return this; }
189
189
  static get watchers() { return {
@@ -1 +1 @@
1
- {"file":"q2-radio-group.js","mappings":";;;;AAAA,MAAM,eAAe,GAAG,sgFAAsgF,CAAC;AAC/hF,2BAAe,eAAe;;MCejBA,cAAY;;;;;;;QAGrB,QAAG,GAAW,eAAe,UAAU,EAAE,EAAE,CAAC;QA0N5C,uBAAkB,GAAG;;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E,QAAQ,EAAE,OAAO,CAAC,CAAC,QAAQ,CAAC,aAAa,CAAC,GAAG,aAAa,GAAG,QAAQ,CAAC;YACjG,QACI,WAAK,KAAK,EAAE,kBAAkB,SAAS,EAAE,IACrC,WAAK,KAAK,EAAC,mBAAmB,IAC1B,eAAQ,CACN,CACJ,EACR;SACL;aAAM;YACH,QACI,WAAK,KAAK,EAAC,mBAAmB,IAC1B,eAAQ,CACN,EACR;SACL;KACJ;;;IAoBD,MAAM;QACF,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,QAAQ,CAAC;QAC/D,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAC;QAC1B,MAAM,YAAY,GAAG,SAAS,IAAI,QAAQ,CAAC;QAC3C,QACI,EAAC,QAAQ,uDACJ,YAAY,KACT,4DAAK,KAAK,EAAC,WAAW,IACjB,SAAS,IAAI,4DAAK,KAAK,EAAC,cAAc,IAAE,WAAW,CAAC,IAAI,CAAC,CAAO,EAChE,QAAQ,KACL,gEACI,IAAI,EAAC,OAAO,aACJ,WAAW,GACZ,CACd,CACC,CACT,EACD,iEACI,QAAQ,EAAE,IAAI,CAAC,kBAAkB,kBACnB,GAAG,IAAI,CAAC,QAAQ,EAAE,IAE/B,SAAS,IAAI,+DAAQ,KAAK,EAAC,IAAI,IAAE,WAAW,CAAC,IAAI,CAAC,CAAU,EAC5D,IAAI,CAAC,QAAQ,EAAE,CACT,CACJ,EACb;KACL;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["Q2RadioGroup"],"sources":["src/components/q2-radio-group/q2-radio-group.scss?tag=q2-radio-group&encapsulation=shadow","src/components/q2-radio-group/q2-radio-group.tsx"],"sourcesContent":["@import '../../styles/host.scss';\n@import '../../styles/functions';\n\n:host {\n margin-top: var-list(--tct-scale-2, --app-scale-2x, 10px);\n}\n\nfieldset {\n padding: 0;\n margin: 0;\n border: 0;\n position: relative;\n}\n\n.label-row {\n display: grid;\n grid-template-columns: 1fr 24px;\n grid-template-areas: 'label icon';\n gap: var-list(--app-scale-1x, 5px);\n\n q2-icon {\n grid-area: icon;\n margin-top: -2px;\n margin-bottom: -2px;\n }\n}\n\n.group-legend {\n font-weight: 600;\n}\n\n.optional-tag {\n margin-left: var-list(var-prefixer(input-label-optional-margin-left), --tct-scale-1, --app-scale-1x, 5px);\n color: var-list(\n var-prefixer(input-label-optional-font-color),\n --t-textA,\n --t-a11y-gray-color,\n rgba(77, 77, 77, 0.77)\n );\n font-size: var-list(var-prefixer(input-label-optional-font-size), 12px);\n font-weight: var-list(var-prefixer(input-label-optional-font-weight), 400);\n}\n\n.tile-container {\n &,\n .options-container {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-wrap: wrap;\n flex-grow: 1;\n }\n}\n\n.options-container {\n --comp-default-margin: #{var-list(--app-scale-1x, 5px)} 0;\n --comp-options-margin: #{var-list(var-prefixer(radio-group-options-margin), --comp-default-margin, unquote('5px 0'))};\n margin: var(--comp-options-margin);\n padding: var-list(var-prefixer(radio-group-options-padding), --app-scale-1x, 5px);\n border-width: 1px;\n border-color: transparent;\n border-style: solid;\n border-radius: var-list(--tct-border-radius-1, --app-border-radius-1, 4px);\n\n :host([has-error]) & {\n border-color: var-list(--tct-input-error-border-color, --const-stoplight-alert, #d20a0a);\n }\n :host([has-error='false']) & {\n border-color: transparent;\n }\n}\n\n.tile-container {\n &.left {\n justify-content: start;\n }\n &.right {\n justify-content: end;\n }\n\n .options-container {\n gap: var-list(var-prefixer(radio-group-tile-gap), --app-scale-2x, 10px);\n justify-content: inherit;\n }\n}\n","import {\n Component,\n Prop,\n Element,\n h,\n Listen,\n EventEmitter,\n Event,\n ComponentInterface,\n Watch,\n Fragment,\n Method,\n} from '@stencil/core';\nimport { createGuid, isEventFromElement, overrideFocus, renderLabel } from 'src/utils';\n\n@Component({ tag: 'q2-radio-group', shadow: true, styleUrl: 'q2-radio-group.scss' })\nexport class Q2RadioGroup implements ComponentInterface {\n // #region Own Properties\n\n _id: string = `radio-group-${createGuid()}`;\n mutationObserver: MutationObserver;\n\n // #endregion\n // #region Host HTML Element\n\n @Element()\n hostElement: HTMLElement;\n\n // #endregion\n // #region Public Property API\n\n /** Determines if all radios in the group are put into a `disabled` state. */\n @Prop({ reflect: true })\n disabled: boolean = false;\n\n /** Determines if the component should display in an errant state. */\n @Prop({ reflect: true })\n hasError: boolean = false;\n\n /**\n * Hide's the group's `<label>` element from view.\n * @warning\n * Only use when a visible label is impractical.\n */\n @Prop({ reflect: true, mutable: true })\n hideLabel: boolean;\n\n /**\n * Text for the fieldset legend describing the radio group.\n * @localizable\n */\n @Prop({ reflect: true })\n label: string;\n\n /** Identifier which ties all radios together for accessibility and DOM selection. */\n @Prop({ reflect: true })\n name: string;\n\n /** Appends \"(optional)\" to the group label, and sets `aria-required` on the nested input tag to `false`. */\n @Prop({ reflect: true })\n optional: boolean;\n\n /** Determines if all radios in the group can be focused, but not interacted with. */\n @Prop({ reflect: true })\n readonly: boolean;\n\n /** Provides alignment direction for tile-style radio group. */\n @Prop({ reflect: true })\n tileAlignment: 'left' | 'center' | 'right' = 'center';\n\n /** @deprecated */\n @Prop({ reflect: true, mutable: true })\n tilelayout: boolean;\n\n /** Show the radio group as a horizontal set of tiles. */\n @Prop({ reflect: true, mutable: true })\n tileLayout: boolean;\n\n /** The `value` of the currently selected `q2-radio` within the `q2-radio-group`. */\n @Prop({ mutable: true })\n value: string;\n\n // #endregion\n // #region Events\n\n /**\n * Emitted when the value of the radio group changes.\n * @legacyEvent\n */\n @Event()\n change: EventEmitter<{ value: string }>;\n\n // #endregion\n // #region Component Lifecycle Events\n\n componentWillLoad() {\n this.checkedRadioExists();\n this.onMutationObserved();\n this.handleDeprecatedTilelayout(this.tilelayout);\n }\n\n componentDidLoad() {\n const observer = new MutationObserver(this.onMutationObserved);\n observer.observe(this.hostElement, { childList: true });\n this.mutationObserver = observer;\n overrideFocus(this.hostElement);\n this.checkedRadioExists();\n }\n\n // #endregion\n // #region Listeners\n\n @Listen('change')\n onHostElementChange(event: CustomEvent) {\n if (event.target === this.hostElement) {\n if (!this.hostElement.onchange) {\n this.value = event.detail.value;\n }\n }\n }\n\n @Listen('focus')\n delegateFocus(event: FocusEvent) {\n if (!isEventFromElement(event, this.hostElement)) return;\n const radio = this.hostElement.querySelector('q2-radio[checked]') || this.hostElement.querySelector('q2-radio');\n radio?.dispatchEvent(new FocusEvent('focus'));\n }\n\n @Listen('keydown')\n keydownHandler(event: KeyboardEvent) {\n const currentValue = (event.target as HTMLElement).getAttribute('value') || this.value;\n let index = this.radioElements.findIndex(\n el => el === event.target || (el as HTMLElement).getAttribute('value') === currentValue\n );\n let sign = 0;\n switch (event.key) {\n case 'ArrowLeft':\n case 'ArrowUp':\n sign = -1;\n break;\n\n case 'ArrowRight':\n case 'ArrowDown':\n sign = 1;\n break;\n }\n\n if (index === -1 || sign === 0) {\n return;\n }\n index += sign;\n index = sign < 0 ? Math.max(0, index) : Math.min(this.radioElements.length - 1, index);\n event.preventDefault();\n if (!this.readonly) {\n this.value = this.radioElements[index].value;\n }\n this.radioElements[index].dispatchEvent(new FocusEvent('focus'));\n }\n\n // #endregion\n // #region Public Methods API\n\n /**\n * Emulates clicking the `<q2-radio>` option with the provided value.\n *\n * @testOnly\n */\n @Method()\n setValue(value: string) {\n this.radioElements.forEach(radio => {\n if (value !== radio.value) return;\n radio.click();\n });\n }\n\n // #endregion\n // #region Watchers\n\n @Watch('disabled')\n disabledUpdated() {\n this.radioElements.forEach(radio => {\n radio.groupDisabled = this.disabled;\n });\n }\n\n @Watch('name')\n nameUpdated() {\n this.radioElements.forEach(radio => {\n radio.name = this.name || this._id;\n });\n }\n\n @Watch('readonly')\n readonlyUpdated() {\n const readonly = this.readonly;\n this.radioElements.forEach(radio => (radio.groupReadonly = readonly));\n }\n\n @Watch('tilelayout')\n handleDeprecatedTilelayout(tilelayout: boolean) {\n if (typeof tilelayout !== 'boolean') return;\n this.tileLayout = tilelayout;\n this.tilelayout = undefined;\n }\n\n @Watch('tileLayout')\n tileLayoutUpdated(tileLayout: boolean) {\n this.radioElements.forEach(radio => {\n radio.groupTileLayout = tileLayout;\n });\n }\n\n @Watch('value')\n valueUpdated(newVal: string) {\n this.radioElements.forEach(radio => {\n radio.checked = newVal === radio.value;\n // Removes checked attribute from trailing radios, if multiple individual radio's are intially checked (checked={true}) at componentDidLoad\n if (!radio.checked) {\n radio.removeAttribute('checked');\n radio.tabIndex = -1;\n } else if (radio.checked) {\n radio.tabIndex = 0;\n }\n });\n }\n\n // #endregion\n // #region Local Methods\n\n get inputId() {\n return this._id;\n }\n\n get radioElements() {\n return Array.from(this.hostElement.querySelectorAll('q2-radio')) as HTMLQ2RadioElement[];\n }\n\n checkedRadioExists = () => {\n // Returns first checked individual q2-radio or undefined if none are set to checked={true}\n const firstCheckedRadio = this.radioElements.find(radio => radio.checked === true) || undefined;\n\n // Changes radio-group[\"value\"] if inital value is not set and if a any individual q2-radio is checked\n if (!this.value && !!firstCheckedRadio) {\n this.value = firstCheckedRadio.value;\n } else if (!this.value && !firstCheckedRadio) {\n // if no radios are meant to be checked, then assign first radio tabIndex of 0\n if (this.radioElements.length) this.radioElements[0].tabIndex = 0;\n }\n };\n\n inputDom() {\n if (this.tileLayout) {\n const { tileAlignment } = this;\n const alignment = ['left', 'center', 'right'].includes(tileAlignment) ? tileAlignment : 'center';\n return (\n <div class={`tile-container ${alignment}`}>\n <div class=\"options-container\">\n <slot />\n </div>\n </div>\n );\n } else {\n return (\n <div class=\"options-container\">\n <slot />\n </div>\n );\n }\n }\n\n onInnerRadioChange = (event: CustomEvent) => {\n event.stopImmediatePropagation();\n if (this.readonly) return;\n\n this.change.emit({ value: event.detail.value });\n };\n\n onMutationObserved = () => {\n this.valueUpdated(this.value);\n this.nameUpdated();\n this.disabledUpdated();\n this.readonlyUpdated();\n this.tileLayoutUpdated(this.tileLayout);\n };\n\n // #endregion\n // #region Render Methods\n\n render() {\n const showLabel = this.label || this.optional || this.readonly;\n const { hasError } = this;\n const showLabelRow = showLabel || hasError;\n return (\n <Fragment>\n {showLabelRow && (\n <div class=\"label-row\">\n {showLabel && <div class=\"group-legend\">{renderLabel(this)}</div>}\n {hasError && (\n <q2-icon\n type=\"error\"\n test-id=\"iconError\"\n ></q2-icon>\n )}\n </div>\n )}\n <fieldset\n onChange={this.onInnerRadioChange}\n aria-invalid={`${this.hasError}`}\n >\n {showLabel && <legend class=\"sr\">{renderLabel(this)}</legend>}\n {this.inputDom()}\n </fieldset>\n </Fragment>\n );\n }\n\n // #endregion\n}\n"],"version":3}
1
+ {"file":"q2-radio-group.js","mappings":";;;;AAAA,MAAM,eAAe,GAAG,21FAA21F,CAAC;AACp3F,2BAAe,eAAe;;MCejBA,cAAY;;;;;;;QAGrB,QAAG,GAAW,eAAe,UAAU,EAAE,EAAE,CAAC;QA0N5C,uBAAkB,GAAG;;YAEjB,MAAM,iBAAiB,GAAG,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,KAAK,IAAI,KAAK,CAAC,OAAO,KAAK,IAAI,CAAC,IAAI,SAAS,CAAC;;YAGhG,IAAI,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC,CAAC,iBAAiB,EAAE;gBACpC,IAAI,CAAC,KAAK,GAAG,iBAAiB,CAAC,KAAK,CAAC;aACxC;iBAAM,IAAI,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC,iBAAiB,EAAE;;gBAE1C,IAAI,IAAI,CAAC,aAAa,CAAC,MAAM;oBAAE,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,QAAQ,GAAG,CAAC,CAAC;aACrE;SACJ,CAAC;QAsBF,uBAAkB,GAAG,CAAC,KAAkB;YACpC,KAAK,CAAC,wBAAwB,EAAE,CAAC;YACjC,IAAI,IAAI,CAAC,QAAQ;gBAAE,OAAO;YAE1B,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,KAAK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DAAK,KAAK,EAAC,cAAc,IAAE,WAAW,CAAC,IAAI,CAAC,CAAO,EACnF,QAAQ,KACL,gEACI,IAAI,EAAC,OAAO,aACJ,WAAW,GACZ,CACd,CACC,CACT,EACD,iEACI,QAAQ,EAAE,IAAI,CAAC,kBAAkB,kBACnB,QAAQ,GAAG,GAAG,QAAQ,EAAE,GAAG,SAAS,IAEjD,SAAS,IAAI,+DAAQ,KAAK,EAAC,SAAS,IAAE,WAAW,CAAC,IAAI,CAAC,CAAU,EACjE,IAAI,CAAC,QAAQ,EAAE,CACT,CACJ,EACb;KACL;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["Q2RadioGroup"],"sources":["src/components/q2-radio-group/q2-radio-group.scss?tag=q2-radio-group&encapsulation=shadow","src/components/q2-radio-group/q2-radio-group.tsx"],"sourcesContent":["@import '../../styles/host.scss';\n@import '../../styles/functions';\n\n:host {\n margin-top: var-list(--tct-radio-group-margin-top, --app-scale-2x, 10px);\n}\n\nfieldset {\n padding: var(--tct-radio-group-fieldset-padding, 0);\n margin: 0;\n border: 0;\n position: relative;\n}\n\n.label-row {\n display: grid;\n grid-template-columns: 1fr 24px;\n grid-template-areas: 'label icon';\n column-gap: var(--tct-radio-group-label-column-gap, var(--app-scale-2x, 10px));\n\n q2-icon {\n grid-area: icon;\n margin-top: -2px;\n margin-bottom: -2px;\n }\n}\n\n.group-legend {\n font-weight: 600;\n}\n\nlegend.sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n border: 0;\n}\n\n.optional-tag {\n margin-left: var-list(--tct-radio-group-label-optional-margin-left, --app-scale-1x, 5px);\n color: var-list(\n var-prefixer(radio-group-label-optional-color),\n var-prefixer(a11y-color),\n var-prefixer(a11y-gray-color),\n var-prefixer(gray-7),\n var-prefixer(gray-d1),\n --app-gray-d1,\n rgba(77, 77, 77, 0.77)\n );\n font-size: var-list(var-prefixer(radio-group-label-optional-font-size), 12px);\n font-weight: var-list(var-prefixer(radio-group-label-optional-font-weight), 400);\n}\n\n.tile-container {\n &,\n .options-container {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-wrap: wrap;\n flex-grow: 1;\n }\n}\n\n.options-container {\n --comp-default-margin: #{var-list(--app-scale-1x, 5px)} 0;\n --comp-options-margin: #{var-list(var-prefixer(radio-group-options-margin), --comp-default-margin, unquote('5px 0'))};\n margin: var(--comp-options-margin);\n padding: var-list(var-prefixer(radio-group-options-padding), --app-scale-1x, 5px);\n border-width: 1px;\n border-color: transparent;\n border-style: solid;\n border-radius: var-list(--tct-radio-group-border-radius, --app-border-radius-1, 4px);\n\n :host([has-error]) & {\n border-color: var-list(--tct-radio-group-error-border-color, --const-stoplight-alert, #d20a0a);\n }\n :host([has-error='false']) & {\n border-color: transparent;\n }\n}\n\n.tile-container {\n &.left {\n justify-content: start;\n }\n &.right {\n justify-content: end;\n }\n\n .options-container {\n gap: var-list(var-prefixer(radio-group-tile-gap), --app-scale-2x, 10px);\n justify-content: inherit;\n }\n}\n","import {\n Component,\n Prop,\n Element,\n h,\n Listen,\n EventEmitter,\n Event,\n ComponentInterface,\n Watch,\n Fragment,\n Method,\n} from '@stencil/core';\nimport { createGuid, isEventFromElement, overrideFocus, renderLabel } from 'src/utils';\n\n@Component({ tag: 'q2-radio-group', shadow: true, styleUrl: 'q2-radio-group.scss' })\nexport class Q2RadioGroup implements ComponentInterface {\n // #region Own Properties\n\n _id: string = `radio-group-${createGuid()}`;\n mutationObserver: MutationObserver;\n\n // #endregion\n // #region Host HTML Element\n\n @Element()\n hostElement: HTMLElement;\n\n // #endregion\n // #region Public Property API\n\n /** Determines if all radios in the group are put into a `disabled` state. */\n @Prop({ reflect: true })\n disabled: boolean = false;\n\n /** Determines if the component should display in an errant state. */\n @Prop({ reflect: true })\n hasError: boolean = false;\n\n /**\n * Hide's the group's `<label>` element from view.\n * @warning\n * Only use when a visible label is impractical.\n */\n @Prop({ reflect: true, mutable: true })\n hideLabel: boolean;\n\n /**\n * Text for the fieldset legend describing the radio group.\n * @localizable\n */\n @Prop({ reflect: true })\n label: string;\n\n /** Identifier which ties all radios together for accessibility and DOM selection. */\n @Prop({ reflect: true })\n name: string;\n\n /** Appends \"(optional)\" to the group label, and sets `aria-required` on the nested input tag to `false`. */\n @Prop({ reflect: true })\n optional: boolean;\n\n /** Determines if all radios in the group can be focused, but not interacted with. */\n @Prop({ reflect: true })\n readonly: boolean;\n\n /** Provides alignment direction for tile-style radio group. */\n @Prop({ reflect: true })\n tileAlignment: 'left' | 'center' | 'right' = 'center';\n\n /** @deprecated */\n @Prop({ reflect: true, mutable: true })\n tilelayout: boolean;\n\n /** Show the radio group as a horizontal set of tiles. */\n @Prop({ reflect: true, mutable: true })\n tileLayout: boolean;\n\n /** The `value` of the currently selected `q2-radio` within the `q2-radio-group`. */\n @Prop({ mutable: true })\n value: string;\n\n // #endregion\n // #region Events\n\n /**\n * Emitted when the value of the radio group changes.\n * @legacyEvent\n */\n @Event()\n change: EventEmitter<{ value: string }>;\n\n // #endregion\n // #region Component Lifecycle Events\n\n componentWillLoad() {\n this.checkedRadioExists();\n this.onMutationObserved();\n this.handleDeprecatedTilelayout(this.tilelayout);\n }\n\n componentDidLoad() {\n const observer = new MutationObserver(this.onMutationObserved);\n observer.observe(this.hostElement, { childList: true });\n this.mutationObserver = observer;\n overrideFocus(this.hostElement);\n this.checkedRadioExists();\n }\n\n // #endregion\n // #region Listeners\n\n @Listen('change')\n onHostElementChange(event: CustomEvent) {\n if (event.target === this.hostElement) {\n if (!this.hostElement.onchange) {\n this.value = event.detail.value;\n }\n }\n }\n\n @Listen('focus')\n delegateFocus(event: FocusEvent) {\n if (!isEventFromElement(event, this.hostElement)) return;\n const radio = this.hostElement.querySelector('q2-radio[checked]') || this.hostElement.querySelector('q2-radio');\n radio?.dispatchEvent(new FocusEvent('focus'));\n }\n\n @Listen('keydown')\n keydownHandler(event: KeyboardEvent) {\n const currentValue = (event.target as HTMLElement).getAttribute('value') || this.value;\n let index = this.radioElements.findIndex(\n el => el === event.target || (el as HTMLElement).getAttribute('value') === currentValue\n );\n let sign = 0;\n switch (event.key) {\n case 'ArrowLeft':\n case 'ArrowUp':\n sign = -1;\n break;\n\n case 'ArrowRight':\n case 'ArrowDown':\n sign = 1;\n break;\n }\n\n if (index === -1 || sign === 0) {\n return;\n }\n index += sign;\n index = sign < 0 ? Math.max(0, index) : Math.min(this.radioElements.length - 1, index);\n event.preventDefault();\n if (!this.readonly) {\n this.value = this.radioElements[index].value;\n }\n this.radioElements[index].dispatchEvent(new FocusEvent('focus'));\n }\n\n // #endregion\n // #region Public Methods API\n\n /**\n * Emulates clicking the `<q2-radio>` option with the provided value.\n *\n * @testOnly\n */\n @Method()\n setValue(value: string) {\n this.radioElements.forEach(radio => {\n if (value !== radio.value) return;\n radio.click();\n });\n }\n\n // #endregion\n // #region Watchers\n\n @Watch('disabled')\n disabledUpdated() {\n this.radioElements.forEach(radio => {\n radio.groupDisabled = this.disabled;\n });\n }\n\n @Watch('name')\n nameUpdated() {\n this.radioElements.forEach(radio => {\n radio.name = this.name || this._id;\n });\n }\n\n @Watch('readonly')\n readonlyUpdated() {\n const readonly = this.readonly;\n this.radioElements.forEach(radio => (radio.groupReadonly = readonly));\n }\n\n @Watch('tilelayout')\n handleDeprecatedTilelayout(tilelayout: boolean) {\n if (typeof tilelayout !== 'boolean') return;\n this.tileLayout = tilelayout;\n this.tilelayout = undefined;\n }\n\n @Watch('tileLayout')\n tileLayoutUpdated(tileLayout: boolean) {\n this.radioElements.forEach(radio => {\n radio.groupTileLayout = tileLayout;\n });\n }\n\n @Watch('value')\n valueUpdated(newVal: string) {\n this.radioElements.forEach(radio => {\n radio.checked = newVal === radio.value;\n // Removes checked attribute from trailing radios, if multiple individual radio's are intially checked (checked={true}) at componentDidLoad\n if (!radio.checked) {\n radio.removeAttribute('checked');\n radio.tabIndex = -1;\n } else if (radio.checked) {\n radio.tabIndex = 0;\n }\n });\n }\n\n // #endregion\n // #region Local Methods\n\n get inputId() {\n return this._id;\n }\n\n get radioElements() {\n return Array.from(this.hostElement.querySelectorAll('q2-radio')) as HTMLQ2RadioElement[];\n }\n\n checkedRadioExists = () => {\n // Returns first checked individual q2-radio or undefined if none are set to checked={true}\n const firstCheckedRadio = this.radioElements.find(radio => radio.checked === true) || undefined;\n\n // Changes radio-group[\"value\"] if inital value is not set and if a any individual q2-radio is checked\n if (!this.value && !!firstCheckedRadio) {\n this.value = firstCheckedRadio.value;\n } else if (!this.value && !firstCheckedRadio) {\n // if no radios are meant to be checked, then assign first radio tabIndex of 0\n if (this.radioElements.length) this.radioElements[0].tabIndex = 0;\n }\n };\n\n inputDom() {\n if (this.tileLayout) {\n const { tileAlignment } = this;\n const alignment = ['left', 'center', 'right'].includes(tileAlignment) ? tileAlignment : 'center';\n return (\n <div class={`tile-container ${alignment}`}>\n <div class=\"options-container\">\n <slot />\n </div>\n </div>\n );\n } else {\n return (\n <div class=\"options-container\">\n <slot />\n </div>\n );\n }\n }\n\n onInnerRadioChange = (event: CustomEvent) => {\n event.stopImmediatePropagation();\n if (this.readonly) return;\n\n this.change.emit({ value: event.detail.value });\n };\n\n onMutationObserved = () => {\n this.valueUpdated(this.value);\n this.nameUpdated();\n this.disabledUpdated();\n this.readonlyUpdated();\n this.tileLayoutUpdated(this.tileLayout);\n };\n\n // #endregion\n // #region Render Methods\n\n render() {\n const showLabel = this.label || this.optional || this.readonly;\n const { hasError } = this;\n const showLabelRow = (showLabel && !this.hideLabel) || hasError;\n return (\n <Fragment>\n {showLabelRow && (\n <div class=\"label-row\">\n {showLabel && !this.hideLabel && <div class=\"group-legend\">{renderLabel(this)}</div>}\n {hasError && (\n <q2-icon\n type=\"error\"\n test-id=\"iconError\"\n ></q2-icon>\n )}\n </div>\n )}\n <fieldset\n onChange={this.onInnerRadioChange}\n aria-invalid={hasError ? `${hasError}` : undefined}\n >\n {showLabel && <legend class=\"sr-only\">{renderLabel(this)}</legend>}\n {this.inputDom()}\n </fieldset>\n </Fragment>\n );\n }\n\n // #endregion\n}\n"],"version":3}
@@ -83,7 +83,7 @@ const Q2Radio$1 = /*@__PURE__*/ proxyCustomElement(class Q2Radio extends HTMLEle
83
83
  // #endregion
84
84
  // #region Render Methods
85
85
  render() {
86
- return (h("div", { key: '2eb548fb623e624b5304c321f4b57c1a48eaa4b0', class: this.groupTileLayout ? 'radio-tile' : 'radio-container' }, h("input", { key: '42eb98daad18d1aca54e84e5ed9647be6dbd7fca', ref: el => (this.inputField = el), class: "sr", id: this._id, type: "radio", name: this.name, value: this.value, disabled: this.disabled || this.groupDisabled, checked: this.checked, "aria-label": this.label && this.hideLabel ? loc(this.label) : undefined, onChange: this.inputChange, "test-id": "q2RadioInnerRadioBox" }), h("label", { key: '5f063d1a3b5a4494f1e471eda96844368d9c5c59', htmlFor: this._id, class: this.hideLabel ? 'label-hidden' : undefined, "test-id": "radioButton" }, !this.groupTileLayout && (h("svg", { key: 'aa0a30ecc9ed0b539c28b24f8ff5467fe158ff1c', viewBox: "0 0 18 18" }, h("circle", { key: '413e5556dbb780820bd91da40bed8bde37998e45', stroke: "none", fill: "none", cx: "9", cy: "9", r: "8" }), h("circle", { key: '6b27c265867df2752d63aa2f3f91266460328e70', stroke: "none", fill: "none", cx: "9", cy: "9", r: "4" }))), !this.hideLabel && (h("div", { key: '6dc3398a42d68bad7f064743bc53e45f24ba2b6e', class: "label-content" }, (this.label && loc(this.label)) || '', h("slot", { key: '9c259a28aeb1b056aca638df99a3c9e2524b04e1' }))))));
86
+ return (h("div", { key: 'ed4340f095788108ea8112d28a3c45dbc1f2e4c4', class: this.groupTileLayout ? 'radio-tile' : 'radio-container' }, h("input", { key: '30011c8b29f8bdf48e978904052e02b920e602b9', ref: el => (this.inputField = el), class: "sr", id: this._id, type: "radio", name: this.name, value: this.value, disabled: this.disabled || this.groupDisabled, checked: this.checked, "aria-label": this.label && this.hideLabel ? loc(this.label) : undefined, onChange: this.inputChange, "test-id": "q2RadioInnerRadioBox" }), h("label", { key: '657078aca6278f6bbd8997a1992109aecd2ad8a6', htmlFor: this._id, class: this.hideLabel ? 'label-hidden' : undefined, "test-id": "radioButton" }, !this.groupTileLayout && (h("svg", { key: '9b4cf7c9e1968f862509c760a0dfee5cb90c3ce1', viewBox: "0 0 18 18" }, h("circle", { key: '269619ffb0671e2f67dfa3da58b5da8264508586', stroke: "none", fill: "none", cx: "9", cy: "9", r: "8" }), h("circle", { key: '9325caea79a38fe661db33ca62da9f075a06597f', stroke: "none", fill: "none", cx: "9", cy: "9", r: "4" }))), !this.hideLabel && (h("div", { key: 'fb674a98b4d028e35397da9ead2ab5083e8617fd', class: "label-content" }, (this.label && loc(this.label)) || '', h("slot", { key: '39a40ee6024f16b059ebad2675ee922a5c95324d' }))))));
87
87
  }
88
88
  get hostElement() { return this; }
89
89
  static get watchers() { return {
@@ -143,7 +143,7 @@ const Q2RelativeTime$1 = /*@__PURE__*/ proxyCustomElement(class Q2RelativeTime e
143
143
  // #region Render Methods
144
144
  render() {
145
145
  const { shouldShow, displayedMessage } = this;
146
- return h(Fragment, { key: 'bb2afb6a702c88e41eed0cad8ad263e7d7014406' }, shouldShow ? h("time", { dateTime: displayedMessage }, displayedMessage) : null);
146
+ return h(Fragment, { key: '78b7e35a4534ff20a2bace5450b860a95b5354ce' }, shouldShow ? h("time", { dateTime: displayedMessage }, displayedMessage) : null);
147
147
  }
148
148
  get hostElement() { return this; }
149
149
  static get watchers() { return {
@@ -80,7 +80,7 @@ const Q2ResizeObserver = /*@__PURE__*/ proxyCustomElement(class Q2ResizeObserver
80
80
  // #endregion
81
81
  // #region Render Methods
82
82
  render() {
83
- return h("slot", { key: 'e704a2aa1c38da509b0e366e03cd33397ffdbf5d', onSlotchange: this.handleSlotChange });
83
+ return h("slot", { key: '054e80a957d13bd3226c6db7ca07be3764283974', onSlotchange: this.handleSlotChange });
84
84
  }
85
85
  get hostElement() { return this; }
86
86
  static get watchers() { return {
@@ -62,18 +62,20 @@ const Q2Section$1 = /*@__PURE__*/ proxyCustomElement(class Q2Section extends HTM
62
62
  }, 1000);
63
63
  };
64
64
  this.removeContentSlotListener = () => {
65
+ var _a;
65
66
  if (this.contentSlot) {
66
67
  this.contentSlot.removeEventListener('slotchange', resizeIframe);
67
68
  return;
68
69
  }
69
- this.contentSlotMutationObserver.disconnect();
70
+ (_a = this.contentSlotMutationObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
70
71
  };
71
72
  this.removeHeaderSlotListener = () => {
73
+ var _a;
72
74
  if (this.headerSlot) {
73
75
  this.headerSlot.removeEventListener('slotchange', this.onHeaderSlotChange);
74
76
  return;
75
77
  }
76
- this.headerSlotMutationObserver.disconnect();
78
+ (_a = this.headerSlotMutationObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
77
79
  };
78
80
  this.contentHeight = undefined;
79
81
  this.hasYieldedHeader = false;
@@ -193,9 +195,9 @@ const Q2Section$1 = /*@__PURE__*/ proxyCustomElement(class Q2Section extends HTM
193
195
  wrapperClasses.push('is-transitioning');
194
196
  }
195
197
  const showDefaultHeader = !this.hasYieldedHeader && !!this.label;
196
- return (h("section", { key: '994cfe09abd1a9d8220ca4017cb4003ae1e2cf39', class: "wrapper" }, h("header", { key: '56a44ef98988748508c673bd3725887a1743a99b', class: hasHeader ? 'has-header' : '' }, h("div", { key: '03cc85008637fe3de375d223de79ac59c6b6ba64', class: "header-content", id: this.titleId, onClick: this.collapsible && this.onHeaderClick }, showDefaultHeader && h("h2", { key: '69c2119b393e0b3f02392686ec49835273a9ebcb', class: "title" }, loc(this.label)), h("div", { key: '62a92b25033d9c9709a680b05becc2a48779197c', ref: el => (this.headerSlotWrapper = el), class: "header-slot-wrapper" }, h("slot", { key: 'f5b2dbc68e33d01f31845bdbfb429e0a18a5e174', ref: (el) => (this.headerSlot = el), name: "q2-section-header" }))), this.collapsible && !this.noCollapseIcon && (h("q2-btn", { key: '1983d339de073ca38b6879fca9d96fbe4648e533', label: loc(this.label || 'tecton.element.section.defaultToggleLabel'), ariaExpanded: `${!!this.expanded}`, ariaControls: this.contentId, "test-id": "toggleButton", "hide-label": true, onClick: this.onHeaderClick }, h("q2-icon", { key: 'de36065a7fdeb1c381184304e4ed679f27d4f771', type: "chevron-up" })))), h("div", { key: 'e681760db4a6551d03ded78c25ab24257b6eaf0b', class: wrapperClasses.join(' '), id: this.contentId, "aria-labelledby": this.titleId, role: "region", onTransitionEnd: this.onTransitionEnd, style: this.collapsible && {
198
+ return (h("section", { key: '51caab18e84c01492e56a6146130fd62fe54ca70', class: "wrapper" }, h("header", { key: '8badc2ccc5b350a005b8d22b69177d7018f34284', class: hasHeader ? 'has-header' : '' }, h("div", { key: '2af884fba47086257db63b7367d24c308d1b1e77', class: "header-content", id: this.titleId, onClick: this.collapsible && this.onHeaderClick }, showDefaultHeader && h("h2", { key: '32dcbaa44045c162fd41c14899192082fceb457e', class: "title" }, loc(this.label)), h("div", { key: '38535337690457635e0ffb1233c715c3d0f84cb5', ref: el => (this.headerSlotWrapper = el), class: "header-slot-wrapper" }, h("slot", { key: '2e95134d388a51d7e4743a57b1ed102829ce43c6', ref: (el) => (this.headerSlot = el), name: "q2-section-header" }))), this.collapsible && !this.noCollapseIcon && (h("q2-btn", { key: 'f7a91d6201e6be895e74a83d77e6b957e8eaba84', label: loc(this.label || 'tecton.element.section.defaultToggleLabel'), ariaExpanded: `${!!this.expanded}`, ariaControls: this.contentId, "test-id": "toggleButton", "hide-label": true, onClick: this.onHeaderClick }, h("q2-icon", { key: 'a6677b9ad7903ba53ed6460c839421fb134a74a0', type: "chevron-up" })))), h("div", { key: '0b8be5db6874002b6320ba62b42473ee6b55830a', class: wrapperClasses.join(' '), id: this.contentId, "aria-labelledby": this.titleId, role: "region", onTransitionEnd: this.onTransitionEnd, style: this.collapsible && {
197
199
  height: this.contentHeight,
198
- } }, h("div", { key: '004500e012e4eb718f7e018c20a0cc3590b9ebce', ref: el => (this.contentContainer = el), class: "content", tabindex: "-1" }, h("slot", { key: 'f83f550c26a3f36d2a72c777a9f904a3774e963f', ref: (el) => (this.contentSlot = el) })))));
200
+ } }, h("div", { key: '42968fd4be0401dcca23f6f84ce2db123e88d722', ref: el => (this.contentContainer = el), class: "content", tabindex: "-1" }, h("slot", { key: '919c3f6a65a945581deb258b10ad3877182389c4', ref: (el) => (this.contentSlot = el) })))));
199
201
  }
200
202
  get hostElement() { return this; }
201
203
  static get watchers() { return {
@@ -1 +1 @@
1
- {"file":"q2-section.js","mappings":";;;;;;AAAA,MAAM,YAAY,GAAG,ukHAAukH,CAAC;AAC7lH,wBAAe,YAAY;;MCedA,WAAS;;;;;;QAIlB,cAAS,GAAW,SAAS,CAAC;QAO9B,YAAO,GAAW,OAAO,CAAC;QA+J1B,2BAAsB,GAAG;YACrB,IAAI,IAAI,CAAC,WAAW,EAAE;gBAClB,IAAI,CAAC,WAAW,CAAC,gBAAgB,CAAC,YAAY,EAAE,YAAY,CAAC,CAAC;gBAC9D,OAAO;aACV;YAED,MAAM,QAAQ,GAAG,IAAI,gBAAgB,CAAC,YAAY,CAAC,CAAC;YACpD,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,gBAAgB,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;YAC5E,IAAI,CAAC,2BAA2B,GAAG,QAAQ,CAAC;SAC/C,CAAC;QAEF,0BAAqB,GAAG;YACpB,IAAI,IAAI,CAAC,UAAU,EAAE;gBACjB,IAAI,CAAC,UAAU,CAAC,gBAAgB,CAAC,YAAY,EAAE,IAAI,CAAC,kBAAkB,CAAC,CAAC;gBACxE,OAAO;aACV;YAED,MAAM,QAAQ,GAAG,IAAI,gBAAgB,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;YAC/D,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,iBAAiB,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;YAC9D,IAAI,CAAC,0BAA0B,GAAG,QAAQ,CAAC;SAC9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,IAAI,CAAC,SAAS,aACpB,cAAc,sBAEtB,OAAO,EAAE,IAAI,CAAC,aAAa,IAE3B,gEAAS,IAAI,EAAC,YAAY,GAAG,CACxB,CACZ,CACI,EACT,4DACI,KAAK,EAAE,cAAc,CAAC,IAAI,CAAC,GAAG,CAAC,EAC/B,EAAE,EAAE,IAAI,CAAC,SAAS,qBACD,IAAI,CAAC,OAAO,EAC7B,IAAI,EAAC,QAAQ,EACb,eAAe,EAAE,IAAI,CAAC,eAAe,EACrC,KAAK,EACD,IAAI,CAAC,WAAW,IAAI;gBAChB,MAAM,EAAE,IAAI,CAAC,aAAa;aAC7B,IAGL,4DACI,GAAG,EAAE,EAAE,KAAK,IAAI,CAAC,gBAAgB,GAAG,EAAE,CAAC,EACvC,KAAK,EAAC,SAAS,EACf,QAAQ,EAAC,IAAI,IAEb,6DAAM,GAAG,EAAE,CAAC,EAAmB,MAAM,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC,GAAI,CAC7D,CACJ,CACA,EACZ;KACL;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["Q2Section"],"sources":["src/components/q2-section/q2-section.scss?tag=q2-section&encapsulation=shadow","src/components/q2-section/q2-section.tsx"],"sourcesContent":["@import '../../styles/host.scss';\n@import '../../styles/functions.scss';\n\n:host {\n display: block;\n background: var-list(\n --tct-section-background,\n var-prefixer(section-background-color),\n var-prefixer(section-bg),\n --app-white,\n #ffffff\n );\n color: var-list(var-prefixer(section-font-color), --t-text, #4d4d4d);\n border-radius: var-list(var-prefixer(section-border-radius), --app-border-radius-1, 4px);\n margin: var-list(var-prefixer(section-margin), --app-scale-3x, 15px);\n border-width: var-list(--tct-section-border-width, 0);\n border-style: var-list(--tct-section-border-style, solid);\n border-color: var-list(--tct-section-border-color, none);\n\n @media screen and (max-width: 767px) {\n --comp-default-margin: var(--app-scale-3x, 15px) 0;\n margin: var-list(var-prefixer(section-margin), --comp-default-margin);\n }\n\n @media print {\n --comp-default-print-margin: var(--app-scale-3x, 15px) 0;\n margin: var-list(--tct-section-print-margin, --comp-default-print-margin);\n }\n}\n\n.wrapper {\n --comp-tween: #{var-list(var-prefixer(section-tween), --app-tween-1, unquote('0.2s ease'))};\n --comp-default-wrapper-padding: var(--app-scale-1x, 5px) 0;\n display: block;\n padding: var-list(var-prefixer(section-wrapper-padding), --comp-default-wrapper-padding);\n\n &:hover {\n box-shadow: var-list(var-prefixer(section-wrapper-hover-box-shadow), inherit);\n }\n\n :host([collapsible]) & {\n --comp-tween: #{var-list(var-prefixer(section-tween), --app-tween-2, unquote('0.4s ease'))};\n }\n}\n\nheader {\n --comp-default-header-padding: 0 var(--app-scale-3x, 15px);\n padding: var-list(var-prefixer(section-header-padding), --comp-default-header-padding);\n display: flex;\n\n @media print {\n padding: var-list(--tct-section-header-print-padding, 0);\n }\n\n &.has-header {\n min-height: var-list(var-prefixer(section-header-min-height), 44px);\n }\n}\n\n.header-content {\n flex: 1 1 100%;\n min-width: 0;\n align-self: center;\n\n :host([collapsible]) & {\n cursor: pointer;\n }\n}\n\n.title {\n margin: var-list(--tct-section-title-margin, 0);\n font-size: var-list(--tct-section-title-font-size, 20px);\n font-weight: var-list(--tct-section-title-font-weight, 600);\n text-transform: var-list(--tct-section-title-text-transform, none);\n letter-spacing: var-list(--tct-section-title-letter-spacing, 0.5px);\n}\n\nq2-icon {\n transition: transform var(--comp-tween);\n\n :host(:not([expanded])) &,\n :host([expanded='false']) & {\n transform: rotate(180deg);\n }\n}\n\n.content-wrapper {\n height: auto;\n\n &.is-closed {\n display: none;\n overflow: hidden;\n }\n\n &.is-transitioning {\n overflow: hidden;\n }\n\n :host([collapsible]) & {\n transition: height var(--comp-tween);\n }\n}\n\n.content {\n --comp-default-content-padding: var(--app-scale-2x, 10px) var(--app-scale-3x, 15px);\n padding: var-list(var-prefixer(section-content-padding), --comp-default-content-padding);\n\n @media print {\n padding: var-list(--tct-section-content-print-padding, 0);\n }\n\n &:focus {\n box-shadow: none;\n }\n\n :host([collapsible]) :host(:not([expanded])) & {\n visibility: hidden;\n }\n}\n","import {\n Component,\n ComponentInterface,\n Prop,\n Element,\n Listen,\n State,\n Watch,\n h,\n Event,\n EventEmitter,\n Method,\n} from '@stencil/core';\nimport { isEventFromElement, loc, nextPaint, overrideFocus, resizeIframe } from 'src/utils';\n\n@Component({ tag: 'q2-section', shadow: true, styleUrl: 'q2-section.scss' })\nexport class Q2Section implements ComponentInterface {\n // #region Own Properties\n\n contentContainer: HTMLDivElement;\n contentId: string = 'content';\n contentSlot: HTMLSlotElement;\n contentSlotMutationObserver: MutationObserver;\n headerSlot: HTMLSlotElement;\n headerSlotMutationObserver: MutationObserver;\n headerSlotWrapper: HTMLDivElement;\n resizerFn: NodeJS.Timeout | undefined;\n titleId: string = 'title';\n\n // #endregion\n // #region Host HTML Element\n\n @Element()\n hostElement: HTMLElement;\n\n // #endregion\n // #region State Properties\n\n @State()\n contentHeight: string;\n\n @State()\n hasYieldedHeader: boolean = false;\n\n @State()\n hideContent: boolean = false;\n\n // #endregion\n // #region Public Property API\n\n /** Determines if the section is collapsible. */\n @Prop({ reflect: true })\n collapsible: boolean;\n\n /** Indicates if the `q2-section` is in an expanded state or not. */\n @Prop({ reflect: true, mutable: true })\n expanded: boolean;\n\n /**\n * The text to display above the `q2-section`. Renders as an `<h2>` element.\n *\n * It is also used to provided an `aria-label` for the toggle button when the component is collapsible.\n *\n * @warning\n * If you are providing a custom header, setting this property is still strongly encouraged for the purposes of\n * accessibility.\n */\n @Prop({ reflect: true })\n label: string;\n\n /** Determines if the collapse chevron icon should show in the `q2-section` header. */\n @Prop({ reflect: true })\n noCollapseIcon: boolean;\n\n // #endregion\n // #region Events\n\n /**\n * Emitted when the section is expanded or collapsed.\n * @legacyEvent\n */\n @Event()\n change: EventEmitter<{ expanded: boolean }>;\n\n // #endregion\n // #region Component Lifecycle Events\n\n disconnectedCallback() {\n this.removeHeaderSlotListener();\n this.removeContentSlotListener();\n }\n\n componentWillLoad() {\n this.onHeaderSlotChange();\n const { collapsible, expanded } = this;\n this.contentHeight = collapsible && expanded ? undefined : '0px';\n this.hideContent = !expanded;\n }\n\n componentDidLoad() {\n this.addHeaderSlotListener();\n this.addContentSlotListener();\n overrideFocus(this.hostElement);\n }\n\n // #endregion\n // #region Listeners\n\n @Listen('change')\n defaultChangeHandler(event: CustomEvent) {\n if (event.target === this.hostElement && !this.hostElement.onchange && !!event.detail) {\n this.expanded = event.detail.expanded;\n }\n }\n\n @Listen('focus')\n delegateFocus(event: FocusEvent) {\n if (!isEventFromElement(event, this.hostElement)) return;\n this.contentContainer.focus();\n }\n\n // #endregion\n // #region Watchers\n\n @Watch('collapsible')\n collapsibleObserver() {\n this.contentHeight = this.currentHeight;\n }\n\n @Watch('expanded')\n async expandedObserver(expanded: boolean) {\n this.clearResizeInterval();\n this.resizerFn = setInterval(resizeIframe, 5);\n\n if (expanded) {\n this.expandSection();\n } else {\n this.collapseSection();\n }\n }\n\n // #endregion\n // #region Test Methods API\n\n /**\n * A test method to collapse section.\n *\n * @testOnly\n */\n @Method()\n async collapse() {\n if (!this.collapsible || !this.expanded) return;\n const btn = this.hostElement.shadowRoot.querySelector('[test-id=\"toggleButton\"]');\n (btn as HTMLQ2BtnElement)?.click();\n }\n\n /**\n * A test method to expand section.\n *\n * @testOnly\n */\n @Method()\n async expand() {\n if (!this.collapsible || this.expanded) return;\n const btn = this.hostElement.shadowRoot.querySelector('[test-id=\"toggleButton\"]');\n (btn as HTMLQ2BtnElement)?.click();\n }\n\n // #endregion\n // #region Local Methods\n\n get contentContainerHeight() {\n return `${this.contentContainer.offsetHeight || 0}px`;\n }\n\n get currentHeight() {\n const { collapsible, expanded } = this;\n if (!collapsible) {\n return null;\n } else if (expanded) {\n return this.contentContainerHeight;\n } else {\n return '0';\n }\n }\n\n addContentSlotListener = () => {\n if (this.contentSlot) {\n this.contentSlot.addEventListener('slotchange', resizeIframe);\n return;\n }\n\n const observer = new MutationObserver(resizeIframe);\n observer.observe(this.contentContainer, { childList: true, subtree: true });\n this.contentSlotMutationObserver = observer;\n };\n\n addHeaderSlotListener = () => {\n if (this.headerSlot) {\n this.headerSlot.addEventListener('slotchange', this.onHeaderSlotChange);\n return;\n }\n\n const observer = new MutationObserver(this.onHeaderSlotChange);\n observer.observe(this.headerSlotWrapper, { childList: true });\n this.headerSlotMutationObserver = observer;\n };\n\n clearResizeInterval = () => {\n this.resizerFn && clearInterval(this.resizerFn);\n };\n\n async collapseSection() {\n this.contentHeight = this.contentContainerHeight;\n await nextPaint(() => {\n this.contentHeight = this.currentHeight;\n });\n }\n\n async expandSection() {\n this.hideContent = false;\n await nextPaint(() => {\n this.contentHeight = this.currentHeight;\n });\n }\n\n onHeaderClick = () => {\n this.change.emit({\n expanded: !this.expanded,\n });\n };\n\n onHeaderSlotChange = () => {\n const hasSlotContent = !!this.hostElement.querySelector('[slot=\"q2-section-header\"]');\n\n if (this.hasYieldedHeader !== hasSlotContent) {\n this.hasYieldedHeader = !!hasSlotContent;\n }\n };\n\n onTransitionEnd = () => {\n if (this.expanded) {\n this.contentHeight = undefined;\n } else {\n this.hideContent = true;\n }\n\n setTimeout(() => {\n // This gives enough time for all values to get passed over\n // Previously, the interval was never cleared and the fn was called indefinitely then filtered\n // Will revisit in TCT-599\n this.clearResizeInterval();\n }, 1000);\n };\n\n removeContentSlotListener = () => {\n if (this.contentSlot) {\n this.contentSlot.removeEventListener('slotchange', resizeIframe);\n return;\n }\n this.contentSlotMutationObserver.disconnect();\n };\n\n removeHeaderSlotListener = () => {\n if (this.headerSlot) {\n this.headerSlot.removeEventListener('slotchange', this.onHeaderSlotChange);\n return;\n }\n\n this.headerSlotMutationObserver.disconnect();\n };\n\n // #endregion\n // #region Render Methods\n\n render() {\n const hasHeader = this.label || this.hasYieldedHeader;\n const wrapperClasses = ['content-wrapper'];\n const { collapsible, hideContent, contentHeight } = this;\n if (collapsible) {\n if (hideContent) wrapperClasses.push('is-closed');\n else if (contentHeight) wrapperClasses.push('is-transitioning');\n }\n\n const showDefaultHeader = !this.hasYieldedHeader && !!this.label;\n\n return (\n <section class=\"wrapper\">\n <header class={hasHeader ? 'has-header' : ''}>\n <div\n class=\"header-content\"\n id={this.titleId}\n onClick={this.collapsible && this.onHeaderClick}\n >\n {showDefaultHeader && <h2 class=\"title\">{loc(this.label)}</h2>}\n <div\n ref={el => (this.headerSlotWrapper = el)}\n class=\"header-slot-wrapper\"\n >\n <slot\n ref={(el: HTMLSlotElement) => (this.headerSlot = el)}\n name=\"q2-section-header\"\n />\n </div>\n </div>\n {this.collapsible && !this.noCollapseIcon && (\n <q2-btn\n label={loc(this.label || 'tecton.element.section.defaultToggleLabel')}\n ariaExpanded={`${!!this.expanded}`}\n ariaControls={this.contentId}\n test-id=\"toggleButton\"\n hide-label\n onClick={this.onHeaderClick}\n >\n <q2-icon type=\"chevron-up\" />\n </q2-btn>\n )}\n </header>\n <div\n class={wrapperClasses.join(' ')}\n id={this.contentId}\n aria-labelledby={this.titleId}\n role=\"region\"\n onTransitionEnd={this.onTransitionEnd}\n style={\n this.collapsible && {\n height: this.contentHeight,\n }\n }\n >\n <div\n ref={el => (this.contentContainer = el)}\n class=\"content\"\n tabindex=\"-1\"\n >\n <slot ref={(el: HTMLSlotElement) => (this.contentSlot = el)} />\n </div>\n </div>\n </section>\n );\n }\n\n // #endregion\n}\n"],"version":3}
1
+ {"file":"q2-section.js","mappings":";;;;;;AAAA,MAAM,YAAY,GAAG,ukHAAukH,CAAC;AAC7lH,wBAAe,YAAY;;MCedA,WAAS;;;;;;QAIlB,cAAS,GAAW,SAAS,CAAC;QAO9B,YAAO,GAAW,OAAO,CAAC;QA+J1B,2BAAsB,GAAG;YACrB,IAAI,IAAI,CAAC,WAAW,EAAE;gBAClB,IAAI,CAAC,WAAW,CAAC,gBAAgB,CAAC,YAAY,EAAE,YAAY,CAAC,CAAC;gBAC9D,OAAO;aACV;YAED,MAAM,QAAQ,GAAG,IAAI,gBAAgB,CAAC,YAAY,CAAC,CA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["Q2Section"],"sources":["src/components/q2-section/q2-section.scss?tag=q2-section&encapsulation=shadow","src/components/q2-section/q2-section.tsx"],"sourcesContent":["@import '../../styles/host.scss';\n@import '../../styles/functions.scss';\n\n:host {\n display: block;\n background: var-list(\n --tct-section-background,\n var-prefixer(section-background-color),\n var-prefixer(section-bg),\n --app-white,\n #ffffff\n );\n color: var-list(var-prefixer(section-font-color), --t-text, #4d4d4d);\n border-radius: var-list(var-prefixer(section-border-radius), --app-border-radius-1, 4px);\n margin: var-list(var-prefixer(section-margin), --app-scale-3x, 15px);\n border-width: var-list(--tct-section-border-width, 0);\n border-style: var-list(--tct-section-border-style, solid);\n border-color: var-list(--tct-section-border-color, none);\n\n @media screen and (max-width: 767px) {\n --comp-default-margin: var(--app-scale-3x, 15px) 0;\n margin: var-list(var-prefixer(section-margin), --comp-default-margin);\n }\n\n @media print {\n --comp-default-print-margin: var(--app-scale-3x, 15px) 0;\n margin: var-list(--tct-section-print-margin, --comp-default-print-margin);\n }\n}\n\n.wrapper {\n --comp-tween: #{var-list(var-prefixer(section-tween), --app-tween-1, unquote('0.2s ease'))};\n --comp-default-wrapper-padding: var(--app-scale-1x, 5px) 0;\n display: block;\n padding: var-list(var-prefixer(section-wrapper-padding), --comp-default-wrapper-padding);\n\n &:hover {\n box-shadow: var-list(var-prefixer(section-wrapper-hover-box-shadow), inherit);\n }\n\n :host([collapsible]) & {\n --comp-tween: #{var-list(var-prefixer(section-tween), --app-tween-2, unquote('0.4s ease'))};\n }\n}\n\nheader {\n --comp-default-header-padding: 0 var(--app-scale-3x, 15px);\n padding: var-list(var-prefixer(section-header-padding), --comp-default-header-padding);\n display: flex;\n\n @media print {\n padding: var-list(--tct-section-header-print-padding, 0);\n }\n\n &.has-header {\n min-height: var-list(var-prefixer(section-header-min-height), 44px);\n }\n}\n\n.header-content {\n flex: 1 1 100%;\n min-width: 0;\n align-self: center;\n\n :host([collapsible]) & {\n cursor: pointer;\n }\n}\n\n.title {\n margin: var-list(--tct-section-title-margin, 0);\n font-size: var-list(--tct-section-title-font-size, 20px);\n font-weight: var-list(--tct-section-title-font-weight, 600);\n text-transform: var-list(--tct-section-title-text-transform, none);\n letter-spacing: var-list(--tct-section-title-letter-spacing, 0.5px);\n}\n\nq2-icon {\n transition: transform var(--comp-tween);\n\n :host(:not([expanded])) &,\n :host([expanded='false']) & {\n transform: rotate(180deg);\n }\n}\n\n.content-wrapper {\n height: auto;\n\n &.is-closed {\n display: none;\n overflow: hidden;\n }\n\n &.is-transitioning {\n overflow: hidden;\n }\n\n :host([collapsible]) & {\n transition: height var(--comp-tween);\n }\n}\n\n.content {\n --comp-default-content-padding: var(--app-scale-2x, 10px) var(--app-scale-3x, 15px);\n padding: var-list(var-prefixer(section-content-padding), --comp-default-content-padding);\n\n @media print {\n padding: var-list(--tct-section-content-print-padding, 0);\n }\n\n &:focus {\n box-shadow: none;\n }\n\n :host([collapsible]) :host(:not([expanded])) & {\n visibility: hidden;\n }\n}\n","import {\n Component,\n ComponentInterface,\n Prop,\n Element,\n Listen,\n State,\n Watch,\n h,\n Event,\n EventEmitter,\n Method,\n} from '@stencil/core';\nimport { isEventFromElement, loc, nextPaint, overrideFocus, resizeIframe } from 'src/utils';\n\n@Component({ tag: 'q2-section', shadow: true, styleUrl: 'q2-section.scss' })\nexport class Q2Section implements ComponentInterface {\n // #region Own Properties\n\n contentContainer: HTMLDivElement;\n contentId: string = 'content';\n contentSlot: HTMLSlotElement;\n contentSlotMutationObserver: MutationObserver;\n headerSlot: HTMLSlotElement;\n headerSlotMutationObserver: MutationObserver;\n headerSlotWrapper: HTMLDivElement;\n resizerFn: NodeJS.Timeout | undefined;\n titleId: string = 'title';\n\n // #endregion\n // #region Host HTML Element\n\n @Element()\n hostElement: HTMLElement;\n\n // #endregion\n // #region State Properties\n\n @State()\n contentHeight: string;\n\n @State()\n hasYieldedHeader: boolean = false;\n\n @State()\n hideContent: boolean = false;\n\n // #endregion\n // #region Public Property API\n\n /** Determines if the section is collapsible. */\n @Prop({ reflect: true })\n collapsible: boolean;\n\n /** Indicates if the `q2-section` is in an expanded state or not. */\n @Prop({ reflect: true, mutable: true })\n expanded: boolean;\n\n /**\n * The text to display above the `q2-section`. Renders as an `<h2>` element.\n *\n * It is also used to provided an `aria-label` for the toggle button when the component is collapsible.\n *\n * @warning\n * If you are providing a custom header, setting this property is still strongly encouraged for the purposes of\n * accessibility.\n */\n @Prop({ reflect: true })\n label: string;\n\n /** Determines if the collapse chevron icon should show in the `q2-section` header. */\n @Prop({ reflect: true })\n noCollapseIcon: boolean;\n\n // #endregion\n // #region Events\n\n /**\n * Emitted when the section is expanded or collapsed.\n * @legacyEvent\n */\n @Event()\n change: EventEmitter<{ expanded: boolean }>;\n\n // #endregion\n // #region Component Lifecycle Events\n\n disconnectedCallback() {\n this.removeHeaderSlotListener();\n this.removeContentSlotListener();\n }\n\n componentWillLoad() {\n this.onHeaderSlotChange();\n const { collapsible, expanded } = this;\n this.contentHeight = collapsible && expanded ? undefined : '0px';\n this.hideContent = !expanded;\n }\n\n componentDidLoad() {\n this.addHeaderSlotListener();\n this.addContentSlotListener();\n overrideFocus(this.hostElement);\n }\n\n // #endregion\n // #region Listeners\n\n @Listen('change')\n defaultChangeHandler(event: CustomEvent) {\n if (event.target === this.hostElement && !this.hostElement.onchange && !!event.detail) {\n this.expanded = event.detail.expanded;\n }\n }\n\n @Listen('focus')\n delegateFocus(event: FocusEvent) {\n if (!isEventFromElement(event, this.hostElement)) return;\n this.contentContainer.focus();\n }\n\n // #endregion\n // #region Watchers\n\n @Watch('collapsible')\n collapsibleObserver() {\n this.contentHeight = this.currentHeight;\n }\n\n @Watch('expanded')\n async expandedObserver(expanded: boolean) {\n this.clearResizeInterval();\n this.resizerFn = setInterval(resizeIframe, 5);\n\n if (expanded) {\n this.expandSection();\n } else {\n this.collapseSection();\n }\n }\n\n // #endregion\n // #region Test Methods API\n\n /**\n * A test method to collapse section.\n *\n * @testOnly\n */\n @Method()\n async collapse() {\n if (!this.collapsible || !this.expanded) return;\n const btn = this.hostElement.shadowRoot.querySelector('[test-id=\"toggleButton\"]');\n (btn as HTMLQ2BtnElement)?.click();\n }\n\n /**\n * A test method to expand section.\n *\n * @testOnly\n */\n @Method()\n async expand() {\n if (!this.collapsible || this.expanded) return;\n const btn = this.hostElement.shadowRoot.querySelector('[test-id=\"toggleButton\"]');\n (btn as HTMLQ2BtnElement)?.click();\n }\n\n // #endregion\n // #region Local Methods\n\n get contentContainerHeight() {\n return `${this.contentContainer.offsetHeight || 0}px`;\n }\n\n get currentHeight() {\n const { collapsible, expanded } = this;\n if (!collapsible) {\n return null;\n } else if (expanded) {\n return this.contentContainerHeight;\n } else {\n return '0';\n }\n }\n\n addContentSlotListener = () => {\n if (this.contentSlot) {\n this.contentSlot.addEventListener('slotchange', resizeIframe);\n return;\n }\n\n const observer = new MutationObserver(resizeIframe);\n observer.observe(this.contentContainer, { childList: true, subtree: true });\n this.contentSlotMutationObserver = observer;\n };\n\n addHeaderSlotListener = () => {\n if (this.headerSlot) {\n this.headerSlot.addEventListener('slotchange', this.onHeaderSlotChange);\n return;\n }\n\n const observer = new MutationObserver(this.onHeaderSlotChange);\n observer.observe(this.headerSlotWrapper, { childList: true });\n this.headerSlotMutationObserver = observer;\n };\n\n clearResizeInterval = () => {\n this.resizerFn && clearInterval(this.resizerFn);\n };\n\n async collapseSection() {\n this.contentHeight = this.contentContainerHeight;\n await nextPaint(() => {\n this.contentHeight = this.currentHeight;\n });\n }\n\n async expandSection() {\n this.hideContent = false;\n await nextPaint(() => {\n this.contentHeight = this.currentHeight;\n });\n }\n\n onHeaderClick = () => {\n this.change.emit({\n expanded: !this.expanded,\n });\n };\n\n onHeaderSlotChange = () => {\n const hasSlotContent = !!this.hostElement.querySelector('[slot=\"q2-section-header\"]');\n\n if (this.hasYieldedHeader !== hasSlotContent) {\n this.hasYieldedHeader = !!hasSlotContent;\n }\n };\n\n onTransitionEnd = () => {\n if (this.expanded) {\n this.contentHeight = undefined;\n } else {\n this.hideContent = true;\n }\n\n setTimeout(() => {\n // This gives enough time for all values to get passed over\n // Previously, the interval was never cleared and the fn was called indefinitely then filtered\n // Will revisit in TCT-599\n this.clearResizeInterval();\n }, 1000);\n };\n\n removeContentSlotListener = () => {\n if (this.contentSlot) {\n this.contentSlot.removeEventListener('slotchange', resizeIframe);\n return;\n }\n this.contentSlotMutationObserver?.disconnect();\n };\n\n removeHeaderSlotListener = () => {\n if (this.headerSlot) {\n this.headerSlot.removeEventListener('slotchange', this.onHeaderSlotChange);\n return;\n }\n\n this.headerSlotMutationObserver?.disconnect();\n };\n\n // #endregion\n // #region Render Methods\n\n render() {\n const hasHeader = this.label || this.hasYieldedHeader;\n const wrapperClasses = ['content-wrapper'];\n const { collapsible, hideContent, contentHeight } = this;\n if (collapsible) {\n if (hideContent) wrapperClasses.push('is-closed');\n else if (contentHeight) wrapperClasses.push('is-transitioning');\n }\n\n const showDefaultHeader = !this.hasYieldedHeader && !!this.label;\n\n return (\n <section class=\"wrapper\">\n <header class={hasHeader ? 'has-header' : ''}>\n <div\n class=\"header-content\"\n id={this.titleId}\n onClick={this.collapsible && this.onHeaderClick}\n >\n {showDefaultHeader && <h2 class=\"title\">{loc(this.label)}</h2>}\n <div\n ref={el => (this.headerSlotWrapper = el)}\n class=\"header-slot-wrapper\"\n >\n <slot\n ref={(el: HTMLSlotElement) => (this.headerSlot = el)}\n name=\"q2-section-header\"\n />\n </div>\n </div>\n {this.collapsible && !this.noCollapseIcon && (\n <q2-btn\n label={loc(this.label || 'tecton.element.section.defaultToggleLabel')}\n ariaExpanded={`${!!this.expanded}`}\n ariaControls={this.contentId}\n test-id=\"toggleButton\"\n hide-label\n onClick={this.onHeaderClick}\n >\n <q2-icon type=\"chevron-up\" />\n </q2-btn>\n )}\n </header>\n <div\n class={wrapperClasses.join(' ')}\n id={this.contentId}\n aria-labelledby={this.titleId}\n role=\"region\"\n onTransitionEnd={this.onTransitionEnd}\n style={\n this.collapsible && {\n height: this.contentHeight,\n }\n }\n >\n <div\n ref={el => (this.contentContainer = el)}\n class=\"content\"\n tabindex=\"-1\"\n >\n <slot ref={(el: HTMLSlotElement) => (this.contentSlot = el)} />\n </div>\n </div>\n </section>\n );\n }\n\n // #endregion\n}\n"],"version":3}
@@ -1,5 +1,5 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
2
- import { l as loc, h as handleAriaLabel, o as overrideFocus, u as isRelatedTargetWithinHost, i as isEventFromElement, w as waitForNextPaint, v as isHostLosingFocus } from './index2.js';
2
+ import { l as loc, h as handleAriaLabel, o as overrideFocus, v as isRelatedTargetWithinHost, i as isEventFromElement, w as waitForNextPaint, x as isHostLosingFocus } from './index2.js';
3
3
  import { a as shouldShowActionSheet, s as showActionSheetList } from './action-sheet.js';
4
4
  import { d as defineCustomElement$8 } from './click-elsewhere2.js';
5
5
  import { d as defineCustomElement$7 } from './q2-badge2.js';
@@ -161,6 +161,7 @@ const Q2Select = /*@__PURE__*/ proxyCustomElement(class Q2Select extends HTMLEle
161
161
  this.hasCustomDisplay = false;
162
162
  this.hasPopoverBottom = false;
163
163
  this.hasPopoverTop = false;
164
+ this.inputField = undefined;
164
165
  this.inputFocused = false;
165
166
  this.open = false;
166
167
  this.prioritizeSearch = false;
@@ -600,7 +601,7 @@ const Q2Select = /*@__PURE__*/ proxyCustomElement(class Q2Select extends HTMLEle
600
601
  return (h("slot", { name: "_selected-display", slot: "custom-display" }));
601
602
  }
602
603
  renderOptionsDropdown() {
603
- return (h("q2-popover", { ref: el => (this.popoverElement = el), controlElement: this.innerInputContainer, open: this.open, "max-height": this.popoverMaxHeight, minHeight: this.popoverMinHeight, direction: this.popDirection, mode: this.popoverMode || undefined, block: true }, h("div", { class: "popover-content" }, h("q2-option-list", { onPopoverState: this.onPopoverState, ref: el => (this.optionList = el), type: "listbox", id: "option-list", "show-selected": this.showSelected, label: this.listLabel, multiple: this.multiple, selectedOptions: this.structuredSelectedOptions, onChange: this.onOptionListChange }, h("slot", null)), h("div", { class: "popover-top-container", ref: el => (this.popoverTopContainer = el), hidden: !this.multiple && !this.hasPopoverTop, tabindex: "-1" }, h("slot", { name: "popover-top" }), this.multiple && this.renderVisibilityToggle())), h("div", { class: "popover-bottom-container", hidden: !this.hasPopoverBottom, tabindex: "-1" }, h("slot", { name: "popover-bottom" }))));
604
+ return (h("q2-popover", { ref: el => (this.popoverElement = el), controlElement: this.inputField, open: this.open, "max-height": this.popoverMaxHeight, minHeight: this.popoverMinHeight, direction: this.popDirection, mode: this.popoverMode || undefined, block: true }, h("div", { class: "popover-content" }, h("q2-option-list", { onPopoverState: this.onPopoverState, ref: el => (this.optionList = el), type: "listbox", id: "option-list", "show-selected": this.showSelected, label: this.listLabel, multiple: this.multiple, selectedOptions: this.structuredSelectedOptions, onChange: this.onOptionListChange }, h("slot", null)), h("div", { class: "popover-top-container", ref: el => (this.popoverTopContainer = el), hidden: !this.multiple && !this.hasPopoverTop, tabindex: "-1" }, h("slot", { name: "popover-top" }), this.multiple && this.renderVisibilityToggle())), h("div", { class: "popover-bottom-container", hidden: !this.hasPopoverBottom, tabindex: "-1" }, h("slot", { name: "popover-bottom" }))));
604
605
  }
605
606
  renderVisibilityToggle() {
606
607
  var _a, _b;
@@ -612,11 +613,11 @@ const Q2Select = /*@__PURE__*/ proxyCustomElement(class Q2Select extends HTMLEle
612
613
  }
613
614
  render() {
614
615
  var _a;
615
- return (h("click-elsewhere", { key: '1b93bb0fd1b8d21fa839387a931fb9d97b4e2906', class: this.wrapperClasses, onChange: this.clickedElsewhere }, h("div", { key: '8fbbb1afec8161204bd25b698f58ef913c959344', "aria-live": "polite", "aria-atomic": "true", role: "status", class: "sr" }, this.statusMessage), h("q2-input", { key: 'b67fd2569162a1009ff2868b73091859ba7005ba', ref: el => (this.inputField = el), class: "q2-select-input", label: (this.label && loc(this.label)) || '', value: this.selectedDisplay, clearable: (this.clearable && (!!this.value || !!((_a = this.selectedOptions) === null || _a === void 0 ? void 0 : _a.length))) || undefined, errors: (Array.isArray(this.errors) &&
616
+ return (h("click-elsewhere", { key: 'c9478c6061b87d0f7c0590a8135d69408534c4d4', class: this.wrapperClasses, onChange: this.clickedElsewhere }, h("div", { key: 'a52c90a0014b752743707be50b3ae0a4b49c3a7a', "aria-live": "polite", "aria-atomic": "true", role: "status", class: "sr" }, this.statusMessage), h("q2-input", { key: '5093b5dbc49a2ad20726313f6f1f98a0b8c82871', ref: el => (this.inputField = el), class: "q2-select-input", label: (this.label && loc(this.label)) || '', value: this.selectedDisplay, clearable: (this.clearable && (!!this.value || !!((_a = this.selectedOptions) === null || _a === void 0 ? void 0 : _a.length))) || undefined, errors: (Array.isArray(this.errors) &&
616
617
  this.errors.length > 0 &&
617
618
  this.errors.map(error => loc(error))) ||
618
619
  (this.invalid && ['tecton.element.select.invalid']) ||
619
- [], disabled: this.disabled, optional: this.optional, readonly: !!this.readonly, placeholder: this.placeholder || undefined, hideLabel: this.hideLabel, ariaExpanded: `${this.open}`, ariaControls: "option-list", ariaHaspopup: "listbox", "test-id": "toggleDropdown", "hide-messages": true, iconRight: "chevron-down", onClick: this.inputClickHandler, onInput: this.inputInputHandler, onKeyDown: this.inputKeydownHandler, onFocus: this.inputFocusHandler, onBlur: this.inputBlurHandler, onChange: this.inputChangeHandler, badgeValue: this.badgeValue, badgeTheme: this.inputFocused ? 'primary' : undefined, _role: "combobox", _preventEntry: !this.searchable }, this.renderCustomDisplay()), h("div", { key: 'a0a3f6cabce2f0d64346a8aa71c89e6a93b2b6e8', class: "custom-display-content", hidden: !this.hasCustomDisplay || !!this.searchText, onClick: this.onCustomDisplayClick }, h("slot", { key: 'bf07ea5bd0ea6354e1d0631339944c516e975dc3', name: "q2-select-display" })), this.renderOptionsDropdown()));
620
+ [], disabled: this.disabled, optional: this.optional, readonly: !!this.readonly, placeholder: this.placeholder || undefined, hideLabel: this.hideLabel, ariaExpanded: `${this.open}`, ariaControls: "option-list", ariaHaspopup: "listbox", "test-id": "toggleDropdown", "hide-messages": true, iconRight: "chevron-down", onClick: this.inputClickHandler, onInput: this.inputInputHandler, onKeyDown: this.inputKeydownHandler, onFocus: this.inputFocusHandler, onBlur: this.inputBlurHandler, onChange: this.inputChangeHandler, badgeValue: this.badgeValue, badgeTheme: this.inputFocused ? 'primary' : undefined, _role: "combobox", _preventEntry: !this.searchable }, this.renderCustomDisplay()), h("div", { key: '950b2786d4e641a64eb20118bee882cc94bc4b3e', class: "custom-display-content", hidden: !this.hasCustomDisplay || !!this.searchText, onClick: this.onCustomDisplayClick }, h("slot", { key: '92b13e80f4643421cc7101304954f0bc7635c26c', name: "q2-select-display" })), this.renderOptionsDropdown()));
620
621
  }
621
622
  get hostElement() { return this; }
622
623
  static get watchers() { return {
@@ -652,6 +653,7 @@ const Q2Select = /*@__PURE__*/ proxyCustomElement(class Q2Select extends HTMLEle
652
653
  "hasCustomDisplay": [32],
653
654
  "hasPopoverBottom": [32],
654
655
  "hasPopoverTop": [32],
656
+ "inputField": [32],
655
657
  "inputFocused": [32],
656
658
  "open": [32],
657
659
  "prioritizeSearch": [32],