@rededor/cura 1.0.0 → 1.2.0-alpha.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 (332) hide show
  1. package/dist/assets/assets/cura-assets.zip +0 -0
  2. package/dist/assets/assets/fonts/Gotham/Gotham-Black.woff2 +0 -0
  3. package/dist/assets/assets/fonts/Gotham/Gotham-BlackItalic.woff2 +0 -0
  4. package/dist/assets/assets/fonts/Gotham/Gotham-Bold.woff2 +0 -0
  5. package/dist/assets/assets/fonts/Gotham/Gotham-BoldItalic.woff2 +0 -0
  6. package/dist/assets/assets/fonts/Gotham/Gotham-Book.woff2 +0 -0
  7. package/dist/assets/assets/fonts/Gotham/Gotham-BookItalic.woff2 +0 -0
  8. package/dist/assets/assets/fonts/Gotham/Gotham-ExtraLight.woff2 +0 -0
  9. package/dist/assets/assets/fonts/Gotham/Gotham-ExtraLightItalic.woff2 +0 -0
  10. package/dist/assets/assets/fonts/Gotham/Gotham-Light.woff2 +0 -0
  11. package/dist/assets/assets/fonts/Gotham/Gotham-LightItalic.woff2 +0 -0
  12. package/dist/assets/assets/fonts/Gotham/Gotham-Medium.woff2 +0 -0
  13. package/dist/assets/assets/fonts/Gotham/Gotham-MediumItalic.woff2 +0 -0
  14. package/dist/assets/assets/fonts/Gotham/Gotham-Thin.woff2 +0 -0
  15. package/dist/assets/assets/fonts/Gotham/Gotham-ThinItalic.woff2 +0 -0
  16. package/dist/assets/assets/fonts/Gotham/Gotham-Ultra.woff2 +0 -0
  17. package/dist/assets/assets/fonts/Gotham/Gotham-UltraItalic.woff2 +0 -0
  18. package/dist/assets/assets/fonts/Gotham/style.css +90 -0
  19. package/dist/assets/assets/fonts/HankenGrotesk/HankenGrotesk-Italic-VariableFont_wght.woff2 +0 -0
  20. package/dist/assets/assets/fonts/HankenGrotesk/HankenGrotesk-VariableFont_wght.woff2 +0 -0
  21. package/dist/assets/assets/fonts/HankenGrotesk/style-webfont.css +72 -0
  22. package/dist/assets/assets/fonts/HankenGrotesk/style.css +16 -0
  23. package/dist/assets/assets/fonts/Roboto/Roboto-Black.woff2 +0 -0
  24. package/dist/assets/assets/fonts/Roboto/Roboto-BlackItalic.woff2 +0 -0
  25. package/dist/assets/assets/fonts/Roboto/Roboto-Bold.woff2 +0 -0
  26. package/dist/assets/assets/fonts/Roboto/Roboto-BoldItalic.woff2 +0 -0
  27. package/dist/assets/assets/fonts/Roboto/Roboto-Italic.woff2 +0 -0
  28. package/dist/assets/assets/fonts/Roboto/Roboto-Light.woff2 +0 -0
  29. package/dist/assets/assets/fonts/Roboto/Roboto-LightItalic.woff2 +0 -0
  30. package/dist/assets/assets/fonts/Roboto/Roboto-Medium.woff2 +0 -0
  31. package/dist/assets/assets/fonts/Roboto/Roboto-MediumItalic.woff2 +0 -0
  32. package/dist/assets/assets/fonts/Roboto/Roboto-Regular.woff2 +0 -0
  33. package/dist/assets/assets/fonts/Roboto/Roboto-Thin.woff2 +0 -0
  34. package/dist/assets/assets/fonts/Roboto/Roboto-ThinItalic.woff2 +0 -0
  35. package/dist/assets/assets/fonts/Roboto/style-webfont.css +756 -0
  36. package/dist/assets/assets/fonts/Roboto/style.css +90 -0
  37. package/dist/assets/assets/images/avatar/doctor-default.svg +6 -7
  38. package/dist/assets/assets/images/avatar/doctor-default_old.svg +8 -0
  39. package/dist/assets/assets/images/avatar/dora-default.svg +3 -4
  40. package/dist/assets/assets/images/avatar/dora-default_old.svg +5 -0
  41. package/dist/assets/assets/images/avatar/patient-default.svg +16 -10
  42. package/dist/assets/assets/images/avatar/patient-default_old.svg +12 -0
  43. package/dist/assets/assets/images/avatar/unit-default.svg +7 -8
  44. package/dist/assets/assets/images/avatar/unit-default_old.svg +9 -0
  45. package/dist/cjs/{app-globals-b77d5b06.js → app-globals-4d07f363.js} +20 -4
  46. package/dist/cjs/app-globals-4d07f363.js.map +1 -0
  47. package/dist/cjs/cura-accordion_12.cjs.entry.js +24 -17
  48. package/dist/cjs/cura-accordion_12.cjs.entry.js.map +1 -1
  49. package/dist/cjs/cura-alert.cjs.entry.js +2 -2
  50. package/dist/cjs/cura-avatar.cjs.entry.js +2 -2
  51. package/dist/cjs/cura-badge-distance.cjs.entry.js +1 -1
  52. package/dist/cjs/cura-badge-number.cjs.entry.js +29 -0
  53. package/dist/cjs/cura-badge-number.cjs.entry.js.map +1 -0
  54. package/dist/cjs/cura-button-outline.cjs.entry.js +2 -2
  55. package/dist/cjs/cura-button-outline.cjs.entry.js.map +1 -1
  56. package/dist/cjs/cura-button-select.cjs.entry.js +69 -58
  57. package/dist/cjs/cura-button-select.cjs.entry.js.map +1 -1
  58. package/dist/cjs/cura-button-transparent.cjs.entry.js +2 -2
  59. package/dist/cjs/cura-button-transparent.cjs.entry.js.map +1 -1
  60. package/dist/cjs/cura-calendar.cjs.entry.js +126 -235
  61. package/dist/cjs/cura-calendar.cjs.entry.js.map +1 -1
  62. package/dist/cjs/cura-card.cjs.entry.js +2 -2
  63. package/dist/cjs/cura-checkbox.cjs.entry.js +3 -3
  64. package/dist/cjs/cura-checkbox.cjs.entry.js.map +1 -1
  65. package/dist/cjs/cura-display.cjs.entry.js +2 -2
  66. package/dist/cjs/cura-dropdown-search-option-title.cjs.entry.js +2 -2
  67. package/dist/cjs/cura-dropdown-search-option.cjs.entry.js +3 -3
  68. package/dist/cjs/cura-dropdown-search.cjs.entry.js +33 -6
  69. package/dist/cjs/cura-dropdown-search.cjs.entry.js.map +1 -1
  70. package/dist/cjs/cura-icons-view.cjs.entry.js +4 -4
  71. package/dist/cjs/cura-input-date.cjs.entry.js +188 -0
  72. package/dist/cjs/cura-input-date.cjs.entry.js.map +1 -0
  73. package/dist/cjs/cura-loader-bar.cjs.entry.js +2 -2
  74. package/dist/cjs/cura-radio.cjs.entry.js +2 -2
  75. package/dist/cjs/cura-switch.cjs.entry.js +2 -2
  76. package/dist/cjs/cura-toast.cjs.entry.js +2 -2
  77. package/dist/cjs/cura.cjs.js +3 -3
  78. package/dist/cjs/index-6dc29195.js +126 -0
  79. package/dist/cjs/index-6dc29195.js.map +1 -0
  80. package/dist/cjs/{index-98e7ba54.js → index-e6d728ec.js} +70 -3
  81. package/dist/{esm/index-1ad98520.js.map → cjs/index-e6d728ec.js.map} +1 -1
  82. package/dist/cjs/loader.cjs.js +3 -3
  83. package/dist/collection/api/theme-presets/theme-default.js +3 -3
  84. package/dist/collection/api/theme-presets/theme-default.js.map +1 -1
  85. package/dist/collection/api/theme-presets/theme-legacy-default.js +16 -0
  86. package/dist/collection/api/theme-presets/theme-legacy-default.js.map +1 -1
  87. package/dist/collection/assets/images/avatar/doctor-default.svg +6 -7
  88. package/dist/collection/assets/images/avatar/doctor-default_old.svg +8 -0
  89. package/dist/collection/assets/images/avatar/dora-default.svg +3 -4
  90. package/dist/collection/assets/images/avatar/dora-default_old.svg +5 -0
  91. package/dist/collection/assets/images/avatar/patient-default.svg +16 -10
  92. package/dist/collection/assets/images/avatar/patient-default_old.svg +12 -0
  93. package/dist/collection/assets/images/avatar/unit-default.svg +7 -8
  94. package/dist/collection/assets/images/avatar/unit-default_old.svg +9 -0
  95. package/dist/collection/collection-manifest.json +2 -0
  96. package/dist/collection/components/badges/cura-badge-number/cura-badge-number.css +30 -0
  97. package/dist/collection/components/badges/cura-badge-number/cura-badge-number.js +66 -0
  98. package/dist/collection/components/badges/cura-badge-number/cura-badge-number.js.map +1 -0
  99. package/dist/collection/components/badges/cura-badge-number/cura-badge-number.stories.js +56 -0
  100. package/dist/collection/components/badges/cura-badge-number/cura-badge-number.stories.js.map +1 -0
  101. package/dist/collection/components/buttons/cura-button/cura-button.js +1 -1
  102. package/dist/collection/components/buttons/cura-button/cura-button.js.map +1 -1
  103. package/dist/collection/components/buttons/cura-button-outline/cura-button-outline.js +1 -1
  104. package/dist/collection/components/buttons/cura-button-outline/cura-button-outline.js.map +1 -1
  105. package/dist/collection/components/buttons/cura-button-select/cura-button-select.css +49 -21
  106. package/dist/collection/components/buttons/cura-button-select/cura-button-select.js +110 -113
  107. package/dist/collection/components/buttons/cura-button-select/cura-button-select.js.map +1 -1
  108. package/dist/collection/components/buttons/cura-button-select/cura-button-select.stories.js +133 -0
  109. package/dist/collection/components/buttons/cura-button-select/cura-button-select.stories.js.map +1 -0
  110. package/dist/collection/components/buttons/cura-button-transparent/cura-button-transparent.js +1 -1
  111. package/dist/collection/components/buttons/cura-button-transparent/cura-button-transparent.js.map +1 -1
  112. package/dist/collection/components/cura-alert/cura-alert.js +1 -1
  113. package/dist/collection/components/cura-avatar/cura-avatar.js +1 -1
  114. package/dist/collection/components/cura-calendar/cura-calendar.css +15 -5
  115. package/dist/collection/components/cura-calendar/cura-calendar.js +139 -52
  116. package/dist/collection/components/cura-calendar/cura-calendar.js.map +1 -1
  117. package/dist/collection/components/cura-calendar/cura-calendar.stories.js +33 -3
  118. package/dist/collection/components/cura-calendar/cura-calendar.stories.js.map +1 -1
  119. package/dist/collection/components/cura-card/cura-card.js +1 -1
  120. package/dist/collection/components/cura-icon/cura-icon.js +1 -1
  121. package/dist/collection/components/cura-icons-view/cura-icons-view.js +3 -3
  122. package/dist/collection/components/cura-page-template/cura-page-template.js +1 -1
  123. package/dist/collection/components/cura-toast/cura-toast.js +1 -1
  124. package/dist/collection/components/forms/cura-checkbox/cura-checkbox.css +13 -5
  125. package/dist/collection/components/forms/cura-checkbox/cura-checkbox.js +1 -1
  126. package/dist/collection/components/forms/cura-dropdown-search/cura-dropdown-search-option/cura-dropdown-search-option.js +2 -2
  127. package/dist/collection/components/forms/cura-dropdown-search/cura-dropdown-search-option-title/cura-dropdown-search-option-title.js +1 -1
  128. package/dist/collection/components/forms/cura-dropdown-search/cura-dropdown-search.css +1 -1
  129. package/dist/collection/components/forms/cura-dropdown-search/cura-dropdown-search.js +49 -4
  130. package/dist/collection/components/forms/cura-dropdown-search/cura-dropdown-search.js.map +1 -1
  131. package/dist/collection/components/forms/cura-dropdown-search/cura-dropdown-search.stories.js +19 -6
  132. package/dist/collection/components/forms/cura-dropdown-search/cura-dropdown-search.stories.js.map +1 -1
  133. package/dist/collection/components/forms/cura-input-date/cura-input-date.css +79 -0
  134. package/dist/collection/components/forms/cura-input-date/cura-input-date.js +424 -0
  135. package/dist/collection/components/forms/cura-input-date/cura-input-date.js.map +1 -0
  136. package/dist/collection/components/forms/cura-input-date/cura-input-date.stories.js +138 -0
  137. package/dist/collection/components/forms/cura-input-date/cura-input-date.stories.js.map +1 -0
  138. package/dist/collection/components/forms/cura-input-text/cura-input-text.css +5 -2
  139. package/dist/collection/components/forms/cura-input-text/cura-input-text.js +41 -2
  140. package/dist/collection/components/forms/cura-input-text/cura-input-text.js.map +1 -1
  141. package/dist/collection/components/forms/cura-input-text/cura-input-text.stories.js +73 -21
  142. package/dist/collection/components/forms/cura-input-text/cura-input-text.stories.js.map +1 -1
  143. package/dist/collection/components/forms/cura-input-text/mask-presets/input-mask-presets.js +3 -0
  144. package/dist/collection/components/forms/cura-input-text/mask-presets/input-mask-presets.js.map +1 -1
  145. package/dist/collection/components/forms/cura-label/cura-label.js +1 -1
  146. package/dist/collection/components/forms/cura-radio/cura-radio.js +1 -1
  147. package/dist/collection/components/forms/cura-select/cura-select.css +6 -2
  148. package/dist/collection/components/forms/cura-select/cura-select.js +23 -4
  149. package/dist/collection/components/forms/cura-select/cura-select.js.map +1 -1
  150. package/dist/collection/components/forms/cura-select/cura-select.stories.js +11 -1
  151. package/dist/collection/components/forms/cura-select/cura-select.stories.js.map +1 -1
  152. package/dist/collection/components/forms/cura-select-options/cura-select-option.js +1 -1
  153. package/dist/collection/components/forms/cura-switch/cura-switch.js +1 -1
  154. package/dist/collection/components/loaders/cura-loader-bar/cura-loader-bar.js +1 -1
  155. package/dist/collection/components/loaders/cura-loader-circle/cura-loader-circle.js +1 -1
  156. package/dist/collection/components/text/cura-display/cura-display.js +1 -1
  157. package/dist/collection/components/text/cura-heading/cura-heading.js +1 -1
  158. package/dist/collection/components/text/cura-paragraph/cura-paragraph.css +3 -1
  159. package/dist/collection/components/text/cura-paragraph/cura-paragraph.js +1 -1
  160. package/dist/collection/stories/blocks/index.js +85 -0
  161. package/dist/components/cura-alert.js +1 -1
  162. package/dist/components/cura-avatar.js +1 -1
  163. package/dist/components/cura-badge-number.d.ts +11 -0
  164. package/dist/components/cura-badge-number.js +8 -0
  165. package/dist/components/cura-badge-number.js.map +1 -0
  166. package/dist/components/cura-badge-number2.js +49 -0
  167. package/dist/components/cura-badge-number2.js.map +1 -0
  168. package/dist/components/cura-button-outline.js +1 -1
  169. package/dist/components/cura-button-outline.js.map +1 -1
  170. package/dist/components/cura-button-select.js +81 -65
  171. package/dist/components/cura-button-select.js.map +1 -1
  172. package/dist/components/cura-button-transparent2.js +1 -1
  173. package/dist/components/cura-button-transparent2.js.map +1 -1
  174. package/dist/components/cura-button.js +1 -1
  175. package/dist/components/cura-button.js.map +1 -1
  176. package/dist/components/cura-calendar.js +1 -4065
  177. package/dist/components/cura-calendar.js.map +1 -1
  178. package/dist/components/cura-calendar2.js +4082 -0
  179. package/dist/components/cura-calendar2.js.map +1 -0
  180. package/dist/components/cura-card.js +1 -1
  181. package/dist/components/cura-checkbox.js +2 -2
  182. package/dist/components/cura-checkbox.js.map +1 -1
  183. package/dist/components/cura-display.js +1 -1
  184. package/dist/components/cura-dropdown-search-option-title.js +1 -1
  185. package/dist/components/cura-dropdown-search-option.js +2 -2
  186. package/dist/components/cura-dropdown-search.js +33 -5
  187. package/dist/components/cura-dropdown-search.js.map +1 -1
  188. package/dist/components/cura-heading2.js +1 -1
  189. package/dist/components/cura-icon2.js +1 -1
  190. package/dist/components/cura-icons-view.js +3 -3
  191. package/dist/components/cura-input-date.d.ts +11 -0
  192. package/dist/components/cura-input-date.js +270 -0
  193. package/dist/components/cura-input-date.js.map +1 -0
  194. package/dist/components/cura-input-text2.js +10 -2
  195. package/dist/components/cura-input-text2.js.map +1 -1
  196. package/dist/components/cura-label2.js +1 -1
  197. package/dist/components/cura-loader-bar2.js +1 -1
  198. package/dist/components/cura-loader-circle2.js +1 -1
  199. package/dist/components/cura-page-template.js +1 -1
  200. package/dist/components/cura-paragraph2.js +2 -2
  201. package/dist/components/cura-paragraph2.js.map +1 -1
  202. package/dist/components/cura-radio.js +1 -1
  203. package/dist/components/cura-select-option2.js +1 -1
  204. package/dist/components/cura-select2.js +7 -5
  205. package/dist/components/cura-select2.js.map +1 -1
  206. package/dist/components/cura-switch.js +1 -1
  207. package/dist/components/cura-toast.js +1 -1
  208. package/dist/components/index.js +23 -3
  209. package/dist/components/index.js.map +1 -1
  210. package/dist/cura/cura.esm.js +1 -1
  211. package/dist/cura/cura.esm.js.map +1 -1
  212. package/dist/cura/p-0b7a7306.js +2 -0
  213. package/dist/cura/p-0b7a7306.js.map +1 -0
  214. package/dist/cura/{p-0d435e42.entry.js → p-116a1cd6.entry.js} +2 -2
  215. package/dist/cura/p-272c784a.js +2 -0
  216. package/dist/cura/p-272c784a.js.map +1 -0
  217. package/dist/cura/{p-4c7a2419.entry.js → p-2d267d23.entry.js} +2 -2
  218. package/dist/cura/{p-b301a1ef.entry.js → p-33772510.entry.js} +2 -2
  219. package/dist/cura/{p-b301a1ef.entry.js.map → p-33772510.entry.js.map} +1 -1
  220. package/dist/cura/{p-0a923806.entry.js → p-41c3d47d.entry.js} +2 -2
  221. package/dist/cura/{p-0a923806.entry.js.map → p-41c3d47d.entry.js.map} +1 -1
  222. package/dist/cura/p-44e3325a.entry.js +2 -0
  223. package/dist/cura/p-44e3325a.entry.js.map +1 -0
  224. package/dist/cura/p-4e14c01c.entry.js +2 -0
  225. package/dist/cura/p-563ba0cd.entry.js +2 -0
  226. package/dist/cura/p-563ba0cd.entry.js.map +1 -0
  227. package/dist/cura/{p-57b8b468.entry.js → p-8f3db0fe.entry.js} +2 -2
  228. package/dist/cura/{p-a00d2c68.entry.js → p-907b3d12.entry.js} +2 -2
  229. package/dist/cura/p-a2ae6bd2.entry.js +2 -0
  230. package/dist/cura/p-a2ae6bd2.entry.js.map +1 -0
  231. package/dist/cura/{p-6682619b.entry.js → p-b2d5db22.entry.js} +2 -2
  232. package/dist/cura/p-b43b69f3.entry.js +2 -0
  233. package/dist/cura/p-b43b69f3.entry.js.map +1 -0
  234. package/dist/cura/{p-599acc84.entry.js → p-be10b681.entry.js} +2 -2
  235. package/dist/cura/p-be10b681.entry.js.map +1 -0
  236. package/dist/cura/{p-a5cf0fd6.entry.js → p-c6508bd7.entry.js} +2 -2
  237. package/dist/cura/{p-2203e829.entry.js → p-dcd2e5bb.entry.js} +2 -2
  238. package/dist/cura/{p-84d8c67d.entry.js → p-e5023e34.entry.js} +2 -2
  239. package/dist/cura/p-e8bc6381.entry.js +2 -0
  240. package/dist/cura/p-e8bc6381.entry.js.map +1 -0
  241. package/dist/cura/p-ed97cf3c.entry.js +2 -0
  242. package/dist/cura/p-ed97cf3c.entry.js.map +1 -0
  243. package/dist/cura/{p-ad8a7e0f.entry.js → p-fcbf4311.entry.js} +2 -2
  244. package/dist/cura/{p-66c5cf5f.entry.js → p-fd083399.entry.js} +2 -2
  245. package/dist/cura/p-fd5ed6b0.js +3 -0
  246. package/dist/cura/p-fd5ed6b0.js.map +1 -0
  247. package/dist/cura/{p-f9433d24.entry.js → p-fdce91a7.entry.js} +2 -2
  248. package/dist/esm/{app-globals-488bf508.js → app-globals-6ca7103d.js} +20 -4
  249. package/dist/esm/app-globals-6ca7103d.js.map +1 -0
  250. package/dist/esm/cura-accordion_12.entry.js +24 -17
  251. package/dist/esm/cura-accordion_12.entry.js.map +1 -1
  252. package/dist/esm/cura-alert.entry.js +2 -2
  253. package/dist/esm/cura-avatar.entry.js +2 -2
  254. package/dist/esm/cura-badge-distance.entry.js +1 -1
  255. package/dist/esm/cura-badge-number.entry.js +25 -0
  256. package/dist/esm/cura-badge-number.entry.js.map +1 -0
  257. package/dist/esm/cura-button-outline.entry.js +2 -2
  258. package/dist/esm/cura-button-outline.entry.js.map +1 -1
  259. package/dist/esm/cura-button-select.entry.js +69 -58
  260. package/dist/esm/cura-button-select.entry.js.map +1 -1
  261. package/dist/esm/cura-button-transparent.entry.js +2 -2
  262. package/dist/esm/cura-button-transparent.entry.js.map +1 -1
  263. package/dist/esm/cura-calendar.entry.js +58 -167
  264. package/dist/esm/cura-calendar.entry.js.map +1 -1
  265. package/dist/esm/cura-card.entry.js +2 -2
  266. package/dist/esm/cura-checkbox.entry.js +3 -3
  267. package/dist/esm/cura-checkbox.entry.js.map +1 -1
  268. package/dist/esm/cura-display.entry.js +2 -2
  269. package/dist/esm/cura-dropdown-search-option-title.entry.js +2 -2
  270. package/dist/esm/cura-dropdown-search-option.entry.js +3 -3
  271. package/dist/esm/cura-dropdown-search.entry.js +33 -6
  272. package/dist/esm/cura-dropdown-search.entry.js.map +1 -1
  273. package/dist/esm/cura-icons-view.entry.js +4 -4
  274. package/dist/esm/cura-input-date.entry.js +184 -0
  275. package/dist/esm/cura-input-date.entry.js.map +1 -0
  276. package/dist/esm/cura-loader-bar.entry.js +2 -2
  277. package/dist/esm/cura-radio.entry.js +2 -2
  278. package/dist/esm/cura-switch.entry.js +2 -2
  279. package/dist/esm/cura-toast.entry.js +2 -2
  280. package/dist/esm/cura.js +4 -4
  281. package/dist/esm/{index-1ad98520.js → index-747aad85.js} +70 -3
  282. package/dist/esm/index-747aad85.js.map +1 -0
  283. package/dist/esm/index-fbee309a.js +120 -0
  284. package/dist/esm/index-fbee309a.js.map +1 -0
  285. package/dist/esm/loader.js +4 -4
  286. package/dist/types/api/theme-presets/theme-legacy-default.d.ts +3 -3
  287. package/dist/types/api/theme-presets/theme-presets.d.ts +3 -3
  288. package/dist/types/components/badges/cura-badge-number/cura-badge-number.d.ts +8 -0
  289. package/dist/types/components/badges/cura-badge-number/cura-badge-number.stories.d.ts +39 -0
  290. package/dist/types/components/buttons/cura-button-select/cura-button-select.d.ts +12 -34
  291. package/dist/types/components/buttons/cura-button-select/cura-button-select.stories.d.ts +105 -0
  292. package/dist/types/components/cura-calendar/cura-calendar.d.ts +53 -42
  293. package/dist/types/components/cura-calendar/cura-calendar.stories.d.ts +33 -0
  294. package/dist/types/components/forms/cura-dropdown-search/cura-dropdown-search.d.ts +9 -3
  295. package/dist/types/components/forms/cura-dropdown-search/cura-dropdown-search.stories.d.ts +14 -0
  296. package/dist/types/components/forms/cura-input-date/cura-input-date.d.ts +92 -0
  297. package/dist/types/components/forms/cura-input-date/cura-input-date.stories.d.ts +125 -0
  298. package/dist/types/components/forms/cura-input-text/cura-input-text.d.ts +6 -0
  299. package/dist/types/components/forms/cura-input-text/cura-input-text.stories.d.ts +15 -0
  300. package/dist/types/components/forms/cura-select/cura-select.d.ts +5 -0
  301. package/dist/types/components/forms/cura-select/cura-select.stories.d.ts +11 -0
  302. package/dist/types/components.d.ts +180 -48
  303. package/package.json +5 -3
  304. package/dist/cjs/app-globals-b77d5b06.js.map +0 -1
  305. package/dist/cjs/index-98e7ba54.js.map +0 -1
  306. package/dist/cura/p-0dd837cf.entry.js +0 -2
  307. package/dist/cura/p-0dd837cf.entry.js.map +0 -1
  308. package/dist/cura/p-312791fb.js +0 -3
  309. package/dist/cura/p-312791fb.js.map +0 -1
  310. package/dist/cura/p-4ef24fbd.entry.js +0 -2
  311. package/dist/cura/p-4ef24fbd.entry.js.map +0 -1
  312. package/dist/cura/p-599acc84.entry.js.map +0 -1
  313. package/dist/cura/p-a6c3c0ea.js +0 -2
  314. package/dist/cura/p-a6c3c0ea.js.map +0 -1
  315. package/dist/cura/p-dc5d0c29.entry.js +0 -2
  316. package/dist/cura/p-dc5d0c29.entry.js.map +0 -1
  317. package/dist/cura/p-df5c3a86.entry.js +0 -2
  318. package/dist/cura/p-df5c3a86.entry.js.map +0 -1
  319. package/dist/cura/p-dfc65f66.entry.js +0 -2
  320. package/dist/esm/app-globals-488bf508.js.map +0 -1
  321. /package/dist/cura/{p-0d435e42.entry.js.map → p-116a1cd6.entry.js.map} +0 -0
  322. /package/dist/cura/{p-4c7a2419.entry.js.map → p-2d267d23.entry.js.map} +0 -0
  323. /package/dist/cura/{p-dfc65f66.entry.js.map → p-4e14c01c.entry.js.map} +0 -0
  324. /package/dist/cura/{p-57b8b468.entry.js.map → p-8f3db0fe.entry.js.map} +0 -0
  325. /package/dist/cura/{p-a00d2c68.entry.js.map → p-907b3d12.entry.js.map} +0 -0
  326. /package/dist/cura/{p-6682619b.entry.js.map → p-b2d5db22.entry.js.map} +0 -0
  327. /package/dist/cura/{p-a5cf0fd6.entry.js.map → p-c6508bd7.entry.js.map} +0 -0
  328. /package/dist/cura/{p-2203e829.entry.js.map → p-dcd2e5bb.entry.js.map} +0 -0
  329. /package/dist/cura/{p-84d8c67d.entry.js.map → p-e5023e34.entry.js.map} +0 -0
  330. /package/dist/cura/{p-ad8a7e0f.entry.js.map → p-fcbf4311.entry.js.map} +0 -0
  331. /package/dist/cura/{p-66c5cf5f.entry.js.map → p-fd083399.entry.js.map} +0 -0
  332. /package/dist/cura/{p-f9433d24.entry.js.map → p-fdce91a7.entry.js.map} +0 -0
@@ -17,6 +17,7 @@ export class CuraInputText {
17
17
  this.disabled = false;
18
18
  this.required = false;
19
19
  this.maskPreset = undefined;
20
+ this.enableSelectionMode = false;
20
21
  this.maskRegex = undefined;
21
22
  this.maskAdvanced = undefined;
22
23
  this.maxlength = undefined;
@@ -27,6 +28,7 @@ export class CuraInputText {
27
28
  this.styles = {};
28
29
  this.clearIcon = true;
29
30
  this.hideErrorIcon = false;
31
+ this.autocomplete = 'on';
30
32
  }
31
33
  /**
32
34
  * Callback to restore the switch state from the form.
@@ -89,6 +91,7 @@ export class CuraInputText {
89
91
  isHovered: this.isHovered,
90
92
  [this.status]: true,
91
93
  transparent: this.mode === 'transparent',
94
+ selection: this.enableSelectionMode,
92
95
  };
93
96
  }
94
97
  getLabelColor() {
@@ -283,7 +286,7 @@ export class CuraInputText {
283
286
  e.preventDefault();
284
287
  }
285
288
  render() {
286
- return (h(Host, { key: '2f2f783ecef425e66a87f01ee01da880de719a39' }, h("div", { key: '1d9045829f1c0d651c72b79d76e02e2c46061dac', style: this.styles, onMouseEnter: () => this.handleMouseEnter(), onMouseLeave: () => this.handleMouseLeave(), class: Object.assign({ 'cura-input-group': true }, this.getClasses()) }, h("div", { key: '812f545947d26244ef7bef0dfbbdf4ddc48b1553', class: "input-wrapper" }, this.label && (h("cura-label", { key: '620aa3fb370e1cc80462c55f1b39418030cbed7d', class: "label", weight: "bold", size: this.size === 'large' ? 'small' : 'xsmall', color: this.getLabelColor() }, this.label, " ", this.required && h("span", { key: 'fc0dc595d953c8360acc2277d8744dcf868a59b3', class: "required" }, "* "))), h("div", { key: 'fcb2acfb37815c5beb2c1b96ae22a3854b370e15', class: "cura-input-field", part: "cura-input-field", style: this.styles }, this.renderIcon(), h("input", { key: '4cd76e5b8cf323f43de0169631cbb168a0eaa954', name: this.name ? this.name : '', type: this.type, onKeyDown: event => this.handleKeyDown(event), onBlur: this.handleInputBlur.bind(this), onFocus: this.handleInputFocus.bind(this), onInput: event => this.handleInputChange(event), class: this.getClasses(), style: this.styles, placeholder: this.placeholder, disabled: this.disabled || this.isLoading, required: this.required, readonly: this.readOnly, maxlength: this.maxlength, value: this.value !== undefined && this.value !== null ? this.value : '', inputmode: this.maskPreset ? 'tel' : this.inputMode, ref: ref => (this.inputRef = ref) }), !!this.clearIcon && !this.readOnly && !this.isLoading && !this.disabled && this.value && this.isFocused && (h("cura-icon", { key: '0832143a6aea10d7a07cf281e66e48762c9df30d', size: this.size === 'large' || this.mode === 'transparent' ? 20 : 16, color: "primary-base", name: "closeCircle", iconset: "default", class: "clear-button", onClick: () => this.handleClearInput() })), this.isLoading && h("cura-loader-circle", { key: 'a2eebd7fdeb47ca19b3a3be6f379bd27a77292ca', size: this.size === 'large' ? 'medium' : 'small', color: "primary-base" })), this.renderHelperText()))));
289
+ return (h(Host, { key: '7e2ba6e0ecae174b2ecc2592264d2d836b4ec63f' }, h("div", { key: '0ed1e0e943b1b9b14c09f4b5a3f7bbe7211205c4', style: this.styles, onMouseEnter: () => this.handleMouseEnter(), onMouseLeave: () => this.handleMouseLeave(), class: Object.assign({ 'cura-input-group': true }, this.getClasses()) }, h("div", { key: '5eb22b6c40ada7afb122d49fc997c661848edd7d', class: "input-wrapper" }, this.label && (h("cura-label", { key: '3d1b76bae46fe021dcd4b8ccd6dba663b0d97f91', class: "label", weight: "bold", size: this.size === 'large' ? 'small' : 'xsmall', color: this.getLabelColor() }, this.label, " ", this.required && h("span", { key: 'debbb27cc068069717077a2437ca239e700d688d', class: "required" }, "* "))), h("div", { key: '5a4884cfefd1218a625f77e640a5b372c5b453ad', class: "cura-input-field", part: "cura-input-field", style: this.styles }, this.renderIcon(), h("input", { key: '8ee9aa8d28c522a22b1b10701569bfe1029ad64a', name: this.name ? this.name : '', type: this.type, onKeyDown: event => this.handleKeyDown(event), onBlur: this.handleInputBlur.bind(this), onFocus: this.handleInputFocus.bind(this), onInput: event => this.handleInputChange(event), class: this.getClasses(), style: this.styles, placeholder: this.placeholder, disabled: this.disabled || this.isLoading, required: this.required, readonly: this.readOnly, maxlength: this.maxlength, value: this.value !== undefined && this.value !== null ? this.value : '', inputmode: this.maskPreset ? 'tel' : this.inputMode, ref: ref => (this.inputRef = ref), autocomplete: this.autocomplete }), !!this.clearIcon && !this.readOnly && !this.isLoading && !this.disabled && this.value && this.isFocused && (h("cura-icon", { key: 'f4839d9819657d2599c9d68b947624fd543fef36', size: this.size === 'large' || this.mode === 'transparent' ? 20 : 16, color: "primary-base", name: "closeCircle", iconset: "default", class: "clear-button", onClick: () => this.handleClearInput() })), this.isLoading && h("cura-loader-circle", { key: '017c815c741c8113d9992ba3eefdda740f2a885d', size: this.size === 'large' ? 'medium' : 'small', color: "primary-base" })), this.renderHelperText()))));
287
290
  }
288
291
  static get is() { return "cura-input-text"; }
289
292
  static get encapsulation() { return "shadow"; }
@@ -542,7 +545,7 @@ export class CuraInputText {
542
545
  "references": {
543
546
  "MaskPreset": {
544
547
  "location": "local",
545
- "path": "/Users/fellipesoares/Code/cura/packages/component-lib/src/components/forms/cura-input-text/cura-input-text.tsx",
548
+ "path": "/Volumes/projects/cura/packages/component-lib/src/components/forms/cura-input-text/cura-input-text.tsx",
546
549
  "id": "src/components/forms/cura-input-text/cura-input-text.tsx::MaskPreset"
547
550
  }
548
551
  }
@@ -559,6 +562,24 @@ export class CuraInputText {
559
562
  "attribute": "mask-preset",
560
563
  "reflect": false
561
564
  },
565
+ "enableSelectionMode": {
566
+ "type": "boolean",
567
+ "mutable": true,
568
+ "complexType": {
569
+ "original": "boolean",
570
+ "resolved": "boolean",
571
+ "references": {}
572
+ },
573
+ "required": false,
574
+ "optional": false,
575
+ "docs": {
576
+ "tags": [],
577
+ "text": ""
578
+ },
579
+ "attribute": "enable-selection-mode",
580
+ "reflect": true,
581
+ "defaultValue": "false"
582
+ },
562
583
  "maskRegex": {
563
584
  "type": "string",
564
585
  "mutable": true,
@@ -687,6 +708,24 @@ export class CuraInputText {
687
708
  "attribute": "hide-error-icon",
688
709
  "reflect": false,
689
710
  "defaultValue": "false"
711
+ },
712
+ "autocomplete": {
713
+ "type": "string",
714
+ "mutable": false,
715
+ "complexType": {
716
+ "original": "string",
717
+ "resolved": "string",
718
+ "references": {}
719
+ },
720
+ "required": false,
721
+ "optional": true,
722
+ "docs": {
723
+ "tags": [],
724
+ "text": "Defines whether the input should have autocomplete"
725
+ },
726
+ "attribute": "autocomplete",
727
+ "reflect": true,
728
+ "defaultValue": "'on'"
690
729
  }
691
730
  };
692
731
  }
@@ -1 +1 @@
1
- {"version":3,"file":"cura-input-text.js","sourceRoot":"","sources":["../../../../src/components/forms/cura-input-text/cura-input-text.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAgB,eAAe,EAAE,MAAM,eAAe,CAAC;AAC7G,OAAO,KAAgC,MAAM,OAAO,CAAC;AACrD,OAAO,EAAE,WAAW,EAAkB,MAAM,mCAAmC,CAAC;AAQhF,MAAM,OAAO,aAAa;;oBAIkD,SAAS;sBAMD,SAAS;oBAK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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, h, Prop, State, Watch, Event, EventEmitter, AttachInternals } from '@stencil/core';\nimport IMask, { FactoryArg, InputMask } from 'imask';\nimport { maskOptions, MaskOptionsMap } from './mask-presets/input-mask-presets';\nexport type MaskPreset = keyof MaskOptionsMap;\n@Component({\n tag: 'cura-input-text',\n styleUrl: 'cura-input-text.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class CuraInputText {\n /**\n * Mode of the input: 'default' or 'transparent' (default: 'default')\n */\n @Prop({ reflect: true, mutable: true }) mode: 'default' | 'transparent' = 'default';\n\n /**\n * Indicates input status(default: default)\n */\n\n @Prop({ reflect: true, mutable: true }) status: 'error' | 'success' | 'default' = 'default';\n\n /**\n * Size of the input mode default: 'small', 'medium', or 'large' (default: 'medium')\n */\n @Prop({ reflect: true, mutable: true }) size: 'small' | 'medium' | 'large' = 'medium';\n\n /**\n * Type of the input: 'text', 'number' (default: 'text')\n */\n @Prop({ reflect: true }) type: string = 'text';\n\n /**\n * Type of the input: 'text', 'number' (default: 'text')\n */\n @Prop({ reflect: true }) inputMode: string = 'text';\n\n /**\n * Label text for the input\n */\n @Prop({ reflect: true }) label?: string = '';\n\n /**\n * Name text for the input\n */\n @Prop({ reflect: true }) name?: string = '';\n\n /**\n * Placeholder text for the input\n */\n @Prop({ reflect: true }) placeholder?: string | null = null;\n\n /**\n * Value of the input field\n */\n @Prop({ mutable: true }) value?: string | number = '';\n\n /**\n * Whether to display a cura icon (default: null)\n */\n @Prop({ reflect: true, mutable: true }) iconName?: string = '';\n\n /**\n * Helper text displayed below the input\n */\n @Prop({ reflect: true, mutable: true }) helperText?: string;\n\n /**\n * Whether the input is disabled (default: false)\n */\n @Prop({ reflect: true }) disabled?: boolean = false;\n\n /**\n * Whether the input is required (default: false)\n */\n @Prop({ reflect: true }) required?: boolean = false;\n\n /**\n * Mask preset for input formatting: 'cpf', 'cnpj', 'phone', 'date', etc. Uses IMask library.\n * @see: https://imask.js.org/\n */\n @Prop() maskPreset?: MaskPreset;\n\n /**\n * Regular expression for custom input masking. Uses IMask library.\n * @see: https://imask.js.org/\n */\n @Prop({ reflect: true, mutable: true }) maskRegex?: string | null;\n\n /**\n * Advanced mask object to be used with IMask library\n * @see: https://imask.js.org/\n */\n @Prop({ reflect: true, mutable: true }) maskAdvanced?: any | string | null;\n\n /**\n * Maximum length of the input value (default: undefined)\n */\n @Prop({ reflect: true, mutable: true }) maxlength?: number | undefined;\n\n /**\n * Whether the input is read-only (default: false)\n */\n @Prop({ reflect: true }) readOnly?: boolean = false;\n\n /**\n * Whether the input is in loading state (default: false)\n */\n @Prop({ reflect: true, mutable: true }) isLoading?: boolean = false;\n\n /**\n * Internal state: Whether the input is hovered (default: false)\n */\n @State() isHovered: boolean = false;\n\n /**\n * Internal state: Whether the input is focused (default: false)\n */\n @State() isFocused: boolean = false;\n\n /**\n * Internal state: Styles object for dynamic styling\n */\n @State() styles: { [key: string]: string } = {};\n\n /**\n * Icon button name for the clear button (default: 'closeCircle')\n */\n @Prop({ reflect: true, mutable: true }) clearIcon?: boolean = true;\n\n /**\n * Removes the alertCircle icon when necessary(as used in CuraDropdownSearch)\n */\n @Prop() hideErrorIcon: boolean = false;\n\n /**\n * Emitted when the value of the input changes\n * @type {EventEmitter<string | number>}\n */\n @Event() valueChange: EventEmitter<string | number>;\n\n @AttachInternals() internals: ElementInternals;\n\n inputRef!: HTMLInputElement;\n\n /**\n * Instance of InputMask is returned when IMask constructor is called.\n */\n maskedInput: InputMask<FactoryArg>;\n weights: { [key: string]: string };\n\n /**\n * Callback to restore the switch state from the form.\n */\n formStateRestoreCallback(state: { value: string }) {\n this.value = state.value;\n this.applyValueToMask();\n this.internals.setFormValue(this.value);\n }\n\n /**\n * Callback for form association.\n */\n formAssociatedCallback(form: { ariaLabel: string }) {\n form.ariaLabel = this.label;\n }\n\n /**\n * Callback to reset the switch state when the form is reset.\n */\n formResetCallback() {\n this.handleClearInput();\n this.internals.setValidity({});\n this.internals.setFormValue('');\n }\n\n /**\n * Callback to update the switch's disabled state when the form's disabled state changes.\n */\n formDisabledCallback(disabled: boolean) {\n this.disabled = disabled;\n }\n\n @Watch('styles')\n connectedCallback() {\n this.styles['--primary-base'] = window.CuraAPI.theme.colors.getColor(`primary-base`);\n this.styles['--neutral-purewhite'] = window.CuraAPI.theme.colors.getColor(`neutral-purewhite`);\n this.styles['--neutral-white'] = window.CuraAPI.theme.colors.getColor(`neutral-white`);\n this.styles['--neutral-black'] = window.CuraAPI.theme.colors.getColor(`neutral-black`);\n this.styles['--neutral-medium'] = window.CuraAPI.theme.colors.getColor(`neutral-medium`);\n this.styles['--neutral-base'] = window.CuraAPI.theme.colors.getColor(`neutral-base`);\n this.styles['--neutral-dark'] = window.CuraAPI.theme.colors.getColor(`neutral-dark`);\n this.styles['--success-dark'] = window.CuraAPI.theme.colors.getColor(`success-dark`);\n this.styles['--success-darker'] = window.CuraAPI.theme.colors.getColor(`success-darker`);\n this.styles['--success-lighter'] = window.CuraAPI.theme.colors.getColor(`success-lighter`);\n this.styles['--error-lighter'] = window.CuraAPI.theme.colors.getColor(`error-lighter`);\n this.styles['--error-dark'] = window.CuraAPI.theme.colors.getColor(`error-dark`);\n this.styles['--error-darker'] = window.CuraAPI.theme.colors.getColor(`error-darker`);\n this.styles['--error-base'] = window.CuraAPI.theme.colors.getColor(`error-base`);\n this.styles['--info-base'] = window.CuraAPI.theme.colors.getColor(`info-base`);\n this.styles['--font-family'] = window.CuraAPI.theme.fonts.getFamily();\n this.styles['--font-size'] = window.CuraAPI.theme.fonts.getSize();\n this.styles['--font-color'] = window.CuraAPI.theme.fonts.getColor();\n this.weights = window.CuraAPI.theme.fonts.getWeights();\n this.styles['--font-weight-medium'] = this.weights.medium;\n this.styles['--font-weight-bold'] = this.weights.bold;\n this.styles['--font-weight-regular'] = this.weights.regular;\n }\n\n @Watch('size')\n getClasses() {\n return {\n [this.size.toLowerCase()]: this.mode === 'default',\n disabled: this.disabled,\n isLoading: this.isLoading,\n isFocused: this.isFocused && !this.disabled && !this.readOnly && !this.isLoading,\n isHovered: this.isHovered,\n [this.status]: true,\n transparent: this.mode === 'transparent',\n };\n }\n\n getLabelColor() {\n if (!!this.disabled) {\n return 'neutral-medium';\n } else if (this.isLoading && this.mode === 'transparent' && !this.isHovered) {\n return 'neutral-dark';\n } else if (((this.isFocused || this.isHovered || this.status === 'success' || this.status === 'error') && !this.readOnly) || this.isHovered) {\n return 'neutral-black';\n } else {\n return 'neutral-dark';\n }\n }\n\n @Watch('status')\n @Watch('mode')\n renderIcon() {\n if ((this.iconName === '' && this.status === 'default') || (this.mode === 'transparent' && this.isLoading) || (this.mode === 'transparent' && this.status === 'default')) {\n return;\n }\n // Used when input is rendered in cura-dropdown-search with error status\n if (this.status === 'error' && this.hideErrorIcon) {\n return;\n }\n\n const iconSizeDefaultMode = this.size === 'large' ? 20 : 16;\n const baseIconSize = this.mode === 'transparent' ? 20 : iconSizeDefaultMode;\n\n const iconMap: { [key: string]: { name: string; color: string } } = {\n loading: { name: this.iconName, color: 'primary-base' },\n success: { name: 'checkCircle', color: 'success-dark' },\n error: { name: 'alertCircle', color: 'error-dark' },\n default: { name: this.iconName, color: 'neutral-dark' },\n };\n\n const iconConfig = iconMap[this.isLoading ? 'loading' : this.status || 'default'];\n\n return (\n <div class=\"feedback-icon\" style={this.styles}>\n <cura-icon name={iconConfig.name} iconset=\"default\" size={baseIconSize} color={iconConfig.color} />\n </div>\n );\n }\n\n renderHelperText() {\n const isError = this.status === 'error';\n const isSuccess = this.status === 'success';\n const isDefault = this.status === 'default';\n const helperTextSize = this.size === 'large' ? 'small' : 'xsmall';\n const helperTextWeight = this.mode === 'transparent' ? 'bold' : 'regular';\n \n\n const colorText = (() => {\n if (this.disabled) return 'neutral-medium';\n if (this.isLoading) return 'primary-base';\n if (this.isFocused || this.isHovered) return 'neutral-black';\n return 'neutral-dark';\n })();\n\n return (\n <div style={this.styles} class=\"helper-text\">\n {isDefault && (\n <cura-label size={helperTextSize} lineHeight=\"xsmall\" color={colorText} weight={helperTextWeight}>\n <slot></slot>\n </cura-label>\n )}\n {isError && (\n <cura-label size={helperTextSize} lineHeight=\"xsmall\" color=\"error-dark\" weight={helperTextWeight}>\n <slot></slot>\n </cura-label>\n )}\n {isSuccess && (\n <cura-label size={helperTextSize} lineHeight=\"xsmall\" color=\"success-dark\" weight={helperTextWeight}>\n <slot></slot>\n </cura-label>\n )}\n </div>\n );\n }\n\n handleMouseEnter() {\n this.isHovered = true;\n }\n handleMouseLeave() {\n this.isHovered = false;\n }\n\n componentDidLoad() {\n this.initializeMask();\n }\n\n disconnectedCallback() {\n this.destroyMask();\n }\n\n handleMaskUpdate() {\n if (this.maskedInput) {\n this.maskedInput.updateValue();\n }\n }\n\n handleClearInput() {\n this.handleMaskUpdate();\n\n this.value = '';\n this.inputRef.value = '';\n this.valueChange.emit(this.value);\n this.handleMaskUpdate();\n }\n\n handleInputFocus() {\n this.handleMaskUpdate();\n this.isFocused = true;\n }\n\n handleInputBlur() {\n this.handleMaskUpdate();\n setTimeout(() => {\n this.isFocused = false;\n }, 150);\n }\n\n shouldDisplayMask() {\n return this.maskPreset || this.maskRegex || this.maskAdvanced;\n }\n\n @Watch('maskPreset')\n @Watch('maskRegex')\n @Watch('maskAdvanced')\n initializeMask() {\n if (this.shouldDisplayMask()) {\n if (this.maskedInput) {\n this.destroyMask();\n }\n if (this.maskPreset) {\n this.initializePresetMask();\n } else if (this.maskRegex) {\n this.initializeRegexMask();\n } else if (this.maskAdvanced) {\n this.initializeAdvancedMask();\n }\n this.applyValueToMask();\n } else {\n this.clearMaskValue();\n }\n }\n\n initializeRegexMask() {\n const cleanedRegexString = this.maskRegex.replace(/^\\/|\\/[gimsuy]*$/g, '');\n const flags = (this.maskRegex.match(/\\/[gimsuy]*$/g) || [''])[0].slice(1);\n this.maskedInput = IMask(this.inputRef, { mask: new RegExp(cleanedRegexString, flags) });\n }\n\n initializePresetMask() {\n const options = maskOptions[this.maskPreset];\n\n if (options) {\n this.maskedInput = IMask(this.inputRef, options);\n } else {\n console.error(`Mask preset \"${this.maskPreset}\" not found.`);\n }\n }\n\n initializeAdvancedMask() {\n try {\n const config = typeof this.maskAdvanced === 'string' ? JSON.parse(this.maskAdvanced) : this.maskAdvanced;\n this.maskedInput = IMask(this.inputRef, config);\n } catch (error) {\n console.error('Error defining maskAdvanced:', error);\n }\n }\n\n applyValueToMask() {\n if (this.maskedInput) {\n if (this.maskedInput.mask === Date || this.maskedInput.mask === Number) {\n this.maskedInput.typedValue = this.value;\n } else {\n this.value = this.maskedInput.value;\n }\n this.handleMaskUpdate();\n }\n }\n\n clearMaskValue() {\n this.inputRef.value = this.value as string;\n }\n\n destroyMask() {\n if (this.maskedInput) {\n this.maskedInput.destroy();\n this.maskedInput = undefined;\n }\n }\n\n handleInputChange(event: any) {\n const inputValue = event.target.value;\n \n this.valueChange.emit(inputValue)\n\n if (this.type === 'number') {\n this.handleNumberInputChange(inputValue);\n } else {\n this.handleTextInputChange(inputValue);\n }\n this.internals.setFormValue(this.value as string);\n }\n\n handleNumberInputChange(inputValue: string) {\n const numericValue = parseFloat(inputValue);\n if (!isNaN(numericValue)) {\n this.value = numericValue;\n } else {\n console.error('Invalid numeric input:', inputValue);\n }\n }\n\n handleTextInputChange(inputValue: string) {\n if (this.maskedInput) {\n if (this.maskedInput.mask instanceof Date || this.maskedInput.mask === Number) {\n this.maskedInput.typedValue = inputValue;\n this.value = this.maskedInput.typedValue;\n }\n this.value = this.maskedInput.value;\n } else {\n this.value = inputValue;\n }\n }\n\n handleKeyDown(event: KeyboardEvent) {\n if (this.type === 'number') {\n this.handleBlockInvalidNumber(event);\n }\n }\n\n handleBlockInvalidNumber(e: KeyboardEvent) {\n if (['e', 'E', '+', '-'].includes(e.key)) e.preventDefault();\n }\n render() {\n return (\n <Host>\n <div\n style={this.styles}\n onMouseEnter={() => this.handleMouseEnter()}\n onMouseLeave={() => this.handleMouseLeave()}\n class={{\n 'cura-input-group': true,\n ...this.getClasses(),\n }}\n >\n <div class=\"input-wrapper\">\n {this.label && (\n <cura-label class=\"label\" weight=\"bold\" size={this.size === 'large' ? 'small' : 'xsmall'} color={this.getLabelColor()}>\n {this.label} {this.required && <span class=\"required\">* </span>}\n </cura-label>\n )}\n <div class=\"cura-input-field\" part=\"cura-input-field\" style={this.styles}>\n {this.renderIcon()}\n <input\n name={this.name ? this.name : ''}\n type={this.type}\n onKeyDown={event => this.handleKeyDown(event)}\n onBlur={this.handleInputBlur.bind(this)}\n onFocus={this.handleInputFocus.bind(this)}\n onInput={event => this.handleInputChange(event)}\n class={this.getClasses()}\n style={this.styles}\n placeholder={this.placeholder}\n disabled={this.disabled || this.isLoading}\n required={this.required}\n readonly={this.readOnly}\n maxlength={this.maxlength}\n value={this.value !== undefined && this.value !== null ? this.value : ''}\n inputmode={this.maskPreset ? 'tel' : this.inputMode}\n ref={ref => (this.inputRef = ref)}\n />\n {!!this.clearIcon && !this.readOnly && !this.isLoading && !this.disabled && this.value && this.isFocused && (\n <cura-icon\n size={this.size === 'large' || this.mode === 'transparent' ? 20 : 16}\n color=\"primary-base\"\n name=\"closeCircle\"\n iconset=\"default\"\n class=\"clear-button\"\n onClick={() => this.handleClearInput()}\n />\n )}\n {this.isLoading && <cura-loader-circle size={this.size === 'large' ? 'medium' : 'small'} color=\"primary-base\"></cura-loader-circle>}\n </div>\n {this.renderHelperText()}\n </div>\n </div>\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"cura-input-text.js","sourceRoot":"","sources":["../../../../src/components/forms/cura-input-text/cura-input-text.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAgB,eAAe,EAAE,MAAM,eAAe,CAAC;AAC7G,OAAO,KAAgC,MAAM,OAAO,CAAC;AACrD,OAAO,EAAE,WAAW,EAAkB,MAAM,mCAAmC,CAAC;AAQhF,MAAM,OAAO,aAAa;;oBAIkD,SAAS;sBAMD,SAAS;oBAKd,QAAQ;oBAK7C,MAAM;yBAKD,MAAM;qBAKT,EAAE;oBAKH,EAAE;2BAKY,IAAI;qBAKR,EAAE;wBAKO,EAAE;;wBAUhB,KAAK;wBAKL,KAAK;;mCAWoB,KAAK;;;;wBAsB9B,KAAK;yBAKW,KAAK;yBAKrC,KAAK;yBAKL,KAAK;sBAKU,EAAE;yBAKe,IAAI;6BAKjC,KAAK;4BAKW,IAAI;;IAkBrD;;OAEG;IACH,wBAAwB,CAAC,KAAwB;QAC/C,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC;QACzB,IAAI,CAAC,gBAAgB,EAAE,CAAC;QACxB,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC1C,CAAC;IAED;;OAEG;IACH,sBAAsB,CAAC,IAA2B;QAChD,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC;IAC9B,CAAC;IAED;;OAEG;IACH,iBAAiB;QACf,IAAI,CAAC,gBAAgB,EAAE,CAAC;QACxB,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC;QAC/B,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC;I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aAAa,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,EACpE,KAAK,EAAC,cAAc,EACpB,IAAI,EAAC,aAAa,EAClB,OAAO,EAAC,SAAS,EACjB,KAAK,EAAC,cAAc,EACpB,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,gBAAgB,EAAE,GACtC,CACH;wBACA,IAAI,CAAC,SAAS,IAAI,2EAAoB,IAAI,EAAE,IAAI,CAAC,IAAI,KAAK,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,EAAE,KAAK,EAAC,cAAc,GAAsB,CAC/H;oBACL,IAAI,CAAC,gBAAgB,EAAE,CACpB,CACF,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, h, Prop, State, Watch, Event, EventEmitter, AttachInternals } from '@stencil/core';\nimport IMask, { FactoryArg, InputMask } from 'imask';\nimport { maskOptions, MaskOptionsMap } from './mask-presets/input-mask-presets';\nexport type MaskPreset = keyof MaskOptionsMap;\n@Component({\n tag: 'cura-input-text',\n styleUrl: 'cura-input-text.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class CuraInputText {\n /**\n * Mode of the input: 'default' or 'transparent' (default: 'default')\n */\n @Prop({ reflect: true, mutable: true }) mode: 'default' | 'transparent' = 'default';\n\n /**\n * Indicates input status(default: default)\n */\n\n @Prop({ reflect: true, mutable: true }) status: 'error' | 'success' | 'default' = 'default';\n\n /**\n * Size of the input mode default: 'small', 'medium', or 'large' (default: 'medium')\n */\n @Prop({ reflect: true, mutable: true }) size: 'small' | 'medium' | 'large' = 'medium';\n\n /**\n * Type of the input: 'text', 'number' (default: 'text')\n */\n @Prop({ reflect: true }) type: string = 'text';\n\n /**\n * Type of the input: 'text', 'number' (default: 'text')\n */\n @Prop({ reflect: true }) inputMode: string = 'text';\n\n /**\n * Label text for the input\n */\n @Prop({ reflect: true }) label?: string = '';\n\n /**\n * Name text for the input\n */\n @Prop({ reflect: true }) name?: string = '';\n\n /**\n * Placeholder text for the input\n */\n @Prop({ reflect: true }) placeholder?: string | null = null;\n\n /**\n * Value of the input field\n */\n @Prop({ mutable: true }) value?: string | number = '';\n\n /**\n * Whether to display a cura icon (default: null)\n */\n @Prop({ reflect: true, mutable: true }) iconName?: string = '';\n\n /**\n * Helper text displayed below the input\n */\n @Prop({ reflect: true, mutable: true }) helperText?: string;\n\n /**\n * Whether the input is disabled (default: false)\n */\n @Prop({ reflect: true }) disabled?: boolean = false;\n\n /**\n * Whether the input is required (default: false)\n */\n @Prop({ reflect: true }) required?: boolean = false;\n\n /**\n * Mask preset for input formatting: 'cpf', 'cnpj', 'phone', 'date', etc. Uses IMask library.\n * @see: https://imask.js.org/\n */\n @Prop() maskPreset?: MaskPreset;\n\n /*\n * Controls whether the selection functionality is active\n */\n @Prop({ reflect: true, mutable: true }) enableSelectionMode: boolean = false;\n\n /**\n * Regular expression for custom input masking. Uses IMask library.\n * @see: https://imask.js.org/\n */\n @Prop({ reflect: true, mutable: true }) maskRegex?: string | null;\n\n /**\n * Advanced mask object to be used with IMask library\n * @see: https://imask.js.org/\n */\n @Prop({ reflect: true, mutable: true }) maskAdvanced?: any | string | null;\n\n /**\n * Maximum length of the input value (default: undefined)\n */\n @Prop({ reflect: true, mutable: true }) maxlength?: number | undefined;\n\n /**\n * Whether the input is read-only (default: false)\n */\n @Prop({ reflect: true }) readOnly?: boolean = false;\n\n /**\n * Whether the input is in loading state (default: false)\n */\n @Prop({ reflect: true, mutable: true }) isLoading?: boolean = false;\n\n /**\n * Internal state: Whether the input is hovered (default: false)\n */\n @State() isHovered: boolean = false;\n\n /**\n * Internal state: Whether the input is focused (default: false)\n */\n @State() isFocused: boolean = false;\n\n /**\n * Internal state: Styles object for dynamic styling\n */\n @State() styles: { [key: string]: string } = {};\n\n /**\n * Icon button name for the clear button (default: 'closeCircle')\n */\n @Prop({ reflect: true, mutable: true }) clearIcon?: boolean = true;\n\n /**\n * Removes the alertCircle icon when necessary(as used in CuraDropdownSearch)\n */\n @Prop() hideErrorIcon: boolean = false;\n\n /**\n * Defines whether the input should have autocomplete\n */\n @Prop({ reflect: true }) autocomplete?: string = 'on';\n\n /**\n * Emitted when the value of the input changes\n * @type {EventEmitter<string | number>}\n */\n @Event() valueChange: EventEmitter<string | number>;\n\n @AttachInternals() internals: ElementInternals;\n\n inputRef!: HTMLInputElement;\n\n /**\n * Instance of InputMask is returned when IMask constructor is called.\n */\n maskedInput: InputMask<FactoryArg>;\n weights: { [key: string]: string };\n\n /**\n * Callback to restore the switch state from the form.\n */\n formStateRestoreCallback(state: { value: string }) {\n this.value = state.value;\n this.applyValueToMask();\n this.internals.setFormValue(this.value);\n }\n\n /**\n * Callback for form association.\n */\n formAssociatedCallback(form: { ariaLabel: string }) {\n form.ariaLabel = this.label;\n }\n\n /**\n * Callback to reset the switch state when the form is reset.\n */\n formResetCallback() {\n this.handleClearInput();\n this.internals.setValidity({});\n this.internals.setFormValue('');\n }\n\n /**\n * Callback to update the switch's disabled state when the form's disabled state changes.\n */\n formDisabledCallback(disabled: boolean) {\n this.disabled = disabled;\n }\n\n @Watch('styles')\n connectedCallback() {\n this.styles['--primary-base'] = window.CuraAPI.theme.colors.getColor(`primary-base`);\n this.styles['--neutral-purewhite'] = window.CuraAPI.theme.colors.getColor(`neutral-purewhite`);\n this.styles['--neutral-white'] = window.CuraAPI.theme.colors.getColor(`neutral-white`);\n this.styles['--neutral-black'] = window.CuraAPI.theme.colors.getColor(`neutral-black`);\n this.styles['--neutral-medium'] = window.CuraAPI.theme.colors.getColor(`neutral-medium`);\n this.styles['--neutral-base'] = window.CuraAPI.theme.colors.getColor(`neutral-base`);\n this.styles['--neutral-dark'] = window.CuraAPI.theme.colors.getColor(`neutral-dark`);\n this.styles['--success-dark'] = window.CuraAPI.theme.colors.getColor(`success-dark`);\n this.styles['--success-darker'] = window.CuraAPI.theme.colors.getColor(`success-darker`);\n this.styles['--success-lighter'] = window.CuraAPI.theme.colors.getColor(`success-lighter`);\n this.styles['--error-lighter'] = window.CuraAPI.theme.colors.getColor(`error-lighter`);\n this.styles['--error-dark'] = window.CuraAPI.theme.colors.getColor(`error-dark`);\n this.styles['--error-darker'] = window.CuraAPI.theme.colors.getColor(`error-darker`);\n this.styles['--error-base'] = window.CuraAPI.theme.colors.getColor(`error-base`);\n this.styles['--info-base'] = window.CuraAPI.theme.colors.getColor(`info-base`);\n this.styles['--font-family'] = window.CuraAPI.theme.fonts.getFamily();\n this.styles['--font-size'] = window.CuraAPI.theme.fonts.getSize();\n this.styles['--font-color'] = window.CuraAPI.theme.fonts.getColor();\n this.weights = window.CuraAPI.theme.fonts.getWeights();\n this.styles['--font-weight-medium'] = this.weights.medium;\n this.styles['--font-weight-bold'] = this.weights.bold;\n this.styles['--font-weight-regular'] = this.weights.regular;\n }\n\n @Watch('size')\n getClasses() {\n return {\n [this.size.toLowerCase()]: this.mode === 'default',\n disabled: this.disabled,\n isLoading: this.isLoading,\n isFocused: this.isFocused && !this.disabled && !this.readOnly && !this.isLoading,\n isHovered: this.isHovered,\n [this.status]: true,\n transparent: this.mode === 'transparent',\n selection: this.enableSelectionMode,\n };\n }\n\n getLabelColor() {\n if (!!this.disabled) {\n return 'neutral-medium';\n } else if (this.isLoading && this.mode === 'transparent' && !this.isHovered) {\n return 'neutral-dark';\n } else if (((this.isFocused || this.isHovered || this.status === 'success' || this.status === 'error') && !this.readOnly) || this.isHovered) {\n return 'neutral-black';\n } else {\n return 'neutral-dark';\n }\n }\n\n @Watch('status')\n @Watch('mode')\n renderIcon() {\n if ((this.iconName === '' && this.status === 'default') || (this.mode === 'transparent' && this.isLoading) || (this.mode === 'transparent' && this.status === 'default')) {\n return;\n }\n // Used when input is rendered in cura-dropdown-search with error status\n if (this.status === 'error' && this.hideErrorIcon) {\n return;\n }\n\n const iconSizeDefaultMode = this.size === 'large' ? 20 : 16;\n const baseIconSize = this.mode === 'transparent' ? 20 : iconSizeDefaultMode;\n\n const iconMap: { [key: string]: { name: string; color: string } } = {\n loading: { name: this.iconName, color: 'primary-base' },\n success: { name: 'checkCircle', color: 'success-dark' },\n error: { name: 'alertCircle', color: 'error-dark' },\n default: { name: this.iconName, color: 'neutral-dark' },\n };\n\n const iconConfig = iconMap[this.isLoading ? 'loading' : this.status || 'default'];\n\n return (\n <div class=\"feedback-icon\" style={this.styles}>\n <cura-icon name={iconConfig.name} iconset=\"default\" size={baseIconSize} color={iconConfig.color} />\n </div>\n );\n }\n\n renderHelperText() {\n const isError = this.status === 'error';\n const isSuccess = this.status === 'success';\n const isDefault = this.status === 'default';\n const helperTextSize = this.size === 'large' ? 'small' : 'xsmall';\n const helperTextWeight = this.mode === 'transparent' ? 'bold' : 'regular';\n const colorText = (() => {\n if (this.disabled) return 'neutral-medium';\n if (this.isLoading) return 'primary-base';\n if (this.isFocused || this.isHovered) return 'neutral-black';\n return 'neutral-dark';\n })();\n\n return (\n <div style={this.styles} class=\"helper-text\">\n {isDefault && (\n <cura-label size={helperTextSize} lineHeight=\"xsmall\" color={colorText} weight={helperTextWeight}>\n <slot></slot>\n </cura-label>\n )}\n {isError && (\n <cura-label size={helperTextSize} lineHeight=\"xsmall\" color=\"error-dark\" weight={helperTextWeight}>\n <slot></slot>\n </cura-label>\n )}\n {isSuccess && (\n <cura-label size={helperTextSize} lineHeight=\"xsmall\" color=\"success-dark\" weight={helperTextWeight}>\n <slot></slot>\n </cura-label>\n )}\n </div>\n );\n }\n\n handleMouseEnter() {\n this.isHovered = true;\n }\n handleMouseLeave() {\n this.isHovered = false;\n }\n\n componentDidLoad() {\n this.initializeMask();\n }\n\n disconnectedCallback() {\n this.destroyMask();\n }\n\n handleMaskUpdate() {\n if (this.maskedInput) {\n this.maskedInput.updateValue();\n }\n }\n\n handleClearInput() {\n this.handleMaskUpdate();\n\n this.value = '';\n this.inputRef.value = '';\n this.valueChange.emit(this.value);\n this.handleMaskUpdate();\n }\n\n handleInputFocus() {\n this.handleMaskUpdate();\n this.isFocused = true;\n }\n\n handleInputBlur() {\n this.handleMaskUpdate();\n setTimeout(() => {\n this.isFocused = false;\n }, 150);\n }\n\n shouldDisplayMask() {\n return this.maskPreset || this.maskRegex || this.maskAdvanced;\n }\n\n @Watch('maskPreset')\n @Watch('maskRegex')\n @Watch('maskAdvanced')\n initializeMask() {\n if (this.shouldDisplayMask()) {\n if (this.maskedInput) {\n this.destroyMask();\n }\n if (this.maskPreset) {\n this.initializePresetMask();\n } else if (this.maskRegex) {\n this.initializeRegexMask();\n } else if (this.maskAdvanced) {\n this.initializeAdvancedMask();\n }\n this.applyValueToMask();\n } else {\n this.clearMaskValue();\n }\n }\n\n initializeRegexMask() {\n const cleanedRegexString = this.maskRegex.replace(/^\\/|\\/[gimsuy]*$/g, '');\n const flags = (this.maskRegex.match(/\\/[gimsuy]*$/g) || [''])[0].slice(1);\n this.maskedInput = IMask(this.inputRef, { mask: new RegExp(cleanedRegexString, flags) });\n }\n\n initializePresetMask() {\n const options = maskOptions[this.maskPreset];\n\n if (options) {\n this.maskedInput = IMask(this.inputRef, options);\n } else {\n console.error(`Mask preset \"${this.maskPreset}\" not found.`);\n }\n }\n\n initializeAdvancedMask() {\n try {\n const config = typeof this.maskAdvanced === 'string' ? JSON.parse(this.maskAdvanced) : this.maskAdvanced;\n this.maskedInput = IMask(this.inputRef, config);\n } catch (error) {\n console.error('Error defining maskAdvanced:', error);\n }\n }\n\n applyValueToMask() {\n if (this.maskedInput) {\n if (this.maskedInput.mask === Date || this.maskedInput.mask === Number) {\n this.maskedInput.typedValue = this.value;\n } else {\n this.value = this.maskedInput.value;\n }\n this.handleMaskUpdate();\n }\n }\n\n clearMaskValue() {\n this.inputRef.value = this.value as string;\n }\n\n destroyMask() {\n if (this.maskedInput) {\n this.maskedInput.destroy();\n this.maskedInput = undefined;\n }\n }\n\n handleInputChange(event: any) {\n const inputValue = event.target.value;\n\n this.valueChange.emit(inputValue);\n\n if (this.type === 'number') {\n this.handleNumberInputChange(inputValue);\n } else {\n this.handleTextInputChange(inputValue);\n }\n this.internals.setFormValue(this.value as string);\n }\n\n handleNumberInputChange(inputValue: string) {\n const numericValue = parseFloat(inputValue);\n if (!isNaN(numericValue)) {\n this.value = numericValue;\n } else {\n console.error('Invalid numeric input:', inputValue);\n }\n }\n\n handleTextInputChange(inputValue: string) {\n if (this.maskedInput) {\n if (this.maskedInput.mask instanceof Date || this.maskedInput.mask === Number) {\n this.maskedInput.typedValue = inputValue;\n this.value = this.maskedInput.typedValue;\n }\n this.value = this.maskedInput.value;\n } else {\n this.value = inputValue;\n }\n }\n\n handleKeyDown(event: KeyboardEvent) {\n if (this.type === 'number') {\n this.handleBlockInvalidNumber(event);\n }\n }\n\n handleBlockInvalidNumber(e: KeyboardEvent) {\n if (['e', 'E', '+', '-'].includes(e.key)) e.preventDefault();\n }\n render() {\n return (\n <Host>\n <div\n style={this.styles}\n onMouseEnter={() => this.handleMouseEnter()}\n onMouseLeave={() => this.handleMouseLeave()}\n class={{\n 'cura-input-group': true,\n ...this.getClasses(),\n }}\n >\n <div class=\"input-wrapper\">\n {this.label && (\n <cura-label class=\"label\" weight=\"bold\" size={this.size === 'large' ? 'small' : 'xsmall'} color={this.getLabelColor()}>\n {this.label} {this.required && <span class=\"required\">* </span>}\n </cura-label>\n )}\n <div class=\"cura-input-field\" part=\"cura-input-field\" style={this.styles}>\n {this.renderIcon()}\n <input\n name={this.name ? this.name : ''}\n type={this.type}\n onKeyDown={event => this.handleKeyDown(event)}\n onBlur={this.handleInputBlur.bind(this)}\n onFocus={this.handleInputFocus.bind(this)}\n onInput={event => this.handleInputChange(event)}\n class={this.getClasses()}\n style={this.styles}\n placeholder={this.placeholder}\n disabled={this.disabled || this.isLoading}\n required={this.required}\n readonly={this.readOnly}\n maxlength={this.maxlength}\n value={this.value !== undefined && this.value !== null ? this.value : ''}\n inputmode={this.maskPreset ? 'tel' : this.inputMode}\n ref={ref => (this.inputRef = ref)}\n autocomplete={this.autocomplete}\n />\n {!!this.clearIcon && !this.readOnly && !this.isLoading && !this.disabled && this.value && this.isFocused && (\n <cura-icon\n size={this.size === 'large' || this.mode === 'transparent' ? 20 : 16}\n color=\"primary-base\"\n name=\"closeCircle\"\n iconset=\"default\"\n class=\"clear-button\"\n onClick={() => this.handleClearInput()}\n />\n )}\n {this.isLoading && <cura-loader-circle size={this.size === 'large' ? 'medium' : 'small'} color=\"primary-base\"></cura-loader-circle>}\n </div>\n {this.renderHelperText()}\n </div>\n </div>\n </Host>\n );\n }\n}\n"]}
@@ -13,26 +13,67 @@ var __rest = (this && this.__rest) || function (s, e) {
13
13
  import iconNames from "../../../assets/icons/iconset-default-list";
14
14
  import { maskOptions } from "./mask-presets/input-mask-presets";
15
15
  const renderCuraInputText = (helperText, args) => {
16
- const block = `<cura-input-text ${args.mode && args.mode !== 'default' ? `
17
- mode="${args.mode}" ` : ''}${args.status && args.status !== 'default' ? `
18
- status="${args.status}" ` : ''}${args.size && args.size !== 'medium' ? `
19
- size="${args.size}" ` : ''}${args.type && args.type !== 'text' ? `
20
- type="${args.type}" ` : ''}${args.inputmode && args.inputmode !== 'text' ? `
21
- inputmode="${args.inputmode}" ` : ''}${args.maskPreset ? `
22
- mask-preset="${args.maskPreset}" ` : ''}${args.maskRegex ? `
23
- mask-regex="${args.maskRegex}" ` : ''}${args.maskAdvanced ? `
24
- mask-advanced=${JSON.stringify(args.maskAdvanced)} ` : ''}${args.placeholder ? `
25
- placeholder="${args.placeholder}" ` : ''}${args.value ? `
26
- value="${args.value}" ` : ''}${args.label ? `
27
- label="${args.label}"` : ''}${args.name ? `
28
- name="${args.name}"` : ''}${args.iconName ? `
29
- icon-name="${args.iconName}"` : ''}${args.clearIcon !== true ? `
30
- clear-icon="${args.clearIcon}"` : ''}${args.disabled ? `
31
- disabled="${args.disabled}"` : ''}${args.required ? `
32
- required="${args.required}"` : ''}${args.isLoading ? `
33
- is-loading="${args.isLoading}"` : ''}${args.maxlength ? `
34
- maxlength="${args.maxlength}"` : ''}${args.readOnly ? `
35
- read-only="${args.readOnly}"` : ''}>
16
+ const block = `<cura-input-text ${args.mode && args.mode !== 'default'
17
+ ? `
18
+ mode="${args.mode}" `
19
+ : ''}${args.status && args.status !== 'default'
20
+ ? `
21
+ status="${args.status}" `
22
+ : ''}${args.size && args.size !== 'medium'
23
+ ? `
24
+ size="${args.size}" `
25
+ : ''}${args.type && args.type !== 'text'
26
+ ? `
27
+ type="${args.type}" `
28
+ : ''}${args.inputmode && args.inputmode !== 'text'
29
+ ? `
30
+ inputmode="${args.inputmode}" `
31
+ : ''}${args.maskPreset
32
+ ? `
33
+ mask-preset="${args.maskPreset}" `
34
+ : ''}${args.maskRegex
35
+ ? `
36
+ mask-regex="${args.maskRegex}" `
37
+ : ''}${args.maskAdvanced
38
+ ? `
39
+ mask-advanced=${JSON.stringify(args.maskAdvanced)} `
40
+ : ''}${args.placeholder
41
+ ? `
42
+ placeholder="${args.placeholder}" `
43
+ : ''}${args.value
44
+ ? `
45
+ value="${args.value}" `
46
+ : ''}${args.label
47
+ ? `
48
+ label="${args.label}"`
49
+ : ''}${args.name
50
+ ? `
51
+ name="${args.name}"`
52
+ : ''}${args.iconName
53
+ ? `
54
+ icon-name="${args.iconName}"`
55
+ : ''}${args.clearIcon !== true
56
+ ? `
57
+ clear-icon="${args.clearIcon}"`
58
+ : ''}${args.disabled
59
+ ? `
60
+ disabled="${args.disabled}"`
61
+ : ''}${args.required
62
+ ? `
63
+ required="${args.required}"`
64
+ : ''}${args.isLoading
65
+ ? `
66
+ is-loading="${args.isLoading}"`
67
+ : ''}${args.maxlength
68
+ ? `
69
+ maxlength="${args.maxlength}"`
70
+ : ''}${args.readOnly
71
+ ? `
72
+ read-only="${args.readOnly}"`
73
+ : ''}${args.autocomplete
74
+ ? `
75
+ autocomplete="${args.autocomplete}" `
76
+ : ''}>
36
77
  ${helperText ? `${helperText}` : ''}
37
78
  </cura-input-text>
38
79
  `;
@@ -75,7 +116,7 @@ export default {
75
116
  },
76
117
  type: {
77
118
  control: { type: 'select' },
78
- options: ['text', 'number', 'password', "email", "tel", "url"],
119
+ options: ['text', 'number', 'password', 'email', 'tel', 'url'],
79
120
  description: 'Tipo do input.',
80
121
  table: {
81
122
  category: 'Properties',
@@ -216,6 +257,16 @@ export default {
216
257
  defaultValue: { summary: false },
217
258
  },
218
259
  },
260
+ autocomplete: {
261
+ control: { type: 'inline-radio' },
262
+ options: ['on', 'off'],
263
+ description: 'Se o input tem autocomplete.',
264
+ required: false,
265
+ table: {
266
+ category: 'Properties',
267
+ defaultValue: { summary: 'on' },
268
+ },
269
+ },
219
270
  },
220
271
  };
221
272
  export const InputText = {
@@ -240,6 +291,7 @@ export const InputText = {
240
291
  isLoading: false,
241
292
  readOnly: false,
242
293
  maxlength: null,
294
+ autocomplete: 'on',
243
295
  },
244
296
  };
245
297
  //# sourceMappingURL=cura-input-text.stories.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"cura-input-text.stories.js","sourceRoot":"","sources":["../../../../src/components/forms/cura-input-text/cura-input-text.stories.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,SAAS,MAAM,4CAA4C,C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,EAAE,+BAA+B;YAC5C,KAAK,EAAE;gBACL,QAAQ,EAAE,OAAO;gBACjB,YAAY,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE;aACjC;SACF;QACD,QAAQ,EAAE;YACR,OAAO,EAAE,SAAS;YAClB,WAAW,EAAE,+BAA+B;YAC5C,QAAQ,EAAE,OAAO;YACjB,QAAQ,EAAE,KAAK;YACf,KAAK,EAAE;gBACL,QAAQ,EAAE,OAAO;gBACjB,YAAY,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE;aACjC;SACF;QACD,SAAS,EAAE;YACT,OAAO,EAAE,SAAS;YAClB,WAAW,EAAE,4CAA4C;YACzD,KAAK,EAAE;gBACL,QAAQ,EAAE,OAAO;gBACjB,YAAY,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE;aACjC;SACF;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,IAAI,EAAE;QACJ,IAAI,EAAE,SAAS;QACf,MAAM,EAAE,SAAS;QACjB,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,YAAY;QAClB,SAAS,EAAE,MAAM;QACjB,KAAK,EAAE,YAAY;QACnB,WAAW,EAAE,aAAa;QAC1B,KAAK,EAAE,EAAE;QACT,QAAQ,EAAE,QAAQ;QAClB,SAAS,EAAE,IAAI;QACf,UAAU,EAAE,wBAAwB;QACpC,UAAU,EAAE,SAAS;QACrB,SAAS,EAAE,SAAS;QACpB,YAAY,EAAE,IAAI;QAClB,QAAQ,EAAE,KAAK;QACf,QAAQ,EAAE,KAAK;QACf,SAAS,EAAE,KAAK;QAChB,QAAQ,EAAE,KAAK;QACf,SAAS,EAAE,IAAI;KAChB;CACF,CAAC","sourcesContent":["import iconNames from '../../../assets/icons/iconset-default-list';\nimport { maskOptions } from './mask-presets/input-mask-presets';\n\nconst renderCuraInputText = (helperText: string, args: any) => {\n const block = `<cura-input-text ${args.mode && args.mode !== 'default' ? `\n mode=\"${args.mode}\" ` : ''}${args.status && args.status !== 'default' ? `\n status=\"${args.status}\" ` : ''}${args.size && args.size !== 'medium' ? `\n size=\"${args.size}\" ` : ''}${args.type && args.type !== 'text' ? `\n type=\"${args.type}\" ` : ''}${args.inputmode && args.inputmode !== 'text' ? `\n inputmode=\"${args.inputmode}\" ` : ''}${args.maskPreset ? `\n mask-preset=\"${args.maskPreset}\" ` : ''}${args.maskRegex ? `\n mask-regex=\"${args.maskRegex}\" ` : ''}${args.maskAdvanced ? `\n mask-advanced=${JSON.stringify(args.maskAdvanced)} ` : ''}${args.placeholder ? `\n placeholder=\"${args.placeholder}\" ` : ''}${args.value ? `\n value=\"${args.value}\" ` : ''}${args.label ? `\n label=\"${args.label}\"` : ''}${args.name ? `\n name=\"${args.name}\"` : ''}${args.iconName ? `\n icon-name=\"${args.iconName}\"` : ''}${args.clearIcon !== true ? `\n clear-icon=\"${args.clearIcon}\"` : ''}${args.disabled ? `\n disabled=\"${args.disabled}\"` : ''}${args.required ? `\n required=\"${args.required}\"` : ''}${args.isLoading ? `\n is-loading=\"${args.isLoading}\"` : ''}${args.maxlength ? `\n maxlength=\"${args.maxlength}\"` : '' }${args.readOnly ? `\n read-only=\"${args.readOnly}\"` : ''}>\n ${helperText ? `${helperText}` : '' }\n</cura-input-text>\n`;\n return `${block}`;\n};\n\nexport default {\n title: 'Componentes/Forms/InputText',\n tags: ['autodocs'],\n\n render: ({ helperText, ...args }) => {\n return renderCuraInputText(helperText, args);\n },\n argTypes: {\n mode: {\n control: { type: 'inline-radio' },\n options: ['default', 'transparent'],\n description: 'Modo de exibição do input.',\n table: {\n category: 'Properties',\n defaultValue: { summary: 'default' },\n },\n },\n status: {\n control: { type: 'inline-radio' },\n options: ['default', 'success', 'error'],\n description: 'Status do input.',\n table: {\n category: 'State',\n defaultValue: { summary: 'default' },\n },\n },\n size: {\n control: { type: 'inline-radio' },\n options: ['small', 'medium', 'large'],\n description: 'Tamanho do input.',\n table: {\n category: 'Properties',\n defaultValue: { summary: 'medium' },\n },\n },\n type: {\n control: { type: 'select' },\n options: ['text', 'number', 'password', \"email\", \"tel\", \"url\" ],\n description: 'Tipo do input.',\n table: {\n category: 'Properties',\n defaultValue: { summary: 'text' },\n },\n },\n inputmode: {\n control: { type: 'select' },\n options: ['none', 'text', 'decimal', 'numeric', 'tel', 'search', 'email', 'url'],\n description: 'Define o modo do input.',\n table: {\n category: 'Properties',\n defaultValue: { summary: 'text' },\n },\n },\n label: {\n control: 'text',\n description: 'Texto da label do input.',\n required: false,\n table: {\n category: 'Properties',\n },\n },\n name: {\n control: 'text',\n description: 'Propriedade name do input.',\n required: false,\n table: {\n category: 'Properties',\n },\n },\n placeholder: {\n control: 'text',\n description: 'Texto de placeholder do input.',\n required: false,\n table: {\n category: 'Properties',\n },\n },\n helperText: {\n control: 'text',\n description: 'Define o texto de ajuda do input, renderizado dentro do slot num elemento <cura-label>. Aceita tags HTML.',\n table: {\n category: 'Slots',\n },\n },\n value: {\n control: 'text',\n description: 'Valor do campo de input. Tipo string para type=text e number para type=number',\n table: {\n category: 'Properties',\n },\n },\n maskPreset: {\n control: { type: 'select' },\n options: ['', ...Object.keys(maskOptions)],\n description: 'Opção de máscara para formatação do input de texto',\n required: false,\n table: {\n category: 'Mask',\n },\n },\n maskRegex: {\n control: 'text',\n description: 'Expressão regular para máscara de input de texto. <br/> Ex.: <code>\"/^\\\\d+$/g\"</code> ou <code>/^[0-6]+$/</code>',\n required: false,\n table: {\n category: 'Mask',\n },\n },\n maskAdvanced: {\n control: { type: 'object' },\n description:\n 'Objeto para configuração da máscara de input de texto customizada seguindo a estrutura do IMask.Masked da lib <a href=\"https://imask.js.org/\">IMask.js</a>. <br/> Ex.:<code>{ \"mask\": \"000.000.000-00\", \"placeholderChar\": \"_\"}</code>',\n required: false,\n table: {\n category: 'Mask',\n defaultValue: { summary: JSON },\n },\n },\n required: {\n control: 'boolean',\n description: 'Se o input é obrigatório.',\n table: {\n category: 'Properties',\n defaultValue: { summary: false },\n },\n },\n maxlength: {\n control: 'number',\n description: 'Comprimento máximo do valor do input.',\n required: false,\n table: {\n category: 'Properties',\n defaultValue: { summary: null },\n },\n },\n clearIcon: {\n control: 'boolean',\n\n description: 'Ícone para limpar campo de input.',\n table: {\n category: 'Icons',\n defaultValue: { summary: true },\n },\n },\n iconName: {\n control: { type: 'select' },\n options: ['', ...iconNames],\n description: 'Nome do ícone de feedback. Usado no mode=\"default\"',\n required: false,\n table: {\n category: 'Icons',\n defaultValue: { summary: '' },\n },\n },\n disabled: {\n control: 'boolean',\n description: 'Se o input está desabilitado.',\n table: {\n category: 'State',\n defaultValue: { summary: false },\n },\n },\n readOnly: {\n control: 'boolean',\n description: 'Se o input é somente leitura.',\n category: 'State',\n required: false,\n table: {\n category: 'State',\n defaultValue: { summary: false },\n },\n },\n isLoading: {\n control: 'boolean',\n description: 'Se o input está em estado de carregamento.',\n table: {\n category: 'State',\n defaultValue: { summary: false },\n },\n },\n },\n};\n\nexport const InputText = {\n args: {\n mode: 'default',\n status: 'default',\n size: 'medium',\n type: 'text',\n name: 'cura-input',\n inputmode: 'text',\n label: 'Label text',\n placeholder: 'Placeholder',\n value: '',\n iconName: 'secure',\n clearIcon: true,\n helperText: 'Helper/Validation txt.',\n maskPreset: undefined,\n maskRegex: undefined,\n maskAdvanced: null,\n disabled: false,\n required: false,\n isLoading: false,\n readOnly: false,\n maxlength: null,\n },\n};\n"]}
1
+ {"version":3,"file":"cura-input-text.stories.js","sourceRoot":"","sources":["../../../../src/components/forms/cura-input-text/cura-input-text.stories.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,SAAS,MAAM,4CAA4C,CAAC;AACnE,OAAO,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAEhE,MAAM,mBAAmB,GAAG,CAAC,UAAkB,EAAE,IAAS,EAAE,EAAE;IAC5D,MAAM,KAAK,GAAG,oBACZ,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,KAAK,SAAS;QAClC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,EAAE,OAAO;YACjB,QAAQ,EAAE,KAAK;YACf,KAAK,EAAE;gBACL,QAAQ,EAAE,OAAO;gBACjB,YAAY,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE;aACjC;SACF;QACD,SAAS,EAAE;YACT,OAAO,EAAE,SAAS;YAClB,WAAW,EAAE,4CAA4C;YACzD,KAAK,EAAE;gBACL,QAAQ,EAAE,OAAO;gBACjB,YAAY,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE;aACjC;SACF;QACD,YAAY,EAAE;YACZ,OAAO,EAAE,EAAE,IAAI,EAAE,cAAc,EAAE;YACjC,OAAO,EAAE,CAAC,IAAI,EAAE,KAAK,CAAC;YACtB,WAAW,EAAE,8BAA8B;YAC3C,QAAQ,EAAE,KAAK;YACf,KAAK,EAAE;gBACL,QAAQ,EAAE,YAAY;gBACtB,YAAY,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;aAChC;SACF;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,IAAI,EAAE;QACJ,IAAI,EAAE,SAAS;QACf,MAAM,EAAE,SAAS;QACjB,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,YAAY;QAClB,SAAS,EAAE,MAAM;QACjB,KAAK,EAAE,YAAY;QACnB,WAAW,EAAE,aAAa;QAC1B,KAAK,EAAE,EAAE;QACT,QAAQ,EAAE,QAAQ;QAClB,SAAS,EAAE,IAAI;QACf,UAAU,EAAE,wBAAwB;QACpC,UAAU,EAAE,SAAS;QACrB,SAAS,EAAE,SAAS;QACpB,YAAY,EAAE,IAAI;QAClB,QAAQ,EAAE,KAAK;QACf,QAAQ,EAAE,KAAK;QACf,SAAS,EAAE,KAAK;QAChB,QAAQ,EAAE,KAAK;QACf,SAAS,EAAE,IAAI;QACf,YAAY,EAAE,IAAI;KACnB;CACF,CAAC","sourcesContent":["import iconNames from '../../../assets/icons/iconset-default-list';\nimport { maskOptions } from './mask-presets/input-mask-presets';\n\nconst renderCuraInputText = (helperText: string, args: any) => {\n const block = `<cura-input-text ${\n args.mode && args.mode !== 'default'\n ? `\n mode=\"${args.mode}\" `\n : ''\n }${\n args.status && args.status !== 'default'\n ? `\n status=\"${args.status}\" `\n : ''\n }${\n args.size && args.size !== 'medium'\n ? `\n size=\"${args.size}\" `\n : ''\n }${\n args.type && args.type !== 'text'\n ? `\n type=\"${args.type}\" `\n : ''\n }${\n args.inputmode && args.inputmode !== 'text'\n ? `\n inputmode=\"${args.inputmode}\" `\n : ''\n }${\n args.maskPreset\n ? `\n mask-preset=\"${args.maskPreset}\" `\n : ''\n }${\n args.maskRegex\n ? `\n mask-regex=\"${args.maskRegex}\" `\n : ''\n }${\n args.maskAdvanced\n ? `\n mask-advanced=${JSON.stringify(args.maskAdvanced)} `\n : ''\n }${\n args.placeholder\n ? `\n placeholder=\"${args.placeholder}\" `\n : ''\n }${\n args.value\n ? `\n value=\"${args.value}\" `\n : ''\n }${\n args.label\n ? `\n label=\"${args.label}\"`\n : ''\n }${\n args.name\n ? `\n name=\"${args.name}\"`\n : ''\n }${\n args.iconName\n ? `\n icon-name=\"${args.iconName}\"`\n : ''\n }${\n args.clearIcon !== true\n ? `\n clear-icon=\"${args.clearIcon}\"`\n : ''\n }${\n args.disabled\n ? `\n disabled=\"${args.disabled}\"`\n : ''\n }${\n args.required\n ? `\n required=\"${args.required}\"`\n : ''\n }${\n args.isLoading\n ? `\n is-loading=\"${args.isLoading}\"`\n : ''\n }${\n args.maxlength\n ? `\n maxlength=\"${args.maxlength}\"`\n : ''\n }${\n args.readOnly\n ? `\n read-only=\"${args.readOnly}\"`\n : ''\n }${\n args.autocomplete\n ? `\n autocomplete=\"${args.autocomplete}\" `\n : ''\n }>\n ${helperText ? `${helperText}` : ''}\n</cura-input-text>\n`;\n return `${block}`;\n};\n\nexport default {\n title: 'Componentes/Forms/InputText',\n tags: ['autodocs'],\n\n render: ({ helperText, ...args }) => {\n return renderCuraInputText(helperText, args);\n },\n argTypes: {\n mode: {\n control: { type: 'inline-radio' },\n options: ['default', 'transparent'],\n description: 'Modo de exibição do input.',\n table: {\n category: 'Properties',\n defaultValue: { summary: 'default' },\n },\n },\n status: {\n control: { type: 'inline-radio' },\n options: ['default', 'success', 'error'],\n description: 'Status do input.',\n table: {\n category: 'State',\n defaultValue: { summary: 'default' },\n },\n },\n size: {\n control: { type: 'inline-radio' },\n options: ['small', 'medium', 'large'],\n description: 'Tamanho do input.',\n table: {\n category: 'Properties',\n defaultValue: { summary: 'medium' },\n },\n },\n type: {\n control: { type: 'select' },\n options: ['text', 'number', 'password', 'email', 'tel', 'url'],\n description: 'Tipo do input.',\n table: {\n category: 'Properties',\n defaultValue: { summary: 'text' },\n },\n },\n inputmode: {\n control: { type: 'select' },\n options: ['none', 'text', 'decimal', 'numeric', 'tel', 'search', 'email', 'url'],\n description: 'Define o modo do input.',\n table: {\n category: 'Properties',\n defaultValue: { summary: 'text' },\n },\n },\n label: {\n control: 'text',\n description: 'Texto da label do input.',\n required: false,\n table: {\n category: 'Properties',\n },\n },\n name: {\n control: 'text',\n description: 'Propriedade name do input.',\n required: false,\n table: {\n category: 'Properties',\n },\n },\n placeholder: {\n control: 'text',\n description: 'Texto de placeholder do input.',\n required: false,\n table: {\n category: 'Properties',\n },\n },\n helperText: {\n control: 'text',\n description: 'Define o texto de ajuda do input, renderizado dentro do slot num elemento <cura-label>. Aceita tags HTML.',\n table: {\n category: 'Slots',\n },\n },\n value: {\n control: 'text',\n description: 'Valor do campo de input. Tipo string para type=text e number para type=number',\n table: {\n category: 'Properties',\n },\n },\n maskPreset: {\n control: { type: 'select' },\n options: ['', ...Object.keys(maskOptions)],\n description: 'Opção de máscara para formatação do input de texto',\n required: false,\n table: {\n category: 'Mask',\n },\n },\n maskRegex: {\n control: 'text',\n description: 'Expressão regular para máscara de input de texto. <br/> Ex.: <code>\"/^\\\\d+$/g\"</code> ou <code>/^[0-6]+$/</code>',\n required: false,\n table: {\n category: 'Mask',\n },\n },\n maskAdvanced: {\n control: { type: 'object' },\n description:\n 'Objeto para configuração da máscara de input de texto customizada seguindo a estrutura do IMask.Masked da lib <a href=\"https://imask.js.org/\">IMask.js</a>. <br/> Ex.:<code>{ \"mask\": \"000.000.000-00\", \"placeholderChar\": \"_\"}</code>',\n required: false,\n table: {\n category: 'Mask',\n defaultValue: { summary: JSON },\n },\n },\n required: {\n control: 'boolean',\n description: 'Se o input é obrigatório.',\n table: {\n category: 'Properties',\n defaultValue: { summary: false },\n },\n },\n maxlength: {\n control: 'number',\n description: 'Comprimento máximo do valor do input.',\n required: false,\n table: {\n category: 'Properties',\n defaultValue: { summary: null },\n },\n },\n clearIcon: {\n control: 'boolean',\n\n description: 'Ícone para limpar campo de input.',\n table: {\n category: 'Icons',\n defaultValue: { summary: true },\n },\n },\n iconName: {\n control: { type: 'select' },\n options: ['', ...iconNames],\n description: 'Nome do ícone de feedback. Usado no mode=\"default\"',\n required: false,\n table: {\n category: 'Icons',\n defaultValue: { summary: '' },\n },\n },\n disabled: {\n control: 'boolean',\n description: 'Se o input está desabilitado.',\n table: {\n category: 'State',\n defaultValue: { summary: false },\n },\n },\n readOnly: {\n control: 'boolean',\n description: 'Se o input é somente leitura.',\n category: 'State',\n required: false,\n table: {\n category: 'State',\n defaultValue: { summary: false },\n },\n },\n isLoading: {\n control: 'boolean',\n description: 'Se o input está em estado de carregamento.',\n table: {\n category: 'State',\n defaultValue: { summary: false },\n },\n },\n autocomplete: {\n control: { type: 'inline-radio' },\n options: ['on', 'off'],\n description: 'Se o input tem autocomplete.',\n required: false,\n table: {\n category: 'Properties',\n defaultValue: { summary: 'on' },\n },\n },\n },\n};\n\nexport const InputText = {\n args: {\n mode: 'default',\n status: 'default',\n size: 'medium',\n type: 'text',\n name: 'cura-input',\n inputmode: 'text',\n label: 'Label text',\n placeholder: 'Placeholder',\n value: '',\n iconName: 'secure',\n clearIcon: true,\n helperText: 'Helper/Validation txt.',\n maskPreset: undefined,\n maskRegex: undefined,\n maskAdvanced: null,\n disabled: false,\n required: false,\n isLoading: false,\n readOnly: false,\n maxlength: null,\n autocomplete: 'on',\n },\n};\n"]}
@@ -38,5 +38,8 @@ export const maskOptions = {
38
38
  date: {
39
39
  mask: '00/00/0000'
40
40
  },
41
+ dateRange: {
42
+ mask: '00/00/0000 - 00/00/0000'
43
+ },
41
44
  };
42
45
  //# sourceMappingURL=input-mask-presets.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"input-mask-presets.js","sourceRoot":"","sources":["../../../../../src/components/forms/cura-input-text/mask-presets/input-mask-presets.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,MAAM,WAAW,GAAmB;IACzC,QAAQ,EAAE;QACR,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,gBAAgB,EAAE,EAAE,EAAE,IAAI,EAAE,oBAAoB,EAAE,CAAC;QAClE,eAAe,EAAE,GAAG;KACrB;IACD,GAAG,EAAE;QACH,IAAI,EAAE,gBAAgB;QACtB,eAAe,EAAE,GAAG;KACrB;IACD,IAAI,EAAE;QACJ,IAAI,EAAE,oBAAoB;QAC1B,eAAe,EAAE,GAAG;KACrB;IAED,KAAK,EAAE;QACL,IAAI,EAAE,iBAAiB;QACvB,MAAM,EAAE;YACN,MAAM,EAAE;gBACN,IAAI,EAAE,MAAM;gBACZ,SAAS,EAAE,CAAC;gBACZ,eAAe,EAAE,EAAE;aACpB;YACD,OAAO,EAAE;gBACP,IAAI,EAAE,OAAO;gBACb,SAAS,EAAE,CAAC;gBACZ,eAAe,EAAE,GAAG;aACrB;YACD,GAAG,EAAE;gBACH,IAAI,EAAE,GAAG;aACV;YACD,MAAM,EAAE;gBACN,IAAI,EAAE,MAAM;gBACZ,SAAS,EAAE,CAAC;gBACZ,eAAe,EAAE,GAAG;aACrB;SACF;QACD,eAAe,EAAE,GAAG;KACrB;IACD,IAAI,EAAE;QACJ,IAAI,EAAE,YAAY;KACnB;CACF,CAAC","sourcesContent":["export type MaskOptionsMap = {\n [key: string]: any;\n};\n\nexport const maskOptions: MaskOptionsMap = {\n cpf_cnpj: {\n mask: [{ mask: '000.000.000-00' }, { mask: '00.000.000/0000-00' }],\n placeholderChar: '_',\n },\n cpf: {\n mask: '000.000.000-00',\n placeholderChar: '_',\n },\n cnpj: {\n mask: '00.000.000/0000-00',\n placeholderChar: '_',\n },\n\n phone: {\n mask: '(00) 00000-0000',\n blocks: {\n '(00)': {\n mask: '(00)',\n maxLength: 2,\n placeholderChar: '',\n },\n '00000': {\n mask: '00000',\n maxLength: 5,\n placeholderChar: '_',\n },\n '-': {\n mask: '-',\n },\n '0000': {\n mask: '0000',\n maxLength: 4,\n placeholderChar: '_',\n },\n },\n placeholderChar: '_',\n },\n date: {\n mask: '00/00/0000'\n },\n};\n"]}
1
+ {"version":3,"file":"input-mask-presets.js","sourceRoot":"","sources":["../../../../../src/components/forms/cura-input-text/mask-presets/input-mask-presets.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,MAAM,WAAW,GAAmB;IACzC,QAAQ,EAAE;QACR,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,gBAAgB,EAAE,EAAE,EAAE,IAAI,EAAE,oBAAoB,EAAE,CAAC;QAClE,eAAe,EAAE,GAAG;KACrB;IACD,GAAG,EAAE;QACH,IAAI,EAAE,gBAAgB;QACtB,eAAe,EAAE,GAAG;KACrB;IACD,IAAI,EAAE;QACJ,IAAI,EAAE,oBAAoB;QAC1B,eAAe,EAAE,GAAG;KACrB;IAED,KAAK,EAAE;QACL,IAAI,EAAE,iBAAiB;QACvB,MAAM,EAAE;YACN,MAAM,EAAE;gBACN,IAAI,EAAE,MAAM;gBACZ,SAAS,EAAE,CAAC;gBACZ,eAAe,EAAE,EAAE;aACpB;YACD,OAAO,EAAE;gBACP,IAAI,EAAE,OAAO;gBACb,SAAS,EAAE,CAAC;gBACZ,eAAe,EAAE,GAAG;aACrB;YACD,GAAG,EAAE;gBACH,IAAI,EAAE,GAAG;aACV;YACD,MAAM,EAAE;gBACN,IAAI,EAAE,MAAM;gBACZ,SAAS,EAAE,CAAC;gBACZ,eAAe,EAAE,GAAG;aACrB;SACF;QACD,eAAe,EAAE,GAAG;KACrB;IACD,IAAI,EAAE;QACJ,IAAI,EAAE,YAAY;KACnB;IACD,SAAS,EAAE;QACT,IAAI,EAAE,yBAAyB;KAChC;CACF,CAAC","sourcesContent":["export type MaskOptionsMap = {\n [key: string]: any;\n};\n\nexport const maskOptions: MaskOptionsMap = {\n cpf_cnpj: {\n mask: [{ mask: '000.000.000-00' }, { mask: '00.000.000/0000-00' }],\n placeholderChar: '_',\n },\n cpf: {\n mask: '000.000.000-00',\n placeholderChar: '_',\n },\n cnpj: {\n mask: '00.000.000/0000-00',\n placeholderChar: '_',\n },\n\n phone: {\n mask: '(00) 00000-0000',\n blocks: {\n '(00)': {\n mask: '(00)',\n maxLength: 2,\n placeholderChar: '',\n },\n '00000': {\n mask: '00000',\n maxLength: 5,\n placeholderChar: '_',\n },\n '-': {\n mask: '-',\n },\n '0000': {\n mask: '0000',\n maxLength: 4,\n placeholderChar: '_',\n },\n },\n placeholderChar: '_',\n },\n date: {\n mask: '00/00/0000'\n },\n dateRange: {\n mask: '00/00/0000 - 00/00/0000'\n },\n};\n"]}
@@ -46,7 +46,7 @@ export class CuraLabel {
46
46
  };
47
47
  }
48
48
  render() {
49
- return (h(Host, { key: '77ee1eeda9c4bef3c64a098df6420d8f1545e06f', style: this.hostCSSProperties() }, h("p", { key: '6ade3961e8b1fa6cf5d3ae2bd695774cdfa197a7', style: this.styles, class: this.getClasses() }, h("slot", { key: '1fe809e027a5137e747835198527bcfab8c73d86' }))));
49
+ return (h(Host, { key: '08a9753ada3d3d7e94f80256d375f9c40bd7eb52', style: this.hostCSSProperties() }, h("p", { key: 'abd0b048fa46c15038595459eb173dbebe54b3f8', style: this.styles, class: this.getClasses() }, h("slot", { key: '9f950127eaa32d0137be06592a9872861ec927a7' }))));
50
50
  }
51
51
  static get is() { return "cura-label"; }
52
52
  static get encapsulation() { return "shadow"; }
@@ -120,7 +120,7 @@ export class CuraRadio {
120
120
  return statusColors[this.status][type];
121
121
  }
122
122
  render() {
123
- return (h(Host, { key: '47a86162a780f9bfc554ab0f39e20e2f1e01a9d9' }, h("div", { key: 'a0f2860ed3ff500bfc100c1e546da8ced421b207', class: this.getClasses(), style: this.styles }, h("div", { key: '9191f64704f6c1d791922464a75e00afa0cdcb7e', class: "info" }, h("div", { key: 'c61a9ba353b49db897c27f6356bfe3d76651b186', class: "label-wrapper" }, h("cura-label", { key: 'aa942db786a175452697b17229dc05e9113e8097', class: "label", size: this.size === 'large' ? 'medium' : 'xsmall', color: this.assignColor('label') }, this.label), this.required && h("cura-paragraph", { key: 'aed6a56437cc00fb7050043ce0a89877770acc6c', lineHeight: '0%', marginBlock: '0', color: "error-base" }, "* ")), h("cura-label", { key: '4b489038012fcf112d89d5cdcce46e55b363eca0', color: this.assignColor('message'), size: "xsmall", class: "message" }, h("slot", { key: 'edff8c3ddc4875017dc7e9342fe3c9e19bdb86dc' }))), h("input", { key: '43d5c937fbaa9139abaa3c1c8b5534a39fa4017c', type: "radio", class: `radio ${this.size.toLocaleLowerCase()}`, name: this.name, value: this.value, required: this.required, tabIndex: this.ontabindex, disabled: this.disabled, checked: this.checked, onClick: this.handleClick }))));
123
+ return (h(Host, { key: '015424d6821feeef090b0e064cf35eb39100f918' }, h("div", { key: '85b54a48eb2c75dd98df83f7ac7557162b036300', class: this.getClasses(), style: this.styles }, h("div", { key: '84f0b0a8f5e2698fc5fcc6941b6a8b369629d6c0', class: "info" }, h("div", { key: '94194138a25b71c7a6cd1b8c191662ebcbd16b71', class: "label-wrapper" }, h("cura-label", { key: 'cd5af14f2c174bf6a2e2715f32c3f97ed42dd05e', class: "label", size: this.size === 'large' ? 'medium' : 'xsmall', color: this.assignColor('label') }, this.label), this.required && h("cura-paragraph", { key: '237bc98ab60ab07e917dcd99b1874bf6fd400ec6', lineHeight: '0%', marginBlock: '0', color: "error-base" }, "* ")), h("cura-label", { key: '88a3014b55f420ed7744090f1e54927f7f6ec767', color: this.assignColor('message'), size: "xsmall", class: "message" }, h("slot", { key: 'b505727b192c807344f328c73c44f88b72314cb3' }))), h("input", { key: '6f324f596f24328d0829e1013bf78545dda17e4b', type: "radio", class: `radio ${this.size.toLocaleLowerCase()}`, name: this.name, value: this.value, required: this.required, tabIndex: this.ontabindex, disabled: this.disabled, checked: this.checked, onClick: this.handleClick }))));
124
124
  }
125
125
  static get is() { return "cura-radio"; }
126
126
  static get encapsulation() { return "shadow"; }
@@ -59,6 +59,7 @@
59
59
  }
60
60
  .wrapper .cura-input-field input {
61
61
  padding: 0px 12px 0px 8px;
62
+ cursor: pointer;
62
63
  }
63
64
  .wrapper .cura-input-field.open {
64
65
  border-radius: 4px 4px 0 0 !important;
@@ -140,14 +141,17 @@
140
141
  .wrapper:hover:not(.disabled):not(.isLoading):not(.success):not(.error):not(.isFocused):not(.readOnly):not(.transparent) .cura-input-field input::placeholder {
141
142
  color: var(--neutral-dark);
142
143
  }
143
- .wrapper:focus-within .cura-input-field {
144
+ .wrapper:focus-within:not(.selection) .cura-input-field {
144
145
  border: 2px solid var(--info-base) !important;
145
146
  background-color: var(--neutral-purewhite);
146
147
  outline: none;
147
148
  }
148
- .wrapper:focus-within .cura-input-field input {
149
+ .wrapper:focus-within:not(.selection) .cura-input-field input {
149
150
  color: var(--neutral-black) !important;
150
151
  }
152
+ .wrapper:focus-within.selection .cura-input-field {
153
+ border-radius: 4px 4px 0px 0px;
154
+ }
151
155
  .wrapper.success .cura-input-field {
152
156
  width: 100%;
153
157
  height: 40px;
@@ -73,6 +73,7 @@ export class CuraSelect {
73
73
  this.status = 'default';
74
74
  this.disabled = false;
75
75
  this.required = false;
76
+ this.searchBehavior = false;
76
77
  this.isHovered = false;
77
78
  this.isFocused = false;
78
79
  this.isOpen = false;
@@ -87,7 +88,7 @@ export class CuraSelect {
87
88
  * Filters the options based on the current input value.
88
89
  */
89
90
  filterOptions(newText) {
90
- if (!this.isOpen) {
91
+ if (!this.isOpen || !this.searchBehavior) {
91
92
  return;
92
93
  }
93
94
  this.options.forEach(option => {
@@ -264,13 +265,13 @@ export class CuraSelect {
264
265
  return (h("cura-icon", { class: 'feedback-icon', name: icon, iconset: 'default', size: this.size === 'large' ? 20 : 16, color: this.getColor('icon'), style: this.styles }));
265
266
  }
266
267
  render() {
267
- return (h(Host, { key: 'bc202c6de926da5642421b91b1f38abfda496c83', style: this.styles }, h("div", { key: 'e80bc20071f9ba3c2e385d5c87c1ef6ffd5d9bd9', class: this.getClasses(), onMouseEnter: () => (this.isHovered = true), onMouseLeave: () => (this.isHovered = false), onClick: this.handleClick }, this.label && (h("cura-label", { key: 'e090559a5ed7d0c6cdb9603e6b715dbfa54d383e', class: 'label', weight: 'bold', size: this.size === 'large' ? 'small' : 'xsmall', color: this.getColor('label') }, this.label, " ", this.required && h("span", { key: 'da3b3a38328a81b4c7d43cedf392f6a35ca5cad5', class: 'required' }, "* "))), h("div", { key: '48e6d57d80b140d8dd51dd079c0ce7f39d7a9a96', class: {
268
+ return (h(Host, { key: '69d335e3f52f520b2067033a3bd3cf5e854bb53e', style: this.styles }, h("div", { key: 'c058baef8309f53fbe15244f48e5233211c6b834', class: this.getClasses(), onMouseEnter: () => (this.isHovered = true), onMouseLeave: () => (this.isHovered = false), onClick: this.handleClick }, this.label && (h("cura-label", { key: '3dd4ae204d4d497c167a98bb978c268333c46d73', class: 'label', weight: 'bold', size: this.size === 'large' ? 'small' : 'xsmall', color: this.getColor('label') }, this.label, " ", this.required && h("span", { key: '7aaeb56f48d4e5e3677218783bf67f27273b0cd9', class: 'required' }, "* "))), h("div", { key: 'b17d285023de7b91db356283fa7ed2d4ca47329c', class: {
268
269
  'cura-input-field': true,
269
270
  'open': this.isOpen
270
- } }, this.renderIcon(), h("input", { key: 'd9c1fc1d7cd068aa4f52f002924f7caaa11c099b', type: "text", autocomplete: 'off', onFocus: () => (this.isFocused = true), onBlur: () => (this.isFocused = false), onKeyDown: this.handleKeyNavigation, "aria-required": String(this.required), "aria-disabled": String(this.disabled), "aria-invalid": String(this.status === 'error'), onInput: this.handleInputChange, style: this.styles, placeholder: this.placeholder, disabled: this.disabled, required: this.required, value: this.textInput }), h("cura-icon", { key: '3099bd0ffc0f758e39815db70f7c79c55d97190e', name: this.isOpen ? 'up' : 'down', class: "up-down-icon", color: this.disabled ? 'neutral-dark' : 'primary-base', size: 16, iconset: 'default' })), h("cura-label", { key: 'e82da158d25d0cad7102d5ed13698f0f741cd6ea', class: "helper-text", size: 'xsmall', color: this.getColor('text'), weight: this.mode === 'transparent' ? 'bold' : 'regular' }, h("slot", { key: '71ab712009bc6a61f189da5a082330eed9e89d33' })), this.isOpen && (h("div", { key: '4a6f38f3798ea894936554c0b4191b45dc5172eb', class: {
271
+ } }, this.renderIcon(), h("input", { key: '9328823501e2a439efc2e73e01a018496c98346a', type: "text", autocomplete: 'off', onFocus: () => (this.isFocused = true), onBlur: () => (this.isFocused = false), onKeyDown: this.handleKeyNavigation, "aria-required": String(this.required), "aria-disabled": String(this.disabled), "aria-invalid": String(this.status === 'error'), onInput: this.handleInputChange, style: this.styles, placeholder: this.placeholder, disabled: this.disabled, required: this.required, value: this.textInput, readonly: this.searchBehavior ? null : true }), h("cura-icon", { key: 'aa8b5271161e8bdbe6ab7234460f4208a030c18b', name: this.isOpen ? 'up' : 'down', class: "up-down-icon", color: this.disabled ? 'neutral-dark' : 'primary-base', size: 16, iconset: 'default' })), h("cura-label", { key: 'c4ddeead44a36fd2d072d33d9b97cc5367af66bc', class: "helper-text", size: 'xsmall', color: this.getColor('text'), weight: this.mode === 'transparent' ? 'bold' : 'regular' }, h("slot", { key: 'a9fd3b810963a65a7ab1733f21864a18e7838bf1' })), this.isOpen && (h("div", { key: '8a9301c541bf7e72ee2e26c6ea48636982a52147', class: {
271
272
  'menu': true,
272
273
  'open': this.isOpen
273
- } }, h("slot", { key: '8db3420024df6aa85f0e8265c6f88c9bb4a8811f', name: 'option' }))))));
274
+ } }, h("slot", { key: '1ea4f761f96bd85021eefbf50280403ae4064317', name: 'option' }))))));
274
275
  }
275
276
  static get is() { return "cura-select"; }
276
277
  static get encapsulation() { return "shadow"; }
@@ -430,6 +431,24 @@ export class CuraSelect {
430
431
  "attribute": "required",
431
432
  "reflect": true,
432
433
  "defaultValue": "false"
434
+ },
435
+ "searchBehavior": {
436
+ "type": "boolean",
437
+ "mutable": false,
438
+ "complexType": {
439
+ "original": "boolean",
440
+ "resolved": "boolean",
441
+ "references": {}
442
+ },
443
+ "required": false,
444
+ "optional": false,
445
+ "docs": {
446
+ "tags": [],
447
+ "text": "Enable / Disable search at options by term.\nDefault: false"
448
+ },
449
+ "attribute": "search-behavior",
450
+ "reflect": true,
451
+ "defaultValue": "false"
433
452
  }
434
453
  };
435
454
  }