@haiilo/catalyst 4.1.2 → 5.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (277) hide show
  1. package/README.md +0 -2
  2. package/dist/catalyst/assets/fonts/Lato-Black.woff +0 -0
  3. package/dist/catalyst/assets/fonts/Lato-Black.woff2 +0 -0
  4. package/dist/catalyst/assets/fonts/Lato-BlackItalic.woff +0 -0
  5. package/dist/catalyst/assets/fonts/Lato-BlackItalic.woff2 +0 -0
  6. package/dist/catalyst/assets/fonts/Lato-Bold.woff +0 -0
  7. package/dist/catalyst/assets/fonts/Lato-Bold.woff2 +0 -0
  8. package/dist/catalyst/assets/fonts/Lato-BoldItalic.woff +0 -0
  9. package/dist/catalyst/assets/fonts/Lato-BoldItalic.woff2 +0 -0
  10. package/dist/catalyst/assets/fonts/Lato-Hairline.woff +0 -0
  11. package/dist/catalyst/assets/fonts/Lato-Hairline.woff2 +0 -0
  12. package/dist/catalyst/assets/fonts/Lato-HairlineItalic.woff +0 -0
  13. package/dist/catalyst/assets/fonts/Lato-HairlineItalic.woff2 +0 -0
  14. package/dist/catalyst/assets/fonts/Lato-Heavy.woff +0 -0
  15. package/dist/catalyst/assets/fonts/Lato-Heavy.woff2 +0 -0
  16. package/dist/catalyst/assets/fonts/Lato-HeavyItalic.woff +0 -0
  17. package/dist/catalyst/assets/fonts/Lato-HeavyItalic.woff2 +0 -0
  18. package/dist/catalyst/assets/fonts/Lato-Italic.woff +0 -0
  19. package/dist/catalyst/assets/fonts/Lato-Italic.woff2 +0 -0
  20. package/dist/catalyst/assets/fonts/Lato-Light.woff +0 -0
  21. package/dist/catalyst/assets/fonts/Lato-Light.woff2 +0 -0
  22. package/dist/catalyst/assets/fonts/Lato-LightItalic.woff +0 -0
  23. package/dist/catalyst/assets/fonts/Lato-LightItalic.woff2 +0 -0
  24. package/dist/catalyst/assets/fonts/Lato-Medium.woff +0 -0
  25. package/dist/catalyst/assets/fonts/Lato-Medium.woff2 +0 -0
  26. package/dist/catalyst/assets/fonts/Lato-MediumItalic.woff +0 -0
  27. package/dist/catalyst/assets/fonts/Lato-MediumItalic.woff2 +0 -0
  28. package/dist/catalyst/assets/fonts/Lato-Regular.woff +0 -0
  29. package/dist/catalyst/assets/fonts/Lato-Regular.woff2 +0 -0
  30. package/dist/catalyst/assets/fonts/Lato-Semibold.woff +0 -0
  31. package/dist/catalyst/assets/fonts/Lato-Semibold.woff2 +0 -0
  32. package/dist/catalyst/assets/fonts/Lato-SemiboldItalic.woff +0 -0
  33. package/dist/catalyst/assets/fonts/Lato-SemiboldItalic.woff2 +0 -0
  34. package/dist/catalyst/assets/fonts/Lato-Thin.woff +0 -0
  35. package/dist/catalyst/assets/fonts/Lato-Thin.woff2 +0 -0
  36. package/dist/catalyst/assets/fonts/Lato-ThinItalic.woff +0 -0
  37. package/dist/catalyst/assets/fonts/Lato-ThinItalic.woff2 +0 -0
  38. package/dist/catalyst/catalyst.css +6 -27
  39. package/dist/catalyst/catalyst.esm.js +1 -1
  40. package/dist/catalyst/catalyst.esm.js.map +1 -1
  41. package/dist/catalyst/index.esm.js.map +1 -1
  42. package/dist/catalyst/p-ccfebe33.js.map +1 -1
  43. package/dist/catalyst/p-d1ee6a09.entry.js +10 -0
  44. package/dist/catalyst/p-d1ee6a09.entry.js.map +1 -0
  45. package/dist/catalyst/p-d1fb9d96.js +3 -0
  46. package/dist/catalyst/p-d1fb9d96.js.map +1 -0
  47. package/dist/catalyst/scss/fonts/_fonts-mixins.scss +0 -10
  48. package/dist/cjs/cat-alert_24.cjs.entry.js +933 -1135
  49. package/dist/cjs/cat-alert_24.cjs.entry.js.map +1 -1
  50. package/dist/cjs/catalyst.cjs.js +10 -3
  51. package/dist/cjs/catalyst.cjs.js.map +1 -1
  52. package/dist/cjs/{index-c4542095.js → index-01312a2e.js} +527 -245
  53. package/dist/cjs/index-01312a2e.js.map +1 -0
  54. package/dist/cjs/index.cjs.js.map +1 -1
  55. package/dist/cjs/loader.cjs.js +4 -3
  56. package/dist/cjs/loader.cjs.js.map +1 -1
  57. package/dist/collection/assets/fonts/Lato-Black.woff +0 -0
  58. package/dist/collection/assets/fonts/Lato-Black.woff2 +0 -0
  59. package/dist/collection/assets/fonts/Lato-BlackItalic.woff +0 -0
  60. package/dist/collection/assets/fonts/Lato-BlackItalic.woff2 +0 -0
  61. package/dist/collection/assets/fonts/Lato-Bold.woff +0 -0
  62. package/dist/collection/assets/fonts/Lato-Bold.woff2 +0 -0
  63. package/dist/collection/assets/fonts/Lato-BoldItalic.woff +0 -0
  64. package/dist/collection/assets/fonts/Lato-BoldItalic.woff2 +0 -0
  65. package/dist/collection/assets/fonts/Lato-Hairline.woff +0 -0
  66. package/dist/collection/assets/fonts/Lato-Hairline.woff2 +0 -0
  67. package/dist/collection/assets/fonts/Lato-HairlineItalic.woff +0 -0
  68. package/dist/collection/assets/fonts/Lato-HairlineItalic.woff2 +0 -0
  69. package/dist/collection/assets/fonts/Lato-Heavy.woff +0 -0
  70. package/dist/collection/assets/fonts/Lato-Heavy.woff2 +0 -0
  71. package/dist/collection/assets/fonts/Lato-HeavyItalic.woff +0 -0
  72. package/dist/collection/assets/fonts/Lato-HeavyItalic.woff2 +0 -0
  73. package/dist/collection/assets/fonts/Lato-Italic.woff +0 -0
  74. package/dist/collection/assets/fonts/Lato-Italic.woff2 +0 -0
  75. package/dist/collection/assets/fonts/Lato-Light.woff +0 -0
  76. package/dist/collection/assets/fonts/Lato-Light.woff2 +0 -0
  77. package/dist/collection/assets/fonts/Lato-LightItalic.woff +0 -0
  78. package/dist/collection/assets/fonts/Lato-LightItalic.woff2 +0 -0
  79. package/dist/collection/assets/fonts/Lato-Medium.woff +0 -0
  80. package/dist/collection/assets/fonts/Lato-Medium.woff2 +0 -0
  81. package/dist/collection/assets/fonts/Lato-MediumItalic.woff +0 -0
  82. package/dist/collection/assets/fonts/Lato-MediumItalic.woff2 +0 -0
  83. package/dist/collection/assets/fonts/Lato-Regular.woff +0 -0
  84. package/dist/collection/assets/fonts/Lato-Regular.woff2 +0 -0
  85. package/dist/collection/assets/fonts/Lato-Semibold.woff +0 -0
  86. package/dist/collection/assets/fonts/Lato-Semibold.woff2 +0 -0
  87. package/dist/collection/assets/fonts/Lato-SemiboldItalic.woff +0 -0
  88. package/dist/collection/assets/fonts/Lato-SemiboldItalic.woff2 +0 -0
  89. package/dist/collection/assets/fonts/Lato-Thin.woff +0 -0
  90. package/dist/collection/assets/fonts/Lato-Thin.woff2 +0 -0
  91. package/dist/collection/assets/fonts/Lato-ThinItalic.woff +0 -0
  92. package/dist/collection/assets/fonts/Lato-ThinItalic.woff2 +0 -0
  93. package/dist/collection/collection-manifest.json +2 -2
  94. package/dist/collection/components/cat-alert/cat-alert.js +69 -71
  95. package/dist/collection/components/cat-alert/cat-alert.js.map +1 -1
  96. package/dist/collection/components/cat-avatar/cat-avatar.js +172 -165
  97. package/dist/collection/components/cat-avatar/cat-avatar.js.map +1 -1
  98. package/dist/collection/components/cat-badge/cat-badge.js +102 -111
  99. package/dist/collection/components/cat-badge/cat-badge.js.map +1 -1
  100. package/dist/collection/components/cat-button/cat-button.js +526 -537
  101. package/dist/collection/components/cat-button/cat-button.js.map +1 -1
  102. package/dist/collection/components/cat-card/cat-card.js +12 -8
  103. package/dist/collection/components/cat-checkbox/cat-checkbox.js +336 -350
  104. package/dist/collection/components/cat-checkbox/cat-checkbox.js.map +1 -1
  105. package/dist/collection/components/cat-dropdown/cat-dropdown.js +137 -137
  106. package/dist/collection/components/cat-dropdown/cat-dropdown.js.map +1 -1
  107. package/dist/collection/components/cat-form-group/cat-form-group.js +58 -40
  108. package/dist/collection/components/cat-form-group/cat-form-group.js.map +1 -1
  109. package/dist/collection/components/cat-form-hint/cat-form-hint.js +14 -7
  110. package/dist/collection/components/cat-form-hint/cat-form-hint.js.map +1 -1
  111. package/dist/collection/components/cat-i18n/cat-i18n-registry.js +1 -1
  112. package/dist/collection/components/cat-icon/cat-icon-registry.js +1 -1
  113. package/dist/collection/components/cat-icon/cat-icon.js +85 -79
  114. package/dist/collection/components/cat-icon/cat-icon.js.map +1 -1
  115. package/dist/collection/components/cat-input/cat-input.css +32 -3
  116. package/dist/collection/components/cat-input/cat-input.js +662 -660
  117. package/dist/collection/components/cat-input/cat-input.js.map +1 -1
  118. package/dist/collection/components/cat-input/input-type.js +1 -1
  119. package/dist/collection/components/cat-label/cat-label.js +69 -78
  120. package/dist/collection/components/cat-label/cat-label.js.map +1 -1
  121. package/dist/collection/components/cat-notification/cat-notification.js +1 -1
  122. package/dist/collection/components/cat-notification/cat-notification.js.map +1 -1
  123. package/dist/collection/components/cat-pagination/cat-pagination.js +192 -226
  124. package/dist/collection/components/cat-pagination/cat-pagination.js.map +1 -1
  125. package/dist/collection/components/cat-radio/cat-radio.js +319 -327
  126. package/dist/collection/components/cat-radio/cat-radio.js.map +1 -1
  127. package/dist/collection/components/cat-radio-group/cat-radio-group.js +173 -165
  128. package/dist/collection/components/cat-radio-group/cat-radio-group.js.map +1 -1
  129. package/dist/collection/components/cat-scrollable/cat-scrollable.js +200 -208
  130. package/dist/collection/components/cat-scrollable/cat-scrollable.js.map +1 -1
  131. package/dist/collection/components/cat-select/cat-select.js +556 -593
  132. package/dist/collection/components/cat-select/cat-select.js.map +1 -1
  133. package/dist/collection/components/cat-select-demo/cat-select-demo.js +3 -28
  134. package/dist/collection/components/cat-select-demo/cat-select-demo.js.map +1 -1
  135. package/dist/collection/components/cat-skeleton/cat-skeleton.js +85 -88
  136. package/dist/collection/components/cat-skeleton/cat-skeleton.js.map +1 -1
  137. package/dist/collection/components/cat-spinner/cat-spinner.js +52 -50
  138. package/dist/collection/components/cat-spinner/cat-spinner.js.map +1 -1
  139. package/dist/collection/components/cat-tab/cat-tab.js +169 -168
  140. package/dist/collection/components/cat-tab/cat-tab.js.map +1 -1
  141. package/dist/collection/components/cat-tabs/cat-tabs.js +73 -66
  142. package/dist/collection/components/cat-tabs/cat-tabs.js.map +1 -1
  143. package/dist/collection/components/cat-textarea/cat-textarea.css +32 -1
  144. package/dist/collection/components/cat-textarea/cat-textarea.js +479 -468
  145. package/dist/collection/components/cat-textarea/cat-textarea.js.map +1 -1
  146. package/dist/collection/components/cat-toggle/cat-toggle.js +319 -326
  147. package/dist/collection/components/cat-toggle/cat-toggle.js.map +1 -1
  148. package/dist/collection/components/cat-tooltip/cat-tooltip.css +7 -1
  149. package/dist/collection/components/cat-tooltip/cat-tooltip.js +187 -198
  150. package/dist/collection/components/cat-tooltip/cat-tooltip.js.map +1 -1
  151. package/dist/collection/index.js +1 -1
  152. package/dist/collection/scss/fonts/_fonts-mixins.scss +0 -10
  153. package/dist/collection/utils/breakpoints.js +1 -1
  154. package/dist/collection/utils/breakpoints.js.map +1 -1
  155. package/dist/collection/utils/coerce.js +11 -0
  156. package/dist/collection/utils/coerce.js.map +1 -0
  157. package/dist/collection/utils/first-tabbable.js +1 -1
  158. package/dist/collection/utils/is-touch-screen.js +1 -1
  159. package/dist/collection/utils/load-img.js +1 -1
  160. package/dist/collection/utils/media-matcher.js +1 -1
  161. package/dist/collection/utils/platform.js +4 -4
  162. package/dist/collection/utils/setDefault.js +1 -1
  163. package/dist/components/cat-alert.js +1 -6
  164. package/dist/components/cat-alert.js.map +1 -1
  165. package/dist/components/cat-avatar2.js +6 -9
  166. package/dist/components/cat-avatar2.js.map +1 -1
  167. package/dist/components/cat-badge.js +0 -15
  168. package/dist/components/cat-badge.js.map +1 -1
  169. package/dist/components/cat-button2.js +10 -36
  170. package/dist/components/cat-button2.js.map +1 -1
  171. package/dist/components/cat-checkbox2.js +9 -26
  172. package/dist/components/cat-checkbox2.js.map +1 -1
  173. package/dist/components/cat-dropdown2.js +139 -176
  174. package/dist/components/cat-dropdown2.js.map +1 -1
  175. package/dist/components/cat-form-group.js +4 -9
  176. package/dist/components/cat-form-group.js.map +1 -1
  177. package/dist/components/cat-form-hint.js +13 -6
  178. package/dist/components/cat-form-hint.js.map +1 -1
  179. package/dist/components/cat-icon-registry.js +71 -0
  180. package/dist/components/cat-icon-registry.js.map +1 -0
  181. package/dist/components/cat-icon.js +1 -1
  182. package/dist/components/cat-icon2.js +5 -71
  183. package/dist/components/cat-icon2.js.map +1 -1
  184. package/dist/components/cat-input.js +33 -41
  185. package/dist/components/cat-input.js.map +1 -1
  186. package/dist/components/cat-label.js +1 -6
  187. package/dist/components/cat-label.js.map +1 -1
  188. package/dist/components/cat-pagination.js +0 -30
  189. package/dist/components/cat-pagination.js.map +1 -1
  190. package/dist/components/cat-radio-group.js +3 -6
  191. package/dist/components/cat-radio-group.js.map +1 -1
  192. package/dist/components/cat-radio.js +9 -23
  193. package/dist/components/cat-radio.js.map +1 -1
  194. package/dist/components/cat-scrollable2.js +1 -12
  195. package/dist/components/cat-scrollable2.js.map +1 -1
  196. package/dist/components/cat-select-demo.js +2 -12
  197. package/dist/components/cat-select-demo.js.map +1 -1
  198. package/dist/components/cat-select2.js +41 -50
  199. package/dist/components/cat-select2.js.map +1 -1
  200. package/dist/components/cat-skeleton2.js +1 -10
  201. package/dist/components/cat-skeleton2.js.map +1 -1
  202. package/dist/components/cat-spinner2.js +1 -3
  203. package/dist/components/cat-spinner2.js.map +1 -1
  204. package/dist/components/cat-tab.js +3 -12
  205. package/dist/components/cat-tab.js.map +1 -1
  206. package/dist/components/cat-tabs.js +1 -6
  207. package/dist/components/cat-tabs.js.map +1 -1
  208. package/dist/components/cat-textarea.js +28 -33
  209. package/dist/components/cat-textarea.js.map +1 -1
  210. package/dist/components/cat-toggle.js +9 -23
  211. package/dist/components/cat-toggle.js.map +1 -1
  212. package/dist/components/cat-tooltip.js +14 -34
  213. package/dist/components/cat-tooltip.js.map +1 -1
  214. package/dist/components/first-tabbable.js +51 -113
  215. package/dist/components/first-tabbable.js.map +1 -1
  216. package/dist/components/floating-ui.dom.esm.js +577 -441
  217. package/dist/components/floating-ui.dom.esm.js.map +1 -1
  218. package/dist/components/index.d.ts +9 -27
  219. package/dist/components/index.js +2 -26
  220. package/dist/components/index.js.map +1 -1
  221. package/dist/esm/cat-alert_24.entry.js +934 -1136
  222. package/dist/esm/cat-alert_24.entry.js.map +1 -1
  223. package/dist/esm/catalyst.js +7 -3
  224. package/dist/esm/catalyst.js.map +1 -1
  225. package/dist/esm/{index-524906f7.js → index-fc2f91a4.js} +527 -246
  226. package/dist/esm/index-fc2f91a4.js.map +1 -0
  227. package/dist/esm/index.js.map +1 -1
  228. package/dist/esm/loader.js +4 -3
  229. package/dist/esm/loader.js.map +1 -1
  230. package/dist/esm/polyfills/css-shim.js +1 -1
  231. package/dist/types/components/cat-checkbox/cat-checkbox.d.ts +1 -1
  232. package/dist/types/components/cat-form-group/cat-form-group.d.ts +4 -0
  233. package/dist/types/components/cat-form-hint/cat-form-hint.d.ts +5 -0
  234. package/dist/types/components/cat-input/cat-input.d.ts +6 -1
  235. package/dist/types/components/cat-input/input-type.d.ts +1 -1
  236. package/dist/types/components/cat-radio/cat-radio.d.ts +1 -1
  237. package/dist/types/components/cat-select/cat-select.d.ts +2 -1
  238. package/dist/types/components/cat-textarea/cat-textarea.d.ts +6 -1
  239. package/dist/types/components/cat-toggle/cat-toggle.d.ts +1 -1
  240. package/dist/types/components/cat-tooltip/cat-tooltip.d.ts +3 -0
  241. package/dist/types/components.d.ts +353 -7
  242. package/dist/types/stencil-public-runtime.d.ts +91 -19
  243. package/dist/types/utils/breakpoints.d.ts +1 -1
  244. package/dist/types/utils/coerce.d.ts +3 -0
  245. package/dist/types/utils/first-tabbable.d.ts +2 -2
  246. package/loader/index.d.ts +9 -0
  247. package/loader/package.json +1 -0
  248. package/package.json +19 -19
  249. package/dist/catalyst/assets/fonts/AzeretMono-Regular.woff2 +0 -0
  250. package/dist/catalyst/assets/fonts/DMSans-Bold.woff2 +0 -0
  251. package/dist/catalyst/assets/fonts/DMSans-BoldItalic.woff2 +0 -0
  252. package/dist/catalyst/assets/fonts/DMSans-Italic.woff2 +0 -0
  253. package/dist/catalyst/assets/fonts/DMSans-Medium.woff2 +0 -0
  254. package/dist/catalyst/assets/fonts/DMSans-MediumItalic.woff2 +0 -0
  255. package/dist/catalyst/assets/fonts/DMSans-Regular.woff2 +0 -0
  256. package/dist/catalyst/p-919eea27.js +0 -3
  257. package/dist/catalyst/p-919eea27.js.map +0 -1
  258. package/dist/catalyst/p-cd8f8639.entry.js +0 -10
  259. package/dist/catalyst/p-cd8f8639.entry.js.map +0 -1
  260. package/dist/catalyst/scss/fonts/_fonts.mixins.azeret.scss +0 -14
  261. package/dist/catalyst/scss/fonts/_fonts.mixins.dm.scss +0 -53
  262. package/dist/cjs/index-c4542095.js.map +0 -1
  263. package/dist/collection/assets/fonts/AzeretMono-Regular.woff2 +0 -0
  264. package/dist/collection/assets/fonts/DMSans-Bold.woff2 +0 -0
  265. package/dist/collection/assets/fonts/DMSans-BoldItalic.woff2 +0 -0
  266. package/dist/collection/assets/fonts/DMSans-Italic.woff2 +0 -0
  267. package/dist/collection/assets/fonts/DMSans-Medium.woff2 +0 -0
  268. package/dist/collection/assets/fonts/DMSans-MediumItalic.woff2 +0 -0
  269. package/dist/collection/assets/fonts/DMSans-Regular.woff2 +0 -0
  270. package/dist/collection/components/cat-form-hint/cat-form-hint-utils.js +0 -13
  271. package/dist/collection/components/cat-form-hint/cat-form-hint-utils.js.map +0 -1
  272. package/dist/collection/scss/fonts/_fonts.mixins.azeret.scss +0 -14
  273. package/dist/collection/scss/fonts/_fonts.mixins.dm.scss +0 -53
  274. package/dist/components/cat-form-hint-utils.js +0 -17
  275. package/dist/components/cat-form-hint-utils.js.map +0 -1
  276. package/dist/esm/index-524906f7.js.map +0 -1
  277. package/dist/types/components/cat-form-hint/cat-form-hint-utils.d.ts +0 -4
@@ -1,7 +1,7 @@
1
- import { Component, Element, Event, h, Host, Method, Prop, State, Watch } from '@stencil/core';
1
+ import { h, Host } from '@stencil/core';
2
2
  import autosize from 'autosize';
3
3
  import log from 'loglevel';
4
- import { buildHintSection } from '../cat-form-hint/cat-form-hint-utils';
4
+ import { CatFormHint } from '../cat-form-hint/cat-form-hint';
5
5
  import { catI18nRegistry as i18n } from '../cat-i18n/cat-i18n-registry';
6
6
  let nextUniqueId = 0;
7
7
  /**
@@ -17,40 +17,26 @@ export class CatTextarea {
17
17
  constructor() {
18
18
  this._id = `cat-textarea-${nextUniqueId++}`;
19
19
  this.hasSlottedLabel = false;
20
- /**
21
- * Whether the label need a marker to shown if the textarea is required or optional.
22
- */
20
+ this.hasSlottedHint = false;
21
+ this.errorMap = undefined;
23
22
  this.requiredMarker = 'optional';
24
- /**
25
- * Whether the textarea is disabled.
26
- */
23
+ this.horizontal = false;
27
24
  this.disabled = false;
28
- /**
29
- * The label for the textarea.
30
- */
25
+ this.hint = undefined;
26
+ this.identifier = undefined;
31
27
  this.label = '';
32
- /**
33
- * Visually hide the label, but still show it to assistive technologies like screen readers.
34
- */
35
28
  this.labelHidden = false;
36
- /**
37
- * The value is not editable.
38
- */
29
+ this.maxLength = undefined;
30
+ this.minLength = undefined;
31
+ this.name = undefined;
32
+ this.placeholder = undefined;
39
33
  this.readonly = false;
40
- /**
41
- * A value is required or must be check for the form to be submittable.
42
- */
43
34
  this.required = false;
44
- /**
45
- * Specifies the initial number of lines in the textarea.
46
- */
47
35
  this.rows = 3;
48
- /**
49
- * Fine-grained control over when the errors are shown. Can be `false` to
50
- * never show errors, `true` to show errors on blur, or a number to show
51
- * errors on change with the given delay in milliseconds.
52
- */
36
+ this.value = undefined;
37
+ this.errors = undefined;
53
38
  this.errorUpdate = 0;
39
+ this.nativeAttributes = undefined;
54
40
  }
55
41
  get id() {
56
42
  return this.identifier || this._id;
@@ -58,6 +44,7 @@ export class CatTextarea {
58
44
  componentWillRender() {
59
45
  this.watchErrorsHandler(this.errors);
60
46
  this.hasSlottedLabel = !!this.hostElement.querySelector('[slot="label"]');
47
+ this.hasSlottedHint = !!this.hostElement.querySelector('[slot="hint"]');
61
48
  if (!this.label && !this.hasSlottedLabel) {
62
49
  log.warn('[A11y] Missing ARIA label on textarea', this);
63
50
  }
@@ -94,7 +81,7 @@ export class CatTextarea {
94
81
  }
95
82
  else {
96
83
  this.errorMapSrc = Array.isArray(value)
97
- ? value.map(error => ({ [error]: undefined }))
84
+ ? value.reduce((acc, err) => (Object.assign(Object.assign({}, acc), { [err]: undefined })), {})
98
85
  : value === true
99
86
  ? {}
100
87
  : value || undefined;
@@ -102,26 +89,17 @@ export class CatTextarea {
102
89
  }
103
90
  render() {
104
91
  var _a;
105
- return (h(Host, null,
106
- (this.hasSlottedLabel || this.label) && (h("label", { htmlFor: this.id, class: { hidden: this.labelHidden } },
107
- h("span", { part: "label" },
108
- (this.hasSlottedLabel && h("slot", { name: "label" })) || this.label,
109
- !this.required && this.requiredMarker.startsWith('optional') && (h("span", { class: "label-optional", "aria-hidden": "true" },
110
- "(",
111
- i18n.t('input.optional'),
112
- ")")),
113
- this.required && this.requiredMarker.startsWith('required') && (h("span", { class: "label-optional", "aria-hidden": "true" },
114
- "(",
115
- i18n.t('input.required'),
116
- ")"))))),
117
- h("div", { class: {
118
- 'textarea-wrapper': true,
119
- 'textarea-disabled': this.disabled,
120
- 'textarea-invalid': this.invalid
121
- } },
122
- h("textarea", Object.assign({}, this.nativeAttributes, { 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": ((_a = this.hint) === null || _a === void 0 ? void 0 : _a.length) ? this.id + '-hint' : undefined })),
123
- this.invalid && (h("cat-icon", { icon: "alert-circle-outlined", class: "icon-suffix cat-text-danger", size: "l", onClick: () => this.textarea.focus() }))),
124
- buildHintSection(this.hostElement, this.id, this.hint, this.errorMap)));
92
+ return (h(Host, null, h("div", { class: {
93
+ 'textarea-field': true,
94
+ 'textarea-horizontal': this.horizontal
95
+ } }, h("div", { class: {
96
+ hidden: this.labelHidden,
97
+ 'label-container': true
98
+ } }, (this.hasSlottedLabel || this.label) && (h("label", { htmlFor: this.id, class: { hidden: this.labelHidden } }, h("span", { part: "label" }, (this.hasSlottedLabel && h("slot", { name: "label" })) || this.label, !this.required && this.requiredMarker.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'), ")")))))), h("div", { class: "textarea-container" }, h("div", { class: {
99
+ 'textarea-wrapper': true,
100
+ 'textarea-disabled': this.disabled,
101
+ 'textarea-invalid': this.invalid
102
+ } }, h("textarea", Object.assign({}, this.nativeAttributes, { 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": ((_a = this.hint) === null || _a === void 0 ? void 0 : _a.length) ? this.id + '-hint' : undefined })), this.invalid && (h("cat-icon", { icon: "alert-circle-outlined", class: "icon-suffix cat-text-danger", size: "l", onClick: () => this.textarea.focus() }))), (this.hint || this.hasSlottedHint || !!Object.keys(this.errorMap || {}).length) && (h(CatFormHint, { id: this.id, hint: this.hint, slottedHint: this.hasSlottedHint && h("slot", { name: "hint" }), errorMap: this.errorMap }))))));
125
103
  }
126
104
  get invalid() {
127
105
  return !!this.errorMap;
@@ -145,438 +123,471 @@ export class CatTextarea {
145
123
  }
146
124
  static get is() { return "cat-textarea"; }
147
125
  static get encapsulation() { return "shadow"; }
148
- static get originalStyleUrls() { return {
149
- "$": ["cat-textarea.scss"]
150
- }; }
151
- static get styleUrls() { return {
152
- "$": ["cat-textarea.css"]
153
- }; }
154
- static get properties() { return {
155
- "requiredMarker": {
156
- "type": "string",
157
- "mutable": false,
158
- "complexType": {
159
- "original": "'none' | 'required' | 'optional' | 'none!' | 'optional!' | 'required!'",
160
- "resolved": "\"none!\" | \"none\" | \"optional!\" | \"optional\" | \"required!\" | \"required\"",
161
- "references": {}
162
- },
163
- "required": false,
164
- "optional": false,
165
- "docs": {
166
- "tags": [],
167
- "text": "Whether the label need a marker to shown if the textarea is required or optional."
168
- },
169
- "attribute": "required-marker",
170
- "reflect": false,
171
- "defaultValue": "'optional'"
172
- },
173
- "disabled": {
174
- "type": "boolean",
175
- "mutable": false,
176
- "complexType": {
177
- "original": "boolean",
178
- "resolved": "boolean",
179
- "references": {}
180
- },
181
- "required": false,
182
- "optional": false,
183
- "docs": {
184
- "tags": [],
185
- "text": "Whether the textarea is disabled."
186
- },
187
- "attribute": "disabled",
188
- "reflect": false,
189
- "defaultValue": "false"
190
- },
191
- "hint": {
192
- "type": "string",
193
- "mutable": false,
194
- "complexType": {
195
- "original": "string | string[]",
196
- "resolved": "string | string[] | undefined",
197
- "references": {}
198
- },
199
- "required": false,
200
- "optional": true,
201
- "docs": {
202
- "tags": [],
203
- "text": "Optional hint text(s) to be displayed with the textarea."
204
- },
205
- "attribute": "hint",
206
- "reflect": false
207
- },
208
- "identifier": {
209
- "type": "string",
210
- "mutable": false,
211
- "complexType": {
212
- "original": "string",
213
- "resolved": "string | undefined",
214
- "references": {}
215
- },
216
- "required": false,
217
- "optional": true,
218
- "docs": {
219
- "tags": [],
220
- "text": "A unique identifier for the input."
221
- },
222
- "attribute": "identifier",
223
- "reflect": false
224
- },
225
- "label": {
226
- "type": "string",
227
- "mutable": false,
228
- "complexType": {
229
- "original": "string",
230
- "resolved": "string",
231
- "references": {}
232
- },
233
- "required": false,
234
- "optional": false,
235
- "docs": {
236
- "tags": [],
237
- "text": "The label for the textarea."
238
- },
239
- "attribute": "label",
240
- "reflect": false,
241
- "defaultValue": "''"
242
- },
243
- "labelHidden": {
244
- "type": "boolean",
245
- "mutable": false,
246
- "complexType": {
247
- "original": "boolean",
248
- "resolved": "boolean",
249
- "references": {}
250
- },
251
- "required": false,
252
- "optional": false,
253
- "docs": {
254
- "tags": [],
255
- "text": "Visually hide the label, but still show it to assistive technologies like screen readers."
256
- },
257
- "attribute": "label-hidden",
258
- "reflect": false,
259
- "defaultValue": "false"
260
- },
261
- "maxLength": {
262
- "type": "number",
263
- "mutable": false,
264
- "complexType": {
265
- "original": "number",
266
- "resolved": "number | undefined",
267
- "references": {}
268
- },
269
- "required": false,
270
- "optional": true,
271
- "docs": {
272
- "tags": [],
273
- "text": "A maximum length (number of characters) for textual values."
274
- },
275
- "attribute": "max-length",
276
- "reflect": false
277
- },
278
- "minLength": {
279
- "type": "number",
280
- "mutable": false,
281
- "complexType": {
282
- "original": "number",
283
- "resolved": "number | undefined",
284
- "references": {}
285
- },
286
- "required": false,
287
- "optional": true,
288
- "docs": {
289
- "tags": [],
290
- "text": "A minimum length (number of characters) for textual values."
291
- },
292
- "attribute": "min-length",
293
- "reflect": false
294
- },
295
- "name": {
296
- "type": "string",
297
- "mutable": false,
298
- "complexType": {
299
- "original": "string",
300
- "resolved": "string | undefined",
301
- "references": {}
302
- },
303
- "required": false,
304
- "optional": true,
305
- "docs": {
306
- "tags": [],
307
- "text": "The name of the form control. Submitted with the form as part of a name/value pair."
308
- },
309
- "attribute": "name",
310
- "reflect": false
311
- },
312
- "placeholder": {
313
- "type": "string",
314
- "mutable": false,
315
- "complexType": {
316
- "original": "string",
317
- "resolved": "string | undefined",
318
- "references": {}
319
- },
320
- "required": false,
321
- "optional": true,
322
- "docs": {
323
- "tags": [],
324
- "text": "The placeholder text to display within the input."
325
- },
326
- "attribute": "placeholder",
327
- "reflect": false
328
- },
329
- "readonly": {
330
- "type": "boolean",
331
- "mutable": false,
332
- "complexType": {
333
- "original": "boolean",
334
- "resolved": "boolean",
335
- "references": {}
336
- },
337
- "required": false,
338
- "optional": false,
339
- "docs": {
340
- "tags": [],
341
- "text": "The value is not editable."
342
- },
343
- "attribute": "readonly",
344
- "reflect": false,
345
- "defaultValue": "false"
346
- },
347
- "required": {
348
- "type": "boolean",
349
- "mutable": false,
350
- "complexType": {
351
- "original": "boolean",
352
- "resolved": "boolean",
353
- "references": {}
354
- },
355
- "required": false,
356
- "optional": false,
357
- "docs": {
358
- "tags": [],
359
- "text": "A value is required or must be check for the form to be submittable."
360
- },
361
- "attribute": "required",
362
- "reflect": false,
363
- "defaultValue": "false"
364
- },
365
- "rows": {
366
- "type": "number",
367
- "mutable": false,
368
- "complexType": {
369
- "original": "number",
370
- "resolved": "number",
371
- "references": {}
372
- },
373
- "required": false,
374
- "optional": false,
375
- "docs": {
376
- "tags": [],
377
- "text": "Specifies the initial number of lines in the textarea."
378
- },
379
- "attribute": "rows",
380
- "reflect": false,
381
- "defaultValue": "3"
382
- },
383
- "value": {
384
- "type": "any",
385
- "mutable": true,
386
- "complexType": {
387
- "original": "string | number",
388
- "resolved": "number | string | undefined",
389
- "references": {}
390
- },
391
- "required": false,
392
- "optional": true,
393
- "docs": {
394
- "tags": [],
395
- "text": "The initial value of the control."
396
- },
397
- "attribute": "value",
398
- "reflect": false
399
- },
400
- "errors": {
401
- "type": "boolean",
402
- "mutable": false,
403
- "complexType": {
404
- "original": "boolean | string[] | ErrorMap",
405
- "resolved": "boolean | string[] | undefined | { [key: string]: any; }",
406
- "references": {
407
- "ErrorMap": {
408
- "location": "import",
409
- "path": "../cat-form-hint/cat-form-hint-utils"
126
+ static get originalStyleUrls() {
127
+ return {
128
+ "$": ["cat-textarea.scss"]
129
+ };
130
+ }
131
+ static get styleUrls() {
132
+ return {
133
+ "$": ["cat-textarea.css"]
134
+ };
135
+ }
136
+ static get properties() {
137
+ return {
138
+ "requiredMarker": {
139
+ "type": "string",
140
+ "mutable": false,
141
+ "complexType": {
142
+ "original": "'none' | 'required' | 'optional' | 'none!' | 'optional!' | 'required!'",
143
+ "resolved": "\"none!\" | \"none\" | \"optional!\" | \"optional\" | \"required!\" | \"required\"",
144
+ "references": {}
145
+ },
146
+ "required": false,
147
+ "optional": false,
148
+ "docs": {
149
+ "tags": [],
150
+ "text": "Whether the label need a marker to shown if the textarea is required or optional."
151
+ },
152
+ "attribute": "required-marker",
153
+ "reflect": false,
154
+ "defaultValue": "'optional'"
155
+ },
156
+ "horizontal": {
157
+ "type": "boolean",
158
+ "mutable": false,
159
+ "complexType": {
160
+ "original": "boolean",
161
+ "resolved": "boolean",
162
+ "references": {}
163
+ },
164
+ "required": false,
165
+ "optional": false,
166
+ "docs": {
167
+ "tags": [],
168
+ "text": "Whether the label is on top or left."
169
+ },
170
+ "attribute": "horizontal",
171
+ "reflect": false,
172
+ "defaultValue": "false"
173
+ },
174
+ "disabled": {
175
+ "type": "boolean",
176
+ "mutable": false,
177
+ "complexType": {
178
+ "original": "boolean",
179
+ "resolved": "boolean",
180
+ "references": {}
181
+ },
182
+ "required": false,
183
+ "optional": false,
184
+ "docs": {
185
+ "tags": [],
186
+ "text": "Whether the textarea is disabled."
187
+ },
188
+ "attribute": "disabled",
189
+ "reflect": false,
190
+ "defaultValue": "false"
191
+ },
192
+ "hint": {
193
+ "type": "string",
194
+ "mutable": false,
195
+ "complexType": {
196
+ "original": "string | string[]",
197
+ "resolved": "string | string[] | undefined",
198
+ "references": {}
199
+ },
200
+ "required": false,
201
+ "optional": true,
202
+ "docs": {
203
+ "tags": [],
204
+ "text": "Optional hint text(s) to be displayed with the textarea."
205
+ },
206
+ "attribute": "hint",
207
+ "reflect": false
208
+ },
209
+ "identifier": {
210
+ "type": "string",
211
+ "mutable": false,
212
+ "complexType": {
213
+ "original": "string",
214
+ "resolved": "string | undefined",
215
+ "references": {}
216
+ },
217
+ "required": false,
218
+ "optional": true,
219
+ "docs": {
220
+ "tags": [],
221
+ "text": "A unique identifier for the input."
222
+ },
223
+ "attribute": "identifier",
224
+ "reflect": false
225
+ },
226
+ "label": {
227
+ "type": "string",
228
+ "mutable": false,
229
+ "complexType": {
230
+ "original": "string",
231
+ "resolved": "string",
232
+ "references": {}
233
+ },
234
+ "required": false,
235
+ "optional": false,
236
+ "docs": {
237
+ "tags": [],
238
+ "text": "The label for the textarea."
239
+ },
240
+ "attribute": "label",
241
+ "reflect": false,
242
+ "defaultValue": "''"
243
+ },
244
+ "labelHidden": {
245
+ "type": "boolean",
246
+ "mutable": false,
247
+ "complexType": {
248
+ "original": "boolean",
249
+ "resolved": "boolean",
250
+ "references": {}
251
+ },
252
+ "required": false,
253
+ "optional": false,
254
+ "docs": {
255
+ "tags": [],
256
+ "text": "Visually hide the label, but still show it to assistive technologies like screen readers."
257
+ },
258
+ "attribute": "label-hidden",
259
+ "reflect": false,
260
+ "defaultValue": "false"
261
+ },
262
+ "maxLength": {
263
+ "type": "number",
264
+ "mutable": false,
265
+ "complexType": {
266
+ "original": "number",
267
+ "resolved": "number | undefined",
268
+ "references": {}
269
+ },
270
+ "required": false,
271
+ "optional": true,
272
+ "docs": {
273
+ "tags": [],
274
+ "text": "A maximum length (number of characters) for textual values."
275
+ },
276
+ "attribute": "max-length",
277
+ "reflect": false
278
+ },
279
+ "minLength": {
280
+ "type": "number",
281
+ "mutable": false,
282
+ "complexType": {
283
+ "original": "number",
284
+ "resolved": "number | undefined",
285
+ "references": {}
286
+ },
287
+ "required": false,
288
+ "optional": true,
289
+ "docs": {
290
+ "tags": [],
291
+ "text": "A minimum length (number of characters) for textual values."
292
+ },
293
+ "attribute": "min-length",
294
+ "reflect": false
295
+ },
296
+ "name": {
297
+ "type": "string",
298
+ "mutable": false,
299
+ "complexType": {
300
+ "original": "string",
301
+ "resolved": "string | undefined",
302
+ "references": {}
303
+ },
304
+ "required": false,
305
+ "optional": true,
306
+ "docs": {
307
+ "tags": [],
308
+ "text": "The name of the form control. Submitted with the form as part of a name/value pair."
309
+ },
310
+ "attribute": "name",
311
+ "reflect": false
312
+ },
313
+ "placeholder": {
314
+ "type": "string",
315
+ "mutable": false,
316
+ "complexType": {
317
+ "original": "string",
318
+ "resolved": "string | undefined",
319
+ "references": {}
320
+ },
321
+ "required": false,
322
+ "optional": true,
323
+ "docs": {
324
+ "tags": [],
325
+ "text": "The placeholder text to display within the input."
326
+ },
327
+ "attribute": "placeholder",
328
+ "reflect": false
329
+ },
330
+ "readonly": {
331
+ "type": "boolean",
332
+ "mutable": false,
333
+ "complexType": {
334
+ "original": "boolean",
335
+ "resolved": "boolean",
336
+ "references": {}
337
+ },
338
+ "required": false,
339
+ "optional": false,
340
+ "docs": {
341
+ "tags": [],
342
+ "text": "The value is not editable."
343
+ },
344
+ "attribute": "readonly",
345
+ "reflect": false,
346
+ "defaultValue": "false"
347
+ },
348
+ "required": {
349
+ "type": "boolean",
350
+ "mutable": false,
351
+ "complexType": {
352
+ "original": "boolean",
353
+ "resolved": "boolean",
354
+ "references": {}
355
+ },
356
+ "required": false,
357
+ "optional": false,
358
+ "docs": {
359
+ "tags": [],
360
+ "text": "A value is required or must be check for the form to be submittable."
361
+ },
362
+ "attribute": "required",
363
+ "reflect": false,
364
+ "defaultValue": "false"
365
+ },
366
+ "rows": {
367
+ "type": "number",
368
+ "mutable": false,
369
+ "complexType": {
370
+ "original": "number",
371
+ "resolved": "number",
372
+ "references": {}
373
+ },
374
+ "required": false,
375
+ "optional": false,
376
+ "docs": {
377
+ "tags": [],
378
+ "text": "Specifies the initial number of lines in the textarea."
379
+ },
380
+ "attribute": "rows",
381
+ "reflect": false,
382
+ "defaultValue": "3"
383
+ },
384
+ "value": {
385
+ "type": "any",
386
+ "mutable": true,
387
+ "complexType": {
388
+ "original": "string | number",
389
+ "resolved": "number | string | undefined",
390
+ "references": {}
391
+ },
392
+ "required": false,
393
+ "optional": true,
394
+ "docs": {
395
+ "tags": [],
396
+ "text": "The initial value of the control."
397
+ },
398
+ "attribute": "value",
399
+ "reflect": false
400
+ },
401
+ "errors": {
402
+ "type": "boolean",
403
+ "mutable": false,
404
+ "complexType": {
405
+ "original": "boolean | string[] | ErrorMap",
406
+ "resolved": "boolean | string[] | undefined | { [key: string]: any; }",
407
+ "references": {
408
+ "ErrorMap": {
409
+ "location": "import",
410
+ "path": "../cat-form-hint/cat-form-hint"
411
+ }
410
412
  }
413
+ },
414
+ "required": false,
415
+ "optional": true,
416
+ "docs": {
417
+ "tags": [],
418
+ "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."
419
+ },
420
+ "attribute": "errors",
421
+ "reflect": false
422
+ },
423
+ "errorUpdate": {
424
+ "type": "any",
425
+ "mutable": false,
426
+ "complexType": {
427
+ "original": "boolean | number",
428
+ "resolved": "boolean | number",
429
+ "references": {}
430
+ },
431
+ "required": false,
432
+ "optional": false,
433
+ "docs": {
434
+ "tags": [],
435
+ "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."
436
+ },
437
+ "attribute": "error-update",
438
+ "reflect": false,
439
+ "defaultValue": "0"
440
+ },
441
+ "nativeAttributes": {
442
+ "type": "unknown",
443
+ "mutable": false,
444
+ "complexType": {
445
+ "original": "{ [key: string]: string }",
446
+ "resolved": "undefined | { [key: string]: string; }",
447
+ "references": {}
448
+ },
449
+ "required": false,
450
+ "optional": true,
451
+ "docs": {
452
+ "tags": [],
453
+ "text": "Attributes that will be added to the native HTML textarea element."
411
454
  }
412
- },
413
- "required": false,
414
- "optional": true,
415
- "docs": {
416
- "tags": [],
417
- "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."
418
- },
419
- "attribute": "errors",
420
- "reflect": false
421
- },
422
- "errorUpdate": {
423
- "type": "any",
424
- "mutable": false,
425
- "complexType": {
426
- "original": "boolean | number",
427
- "resolved": "boolean | number",
428
- "references": {}
429
- },
430
- "required": false,
431
- "optional": false,
432
- "docs": {
433
- "tags": [],
434
- "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."
435
- },
436
- "attribute": "error-update",
437
- "reflect": false,
438
- "defaultValue": "0"
439
- },
440
- "nativeAttributes": {
441
- "type": "unknown",
442
- "mutable": false,
443
- "complexType": {
444
- "original": "{ [key: string]: string }",
445
- "resolved": "undefined | { [key: string]: string; }",
446
- "references": {}
447
- },
448
- "required": false,
449
- "optional": true,
450
- "docs": {
451
- "tags": [],
452
- "text": "Attributes that will be added to the native HTML textarea element."
453
- }
454
- }
455
- }; }
456
- static get states() { return {
457
- "hasSlottedLabel": {},
458
- "errorMap": {}
459
- }; }
460
- static get events() { return [{
461
- "method": "catChange",
462
- "name": "catChange",
463
- "bubbles": true,
464
- "cancelable": true,
465
- "composed": true,
466
- "docs": {
467
- "tags": [],
468
- "text": "Emitted when the value is changed."
469
- },
470
- "complexType": {
471
- "original": "any",
472
- "resolved": "any",
473
- "references": {}
474
455
  }
475
- }, {
476
- "method": "catFocus",
477
- "name": "catFocus",
478
- "bubbles": true,
479
- "cancelable": true,
480
- "composed": true,
481
- "docs": {
482
- "tags": [],
483
- "text": "Emitted when the textarea received focus."
484
- },
485
- "complexType": {
486
- "original": "FocusEvent",
487
- "resolved": "FocusEvent",
488
- "references": {
489
- "FocusEvent": {
490
- "location": "global"
456
+ };
457
+ }
458
+ static get states() {
459
+ return {
460
+ "hasSlottedLabel": {},
461
+ "hasSlottedHint": {},
462
+ "errorMap": {}
463
+ };
464
+ }
465
+ static get events() {
466
+ return [{
467
+ "method": "catChange",
468
+ "name": "catChange",
469
+ "bubbles": true,
470
+ "cancelable": true,
471
+ "composed": true,
472
+ "docs": {
473
+ "tags": [],
474
+ "text": "Emitted when the value is changed."
475
+ },
476
+ "complexType": {
477
+ "original": "any",
478
+ "resolved": "any",
479
+ "references": {}
480
+ }
481
+ }, {
482
+ "method": "catFocus",
483
+ "name": "catFocus",
484
+ "bubbles": true,
485
+ "cancelable": true,
486
+ "composed": true,
487
+ "docs": {
488
+ "tags": [],
489
+ "text": "Emitted when the textarea received focus."
490
+ },
491
+ "complexType": {
492
+ "original": "FocusEvent",
493
+ "resolved": "FocusEvent",
494
+ "references": {
495
+ "FocusEvent": {
496
+ "location": "global"
497
+ }
491
498
  }
492
499
  }
493
- }
494
- }, {
495
- "method": "catBlur",
496
- "name": "catBlur",
497
- "bubbles": true,
498
- "cancelable": true,
499
- "composed": true,
500
- "docs": {
501
- "tags": [],
502
- "text": "Emitted when the textarea loses focus."
503
- },
504
- "complexType": {
505
- "original": "FocusEvent",
506
- "resolved": "FocusEvent",
507
- "references": {
508
- "FocusEvent": {
509
- "location": "global"
500
+ }, {
501
+ "method": "catBlur",
502
+ "name": "catBlur",
503
+ "bubbles": true,
504
+ "cancelable": true,
505
+ "composed": true,
506
+ "docs": {
507
+ "tags": [],
508
+ "text": "Emitted when the textarea loses focus."
509
+ },
510
+ "complexType": {
511
+ "original": "FocusEvent",
512
+ "resolved": "FocusEvent",
513
+ "references": {
514
+ "FocusEvent": {
515
+ "location": "global"
516
+ }
510
517
  }
511
518
  }
512
- }
513
- }]; }
514
- static get methods() { return {
515
- "doFocus": {
516
- "complexType": {
517
- "signature": "(options?: FocusOptions | undefined) => Promise<void>",
518
- "parameters": [{
519
- "tags": [{
520
- "name": "param",
521
- "text": "options An optional object providing options to control aspects of\nthe focusing process."
522
- }],
523
- "text": "An optional object providing options to control aspects of\nthe focusing process."
524
- }],
525
- "references": {
526
- "Promise": {
527
- "location": "global"
519
+ }];
520
+ }
521
+ static get methods() {
522
+ return {
523
+ "doFocus": {
524
+ "complexType": {
525
+ "signature": "(options?: FocusOptions) => Promise<void>",
526
+ "parameters": [{
527
+ "tags": [{
528
+ "name": "param",
529
+ "text": "options An optional object providing options to control aspects of\nthe focusing process."
530
+ }],
531
+ "text": "An optional object providing options to control aspects of\nthe focusing process."
532
+ }],
533
+ "references": {
534
+ "Promise": {
535
+ "location": "global"
536
+ },
537
+ "FocusOptions": {
538
+ "location": "global"
539
+ }
528
540
  },
529
- "FocusOptions": {
530
- "location": "global"
531
- }
541
+ "return": "Promise<void>"
532
542
  },
533
- "return": "Promise<void>"
543
+ "docs": {
544
+ "text": "Programmatically move focus to the textarea. Use this method instead of\n`textarea.focus()`.",
545
+ "tags": [{
546
+ "name": "param",
547
+ "text": "options An optional object providing options to control aspects of\nthe focusing process."
548
+ }]
549
+ }
534
550
  },
535
- "docs": {
536
- "text": "Programmatically move focus to the textarea. Use this method instead of\n`textarea.focus()`.",
537
- "tags": [{
538
- "name": "param",
539
- "text": "options An optional object providing options to control aspects of\nthe focusing process."
540
- }]
541
- }
542
- },
543
- "doBlur": {
544
- "complexType": {
545
- "signature": "() => Promise<void>",
546
- "parameters": [],
547
- "references": {
548
- "Promise": {
549
- "location": "global"
550
- }
551
+ "doBlur": {
552
+ "complexType": {
553
+ "signature": "() => Promise<void>",
554
+ "parameters": [],
555
+ "references": {
556
+ "Promise": {
557
+ "location": "global"
558
+ }
559
+ },
560
+ "return": "Promise<void>"
551
561
  },
552
- "return": "Promise<void>"
562
+ "docs": {
563
+ "text": "Programmatically remove focus from the textarea. Use this method instead of\n`textarea.blur()`.",
564
+ "tags": []
565
+ }
553
566
  },
554
- "docs": {
555
- "text": "Programmatically remove focus from the textarea. Use this method instead of\n`textarea.blur()`.",
556
- "tags": []
557
- }
558
- },
559
- "doClick": {
560
- "complexType": {
561
- "signature": "() => Promise<void>",
562
- "parameters": [],
563
- "references": {
564
- "Promise": {
565
- "location": "global"
566
- }
567
+ "doClick": {
568
+ "complexType": {
569
+ "signature": "() => Promise<void>",
570
+ "parameters": [],
571
+ "references": {
572
+ "Promise": {
573
+ "location": "global"
574
+ }
575
+ },
576
+ "return": "Promise<void>"
567
577
  },
568
- "return": "Promise<void>"
569
- },
570
- "docs": {
571
- "text": "Programmatically simulate a click on the textarea.",
572
- "tags": []
578
+ "docs": {
579
+ "text": "Programmatically simulate a click on the textarea.",
580
+ "tags": []
581
+ }
573
582
  }
574
- }
575
- }; }
583
+ };
584
+ }
576
585
  static get elementRef() { return "hostElement"; }
577
- static get watchers() { return [{
578
- "propName": "errors",
579
- "methodName": "watchErrorsHandler"
580
- }]; }
586
+ static get watchers() {
587
+ return [{
588
+ "propName": "errors",
589
+ "methodName": "watchErrorsHandler"
590
+ }];
591
+ }
581
592
  }
582
- //# sourceMappingURL=cat-textarea.js.map
593
+ //# sourceMappingURL=cat-textarea.js.map