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