q2-tecton-elements 1.37.1 → 1.38.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (501) hide show
  1. package/dist/cjs/click-elsewhere_2.cjs.entry.js +68 -58
  2. package/dist/cjs/click-elsewhere_2.cjs.entry.js.map +1 -1
  3. package/dist/cjs/{index-6f9f259c.js → index-09c712ea.js} +13 -2
  4. package/dist/cjs/index-09c712ea.js.map +1 -0
  5. package/dist/cjs/loader.cjs.js +1 -1
  6. package/dist/cjs/q2-action-sheet.cjs.entry.js +2 -2
  7. package/dist/cjs/q2-action-sheet.cjs.entry.js.map +1 -1
  8. package/dist/cjs/q2-avatar.cjs.entry.js +1 -1
  9. package/dist/cjs/q2-avatar.cjs.entry.js.map +1 -1
  10. package/dist/cjs/q2-badge.cjs.entry.js +1 -1
  11. package/dist/cjs/q2-badge.cjs.entry.js.map +1 -1
  12. package/dist/cjs/q2-btn_2.cjs.entry.js +3 -3
  13. package/dist/cjs/q2-btn_2.cjs.entry.js.map +1 -1
  14. package/dist/cjs/q2-calendar.cjs.entry.js +38 -4
  15. package/dist/cjs/q2-calendar.cjs.entry.js.map +1 -1
  16. package/dist/cjs/q2-card.cjs.entry.js +2 -2
  17. package/dist/cjs/q2-card.cjs.entry.js.map +1 -1
  18. package/dist/cjs/q2-carousel-pane.cjs.entry.js +2 -2
  19. package/dist/cjs/q2-carousel-pane.cjs.entry.js.map +1 -1
  20. package/dist/cjs/q2-carousel.cjs.entry.js +2 -2
  21. package/dist/cjs/q2-carousel.cjs.entry.js.map +1 -1
  22. package/dist/cjs/q2-chart-area.cjs.entry.js +2 -2
  23. package/dist/cjs/q2-chart-area.cjs.entry.js.map +1 -1
  24. package/dist/cjs/q2-chart-bar.cjs.entry.js +2 -2
  25. package/dist/cjs/q2-chart-bar.cjs.entry.js.map +1 -1
  26. package/dist/cjs/q2-chart-donut.cjs.entry.js +11 -2
  27. package/dist/cjs/q2-chart-donut.cjs.entry.js.map +1 -1
  28. package/dist/cjs/q2-checkbox-group.cjs.entry.js +7 -2
  29. package/dist/cjs/q2-checkbox-group.cjs.entry.js.map +1 -1
  30. package/dist/cjs/q2-checkbox.cjs.entry.js +2 -2
  31. package/dist/cjs/q2-checkbox.cjs.entry.js.map +1 -1
  32. package/dist/cjs/q2-data-table.cjs.entry.js +2 -2
  33. package/dist/cjs/q2-data-table.cjs.entry.js.map +1 -1
  34. package/dist/cjs/q2-dropdown-item.cjs.entry.js +2 -2
  35. package/dist/cjs/q2-dropdown-item.cjs.entry.js.map +1 -1
  36. package/dist/cjs/q2-dropdown.cjs.entry.js +2 -2
  37. package/dist/cjs/q2-dropdown.cjs.entry.js.map +1 -1
  38. package/dist/cjs/q2-editable-field.cjs.entry.js +26 -3
  39. package/dist/cjs/q2-editable-field.cjs.entry.js.map +1 -1
  40. package/dist/cjs/q2-icon.cjs.entry.js +2 -2
  41. package/dist/cjs/q2-icon.cjs.entry.js.map +1 -1
  42. package/dist/cjs/q2-input.cjs.entry.js +125 -12
  43. package/dist/cjs/q2-input.cjs.entry.js.map +1 -1
  44. package/dist/cjs/q2-loc.cjs.entry.js +2 -2
  45. package/dist/cjs/q2-loc.cjs.entry.js.map +1 -1
  46. package/dist/cjs/q2-message.cjs.entry.js +5 -2
  47. package/dist/cjs/q2-message.cjs.entry.js.map +1 -1
  48. package/dist/cjs/q2-month-picker.cjs.entry.js +2 -2
  49. package/dist/cjs/q2-month-picker.cjs.entry.js.map +1 -1
  50. package/dist/cjs/q2-optgroup_2.cjs.entry.js +3 -3
  51. package/dist/cjs/q2-optgroup_2.cjs.entry.js.map +1 -1
  52. package/dist/cjs/q2-option-list.cjs.entry.js +19 -11
  53. package/dist/cjs/q2-option-list.cjs.entry.js.map +1 -1
  54. package/dist/cjs/q2-pagination.cjs.entry.js +2 -2
  55. package/dist/cjs/q2-pagination.cjs.entry.js.map +1 -1
  56. package/dist/cjs/q2-pill.cjs.entry.js +2 -2
  57. package/dist/cjs/q2-pill.cjs.entry.js.map +1 -1
  58. package/dist/cjs/q2-radio-group.cjs.entry.js +7 -2
  59. package/dist/cjs/q2-radio-group.cjs.entry.js.map +1 -1
  60. package/dist/cjs/q2-radio.cjs.entry.js +2 -2
  61. package/dist/cjs/q2-radio.cjs.entry.js.map +1 -1
  62. package/dist/cjs/q2-section.cjs.entry.js +2 -2
  63. package/dist/cjs/q2-section.cjs.entry.js.map +1 -1
  64. package/dist/cjs/q2-select.cjs.entry.js +73 -20
  65. package/dist/cjs/q2-select.cjs.entry.js.map +1 -1
  66. package/dist/cjs/q2-stepper-pane.cjs.entry.js +2 -2
  67. package/dist/cjs/q2-stepper-pane.cjs.entry.js.map +1 -1
  68. package/dist/cjs/q2-stepper-vertical.cjs.entry.js +2 -2
  69. package/dist/cjs/q2-stepper-vertical.cjs.entry.js.map +1 -1
  70. package/dist/cjs/q2-stepper.cjs.entry.js +2 -2
  71. package/dist/cjs/q2-stepper.cjs.entry.js.map +1 -1
  72. package/dist/cjs/q2-tab-container.cjs.entry.js +16 -10
  73. package/dist/cjs/q2-tab-container.cjs.entry.js.map +1 -1
  74. package/dist/cjs/q2-tab-pane.cjs.entry.js +1 -1
  75. package/dist/cjs/q2-tab-pane.cjs.entry.js.map +1 -1
  76. package/dist/cjs/q2-tag.cjs.entry.js +2 -2
  77. package/dist/cjs/q2-tag.cjs.entry.js.map +1 -1
  78. package/dist/cjs/q2-tecton-elements.cjs.js +1 -1
  79. package/dist/cjs/q2-textarea.cjs.entry.js +39 -6
  80. package/dist/cjs/q2-textarea.cjs.entry.js.map +1 -1
  81. package/dist/cjs/q2-tooltip.cjs.entry.js +2 -2
  82. package/dist/cjs/q2-tooltip.cjs.entry.js.map +1 -1
  83. package/dist/cjs/tecton-tab-pane.cjs.entry.js +1 -1
  84. package/dist/cjs/tecton-tab-pane.cjs.entry.js.map +1 -1
  85. package/dist/collection/components/q2-action-sheet/styles.css +1 -1
  86. package/dist/collection/components/q2-avatar/styles.css +1 -1
  87. package/dist/collection/components/q2-badge/styles.css +1 -1
  88. package/dist/collection/components/q2-btn/styles.css +18 -3
  89. package/dist/collection/components/q2-calendar/index.js +59 -10
  90. package/dist/collection/components/q2-calendar/index.js.map +1 -1
  91. package/dist/collection/components/q2-calendar/q2-month-picker.css +1 -1
  92. package/dist/collection/components/q2-calendar/styles.css +1 -1
  93. package/dist/collection/components/q2-card/styles.css +1 -1
  94. package/dist/collection/components/q2-carousel/styles.css +1 -1
  95. package/dist/collection/components/q2-carousel-pane/styles.css +1 -1
  96. package/dist/collection/components/q2-chart-area/styles.css +1 -1
  97. package/dist/collection/components/q2-chart-bar/styles.css +1 -1
  98. package/dist/collection/components/q2-chart-donut/index.js +12 -3
  99. package/dist/collection/components/q2-chart-donut/index.js.map +1 -1
  100. package/dist/collection/components/q2-chart-donut/styles.css +1 -1
  101. package/dist/collection/components/q2-checkbox/styles.css +84 -20
  102. package/dist/collection/components/q2-checkbox-group/index.js +10 -2
  103. package/dist/collection/components/q2-checkbox-group/index.js.map +1 -1
  104. package/dist/collection/components/q2-checkbox-group/styles.css +1 -1
  105. package/dist/collection/components/q2-data-table/index.js +6 -6
  106. package/dist/collection/components/q2-data-table/styles.css +1 -1
  107. package/dist/collection/components/q2-dropdown/styles.css +1 -1
  108. package/dist/collection/components/q2-dropdown-item/styles.css +1 -1
  109. package/dist/collection/components/q2-editable-field/index.js +44 -9
  110. package/dist/collection/components/q2-editable-field/index.js.map +1 -1
  111. package/dist/collection/components/q2-editable-field/styles.css +1 -1
  112. package/dist/collection/components/q2-icon/styles.css +1 -1
  113. package/dist/collection/components/q2-input/formatting/date.js +1 -1
  114. package/dist/collection/components/q2-input/formatting/date.js.map +1 -1
  115. package/dist/collection/components/q2-input/index.js +156 -16
  116. package/dist/collection/components/q2-input/index.js.map +1 -1
  117. package/dist/collection/components/q2-input/styles.css +64 -51
  118. package/dist/collection/components/q2-loading/styles.css +1 -1
  119. package/dist/collection/components/q2-loc/styles.css +1 -1
  120. package/dist/collection/components/q2-message/index.js +4 -1
  121. package/dist/collection/components/q2-message/index.js.map +1 -1
  122. package/dist/collection/components/q2-message/styles.css +1 -1
  123. package/dist/collection/components/q2-optgroup/styles.css +2 -2
  124. package/dist/collection/components/q2-option/styles.css +1 -1
  125. package/dist/collection/components/q2-option-list/index.js +19 -11
  126. package/dist/collection/components/q2-option-list/index.js.map +1 -1
  127. package/dist/collection/components/q2-option-list/styles.css +1 -1
  128. package/dist/collection/components/q2-pagination/styles.css +1 -1
  129. package/dist/collection/components/q2-pill/styles.css +7 -7
  130. package/dist/collection/components/q2-popover/index.js +90 -73
  131. package/dist/collection/components/q2-popover/index.js.map +1 -1
  132. package/dist/collection/components/q2-popover/styles.css +13 -13
  133. package/dist/collection/components/q2-radio/styles.css +36 -13
  134. package/dist/collection/components/q2-radio-group/index.js +10 -2
  135. package/dist/collection/components/q2-radio-group/index.js.map +1 -1
  136. package/dist/collection/components/q2-radio-group/styles.css +1 -1
  137. package/dist/collection/components/q2-section/styles.css +1 -1
  138. package/dist/collection/components/q2-select/index.js +96 -26
  139. package/dist/collection/components/q2-select/index.js.map +1 -1
  140. package/dist/collection/components/q2-select/styles.css +18 -10
  141. package/dist/collection/components/q2-stepper/styles.css +2 -12
  142. package/dist/collection/components/q2-stepper-pane/index.js +2 -2
  143. package/dist/collection/components/q2-stepper-pane/styles.css +1 -1
  144. package/dist/collection/components/q2-stepper-vertical/styles.css +1 -1
  145. package/dist/collection/components/q2-tab-container/index.js +14 -8
  146. package/dist/collection/components/q2-tab-container/index.js.map +1 -1
  147. package/dist/collection/components/q2-tab-container/styles.css +1 -1
  148. package/dist/collection/components/q2-tab-pane/styles.css +1 -1
  149. package/dist/collection/components/q2-tag/styles.css +4 -4
  150. package/dist/collection/components/q2-textarea/index.js +44 -8
  151. package/dist/collection/components/q2-textarea/index.js.map +1 -1
  152. package/dist/collection/components/q2-textarea/styles.css +69 -11
  153. package/dist/collection/components/q2-tooltip/styles.css +1 -1
  154. package/dist/collection/components/tecton-tab-pane/styles.css +1 -1
  155. package/dist/collection/utils/index.js +11 -1
  156. package/dist/collection/utils/index.js.map +1 -1
  157. package/dist/components/index10.js +1 -1
  158. package/dist/components/index10.js.map +1 -1
  159. package/dist/components/index11.js +5 -2
  160. package/dist/components/index11.js.map +1 -1
  161. package/dist/components/index12.js +1 -1
  162. package/dist/components/index12.js.map +1 -1
  163. package/dist/components/index13.js +1 -1
  164. package/dist/components/index13.js.map +1 -1
  165. package/dist/components/index14.js +18 -10
  166. package/dist/components/index14.js.map +1 -1
  167. package/dist/components/index15.js +69 -59
  168. package/dist/components/index15.js.map +1 -1
  169. package/dist/components/index16.js +12 -2
  170. package/dist/components/index16.js.map +1 -1
  171. package/dist/components/index3.js +1 -1
  172. package/dist/components/index3.js.map +1 -1
  173. package/dist/components/index4.js +1 -1
  174. package/dist/components/index4.js.map +1 -1
  175. package/dist/components/index5.js +1 -1
  176. package/dist/components/index5.js.map +1 -1
  177. package/dist/components/index6.js +1 -1
  178. package/dist/components/index6.js.map +1 -1
  179. package/dist/components/index7.js +1 -1
  180. package/dist/components/index7.js.map +1 -1
  181. package/dist/components/index8.js +1 -1
  182. package/dist/components/index8.js.map +1 -1
  183. package/dist/components/index9.js +127 -12
  184. package/dist/components/index9.js.map +1 -1
  185. package/dist/components/q2-action-sheet.js +1 -1
  186. package/dist/components/q2-action-sheet.js.map +1 -1
  187. package/dist/components/q2-calendar.js +37 -3
  188. package/dist/components/q2-calendar.js.map +1 -1
  189. package/dist/components/q2-card.js +1 -1
  190. package/dist/components/q2-card.js.map +1 -1
  191. package/dist/components/q2-carousel-pane.js +1 -1
  192. package/dist/components/q2-carousel-pane.js.map +1 -1
  193. package/dist/components/q2-carousel.js +1 -1
  194. package/dist/components/q2-carousel.js.map +1 -1
  195. package/dist/components/q2-chart-area.js +1 -1
  196. package/dist/components/q2-chart-area.js.map +1 -1
  197. package/dist/components/q2-chart-bar.js +1 -1
  198. package/dist/components/q2-chart-bar.js.map +1 -1
  199. package/dist/components/q2-chart-donut.js +10 -1
  200. package/dist/components/q2-chart-donut.js.map +1 -1
  201. package/dist/components/q2-checkbox-group.js +6 -1
  202. package/dist/components/q2-checkbox-group.js.map +1 -1
  203. package/dist/components/q2-data-table.js +1 -1
  204. package/dist/components/q2-data-table.js.map +1 -1
  205. package/dist/components/q2-dropdown.js +1 -1
  206. package/dist/components/q2-dropdown.js.map +1 -1
  207. package/dist/components/q2-editable-field.js +25 -2
  208. package/dist/components/q2-editable-field.js.map +1 -1
  209. package/dist/components/q2-loc.js +1 -1
  210. package/dist/components/q2-loc.js.map +1 -1
  211. package/dist/components/q2-month-picker.js +1 -1
  212. package/dist/components/q2-month-picker.js.map +1 -1
  213. package/dist/components/q2-pagination.js +1 -1
  214. package/dist/components/q2-pagination.js.map +1 -1
  215. package/dist/components/q2-pill.js +1 -1
  216. package/dist/components/q2-pill.js.map +1 -1
  217. package/dist/components/q2-radio-group.js +6 -1
  218. package/dist/components/q2-radio-group.js.map +1 -1
  219. package/dist/components/q2-radio.js +1 -1
  220. package/dist/components/q2-radio.js.map +1 -1
  221. package/dist/components/q2-section.js +1 -1
  222. package/dist/components/q2-section.js.map +1 -1
  223. package/dist/components/q2-select.js +74 -19
  224. package/dist/components/q2-select.js.map +1 -1
  225. package/dist/components/q2-stepper-pane.js +1 -1
  226. package/dist/components/q2-stepper-pane.js.map +1 -1
  227. package/dist/components/q2-stepper-vertical.js +1 -1
  228. package/dist/components/q2-stepper-vertical.js.map +1 -1
  229. package/dist/components/q2-stepper.js +1 -1
  230. package/dist/components/q2-stepper.js.map +1 -1
  231. package/dist/components/q2-tab-container.js +15 -9
  232. package/dist/components/q2-tab-container.js.map +1 -1
  233. package/dist/components/q2-tab-pane.js +1 -1
  234. package/dist/components/q2-tab-pane.js.map +1 -1
  235. package/dist/components/q2-tag.js +1 -1
  236. package/dist/components/q2-tag.js.map +1 -1
  237. package/dist/components/q2-textarea.js +38 -5
  238. package/dist/components/q2-textarea.js.map +1 -1
  239. package/dist/components/q2-tooltip.js +1 -1
  240. package/dist/components/q2-tooltip.js.map +1 -1
  241. package/dist/components/tecton-tab-pane.js +1 -1
  242. package/dist/components/tecton-tab-pane.js.map +1 -1
  243. package/dist/esm/click-elsewhere_2.entry.js +68 -58
  244. package/dist/esm/click-elsewhere_2.entry.js.map +1 -1
  245. package/dist/esm/{index-74a659a5.js → index-84f1034e.js} +13 -3
  246. package/dist/esm/index-84f1034e.js.map +1 -0
  247. package/dist/esm/loader.js +1 -1
  248. package/dist/esm/q2-action-sheet.entry.js +2 -2
  249. package/dist/esm/q2-action-sheet.entry.js.map +1 -1
  250. package/dist/esm/q2-avatar.entry.js +1 -1
  251. package/dist/esm/q2-avatar.entry.js.map +1 -1
  252. package/dist/esm/q2-badge.entry.js +1 -1
  253. package/dist/esm/q2-badge.entry.js.map +1 -1
  254. package/dist/esm/q2-btn_2.entry.js +3 -3
  255. package/dist/esm/q2-btn_2.entry.js.map +1 -1
  256. package/dist/esm/q2-calendar.entry.js +38 -4
  257. package/dist/esm/q2-calendar.entry.js.map +1 -1
  258. package/dist/esm/q2-card.entry.js +2 -2
  259. package/dist/esm/q2-card.entry.js.map +1 -1
  260. package/dist/esm/q2-carousel-pane.entry.js +2 -2
  261. package/dist/esm/q2-carousel-pane.entry.js.map +1 -1
  262. package/dist/esm/q2-carousel.entry.js +2 -2
  263. package/dist/esm/q2-carousel.entry.js.map +1 -1
  264. package/dist/esm/q2-chart-area.entry.js +2 -2
  265. package/dist/esm/q2-chart-area.entry.js.map +1 -1
  266. package/dist/esm/q2-chart-bar.entry.js +2 -2
  267. package/dist/esm/q2-chart-bar.entry.js.map +1 -1
  268. package/dist/esm/q2-chart-donut.entry.js +11 -2
  269. package/dist/esm/q2-chart-donut.entry.js.map +1 -1
  270. package/dist/esm/q2-checkbox-group.entry.js +7 -2
  271. package/dist/esm/q2-checkbox-group.entry.js.map +1 -1
  272. package/dist/esm/q2-checkbox.entry.js +2 -2
  273. package/dist/esm/q2-checkbox.entry.js.map +1 -1
  274. package/dist/esm/q2-data-table.entry.js +2 -2
  275. package/dist/esm/q2-data-table.entry.js.map +1 -1
  276. package/dist/esm/q2-dropdown-item.entry.js +2 -2
  277. package/dist/esm/q2-dropdown-item.entry.js.map +1 -1
  278. package/dist/esm/q2-dropdown.entry.js +2 -2
  279. package/dist/esm/q2-dropdown.entry.js.map +1 -1
  280. package/dist/esm/q2-editable-field.entry.js +26 -3
  281. package/dist/esm/q2-editable-field.entry.js.map +1 -1
  282. package/dist/esm/q2-icon.entry.js +2 -2
  283. package/dist/esm/q2-icon.entry.js.map +1 -1
  284. package/dist/esm/q2-input.entry.js +125 -12
  285. package/dist/esm/q2-input.entry.js.map +1 -1
  286. package/dist/esm/q2-loc.entry.js +2 -2
  287. package/dist/esm/q2-loc.entry.js.map +1 -1
  288. package/dist/esm/q2-message.entry.js +5 -2
  289. package/dist/esm/q2-message.entry.js.map +1 -1
  290. package/dist/esm/q2-month-picker.entry.js +2 -2
  291. package/dist/esm/q2-month-picker.entry.js.map +1 -1
  292. package/dist/esm/q2-optgroup_2.entry.js +3 -3
  293. package/dist/esm/q2-optgroup_2.entry.js.map +1 -1
  294. package/dist/esm/q2-option-list.entry.js +19 -11
  295. package/dist/esm/q2-option-list.entry.js.map +1 -1
  296. package/dist/esm/q2-pagination.entry.js +2 -2
  297. package/dist/esm/q2-pagination.entry.js.map +1 -1
  298. package/dist/esm/q2-pill.entry.js +2 -2
  299. package/dist/esm/q2-pill.entry.js.map +1 -1
  300. package/dist/esm/q2-radio-group.entry.js +7 -2
  301. package/dist/esm/q2-radio-group.entry.js.map +1 -1
  302. package/dist/esm/q2-radio.entry.js +2 -2
  303. package/dist/esm/q2-radio.entry.js.map +1 -1
  304. package/dist/esm/q2-section.entry.js +2 -2
  305. package/dist/esm/q2-section.entry.js.map +1 -1
  306. package/dist/esm/q2-select.entry.js +73 -20
  307. package/dist/esm/q2-select.entry.js.map +1 -1
  308. package/dist/esm/q2-stepper-pane.entry.js +2 -2
  309. package/dist/esm/q2-stepper-pane.entry.js.map +1 -1
  310. package/dist/esm/q2-stepper-vertical.entry.js +2 -2
  311. package/dist/esm/q2-stepper-vertical.entry.js.map +1 -1
  312. package/dist/esm/q2-stepper.entry.js +2 -2
  313. package/dist/esm/q2-stepper.entry.js.map +1 -1
  314. package/dist/esm/q2-tab-container.entry.js +16 -10
  315. package/dist/esm/q2-tab-container.entry.js.map +1 -1
  316. package/dist/esm/q2-tab-pane.entry.js +1 -1
  317. package/dist/esm/q2-tab-pane.entry.js.map +1 -1
  318. package/dist/esm/q2-tag.entry.js +2 -2
  319. package/dist/esm/q2-tag.entry.js.map +1 -1
  320. package/dist/esm/q2-tecton-elements.js +1 -1
  321. package/dist/esm/q2-textarea.entry.js +39 -6
  322. package/dist/esm/q2-textarea.entry.js.map +1 -1
  323. package/dist/esm/q2-tooltip.entry.js +2 -2
  324. package/dist/esm/q2-tooltip.entry.js.map +1 -1
  325. package/dist/esm/tecton-tab-pane.entry.js +1 -1
  326. package/dist/esm/tecton-tab-pane.entry.js.map +1 -1
  327. package/dist/q2-tecton-elements/p-059ea7c9.entry.js +2 -0
  328. package/dist/q2-tecton-elements/{p-bfd69d42.entry.js.map → p-059ea7c9.entry.js.map} +1 -1
  329. package/dist/q2-tecton-elements/p-072bda73.entry.js +2 -0
  330. package/dist/q2-tecton-elements/{p-077107c1.entry.js.map → p-072bda73.entry.js.map} +1 -1
  331. package/dist/q2-tecton-elements/p-0cade28b.entry.js +2 -0
  332. package/dist/q2-tecton-elements/{p-47c60d4a.entry.js.map → p-0cade28b.entry.js.map} +1 -1
  333. package/dist/q2-tecton-elements/p-0fb2be4c.entry.js +2 -0
  334. package/dist/q2-tecton-elements/{p-536978fe.entry.js.map → p-0fb2be4c.entry.js.map} +1 -1
  335. package/dist/q2-tecton-elements/p-107f07f2.entry.js +2 -0
  336. package/dist/q2-tecton-elements/{p-4abbd0b1.entry.js.map → p-107f07f2.entry.js.map} +1 -1
  337. package/dist/q2-tecton-elements/p-145849d0.entry.js +2 -0
  338. package/dist/q2-tecton-elements/p-145849d0.entry.js.map +1 -0
  339. package/dist/q2-tecton-elements/p-14e3c48f.entry.js +2 -0
  340. package/dist/q2-tecton-elements/p-14e3c48f.entry.js.map +1 -0
  341. package/dist/q2-tecton-elements/p-15179d55.entry.js +2 -0
  342. package/dist/q2-tecton-elements/{p-46287c02.entry.js.map → p-15179d55.entry.js.map} +1 -1
  343. package/dist/q2-tecton-elements/p-2812f9d2.entry.js +2 -0
  344. package/dist/q2-tecton-elements/{p-58cdb9c7.entry.js.map → p-2812f9d2.entry.js.map} +1 -1
  345. package/dist/q2-tecton-elements/p-29a7ca63.entry.js +2 -0
  346. package/dist/q2-tecton-elements/{p-a52371cf.entry.js.map → p-29a7ca63.entry.js.map} +1 -1
  347. package/dist/q2-tecton-elements/p-311f37e2.entry.js +2 -0
  348. package/dist/q2-tecton-elements/{p-1c993698.entry.js.map → p-311f37e2.entry.js.map} +1 -1
  349. package/dist/q2-tecton-elements/{p-9ef2829e.entry.js → p-3d82d94f.entry.js} +2 -2
  350. package/dist/q2-tecton-elements/{p-9ef2829e.entry.js.map → p-3d82d94f.entry.js.map} +1 -1
  351. package/dist/q2-tecton-elements/{p-8e7b762a.entry.js → p-52132d80.entry.js} +2 -2
  352. package/dist/q2-tecton-elements/{p-8e7b762a.entry.js.map → p-52132d80.entry.js.map} +1 -1
  353. package/dist/q2-tecton-elements/p-57e81863.entry.js +2 -0
  354. package/dist/q2-tecton-elements/{p-e45856f7.entry.js.map → p-57e81863.entry.js.map} +1 -1
  355. package/dist/q2-tecton-elements/p-5843f6c8.entry.js +2 -0
  356. package/dist/q2-tecton-elements/p-5843f6c8.entry.js.map +1 -0
  357. package/dist/q2-tecton-elements/p-5c033ed9.entry.js +2 -0
  358. package/dist/q2-tecton-elements/{p-09d4b3d3.entry.js.map → p-5c033ed9.entry.js.map} +1 -1
  359. package/dist/q2-tecton-elements/{p-a60f82c0.entry.js → p-69dcf12e.entry.js} +2 -2
  360. package/dist/q2-tecton-elements/{p-a60f82c0.entry.js.map → p-69dcf12e.entry.js.map} +1 -1
  361. package/dist/q2-tecton-elements/p-6ae87415.entry.js +2 -0
  362. package/dist/q2-tecton-elements/{p-9d743327.entry.js.map → p-6ae87415.entry.js.map} +1 -1
  363. package/dist/q2-tecton-elements/p-72b4ecc6.entry.js +2 -0
  364. package/dist/q2-tecton-elements/{p-597f8656.entry.js.map → p-72b4ecc6.entry.js.map} +1 -1
  365. package/dist/q2-tecton-elements/p-81b917a5.entry.js +2 -0
  366. package/dist/q2-tecton-elements/{p-9c9a2550.entry.js.map → p-81b917a5.entry.js.map} +1 -1
  367. package/dist/q2-tecton-elements/p-85dc889e.entry.js +2 -0
  368. package/dist/q2-tecton-elements/p-85dc889e.entry.js.map +1 -0
  369. package/dist/q2-tecton-elements/p-8f273db2.entry.js +2 -0
  370. package/dist/q2-tecton-elements/p-8f273db2.entry.js.map +1 -0
  371. package/dist/q2-tecton-elements/p-8f8d5362.entry.js +2 -0
  372. package/dist/q2-tecton-elements/p-8f8d5362.entry.js.map +1 -0
  373. package/dist/q2-tecton-elements/p-9220365b.entry.js +2 -0
  374. package/dist/q2-tecton-elements/{p-6cacc879.entry.js.map → p-9220365b.entry.js.map} +1 -1
  375. package/dist/q2-tecton-elements/{p-75fd6df5.entry.js → p-959f47ef.entry.js} +2 -2
  376. package/dist/q2-tecton-elements/{p-75fd6df5.entry.js.map → p-959f47ef.entry.js.map} +1 -1
  377. package/dist/q2-tecton-elements/p-9da0db14.entry.js +2 -0
  378. package/dist/q2-tecton-elements/{p-6170e44c.entry.js.map → p-9da0db14.entry.js.map} +1 -1
  379. package/dist/q2-tecton-elements/p-a09c90c1.entry.js +2 -0
  380. package/dist/q2-tecton-elements/{p-efbe6c17.entry.js.map → p-a09c90c1.entry.js.map} +1 -1
  381. package/dist/q2-tecton-elements/p-a4017e55.entry.js +2 -0
  382. package/dist/q2-tecton-elements/p-a4017e55.entry.js.map +1 -0
  383. package/dist/q2-tecton-elements/p-a6b03db1.entry.js +2 -0
  384. package/dist/q2-tecton-elements/p-a6b03db1.entry.js.map +1 -0
  385. package/dist/q2-tecton-elements/p-af98db79.entry.js +2 -0
  386. package/dist/q2-tecton-elements/{p-59d34a17.entry.js.map → p-af98db79.entry.js.map} +1 -1
  387. package/dist/q2-tecton-elements/{p-e8858d0d.entry.js → p-b83568e7.entry.js} +2 -2
  388. package/dist/q2-tecton-elements/p-b83568e7.entry.js.map +1 -0
  389. package/dist/q2-tecton-elements/p-bb0d4f5a.entry.js +2 -0
  390. package/dist/q2-tecton-elements/{p-ff6afb42.entry.js.map → p-bb0d4f5a.entry.js.map} +1 -1
  391. package/dist/q2-tecton-elements/p-c057134f.entry.js +2 -0
  392. package/dist/q2-tecton-elements/p-c057134f.entry.js.map +1 -0
  393. package/dist/q2-tecton-elements/p-d7fb3534.entry.js +2 -0
  394. package/dist/q2-tecton-elements/{p-3505f25c.entry.js.map → p-d7fb3534.entry.js.map} +1 -1
  395. package/dist/q2-tecton-elements/p-db3bbfb8.entry.js +2 -0
  396. package/dist/q2-tecton-elements/p-db3bbfb8.entry.js.map +1 -0
  397. package/dist/q2-tecton-elements/p-deb773a5.entry.js +2 -0
  398. package/dist/q2-tecton-elements/p-deb773a5.entry.js.map +1 -0
  399. package/dist/q2-tecton-elements/p-e4dadcd7.entry.js +2 -0
  400. package/dist/q2-tecton-elements/{p-9a28b93a.entry.js.map → p-e4dadcd7.entry.js.map} +1 -1
  401. package/dist/q2-tecton-elements/p-e98d9cf2.entry.js +2 -0
  402. package/dist/q2-tecton-elements/p-e98d9cf2.entry.js.map +1 -0
  403. package/dist/q2-tecton-elements/p-f198f77b.entry.js +2 -0
  404. package/dist/q2-tecton-elements/p-f198f77b.entry.js.map +1 -0
  405. package/dist/q2-tecton-elements/p-f34521a4.js +2 -0
  406. package/dist/q2-tecton-elements/p-f34521a4.js.map +1 -0
  407. package/dist/q2-tecton-elements/p-f3868a77.entry.js +2 -0
  408. package/dist/q2-tecton-elements/p-f3868a77.entry.js.map +1 -0
  409. package/dist/q2-tecton-elements/q2-tecton-elements.esm.js +1 -1
  410. package/dist/q2-tecton-elements/q2-tecton-elements.esm.js.map +1 -1
  411. package/dist/test/elements/q2-calendar-test.e2e.js +109 -47
  412. package/dist/test/elements/q2-calendar-test.e2e.js.map +1 -1
  413. package/dist/test/elements/q2-checkbox-test.e2e.js +156 -0
  414. package/dist/test/elements/q2-checkbox-test.e2e.js.map +1 -1
  415. package/dist/test/elements/q2-editable-field-test.e2e.js +27 -0
  416. package/dist/test/elements/q2-editable-field-test.e2e.js.map +1 -1
  417. package/dist/test/elements/q2-input-test.e2e.js +88 -4
  418. package/dist/test/elements/q2-input-test.e2e.js.map +1 -1
  419. package/dist/test/elements/q2-option-list-test.e2e.js +40 -10
  420. package/dist/test/elements/q2-option-list-test.e2e.js.map +1 -1
  421. package/dist/test/elements/q2-popover-test.e2e.js +269 -79
  422. package/dist/test/elements/q2-popover-test.e2e.js.map +1 -1
  423. package/dist/test/elements/q2-select-test.e2e.js +117 -42
  424. package/dist/test/elements/q2-select-test.e2e.js.map +1 -1
  425. package/dist/test/elements/q2-tab-container-test.e2e.js +2 -2
  426. package/dist/test/elements/q2-tab-container-test.e2e.js.map +1 -1
  427. package/dist/test/elements/q2-textarea-test.e2e.js +879 -199
  428. package/dist/test/elements/q2-textarea-test.e2e.js.map +1 -1
  429. package/dist/test/helpers.js +2 -1
  430. package/dist/test/helpers.js.map +1 -1
  431. package/dist/types/components/q2-calendar/index.d.ts +31 -0
  432. package/dist/types/components/q2-chart-donut/index.d.ts +9 -0
  433. package/dist/types/components/q2-checkbox-group/index.d.ts +5 -0
  434. package/dist/types/components/q2-editable-field/index.d.ts +23 -0
  435. package/dist/types/components/q2-input/index.d.ts +28 -2
  436. package/dist/types/components/q2-message/index.d.ts +3 -0
  437. package/dist/types/components/q2-popover/index.d.ts +9 -1
  438. package/dist/types/components/q2-radio-group/index.d.ts +5 -0
  439. package/dist/types/components/q2-select/index.d.ts +33 -3
  440. package/dist/types/components/q2-textarea/index.d.ts +12 -1
  441. package/dist/types/components.d.ts +93 -2
  442. package/dist/types/global.d.ts +2 -1
  443. package/dist/types/utils/index.d.ts +1 -0
  444. package/package.json +3 -3
  445. package/dist/cjs/index-6f9f259c.js.map +0 -1
  446. package/dist/docs.d.ts +0 -322
  447. package/dist/docs.json +0 -10294
  448. package/dist/esm/index-74a659a5.js.map +0 -1
  449. package/dist/q2-tecton-elements/p-077107c1.entry.js +0 -2
  450. package/dist/q2-tecton-elements/p-09d4b3d3.entry.js +0 -2
  451. package/dist/q2-tecton-elements/p-0d4aec6e.entry.js +0 -2
  452. package/dist/q2-tecton-elements/p-0d4aec6e.entry.js.map +0 -1
  453. package/dist/q2-tecton-elements/p-1c993698.entry.js +0 -2
  454. package/dist/q2-tecton-elements/p-252889b7.entry.js +0 -2
  455. package/dist/q2-tecton-elements/p-252889b7.entry.js.map +0 -1
  456. package/dist/q2-tecton-elements/p-25bd1b18.entry.js +0 -2
  457. package/dist/q2-tecton-elements/p-25bd1b18.entry.js.map +0 -1
  458. package/dist/q2-tecton-elements/p-2a975246.entry.js +0 -2
  459. package/dist/q2-tecton-elements/p-2a975246.entry.js.map +0 -1
  460. package/dist/q2-tecton-elements/p-30facf35.entry.js +0 -2
  461. package/dist/q2-tecton-elements/p-30facf35.entry.js.map +0 -1
  462. package/dist/q2-tecton-elements/p-3505f25c.entry.js +0 -2
  463. package/dist/q2-tecton-elements/p-46287c02.entry.js +0 -2
  464. package/dist/q2-tecton-elements/p-47c60d4a.entry.js +0 -2
  465. package/dist/q2-tecton-elements/p-4abbd0b1.entry.js +0 -2
  466. package/dist/q2-tecton-elements/p-536978fe.entry.js +0 -2
  467. package/dist/q2-tecton-elements/p-570c1d3d.entry.js +0 -2
  468. package/dist/q2-tecton-elements/p-570c1d3d.entry.js.map +0 -1
  469. package/dist/q2-tecton-elements/p-578e3f98.entry.js +0 -2
  470. package/dist/q2-tecton-elements/p-578e3f98.entry.js.map +0 -1
  471. package/dist/q2-tecton-elements/p-58cdb9c7.entry.js +0 -2
  472. package/dist/q2-tecton-elements/p-597f8656.entry.js +0 -2
  473. package/dist/q2-tecton-elements/p-59d34a17.entry.js +0 -2
  474. package/dist/q2-tecton-elements/p-5bc4d94c.entry.js +0 -2
  475. package/dist/q2-tecton-elements/p-5bc4d94c.entry.js.map +0 -1
  476. package/dist/q2-tecton-elements/p-6170e44c.entry.js +0 -2
  477. package/dist/q2-tecton-elements/p-67f33354.entry.js +0 -2
  478. package/dist/q2-tecton-elements/p-67f33354.entry.js.map +0 -1
  479. package/dist/q2-tecton-elements/p-680929be.entry.js +0 -2
  480. package/dist/q2-tecton-elements/p-680929be.entry.js.map +0 -1
  481. package/dist/q2-tecton-elements/p-6cacc879.entry.js +0 -2
  482. package/dist/q2-tecton-elements/p-7366d36d.entry.js +0 -2
  483. package/dist/q2-tecton-elements/p-7366d36d.entry.js.map +0 -1
  484. package/dist/q2-tecton-elements/p-9a28b93a.entry.js +0 -2
  485. package/dist/q2-tecton-elements/p-9c9a2550.entry.js +0 -2
  486. package/dist/q2-tecton-elements/p-9d743327.entry.js +0 -2
  487. package/dist/q2-tecton-elements/p-a52371cf.entry.js +0 -2
  488. package/dist/q2-tecton-elements/p-a53e9f1e.entry.js +0 -2
  489. package/dist/q2-tecton-elements/p-a53e9f1e.entry.js.map +0 -1
  490. package/dist/q2-tecton-elements/p-ac82ea35.entry.js +0 -2
  491. package/dist/q2-tecton-elements/p-ac82ea35.entry.js.map +0 -1
  492. package/dist/q2-tecton-elements/p-bfd69d42.entry.js +0 -2
  493. package/dist/q2-tecton-elements/p-db6921fb.entry.js +0 -2
  494. package/dist/q2-tecton-elements/p-db6921fb.entry.js.map +0 -1
  495. package/dist/q2-tecton-elements/p-e45856f7.entry.js +0 -2
  496. package/dist/q2-tecton-elements/p-e8858d0d.entry.js.map +0 -1
  497. package/dist/q2-tecton-elements/p-ef856249.js +0 -2
  498. package/dist/q2-tecton-elements/p-ef856249.js.map +0 -1
  499. package/dist/q2-tecton-elements/p-efbe6c17.entry.js +0 -2
  500. package/dist/q2-tecton-elements/p-ff6afb42.entry.js +0 -2
  501. /package/dist/types/workspace/workspace/{tecton-production_release_1.37.x → tecton-production_release_1.38.x}/packages/q2-tecton-elements/.stencil/test/helpers.d.ts +0 -0
@@ -1,5 +1,5 @@
1
1
  import { h, Fragment, } from '@stencil/core';
2
- import { createGuid, labelDOM, loc, messagesDOM, setMessageHeight, handleAriaLabel, overrideFocus, isEventFromElement, isMobile, } from 'src/utils';
2
+ import { createGuid, labelDOM, loc, messagesDOM, setMessageHeight, handleAriaLabel, overrideFocus, isEventFromElement, isMobile, hasSlotContent, nextPaint, } from 'src/utils';
3
3
  import formatCurrency from './formatting/currency';
4
4
  import formatPhoneNumber from './formatting/phone';
5
5
  import formatSSN from './formatting/ssn';
@@ -33,6 +33,10 @@ export class Q2Input {
33
33
  constructor() {
34
34
  this.scheduledAfterRender = [];
35
35
  this.isMobile = isMobile();
36
+ this.onMutationObserved = () => {
37
+ // Updating checkSlotCount to force re-render when slot content changes
38
+ this.checkSlotCount = this.checkSlotCount + 1;
39
+ };
36
40
  this.guid = createGuid();
37
41
  ///// ACTIONS ////////
38
42
  this.onToggleVisibility = () => {
@@ -63,6 +67,8 @@ export class Q2Input {
63
67
  };
64
68
  this.onInputInput = (event) => {
65
69
  event.stopPropagation();
70
+ if (this.type === 'currency')
71
+ this.handleCurrencyDeletion(event);
66
72
  const newFormattedValue = this.getFormattedValue(event.target.value, false);
67
73
  this.handleDataInput(newFormattedValue);
68
74
  };
@@ -86,9 +92,19 @@ export class Q2Input {
86
92
  }
87
93
  this.setCursorPosition(cursorPosition);
88
94
  };
95
+ // Sets textSelectedForDeletion to true if the user has selected text for deletion
96
+ // This is used to prevent other logic from running when text is deleted
97
+ this.handleCurrencyKeydown = (event) => {
98
+ if (event.key !== 'Backspace' && event.key !== 'Delete')
99
+ return;
100
+ const inputElement = this.inputField;
101
+ this.textSelectedForDeletion = inputElement.selectionStart !== inputElement.selectionEnd;
102
+ };
89
103
  this.onInputKeydown = (event) => {
90
104
  const keysThatMoveCursor = ['ArrowLeft', 'ArrowRight', 'ArrowUp', 'ArrowDown', 'Home', 'End'];
91
105
  const { key } = event;
106
+ if (this.type === 'currency')
107
+ this.handleCurrencyKeydown(event);
92
108
  if (this.shouldCursorStayAtEnd && keysThatMoveCursor.includes(key))
93
109
  event.preventDefault();
94
110
  if (key === 'Enter' && this.valueOnFocus !== this.formattedValueObject.value) {
@@ -121,6 +137,7 @@ export class Q2Input {
121
137
  this.iconLeft = undefined;
122
138
  this.iconRight = undefined;
123
139
  this.readonly = undefined;
140
+ this.showCount = undefined;
124
141
  this.clearable = undefined;
125
142
  this.optional = undefined;
126
143
  this.min = undefined;
@@ -146,6 +163,7 @@ export class Q2Input {
146
163
  this.formattedValueObject = undefined;
147
164
  this.hasFocus = undefined;
148
165
  this.isSmall = false;
166
+ this.checkSlotCount = 0;
149
167
  }
150
168
  /////// LIFECYCLE HOOKS ////////
151
169
  componentWillLoad() {
@@ -170,13 +188,19 @@ export class Q2Input {
170
188
  this.inputField.focus();
171
189
  }
172
190
  overrideFocus(this.hostElement);
191
+ const observer = new MutationObserver(this.onMutationObserved);
192
+ observer.observe(this.hostElement, { childList: true });
193
+ this.mutationObserver = observer;
173
194
  }
174
195
  componentDidRender() {
175
196
  this.scheduledAfterRender.forEach(fn => fn());
176
197
  this.scheduledAfterRender = [];
177
198
  }
178
199
  disconnectedCallback() {
200
+ var _a;
179
201
  this.manageClearableResizeObserver();
202
+ (_a = this.mutationObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
203
+ this.mutationObserver = null;
180
204
  }
181
205
  getFormattedValue(value, valueChangedFromProperty) {
182
206
  const formattingFunctions = {
@@ -203,9 +227,12 @@ export class Q2Input {
203
227
  unformattedValue: value,
204
228
  };
205
229
  }
230
+ get hasCustomDisplaySlot() {
231
+ return !!this.hostElement.querySelector('[slot=custom-display]');
232
+ }
206
233
  get canClear() {
207
- var _a, _b;
208
- return this.clearable && !!((_b = (_a = this.inputField) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : this.value);
234
+ var _a;
235
+ return this.clearable && !!(((_a = this.inputField) === null || _a === void 0 ? void 0 : _a.value) || this.value);
209
236
  }
210
237
  get shouldCursorStayAtEnd() {
211
238
  return this.isMobile && this.type === 'currency';
@@ -230,6 +257,12 @@ export class Q2Input {
230
257
  get inputDescribedBy() {
231
258
  return this.showMessages ? `${this.inputId}-description` : undefined;
232
259
  }
260
+ get hasInputLeftSlot() {
261
+ return hasSlotContent(this.hostElement, 'input-left');
262
+ }
263
+ get hasInputRightSlot() {
264
+ return hasSlotContent(this.hostElement, 'input-right');
265
+ }
233
266
  get isMaskedType() {
234
267
  const maskedTypes = [
235
268
  'currency',
@@ -384,6 +417,14 @@ export class Q2Input {
384
417
  this.hasFocus && this.scheduledAfterRender.push(() => setMessageHeight(this));
385
418
  }
386
419
  /// Methods ///
420
+ /**
421
+ * Emulates focusing the `<input>`, entering the provided value, and emitting an `input` event.
422
+ *
423
+ * This method leaves the focus on the `<input>` and as a result does not trigger the `change` event. If you want
424
+ * to trigger the` change` event, move the focus to another element after calling this method.
425
+ *
426
+ * @testOnly
427
+ */
387
428
  setValue(value) {
388
429
  const { inputField } = this;
389
430
  inputField.focus();
@@ -391,6 +432,14 @@ export class Q2Input {
391
432
  inputField.value = value;
392
433
  inputField.dispatchEvent(new InputEvent('input'));
393
434
  }
435
+ /**
436
+ * Emulates clicking the clear button when the input is clearable.
437
+ *
438
+ * @warning
439
+ * Only applicable when the input is clearable.
440
+ *
441
+ * @testOnly
442
+ */
394
443
  clearValue() {
395
444
  if (!this.clearable)
396
445
  return;
@@ -408,6 +457,60 @@ export class Q2Input {
408
457
  this.value = event.detail.value;
409
458
  }
410
459
  }
460
+ handleCurrencyDeletion(event) {
461
+ // Don't do anything if text was selected for deletion
462
+ if (this.textSelectedForDeletion) {
463
+ this.textSelectedForDeletion = false;
464
+ return;
465
+ }
466
+ // We only care about "Backspace" and "Delete" events
467
+ if (event.inputType !== 'deleteContentBackward' && event.inputType !== 'deleteContentForward')
468
+ return;
469
+ const input = event.target;
470
+ const cursorPosition = input.selectionStart;
471
+ const { formattedValue } = this.formattedValueObject;
472
+ if (cursorPosition === null)
473
+ return;
474
+ let cursorMap;
475
+ switch (event.inputType) {
476
+ case 'deleteContentBackward':
477
+ const valueBeforeCursor = formattedValue.substring(0, cursorPosition + 1);
478
+ const isPrevCharAlphaNum = /[a-zA-Z0-9]$/.test(valueBeforeCursor);
479
+ cursorMap = {
480
+ leftIndex: isPrevCharAlphaNum ? cursorPosition : cursorPosition - 1,
481
+ rightIndex: isPrevCharAlphaNum ? cursorPosition + 1 : cursorPosition,
482
+ afterCursorOffset: 0,
483
+ newCursorOffset: 1,
484
+ };
485
+ break;
486
+ case 'deleteContentForward':
487
+ const valueAfterCursor = formattedValue.substring(cursorPosition);
488
+ const isNextCharAlphaNum = /^[a-zA-Z0-9]/.test(valueAfterCursor);
489
+ cursorMap = {
490
+ leftIndex: isNextCharAlphaNum ? cursorPosition : cursorPosition + 1,
491
+ rightIndex: isNextCharAlphaNum ? cursorPosition + 1 : cursorPosition + 2,
492
+ afterCursorOffset: 1,
493
+ newCursorOffset: 0,
494
+ };
495
+ break;
496
+ default:
497
+ return;
498
+ }
499
+ // Ensure the cursor doesn't move with a newly formatted value
500
+ const newValue = [
501
+ formattedValue.substring(0, cursorMap.leftIndex),
502
+ formattedValue.substring(cursorMap.rightIndex),
503
+ ].join('');
504
+ const charactersAfterCursor = formattedValue.length - cursorPosition - cursorMap.afterCursorOffset;
505
+ const newFormattedValue = this.getFormattedValue(newValue, false).formattedValue;
506
+ const newCursorPosition = Math.max(newFormattedValue.length - charactersAfterCursor + cursorMap.newCursorOffset, 0);
507
+ input.value = newFormattedValue;
508
+ input.setSelectionRange(newCursorPosition, newCursorPosition);
509
+ // This handles a runtime issue when a character is deleted from the beginning of the input
510
+ if (newCursorPosition === 0) {
511
+ nextPaint(() => input.setSelectionRange(newCursorPosition, newCursorPosition));
512
+ }
513
+ }
411
514
  handleDataInput(newFormattedValue) {
412
515
  if (this.maxlength === undefined ||
413
516
  newFormattedValue.unformattedValue.length <= this.maxlength ||
@@ -422,14 +525,18 @@ export class Q2Input {
422
525
  }
423
526
  /////// VIEW METHODS ///////
424
527
  render() {
425
- return (h("div", { class: this.wrapperClasses }, labelDOM(this), this.inputContainerDOM(), messagesDOM(this)));
528
+ return (h("div", { class: this.wrapperClasses }, h("div", { class: "label-wrapper" }, labelDOM(this), this.countDOM()), this.inputContainerDOM(), messagesDOM(this)));
426
529
  }
427
- get hasCustomDisplaySlot() {
428
- return !!this.hostElement.querySelector('[slot=custom-display]');
530
+ countDOM() {
531
+ if (!this.showCount)
532
+ return;
533
+ const { maxlength, formattedValueObject } = this;
534
+ return (h("div", { class: "count-tag" }, formattedValueObject.unformattedValue.length, maxlength && `/${maxlength}`));
429
535
  }
430
536
  /* tslint:disable:cyclomatic-complexity */
431
537
  inputContainerDOM() {
432
- return (h("div", { class: "input-container", tabindex: -1, "test-id": "inputContainer" }, h("div", { class: "input-icons-container-left" }, this.formattedValueObject.prefix && (h("div", { class: "input-prefix" }, this.formattedValueObject.prefix)), this.computedIconLeft && (h("div", null, h("q2-icon", { type: this.computedIconLeft, class: this.computedClassForIconLeft }))), h("slot", { name: "input-left" }), this.showIconSeparator && h("div", { class: "vertical-separator" }), this.hasError && this.type === 'currency' && (h("div", null, h("q2-icon", { type: "error", class: "icon-error", "test-id": "iconError" })))), this.pseudo ? this.pseudoInputDOM() : this.standardInputDOM(), h("div", { class: "input-icons-container-right" }, this.canClear && (h("q2-btn", { class: "btn-clear", ariaLabel: loc('tecton.element.input.clear', [this.label]), "test-id": "clearButton", onClick: this.onClearInput }, h("q2-icon", { type: "close", class: "icon-clear" }))), ['password', 'text', 'ssn', 'tin'].includes(this.type) && this.showVisibilityToggle && (h("q2-btn", { class: "btn-visibility-toggle", "test-id": "toggleVisibilityButton", onClick: this.onToggleVisibility }, this.visibilityToggleText)), this.formattedValueObject.suffix && (h("span", { class: "input-suffix" }, this.formattedValueObject.suffix)), this.badgeValue && (h("q2-badge", { size: "large", theme: this.badgeTheme }, this.badgeValue)), this.hasError && this.type !== 'currency' && (h("div", null, h("q2-icon", { type: "error", class: "icon-error", "test-id": "iconError" }))), this.iconRight && !this.formattedValueObject.suffix && (h("div", null, h("q2-icon", { type: this.iconRight, class: "icon-right" }))), h("slot", { name: "input-right" }))));
538
+ const { hasInputLeftSlot, hasInputRightSlot } = this;
539
+ return (h("div", { class: "input-container", tabindex: -1, "test-id": "inputContainer" }, h("div", { class: "input-icons-container-left" }, this.formattedValueObject.prefix && (h("div", { class: "input-prefix" }, this.formattedValueObject.prefix)), this.computedIconLeft && (h("div", null, h("q2-icon", { type: this.computedIconLeft, class: this.computedClassForIconLeft }))), hasInputLeftSlot && h("slot", { name: "input-left" }), this.showIconSeparator && h("div", { class: "vertical-separator" }), this.hasError && this.type === 'currency' && (h("div", null, h("q2-icon", { type: "error", class: "icon-error", "test-id": "iconError" })))), this.pseudo ? this.pseudoInputDOM() : this.standardInputDOM(), h("div", { class: "input-icons-container-right" }, this.canClear && (h("q2-btn", { class: "btn-clear", ariaLabel: loc('tecton.element.input.clear', [this.label]), "test-id": "clearButton", onClick: this.onClearInput }, h("q2-icon", { type: "close", class: "icon-clear" }))), ['password', 'text', 'ssn', 'tin'].includes(this.type) && this.showVisibilityToggle && (h("q2-btn", { class: "btn-visibility-toggle", "test-id": "toggleVisibilityButton", onClick: this.onToggleVisibility }, this.visibilityToggleText)), this.formattedValueObject.suffix && (h("span", { class: "input-suffix" }, this.formattedValueObject.suffix)), this.badgeValue && (h("q2-badge", { size: "large", theme: this.badgeTheme }, this.badgeValue)), this.hasError && this.type !== 'currency' && (h("div", null, h("q2-icon", { type: "error", class: "icon-error", "test-id": "iconError" }))), this.iconRight && !this.formattedValueObject.suffix && (h("div", null, h("q2-icon", { type: this.iconRight, class: "icon-right" }))), hasInputRightSlot && h("slot", { name: "input-right" }))));
433
540
  }
434
541
  /* tslint:enable:cyclomatic-complexity */
435
542
  /* tslint:disable:cyclomatic-complexity */
@@ -477,10 +584,16 @@ export class Q2Input {
477
584
  if (this.canSetSelection && !cursorData.hasSelection) {
478
585
  const input = this.inputField;
479
586
  const { valueLength, previousValueLength, startingPosition } = cursorData;
480
- if (startingPosition === valueLength && valueLength >= previousValueLength && this.type === 'currency') {
481
- input.setSelectionRange(valueLength, valueLength);
587
+ if (this.type === 'currency') {
588
+ if (previousValueLength - valueLength === 1) {
589
+ input.setSelectionRange(startingPosition - 1, startingPosition - 1);
590
+ }
591
+ else {
592
+ const difference = previousValueLength - valueLength;
593
+ input.setSelectionRange(startingPosition - difference, startingPosition - difference);
594
+ }
482
595
  }
483
- else {
596
+ if (this.type !== 'currency') {
484
597
  const difference = valueLength - previousValueLength;
485
598
  // Never allow the cursor to move in reverse
486
599
  const newPosition = startingPosition + (difference > 0 ? difference : 0);
@@ -562,7 +675,7 @@ export class Q2Input {
562
675
  "references": {
563
676
  "InputType": {
564
677
  "location": "local",
565
- "path": "/workspace/workspace/tecton-production_release_1.37.x/packages/q2-tecton-elements/src/components/q2-input/index.tsx"
678
+ "path": "/workspace/workspace/tecton-production_release_1.38.x/packages/q2-tecton-elements/src/components/q2-input/index.tsx"
566
679
  }
567
680
  }
568
681
  },
@@ -757,6 +870,23 @@ export class Q2Input {
757
870
  "attribute": "readonly",
758
871
  "reflect": true
759
872
  },
873
+ "showCount": {
874
+ "type": "boolean",
875
+ "mutable": false,
876
+ "complexType": {
877
+ "original": "boolean",
878
+ "resolved": "boolean",
879
+ "references": {}
880
+ },
881
+ "required": false,
882
+ "optional": false,
883
+ "docs": {
884
+ "tags": [],
885
+ "text": ""
886
+ },
887
+ "attribute": "show-count",
888
+ "reflect": true
889
+ },
760
890
  "clearable": {
761
891
  "type": "boolean",
762
892
  "mutable": false,
@@ -1142,7 +1272,8 @@ export class Q2Input {
1142
1272
  return {
1143
1273
  "formattedValueObject": {},
1144
1274
  "hasFocus": {},
1145
- "isSmall": {}
1275
+ "isSmall": {},
1276
+ "checkSlotCount": {}
1146
1277
  };
1147
1278
  }
1148
1279
  static get events() {
@@ -1241,8 +1372,11 @@ export class Q2Input {
1241
1372
  "return": "Promise<void>"
1242
1373
  },
1243
1374
  "docs": {
1244
- "text": "",
1245
- "tags": []
1375
+ "text": "Emulates focusing the `<input>`, entering the provided value, and emitting an `input` event.\n\nThis method leaves the focus on the `<input>` and as a result does not trigger the `change` event. If you want\nto trigger the` change` event, move the focus to another element after calling this method.",
1376
+ "tags": [{
1377
+ "name": "testOnly",
1378
+ "text": undefined
1379
+ }]
1246
1380
  }
1247
1381
  },
1248
1382
  "clearValue": {
@@ -1253,8 +1387,14 @@ export class Q2Input {
1253
1387
  "return": "Promise<void>"
1254
1388
  },
1255
1389
  "docs": {
1256
- "text": "",
1257
- "tags": []
1390
+ "text": "Emulates clicking the clear button when the input is clearable.",
1391
+ "tags": [{
1392
+ "name": "warning",
1393
+ "text": "Only applicable when the input is clearable."
1394
+ }, {
1395
+ "name": "testOnly",
1396
+ "text": undefined
1397
+ }]
1258
1398
  }
1259
1399
  }
1260
1400
  };
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/q2-input/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EACH,SAAS,EACT,IAAI,EACJ,OAAO,EACP,KAAK,EACL,KAAK,EAEL,CAAC,EACD,KAAK,EACL,MAAM,EACN,QAAQ,EACR,MAAM,GACT,MAAM,eAAe,CAAC;AACvB,OAAO,EACH,UAAU,EACV,QAAQ,EACR,GAAG,EACH,WAAW,EACX,gBAAgB,EAChB,eAAe,EACf,aAAa,EACb,kBAAkB,EAClB,QAAQ,GACX,MAAM,WAAW,CAAC;AAEnB,OAAO,cAAc,MAAM,uBAAuB,CAAC;AACnD,OAAO,iBAAiB,MAAM,oBAAoB,CAAC;AACnD,OAAO,SAAS,MAAM,kBAAkB,CAAC;A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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACJ","sourcesContent":["import {\n Component,\n Prop,\n Element,\n State,\n Event,\n EventEmitter,\n h,\n Watch,\n Listen,\n Fragment,\n Method,\n} from '@stencil/core';\nimport {\n createGuid,\n labelDOM,\n loc,\n messagesDOM,\n setMessageHeight,\n handleAriaLabel,\n overrideFocus,\n isEventFromElement,\n isMobile,\n} from 'src/utils';\nimport { IFormatterValueObject, ICursorData, IEventDetail } from './types';\nimport formatCurrency from './formatting/currency';\nimport formatPhoneNumber from './formatting/phone';\nimport formatSSN from './formatting/ssn';\nimport formatTIN from './formatting/tin';\nimport formatAlphanumeric from './formatting/alphanumeric';\nimport formatAlpha from './formatting/alpha';\nimport formatNumeric, { formatPercentage } from './formatting/numeric';\nimport formatPostalCode from './formatting/postal';\nimport formatDate from './formatting/date';\nimport formatCreditCard from './formatting/credit-card';\nimport { Q2Icon } from '../q2-icon';\nimport { Q2Badge } from '../q2-badge';\n\nconst inputTypeMap = {\n text: 'text',\n tel: 'tel',\n number: 'number',\n password: 'text',\n search: 'search',\n url: 'url',\n email: 'email',\n currency: 'text',\n phone: 'tel',\n ssn: 'text',\n alphanumeric: 'text',\n alpha: 'text',\n numeric: 'text',\n percentage: 'text',\n postal: 'text',\n date: 'text',\n 'credit-card': 'text',\n};\n\nexport type InputType = keyof typeof inputTypeMap;\n\n@Component({\n tag: 'q2-input',\n shadow: true,\n styleUrl: 'styles.scss',\n})\nexport class Q2Input {\n @Prop({ mutable: true }) value: string;\n @Prop({ reflect: true, mutable: true }) label: string;\n @Prop({ reflect: true, mutable: true }) hideLabel: boolean;\n @Prop({ reflect: true }) type: InputType = 'text';\n @Prop({ reflect: true }) placeholder: string;\n @Prop({ reflect: true }) disabled: boolean = false;\n @Prop({ reflect: true }) autocomplete: string;\n @Prop({ reflect: true }) autocorrect: 'on' | 'off';\n @Prop({ reflect: true }) autocapitalize: string;\n @Prop({ reflect: true }) autofocus: boolean;\n @Prop({ reflect: true }) hideMessages: boolean;\n @Prop({ reflect: true }) iconLeft: Q2Icon['type'];\n @Prop({ reflect: true }) iconRight: Q2Icon['type'];\n @Prop({ reflect: true }) readonly: boolean;\n @Prop({ reflect: true }) clearable: boolean;\n @Prop({ reflect: true }) optional: boolean;\n @Prop({ reflect: true }) min: number;\n @Prop({ reflect: true }) max: number;\n @Prop({ reflect: true }) step: number;\n @Prop({ reflect: true }) formatModifier: string;\n @Prop({ reflect: true, mutable: true }) maxlength: number;\n @Prop({ reflect: true }) pseudo: boolean;\n @Prop({ reflect: true }) showVisibilityToggle: boolean = false;\n @Prop({ reflect: true, mutable: true }) textHidden: boolean;\n @Prop({ reflect: true }) badgeValue: string;\n @Prop({ reflect: true }) badgeTheme: Q2Badge['theme'];\n @Prop() role: string;\n @Prop() ariaControls: string;\n @Prop() ariaOwns: string;\n @Prop() ariaHaspopup: string;\n @Prop() ariaExpanded: string;\n @Prop() ariaActivedescendant: string;\n @Prop() current: 'page' | 'step' | 'location' | 'date' | 'time' | 'true' | 'false';\n\n /** @deprecated */\n @Prop({ reflect: true, mutable: true }) ariaLabel: string;\n\n @Prop() errors: string[];\n @Prop() hints: string[];\n\n @State() formattedValueObject: IFormatterValueObject;\n @State() hasFocus: boolean;\n @State() isSmall: boolean = false;\n\n resizeObserver: ResizeObserver;\n scheduledAfterRender: (() => void)[] = [];\n valueOnFocus: string;\n isMobile: boolean = isMobile();\n\n /////// LIFECYCLE HOOKS ////////\n\n componentWillLoad() {\n if (isNaN(this.maxlength)) {\n this.maxlength = undefined;\n }\n this.formattedValueObject = this.getFormattedValue(this.stringValue, true);\n\n Object.defineProperty(this.hostElement, 'formattedValue', {\n get: () => this.formattedValueObject?.formattedValue ?? '',\n });\n\n handleAriaLabel(this);\n if (this.textHidden === undefined) {\n this.textHidden = this.type === 'password';\n }\n\n this.manageClearableResizeObserver(this.clearable);\n }\n\n componentDidLoad() {\n if (!this.pseudo) {\n this.inputField.value = this.formattedValueObject.formattedValue;\n }\n\n if (this.autofocus === true) {\n this.inputField.focus();\n }\n\n overrideFocus(this.hostElement);\n }\n\n componentDidRender() {\n this.scheduledAfterRender.forEach(fn => fn());\n this.scheduledAfterRender = [];\n }\n\n disconnectedCallback() {\n this.manageClearableResizeObserver();\n }\n\n getFormattedValue(value: string, valueChangedFromProperty: boolean): IFormatterValueObject {\n const formattingFunctions = {\n currency: formatCurrency,\n phone: formatPhoneNumber,\n ssn: formatSSN,\n tin: formatTIN,\n alphanumeric: formatAlphanumeric,\n alpha: formatAlpha,\n numeric: formatNumeric,\n percentage: formatPercentage,\n postal: formatPostalCode,\n date: formatDate,\n 'credit-card': formatCreditCard.format,\n };\n\n if (formattingFunctions[this.type]) {\n return formattingFunctions[this.type](value, this.formatModifier, valueChangedFromProperty);\n }\n\n return {\n value,\n formattedValue: value,\n fullyFormattedValue: value,\n formattingCharacterCount: 0,\n unformattedValue: value,\n };\n }\n\n @Element() hostElement: HTMLElement;\n\n get canClear() {\n return this.clearable && !!(this.inputField?.value ?? this.value);\n }\n\n get shouldCursorStayAtEnd() {\n return this.isMobile && this.type === 'currency';\n }\n\n get hasError() {\n return Array.isArray(this.errors) && this.errors.length > 0;\n }\n\n get messages(): string[] {\n return (\n (this.errors && this.errors.length > 0 && this.errors) ||\n (this.hints && this.hints.length > 0 && this.hints) ||\n []\n );\n }\n\n get inputField() {\n return this.hostElement.shadowRoot.querySelector<HTMLInputElement>('.input-field');\n }\n\n get showMessages() {\n return this.messages.length > 0 && !this.hideMessages;\n }\n\n guid = createGuid();\n\n get inputId() {\n return `input-guid-${this.guid}`;\n }\n\n get inputDescribedBy() {\n return this.showMessages ? `${this.inputId}-description` : undefined;\n }\n\n get isMaskedType(): boolean {\n const maskedTypes: string[] = [\n 'currency',\n 'phone',\n 'ssn',\n 'tin',\n 'alphanumeric',\n 'alpha',\n 'numeric',\n 'percentage',\n 'postal',\n 'date',\n 'credit-card',\n ];\n\n return maskedTypes.includes(this.type);\n }\n\n get wrapperClasses() {\n const classNames = ['field-container'];\n if (this.hasError) classNames.push('has-error');\n if (!!this.value) classNames.push('has-value');\n if (this.clearable && !!this.value) classNames.push('has-clear');\n if (this.hasFocus) classNames.push('has-focus');\n if (this.isSmall) classNames.push('is-small');\n if (this.formattedValueObject.prefix) classNames.push('has-prefix');\n if (this.computedIconLeft) classNames.push('has-icon-left');\n if (this.showIconSeparator) classNames.push('has-icon-separator');\n if (this.formattedValueObject.suffix) classNames.push('has-suffix');\n if (!this.formattedValueObject.suffix && this.iconRight) classNames.push('has-icon-right');\n if (this.type === 'currency') classNames.push('right-aligned');\n else classNames.push('left-aligned');\n if (this.hasCustomDisplaySlot) classNames.push('has-custom-display');\n\n return classNames.join(' ');\n }\n\n get computedType() {\n if (['password', 'text', 'ssn'].includes(this.type) && this.textHidden) {\n return 'password';\n } else {\n return (this.type && inputTypeMap[this.type]) || 'text';\n }\n }\n\n get computedAutocomplete() {\n // force off for currency type\n if (this.type === 'currency') return 'transaction-amount';\n return this.autocomplete || 'off';\n }\n\n get computedIconLeft(): string | undefined {\n if (this.formattedValueObject.prefix) {\n return;\n }\n\n if (this.type === 'search') {\n return 'search';\n }\n\n if (this.formattedValueObject.leftIcon) {\n return this.formattedValueObject.leftIcon;\n }\n\n return this.iconLeft;\n }\n\n get showIconSeparator(): boolean {\n return this.type === 'credit-card' || !!this.formattedValueObject.prefix;\n }\n\n get computedClassForIconLeft(): string | undefined {\n let className = 'icon-left';\n if (this.formattedValueObject.leftIconMuted) {\n className += ' icon-left-muted';\n }\n return className;\n }\n\n get stringValue(): string {\n return (this.value && String(this.value)) || '';\n }\n\n get canSetSelection(): boolean {\n // email and number type don't support setSelectionRange\n return !['email', 'number'].includes(this.computedType);\n }\n\n get visibilityToggleText(): string {\n return loc(`tecton.element.input.toggle.${this.textHidden ? 'show' : 'hide'}`);\n }\n\n formatAndUpdateValueFromProp() {\n this.formattedValueObject = this.getFormattedValue(this.stringValue, true);\n\n if (!this.pseudo) {\n const setValue = () => {\n this.inputField.value = this.formattedValueObject.formattedValue;\n };\n\n this.inputField ? setValue() : this.scheduledAfterRender.push(() => setValue());\n }\n }\n\n get inputMode() {\n const inputModeMap = {\n currency: 'numeric',\n ssn: 'numeric',\n tin: 'numeric',\n numeric: 'decimal',\n percentage: 'decimal',\n postal: 'numeric',\n date: 'numeric',\n 'credit-card': 'numeric',\n };\n\n return (this.type && inputModeMap[this.type]) || undefined;\n }\n\n //////// OBSERVERS //////////\n\n @Watch('clearable')\n manageClearableResizeObserver(clearable?: boolean) {\n const isSmallThreshold = 190;\n if (clearable) {\n if (this.resizeObserver) return;\n this.resizeObserver = new ResizeObserver(([entry]) => {\n this.isSmall = isSmallThreshold > entry.contentRect.width;\n });\n this.resizeObserver.observe(this.hostElement);\n } else {\n this.isSmall = false;\n this.resizeObserver?.unobserve(this.hostElement);\n this.resizeObserver = null;\n }\n }\n\n @Watch('ariaLabel')\n ariaLabelObserver() {\n handleAriaLabel(this);\n }\n\n @Watch('value')\n valueObserver() {\n this.formatAndUpdateValueFromProp();\n }\n\n @Watch('formattedValueObject')\n formattedValueObjectObserver() {\n this.formatted.emit(this.formattedValueObject);\n }\n\n @Watch('type')\n typeObserver() {\n this.formatAndUpdateValueFromProp();\n }\n\n @Watch('formatModifier')\n formatModifierObserver() {\n this.formatAndUpdateValueFromProp();\n }\n\n @Watch('hints')\n hintsObserver() {\n this.hasFocus && this.scheduledAfterRender.push(() => setMessageHeight(this));\n }\n\n @Watch('errors')\n errorsObserver() {\n this.hasFocus && this.scheduledAfterRender.push(() => setMessageHeight(this));\n }\n\n /// Methods ///\n @Method()\n setValue(value: string) {\n const { inputField } = this;\n inputField.focus();\n inputField.dispatchEvent(new FocusEvent('focus'));\n inputField.value = value;\n inputField.dispatchEvent(new InputEvent('input'));\n }\n\n @Method()\n clearValue() {\n if (!this.clearable) return;\n this.onClearInput();\n }\n\n ///////// HOST ELEMENT EVENTS //////\n @Listen('focus')\n onHostElementFocus(event) {\n if (!isEventFromElement(event, this.hostElement)) return;\n this.inputField.focus();\n }\n\n @Listen('change')\n onHostElementChange(event: CustomEvent) {\n event.stopPropagation();\n if (event.target === this.hostElement && !this.hostElement.onchange) {\n this.value = event.detail.value;\n }\n }\n\n ///////// Events /////////\n\n @Event() input: EventEmitter<IEventDetail>;\n @Event() change: EventEmitter<IEventDetail>;\n @Event() clear: EventEmitter<IEventDetail>;\n @Event() formatted: EventEmitter<IEventDetail>;\n\n ///// ACTIONS ////////\n\n onToggleVisibility = () => {\n this.hostElement.dispatchEvent(new FocusEvent('focus'));\n this.textHidden = !this.textHidden;\n };\n\n onInputClick = () => {\n if (this.shouldCursorStayAtEnd) this.placeCursorAtEnd();\n };\n\n onInputFocus = () => {\n if (this.inputField.tagName === 'INPUT') {\n this.scheduledAfterRender.push(() =>\n this.shouldCursorStayAtEnd\n ? this.placeCursorAtEnd()\n : this.setCursorPosition(this.calculateCursorPositionOnFocus())\n );\n }\n this.hasFocus = true;\n setMessageHeight(this);\n this.valueOnFocus = this.value;\n };\n\n onInputBlur = () => {\n this.hasFocus = false;\n setMessageHeight(this);\n if (this.valueOnFocus !== this.formattedValueObject.value) {\n this.valueOnFocus = this.formattedValueObject.value;\n this.change.emit({\n value: this.formattedValueObject.value,\n formattedValue: this.formattedValueObject.fullyFormattedValue,\n minFormattedLength: this.formattedValueObject.minFormattedLength,\n ...(this.formattedValueObject.type && { type: this.formattedValueObject.type }),\n });\n }\n };\n\n onInputInput = (event: InputEvent) => {\n event.stopPropagation();\n const newFormattedValue = this.getFormattedValue((event.target as HTMLInputElement).value, false);\n this.handleDataInput(newFormattedValue);\n };\n\n onInputPaste = (event: ClipboardEvent) => {\n if (this.type === 'currency') {\n const clipboardData = event.clipboardData.getData('text');\n const newFormattedValue = this.getFormattedValue(clipboardData, true);\n event.preventDefault();\n this.handleDataInput(newFormattedValue);\n }\n };\n\n handleDataInput(newFormattedValue: IFormatterValueObject) {\n if (\n this.maxlength === undefined ||\n newFormattedValue.unformattedValue.length <= this.maxlength ||\n newFormattedValue.unformattedValue.length <= this.formattedValueObject.unformattedValue.length\n ) {\n this.formattedValueObject = newFormattedValue;\n } else if (this.maxlength) {\n newFormattedValue = this.getFormattedValue(\n newFormattedValue.unformattedValue.substring(0, this.maxlength),\n false\n );\n this.formattedValueObject = newFormattedValue;\n }\n this.handleValueAndCursor();\n }\n\n handleValueAndCursor = () => {\n // ORDER IMPORTANT: calculate cursor position -> set value -> set cursor position\n const cursorPosition = this.calculateCursorPositionOnInput();\n // when type=number: returns only valid decimal on input event, should not update itself (e.g. typing \"1.\" )\n if (this.type !== 'number') this.inputField.value = this.formattedValueObject.formattedValue;\n this.input.emit({\n value: this.formattedValueObject.value,\n formattedValue: this.formattedValueObject.fullyFormattedValue,\n minFormattedLength: this.formattedValueObject.minFormattedLength,\n ...(this.formattedValueObject.type && { type: this.formattedValueObject.type }),\n });\n if (!this.formattedValueObject.value) {\n this.clear.emit();\n }\n this.setCursorPosition(cursorPosition);\n };\n\n onInputKeydown = (event: KeyboardEvent) => {\n const keysThatMoveCursor = ['ArrowLeft', 'ArrowRight', 'ArrowUp', 'ArrowDown', 'Home', 'End'];\n const { key } = event;\n if (this.shouldCursorStayAtEnd && keysThatMoveCursor.includes(key)) event.preventDefault();\n if (key === 'Enter' && this.valueOnFocus !== this.formattedValueObject.value) {\n this.valueOnFocus = this.formattedValueObject.value;\n this.change.emit({\n value: this.formattedValueObject.value,\n formattedValue: this.formattedValueObject.fullyFormattedValue,\n minFormattedLength: this.formattedValueObject.minFormattedLength,\n ...(this.formattedValueObject.type && { type: this.formattedValueObject.type }),\n });\n }\n };\n\n onClearInput = () => {\n const eventDetail = {\n value: '',\n formattedValue: '',\n minFormattedLength: this.formattedValueObject.minFormattedLength,\n };\n this.input.emit(eventDetail);\n this.change.emit(eventDetail);\n this.clear.emit();\n this.inputField.focus();\n };\n /////// VIEW METHODS ///////\n\n render() {\n return (\n <div class={this.wrapperClasses}>\n {labelDOM(this)}\n {this.inputContainerDOM()}\n {messagesDOM(this)}\n </div>\n );\n }\n\n get hasCustomDisplaySlot() {\n return !!this.hostElement.querySelector('[slot=custom-display]');\n }\n\n /* tslint:disable:cyclomatic-complexity */\n inputContainerDOM() {\n return (\n <div\n class=\"input-container\"\n tabindex={-1}\n test-id=\"inputContainer\"\n >\n <div class=\"input-icons-container-left\">\n {this.formattedValueObject.prefix && (\n <div class=\"input-prefix\">{this.formattedValueObject.prefix}</div>\n )}\n {this.computedIconLeft && (\n <div>\n <q2-icon\n type={this.computedIconLeft}\n class={this.computedClassForIconLeft}\n />\n </div>\n )}\n <slot name=\"input-left\" />\n {this.showIconSeparator && <div class=\"vertical-separator\" />}\n {this.hasError && this.type === 'currency' && (\n <div>\n <q2-icon\n type=\"error\"\n class=\"icon-error\"\n test-id=\"iconError\"\n />\n </div>\n )}\n </div>\n {this.pseudo ? this.pseudoInputDOM() : this.standardInputDOM()}\n <div class=\"input-icons-container-right\">\n {this.canClear && (\n <q2-btn\n class=\"btn-clear\"\n ariaLabel={loc('tecton.element.input.clear', [this.label])}\n test-id=\"clearButton\"\n onClick={this.onClearInput}\n >\n <q2-icon\n type=\"close\"\n class=\"icon-clear\"\n />\n </q2-btn>\n )}\n {['password', 'text', 'ssn', 'tin'].includes(this.type) && this.showVisibilityToggle && (\n <q2-btn\n class=\"btn-visibility-toggle\"\n test-id=\"toggleVisibilityButton\"\n onClick={this.onToggleVisibility}\n >\n {this.visibilityToggleText}\n </q2-btn>\n )}\n {this.formattedValueObject.suffix && (\n <span class=\"input-suffix\">{this.formattedValueObject.suffix}</span>\n )}\n {this.badgeValue && (\n <q2-badge\n size=\"large\"\n theme={this.badgeTheme}\n >\n {this.badgeValue}\n </q2-badge>\n )}\n {this.hasError && this.type !== 'currency' && (\n <div>\n <q2-icon\n type=\"error\"\n class=\"icon-error\"\n test-id=\"iconError\"\n />\n </div>\n )}\n {this.iconRight && !this.formattedValueObject.suffix && (\n <div>\n <q2-icon\n type={this.iconRight}\n class=\"icon-right\"\n />\n </div>\n )}\n <slot name=\"input-right\" />\n </div>\n </div>\n );\n }\n /* tslint:enable:cyclomatic-complexity */\n\n /* tslint:disable:cyclomatic-complexity */\n standardInputDOM() {\n const { hasCustomDisplaySlot } = this;\n const inputClasses = ['input-field'];\n if (hasCustomDisplaySlot) inputClasses.push('sr');\n return (\n <Fragment>\n {hasCustomDisplaySlot && (\n <div class=\"custom-display-container\">\n <slot name=\"custom-display\"></slot>\n </div>\n )}\n <input\n class={inputClasses.join(' ')}\n id={this.inputId}\n type={this.computedType}\n size={this.formattedValueObject.prefix ? 10 : undefined}\n max={this.max}\n min={this.min}\n step={this.step}\n aria-current={this.current || undefined}\n aria-describedby={this.inputDescribedBy}\n aria-required={`${!this.optional}`}\n aria-invalid={`${this.hasError}`}\n aria-controls={(this.ariaControls && `${this.ariaControls}`) || undefined}\n aria-owns={(this.ariaOwns && `${this.ariaOwns}`) || undefined}\n aria-haspopup={(this.ariaHaspopup && `${this.ariaHaspopup}`) || undefined}\n aria-expanded={(!!this.ariaExpanded && `${!!this.ariaExpanded}`) || undefined}\n aria-activedescendant={this.ariaActivedescendant && `${this.ariaActivedescendant}`}\n autocomplete={this.computedAutocomplete}\n autocapitalize={this.autocapitalize}\n autocorrect={this.autocorrect === 'on' ? 'on' : 'off'}\n autofocus={this.autofocus}\n placeholder={(this.placeholder && loc(this.placeholder)) || undefined}\n role={(this.role && `${this.role}`) || undefined}\n test-id=\"inputField\"\n readonly={!!this.readonly}\n disabled={!!this.disabled}\n onFocus={this.onInputFocus}\n onBlur={this.onInputBlur}\n onClick={this.onInputClick}\n onKeyDown={this.onInputKeydown}\n onInput={this.onInputInput}\n onPaste={this.onInputPaste}\n inputmode={this.inputMode}\n />\n </Fragment>\n );\n }\n /* tslint:enable:cyclomatic-complexity */\n\n pseudoInputDOM() {\n const showPlaceholder = !this.value && !!this.placeholder;\n return (\n <div class=\"pseudo-input-container\">\n <button\n class=\"input-field\"\n type=\"button\"\n id={this.inputId}\n aria-describedby={this.inputDescribedBy}\n aria-invalid={`${this.hasError}`}\n aria-controls={(this.ariaControls && `${this.ariaControls}`) || undefined}\n aria-owns={(this.ariaOwns && `${this.ariaOwns}`) || undefined}\n aria-haspopup={(this.ariaHaspopup && `${this.ariaHaspopup}`) || undefined}\n aria-expanded={this.ariaExpanded === 'true' ? 'true' : undefined}\n aria-activedescendant={this.ariaActivedescendant && `${this.ariaActivedescendant}`}\n role={(this.role && `${this.role}`) || undefined}\n disabled={!!this.disabled}\n test-id=\"q2InputInnerClearButton\"\n onFocus={this.onInputFocus}\n onBlur={this.onInputBlur}\n >\n <div class=\"custom-display-container\">\n <slot name=\"custom-display\">\n <span class={showPlaceholder ? 'placeholder-text' : ''}>\n {showPlaceholder ? this.placeholder : this.value}\n </span>\n </slot>\n </div>\n </button>\n </div>\n );\n }\n\n placeCursorAtEnd() {\n const { inputField } = this;\n inputField.selectionStart = inputField.selectionEnd = inputField.value.length;\n }\n\n calculateCursorPositionOnInput(): ICursorData {\n const input = this.inputField;\n const formattedLength = this.formattedValueObject.formattedValue.length;\n const currentValueLength = input.value.length;\n const defaultPosition = this.type === 'currency' ? formattedLength : 0;\n return {\n startingPosition: (input && input.selectionStart) || defaultPosition,\n valueLength: formattedLength,\n previousValueLength: input && currentValueLength,\n hasSelection: false,\n };\n }\n\n calculateCursorPositionOnFocus(): ICursorData {\n const { inputField } = this;\n const valueLength = inputField?.value?.length ?? 0;\n const startingPosition = inputField?.selectionStart ?? valueLength;\n\n return {\n startingPosition,\n valueLength,\n previousValueLength: valueLength,\n hasSelection: getSelection().toString().length > 0,\n };\n }\n\n setCursorPosition(cursorData: ICursorData) {\n if (this.canSetSelection && !cursorData.hasSelection) {\n const input = this.inputField;\n const { valueLength, previousValueLength, startingPosition } = cursorData;\n if (startingPosition === valueLength && valueLength >= previousValueLength && this.type === 'currency') {\n input.setSelectionRange(valueLength, valueLength);\n } else {\n const difference = valueLength - previousValueLength;\n // Never allow the cursor to move in reverse\n const newPosition = startingPosition + (difference > 0 ? difference : 0);\n input.setSelectionRange(newPosition, newPosition);\n }\n }\n }\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/q2-input/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EACH,SAAS,EACT,IAAI,EACJ,OAAO,EACP,KAAK,EACL,KAAK,EAEL,CAAC,EACD,KAAK,EACL,MAAM,EACN,QAAQ,EACR,MAAM,GACT,MAAM,eAAe,CAAC;AACvB,OAAO,EACH,UAAU,EACV,QAAQ,EACR,GAAG,EACH,WAAW,EACX,gBAAgB,EAChB,eAAe,EACf,aAAa,EACb,kBAAkB,EAClB,QAAQ,EACR,cAAc,EACd,SAAS,GACZ,MAAM,WAAW,CAAC;AAEnB,OAAO,cAAc,MAAM,uBAAuB,CAAC;AACnD,OAAO,iBAAiB,MAAM,oBAAoB,CAAC;AACnD,OAAO,SAAS,MAAM,kBAAkB,CAAC;A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EventEmitter,\n h,\n Watch,\n Listen,\n Fragment,\n Method,\n} from '@stencil/core';\nimport {\n createGuid,\n labelDOM,\n loc,\n messagesDOM,\n setMessageHeight,\n handleAriaLabel,\n overrideFocus,\n isEventFromElement,\n isMobile,\n hasSlotContent,\n nextPaint,\n} from 'src/utils';\nimport { IFormatterValueObject, ICursorData, IEventDetail } from './types';\nimport formatCurrency from './formatting/currency';\nimport formatPhoneNumber from './formatting/phone';\nimport formatSSN from './formatting/ssn';\nimport formatTIN from './formatting/tin';\nimport formatAlphanumeric from './formatting/alphanumeric';\nimport formatAlpha from './formatting/alpha';\nimport formatNumeric, { formatPercentage } from './formatting/numeric';\nimport formatPostalCode from './formatting/postal';\nimport formatDate from './formatting/date';\nimport formatCreditCard from './formatting/credit-card';\nimport { Q2Icon } from '../q2-icon';\nimport { Q2Badge } from '../q2-badge';\n\nconst inputTypeMap = {\n text: 'text',\n tel: 'tel',\n number: 'number',\n password: 'text',\n search: 'search',\n url: 'url',\n email: 'email',\n currency: 'text',\n phone: 'tel',\n ssn: 'text',\n alphanumeric: 'text',\n alpha: 'text',\n numeric: 'text',\n percentage: 'text',\n postal: 'text',\n date: 'text',\n 'credit-card': 'text',\n};\n\nexport type InputType = keyof typeof inputTypeMap;\n\n@Component({\n tag: 'q2-input',\n shadow: true,\n styleUrl: 'styles.scss',\n})\nexport class Q2Input {\n @Prop({ mutable: true }) value: string;\n @Prop({ reflect: true, mutable: true }) label: string;\n @Prop({ reflect: true, mutable: true }) hideLabel: boolean;\n @Prop({ reflect: true }) type: InputType = 'text';\n @Prop({ reflect: true }) placeholder: string;\n @Prop({ reflect: true }) disabled: boolean = false;\n @Prop({ reflect: true }) autocomplete: string;\n @Prop({ reflect: true }) autocorrect: 'on' | 'off';\n @Prop({ reflect: true }) autocapitalize: string;\n @Prop({ reflect: true }) autofocus: boolean;\n @Prop({ reflect: true }) hideMessages: boolean;\n @Prop({ reflect: true }) iconLeft: Q2Icon['type'];\n @Prop({ reflect: true }) iconRight: Q2Icon['type'];\n @Prop({ reflect: true }) readonly: boolean;\n @Prop({ reflect: true }) showCount: boolean;\n @Prop({ reflect: true }) clearable: boolean;\n @Prop({ reflect: true }) optional: boolean;\n @Prop({ reflect: true }) min: number;\n @Prop({ reflect: true }) max: number;\n @Prop({ reflect: true }) step: number;\n @Prop({ reflect: true }) formatModifier: string;\n @Prop({ reflect: true, mutable: true }) maxlength: number;\n @Prop({ reflect: true }) pseudo: boolean;\n @Prop({ reflect: true }) showVisibilityToggle: boolean = false;\n @Prop({ reflect: true, mutable: true }) textHidden: boolean;\n @Prop({ reflect: true }) badgeValue: string;\n @Prop({ reflect: true }) badgeTheme: Q2Badge['theme'];\n @Prop() role: string;\n @Prop() ariaControls: string;\n @Prop() ariaOwns: string;\n @Prop() ariaHaspopup: string;\n @Prop() ariaExpanded: string;\n @Prop() ariaActivedescendant: string;\n @Prop() current: 'page' | 'step' | 'location' | 'date' | 'time' | 'true' | 'false';\n\n /** @deprecated */\n @Prop({ reflect: true, mutable: true }) ariaLabel: string;\n\n @Prop() errors: string[];\n @Prop() hints: string[];\n\n @State() formattedValueObject: IFormatterValueObject;\n @State() hasFocus: boolean;\n @State() isSmall: boolean = false;\n @State() checkSlotCount: number = 0;\n\n @Element() hostElement: HTMLElement;\n\n resizeObserver: ResizeObserver;\n scheduledAfterRender: (() => void)[] = [];\n valueOnFocus: string;\n isMobile: boolean = isMobile();\n mutationObserver: MutationObserver;\n textSelectedForDeletion: boolean;\n\n /////// LIFECYCLE HOOKS ////////\n\n componentWillLoad() {\n if (isNaN(this.maxlength)) {\n this.maxlength = undefined;\n }\n this.formattedValueObject = this.getFormattedValue(this.stringValue, true);\n\n Object.defineProperty(this.hostElement, 'formattedValue', {\n get: () => this.formattedValueObject?.formattedValue ?? '',\n });\n\n handleAriaLabel(this);\n if (this.textHidden === undefined) {\n this.textHidden = this.type === 'password';\n }\n\n this.manageClearableResizeObserver(this.clearable);\n }\n\n componentDidLoad() {\n if (!this.pseudo) {\n this.inputField.value = this.formattedValueObject.formattedValue;\n }\n\n if (this.autofocus === true) {\n this.inputField.focus();\n }\n\n overrideFocus(this.hostElement);\n const observer = new MutationObserver(this.onMutationObserved);\n observer.observe(this.hostElement, { childList: true });\n this.mutationObserver = observer;\n }\n\n componentDidRender() {\n this.scheduledAfterRender.forEach(fn => fn());\n this.scheduledAfterRender = [];\n }\n\n disconnectedCallback() {\n this.manageClearableResizeObserver();\n this.mutationObserver?.disconnect();\n this.mutationObserver = null;\n }\n\n onMutationObserved = () => {\n // Updating checkSlotCount to force re-render when slot content changes\n this.checkSlotCount = this.checkSlotCount + 1;\n };\n\n getFormattedValue(value: string, valueChangedFromProperty: boolean): IFormatterValueObject {\n const formattingFunctions = {\n currency: formatCurrency,\n phone: formatPhoneNumber,\n ssn: formatSSN,\n tin: formatTIN,\n alphanumeric: formatAlphanumeric,\n alpha: formatAlpha,\n numeric: formatNumeric,\n percentage: formatPercentage,\n postal: formatPostalCode,\n date: formatDate,\n 'credit-card': formatCreditCard.format,\n };\n\n if (formattingFunctions[this.type]) {\n return formattingFunctions[this.type](value, this.formatModifier, valueChangedFromProperty);\n }\n\n return {\n value,\n formattedValue: value,\n fullyFormattedValue: value,\n formattingCharacterCount: 0,\n unformattedValue: value,\n };\n }\n\n get hasCustomDisplaySlot() {\n return !!this.hostElement.querySelector('[slot=custom-display]');\n }\n\n get canClear() {\n return this.clearable && !!(this.inputField?.value || this.value);\n }\n\n get shouldCursorStayAtEnd() {\n return this.isMobile && this.type === 'currency';\n }\n\n get hasError() {\n return Array.isArray(this.errors) && this.errors.length > 0;\n }\n\n get messages(): string[] {\n return (\n (this.errors && this.errors.length > 0 && this.errors) ||\n (this.hints && this.hints.length > 0 && this.hints) ||\n []\n );\n }\n\n get inputField() {\n return this.hostElement.shadowRoot.querySelector<HTMLInputElement>('.input-field');\n }\n\n get showMessages() {\n return this.messages.length > 0 && !this.hideMessages;\n }\n\n guid = createGuid();\n\n get inputId() {\n return `input-guid-${this.guid}`;\n }\n\n get inputDescribedBy() {\n return this.showMessages ? `${this.inputId}-description` : undefined;\n }\n\n get hasInputLeftSlot() {\n return hasSlotContent(this.hostElement, 'input-left');\n }\n\n get hasInputRightSlot() {\n return hasSlotContent(this.hostElement, 'input-right');\n }\n\n get isMaskedType(): boolean {\n const maskedTypes: string[] = [\n 'currency',\n 'phone',\n 'ssn',\n 'tin',\n 'alphanumeric',\n 'alpha',\n 'numeric',\n 'percentage',\n 'postal',\n 'date',\n 'credit-card',\n ];\n\n return maskedTypes.includes(this.type);\n }\n\n get wrapperClasses() {\n const classNames = ['field-container'];\n if (this.hasError) classNames.push('has-error');\n if (!!this.value) classNames.push('has-value');\n if (this.clearable && !!this.value) classNames.push('has-clear');\n if (this.hasFocus) classNames.push('has-focus');\n if (this.isSmall) classNames.push('is-small');\n if (this.formattedValueObject.prefix) classNames.push('has-prefix');\n if (this.computedIconLeft) classNames.push('has-icon-left');\n if (this.showIconSeparator) classNames.push('has-icon-separator');\n if (this.formattedValueObject.suffix) classNames.push('has-suffix');\n if (!this.formattedValueObject.suffix && this.iconRight) classNames.push('has-icon-right');\n if (this.type === 'currency') classNames.push('right-aligned');\n else classNames.push('left-aligned');\n if (this.hasCustomDisplaySlot) classNames.push('has-custom-display');\n\n return classNames.join(' ');\n }\n\n get computedType() {\n if (['password', 'text', 'ssn'].includes(this.type) && this.textHidden) {\n return 'password';\n } else {\n return (this.type && inputTypeMap[this.type]) || 'text';\n }\n }\n\n get computedAutocomplete() {\n // force off for currency type\n if (this.type === 'currency') return 'transaction-amount';\n return this.autocomplete || 'off';\n }\n\n get computedIconLeft(): string | undefined {\n if (this.formattedValueObject.prefix) {\n return;\n }\n\n if (this.type === 'search') {\n return 'search';\n }\n\n if (this.formattedValueObject.leftIcon) {\n return this.formattedValueObject.leftIcon;\n }\n\n return this.iconLeft;\n }\n\n get showIconSeparator(): boolean {\n return this.type === 'credit-card' || !!this.formattedValueObject.prefix;\n }\n\n get computedClassForIconLeft(): string | undefined {\n let className = 'icon-left';\n if (this.formattedValueObject.leftIconMuted) {\n className += ' icon-left-muted';\n }\n return className;\n }\n\n get stringValue(): string {\n return (this.value && String(this.value)) || '';\n }\n\n get canSetSelection(): boolean {\n // email and number type don't support setSelectionRange\n return !['email', 'number'].includes(this.computedType);\n }\n\n get visibilityToggleText(): string {\n return loc(`tecton.element.input.toggle.${this.textHidden ? 'show' : 'hide'}`);\n }\n\n formatAndUpdateValueFromProp() {\n this.formattedValueObject = this.getFormattedValue(this.stringValue, true);\n\n if (!this.pseudo) {\n const setValue = () => {\n this.inputField.value = this.formattedValueObject.formattedValue;\n };\n\n this.inputField ? setValue() : this.scheduledAfterRender.push(() => setValue());\n }\n }\n\n get inputMode() {\n const inputModeMap = {\n currency: 'numeric',\n ssn: 'numeric',\n tin: 'numeric',\n numeric: 'decimal',\n percentage: 'decimal',\n postal: 'numeric',\n date: 'numeric',\n 'credit-card': 'numeric',\n };\n\n return (this.type && inputModeMap[this.type]) || undefined;\n }\n\n //////// OBSERVERS //////////\n\n @Watch('clearable')\n manageClearableResizeObserver(clearable?: boolean) {\n const isSmallThreshold = 190;\n if (clearable) {\n if (this.resizeObserver) return;\n this.resizeObserver = new ResizeObserver(([entry]) => {\n this.isSmall = isSmallThreshold > entry.contentRect.width;\n });\n this.resizeObserver.observe(this.hostElement);\n } else {\n this.isSmall = false;\n this.resizeObserver?.unobserve(this.hostElement);\n this.resizeObserver = null;\n }\n }\n\n @Watch('ariaLabel')\n ariaLabelObserver() {\n handleAriaLabel(this);\n }\n\n @Watch('value')\n valueObserver() {\n this.formatAndUpdateValueFromProp();\n }\n\n @Watch('formattedValueObject')\n formattedValueObjectObserver() {\n this.formatted.emit(this.formattedValueObject);\n }\n\n @Watch('type')\n typeObserver() {\n this.formatAndUpdateValueFromProp();\n }\n\n @Watch('formatModifier')\n formatModifierObserver() {\n this.formatAndUpdateValueFromProp();\n }\n\n @Watch('hints')\n hintsObserver() {\n this.hasFocus && this.scheduledAfterRender.push(() => setMessageHeight(this));\n }\n\n @Watch('errors')\n errorsObserver() {\n this.hasFocus && this.scheduledAfterRender.push(() => setMessageHeight(this));\n }\n\n /// Methods ///\n /**\n * Emulates focusing the `<input>`, entering the provided value, and emitting an `input` event.\n *\n * This method leaves the focus on the `<input>` and as a result does not trigger the `change` event. If you want\n * to trigger the` change` event, move the focus to another element after calling this method.\n *\n * @testOnly\n */\n @Method()\n setValue(value: string) {\n const { inputField } = this;\n inputField.focus();\n inputField.dispatchEvent(new FocusEvent('focus'));\n inputField.value = value;\n inputField.dispatchEvent(new InputEvent('input'));\n }\n\n /**\n * Emulates clicking the clear button when the input is clearable.\n *\n * @warning\n * Only applicable when the input is clearable.\n *\n * @testOnly\n */\n @Method()\n clearValue() {\n if (!this.clearable) return;\n this.onClearInput();\n }\n\n ///////// HOST ELEMENT EVENTS //////\n @Listen('focus')\n onHostElementFocus(event) {\n if (!isEventFromElement(event, this.hostElement)) return;\n this.inputField.focus();\n }\n\n @Listen('change')\n onHostElementChange(event: CustomEvent) {\n event.stopPropagation();\n if (event.target === this.hostElement && !this.hostElement.onchange) {\n this.value = event.detail.value;\n }\n }\n\n ///////// Events /////////\n\n @Event() input: EventEmitter<IEventDetail>;\n @Event() change: EventEmitter<IEventDetail>;\n @Event() clear: EventEmitter<IEventDetail>;\n @Event() formatted: EventEmitter<IEventDetail>;\n\n ///// ACTIONS ////////\n\n onToggleVisibility = () => {\n this.hostElement.dispatchEvent(new FocusEvent('focus'));\n this.textHidden = !this.textHidden;\n };\n\n onInputClick = () => {\n if (this.shouldCursorStayAtEnd) this.placeCursorAtEnd();\n };\n\n onInputFocus = () => {\n if (this.inputField.tagName === 'INPUT') {\n this.scheduledAfterRender.push(() =>\n this.shouldCursorStayAtEnd\n ? this.placeCursorAtEnd()\n : this.setCursorPosition(this.calculateCursorPositionOnFocus())\n );\n }\n this.hasFocus = true;\n setMessageHeight(this);\n this.valueOnFocus = this.value;\n };\n\n onInputBlur = () => {\n this.hasFocus = false;\n setMessageHeight(this);\n if (this.valueOnFocus !== this.formattedValueObject.value) {\n this.valueOnFocus = this.formattedValueObject.value;\n this.change.emit({\n value: this.formattedValueObject.value,\n formattedValue: this.formattedValueObject.fullyFormattedValue,\n minFormattedLength: this.formattedValueObject.minFormattedLength,\n ...(this.formattedValueObject.type && { type: this.formattedValueObject.type }),\n });\n }\n };\n\n onInputInput = (event: InputEvent) => {\n event.stopPropagation();\n\n if (this.type === 'currency') this.handleCurrencyDeletion(event);\n const newFormattedValue = this.getFormattedValue((event.target as HTMLInputElement).value, false);\n this.handleDataInput(newFormattedValue);\n };\n\n handleCurrencyDeletion(event: InputEvent) {\n // Don't do anything if text was selected for deletion\n if (this.textSelectedForDeletion) {\n this.textSelectedForDeletion = false;\n return;\n }\n // We only care about \"Backspace\" and \"Delete\" events\n if (event.inputType !== 'deleteContentBackward' && event.inputType !== 'deleteContentForward') return;\n\n const input = event.target as HTMLInputElement;\n const cursorPosition = input.selectionStart;\n const { formattedValue } = this.formattedValueObject;\n\n if (cursorPosition === null) return;\n\n let cursorMap;\n switch (event.inputType) {\n case 'deleteContentBackward':\n const valueBeforeCursor = formattedValue.substring(0, cursorPosition + 1);\n const isPrevCharAlphaNum = /[a-zA-Z0-9]$/.test(valueBeforeCursor);\n cursorMap = {\n leftIndex: isPrevCharAlphaNum ? cursorPosition : cursorPosition - 1,\n rightIndex: isPrevCharAlphaNum ? cursorPosition + 1 : cursorPosition,\n afterCursorOffset: 0,\n newCursorOffset: 1,\n };\n break;\n case 'deleteContentForward':\n const valueAfterCursor = formattedValue.substring(cursorPosition);\n const isNextCharAlphaNum = /^[a-zA-Z0-9]/.test(valueAfterCursor);\n cursorMap = {\n leftIndex: isNextCharAlphaNum ? cursorPosition : cursorPosition + 1,\n rightIndex: isNextCharAlphaNum ? cursorPosition + 1 : cursorPosition + 2,\n afterCursorOffset: 1,\n newCursorOffset: 0,\n };\n break;\n default:\n return;\n }\n\n // Ensure the cursor doesn't move with a newly formatted value\n const newValue = [\n formattedValue.substring(0, cursorMap.leftIndex),\n formattedValue.substring(cursorMap.rightIndex),\n ].join('');\n const charactersAfterCursor = formattedValue.length - cursorPosition - cursorMap.afterCursorOffset;\n const newFormattedValue = this.getFormattedValue(newValue, false).formattedValue;\n const newCursorPosition = Math.max(\n newFormattedValue.length - charactersAfterCursor + cursorMap.newCursorOffset,\n 0\n );\n\n input.value = newFormattedValue;\n input.setSelectionRange(newCursorPosition, newCursorPosition);\n\n // This handles a runtime issue when a character is deleted from the beginning of the input\n if (newCursorPosition === 0) {\n nextPaint(() => input.setSelectionRange(newCursorPosition, newCursorPosition));\n }\n }\n\n onInputPaste = (event: ClipboardEvent) => {\n if (this.type === 'currency') {\n const clipboardData = event.clipboardData.getData('text');\n const newFormattedValue = this.getFormattedValue(clipboardData, true);\n event.preventDefault();\n this.handleDataInput(newFormattedValue);\n }\n };\n\n handleDataInput(newFormattedValue: IFormatterValueObject) {\n if (\n this.maxlength === undefined ||\n newFormattedValue.unformattedValue.length <= this.maxlength ||\n newFormattedValue.unformattedValue.length <= this.formattedValueObject.unformattedValue.length\n ) {\n this.formattedValueObject = newFormattedValue;\n } else if (this.maxlength) {\n newFormattedValue = this.getFormattedValue(\n newFormattedValue.unformattedValue.substring(0, this.maxlength),\n false\n );\n this.formattedValueObject = newFormattedValue;\n }\n this.handleValueAndCursor();\n }\n\n handleValueAndCursor = () => {\n // ORDER IMPORTANT: calculate cursor position -> set value -> set cursor position\n const cursorPosition = this.calculateCursorPositionOnInput();\n // when type=number: returns only valid decimal on input event, should not update itself (e.g. typing \"1.\" )\n if (this.type !== 'number') this.inputField.value = this.formattedValueObject.formattedValue;\n this.input.emit({\n value: this.formattedValueObject.value,\n formattedValue: this.formattedValueObject.fullyFormattedValue,\n minFormattedLength: this.formattedValueObject.minFormattedLength,\n ...(this.formattedValueObject.type && { type: this.formattedValueObject.type }),\n });\n if (!this.formattedValueObject.value) {\n this.clear.emit();\n }\n this.setCursorPosition(cursorPosition);\n };\n\n // Sets textSelectedForDeletion to true if the user has selected text for deletion\n // This is used to prevent other logic from running when text is deleted\n handleCurrencyKeydown = (event: KeyboardEvent) => {\n if (event.key !== 'Backspace' && event.key !== 'Delete') return;\n const inputElement = this.inputField;\n this.textSelectedForDeletion = inputElement.selectionStart !== inputElement.selectionEnd;\n };\n\n onInputKeydown = (event: KeyboardEvent) => {\n const keysThatMoveCursor = ['ArrowLeft', 'ArrowRight', 'ArrowUp', 'ArrowDown', 'Home', 'End'];\n const { key } = event;\n\n if (this.type === 'currency') this.handleCurrencyKeydown(event);\n if (this.shouldCursorStayAtEnd && keysThatMoveCursor.includes(key)) event.preventDefault();\n if (key === 'Enter' && this.valueOnFocus !== this.formattedValueObject.value) {\n this.valueOnFocus = this.formattedValueObject.value;\n this.change.emit({\n value: this.formattedValueObject.value,\n formattedValue: this.formattedValueObject.fullyFormattedValue,\n minFormattedLength: this.formattedValueObject.minFormattedLength,\n ...(this.formattedValueObject.type && { type: this.formattedValueObject.type }),\n });\n }\n };\n\n onClearInput = () => {\n const eventDetail = {\n value: '',\n formattedValue: '',\n minFormattedLength: this.formattedValueObject.minFormattedLength,\n };\n this.input.emit(eventDetail);\n this.change.emit(eventDetail);\n this.clear.emit();\n this.inputField.focus();\n };\n\n /////// VIEW METHODS ///////\n\n render() {\n return (\n <div class={this.wrapperClasses}>\n <div class=\"label-wrapper\">\n {labelDOM(this)}\n {this.countDOM()}\n </div>\n {this.inputContainerDOM()}\n {messagesDOM(this)}\n </div>\n );\n }\n\n countDOM() {\n if (!this.showCount) return;\n const { maxlength, formattedValueObject } = this;\n\n return (\n <div class=\"count-tag\">\n {formattedValueObject.unformattedValue.length}\n {maxlength && `/${maxlength}`}\n </div>\n );\n }\n\n /* tslint:disable:cyclomatic-complexity */\n inputContainerDOM() {\n const { hasInputLeftSlot, hasInputRightSlot } = this;\n return (\n <div\n class=\"input-container\"\n tabindex={-1}\n test-id=\"inputContainer\"\n >\n <div class=\"input-icons-container-left\">\n {this.formattedValueObject.prefix && (\n <div class=\"input-prefix\">{this.formattedValueObject.prefix}</div>\n )}\n {this.computedIconLeft && (\n <div>\n <q2-icon\n type={this.computedIconLeft}\n class={this.computedClassForIconLeft}\n />\n </div>\n )}\n {hasInputLeftSlot && <slot name=\"input-left\" />}\n {this.showIconSeparator && <div class=\"vertical-separator\" />}\n {this.hasError && this.type === 'currency' && (\n <div>\n <q2-icon\n type=\"error\"\n class=\"icon-error\"\n test-id=\"iconError\"\n />\n </div>\n )}\n </div>\n {this.pseudo ? this.pseudoInputDOM() : this.standardInputDOM()}\n <div class=\"input-icons-container-right\">\n {this.canClear && (\n <q2-btn\n class=\"btn-clear\"\n ariaLabel={loc('tecton.element.input.clear', [this.label])}\n test-id=\"clearButton\"\n onClick={this.onClearInput}\n >\n <q2-icon\n type=\"close\"\n class=\"icon-clear\"\n />\n </q2-btn>\n )}\n {['password', 'text', 'ssn', 'tin'].includes(this.type) && this.showVisibilityToggle && (\n <q2-btn\n class=\"btn-visibility-toggle\"\n test-id=\"toggleVisibilityButton\"\n onClick={this.onToggleVisibility}\n >\n {this.visibilityToggleText}\n </q2-btn>\n )}\n {this.formattedValueObject.suffix && (\n <span class=\"input-suffix\">{this.formattedValueObject.suffix}</span>\n )}\n {this.badgeValue && (\n <q2-badge\n size=\"large\"\n theme={this.badgeTheme}\n >\n {this.badgeValue}\n </q2-badge>\n )}\n {this.hasError && this.type !== 'currency' && (\n <div>\n <q2-icon\n type=\"error\"\n class=\"icon-error\"\n test-id=\"iconError\"\n />\n </div>\n )}\n {this.iconRight && !this.formattedValueObject.suffix && (\n <div>\n <q2-icon\n type={this.iconRight}\n class=\"icon-right\"\n />\n </div>\n )}\n {hasInputRightSlot && <slot name=\"input-right\" />}\n </div>\n </div>\n );\n }\n /* tslint:enable:cyclomatic-complexity */\n\n /* tslint:disable:cyclomatic-complexity */\n standardInputDOM() {\n const { hasCustomDisplaySlot } = this;\n const inputClasses = ['input-field'];\n if (hasCustomDisplaySlot) inputClasses.push('sr');\n return (\n <Fragment>\n {hasCustomDisplaySlot && (\n <div class=\"custom-display-container\">\n <slot name=\"custom-display\"></slot>\n </div>\n )}\n <input\n class={inputClasses.join(' ')}\n id={this.inputId}\n type={this.computedType}\n size={this.formattedValueObject.prefix ? 10 : undefined}\n max={this.max}\n min={this.min}\n step={this.step}\n aria-current={this.current || undefined}\n aria-describedby={this.inputDescribedBy}\n aria-required={`${!this.optional}`}\n aria-invalid={`${this.hasError}`}\n aria-controls={(this.ariaControls && `${this.ariaControls}`) || undefined}\n aria-owns={(this.ariaOwns && `${this.ariaOwns}`) || undefined}\n aria-haspopup={(this.ariaHaspopup && `${this.ariaHaspopup}`) || undefined}\n aria-expanded={(!!this.ariaExpanded && `${!!this.ariaExpanded}`) || undefined}\n aria-activedescendant={this.ariaActivedescendant && `${this.ariaActivedescendant}`}\n autocomplete={this.computedAutocomplete}\n autocapitalize={this.autocapitalize}\n autocorrect={this.autocorrect === 'on' ? 'on' : 'off'}\n autofocus={this.autofocus}\n placeholder={(this.placeholder && loc(this.placeholder)) || undefined}\n role={(this.role && `${this.role}`) || undefined}\n test-id=\"inputField\"\n readonly={!!this.readonly}\n disabled={!!this.disabled}\n onFocus={this.onInputFocus}\n onBlur={this.onInputBlur}\n onClick={this.onInputClick}\n onKeyDown={this.onInputKeydown}\n onInput={this.onInputInput}\n onPaste={this.onInputPaste}\n inputmode={this.inputMode}\n />\n </Fragment>\n );\n }\n /* tslint:enable:cyclomatic-complexity */\n\n pseudoInputDOM() {\n const showPlaceholder = !this.value && !!this.placeholder;\n return (\n <div class=\"pseudo-input-container\">\n <button\n class=\"input-field\"\n type=\"button\"\n id={this.inputId}\n aria-describedby={this.inputDescribedBy}\n aria-invalid={`${this.hasError}`}\n aria-controls={(this.ariaControls && `${this.ariaControls}`) || undefined}\n aria-owns={(this.ariaOwns && `${this.ariaOwns}`) || undefined}\n aria-haspopup={(this.ariaHaspopup && `${this.ariaHaspopup}`) || undefined}\n aria-expanded={this.ariaExpanded === 'true' ? 'true' : undefined}\n aria-activedescendant={this.ariaActivedescendant && `${this.ariaActivedescendant}`}\n role={(this.role && `${this.role}`) || undefined}\n disabled={!!this.disabled}\n test-id=\"q2InputInnerClearButton\"\n onFocus={this.onInputFocus}\n onBlur={this.onInputBlur}\n >\n <div class=\"custom-display-container\">\n <slot name=\"custom-display\">\n <span class={showPlaceholder ? 'placeholder-text' : ''}>\n {showPlaceholder ? this.placeholder : this.value}\n </span>\n </slot>\n </div>\n </button>\n </div>\n );\n }\n\n placeCursorAtEnd() {\n const { inputField } = this;\n inputField.selectionStart = inputField.selectionEnd = inputField.value.length;\n }\n\n calculateCursorPositionOnInput(): ICursorData {\n const input = this.inputField;\n const formattedLength = this.formattedValueObject.formattedValue.length;\n const currentValueLength = input.value.length;\n const defaultPosition = this.type === 'currency' ? formattedLength : 0;\n return {\n startingPosition: (input && input.selectionStart) || defaultPosition,\n valueLength: formattedLength,\n previousValueLength: input && currentValueLength,\n hasSelection: false,\n };\n }\n\n calculateCursorPositionOnFocus(): ICursorData {\n const { inputField } = this;\n const valueLength = inputField?.value?.length ?? 0;\n const startingPosition = inputField?.selectionStart ?? valueLength;\n\n return {\n startingPosition,\n valueLength,\n previousValueLength: valueLength,\n hasSelection: getSelection().toString().length > 0,\n };\n }\n\n setCursorPosition(cursorData: ICursorData) {\n if (this.canSetSelection && !cursorData.hasSelection) {\n const input = this.inputField;\n const { valueLength, previousValueLength, startingPosition } = cursorData;\n\n if (this.type === 'currency') {\n if (previousValueLength - valueLength === 1) {\n input.setSelectionRange(startingPosition - 1, startingPosition - 1);\n } else {\n const difference = previousValueLength - valueLength;\n input.setSelectionRange(startingPosition - difference, startingPosition - difference);\n }\n }\n\n if (this.type !== 'currency') {\n const difference = valueLength - previousValueLength;\n // Never allow the cursor to move in reverse\n const newPosition = startingPosition + (difference > 0 ? difference : 0);\n input.setSelectionRange(newPosition, newPosition);\n }\n }\n }\n}\n"]}