q2-tecton-elements 1.63.2 → 1.64.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 (390) hide show
  1. package/dist/bundle-report.json +2382 -3464
  2. package/dist/cjs/action-sheet-D3n8vaeA.js.map +1 -1
  3. package/dist/cjs/index-CyqXtdz-.js.map +1 -1
  4. package/dist/cjs/loader.cjs.js +1 -1
  5. package/dist/cjs/q2-action-group_2.cjs.entry.js +1 -1
  6. package/dist/cjs/q2-action-sheet.cjs.entry.js +1 -1
  7. package/dist/cjs/q2-action-sheet.cjs.entry.js.map +1 -1
  8. package/dist/cjs/q2-action-sheet.entry.cjs.js.map +1 -1
  9. package/dist/cjs/q2-avatar.cjs.entry.js +4 -2
  10. package/dist/cjs/q2-avatar.cjs.entry.js.map +1 -1
  11. package/dist/cjs/q2-avatar.entry.cjs.js.map +1 -1
  12. package/dist/cjs/q2-btn.q2-loading.entry.cjs.js.map +1 -1
  13. package/dist/cjs/q2-btn_2.cjs.entry.js +2 -2
  14. package/dist/cjs/q2-btn_2.cjs.entry.js.map +1 -1
  15. package/dist/cjs/q2-card.cjs.entry.js +5 -5
  16. package/dist/cjs/q2-card.cjs.entry.js.map +1 -1
  17. package/dist/cjs/q2-card.entry.cjs.js.map +1 -1
  18. package/dist/cjs/q2-chart-area.cjs.entry.js +1 -1
  19. package/dist/cjs/q2-chart-area.cjs.entry.js.map +1 -1
  20. package/dist/cjs/q2-chart-area.entry.cjs.js.map +1 -1
  21. package/dist/cjs/q2-chart-bar.cjs.entry.js +1 -1
  22. package/dist/cjs/q2-chart-bar.cjs.entry.js.map +1 -1
  23. package/dist/cjs/q2-chart-bar.entry.cjs.js.map +1 -1
  24. package/dist/cjs/q2-chart-donut.cjs.entry.js +5 -5
  25. package/dist/cjs/q2-chart-donut.cjs.entry.js.map +1 -1
  26. package/dist/cjs/q2-chart-donut.entry.cjs.js.map +1 -1
  27. package/dist/cjs/q2-checkbox.cjs.entry.js +1 -1
  28. package/dist/cjs/q2-checkbox.cjs.entry.js.map +1 -1
  29. package/dist/cjs/q2-checkbox.entry.cjs.js.map +1 -1
  30. package/dist/cjs/q2-data-table.cjs.entry.js +15 -10
  31. package/dist/cjs/q2-data-table.cjs.entry.js.map +1 -1
  32. package/dist/cjs/q2-data-table.entry.cjs.js.map +1 -1
  33. package/dist/cjs/q2-dropdown-item.cjs.entry.js +3 -3
  34. package/dist/cjs/q2-dropdown-item.cjs.entry.js.map +1 -1
  35. package/dist/cjs/q2-dropdown-item.entry.cjs.js.map +1 -1
  36. package/dist/cjs/q2-dropdown.cjs.entry.js +1 -1
  37. package/dist/cjs/q2-dropdown.cjs.entry.js.map +1 -1
  38. package/dist/cjs/q2-dropdown.entry.cjs.js.map +1 -1
  39. package/dist/cjs/q2-file-picker.cjs.entry.js +24 -17
  40. package/dist/cjs/q2-file-picker.cjs.entry.js.map +1 -1
  41. package/dist/cjs/q2-file-picker.entry.cjs.js.map +1 -1
  42. package/dist/cjs/q2-formatted-text.cjs.entry.js +7 -7
  43. package/dist/cjs/q2-formatted-text.cjs.entry.js.map +1 -1
  44. package/dist/cjs/q2-formatted-text.entry.cjs.js.map +1 -1
  45. package/dist/cjs/q2-icon.cjs.entry.js +1 -0
  46. package/dist/cjs/q2-icon.cjs.entry.js.map +1 -1
  47. package/dist/cjs/q2-icon.entry.cjs.js.map +1 -1
  48. package/dist/cjs/q2-input.cjs.entry.js +8 -8
  49. package/dist/cjs/q2-input.cjs.entry.js.map +1 -1
  50. package/dist/cjs/q2-input.entry.cjs.js.map +1 -1
  51. package/dist/cjs/q2-legend.cjs.entry.js +1 -1
  52. package/dist/cjs/q2-legend.cjs.entry.js.map +1 -1
  53. package/dist/cjs/q2-legend.entry.cjs.js.map +1 -1
  54. package/dist/cjs/q2-link.q2-list.entry.cjs.js.map +1 -1
  55. package/dist/cjs/q2-link_2.cjs.entry.js +1 -1
  56. package/dist/cjs/q2-link_2.cjs.entry.js.map +1 -1
  57. package/dist/cjs/q2-modal.cjs.entry.js +1 -1
  58. package/dist/cjs/q2-modal.cjs.entry.js.map +1 -1
  59. package/dist/cjs/q2-modal.entry.cjs.js.map +1 -1
  60. package/dist/cjs/q2-mutation-observer.cjs.entry.js +106 -0
  61. package/dist/cjs/q2-mutation-observer.cjs.entry.js.map +1 -0
  62. package/dist/cjs/q2-mutation-observer.entry.cjs.js.map +1 -0
  63. package/dist/cjs/q2-optgroup.cjs.entry.js +1 -1
  64. package/dist/cjs/q2-pagination.cjs.entry.js +25 -5
  65. package/dist/cjs/q2-pagination.cjs.entry.js.map +1 -1
  66. package/dist/cjs/q2-pagination.entry.cjs.js.map +1 -1
  67. package/dist/cjs/q2-pill.cjs.entry.js +1 -1
  68. package/dist/cjs/q2-relative-time.cjs.entry.js +1 -1
  69. package/dist/cjs/q2-section-container.cjs.entry.js +102 -0
  70. package/dist/cjs/q2-section-container.cjs.entry.js.map +1 -0
  71. package/dist/cjs/q2-section-container.entry.cjs.js.map +1 -0
  72. package/dist/cjs/q2-section.cjs.entry.js +2 -2
  73. package/dist/cjs/q2-stepper-vertical.cjs.entry.js +1 -1
  74. package/dist/cjs/q2-stepper.cjs.entry.js +1 -1
  75. package/dist/cjs/q2-tab-container.cjs.entry.js +1 -1
  76. package/dist/cjs/q2-tab-pane.cjs.entry.js +1 -1
  77. package/dist/cjs/q2-tag.cjs.entry.js +1 -1
  78. package/dist/cjs/q2-tecton-elements.cjs.js +1 -1
  79. package/dist/cjs/q2-textarea.cjs.entry.js +1 -1
  80. package/dist/cjs/q2-textarea.cjs.entry.js.map +1 -1
  81. package/dist/cjs/q2-textarea.entry.cjs.js.map +1 -1
  82. package/dist/cjs/tecton-tab-pane.cjs.entry.js +2 -2
  83. package/dist/collection/collection-manifest.json +2 -0
  84. package/dist/collection/components/q2-action-sheet/q2-action-sheet.js +7 -7
  85. package/dist/collection/components/q2-action-sheet/q2-action-sheet.js.map +1 -1
  86. package/dist/collection/components/q2-avatar/q2-avatar.css +69 -13
  87. package/dist/collection/components/q2-avatar/q2-avatar.js +23 -1
  88. package/dist/collection/components/q2-avatar/q2-avatar.js.map +1 -1
  89. package/dist/collection/components/q2-card/q2-card.js +5 -5
  90. package/dist/collection/components/q2-card/q2-card.js.map +1 -1
  91. package/dist/collection/components/q2-chart-area/q2-chart-area.js +1 -1
  92. package/dist/collection/components/q2-chart-area/q2-chart-area.js.map +1 -1
  93. package/dist/collection/components/q2-chart-bar/q2-chart-bar.js +1 -1
  94. package/dist/collection/components/q2-chart-bar/q2-chart-bar.js.map +1 -1
  95. package/dist/collection/components/q2-chart-donut/q2-chart-donut.css +17 -8
  96. package/dist/collection/components/q2-chart-donut/q2-chart-donut.js +4 -4
  97. package/dist/collection/components/q2-chart-donut/q2-chart-donut.js.map +1 -1
  98. package/dist/collection/components/q2-checkbox/q2-checkbox.css +14 -2
  99. package/dist/collection/components/q2-data-table/q2-data-table.css +8 -0
  100. package/dist/collection/components/q2-data-table/q2-data-table.js +67 -16
  101. package/dist/collection/components/q2-data-table/q2-data-table.js.map +1 -1
  102. package/dist/collection/components/q2-dropdown/q2-dropdown.js +1 -1
  103. package/dist/collection/components/q2-dropdown/q2-dropdown.js.map +1 -1
  104. package/dist/collection/components/q2-dropdown-item/q2-dropdown-item.css +22 -5
  105. package/dist/collection/components/q2-dropdown-item/q2-dropdown-item.js +2 -2
  106. package/dist/collection/components/q2-dropdown-item/q2-dropdown-item.js.map +1 -1
  107. package/dist/collection/components/q2-file-picker/q2-file-picker.js +30 -23
  108. package/dist/collection/components/q2-file-picker/q2-file-picker.js.map +1 -1
  109. package/dist/collection/components/q2-formatted-text/q2-formatted-text.js +27 -27
  110. package/dist/collection/components/q2-formatted-text/q2-formatted-text.js.map +1 -1
  111. package/dist/collection/components/q2-grid/q2-grid.js +30 -30
  112. package/dist/collection/components/q2-grid-area/q2-grid-area.js +42 -42
  113. package/dist/collection/components/q2-icon/assets/cards.symbol.svg +1 -2
  114. package/dist/collection/components/q2-icon/assets/icon-list.json +1 -1
  115. package/dist/collection/components/q2-icon/assets/icon-map.json +1 -1
  116. package/dist/collection/components/q2-icon/assets/standard.symbol.svg +1 -1
  117. package/dist/collection/components/q2-icon/q2-icon-types.js.map +1 -1
  118. package/dist/collection/components/q2-input/q2-input.js +11 -11
  119. package/dist/collection/components/q2-input/q2-input.js.map +1 -1
  120. package/dist/collection/components/q2-legend/q2-legend.js +1 -1
  121. package/dist/collection/components/q2-legend/q2-legend.js.map +1 -1
  122. package/dist/collection/components/q2-link/q2-link.js +1 -1
  123. package/dist/collection/components/q2-link/q2-link.js.map +1 -1
  124. package/dist/collection/components/q2-loading/q2-loading.css +32 -20
  125. package/dist/collection/components/q2-loading/q2-loading.js +1 -1
  126. package/dist/collection/components/q2-loading/q2-loading.js.map +1 -1
  127. package/dist/collection/components/q2-modal/q2-modal.js +5 -5
  128. package/dist/collection/components/q2-modal/q2-modal.js.map +1 -1
  129. package/dist/collection/components/q2-mutation-observer/q2-mutation-observer.js +233 -0
  130. package/dist/collection/components/q2-mutation-observer/q2-mutation-observer.js.map +1 -0
  131. package/dist/collection/components/q2-optgroup/q2-optgroup.js +1 -1
  132. package/dist/collection/components/q2-option-list/q2-option-list.js +4 -4
  133. package/dist/collection/components/q2-pagination/q2-pagination.js +45 -5
  134. package/dist/collection/components/q2-pagination/q2-pagination.js.map +1 -1
  135. package/dist/collection/components/q2-pill/q2-pill.js +1 -1
  136. package/dist/collection/components/q2-relative-time/q2-relative-time.js +1 -1
  137. package/dist/collection/components/q2-resize-observer/q2-resize-observer.js +1 -1
  138. package/dist/collection/components/q2-section/q2-section.js +2 -2
  139. package/dist/collection/components/q2-section-container/q2-section-container.js +198 -0
  140. package/dist/collection/components/q2-section-container/q2-section-container.js.map +1 -0
  141. package/dist/collection/components/q2-stepper/q2-stepper.js +1 -1
  142. package/dist/collection/components/q2-stepper-pane/q2-stepper-pane.js +2 -2
  143. package/dist/collection/components/q2-stepper-vertical/q2-stepper-vertical.js +1 -1
  144. package/dist/collection/components/q2-tab-container/q2-tab-container.js +1 -1
  145. package/dist/collection/components/q2-tab-pane/q2-tab-pane.js +1 -1
  146. package/dist/collection/components/q2-tag/q2-tag.js +1 -1
  147. package/dist/collection/components/q2-textarea/q2-textarea.js +1 -1
  148. package/dist/collection/components/q2-textarea/q2-textarea.js.map +1 -1
  149. package/dist/collection/components/tecton-tab-pane/tecton-tab-pane.js +2 -2
  150. package/dist/collection/utils/action-sheet.js.map +1 -1
  151. package/dist/collection/utils/helpers.js.map +1 -1
  152. package/dist/collection/utils/index.js.map +1 -1
  153. package/dist/components/action-sheet.js.map +1 -1
  154. package/dist/components/index.js +4 -0
  155. package/dist/components/index.js.map +1 -1
  156. package/dist/components/index2.js.map +1 -1
  157. package/dist/components/q2-action-sheet.js +1 -1
  158. package/dist/components/q2-action-sheet.js.map +1 -1
  159. package/dist/components/q2-avatar2.js +5 -2
  160. package/dist/components/q2-avatar2.js.map +1 -1
  161. package/dist/components/q2-card.js +5 -5
  162. package/dist/components/q2-card.js.map +1 -1
  163. package/dist/components/q2-chart-area.js +1 -1
  164. package/dist/components/q2-chart-area.js.map +1 -1
  165. package/dist/components/q2-chart-bar.js +1 -1
  166. package/dist/components/q2-chart-bar.js.map +1 -1
  167. package/dist/components/q2-chart-donut.js +5 -5
  168. package/dist/components/q2-chart-donut.js.map +1 -1
  169. package/dist/components/q2-checkbox2.js +1 -1
  170. package/dist/components/q2-checkbox2.js.map +1 -1
  171. package/dist/components/q2-data-table.js +17 -10
  172. package/dist/components/q2-data-table.js.map +1 -1
  173. package/dist/components/q2-dropdown-item2.js +3 -3
  174. package/dist/components/q2-dropdown-item2.js.map +1 -1
  175. package/dist/components/q2-dropdown.js +1 -1
  176. package/dist/components/q2-dropdown.js.map +1 -1
  177. package/dist/components/q2-file-picker.js +25 -18
  178. package/dist/components/q2-file-picker.js.map +1 -1
  179. package/dist/components/q2-formatted-text.js +9 -9
  180. package/dist/components/q2-formatted-text.js.map +1 -1
  181. package/dist/components/q2-icon2.js +1 -0
  182. package/dist/components/q2-icon2.js.map +1 -1
  183. package/dist/components/q2-input2.js +9 -9
  184. package/dist/components/q2-input2.js.map +1 -1
  185. package/dist/components/q2-legend2.js +1 -1
  186. package/dist/components/q2-legend2.js.map +1 -1
  187. package/dist/components/q2-link2.js +1 -1
  188. package/dist/components/q2-link2.js.map +1 -1
  189. package/dist/components/q2-loading2.js +2 -2
  190. package/dist/components/q2-loading2.js.map +1 -1
  191. package/dist/components/q2-modal.js +1 -1
  192. package/dist/components/q2-modal.js.map +1 -1
  193. package/dist/components/q2-mutation-observer.d.ts +11 -0
  194. package/dist/components/q2-mutation-observer.js +130 -0
  195. package/dist/components/q2-mutation-observer.js.map +1 -0
  196. package/dist/components/q2-optgroup2.js +1 -1
  197. package/dist/components/q2-pagination.js +26 -5
  198. package/dist/components/q2-pagination.js.map +1 -1
  199. package/dist/components/q2-pill.js +1 -1
  200. package/dist/components/q2-relative-time.js +1 -1
  201. package/dist/components/q2-resize-observer2.js +1 -1
  202. package/dist/components/q2-section-container.d.ts +11 -0
  203. package/dist/components/q2-section-container.js +128 -0
  204. package/dist/components/q2-section-container.js.map +1 -0
  205. package/dist/components/q2-section.js +2 -2
  206. package/dist/components/q2-stepper-vertical.js +1 -1
  207. package/dist/components/q2-stepper.js +1 -1
  208. package/dist/components/q2-tab-container.js +1 -1
  209. package/dist/components/q2-tab-pane.js +1 -1
  210. package/dist/components/q2-tag.js +1 -1
  211. package/dist/components/q2-textarea.js +1 -1
  212. package/dist/components/q2-textarea.js.map +1 -1
  213. package/dist/components/tecton-tab-pane.js +2 -2
  214. package/dist/esm/action-sheet-D3xPdhm8.js.map +1 -1
  215. package/dist/esm/index-YJ5sXwiE.js.map +1 -1
  216. package/dist/esm/loader.js +1 -1
  217. package/dist/esm/q2-action-group_2.entry.js +1 -1
  218. package/dist/esm/q2-action-sheet.entry.js +1 -1
  219. package/dist/esm/q2-action-sheet.entry.js.map +1 -1
  220. package/dist/esm/q2-avatar.entry.js +4 -2
  221. package/dist/esm/q2-avatar.entry.js.map +1 -1
  222. package/dist/esm/q2-btn.q2-loading.entry.js.map +1 -1
  223. package/dist/esm/q2-btn_2.entry.js +2 -2
  224. package/dist/esm/q2-btn_2.entry.js.map +1 -1
  225. package/dist/esm/q2-card.entry.js +5 -5
  226. package/dist/esm/q2-card.entry.js.map +1 -1
  227. package/dist/esm/q2-chart-area.entry.js +1 -1
  228. package/dist/esm/q2-chart-area.entry.js.map +1 -1
  229. package/dist/esm/q2-chart-bar.entry.js +1 -1
  230. package/dist/esm/q2-chart-bar.entry.js.map +1 -1
  231. package/dist/esm/q2-chart-donut.entry.js +5 -5
  232. package/dist/esm/q2-chart-donut.entry.js.map +1 -1
  233. package/dist/esm/q2-checkbox.entry.js +1 -1
  234. package/dist/esm/q2-checkbox.entry.js.map +1 -1
  235. package/dist/esm/q2-data-table.entry.js +15 -10
  236. package/dist/esm/q2-data-table.entry.js.map +1 -1
  237. package/dist/esm/q2-dropdown-item.entry.js +3 -3
  238. package/dist/esm/q2-dropdown-item.entry.js.map +1 -1
  239. package/dist/esm/q2-dropdown.entry.js +1 -1
  240. package/dist/esm/q2-dropdown.entry.js.map +1 -1
  241. package/dist/esm/q2-file-picker.entry.js +24 -17
  242. package/dist/esm/q2-file-picker.entry.js.map +1 -1
  243. package/dist/esm/q2-formatted-text.entry.js +7 -7
  244. package/dist/esm/q2-formatted-text.entry.js.map +1 -1
  245. package/dist/esm/q2-icon.entry.js +1 -0
  246. package/dist/esm/q2-icon.entry.js.map +1 -1
  247. package/dist/esm/q2-input.entry.js +8 -8
  248. package/dist/esm/q2-input.entry.js.map +1 -1
  249. package/dist/esm/q2-legend.entry.js +1 -1
  250. package/dist/esm/q2-legend.entry.js.map +1 -1
  251. package/dist/esm/q2-link.q2-list.entry.js.map +1 -1
  252. package/dist/esm/q2-link_2.entry.js +1 -1
  253. package/dist/esm/q2-link_2.entry.js.map +1 -1
  254. package/dist/esm/q2-modal.entry.js +1 -1
  255. package/dist/esm/q2-modal.entry.js.map +1 -1
  256. package/dist/esm/q2-mutation-observer.entry.js +104 -0
  257. package/dist/esm/q2-mutation-observer.entry.js.map +1 -0
  258. package/dist/esm/q2-optgroup.entry.js +1 -1
  259. package/dist/esm/q2-pagination.entry.js +25 -5
  260. package/dist/esm/q2-pagination.entry.js.map +1 -1
  261. package/dist/esm/q2-pill.entry.js +1 -1
  262. package/dist/esm/q2-relative-time.entry.js +1 -1
  263. package/dist/esm/q2-section-container.entry.js +100 -0
  264. package/dist/esm/q2-section-container.entry.js.map +1 -0
  265. package/dist/esm/q2-section.entry.js +2 -2
  266. package/dist/esm/q2-stepper-vertical.entry.js +1 -1
  267. package/dist/esm/q2-stepper.entry.js +1 -1
  268. package/dist/esm/q2-tab-container.entry.js +1 -1
  269. package/dist/esm/q2-tab-pane.entry.js +1 -1
  270. package/dist/esm/q2-tag.entry.js +1 -1
  271. package/dist/esm/q2-tecton-elements.js +1 -1
  272. package/dist/esm/q2-textarea.entry.js +1 -1
  273. package/dist/esm/q2-textarea.entry.js.map +1 -1
  274. package/dist/esm/tecton-tab-pane.entry.js +2 -2
  275. package/dist/q2-tecton-elements/action-sheet-D3xPdhm8.js.map +1 -1
  276. package/dist/q2-tecton-elements/assets/cards.symbol.svg +1 -2
  277. package/dist/q2-tecton-elements/assets/icon-list.json +1 -1
  278. package/dist/q2-tecton-elements/assets/icon-map.json +1 -1
  279. package/dist/q2-tecton-elements/assets/standard.symbol.svg +1 -1
  280. package/dist/q2-tecton-elements/charting-Ckq0XMDu.js.map +1 -0
  281. package/dist/q2-tecton-elements/index-CvNuBFrq.js.map +1 -0
  282. package/dist/q2-tecton-elements/index-DIB7EjIC.js.map +1 -0
  283. package/dist/q2-tecton-elements/index-RUz6101x.js.map +1 -0
  284. package/dist/q2-tecton-elements/index-YJ5sXwiE.js.map +1 -1
  285. package/dist/q2-tecton-elements/q2-action-group_2.entry.js +1 -1
  286. package/dist/q2-tecton-elements/q2-action-sheet.entry.esm.js.map +1 -1
  287. package/dist/q2-tecton-elements/q2-action-sheet.entry.js +62 -62
  288. package/dist/q2-tecton-elements/q2-action-sheet.entry.js.map +1 -1
  289. package/dist/q2-tecton-elements/q2-avatar.entry.esm.js.map +1 -1
  290. package/dist/q2-tecton-elements/q2-avatar.entry.js +26 -25
  291. package/dist/q2-tecton-elements/q2-avatar.entry.js.map +1 -1
  292. package/dist/q2-tecton-elements/q2-btn.q2-loading.entry.esm.js.map +1 -1
  293. package/dist/q2-tecton-elements/q2-btn_2.entry.js +11 -6
  294. package/dist/q2-tecton-elements/q2-btn_2.entry.js.map +1 -1
  295. package/dist/q2-tecton-elements/q2-card.entry.esm.js.map +1 -1
  296. package/dist/q2-tecton-elements/q2-card.entry.js +5 -5
  297. package/dist/q2-tecton-elements/q2-card.entry.js.map +1 -1
  298. package/dist/q2-tecton-elements/q2-chart-area.entry.esm.js.map +1 -1
  299. package/dist/q2-tecton-elements/q2-chart-area.entry.js +2 -2
  300. package/dist/q2-tecton-elements/q2-chart-area.entry.js.map +1 -1
  301. package/dist/q2-tecton-elements/q2-chart-bar.entry.esm.js.map +1 -1
  302. package/dist/q2-tecton-elements/q2-chart-bar.entry.js +2 -2
  303. package/dist/q2-tecton-elements/q2-chart-bar.entry.js.map +1 -1
  304. package/dist/q2-tecton-elements/q2-chart-donut.entry.esm.js.map +1 -1
  305. package/dist/q2-tecton-elements/q2-chart-donut.entry.js +48 -47
  306. package/dist/q2-tecton-elements/q2-chart-donut.entry.js.map +1 -1
  307. package/dist/q2-tecton-elements/q2-checkbox.entry.esm.js.map +1 -1
  308. package/dist/q2-tecton-elements/q2-checkbox.entry.js +6 -6
  309. package/dist/q2-tecton-elements/q2-checkbox.entry.js.map +1 -1
  310. package/dist/q2-tecton-elements/q2-data-table.entry.esm.js.map +1 -1
  311. package/dist/q2-tecton-elements/q2-data-table.entry.js +23 -19
  312. package/dist/q2-tecton-elements/q2-data-table.entry.js.map +1 -1
  313. package/dist/q2-tecton-elements/q2-dropdown-item.entry.esm.js.map +1 -1
  314. package/dist/q2-tecton-elements/q2-dropdown-item.entry.js +23 -21
  315. package/dist/q2-tecton-elements/q2-dropdown-item.entry.js.map +1 -1
  316. package/dist/q2-tecton-elements/q2-dropdown.entry.esm.js.map +1 -1
  317. package/dist/q2-tecton-elements/q2-dropdown.entry.js +4 -4
  318. package/dist/q2-tecton-elements/q2-dropdown.entry.js.map +1 -1
  319. package/dist/q2-tecton-elements/q2-file-picker.entry.esm.js.map +1 -1
  320. package/dist/q2-tecton-elements/q2-file-picker.entry.js +42 -35
  321. package/dist/q2-tecton-elements/q2-file-picker.entry.js.map +1 -1
  322. package/dist/q2-tecton-elements/q2-formatted-text.entry.esm.js.map +1 -1
  323. package/dist/q2-tecton-elements/q2-formatted-text.entry.js +7 -7
  324. package/dist/q2-tecton-elements/q2-formatted-text.entry.js.map +1 -1
  325. package/dist/q2-tecton-elements/q2-icon.entry.esm.js.map +1 -1
  326. package/dist/q2-tecton-elements/q2-icon.entry.js +1 -0
  327. package/dist/q2-tecton-elements/q2-icon.entry.js.map +1 -1
  328. package/dist/q2-tecton-elements/q2-input.entry.esm.js.map +1 -1
  329. package/dist/q2-tecton-elements/q2-input.entry.js +7 -7
  330. package/dist/q2-tecton-elements/q2-input.entry.js.map +1 -1
  331. package/dist/q2-tecton-elements/q2-legend.entry.esm.js.map +1 -1
  332. package/dist/q2-tecton-elements/q2-legend.entry.js +2 -2
  333. package/dist/q2-tecton-elements/q2-legend.entry.js.map +1 -1
  334. package/dist/q2-tecton-elements/q2-link.q2-list.entry.esm.js.map +1 -1
  335. package/dist/q2-tecton-elements/q2-link_2.entry.js +1 -0
  336. package/dist/q2-tecton-elements/q2-link_2.entry.js.map +1 -1
  337. package/dist/q2-tecton-elements/q2-modal.entry.esm.js.map +1 -1
  338. package/dist/q2-tecton-elements/q2-modal.entry.js +23 -23
  339. package/dist/q2-tecton-elements/q2-modal.entry.js.map +1 -1
  340. package/dist/q2-tecton-elements/q2-mutation-observer.entry.esm.js.map +1 -0
  341. package/dist/q2-tecton-elements/q2-mutation-observer.entry.js +107 -0
  342. package/dist/q2-tecton-elements/q2-mutation-observer.entry.js.map +1 -0
  343. package/dist/q2-tecton-elements/q2-optgroup.entry.js +4 -4
  344. package/dist/q2-tecton-elements/q2-pagination.entry.esm.js.map +1 -1
  345. package/dist/q2-tecton-elements/q2-pagination.entry.js +50 -38
  346. package/dist/q2-tecton-elements/q2-pagination.entry.js.map +1 -1
  347. package/dist/q2-tecton-elements/q2-pill.entry.js +12 -12
  348. package/dist/q2-tecton-elements/q2-relative-time.entry.js +1 -1
  349. package/dist/q2-tecton-elements/q2-section-container.entry.esm.js.map +1 -0
  350. package/dist/q2-tecton-elements/q2-section-container.entry.js +95 -0
  351. package/dist/q2-tecton-elements/q2-section-container.entry.js.map +1 -0
  352. package/dist/q2-tecton-elements/q2-section.entry.js +11 -11
  353. package/dist/q2-tecton-elements/q2-stepper-vertical.entry.js +37 -37
  354. package/dist/q2-tecton-elements/q2-stepper.entry.js +12 -12
  355. package/dist/q2-tecton-elements/q2-tab-container.entry.js +12 -12
  356. package/dist/q2-tecton-elements/q2-tab-pane.entry.js +2 -2
  357. package/dist/q2-tecton-elements/q2-tag.entry.js +15 -15
  358. package/dist/q2-tecton-elements/q2-tecton-elements.esm.js +1 -1
  359. package/dist/q2-tecton-elements/q2-tecton-elements.esm.js.map +1 -1
  360. package/dist/q2-tecton-elements/q2-textarea.entry.esm.js.map +1 -1
  361. package/dist/q2-tecton-elements/q2-textarea.entry.js +2 -2
  362. package/dist/q2-tecton-elements/q2-textarea.entry.js.map +1 -1
  363. package/dist/q2-tecton-elements/sanitize-html-string-Csx7LCh3.js.map +1 -0
  364. package/dist/q2-tecton-elements/shapes-BJsBbYur.js.map +1 -0
  365. package/dist/q2-tecton-elements/tecton-tab-pane.entry.js +6 -6
  366. package/dist/types/components/q2-action-sheet/q2-action-sheet.d.ts +1 -1
  367. package/dist/types/components/q2-avatar/q2-avatar.d.ts +2 -0
  368. package/dist/types/components/q2-card/q2-card.d.ts +1 -1
  369. package/dist/types/components/q2-chart-area/q2-chart-area.d.ts +1 -1
  370. package/dist/types/components/q2-chart-bar/q2-chart-bar.d.ts +1 -1
  371. package/dist/types/components/q2-chart-donut/q2-chart-donut.d.ts +1 -1
  372. package/dist/types/components/q2-data-table/q2-data-table.d.ts +9 -3
  373. package/dist/types/components/q2-file-picker/q2-file-picker.d.ts +3 -1
  374. package/dist/types/components/q2-formatted-text/q2-formatted-text.d.ts +6 -6
  375. package/dist/types/components/q2-icon/q2-icon-types.d.ts +1 -2
  376. package/dist/types/components/q2-input/q2-input.d.ts +1 -1
  377. package/dist/types/components/q2-legend/q2-legend.d.ts +1 -1
  378. package/dist/types/components/q2-modal/q2-modal.d.ts +1 -1
  379. package/dist/types/components/q2-mutation-observer/q2-mutation-observer.d.ts +40 -0
  380. package/dist/types/components/q2-pagination/q2-pagination.d.ts +2 -0
  381. package/dist/types/components/q2-section-container/q2-section-container.d.ts +34 -0
  382. package/dist/types/components/q2-textarea/q2-textarea.d.ts +1 -2
  383. package/dist/types/components.d.ts +175 -4
  384. package/dist/types/global.d.ts +3 -3
  385. package/dist/types/util.d.ts +6 -6
  386. package/dist/types/utils/action-sheet.d.ts +1 -1
  387. package/dist/types/utils/helpers.d.ts +2 -3
  388. package/dist/types/utils/index.d.ts +2 -2
  389. package/package.json +5 -5
  390. /package/dist/types/{builds/q2e/development/tecton/tecton → Users/kvanhouten/Documents/Work/tecton_extra}/packages/q2-tecton-elements/.stencil/jest.setup.d.ts +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"q2-dropdown-item.js","sourceRoot":"","sources":["../../../../src/components/q2-dropdown-item/q2-dropdown-item.tsx"],"names":[],"mappings":"AAAA,OAAO,EACH,SAAS,EAET,IAAI,EACJ,KAAK,EACL,OAAO,EACP,KAAK,EACL,MAAM,EACN,KAAK,EACL,CAAC,GAEJ,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,GAAG,EAAE,eAAe,EAAE,aAAa,EAAE,MAA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I,CAAC,aAAa,EAAE,CAAC;IAChC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGJ","sourcesContent":["import {\n Component,\n ComponentInterface,\n Prop,\n State,\n Element,\n Event,\n Listen,\n Watch,\n h,\n EventEmitter,\n} from '@stencil/core';\nimport { loc, handleAriaLabel, overrideFocus } from 'src/utils';\nimport mirrorEmit from '@/utils/mirror-emit';\nimport { JSX } from '../../components';\n\n@Component({ tag: 'q2-dropdown-item', shadow: true, styleUrl: 'q2-dropdown-item.scss' })\nexport class Q2DropdownItem implements ComponentInterface {\n // #region Own Properties\n\n dropdownItemBtn: HTMLButtonElement;\n removeBtn: HTMLButtonElement;\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 q2LocValue: string;\n\n // #endregion\n // #region Public Property API\n\n /**\n * Used by q2-option-list to indicate the option is active\n * @private\n */\n @Prop({ reflect: true })\n active: boolean;\n\n /** @deprecated */\n @Prop({ reflect: true, mutable: true })\n ariaLabel: string;\n\n /** Disables interaction with the item and blocks its click event. */\n @Prop({ reflect: true })\n disabled: boolean;\n\n /**\n * The text that appears within the dropdown item.\n *\n * @info\n * This will be used as the `aria-label` for this item.\n * @localizable\n */\n @Prop({ reflect: true, mutable: true })\n label: string;\n\n /**\n * Renders an icon button in the item.\n * Clicking on this button will change the `type` on the item's click event detail to \"remove\".\n */\n @Prop({ reflect: true })\n removable: boolean;\n\n /**\n * Renders a line in the item instead of text.\n * Click events from these items will not have details provided.\n * A `separator` allows for quick visual grouping of items, so interactions should not be bound to these options.\n */\n @Prop({ reflect: true })\n separator: boolean;\n\n /** A static reference value for the item. This value is returned in the click event detail. */\n @Prop({ reflect: true })\n value: string;\n\n // #endregion\n // #region Events\n\n /**\n * Is emitted when the item is clicked.\n * @deprecated\n */\n @Event()\n click: EventEmitter<{ type: 'select' | 'remove'; value: string }>;\n\n /**\n * Is emitted when the item is clicked.\n */\n @Event()\n tctClick: EventEmitter<{ type: 'select' | 'remove'; value: string }>;\n\n // #endregion\n // #region Component Lifecycle Events\n\n componentWillLoad() {\n handleAriaLabel(this);\n this.q2LocValue = this.handleQ2LocValue();\n }\n\n componentDidLoad() {\n if (this.separator) return;\n overrideFocus(this.hostElement);\n }\n\n // #endregion\n // #region Listeners\n\n @Listen('focus')\n onHostElementFocus(event: FocusEvent) {\n if (event.target === this.hostElement) {\n this.focusItem();\n }\n }\n\n // #endregion\n // #region Watchers\n\n @Watch('ariaLabel')\n ariaLabelObserver() {\n handleAriaLabel(this);\n }\n\n // #endregion\n // #region Local Methods\n\n get innerLabel(): string {\n return this.label || this.hostElement.textContent.trim() || this.q2LocValue;\n }\n\n get removeLabel(): string {\n return loc('tecton.element.dropdownItem.remove', [this.innerLabel || '']);\n }\n\n focusItem() {\n this.dropdownItemBtn.focus();\n }\n\n focusRemoveBtn() {\n this.removeBtn && this.removeBtn.focus();\n }\n\n handleQ2LocValue = (): string => {\n const locElement = this.hostElement.querySelector('q2-loc');\n if (!locElement) return '';\n\n return locElement.value\n ? loc(locElement.value, locElement.substitutions)\n : loc(locElement.innerText, locElement.substitutions);\n };\n\n onItemClick = (event: MouseEvent) => {\n event.stopImmediatePropagation();\n\n mirrorEmit(this, ['click', 'tctClick'], {\n type: 'select',\n value: this.value || '',\n });\n };\n\n onItemFocus = (event: FocusEvent) => {\n event.stopPropagation();\n };\n\n onItemKeydown = (event: KeyboardEvent) => {\n if (event.key === 'ArrowRight') this.focusRemoveBtn();\n };\n\n onRemoveBtnClick = (event: MouseEvent) => {\n event.stopImmediatePropagation();\n\n mirrorEmit(this, ['click', 'tctClick'], {\n type: 'remove',\n value: this.value || '',\n });\n };\n\n onRemoveBtnFocus = (event: FocusEvent) => {\n event.stopPropagation();\n };\n\n onRemoveBtnKeydown = (event: KeyboardEvent) => {\n if (event.key === 'ArrowLeft') this.focusItem();\n };\n\n // #endregion\n // #region Render Methods\n\n renderItemDOM(): JSX.IntrinsicElements {\n return (\n <div\n class=\"dropdown-item-wrapper\"\n role=\"presentation\"\n >\n <button\n ref={el => (this.dropdownItemBtn = el)}\n aria-label={loc(this.innerLabel)}\n class=\"dropdown-item-button dropdown-item\"\n tabindex=\"-1\"\n disabled={this.disabled}\n role=\"menuitem\"\n onClick={this.onItemClick}\n onKeyDown={this.onItemKeydown}\n onFocus={this.onItemFocus}\n test-id=\"dropdownItem\"\n >\n <slot>{loc(this.innerLabel)}</slot>\n </button>\n {this.removable && (\n <button\n ref={el => (this.removeBtn = el)}\n class=\"dropdown-item-button remove-dropdown-item\"\n tabindex=\"-1\"\n aria-label={this.removeLabel}\n disabled={this.disabled}\n onClick={this.onRemoveBtnClick}\n onKeyDown={this.onRemoveBtnKeydown}\n onFocus={this.onRemoveBtnFocus}\n test-id=\"removeDropdownItem\"\n >\n <q2-icon type=\"close\" />\n </button>\n )}\n </div>\n );\n }\n\n renderSeparatorDOM(): JSX.IntrinsicElements {\n return (\n <div\n class=\"dropdown-separator\"\n role=\"separator\"\n test-id=\"dropdownItemSeparator\"\n />\n );\n }\n\n render() {\n if (this.separator) {\n return this.renderSeparatorDOM();\n }\n\n return this.renderItemDOM();\n }\n\n // #endregion\n}\n"]}
1
+ {"version":3,"file":"q2-dropdown-item.js","sourceRoot":"","sources":["../../../../src/components/q2-dropdown-item/q2-dropdown-item.tsx"],"names":[],"mappings":"AAAA,OAAO,EACH,SAAS,EAET,IAAI,EACJ,KAAK,EACL,OAAO,EACP,KAAK,EACL,MAAM,EACN,KAAK,EACL,CAAC,GAEJ,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,GAAG,EAAE,eAAe,EAAE,aAAa,EAAE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EAAE,CAAC;QACrC,CAAC;QAED,OAAO,IAAI,CAAC,aAAa,EAAE,CAAC;IAChC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGJ","sourcesContent":["import {\n Component,\n ComponentInterface,\n Prop,\n State,\n Element,\n Event,\n Listen,\n Watch,\n h,\n EventEmitter,\n} from '@stencil/core';\nimport { loc, handleAriaLabel, overrideFocus } from 'src/utils';\nimport mirrorEmit from '@/utils/mirror-emit';\nimport { JSX } from '../../components';\n\n@Component({ tag: 'q2-dropdown-item', shadow: true, styleUrl: 'q2-dropdown-item.scss' })\nexport class Q2DropdownItem implements ComponentInterface {\n // #region Own Properties\n\n dropdownItemBtn: HTMLButtonElement;\n removeBtn: HTMLButtonElement;\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 q2LocValue: string;\n\n // #endregion\n // #region Public Property API\n\n /**\n * Used by q2-option-list to indicate the option is active\n * @private\n */\n @Prop({ reflect: true })\n active: boolean;\n\n /** @deprecated */\n @Prop({ reflect: true, mutable: true })\n ariaLabel: string;\n\n /** Disables interaction with the item and blocks its click event. */\n @Prop({ reflect: true })\n disabled: boolean;\n\n /**\n * The text that appears within the dropdown item.\n *\n * @info\n * This will be used as the `aria-label` for this item.\n * @localizable\n */\n @Prop({ reflect: true, mutable: true })\n label: string;\n\n /**\n * Renders an icon button in the item.\n * Clicking on this button will change the `type` on the item's click event detail to \"remove\".\n */\n @Prop({ reflect: true })\n removable: boolean;\n\n /**\n * Renders a line in the item instead of text.\n * Click events from these items will not have details provided.\n * A `separator` allows for quick visual grouping of items, so interactions should not be bound to these options.\n */\n @Prop({ reflect: true })\n separator: boolean;\n\n /** A static reference value for the item. This value is returned in the click event detail. */\n @Prop({ reflect: true })\n value: string;\n\n // #endregion\n // #region Events\n\n /**\n * Is emitted when the item is clicked.\n * @deprecated\n */\n @Event()\n click: EventEmitter<{ type: 'select' | 'remove'; value: string }>;\n\n /**\n * Is emitted when the item is clicked.\n */\n @Event()\n tctClick: EventEmitter<{ type: 'select' | 'remove'; value: string }>;\n\n // #endregion\n // #region Component Lifecycle Events\n\n componentWillLoad() {\n handleAriaLabel(this);\n this.q2LocValue = this.handleQ2LocValue();\n }\n\n componentDidLoad() {\n if (this.separator) return;\n overrideFocus(this.hostElement);\n }\n\n // #endregion\n // #region Listeners\n\n @Listen('focus')\n onHostElementFocus(event: FocusEvent) {\n if (event.target === this.hostElement) {\n this.focusItem();\n }\n }\n\n // #endregion\n // #region Watchers\n\n @Watch('ariaLabel')\n ariaLabelObserver() {\n handleAriaLabel(this);\n }\n\n // #endregion\n // #region Local Methods\n\n get innerLabel(): string {\n return this.label || this.hostElement.textContent.trim() || this.q2LocValue;\n }\n\n get removeLabel(): string {\n return loc('tecton.element.dropdownItem.remove', [this.innerLabel || '']);\n }\n\n focusItem() {\n this.dropdownItemBtn.focus();\n }\n\n focusRemoveBtn() {\n this.removeBtn && this.removeBtn.focus();\n }\n\n handleQ2LocValue = (): string => {\n const locElement = this.hostElement.querySelector('q2-loc');\n if (!locElement) return '';\n\n return locElement.value\n ? loc(locElement.value, locElement.substitutions)\n : loc(locElement.innerText, locElement.substitutions);\n };\n\n onItemClick = (event: MouseEvent) => {\n event.stopImmediatePropagation();\n\n mirrorEmit(this, ['click', 'tctClick'], {\n type: 'select',\n value: this.value || '',\n });\n };\n\n onItemFocus = (event: FocusEvent) => {\n event.stopPropagation();\n };\n\n onItemKeydown = (event: KeyboardEvent) => {\n if (event.key === 'ArrowRight') this.focusRemoveBtn();\n };\n\n onRemoveBtnClick = (event: MouseEvent) => {\n event.stopImmediatePropagation();\n\n mirrorEmit(this, ['click', 'tctClick'], {\n type: 'remove',\n value: this.value || '',\n });\n };\n\n onRemoveBtnFocus = (event: FocusEvent) => {\n event.stopPropagation();\n };\n\n onRemoveBtnKeydown = (event: KeyboardEvent) => {\n if (event.key === 'ArrowLeft') this.focusItem();\n };\n\n // #endregion\n // #region Render Methods\n\n renderItemDOM(): JSX.IntrinsicElements {\n return (\n <div\n class=\"dropdown-item-wrapper\"\n role=\"presentation\"\n >\n <button\n ref={el => (this.dropdownItemBtn = el)}\n aria-label={loc(this.innerLabel)}\n class=\"dropdown-item-button dropdown-item\"\n tabindex=\"-1\"\n disabled={this.disabled}\n role=\"menuitem\"\n onClick={this.onItemClick}\n onKeyDown={this.onItemKeydown}\n onFocus={this.onItemFocus}\n test-id=\"dropdownItem\"\n >\n {/* .icon is a placeholder to make the dd-item match the structure of option */}\n <div class=\"icon\"></div>\n <slot>{loc(this.innerLabel)}</slot>\n </button>\n {this.removable && (\n <button\n ref={el => (this.removeBtn = el)}\n class=\"dropdown-item-button remove-dropdown-item\"\n tabindex=\"-1\"\n aria-label={this.removeLabel}\n disabled={this.disabled}\n onClick={this.onRemoveBtnClick}\n onKeyDown={this.onRemoveBtnKeydown}\n onFocus={this.onRemoveBtnFocus}\n test-id=\"removeDropdownItem\"\n >\n <q2-icon type=\"close\" />\n </button>\n )}\n </div>\n );\n }\n\n renderSeparatorDOM(): JSX.IntrinsicElements {\n return (\n <div\n class=\"separator\"\n test-id=\"dropdownItemSeparator\"\n role=\"separator\"\n ></div>\n );\n }\n\n render() {\n if (this.separator) {\n return this.renderSeparatorDOM();\n }\n\n return this.renderItemDOM();\n }\n\n // #endregion\n}\n"]}
@@ -6,6 +6,8 @@ import { hasSlotContent, loc } from "../../utils/index";
6
6
  */
7
7
  export class Q2FilePicker {
8
8
  constructor() {
9
+ // #region Own Properties
10
+ this._value = { invalidFiles: [], validFiles: [] };
9
11
  this.queuedFiles = [];
10
12
  // #endregion
11
13
  // #region State Properties
@@ -47,21 +49,6 @@ export class Q2FilePicker {
47
49
  * @localizable
48
50
  */
49
51
  this.status = [];
50
- /**
51
- * Returns an object representing the selected files with two properties:
52
- * - `invalidFiles`: An array of `InvalidFileStatus` objects representing
53
- * files that failed validation.
54
- * - `validFiles`: An array of `File` objects representing files that passed
55
- * validation.
56
- *
57
- * Each `InvalidFileStatus` object includes the following properties:
58
- * - `file`: The `File` object.
59
- * - `status`: The validation status, which can be `"invalid-type"` (invalid file
60
- * type), `"over-size-limit"` (file exceeds the size limit), or
61
- * `"over-max-files-limit"` (total exceeds the max files limit).
62
- * @readonly
63
- */
64
- this.value = { invalidFiles: [], validFiles: [] };
65
52
  /**
66
53
  * Determines if the file picker is a browse button or a drop zone with a
67
54
  * browse link.
@@ -79,7 +66,7 @@ export class Q2FilePicker {
79
66
  const droppedFiles = Array.from(e.dataTransfer.files);
80
67
  const filesObject = this.buildFilesObject(droppedFiles);
81
68
  this.emitChange(filesObject);
82
- this.value = filesObject;
69
+ this._value = filesObject;
83
70
  };
84
71
  this.grabSelectedFiles = (e) => {
85
72
  const selectedFiles = Array.from(e.target.files);
@@ -87,7 +74,7 @@ export class Q2FilePicker {
87
74
  // Reset the input value to allow re-selection of the same file
88
75
  this.browseButtonInput.value = '';
89
76
  this.emitChange(filesObject);
90
- this.value = filesObject;
77
+ this._value = filesObject;
91
78
  };
92
79
  this.highlightDropZone = (e) => {
93
80
  if (this.disabled)
@@ -105,6 +92,26 @@ export class Q2FilePicker {
105
92
  file.status === 'over-max-files-limit' ? (h("q2-icon", { class: "icon-error", type: "error" })) : file.status === 'in-progress' ? (h("q2-loading", { class: "file-item-loading", "hide-from-screen-readers": true })) : (h("q2-icon", { class: "icon-success", type: "success" }))), h("div", { slot: "header" }, file.file.name), h("div", { class: "file-item-info", slot: "body" }, this.getFileItemStatusMessage(file)), h("div", { slot: "action" }, h("q2-btn", { class: "dismiss-button", intent: "neutral-text", "hide-label": "true", label: this.getFileItemButtonLabel(file), onClick: this.getClickHandlerToRemoveFileItem(file.file.name), disabled: disabled }, h("q2-icon", { type: "close" }))))))))));
106
93
  };
107
94
  }
95
+ /**
96
+ * Returns an object representing the selected files with two properties:
97
+ * - `invalidFiles`: An array of `InvalidFileStatus` objects representing
98
+ * files that failed validation.
99
+ * - `validFiles`: An array of `File` objects representing files that passed
100
+ * validation.
101
+ *
102
+ * Each `InvalidFileStatus` object includes the following properties:
103
+ * - `file`: The `File` object.
104
+ * - `status`: The validation status, which can be `"invalid-type"` (invalid file
105
+ * type), `"over-size-limit"` (file exceeds the size limit), or
106
+ * `"over-max-files-limit"` (total exceeds the max files limit).
107
+ * @readonly
108
+ */
109
+ get value() {
110
+ return this._value;
111
+ }
112
+ set value(_) {
113
+ console.error('Setting the value of this component directly is not allowed.');
114
+ }
108
115
  // #endregion
109
116
  // #region Watchers
110
117
  updateFileList(newValue) {
@@ -457,7 +464,7 @@ export class Q2FilePicker {
457
464
  "references": {
458
465
  "ValidFileStatus": {
459
466
  "location": "local",
460
- "path": "/builds/q2e/development/tecton/tecton/packages/q2-tecton-elements/src/components/q2-file-picker/q2-file-picker.tsx",
467
+ "path": "/Users/kvanhouten/Documents/Work/tecton_extra/packages/q2-tecton-elements/src/components/q2-file-picker/q2-file-picker.tsx",
461
468
  "id": "src/components/q2-file-picker/q2-file-picker.tsx::ValidFileStatus"
462
469
  }
463
470
  }
@@ -478,14 +485,14 @@ export class Q2FilePicker {
478
485
  "value": {
479
486
  "type": "unknown",
480
487
  "attribute": "value",
481
- "mutable": true,
488
+ "mutable": false,
482
489
  "complexType": {
483
490
  "original": "FilesObject",
484
491
  "resolved": "{ invalidFiles: InvalidFileStatus[]; validFiles: File[]; }",
485
492
  "references": {
486
493
  "FilesObject": {
487
494
  "location": "local",
488
- "path": "/builds/q2e/development/tecton/tecton/packages/q2-tecton-elements/src/components/q2-file-picker/q2-file-picker.tsx",
495
+ "path": "/Users/kvanhouten/Documents/Work/tecton_extra/packages/q2-tecton-elements/src/components/q2-file-picker/q2-file-picker.tsx",
489
496
  "id": "src/components/q2-file-picker/q2-file-picker.tsx::FilesObject"
490
497
  }
491
498
  }
@@ -499,8 +506,8 @@ export class Q2FilePicker {
499
506
  }],
500
507
  "text": "Returns an object representing the selected files with two properties:\n- `invalidFiles`: An array of `InvalidFileStatus` objects representing\n files that failed validation.\n- `validFiles`: An array of `File` objects representing files that passed\n validation.\n\nEach `InvalidFileStatus` object includes the following properties:\n- `file`: The `File` object.\n- `status`: The validation status, which can be `\"invalid-type\"` (invalid file\n type), `\"over-size-limit\"` (file exceeds the size limit), or\n `\"over-max-files-limit\"` (total exceeds the max files limit)."
501
508
  },
502
- "getter": false,
503
- "setter": false,
509
+ "getter": true,
510
+ "setter": true,
504
511
  "defaultValue": "{ invalidFiles: [], validFiles: [] }"
505
512
  },
506
513
  "variant": {
@@ -550,7 +557,7 @@ export class Q2FilePicker {
550
557
  "references": {
551
558
  "FilesObject": {
552
559
  "location": "local",
553
- "path": "/builds/q2e/development/tecton/tecton/packages/q2-tecton-elements/src/components/q2-file-picker/q2-file-picker.tsx",
560
+ "path": "/Users/kvanhouten/Documents/Work/tecton_extra/packages/q2-tecton-elements/src/components/q2-file-picker/q2-file-picker.tsx",
554
561
  "id": "src/components/q2-file-picker/q2-file-picker.tsx::FilesObject"
555
562
  }
556
563
  }
@@ -1 +1 @@
1
- {"version":3,"file":"q2-file-picker.js","sourceRoot":"","sources":["../../../../src/components/q2-file-picker/q2-file-picker.tsx"],"names":[],"mappings":"AAAA,OAAO,EACH,SAAS,EAET,OAAO,EACP,KAAK,EAEL,QAAQ,EACR,CAAC,EACD,IAAI,EACJ,KAAK,EACL,KAAK,GACR,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,cAAc,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAwBhD;;;GAGG;AAMH,MAAM,OAAO,YAAY;IALzB;QAWI,gBAAW,GAAW,EAAE,CAAC;QAQzB,aAAa;QACb,2BAA2B;QAG3B,sBAAiB,GAAY,KAAK,CAA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;QACX,CAAC;IACL,CAAC;IA6BD,iBAAiB;QACb,IAAI,CAAC,iBAAiB,CAAC,aAAa,CAAC,IAAI,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC;IAClE,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6JJ","sourcesContent":["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 DisplayedFile = {\n file: File;\n message?: string;\n status: ValidFileStatusType | InvalidFileStatusType;\n toBeRemoved?: boolean;\n};\ntype ValidFileStatusType = 'in-progress' | 'failed' | 'uploaded';\ntype InvalidFileStatusType = 'invalid-type' | 'over-size-limit' | 'over-max-files-limit';\nexport type ValidFileStatus = {\n name: string;\n status: ValidFileStatusType;\n message?: string;\n};\nexport type InvalidFileStatus = {\n file: File;\n status: InvalidFileStatusType;\n};\nexport type FilesObject = {\n invalidFiles: InvalidFileStatus[];\n validFiles: File[];\n};\n\n/**\n * @slot label - An optional slot to display a custom label.\n * @slot description - An optional slot to display a custom description.\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: DisplayedFile[] = [];\n\n @State()\n isDropZoneHighlighted: boolean = false;\n\n @State()\n refreshCounter = 0;\n\n // #endregion\n // #region Public Property API\n\n /**\n * The size of the browse button.\n */\n @Prop({ reflect: true })\n buttonSize: 'none' | 'small' | 'medium' | 'large' = 'medium';\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 * Disables the file picker, preventing user interaction.\n */\n @Prop({ reflect: true })\n disabled: boolean;\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 `ValidFileStatus` objects representing the upload status of\n * files. Each `ValidFileStatus` object contains the following properties:\n * - `name`: The file name.\n * - `status`: The upload status, either `\"failed\"` or `\"uploaded\"`.\n * - `message`: (Optional) A custom status message, used only when `status`\n * is `\"failed\"`. This allows developers to provide more detail about\n * upload failures while ensuring all other file status messages remain\n * consistent with approved design/UX standards. Custom failure messages\n * are limited to a single line.\n * @localizable\n */\n @Prop({ reflect: true })\n status: ValidFileStatus[] = [];\n\n /**\n * Returns an object representing the selected files with two properties:\n * - `invalidFiles`: An array of `InvalidFileStatus` objects representing\n * files that failed validation.\n * - `validFiles`: An array of `File` objects representing files that passed\n * validation.\n *\n * Each `InvalidFileStatus` object includes the following properties:\n * - `file`: The `File` object.\n * - `status`: The validation status, which can be `\"invalid-type\"` (invalid file\n * type), `\"over-size-limit\"` (file exceeds the size limit), or\n * `\"over-max-files-limit\"` (total exceeds the max files limit).\n * @readonly\n */\n @Prop({ mutable: true })\n value: FilesObject = { invalidFiles: [], validFiles: [] };\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 /**\n * Custom event dispatched when the user selects files. The event detail\n * contains an object representing the selected files with two\n * properties:\n * - `invalidFiles`: An array of `InvalidFileStatus` objects representing\n * files that failed validation.\n * - `validFiles`: An array of `File` objects representing files that passed\n * validation.\n *\n * Each `InvalidFileStatus` object includes the following properties:\n * - `file`: The `File` object.\n * - `status`: The validation status, which can be `\"invalid-type\"` (invalid file\n * type), `\"over-size-limit\"` (file exceeds the size limit), or\n * `\"over-max-files-limit\"` (total exceeds the max files limit).\n */\n @Event()\n tctChange: EventEmitter<FilesObject>;\n\n // #endregion\n // #region Watchers\n\n @Watch('status')\n updateFileList(newValue: ValidFileStatus[]) {\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 if (statusItem.status === 'failed' && statusItem.message) {\n this.displayedFiles[matchingDisplayedFileIndex].message = statusItem.message;\n }\n this.disableLoaderIfAllFilesUploaded();\n }\n }\n });\n }\n\n // #endregion\n // #region Local Methods\n\n get actualButtonSize() {\n return this.buttonSize === 'none' ? undefined : this.buttonSize;\n }\n\n get dropZoneClasses() {\n const classes = ['drop-zone'];\n if (this.isDropZoneHighlighted) {\n classes.push('drop-zone-highlighted');\n }\n\n if (this.disabled) {\n classes.push('drop-zone-disabled');\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 getFileItemButtonLabel(displayedFile: DisplayedFile) {\n const statusMessage = `Status, ${displayedFile.status === 'uploaded' ? 'uploaded. ' : ''}${this.getFileItemStatusMessage(displayedFile)}`;\n return `Dismiss file item for ${displayedFile.file.name}. ${statusMessage}.`;\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(displayedFile: DisplayedFile) {\n switch (displayedFile.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 if (displayedFile.message) return loc(displayedFile.message);\n return loc('tecton.element.filePicker.uploadFailed');\n case 'uploaded':\n default:\n return loc('tecton.element.filePicker.fileSize', [\n (displayedFile.file.size / (1000 * 1000)).toFixed(2),\n ]);\n }\n }\n\n grabDroppedFiles = (e: DragEvent) => {\n if (this.disabled) return;\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 // Reset the input value to allow re-selection of the same file\n (this.browseButtonInput as HTMLInputElement).value = '';\n\n this.emitChange(filesObject);\n this.value = filesObject;\n };\n\n highlightDropZone = (e: DragEvent) => {\n if (this.disabled) return;\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 const { disabled } = this;\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 disabled={disabled}\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={disabled || this.areFilesUploading}\n intent=\"workflow-primary\"\n loading={this.areFilesUploading}\n onClick={() => this.launchFileBrowser()}\n size={this.actualButtonSize}\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 disabled={disabled}\n multiple\n tabIndex={-1}\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\n class=\"file-item-loading\"\n hide-from-screen-readers\n ></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\n class=\"file-item-info\"\n slot=\"body\"\n >\n {this.getFileItemStatusMessage(file)}\n </div>\n <div slot=\"action\">\n <q2-btn\n class=\"dismiss-button\"\n intent=\"neutral-text\"\n hide-label=\"true\"\n label={this.getFileItemButtonLabel(file)}\n onClick={this.getClickHandlerToRemoveFileItem(file.file.name)}\n disabled={disabled}\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"]}
1
+ {"version":3,"file":"q2-file-picker.js","sourceRoot":"","sources":["../../../../src/components/q2-file-picker/q2-file-picker.tsx"],"names":[],"mappings":"AAAA,OAAO,EACH,SAAS,EAET,OAAO,EACP,KAAK,EAEL,QAAQ,EACR,CAAC,EACD,IAAI,EACJ,KAAK,EACL,KAAK,GACR,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,cAAc,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAwBhD;;;GAGG;AAMH,MAAM,OAAO,YAAY;IALzB;QAMI,yBAAyB;QAEjB,WAAM,GAAgB,EAAE,YAAY,EAAE,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE,CAAC;QAInE,gBAAW,GAAW,EAAE,CAAC;QAQzB,aAAa;QACb,2BAA2B;QAG3B,sBAAiB,GAAY,KAAK,CAAC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,GAAG,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;iBACvD,CAAC,CAAC;QACX,CAAC;IACL,CAAC;IA6BD,iBAAiB;QACb,IAAI,CAAC,iBAAiB,CAAC,aAAa,CAAC,IAAI,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC;IAClE,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6JJ","sourcesContent":["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 DisplayedFile = {\n file: File;\n message?: string;\n status: ValidFileStatusType | InvalidFileStatusType;\n toBeRemoved?: boolean;\n};\ntype ValidFileStatusType = 'in-progress' | 'failed' | 'uploaded';\ntype InvalidFileStatusType = 'invalid-type' | 'over-size-limit' | 'over-max-files-limit';\nexport type ValidFileStatus = {\n name: string;\n status: ValidFileStatusType;\n message?: string;\n};\nexport type InvalidFileStatus = {\n file: File;\n status: InvalidFileStatusType;\n};\nexport type FilesObject = {\n invalidFiles: InvalidFileStatus[];\n validFiles: File[];\n};\n\n/**\n * @slot label - An optional slot to display a custom label.\n * @slot description - An optional slot to display a custom description.\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 private _value: FilesObject = { invalidFiles: [], validFiles: [] };\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: DisplayedFile[] = [];\n\n @State()\n isDropZoneHighlighted: boolean = false;\n\n @State()\n refreshCounter = 0;\n\n // #endregion\n // #region Public Property API\n\n /**\n * The size of the browse button.\n */\n @Prop({ reflect: true })\n buttonSize: 'none' | 'small' | 'medium' | 'large' = 'medium';\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 * Disables the file picker, preventing user interaction.\n */\n @Prop({ reflect: true })\n disabled: boolean;\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 `ValidFileStatus` objects representing the upload status of\n * files. Each `ValidFileStatus` object contains the following properties:\n * - `name`: The file name.\n * - `status`: The upload status, either `\"failed\"` or `\"uploaded\"`.\n * - `message`: (Optional) A custom status message, used only when `status`\n * is `\"failed\"`. This allows developers to provide more detail about\n * upload failures while ensuring all other file status messages remain\n * consistent with approved design/UX standards. Custom failure messages\n * are limited to a single line.\n * @localizable\n */\n @Prop({ reflect: true })\n status: ValidFileStatus[] = [];\n\n /**\n * Returns an object representing the selected files with two properties:\n * - `invalidFiles`: An array of `InvalidFileStatus` objects representing\n * files that failed validation.\n * - `validFiles`: An array of `File` objects representing files that passed\n * validation.\n *\n * Each `InvalidFileStatus` object includes the following properties:\n * - `file`: The `File` object.\n * - `status`: The validation status, which can be `\"invalid-type\"` (invalid file\n * type), `\"over-size-limit\"` (file exceeds the size limit), or\n * `\"over-max-files-limit\"` (total exceeds the max files limit).\n * @readonly\n */\n @Prop()\n get value() {\n return this._value;\n }\n\n set value(_) {\n console.error('Setting the value of this component directly is not allowed.');\n }\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 /**\n * Custom event dispatched when the user selects files. The event detail\n * contains an object representing the selected files with two\n * properties:\n * - `invalidFiles`: An array of `InvalidFileStatus` objects representing\n * files that failed validation.\n * - `validFiles`: An array of `File` objects representing files that passed\n * validation.\n *\n * Each `InvalidFileStatus` object includes the following properties:\n * - `file`: The `File` object.\n * - `status`: The validation status, which can be `\"invalid-type\"` (invalid file\n * type), `\"over-size-limit\"` (file exceeds the size limit), or\n * `\"over-max-files-limit\"` (total exceeds the max files limit).\n */\n @Event()\n tctChange: EventEmitter<FilesObject>;\n\n // #endregion\n // #region Watchers\n\n @Watch('status')\n updateFileList(newValue: ValidFileStatus[]) {\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 if (statusItem.status === 'failed' && statusItem.message) {\n this.displayedFiles[matchingDisplayedFileIndex].message = statusItem.message;\n }\n this.disableLoaderIfAllFilesUploaded();\n }\n }\n });\n }\n\n // #endregion\n // #region Local Methods\n\n get actualButtonSize() {\n return this.buttonSize === 'none' ? undefined : this.buttonSize;\n }\n\n get dropZoneClasses() {\n const classes = ['drop-zone'];\n if (this.isDropZoneHighlighted) {\n classes.push('drop-zone-highlighted');\n }\n\n if (this.disabled) {\n classes.push('drop-zone-disabled');\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 getFileItemButtonLabel(displayedFile: DisplayedFile) {\n const statusMessage = `Status, ${displayedFile.status === 'uploaded' ? 'uploaded. ' : ''}${this.getFileItemStatusMessage(displayedFile)}`;\n return `Dismiss file item for ${displayedFile.file.name}. ${statusMessage}.`;\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(displayedFile: DisplayedFile) {\n switch (displayedFile.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 if (displayedFile.message) return loc(displayedFile.message);\n return loc('tecton.element.filePicker.uploadFailed');\n case 'uploaded':\n default:\n return loc('tecton.element.filePicker.fileSize', [\n (displayedFile.file.size / (1000 * 1000)).toFixed(2),\n ]);\n }\n }\n\n grabDroppedFiles = (e: DragEvent) => {\n if (this.disabled) return;\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 // Reset the input value to allow re-selection of the same file\n (this.browseButtonInput as HTMLInputElement).value = '';\n\n this.emitChange(filesObject);\n this._value = filesObject;\n };\n\n highlightDropZone = (e: DragEvent) => {\n if (this.disabled) return;\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 const { disabled } = this;\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 disabled={disabled}\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={disabled || this.areFilesUploading}\n intent=\"workflow-primary\"\n loading={this.areFilesUploading}\n onClick={() => this.launchFileBrowser()}\n size={this.actualButtonSize}\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 disabled={disabled}\n multiple\n tabIndex={-1}\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\n class=\"file-item-loading\"\n hide-from-screen-readers\n ></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\n class=\"file-item-info\"\n slot=\"body\"\n >\n {this.getFileItemStatusMessage(file)}\n </div>\n <div slot=\"action\">\n <q2-btn\n class=\"dismiss-button\"\n intent=\"neutral-text\"\n hide-label=\"true\"\n label={this.getFileItemButtonLabel(file)}\n onClick={this.getClickHandlerToRemoveFileItem(file.file.name)}\n disabled={disabled}\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"]}
@@ -3,6 +3,12 @@ export class Q2FormattedText {
3
3
  constructor() {
4
4
  // #endregion
5
5
  // #region Public Property API
6
+ /**
7
+ * The format style for the number.
8
+ * - `decimal`: Standard number formatting, locale-aware (default).
9
+ * - `percent`: Percentage formatting, locale-aware.
10
+ */
11
+ this.format = 'decimal';
6
12
  /** Formats to the language provided. Accepts multiple locales in an array as sequential fallbacks. */
7
13
  this.locale = document.documentElement.lang || 'en-US';
8
14
  /** The maximum number of fraction digits to use. */
@@ -21,12 +27,6 @@ export class Q2FormattedText {
21
27
  * - `never`: Never display the sign.
22
28
  */
23
29
  this.signDisplay = 'auto';
24
- /**
25
- * The format style for the number.
26
- * - `decimal`: Standard number formatting, locale-aware (default).
27
- * - `percent`: Percentage formatting, locale-aware.
28
- */
29
- this.format = 'decimal';
30
30
  }
31
31
  // #endregion
32
32
  // #region Component Lifecycle Events
@@ -66,7 +66,7 @@ export class Q2FormattedText {
66
66
  // #region Render Methods
67
67
  render() {
68
68
  const { formattedTextClasses } = this;
69
- return (h("div", { key: '1274a8a0dd15b93bb1748ea17b12a3dbe148a0ca', class: formattedTextClasses, "aria-label": this.formattedValue }, h("span", { key: '6fe7e20ecf26a5b1e24966360646aeb6f6526f1e' }, this.formattedValue)));
69
+ return (h("div", { key: 'b63b5b968494e1a5eb11cb9c3dbfb7827bceef63', class: formattedTextClasses, "aria-label": this.formattedValue }, h("span", { key: '38c1bc1955c771046d71504a82a6a4e6ab532274' }, this.formattedValue)));
70
70
  }
71
71
  static get is() { return "q2-formatted-text"; }
72
72
  static get encapsulation() { return "shadow"; }
@@ -82,6 +82,26 @@ export class Q2FormattedText {
82
82
  }
83
83
  static get properties() {
84
84
  return {
85
+ "format": {
86
+ "type": "string",
87
+ "attribute": "format",
88
+ "mutable": false,
89
+ "complexType": {
90
+ "original": "'decimal' | 'percent'",
91
+ "resolved": "\"decimal\" | \"percent\"",
92
+ "references": {}
93
+ },
94
+ "required": false,
95
+ "optional": false,
96
+ "docs": {
97
+ "tags": [],
98
+ "text": "The format style for the number.\n- `decimal`: Standard number formatting, locale-aware (default).\n- `percent`: Percentage formatting, locale-aware."
99
+ },
100
+ "getter": false,
101
+ "setter": false,
102
+ "reflect": true,
103
+ "defaultValue": "'decimal'"
104
+ },
85
105
  "locale": {
86
106
  "type": "string",
87
107
  "attribute": "locale",
@@ -241,26 +261,6 @@ export class Q2FormattedText {
241
261
  "getter": false,
242
262
  "setter": false,
243
263
  "reflect": true
244
- },
245
- "format": {
246
- "type": "string",
247
- "attribute": "format",
248
- "mutable": false,
249
- "complexType": {
250
- "original": "'decimal' | 'percent'",
251
- "resolved": "\"decimal\" | \"percent\"",
252
- "references": {}
253
- },
254
- "required": false,
255
- "optional": false,
256
- "docs": {
257
- "tags": [],
258
- "text": "The format style for the number.\n- `decimal`: Standard number formatting, locale-aware (default).\n- `percent`: Percentage formatting, locale-aware."
259
- },
260
- "getter": false,
261
- "setter": false,
262
- "reflect": true,
263
- "defaultValue": "'decimal'"
264
264
  }
265
265
  };
266
266
  }
@@ -1 +1 @@
1
- {"version":3,"file":"q2-formatted-text.js","sourceRoot":"","sources":["../../../../src/components/q2-formatted-text/q2-formatted-text.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,EAAsB,MAAM,eAAe,CAAC;AAE9E,MAAM,OAAO,eAAe;IAD5B;QAOI,aAAa;QACb,8BAA8B;QAE9B,sGAAsG;QAEtG,WAAM,GAAsB,QAAQ,CAAC,eAAe,CAAC,IAAI,IAAI,OAAO,CAAC;QAErE,qDAAqD;QAErD,0BAAqB,GAAW,CAAC,CAAC;QAElC,qDAAqD;QAErD,0BAAqB,GAAW,CAAC,CAAC;QAElC,oDAAoD;QAEpD,yBAAoB,GAAW,CAAC,CAAC;QAEjC;;;;;;;;WAQG;QAEH,gBAAW,GAA+C,MAAM,CAAC;QAcjE;;;;WAIG;QAEH,WAAM,GAA0B,SAAS,CAAC;KA+D7C;IA7DG,aAAa;IACb,qCAAqC;IAErC,iBAAiB;QACb,IAAI,CAAC,WAAW,EAAE,CAAC;IACvB,CAAC;IAED,aAAa;IACb,mBAAmB;IAQnB,YAAY;QACR,IAAI,CAAC,WAAW,EAAE,CAAC;IACvB,CAAC;IAED,aAAa;IACb,wBAAwB;IAExB,IAAI,oBAAoB;QACpB,MAAM,OAAO,GAAG,CAAC,gBAAgB,CAAC,CAAC;QACnC,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC;QACx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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGJ","sourcesContent":["import { IDict } from '@/util';\nimport { Component, Prop, Watch, h, ComponentInterface } from '@stencil/core';\n@Component({ tag: 'q2-formatted-text', shadow: true, styleUrl: 'q2-formatted-text.scss' })\nexport class Q2FormattedText implements ComponentInterface {\n // #region Own Properties\n\n /** @private The formatted text to display */\n formattedValue: string;\n\n // #endregion\n // #region Public Property API\n\n /** Formats to the language provided. Accepts multiple locales in an array as sequential fallbacks. */\n @Prop({ reflect: true })\n locale: string | string[] = document.documentElement.lang || 'en-US';\n\n /** The maximum number of fraction digits to use. */\n @Prop({ reflect: false })\n maximumFractionDigits: number = 2;\n\n /** The minimum number of fraction digits to use. */\n @Prop({ reflect: false })\n minimumFractionDigits: number = 2;\n\n /** The minimum number of integer digits to use. */\n @Prop({ reflect: false })\n minimumIntegerDigits: number = 1;\n\n /**\n * Determine how the positive or negative sign should display.\n *\n * Behavior:\n * - `always`: Always display the sign.\n * - `auto`: Sign displays for negative numbers only, including negative zero.\n * - `exceptZero`: Sign displays for positive and negative numbers, but not zero.\n * - `never`: Never display the sign.\n */\n @Prop({ reflect: true })\n signDisplay: 'never' | 'auto' | 'always' | 'exceptZero' = 'auto';\n\n /** Applies styling based on the size provided. If no size is provided, it will display as inline text. */\n @Prop({ reflect: true })\n size: 'small' | 'medium' | 'large' | undefined;\n\n /** @private Inherited from q2-detail when slotted to match styling of q2-detail and q2-formatted-text texts. */\n @Prop({ reflect: true })\n slotSize: string;\n\n /** The value you want formatted. */\n @Prop({ reflect: true })\n value: number;\n\n /**\n * The format style for the number.\n * - `decimal`: Standard number formatting, locale-aware (default).\n * - `percent`: Percentage formatting, locale-aware.\n */\n @Prop({ reflect: true })\n format: 'decimal' | 'percent' = 'decimal';\n\n // #endregion\n // #region Component Lifecycle Events\n\n componentWillLoad(): void | Promise<void> {\n this.formatValue();\n }\n\n // #endregion\n // #region Watchers\n\n @Watch('value')\n @Watch('locale')\n @Watch('size')\n @Watch('slotSize')\n @Watch('signDisplay')\n @Watch('format')\n propsUpdated() {\n this.formatValue();\n }\n\n // #endregion\n // #region Local Methods\n\n get formattedTextClasses(): string {\n const classes = ['formatted-text'];\n const sizeClass = this.size ? this.size : this.slotSize;\n if (!!sizeClass) classes.push(`formatted-text-${sizeClass}`);\n return classes.join(' ');\n }\n\n formatValue() {\n const options: IDict<any> = {\n style: this.format,\n signDisplay: this.signDisplay,\n };\n if (!isNaN(this.minimumIntegerDigits)) options.minimumIntegerDigits = this.minimumIntegerDigits;\n if (!isNaN(this.minimumFractionDigits)) options.minimumFractionDigits = this.minimumFractionDigits;\n if (!isNaN(this.maximumFractionDigits)) options.maximumFractionDigits = this.maximumFractionDigits;\n\n // For percent format, divide by 100 so users can pass intuitive values (e.g., 25 → 25%, 0.5 → 0.5%, 100 → 100%)\n const valueToFormat = this.format === 'percent' ? this.value / 100 : this.value;\n this.formattedValue = new Intl.NumberFormat(this.locale, options).format(valueToFormat).trim();\n }\n\n // #endregion\n // #region Render Methods\n\n render() {\n const { formattedTextClasses } = this;\n\n return (\n <div\n class={formattedTextClasses}\n aria-label={this.formattedValue}\n >\n <span>{this.formattedValue}</span>\n </div>\n );\n }\n\n // #endregion\n}\n"]}
1
+ {"version":3,"file":"q2-formatted-text.js","sourceRoot":"","sources":["../../../../src/components/q2-formatted-text/q2-formatted-text.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,EAAsB,MAAM,eAAe,CAAC;AAE9E,MAAM,OAAO,eAAe;IAD5B;QAOI,aAAa;QACb,8BAA8B;QAE9B;;;;WAIG;QAEH,WAAM,GAA0B,SAAS,CAAC;QAE1C,sGAAsG;QAEtG,WAAM,GAAsB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AqB,GAAG,IAAI,CAAC,qBAAqB,CAAC;QAEnG,gHAAgH;QAChH,MAAM,aAAa,GAAG,IAAI,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC;QAChF,IAAI,CAAC,cAAc,GAAG,IAAI,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,IAAI,EAAE,CAAC;IACnG,CAAC;IAED,aAAa;IACb,yBAAyB;IAEzB,MAAM;QACF,MAAM,EAAE,oBAAoB,EAAE,GAAG,IAAI,CAAC;QAEtC,OAAO,CACH,4DACI,KAAK,EAAE,oBAAoB,gBACf,IAAI,CAAC,cAAc;YAE/B,+DAAO,IAAI,CAAC,cAAc,CAAQ,CAChC,CACT,CAAC;IACN,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGJ","sourcesContent":["import { Component, Prop, Watch, h, ComponentInterface } from '@stencil/core';\n@Component({ tag: 'q2-formatted-text', shadow: true, styleUrl: 'q2-formatted-text.scss' })\nexport class Q2FormattedText implements ComponentInterface {\n // #region Own Properties\n\n /** @private The formatted text to display */\n formattedValue: string;\n\n // #endregion\n // #region Public Property API\n\n /**\n * The format style for the number.\n * - `decimal`: Standard number formatting, locale-aware (default).\n * - `percent`: Percentage formatting, locale-aware.\n */\n @Prop({ reflect: true })\n format: 'decimal' | 'percent' = 'decimal';\n\n /** Formats to the language provided. Accepts multiple locales in an array as sequential fallbacks. */\n @Prop({ reflect: true })\n locale: string | string[] = document.documentElement.lang || 'en-US';\n\n /** The maximum number of fraction digits to use. */\n @Prop({ reflect: false })\n maximumFractionDigits: number = 2;\n\n /** The minimum number of fraction digits to use. */\n @Prop({ reflect: false })\n minimumFractionDigits: number = 2;\n\n /** The minimum number of integer digits to use. */\n @Prop({ reflect: false })\n minimumIntegerDigits: number = 1;\n\n /**\n * Determine how the positive or negative sign should display.\n *\n * Behavior:\n * - `always`: Always display the sign.\n * - `auto`: Sign displays for negative numbers only, including negative zero.\n * - `exceptZero`: Sign displays for positive and negative numbers, but not zero.\n * - `never`: Never display the sign.\n */\n @Prop({ reflect: true })\n signDisplay: 'never' | 'auto' | 'always' | 'exceptZero' = 'auto';\n\n /** Applies styling based on the size provided. If no size is provided, it will display as inline text. */\n @Prop({ reflect: true })\n size: 'small' | 'medium' | 'large' | undefined;\n\n /** @private Inherited from q2-detail when slotted to match styling of q2-detail and q2-formatted-text texts. */\n @Prop({ reflect: true })\n slotSize: string;\n\n /** The value you want formatted. */\n @Prop({ reflect: true })\n value: number;\n\n // #endregion\n // #region Component Lifecycle Events\n\n componentWillLoad(): void | Promise<void> {\n this.formatValue();\n }\n\n // #endregion\n // #region Watchers\n\n @Watch('value')\n @Watch('locale')\n @Watch('size')\n @Watch('slotSize')\n @Watch('signDisplay')\n @Watch('format')\n propsUpdated() {\n this.formatValue();\n }\n\n // #endregion\n // #region Local Methods\n\n get formattedTextClasses(): string {\n const classes = ['formatted-text'];\n const sizeClass = this.size ? this.size : this.slotSize;\n if (!!sizeClass) classes.push(`formatted-text-${sizeClass}`);\n return classes.join(' ');\n }\n\n formatValue() {\n const options: Record<string, any> = {\n style: this.format,\n signDisplay: this.signDisplay,\n };\n if (!isNaN(this.minimumIntegerDigits)) options.minimumIntegerDigits = this.minimumIntegerDigits;\n if (!isNaN(this.minimumFractionDigits)) options.minimumFractionDigits = this.minimumFractionDigits;\n if (!isNaN(this.maximumFractionDigits)) options.maximumFractionDigits = this.maximumFractionDigits;\n\n // For percent format, divide by 100 so users can pass intuitive values (e.g., 25 → 25%, 0.5 → 0.5%, 100 → 100%)\n const valueToFormat = this.format === 'percent' ? this.value / 100 : this.value;\n this.formattedValue = new Intl.NumberFormat(this.locale, options).format(valueToFormat).trim();\n }\n\n // #endregion\n // #region Render Methods\n\n render() {\n const { formattedTextClasses } = this;\n\n return (\n <div\n class={formattedTextClasses}\n aria-label={this.formattedValue}\n >\n <span>{this.formattedValue}</span>\n </div>\n );\n }\n\n // #endregion\n}\n"]}