@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
@@ -16,604 +16,604 @@ let nextUniqueId = 0;
16
16
  * @part textarea - The native textarea element.
17
17
  */
18
18
  export class CatTextarea {
19
- constructor() {
20
- this._id = `cat-textarea-${nextUniqueId++}`;
21
- this.hasSlottedLabel = false;
22
- this.hasSlottedHint = false;
23
- this.errorMap = undefined;
24
- this.requiredMarker = 'optional';
25
- this.horizontal = false;
26
- this.disabled = false;
27
- this.hint = undefined;
28
- this.identifier = undefined;
29
- this.label = '';
30
- this.labelHidden = false;
31
- this.maxLength = undefined;
32
- this.minLength = undefined;
33
- this.name = undefined;
34
- this.placeholder = undefined;
35
- this.readonly = false;
36
- this.required = false;
37
- this.rows = 3;
38
- this.value = undefined;
39
- this.errors = undefined;
40
- this.errorUpdate = 0;
41
- this.nativeAttributes = undefined;
42
- }
43
- get id() {
44
- return this.identifier || this._id;
45
- }
46
- componentWillRender() {
47
- this.onErrorsChanged(this.errors);
48
- this.hasSlottedLabel = !!this.hostElement.querySelector('[slot="label"]');
49
- this.hasSlottedHint = !!this.hostElement.querySelector('[slot="hint"]');
50
- if (!this.label && !this.hasSlottedLabel) {
51
- log.warn('[A11y] Missing ARIA label on textarea', this);
19
+ constructor() {
20
+ this._id = `cat-textarea-${nextUniqueId++}`;
21
+ this.hasSlottedLabel = false;
22
+ this.hasSlottedHint = false;
23
+ this.errorMap = undefined;
24
+ this.requiredMarker = 'optional';
25
+ this.horizontal = false;
26
+ this.disabled = false;
27
+ this.hint = undefined;
28
+ this.identifier = undefined;
29
+ this.label = '';
30
+ this.labelHidden = false;
31
+ this.maxLength = undefined;
32
+ this.minLength = undefined;
33
+ this.name = undefined;
34
+ this.placeholder = undefined;
35
+ this.readonly = false;
36
+ this.required = false;
37
+ this.rows = 3;
38
+ this.value = undefined;
39
+ this.errors = undefined;
40
+ this.errorUpdate = 0;
41
+ this.nativeAttributes = undefined;
52
42
  }
53
- }
54
- componentDidLoad() {
55
- autosize(this.textarea);
56
- }
57
- /**
58
- * Programmatically move focus to the textarea. Use this method instead of
59
- * `textarea.focus()`.
60
- *
61
- * @param options An optional object providing options to control aspects of
62
- * the focusing process.
63
- */
64
- async doFocus(options) {
65
- this.textarea.focus(options);
66
- }
67
- /**
68
- * Programmatically remove focus from the textarea. Use this method instead of
69
- * `textarea.blur()`.
70
- */
71
- async doBlur() {
72
- this.textarea.blur();
73
- }
74
- /**
75
- * Clear the textarea.
76
- */
77
- async clear() {
78
- this.value = '';
79
- this.catChange.emit(this.value);
80
- }
81
- onErrorsChanged(value) {
82
- if (!coerceBoolean(this.errorUpdate)) {
83
- this.errorMap = undefined;
43
+ get id() {
44
+ return this.identifier || this._id;
84
45
  }
85
- else {
86
- this.errorMapSrc = Array.isArray(value)
87
- ? value.reduce((acc, err) => ({ ...acc, [err]: undefined }), {})
88
- : value === true
89
- ? {}
90
- : value || undefined;
91
- this.showErrorsIfTimeout() || this.showErrorsIfNoFocus();
46
+ componentWillRender() {
47
+ this.onErrorsChanged(this.errors);
48
+ this.hasSlottedLabel = !!this.hostElement.querySelector('[slot="label"]');
49
+ this.hasSlottedHint = !!this.hostElement.querySelector('[slot="hint"]');
50
+ if (!this.label && !this.hasSlottedLabel) {
51
+ log.warn('[A11y] Missing ARIA label on textarea', this);
52
+ }
92
53
  }
93
- }
94
- render() {
95
- return (h(Host, null, h("div", { class: {
96
- 'textarea-field': true,
97
- 'textarea-horizontal': this.horizontal
98
- } }, 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?.length ?? 0, "/", this.maxLength))))))), h("div", { class: "textarea-container" }, h("div", { class: {
99
- 'textarea-wrapper': true,
100
- 'textarea-readonly': this.readonly,
101
- 'textarea-disabled': this.disabled,
102
- 'textarea-invalid': this.invalid
103
- } }, h("textarea", { ...this.nativeAttributes, part: "textarea", ref: el => (this.textarea = el), id: this.id, disabled: this.disabled, maxlength: this.maxLength, minlength: this.minLength, name: this.name, placeholder: this.placeholder, readonly: this.readonly, required: this.required, rows: this.rows, 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.invalid && (h("cat-icon", { icon: "$cat:input-error", class: "icon-suffix cat-text-danger", size: "l", onClick: () => this.textarea.focus() }))), this.hasHint && (h(CatFormHint, { id: this.id, hint: this.hint, slottedHint: this.hasSlottedHint && h("slot", { name: "hint" }), errorMap: this.errorMap }))))));
104
- }
105
- get hasHint() {
106
- return !!this.hint || !!this.hasSlottedHint || this.invalid;
107
- }
108
- get invalid() {
109
- return !!Object.keys(this.errorMap || {}).length;
110
- }
111
- onInput() {
112
- this.value = this.textarea.value;
113
- this.catChange.emit(this.value);
114
- this.showErrorsIfTimeout();
115
- }
116
- onFocus(event) {
117
- this.catFocus.emit(event);
118
- }
119
- onBlur(event) {
120
- this.catBlur.emit(event);
121
- if (coerceBoolean(this.errorUpdate)) {
122
- this.showErrors();
54
+ componentDidLoad() {
55
+ autosize(this.textarea);
123
56
  }
124
- }
125
- showErrors() {
126
- this.errorMap = this.errorMapSrc;
127
- }
128
- showErrorsIfTimeout() {
129
- const errorUpdate = coerceNumber(this.errorUpdate, null);
130
- if (errorUpdate !== null) {
131
- typeof this.errorUpdateTimeoutId === 'number' && window.clearTimeout(this.errorUpdateTimeoutId);
132
- this.errorUpdateTimeoutId = window.setTimeout(() => this.showErrors(), errorUpdate);
133
- return true;
57
+ /**
58
+ * Programmatically move focus to the textarea. Use this method instead of
59
+ * `textarea.focus()`.
60
+ *
61
+ * @param options An optional object providing options to control aspects of
62
+ * the focusing process.
63
+ */
64
+ async doFocus(options) {
65
+ this.textarea.focus(options);
134
66
  }
135
- return false;
136
- }
137
- showErrorsIfNoFocus() {
138
- const hasFocus = document.activeElement === this.hostElement || document.activeElement === this.textarea;
139
- if (!hasFocus) {
140
- this.showErrors();
67
+ /**
68
+ * Programmatically remove focus from the textarea. Use this method instead of
69
+ * `textarea.blur()`.
70
+ */
71
+ async doBlur() {
72
+ this.textarea.blur();
141
73
  }
142
- }
143
- static get is() { return "cat-textarea"; }
144
- static get encapsulation() { return "shadow"; }
145
- static get originalStyleUrls() {
146
- return {
147
- "$": ["cat-textarea.scss"]
148
- };
149
- }
150
- static get styleUrls() {
151
- return {
152
- "$": ["cat-textarea.css"]
153
- };
154
- }
155
- static get properties() {
156
- return {
157
- "requiredMarker": {
158
- "type": "string",
159
- "mutable": false,
160
- "complexType": {
161
- "original": "'none' | 'required' | 'optional' | 'none!' | 'optional!' | 'required!'",
162
- "resolved": "\"none!\" | \"none\" | \"optional!\" | \"optional\" | \"required!\" | \"required\" | undefined",
163
- "references": {}
164
- },
165
- "required": false,
166
- "optional": true,
167
- "docs": {
168
- "tags": [],
169
- "text": "Whether the label need a marker to shown if the textarea is required or optional."
170
- },
171
- "attribute": "required-marker",
172
- "reflect": false,
173
- "defaultValue": "'optional'"
174
- },
175
- "horizontal": {
176
- "type": "boolean",
177
- "mutable": false,
178
- "complexType": {
179
- "original": "boolean",
180
- "resolved": "boolean",
181
- "references": {}
182
- },
183
- "required": false,
184
- "optional": false,
185
- "docs": {
186
- "tags": [],
187
- "text": "Whether the label is on top or left."
188
- },
189
- "attribute": "horizontal",
190
- "reflect": false,
191
- "defaultValue": "false"
192
- },
193
- "disabled": {
194
- "type": "boolean",
195
- "mutable": false,
196
- "complexType": {
197
- "original": "boolean",
198
- "resolved": "boolean",
199
- "references": {}
200
- },
201
- "required": false,
202
- "optional": false,
203
- "docs": {
204
- "tags": [],
205
- "text": "Whether the textarea is disabled."
206
- },
207
- "attribute": "disabled",
208
- "reflect": false,
209
- "defaultValue": "false"
210
- },
211
- "hint": {
212
- "type": "string",
213
- "mutable": false,
214
- "complexType": {
215
- "original": "string | string[]",
216
- "resolved": "string | string[] | undefined",
217
- "references": {}
218
- },
219
- "required": false,
220
- "optional": true,
221
- "docs": {
222
- "tags": [],
223
- "text": "Optional hint text(s) to be displayed with the textarea."
224
- },
225
- "attribute": "hint",
226
- "reflect": false
227
- },
228
- "identifier": {
229
- "type": "string",
230
- "mutable": false,
231
- "complexType": {
232
- "original": "string",
233
- "resolved": "string | undefined",
234
- "references": {}
235
- },
236
- "required": false,
237
- "optional": true,
238
- "docs": {
239
- "tags": [],
240
- "text": "A unique identifier for the input."
241
- },
242
- "attribute": "identifier",
243
- "reflect": false
244
- },
245
- "label": {
246
- "type": "string",
247
- "mutable": false,
248
- "complexType": {
249
- "original": "string",
250
- "resolved": "string",
251
- "references": {}
252
- },
253
- "required": false,
254
- "optional": false,
255
- "docs": {
256
- "tags": [],
257
- "text": "The label for the textarea."
258
- },
259
- "attribute": "label",
260
- "reflect": false,
261
- "defaultValue": "''"
262
- },
263
- "labelHidden": {
264
- "type": "boolean",
265
- "mutable": false,
266
- "complexType": {
267
- "original": "boolean",
268
- "resolved": "boolean",
269
- "references": {}
270
- },
271
- "required": false,
272
- "optional": false,
273
- "docs": {
274
- "tags": [],
275
- "text": "Visually hide the label, but still show it to assistive technologies like screen readers."
276
- },
277
- "attribute": "label-hidden",
278
- "reflect": false,
279
- "defaultValue": "false"
280
- },
281
- "maxLength": {
282
- "type": "number",
283
- "mutable": false,
284
- "complexType": {
285
- "original": "number",
286
- "resolved": "number | undefined",
287
- "references": {}
288
- },
289
- "required": false,
290
- "optional": true,
291
- "docs": {
292
- "tags": [],
293
- "text": "A maximum length (number of characters) for textual values."
294
- },
295
- "attribute": "max-length",
296
- "reflect": false
297
- },
298
- "minLength": {
299
- "type": "number",
300
- "mutable": false,
301
- "complexType": {
302
- "original": "number",
303
- "resolved": "number | undefined",
304
- "references": {}
305
- },
306
- "required": false,
307
- "optional": true,
308
- "docs": {
309
- "tags": [],
310
- "text": "A minimum length (number of characters) for textual values."
311
- },
312
- "attribute": "min-length",
313
- "reflect": false
314
- },
315
- "name": {
316
- "type": "string",
317
- "mutable": false,
318
- "complexType": {
319
- "original": "string",
320
- "resolved": "string | undefined",
321
- "references": {}
322
- },
323
- "required": false,
324
- "optional": true,
325
- "docs": {
326
- "tags": [],
327
- "text": "The name of the form control. Submitted with the form as part of a name/value pair."
328
- },
329
- "attribute": "name",
330
- "reflect": false
331
- },
332
- "placeholder": {
333
- "type": "string",
334
- "mutable": false,
335
- "complexType": {
336
- "original": "string",
337
- "resolved": "string | undefined",
338
- "references": {}
339
- },
340
- "required": false,
341
- "optional": true,
342
- "docs": {
343
- "tags": [],
344
- "text": "The placeholder text to display within the input."
345
- },
346
- "attribute": "placeholder",
347
- "reflect": false
348
- },
349
- "readonly": {
350
- "type": "boolean",
351
- "mutable": false,
352
- "complexType": {
353
- "original": "boolean",
354
- "resolved": "boolean",
355
- "references": {}
356
- },
357
- "required": false,
358
- "optional": false,
359
- "docs": {
360
- "tags": [],
361
- "text": "The value is not editable."
362
- },
363
- "attribute": "readonly",
364
- "reflect": false,
365
- "defaultValue": "false"
366
- },
367
- "required": {
368
- "type": "boolean",
369
- "mutable": false,
370
- "complexType": {
371
- "original": "boolean",
372
- "resolved": "boolean",
373
- "references": {}
374
- },
375
- "required": false,
376
- "optional": false,
377
- "docs": {
378
- "tags": [],
379
- "text": "A value is required or must be check for the form to be submittable."
380
- },
381
- "attribute": "required",
382
- "reflect": false,
383
- "defaultValue": "false"
384
- },
385
- "rows": {
386
- "type": "number",
387
- "mutable": false,
388
- "complexType": {
389
- "original": "number",
390
- "resolved": "number",
391
- "references": {}
392
- },
393
- "required": false,
394
- "optional": false,
395
- "docs": {
396
- "tags": [],
397
- "text": "Specifies the initial number of lines in the textarea."
398
- },
399
- "attribute": "rows",
400
- "reflect": false,
401
- "defaultValue": "3"
402
- },
403
- "value": {
404
- "type": "string",
405
- "mutable": true,
406
- "complexType": {
407
- "original": "string",
408
- "resolved": "string | undefined",
409
- "references": {}
410
- },
411
- "required": false,
412
- "optional": true,
413
- "docs": {
414
- "tags": [],
415
- "text": "The initial value of the control."
416
- },
417
- "attribute": "value",
418
- "reflect": false
419
- },
420
- "errors": {
421
- "type": "boolean",
422
- "mutable": false,
423
- "complexType": {
424
- "original": "boolean | string[] | ErrorMap",
425
- "resolved": "boolean | string[] | undefined | { [key: string]: any; }",
426
- "references": {
427
- "ErrorMap": {
428
- "location": "import",
429
- "path": "../cat-form-hint/cat-form-hint",
430
- "id": "src/components/cat-form-hint/cat-form-hint.tsx::ErrorMap"
431
- }
432
- }
433
- },
434
- "required": false,
435
- "optional": true,
436
- "docs": {
437
- "tags": [],
438
- "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."
439
- },
440
- "attribute": "errors",
441
- "reflect": false
442
- },
443
- "errorUpdate": {
444
- "type": "any",
445
- "mutable": false,
446
- "complexType": {
447
- "original": "boolean | number",
448
- "resolved": "boolean | number",
449
- "references": {}
450
- },
451
- "required": false,
452
- "optional": false,
453
- "docs": {
454
- "tags": [],
455
- "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."
456
- },
457
- "attribute": "error-update",
458
- "reflect": false,
459
- "defaultValue": "0"
460
- },
461
- "nativeAttributes": {
462
- "type": "unknown",
463
- "mutable": false,
464
- "complexType": {
465
- "original": "{ [key: string]: string }",
466
- "resolved": "undefined | { [key: string]: string; }",
467
- "references": {}
468
- },
469
- "required": false,
470
- "optional": true,
471
- "docs": {
472
- "tags": [],
473
- "text": "Attributes that will be added to the native HTML textarea element."
74
+ /**
75
+ * Clear the textarea.
76
+ */
77
+ async clear() {
78
+ this.value = '';
79
+ this.catChange.emit(this.value);
80
+ }
81
+ onErrorsChanged(value) {
82
+ if (!coerceBoolean(this.errorUpdate)) {
83
+ this.errorMap = undefined;
474
84
  }
475
- }
476
- };
477
- }
478
- static get states() {
479
- return {
480
- "hasSlottedLabel": {},
481
- "hasSlottedHint": {},
482
- "errorMap": {}
483
- };
484
- }
485
- static get events() {
486
- return [{
487
- "method": "catChange",
488
- "name": "catChange",
489
- "bubbles": true,
490
- "cancelable": true,
491
- "composed": true,
492
- "docs": {
493
- "tags": [],
494
- "text": "Emitted when the value is changed."
495
- },
496
- "complexType": {
497
- "original": "string",
498
- "resolved": "string",
499
- "references": {}
85
+ else {
86
+ this.errorMapSrc = Array.isArray(value)
87
+ ? value.reduce((acc, err) => ({ ...acc, [err]: undefined }), {})
88
+ : value === true
89
+ ? {}
90
+ : value || undefined;
91
+ this.showErrorsIfTimeout() || this.showErrorsIfNoFocus();
500
92
  }
501
- }, {
502
- "method": "catFocus",
503
- "name": "catFocus",
504
- "bubbles": true,
505
- "cancelable": true,
506
- "composed": true,
507
- "docs": {
508
- "tags": [],
509
- "text": "Emitted when the textarea received focus."
510
- },
511
- "complexType": {
512
- "original": "FocusEvent",
513
- "resolved": "FocusEvent",
514
- "references": {
515
- "FocusEvent": {
516
- "location": "global",
517
- "id": "global::FocusEvent"
518
- }
519
- }
93
+ }
94
+ render() {
95
+ return (h(Host, null, h("div", { class: {
96
+ 'textarea-field': true,
97
+ 'textarea-horizontal': this.horizontal
98
+ } }, 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?.length ?? 0, "/", this.maxLength))))))), h("div", { class: "textarea-container" }, h("div", { class: {
99
+ 'textarea-wrapper': true,
100
+ 'textarea-readonly': this.readonly,
101
+ 'textarea-disabled': this.disabled,
102
+ 'textarea-invalid': this.invalid
103
+ } }, h("textarea", { ...this.nativeAttributes, part: "textarea", ref: el => (this.textarea = el), id: this.id, disabled: this.disabled, maxlength: this.maxLength, minlength: this.minLength, name: this.name, placeholder: this.placeholder, readonly: this.readonly, required: this.required, rows: this.rows, 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.invalid && (h("cat-icon", { icon: "$cat:input-error", class: "icon-suffix cat-text-danger", size: "l", onClick: () => this.textarea.focus() }))), this.hasHint && (h(CatFormHint, { id: this.id, hint: this.hint, slottedHint: this.hasSlottedHint && h("slot", { name: "hint" }), errorMap: this.errorMap }))))));
104
+ }
105
+ get hasHint() {
106
+ return !!this.hint || !!this.hasSlottedHint || this.invalid;
107
+ }
108
+ get invalid() {
109
+ return !!Object.keys(this.errorMap || {}).length;
110
+ }
111
+ onInput() {
112
+ this.value = this.textarea.value;
113
+ this.catChange.emit(this.value);
114
+ this.showErrorsIfTimeout();
115
+ }
116
+ onFocus(event) {
117
+ this.catFocus.emit(event);
118
+ }
119
+ onBlur(event) {
120
+ this.catBlur.emit(event);
121
+ if (coerceBoolean(this.errorUpdate)) {
122
+ this.showErrors();
520
123
  }
521
- }, {
522
- "method": "catBlur",
523
- "name": "catBlur",
524
- "bubbles": true,
525
- "cancelable": true,
526
- "composed": true,
527
- "docs": {
528
- "tags": [],
529
- "text": "Emitted when the textarea loses focus."
530
- },
531
- "complexType": {
532
- "original": "FocusEvent",
533
- "resolved": "FocusEvent",
534
- "references": {
535
- "FocusEvent": {
536
- "location": "global",
537
- "id": "global::FocusEvent"
538
- }
539
- }
124
+ }
125
+ showErrors() {
126
+ this.errorMap = this.errorMapSrc;
127
+ }
128
+ showErrorsIfTimeout() {
129
+ const errorUpdate = coerceNumber(this.errorUpdate, null);
130
+ if (errorUpdate !== null) {
131
+ typeof this.errorUpdateTimeoutId === 'number' && window.clearTimeout(this.errorUpdateTimeoutId);
132
+ this.errorUpdateTimeoutId = window.setTimeout(() => this.showErrors(), errorUpdate);
133
+ return true;
540
134
  }
541
- }];
542
- }
543
- static get methods() {
544
- return {
545
- "doFocus": {
546
- "complexType": {
547
- "signature": "(options?: FocusOptions) => Promise<void>",
548
- "parameters": [{
549
- "tags": [{
550
- "name": "param",
551
- "text": "options An optional object providing options to control aspects of\nthe focusing process."
552
- }],
553
- "text": "An optional object providing options to control aspects of\nthe focusing process."
554
- }],
555
- "references": {
556
- "Promise": {
557
- "location": "global",
558
- "id": "global::Promise"
559
- },
560
- "FocusOptions": {
561
- "location": "global",
562
- "id": "global::FocusOptions"
563
- }
564
- },
565
- "return": "Promise<void>"
566
- },
567
- "docs": {
568
- "text": "Programmatically move focus to the textarea. Use this method instead of\n`textarea.focus()`.",
569
- "tags": [{
570
- "name": "param",
571
- "text": "options An optional object providing options to control aspects of\nthe focusing process."
572
- }]
135
+ return false;
136
+ }
137
+ showErrorsIfNoFocus() {
138
+ const hasFocus = document.activeElement === this.hostElement || document.activeElement === this.textarea;
139
+ if (!hasFocus) {
140
+ this.showErrors();
573
141
  }
574
- },
575
- "doBlur": {
576
- "complexType": {
577
- "signature": "() => Promise<void>",
578
- "parameters": [],
579
- "references": {
580
- "Promise": {
581
- "location": "global",
582
- "id": "global::Promise"
142
+ }
143
+ static get is() { return "cat-textarea"; }
144
+ static get encapsulation() { return "shadow"; }
145
+ static get originalStyleUrls() {
146
+ return {
147
+ "$": ["cat-textarea.scss"]
148
+ };
149
+ }
150
+ static get styleUrls() {
151
+ return {
152
+ "$": ["cat-textarea.css"]
153
+ };
154
+ }
155
+ static get properties() {
156
+ return {
157
+ "requiredMarker": {
158
+ "type": "string",
159
+ "mutable": false,
160
+ "complexType": {
161
+ "original": "'none' | 'required' | 'optional' | 'none!' | 'optional!' | 'required!'",
162
+ "resolved": "\"none!\" | \"none\" | \"optional!\" | \"optional\" | \"required!\" | \"required\" | undefined",
163
+ "references": {}
164
+ },
165
+ "required": false,
166
+ "optional": true,
167
+ "docs": {
168
+ "tags": [],
169
+ "text": "Whether the label need a marker to shown if the textarea is required or optional."
170
+ },
171
+ "attribute": "required-marker",
172
+ "reflect": false,
173
+ "defaultValue": "'optional'"
174
+ },
175
+ "horizontal": {
176
+ "type": "boolean",
177
+ "mutable": false,
178
+ "complexType": {
179
+ "original": "boolean",
180
+ "resolved": "boolean",
181
+ "references": {}
182
+ },
183
+ "required": false,
184
+ "optional": false,
185
+ "docs": {
186
+ "tags": [],
187
+ "text": "Whether the label is on top or left."
188
+ },
189
+ "attribute": "horizontal",
190
+ "reflect": false,
191
+ "defaultValue": "false"
192
+ },
193
+ "disabled": {
194
+ "type": "boolean",
195
+ "mutable": false,
196
+ "complexType": {
197
+ "original": "boolean",
198
+ "resolved": "boolean",
199
+ "references": {}
200
+ },
201
+ "required": false,
202
+ "optional": false,
203
+ "docs": {
204
+ "tags": [],
205
+ "text": "Whether the textarea is disabled."
206
+ },
207
+ "attribute": "disabled",
208
+ "reflect": false,
209
+ "defaultValue": "false"
210
+ },
211
+ "hint": {
212
+ "type": "string",
213
+ "mutable": false,
214
+ "complexType": {
215
+ "original": "string | string[]",
216
+ "resolved": "string | string[] | undefined",
217
+ "references": {}
218
+ },
219
+ "required": false,
220
+ "optional": true,
221
+ "docs": {
222
+ "tags": [],
223
+ "text": "Optional hint text(s) to be displayed with the textarea."
224
+ },
225
+ "attribute": "hint",
226
+ "reflect": false
227
+ },
228
+ "identifier": {
229
+ "type": "string",
230
+ "mutable": false,
231
+ "complexType": {
232
+ "original": "string",
233
+ "resolved": "string | undefined",
234
+ "references": {}
235
+ },
236
+ "required": false,
237
+ "optional": true,
238
+ "docs": {
239
+ "tags": [],
240
+ "text": "A unique identifier for the input."
241
+ },
242
+ "attribute": "identifier",
243
+ "reflect": false
244
+ },
245
+ "label": {
246
+ "type": "string",
247
+ "mutable": false,
248
+ "complexType": {
249
+ "original": "string",
250
+ "resolved": "string",
251
+ "references": {}
252
+ },
253
+ "required": false,
254
+ "optional": false,
255
+ "docs": {
256
+ "tags": [],
257
+ "text": "The label for the textarea."
258
+ },
259
+ "attribute": "label",
260
+ "reflect": false,
261
+ "defaultValue": "''"
262
+ },
263
+ "labelHidden": {
264
+ "type": "boolean",
265
+ "mutable": false,
266
+ "complexType": {
267
+ "original": "boolean",
268
+ "resolved": "boolean",
269
+ "references": {}
270
+ },
271
+ "required": false,
272
+ "optional": false,
273
+ "docs": {
274
+ "tags": [],
275
+ "text": "Visually hide the label, but still show it to assistive technologies like screen readers."
276
+ },
277
+ "attribute": "label-hidden",
278
+ "reflect": false,
279
+ "defaultValue": "false"
280
+ },
281
+ "maxLength": {
282
+ "type": "number",
283
+ "mutable": false,
284
+ "complexType": {
285
+ "original": "number",
286
+ "resolved": "number | undefined",
287
+ "references": {}
288
+ },
289
+ "required": false,
290
+ "optional": true,
291
+ "docs": {
292
+ "tags": [],
293
+ "text": "A maximum length (number of characters) for textual values."
294
+ },
295
+ "attribute": "max-length",
296
+ "reflect": false
297
+ },
298
+ "minLength": {
299
+ "type": "number",
300
+ "mutable": false,
301
+ "complexType": {
302
+ "original": "number",
303
+ "resolved": "number | undefined",
304
+ "references": {}
305
+ },
306
+ "required": false,
307
+ "optional": true,
308
+ "docs": {
309
+ "tags": [],
310
+ "text": "A minimum length (number of characters) for textual values."
311
+ },
312
+ "attribute": "min-length",
313
+ "reflect": false
314
+ },
315
+ "name": {
316
+ "type": "string",
317
+ "mutable": false,
318
+ "complexType": {
319
+ "original": "string",
320
+ "resolved": "string | undefined",
321
+ "references": {}
322
+ },
323
+ "required": false,
324
+ "optional": true,
325
+ "docs": {
326
+ "tags": [],
327
+ "text": "The name of the form control. Submitted with the form as part of a name/value pair."
328
+ },
329
+ "attribute": "name",
330
+ "reflect": false
331
+ },
332
+ "placeholder": {
333
+ "type": "string",
334
+ "mutable": false,
335
+ "complexType": {
336
+ "original": "string",
337
+ "resolved": "string | undefined",
338
+ "references": {}
339
+ },
340
+ "required": false,
341
+ "optional": true,
342
+ "docs": {
343
+ "tags": [],
344
+ "text": "The placeholder text to display within the input."
345
+ },
346
+ "attribute": "placeholder",
347
+ "reflect": false
348
+ },
349
+ "readonly": {
350
+ "type": "boolean",
351
+ "mutable": false,
352
+ "complexType": {
353
+ "original": "boolean",
354
+ "resolved": "boolean",
355
+ "references": {}
356
+ },
357
+ "required": false,
358
+ "optional": false,
359
+ "docs": {
360
+ "tags": [],
361
+ "text": "The value is not editable."
362
+ },
363
+ "attribute": "readonly",
364
+ "reflect": false,
365
+ "defaultValue": "false"
366
+ },
367
+ "required": {
368
+ "type": "boolean",
369
+ "mutable": false,
370
+ "complexType": {
371
+ "original": "boolean",
372
+ "resolved": "boolean",
373
+ "references": {}
374
+ },
375
+ "required": false,
376
+ "optional": false,
377
+ "docs": {
378
+ "tags": [],
379
+ "text": "A value is required or must be check for the form to be submittable."
380
+ },
381
+ "attribute": "required",
382
+ "reflect": false,
383
+ "defaultValue": "false"
384
+ },
385
+ "rows": {
386
+ "type": "number",
387
+ "mutable": false,
388
+ "complexType": {
389
+ "original": "number",
390
+ "resolved": "number",
391
+ "references": {}
392
+ },
393
+ "required": false,
394
+ "optional": false,
395
+ "docs": {
396
+ "tags": [],
397
+ "text": "Specifies the initial number of lines in the textarea."
398
+ },
399
+ "attribute": "rows",
400
+ "reflect": false,
401
+ "defaultValue": "3"
402
+ },
403
+ "value": {
404
+ "type": "string",
405
+ "mutable": true,
406
+ "complexType": {
407
+ "original": "string",
408
+ "resolved": "string | undefined",
409
+ "references": {}
410
+ },
411
+ "required": false,
412
+ "optional": true,
413
+ "docs": {
414
+ "tags": [],
415
+ "text": "The initial value of the control."
416
+ },
417
+ "attribute": "value",
418
+ "reflect": false
419
+ },
420
+ "errors": {
421
+ "type": "boolean",
422
+ "mutable": false,
423
+ "complexType": {
424
+ "original": "boolean | string[] | ErrorMap",
425
+ "resolved": "boolean | string[] | undefined | { [key: string]: any; }",
426
+ "references": {
427
+ "ErrorMap": {
428
+ "location": "import",
429
+ "path": "../cat-form-hint/cat-form-hint",
430
+ "id": "src/components/cat-form-hint/cat-form-hint.tsx::ErrorMap"
431
+ }
432
+ }
433
+ },
434
+ "required": false,
435
+ "optional": true,
436
+ "docs": {
437
+ "tags": [],
438
+ "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."
439
+ },
440
+ "attribute": "errors",
441
+ "reflect": false
442
+ },
443
+ "errorUpdate": {
444
+ "type": "any",
445
+ "mutable": false,
446
+ "complexType": {
447
+ "original": "boolean | number",
448
+ "resolved": "boolean | number",
449
+ "references": {}
450
+ },
451
+ "required": false,
452
+ "optional": false,
453
+ "docs": {
454
+ "tags": [],
455
+ "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."
456
+ },
457
+ "attribute": "error-update",
458
+ "reflect": false,
459
+ "defaultValue": "0"
460
+ },
461
+ "nativeAttributes": {
462
+ "type": "unknown",
463
+ "mutable": false,
464
+ "complexType": {
465
+ "original": "{ [key: string]: string }",
466
+ "resolved": "undefined | { [key: string]: string; }",
467
+ "references": {}
468
+ },
469
+ "required": false,
470
+ "optional": true,
471
+ "docs": {
472
+ "tags": [],
473
+ "text": "Attributes that will be added to the native HTML textarea element."
474
+ }
583
475
  }
584
- },
585
- "return": "Promise<void>"
586
- },
587
- "docs": {
588
- "text": "Programmatically remove focus from the textarea. Use this method instead of\n`textarea.blur()`.",
589
- "tags": []
590
- }
591
- },
592
- "clear": {
593
- "complexType": {
594
- "signature": "() => Promise<void>",
595
- "parameters": [],
596
- "references": {
597
- "Promise": {
598
- "location": "global",
599
- "id": "global::Promise"
476
+ };
477
+ }
478
+ static get states() {
479
+ return {
480
+ "hasSlottedLabel": {},
481
+ "hasSlottedHint": {},
482
+ "errorMap": {}
483
+ };
484
+ }
485
+ static get events() {
486
+ return [{
487
+ "method": "catChange",
488
+ "name": "catChange",
489
+ "bubbles": true,
490
+ "cancelable": true,
491
+ "composed": true,
492
+ "docs": {
493
+ "tags": [],
494
+ "text": "Emitted when the value is changed."
495
+ },
496
+ "complexType": {
497
+ "original": "string",
498
+ "resolved": "string",
499
+ "references": {}
500
+ }
501
+ }, {
502
+ "method": "catFocus",
503
+ "name": "catFocus",
504
+ "bubbles": true,
505
+ "cancelable": true,
506
+ "composed": true,
507
+ "docs": {
508
+ "tags": [],
509
+ "text": "Emitted when the textarea received focus."
510
+ },
511
+ "complexType": {
512
+ "original": "FocusEvent",
513
+ "resolved": "FocusEvent",
514
+ "references": {
515
+ "FocusEvent": {
516
+ "location": "global",
517
+ "id": "global::FocusEvent"
518
+ }
519
+ }
520
+ }
521
+ }, {
522
+ "method": "catBlur",
523
+ "name": "catBlur",
524
+ "bubbles": true,
525
+ "cancelable": true,
526
+ "composed": true,
527
+ "docs": {
528
+ "tags": [],
529
+ "text": "Emitted when the textarea loses focus."
530
+ },
531
+ "complexType": {
532
+ "original": "FocusEvent",
533
+ "resolved": "FocusEvent",
534
+ "references": {
535
+ "FocusEvent": {
536
+ "location": "global",
537
+ "id": "global::FocusEvent"
538
+ }
539
+ }
540
+ }
541
+ }];
542
+ }
543
+ static get methods() {
544
+ return {
545
+ "doFocus": {
546
+ "complexType": {
547
+ "signature": "(options?: FocusOptions) => Promise<void>",
548
+ "parameters": [{
549
+ "tags": [{
550
+ "name": "param",
551
+ "text": "options An optional object providing options to control aspects of\nthe focusing process."
552
+ }],
553
+ "text": "An optional object providing options to control aspects of\nthe focusing process."
554
+ }],
555
+ "references": {
556
+ "Promise": {
557
+ "location": "global",
558
+ "id": "global::Promise"
559
+ },
560
+ "FocusOptions": {
561
+ "location": "global",
562
+ "id": "global::FocusOptions"
563
+ }
564
+ },
565
+ "return": "Promise<void>"
566
+ },
567
+ "docs": {
568
+ "text": "Programmatically move focus to the textarea. Use this method instead of\n`textarea.focus()`.",
569
+ "tags": [{
570
+ "name": "param",
571
+ "text": "options An optional object providing options to control aspects of\nthe focusing process."
572
+ }]
573
+ }
574
+ },
575
+ "doBlur": {
576
+ "complexType": {
577
+ "signature": "() => Promise<void>",
578
+ "parameters": [],
579
+ "references": {
580
+ "Promise": {
581
+ "location": "global",
582
+ "id": "global::Promise"
583
+ }
584
+ },
585
+ "return": "Promise<void>"
586
+ },
587
+ "docs": {
588
+ "text": "Programmatically remove focus from the textarea. Use this method instead of\n`textarea.blur()`.",
589
+ "tags": []
590
+ }
591
+ },
592
+ "clear": {
593
+ "complexType": {
594
+ "signature": "() => Promise<void>",
595
+ "parameters": [],
596
+ "references": {
597
+ "Promise": {
598
+ "location": "global",
599
+ "id": "global::Promise"
600
+ }
601
+ },
602
+ "return": "Promise<void>"
603
+ },
604
+ "docs": {
605
+ "text": "Clear the textarea.",
606
+ "tags": []
607
+ }
600
608
  }
601
- },
602
- "return": "Promise<void>"
603
- },
604
- "docs": {
605
- "text": "Clear the textarea.",
606
- "tags": []
607
- }
608
- }
609
- };
610
- }
611
- static get elementRef() { return "hostElement"; }
612
- static get watchers() {
613
- return [{
614
- "propName": "errors",
615
- "methodName": "onErrorsChanged"
616
- }];
617
- }
609
+ };
610
+ }
611
+ static get elementRef() { return "hostElement"; }
612
+ static get watchers() {
613
+ return [{
614
+ "propName": "errors",
615
+ "methodName": "onErrorsChanged"
616
+ }];
617
+ }
618
618
  }
619
619
  //# sourceMappingURL=cat-textarea.js.map