q2-tecton-elements 1.54.4 → 1.55.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (559) hide show
  1. package/dist/bundle-report.json +2047 -769
  2. package/dist/cjs/{index-76f63767.js → index-905f4c87.js} +3 -2
  3. package/dist/cjs/index-905f4c87.js.map +1 -0
  4. package/dist/cjs/loader.cjs.js +1 -1
  5. package/dist/cjs/q2-action-group.cjs.entry.js +45 -14
  6. package/dist/cjs/q2-action-group.cjs.entry.js.map +1 -1
  7. package/dist/cjs/q2-action-sheet.cjs.entry.js +4 -1364
  8. package/dist/cjs/q2-action-sheet.cjs.entry.js.map +1 -1
  9. package/dist/cjs/q2-avatar.cjs.entry.js +1 -1
  10. package/dist/cjs/q2-badge_7.cjs.entry.js +59 -22
  11. package/dist/cjs/q2-badge_7.cjs.entry.js.map +1 -1
  12. package/dist/cjs/q2-calendar.cjs.entry.js +2 -2
  13. package/dist/cjs/q2-calendar.cjs.entry.js.map +1 -1
  14. package/dist/cjs/q2-card.cjs.entry.js +1 -1
  15. package/dist/cjs/q2-carousel-pane.cjs.entry.js +3 -3
  16. package/dist/cjs/q2-carousel.cjs.entry.js +1 -1
  17. package/dist/cjs/q2-chart-area.cjs.entry.js +2 -2
  18. package/dist/cjs/q2-chart-bar.cjs.entry.js +2 -2
  19. package/dist/cjs/q2-chart-donut.cjs.entry.js +2 -2
  20. package/dist/cjs/q2-checkbox-group.cjs.entry.js +2 -2
  21. package/dist/cjs/q2-checkbox-group.cjs.entry.js.map +1 -1
  22. package/dist/cjs/q2-checkbox.cjs.entry.js +21 -21
  23. package/dist/cjs/q2-checkbox.cjs.entry.js.map +1 -1
  24. package/dist/cjs/q2-currency.cjs.entry.js +1 -1
  25. package/dist/cjs/q2-data-table.cjs.entry.js +1 -1
  26. package/dist/cjs/q2-detail.cjs.entry.js +2 -2
  27. package/dist/cjs/q2-dropdown-item.cjs.entry.js +1 -1
  28. package/dist/cjs/q2-dropdown.cjs.entry.js +1 -1
  29. package/dist/cjs/q2-editable-field.cjs.entry.js +1 -1
  30. package/dist/cjs/q2-file-picker.cjs.entry.js +2 -2
  31. package/dist/cjs/q2-file-picker.cjs.entry.js.map +1 -1
  32. package/dist/cjs/q2-form.cjs.entry.js +23 -0
  33. package/dist/cjs/q2-form.cjs.entry.js.map +1 -0
  34. package/dist/cjs/q2-formatted-text.cjs.entry.js +1 -1
  35. package/dist/cjs/q2-item_3.cjs.entry.js +3 -3
  36. package/dist/cjs/q2-legend.cjs.entry.js +2 -2
  37. package/dist/cjs/q2-legend.cjs.entry.js.map +1 -1
  38. package/dist/cjs/q2-loc.cjs.entry.js +20 -26
  39. package/dist/cjs/q2-loc.cjs.entry.js.map +1 -1
  40. package/dist/cjs/q2-message.cjs.entry.js +2 -2
  41. package/dist/cjs/q2-modal.cjs.entry.js +172 -0
  42. package/dist/cjs/q2-modal.cjs.entry.js.map +1 -0
  43. package/dist/cjs/q2-month-picker.cjs.entry.js +3 -3
  44. package/dist/cjs/q2-optgroup.cjs.entry.js +2 -2
  45. package/dist/cjs/q2-option-list_2.cjs.entry.js +2 -2
  46. package/dist/cjs/q2-option.cjs.entry.js +22 -24
  47. package/dist/cjs/q2-option.cjs.entry.js.map +1 -1
  48. package/dist/cjs/q2-pagination.cjs.entry.js +4 -4
  49. package/dist/cjs/q2-pill.cjs.entry.js +2 -2
  50. package/dist/cjs/q2-radio-group.cjs.entry.js +2 -2
  51. package/dist/cjs/q2-radio-group.cjs.entry.js.map +1 -1
  52. package/dist/cjs/q2-radio.cjs.entry.js +1 -1
  53. package/dist/cjs/q2-relative-time.cjs.entry.js +2 -2
  54. package/dist/cjs/q2-resize-observer.cjs.entry.js +2 -2
  55. package/dist/cjs/q2-resize-observer.cjs.entry.js.map +1 -1
  56. package/dist/cjs/q2-section.cjs.entry.js +3 -3
  57. package/dist/cjs/q2-select.cjs.entry.js +10 -6
  58. package/dist/cjs/q2-select.cjs.entry.js.map +1 -1
  59. package/dist/cjs/q2-stepper-pane.cjs.entry.js +1 -1
  60. package/dist/cjs/q2-stepper-vertical.cjs.entry.js +2 -2
  61. package/dist/cjs/q2-stepper.cjs.entry.js +2 -2
  62. package/dist/cjs/q2-tag.cjs.entry.js +51 -9
  63. package/dist/cjs/q2-tag.cjs.entry.js.map +1 -1
  64. package/dist/cjs/q2-tecton-elements.cjs.js +1 -1
  65. package/dist/cjs/q2-textarea.cjs.entry.js +3 -3
  66. package/dist/cjs/q2-textarea.cjs.entry.js.map +1 -1
  67. package/dist/cjs/q2-tooltip.cjs.entry.js +2 -2
  68. package/dist/cjs/q2-tooltip.cjs.entry.js.map +1 -1
  69. package/dist/cjs/sanitize-html-string-b8e3b24b.js +1366 -0
  70. package/dist/cjs/sanitize-html-string-b8e3b24b.js.map +1 -0
  71. package/dist/cjs/tecton-tab-pane.cjs.entry.js +2 -2
  72. package/dist/collection/collection-manifest.json +3 -1
  73. package/dist/collection/components/click-elsewhere/click-elsewhere.js.map +1 -1
  74. package/dist/collection/components/click-elsewhere/test/click-elsewhere-test.e2e.js.map +1 -1
  75. package/dist/collection/components/q2-action-group/q2-action-group.css +11 -4
  76. package/dist/collection/components/q2-action-group/q2-action-group.js +47 -13
  77. package/dist/collection/components/q2-action-group/q2-action-group.js.map +1 -1
  78. package/dist/collection/components/q2-action-group/test/q2-action-group-test.e2e.js +365 -0
  79. package/dist/collection/components/q2-action-group/test/q2-action-group-test.e2e.js.map +1 -0
  80. package/dist/collection/components/q2-action-group/test/{q2-action-group.spec.js → q2-action-group-test.spec.js} +67 -26
  81. package/dist/collection/components/q2-action-group/test/q2-action-group-test.spec.js.map +1 -0
  82. package/dist/collection/components/q2-action-sheet/q2-action-sheet.js +1 -1
  83. package/dist/collection/components/q2-action-sheet/q2-action-sheet.js.map +1 -1
  84. package/dist/collection/components/q2-action-sheet/test/q2-action-sheet-test.e2e.js.map +1 -1
  85. package/dist/collection/components/q2-avatar/q2-avatar.js +1 -1
  86. package/dist/collection/components/q2-avatar/q2-avatar.js.map +1 -1
  87. package/dist/collection/components/q2-avatar/test/q2-avatar-test.e2e.js.map +1 -1
  88. package/dist/collection/components/q2-badge/q2-badge.css +52 -41
  89. package/dist/collection/components/q2-badge/q2-badge.js +88 -22
  90. package/dist/collection/components/q2-badge/q2-badge.js.map +1 -1
  91. package/dist/collection/components/q2-badge/test/q2-badge-test.e2e.js +35 -126
  92. package/dist/collection/components/q2-badge/test/q2-badge-test.e2e.js.map +1 -1
  93. package/dist/collection/components/q2-badge/test/q2-badge-test.spec.js +415 -0
  94. package/dist/collection/components/q2-badge/test/q2-badge-test.spec.js.map +1 -0
  95. package/dist/collection/components/q2-btn/q2-btn.css +12 -10
  96. package/dist/collection/components/q2-btn/q2-btn.js.map +1 -1
  97. package/dist/collection/components/q2-btn/test/q2-btn-test.e2e.js.map +1 -1
  98. package/dist/collection/components/q2-calendar/q2-calendar-helpers.js.map +1 -1
  99. package/dist/collection/components/q2-calendar/q2-calendar-types.js.map +1 -1
  100. package/dist/collection/components/q2-calendar/q2-calendar-validation.js.map +1 -1
  101. package/dist/collection/components/q2-calendar/q2-calendar.css +2 -0
  102. package/dist/collection/components/q2-calendar/q2-calendar.js.map +1 -1
  103. package/dist/collection/components/q2-calendar/q2-month-picker.js +2 -2
  104. package/dist/collection/components/q2-calendar/q2-month-picker.js.map +1 -1
  105. package/dist/collection/components/q2-calendar/test/helpers-test.e2e.js.map +1 -1
  106. package/dist/collection/components/q2-calendar/test/q2-calendar-month-picker-test.e2e.js.map +1 -1
  107. package/dist/collection/components/q2-calendar/test/q2-calendar-test.e2e.js.map +1 -1
  108. package/dist/collection/components/q2-calendar/test/validation-test.e2e.js.map +1 -1
  109. package/dist/collection/components/q2-card/q2-card.js.map +1 -1
  110. package/dist/collection/components/q2-card/test/q2-card-test.e2e.js.map +1 -1
  111. package/dist/collection/components/q2-carousel/q2-carousel.js.map +1 -1
  112. package/dist/collection/components/q2-carousel/test/q2-carousel-test.e2e.js.map +1 -1
  113. package/dist/collection/components/q2-carousel-pane/q2-carousel-pane.js +2 -2
  114. package/dist/collection/components/q2-carousel-pane/q2-carousel-pane.js.map +1 -1
  115. package/dist/collection/components/q2-carousel-pane/test/q2-carousel-pane-test.e2e.js.map +1 -1
  116. package/dist/collection/components/q2-carousel-pane/test/q2-carousel-pane-test.spec.js.map +1 -1
  117. package/dist/collection/components/q2-chart-area/q2-chart-area.js +1 -1
  118. package/dist/collection/components/q2-chart-area/q2-chart-area.js.map +1 -1
  119. package/dist/collection/components/q2-chart-area/test/q2-chart-area-test.e2e.js.map +1 -1
  120. package/dist/collection/components/q2-chart-bar/q2-chart-bar.js +1 -1
  121. package/dist/collection/components/q2-chart-bar/q2-chart-bar.js.map +1 -1
  122. package/dist/collection/components/q2-chart-bar/test/q2-chart-bar-test.e2e.js.map +1 -1
  123. package/dist/collection/components/q2-chart-donut/q2-chart-donut.js +1 -1
  124. package/dist/collection/components/q2-chart-donut/q2-chart-donut.js.map +1 -1
  125. package/dist/collection/components/q2-chart-donut/test/q2-chart-donut-test.e2e.js.map +1 -1
  126. package/dist/collection/components/q2-checkbox/q2-checkbox.css +99 -62
  127. package/dist/collection/components/q2-checkbox/q2-checkbox.js +19 -19
  128. package/dist/collection/components/q2-checkbox/q2-checkbox.js.map +1 -1
  129. package/dist/collection/components/q2-checkbox/test/q2-checkbox-test.e2e.js +227 -208
  130. package/dist/collection/components/q2-checkbox/test/q2-checkbox-test.e2e.js.map +1 -1
  131. package/dist/collection/components/q2-checkbox-group/q2-checkbox-group.css +8 -1
  132. package/dist/collection/components/q2-checkbox-group/q2-checkbox-group.js.map +1 -1
  133. package/dist/collection/components/q2-checkbox-group/test/q2-checkbox-group-test.e2e.js.map +1 -1
  134. package/dist/collection/components/q2-currency/q2-currency.js +1 -1
  135. package/dist/collection/components/q2-currency/q2-currency.js.map +1 -1
  136. package/dist/collection/components/q2-currency/test/q2-currency-test.e2e.js.map +1 -1
  137. package/dist/collection/components/q2-data-table/q2-data-table.js.map +1 -1
  138. package/dist/collection/components/q2-data-table/test/q2-data-table-test.e2e.js.map +1 -1
  139. package/dist/collection/components/q2-detail/q2-detail.js +1 -1
  140. package/dist/collection/components/q2-detail/q2-detail.js.map +1 -1
  141. package/dist/collection/components/q2-detail/test/q2-detail-test.e2e.js.map +1 -1
  142. package/dist/collection/components/q2-dropdown/q2-dropdown.js.map +1 -1
  143. package/dist/collection/components/q2-dropdown/test/q2-dropdown-test.e2e.js.map +1 -1
  144. package/dist/collection/components/q2-dropdown-item/q2-dropdown-item.js.map +1 -1
  145. package/dist/collection/components/q2-dropdown-item/test/q2-dropdown-item-test.e2e.js.map +1 -1
  146. package/dist/collection/components/q2-editable-field/q2-editable-field.js.map +1 -1
  147. package/dist/collection/components/q2-editable-field/test/q2-editable-field-test.e2e.js.map +1 -1
  148. package/dist/collection/components/q2-example/q2-example.js.map +1 -1
  149. package/dist/collection/components/q2-example/test/q2-example.e2e.js.map +1 -1
  150. package/dist/collection/components/q2-example/test/q2-example.spec.js.map +1 -1
  151. package/dist/collection/components/q2-file-picker/q2-file-picker.css +2 -0
  152. package/dist/collection/components/q2-file-picker/q2-file-picker.js.map +1 -1
  153. package/dist/collection/components/q2-file-picker/test/q2-file-picker-test.e2e.js.map +1 -1
  154. package/dist/collection/components/q2-file-picker/test/q2-file-picker-test.spec.js.map +1 -1
  155. package/dist/collection/components/q2-form/q2-form.css +93 -0
  156. package/dist/collection/components/q2-form/q2-form.js +44 -0
  157. package/dist/collection/components/q2-form/q2-form.js.map +1 -0
  158. package/dist/collection/components/q2-form/test/q2-form-test.e2e.js +93 -0
  159. package/dist/collection/components/q2-form/test/q2-form-test.e2e.js.map +1 -0
  160. package/dist/collection/components/q2-formatted-text/q2-formatted-text.js +1 -1
  161. package/dist/collection/components/q2-formatted-text/q2-formatted-text.js.map +1 -1
  162. package/dist/collection/components/q2-formatted-text/test/q2-formatted-text-test.e2e.js.map +1 -1
  163. package/dist/collection/components/q2-icon/q2-icon-types.js.map +1 -1
  164. package/dist/collection/components/q2-icon/q2-icon.js.map +1 -1
  165. package/dist/collection/components/q2-icon/test/q2-icon-test.e2e.js +1 -352
  166. package/dist/collection/components/q2-icon/test/q2-icon-test.e2e.js.map +1 -1
  167. package/dist/collection/components/q2-icon/test/q2-icon-test.spec.js +464 -0
  168. package/dist/collection/components/q2-icon/test/q2-icon-test.spec.js.map +1 -0
  169. package/dist/collection/components/q2-input/formatting/alpha.js.map +1 -1
  170. package/dist/collection/components/q2-input/formatting/alpha.spec.js.map +1 -1
  171. package/dist/collection/components/q2-input/formatting/alphanumeric.js.map +1 -1
  172. package/dist/collection/components/q2-input/formatting/alphanumeric.spec.js.map +1 -1
  173. package/dist/collection/components/q2-input/formatting/credit-card.js.map +1 -1
  174. package/dist/collection/components/q2-input/formatting/credit-card.spec.js.map +1 -1
  175. package/dist/collection/components/q2-input/formatting/currency.js.map +1 -1
  176. package/dist/collection/components/q2-input/formatting/currency.spec.js.map +1 -1
  177. package/dist/collection/components/q2-input/formatting/date.js.map +1 -1
  178. package/dist/collection/components/q2-input/formatting/date.spec.js.map +1 -1
  179. package/dist/collection/components/q2-input/formatting/generic.js.map +1 -1
  180. package/dist/collection/components/q2-input/formatting/number.js.map +1 -1
  181. package/dist/collection/components/q2-input/formatting/numeric.js.map +1 -1
  182. package/dist/collection/components/q2-input/formatting/numeric.spec.js.map +1 -1
  183. package/dist/collection/components/q2-input/formatting/phone.js.map +1 -1
  184. package/dist/collection/components/q2-input/formatting/phone.spec.js.map +1 -1
  185. package/dist/collection/components/q2-input/formatting/postal.js.map +1 -1
  186. package/dist/collection/components/q2-input/formatting/postal.spec.js.map +1 -1
  187. package/dist/collection/components/q2-input/formatting/ssn.js.map +1 -1
  188. package/dist/collection/components/q2-input/formatting/ssn.spec.js.map +1 -1
  189. package/dist/collection/components/q2-input/formatting/tin.js.map +1 -1
  190. package/dist/collection/components/q2-input/formatting/tin.spec.js.map +1 -1
  191. package/dist/collection/components/q2-input/q2-input-types.js.map +1 -1
  192. package/dist/collection/components/q2-input/q2-input.css +3 -2
  193. package/dist/collection/components/q2-input/q2-input.js +4 -3
  194. package/dist/collection/components/q2-input/q2-input.js.map +1 -1
  195. package/dist/collection/components/q2-input/test/q2-input-credit-card-test.e2e.js.map +1 -1
  196. package/dist/collection/components/q2-input/test/q2-input-test.e2e.js.map +1 -1
  197. package/dist/collection/components/q2-input/test/q2-input-test.spec.js +10 -0
  198. package/dist/collection/components/q2-input/test/q2-input-test.spec.js.map +1 -1
  199. package/dist/collection/components/q2-item/q2-item.js +1 -1
  200. package/dist/collection/components/q2-item/q2-item.js.map +1 -1
  201. package/dist/collection/components/q2-item/test/q2-item-test.e2e.js.map +1 -1
  202. package/dist/collection/components/q2-item/test/q2-item-test.spec.js.map +1 -1
  203. package/dist/collection/components/q2-legend/q2-legend.css +1 -1
  204. package/dist/collection/components/q2-legend/q2-legend.js +1 -1
  205. package/dist/collection/components/q2-legend/q2-legend.js.map +1 -1
  206. package/dist/collection/components/q2-legend/test/q2-legend-test.e2e.js.map +1 -1
  207. package/dist/collection/components/q2-legend/test/q2-legend-test.spec.js.map +1 -1
  208. package/dist/collection/components/q2-link/q2-link.js.map +1 -1
  209. package/dist/collection/components/q2-link/test/q2-link-test.e2e.js.map +1 -1
  210. package/dist/collection/components/q2-link/test/q2-link-test.spec.js.map +1 -1
  211. package/dist/collection/components/q2-list/q2-list.js +1 -1
  212. package/dist/collection/components/q2-list/q2-list.js.map +1 -1
  213. package/dist/collection/components/q2-list/test/q2-list-test.e2e.js.map +1 -1
  214. package/dist/collection/components/q2-loading/q2-loading.js.map +1 -1
  215. package/dist/collection/components/q2-loading/skeleton/q2-loading-element/index.js.map +1 -1
  216. package/dist/collection/components/q2-loading/skeleton/shapes.js.map +1 -1
  217. package/dist/collection/components/q2-loading/test/q2-loading-element-test.e2e.js.map +1 -1
  218. package/dist/collection/components/q2-loading/test/q2-loading-test.e2e.js.map +1 -1
  219. package/dist/collection/components/q2-loc/q2-loc.js +19 -37
  220. package/dist/collection/components/q2-loc/q2-loc.js.map +1 -1
  221. package/dist/collection/components/q2-loc/test/q2-loc-test.e2e.js +1 -7
  222. package/dist/collection/components/q2-loc/test/q2-loc-test.e2e.js.map +1 -1
  223. package/dist/collection/components/q2-loc/test/q2-loc-test.spec.js +140 -82
  224. package/dist/collection/components/q2-loc/test/q2-loc-test.spec.js.map +1 -1
  225. package/dist/collection/components/q2-message/q2-message.js +1 -1
  226. package/dist/collection/components/q2-message/q2-message.js.map +1 -1
  227. package/dist/collection/components/q2-message/test/q2-message-test.e2e.js.map +1 -1
  228. package/dist/collection/components/q2-modal/q2-modal.css +223 -0
  229. package/dist/collection/components/q2-modal/q2-modal.js +470 -0
  230. package/dist/collection/components/q2-modal/q2-modal.js.map +1 -0
  231. package/dist/collection/components/q2-modal/test/q2-modal-test.e2e.js +102 -0
  232. package/dist/collection/components/q2-modal/test/q2-modal-test.e2e.js.map +1 -0
  233. package/dist/collection/components/q2-modal/test/q2-modal-test.spec.js +127 -0
  234. package/dist/collection/components/q2-modal/test/q2-modal-test.spec.js.map +1 -0
  235. package/dist/collection/components/q2-optgroup/q2-optgroup.js +1 -1
  236. package/dist/collection/components/q2-optgroup/q2-optgroup.js.map +1 -1
  237. package/dist/collection/components/q2-optgroup/test/q2-optgroup-test.e2e.js.map +1 -1
  238. package/dist/collection/components/q2-option/q2-option.js +22 -24
  239. package/dist/collection/components/q2-option/q2-option.js.map +1 -1
  240. package/dist/collection/components/q2-option/test/q2-option-test.e2e.js +32 -5
  241. package/dist/collection/components/q2-option/test/q2-option-test.e2e.js.map +1 -1
  242. package/dist/collection/components/q2-option/test/q2-option-test.spec.js +137 -19
  243. package/dist/collection/components/q2-option/test/q2-option-test.spec.js.map +1 -1
  244. package/dist/collection/components/q2-option-list/q2-option-list.js.map +1 -1
  245. package/dist/collection/components/q2-option-list/test/q2-option-list-test.e2e.js.map +1 -1
  246. package/dist/collection/components/q2-option-list/test/q2-option-list.spec.js.map +1 -1
  247. package/dist/collection/components/q2-pagination/q2-pagination.js +3 -3
  248. package/dist/collection/components/q2-pagination/q2-pagination.js.map +1 -1
  249. package/dist/collection/components/q2-pagination/test/q2-pagination-test.e2e.js.map +1 -1
  250. package/dist/collection/components/q2-pill/q2-pill.js +1 -1
  251. package/dist/collection/components/q2-pill/q2-pill.js.map +1 -1
  252. package/dist/collection/components/q2-pill/test/q2-pill-test.e2e.js.map +1 -1
  253. package/dist/collection/components/q2-popover/q2-popover.js +1 -1
  254. package/dist/collection/components/q2-popover/q2-popover.js.map +1 -1
  255. package/dist/collection/components/q2-popover/test/q2-popover-test.e2e.js.map +1 -1
  256. package/dist/collection/components/q2-popover/test/q2-popover-test.spec.js.map +1 -1
  257. package/dist/collection/components/q2-radio/q2-radio.js.map +1 -1
  258. package/dist/collection/components/q2-radio/test/q2-radio-test.e2e.js.map +1 -1
  259. package/dist/collection/components/q2-radio-group/q2-radio-group.css +4 -2
  260. package/dist/collection/components/q2-radio-group/q2-radio-group.js.map +1 -1
  261. package/dist/collection/components/q2-radio-group/test/q2-radio-group-test.e2e.js.map +1 -1
  262. package/dist/collection/components/q2-relative-time/q2-relative-time.js +1 -1
  263. package/dist/collection/components/q2-relative-time/q2-relative-time.js.map +1 -1
  264. package/dist/collection/components/q2-relative-time/test/q2-relative-time-test.e2e.js.map +1 -1
  265. package/dist/collection/components/q2-resize-observer/q2-resize-observer.js +2 -2
  266. package/dist/collection/components/q2-resize-observer/q2-resize-observer.js.map +1 -1
  267. package/dist/collection/components/q2-resize-observer/test/q2-resize-observer.e2e.js.map +1 -1
  268. package/dist/collection/components/q2-resize-observer/test/q2-resize-observer.spec.js.map +1 -1
  269. package/dist/collection/components/q2-section/q2-section.js +2 -2
  270. package/dist/collection/components/q2-section/q2-section.js.map +1 -1
  271. package/dist/collection/components/q2-section/test/q2-section-test.e2e.js.map +1 -1
  272. package/dist/collection/components/q2-select/q2-select.css +2 -2
  273. package/dist/collection/components/q2-select/q2-select.js +15 -4
  274. package/dist/collection/components/q2-select/q2-select.js.map +1 -1
  275. package/dist/collection/components/q2-select/test/q2-select-test.e2e.js +5 -1
  276. package/dist/collection/components/q2-select/test/q2-select-test.e2e.js.map +1 -1
  277. package/dist/collection/components/q2-select/test/q2-select-test.spec.js +85 -0
  278. package/dist/collection/components/q2-select/test/q2-select-test.spec.js.map +1 -0
  279. package/dist/collection/components/q2-stepper/q2-stepper.js +1 -1
  280. package/dist/collection/components/q2-stepper/q2-stepper.js.map +1 -1
  281. package/dist/collection/components/q2-stepper/test/q2-stepper-test.e2e.js.map +1 -1
  282. package/dist/collection/components/q2-stepper-pane/q2-stepper-pane.js.map +1 -1
  283. package/dist/collection/components/q2-stepper-pane/test/q2-stepper-pane-test.e2e.js.map +1 -1
  284. package/dist/collection/components/q2-stepper-vertical/q2-stepper-vertical.js +1 -1
  285. package/dist/collection/components/q2-stepper-vertical/q2-stepper-vertical.js.map +1 -1
  286. package/dist/collection/components/q2-stepper-vertical/test/q2-stepper-vertical-test.e2e.js.map +1 -1
  287. package/dist/collection/components/q2-tab-container/q2-tab-container.js +1 -1
  288. package/dist/collection/components/q2-tab-container/q2-tab-container.js.map +1 -1
  289. package/dist/collection/components/q2-tab-container/test/q2-tab-container-test.e2e.js.map +1 -1
  290. package/dist/collection/components/q2-tab-container/test/q2-tab-container-test.spec.js.map +1 -1
  291. package/dist/collection/components/q2-tab-pane/q2-tab-pane.js +1 -1
  292. package/dist/collection/components/q2-tab-pane/q2-tab-pane.js.map +1 -1
  293. package/dist/collection/components/q2-tab-pane/test/q2-tab-pane-test.e2e.js.map +1 -1
  294. package/dist/collection/components/q2-tag/q2-tag.css +9 -0
  295. package/dist/collection/components/q2-tag/q2-tag.js +65 -15
  296. package/dist/collection/components/q2-tag/q2-tag.js.map +1 -1
  297. package/dist/collection/components/q2-tag/test/q2-tag-test.e2e.js +131 -341
  298. package/dist/collection/components/q2-tag/test/q2-tag-test.e2e.js.map +1 -1
  299. package/dist/collection/components/q2-tag/test/q2-tag-test.spec.js +719 -0
  300. package/dist/collection/components/q2-tag/test/q2-tag-test.spec.js.map +1 -0
  301. package/dist/collection/components/q2-textarea/q2-textarea.css +2 -2
  302. package/dist/collection/components/q2-textarea/q2-textarea.js +1 -1
  303. package/dist/collection/components/q2-textarea/q2-textarea.js.map +1 -1
  304. package/dist/collection/components/q2-textarea/test/q2-textarea-test.e2e.js.map +1 -1
  305. package/dist/collection/components/q2-tooltip/q2-tooltip.css +0 -1
  306. package/dist/collection/components/q2-tooltip/q2-tooltip.js.map +1 -1
  307. package/dist/collection/components/q2-tooltip/test/q2-tooltip-test.e2e.js.map +1 -1
  308. package/dist/collection/components/tecton-tab-pane/tecton-tab-pane-types.js.map +1 -1
  309. package/dist/collection/components/tecton-tab-pane/tecton-tab-pane.js +2 -2
  310. package/dist/collection/components/tecton-tab-pane/tecton-tab-pane.js.map +1 -1
  311. package/dist/collection/components/tecton-tab-pane/test/tecton-tab-pane-test.e2e.js.map +1 -1
  312. package/dist/collection/index.js.map +1 -1
  313. package/dist/collection/utils/action-sheet.js.map +1 -1
  314. package/dist/collection/utils/charting.js.map +1 -1
  315. package/dist/collection/utils/helpers.js +1 -25
  316. package/dist/collection/utils/helpers.js.map +1 -1
  317. package/dist/collection/utils/index.js +2 -1
  318. package/dist/collection/utils/index.js.map +1 -1
  319. package/dist/collection/utils/mirror-emit.js.map +1 -1
  320. package/dist/collection/utils/sanitize-html-string.js.map +1 -1
  321. package/dist/collection/utils/sanitize-regex-string.js.map +1 -1
  322. package/dist/collection/utils/test/action-sheet-test.e2e.js.map +1 -1
  323. package/dist/collection/utils/test/index.spec.js.map +1 -1
  324. package/dist/components/index.js +4 -0
  325. package/dist/components/index.js.map +1 -1
  326. package/dist/components/index2.js +2 -1
  327. package/dist/components/index2.js.map +1 -1
  328. package/dist/components/q2-action-group.js +1 -116
  329. package/dist/components/q2-action-group.js.map +1 -1
  330. package/dist/components/q2-action-group2.js +151 -0
  331. package/dist/components/q2-action-group2.js.map +1 -0
  332. package/dist/components/q2-action-sheet.js +2 -1362
  333. package/dist/components/q2-action-sheet.js.map +1 -1
  334. package/dist/components/q2-avatar2.js +1 -1
  335. package/dist/components/q2-badge2.js +54 -16
  336. package/dist/components/q2-badge2.js.map +1 -1
  337. package/dist/components/q2-btn2.js +1 -1
  338. package/dist/components/q2-btn2.js.map +1 -1
  339. package/dist/components/q2-calendar.js +1 -1
  340. package/dist/components/q2-calendar.js.map +1 -1
  341. package/dist/components/q2-carousel-pane.js +2 -2
  342. package/dist/components/q2-chart-area.js +1 -1
  343. package/dist/components/q2-chart-bar.js +1 -1
  344. package/dist/components/q2-chart-donut.js +1 -1
  345. package/dist/components/q2-checkbox-group.js +1 -1
  346. package/dist/components/q2-checkbox-group.js.map +1 -1
  347. package/dist/components/q2-checkbox2.js +20 -20
  348. package/dist/components/q2-checkbox2.js.map +1 -1
  349. package/dist/components/q2-currency.js +1 -1
  350. package/dist/components/q2-detail.js +1 -1
  351. package/dist/components/q2-file-picker.js +1 -1
  352. package/dist/components/q2-file-picker.js.map +1 -1
  353. package/dist/components/q2-form.d.ts +11 -0
  354. package/dist/components/q2-form.js +39 -0
  355. package/dist/components/q2-form.js.map +1 -0
  356. package/dist/components/q2-formatted-text.js +1 -1
  357. package/dist/components/q2-input2.js +5 -4
  358. package/dist/components/q2-input2.js.map +1 -1
  359. package/dist/components/q2-item2.js +1 -1
  360. package/dist/components/q2-legend2.js +2 -2
  361. package/dist/components/q2-legend2.js.map +1 -1
  362. package/dist/components/q2-list2.js +1 -1
  363. package/dist/components/q2-loc.js +22 -33
  364. package/dist/components/q2-loc.js.map +1 -1
  365. package/dist/components/q2-message2.js +1 -1
  366. package/dist/components/q2-modal.d.ts +11 -0
  367. package/dist/components/q2-modal.js +231 -0
  368. package/dist/components/q2-modal.js.map +1 -0
  369. package/dist/components/q2-month-picker.js +2 -2
  370. package/dist/components/q2-optgroup2.js +1 -1
  371. package/dist/components/q2-option2.js +23 -25
  372. package/dist/components/q2-option2.js.map +1 -1
  373. package/dist/components/q2-pagination.js +3 -3
  374. package/dist/components/q2-pill.js +1 -1
  375. package/dist/components/q2-popover2.js +1 -1
  376. package/dist/components/q2-radio-group.js +1 -1
  377. package/dist/components/q2-radio-group.js.map +1 -1
  378. package/dist/components/q2-relative-time.js +1 -1
  379. package/dist/components/q2-resize-observer2.js +2 -2
  380. package/dist/components/q2-resize-observer2.js.map +1 -1
  381. package/dist/components/q2-section.js +2 -2
  382. package/dist/components/q2-select2.js +9 -5
  383. package/dist/components/q2-select2.js.map +1 -1
  384. package/dist/components/q2-stepper-vertical.js +1 -1
  385. package/dist/components/q2-stepper.js +1 -1
  386. package/dist/components/q2-tab-container.js +1 -1
  387. package/dist/components/q2-tab-pane.js +1 -1
  388. package/dist/components/q2-tag.js +50 -8
  389. package/dist/components/q2-tag.js.map +1 -1
  390. package/dist/components/q2-textarea.js +2 -2
  391. package/dist/components/q2-textarea.js.map +1 -1
  392. package/dist/components/q2-tooltip.js +1 -1
  393. package/dist/components/q2-tooltip.js.map +1 -1
  394. package/dist/components/sanitize-html-string.js +1364 -0
  395. package/dist/components/sanitize-html-string.js.map +1 -0
  396. package/dist/components/tecton-tab-pane.js +2 -2
  397. package/dist/esm/{index-504f1a9e.js → index-f2a66217.js} +3 -2
  398. package/dist/esm/index-f2a66217.js.map +1 -0
  399. package/dist/esm/loader.js +1 -1
  400. package/dist/esm/q2-action-group.entry.js +45 -14
  401. package/dist/esm/q2-action-group.entry.js.map +1 -1
  402. package/dist/esm/q2-action-sheet.entry.js +3 -1363
  403. package/dist/esm/q2-action-sheet.entry.js.map +1 -1
  404. package/dist/esm/q2-avatar.entry.js +1 -1
  405. package/dist/esm/q2-badge_7.entry.js +59 -22
  406. package/dist/esm/q2-badge_7.entry.js.map +1 -1
  407. package/dist/esm/q2-calendar.entry.js +2 -2
  408. package/dist/esm/q2-calendar.entry.js.map +1 -1
  409. package/dist/esm/q2-card.entry.js +1 -1
  410. package/dist/esm/q2-carousel-pane.entry.js +3 -3
  411. package/dist/esm/q2-carousel.entry.js +1 -1
  412. package/dist/esm/q2-chart-area.entry.js +2 -2
  413. package/dist/esm/q2-chart-bar.entry.js +2 -2
  414. package/dist/esm/q2-chart-donut.entry.js +2 -2
  415. package/dist/esm/q2-checkbox-group.entry.js +2 -2
  416. package/dist/esm/q2-checkbox-group.entry.js.map +1 -1
  417. package/dist/esm/q2-checkbox.entry.js +21 -21
  418. package/dist/esm/q2-checkbox.entry.js.map +1 -1
  419. package/dist/esm/q2-currency.entry.js +1 -1
  420. package/dist/esm/q2-data-table.entry.js +1 -1
  421. package/dist/esm/q2-detail.entry.js +2 -2
  422. package/dist/esm/q2-dropdown-item.entry.js +1 -1
  423. package/dist/esm/q2-dropdown.entry.js +1 -1
  424. package/dist/esm/q2-editable-field.entry.js +1 -1
  425. package/dist/esm/q2-file-picker.entry.js +2 -2
  426. package/dist/esm/q2-file-picker.entry.js.map +1 -1
  427. package/dist/esm/q2-form.entry.js +19 -0
  428. package/dist/esm/q2-form.entry.js.map +1 -0
  429. package/dist/esm/q2-formatted-text.entry.js +1 -1
  430. package/dist/esm/q2-item_3.entry.js +3 -3
  431. package/dist/esm/q2-legend.entry.js +2 -2
  432. package/dist/esm/q2-legend.entry.js.map +1 -1
  433. package/dist/esm/q2-loc.entry.js +21 -27
  434. package/dist/esm/q2-loc.entry.js.map +1 -1
  435. package/dist/esm/q2-message.entry.js +2 -2
  436. package/dist/esm/q2-modal.entry.js +168 -0
  437. package/dist/esm/q2-modal.entry.js.map +1 -0
  438. package/dist/esm/q2-month-picker.entry.js +3 -3
  439. package/dist/esm/q2-optgroup.entry.js +2 -2
  440. package/dist/esm/q2-option-list_2.entry.js +2 -2
  441. package/dist/esm/q2-option.entry.js +22 -24
  442. package/dist/esm/q2-option.entry.js.map +1 -1
  443. package/dist/esm/q2-pagination.entry.js +4 -4
  444. package/dist/esm/q2-pill.entry.js +2 -2
  445. package/dist/esm/q2-radio-group.entry.js +2 -2
  446. package/dist/esm/q2-radio-group.entry.js.map +1 -1
  447. package/dist/esm/q2-radio.entry.js +1 -1
  448. package/dist/esm/q2-relative-time.entry.js +2 -2
  449. package/dist/esm/q2-resize-observer.entry.js +2 -2
  450. package/dist/esm/q2-resize-observer.entry.js.map +1 -1
  451. package/dist/esm/q2-section.entry.js +3 -3
  452. package/dist/esm/q2-select.entry.js +10 -6
  453. package/dist/esm/q2-select.entry.js.map +1 -1
  454. package/dist/esm/q2-stepper-pane.entry.js +1 -1
  455. package/dist/esm/q2-stepper-vertical.entry.js +2 -2
  456. package/dist/esm/q2-stepper.entry.js +2 -2
  457. package/dist/esm/q2-tag.entry.js +51 -9
  458. package/dist/esm/q2-tag.entry.js.map +1 -1
  459. package/dist/esm/q2-tecton-elements.js +1 -1
  460. package/dist/esm/q2-textarea.entry.js +3 -3
  461. package/dist/esm/q2-textarea.entry.js.map +1 -1
  462. package/dist/esm/q2-tooltip.entry.js +2 -2
  463. package/dist/esm/q2-tooltip.entry.js.map +1 -1
  464. package/dist/esm/sanitize-html-string-735c19f5.js +1364 -0
  465. package/dist/esm/sanitize-html-string-735c19f5.js.map +1 -0
  466. package/dist/esm/tecton-tab-pane.entry.js +2 -2
  467. package/dist/jest.setup.js +22 -0
  468. package/dist/jest.setup.js.map +1 -0
  469. package/dist/q2-tecton-elements/{index-504f1a9e.js → index-f2a66217.js} +9 -8
  470. package/dist/q2-tecton-elements/index-f2a66217.js.map +1 -0
  471. package/dist/q2-tecton-elements/q2-action-group.entry.js +49 -17
  472. package/dist/q2-tecton-elements/q2-action-group.entry.js.map +1 -1
  473. package/dist/q2-tecton-elements/q2-action-sheet.entry.js +121 -1331
  474. package/dist/q2-tecton-elements/q2-action-sheet.entry.js.map +1 -1
  475. package/dist/q2-tecton-elements/q2-avatar.entry.js +6 -6
  476. package/dist/q2-tecton-elements/q2-badge_7.entry.js +199 -164
  477. package/dist/q2-tecton-elements/q2-badge_7.entry.js.map +1 -1
  478. package/dist/q2-tecton-elements/q2-calendar.entry.js +180 -180
  479. package/dist/q2-tecton-elements/q2-calendar.entry.js.map +1 -1
  480. package/dist/q2-tecton-elements/q2-card.entry.js +1 -1
  481. package/dist/q2-tecton-elements/q2-carousel-pane.entry.js +21 -21
  482. package/dist/q2-tecton-elements/q2-carousel.entry.js +1 -1
  483. package/dist/q2-tecton-elements/q2-chart-area.entry.js +3 -3
  484. package/dist/q2-tecton-elements/q2-chart-bar.entry.js +3 -3
  485. package/dist/q2-tecton-elements/q2-chart-donut.entry.js +7 -7
  486. package/dist/q2-tecton-elements/q2-checkbox-group.entry.js +5 -5
  487. package/dist/q2-tecton-elements/q2-checkbox-group.entry.js.map +1 -1
  488. package/dist/q2-tecton-elements/q2-checkbox.entry.js +92 -88
  489. package/dist/q2-tecton-elements/q2-checkbox.entry.js.map +1 -1
  490. package/dist/q2-tecton-elements/q2-currency.entry.js +6 -6
  491. package/dist/q2-tecton-elements/q2-data-table.entry.js +1 -1
  492. package/dist/q2-tecton-elements/q2-detail.entry.js +39 -39
  493. package/dist/q2-tecton-elements/q2-dropdown-item.entry.js +1 -1
  494. package/dist/q2-tecton-elements/q2-dropdown.entry.js +1 -1
  495. package/dist/q2-tecton-elements/q2-editable-field.entry.js +1 -1
  496. package/dist/q2-tecton-elements/q2-file-picker.entry.js +2 -2
  497. package/dist/q2-tecton-elements/q2-file-picker.entry.js.map +1 -1
  498. package/dist/q2-tecton-elements/q2-form.entry.js +25 -0
  499. package/dist/q2-tecton-elements/q2-form.entry.js.map +1 -0
  500. package/dist/q2-tecton-elements/q2-formatted-text.entry.js +2 -2
  501. package/dist/q2-tecton-elements/q2-item_3.entry.js +22 -22
  502. package/dist/q2-tecton-elements/q2-legend.entry.js +6 -6
  503. package/dist/q2-tecton-elements/q2-legend.entry.js.map +1 -1
  504. package/dist/q2-tecton-elements/q2-loc.entry.js +23 -32
  505. package/dist/q2-tecton-elements/q2-loc.entry.js.map +1 -1
  506. package/dist/q2-tecton-elements/q2-message.entry.js +21 -21
  507. package/dist/q2-tecton-elements/q2-modal.entry.js +226 -0
  508. package/dist/q2-tecton-elements/q2-modal.entry.js.map +1 -0
  509. package/dist/q2-tecton-elements/q2-month-picker.entry.js +14 -14
  510. package/dist/q2-tecton-elements/q2-optgroup.entry.js +8 -8
  511. package/dist/q2-tecton-elements/q2-option-list_2.entry.js +4 -4
  512. package/dist/q2-tecton-elements/q2-option.entry.js +38 -38
  513. package/dist/q2-tecton-elements/q2-option.entry.js.map +1 -1
  514. package/dist/q2-tecton-elements/q2-pagination.entry.js +38 -38
  515. package/dist/q2-tecton-elements/q2-pill.entry.js +14 -14
  516. package/dist/q2-tecton-elements/q2-radio-group.entry.js +28 -28
  517. package/dist/q2-tecton-elements/q2-radio-group.entry.js.map +1 -1
  518. package/dist/q2-tecton-elements/q2-radio.entry.js +1 -1
  519. package/dist/q2-tecton-elements/q2-relative-time.entry.js +5 -5
  520. package/dist/q2-tecton-elements/q2-resize-observer.entry.js +5 -2
  521. package/dist/q2-tecton-elements/q2-resize-observer.entry.js.map +1 -1
  522. package/dist/q2-tecton-elements/q2-section.entry.js +19 -19
  523. package/dist/q2-tecton-elements/q2-select.entry.js +13 -9
  524. package/dist/q2-tecton-elements/q2-select.entry.js.map +1 -1
  525. package/dist/q2-tecton-elements/q2-stepper-pane.entry.js +1 -1
  526. package/dist/q2-tecton-elements/q2-stepper-vertical.entry.js +5 -5
  527. package/dist/q2-tecton-elements/q2-stepper.entry.js +22 -22
  528. package/dist/q2-tecton-elements/q2-tag.entry.js +84 -45
  529. package/dist/q2-tecton-elements/q2-tag.entry.js.map +1 -1
  530. package/dist/q2-tecton-elements/q2-tecton-elements.esm.js +1 -1
  531. package/dist/q2-tecton-elements/q2-tecton-elements.esm.js.map +1 -1
  532. package/dist/q2-tecton-elements/q2-textarea.entry.js +4 -4
  533. package/dist/q2-tecton-elements/q2-textarea.entry.js.map +1 -1
  534. package/dist/q2-tecton-elements/q2-tooltip.entry.js +2 -2
  535. package/dist/q2-tecton-elements/q2-tooltip.entry.js.map +1 -1
  536. package/dist/q2-tecton-elements/sanitize-html-string-735c19f5.js +1214 -0
  537. package/dist/q2-tecton-elements/sanitize-html-string-735c19f5.js.map +1 -0
  538. package/dist/q2-tecton-elements/tecton-tab-pane.entry.js +9 -9
  539. package/dist/types/builds/q2e/development/tecton/tecton/packages/q2-tecton-elements/.stencil/jest.setup.d.ts +1 -0
  540. package/dist/types/components/q2-action-group/q2-action-group.d.ts +5 -2
  541. package/dist/types/components/q2-badge/q2-badge.d.ts +17 -3
  542. package/dist/types/components/q2-checkbox/q2-checkbox.d.ts +3 -3
  543. package/dist/types/components/q2-form/q2-form.d.ts +6 -0
  544. package/dist/types/components/q2-loc/q2-loc.d.ts +5 -5
  545. package/dist/types/components/q2-modal/q2-modal.d.ts +80 -0
  546. package/dist/types/components/q2-option/q2-option.d.ts +4 -4
  547. package/dist/types/components/q2-select/q2-select.d.ts +1 -0
  548. package/dist/types/components/q2-tag/q2-tag.d.ts +19 -0
  549. package/dist/types/components.d.ts +182 -6
  550. package/dist/types/util.d.ts +1 -8
  551. package/dist/types/utils/helpers.d.ts +1 -13
  552. package/dist/types/utils/index.d.ts +3 -2
  553. package/package.json +3 -3
  554. package/dist/cjs/index-76f63767.js.map +0 -1
  555. package/dist/collection/components/q2-action-group/test/q2-action-group.e2e.js +0 -166
  556. package/dist/collection/components/q2-action-group/test/q2-action-group.e2e.js.map +0 -1
  557. package/dist/collection/components/q2-action-group/test/q2-action-group.spec.js.map +0 -1
  558. package/dist/esm/index-504f1a9e.js.map +0 -1
  559. package/dist/q2-tecton-elements/index-504f1a9e.js.map +0 -1
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, c as createEvent, h, g as getElement } from './index-7a5365e2.js';
2
- import { l as loc, a as handleAriaLabel, o as overrideFocus } from './index-504f1a9e.js';
2
+ import { l as loc, a as handleAriaLabel, o as overrideFocus } from './index-f2a66217.js';
3
3
 
4
4
  /**
5
5
  * Emits specified events from a given component context with the provided detail.
@@ -1,6 +1,6 @@
1
1
  import { r as registerInstance, h, F as Fragment, g as getElement } from './index-7a5365e2.js';
2
2
  import { s as shouldShowActionSheet, a as showActionSheetList } from './action-sheet-1e24cb38.js';
3
- import { o as overrideFocus, i as isEventFromElement, w as waitForNextPaint, j as handleRenamedProp, a as handleAriaLabel, l as loc } from './index-504f1a9e.js';
3
+ import { o as overrideFocus, i as isEventFromElement, w as waitForNextPaint, j as handleRenamedProp, a as handleAriaLabel, l as loc } from './index-f2a66217.js';
4
4
 
5
5
  const q2DropdownCss = "*{box-sizing:border-box}*:active{outline:none}*:focus{outline:none;box-shadow:var(--const-double-focus-ring, 0 0 0 2px #ffffff, 0 0 0 4px #0066cc)}:host{box-shadow:none !important}::-moz-focus-inner{border:none}input,textarea,button{font-family:inherit;font-size:inherit;font-stretch:inherit}:host(.sr),:host(.sr) button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.sr,.sr button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.hidden{display:none}:host([hidden]){display:none}.invisible{visibility:hidden}:host{display:inline-flex}:host([block]){display:block}q2-icon{pointer-events:none;margin-block:-100px}click-elsewhere{position:relative;display:block}q2-popover{--tct-popover-min-width:var(--tct-dropdown-width, var(--t-dropdown-width))}";
6
6
  const Q2DropdownStyle0 = q2DropdownCss;
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, c as createEvent, h, g as getElement } from './index-7a5365e2.js';
2
- import { a as handleAriaLabel, o as overrideFocus, i as isEventFromElement, w as waitForNextPaint, l as loc } from './index-504f1a9e.js';
2
+ import { a as handleAriaLabel, o as overrideFocus, i as isEventFromElement, w as waitForNextPaint, l as loc } from './index-f2a66217.js';
3
3
 
4
4
  const q2EditableFieldCss = "*{box-sizing:border-box}*:active{outline:none}*:focus{outline:none;box-shadow:var(--const-double-focus-ring, 0 0 0 2px #ffffff, 0 0 0 4px #0066cc)}:host{box-shadow:none !important}::-moz-focus-inner{border:none}input,textarea,button{font-family:inherit;font-size:inherit;font-stretch:inherit}:host(.sr),:host(.sr) button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.sr,.sr button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.hidden{display:none}:host([hidden]){display:none}.invisible{visibility:hidden}:host{display:inline-block;max-width:100%}.q2-editable-field-wrapper:not([hidden]){display:flex}.q2-editable-field-wrapper.editing{align-items:flex-end}:host([block]){display:block;width:100%}:host([block]) .q2-editable-field-wrapper:not([hidden]){display:grid;grid-template-columns:1fr auto auto}q2-input,.text-wrapper{margin:0 var(--tct-scale-2, var(--app-scale-2x, 10px)) 0 0}q2-input{flex:1 1 auto;min-width:170px}.text-wrapper{flex:0 auto;align-self:center;display:inline-block}:host([truncated]) .text-wrapper{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}q2-btn{flex:0 0 44px}dl{margin:var(--tct-scale-0, var(--app-scale-0x, 0))}dt{font-weight:600}dd{margin-left:var(--tct-scale-0, var(--app-scale-0x, 0));display:flex;align-items:center}";
5
5
  const Q2EditableFieldStyle0 = q2EditableFieldCss;
@@ -1,7 +1,7 @@
1
1
  import { r as registerInstance, c as createEvent, h, F as Fragment, g as getElement } from './index-7a5365e2.js';
2
- import { l as loc, e as hasSlotContent } from './index-504f1a9e.js';
2
+ import { l as loc, e as hasSlotContent } from './index-f2a66217.js';
3
3
 
4
- const q2FilePickerCss = "*{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}*{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}@keyframes growFromCenterFadeIn{from{transform:scaleX(0.75) scaleY(0.75);opacity:0}to{transform:scaleX(1) scaleY(1);opacity:1}}@keyframes shrinkToCenterFadeOut{from{transform:scaleX(1) scaleY(1);opacity:1}to{transform:scaleX(0.75) scaleY(0.75);opacity:0}}:host{display:block}.browse{text-align:left}.drop-zone-text{color:var(--tct-file-picker-drop-zone-text-color, var(--t-gray-6, #4d4d4d));font-size:var(--tct-file-picker-drop-zone-font-size, var(--app-font-size-small, 12px));font-weight:var(--tct-file-picker-browse-link-font-weight, 700);margin-bottom:0;margin-top:var(--tct-file-picker-drop-zone-text-margin-top, var(--app-scale-2x, 10px))}.description{color:var(--tct-file-picker-description-text-color, var(--t-gray-1, #0d0d0d));font-size:var(--tct-file-picker-description-font-size, var(--app-font-size-small, 12px));font-weight:var(--tct-file-picker-description-font-weight, 400);text-align:var(--tct-file-picker-description-text-align, left)}.drop-zone{align-items:center;background-color:var(--tct-file-picker-drop-zone-background, var(--t-tertiary, #e8f5fc));border-radius:var(--tct-file-picker-drop-zone-border-radius, var(--app-border-radius-2, 6px));border-width:var(--tct-file-picker-drop-zone-border-width, 2px);border-style:var(--tct-file-picker-drop-zone-border-style, dashed);border-color:var(--tct-file-picker-drop-zone-border-color, var(--t-gray-8, #808080));color:var(--tct-file-picker-drop-zone-color, #747474);display:flex;flex-direction:column;font-size:var(--tct-file-picker-drop-zone-font-size, --app-font-size, 14px);font-weight:var(--tct-file-picker-drop-zone-font-weight, 400);height:var(--tct-file-picker-drop-zone-height, 150px);justify-content:center;padding:var(--tct-file-picker-drop-zone-padding, 20px);text-align:center;width:var(--tct-file-picker-drop-zone-width, 100%)}.drop-zone-highlighted{background-color:var(--tct-file-picker-drop-zone-highlighted-background, var(--tertiary-d-1, #bee1f6));border-color:var(--tct-file-picker-drop-zone-highlighted-border, var(--t-gray-8, #808080))}.fade-in{animation-fill-mode:both;animation-play-state:running;animation:growFromCenterFadeIn 0.2s ease-in}.fade-out{animation:shrinkToCenterFadeOut 0.1s ease-out;animation-play-state:running;animation-fill-mode:both}.file-item{--tct-btn-icon-border-radius:4px;--tct-btn-neutral-text-active-font-color:var(--tct-file-picker-item-close-btn-active-color, var(--t-gray-1, #0d0d0d));--tct-btn-neutral-text-focus-visible-outer-ring-color:var(--tct-file-picker-item-close-btn-color, var(--t-gray-1, #0d0d0d));--tct-btn-neutral-text-font-color:var(--tct-file-picker-item-close-btn-color, var(--t-gray-1, #0d0d0d));--tct-btn-neutral-text-hover-outer-ring-color:var(--tct-file-picker-item-close-btn-hover-focus-ring-color, var(--t-gray-1, #0d0d0d));--tct-btn-icon-only-intent-padding:0;--tct-icon-stroke-primary:var(--tct-file-picker-item-close-btn-color, var(--t-gray-1, #0d0d0d));--tct-item-body-font-size:var(--tct-file-picker-item-font-size, var(--app-font-size-small, 12px));--tct-item-body-font-weight:var(--tct-file-picker-item-font-weight, 400);--tct-item-border-radius:var(--tct-file-picker-item-border-radius, var(--app-border-radius-3, 12px));--tct-item-border:var(--tct-file-picker-item-border-width, 1px) solid var(--tct-file-picker-item-border-color, var(--t-gray-8, #808080));--tct-item-header-color:var(--tct-file-picker-item-name-color, var(--t-gray-1, #0d0d0d));--tct-item-header-font-size:var(--tct-file-picker-item-name-font-size, var(--app-font-size-small, 12px));--tct-item-header-font-weight:var(--tct-file-picker-item-name-font-weight, 400);--tct-item-padding:var(--tct-file-picker-item-padding, var(--app-scale-1x, 5px) var(--app-scale-2x, 10px));text-align:left}.file-item-loading{font-size:var(--tct-file-picker-file-item-loading-size, var(--app-scale-6x, 30px));margin-bottom:calc(var(--tct-file-picker-file-item-loading-margin-bottom, var(--app-scale-6x, 30px)) / 8.57);margin-left:calc(var(--tct-file-picker-file-item-loading-margin-bottom, var(--app-scale-1x, 5px)) / 2)}.file-list{--tct-list-item-gap:var(--tct-file-picker-section-gap, var(--app-scale-3x, 15px))}.file-list-container{max-height:var(--tct-file-picker-list-max-height, 190px);overflow-y:auto;scrollbar-width:thin;scrollbar-color:var(--tct-file-picker-scrollbar-color, var(--t-a11y-gray-color, #949494)) transparent}.file-picker{display:flex;flex-direction:column;gap:var(--tct-file-picker-file-item-gap, var(--app-scale-3x, 15px))}.heading{display:flex;flex-direction:column;gap:var(--tct-file-picker-heading-gap, var(--app-scale-1x, 5px));justify-content:space-between}.icon-success,.icon-error{--tct-icon-size:var(--tct-file-picker-file-item-icon-size, var(--app-scale-6x, 30px));--tct-icon-stroke-width:2px}.label{color:var(--tct-file-picker-label-color, var(--t-gray-1, #0d0d0d));display:inline-block;font-size:var(--tct-file-picker-label-font-size, var(--app-font-size, 14px));font-weight:var(--tct-file-picker-label-font-weight, 600);text-align:var(--tct-file-picker-label-text-align, left)}.loading{font-size:var(--tct-file-picker-loading-size, var(--app-scale-6x, 25px))}.loading-file{color:var(--tct-file-picker-loading-file-color, var(--t-gray-1, #0d0d0d));font-size:var(--tct-file-picker-loading-file-font-size, var(--app-font-size-small, 12px));font-weight:var(--tct-file-picker-loading-file-font-weight, 400);margin:0}.loading-message{color:var(--tct-file-picker-loading-message-color, var(--t-gray-1, #0d0d0d));font-size:var(--tct-file-picker-loading-message-font-size, var(--app-font-size-small, 12px));font-weight:var(--tct-file-picker-loading-message-font-weight, 700);margin-bottom:var(--tct-file-picker-loading-message-margin-bottom, var(--app-scale-2x, 10px));margin-top:var(--tct-file-picker-loading-message-margin-top, var(--app-scale-2x, 10px))}.dismiss-button{height:30px;width:30px}.dismiss-button:hover{--tct-icon-stroke-primary:var(--tct-file-picker-item-close-btn-hover-color, var(--t-gray-1, #0d0d0d))}[slot=action]{display:flex;align-items:center}";
4
+ const q2FilePickerCss = "*{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}*{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}@keyframes growFromCenterFadeIn{from{transform:scaleX(0.75) scaleY(0.75);opacity:0}to{transform:scaleX(1) scaleY(1);opacity:1}}@keyframes shrinkToCenterFadeOut{from{transform:scaleX(1) scaleY(1);opacity:1}to{transform:scaleX(0.75) scaleY(0.75);opacity:0}}:host{--comp-default-file-picker-margin:var(--tct-file-picker-margin-top, var(--t-file-picker-margin-top, var(--app-scale-5x, 25px))) 0 var(--tct-file-picker-margin-bottom, var(--t-file-picker-margin-bottom, var(--app-scale-5x, 25px)));display:block;margin:var(--tct-file-picker-margin, var(--comp-default-file-picker-margin))}.browse{text-align:left}.drop-zone-text{color:var(--tct-file-picker-drop-zone-text-color, var(--t-gray-6, #4d4d4d));font-size:var(--tct-file-picker-drop-zone-font-size, var(--app-font-size-small, 12px));font-weight:var(--tct-file-picker-browse-link-font-weight, 700);margin-bottom:0;margin-top:var(--tct-file-picker-drop-zone-text-margin-top, var(--app-scale-2x, 10px))}.description{color:var(--tct-file-picker-description-text-color, var(--t-gray-1, #0d0d0d));font-size:var(--tct-file-picker-description-font-size, var(--app-font-size-small, 12px));font-weight:var(--tct-file-picker-description-font-weight, 400);text-align:var(--tct-file-picker-description-text-align, left)}.drop-zone{align-items:center;background-color:var(--tct-file-picker-drop-zone-background, var(--t-tertiary, #e8f5fc));border-radius:var(--tct-file-picker-drop-zone-border-radius, var(--app-border-radius-2, 6px));border-width:var(--tct-file-picker-drop-zone-border-width, 2px);border-style:var(--tct-file-picker-drop-zone-border-style, dashed);border-color:var(--tct-file-picker-drop-zone-border-color, var(--t-gray-8, #808080));color:var(--tct-file-picker-drop-zone-color, #747474);display:flex;flex-direction:column;font-size:var(--tct-file-picker-drop-zone-font-size, --app-font-size, 14px);font-weight:var(--tct-file-picker-drop-zone-font-weight, 400);height:var(--tct-file-picker-drop-zone-height, 150px);justify-content:center;padding:var(--tct-file-picker-drop-zone-padding, 20px);text-align:center;width:var(--tct-file-picker-drop-zone-width, 100%)}.drop-zone-highlighted{background-color:var(--tct-file-picker-drop-zone-highlighted-background, var(--tertiary-d-1, #bee1f6));border-color:var(--tct-file-picker-drop-zone-highlighted-border, var(--t-gray-8, #808080))}.fade-in{animation-fill-mode:both;animation-play-state:running;animation:growFromCenterFadeIn 0.2s ease-in}.fade-out{animation:shrinkToCenterFadeOut 0.1s ease-out;animation-play-state:running;animation-fill-mode:both}.file-item{--tct-btn-icon-border-radius:4px;--tct-btn-neutral-text-active-font-color:var(--tct-file-picker-item-close-btn-active-color, var(--t-gray-1, #0d0d0d));--tct-btn-neutral-text-focus-visible-outer-ring-color:var(--tct-file-picker-item-close-btn-color, var(--t-gray-1, #0d0d0d));--tct-btn-neutral-text-font-color:var(--tct-file-picker-item-close-btn-color, var(--t-gray-1, #0d0d0d));--tct-btn-neutral-text-hover-outer-ring-color:var(--tct-file-picker-item-close-btn-hover-focus-ring-color, var(--t-gray-1, #0d0d0d));--tct-btn-icon-only-intent-padding:0;--tct-icon-stroke-primary:var(--tct-file-picker-item-close-btn-color, var(--t-gray-1, #0d0d0d));--tct-item-body-font-size:var(--tct-file-picker-item-font-size, var(--app-font-size-small, 12px));--tct-item-body-font-weight:var(--tct-file-picker-item-font-weight, 400);--tct-item-border-radius:var(--tct-file-picker-item-border-radius, var(--app-border-radius-3, 12px));--tct-item-border:var(--tct-file-picker-item-border-width, 1px) solid var(--tct-file-picker-item-border-color, var(--t-gray-8, #808080));--tct-item-header-color:var(--tct-file-picker-item-name-color, var(--t-gray-1, #0d0d0d));--tct-item-header-font-size:var(--tct-file-picker-item-name-font-size, var(--app-font-size-small, 12px));--tct-item-header-font-weight:var(--tct-file-picker-item-name-font-weight, 400);--tct-item-padding:var(--tct-file-picker-item-padding, var(--app-scale-1x, 5px) var(--app-scale-2x, 10px));text-align:left}.file-item-loading{font-size:var(--tct-file-picker-file-item-loading-size, var(--app-scale-6x, 30px));margin-bottom:calc(var(--tct-file-picker-file-item-loading-margin-bottom, var(--app-scale-6x, 30px)) / 8.57);margin-left:calc(var(--tct-file-picker-file-item-loading-margin-bottom, var(--app-scale-1x, 5px)) / 2)}.file-list{--tct-list-item-gap:var(--tct-file-picker-section-gap, var(--app-scale-3x, 15px))}.file-list-container{max-height:var(--tct-file-picker-list-max-height, 190px);overflow-y:auto;scrollbar-width:thin;scrollbar-color:var(--tct-file-picker-scrollbar-color, var(--t-a11y-gray-color, #949494)) transparent}.file-picker{display:flex;flex-direction:column;gap:var(--tct-file-picker-file-item-gap, var(--app-scale-3x, 15px))}.heading{display:flex;flex-direction:column;gap:var(--tct-file-picker-heading-gap, var(--app-scale-1x, 5px));justify-content:space-between}.icon-success,.icon-error{--tct-icon-size:var(--tct-file-picker-file-item-icon-size, var(--app-scale-6x, 30px));--tct-icon-stroke-width:2px}.label{color:var(--tct-file-picker-label-color, var(--t-gray-1, #0d0d0d));display:inline-block;font-size:var(--tct-file-picker-label-font-size, var(--app-font-size, 14px));font-weight:var(--tct-file-picker-label-font-weight, 600);text-align:var(--tct-file-picker-label-text-align, left)}.loading{font-size:var(--tct-file-picker-loading-size, var(--app-scale-6x, 25px))}.loading-file{color:var(--tct-file-picker-loading-file-color, var(--t-gray-1, #0d0d0d));font-size:var(--tct-file-picker-loading-file-font-size, var(--app-font-size-small, 12px));font-weight:var(--tct-file-picker-loading-file-font-weight, 400);margin:0}.loading-message{color:var(--tct-file-picker-loading-message-color, var(--t-gray-1, #0d0d0d));font-size:var(--tct-file-picker-loading-message-font-size, var(--app-font-size-small, 12px));font-weight:var(--tct-file-picker-loading-message-font-weight, 700);margin-bottom:var(--tct-file-picker-loading-message-margin-bottom, var(--app-scale-2x, 10px));margin-top:var(--tct-file-picker-loading-message-margin-top, var(--app-scale-2x, 10px))}.dismiss-button{height:30px;width:30px}.dismiss-button:hover{--tct-icon-stroke-primary:var(--tct-file-picker-item-close-btn-hover-color, var(--t-gray-1, #0d0d0d))}[slot=action]{display:flex;align-items:center}";
5
5
  const Q2FilePickerStyle0 = q2FilePickerCss;
6
6
 
7
7
  const Q2FilePicker = class {
@@ -1 +1 @@
1
- {"file":"q2-file-picker.entry.js","mappings":";;;AAAA,MAAM,eAAe,GAAG,upOAAupO,CAAC;AAChrO,2BAAe,eAAe;;MC2BjB,YAAY;;;;QAMrB,gBAAW,GAAW,EAAE,CAAC;QAsKzB,gBAAW,GAAG,CAAC,CAAY;YAC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,GAAG,CAAC,WAAW,CAAC,CAAC;QAC9B,MAAM,YAAY,GAAG,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC;QACnF,IAAI,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,WAAW,EAAE;YAC3B,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;SAC5B;aAAM;YACH,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;SAC3B;QACD,OAAO,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;KAC5B;IAED,wBAAwB,CAAC,MAAkB,EAAE,IAAY;QACrD,QAAQ,MAAM;YACV,KAAK,cAAc;gBACf,OAAO,GAAG,CAAC,+CAA+C,CAAC,CAAC;YAChE,KAAK,iBAAiB;gBAClB,OAAO,GAAG,CAAC,4CAA4C,CAAC,CAAC;YAC7D,KAAK,sBAAsB;gBACvB,OAAO,GAAG,CAAC,6CAA6C,CAAC,CAAC;YAC9D,KAAK,aAAa;gBACd,OAAO,GAAG,CAAC,6CAA6C,CAAC,CAAC;YAC9D,KAAK,QAAQ;gBACT,OAAO,GAAG,CAAC,wCAAwC,CAAC,CAAC;YACzD,KAAK,UAAU,CAAC;YAChB;gBACI,OAAO,GAAG,CAAC,oCAAoC,EAAE,CAAC,CAAC,IAAI,IAAI,IAAI,GAAG,IAAI,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;SAC7F;KACJ;IAyBD,iBAAiB;QACb,IAAI,CAAC,iBAAiB,CAAC,aAAa,CAAC,IAAI,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC;KACjE;;;;;;;;;;","names":[],"sources":["src/components/q2-file-picker/q2-file-picker.scss?tag=q2-file-picker&encapsulation=shadow","src/components/q2-file-picker/q2-file-picker.tsx"],"sourcesContent":["@import '../../styles/host.scss';\n@import '../../styles/functions';\n@import '../q2-btn/q2-btn-mixins';\n\n@keyframes growFromCenterFadeIn {\n from {\n transform: scaleX(0.75) scaleY(0.75);\n opacity: 0;\n }\n to {\n transform: scaleX(1) scaleY(1);\n opacity: 1;\n }\n}\n\n@keyframes shrinkToCenterFadeOut {\n from {\n transform: scaleX(1) scaleY(1);\n opacity: 1;\n }\n to {\n transform: scaleX(0.75) scaleY(0.75);\n opacity: 0;\n }\n}\n\n:host {\n display: block;\n}\n\n.browse {\n text-align: left;\n}\n\n.drop-zone-text {\n color: var-list(--tct-file-picker-drop-zone-text-color, --t-gray-6, #4d4d4d);\n font-size: var-list(--tct-file-picker-drop-zone-font-size, --app-font-size-small, 12px);\n font-weight: var(--tct-file-picker-browse-link-font-weight, 700);\n margin-bottom: 0;\n margin-top: var-list(--tct-file-picker-drop-zone-text-margin-top, --app-scale-2x, 10px);\n}\n\n.description {\n color: var-list(--tct-file-picker-description-text-color, --t-gray-1, #0d0d0d);\n font-size: var-list(--tct-file-picker-description-font-size, --app-font-size-small, 12px);\n font-weight: var(--tct-file-picker-description-font-weight, 400);\n text-align: var(--tct-file-picker-description-text-align, left);\n}\n\n.drop-zone {\n align-items: center;\n background-color: var-list(--tct-file-picker-drop-zone-background, --t-tertiary, #e8f5fc);\n border-radius: var-list(--tct-file-picker-drop-zone-border-radius, --app-border-radius-2, 6px);\n border-width: var(--tct-file-picker-drop-zone-border-width, 2px);\n border-style: var(--tct-file-picker-drop-zone-border-style, dashed);\n border-color: var-list(--tct-file-picker-drop-zone-border-color, --t-gray-8, #808080);\n color: var(--tct-file-picker-drop-zone-color, #747474);\n display: flex;\n flex-direction: column;\n font-size: var(--tct-file-picker-drop-zone-font-size, --app-font-size, 14px);\n font-weight: var(--tct-file-picker-drop-zone-font-weight, 400);\n height: var(--tct-file-picker-drop-zone-height, 150px);\n justify-content: center;\n padding: var(--tct-file-picker-drop-zone-padding, 20px);\n text-align: center;\n width: var(--tct-file-picker-drop-zone-width, 100%);\n}\n\n.drop-zone-highlighted {\n background-color: var-list(--tct-file-picker-drop-zone-highlighted-background, --tertiary-d-1, #bee1f6);\n border-color: var-list(--tct-file-picker-drop-zone-highlighted-border, --t-gray-8, #808080);\n}\n\n.fade-in {\n animation-fill-mode: both;\n animation-play-state: running;\n animation: growFromCenterFadeIn 0.2s ease-in;\n}\n\n.fade-out {\n animation: shrinkToCenterFadeOut 0.1s ease-out;\n animation-play-state: running;\n animation-fill-mode: both;\n}\n\n.file-item {\n --tct-btn-icon-border-radius: 4px;\n --tct-btn-neutral-text-active-font-color: #{var-list(\n --tct-file-picker-item-close-btn-active-color,\n --t-gray-1,\n #0d0d0d\n )};\n --tct-btn-neutral-text-focus-visible-outer-ring-color: #{var-list(\n --tct-file-picker-item-close-btn-color,\n --t-gray-1,\n #0d0d0d\n )};\n --tct-btn-neutral-text-font-color: #{var-list(--tct-file-picker-item-close-btn-color, --t-gray-1, #0d0d0d)};\n --tct-btn-neutral-text-hover-outer-ring-color: #{var-list(\n --tct-file-picker-item-close-btn-hover-focus-ring-color,\n --t-gray-1,\n #0d0d0d\n )};\n --tct-btn-icon-only-intent-padding: 0;\n --tct-icon-stroke-primary: #{var-list(--tct-file-picker-item-close-btn-color, --t-gray-1, #0d0d0d)};\n --tct-item-body-font-size: #{var-list(--tct-file-picker-item-font-size, --app-font-size-small, 12px)};\n --tct-item-body-font-weight: var(--tct-file-picker-item-font-weight, 400);\n --tct-item-border-radius: #{var-list(--tct-file-picker-item-border-radius, --app-border-radius-3, 12px)};\n --tct-item-border: var(--tct-file-picker-item-border-width, 1px) solid #{var-list(\n --tct-file-picker-item-border-color,\n --t-gray-8,\n #808080\n )};\n --tct-item-header-color: #{var-list(--tct-file-picker-item-name-color, --t-gray-1, #0d0d0d)};\n --tct-item-header-font-size: #{var-list(--tct-file-picker-item-name-font-size, --app-font-size-small, 12px)};\n --tct-item-header-font-weight: var(--tct-file-picker-item-name-font-weight, 400);\n --tct-item-padding: var(--tct-file-picker-item-padding, var(--app-scale-1x, 5px) var(--app-scale-2x, 10px));\n text-align: left;\n}\n\n.file-item-loading {\n font-size: var-list(--tct-file-picker-file-item-loading-size, --app-scale-6x, 30px);\n // FIXME: This is a temporary fix to match the height of the closing icon which has 3.5px of padding I can't account for\n margin-bottom: calc(var-list(--tct-file-picker-file-item-loading-margin-bottom, --app-scale-6x, 30px) / 8.57);\n margin-left: calc(var-list(--tct-file-picker-file-item-loading-margin-bottom, --app-scale-1x, 5px) / 2);\n}\n\n.file-list {\n --tct-list-item-gap: #{var-list(--tct-file-picker-section-gap, --app-scale-3x, 15px)};\n}\n\n.file-list-container {\n max-height: var(--tct-file-picker-list-max-height, 190px);\n overflow-y: auto;\n scrollbar-width: thin;\n scrollbar-color: #{var-list(--tct-file-picker-scrollbar-color, --t-a11y-gray-color, #949494)} transparent;\n}\n\n.file-picker {\n display: flex;\n flex-direction: column;\n gap: #{var-list(--tct-file-picker-file-item-gap, --app-scale-3x, 15px)};\n}\n\n.heading {\n display: flex;\n flex-direction: column;\n gap: #{var-list(--tct-file-picker-heading-gap, --app-scale-1x, 5px)};\n justify-content: space-between;\n}\n\n.icon-success,\n.icon-error {\n --tct-icon-size: #{var-list(--tct-file-picker-file-item-icon-size, --app-scale-6x, 30px)};\n --tct-icon-stroke-width: 2px;\n}\n\n.label {\n color: var-list(--tct-file-picker-label-color, --t-gray-1, #0d0d0d);\n // cursor: pointer;\n display: inline-block;\n font-size: var-list(--tct-file-picker-label-font-size, --app-font-size, 14px);\n font-weight: var(--tct-file-picker-label-font-weight, 600);\n text-align: var(--tct-file-picker-label-text-align, left);\n}\n\n.loading {\n font-size: var-list(--tct-file-picker-loading-size, --app-scale-6x, 25px);\n}\n\n.loading-file {\n color: var-list(--tct-file-picker-loading-file-color, --t-gray-1, #0d0d0d);\n font-size: var-list(--tct-file-picker-loading-file-font-size, --app-font-size-small, 12px);\n font-weight: var(--tct-file-picker-loading-file-font-weight, 400);\n margin: 0;\n}\n\n.loading-message {\n color: var-list(--tct-file-picker-loading-message-color, --t-gray-1, #0d0d0d);\n font-size: var-list(--tct-file-picker-loading-message-font-size, --app-font-size-small, 12px);\n font-weight: var(--tct-file-picker-loading-message-font-weight, 700);\n margin-bottom: var-list(--tct-file-picker-loading-message-margin-bottom, --app-scale-2x, 10px);\n margin-top: var-list(--tct-file-picker-loading-message-margin-top, --app-scale-2x, 10px);\n}\n\n.dismiss-button {\n height: 30px;\n width: 30px;\n &:hover {\n --tct-icon-stroke-primary: #{var-list(--tct-file-picker-item-close-btn-hover-color, --t-gray-1, #0d0d0d)};\n }\n}\n\n[slot='action'] {\n display: flex;\n align-items: center;\n}\n","import {\n Component,\n ComponentInterface,\n Element,\n Event,\n EventEmitter,\n Fragment,\n h,\n Prop,\n State,\n Watch,\n} from '@stencil/core';\nimport { hasSlotContent, loc } from 'src/utils';\n\ntype FileStatus = 'invalid-type' | 'over-size-limit' | 'over-max-files-limit' | 'in-progress' | 'failed' | 'uploaded';\nexport type FilesObject = {\n invalidFiles: {\n file: File;\n status: 'invalid-type' | 'over-size-limit' | 'over-max-files-limit' | 'in-progress' | 'failed' | 'uploaded';\n }[];\n validFiles: File[];\n};\n\n@Component({\n tag: 'q2-file-picker',\n styleUrl: 'q2-file-picker.scss',\n shadow: true,\n})\nexport class Q2FilePicker implements ComponentInterface {\n // #region Own Properties\n\n browseButtonInput: HTMLElement;\n dropZone: HTMLElement;\n fileItemsToBeDeleted;\n queuedFiles: File[] = [];\n\n // #endregion\n // #region Host HTML Element\n\n @Element()\n el: HTMLElement;\n\n // #endregion\n // #region State Properties\n\n @State()\n areFilesUploading: boolean = false;\n\n @State()\n displayedFiles: {\n file: File;\n status: FileStatus;\n toBeRemoved?: boolean;\n }[] = [];\n\n @State()\n isDropZoneHighlighted: boolean = false;\n\n @State()\n refreshCounter = 0;\n\n // #endregion\n // #region Public Property API\n\n /**\n * A description of the field. This is announced by screen readers when the field is focused.\n * @localizable\n */\n @Prop({ reflect: true })\n description: string;\n\n /**\n * Allowed file types based on extensions (e.g., ['jpg', 'png', 'pdf'] or\n * 'jpg, png, pdf'). When using the attribute, provide a comma-separated\n * string (e.g., 'jpg, png, pdf'). Arrays can only be set programmatically\n * via JavaScript.\n */\n @Prop({ reflect: true })\n fileTypes: string[] | string = [];\n\n /**\n * The label for the field. This is announced by screen readers when the field is focused.\n * @localizable\n */\n @Prop({ reflect: true })\n label: string;\n\n /**\n * The maximum number of files that can be selected.\n */\n @Prop({ reflect: true })\n // maxFiles: number | string = Infinity;\n maxFiles: number = Infinity;\n\n /**\n * The maximum size (in bytes) of any file that can be selected.\n */\n @Prop({ reflect: true })\n maxFileSize: number = Infinity;\n\n /**\n * An array of objects representing the status of the files being uploaded.\n * Each object should have a `name` property (the file name) and a `status`\n * property (the status of the file) that equals either 'in-progress',\n * 'failed' or 'uploaded'.\n */\n @Prop({ reflect: true })\n status: { name: string; status: 'in-progress' | 'failed' | 'uploaded' }[] = [];\n\n /**\n * Returns an array of File objects representing the files selected by the\n * user. If no files are selected, the value is an empty array.\n * @readonly\n */\n @Prop({ mutable: true })\n value: FilesObject = { invalidFiles: [], validFiles: [] }; // Ensure FilesObject is exported or imported correctly\n\n /**\n * Determines if the file picker is a browse button or a drop zone with a\n * browse link.\n */\n @Prop({ reflect: true })\n variant: 'browse' | 'browse-drop' = 'browse';\n\n // #endregion\n // #region Events\n\n @Event()\n tctChange: EventEmitter<FilesObject>;\n\n // #endregion\n // #region Watchers\n\n @Watch('status')\n updateFileList(newValue: { name: string; status: FileStatus }[]) {\n newValue.forEach(statusItem => {\n const matchingQueuedFileIndex = this.queuedFiles.findIndex(file => file.name === statusItem.name);\n if (matchingQueuedFileIndex > -1) {\n const matchingFile = this.queuedFiles.splice(matchingQueuedFileIndex, 1)[0];\n this.displayedFiles = [{ file: matchingFile, status: statusItem.status }, ...this.displayedFiles];\n } else {\n const matchingDisplayedFileIndex = this.displayedFiles.findIndex(\n file => file.file.name === statusItem.name\n );\n if (matchingDisplayedFileIndex > -1) {\n this.displayedFiles[matchingDisplayedFileIndex].status = statusItem.status;\n this.disableLoaderIfAllFilesUploaded();\n }\n }\n });\n }\n\n // #endregion\n // #region Local Methods\n\n get dropZoneClasses() {\n const classes = ['drop-zone'];\n if (this.isDropZoneHighlighted) {\n classes.push('drop-zone-highlighted');\n }\n\n return classes.join(' ');\n }\n\n get fileTypesArray() {\n return Array.isArray(this.fileTypes) ? this.fileTypes : this.fileTypes.split(',').map(type => type.trim());\n }\n\n get hasDescription() {\n return !!this.description || this.hasDescriptionSlotContent;\n }\n\n get hasDescriptionSlotContent() {\n return hasSlotContent(this.el, 'description');\n }\n\n get hasLabel() {\n return !!this.label || this.hasLabelSlotContent;\n }\n\n get hasLabelSlotContent() {\n return hasSlotContent(this.el, 'label');\n }\n\n buildFilesObject(filesToUpload: File[]): FilesObject {\n const invalidFiles = [];\n invalidFiles.push(...this.extractFilesOfInvalidTypes(filesToUpload));\n invalidFiles.push(...this.extractFilesOverSizeLimit(filesToUpload));\n invalidFiles.push(...this.extractFilesOverMaxFilesLimit(filesToUpload));\n this.displayedFiles = [...invalidFiles];\n\n if (filesToUpload.length === 0) {\n this.areFilesUploading = false;\n } else {\n this.queuedFiles = filesToUpload;\n }\n\n return { invalidFiles, validFiles: filesToUpload };\n }\n\n dimDropZone = (e: DragEvent) => {\n this.disableEvent(e);\n this.isDropZoneHighlighted = false;\n };\n\n disableEvent(event: Event) {\n event.preventDefault();\n event.stopPropagation();\n }\n\n disableLoaderIfAllFilesUploaded() {\n if (this.queuedFiles.length === 0 && !this.displayedFiles.some(file => file.status === 'in-progress')) {\n this.areFilesUploading = false;\n }\n }\n\n emitChange(filesObject: FilesObject) {\n this.areFilesUploading = filesObject.validFiles.length > 0;\n this.tctChange.emit(filesObject);\n }\n\n extractFilesOfInvalidTypes(files: File[]) {\n const invalidFiles = [];\n\n if (this.fileTypesArray.length === 0) return invalidFiles;\n\n files.forEach(file => {\n const fileExtension = file.name.split('.').pop().toLowerCase();\n if (!this.fileTypesArray.includes(fileExtension)) {\n invalidFiles.push({ file, status: 'invalid-type' });\n }\n });\n\n // Remove invalid files from the files array\n invalidFiles.forEach(invalidFile => {\n const index = files.indexOf(invalidFile.file);\n if (index > -1) {\n files.splice(index, 1);\n }\n });\n\n return invalidFiles;\n }\n\n extractFilesOverMaxFilesLimit(files: File[]) {\n const filesOverMaxFilesLimit = [];\n\n if (this.maxFiles === Infinity) return filesOverMaxFilesLimit;\n\n if (files.length > this.maxFiles) {\n const excessFiles = files.splice(this.maxFiles);\n excessFiles.forEach(file => {\n filesOverMaxFilesLimit.push({ file, status: 'over-max-files-limit' });\n });\n }\n\n return filesOverMaxFilesLimit;\n }\n\n extractFilesOverSizeLimit(files: File[]) {\n const filesOverSizeLimit = [];\n\n if (this.maxFileSize === Infinity) return filesOverSizeLimit;\n\n files.forEach(file => {\n if (file.size > this.maxFileSize) {\n filesOverSizeLimit.push({ file, status: 'over-size-limit' });\n }\n });\n\n // Remove files over size limit from the files array\n filesOverSizeLimit.forEach(overSizeFile => {\n const index = files.indexOf(overSizeFile.file);\n if (index > -1) {\n files.splice(index, 1);\n }\n });\n\n return filesOverSizeLimit;\n }\n\n forceRerender() {\n this.refreshCounter += 1; // Triggers re-render\n }\n\n getAnimationendHandlerToRemoveFileItem(fileName: string) {\n return (e: AnimationEvent) => {\n if (e.animationName === 'shrinkToCenterFadeOut') {\n this.displayedFiles = this.displayedFiles.filter(file => file.file.name !== fileName);\n }\n };\n }\n\n getClickHandlerToRemoveFileItem(fileName: string) {\n return () => {\n const fileToDelete = this.displayedFiles.find(file => file.file.name === fileName);\n if (fileToDelete) {\n fileToDelete.toBeRemoved = true;\n this.forceRerender();\n }\n };\n }\n\n getFileItemClasses(fileName: string) {\n const classes = ['file-item'];\n const matchingFile = this.displayedFiles.find(file => file.file.name === fileName);\n if (matchingFile?.toBeRemoved) {\n classes.push('fade-out');\n } else {\n classes.push('fade-in');\n }\n return classes.join(' ');\n }\n\n getFileItemStatusMessage(status: FileStatus, size: number) {\n switch (status) {\n case 'invalid-type':\n return loc('tecton.element.filePicker.unsupportedFileType');\n case 'over-size-limit':\n return loc('tecton.element.filePicker.sizeExceedsLimit');\n case 'over-max-files-limit':\n return loc('tecton.element.filePicker.overMaxFilesLimit');\n case 'in-progress':\n return loc('tecton.element.filePicker.uploadingEllipsis');\n case 'failed':\n return loc('tecton.element.filePicker.uploadFailed');\n case 'uploaded':\n default:\n return loc('tecton.element.filePicker.fileSize', [(size / (1000 * 1000)).toFixed(2)]);\n }\n }\n\n grabDroppedFiles = (e: DragEvent) => {\n this.disableEvent(e);\n this.isDropZoneHighlighted = false;\n const droppedFiles = Array.from(e.dataTransfer.files);\n const filesObject = this.buildFilesObject(droppedFiles);\n\n this.emitChange(filesObject);\n this.value = filesObject;\n };\n\n grabSelectedFiles = (e: Event) => {\n const selectedFiles = Array.from((e.target as HTMLInputElement).files);\n const filesObject = this.buildFilesObject(selectedFiles);\n\n this.emitChange(filesObject);\n this.value = filesObject;\n };\n\n highlightDropZone = (e: DragEvent) => {\n this.disableEvent(e);\n this.isDropZoneHighlighted = true;\n };\n\n launchFileBrowser() {\n this.browseButtonInput.dispatchEvent(new MouseEvent('click'));\n }\n\n // #endregion\n // #region Render Methods\n\n render = () => {\n return (\n <div class=\"file-picker\">\n {(this.hasLabel || this.hasDescription) && (\n <div class=\"heading\">\n {this.hasLabel && (\n <label\n class=\"label\"\n htmlFor=\"file-field\"\n test-id=\"label\"\n >\n {!!this.label ? loc(this.label) : this.hasLabelSlotContent ? <slot name=\"label\" /> : ''}\n </label>\n )}\n {this.hasDescription && (\n <div\n class=\"description\"\n id=\"description\"\n test-id=\"description\"\n >\n {!!this.description ? (\n loc(this.description)\n ) : this.hasDescriptionSlotContent ? (\n <slot name=\"description\" />\n ) : (\n ''\n )}\n </div>\n )}\n </div>\n )}\n\n {(this.variant === 'browse-drop' && (\n <div\n class={this.dropZoneClasses}\n onDragEnter={this.disableEvent}\n onDragLeave={this.dimDropZone}\n onDragOver={this.highlightDropZone}\n onDrop={this.grabDroppedFiles}\n ref={el => (this.dropZone = el ?? this.dropZone)}\n test-id=\"drop-zone\"\n >\n {(this.areFilesUploading && (\n <Fragment>\n <q2-loading class=\"loading\"></q2-loading>\n <p class=\"drop-zone-text\">{loc('tecton.element.filePicker.uploadingEllipsis')}</p>\n </Fragment>\n )) || (\n <Fragment>\n <q2-icon type=\"upload\"></q2-icon>\n <p class=\"drop-zone-text\">\n <q2-link\n label={loc('tecton.element.filePicker.browse')}\n onTctClick={() => this.launchFileBrowser()}\n variant=\"inline\"\n test-id=\"browse-link\"\n href=\"javascript:void(0)\"\n />\n {loc('tecton.element.filePicker.orDragFilesHere', [this.maxFiles])}\n </p>\n </Fragment>\n )}\n </div>\n )) || (\n <div\n class=\"browse\"\n test-id=\"browse\"\n >\n <q2-btn\n disabled={this.areFilesUploading}\n intent=\"workflow-primary\"\n loading={this.areFilesUploading}\n onClick={() => this.launchFileBrowser()}\n size=\"medium\"\n test-id=\"browse-button\"\n >\n <q2-icon type=\"paperclip\"></q2-icon>\n <span>{loc('tecton.element.filePicker.attachFiles', [this.maxFiles])}</span>\n </q2-btn>\n </div>\n )}\n <input\n aria-describedby={(!!this.description && 'description') || undefined}\n class=\"sr\"\n id=\"file-field\"\n onChange={this.grabSelectedFiles}\n ref={el => (this.browseButtonInput = el ?? this.browseButtonInput)}\n type=\"file\"\n test-id=\"file-input\"\n multiple\n />\n <div class=\"file-list-container\">\n <q2-list class=\"file-list\">\n {this.displayedFiles.map(file => (\n <q2-item\n class={this.getFileItemClasses(file.file.name)}\n key={file.file.name}\n onAnimationEnd={this.getAnimationendHandlerToRemoveFileItem(file.file.name)}\n >\n <div slot=\"bullet\">\n {file.status === 'invalid-type' ||\n file.status === 'over-size-limit' ||\n file.status === 'failed' ||\n file.status === 'over-max-files-limit' ? (\n <q2-icon\n class=\"icon-error\"\n type=\"error\"\n ></q2-icon>\n ) : file.status === 'in-progress' ? (\n <q2-loading class=\"file-item-loading\"></q2-loading>\n ) : (\n <q2-icon\n class=\"icon-success\"\n type=\"success\"\n ></q2-icon>\n )}\n </div>\n <div slot=\"header\">{file.file.name}</div>\n <div slot=\"body\">{this.getFileItemStatusMessage(file.status, file.file.size)}</div>\n <div slot=\"action\">\n <q2-btn\n class=\"dismiss-button\"\n intent=\"neutral-text\"\n onClick={this.getClickHandlerToRemoveFileItem(file.file.name)}\n >\n <q2-icon type=\"close\"></q2-icon>\n </q2-btn>\n </div>\n </q2-item>\n ))}\n </q2-list>\n </div>\n </div>\n );\n };\n\n // #endregion\n}\n"],"version":3}
1
+ {"file":"q2-file-picker.entry.js","mappings":";;;AAAA,MAAM,eAAe,GAAG,08OAA08O,CAAC;AACn+O,2BAAe,eAAe;;MC2BjB,YAAY;;;;QAMrB,gBAAW,GAAW,EAAE,CAAC;QAsKzB,gBAAW,GAAG,CAAC,CAAY;YACvB,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;YACrB,IAAI,CAAC,qBAAqB,GAAG,KAAK,CAAC;SACtC,CAAC;QAiIF,qBAAgB,GAAG,CAAC,CAAY;YAC5B,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;YACrB,IAAI,CAAC,qBAAqB,GAAG,KAAK,CAAC;YACnC,MAAM,YAAY,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;YACtD,MAAM,WAAW,GAAG,IAAI,CAAC,gBAAgB,CAAC,YAAY,CAAC,CAAC;YAExD,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;YAC7B,IAAI,CAAC,KAAK,GAAG,WAAW,CAAC;SAC5B,CAAC;QAEF,sBAAiB,GAAG,CAAC,CAAQ;YACzB,MAAM,aAAa,GAAG,KAAK,CAAC,IAAI,CAAE,CAAC,CAAC,MAA2B,CAAC,KAAK,CAAC,CAAC;YACvE,MAAM,WAAW,GAAG,IAAI,CAAC,gBAAgB,CAAC,aAAa,CAAC,CAAC;YAEzD,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;YAC7B,IAAI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,GAAG,CAAC,wCAAwC,CAAC,CAAC;YACzD,KAAK,UAAU,CAAC;YAChB;gBACI,OAAO,GAAG,CAAC,oCAAoC,EAAE,CAAC,CAAC,IAAI,IAAI,IAAI,GAAG,IAAI,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;SAC7F;KACJ;IAyBD,iBAAiB;QACb,IAAI,CAAC,iBAAiB,CAAC,aAAa,CAAC,IAAI,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC;KACjE;;;;;;;;;;","names":[],"sources":["src/components/q2-file-picker/q2-file-picker.scss?tag=q2-file-picker&encapsulation=shadow","src/components/q2-file-picker/q2-file-picker.tsx"],"sourcesContent":["@import '../../styles/host.scss';\n@import '../../styles/functions';\n@import '../q2-btn/q2-btn-mixins';\n\n@keyframes growFromCenterFadeIn {\n from {\n transform: scaleX(0.75) scaleY(0.75);\n opacity: 0;\n }\n to {\n transform: scaleX(1) scaleY(1);\n opacity: 1;\n }\n}\n\n@keyframes shrinkToCenterFadeOut {\n from {\n transform: scaleX(1) scaleY(1);\n opacity: 1;\n }\n to {\n transform: scaleX(0.75) scaleY(0.75);\n opacity: 0;\n }\n}\n\n:host {\n --comp-default-file-picker-margin: #{var-list(var-prefixer(file-picker-margin-top), --app-scale-5x, 25px) 0\n var-list(var-prefixer(file-picker-margin-bottom), --app-scale-5x, 25px)};\n display: block;\n margin: var-list(--tct-file-picker-margin, --comp-default-file-picker-margin);\n}\n\n.browse {\n text-align: left;\n}\n\n.drop-zone-text {\n color: var-list(--tct-file-picker-drop-zone-text-color, --t-gray-6, #4d4d4d);\n font-size: var-list(--tct-file-picker-drop-zone-font-size, --app-font-size-small, 12px);\n font-weight: var(--tct-file-picker-browse-link-font-weight, 700);\n margin-bottom: 0;\n margin-top: var-list(--tct-file-picker-drop-zone-text-margin-top, --app-scale-2x, 10px);\n}\n\n.description {\n color: var-list(--tct-file-picker-description-text-color, --t-gray-1, #0d0d0d);\n font-size: var-list(--tct-file-picker-description-font-size, --app-font-size-small, 12px);\n font-weight: var(--tct-file-picker-description-font-weight, 400);\n text-align: var(--tct-file-picker-description-text-align, left);\n}\n\n.drop-zone {\n align-items: center;\n background-color: var-list(--tct-file-picker-drop-zone-background, --t-tertiary, #e8f5fc);\n border-radius: var-list(--tct-file-picker-drop-zone-border-radius, --app-border-radius-2, 6px);\n border-width: var(--tct-file-picker-drop-zone-border-width, 2px);\n border-style: var(--tct-file-picker-drop-zone-border-style, dashed);\n border-color: var-list(--tct-file-picker-drop-zone-border-color, --t-gray-8, #808080);\n color: var(--tct-file-picker-drop-zone-color, #747474);\n display: flex;\n flex-direction: column;\n font-size: var(--tct-file-picker-drop-zone-font-size, --app-font-size, 14px);\n font-weight: var(--tct-file-picker-drop-zone-font-weight, 400);\n height: var(--tct-file-picker-drop-zone-height, 150px);\n justify-content: center;\n padding: var(--tct-file-picker-drop-zone-padding, 20px);\n text-align: center;\n width: var(--tct-file-picker-drop-zone-width, 100%);\n}\n\n.drop-zone-highlighted {\n background-color: var-list(--tct-file-picker-drop-zone-highlighted-background, --tertiary-d-1, #bee1f6);\n border-color: var-list(--tct-file-picker-drop-zone-highlighted-border, --t-gray-8, #808080);\n}\n\n.fade-in {\n animation-fill-mode: both;\n animation-play-state: running;\n animation: growFromCenterFadeIn 0.2s ease-in;\n}\n\n.fade-out {\n animation: shrinkToCenterFadeOut 0.1s ease-out;\n animation-play-state: running;\n animation-fill-mode: both;\n}\n\n.file-item {\n --tct-btn-icon-border-radius: 4px;\n --tct-btn-neutral-text-active-font-color: #{var-list(\n --tct-file-picker-item-close-btn-active-color,\n --t-gray-1,\n #0d0d0d\n )};\n --tct-btn-neutral-text-focus-visible-outer-ring-color: #{var-list(\n --tct-file-picker-item-close-btn-color,\n --t-gray-1,\n #0d0d0d\n )};\n --tct-btn-neutral-text-font-color: #{var-list(--tct-file-picker-item-close-btn-color, --t-gray-1, #0d0d0d)};\n --tct-btn-neutral-text-hover-outer-ring-color: #{var-list(\n --tct-file-picker-item-close-btn-hover-focus-ring-color,\n --t-gray-1,\n #0d0d0d\n )};\n --tct-btn-icon-only-intent-padding: 0;\n --tct-icon-stroke-primary: #{var-list(--tct-file-picker-item-close-btn-color, --t-gray-1, #0d0d0d)};\n --tct-item-body-font-size: #{var-list(--tct-file-picker-item-font-size, --app-font-size-small, 12px)};\n --tct-item-body-font-weight: var(--tct-file-picker-item-font-weight, 400);\n --tct-item-border-radius: #{var-list(--tct-file-picker-item-border-radius, --app-border-radius-3, 12px)};\n --tct-item-border: var(--tct-file-picker-item-border-width, 1px) solid #{var-list(\n --tct-file-picker-item-border-color,\n --t-gray-8,\n #808080\n )};\n --tct-item-header-color: #{var-list(--tct-file-picker-item-name-color, --t-gray-1, #0d0d0d)};\n --tct-item-header-font-size: #{var-list(--tct-file-picker-item-name-font-size, --app-font-size-small, 12px)};\n --tct-item-header-font-weight: var(--tct-file-picker-item-name-font-weight, 400);\n --tct-item-padding: var(--tct-file-picker-item-padding, var(--app-scale-1x, 5px) var(--app-scale-2x, 10px));\n text-align: left;\n}\n\n.file-item-loading {\n font-size: var-list(--tct-file-picker-file-item-loading-size, --app-scale-6x, 30px);\n // FIXME: This is a temporary fix to match the height of the closing icon which has 3.5px of padding I can't account for\n margin-bottom: calc(var-list(--tct-file-picker-file-item-loading-margin-bottom, --app-scale-6x, 30px) / 8.57);\n margin-left: calc(var-list(--tct-file-picker-file-item-loading-margin-bottom, --app-scale-1x, 5px) / 2);\n}\n\n.file-list {\n --tct-list-item-gap: #{var-list(--tct-file-picker-section-gap, --app-scale-3x, 15px)};\n}\n\n.file-list-container {\n max-height: var(--tct-file-picker-list-max-height, 190px);\n overflow-y: auto;\n scrollbar-width: thin;\n scrollbar-color: #{var-list(--tct-file-picker-scrollbar-color, --t-a11y-gray-color, #949494)} transparent;\n}\n\n.file-picker {\n display: flex;\n flex-direction: column;\n gap: #{var-list(--tct-file-picker-file-item-gap, --app-scale-3x, 15px)};\n}\n\n.heading {\n display: flex;\n flex-direction: column;\n gap: #{var-list(--tct-file-picker-heading-gap, --app-scale-1x, 5px)};\n justify-content: space-between;\n}\n\n.icon-success,\n.icon-error {\n --tct-icon-size: #{var-list(--tct-file-picker-file-item-icon-size, --app-scale-6x, 30px)};\n --tct-icon-stroke-width: 2px;\n}\n\n.label {\n color: var-list(--tct-file-picker-label-color, --t-gray-1, #0d0d0d);\n // cursor: pointer;\n display: inline-block;\n font-size: var-list(--tct-file-picker-label-font-size, --app-font-size, 14px);\n font-weight: var(--tct-file-picker-label-font-weight, 600);\n text-align: var(--tct-file-picker-label-text-align, left);\n}\n\n.loading {\n font-size: var-list(--tct-file-picker-loading-size, --app-scale-6x, 25px);\n}\n\n.loading-file {\n color: var-list(--tct-file-picker-loading-file-color, --t-gray-1, #0d0d0d);\n font-size: var-list(--tct-file-picker-loading-file-font-size, --app-font-size-small, 12px);\n font-weight: var(--tct-file-picker-loading-file-font-weight, 400);\n margin: 0;\n}\n\n.loading-message {\n color: var-list(--tct-file-picker-loading-message-color, --t-gray-1, #0d0d0d);\n font-size: var-list(--tct-file-picker-loading-message-font-size, --app-font-size-small, 12px);\n font-weight: var(--tct-file-picker-loading-message-font-weight, 700);\n margin-bottom: var-list(--tct-file-picker-loading-message-margin-bottom, --app-scale-2x, 10px);\n margin-top: var-list(--tct-file-picker-loading-message-margin-top, --app-scale-2x, 10px);\n}\n\n.dismiss-button {\n height: 30px;\n width: 30px;\n &:hover {\n --tct-icon-stroke-primary: #{var-list(--tct-file-picker-item-close-btn-hover-color, --t-gray-1, #0d0d0d)};\n }\n}\n\n[slot='action'] {\n display: flex;\n align-items: center;\n}\n","import {\n Component,\n ComponentInterface,\n Element,\n Event,\n EventEmitter,\n Fragment,\n h,\n Prop,\n State,\n Watch,\n} from '@stencil/core';\nimport { hasSlotContent, loc } from 'src/utils';\n\ntype FileStatus = 'invalid-type' | 'over-size-limit' | 'over-max-files-limit' | 'in-progress' | 'failed' | 'uploaded';\nexport type FilesObject = {\n invalidFiles: {\n file: File;\n status: 'invalid-type' | 'over-size-limit' | 'over-max-files-limit' | 'in-progress' | 'failed' | 'uploaded';\n }[];\n validFiles: File[];\n};\n\n@Component({\n tag: 'q2-file-picker',\n styleUrl: 'q2-file-picker.scss',\n shadow: true,\n})\nexport class Q2FilePicker implements ComponentInterface {\n // #region Own Properties\n\n browseButtonInput: HTMLElement;\n dropZone: HTMLElement;\n fileItemsToBeDeleted;\n queuedFiles: File[] = [];\n\n // #endregion\n // #region Host HTML Element\n\n @Element()\n el: HTMLElement;\n\n // #endregion\n // #region State Properties\n\n @State()\n areFilesUploading: boolean = false;\n\n @State()\n displayedFiles: {\n file: File;\n status: FileStatus;\n toBeRemoved?: boolean;\n }[] = [];\n\n @State()\n isDropZoneHighlighted: boolean = false;\n\n @State()\n refreshCounter = 0;\n\n // #endregion\n // #region Public Property API\n\n /**\n * A description of the field. This is announced by screen readers when the field is focused.\n * @localizable\n */\n @Prop({ reflect: true })\n description: string;\n\n /**\n * Allowed file types based on extensions (e.g., ['jpg', 'png', 'pdf'] or\n * 'jpg, png, pdf'). When using the attribute, provide a comma-separated\n * string (e.g., 'jpg, png, pdf'). Arrays can only be set programmatically\n * via JavaScript.\n */\n @Prop({ reflect: true })\n fileTypes: string[] | string = [];\n\n /**\n * The label for the field. This is announced by screen readers when the field is focused.\n * @localizable\n */\n @Prop({ reflect: true })\n label: string;\n\n /**\n * The maximum number of files that can be selected.\n */\n @Prop({ reflect: true })\n // maxFiles: number | string = Infinity;\n maxFiles: number = Infinity;\n\n /**\n * The maximum size (in bytes) of any file that can be selected.\n */\n @Prop({ reflect: true })\n maxFileSize: number = Infinity;\n\n /**\n * An array of objects representing the status of the files being uploaded.\n * Each object should have a `name` property (the file name) and a `status`\n * property (the status of the file) that equals either 'in-progress',\n * 'failed' or 'uploaded'.\n */\n @Prop({ reflect: true })\n status: { name: string; status: 'in-progress' | 'failed' | 'uploaded' }[] = [];\n\n /**\n * Returns an array of File objects representing the files selected by the\n * user. If no files are selected, the value is an empty array.\n * @readonly\n */\n @Prop({ mutable: true })\n value: FilesObject = { invalidFiles: [], validFiles: [] }; // Ensure FilesObject is exported or imported correctly\n\n /**\n * Determines if the file picker is a browse button or a drop zone with a\n * browse link.\n */\n @Prop({ reflect: true })\n variant: 'browse' | 'browse-drop' = 'browse';\n\n // #endregion\n // #region Events\n\n @Event()\n tctChange: EventEmitter<FilesObject>;\n\n // #endregion\n // #region Watchers\n\n @Watch('status')\n updateFileList(newValue: { name: string; status: FileStatus }[]) {\n newValue.forEach(statusItem => {\n const matchingQueuedFileIndex = this.queuedFiles.findIndex(file => file.name === statusItem.name);\n if (matchingQueuedFileIndex > -1) {\n const matchingFile = this.queuedFiles.splice(matchingQueuedFileIndex, 1)[0];\n this.displayedFiles = [{ file: matchingFile, status: statusItem.status }, ...this.displayedFiles];\n } else {\n const matchingDisplayedFileIndex = this.displayedFiles.findIndex(\n file => file.file.name === statusItem.name\n );\n if (matchingDisplayedFileIndex > -1) {\n this.displayedFiles[matchingDisplayedFileIndex].status = statusItem.status;\n this.disableLoaderIfAllFilesUploaded();\n }\n }\n });\n }\n\n // #endregion\n // #region Local Methods\n\n get dropZoneClasses() {\n const classes = ['drop-zone'];\n if (this.isDropZoneHighlighted) {\n classes.push('drop-zone-highlighted');\n }\n\n return classes.join(' ');\n }\n\n get fileTypesArray() {\n return Array.isArray(this.fileTypes) ? this.fileTypes : this.fileTypes.split(',').map(type => type.trim());\n }\n\n get hasDescription() {\n return !!this.description || this.hasDescriptionSlotContent;\n }\n\n get hasDescriptionSlotContent() {\n return hasSlotContent(this.el, 'description');\n }\n\n get hasLabel() {\n return !!this.label || this.hasLabelSlotContent;\n }\n\n get hasLabelSlotContent() {\n return hasSlotContent(this.el, 'label');\n }\n\n buildFilesObject(filesToUpload: File[]): FilesObject {\n const invalidFiles = [];\n invalidFiles.push(...this.extractFilesOfInvalidTypes(filesToUpload));\n invalidFiles.push(...this.extractFilesOverSizeLimit(filesToUpload));\n invalidFiles.push(...this.extractFilesOverMaxFilesLimit(filesToUpload));\n this.displayedFiles = [...invalidFiles];\n\n if (filesToUpload.length === 0) {\n this.areFilesUploading = false;\n } else {\n this.queuedFiles = filesToUpload;\n }\n\n return { invalidFiles, validFiles: filesToUpload };\n }\n\n dimDropZone = (e: DragEvent) => {\n this.disableEvent(e);\n this.isDropZoneHighlighted = false;\n };\n\n disableEvent(event: Event) {\n event.preventDefault();\n event.stopPropagation();\n }\n\n disableLoaderIfAllFilesUploaded() {\n if (this.queuedFiles.length === 0 && !this.displayedFiles.some(file => file.status === 'in-progress')) {\n this.areFilesUploading = false;\n }\n }\n\n emitChange(filesObject: FilesObject) {\n this.areFilesUploading = filesObject.validFiles.length > 0;\n this.tctChange.emit(filesObject);\n }\n\n extractFilesOfInvalidTypes(files: File[]) {\n const invalidFiles = [];\n\n if (this.fileTypesArray.length === 0) return invalidFiles;\n\n files.forEach(file => {\n const fileExtension = file.name.split('.').pop().toLowerCase();\n if (!this.fileTypesArray.includes(fileExtension)) {\n invalidFiles.push({ file, status: 'invalid-type' });\n }\n });\n\n // Remove invalid files from the files array\n invalidFiles.forEach(invalidFile => {\n const index = files.indexOf(invalidFile.file);\n if (index > -1) {\n files.splice(index, 1);\n }\n });\n\n return invalidFiles;\n }\n\n extractFilesOverMaxFilesLimit(files: File[]) {\n const filesOverMaxFilesLimit = [];\n\n if (this.maxFiles === Infinity) return filesOverMaxFilesLimit;\n\n if (files.length > this.maxFiles) {\n const excessFiles = files.splice(this.maxFiles);\n excessFiles.forEach(file => {\n filesOverMaxFilesLimit.push({ file, status: 'over-max-files-limit' });\n });\n }\n\n return filesOverMaxFilesLimit;\n }\n\n extractFilesOverSizeLimit(files: File[]) {\n const filesOverSizeLimit = [];\n\n if (this.maxFileSize === Infinity) return filesOverSizeLimit;\n\n files.forEach(file => {\n if (file.size > this.maxFileSize) {\n filesOverSizeLimit.push({ file, status: 'over-size-limit' });\n }\n });\n\n // Remove files over size limit from the files array\n filesOverSizeLimit.forEach(overSizeFile => {\n const index = files.indexOf(overSizeFile.file);\n if (index > -1) {\n files.splice(index, 1);\n }\n });\n\n return filesOverSizeLimit;\n }\n\n forceRerender() {\n this.refreshCounter += 1; // Triggers re-render\n }\n\n getAnimationendHandlerToRemoveFileItem(fileName: string) {\n return (e: AnimationEvent) => {\n if (e.animationName === 'shrinkToCenterFadeOut') {\n this.displayedFiles = this.displayedFiles.filter(file => file.file.name !== fileName);\n }\n };\n }\n\n getClickHandlerToRemoveFileItem(fileName: string) {\n return () => {\n const fileToDelete = this.displayedFiles.find(file => file.file.name === fileName);\n if (fileToDelete) {\n fileToDelete.toBeRemoved = true;\n this.forceRerender();\n }\n };\n }\n\n getFileItemClasses(fileName: string) {\n const classes = ['file-item'];\n const matchingFile = this.displayedFiles.find(file => file.file.name === fileName);\n if (matchingFile?.toBeRemoved) {\n classes.push('fade-out');\n } else {\n classes.push('fade-in');\n }\n return classes.join(' ');\n }\n\n getFileItemStatusMessage(status: FileStatus, size: number) {\n switch (status) {\n case 'invalid-type':\n return loc('tecton.element.filePicker.unsupportedFileType');\n case 'over-size-limit':\n return loc('tecton.element.filePicker.sizeExceedsLimit');\n case 'over-max-files-limit':\n return loc('tecton.element.filePicker.overMaxFilesLimit');\n case 'in-progress':\n return loc('tecton.element.filePicker.uploadingEllipsis');\n case 'failed':\n return loc('tecton.element.filePicker.uploadFailed');\n case 'uploaded':\n default:\n return loc('tecton.element.filePicker.fileSize', [(size / (1000 * 1000)).toFixed(2)]);\n }\n }\n\n grabDroppedFiles = (e: DragEvent) => {\n this.disableEvent(e);\n this.isDropZoneHighlighted = false;\n const droppedFiles = Array.from(e.dataTransfer.files);\n const filesObject = this.buildFilesObject(droppedFiles);\n\n this.emitChange(filesObject);\n this.value = filesObject;\n };\n\n grabSelectedFiles = (e: Event) => {\n const selectedFiles = Array.from((e.target as HTMLInputElement).files);\n const filesObject = this.buildFilesObject(selectedFiles);\n\n this.emitChange(filesObject);\n this.value = filesObject;\n };\n\n highlightDropZone = (e: DragEvent) => {\n this.disableEvent(e);\n this.isDropZoneHighlighted = true;\n };\n\n launchFileBrowser() {\n this.browseButtonInput.dispatchEvent(new MouseEvent('click'));\n }\n\n // #endregion\n // #region Render Methods\n\n render = () => {\n return (\n <div class=\"file-picker\">\n {(this.hasLabel || this.hasDescription) && (\n <div class=\"heading\">\n {this.hasLabel && (\n <label\n class=\"label\"\n htmlFor=\"file-field\"\n test-id=\"label\"\n >\n {!!this.label ? loc(this.label) : this.hasLabelSlotContent ? <slot name=\"label\" /> : ''}\n </label>\n )}\n {this.hasDescription && (\n <div\n class=\"description\"\n id=\"description\"\n test-id=\"description\"\n >\n {!!this.description ? (\n loc(this.description)\n ) : this.hasDescriptionSlotContent ? (\n <slot name=\"description\" />\n ) : (\n ''\n )}\n </div>\n )}\n </div>\n )}\n\n {(this.variant === 'browse-drop' && (\n <div\n class={this.dropZoneClasses}\n onDragEnter={this.disableEvent}\n onDragLeave={this.dimDropZone}\n onDragOver={this.highlightDropZone}\n onDrop={this.grabDroppedFiles}\n ref={el => (this.dropZone = el ?? this.dropZone)}\n test-id=\"drop-zone\"\n >\n {(this.areFilesUploading && (\n <Fragment>\n <q2-loading class=\"loading\"></q2-loading>\n <p class=\"drop-zone-text\">{loc('tecton.element.filePicker.uploadingEllipsis')}</p>\n </Fragment>\n )) || (\n <Fragment>\n <q2-icon type=\"upload\"></q2-icon>\n <p class=\"drop-zone-text\">\n <q2-link\n label={loc('tecton.element.filePicker.browse')}\n onTctClick={() => this.launchFileBrowser()}\n variant=\"inline\"\n test-id=\"browse-link\"\n href=\"javascript:void(0)\"\n />\n {loc('tecton.element.filePicker.orDragFilesHere', [this.maxFiles])}\n </p>\n </Fragment>\n )}\n </div>\n )) || (\n <div\n class=\"browse\"\n test-id=\"browse\"\n >\n <q2-btn\n disabled={this.areFilesUploading}\n intent=\"workflow-primary\"\n loading={this.areFilesUploading}\n onClick={() => this.launchFileBrowser()}\n size=\"medium\"\n test-id=\"browse-button\"\n >\n <q2-icon type=\"paperclip\"></q2-icon>\n <span>{loc('tecton.element.filePicker.attachFiles', [this.maxFiles])}</span>\n </q2-btn>\n </div>\n )}\n <input\n aria-describedby={(!!this.description && 'description') || undefined}\n class=\"sr\"\n id=\"file-field\"\n onChange={this.grabSelectedFiles}\n ref={el => (this.browseButtonInput = el ?? this.browseButtonInput)}\n type=\"file\"\n test-id=\"file-input\"\n multiple\n />\n <div class=\"file-list-container\">\n <q2-list class=\"file-list\">\n {this.displayedFiles.map(file => (\n <q2-item\n class={this.getFileItemClasses(file.file.name)}\n key={file.file.name}\n onAnimationEnd={this.getAnimationendHandlerToRemoveFileItem(file.file.name)}\n >\n <div slot=\"bullet\">\n {file.status === 'invalid-type' ||\n file.status === 'over-size-limit' ||\n file.status === 'failed' ||\n file.status === 'over-max-files-limit' ? (\n <q2-icon\n class=\"icon-error\"\n type=\"error\"\n ></q2-icon>\n ) : file.status === 'in-progress' ? (\n <q2-loading class=\"file-item-loading\"></q2-loading>\n ) : (\n <q2-icon\n class=\"icon-success\"\n type=\"success\"\n ></q2-icon>\n )}\n </div>\n <div slot=\"header\">{file.file.name}</div>\n <div slot=\"body\">{this.getFileItemStatusMessage(file.status, file.file.size)}</div>\n <div slot=\"action\">\n <q2-btn\n class=\"dismiss-button\"\n intent=\"neutral-text\"\n onClick={this.getClickHandlerToRemoveFileItem(file.file.name)}\n >\n <q2-icon type=\"close\"></q2-icon>\n </q2-btn>\n </div>\n </q2-item>\n ))}\n </q2-list>\n </div>\n </div>\n );\n };\n\n // #endregion\n}\n"],"version":3}
@@ -0,0 +1,19 @@
1
+ import { r as registerInstance, h } from './index-7a5365e2.js';
2
+
3
+ const q2FormCss = "*{box-sizing:border-box}*:active{outline:none}*:focus{outline:none;box-shadow:var(--const-double-focus-ring, 0 0 0 2px #ffffff, 0 0 0 4px #0066cc)}:host{box-shadow:none !important}::-moz-focus-inner{border:none}input,textarea,button{font-family:inherit;font-size:inherit;font-stretch:inherit}:host(.sr),:host(.sr) button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.sr,.sr button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.hidden{display:none}:host([hidden]){display:none}.invisible{visibility:hidden}.container{--tct-input-margin:var(--comp-spacing);--tct-select-margin:var(--comp-spacing);--tct-calendar-margin:var(--comp-spacing);--tct-file-picker-margin:var(--comp-spacing);--tct-textarea-margin:var(--comp-spacing);--tct-checkbox-margin:var(--comp-spacing);--tct-checkbox-group-margin:var(--comp-spacing);--tct-radio-group-margin:var(--comp-spacing)}:host([spacing=none]) .container{--comp-spacing-none:var(--app-scale-0x, 0px);--comp-spacing:var(--tct-form-spacing-none, var(--comp-spacing-none) 0)}:host([spacing=compact]) .container{--comp-spacing-compact:var(--app-scale-3x, 15px);--comp-spacing:var(--tct-form-spacing-compact, var(--comp-spacing-compact) 0)}:host(:not([spacing]),[spacing=normal]) .container{--comp-spacing-normal:var(--app-scale-5x, 25px);--comp-spacing:var(--tct-form-spacing-normal, var(--comp-spacing-normal) 0)}:host([spacing=comfortable]) .container{--comp-spacing-comfortable:var(--app-scale-7x, 35px);--comp-spacing:var(--tct-form-spacing-comfortable, var(--comp-spacing-comfortable) 0)}";
4
+ const Q2FormStyle0 = q2FormCss;
5
+
6
+ const Q2Checkbox = class {
7
+ constructor(hostRef) {
8
+ registerInstance(this, hostRef);
9
+ this.spacing = 'normal';
10
+ }
11
+ render() {
12
+ return (h("div", { key: 'aa542ff0f5ecdee36ffdb070cb863553c3d725bc', class: "container" }, h("slot", { key: '980dc6939c003dfbd57189e7ba9fb151033e8b29' })));
13
+ }
14
+ };
15
+ Q2Checkbox.style = Q2FormStyle0;
16
+
17
+ export { Q2Checkbox as q2_form };
18
+
19
+ //# sourceMappingURL=q2-form.entry.js.map
@@ -0,0 +1 @@
1
+ {"file":"q2-form.entry.js","mappings":";;AAAA,MAAM,SAAS,GAAG,spDAAspD,CAAC;AACzqD,qBAAe,SAAS;;MCEX,UAAU;;;uBAE+D,QAAQ;;IAE1F,MAAM;QACF,QACI,4DAAK,KAAK,EAAC,WAAW,IAClB,8DAAQ,CACN,EACR;KACL;;;;;;","names":[],"sources":["src/components/q2-form/q2-form.scss?tag=q2-form&encapsulation=shadow","src/components/q2-form/q2-form.tsx"],"sourcesContent":["@import '../../styles/host.scss';\n@import '../../styles/functions';\n\n.container {\n :host([spacing='none']) & {\n --comp-spacing-none: #{var-list(--app-scale-0x, 0px)};\n --comp-spacing: #{var-list(--tct-form-spacing-none, unquote('var(--comp-spacing-none) 0'))};\n }\n :host([spacing='compact']) & {\n --comp-spacing-compact: #{var-list(--app-scale-3x, 15px)};\n --comp-spacing: #{var-list(--tct-form-spacing-compact, unquote('var(--comp-spacing-compact) 0'))};\n }\n :host(:not([spacing]), [spacing='normal']) & {\n --comp-spacing-normal: #{var-list(--app-scale-5x, 25px)};\n --comp-spacing: #{var-list(--tct-form-spacing-normal, unquote('var(--comp-spacing-normal) 0'))};\n }\n\n :host([spacing='comfortable']) & {\n --comp-spacing-comfortable: #{var-list(--app-scale-7x, 35px)};\n --comp-spacing: #{var-list(--tct-form-spacing-comfortable, unquote('var(--comp-spacing-comfortable) 0'))};\n }\n\n --tct-input-margin: var(--comp-spacing);\n --tct-select-margin: var(--comp-spacing);\n --tct-calendar-margin: var(--comp-spacing);\n --tct-file-picker-margin: var(--comp-spacing);\n --tct-textarea-margin: var(--comp-spacing);\n --tct-checkbox-margin: var(--comp-spacing);\n --tct-checkbox-group-margin: var(--comp-spacing);\n --tct-radio-group-margin: var(--comp-spacing);\n}\n","import { Component, ComponentInterface, Prop, h } from '@stencil/core';\n\n@Component({ tag: 'q2-form', shadow: true, styleUrl: 'q2-form.scss' })\nexport class Q2Checkbox implements ComponentInterface {\n /** Changes the vertical spacing of the form-fields contained within the component's slot */\n @Prop({ reflect: true }) spacing: 'none' | 'compact' | 'normal' | 'comfortable' = 'normal';\n\n render() {\n return (\n <div class=\"container\">\n <slot />\n </div>\n );\n }\n}\n"],"version":3}
@@ -51,7 +51,7 @@ const Q2FormattedText = class {
51
51
  // #region Render Methods
52
52
  render() {
53
53
  const { formattedTextClasses } = this;
54
- return (h("div", { key: '1957c3f976bc87c24859d94c27e1baf35da8fc03', class: formattedTextClasses, "aria-label": this.formattedValue }, h("span", { key: '8dac0d558d205fc183d16c4aef922ab470eec6ab' }, this.formattedValue)));
54
+ return (h("div", { key: 'f8729c7f3dea39a14da8add529ae642e78d20643', class: formattedTextClasses, "aria-label": this.formattedValue }, h("span", { key: '94390c62b148e3a0ce2d470377818ac442e9257e' }, this.formattedValue)));
55
55
  }
56
56
  static get watchers() { return {
57
57
  "value": ["propsUpdated"],
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, h, g as getElement, c as createEvent } from './index-7a5365e2.js';
2
- import { o as overrideFocus, e as hasSlotContent } from './index-504f1a9e.js';
2
+ import { o as overrideFocus, e as hasSlotContent } from './index-f2a66217.js';
3
3
 
4
4
  const q2ItemCss = "*{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}*{box-sizing:border-box}*:active{outline:none}*:focus{outline:none;box-shadow:var(--const-double-focus-ring, 0 0 0 2px #ffffff, 0 0 0 4px #0066cc)}:host{box-shadow:none !important}::-moz-focus-inner{border:none}input,textarea,button{font-family:inherit;font-size:inherit;font-stretch:inherit}:host(.sr),:host(.sr) button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.sr,.sr button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.hidden{display:none}:host([hidden]){display:none}.invisible{visibility:hidden}:host{display:block}:host .item{--comp-border-radius:var(--tct-item-border-radius, var(--app-border-radius-0, 0))}:host([clickable]){cursor:pointer;--comp-background:var(--tct-btn-primary-background, var(--tct-btn-primary-bg, var(--t-a11y-active-gray-color-AA, #404040)))}:host([clickable]) .item{--comp-border-radius:var(--tct-item-border-radius, var(--app-border-radius-1, 4px));--comp-btn-tween:var(--tct-btn-tween, var(--t-btn-tween, var(--tct-tween-1, var(--app-tween-1, 0.2s ease))));--comp-btn-fallback-box-shadow:0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);--comp-hover-box-shadow:var(--tct-btn-primary-box-shadow, var(--comp-btn-fallback-box-shadow));--comp-active-box-shadow:var(--tct-btn-primary-active-background, #0063a0);--comp-font-color:var(--tct-btn-primary-font-color, var(--app-white, #ffffff));--comp-hover-outer-ring-color:var(--tct-btn-primary-hover-outer-ring-color, var(--comp-background));--comp-hover-inner-ring-color:var(--tct-btn-primary-hover-inner-ring-color, var(--comp-font-color));--comp-hover-box-shadow:0 0 0 2px var(--comp-hover-inner-ring-color),\n 0 0 0 4px var(--comp-hover-outer-ring-color)}:host([clickable]) .item:hover{box-shadow:var(--comp-hover-box-shadow)}:host([clickable]) .item:active{box-shadow:var(--comp-active-box-shadow)}:host([clickable]) .item:focus-visible{box-shadow:var(--const-double-focus-ring)}.action{--tct-btn-icon-height:var(--tct-item-action-icon-height, var(--app-scale-6x, 30px));--tct-btn-icon-width:var(--tct-item-action-icon-width, var(--app-scale-6x, 30px));--tct-icon-size:var(--tct-item-action-icon-size, var(--app-scale-6x, 30px));--tct-radio-label-hidden-columns:18px;--tct-radio-label-margin-right:0;--tct-radio-margin:0;align-items:center;display:flex;grid-row:1;justify-content:center}.action-no-bullet{grid-column:2}.body{color:var(--tct-item-body-color, var(--t-textA, #747474));font-size:var(--tct-item-body-font-size, var(--app-font-size, 14px));font-weight:var(--tct-item-body-font-weight, 400)}.bullet{--tct-avatar-fallback-height:var(--tct-item-avatar-height, var(--app-scale-7x, 35px));--tct-avatar-fallback-width:var(--tct-item-avatar-width, var(--app-scale-7x, 35px));--tct-avatar-height:var(--tct-item-avatar-height, var(--app-scale-7x, 35px));--tct-avatar-width:var(--tct-item-avatar-width, var(--app-scale-7x, 35px));grid-column:1;grid-row-start:1;grid-row-end:3;padding-top:var(--tct-item-bullet-padding-top, var(--app-scale-1x, 5px));text-align:center}.bullet-no-footer{grid-row-end:2}.footer{grid-column-start:2;grid-column-end:4;grid-row:2}.footer-no-action-nor-bullet{grid-column-start:1;grid-column-end:2}.footer-no-action{grid-column-start:2;grid-column-end:3}.footer-no-bullet{grid-column-start:1;grid-column-end:3}.header{color:var(--tct-item-header-color, var(--t-text, #4d4d4d));font-size:var(--tct-item-header-font-size, 16px);font-weight:var(--tct-item-header-font-weight, 600);line-height:var(--tct-item-header-line-height, 1.5)}.item{border:var(--tct-item-border);border-radius:var(--comp-border-radius);transition:var(--comp-btn-tween);transition-property:box-shadow;column-gap:var(--tct-item-horizontal-spacing, var(--app-scale-3x, 15px));display:grid;grid-template-columns:minmax(var(--app-scale-7x, 35px), auto) minmax(auto, 1fr) minmax(var(--app-scale-5x, 25px), auto);grid-template-rows:auto auto;padding:var(--tct-item-padding, 0);row-gap:var(--tct-item-vertical-spacing, var(--app-scale-2x, 10px))}.item-no-action-nor-bullet{grid-template-columns:auto}.item-no-action{grid-template-columns:minmax(var(--app-scale-7x, 35px), auto) minmax(auto, 1fr)}.item-no-footer{grid-template-rows:auto}.item-no-bullet{grid-template-columns:minmax(auto, 1fr) minmax(var(--app-scale-5x, 25px), auto)}.main{grid-column:2;grid-row:1}.main-no-action-nor-bullet{grid-column:1}.main-no-bullet{grid-column:1}";
5
5
  const Q2ItemStyle0 = q2ItemCss;
@@ -105,7 +105,7 @@ const Q2Item = class {
105
105
  // #region Render Methods
106
106
  render() {
107
107
  const { clickable } = this;
108
- return (h("div", { key: '0829fd5b35d9479ab8a7dae744e8a09e90a1a128', "test-id": "itemContainer", class: this.itemClasses, ref: el => (this.itemElement = el), role: clickable ? 'button' : undefined, tabIndex: clickable ? 0 : undefined }, this.hasBulletSlotContent && (h("div", { key: '6fba2ecbbe6fe30121f15cda9cc5026a5c5468c2', class: this.bulletClasses }, h("slot", { key: '9bd9880d99124c1102725b5ce6ca49ac1e229cf9', name: "bullet" }))), h("div", { key: '0c184236511ba043c91a009c93680858e34de545', class: this.mainClasses }, this.hasHeaderSlotContent && (h("div", { key: '2570b5fd60955dbbc97f5f3d941a5d653785fb0e', class: "header" }, h("slot", { key: 'a438cafe8aeded03ee814f736ae897852a9f1415', name: "header" }))), this.hasBodySlotContent && (h("div", { key: '270585a7a4ca111aedd4baeab101c353814aa72c', class: "body" }, h("slot", { key: 'cc95afec425e06c0a9edccedb0420207ccab88a0', name: "body" })))), this.hasActionSlotContent && (h("div", { key: 'c6a32baa731bd79c57a625d615058442a5bc764a', class: this.actionClasses }, h("slot", { key: '2b3104f1e0b4eed5e605c5784468f608240a881b', name: "action" }))), this.hasFooterSlotContent && (h("div", { key: '0a989b6ec5ca51e55fb44d0e90f57fe792a6bf35', class: this.footerClasses }, h("slot", { key: '76ae62c0b433f78b187853da2cf40394f7ca315e', name: "footer" })))));
108
+ return (h("div", { key: '7b0894fa0180d68cba7b47a6e63f837255a70057', "test-id": "itemContainer", class: this.itemClasses, ref: el => (this.itemElement = el), role: clickable ? 'button' : undefined, tabIndex: clickable ? 0 : undefined }, this.hasBulletSlotContent && (h("div", { key: '5ef5a26d2fb4644e9b9d902bc7ff314a90df9976', class: this.bulletClasses }, h("slot", { key: '7db082ffd73b04494e67cbdee93b140afb11e016', name: "bullet" }))), h("div", { key: '42212f56e12da4b57ae14b613efcdc59fbbc93b4', class: this.mainClasses }, this.hasHeaderSlotContent && (h("div", { key: '9153d8de21c4809716f17f31717d97463bb045a5', class: "header" }, h("slot", { key: 'ab504063f003daa1ea3984555ccf703426116dc0', name: "header" }))), this.hasBodySlotContent && (h("div", { key: '1a8b650df30033853919f6492aaa194f60a11c60', class: "body" }, h("slot", { key: 'b8262d4ef02751e63b62b525543394d0f14824db', name: "body" })))), this.hasActionSlotContent && (h("div", { key: '056bc3b9f932495baf46613b66857325d19c0e3b', class: this.actionClasses }, h("slot", { key: 'f5332dd36657b470c993b773195044f7c809fe66', name: "action" }))), this.hasFooterSlotContent && (h("div", { key: '111359c030a37ad8e72df6e3a40d8b8d226a4734', class: this.footerClasses }, h("slot", { key: '8afe6c9372a9c53663d6383116256f19b470858b', name: "footer" })))));
109
109
  }
110
110
  get hostElement() { return getElement(this); }
111
111
  };
@@ -234,7 +234,7 @@ const Q2List = class {
234
234
  // #endregion
235
235
  // #region Render Methods
236
236
  render() {
237
- return (h("div", { key: 'e4371faae59ae85dee324d6d6783a4b93c23f67f', class: this.listClasses, ref: el => (this.listElement = el) }, (this.hasFilterSlot || this.hasLabelContent) && (h("div", { key: '59cc98b62d2581a66a9ed127189fb23364c49bff', class: this.headerClasses }, h("div", { key: '568b6fab57c7552d5a577d19bd31760f6d1aa461', class: "label" }, this.label), this.hasFilterSlot && h("slot", { key: 'd27e785788847cf1a422568383bfe5d986764b2b', name: "filter" }))), h("div", { key: '7a00add6911167d7a27008f10f5d44cfae5d80b2', role: "list" }, h("slot", { key: 'dd5a0290091b0f1cb00a14cde43bab36e87573d2' }))));
237
+ return (h("div", { key: 'cb7c090b2e018bc46ef3ae829f4fd7f3cbb896e8', class: this.listClasses, ref: el => (this.listElement = el) }, (this.hasFilterSlot || this.hasLabelContent) && (h("div", { key: '16672b343894a78a378b17e18f21b1412b103683', class: this.headerClasses }, h("div", { key: '4f78dabab7f982fb6e472c29195bbcc8f4c6758c', class: "label" }, this.label), this.hasFilterSlot && h("slot", { key: '7ce97a75b66749f137a6c1b70827ddcef60df8ce', name: "filter" }))), h("div", { key: '05f39d183177a30f3d5edacecafa57503e1bef9c', role: "list" }, h("slot", { key: '37be8bca5d3b81404db947d96605585b3a1cce32' }))));
238
238
  }
239
239
  get hostElement() { return getElement(this); }
240
240
  };
@@ -1,6 +1,6 @@
1
1
  import { r as registerInstance, c as createEvent, h } from './index-7a5365e2.js';
2
2
 
3
- const q2LegendCss = "*{box-sizing:border-box}*:active{outline:none}*:focus{outline:none;box-shadow:var(--const-double-focus-ring, 0 0 0 2px #ffffff, 0 0 0 4px #0066cc)}:host{box-shadow:none !important}::-moz-focus-inner{border:none}input,textarea,button{font-family:inherit;font-size:inherit;font-stretch:inherit}:host(.sr),:host(.sr) button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.sr,.sr button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.hidden{display:none}:host([hidden]){display:none}.invisible{visibility:hidden}:host{position:relative;width:100%;display:block}ul{list-style:none;padding:0;margin:0}.item-button{align-items:center;background-color:transparent;border:none;column-gap:var(--tct-legend-item-gap, var(--app-scale-2x, 10px));display:flex;height:var(--tct-legend-item-height, var(--app-scale-9x, 45px));opacity:1;padding-block:0;padding-inline:var(--tct-legend-item-padding-inline, var(--app-scale-2x, 10px));transition:opacity var(--app-tween-1, 0.2s ease);width:100%}.item-button:hover{cursor:pointer}.item-button-faded>*{opacity:var(--tct-legend-item-opacity-faded, var(--app-disabled-opacity, 0.4))}.item-color-indicator{border-radius:50%;display:inline-block;flex-shrink:0;height:var(--tct-legend-item-color-indicator-size, var(--app-scale-3x, 15px));width:var(--tct-legend-item-color-indicator-size, var(--app-scale-3x, 15px))}.item-name{color:var(--tct-legend-item-name-font-color, var(--t-text, #4d4d4d));display:inline-block;flex-grow:1;font-size:var(--tct-legend-item-name-font-size, var(--app-font-size, 14px));font-weight:var(--tct-legend-item-name-font-weight, 600);line-height:var(--tct-legend-item-name-line-height, var(--app-line-height, 1.428571429em));text-align:left}.item-value{color:var(--tct-legend-item-value-font-color, var(--t-text, #4d4d4d));display:inline-block;flex-grow:1;font-size:var(--tct-legend-item-value-font-size, var(--app-font-size, 14px));font-weight:var(--tct-legend-item-value-font-weight, 400);line-height:var(--tct-legend-item-value-line-height, var(--app-line-height, 1.428571429em));text-align:right}";
3
+ const q2LegendCss = "*{box-sizing:border-box}*:active{outline:none}*:focus{outline:none;box-shadow:var(--const-double-focus-ring, 0 0 0 2px #ffffff, 0 0 0 4px #0066cc)}:host{box-shadow:none !important}::-moz-focus-inner{border:none}input,textarea,button{font-family:inherit;font-size:inherit;font-stretch:inherit}:host(.sr),:host(.sr) button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.sr,.sr button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.hidden{display:none}:host([hidden]){display:none}.invisible{visibility:hidden}:host{position:relative;width:100%;display:block}ul{list-style:none;padding:0;margin:0}.item-button{align-items:center;background-color:transparent;border:none;column-gap:var(--tct-legend-item-gap, var(--app-scale-2x, 10px));display:flex;height:var(--tct-legend-item-height, 24px);opacity:1;padding-block:0;padding-inline:var(--tct-legend-item-padding-inline, var(--app-scale-2x, 10px));transition:opacity var(--app-tween-1, 0.2s ease);width:100%}.item-button:hover{cursor:pointer}.item-button-faded>*{opacity:var(--tct-legend-item-opacity-faded, var(--app-disabled-opacity, 0.4))}.item-color-indicator{border-radius:50%;display:inline-block;flex-shrink:0;height:var(--tct-legend-item-color-indicator-size, var(--app-scale-3x, 15px));width:var(--tct-legend-item-color-indicator-size, var(--app-scale-3x, 15px))}.item-name{color:var(--tct-legend-item-name-font-color, var(--t-text, #4d4d4d));display:inline-block;flex-grow:1;font-size:var(--tct-legend-item-name-font-size, var(--app-font-size, 14px));font-weight:var(--tct-legend-item-name-font-weight, 600);line-height:var(--tct-legend-item-name-line-height, var(--app-line-height, 1.428571429em));text-align:left}.item-value{color:var(--tct-legend-item-value-font-color, var(--t-text, #4d4d4d));display:inline-block;flex-grow:1;font-size:var(--tct-legend-item-value-font-size, var(--app-font-size, 14px));font-weight:var(--tct-legend-item-value-font-weight, 400);line-height:var(--tct-legend-item-value-line-height, var(--app-line-height, 1.428571429em));text-align:right}";
4
4
  const Q2LegendStyle0 = q2LegendCss;
5
5
 
6
6
  const Q2Legend = class {
@@ -102,7 +102,7 @@ const Q2Legend = class {
102
102
  // #endregion
103
103
  // #region Render Methods
104
104
  render() {
105
- return (h("click-elsewhere", { key: 'b80e97d61b66d2a3950c0e680d8f6fdf0594391a', onChange: () => this.onClickElsewhere(this) }, h("ul", { key: '14dc772fa9b1608e415573e90d4c2780c12adef5' }, this.dataWithClasses.map(item => (h("li", { class: "item" }, h("button", { "test-id": "item", "aria-label": `${item.name} ${this.formatValue(item.value)}`, class: item.classes, onClick: event => this.onClick(event, item), onMouseEnter: event => this.onMouseEnter(event, item), onMouseLeave: event => this.onMouseLeave(event, item) }, h("span", { "test-id": "itemColor", class: "item-color-indicator", style: { backgroundColor: item.color }, "aria-hidden": "true" }), h("span", { "test-id": "itemName", class: "item-name" }, item.name), h("span", { id: `item-${item.id}`, "test-id": "itemValue", class: "item-value" }, this.formatValue(item.value)))))))));
105
+ return (h("click-elsewhere", { key: '17df977aa81845d2b4e6db411b2860495ba61e4b', onChange: () => this.onClickElsewhere(this) }, h("ul", { key: '21d4f05b1b2e5f5374e04a8a93249704043ed447' }, this.dataWithClasses.map(item => (h("li", { class: "item" }, h("button", { "test-id": "item", "aria-label": `${item.name} ${this.formatValue(item.value)}`, class: item.classes, onClick: event => this.onClick(event, item), onMouseEnter: event => this.onMouseEnter(event, item), onMouseLeave: event => this.onMouseLeave(event, item) }, h("span", { "test-id": "itemColor", class: "item-color-indicator", style: { backgroundColor: item.color }, "aria-hidden": "true" }), h("span", { "test-id": "itemName", class: "item-name" }, item.name), h("span", { id: `item-${item.id}`, "test-id": "itemValue", class: "item-value" }, this.formatValue(item.value)))))))));
106
106
  }
107
107
  static get watchers() { return {
108
108
  "hoveredItemId": ["watchHoveredItemId"],
@@ -1 +1 @@
1
- {"file":"q2-legend.entry.js","mappings":";;AAAA,MAAM,WAAW,GAAG,iqEAAiqE,CAAC;AACtrE,uBAAe,WAAW;;MCOb,QAAQ;;;;;;gCAIU,CAAC,CAAC;iCAGD,CAAC,CAAC;oBAOJ,EAAE;sBAIK,SAAS;6BAIlB,IAAI;8BAIH,IAAI;;;;IAiB7B,iBAAiB;QACb,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QAC5C,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;KACjD;;;IAMD,kBAAkB,CAAC,SAAiB;QAChC,MAAM,YAAY,GAAG,IAAI,CAAC,iBAAiB,CAAC,SAAS,CAAC,CAAC;QACvD,IAAI,CAAC,gBAAgB,GAAG,YAAY,CAAC;KACxC;IAGD,mBAAmB,CAAC,SAAiB;QACjC,MAAM,YAAY,GAAG,IAAI,CAAC,iBAAiB,CAAC,SAAS,CAAC,CAAC;QACvD,IAAI,CAAC,iBAAiB,GAAG,YAAY,CAAC;KACzC;;;IAKD,IAAI,eAAe;QACf,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,sCAC1B,IAAI,KACP,OAAO,EAAE;gBACL,aAAa,EAAE,IAAI;gBACnB,mBAAmB,EAAE,IAAI,CAAC,iBAAiB,CAAC,KAAK,CAAC;gBAClD,sBAAsB,EAAE,IAAI,CAAC,oBAAoB,CAAC,KAAK,CAAC;aAC3D,IACH,CAAC,CAAC;KACP;IAED,WAAW,CAAC,KAAsB;QAC9B,MAAM,YAAY,GAAG,UAAU,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC;QAClD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AG,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,EAC1D,KAAK,EAAE,IAAI,CAAC,OAAO,EACnB,OAAO,EAAE,KAAK,IAAI,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC,EAC3C,YAAY,EAAE,KAAK,IAAI,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,IAAI,CAAC,EACrD,YAAY,EAAE,KAAK,IAAI,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,IAAI,CAAC,IAErD,uBACY,WAAW,EACnB,KAAK,EAAC,sBAAsB,EAC5B,KAAK,EAAE,EAAE,eAAe,EAAE,IAAI,CAAC,KAAK,EAAE,iBAC1B,MAAM,GACpB,EACF,uBACY,UAAU,EAClB,KAAK,EAAC,WAAW,IAEhB,IAAI,CAAC,IAAI,CACP,EACP,YACI,EAAE,EAAE,QAAQ,IAAI,CAAC,EAAE,EAAE,aACb,WAAW,EACnB,KAAK,EAAC,YAAY,IAEjB,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAC1B,CACF,CACR,CACR,CAAC,CACD,CACS,EACpB;KACL;;;;;;;;;;","names":[],"sources":["src/components/q2-legend/q2-legend.scss?tag=q2-legend&encapsulation=shadow","src/components/q2-legend/q2-legend.tsx"],"sourcesContent":["@import '../../styles/host.scss';\n@import '../../styles/functions';\n\n:host {\n position: relative;\n width: 100%;\n display: block;\n}\n\nul {\n list-style: none;\n padding: 0;\n margin: 0;\n}\n\n.item-button {\n align-items: center;\n background-color: transparent;\n border: none;\n column-gap: var-list(--tct-legend-item-gap, --app-scale-2x, 10px);\n display: flex;\n height: var-list(--tct-legend-item-height, --app-scale-9x, 45px);\n opacity: 1;\n padding-block: 0;\n padding-inline: #{var-list(--tct-legend-item-padding-inline, --app-scale-2x, 10px)};\n transition: opacity var(--app-tween-1, 0.2s ease);\n width: 100%;\n\n &:hover {\n cursor: pointer;\n }\n\n &-faded > * {\n opacity: var-list(--tct-legend-item-opacity-faded, --app-disabled-opacity, 0.4);\n }\n}\n\n.item-color-indicator {\n border-radius: 50%;\n display: inline-block;\n flex-shrink: 0;\n height: var-list(--tct-legend-item-color-indicator-size, --app-scale-3x, 15px);\n width: var-list(--tct-legend-item-color-indicator-size, --app-scale-3x, 15px);\n}\n\n.item-name {\n color: var-list(--tct-legend-item-name-font-color, --t-text, #4d4d4d);\n display: inline-block;\n flex-grow: 1;\n font-size: var-list(--tct-legend-item-name-font-size, --app-font-size, 14px);\n font-weight: var(--tct-legend-item-name-font-weight, 600);\n line-height: var-list(--tct-legend-item-name-line-height, --app-line-height, 1.428571429em);\n text-align: left;\n}\n\n.item-value {\n color: var-list(--tct-legend-item-value-font-color, --t-text, #4d4d4d);\n display: inline-block;\n flex-grow: 1;\n font-size: var-list(--tct-legend-item-value-font-size, --app-font-size, 14px);\n font-weight: var-list(--tct-legend-item-value-font-weight, 400);\n line-height: var-list(--tct-legend-item-value-line-height, --app-line-height, 1.428571429em);\n text-align: right;\n}\n","import { Component, ComponentInterface, Event, EventEmitter, h, Prop, State, Watch } from '@stencil/core';\nimport { IDonutChartData } from 'q2-tecton-common/lib/types/element-types';\n\n@Component({\n tag: 'q2-legend',\n shadow: true,\n styleUrl: 'q2-legend.scss',\n})\nexport class Q2Legend implements ComponentInterface {\n // #region State Properties\n\n @State()\n hoveredItemIndex: number = -1;\n\n @State()\n selectedItemIndex: number = -1;\n\n // #endregion\n // #region Public Property API\n\n /** An array of objects that contain the data to be displayed. */\n @Prop()\n data: IDonutChartData[] = [];\n\n /** The format of the value displayed in the legend. */\n @Prop({ reflect: true })\n format: 'default' | 'currency' = 'default';\n\n /** The id of the item to set as hovered. */\n @Prop({ reflect: true })\n hoveredItemId: string = null;\n\n /** The id of the item to set as selected. */\n @Prop({ reflect: true })\n selectedItemId: string = null;\n\n // #endregion\n // #region Events\n\n @Event()\n click: EventEmitter<IDonutChartData>;\n\n @Event()\n mouseenter: EventEmitter<IDonutChartData>;\n\n @Event()\n mouseleave: EventEmitter<IDonutChartData>;\n\n // #endregion\n // #region Component Lifecycle Events\n\n componentWillLoad() {\n this.watchHoveredItemId(this.hoveredItemId);\n this.watchSelectedItemId(this.selectedItemId);\n }\n\n // #endregion\n // #region Watchers\n\n @Watch('hoveredItemId')\n watchHoveredItemId(newItemId: string) {\n const newItemIndex = this.getDataIndexForId(newItemId);\n this.hoveredItemIndex = newItemIndex;\n }\n\n @Watch('selectedItemId')\n watchSelectedItemId(newItemId: string) {\n const newItemIndex = this.getDataIndexForId(newItemId);\n this.selectedItemIndex = newItemIndex;\n }\n\n // #endregion\n // #region Local Methods\n\n get dataWithClasses() {\n return this.data.map((item, index) => ({\n ...item,\n classes: {\n 'item-button': true,\n 'item-button-faded': this.isItemButtonFaded(index),\n 'item-button-selected': this.isItemButtonSelected(index),\n },\n }));\n }\n\n formatValue(value: string | number) {\n const valueAsFloat = parseFloat(value.toString());\n if (this.format === 'currency') {\n return Intl.NumberFormat('en-US', {\n style: 'currency',\n currency: 'USD',\n }).format(valueAsFloat);\n }\n\n return Intl.NumberFormat('en-US').format(valueAsFloat);\n }\n\n getDataIndexForId(id: string) {\n const index = this.data.findIndex(item => item.id === id);\n return index >= 0 ? index : -1;\n }\n\n isItemButtonFaded(index: number) {\n if (this.isItemButtonSelected(index) || index == this.hoveredItemIndex) return false;\n\n if (this.selectedItemIndex >= 0 && this.hoveredItemIndex === -1) return true;\n\n return this.hoveredItemIndex >= 0 && index !== this.hoveredItemIndex;\n }\n\n isItemButtonSelected(index: number) {\n return index === this.selectedItemIndex;\n }\n\n onClick(event: MouseEvent, itemData: IDonutChartData) {\n event.stopPropagation();\n const itemIndex = this.getDataIndexForId(itemData.id);\n if (this.selectedItemIndex === itemIndex) {\n this.selectedItemIndex = -1;\n if (event.detail === 0) {\n // Keyboard click\n this.hoveredItemIndex = -1;\n } else {\n // Mouse click\n this.hoveredItemIndex = itemIndex;\n }\n this.click.emit(null);\n return;\n }\n\n this.selectedItemIndex = itemIndex;\n this.click.emit(this.data[itemIndex]);\n }\n\n onClickElsewhere(obj) {\n obj.selectedItemIndex = -1;\n }\n\n onMouseEnter(event: Event, itemData: IDonutChartData) {\n event.stopPropagation();\n const itemIndex = this.getDataIndexForId(itemData.id);\n this.hoveredItemIndex = itemIndex;\n this.mouseenter.emit(this.data[itemIndex]);\n }\n\n onMouseLeave(event: Event, itemData: IDonutChartData) {\n event.stopPropagation();\n const itemIndex = this.getDataIndexForId(itemData.id);\n this.hoveredItemIndex = -1;\n this.mouseleave.emit(this.data[itemIndex]);\n }\n\n // #endregion\n // #region Render Methods\n\n render() {\n return (\n <click-elsewhere onChange={() => this.onClickElsewhere(this)}>\n <ul>\n {this.dataWithClasses.map(item => (\n <li class=\"item\">\n <button\n test-id=\"item\"\n aria-label={`${item.name} ${this.formatValue(item.value)}`}\n class={item.classes}\n onClick={event => this.onClick(event, item)}\n onMouseEnter={event => this.onMouseEnter(event, item)}\n onMouseLeave={event => this.onMouseLeave(event, item)}\n >\n <span\n test-id=\"itemColor\"\n class=\"item-color-indicator\"\n style={{ backgroundColor: item.color }}\n aria-hidden=\"true\"\n />\n <span\n test-id=\"itemName\"\n class=\"item-name\"\n >\n {item.name}\n </span>\n <span\n id={`item-${item.id}`}\n test-id=\"itemValue\"\n class=\"item-value\"\n >\n {this.formatValue(item.value)}\n </span>\n </button>\n </li>\n ))}\n </ul>\n </click-elsewhere>\n );\n }\n\n // #endregion\n}\n"],"version":3}
1
+ {"file":"q2-legend.entry.js","mappings":";;AAAA,MAAM,WAAW,GAAG,4oEAA4oE,CAAC;AACjqE,uBAAe,WAAW;;MCOb,QAAQ;;;;;;gCAIU,CAAC,CAAC;iCAGD,CAAC,CAAC;oBAOJ,EAAE;sBAIK,SAAS;6BAIlB,IAAI;8BAIH,IAAI;;;;IAiB7B,iBAAiB;QACb,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QAC5C,IAAI,CAAC,m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BACY,UAAU,EAClB,KAAK,EAAC,WAAW,IAEhB,IAAI,CAAC,IAAI,CACP,EACP,YACI,EAAE,EAAE,QAAQ,IAAI,CAAC,EAAE,EAAE,aACb,WAAW,EACnB,KAAK,EAAC,YAAY,IAEjB,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAC1B,CACF,CACR,CACR,CAAC,CACD,CACS,EACpB;KACL;;;;;;;;;;","names":[],"sources":["src/components/q2-legend/q2-legend.scss?tag=q2-legend&encapsulation=shadow","src/components/q2-legend/q2-legend.tsx"],"sourcesContent":["@import '../../styles/host.scss';\n@import '../../styles/functions';\n\n:host {\n position: relative;\n width: 100%;\n display: block;\n}\n\nul {\n list-style: none;\n padding: 0;\n margin: 0;\n}\n\n.item-button {\n align-items: center;\n background-color: transparent;\n border: none;\n column-gap: var-list(--tct-legend-item-gap, --app-scale-2x, 10px);\n display: flex;\n height: var-list(--tct-legend-item-height, 24px);\n opacity: 1;\n padding-block: 0;\n padding-inline: #{var-list(--tct-legend-item-padding-inline, --app-scale-2x, 10px)};\n transition: opacity var(--app-tween-1, 0.2s ease);\n width: 100%;\n\n &:hover {\n cursor: pointer;\n }\n\n &-faded > * {\n opacity: var-list(--tct-legend-item-opacity-faded, --app-disabled-opacity, 0.4);\n }\n}\n\n.item-color-indicator {\n border-radius: 50%;\n display: inline-block;\n flex-shrink: 0;\n height: var-list(--tct-legend-item-color-indicator-size, --app-scale-3x, 15px);\n width: var-list(--tct-legend-item-color-indicator-size, --app-scale-3x, 15px);\n}\n\n.item-name {\n color: var-list(--tct-legend-item-name-font-color, --t-text, #4d4d4d);\n display: inline-block;\n flex-grow: 1;\n font-size: var-list(--tct-legend-item-name-font-size, --app-font-size, 14px);\n font-weight: var(--tct-legend-item-name-font-weight, 600);\n line-height: var-list(--tct-legend-item-name-line-height, --app-line-height, 1.428571429em);\n text-align: left;\n}\n\n.item-value {\n color: var-list(--tct-legend-item-value-font-color, --t-text, #4d4d4d);\n display: inline-block;\n flex-grow: 1;\n font-size: var-list(--tct-legend-item-value-font-size, --app-font-size, 14px);\n font-weight: var-list(--tct-legend-item-value-font-weight, 400);\n line-height: var-list(--tct-legend-item-value-line-height, --app-line-height, 1.428571429em);\n text-align: right;\n}\n","import { Component, ComponentInterface, Event, EventEmitter, h, Prop, State, Watch } from '@stencil/core';\nimport { IDonutChartData } from 'q2-tecton-common/lib/types/element-types';\n\n@Component({\n tag: 'q2-legend',\n shadow: true,\n styleUrl: 'q2-legend.scss',\n})\nexport class Q2Legend implements ComponentInterface {\n // #region State Properties\n\n @State()\n hoveredItemIndex: number = -1;\n\n @State()\n selectedItemIndex: number = -1;\n\n // #endregion\n // #region Public Property API\n\n /** An array of objects that contain the data to be displayed. */\n @Prop()\n data: IDonutChartData[] = [];\n\n /** The format of the value displayed in the legend. */\n @Prop({ reflect: true })\n format: 'default' | 'currency' = 'default';\n\n /** The id of the item to set as hovered. */\n @Prop({ reflect: true })\n hoveredItemId: string = null;\n\n /** The id of the item to set as selected. */\n @Prop({ reflect: true })\n selectedItemId: string = null;\n\n // #endregion\n // #region Events\n\n @Event()\n click: EventEmitter<IDonutChartData>;\n\n @Event()\n mouseenter: EventEmitter<IDonutChartData>;\n\n @Event()\n mouseleave: EventEmitter<IDonutChartData>;\n\n // #endregion\n // #region Component Lifecycle Events\n\n componentWillLoad() {\n this.watchHoveredItemId(this.hoveredItemId);\n this.watchSelectedItemId(this.selectedItemId);\n }\n\n // #endregion\n // #region Watchers\n\n @Watch('hoveredItemId')\n watchHoveredItemId(newItemId: string) {\n const newItemIndex = this.getDataIndexForId(newItemId);\n this.hoveredItemIndex = newItemIndex;\n }\n\n @Watch('selectedItemId')\n watchSelectedItemId(newItemId: string) {\n const newItemIndex = this.getDataIndexForId(newItemId);\n this.selectedItemIndex = newItemIndex;\n }\n\n // #endregion\n // #region Local Methods\n\n get dataWithClasses() {\n return this.data.map((item, index) => ({\n ...item,\n classes: {\n 'item-button': true,\n 'item-button-faded': this.isItemButtonFaded(index),\n 'item-button-selected': this.isItemButtonSelected(index),\n },\n }));\n }\n\n formatValue(value: string | number) {\n const valueAsFloat = parseFloat(value.toString());\n if (this.format === 'currency') {\n return Intl.NumberFormat('en-US', {\n style: 'currency',\n currency: 'USD',\n }).format(valueAsFloat);\n }\n\n return Intl.NumberFormat('en-US').format(valueAsFloat);\n }\n\n getDataIndexForId(id: string) {\n const index = this.data.findIndex(item => item.id === id);\n return index >= 0 ? index : -1;\n }\n\n isItemButtonFaded(index: number) {\n if (this.isItemButtonSelected(index) || index == this.hoveredItemIndex) return false;\n\n if (this.selectedItemIndex >= 0 && this.hoveredItemIndex === -1) return true;\n\n return this.hoveredItemIndex >= 0 && index !== this.hoveredItemIndex;\n }\n\n isItemButtonSelected(index: number) {\n return index === this.selectedItemIndex;\n }\n\n onClick(event: MouseEvent, itemData: IDonutChartData) {\n event.stopPropagation();\n const itemIndex = this.getDataIndexForId(itemData.id);\n if (this.selectedItemIndex === itemIndex) {\n this.selectedItemIndex = -1;\n if (event.detail === 0) {\n // Keyboard click\n this.hoveredItemIndex = -1;\n } else {\n // Mouse click\n this.hoveredItemIndex = itemIndex;\n }\n this.click.emit(null);\n return;\n }\n\n this.selectedItemIndex = itemIndex;\n this.click.emit(this.data[itemIndex]);\n }\n\n onClickElsewhere(obj) {\n obj.selectedItemIndex = -1;\n }\n\n onMouseEnter(event: Event, itemData: IDonutChartData) {\n event.stopPropagation();\n const itemIndex = this.getDataIndexForId(itemData.id);\n this.hoveredItemIndex = itemIndex;\n this.mouseenter.emit(this.data[itemIndex]);\n }\n\n onMouseLeave(event: Event, itemData: IDonutChartData) {\n event.stopPropagation();\n const itemIndex = this.getDataIndexForId(itemData.id);\n this.hoveredItemIndex = -1;\n this.mouseleave.emit(this.data[itemIndex]);\n }\n\n // #endregion\n // #region Render Methods\n\n render() {\n return (\n <click-elsewhere onChange={() => this.onClickElsewhere(this)}>\n <ul>\n {this.dataWithClasses.map(item => (\n <li class=\"item\">\n <button\n test-id=\"item\"\n aria-label={`${item.name} ${this.formatValue(item.value)}`}\n class={item.classes}\n onClick={event => this.onClick(event, item)}\n onMouseEnter={event => this.onMouseEnter(event, item)}\n onMouseLeave={event => this.onMouseLeave(event, item)}\n >\n <span\n test-id=\"itemColor\"\n class=\"item-color-indicator\"\n style={{ backgroundColor: item.color }}\n aria-hidden=\"true\"\n />\n <span\n test-id=\"itemName\"\n class=\"item-name\"\n >\n {item.name}\n </span>\n <span\n id={`item-${item.id}`}\n test-id=\"itemValue\"\n class=\"item-value\"\n >\n {this.formatValue(item.value)}\n </span>\n </button>\n </li>\n ))}\n </ul>\n </click-elsewhere>\n );\n }\n\n // #endregion\n}\n"],"version":3}
@@ -1,5 +1,5 @@
1
- import { r as registerInstance, h, g as getElement } from './index-7a5365e2.js';
2
- import { l as loc } from './index-504f1a9e.js';
1
+ import { r as registerInstance, g as getElement } from './index-7a5365e2.js';
2
+ import { l as loc } from './index-f2a66217.js';
3
3
 
4
4
  const q2LocCss = "*{box-sizing:border-box}*:active{outline:none}*:focus{outline:none;box-shadow:var(--const-double-focus-ring, 0 0 0 2px #ffffff, 0 0 0 4px #0066cc)}:host{box-shadow:none !important}::-moz-focus-inner{border:none}input,textarea,button{font-family:inherit;font-size:inherit;font-stretch:inherit}:host(.sr),:host(.sr) button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.sr,.sr button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.hidden{display:none}:host([hidden]){display:none}.invisible{visibility:hidden}:host{display:inline}";
5
5
  const Q2LocStyle0 = q2LocCss;
@@ -7,31 +7,27 @@ const Q2LocStyle0 = q2LocCss;
7
7
  const Q2Loc = class {
8
8
  constructor(hostRef) {
9
9
  registerInstance(this, hostRef);
10
- // #endregion
11
- // #region Local Methods
12
10
  this.initMutationObserver = () => {
11
+ if (!('MutationObserver' in window))
12
+ return;
13
13
  const observer = new MutationObserver(this.mutationHandler);
14
14
  observer.observe(this.hostElement, { childList: true, subtree: true, characterData: true });
15
15
  this.mutationObserver = observer;
16
16
  };
17
- this.initValue = async () => {
18
- const textContent = this.hostElement.textContent.trim();
19
- if (!this.value && textContent) {
20
- this.value = textContent;
21
- this.hostElement.textContent = null;
22
- }
23
- else {
24
- this.propHandler();
17
+ this.initValue = () => {
18
+ const { hostTextContent } = this;
19
+ this.hostElement.textContent = null;
20
+ if (!this.value && hostTextContent) {
21
+ this.value = hostTextContent;
25
22
  }
26
23
  };
27
- this.mutationHandler = async () => {
28
- const textContent = this.hostElement.textContent.trim();
29
- if (textContent && this.value !== textContent) {
30
- this.value = textContent;
24
+ this.mutationHandler = () => {
25
+ const { hostTextContent } = this;
26
+ if (hostTextContent && this.translatedValue !== hostTextContent) {
31
27
  this.hostElement.textContent = null;
28
+ this.value = hostTextContent;
32
29
  }
33
30
  };
34
- this.displayValue = undefined;
35
31
  this.substitutions = undefined;
36
32
  this.value = undefined;
37
33
  }
@@ -46,24 +42,22 @@ const Q2Loc = class {
46
42
  this.initValue();
47
43
  }
48
44
  componentDidLoad() {
49
- if ('MutationObserver' in window)
50
- this.initMutationObserver();
45
+ this.initMutationObserver();
51
46
  }
52
47
  // #endregion
53
- // #region Watchers
54
- propHandler() {
55
- this.displayValue = loc(this.value, this.substitutions);
48
+ // #region Local Methods
49
+ get hostTextContent() {
50
+ return this.hostElement.textContent.trim();
51
+ }
52
+ get translatedValue() {
53
+ return loc(this.value, this.substitutions);
56
54
  }
57
55
  // #endregion
58
56
  // #region Render Methods
59
57
  render() {
60
- return h("span", { key: '8774b0a4bfb39826f6d7be0640c7a0244ab22a09' }, this.displayValue);
58
+ return this.translatedValue;
61
59
  }
62
60
  get hostElement() { return getElement(this); }
63
- static get watchers() { return {
64
- "value": ["propHandler"],
65
- "substitutions": ["propHandler"]
66
- }; }
67
61
  };
68
62
  Q2Loc.style = Q2LocStyle0;
69
63
 
@@ -1 +1 @@
1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,MAAM;YAAE,IAAI,CAAC,oBAAoB,EAAE,CAAC;KACjE;;;IAOD,WAAW;QACP,IAAI,CAAC,YAAY,GAAG,GAAG,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC;KAC3D;;;IAgCD,MAAM;QACF,OAAO,+DAAO,IAAI,CAAC,YAAY,CAAQ,CAAC;KAC3C;;;;;;;;;;;","names":[],"sources":["src/components/q2-loc/q2-loc.scss?tag=q2-loc&encapsulation=shadow","src/components/q2-loc/q2-loc.tsx"],"sourcesContent":["@import '../../styles/host.scss';\n\n:host {\n display: inline\n}","import { Element, Component, Prop, State, Watch, h } from '@stencil/core';\nimport { loc } from 'src/utils';\n\n@Component({ tag: 'q2-loc', shadow: true, styleUrl: 'q2-loc.scss' })\nexport class Q2Loc {\n // #region Own Properties\n\n mutationObserver: MutationObserver;\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 displayValue: string;\n\n // #endregion\n // #region Public Property API\n\n /** Any substitutions you would like to pass into the localization string. */\n @Prop()\n substitutions: string[];\n\n /**\n * The reference to the localization key you would like to display the localized output of.\n * If no value is provided, any text inside the element will be used as a fallback.\n * @localizable\n */\n @Prop({ reflect: true, mutable: true })\n value: string;\n\n // #endregion\n // #region Component Lifecycle Events\n\n disconnectedCallback() {\n this.mutationObserver?.disconnect();\n this.mutationObserver = null;\n }\n\n componentWillLoad() {\n this.initValue();\n }\n\n componentDidLoad() {\n if ('MutationObserver' in window) this.initMutationObserver();\n }\n\n // #endregion\n // #region Watchers\n\n @Watch('value')\n @Watch('substitutions')\n propHandler() {\n this.displayValue = loc(this.value, this.substitutions);\n }\n\n // #endregion\n // #region Local Methods\n\n initMutationObserver = () => {\n const observer = new MutationObserver(this.mutationHandler);\n observer.observe(this.hostElement, { childList: true, subtree: true, characterData: true });\n this.mutationObserver = observer;\n };\n\n initValue = async () => {\n const textContent = this.hostElement.textContent.trim();\n if (!this.value && textContent) {\n this.value = textContent;\n this.hostElement.textContent = null;\n } else {\n this.propHandler();\n }\n };\n\n mutationHandler = async () => {\n const textContent = this.hostElement.textContent.trim();\n if (textContent && this.value !== textContent) {\n this.value = textContent;\n this.hostElement.textContent = null;\n }\n };\n\n // #endregion\n // #region Render Methods\n\n render() {\n return <span>{this.displayValue}</span>;\n }\n\n // #endregion\n}\n"],"version":3}
1
+ {"file":"q2-loc.entry.js","mappings":";;;AAAA,MAAM,QAAQ,GAAG,8qBAA8qB,CAAC;AAChsB,oBAAe,QAAQ;;MCGV,KAAK;;;QAqDd,yBAAoB,GAAG;YACnB,IAAI,EAAE,kBAAkB,IAAI,MAAM,CAAC;gBAAE,OAAO;YAC5C,MAAM,QAAQ,GAAG,IAAI,gBAAgB,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;YAC5D,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CAAC;YAC5F,IAAI,CAAC,gBAAgB,GAAG,QAAQ,CAAC;SACpC,CAAC;QAEF,cAAS,GAAG;YACR,MAAM,EAAE,eAAe,EAAE,GAAG,IAAI,CAAC;YACjC,IAAI,CAAC,WAAW,CAAC,WAAW,GAAG,IAAI,CAAC;YACpC,IAAI,CAAC,IAAI,CAAC,KAAK,IAAI,eAAe,EAAE;gBAChC,IAAI,CAAC,KAAK,GAAG,eAAe,CAAC;aAChC;SACJ,CAAC;QAEF,oBAAe,GAAG;YACd,MAAM,EAAE,eAAe,EAAE,GAAG,IAAI,CAAC;YACjC,IAAI,eAAe,IAAI,IAAI,CAAC,eAAe,KAAK,eAAe,EAAE;gBAC7D,IAAI,CAAC,WAAW,CAAC,WAAW,GAAG,IAAI,CAAC;gBACpC,IAAI,CAAC,KAAK,GAAG,eAAe,CAAC;aAChC;SACJ,CAAC;;;;;;IA7CF,oBAAoB;;QAChB,MAAA,IAAI,CAAC,gBAAgB,0CAAE,UAAU,EAAE,CAAC;QACpC,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC;KAChC;IAED,iBAAiB;QACb,IAAI,CAAC,SAAS,EAAE,CAAC;KACpB;IAED,gBAAgB;QACZ,IAAI,CAAC,oBAAoB,EAAE,CAAC;KAC/B;;;IAKD,IAAI,eAAe;QACf,OAAO,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,IAAI,EAAE,CAAC;KAC9C;IAED,IAAI,eAAe;QACf,OAAO,GAAG,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC;KAC9C;;;IA4BD,MAAM;QACF,OAAO,IAAI,CAAC,eAAe,CAAC;KAC/B;;;;;;;","names":[],"sources":["src/components/q2-loc/q2-loc.scss?tag=q2-loc","src/components/q2-loc/q2-loc.tsx"],"sourcesContent":["@import '../../styles/host.scss';\n\n:host {\n display: inline\n}","import { Element, Component, Prop } from '@stencil/core';\nimport { loc } from 'src/utils';\n\n@Component({ tag: 'q2-loc', shadow: false, styleUrl: 'q2-loc.scss' })\nexport class Q2Loc {\n // #region Own Properties\n\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 /** Any substitutions you would like to pass into the localization string. */\n @Prop()\n substitutions: string[];\n\n /**\n * The reference to the localization key you would like to display the localized output of.\n * If no value is provided, any text inside the element will be used as a fallback.\n * @localizable\n */\n @Prop({ reflect: true, mutable: true })\n value: string;\n\n // #endregion\n // #region Component Lifecycle Events\n\n disconnectedCallback() {\n this.mutationObserver?.disconnect();\n this.mutationObserver = null;\n }\n\n componentWillLoad() {\n this.initValue();\n }\n\n componentDidLoad() {\n this.initMutationObserver();\n }\n\n // #endregion\n // #region Local Methods\n\n get hostTextContent(): string {\n return this.hostElement.textContent.trim();\n }\n\n get translatedValue(): string {\n return loc(this.value, this.substitutions);\n }\n\n initMutationObserver = () => {\n if (!('MutationObserver' in window)) return;\n const observer = new MutationObserver(this.mutationHandler);\n observer.observe(this.hostElement, { childList: true, subtree: true, characterData: true });\n this.mutationObserver = observer;\n };\n\n initValue = () => {\n const { hostTextContent } = this;\n this.hostElement.textContent = null;\n if (!this.value && hostTextContent) {\n this.value = hostTextContent;\n }\n };\n\n mutationHandler = () => {\n const { hostTextContent } = this;\n if (hostTextContent && this.translatedValue !== hostTextContent) {\n this.hostElement.textContent = null;\n this.value = hostTextContent;\n }\n };\n\n // #endregion\n // #region Render Methods\n\n render() {\n return this.translatedValue;\n }\n\n // #endregion\n}\n"],"version":3}
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, h, g as getElement } from './index-7a5365e2.js';
2
- import { o as overrideFocus, i as isEventFromElement, n as nextPaint, t as isFirefox, l as loc } from './index-504f1a9e.js';
2
+ import { o as overrideFocus, i as isEventFromElement, n as nextPaint, t as isFirefox, l as loc } from './index-f2a66217.js';
3
3
 
4
4
  const q2MessageCss = "*{box-sizing:border-box}*:active{outline:none}*:focus{outline:none;box-shadow:var(--const-double-focus-ring, 0 0 0 2px #ffffff, 0 0 0 4px #0066cc)}:host{box-shadow:none !important}::-moz-focus-inner{border:none}input,textarea,button{font-family:inherit;font-size:inherit;font-stretch:inherit}:host(.sr),:host(.sr) button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.sr,.sr button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.hidden{display:none}:host([hidden]){display:none}.invisible{visibility:hidden}:host{display:block}:host([hidden]){display:none}.message{border-left-width:var(--tct-message-bar-width, var(--t-message-bar-width, var(--app-scale-1x, 5px)));border-left-style:solid;--comp-line-height:var(--tct-message-line-height, var(--t-message-line-height, var(--app-line-height, 1.428571429em)));display:grid;gap:var(--tct-scale-1, var(--app-scale-1x, 5px));align-items:flex-start;background:var(--tct-message-background, var(--tct-message-bg, var(--t-message-bg, var(--tct-gray-14, var(--t-gray-14, var(--tct-gray-l3, var(--app-gray-l3, #f2f2f2)))))));color:var(--tct-message-font-color, var(--t-message-font-color, inherit));box-shadow:var(--tct-message-box-shadow, var(--t-message-box-shadow, inherit));border-radius:var(--tct-message-border-radius, var(--t-message-border-radius, inherit))}.message:focus{box-shadow:var(--const-global-focus)}.message-icon{--comp-top-offset:calc(calc(var(--comp-line-height) - var(--comp-icon-size)) / 2);--tct-icon-size:var(--comp-icon-size);top:var(--comp-top-offset);margin-bottom:calc(var(--comp-top-offset) * -1)}.message-content{flex:1;line-height:var(--comp-line-height)}::slotted(ul){--comp-list-default-padding:0 0 0 var(--app-scale-3x, 15px);padding:var(--tct-message-list-padding, var(--comp-list-default-padding))}:host(:not([appearance])),:host([appearance=standard]){--comp-default-margin:var(--app-scale-3x, 5px) 0;margin:var(--tct-message-margin, var(--comp-default-margin))}:host(:not([appearance])) .message,:host([appearance=standard]) .message{--comp-icon-size:var(--tct-message-icon-size, var(--t-message-icon-size, 24px));--comp-padding:var(--tct-message-padding, var(--t-message-padding, var(--app-scale-3x, 15px)));grid-template-columns:var(--comp-icon-size) 1fr;padding:var(--comp-padding);padding-left:calc(var(--comp-padding) - var(--tct-scale-2, var(--app-scale-2x, 10px)));padding-bottom:calc(var(--comp-padding) - var(--tct-scale-1, var(--app-scale-1x, 5px)))}:host(:not([appearance])) ::slotted(ul),:host([appearance=standard]) ::slotted(ul){--comp-list-default-margin:var(--app-scale-3x, 15px) 0;margin:var(--tct-message-list-margin, var(--comp-list-default-margin))}:host([appearance=minimal]){margin:0}:host([appearance=minimal]) .message{padding:var(--tct-message-minimal-padding, var(--t-message-minimal-padding, var(--app-scale-2x, 10px)));grid-template-columns:1fr}:host([appearance=minimal]) ::slotted(ul){margin:var(--tct-scale-1, var(--app-scale-1x, 5px)) 0}:host(:not([type])) .message,:host([type=info]) .message{border-left-color:var(--tct-stoplight-info, var(--const-stoplight-info, #0079c1))}:host(:not([type])) .message-icon,:host([type=info]) .message-icon{--tct-icon-stroke-primary:var(--tct-stoplight-info, var(--const-stoplight-info, #0079c1));--tct-icon-stroke-secondary:var(--tct-stoplight-info, var(--const-stoplight-info, #0079c1))}:host([type=success]) .message{border-left-color:var(--tct-stoplight-success, var(--const-stoplight-success, #0e8a00))}:host([type=success]) .message-icon{--tct-icon-stroke-primary:var(--tct-stoplight-success, var(--const-stoplight-success, #0e8a00));--tct-icon-stroke-secondary:var(--tct-stoplight-success, var(--const-stoplight-success, #0e8a00))}:host([type=warning]) .message{border-left-color:var(--tct-stoplight-warning, var(--const-stoplight-warning, #c35500))}:host([type=warning]) .message-icon{--tct-icon-stroke-primary:var(--tct-stoplight-warning, var(--const-stoplight-warning, #c35500));--tct-icon-stroke-secondary:var(--tct-stoplight-warning, var(--const-stoplight-warning, #c35500))}:host([type=error]) .message,:host([type=danger]) .message{border-left-color:var(--tct-stoplight-error, var(--const-stoplight-alert, #d20a0a))}:host([type=error]) .message-icon,:host([type=danger]) .message-icon{--tct-icon-stroke-primary:var(--tct-stoplight-error, var(--const-stoplight-alert, #d20a0a));--tct-icon-stroke-secondary:var(--tct-stoplight-error, var(--const-stoplight-alert, #d20a0a))}";
5
5
  const Q2MessageStyle0 = q2MessageCss;
@@ -62,7 +62,7 @@ const Q2Message = class {
62
62
  const addDivForAriaLive = !isFirefox && this.presentToggle;
63
63
  const { description } = this;
64
64
  const messageLabel = loc(`tecton.element.message.type.${this.type ? this.type : 'info'}`);
65
- return (h("div", { key: '862e4f7aa7ae624a695ce6727f72ed8759584173', tabindex: "-1", class: "message", role: description ? undefined : 'alert', "aria-live": description ? undefined : 'assertive', "aria-atomic": description ? undefined : 'true', "aria-relevant": description && addAriaHiddenForAriaLive ? undefined : 'all', "test-id": "messageContainer" }, this.appearance === 'standard' ? this.messageIcon(this.type) : '', addDivForAriaLive && h("div", { key: '84084e80aac97b4e4e33a2bcf348094cd88279fb', class: "sr" }), h("div", { key: '4a437099dce9df5657a7f5039a55f5b326d2ee58', class: "sr message-label" }, messageLabel), h("div", { key: '8bf021fb84aa6d4973546060acaddae5d059d351', class: "message-content", "aria-hidden": addAriaHiddenForAriaLive ? 'true' : undefined }, h("slot", { key: '1790d7a0df5758d13c8b76577a4703808cddc832' }))));
65
+ return (h("div", { key: 'ccca9e80908f73482c73f865743e5f7cd6438d99', tabindex: "-1", class: "message", role: description ? undefined : 'alert', "aria-live": description ? undefined : 'assertive', "aria-atomic": description ? undefined : 'true', "aria-relevant": description && addAriaHiddenForAriaLive ? undefined : 'all', "test-id": "messageContainer" }, this.appearance === 'standard' ? this.messageIcon(this.type) : '', addDivForAriaLive && h("div", { key: 'a9937495e83a7e0852034c36639d8c60ea3c30ac', class: "sr" }), h("div", { key: 'e650f7ef7c2544e44f63ce7a23f33f04145a7e83', class: "sr message-label" }, messageLabel), h("div", { key: 'daa66069373ac3030fb33dc3c88c0621c91bb6a4', class: "message-content", "aria-hidden": addAriaHiddenForAriaLive ? 'true' : undefined }, h("slot", { key: '464a52a941be194c1267beee2c1b307ece17f964' }))));
66
66
  }
67
67
  get hostElement() { return getElement(this); }
68
68
  };