@haiilo/catalyst 8.1.1 → 8.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (374) hide show
  1. package/dist/catalyst/catalyst.css +3 -9
  2. package/dist/catalyst/catalyst.esm.js +1 -1
  3. package/dist/catalyst/catalyst.esm.js.map +1 -1
  4. package/dist/catalyst/index.esm.js +2 -2
  5. package/dist/catalyst/{p-85d057f0.js → p-6ae13953.js} +1 -1
  6. package/dist/catalyst/p-6cd4fa1e.js +3 -0
  7. package/dist/catalyst/p-6cd4fa1e.js.map +1 -0
  8. package/dist/catalyst/p-a05fbea3.entry.js +10 -0
  9. package/dist/catalyst/p-a05fbea3.entry.js.map +1 -0
  10. package/dist/catalyst/scss/core/_dialog.scss +1 -1
  11. package/dist/catalyst/scss/core/_form.scss +1 -1
  12. package/dist/catalyst/scss/core/_typography.scss +1 -7
  13. package/dist/cjs/cat-alert_26.cjs.entry.js +3899 -3883
  14. package/dist/cjs/cat-alert_26.cjs.entry.js.map +1 -1
  15. package/dist/cjs/catalyst.cjs.js +3 -3
  16. package/dist/cjs/catalyst.cjs.js.map +1 -1
  17. package/dist/cjs/{index-1e7eef7e.js → index-eb056d5e.js} +51 -13
  18. package/dist/cjs/index-eb056d5e.js.map +1 -0
  19. package/dist/cjs/index.cjs.js +73 -73
  20. package/dist/cjs/index.cjs.js.map +1 -1
  21. package/dist/cjs/loader.cjs.js +2 -2
  22. package/dist/cjs/{of-395b2f57.js → of-2b7161d2.js} +155 -155
  23. package/dist/cjs/of-2b7161d2.js.map +1 -0
  24. package/dist/collection/collection-manifest.json +1 -1
  25. package/dist/collection/components/cat-alert/cat-alert.e2e.js +7 -7
  26. package/dist/collection/components/cat-alert/cat-alert.e2e.js.map +1 -1
  27. package/dist/collection/components/cat-alert/cat-alert.js +98 -98
  28. package/dist/collection/components/cat-alert/cat-alert.js.map +1 -1
  29. package/dist/collection/components/cat-alert/cat-alert.spec.js +7 -7
  30. package/dist/collection/components/cat-alert/cat-alert.spec.js.map +1 -1
  31. package/dist/collection/components/cat-avatar/cat-avatar.e2e.js +6 -6
  32. package/dist/collection/components/cat-avatar/cat-avatar.e2e.js.map +1 -1
  33. package/dist/collection/components/cat-avatar/cat-avatar.js +218 -218
  34. package/dist/collection/components/cat-avatar/cat-avatar.js.map +1 -1
  35. package/dist/collection/components/cat-avatar/cat-avatar.spec.js +7 -7
  36. package/dist/collection/components/cat-avatar/cat-avatar.spec.js.map +1 -1
  37. package/dist/collection/components/cat-badge/cat-badge.e2e.js +6 -6
  38. package/dist/collection/components/cat-badge/cat-badge.e2e.js.map +1 -1
  39. package/dist/collection/components/cat-badge/cat-badge.js +117 -117
  40. package/dist/collection/components/cat-badge/cat-badge.js.map +1 -1
  41. package/dist/collection/components/cat-badge/cat-badge.spec.js +7 -7
  42. package/dist/collection/components/cat-badge/cat-badge.spec.js.map +1 -1
  43. package/dist/collection/components/cat-button/cat-button.css +2 -1
  44. package/dist/collection/components/cat-button/cat-button.e2e.js +6 -6
  45. package/dist/collection/components/cat-button/cat-button.e2e.js.map +1 -1
  46. package/dist/collection/components/cat-button/cat-button.js +693 -693
  47. package/dist/collection/components/cat-button/cat-button.js.map +1 -1
  48. package/dist/collection/components/cat-button/cat-button.spec.js +7 -7
  49. package/dist/collection/components/cat-button/cat-button.spec.js.map +1 -1
  50. package/dist/collection/components/cat-button-group/cat-button-group.e2e.js +6 -6
  51. package/dist/collection/components/cat-button-group/cat-button-group.e2e.js.map +1 -1
  52. package/dist/collection/components/cat-button-group/cat-button-group.js +47 -47
  53. package/dist/collection/components/cat-button-group/cat-button-group.js.map +1 -1
  54. package/dist/collection/components/cat-button-group/cat-button-group.spec.js +7 -7
  55. package/dist/collection/components/cat-button-group/cat-button-group.spec.js.map +1 -1
  56. package/dist/collection/components/cat-card/cat-card.e2e.js +6 -6
  57. package/dist/collection/components/cat-card/cat-card.e2e.js.map +1 -1
  58. package/dist/collection/components/cat-card/cat-card.js +15 -15
  59. package/dist/collection/components/cat-card/cat-card.js.map +1 -1
  60. package/dist/collection/components/cat-card/cat-card.spec.js +7 -7
  61. package/dist/collection/components/cat-card/cat-card.spec.js.map +1 -1
  62. package/dist/collection/components/cat-checkbox/cat-checkbox.css +2 -1
  63. package/dist/collection/components/cat-checkbox/cat-checkbox.e2e.js +6 -6
  64. package/dist/collection/components/cat-checkbox/cat-checkbox.e2e.js.map +1 -1
  65. package/dist/collection/components/cat-checkbox/cat-checkbox.js +441 -441
  66. package/dist/collection/components/cat-checkbox/cat-checkbox.js.map +1 -1
  67. package/dist/collection/components/cat-checkbox/cat-checkbox.spec.js +7 -7
  68. package/dist/collection/components/cat-checkbox/cat-checkbox.spec.js.map +1 -1
  69. package/dist/collection/components/cat-datepicker/cat-datepicker.config.js +62 -62
  70. package/dist/collection/components/cat-datepicker/cat-datepicker.config.js.map +1 -1
  71. package/dist/collection/components/cat-datepicker/cat-datepicker.e2e.js +7 -7
  72. package/dist/collection/components/cat-datepicker/cat-datepicker.e2e.js.map +1 -1
  73. package/dist/collection/components/cat-datepicker/cat-datepicker.format.js +20 -20
  74. package/dist/collection/components/cat-datepicker/cat-datepicker.format.js.map +1 -1
  75. package/dist/collection/components/cat-datepicker/cat-datepicker.js +720 -707
  76. package/dist/collection/components/cat-datepicker/cat-datepicker.js.map +1 -1
  77. package/dist/collection/components/cat-datepicker/cat-datepicker.locale.js +39 -39
  78. package/dist/collection/components/cat-datepicker/cat-datepicker.locale.js.map +1 -1
  79. package/dist/collection/components/cat-datepicker/cat-datepicker.spec.js +7 -7
  80. package/dist/collection/components/cat-datepicker/cat-datepicker.spec.js.map +1 -1
  81. package/dist/collection/components/cat-datepicker-inline/cat-datepicker-inline.e2e.js +7 -7
  82. package/dist/collection/components/cat-datepicker-inline/cat-datepicker-inline.e2e.js.map +1 -1
  83. package/dist/collection/components/cat-datepicker-inline/cat-datepicker-inline.js +244 -244
  84. package/dist/collection/components/cat-datepicker-inline/cat-datepicker-inline.js.map +1 -1
  85. package/dist/collection/components/cat-datepicker-inline/cat-datepicker-inline.spec.js +7 -7
  86. package/dist/collection/components/cat-datepicker-inline/cat-datepicker-inline.spec.js.map +1 -1
  87. package/dist/collection/components/cat-dropdown/cat-dropdown.e2e.js +6 -6
  88. package/dist/collection/components/cat-dropdown/cat-dropdown.e2e.js.map +1 -1
  89. package/dist/collection/components/cat-dropdown/cat-dropdown.js +300 -300
  90. package/dist/collection/components/cat-dropdown/cat-dropdown.js.map +1 -1
  91. package/dist/collection/components/cat-dropdown/cat-dropdown.spec.js +7 -7
  92. package/dist/collection/components/cat-dropdown/cat-dropdown.spec.js.map +1 -1
  93. package/dist/collection/components/cat-form-group/cat-form-group.e2e.js +6 -6
  94. package/dist/collection/components/cat-form-group/cat-form-group.e2e.js.map +1 -1
  95. package/dist/collection/components/cat-form-group/cat-form-group.js +107 -107
  96. package/dist/collection/components/cat-form-group/cat-form-group.js.map +1 -1
  97. package/dist/collection/components/cat-form-group/cat-form-group.spec.js +7 -7
  98. package/dist/collection/components/cat-form-group/cat-form-group.spec.js.map +1 -1
  99. package/dist/collection/components/cat-form-hint/cat-form-hint.js +9 -9
  100. package/dist/collection/components/cat-form-hint/cat-form-hint.js.map +1 -1
  101. package/dist/collection/components/cat-form-hint/cat-form-hint.spec.js +7 -7
  102. package/dist/collection/components/cat-form-hint/cat-form-hint.spec.js.map +1 -1
  103. package/dist/collection/components/cat-i18n/cat-i18n-registry.js +71 -71
  104. package/dist/collection/components/cat-i18n/cat-i18n-registry.js.map +1 -1
  105. package/dist/collection/components/cat-i18n/cat-i18n-registry.spec.js +3 -3
  106. package/dist/collection/components/cat-i18n/cat-i18n-registry.spec.js.map +1 -1
  107. package/dist/collection/components/cat-icon/cat-icon-registry.js +77 -77
  108. package/dist/collection/components/cat-icon/cat-icon-registry.js.map +1 -1
  109. package/dist/collection/components/cat-icon/cat-icon-registry.spec.js +3 -3
  110. package/dist/collection/components/cat-icon/cat-icon-registry.spec.js.map +1 -1
  111. package/dist/collection/components/cat-icon/cat-icon.e2e.js +7 -7
  112. package/dist/collection/components/cat-icon/cat-icon.e2e.js.map +1 -1
  113. package/dist/collection/components/cat-icon/cat-icon.js +97 -97
  114. package/dist/collection/components/cat-icon/cat-icon.js.map +1 -1
  115. package/dist/collection/components/cat-icon/cat-icon.spec.js +7 -7
  116. package/dist/collection/components/cat-icon/cat-icon.spec.js.map +1 -1
  117. package/dist/collection/components/cat-input/cat-input.e2e.js +7 -7
  118. package/dist/collection/components/cat-input/cat-input.e2e.js.map +1 -1
  119. package/dist/collection/components/cat-input/cat-input.js +768 -768
  120. package/dist/collection/components/cat-input/cat-input.js.map +1 -1
  121. package/dist/collection/components/cat-input/cat-input.spec.js +7 -7
  122. package/dist/collection/components/cat-input/cat-input.spec.js.map +1 -1
  123. package/dist/collection/components/cat-notification/cat-notification.js +59 -59
  124. package/dist/collection/components/cat-notification/cat-notification.js.map +1 -1
  125. package/dist/collection/components/cat-notification/cat-notification.spec.js +3 -3
  126. package/dist/collection/components/cat-notification/cat-notification.spec.js.map +1 -1
  127. package/dist/collection/components/cat-pagination/cat-pagination.e2e.js +10 -10
  128. package/dist/collection/components/cat-pagination/cat-pagination.e2e.js.map +1 -1
  129. package/dist/collection/components/cat-pagination/cat-pagination.js +274 -274
  130. package/dist/collection/components/cat-pagination/cat-pagination.js.map +1 -1
  131. package/dist/collection/components/cat-pagination/cat-pagination.spec.js +7 -7
  132. package/dist/collection/components/cat-pagination/cat-pagination.spec.js.map +1 -1
  133. package/dist/collection/components/cat-radio/cat-radio.e2e.js +6 -6
  134. package/dist/collection/components/cat-radio/cat-radio.e2e.js.map +1 -1
  135. package/dist/collection/components/cat-radio/cat-radio.js +378 -378
  136. package/dist/collection/components/cat-radio/cat-radio.js.map +1 -1
  137. package/dist/collection/components/cat-radio/cat-radio.spec.js +7 -7
  138. package/dist/collection/components/cat-radio/cat-radio.spec.js.map +1 -1
  139. package/dist/collection/components/cat-radio-group/cat-radio-group.e2e.js +6 -6
  140. package/dist/collection/components/cat-radio-group/cat-radio-group.e2e.js.map +1 -1
  141. package/dist/collection/components/cat-radio-group/cat-radio-group.js +278 -278
  142. package/dist/collection/components/cat-radio-group/cat-radio-group.js.map +1 -1
  143. package/dist/collection/components/cat-radio-group/cat-radio-group.spec.js +7 -7
  144. package/dist/collection/components/cat-radio-group/cat-radio-group.spec.js.map +1 -1
  145. package/dist/collection/components/cat-scrollable/cat-scrollable.e2e.js +6 -6
  146. package/dist/collection/components/cat-scrollable/cat-scrollable.e2e.js.map +1 -1
  147. package/dist/collection/components/cat-scrollable/cat-scrollable.js +287 -287
  148. package/dist/collection/components/cat-scrollable/cat-scrollable.js.map +1 -1
  149. package/dist/collection/components/cat-scrollable/cat-scrollable.spec.js +7 -7
  150. package/dist/collection/components/cat-scrollable/cat-scrollable.spec.js.map +1 -1
  151. package/dist/collection/components/cat-select/cat-select.e2e.js +10 -10
  152. package/dist/collection/components/cat-select/cat-select.e2e.js.map +1 -1
  153. package/dist/collection/components/cat-select/cat-select.js +1143 -1143
  154. package/dist/collection/components/cat-select/cat-select.js.map +1 -1
  155. package/dist/collection/components/cat-select/cat-select.spec.js +7 -7
  156. package/dist/collection/components/cat-select/cat-select.spec.js.map +1 -1
  157. package/dist/collection/components/cat-select/connectors.js +13 -13
  158. package/dist/collection/components/cat-select/connectors.js.map +1 -1
  159. package/dist/collection/components/cat-select-demo/cat-select-demo.js +1379 -1379
  160. package/dist/collection/components/cat-select-demo/cat-select-demo.js.map +1 -1
  161. package/dist/collection/components/cat-skeleton/cat-skeleton.e2e.js +6 -6
  162. package/dist/collection/components/cat-skeleton/cat-skeleton.e2e.js.map +1 -1
  163. package/dist/collection/components/cat-skeleton/cat-skeleton.js +120 -120
  164. package/dist/collection/components/cat-skeleton/cat-skeleton.js.map +1 -1
  165. package/dist/collection/components/cat-skeleton/cat-skeleton.spec.js +7 -7
  166. package/dist/collection/components/cat-skeleton/cat-skeleton.spec.js.map +1 -1
  167. package/dist/collection/components/cat-spinner/cat-spinner.e2e.js +6 -6
  168. package/dist/collection/components/cat-spinner/cat-spinner.e2e.js.map +1 -1
  169. package/dist/collection/components/cat-spinner/cat-spinner.js +60 -60
  170. package/dist/collection/components/cat-spinner/cat-spinner.js.map +1 -1
  171. package/dist/collection/components/cat-spinner/cat-spinner.spec.js +7 -7
  172. package/dist/collection/components/cat-spinner/cat-spinner.spec.js.map +1 -1
  173. package/dist/collection/components/cat-tab/cat-tab.e2e.js +6 -6
  174. package/dist/collection/components/cat-tab/cat-tab.e2e.js.map +1 -1
  175. package/dist/collection/components/cat-tab/cat-tab.js +230 -211
  176. package/dist/collection/components/cat-tab/cat-tab.js.map +1 -1
  177. package/dist/collection/components/cat-tab/cat-tab.spec.js +7 -7
  178. package/dist/collection/components/cat-tab/cat-tab.spec.js.map +1 -1
  179. package/dist/collection/components/cat-tabs/cat-tabs.css +3 -0
  180. package/dist/collection/components/cat-tabs/cat-tabs.e2e.js +6 -6
  181. package/dist/collection/components/cat-tabs/cat-tabs.e2e.js.map +1 -1
  182. package/dist/collection/components/cat-tabs/cat-tabs.js +222 -215
  183. package/dist/collection/components/cat-tabs/cat-tabs.js.map +1 -1
  184. package/dist/collection/components/cat-tabs/cat-tabs.spec.js +7 -7
  185. package/dist/collection/components/cat-tabs/cat-tabs.spec.js.map +1 -1
  186. package/dist/collection/components/cat-textarea/cat-textarea.e2e.js +7 -7
  187. package/dist/collection/components/cat-textarea/cat-textarea.e2e.js.map +1 -1
  188. package/dist/collection/components/cat-textarea/cat-textarea.js +586 -586
  189. package/dist/collection/components/cat-textarea/cat-textarea.js.map +1 -1
  190. package/dist/collection/components/cat-textarea/cat-textarea.spec.js +7 -7
  191. package/dist/collection/components/cat-textarea/cat-textarea.spec.js.map +1 -1
  192. package/dist/collection/components/cat-toggle/cat-toggle.e2e.js +6 -6
  193. package/dist/collection/components/cat-toggle/cat-toggle.e2e.js.map +1 -1
  194. package/dist/collection/components/cat-toggle/cat-toggle.js +421 -421
  195. package/dist/collection/components/cat-toggle/cat-toggle.js.map +1 -1
  196. package/dist/collection/components/cat-toggle/cat-toggle.spec.js +7 -7
  197. package/dist/collection/components/cat-toggle/cat-toggle.spec.js.map +1 -1
  198. package/dist/collection/components/cat-tooltip/cat-tooltip.css +3 -0
  199. package/dist/collection/components/cat-tooltip/cat-tooltip.e2e.js +6 -6
  200. package/dist/collection/components/cat-tooltip/cat-tooltip.e2e.js.map +1 -1
  201. package/dist/collection/components/cat-tooltip/cat-tooltip.js +297 -296
  202. package/dist/collection/components/cat-tooltip/cat-tooltip.js.map +1 -1
  203. package/dist/collection/components/cat-tooltip/cat-tooltip.spec.js +12 -8
  204. package/dist/collection/components/cat-tooltip/cat-tooltip.spec.js.map +1 -1
  205. package/dist/collection/scss/core/_dialog.scss +1 -1
  206. package/dist/collection/scss/core/_form.scss +1 -1
  207. package/dist/collection/scss/core/_typography.scss +1 -7
  208. package/dist/collection/utils/breakpoints.js +6 -6
  209. package/dist/collection/utils/breakpoints.js.map +1 -1
  210. package/dist/collection/utils/coerce.js +3 -3
  211. package/dist/collection/utils/coerce.js.map +1 -1
  212. package/dist/collection/utils/find-closest.js +6 -6
  213. package/dist/collection/utils/find-closest.js.map +1 -1
  214. package/dist/collection/utils/first-tabbable.js +1 -1
  215. package/dist/collection/utils/first-tabbable.js.map +1 -1
  216. package/dist/collection/utils/load-img.js +6 -6
  217. package/dist/collection/utils/load-img.js.map +1 -1
  218. package/dist/collection/utils/media-matcher.js +30 -30
  219. package/dist/collection/utils/media-matcher.js.map +1 -1
  220. package/dist/collection/utils/media-matcher.spec.js +32 -32
  221. package/dist/collection/utils/media-matcher.spec.js.map +1 -1
  222. package/dist/collection/utils/platform.js +34 -34
  223. package/dist/collection/utils/platform.js.map +1 -1
  224. package/dist/collection/utils/setDefault.js +4 -4
  225. package/dist/collection/utils/setDefault.js.map +1 -1
  226. package/dist/components/cat-alert.d.ts +2 -2
  227. package/dist/components/cat-alert.js +56 -56
  228. package/dist/components/cat-alert.js.map +1 -1
  229. package/dist/components/cat-avatar.d.ts +2 -2
  230. package/dist/components/cat-avatar2.js +93 -93
  231. package/dist/components/cat-avatar2.js.map +1 -1
  232. package/dist/components/cat-badge.d.ts +2 -2
  233. package/dist/components/cat-badge.js +32 -32
  234. package/dist/components/cat-badge.js.map +1 -1
  235. package/dist/components/cat-button-group.d.ts +2 -2
  236. package/dist/components/cat-button-group.js +31 -31
  237. package/dist/components/cat-button-group.js.map +1 -1
  238. package/dist/components/cat-button.d.ts +2 -2
  239. package/dist/components/cat-button2.js +277 -277
  240. package/dist/components/cat-button2.js.map +1 -1
  241. package/dist/components/cat-card.d.ts +2 -2
  242. package/dist/components/cat-card.js +20 -20
  243. package/dist/components/cat-card.js.map +1 -1
  244. package/dist/components/cat-checkbox.d.ts +2 -2
  245. package/dist/components/cat-checkbox2.js +108 -108
  246. package/dist/components/cat-checkbox2.js.map +1 -1
  247. package/dist/components/cat-datepicker-inline.d.ts +2 -2
  248. package/dist/components/cat-datepicker-inline.js +89 -89
  249. package/dist/components/cat-datepicker-inline.js.map +1 -1
  250. package/dist/components/cat-datepicker.d.ts +2 -2
  251. package/dist/components/cat-datepicker.js +203 -194
  252. package/dist/components/cat-datepicker.js.map +1 -1
  253. package/dist/components/cat-datepicker.locale.js +121 -121
  254. package/dist/components/cat-datepicker.locale.js.map +1 -1
  255. package/dist/components/cat-dropdown.d.ts +2 -2
  256. package/dist/components/cat-dropdown2.js +177 -177
  257. package/dist/components/cat-dropdown2.js.map +1 -1
  258. package/dist/components/cat-form-group.d.ts +2 -2
  259. package/dist/components/cat-form-group.js +55 -55
  260. package/dist/components/cat-form-group.js.map +1 -1
  261. package/dist/components/cat-form-hint.js +9 -9
  262. package/dist/components/cat-form-hint.js.map +1 -1
  263. package/dist/components/cat-i18n-registry.js +71 -71
  264. package/dist/components/cat-i18n-registry.js.map +1 -1
  265. package/dist/components/cat-icon-registry.js +77 -77
  266. package/dist/components/cat-icon-registry.js.map +1 -1
  267. package/dist/components/cat-icon.d.ts +2 -2
  268. package/dist/components/cat-icon2.js +32 -32
  269. package/dist/components/cat-icon2.js.map +1 -1
  270. package/dist/components/cat-input.d.ts +2 -2
  271. package/dist/components/cat-input2.js +219 -219
  272. package/dist/components/cat-input2.js.map +1 -1
  273. package/dist/components/cat-pagination.d.ts +2 -2
  274. package/dist/components/cat-pagination.js +103 -103
  275. package/dist/components/cat-pagination.js.map +1 -1
  276. package/dist/components/cat-radio-group.d.ts +2 -2
  277. package/dist/components/cat-radio-group.js +113 -113
  278. package/dist/components/cat-radio-group.js.map +1 -1
  279. package/dist/components/cat-radio.d.ts +2 -2
  280. package/dist/components/cat-radio.js +93 -93
  281. package/dist/components/cat-radio.js.map +1 -1
  282. package/dist/components/cat-scrollable.d.ts +2 -2
  283. package/dist/components/cat-scrollable2.js +118 -118
  284. package/dist/components/cat-scrollable2.js.map +1 -1
  285. package/dist/components/cat-select-demo.d.ts +2 -2
  286. package/dist/components/cat-select-demo.js +1438 -1438
  287. package/dist/components/cat-select-demo.js.map +1 -1
  288. package/dist/components/cat-select.d.ts +2 -2
  289. package/dist/components/cat-select2.js +666 -666
  290. package/dist/components/cat-select2.js.map +1 -1
  291. package/dist/components/cat-skeleton.d.ts +2 -2
  292. package/dist/components/cat-skeleton2.js +53 -53
  293. package/dist/components/cat-skeleton2.js.map +1 -1
  294. package/dist/components/cat-spinner.d.ts +2 -2
  295. package/dist/components/cat-spinner2.js +27 -27
  296. package/dist/components/cat-spinner2.js.map +1 -1
  297. package/dist/components/cat-tab.d.ts +2 -2
  298. package/dist/components/cat-tab.js +48 -46
  299. package/dist/components/cat-tab.js.map +1 -1
  300. package/dist/components/cat-tabs.d.ts +2 -2
  301. package/dist/components/cat-tabs.js +120 -113
  302. package/dist/components/cat-tabs.js.map +1 -1
  303. package/dist/components/cat-textarea.d.ts +2 -2
  304. package/dist/components/cat-textarea.js +178 -178
  305. package/dist/components/cat-textarea.js.map +1 -1
  306. package/dist/components/cat-toggle.d.ts +2 -2
  307. package/dist/components/cat-toggle.js +104 -104
  308. package/dist/components/cat-toggle.js.map +1 -1
  309. package/dist/components/cat-tooltip.d.ts +2 -2
  310. package/dist/components/cat-tooltip.js +144 -143
  311. package/dist/components/cat-tooltip.js.map +1 -1
  312. package/dist/components/coerce.js +3 -3
  313. package/dist/components/coerce.js.map +1 -1
  314. package/dist/components/index.js +72 -72
  315. package/dist/components/index.js.map +1 -1
  316. package/dist/esm/cat-alert_26.entry.js +3899 -3883
  317. package/dist/esm/cat-alert_26.entry.js.map +1 -1
  318. package/dist/esm/catalyst.js +4 -4
  319. package/dist/esm/catalyst.js.map +1 -1
  320. package/dist/esm/{index-30a221a3.js → index-acddba36.js} +51 -13
  321. package/dist/esm/index-acddba36.js.map +1 -0
  322. package/dist/esm/index.js +74 -74
  323. package/dist/esm/index.js.map +1 -1
  324. package/dist/esm/loader.js +3 -3
  325. package/dist/esm/{of-04d3d9e1.js → of-4f92b30b.js} +155 -155
  326. package/dist/esm/of-4f92b30b.js.map +1 -0
  327. package/dist/types/components/cat-alert/cat-alert.d.ts +17 -17
  328. package/dist/types/components/cat-avatar/cat-avatar.d.ts +41 -41
  329. package/dist/types/components/cat-badge/cat-badge.d.ts +22 -22
  330. package/dist/types/components/cat-button/cat-button.d.ts +151 -151
  331. package/dist/types/components/cat-button-group/cat-button-group.d.ts +9 -9
  332. package/dist/types/components/cat-card/cat-card.d.ts +1 -1
  333. package/dist/types/components/cat-checkbox/cat-checkbox.d.ts +97 -97
  334. package/dist/types/components/cat-datepicker/cat-datepicker.config.d.ts +12 -12
  335. package/dist/types/components/cat-datepicker/cat-datepicker.d.ts +153 -149
  336. package/dist/types/components/cat-datepicker-inline/cat-datepicker-inline.d.ts +45 -45
  337. package/dist/types/components/cat-dropdown/cat-dropdown.d.ts +49 -49
  338. package/dist/types/components/cat-form-group/cat-form-group.d.ts +23 -23
  339. package/dist/types/components/cat-form-hint/cat-form-hint.d.ts +6 -6
  340. package/dist/types/components/cat-i18n/cat-i18n-registry.d.ts +17 -17
  341. package/dist/types/components/cat-icon/cat-icon-registry.d.ts +12 -12
  342. package/dist/types/components/cat-icon/cat-icon.d.ts +18 -18
  343. package/dist/types/components/cat-input/cat-input.d.ts +167 -167
  344. package/dist/types/components/cat-notification/cat-notification.d.ts +31 -31
  345. package/dist/types/components/cat-pagination/cat-pagination.d.ts +52 -52
  346. package/dist/types/components/cat-radio/cat-radio.d.ts +83 -83
  347. package/dist/types/components/cat-radio-group/cat-radio-group.d.ts +49 -49
  348. package/dist/types/components/cat-scrollable/cat-scrollable.d.ts +49 -49
  349. package/dist/types/components/cat-select/cat-select.d.ts +221 -221
  350. package/dist/types/components/cat-select/connectors.d.ts +5 -5
  351. package/dist/types/components/cat-select-demo/cat-select-demo.d.ts +11 -11
  352. package/dist/types/components/cat-skeleton/cat-skeleton.d.ts +23 -23
  353. package/dist/types/components/cat-spinner/cat-spinner.d.ts +10 -10
  354. package/dist/types/components/cat-tab/cat-tab.d.ts +48 -42
  355. package/dist/types/components/cat-tabs/cat-tabs.d.ts +40 -39
  356. package/dist/types/components/cat-textarea/cat-textarea.d.ts +131 -131
  357. package/dist/types/components/cat-toggle/cat-toggle.d.ts +93 -93
  358. package/dist/types/components/cat-tooltip/cat-tooltip.d.ts +64 -64
  359. package/dist/types/components.d.ts +10 -2
  360. package/dist/types/stencil-public-runtime.d.ts +8 -0
  361. package/dist/types/utils/breakpoints.d.ts +1 -1
  362. package/dist/types/utils/media-matcher.d.ts +10 -10
  363. package/dist/types/utils/platform.d.ts +16 -16
  364. package/dist/types/utils/setDefault.d.ts +2 -2
  365. package/package.json +18 -18
  366. package/dist/catalyst/p-1bd44896.js +0 -3
  367. package/dist/catalyst/p-1bd44896.js.map +0 -1
  368. package/dist/catalyst/p-dc953306.entry.js +0 -10
  369. package/dist/catalyst/p-dc953306.entry.js.map +0 -1
  370. package/dist/cjs/index-1e7eef7e.js.map +0 -1
  371. package/dist/cjs/of-395b2f57.js.map +0 -1
  372. package/dist/esm/index-30a221a3.js.map +0 -1
  373. package/dist/esm/of-04d3d9e1.js.map +0 -1
  374. /package/dist/catalyst/{p-85d057f0.js.map → p-6ae13953.js.map} +0 -0
@@ -17,788 +17,788 @@ let nextUniqueId = 0;
17
17
  * @part suffix - The text suffix.
18
18
  */
19
19
  export class CatInput {
20
- constructor() {
21
- this._id = `cat-input-${nextUniqueId++}`;
22
- this.hasSlottedLabel = false;
23
- this.hasSlottedHint = false;
24
- this.errorMap = undefined;
25
- this.requiredMarker = 'optional';
26
- this.horizontal = false;
27
- this.autoComplete = undefined;
28
- this.clearable = false;
29
- this.disabled = false;
30
- this.hint = undefined;
31
- this.icon = undefined;
32
- this.iconRight = false;
33
- this.identifier = undefined;
34
- this.label = '';
35
- this.labelHidden = false;
36
- this.max = undefined;
37
- this.maxLength = undefined;
38
- this.min = undefined;
39
- this.minLength = undefined;
40
- this.name = undefined;
41
- this.placeholder = undefined;
42
- this.textPrefix = undefined;
43
- this.textSuffix = undefined;
44
- this.readonly = false;
45
- this.required = false;
46
- this.round = false;
47
- this.type = 'text';
48
- this.value = undefined;
49
- this.errors = undefined;
50
- this.errorUpdate = 0;
51
- this.nativeAttributes = undefined;
52
- }
53
- get id() {
54
- return this.identifier || this._id;
55
- }
56
- componentWillRender() {
57
- this.onErrorsChanged(this.errors);
58
- this.hasSlottedLabel = !!this.hostElement.querySelector('[slot="label"]');
59
- this.hasSlottedHint = !!this.hostElement.querySelector('[slot="hint"]');
60
- if (!this.label && !this.hasSlottedLabel) {
61
- log.warn('[A11y] Missing ARIA label on input', this);
20
+ constructor() {
21
+ this._id = `cat-input-${nextUniqueId++}`;
22
+ this.hasSlottedLabel = false;
23
+ this.hasSlottedHint = false;
24
+ this.errorMap = undefined;
25
+ this.requiredMarker = 'optional';
26
+ this.horizontal = false;
27
+ this.autoComplete = undefined;
28
+ this.clearable = false;
29
+ this.disabled = false;
30
+ this.hint = undefined;
31
+ this.icon = undefined;
32
+ this.iconRight = false;
33
+ this.identifier = undefined;
34
+ this.label = '';
35
+ this.labelHidden = false;
36
+ this.max = undefined;
37
+ this.maxLength = undefined;
38
+ this.min = undefined;
39
+ this.minLength = undefined;
40
+ this.name = undefined;
41
+ this.placeholder = undefined;
42
+ this.textPrefix = undefined;
43
+ this.textSuffix = undefined;
44
+ this.readonly = false;
45
+ this.required = false;
46
+ this.round = false;
47
+ this.type = 'text';
48
+ this.value = undefined;
49
+ this.errors = undefined;
50
+ this.errorUpdate = 0;
51
+ this.nativeAttributes = undefined;
62
52
  }
63
- }
64
- /**
65
- * Programmatically move focus to the input. Use this method instead of
66
- * `input.focus()`.
67
- *
68
- * @param options An optional object providing options to control aspects of
69
- * the focusing process.
70
- */
71
- async doFocus(options) {
72
- // hack to make datepicker inputs focusable. The datepicker hides the input
73
- // element and dynamically creates a sibling. We need to find the new input
74
- // element and focus it instead.
75
- const input = this.input.type === 'hidden' ? this.findSiblingInput(this.input.nextSibling) : this.input;
76
- input?.focus(options);
77
- }
78
- /**
79
- * Programmatically remove focus from the input. Use this method instead of
80
- * `input.blur()`.
81
- */
82
- async doBlur() {
83
- this.input.blur();
84
- }
85
- /**
86
- * Clear the input.
87
- */
88
- async clear() {
89
- this.value = '';
90
- this.catChange.emit(this.value);
91
- }
92
- onErrorsChanged(value) {
93
- if (!coerceBoolean(this.errorUpdate)) {
94
- this.errorMap = undefined;
53
+ get id() {
54
+ return this.identifier || this._id;
95
55
  }
96
- else {
97
- this.errorMapSrc = Array.isArray(value)
98
- ? value.reduce((acc, err) => ({ ...acc, [err]: undefined }), {})
99
- : value === true
100
- ? {}
101
- : value || undefined;
102
- this.showErrorsIfTimeout() || this.showErrorsIfNoFocus();
56
+ componentWillRender() {
57
+ this.onErrorsChanged(this.errors);
58
+ this.hasSlottedLabel = !!this.hostElement.querySelector('[slot="label"]');
59
+ this.hasSlottedHint = !!this.hostElement.querySelector('[slot="hint"]');
60
+ if (!this.label && !this.hasSlottedLabel) {
61
+ log.warn('[A11y] Missing ARIA label on input', this);
62
+ }
103
63
  }
104
- }
105
- render() {
106
- return (h("div", { class: {
107
- 'input-field': true,
108
- 'input-horizontal': this.horizontal
109
- } }, h("div", { class: { 'label-container': true, hidden: this.labelHidden } }, (this.hasSlottedLabel || this.label) && (h("label", { htmlFor: this.id, part: "label" }, h("span", { class: "label-wrapper" }, (this.hasSlottedLabel && h("slot", { name: "label" })) || this.label, h("div", { class: "label-metadata" }, !this.required && (this.requiredMarker ?? 'optional').startsWith('optional') && (h("span", { class: "label-optional", "aria-hidden": "true" }, "(", i18n.t('input.optional'), ")")), this.required && this.requiredMarker?.startsWith('required') && (h("span", { class: "label-optional", "aria-hidden": "true" }, "(", i18n.t('input.required'), ")")), this.maxLength && (h("div", { class: "label-character-count", "aria-hidden": "true" }, this.value?.toString().length ?? 0, "/", this.maxLength))))))), h("div", { class: "input-container" }, h("div", { class: {
110
- 'input-wrapper': true,
111
- 'input-round': this.round,
112
- 'input-readonly': this.readonly,
113
- 'input-disabled': this.disabled,
114
- 'input-invalid': this.invalid
115
- }, onClick: () => this.input.focus() }, this.textPrefix && (h("span", { class: "text-prefix", part: "prefix" }, this.textPrefix)), this.icon && !this.iconRight && (h("cat-icon", { icon: this.icon, class: "icon-prefix", size: "l", onClick: () => this.doFocus() })), h("div", { class: "input-inner-wrapper" }, h("input", { ...this.nativeAttributes, part: "input", ref: el => (this.input = el), id: this.id, class: {
116
- 'has-clearable': this.clearable && !this.disabled && !this.readonly
117
- }, autocomplete: this.autoComplete, disabled: this.disabled, max: this.max, maxlength: this.maxLength, min: this.min, minlength: this.minLength, name: this.name, placeholder: this.placeholder, readonly: this.readonly, required: this.required, type: this.type, value: this.value, onInput: this.onInput.bind(this), onFocus: this.onFocus.bind(this), onBlur: this.onBlur.bind(this), "aria-invalid": this.invalid ? 'true' : undefined, "aria-describedby": this.hasHint ? this.id + '-hint' : undefined }), this.clearable && !this.disabled && !this.readonly && this.value && (h("cat-button", { class: "clearable", icon: "$cat:input-close", "icon-only": "true", size: "s", variant: "text", "a11y-label": i18n.t('input.clear'), onClick: this.clear.bind(this), "data-dropdown-no-close": true }))), !this.invalid && this.icon && this.iconRight && (h("cat-icon", { icon: this.icon, class: "icon-suffix", size: "l", onClick: () => this.doFocus() })), this.invalid && h("cat-icon", { icon: "$cat:input-error", class: "icon-suffix cat-text-danger", size: "l" }), this.textSuffix && (h("span", { class: "text-suffix", part: "suffix" }, this.textSuffix))), this.hasHint && (h(CatFormHint, { id: this.id, hint: this.hint, slottedHint: this.hasSlottedHint && h("slot", { name: "hint" }), errorMap: this.errorMap })))));
118
- }
119
- get hasHint() {
120
- return !!this.hint || !!this.hasSlottedHint || this.invalid;
121
- }
122
- get invalid() {
123
- return !!Object.keys(this.errorMap || {}).length;
124
- }
125
- onInput() {
126
- this.value = this.input.value;
127
- this.catChange.emit(this.value);
128
- this.showErrorsIfTimeout();
129
- }
130
- onFocus(event) {
131
- this.catFocus.emit(event);
132
- }
133
- onBlur(event) {
134
- this.catBlur.emit(event);
135
- if (coerceBoolean(this.errorUpdate)) {
136
- this.showErrors();
64
+ /**
65
+ * Programmatically move focus to the input. Use this method instead of
66
+ * `input.focus()`.
67
+ *
68
+ * @param options An optional object providing options to control aspects of
69
+ * the focusing process.
70
+ */
71
+ async doFocus(options) {
72
+ // hack to make datepicker inputs focusable. The datepicker hides the input
73
+ // element and dynamically creates a sibling. We need to find the new input
74
+ // element and focus it instead.
75
+ const input = this.input.type === 'hidden' ? this.findSiblingInput(this.input.nextSibling) : this.input;
76
+ input?.focus(options);
137
77
  }
138
- }
139
- showErrors() {
140
- this.errorMap = this.errorMapSrc;
141
- }
142
- showErrorsIfTimeout() {
143
- const errorUpdate = coerceNumber(this.errorUpdate, null);
144
- if (errorUpdate !== null) {
145
- typeof this.errorUpdateTimeoutId === 'number' && window.clearTimeout(this.errorUpdateTimeoutId);
146
- this.errorUpdateTimeoutId = window.setTimeout(() => this.showErrors(), errorUpdate);
147
- return true;
78
+ /**
79
+ * Programmatically remove focus from the input. Use this method instead of
80
+ * `input.blur()`.
81
+ */
82
+ async doBlur() {
83
+ this.input.blur();
148
84
  }
149
- return false;
150
- }
151
- showErrorsIfNoFocus() {
152
- const hasFocus = document.activeElement === this.hostElement || document.activeElement === this.input;
153
- if (!hasFocus) {
154
- this.showErrors();
85
+ /**
86
+ * Clear the input.
87
+ */
88
+ async clear() {
89
+ this.value = '';
90
+ this.catChange.emit(this.value);
155
91
  }
156
- }
157
- findSiblingInput(node) {
158
- if (node instanceof HTMLInputElement) {
159
- return node;
92
+ onErrorsChanged(value) {
93
+ if (!coerceBoolean(this.errorUpdate)) {
94
+ this.errorMap = undefined;
95
+ }
96
+ else {
97
+ this.errorMapSrc = Array.isArray(value)
98
+ ? value.reduce((acc, err) => ({ ...acc, [err]: undefined }), {})
99
+ : value === true
100
+ ? {}
101
+ : value || undefined;
102
+ this.showErrorsIfTimeout() || this.showErrorsIfNoFocus();
103
+ }
160
104
  }
161
- else if (node?.nextSibling) {
162
- return this.findSiblingInput(node.nextSibling);
105
+ render() {
106
+ return (h("div", { class: {
107
+ 'input-field': true,
108
+ 'input-horizontal': this.horizontal
109
+ } }, h("div", { class: { 'label-container': true, hidden: this.labelHidden } }, (this.hasSlottedLabel || this.label) && (h("label", { htmlFor: this.id, part: "label" }, h("span", { class: "label-wrapper" }, (this.hasSlottedLabel && h("slot", { name: "label" })) || this.label, h("div", { class: "label-metadata" }, !this.required && (this.requiredMarker ?? 'optional').startsWith('optional') && (h("span", { class: "label-optional", "aria-hidden": "true" }, "(", i18n.t('input.optional'), ")")), this.required && this.requiredMarker?.startsWith('required') && (h("span", { class: "label-optional", "aria-hidden": "true" }, "(", i18n.t('input.required'), ")")), this.maxLength && (h("div", { class: "label-character-count", "aria-hidden": "true" }, this.value?.toString().length ?? 0, "/", this.maxLength))))))), h("div", { class: "input-container" }, h("div", { class: {
110
+ 'input-wrapper': true,
111
+ 'input-round': this.round,
112
+ 'input-readonly': this.readonly,
113
+ 'input-disabled': this.disabled,
114
+ 'input-invalid': this.invalid
115
+ }, onClick: () => this.input.focus() }, this.textPrefix && (h("span", { class: "text-prefix", part: "prefix" }, this.textPrefix)), this.icon && !this.iconRight && (h("cat-icon", { icon: this.icon, class: "icon-prefix", size: "l", onClick: () => this.doFocus() })), h("div", { class: "input-inner-wrapper" }, h("input", { ...this.nativeAttributes, part: "input", ref: el => (this.input = el), id: this.id, class: {
116
+ 'has-clearable': this.clearable && !this.disabled && !this.readonly
117
+ }, autocomplete: this.autoComplete, disabled: this.disabled, max: this.max, maxlength: this.maxLength, min: this.min, minlength: this.minLength, name: this.name, placeholder: this.placeholder, readonly: this.readonly, required: this.required, type: this.type, value: this.value, onInput: this.onInput.bind(this), onFocus: this.onFocus.bind(this), onBlur: this.onBlur.bind(this), "aria-invalid": this.invalid ? 'true' : undefined, "aria-describedby": this.hasHint ? this.id + '-hint' : undefined }), this.clearable && !this.disabled && !this.readonly && this.value && (h("cat-button", { class: "clearable", icon: "$cat:input-close", "icon-only": "true", size: "s", variant: "text", "a11y-label": i18n.t('input.clear'), onClick: this.clear.bind(this), "data-dropdown-no-close": true }))), !this.invalid && this.icon && this.iconRight && (h("cat-icon", { icon: this.icon, class: "icon-suffix", size: "l", onClick: () => this.doFocus() })), this.invalid && h("cat-icon", { icon: "$cat:input-error", class: "icon-suffix cat-text-danger", size: "l" }), this.textSuffix && (h("span", { class: "text-suffix", part: "suffix" }, this.textSuffix))), this.hasHint && (h(CatFormHint, { id: this.id, hint: this.hint, slottedHint: this.hasSlottedHint && h("slot", { name: "hint" }), errorMap: this.errorMap })))));
163
118
  }
164
- return undefined;
165
- }
166
- static get is() { return "cat-input"; }
167
- static get encapsulation() { return "shadow"; }
168
- static get originalStyleUrls() {
169
- return {
170
- "$": ["cat-input.scss"]
171
- };
172
- }
173
- static get styleUrls() {
174
- return {
175
- "$": ["cat-input.css"]
176
- };
177
- }
178
- static get properties() {
179
- return {
180
- "requiredMarker": {
181
- "type": "string",
182
- "mutable": false,
183
- "complexType": {
184
- "original": "'none' | 'required' | 'optional' | 'none!' | 'optional!' | 'required!'",
185
- "resolved": "\"none!\" | \"none\" | \"optional!\" | \"optional\" | \"required!\" | \"required\" | undefined",
186
- "references": {}
187
- },
188
- "required": false,
189
- "optional": true,
190
- "docs": {
191
- "tags": [],
192
- "text": "Whether the label need a marker to shown if the input is required or optional."
193
- },
194
- "attribute": "required-marker",
195
- "reflect": false,
196
- "defaultValue": "'optional'"
197
- },
198
- "horizontal": {
199
- "type": "boolean",
200
- "mutable": false,
201
- "complexType": {
202
- "original": "boolean",
203
- "resolved": "boolean",
204
- "references": {}
205
- },
206
- "required": false,
207
- "optional": false,
208
- "docs": {
209
- "tags": [],
210
- "text": "Whether the label is on top or left."
211
- },
212
- "attribute": "horizontal",
213
- "reflect": false,
214
- "defaultValue": "false"
215
- },
216
- "autoComplete": {
217
- "type": "string",
218
- "mutable": false,
219
- "complexType": {
220
- "original": "string",
221
- "resolved": "string | undefined",
222
- "references": {}
223
- },
224
- "required": false,
225
- "optional": true,
226
- "docs": {
227
- "tags": [],
228
- "text": "Hint for form autofill feature."
229
- },
230
- "attribute": "auto-complete",
231
- "reflect": false
232
- },
233
- "clearable": {
234
- "type": "boolean",
235
- "mutable": false,
236
- "complexType": {
237
- "original": "boolean",
238
- "resolved": "boolean",
239
- "references": {}
240
- },
241
- "required": false,
242
- "optional": false,
243
- "docs": {
244
- "tags": [],
245
- "text": "Whether the input should show a clear button."
246
- },
247
- "attribute": "clearable",
248
- "reflect": false,
249
- "defaultValue": "false"
250
- },
251
- "disabled": {
252
- "type": "boolean",
253
- "mutable": false,
254
- "complexType": {
255
- "original": "boolean",
256
- "resolved": "boolean",
257
- "references": {}
258
- },
259
- "required": false,
260
- "optional": false,
261
- "docs": {
262
- "tags": [],
263
- "text": "Whether the input is disabled."
264
- },
265
- "attribute": "disabled",
266
- "reflect": false,
267
- "defaultValue": "false"
268
- },
269
- "hint": {
270
- "type": "string",
271
- "mutable": false,
272
- "complexType": {
273
- "original": "string | string[]",
274
- "resolved": "string | string[] | undefined",
275
- "references": {}
276
- },
277
- "required": false,
278
- "optional": true,
279
- "docs": {
280
- "tags": [],
281
- "text": "Optional hint text(s) to be displayed with the input."
282
- },
283
- "attribute": "hint",
284
- "reflect": false
285
- },
286
- "icon": {
287
- "type": "string",
288
- "mutable": false,
289
- "complexType": {
290
- "original": "string",
291
- "resolved": "string | undefined",
292
- "references": {}
293
- },
294
- "required": false,
295
- "optional": true,
296
- "docs": {
297
- "tags": [],
298
- "text": "The name of an icon to be displayed in the input."
299
- },
300
- "attribute": "icon",
301
- "reflect": false
302
- },
303
- "iconRight": {
304
- "type": "boolean",
305
- "mutable": false,
306
- "complexType": {
307
- "original": "boolean",
308
- "resolved": "boolean",
309
- "references": {}
310
- },
311
- "required": false,
312
- "optional": false,
313
- "docs": {
314
- "tags": [],
315
- "text": "Display the icon on the right."
316
- },
317
- "attribute": "icon-right",
318
- "reflect": false,
319
- "defaultValue": "false"
320
- },
321
- "identifier": {
322
- "type": "string",
323
- "mutable": false,
324
- "complexType": {
325
- "original": "string",
326
- "resolved": "string | undefined",
327
- "references": {}
328
- },
329
- "required": false,
330
- "optional": true,
331
- "docs": {
332
- "tags": [],
333
- "text": "A unique identifier for the input."
334
- },
335
- "attribute": "identifier",
336
- "reflect": false
337
- },
338
- "label": {
339
- "type": "string",
340
- "mutable": false,
341
- "complexType": {
342
- "original": "string",
343
- "resolved": "string",
344
- "references": {}
345
- },
346
- "required": false,
347
- "optional": false,
348
- "docs": {
349
- "tags": [],
350
- "text": "The label for the input."
351
- },
352
- "attribute": "label",
353
- "reflect": false,
354
- "defaultValue": "''"
355
- },
356
- "labelHidden": {
357
- "type": "boolean",
358
- "mutable": false,
359
- "complexType": {
360
- "original": "boolean",
361
- "resolved": "boolean",
362
- "references": {}
363
- },
364
- "required": false,
365
- "optional": false,
366
- "docs": {
367
- "tags": [],
368
- "text": "Visually hide the label, but still show it to assistive technologies like screen readers."
369
- },
370
- "attribute": "label-hidden",
371
- "reflect": false,
372
- "defaultValue": "false"
373
- },
374
- "max": {
375
- "type": "any",
376
- "mutable": false,
377
- "complexType": {
378
- "original": "number | string",
379
- "resolved": "number | string | undefined",
380
- "references": {}
381
- },
382
- "required": false,
383
- "optional": true,
384
- "docs": {
385
- "tags": [],
386
- "text": "A maximum value for date, time and numeric values."
387
- },
388
- "attribute": "max",
389
- "reflect": false
390
- },
391
- "maxLength": {
392
- "type": "number",
393
- "mutable": false,
394
- "complexType": {
395
- "original": "number",
396
- "resolved": "number | undefined",
397
- "references": {}
398
- },
399
- "required": false,
400
- "optional": true,
401
- "docs": {
402
- "tags": [],
403
- "text": "A maximum length (number of characters) for textual values."
404
- },
405
- "attribute": "max-length",
406
- "reflect": false
407
- },
408
- "min": {
409
- "type": "any",
410
- "mutable": false,
411
- "complexType": {
412
- "original": "number | string",
413
- "resolved": "number | string | undefined",
414
- "references": {}
415
- },
416
- "required": false,
417
- "optional": true,
418
- "docs": {
419
- "tags": [],
420
- "text": "A minimum value for date, time and numeric values."
421
- },
422
- "attribute": "min",
423
- "reflect": false
424
- },
425
- "minLength": {
426
- "type": "number",
427
- "mutable": false,
428
- "complexType": {
429
- "original": "number",
430
- "resolved": "number | undefined",
431
- "references": {}
432
- },
433
- "required": false,
434
- "optional": true,
435
- "docs": {
436
- "tags": [],
437
- "text": "A minimum length (number of characters) for textual values."
438
- },
439
- "attribute": "min-length",
440
- "reflect": false
441
- },
442
- "name": {
443
- "type": "string",
444
- "mutable": false,
445
- "complexType": {
446
- "original": "string",
447
- "resolved": "string | undefined",
448
- "references": {}
449
- },
450
- "required": false,
451
- "optional": true,
452
- "docs": {
453
- "tags": [],
454
- "text": "The name of the form control. Submitted with the form as part of a name/value pair."
455
- },
456
- "attribute": "name",
457
- "reflect": false
458
- },
459
- "placeholder": {
460
- "type": "string",
461
- "mutable": false,
462
- "complexType": {
463
- "original": "string",
464
- "resolved": "string | undefined",
465
- "references": {}
466
- },
467
- "required": false,
468
- "optional": true,
469
- "docs": {
470
- "tags": [],
471
- "text": "The placeholder text to display within the input."
472
- },
473
- "attribute": "placeholder",
474
- "reflect": false
475
- },
476
- "textPrefix": {
477
- "type": "string",
478
- "mutable": false,
479
- "complexType": {
480
- "original": "string",
481
- "resolved": "string | undefined",
482
- "references": {}
483
- },
484
- "required": false,
485
- "optional": true,
486
- "docs": {
487
- "tags": [],
488
- "text": "A textual prefix to be displayed in the input."
489
- },
490
- "attribute": "text-prefix",
491
- "reflect": false
492
- },
493
- "textSuffix": {
494
- "type": "string",
495
- "mutable": false,
496
- "complexType": {
497
- "original": "string",
498
- "resolved": "string | undefined",
499
- "references": {}
500
- },
501
- "required": false,
502
- "optional": true,
503
- "docs": {
504
- "tags": [],
505
- "text": "A textual suffix to be displayed in the input."
506
- },
507
- "attribute": "text-suffix",
508
- "reflect": false
509
- },
510
- "readonly": {
511
- "type": "boolean",
512
- "mutable": false,
513
- "complexType": {
514
- "original": "boolean",
515
- "resolved": "boolean",
516
- "references": {}
517
- },
518
- "required": false,
519
- "optional": false,
520
- "docs": {
521
- "tags": [],
522
- "text": "The value is not editable."
523
- },
524
- "attribute": "readonly",
525
- "reflect": false,
526
- "defaultValue": "false"
527
- },
528
- "required": {
529
- "type": "boolean",
530
- "mutable": false,
531
- "complexType": {
532
- "original": "boolean",
533
- "resolved": "boolean",
534
- "references": {}
535
- },
536
- "required": false,
537
- "optional": false,
538
- "docs": {
539
- "tags": [],
540
- "text": "A value is required or must be check for the form to be submittable."
541
- },
542
- "attribute": "required",
543
- "reflect": false,
544
- "defaultValue": "false"
545
- },
546
- "round": {
547
- "type": "boolean",
548
- "mutable": false,
549
- "complexType": {
550
- "original": "boolean",
551
- "resolved": "boolean",
552
- "references": {}
553
- },
554
- "required": false,
555
- "optional": false,
556
- "docs": {
557
- "tags": [],
558
- "text": "Use round input edges."
559
- },
560
- "attribute": "round",
561
- "reflect": false,
562
- "defaultValue": "false"
563
- },
564
- "type": {
565
- "type": "string",
566
- "mutable": false,
567
- "complexType": {
568
- "original": "InputType",
569
- "resolved": "\"color\" | \"email\" | \"file\" | \"number\" | \"password\" | \"range\" | \"search\" | \"tel\" | \"text\" | \"url\"",
570
- "references": {
571
- "InputType": {
572
- "location": "import",
573
- "path": "./input-type",
574
- "id": "src/components/cat-input/input-type.ts::InputType"
575
- }
576
- }
577
- },
578
- "required": false,
579
- "optional": false,
580
- "docs": {
581
- "tags": [],
582
- "text": "Type of form control."
583
- },
584
- "attribute": "type",
585
- "reflect": false,
586
- "defaultValue": "'text'"
587
- },
588
- "value": {
589
- "type": "string",
590
- "mutable": true,
591
- "complexType": {
592
- "original": "string",
593
- "resolved": "string | undefined",
594
- "references": {}
595
- },
596
- "required": false,
597
- "optional": true,
598
- "docs": {
599
- "tags": [],
600
- "text": "The value of the control."
601
- },
602
- "attribute": "value",
603
- "reflect": false
604
- },
605
- "errors": {
606
- "type": "boolean",
607
- "mutable": false,
608
- "complexType": {
609
- "original": "boolean | string[] | ErrorMap",
610
- "resolved": "boolean | string[] | undefined | { [key: string]: any; }",
611
- "references": {
612
- "ErrorMap": {
613
- "location": "import",
614
- "path": "../cat-form-hint/cat-form-hint",
615
- "id": "src/components/cat-form-hint/cat-form-hint.tsx::ErrorMap"
616
- }
617
- }
618
- },
619
- "required": false,
620
- "optional": true,
621
- "docs": {
622
- "tags": [],
623
- "text": "The validation errors for this input. Will render a hint under the input\nwith the translated error message(s) `error.${key}`. If an object is\npassed, the keys will be used as error keys and the values translation\nparameters.\nIf the value is `true`, the input will be marked as invalid without any\nhints under the input."
624
- },
625
- "attribute": "errors",
626
- "reflect": false
627
- },
628
- "errorUpdate": {
629
- "type": "any",
630
- "mutable": false,
631
- "complexType": {
632
- "original": "boolean | number",
633
- "resolved": "boolean | number",
634
- "references": {}
635
- },
636
- "required": false,
637
- "optional": false,
638
- "docs": {
639
- "tags": [],
640
- "text": "Fine-grained control over when the errors are shown. Can be `false` to\nnever show errors, `true` to show errors on blur, or a number to show\nerrors on change with the given delay in milliseconds."
641
- },
642
- "attribute": "error-update",
643
- "reflect": false,
644
- "defaultValue": "0"
645
- },
646
- "nativeAttributes": {
647
- "type": "unknown",
648
- "mutable": false,
649
- "complexType": {
650
- "original": "{ [key: string]: string }",
651
- "resolved": "undefined | { [key: string]: string; }",
652
- "references": {}
653
- },
654
- "required": false,
655
- "optional": true,
656
- "docs": {
657
- "tags": [],
658
- "text": "Attributes that will be added to the native HTML input element."
119
+ get hasHint() {
120
+ return !!this.hint || !!this.hasSlottedHint || this.invalid;
121
+ }
122
+ get invalid() {
123
+ return !!Object.keys(this.errorMap || {}).length;
124
+ }
125
+ onInput() {
126
+ this.value = this.input.value;
127
+ this.catChange.emit(this.value);
128
+ this.showErrorsIfTimeout();
129
+ }
130
+ onFocus(event) {
131
+ this.catFocus.emit(event);
132
+ }
133
+ onBlur(event) {
134
+ this.catBlur.emit(event);
135
+ if (coerceBoolean(this.errorUpdate)) {
136
+ this.showErrors();
659
137
  }
660
- }
661
- };
662
- }
663
- static get states() {
664
- return {
665
- "hasSlottedLabel": {},
666
- "hasSlottedHint": {},
667
- "errorMap": {}
668
- };
669
- }
670
- static get events() {
671
- return [{
672
- "method": "catChange",
673
- "name": "catChange",
674
- "bubbles": true,
675
- "cancelable": true,
676
- "composed": true,
677
- "docs": {
678
- "tags": [],
679
- "text": "Emitted when the value is changed."
680
- },
681
- "complexType": {
682
- "original": "string",
683
- "resolved": "string",
684
- "references": {}
138
+ }
139
+ showErrors() {
140
+ this.errorMap = this.errorMapSrc;
141
+ }
142
+ showErrorsIfTimeout() {
143
+ const errorUpdate = coerceNumber(this.errorUpdate, null);
144
+ if (errorUpdate !== null) {
145
+ typeof this.errorUpdateTimeoutId === 'number' && window.clearTimeout(this.errorUpdateTimeoutId);
146
+ this.errorUpdateTimeoutId = window.setTimeout(() => this.showErrors(), errorUpdate);
147
+ return true;
685
148
  }
686
- }, {
687
- "method": "catFocus",
688
- "name": "catFocus",
689
- "bubbles": true,
690
- "cancelable": true,
691
- "composed": true,
692
- "docs": {
693
- "tags": [],
694
- "text": "Emitted when the input received focus."
695
- },
696
- "complexType": {
697
- "original": "FocusEvent",
698
- "resolved": "FocusEvent",
699
- "references": {
700
- "FocusEvent": {
701
- "location": "global",
702
- "id": "global::FocusEvent"
703
- }
704
- }
149
+ return false;
150
+ }
151
+ showErrorsIfNoFocus() {
152
+ const hasFocus = document.activeElement === this.hostElement || document.activeElement === this.input;
153
+ if (!hasFocus) {
154
+ this.showErrors();
705
155
  }
706
- }, {
707
- "method": "catBlur",
708
- "name": "catBlur",
709
- "bubbles": true,
710
- "cancelable": true,
711
- "composed": true,
712
- "docs": {
713
- "tags": [],
714
- "text": "Emitted when the input loses focus."
715
- },
716
- "complexType": {
717
- "original": "FocusEvent",
718
- "resolved": "FocusEvent",
719
- "references": {
720
- "FocusEvent": {
721
- "location": "global",
722
- "id": "global::FocusEvent"
723
- }
724
- }
156
+ }
157
+ findSiblingInput(node) {
158
+ if (node instanceof HTMLInputElement) {
159
+ return node;
725
160
  }
726
- }];
727
- }
728
- static get methods() {
729
- return {
730
- "doFocus": {
731
- "complexType": {
732
- "signature": "(options?: FocusOptions) => Promise<void>",
733
- "parameters": [{
734
- "tags": [{
735
- "name": "param",
736
- "text": "options An optional object providing options to control aspects of\nthe focusing process."
737
- }],
738
- "text": "An optional object providing options to control aspects of\nthe focusing process."
739
- }],
740
- "references": {
741
- "Promise": {
742
- "location": "global",
743
- "id": "global::Promise"
744
- },
745
- "FocusOptions": {
746
- "location": "global",
747
- "id": "global::FocusOptions"
748
- }
749
- },
750
- "return": "Promise<void>"
751
- },
752
- "docs": {
753
- "text": "Programmatically move focus to the input. Use this method instead of\n`input.focus()`.",
754
- "tags": [{
755
- "name": "param",
756
- "text": "options An optional object providing options to control aspects of\nthe focusing process."
757
- }]
161
+ else if (node?.nextSibling) {
162
+ return this.findSiblingInput(node.nextSibling);
758
163
  }
759
- },
760
- "doBlur": {
761
- "complexType": {
762
- "signature": "() => Promise<void>",
763
- "parameters": [],
764
- "references": {
765
- "Promise": {
766
- "location": "global",
767
- "id": "global::Promise"
164
+ return undefined;
165
+ }
166
+ static get is() { return "cat-input"; }
167
+ static get encapsulation() { return "shadow"; }
168
+ static get originalStyleUrls() {
169
+ return {
170
+ "$": ["cat-input.scss"]
171
+ };
172
+ }
173
+ static get styleUrls() {
174
+ return {
175
+ "$": ["cat-input.css"]
176
+ };
177
+ }
178
+ static get properties() {
179
+ return {
180
+ "requiredMarker": {
181
+ "type": "string",
182
+ "mutable": false,
183
+ "complexType": {
184
+ "original": "'none' | 'required' | 'optional' | 'none!' | 'optional!' | 'required!'",
185
+ "resolved": "\"none!\" | \"none\" | \"optional!\" | \"optional\" | \"required!\" | \"required\" | undefined",
186
+ "references": {}
187
+ },
188
+ "required": false,
189
+ "optional": true,
190
+ "docs": {
191
+ "tags": [],
192
+ "text": "Whether the label need a marker to shown if the input is required or optional."
193
+ },
194
+ "attribute": "required-marker",
195
+ "reflect": false,
196
+ "defaultValue": "'optional'"
197
+ },
198
+ "horizontal": {
199
+ "type": "boolean",
200
+ "mutable": false,
201
+ "complexType": {
202
+ "original": "boolean",
203
+ "resolved": "boolean",
204
+ "references": {}
205
+ },
206
+ "required": false,
207
+ "optional": false,
208
+ "docs": {
209
+ "tags": [],
210
+ "text": "Whether the label is on top or left."
211
+ },
212
+ "attribute": "horizontal",
213
+ "reflect": false,
214
+ "defaultValue": "false"
215
+ },
216
+ "autoComplete": {
217
+ "type": "string",
218
+ "mutable": false,
219
+ "complexType": {
220
+ "original": "string",
221
+ "resolved": "string | undefined",
222
+ "references": {}
223
+ },
224
+ "required": false,
225
+ "optional": true,
226
+ "docs": {
227
+ "tags": [],
228
+ "text": "Hint for form autofill feature."
229
+ },
230
+ "attribute": "auto-complete",
231
+ "reflect": false
232
+ },
233
+ "clearable": {
234
+ "type": "boolean",
235
+ "mutable": false,
236
+ "complexType": {
237
+ "original": "boolean",
238
+ "resolved": "boolean",
239
+ "references": {}
240
+ },
241
+ "required": false,
242
+ "optional": false,
243
+ "docs": {
244
+ "tags": [],
245
+ "text": "Whether the input should show a clear button."
246
+ },
247
+ "attribute": "clearable",
248
+ "reflect": false,
249
+ "defaultValue": "false"
250
+ },
251
+ "disabled": {
252
+ "type": "boolean",
253
+ "mutable": false,
254
+ "complexType": {
255
+ "original": "boolean",
256
+ "resolved": "boolean",
257
+ "references": {}
258
+ },
259
+ "required": false,
260
+ "optional": false,
261
+ "docs": {
262
+ "tags": [],
263
+ "text": "Whether the input is disabled."
264
+ },
265
+ "attribute": "disabled",
266
+ "reflect": false,
267
+ "defaultValue": "false"
268
+ },
269
+ "hint": {
270
+ "type": "string",
271
+ "mutable": false,
272
+ "complexType": {
273
+ "original": "string | string[]",
274
+ "resolved": "string | string[] | undefined",
275
+ "references": {}
276
+ },
277
+ "required": false,
278
+ "optional": true,
279
+ "docs": {
280
+ "tags": [],
281
+ "text": "Optional hint text(s) to be displayed with the input."
282
+ },
283
+ "attribute": "hint",
284
+ "reflect": false
285
+ },
286
+ "icon": {
287
+ "type": "string",
288
+ "mutable": false,
289
+ "complexType": {
290
+ "original": "string",
291
+ "resolved": "string | undefined",
292
+ "references": {}
293
+ },
294
+ "required": false,
295
+ "optional": true,
296
+ "docs": {
297
+ "tags": [],
298
+ "text": "The name of an icon to be displayed in the input."
299
+ },
300
+ "attribute": "icon",
301
+ "reflect": false
302
+ },
303
+ "iconRight": {
304
+ "type": "boolean",
305
+ "mutable": false,
306
+ "complexType": {
307
+ "original": "boolean",
308
+ "resolved": "boolean",
309
+ "references": {}
310
+ },
311
+ "required": false,
312
+ "optional": false,
313
+ "docs": {
314
+ "tags": [],
315
+ "text": "Display the icon on the right."
316
+ },
317
+ "attribute": "icon-right",
318
+ "reflect": false,
319
+ "defaultValue": "false"
320
+ },
321
+ "identifier": {
322
+ "type": "string",
323
+ "mutable": false,
324
+ "complexType": {
325
+ "original": "string",
326
+ "resolved": "string | undefined",
327
+ "references": {}
328
+ },
329
+ "required": false,
330
+ "optional": true,
331
+ "docs": {
332
+ "tags": [],
333
+ "text": "A unique identifier for the input."
334
+ },
335
+ "attribute": "identifier",
336
+ "reflect": false
337
+ },
338
+ "label": {
339
+ "type": "string",
340
+ "mutable": false,
341
+ "complexType": {
342
+ "original": "string",
343
+ "resolved": "string",
344
+ "references": {}
345
+ },
346
+ "required": false,
347
+ "optional": false,
348
+ "docs": {
349
+ "tags": [],
350
+ "text": "The label for the input."
351
+ },
352
+ "attribute": "label",
353
+ "reflect": false,
354
+ "defaultValue": "''"
355
+ },
356
+ "labelHidden": {
357
+ "type": "boolean",
358
+ "mutable": false,
359
+ "complexType": {
360
+ "original": "boolean",
361
+ "resolved": "boolean",
362
+ "references": {}
363
+ },
364
+ "required": false,
365
+ "optional": false,
366
+ "docs": {
367
+ "tags": [],
368
+ "text": "Visually hide the label, but still show it to assistive technologies like screen readers."
369
+ },
370
+ "attribute": "label-hidden",
371
+ "reflect": false,
372
+ "defaultValue": "false"
373
+ },
374
+ "max": {
375
+ "type": "any",
376
+ "mutable": false,
377
+ "complexType": {
378
+ "original": "number | string",
379
+ "resolved": "number | string | undefined",
380
+ "references": {}
381
+ },
382
+ "required": false,
383
+ "optional": true,
384
+ "docs": {
385
+ "tags": [],
386
+ "text": "A maximum value for date, time and numeric values."
387
+ },
388
+ "attribute": "max",
389
+ "reflect": false
390
+ },
391
+ "maxLength": {
392
+ "type": "number",
393
+ "mutable": false,
394
+ "complexType": {
395
+ "original": "number",
396
+ "resolved": "number | undefined",
397
+ "references": {}
398
+ },
399
+ "required": false,
400
+ "optional": true,
401
+ "docs": {
402
+ "tags": [],
403
+ "text": "A maximum length (number of characters) for textual values."
404
+ },
405
+ "attribute": "max-length",
406
+ "reflect": false
407
+ },
408
+ "min": {
409
+ "type": "any",
410
+ "mutable": false,
411
+ "complexType": {
412
+ "original": "number | string",
413
+ "resolved": "number | string | undefined",
414
+ "references": {}
415
+ },
416
+ "required": false,
417
+ "optional": true,
418
+ "docs": {
419
+ "tags": [],
420
+ "text": "A minimum value for date, time and numeric values."
421
+ },
422
+ "attribute": "min",
423
+ "reflect": false
424
+ },
425
+ "minLength": {
426
+ "type": "number",
427
+ "mutable": false,
428
+ "complexType": {
429
+ "original": "number",
430
+ "resolved": "number | undefined",
431
+ "references": {}
432
+ },
433
+ "required": false,
434
+ "optional": true,
435
+ "docs": {
436
+ "tags": [],
437
+ "text": "A minimum length (number of characters) for textual values."
438
+ },
439
+ "attribute": "min-length",
440
+ "reflect": false
441
+ },
442
+ "name": {
443
+ "type": "string",
444
+ "mutable": false,
445
+ "complexType": {
446
+ "original": "string",
447
+ "resolved": "string | undefined",
448
+ "references": {}
449
+ },
450
+ "required": false,
451
+ "optional": true,
452
+ "docs": {
453
+ "tags": [],
454
+ "text": "The name of the form control. Submitted with the form as part of a name/value pair."
455
+ },
456
+ "attribute": "name",
457
+ "reflect": false
458
+ },
459
+ "placeholder": {
460
+ "type": "string",
461
+ "mutable": false,
462
+ "complexType": {
463
+ "original": "string",
464
+ "resolved": "string | undefined",
465
+ "references": {}
466
+ },
467
+ "required": false,
468
+ "optional": true,
469
+ "docs": {
470
+ "tags": [],
471
+ "text": "The placeholder text to display within the input."
472
+ },
473
+ "attribute": "placeholder",
474
+ "reflect": false
475
+ },
476
+ "textPrefix": {
477
+ "type": "string",
478
+ "mutable": false,
479
+ "complexType": {
480
+ "original": "string",
481
+ "resolved": "string | undefined",
482
+ "references": {}
483
+ },
484
+ "required": false,
485
+ "optional": true,
486
+ "docs": {
487
+ "tags": [],
488
+ "text": "A textual prefix to be displayed in the input."
489
+ },
490
+ "attribute": "text-prefix",
491
+ "reflect": false
492
+ },
493
+ "textSuffix": {
494
+ "type": "string",
495
+ "mutable": false,
496
+ "complexType": {
497
+ "original": "string",
498
+ "resolved": "string | undefined",
499
+ "references": {}
500
+ },
501
+ "required": false,
502
+ "optional": true,
503
+ "docs": {
504
+ "tags": [],
505
+ "text": "A textual suffix to be displayed in the input."
506
+ },
507
+ "attribute": "text-suffix",
508
+ "reflect": false
509
+ },
510
+ "readonly": {
511
+ "type": "boolean",
512
+ "mutable": false,
513
+ "complexType": {
514
+ "original": "boolean",
515
+ "resolved": "boolean",
516
+ "references": {}
517
+ },
518
+ "required": false,
519
+ "optional": false,
520
+ "docs": {
521
+ "tags": [],
522
+ "text": "The value is not editable."
523
+ },
524
+ "attribute": "readonly",
525
+ "reflect": false,
526
+ "defaultValue": "false"
527
+ },
528
+ "required": {
529
+ "type": "boolean",
530
+ "mutable": false,
531
+ "complexType": {
532
+ "original": "boolean",
533
+ "resolved": "boolean",
534
+ "references": {}
535
+ },
536
+ "required": false,
537
+ "optional": false,
538
+ "docs": {
539
+ "tags": [],
540
+ "text": "A value is required or must be check for the form to be submittable."
541
+ },
542
+ "attribute": "required",
543
+ "reflect": false,
544
+ "defaultValue": "false"
545
+ },
546
+ "round": {
547
+ "type": "boolean",
548
+ "mutable": false,
549
+ "complexType": {
550
+ "original": "boolean",
551
+ "resolved": "boolean",
552
+ "references": {}
553
+ },
554
+ "required": false,
555
+ "optional": false,
556
+ "docs": {
557
+ "tags": [],
558
+ "text": "Use round input edges."
559
+ },
560
+ "attribute": "round",
561
+ "reflect": false,
562
+ "defaultValue": "false"
563
+ },
564
+ "type": {
565
+ "type": "string",
566
+ "mutable": false,
567
+ "complexType": {
568
+ "original": "InputType",
569
+ "resolved": "\"color\" | \"email\" | \"file\" | \"number\" | \"password\" | \"range\" | \"search\" | \"tel\" | \"text\" | \"url\"",
570
+ "references": {
571
+ "InputType": {
572
+ "location": "import",
573
+ "path": "./input-type",
574
+ "id": "src/components/cat-input/input-type.ts::InputType"
575
+ }
576
+ }
577
+ },
578
+ "required": false,
579
+ "optional": false,
580
+ "docs": {
581
+ "tags": [],
582
+ "text": "Type of form control."
583
+ },
584
+ "attribute": "type",
585
+ "reflect": false,
586
+ "defaultValue": "'text'"
587
+ },
588
+ "value": {
589
+ "type": "string",
590
+ "mutable": true,
591
+ "complexType": {
592
+ "original": "string",
593
+ "resolved": "string | undefined",
594
+ "references": {}
595
+ },
596
+ "required": false,
597
+ "optional": true,
598
+ "docs": {
599
+ "tags": [],
600
+ "text": "The value of the control."
601
+ },
602
+ "attribute": "value",
603
+ "reflect": false
604
+ },
605
+ "errors": {
606
+ "type": "boolean",
607
+ "mutable": false,
608
+ "complexType": {
609
+ "original": "boolean | string[] | ErrorMap",
610
+ "resolved": "boolean | string[] | undefined | { [key: string]: any; }",
611
+ "references": {
612
+ "ErrorMap": {
613
+ "location": "import",
614
+ "path": "../cat-form-hint/cat-form-hint",
615
+ "id": "src/components/cat-form-hint/cat-form-hint.tsx::ErrorMap"
616
+ }
617
+ }
618
+ },
619
+ "required": false,
620
+ "optional": true,
621
+ "docs": {
622
+ "tags": [],
623
+ "text": "The validation errors for this input. Will render a hint under the input\nwith the translated error message(s) `error.${key}`. If an object is\npassed, the keys will be used as error keys and the values translation\nparameters.\nIf the value is `true`, the input will be marked as invalid without any\nhints under the input."
624
+ },
625
+ "attribute": "errors",
626
+ "reflect": false
627
+ },
628
+ "errorUpdate": {
629
+ "type": "any",
630
+ "mutable": false,
631
+ "complexType": {
632
+ "original": "boolean | number",
633
+ "resolved": "boolean | number",
634
+ "references": {}
635
+ },
636
+ "required": false,
637
+ "optional": false,
638
+ "docs": {
639
+ "tags": [],
640
+ "text": "Fine-grained control over when the errors are shown. Can be `false` to\nnever show errors, `true` to show errors on blur, or a number to show\nerrors on change with the given delay in milliseconds."
641
+ },
642
+ "attribute": "error-update",
643
+ "reflect": false,
644
+ "defaultValue": "0"
645
+ },
646
+ "nativeAttributes": {
647
+ "type": "unknown",
648
+ "mutable": false,
649
+ "complexType": {
650
+ "original": "{ [key: string]: string }",
651
+ "resolved": "undefined | { [key: string]: string; }",
652
+ "references": {}
653
+ },
654
+ "required": false,
655
+ "optional": true,
656
+ "docs": {
657
+ "tags": [],
658
+ "text": "Attributes that will be added to the native HTML input element."
659
+ }
768
660
  }
769
- },
770
- "return": "Promise<void>"
771
- },
772
- "docs": {
773
- "text": "Programmatically remove focus from the input. Use this method instead of\n`input.blur()`.",
774
- "tags": []
775
- }
776
- },
777
- "clear": {
778
- "complexType": {
779
- "signature": "() => Promise<void>",
780
- "parameters": [],
781
- "references": {
782
- "Promise": {
783
- "location": "global",
784
- "id": "global::Promise"
661
+ };
662
+ }
663
+ static get states() {
664
+ return {
665
+ "hasSlottedLabel": {},
666
+ "hasSlottedHint": {},
667
+ "errorMap": {}
668
+ };
669
+ }
670
+ static get events() {
671
+ return [{
672
+ "method": "catChange",
673
+ "name": "catChange",
674
+ "bubbles": true,
675
+ "cancelable": true,
676
+ "composed": true,
677
+ "docs": {
678
+ "tags": [],
679
+ "text": "Emitted when the value is changed."
680
+ },
681
+ "complexType": {
682
+ "original": "string",
683
+ "resolved": "string",
684
+ "references": {}
685
+ }
686
+ }, {
687
+ "method": "catFocus",
688
+ "name": "catFocus",
689
+ "bubbles": true,
690
+ "cancelable": true,
691
+ "composed": true,
692
+ "docs": {
693
+ "tags": [],
694
+ "text": "Emitted when the input received focus."
695
+ },
696
+ "complexType": {
697
+ "original": "FocusEvent",
698
+ "resolved": "FocusEvent",
699
+ "references": {
700
+ "FocusEvent": {
701
+ "location": "global",
702
+ "id": "global::FocusEvent"
703
+ }
704
+ }
705
+ }
706
+ }, {
707
+ "method": "catBlur",
708
+ "name": "catBlur",
709
+ "bubbles": true,
710
+ "cancelable": true,
711
+ "composed": true,
712
+ "docs": {
713
+ "tags": [],
714
+ "text": "Emitted when the input loses focus."
715
+ },
716
+ "complexType": {
717
+ "original": "FocusEvent",
718
+ "resolved": "FocusEvent",
719
+ "references": {
720
+ "FocusEvent": {
721
+ "location": "global",
722
+ "id": "global::FocusEvent"
723
+ }
724
+ }
725
+ }
726
+ }];
727
+ }
728
+ static get methods() {
729
+ return {
730
+ "doFocus": {
731
+ "complexType": {
732
+ "signature": "(options?: FocusOptions) => Promise<void>",
733
+ "parameters": [{
734
+ "tags": [{
735
+ "name": "param",
736
+ "text": "options An optional object providing options to control aspects of\nthe focusing process."
737
+ }],
738
+ "text": "An optional object providing options to control aspects of\nthe focusing process."
739
+ }],
740
+ "references": {
741
+ "Promise": {
742
+ "location": "global",
743
+ "id": "global::Promise"
744
+ },
745
+ "FocusOptions": {
746
+ "location": "global",
747
+ "id": "global::FocusOptions"
748
+ }
749
+ },
750
+ "return": "Promise<void>"
751
+ },
752
+ "docs": {
753
+ "text": "Programmatically move focus to the input. Use this method instead of\n`input.focus()`.",
754
+ "tags": [{
755
+ "name": "param",
756
+ "text": "options An optional object providing options to control aspects of\nthe focusing process."
757
+ }]
758
+ }
759
+ },
760
+ "doBlur": {
761
+ "complexType": {
762
+ "signature": "() => Promise<void>",
763
+ "parameters": [],
764
+ "references": {
765
+ "Promise": {
766
+ "location": "global",
767
+ "id": "global::Promise"
768
+ }
769
+ },
770
+ "return": "Promise<void>"
771
+ },
772
+ "docs": {
773
+ "text": "Programmatically remove focus from the input. Use this method instead of\n`input.blur()`.",
774
+ "tags": []
775
+ }
776
+ },
777
+ "clear": {
778
+ "complexType": {
779
+ "signature": "() => Promise<void>",
780
+ "parameters": [],
781
+ "references": {
782
+ "Promise": {
783
+ "location": "global",
784
+ "id": "global::Promise"
785
+ }
786
+ },
787
+ "return": "Promise<void>"
788
+ },
789
+ "docs": {
790
+ "text": "Clear the input.",
791
+ "tags": []
792
+ }
785
793
  }
786
- },
787
- "return": "Promise<void>"
788
- },
789
- "docs": {
790
- "text": "Clear the input.",
791
- "tags": []
792
- }
793
- }
794
- };
795
- }
796
- static get elementRef() { return "hostElement"; }
797
- static get watchers() {
798
- return [{
799
- "propName": "errors",
800
- "methodName": "onErrorsChanged"
801
- }];
802
- }
794
+ };
795
+ }
796
+ static get elementRef() { return "hostElement"; }
797
+ static get watchers() {
798
+ return [{
799
+ "propName": "errors",
800
+ "methodName": "onErrorsChanged"
801
+ }];
802
+ }
803
803
  }
804
804
  //# sourceMappingURL=cat-input.js.map