@tecsinapse/react-core 1.17.4 → 1.20.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 (755) hide show
  1. package/CHANGELOG.md +42 -0
  2. package/babel.config.esm.js +34 -0
  3. package/dist/components/atoms/Avatar/Avatar.js +12 -8
  4. package/dist/components/atoms/Avatar/Avatar.js.map +1 -1
  5. package/dist/components/atoms/Avatar/helpers.js +3 -1
  6. package/dist/components/atoms/Avatar/helpers.js.map +1 -1
  7. package/dist/components/atoms/Avatar/index.d.ts +2 -1
  8. package/dist/components/atoms/Avatar/index.js +11 -9
  9. package/dist/components/atoms/Avatar/index.js.map +1 -1
  10. package/dist/components/atoms/Avatar/styled.js +38 -39
  11. package/dist/components/atoms/Avatar/styled.js.map +1 -1
  12. package/dist/components/atoms/Badge/Badge.js +11 -8
  13. package/dist/components/atoms/Badge/Badge.js.map +1 -1
  14. package/dist/components/atoms/Badge/index.d.ts +2 -1
  15. package/dist/components/atoms/Badge/index.js +11 -9
  16. package/dist/components/atoms/Badge/index.js.map +1 -1
  17. package/dist/components/atoms/Badge/styled.js +15 -24
  18. package/dist/components/atoms/Badge/styled.js.map +1 -1
  19. package/dist/components/atoms/BoxContent/BoxContent.js +8 -5
  20. package/dist/components/atoms/BoxContent/BoxContent.js.map +1 -1
  21. package/dist/components/atoms/BoxContent/index.d.ts +2 -1
  22. package/dist/components/atoms/BoxContent/index.js +11 -9
  23. package/dist/components/atoms/BoxContent/index.js.map +1 -1
  24. package/dist/components/atoms/BoxContent/styled.js +63 -58
  25. package/dist/components/atoms/BoxContent/styled.js.map +1 -1
  26. package/dist/components/atoms/Button/Button.js +21 -18
  27. package/dist/components/atoms/Button/Button.js.map +1 -1
  28. package/dist/components/atoms/Button/States/BaseState.js +11 -8
  29. package/dist/components/atoms/Button/States/BaseState.js.map +1 -1
  30. package/dist/components/atoms/Button/States/Error.js +4 -2
  31. package/dist/components/atoms/Button/States/Error.js.map +1 -1
  32. package/dist/components/atoms/Button/States/Loading.js +10 -7
  33. package/dist/components/atoms/Button/States/Loading.js.map +1 -1
  34. package/dist/components/atoms/Button/States/Success.js +4 -2
  35. package/dist/components/atoms/Button/States/Success.js.map +1 -1
  36. package/dist/components/atoms/Button/States/index.js +21 -8
  37. package/dist/components/atoms/Button/States/index.js.map +1 -1
  38. package/dist/components/atoms/Button/States/styled.js +32 -20
  39. package/dist/components/atoms/Button/States/styled.js.map +1 -1
  40. package/dist/components/atoms/Button/index.d.ts +2 -1
  41. package/dist/components/atoms/Button/index.js +29 -16
  42. package/dist/components/atoms/Button/index.js.map +1 -1
  43. package/dist/components/atoms/Button/styled.js +33 -36
  44. package/dist/components/atoms/Button/styled.js.map +1 -1
  45. package/dist/components/atoms/Card/Card.js +12 -8
  46. package/dist/components/atoms/Card/Card.js.map +1 -1
  47. package/dist/components/atoms/Card/Footer/Footer.js +12 -7
  48. package/dist/components/atoms/Card/Footer/Footer.js.map +1 -1
  49. package/dist/components/atoms/Card/Footer/index.d.ts +2 -1
  50. package/dist/components/atoms/Card/Footer/index.js +11 -9
  51. package/dist/components/atoms/Card/Footer/index.js.map +1 -1
  52. package/dist/components/atoms/Card/Header/Header.js +12 -7
  53. package/dist/components/atoms/Card/Header/Header.js.map +1 -1
  54. package/dist/components/atoms/Card/Header/index.d.ts +2 -1
  55. package/dist/components/atoms/Card/Header/index.js +11 -9
  56. package/dist/components/atoms/Card/Header/index.js.map +1 -1
  57. package/dist/components/atoms/Card/index.d.ts +2 -1
  58. package/dist/components/atoms/Card/index.js +11 -9
  59. package/dist/components/atoms/Card/index.js.map +1 -1
  60. package/dist/components/atoms/Card/styled.js +8 -5
  61. package/dist/components/atoms/Card/styled.js.map +1 -1
  62. package/dist/components/atoms/Checkbox/Checkbox.js +17 -13
  63. package/dist/components/atoms/Checkbox/Checkbox.js.map +1 -1
  64. package/dist/components/atoms/Checkbox/index.d.ts +2 -1
  65. package/dist/components/atoms/Checkbox/index.js +11 -9
  66. package/dist/components/atoms/Checkbox/index.js.map +1 -1
  67. package/dist/components/atoms/Checkbox/styled.js +63 -45
  68. package/dist/components/atoms/Checkbox/styled.js.map +1 -1
  69. package/dist/components/atoms/Divider/Divider.js +8 -5
  70. package/dist/components/atoms/Divider/Divider.js.map +1 -1
  71. package/dist/components/atoms/Divider/index.d.ts +2 -1
  72. package/dist/components/atoms/Divider/index.js +11 -9
  73. package/dist/components/atoms/Divider/index.js.map +1 -1
  74. package/dist/components/atoms/Divider/styled.js +33 -26
  75. package/dist/components/atoms/Divider/styled.js.map +1 -1
  76. package/dist/components/atoms/GroupButton/GroupButton.d.ts +1 -1
  77. package/dist/components/atoms/GroupButton/GroupButton.js +25 -21
  78. package/dist/components/atoms/GroupButton/GroupButton.js.map +1 -1
  79. package/dist/components/atoms/GroupButton/GroupButtonOption.js +9 -6
  80. package/dist/components/atoms/GroupButton/GroupButtonOption.js.map +1 -1
  81. package/dist/components/atoms/GroupButton/index.d.ts +4 -2
  82. package/dist/components/atoms/GroupButton/index.js +18 -14
  83. package/dist/components/atoms/GroupButton/index.js.map +1 -1
  84. package/dist/components/atoms/GroupButton/styled.js +98 -101
  85. package/dist/components/atoms/GroupButton/styled.js.map +1 -1
  86. package/dist/components/atoms/Icon/Icon.js +16 -13
  87. package/dist/components/atoms/Icon/Icon.js.map +1 -1
  88. package/dist/components/atoms/Icon/helpers.js +14 -8
  89. package/dist/components/atoms/Icon/helpers.js.map +1 -1
  90. package/dist/components/atoms/Icon/index.d.ts +2 -1
  91. package/dist/components/atoms/Icon/index.js +11 -9
  92. package/dist/components/atoms/Icon/index.js.map +1 -1
  93. package/dist/components/atoms/Input/Hint.js +9 -6
  94. package/dist/components/atoms/Input/Hint.js.map +1 -1
  95. package/dist/components/atoms/Input/InputContainer/InputContainer.d.ts +1 -1
  96. package/dist/components/atoms/Input/InputContainer/InputContainer.js +23 -20
  97. package/dist/components/atoms/Input/InputContainer/InputContainer.js.map +1 -1
  98. package/dist/components/atoms/Input/InputElement/InputElement.d.ts +3 -4
  99. package/dist/components/atoms/Input/InputElement/InputElement.js +14 -11
  100. package/dist/components/atoms/Input/InputElement/InputElement.js.map +1 -1
  101. package/dist/components/atoms/Input/InputMaskElement/InputMaskElement.d.ts +3 -4
  102. package/dist/components/atoms/Input/InputMaskElement/InputMaskElement.js +18 -15
  103. package/dist/components/atoms/Input/InputMaskElement/InputMaskElement.js.map +1 -1
  104. package/dist/components/atoms/Input/PressableInputContainer/PressableInputContainer.js +12 -9
  105. package/dist/components/atoms/Input/PressableInputContainer/PressableInputContainer.js.map +1 -1
  106. package/dist/components/atoms/Input/PressableInputContainer/index.d.ts +2 -1
  107. package/dist/components/atoms/Input/PressableInputContainer/index.js +11 -9
  108. package/dist/components/atoms/Input/PressableInputContainer/index.js.map +1 -1
  109. package/dist/components/atoms/Input/PressableInputContainer/styled.js +9 -4
  110. package/dist/components/atoms/Input/PressableInputContainer/styled.js.map +1 -1
  111. package/dist/components/atoms/Input/hooks/useInputFocus.js +5 -2
  112. package/dist/components/atoms/Input/hooks/useInputFocus.js.map +1 -1
  113. package/dist/components/atoms/Input/hooks/useNumberMask.js +7 -4
  114. package/dist/components/atoms/Input/hooks/useNumberMask.js.map +1 -1
  115. package/dist/components/atoms/Input/hooks/useStringMask.js +11 -6
  116. package/dist/components/atoms/Input/hooks/useStringMask.js.map +1 -1
  117. package/dist/components/atoms/Input/index.d.ts +8 -4
  118. package/dist/components/atoms/Input/index.js +66 -35
  119. package/dist/components/atoms/Input/index.js.map +1 -1
  120. package/dist/components/atoms/Input/styled.js +120 -107
  121. package/dist/components/atoms/Input/styled.js.map +1 -1
  122. package/dist/components/atoms/Paper/Paper.js +14 -9
  123. package/dist/components/atoms/Paper/Paper.js.map +1 -1
  124. package/dist/components/atoms/Paper/index.d.ts +2 -1
  125. package/dist/components/atoms/Paper/index.js +11 -9
  126. package/dist/components/atoms/Paper/index.js.map +1 -1
  127. package/dist/components/atoms/Paper/styled.js +8 -5
  128. package/dist/components/atoms/Paper/styled.js.map +1 -1
  129. package/dist/components/atoms/PressableSurface/PressableSurface.js +28 -19
  130. package/dist/components/atoms/PressableSurface/PressableSurface.js.map +1 -1
  131. package/dist/components/atoms/PressableSurface/index.d.ts +2 -1
  132. package/dist/components/atoms/PressableSurface/index.js +11 -9
  133. package/dist/components/atoms/PressableSurface/index.js.map +1 -1
  134. package/dist/components/atoms/ProgressBar/ProgressBar.d.ts +1 -1
  135. package/dist/components/atoms/ProgressBar/ProgressBar.js +20 -15
  136. package/dist/components/atoms/ProgressBar/ProgressBar.js.map +1 -1
  137. package/dist/components/atoms/ProgressBar/index.d.ts +2 -1
  138. package/dist/components/atoms/ProgressBar/index.js +11 -9
  139. package/dist/components/atoms/ProgressBar/index.js.map +1 -1
  140. package/dist/components/atoms/ProgressBar/styled.js +39 -30
  141. package/dist/components/atoms/ProgressBar/styled.js.map +1 -1
  142. package/dist/components/atoms/RadioButton/RadioButton.js +17 -13
  143. package/dist/components/atoms/RadioButton/RadioButton.js.map +1 -1
  144. package/dist/components/atoms/RadioButton/index.d.ts +2 -1
  145. package/dist/components/atoms/RadioButton/index.js +11 -9
  146. package/dist/components/atoms/RadioButton/index.js.map +1 -1
  147. package/dist/components/atoms/RadioButton/styled.js +39 -30
  148. package/dist/components/atoms/RadioButton/styled.js.map +1 -1
  149. package/dist/components/atoms/Switch/Switch.d.ts +1 -1
  150. package/dist/components/atoms/Switch/Switch.js +17 -14
  151. package/dist/components/atoms/Switch/Switch.js.map +1 -1
  152. package/dist/components/atoms/Switch/animation.js +3 -1
  153. package/dist/components/atoms/Switch/animation.js.map +1 -1
  154. package/dist/components/atoms/Switch/index.d.ts +2 -1
  155. package/dist/components/atoms/Switch/index.js +11 -9
  156. package/dist/components/atoms/Switch/index.js.map +1 -1
  157. package/dist/components/atoms/Switch/styled.d.ts +2 -14
  158. package/dist/components/atoms/Switch/styled.js +30 -23
  159. package/dist/components/atoms/Switch/styled.js.map +1 -1
  160. package/dist/components/atoms/Tag/Tag.js +15 -12
  161. package/dist/components/atoms/Tag/Tag.js.map +1 -1
  162. package/dist/components/atoms/Tag/index.d.ts +2 -1
  163. package/dist/components/atoms/Tag/index.js +11 -9
  164. package/dist/components/atoms/Tag/index.js.map +1 -1
  165. package/dist/components/atoms/Tag/styled.js +48 -44
  166. package/dist/components/atoms/Tag/styled.js.map +1 -1
  167. package/dist/components/atoms/Text/Text.js +20 -17
  168. package/dist/components/atoms/Text/Text.js.map +1 -1
  169. package/dist/components/atoms/Text/functions.js +3 -1
  170. package/dist/components/atoms/Text/functions.js.map +1 -1
  171. package/dist/components/atoms/Text/index.d.ts +2 -1
  172. package/dist/components/atoms/Text/index.js +11 -9
  173. package/dist/components/atoms/Text/index.js.map +1 -1
  174. package/dist/components/atoms/Text/styled.js +52 -34
  175. package/dist/components/atoms/Text/styled.js.map +1 -1
  176. package/dist/components/atoms/shared/PaperAndCard.js +29 -20
  177. package/dist/components/atoms/shared/PaperAndCard.js.map +1 -1
  178. package/dist/components/molecules/Calendar/Calendar.js +20 -16
  179. package/dist/components/molecules/Calendar/Calendar.js.map +1 -1
  180. package/dist/components/molecules/Calendar/components/MonthWeek.js +16 -12
  181. package/dist/components/molecules/Calendar/components/MonthWeek.js.map +1 -1
  182. package/dist/components/molecules/Calendar/components/Weekdays.js +9 -6
  183. package/dist/components/molecules/Calendar/components/Weekdays.js.map +1 -1
  184. package/dist/components/molecules/Calendar/components/index.js +15 -6
  185. package/dist/components/molecules/Calendar/components/index.js.map +1 -1
  186. package/dist/components/molecules/Calendar/index.d.ts +2 -1
  187. package/dist/components/molecules/Calendar/index.js +11 -12
  188. package/dist/components/molecules/Calendar/index.js.map +1 -1
  189. package/dist/components/molecules/Calendar/styled.js +59 -71
  190. package/dist/components/molecules/Calendar/styled.js.map +1 -1
  191. package/dist/components/molecules/DatePicker/DatePicker.js +35 -32
  192. package/dist/components/molecules/DatePicker/DatePicker.js.map +1 -1
  193. package/dist/components/molecules/DatePicker/index.d.ts +2 -1
  194. package/dist/components/molecules/DatePicker/index.js +11 -9
  195. package/dist/components/molecules/DatePicker/index.js.map +1 -1
  196. package/dist/components/molecules/DatePicker/styled.js +20 -14
  197. package/dist/components/molecules/DatePicker/styled.js.map +1 -1
  198. package/dist/components/molecules/DateTimePicker/DateTimePicker.js +44 -41
  199. package/dist/components/molecules/DateTimePicker/DateTimePicker.js.map +1 -1
  200. package/dist/components/molecules/DateTimePicker/index.d.ts +2 -1
  201. package/dist/components/molecules/DateTimePicker/index.js +11 -9
  202. package/dist/components/molecules/DateTimePicker/index.js.map +1 -1
  203. package/dist/components/molecules/DateTimePicker/styled.js +13 -6
  204. package/dist/components/molecules/DateTimePicker/styled.js.map +1 -1
  205. package/dist/components/molecules/DateTimeSelector/DateTimeSelector.js +28 -25
  206. package/dist/components/molecules/DateTimeSelector/DateTimeSelector.js.map +1 -1
  207. package/dist/components/molecules/DateTimeSelector/Selector.js +18 -14
  208. package/dist/components/molecules/DateTimeSelector/Selector.js.map +1 -1
  209. package/dist/components/molecules/DateTimeSelector/index.d.ts +2 -1
  210. package/dist/components/molecules/DateTimeSelector/index.js +11 -10
  211. package/dist/components/molecules/DateTimeSelector/index.js.map +1 -1
  212. package/dist/components/molecules/DateTimeSelector/styled.js +89 -69
  213. package/dist/components/molecules/DateTimeSelector/styled.js.map +1 -1
  214. package/dist/components/molecules/Grid/functions.d.ts +3 -0
  215. package/dist/components/molecules/Grid/functions.js +25 -0
  216. package/dist/components/molecules/Grid/functions.js.map +1 -0
  217. package/dist/components/molecules/Grid/index.d.ts +42 -2
  218. package/dist/components/molecules/Grid/index.js +16 -15
  219. package/dist/components/molecules/Grid/index.js.map +1 -1
  220. package/dist/components/molecules/HintInputContainer/HintInputContainer.js +20 -16
  221. package/dist/components/molecules/HintInputContainer/HintInputContainer.js.map +1 -1
  222. package/dist/components/molecules/HintInputContainer/index.js +9 -4
  223. package/dist/components/molecules/HintInputContainer/index.js.map +1 -1
  224. package/dist/components/molecules/HintInputContainer/styled.js.map +1 -1
  225. package/dist/components/molecules/IconTextButton/IconComponent.d.ts +9 -0
  226. package/dist/components/molecules/IconTextButton/IconComponent.js +33 -0
  227. package/dist/components/molecules/IconTextButton/IconComponent.js.map +1 -0
  228. package/dist/components/molecules/IconTextButton/IconTextButton.d.ts +8 -0
  229. package/dist/components/molecules/IconTextButton/IconTextButton.js +6 -0
  230. package/dist/components/molecules/IconTextButton/IconTextButton.js.map +1 -0
  231. package/dist/components/molecules/IconTextButton/index.d.ts +2 -0
  232. package/dist/components/molecules/IconTextButton/index.js +16 -0
  233. package/dist/components/molecules/IconTextButton/index.js.map +1 -0
  234. package/dist/components/molecules/IconTextButton/styled.d.ts +4 -0
  235. package/dist/components/molecules/IconTextButton/styled.js +29 -0
  236. package/dist/components/molecules/IconTextButton/styled.js.map +1 -0
  237. package/dist/components/molecules/InputPassword/InputPasswordIcon.js +10 -7
  238. package/dist/components/molecules/InputPassword/InputPasswordIcon.js.map +1 -1
  239. package/dist/components/molecules/InputPassword/index.js +9 -4
  240. package/dist/components/molecules/InputPassword/index.js.map +1 -1
  241. package/dist/components/molecules/InputPassword/styled.js +13 -6
  242. package/dist/components/molecules/InputPassword/styled.js.map +1 -1
  243. package/dist/components/molecules/LabeledSwitch/LabeledSwitch.d.ts +7 -0
  244. package/dist/components/molecules/LabeledSwitch/LabeledSwitch.js +6 -0
  245. package/dist/components/molecules/LabeledSwitch/LabeledSwitch.js.map +1 -0
  246. package/dist/components/molecules/LabeledSwitch/index.d.ts +1 -0
  247. package/dist/components/molecules/LabeledSwitch/index.js +6 -0
  248. package/dist/components/molecules/LabeledSwitch/index.js.map +1 -0
  249. package/dist/components/molecules/Snackbar/Snackbar.js +26 -22
  250. package/dist/components/molecules/Snackbar/Snackbar.js.map +1 -1
  251. package/dist/components/molecules/Snackbar/index.d.ts +2 -1
  252. package/dist/components/molecules/Snackbar/index.js +11 -9
  253. package/dist/components/molecules/Snackbar/index.js.map +1 -1
  254. package/dist/components/molecules/Snackbar/styled.js +53 -77
  255. package/dist/components/molecules/Snackbar/styled.js.map +1 -1
  256. package/dist/components/molecules/TextArea/TextArea.d.ts +1 -1
  257. package/dist/components/molecules/TextArea/TextArea.js +29 -26
  258. package/dist/components/molecules/TextArea/TextArea.js.map +1 -1
  259. package/dist/components/molecules/TextArea/index.d.ts +2 -1
  260. package/dist/components/molecules/TextArea/index.js +17 -11
  261. package/dist/components/molecules/TextArea/index.js.map +1 -1
  262. package/dist/components/molecules/TextArea/styled.d.ts +2 -14
  263. package/dist/components/molecules/TextArea/styled.js +15 -13
  264. package/dist/components/molecules/TextArea/styled.js.map +1 -1
  265. package/dist/hooks/index.js +15 -6
  266. package/dist/hooks/index.js.map +1 -1
  267. package/dist/hooks/useDebouncedState.js +5 -2
  268. package/dist/hooks/useDebouncedState.js.map +1 -1
  269. package/dist/hooks/useTheme.js +3 -1
  270. package/dist/hooks/useTheme.js.map +1 -1
  271. package/dist/index.d.ts +58 -28
  272. package/dist/index.js +319 -175
  273. package/dist/index.js.map +1 -1
  274. package/dist/styles/ThemeProvider.js +8 -5
  275. package/dist/styles/ThemeProvider.js.map +1 -1
  276. package/dist/styles/definitions.d.ts +2 -1
  277. package/dist/styles/definitions.js +13 -4
  278. package/dist/styles/definitions.js.map +1 -1
  279. package/dist/styles/light.js +5 -2
  280. package/dist/styles/light.js.map +1 -1
  281. package/dist/types/defaults.d.ts +8 -2
  282. package/dist/types/defaults.js +3 -1
  283. package/dist/types/defaults.js.map +1 -1
  284. package/dist/utils/IPhoneXHelper.js +6 -4
  285. package/dist/utils/IPhoneXHelper.js.map +1 -1
  286. package/dist/utils/ResponsiveFontSize.js +12 -9
  287. package/dist/utils/ResponsiveFontSize.js.map +1 -1
  288. package/dist/utils/extractNumbersFromString.js +4 -2
  289. package/dist/utils/extractNumbersFromString.js.map +1 -1
  290. package/dist/utils/formatWithMask.js +3 -1
  291. package/dist/utils/formatWithMask.js.map +1 -1
  292. package/dist/utils/index.d.ts +5 -4
  293. package/dist/utils/index.js +71 -23
  294. package/dist/utils/index.js.map +1 -1
  295. package/dist/utils/lightenDarkenColor.js +3 -1
  296. package/dist/utils/lightenDarkenColor.js.map +1 -1
  297. package/dist/utils/masks.js +5 -3
  298. package/dist/utils/masks.js.map +1 -1
  299. package/dist/utils/variantComplement.d.ts +6 -0
  300. package/dist/utils/variantComplement.js +37 -0
  301. package/dist/utils/variantComplement.js.map +1 -0
  302. package/esm/components/atoms/Avatar/Avatar.d.ts +14 -0
  303. package/esm/components/atoms/Avatar/Avatar.js +50 -0
  304. package/esm/components/atoms/Avatar/Avatar.js.map +1 -0
  305. package/esm/components/atoms/Avatar/helpers.d.ts +1 -0
  306. package/esm/components/atoms/Avatar/helpers.js +12 -0
  307. package/esm/components/atoms/Avatar/helpers.js.map +1 -0
  308. package/esm/components/atoms/Avatar/index.d.ts +2 -0
  309. package/esm/components/atoms/Avatar/index.js +2 -0
  310. package/esm/components/atoms/Avatar/index.js.map +1 -0
  311. package/esm/components/atoms/Avatar/styled.d.ts +28 -0
  312. package/esm/components/atoms/Avatar/styled.js +33 -0
  313. package/esm/components/atoms/Avatar/styled.js.map +1 -0
  314. package/esm/components/atoms/Badge/Badge.d.ts +11 -0
  315. package/esm/components/atoms/Badge/Badge.js +20 -0
  316. package/esm/components/atoms/Badge/Badge.js.map +1 -0
  317. package/esm/components/atoms/Badge/index.d.ts +2 -0
  318. package/esm/components/atoms/Badge/index.js +2 -0
  319. package/esm/components/atoms/Badge/index.js.map +1 -0
  320. package/esm/components/atoms/Badge/styled.d.ts +15 -0
  321. package/esm/components/atoms/Badge/styled.js +20 -0
  322. package/esm/components/atoms/Badge/styled.js.map +1 -0
  323. package/esm/components/atoms/BoxContent/BoxContent.d.ts +7 -0
  324. package/esm/components/atoms/BoxContent/BoxContent.js +18 -0
  325. package/esm/components/atoms/BoxContent/BoxContent.js.map +1 -0
  326. package/esm/components/atoms/BoxContent/index.d.ts +2 -0
  327. package/esm/components/atoms/BoxContent/index.js +2 -0
  328. package/esm/components/atoms/BoxContent/index.js.map +1 -0
  329. package/esm/components/atoms/BoxContent/styled.d.ts +24 -0
  330. package/esm/components/atoms/BoxContent/styled.js +55 -0
  331. package/esm/components/atoms/BoxContent/styled.js.map +1 -0
  332. package/esm/components/atoms/Button/Button.d.ts +28 -0
  333. package/esm/components/atoms/Button/Button.js +76 -0
  334. package/esm/components/atoms/Button/Button.js.map +1 -0
  335. package/esm/components/atoms/Button/States/BaseState.d.ts +7 -0
  336. package/esm/components/atoms/Button/States/BaseState.js +29 -0
  337. package/esm/components/atoms/Button/States/BaseState.js.map +1 -0
  338. package/esm/components/atoms/Button/States/Error.d.ts +4 -0
  339. package/esm/components/atoms/Button/States/Error.js +11 -0
  340. package/esm/components/atoms/Button/States/Error.js.map +1 -0
  341. package/esm/components/atoms/Button/States/Loading.d.ts +4 -0
  342. package/esm/components/atoms/Button/States/Loading.js +26 -0
  343. package/esm/components/atoms/Button/States/Loading.js.map +1 -0
  344. package/esm/components/atoms/Button/States/Success.d.ts +4 -0
  345. package/esm/components/atoms/Button/States/Success.js +11 -0
  346. package/esm/components/atoms/Button/States/Success.js.map +1 -0
  347. package/esm/components/atoms/Button/States/index.d.ts +3 -0
  348. package/esm/components/atoms/Button/States/index.js +4 -0
  349. package/esm/components/atoms/Button/States/index.js.map +1 -0
  350. package/esm/components/atoms/Button/States/styled.d.ts +16 -0
  351. package/esm/components/atoms/Button/States/styled.js +25 -0
  352. package/esm/components/atoms/Button/States/styled.js.map +1 -0
  353. package/esm/components/atoms/Button/index.d.ts +3 -0
  354. package/esm/components/atoms/Button/index.js +3 -0
  355. package/esm/components/atoms/Button/index.js.map +1 -0
  356. package/esm/components/atoms/Button/styled.d.ts +8 -0
  357. package/esm/components/atoms/Button/styled.js +42 -0
  358. package/esm/components/atoms/Button/styled.js.map +1 -0
  359. package/esm/components/atoms/Card/Card.d.ts +9 -0
  360. package/esm/components/atoms/Card/Card.js +33 -0
  361. package/esm/components/atoms/Card/Card.js.map +1 -0
  362. package/esm/components/atoms/Card/Footer/Footer.d.ts +7 -0
  363. package/esm/components/atoms/Card/Footer/Footer.js +13 -0
  364. package/esm/components/atoms/Card/Footer/Footer.js.map +1 -0
  365. package/esm/components/atoms/Card/Footer/index.d.ts +2 -0
  366. package/esm/components/atoms/Card/Footer/index.js +2 -0
  367. package/esm/components/atoms/Card/Footer/index.js.map +1 -0
  368. package/esm/components/atoms/Card/Header/Header.d.ts +7 -0
  369. package/esm/components/atoms/Card/Header/Header.js +13 -0
  370. package/esm/components/atoms/Card/Header/Header.js.map +1 -0
  371. package/esm/components/atoms/Card/Header/index.d.ts +2 -0
  372. package/esm/components/atoms/Card/Header/index.js +2 -0
  373. package/esm/components/atoms/Card/Header/index.js.map +1 -0
  374. package/esm/components/atoms/Card/index.d.ts +2 -0
  375. package/esm/components/atoms/Card/index.js +2 -0
  376. package/esm/components/atoms/Card/index.js.map +1 -0
  377. package/esm/components/atoms/Card/styled.d.ts +8 -0
  378. package/esm/components/atoms/Card/styled.js +11 -0
  379. package/esm/components/atoms/Card/styled.js.map +1 -0
  380. package/esm/components/atoms/Checkbox/Checkbox.d.ts +14 -0
  381. package/esm/components/atoms/Checkbox/Checkbox.js +56 -0
  382. package/esm/components/atoms/Checkbox/Checkbox.js.map +1 -0
  383. package/esm/components/atoms/Checkbox/index.d.ts +2 -0
  384. package/esm/components/atoms/Checkbox/index.js +2 -0
  385. package/esm/components/atoms/Checkbox/index.js.map +1 -0
  386. package/esm/components/atoms/Checkbox/styled.d.ts +27 -0
  387. package/esm/components/atoms/Checkbox/styled.js +50 -0
  388. package/esm/components/atoms/Checkbox/styled.js.map +1 -0
  389. package/esm/components/atoms/Divider/Divider.d.ts +8 -0
  390. package/esm/components/atoms/Divider/Divider.js +18 -0
  391. package/esm/components/atoms/Divider/Divider.js.map +1 -0
  392. package/esm/components/atoms/Divider/index.d.ts +2 -0
  393. package/esm/components/atoms/Divider/index.js +2 -0
  394. package/esm/components/atoms/Divider/index.js.map +1 -0
  395. package/esm/components/atoms/Divider/styled.d.ts +13 -0
  396. package/esm/components/atoms/Divider/styled.js +28 -0
  397. package/esm/components/atoms/Divider/styled.js.map +1 -0
  398. package/esm/components/atoms/GroupButton/GroupButton.d.ts +32 -0
  399. package/esm/components/atoms/GroupButton/GroupButton.js +78 -0
  400. package/esm/components/atoms/GroupButton/GroupButton.js.map +1 -0
  401. package/esm/components/atoms/GroupButton/GroupButtonOption.d.ts +9 -0
  402. package/esm/components/atoms/GroupButton/GroupButtonOption.js +19 -0
  403. package/esm/components/atoms/GroupButton/GroupButtonOption.js.map +1 -0
  404. package/esm/components/atoms/GroupButton/index.d.ts +4 -0
  405. package/esm/components/atoms/GroupButton/index.js +3 -0
  406. package/esm/components/atoms/GroupButton/index.js.map +1 -0
  407. package/esm/components/atoms/GroupButton/styled.d.ts +42 -0
  408. package/esm/components/atoms/GroupButton/styled.js +97 -0
  409. package/esm/components/atoms/GroupButton/styled.js.map +1 -0
  410. package/esm/components/atoms/Icon/Icon.d.ts +14 -0
  411. package/esm/components/atoms/Icon/Icon.js +37 -0
  412. package/esm/components/atoms/Icon/Icon.js.map +1 -0
  413. package/esm/components/atoms/Icon/helpers.d.ts +4 -0
  414. package/esm/components/atoms/Icon/helpers.js +78 -0
  415. package/esm/components/atoms/Icon/helpers.js.map +1 -0
  416. package/esm/components/atoms/Icon/index.d.ts +2 -0
  417. package/esm/components/atoms/Icon/index.js +2 -0
  418. package/esm/components/atoms/Icon/index.js.map +1 -0
  419. package/esm/components/atoms/Input/Hint.d.ts +10 -0
  420. package/esm/components/atoms/Input/Hint.js +41 -0
  421. package/esm/components/atoms/Input/Hint.js.map +1 -0
  422. package/esm/components/atoms/Input/InputContainer/InputContainer.d.ts +29 -0
  423. package/esm/components/atoms/Input/InputContainer/InputContainer.js +66 -0
  424. package/esm/components/atoms/Input/InputContainer/InputContainer.js.map +1 -0
  425. package/esm/components/atoms/Input/InputElement/InputElement.d.ts +13 -0
  426. package/esm/components/atoms/Input/InputElement/InputElement.js +37 -0
  427. package/esm/components/atoms/Input/InputElement/InputElement.js.map +1 -0
  428. package/esm/components/atoms/Input/InputMaskElement/InputMaskElement.d.ts +16 -0
  429. package/esm/components/atoms/Input/InputMaskElement/InputMaskElement.js +92 -0
  430. package/esm/components/atoms/Input/InputMaskElement/InputMaskElement.js.map +1 -0
  431. package/esm/components/atoms/Input/PressableInputContainer/PressableInputContainer.d.ts +10 -0
  432. package/esm/components/atoms/Input/PressableInputContainer/PressableInputContainer.js +30 -0
  433. package/esm/components/atoms/Input/PressableInputContainer/PressableInputContainer.js.map +1 -0
  434. package/esm/components/atoms/Input/PressableInputContainer/index.d.ts +2 -0
  435. package/esm/components/atoms/Input/PressableInputContainer/index.js +2 -0
  436. package/esm/components/atoms/Input/PressableInputContainer/index.js.map +1 -0
  437. package/esm/components/atoms/Input/PressableInputContainer/styled.d.ts +5 -0
  438. package/esm/components/atoms/Input/PressableInputContainer/styled.js +7 -0
  439. package/esm/components/atoms/Input/PressableInputContainer/styled.js.map +1 -0
  440. package/esm/components/atoms/Input/hooks/useInputFocus.d.ts +5 -0
  441. package/esm/components/atoms/Input/hooks/useInputFocus.js +40 -0
  442. package/esm/components/atoms/Input/hooks/useInputFocus.js.map +1 -0
  443. package/esm/components/atoms/Input/hooks/useNumberMask.d.ts +8 -0
  444. package/esm/components/atoms/Input/hooks/useNumberMask.js +108 -0
  445. package/esm/components/atoms/Input/hooks/useNumberMask.js.map +1 -0
  446. package/esm/components/atoms/Input/hooks/useStringMask.d.ts +8 -0
  447. package/esm/components/atoms/Input/hooks/useStringMask.js +116 -0
  448. package/esm/components/atoms/Input/hooks/useStringMask.js.map +1 -0
  449. package/esm/components/atoms/Input/index.d.ts +13 -0
  450. package/esm/components/atoms/Input/index.js +10 -0
  451. package/esm/components/atoms/Input/index.js.map +1 -0
  452. package/esm/components/atoms/Input/styled.d.ts +64 -0
  453. package/esm/components/atoms/Input/styled.js +93 -0
  454. package/esm/components/atoms/Input/styled.js.map +1 -0
  455. package/esm/components/atoms/Paper/Paper.d.ts +8 -0
  456. package/esm/components/atoms/Paper/Paper.js +24 -0
  457. package/esm/components/atoms/Paper/Paper.js.map +1 -0
  458. package/esm/components/atoms/Paper/index.d.ts +2 -0
  459. package/esm/components/atoms/Paper/index.js +2 -0
  460. package/esm/components/atoms/Paper/index.js.map +1 -0
  461. package/esm/components/atoms/Paper/styled.d.ts +9 -0
  462. package/esm/components/atoms/Paper/styled.js +11 -0
  463. package/esm/components/atoms/Paper/styled.js.map +1 -0
  464. package/esm/components/atoms/PressableSurface/PressableSurface.d.ts +10 -0
  465. package/esm/components/atoms/PressableSurface/PressableSurface.js +86 -0
  466. package/esm/components/atoms/PressableSurface/PressableSurface.js.map +1 -0
  467. package/esm/components/atoms/PressableSurface/index.d.ts +2 -0
  468. package/esm/components/atoms/PressableSurface/index.js +2 -0
  469. package/esm/components/atoms/PressableSurface/index.js.map +1 -0
  470. package/esm/components/atoms/ProgressBar/ProgressBar.d.ts +18 -0
  471. package/esm/components/atoms/ProgressBar/ProgressBar.js +90 -0
  472. package/esm/components/atoms/ProgressBar/ProgressBar.js.map +1 -0
  473. package/esm/components/atoms/ProgressBar/index.d.ts +2 -0
  474. package/esm/components/atoms/ProgressBar/index.js +2 -0
  475. package/esm/components/atoms/ProgressBar/index.js.map +1 -0
  476. package/esm/components/atoms/ProgressBar/styled.d.ts +20 -0
  477. package/esm/components/atoms/ProgressBar/styled.js +26 -0
  478. package/esm/components/atoms/ProgressBar/styled.js.map +1 -0
  479. package/esm/components/atoms/RadioButton/RadioButton.d.ts +14 -0
  480. package/esm/components/atoms/RadioButton/RadioButton.js +51 -0
  481. package/esm/components/atoms/RadioButton/RadioButton.js.map +1 -0
  482. package/esm/components/atoms/RadioButton/index.d.ts +2 -0
  483. package/esm/components/atoms/RadioButton/index.js +2 -0
  484. package/esm/components/atoms/RadioButton/index.js.map +1 -0
  485. package/esm/components/atoms/RadioButton/styled.d.ts +27 -0
  486. package/esm/components/atoms/RadioButton/styled.js +30 -0
  487. package/esm/components/atoms/RadioButton/styled.js.map +1 -0
  488. package/esm/components/atoms/Switch/Switch.d.ts +16 -0
  489. package/esm/components/atoms/Switch/Switch.js +87 -0
  490. package/esm/components/atoms/Switch/Switch.js.map +1 -0
  491. package/esm/components/atoms/Switch/animation.d.ts +2 -0
  492. package/esm/components/atoms/Switch/animation.js +33 -0
  493. package/esm/components/atoms/Switch/animation.js.map +1 -0
  494. package/esm/components/atoms/Switch/index.d.ts +2 -0
  495. package/esm/components/atoms/Switch/index.js +2 -0
  496. package/esm/components/atoms/Switch/index.js.map +1 -0
  497. package/esm/components/atoms/Switch/styled.d.ts +16 -0
  498. package/esm/components/atoms/Switch/styled.js +24 -0
  499. package/esm/components/atoms/Switch/styled.js.map +1 -0
  500. package/esm/components/atoms/Tag/Tag.d.ts +12 -0
  501. package/esm/components/atoms/Tag/Tag.js +80 -0
  502. package/esm/components/atoms/Tag/Tag.js.map +1 -0
  503. package/esm/components/atoms/Tag/index.d.ts +2 -0
  504. package/esm/components/atoms/Tag/index.js +2 -0
  505. package/esm/components/atoms/Tag/index.js.map +1 -0
  506. package/esm/components/atoms/Tag/styled.d.ts +24 -0
  507. package/esm/components/atoms/Tag/styled.js +39 -0
  508. package/esm/components/atoms/Tag/styled.js.map +1 -0
  509. package/esm/components/atoms/Text/Text.d.ts +19 -0
  510. package/esm/components/atoms/Text/Text.js +47 -0
  511. package/esm/components/atoms/Text/Text.js.map +1 -0
  512. package/esm/components/atoms/Text/functions.d.ts +2 -0
  513. package/esm/components/atoms/Text/functions.js +7 -0
  514. package/esm/components/atoms/Text/functions.js.map +1 -0
  515. package/esm/components/atoms/Text/index.d.ts +2 -0
  516. package/esm/components/atoms/Text/index.js +2 -0
  517. package/esm/components/atoms/Text/index.js.map +1 -0
  518. package/esm/components/atoms/Text/styled.d.ts +20 -0
  519. package/esm/components/atoms/Text/styled.js +46 -0
  520. package/esm/components/atoms/Text/styled.js.map +1 -0
  521. package/esm/components/atoms/shared/PaperAndCard.d.ts +5 -0
  522. package/esm/components/atoms/shared/PaperAndCard.js +25 -0
  523. package/esm/components/atoms/shared/PaperAndCard.js.map +1 -0
  524. package/esm/components/molecules/Calendar/Calendar.d.ts +20 -0
  525. package/esm/components/molecules/Calendar/Calendar.js +144 -0
  526. package/esm/components/molecules/Calendar/Calendar.js.map +1 -0
  527. package/esm/components/molecules/Calendar/components/MonthWeek.d.ts +13 -0
  528. package/esm/components/molecules/Calendar/components/MonthWeek.js +128 -0
  529. package/esm/components/molecules/Calendar/components/MonthWeek.js.map +1 -0
  530. package/esm/components/molecules/Calendar/components/Weekdays.d.ts +8 -0
  531. package/esm/components/molecules/Calendar/components/Weekdays.js +29 -0
  532. package/esm/components/molecules/Calendar/components/Weekdays.js.map +1 -0
  533. package/esm/components/molecules/Calendar/components/index.d.ts +2 -0
  534. package/esm/components/molecules/Calendar/components/index.js +3 -0
  535. package/esm/components/molecules/Calendar/components/index.js.map +1 -0
  536. package/esm/components/molecules/Calendar/index.d.ts +2 -0
  537. package/esm/components/molecules/Calendar/index.js +2 -0
  538. package/esm/components/molecules/Calendar/index.js.map +1 -0
  539. package/esm/components/molecules/Calendar/styled.d.ts +61 -0
  540. package/esm/components/molecules/Calendar/styled.js +56 -0
  541. package/esm/components/molecules/Calendar/styled.js.map +1 -0
  542. package/esm/components/molecules/DatePicker/DatePicker.d.ts +19 -0
  543. package/esm/components/molecules/DatePicker/DatePicker.js +120 -0
  544. package/esm/components/molecules/DatePicker/DatePicker.js.map +1 -0
  545. package/esm/components/molecules/DatePicker/index.d.ts +2 -0
  546. package/esm/components/molecules/DatePicker/index.js +2 -0
  547. package/esm/components/molecules/DatePicker/index.js.map +1 -0
  548. package/esm/components/molecules/DatePicker/styled.d.ts +15 -0
  549. package/esm/components/molecules/DatePicker/styled.js +22 -0
  550. package/esm/components/molecules/DatePicker/styled.js.map +1 -0
  551. package/esm/components/molecules/DateTimePicker/DateTimePicker.d.ts +17 -0
  552. package/esm/components/molecules/DateTimePicker/DateTimePicker.js +122 -0
  553. package/esm/components/molecules/DateTimePicker/DateTimePicker.js.map +1 -0
  554. package/esm/components/molecules/DateTimePicker/index.d.ts +2 -0
  555. package/esm/components/molecules/DateTimePicker/index.js +2 -0
  556. package/esm/components/molecules/DateTimePicker/index.js.map +1 -0
  557. package/esm/components/molecules/DateTimePicker/styled.d.ts +8 -0
  558. package/esm/components/molecules/DateTimePicker/styled.js +12 -0
  559. package/esm/components/molecules/DateTimePicker/styled.js.map +1 -0
  560. package/esm/components/molecules/DateTimeSelector/DateTimeSelector.d.ts +28 -0
  561. package/esm/components/molecules/DateTimeSelector/DateTimeSelector.js +219 -0
  562. package/esm/components/molecules/DateTimeSelector/DateTimeSelector.js.map +1 -0
  563. package/esm/components/molecules/DateTimeSelector/Selector.d.ts +17 -0
  564. package/esm/components/molecules/DateTimeSelector/Selector.js +113 -0
  565. package/esm/components/molecules/DateTimeSelector/Selector.js.map +1 -0
  566. package/esm/components/molecules/DateTimeSelector/index.d.ts +2 -0
  567. package/esm/components/molecules/DateTimeSelector/index.js +2 -0
  568. package/esm/components/molecules/DateTimeSelector/index.js.map +1 -0
  569. package/esm/components/molecules/DateTimeSelector/styled.d.ts +52 -0
  570. package/esm/components/molecules/DateTimeSelector/styled.js +54 -0
  571. package/esm/components/molecules/DateTimeSelector/styled.js.map +1 -0
  572. package/esm/components/molecules/Grid/functions.d.ts +3 -0
  573. package/esm/components/molecules/Grid/functions.js +16 -0
  574. package/esm/components/molecules/Grid/functions.js.map +1 -0
  575. package/esm/components/molecules/Grid/index.d.ts +42 -0
  576. package/esm/components/molecules/Grid/index.js +2 -0
  577. package/esm/components/molecules/Grid/index.js.map +1 -0
  578. package/esm/components/molecules/HintInputContainer/HintInputContainer.d.ts +17 -0
  579. package/esm/components/molecules/HintInputContainer/HintInputContainer.js +46 -0
  580. package/esm/components/molecules/HintInputContainer/HintInputContainer.js.map +1 -0
  581. package/esm/components/molecules/HintInputContainer/index.d.ts +2 -0
  582. package/esm/components/molecules/HintInputContainer/index.js +2 -0
  583. package/esm/components/molecules/HintInputContainer/index.js.map +1 -0
  584. package/esm/components/molecules/HintInputContainer/styled.d.ts +0 -0
  585. package/esm/components/molecules/HintInputContainer/styled.js +2 -0
  586. package/esm/components/molecules/HintInputContainer/styled.js.map +1 -0
  587. package/esm/components/molecules/IconTextButton/IconComponent.d.ts +9 -0
  588. package/esm/components/molecules/IconTextButton/IconComponent.js +20 -0
  589. package/esm/components/molecules/IconTextButton/IconComponent.js.map +1 -0
  590. package/esm/components/molecules/IconTextButton/IconTextButton.d.ts +8 -0
  591. package/esm/components/molecules/IconTextButton/IconTextButton.js +2 -0
  592. package/esm/components/molecules/IconTextButton/IconTextButton.js.map +1 -0
  593. package/esm/components/molecules/IconTextButton/index.d.ts +2 -0
  594. package/esm/components/molecules/IconTextButton/index.js +2 -0
  595. package/esm/components/molecules/IconTextButton/index.js.map +1 -0
  596. package/esm/components/molecules/IconTextButton/styled.d.ts +11 -0
  597. package/esm/components/molecules/IconTextButton/styled.js +14 -0
  598. package/esm/components/molecules/IconTextButton/styled.js.map +1 -0
  599. package/esm/components/molecules/InputPassword/InputPasswordIcon.d.ts +8 -0
  600. package/esm/components/molecules/InputPassword/InputPasswordIcon.js +33 -0
  601. package/esm/components/molecules/InputPassword/InputPasswordIcon.js.map +1 -0
  602. package/esm/components/molecules/InputPassword/index.d.ts +1 -0
  603. package/esm/components/molecules/InputPassword/index.js +2 -0
  604. package/esm/components/molecules/InputPassword/index.js.map +1 -0
  605. package/esm/components/molecules/InputPassword/styled.d.ts +7 -0
  606. package/esm/components/molecules/InputPassword/styled.js +11 -0
  607. package/esm/components/molecules/InputPassword/styled.js.map +1 -0
  608. package/esm/components/molecules/LabeledSwitch/LabeledSwitch.d.ts +7 -0
  609. package/esm/components/molecules/LabeledSwitch/LabeledSwitch.js +2 -0
  610. package/esm/components/molecules/LabeledSwitch/LabeledSwitch.js.map +1 -0
  611. package/esm/components/molecules/LabeledSwitch/index.d.ts +1 -0
  612. package/esm/components/molecules/LabeledSwitch/index.js +2 -0
  613. package/esm/components/molecules/LabeledSwitch/index.js.map +1 -0
  614. package/esm/components/molecules/Snackbar/Snackbar.d.ts +19 -0
  615. package/esm/components/molecules/Snackbar/Snackbar.js +103 -0
  616. package/esm/components/molecules/Snackbar/Snackbar.js.map +1 -0
  617. package/esm/components/molecules/Snackbar/index.d.ts +2 -0
  618. package/esm/components/molecules/Snackbar/index.js +2 -0
  619. package/esm/components/molecules/Snackbar/index.js.map +1 -0
  620. package/esm/components/molecules/Snackbar/styled.d.ts +47 -0
  621. package/esm/components/molecules/Snackbar/styled.js +54 -0
  622. package/esm/components/molecules/Snackbar/styled.js.map +1 -0
  623. package/esm/components/molecules/TextArea/TextArea.d.ts +14 -0
  624. package/esm/components/molecules/TextArea/TextArea.js +77 -0
  625. package/esm/components/molecules/TextArea/TextArea.js.map +1 -0
  626. package/esm/components/molecules/TextArea/index.d.ts +3 -0
  627. package/esm/components/molecules/TextArea/index.js +3 -0
  628. package/esm/components/molecules/TextArea/index.js.map +1 -0
  629. package/esm/components/molecules/TextArea/styled.d.ts +12 -0
  630. package/esm/components/molecules/TextArea/styled.js +14 -0
  631. package/esm/components/molecules/TextArea/styled.js.map +1 -0
  632. package/esm/hooks/index.d.ts +2 -0
  633. package/esm/hooks/index.js +3 -0
  634. package/esm/hooks/index.js.map +1 -0
  635. package/esm/hooks/useDebouncedState.d.ts +2 -0
  636. package/esm/hooks/useDebouncedState.js +31 -0
  637. package/esm/hooks/useDebouncedState.js.map +1 -0
  638. package/esm/hooks/useTheme.d.ts +2 -0
  639. package/esm/hooks/useTheme.js +5 -0
  640. package/esm/hooks/useTheme.js.map +1 -0
  641. package/esm/index.d.ts +64 -0
  642. package/esm/index.js +36 -0
  643. package/esm/index.js.map +1 -0
  644. package/esm/styles/ThemeProvider.d.ts +4 -0
  645. package/esm/styles/ThemeProvider.js +13 -0
  646. package/esm/styles/ThemeProvider.js.map +1 -0
  647. package/esm/styles/definitions.d.ts +45 -0
  648. package/esm/styles/definitions.js +168 -0
  649. package/esm/styles/definitions.js.map +1 -0
  650. package/esm/styles/light.d.ts +2 -0
  651. package/esm/styles/light.js +42 -0
  652. package/esm/styles/light.js.map +1 -0
  653. package/esm/types/defaults.d.ts +134 -0
  654. package/esm/types/defaults.js +2 -0
  655. package/esm/types/defaults.js.map +1 -0
  656. package/esm/utils/IPhoneXHelper.d.ts +4 -0
  657. package/esm/utils/IPhoneXHelper.js +23 -0
  658. package/esm/utils/IPhoneXHelper.js.map +1 -0
  659. package/esm/utils/ResponsiveFontSize.d.ts +3 -0
  660. package/esm/utils/ResponsiveFontSize.js +37 -0
  661. package/esm/utils/ResponsiveFontSize.js.map +1 -0
  662. package/esm/utils/extractNumbersFromString.d.ts +2 -0
  663. package/esm/utils/extractNumbersFromString.js +7 -0
  664. package/esm/utils/extractNumbersFromString.js.map +1 -0
  665. package/esm/utils/formatWithMask.d.ts +3 -0
  666. package/esm/utils/formatWithMask.js +19 -0
  667. package/esm/utils/formatWithMask.js.map +1 -0
  668. package/esm/utils/index.d.ts +7 -0
  669. package/esm/utils/index.js +8 -0
  670. package/esm/utils/index.js.map +1 -0
  671. package/esm/utils/lightenDarkenColor.d.ts +1 -0
  672. package/esm/utils/lightenDarkenColor.js +18 -0
  673. package/esm/utils/lightenDarkenColor.js.map +1 -0
  674. package/esm/utils/masks.d.ts +11 -0
  675. package/esm/utils/masks.js +19 -0
  676. package/esm/utils/masks.js.map +1 -0
  677. package/esm/utils/variantComplement.d.ts +6 -0
  678. package/esm/utils/variantComplement.js +26 -0
  679. package/esm/utils/variantComplement.js.map +1 -0
  680. package/package.json +12 -7
  681. package/src/components/atoms/Avatar/index.ts +2 -1
  682. package/src/components/atoms/Badge/index.ts +2 -1
  683. package/src/components/atoms/Badge/styled.ts +2 -3
  684. package/src/components/atoms/BoxContent/index.ts +2 -1
  685. package/src/components/atoms/Button/index.ts +3 -3
  686. package/src/components/atoms/Card/Footer/index.ts +2 -1
  687. package/src/components/atoms/Card/Header/index.ts +2 -1
  688. package/src/components/atoms/Card/index.ts +2 -1
  689. package/src/components/atoms/Checkbox/index.ts +2 -1
  690. package/src/components/atoms/Divider/index.ts +2 -1
  691. package/src/components/atoms/GroupButton/GroupButton.tsx +2 -5
  692. package/src/components/atoms/GroupButton/index.ts +4 -9
  693. package/src/components/atoms/Icon/index.ts +2 -1
  694. package/src/components/atoms/Input/InputContainer/InputContainer.tsx +3 -3
  695. package/src/components/atoms/Input/InputElement/InputElement.tsx +4 -5
  696. package/src/components/atoms/Input/InputMaskElement/InputMaskElement.tsx +4 -5
  697. package/src/components/atoms/Input/PressableInputContainer/index.ts +2 -4
  698. package/src/components/atoms/Input/index.ts +8 -14
  699. package/src/components/atoms/Paper/index.ts +2 -1
  700. package/src/components/atoms/PressableSurface/index.ts +2 -4
  701. package/src/components/atoms/ProgressBar/ProgressBar.tsx +2 -4
  702. package/src/components/atoms/ProgressBar/index.ts +2 -1
  703. package/src/components/atoms/RadioButton/index.ts +2 -1
  704. package/src/components/atoms/Switch/Switch.tsx +39 -19
  705. package/src/components/atoms/Switch/animation.ts +4 -6
  706. package/src/components/atoms/Switch/index.ts +2 -1
  707. package/src/components/atoms/Switch/styled.ts +4 -6
  708. package/src/components/atoms/Tag/Tag.tsx +1 -1
  709. package/src/components/atoms/Tag/index.ts +2 -1
  710. package/src/components/atoms/Text/index.ts +2 -1
  711. package/src/components/atoms/shared/PaperAndCard.ts +1 -1
  712. package/src/components/molecules/Calendar/index.ts +3 -3
  713. package/src/components/molecules/DatePicker/DatePicker.tsx +12 -8
  714. package/src/components/molecules/DatePicker/index.ts +2 -1
  715. package/src/components/molecules/DateTimePicker/DateTimePicker.tsx +19 -11
  716. package/src/components/molecules/DateTimePicker/index.ts +2 -4
  717. package/src/components/molecules/DateTimeSelector/DateTimeSelector.tsx +0 -1
  718. package/src/components/molecules/DateTimeSelector/index.ts +2 -2
  719. package/src/components/molecules/Grid/functions.ts +29 -0
  720. package/src/components/molecules/Grid/index.ts +66 -2
  721. package/src/components/molecules/HintInputContainer/HintInputContainer.tsx +6 -1
  722. package/src/components/molecules/IconTextButton/IconComponent.tsx +31 -0
  723. package/src/components/molecules/IconTextButton/IconTextButton.tsx +10 -0
  724. package/src/components/molecules/IconTextButton/index.ts +5 -0
  725. package/src/components/molecules/IconTextButton/styled.ts +20 -0
  726. package/src/components/molecules/LabeledSwitch/LabeledSwitch.tsx +9 -0
  727. package/src/components/molecules/LabeledSwitch/index.ts +1 -0
  728. package/src/components/molecules/Snackbar/Snackbar.tsx +1 -1
  729. package/src/components/molecules/Snackbar/index.ts +2 -1
  730. package/src/components/molecules/Snackbar/styled.ts +6 -2
  731. package/src/components/molecules/TextArea/TextArea.tsx +6 -2
  732. package/src/components/molecules/TextArea/index.ts +2 -1
  733. package/src/components/molecules/TextArea/styled.ts +5 -2
  734. package/src/index.ts +82 -54
  735. package/src/styles/definitions.ts +8 -1
  736. package/src/styles/light.ts +2 -0
  737. package/src/types/defaults.ts +11 -1
  738. package/src/utils/IPhoneXHelper.ts +27 -22
  739. package/src/utils/ResponsiveFontSize.ts +55 -36
  740. package/src/utils/index.ts +5 -4
  741. package/src/utils/variantComplement.ts +36 -0
  742. package/tsconfig.build.esm.json +10 -0
  743. package/dist/components/molecules/Grid/Grid.d.ts +0 -15
  744. package/dist/components/molecules/Grid/Grid.js +0 -55
  745. package/dist/components/molecules/Grid/Grid.js.map +0 -1
  746. package/dist/components/molecules/Grid/Item/Item.d.ts +0 -30
  747. package/dist/components/molecules/Grid/Item/Item.js +0 -68
  748. package/dist/components/molecules/Grid/Item/Item.js.map +0 -1
  749. package/dist/components/molecules/Grid/Item/index.d.ts +0 -1
  750. package/dist/components/molecules/Grid/Item/index.js +0 -14
  751. package/dist/components/molecules/Grid/Item/index.js.map +0 -1
  752. package/src/components/molecules/Grid/Grid.stories.tsx +0 -132
  753. package/src/components/molecules/Grid/Grid.tsx +0 -87
  754. package/src/components/molecules/Grid/Item/Item.tsx +0 -93
  755. package/src/components/molecules/Grid/Item/index.ts +0 -1
@@ -1,6 +1,8 @@
1
1
  "use strict";
2
2
 
3
- exports.__esModule = true;
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
4
6
  exports.default = void 0;
5
7
 
6
8
  var _react = require("@emotion/react");
@@ -11,16 +13,17 @@ var _styled = require("../styled");
11
13
 
12
14
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
15
 
14
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
15
-
16
- const InputElement = _react2.default.forwardRef(({
17
- onChange,
18
- placeholder,
19
- value,
20
- disabled = false,
21
- placeholderTextColor,
22
- ...rest
23
- }, ref) => {
16
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
17
+
18
+ const InputElement = _react2.default.forwardRef((_ref, ref) => {
19
+ let {
20
+ onChange,
21
+ placeholder,
22
+ value,
23
+ disabled = false,
24
+ placeholderTextColor,
25
+ ...rest
26
+ } = _ref;
24
27
  const theme = (0, _react.useTheme)();
25
28
 
26
29
  const _placeholderColor = placeholderTextColor || theme.font.color.dark;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/components/atoms/Input/InputElement/InputElement.tsx"],"names":["InputElement","React","forwardRef","onChange","placeholder","value","disabled","placeholderTextColor","rest","ref","theme","_placeholderColor","font","color","dark","displayName"],"mappings":";;;;;AAAA;;AAEA;;AAEA;;;;;;AAcA,MAAMA,YAAmC,GAAGC,gBAAMC,UAAN,CAC1C,CACE;AACEC,EAAAA,QADF;AAEEC,EAAAA,WAFF;AAGEC,EAAAA,KAHF;AAIEC,EAAAA,QAAQ,GAAG,KAJb;AAKEC,EAAAA,oBALF;AAME,KAAGC;AANL,CADF,EASEC,GATF,KAUkB;AAChB,QAAMC,KAAK,GAAG,sBAAd;;AACA,QAAMC,iBAAiB,GAAGJ,oBAAoB,IAAIG,KAAK,CAACE,IAAN,CAAWC,KAAX,CAAiBC,IAAnE;;AAEA,SACE,8BAAC,0BAAD,eACMN,IADN;AAEE,IAAA,GAAG,EAAEC,GAFP;AAGE,IAAA,YAAY,EAAEN,QAHhB;AAIE,IAAA,KAAK,EAAEE,KAJT;AAKE,IAAA,WAAW,EAAED,WALf;AAME,IAAA,oBAAoB,EAAEO,iBANxB;AAOE,IAAA,QAAQ,EAAEL,QAPZ;AAQE,IAAA,QAAQ,EAAE,CAACA;AARb,KADF;AAYD,CA3ByC,CAA5C;;AA8BAN,YAAY,CAACe,WAAb,GAA2B,cAA3B;eAEef,Y","sourcesContent":["import { useTheme } from '@emotion/react';\nimport { ThemeProp } from '@tecsinapse/react-core';\nimport React, { FC } from 'react';\nimport { StyleProp, TextInputProps, TextStyle } from 'react-native';\nimport { StyledInputElement } from '../styled';\n\nexport interface InputElementProps\n extends Omit<TextInputProps, 'onChange' | 'value' | 'ref'> {\n style?: StyleProp<TextStyle>;\n value?: string;\n placeholder?: string;\n disabled?: boolean;\n onChange?: (value: string) => void;\n onFocus?: () => void;\n onBlur?: () => void;\n ref?: React.Ref<any>;\n}\n\nconst InputElement: FC<InputElementProps> = React.forwardRef(\n (\n {\n onChange,\n placeholder,\n value,\n disabled = false,\n placeholderTextColor,\n ...rest\n },\n ref: React.Ref<any>\n ): JSX.Element => {\n const theme = useTheme() as ThemeProp;\n const _placeholderColor = placeholderTextColor || theme.font.color.dark;\n\n return (\n <StyledInputElement\n {...rest}\n ref={ref}\n onChangeText={onChange}\n value={value}\n placeholder={placeholder}\n placeholderTextColor={_placeholderColor}\n disabled={disabled}\n editable={!disabled}\n />\n );\n }\n);\n\nInputElement.displayName = 'InputElement';\n\nexport default InputElement;\n"],"file":"InputElement.js"}
1
+ {"version":3,"file":"InputElement.js","names":["InputElement","React","forwardRef","ref","onChange","placeholder","value","disabled","placeholderTextColor","rest","theme","useTheme","_placeholderColor","font","color","dark","displayName"],"sources":["../../../../../src/components/atoms/Input/InputElement/InputElement.tsx"],"sourcesContent":["import { useTheme } from '@emotion/react';\nimport { ThemeProp } from '@tecsinapse/react-core';\nimport React from 'react';\nimport { StyleProp, TextInput, TextInputProps, TextStyle } from 'react-native';\nimport { StyledInputElement } from '../styled';\n\nexport interface InputElementProps\n extends Omit<TextInputProps, 'onChange' | 'value' | 'ref'> {\n style?: StyleProp<TextStyle>;\n value?: string;\n placeholder?: string;\n disabled?: boolean;\n onChange?: (value: string) => void;\n onFocus?: () => void;\n onBlur?: () => void;\n}\n\nconst InputElement = React.forwardRef<TextInput, InputElementProps>(\n (\n {\n onChange,\n placeholder,\n value,\n disabled = false,\n placeholderTextColor,\n ...rest\n },\n ref\n ): JSX.Element => {\n const theme = useTheme() as ThemeProp;\n const _placeholderColor = placeholderTextColor || theme.font.color.dark;\n\n return (\n <StyledInputElement\n {...rest}\n ref={ref}\n onChangeText={onChange}\n value={value}\n placeholder={placeholder}\n placeholderTextColor={_placeholderColor}\n disabled={disabled}\n editable={!disabled}\n />\n );\n }\n);\n\nInputElement.displayName = 'InputElement';\n\nexport default InputElement;\n"],"mappings":";;;;;;;AAAA;;AAEA;;AAEA;;;;;;AAaA,MAAMA,YAAY,GAAGC,eAAA,CAAMC,UAAN,CACnB,OASEC,GATF,KAUkB;EAAA,IAThB;IACEC,QADF;IAEEC,WAFF;IAGEC,KAHF;IAIEC,QAAQ,GAAG,KAJb;IAKEC,oBALF;IAME,GAAGC;EANL,CASgB;EAChB,MAAMC,KAAK,GAAG,IAAAC,eAAA,GAAd;;EACA,MAAMC,iBAAiB,GAAGJ,oBAAoB,IAAIE,KAAK,CAACG,IAAN,CAAWC,KAAX,CAAiBC,IAAnE;;EAEA,OACE,8BAAC,0BAAD,eACMN,IADN;IAEE,GAAG,EAAEN,GAFP;IAGE,YAAY,EAAEC,QAHhB;IAIE,KAAK,EAAEE,KAJT;IAKE,WAAW,EAAED,WALf;IAME,oBAAoB,EAAEO,iBANxB;IAOE,QAAQ,EAAEL,QAPZ;IAQE,QAAQ,EAAE,CAACA;EARb,GADF;AAYD,CA3BkB,CAArB;;AA8BAP,YAAY,CAACgB,WAAb,GAA2B,cAA3B;eAEehB,Y"}
@@ -1,5 +1,5 @@
1
- import React, { FC } from 'react';
2
- import { StyleProp, TextInputProps, TextStyle } from 'react-native';
1
+ import React from 'react';
2
+ import { StyleProp, TextInput, TextInputProps, TextStyle } from 'react-native';
3
3
  import { MaskType } from '../hooks/useStringMask';
4
4
  import { CurrencyOptions } from '../hooks/useNumberMask';
5
5
  export interface InputMaskElementProps extends Omit<TextInputProps, 'onChange' | 'value' | 'ref'> {
@@ -11,7 +11,6 @@ export interface InputMaskElementProps extends Omit<TextInputProps, 'onChange' |
11
11
  mask?: (MaskType[] | ((value: string) => MaskType[])) | CurrencyOptions;
12
12
  onFocus?: () => void;
13
13
  onBlur?: () => void;
14
- ref?: React.Ref<any>;
15
14
  }
16
- declare const InputMaskElement: FC<InputMaskElementProps>;
15
+ declare const InputMaskElement: React.ForwardRefExoticComponent<InputMaskElementProps & React.RefAttributes<TextInput>>;
17
16
  export default InputMaskElement;
@@ -1,6 +1,8 @@
1
1
  "use strict";
2
2
 
3
- exports.__esModule = true;
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
4
6
  exports.default = void 0;
5
7
 
6
8
  var _react = require("@emotion/react");
@@ -17,17 +19,18 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
17
19
 
18
20
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
19
21
 
20
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
21
-
22
- const InputMaskElement = _react2.default.forwardRef(({
23
- onChange,
24
- placeholder,
25
- value,
26
- disabled = false,
27
- placeholderTextColor,
28
- mask,
29
- ...rest
30
- }, ref) => {
22
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
23
+
24
+ const InputMaskElement = _react2.default.forwardRef((_ref, ref) => {
25
+ let {
26
+ onChange,
27
+ placeholder,
28
+ value,
29
+ disabled = false,
30
+ placeholderTextColor,
31
+ mask,
32
+ ...rest
33
+ } = _ref;
31
34
  const theme = (0, _react.useTheme)();
32
35
 
33
36
  const _placeholderColor = placeholderTextColor || theme.font.color.dark;
@@ -44,13 +47,13 @@ const InputMaskElement = _react2.default.forwardRef(({
44
47
  }
45
48
  };
46
49
 
47
- const [maskValue, setMaskValue] = getInputHook(value ?? '');
50
+ const [maskValue, setMaskValue] = getInputHook(value !== null && value !== void 0 ? value : '');
48
51
 
49
- const _value = maskValue === undefined ? value == null ? void 0 : value.toString() : maskValue.formatted ? maskValue.formatted : '';
52
+ const _value = maskValue === undefined ? value === null || value === void 0 ? void 0 : value.toString() : maskValue.formatted ? maskValue.formatted : '';
50
53
 
51
54
  (0, _react2.useEffect)(() => {
52
55
  if (onChange) {
53
- onChange(maskValue == null ? void 0 : maskValue.raw);
56
+ onChange(maskValue === null || maskValue === void 0 ? void 0 : maskValue.raw);
54
57
  }
55
58
  }, [maskValue]);
56
59
  const onChangeValue = (0, _react2.useCallback)(value => {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/components/atoms/Input/InputMaskElement/InputMaskElement.tsx"],"names":["InputMaskElement","React","forwardRef","onChange","placeholder","value","disabled","placeholderTextColor","mask","rest","ref","theme","_placeholderColor","font","color","dark","getInputHook","undefined","Array","isArray","maskValue","setMaskValue","_value","toString","formatted","raw","onChangeValue","displayName"],"mappings":";;;;;AAAA;;AAEA;;AAEA;;AACA;;AACA;;;;;;;;AAuBA,MAAMA,gBAA2C,GAAGC,gBAAMC,UAAN,CAClD,CACE;AACEC,EAAAA,QADF;AAEEC,EAAAA,WAFF;AAGEC,EAAAA,KAHF;AAIEC,EAAAA,QAAQ,GAAG,KAJb;AAKEC,EAAAA,oBALF;AAMEC,EAAAA,IANF;AAOE,KAAGC;AAPL,CADF,EAUEC,GAVF,KAWkB;AAChB,QAAMC,KAAK,GAAG,sBAAd;;AAEA,QAAMC,iBAAiB,GAAGL,oBAAoB,IAAII,KAAK,CAACE,IAAN,CAAWC,KAAX,CAAiBC,IAAnE;;AAEA,QAAMC,YAAY,GAAIX,KAAD,IAA4B;AAC/C,QAAIG,IAAI,KAAKS,SAAb,EAAwB;AACtB,UAAIC,KAAK,CAACC,OAAN,CAAcX,IAAd,KAAuB,OAAOA,IAAP,KAAgB,UAA3C,EAAuD;AACrD,eAAO,kCAAcA,IAAd,EAAoBH,KAApB,CAAP;AACD,OAFD,MAEO;AACL,eAAO,kCAAcG,IAAd,EAAoBH,KAApB,CAAP;AACD;AACF,KAND,MAMO;AACL,aAAO,CAACY,SAAD,EAAYA,SAAZ,CAAP;AACD;AACF,GAVD;;AAYA,QAAM,CAACG,SAAD,EAAYC,YAAZ,IAA4BL,YAAY,CAACX,KAAK,IAAI,EAAV,CAA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EAAEQ,iBANxB;AAOE,IAAA,QAAQ,EAAEN,QAPZ;AAQE,IAAA,QAAQ,EAAE,CAACA;AARb,KADF;AAYD,CArFiD,CAApD;;AAwFAN,gBAAgB,CAAC2B,WAAjB,GAA+B,kBAA/B;eAEe3B,gB","sourcesContent":["import { useTheme } from '@emotion/react';\nimport { ThemeProp } from '@tecsinapse/react-core';\nimport React, { FC, useCallback, useEffect } from 'react';\nimport { StyleProp, TextInputProps, TextStyle } from 'react-native';\nimport { StyledInputElement } from '../styled';\nimport { MaskType, useStringMask } from '../hooks/useStringMask';\nimport { CurrencyOptions, useNumberMask } from '../hooks/useNumberMask';\n\nexport interface InputMaskElementProps\n extends Omit<TextInputProps, 'onChange' | 'value' | 'ref'> {\n style?: StyleProp<TextStyle>;\n value?: string | number;\n placeholder?: string;\n disabled?: boolean;\n onChange?: (value: any) => void;\n /**\n To use mask for strings you have to pass a MaskType[] or ((value: string) => MaskType[])\n A MaskType can be a string, RegExp, or Array<RegExp>.\n In case we have a string, '9' represents digits, 'a' represents alphabet characters, and any other character represents fixed characters in the mask.\n For example a phone mask can be represented as ['(99) \\\\99999-9999'], or ['(99) ', '/[9]/', '9999-9999'], or ['(', /[0-9]/, /[0-9]/, ') ', '/[9]/', '9999-9999'] and many others.\n To use mask for numbers you have to pass a CurrencyOptions object\n A CurrencyOptions object contains symbol, separator, decimal, precision. For example {symbol: 'R$ ', separator: '.', decimal: ',', precision: 2,}.\n **/\n mask?: (MaskType[] | ((value: string) => MaskType[])) | CurrencyOptions;\n onFocus?: () => void;\n onBlur?: () => void;\n ref?: React.Ref<any>;\n}\n\nconst InputMaskElement: FC<InputMaskElementProps> = React.forwardRef(\n (\n {\n onChange,\n placeholder,\n value,\n disabled = false,\n placeholderTextColor,\n mask,\n ...rest\n },\n ref: React.Ref<any>\n ): JSX.Element => {\n const theme = useTheme() as ThemeProp;\n\n const _placeholderColor = placeholderTextColor || theme.font.color.dark;\n\n const getInputHook = (value: string | number) => {\n if (mask !== undefined) {\n if (Array.isArray(mask) || typeof mask === 'function') {\n return useStringMask(mask, value);\n } else {\n return useNumberMask(mask, value);\n }\n } else {\n return [undefined, undefined];\n }\n };\n\n const [maskValue, setMaskValue] = getInputHook(value ?? '');\n\n const _value =\n maskValue === undefined\n ? value?.toString()\n : maskValue.formatted\n ? maskValue.formatted\n : '';\n\n useEffect(() => {\n if (onChange) {\n onChange(maskValue?.raw);\n }\n }, [maskValue]);\n\n const onChangeValue = useCallback(\n (value: string | number) => {\n if (maskValue !== undefined && setMaskValue !== undefined) {\n setMaskValue(value);\n } else onChange && onChange(value);\n },\n [value]\n );\n\n useEffect(() => {\n /** Used to reinitialize maskValue when the value is updated in the parent component **/\n if (\n maskValue !== undefined &&\n setMaskValue !== undefined &&\n value !== undefined &&\n typeof maskValue === 'object'\n ) {\n /** Case there is a mask **/\n if (\n maskValue.raw !== undefined &&\n maskValue.raw.toString() !== value.toString()\n ) {\n onChangeValue(value);\n }\n } else if (maskValue === undefined && value !== undefined) {\n onChangeValue(value);\n }\n }, [value]);\n\n return (\n <StyledInputElement\n {...rest}\n ref={ref}\n onChangeText={onChangeValue}\n value={_value}\n placeholder={placeholder}\n placeholderTextColor={_placeholderColor}\n disabled={disabled}\n editable={!disabled}\n />\n );\n }\n);\n\nInputMaskElement.displayName = 'InputMaskElement';\n\nexport default InputMaskElement;\n"],"file":"InputMaskElement.js"}
1
+ {"version":3,"file":"InputMaskElement.js","names":["InputMaskElement","React","forwardRef","ref","onChange","placeholder","value","disabled","placeholderTextColor","mask","rest","theme","useTheme","_placeholderColor","font","color","dark","getInputHook","undefined","Array","isArray","useStringMask","useNumberMask","maskValue","setMaskValue","_value","toString","formatted","useEffect","raw","onChangeValue","useCallback","displayName"],"sources":["../../../../../src/components/atoms/Input/InputMaskElement/InputMaskElement.tsx"],"sourcesContent":["import { useTheme } from '@emotion/react';\nimport { ThemeProp } from '@tecsinapse/react-core';\nimport React, { useCallback, useEffect } from 'react';\nimport { StyleProp, TextInput, TextInputProps, TextStyle } from 'react-native';\nimport { StyledInputElement } from '../styled';\nimport { MaskType, useStringMask } from '../hooks/useStringMask';\nimport { CurrencyOptions, useNumberMask } from '../hooks/useNumberMask';\n\nexport interface InputMaskElementProps\n extends Omit<TextInputProps, 'onChange' | 'value' | 'ref'> {\n style?: StyleProp<TextStyle>;\n value?: string | number;\n placeholder?: string;\n disabled?: boolean;\n onChange?: (value: any) => void;\n /**\n To use mask for strings you have to pass a MaskType[] or ((value: string) => MaskType[])\n A MaskType can be a string, RegExp, or Array<RegExp>.\n In case we have a string, '9' represents digits, 'a' represents alphabet characters, and any other character represents fixed characters in the mask.\n For example a phone mask can be represented as ['(99) \\\\99999-9999'], or ['(99) ', '/[9]/', '9999-9999'], or ['(', /[0-9]/, /[0-9]/, ') ', '/[9]/', '9999-9999'] and many others.\n To use mask for numbers you have to pass a CurrencyOptions object\n A CurrencyOptions object contains symbol, separator, decimal, precision. For example {symbol: 'R$ ', separator: '.', decimal: ',', precision: 2,}.\n **/\n mask?: (MaskType[] | ((value: string) => MaskType[])) | CurrencyOptions;\n onFocus?: () => void;\n onBlur?: () => void;\n}\n\nconst InputMaskElement = React.forwardRef<TextInput, InputMaskElementProps>(\n (\n {\n onChange,\n placeholder,\n value,\n disabled = false,\n placeholderTextColor,\n mask,\n ...rest\n },\n ref\n ): JSX.Element => {\n const theme = useTheme() as ThemeProp;\n\n const _placeholderColor = placeholderTextColor || theme.font.color.dark;\n\n const getInputHook = (value: string | number) => {\n if (mask !== undefined) {\n if (Array.isArray(mask) || typeof mask === 'function') {\n return useStringMask(mask, value);\n } else {\n return useNumberMask(mask, value);\n }\n } else {\n return [undefined, undefined];\n }\n };\n\n const [maskValue, setMaskValue] = getInputHook(value ?? '');\n\n const _value =\n maskValue === undefined\n ? value?.toString()\n : maskValue.formatted\n ? maskValue.formatted\n : '';\n\n useEffect(() => {\n if (onChange) {\n onChange(maskValue?.raw);\n }\n }, [maskValue]);\n\n const onChangeValue = useCallback(\n (value: string | number) => {\n if (maskValue !== undefined && setMaskValue !== undefined) {\n setMaskValue(value);\n } else onChange && onChange(value);\n },\n [value]\n );\n\n useEffect(() => {\n /** Used to reinitialize maskValue when the value is updated in the parent component **/\n if (\n maskValue !== undefined &&\n setMaskValue !== undefined &&\n value !== undefined &&\n typeof maskValue === 'object'\n ) {\n /** Case there is a mask **/\n if (\n maskValue.raw !== undefined &&\n maskValue.raw.toString() !== value.toString()\n ) {\n onChangeValue(value);\n }\n } else if (maskValue === undefined && value !== undefined) {\n onChangeValue(value);\n }\n }, [value]);\n\n return (\n <StyledInputElement\n {...rest}\n ref={ref}\n onChangeText={onChangeValue}\n value={_value}\n placeholder={placeholder}\n placeholderTextColor={_placeholderColor}\n disabled={disabled}\n editable={!disabled}\n />\n );\n }\n);\n\nInputMaskElement.displayName = 'InputMaskElement';\n\nexport default InputMaskElement;\n"],"mappings":";;;;;;;AAAA;;AAEA;;AAEA;;AACA;;AACA;;;;;;;;AAsBA,MAAMA,gBAAgB,GAAGC,eAAA,CAAMC,UAAN,CACvB,OAUEC,GAVF,KAWkB;EAAA,IAVhB;IACEC,QADF;IAEEC,WAFF;IAGEC,KAHF;IAIEC,QAAQ,GAAG,KAJb;IAKEC,oBALF;IAMEC,IANF;IAOE,GAAGC;EAPL,CAUgB;EAChB,MAAMC,KAAK,GAAG,IAAAC,eAAA,GAAd;;EAEA,MAAMC,iBAAiB,GAAGL,oBAAoB,IAAIG,KAAK,CAACG,IAAN,CAAWC,KAAX,CAAiBC,IAAnE;;EAEA,MAAMC,YAAY,GAAIX,KAAD,IAA4B;IAC/C,IAAIG,IAAI,KAAKS,SAAb,EAAwB;MACtB,IAAIC,KAAK,CAACC,OAAN,CAAcX,IAAd,KAAuB,OAAOA,IAAP,KAAgB,UAA3C,EAAuD;QACrD,OAAO,IAAAY,4BAAA,EAAcZ,IAAd,EAAoBH,KAApB,CAAP;MACD,CAFD,MAEO;QACL,OAAO,IAAAgB,4BAAA,EAAcb,IAAd,EAAoBH,KAApB,C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ACD;EACF,CAlBD,EAkBG,CAACA,KAAD,CAlBH;EAoBA,OACE,8BAAC,0BAAD,eACMI,IADN;IAEE,GAAG,EAAEP,GAFP;IAGE,YAAY,EAAE2B,aAHhB;IAIE,KAAK,EAAEL,MAJT;IAKE,WAAW,EAAEpB,WALf;IAME,oBAAoB,EAAEQ,iBANxB;IAOE,QAAQ,EAAEN,QAPZ;IAQE,QAAQ,EAAE,CAACA;EARb,GADF;AAYD,CArFsB,CAAzB;;AAwFAP,gBAAgB,CAACgC,WAAjB,GAA+B,kBAA/B;eAEehC,gB"}
@@ -1,6 +1,8 @@
1
1
  "use strict";
2
2
 
3
- exports.__esModule = true;
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
4
6
  exports.default = void 0;
5
7
 
6
8
  var React = _interopRequireWildcard(require("react"));
@@ -15,15 +17,16 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
15
17
 
16
18
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
17
19
 
18
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
20
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
19
21
 
20
- const PressableInputContainer = ({
21
- onPress,
22
- disabled,
23
- style,
24
- children,
25
- ...rest
26
- }) => {
22
+ const PressableInputContainer = _ref => {
23
+ let {
24
+ onPress,
25
+ disabled,
26
+ style,
27
+ children,
28
+ ...rest
29
+ } = _ref;
27
30
  return React.createElement(_styled.StyledPressableSurface, {
28
31
  onPress: onPress,
29
32
  disabled: disabled,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/components/atoms/Input/PressableInputContainer/PressableInputContainer.tsx"],"names":["PressableInputContainer","onPress","disabled","style","children","rest"],"mappings":";;;;;AAAA;;AAEA;;AAGA;;;;;;;;;;AAcA,MAAMA,uBAA+D,GAAG,CAAC;AACvEC,EAAAA,OADuE;AAEvEC,EAAAA,QAFuE;AAGvEC,EAAAA,KAHuE;AAIvEC,EAAAA,QAJuE;AAKvE,KAAGC;AALoE,CAAD,KAMlE;AACJ,SACE,oBAAC,8BAAD;AAAwB,IAAA,OAAO,EAAEJ,OAAjC;AAA0C,IAAA,QAAQ,EAAEC,QAApD;AAA8D,IAAA,KAAK,EAAEC;AAArE,KACE,oBAAC,uBAAD;AAAgB,IAAA,QAAQ,EAAED;AAA1B,KAAwCG,IAAxC,GACGD,QADH,CADF,CADF;AAOD,CAdD;;eAgBeJ,uB","sourcesContent":["import * as React from 'react';\nimport { PressableStateCallbackType, StyleProp, ViewStyle } from 'react-native';\nimport InputContainer, {\n InputContainerProps,\n} from '../InputContainer/InputContainer';\nimport { StyledPressableSurface } from './styled';\n\nexport interface PressableInputContainerProps\n extends Omit<\n InputContainerProps,\n 'value' | 'onChange' | 'onChangeText' | 'disabled' | 'style'\n > {\n onPress?: () => void | never;\n disabled?: boolean;\n style?:\n | StyleProp<ViewStyle>\n | ((state: PressableStateCallbackType) => StyleProp<ViewStyle>);\n}\n\nconst PressableInputContainer: React.FC<PressableInputContainerProps> = ({\n onPress,\n disabled,\n style,\n children,\n ...rest\n}) => {\n return (\n <StyledPressableSurface onPress={onPress} disabled={disabled} style={style}>\n <InputContainer disabled={disabled} {...rest}>\n {children}\n </InputContainer>\n </StyledPressableSurface>\n );\n};\n\nexport default PressableInputContainer;\n"],"file":"PressableInputContainer.js"}
1
+ {"version":3,"file":"PressableInputContainer.js","names":["PressableInputContainer","onPress","disabled","style","children","rest"],"sources":["../../../../../src/components/atoms/Input/PressableInputContainer/PressableInputContainer.tsx"],"sourcesContent":["import * as React from 'react';\nimport { PressableStateCallbackType, StyleProp, ViewStyle } from 'react-native';\nimport InputContainer, {\n InputContainerProps,\n} from '../InputContainer/InputContainer';\nimport { StyledPressableSurface } from './styled';\n\nexport interface PressableInputContainerProps\n extends Omit<\n InputContainerProps,\n 'value' | 'onChange' | 'onChangeText' | 'disabled' | 'style'\n > {\n onPress?: () => void | never;\n disabled?: boolean;\n style?:\n | StyleProp<ViewStyle>\n | ((state: PressableStateCallbackType) => StyleProp<ViewStyle>);\n}\n\nconst PressableInputContainer: React.FC<PressableInputContainerProps> = ({\n onPress,\n disabled,\n style,\n children,\n ...rest\n}) => {\n return (\n <StyledPressableSurface onPress={onPress} disabled={disabled} style={style}>\n <InputContainer disabled={disabled} {...rest}>\n {children}\n </InputContainer>\n </StyledPressableSurface>\n );\n};\n\nexport default PressableInputContainer;\n"],"mappings":";;;;;;;AAAA;;AAEA;;AAGA;;;;;;;;;;AAcA,MAAMA,uBAA+D,GAAG,QAMlE;EAAA,IANmE;IACvEC,OADuE;IAEvEC,QAFuE;IAGvEC,KAHuE;IAIvEC,QAJuE;IAKvE,GAAGC;EALoE,CAMnE;EACJ,OACE,oBAAC,8BAAD;IAAwB,OAAO,EAAEJ,OAAjC;IAA0C,QAAQ,EAAEC,QAApD;IAA8D,KAAK,EAAEC;EAArE,GACE,oBAAC,uBAAD;IAAgB,QAAQ,EAAED;EAA1B,GAAwCG,IAAxC,GACGD,QADH,CADF,CADF;AAOD,CAdD;;eAgBeJ,uB"}
@@ -1 +1,2 @@
1
- export { default as PressableInputContainer, PressableInputContainerProps, } from './PressableInputContainer';
1
+ export { default as PressableInputContainer } from './PressableInputContainer';
2
+ export type { PressableInputContainerProps } from './PressableInputContainer';
@@ -1,14 +1,16 @@
1
1
  "use strict";
2
2
 
3
- exports.__esModule = true;
4
- exports.PressableInputContainerProps = exports.PressableInputContainer = void 0;
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "PressableInputContainer", {
7
+ enumerable: true,
8
+ get: function () {
9
+ return _PressableInputContainer.default;
10
+ }
11
+ });
5
12
 
6
- var _PressableInputContainer = _interopRequireWildcard(require("./PressableInputContainer"));
13
+ var _PressableInputContainer = _interopRequireDefault(require("./PressableInputContainer"));
7
14
 
8
- exports.PressableInputContainer = _PressableInputContainer.default;
9
- exports.PressableInputContainerProps = _PressableInputContainer.PressableInputContainerProps;
10
-
11
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
12
-
13
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
15
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
14
16
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/components/atoms/Input/PressableInputContainer/index.ts"],"names":[],"mappings":";;;;;AAAA","sourcesContent":["export {\n default as PressableInputContainer,\n PressableInputContainerProps,\n} from './PressableInputContainer';\n"],"file":"index.js"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../../../src/components/atoms/Input/PressableInputContainer/index.ts"],"sourcesContent":["export { default as PressableInputContainer } from './PressableInputContainer';\nexport type { PressableInputContainerProps } from './PressableInputContainer';\n"],"mappings":";;;;;;;;;;;;AAAA"}
@@ -1,14 +1,19 @@
1
1
  "use strict";
2
2
 
3
- exports.__esModule = true;
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
4
6
  exports.StyledPressableSurface = void 0;
5
7
 
6
8
  var _native = _interopRequireDefault(require("@emotion/native"));
7
9
 
10
+ var _templateObject;
11
+
8
12
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
9
13
 
10
- const StyledPressableSurface = _native.default.Pressable`
11
- width: 100%;
12
- `;
14
+ function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
15
+
16
+ const StyledPressableSurface = _native.default.Pressable(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: 100%;\n"])));
17
+
13
18
  exports.StyledPressableSurface = StyledPressableSurface;
14
19
  //# sourceMappingURL=styled.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/components/atoms/Input/PressableInputContainer/styled.ts"],"names":["StyledPressableSurface","styled","Pressable"],"mappings":";;;;;AAAA;;;;AAEO,MAAMA,sBAAsB,GAAGC,gBAAOC,SAAU;AACvD;AACA,CAFO","sourcesContent":["import styled from '@emotion/native';\n\nexport const StyledPressableSurface = styled.Pressable`\n width: 100%;\n`;\n"],"file":"styled.js"}
1
+ {"version":3,"file":"styled.js","names":["StyledPressableSurface","styled","Pressable"],"sources":["../../../../../src/components/atoms/Input/PressableInputContainer/styled.ts"],"sourcesContent":["import styled from '@emotion/native';\n\nexport const StyledPressableSurface = styled.Pressable`\n width: 100%;\n`;\n"],"mappings":";;;;;;;AAAA;;;;;;;;AAEO,MAAMA,sBAAsB,GAAGC,eAAA,CAAOC,SAAV,uFAA5B"}
@@ -1,11 +1,14 @@
1
1
  "use strict";
2
2
 
3
- exports.__esModule = true;
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
4
6
  exports.useInputFocus = void 0;
5
7
 
6
8
  var _react = require("react");
7
9
 
8
- const useInputFocus = (onFocus, onBlur, focusEnabled = true) => {
10
+ const useInputFocus = function (onFocus, onBlur) {
11
+ let focusEnabled = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
9
12
  const [focused, setFocused] = (0, _react.useState)(false);
10
13
  const handleFocus = (0, _react.useCallback)(() => {
11
14
  if (focusEnabled) {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/components/atoms/Input/hooks/useInputFocus.ts"],"names":["useInputFocus","onFocus","onBlur","focusEnabled","focused","setFocused","handleFocus","handleBlur"],"mappings":";;;;;AAAA;;AAEO,MAAMA,aAAa,GAAG,CAC3BC,OAD2B,EAE3BC,MAF2B,EAG3BC,YAAY,GAAG,IAHY,KAIxB;AACH,QAAM,CAACC,OAAD,EAAUC,UAAV,IAAwB,qBAAkB,KAAlB,CAA9B;AAEA,QAAMC,WAAW,GAAG,wBAAY,MAAM;AACpC,QAAIH,YAAJ,EAAkB;AAChBE,MAAAA,UAAU,CAAC,IAAD,CAAV;AACAJ,MAAAA,OAAO,IAAIA,OAAO,EAAlB;AACD;AACF,GALmB,EAKjB,CAACE,YAAD,EAAeE,UAAf,EAA2BJ,OAA3B,CALiB,CAApB;AAOA,QAAMM,UAAU,GAAG,wBAAY,MAAM;AACnC,QAAIJ,YAAJ,EAAkB;AAChBE,MAAAA,UAAU,CAAC,KAAD,CAAV;AACAH,MAAAA,MAAM,IAAIA,MAAM,EAAhB;AACD;AACF,GALkB,EAKhB,CAACC,YAAD,EAAeE,UAAf,EAA2BH,MAA3B,CALgB,CAAnB;AAOA,SAAO;AACLE,IAAAA,OADK;AAELG,IAAAA,UAFK;AAGLD,IAAAA;AAHK,GAAP;AAKD,CA1BM","sourcesContent":["import { useCallback, useState } from 'react';\n\nexport const useInputFocus = (\n onFocus?: () => void,\n onBlur?: () => void,\n focusEnabled = true\n) => {\n const [focused, setFocused] = useState<boolean>(false);\n\n const handleFocus = useCallback(() => {\n if (focusEnabled) {\n setFocused(true);\n onFocus && onFocus();\n }\n }, [focusEnabled, setFocused, onFocus]);\n\n const handleBlur = useCallback(() => {\n if (focusEnabled) {\n setFocused(false);\n onBlur && onBlur();\n }\n }, [focusEnabled, setFocused, onBlur]);\n\n return {\n focused,\n handleBlur,\n handleFocus,\n };\n};\n"],"file":"useInputFocus.js"}
1
+ {"version":3,"file":"useInputFocus.js","names":["useInputFocus","onFocus","onBlur","focusEnabled","focused","setFocused","useState","handleFocus","useCallback","handleBlur"],"sources":["../../../../../src/components/atoms/Input/hooks/useInputFocus.ts"],"sourcesContent":["import { useCallback, useState } from 'react';\n\nexport const useInputFocus = (\n onFocus?: () => void,\n onBlur?: () => void,\n focusEnabled = true\n) => {\n const [focused, setFocused] = useState<boolean>(false);\n\n const handleFocus = useCallback(() => {\n if (focusEnabled) {\n setFocused(true);\n onFocus && onFocus();\n }\n }, [focusEnabled, setFocused, onFocus]);\n\n const handleBlur = useCallback(() => {\n if (focusEnabled) {\n setFocused(false);\n onBlur && onBlur();\n }\n }, [focusEnabled, setFocused, onBlur]);\n\n return {\n focused,\n handleBlur,\n handleFocus,\n };\n};\n"],"mappings":";;;;;;;AAAA;;AAEO,MAAMA,aAAa,GAAG,UAC3BC,OAD2B,EAE3BC,MAF2B,EAIxB;EAAA,IADHC,YACG,uEADY,IACZ;EACH,MAAM,CAACC,OAAD,EAAUC,UAAV,IAAwB,IAAAC,eAAA,EAAkB,KAAlB,CAA9B;EAEA,MAAMC,WAAW,GAAG,IAAAC,kBAAA,EAAY,MAAM;IACpC,IAAIL,YAAJ,EAAkB;MAChBE,UAAU,CAAC,IAAD,CAAV;MACAJ,OAAO,IAAIA,OAAO,EAAlB;IACD;EACF,CALmB,EAKjB,CAACE,YAAD,EAAeE,UAAf,EAA2BJ,OAA3B,CALiB,CAApB;EAOA,MAAMQ,UAAU,GAAG,IAAAD,kBAAA,EAAY,MAAM;IACnC,IAAIL,YAAJ,EAAkB;MAChBE,UAAU,CAAC,KAAD,CAAV;MACAH,MAAM,IAAIA,MAAM,EAAhB;IACD;EACF,CALkB,EAKhB,CAACC,YAAD,EAAeE,UAAf,EAA2BH,MAA3B,CALgB,CAAnB;EAOA,OAAO;IACLE,OADK;IAELK,UAFK;IAGLF;EAHK,CAAP;AAKD,CA1BM"}
@@ -1,6 +1,8 @@
1
1
  "use strict";
2
2
 
3
- exports.__esModule = true;
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
4
6
  exports.useNumberMask = exports.getInternalNumberAndMask = void 0;
5
7
 
6
8
  var _currency = _interopRequireDefault(require("currency.js"));
@@ -18,7 +20,7 @@ const DEFAULT_OPTIONS = {
18
20
  precision: 2
19
21
  };
20
22
 
21
- const getRegex = precision => new RegExp(`\\B(?=(\\d{${precision}})(?!\\d))`, 'g');
23
+ const getRegex = precision => new RegExp("\\B(?=(\\d{".concat(precision, "})(?!\\d))"), 'g');
22
24
 
23
25
  const getInternalNumberAndMask = (value, options) => {
24
26
  const mergedOptions = { ...DEFAULT_OPTIONS,
@@ -38,7 +40,7 @@ const getInternalNumberAndMask = (value, options) => {
38
40
  if (decimalIndex !== -1 && currentPrecision <= stringValue.length) {
39
41
  const zeros = stringValue.length + 1 - currentPrecision;
40
42
 
41
- for (let i = 0; i < zeros; i++) stringValue = stringValue + `0`;
43
+ for (let i = 0; i < zeros; i++) stringValue = stringValue + "0";
42
44
  }
43
45
 
44
46
  internalNumber = Number(stringValue);
@@ -68,7 +70,8 @@ const getInternalNumberAndMask = (value, options) => {
68
70
  exports.getInternalNumberAndMask = getInternalNumberAndMask;
69
71
 
70
72
  const useNumberMask = (options, defaultValue) => {
71
- const applyMask = (0, _react.useCallback)((value = 0) => {
73
+ const applyMask = (0, _react.useCallback)(function () {
74
+ let value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
72
75
  const {
73
76
  internalNumber,
74
77
  mergedOptions
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/components/atoms/Input/hooks/useNumberMask.ts"],"names":["DEFAULT_OPTIONS","symbol","separator","decimal","precision","getRegex","RegExp","getInternalNumberAndMask","value","options","mergedOptions","internalNumber","stringValue","String","decimalIndex","indexOf","currentPrecision","length","zeros","i","Number","onlyNumbers","padZeros","padStart","replace","MAX_SAFE_INTEGER","MIN_SAFE_INTEGER","useNumberMask","defaultValue","applyMask","raw","formatted","format","setValue","handleChangeValue","formattedValue"],"mappings":";;;;;AAAA;;AACA;;AACA;;;;AAKA,MAAMA,eAAgC,GAAG;AACvCC,EAAAA,MAAM,EAAE,KAD+B;AAEvCC,EAAAA,SAAS,EAAE,GAF4B;AAGvCC,EAAAA,OAAO,EAAE,GAH8B;AAIvCC,EAAAA,SAAS,EAAE;AAJ4B,CAAzC;;AAOA,MAAMC,QAAQ,GAAID,SAAD,IACf,IAAIE,MAAJ,CAAY,cAAaF,SAAU,YAAnC,EAAgD,GAAhD,CADF;;AAGO,MAAMG,wBAAwB,GAAG,CACtCC,KADsC,EAEtCC,OAFsC,KAGyB;AAC/D,QAAMC,aAAa,GAAG,EAAE,GAAGV,eAAL;AAAsB,OAAGS;AAAzB,GAAtB;AACA,QAAM;AAAEL,IAAAA,SAAS,GAAG,CAAC;AAAf,MAAqBM,aAA3B;AAEA,MAAIC,cAAJ;;AAEA,MAAI,OAAOH,KAAP,KAAiB,QAArB,EAA+B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AAa,GAAG,CAC3BlB,OAD2B,EAE3BmB,YAF2B,KAGuB;AAClD,QAAMC,SAAS,GAAG,wBAChB,CAACrB,KAAsB,GAAG,CAA1B,KAA2C;AACzC,UAAM;AAAEG,MAAAA,cAAF;AAAkBD,MAAAA;AAAlB,QAAoCH,wBAAwB,CAChEC,KADgE,EAEhEC,OAFgE,CAAlE;AAKA,WAAO;AACLqB,MAAAA,GAAG,EAAEnB,cADA;AAELoB,MAAAA,SAAS,EAAE,uBAASpB,cAAT,EAAyBqB,MAAzB,CAAgCtB,aAAhC;AAFN,KAAP;AAID,GAXe,EAYhB,CAACD,OAAD,EAAUJ,QAAV,CAZgB,CAAlB;AAeA,QAAM,CAACG,KAAD,EAAQyB,QAAR,IAAoB,qBAAoBJ,SAAS,CAACD,YAAD,CAA7B,CAA1B;AAEA,QAAMM,iBAAiB,GAAG,wBACvBC,cAAD,IAAqC;AACnC,UAAM;AAAEL,MAAAA,GAAF;AAAOC,MAAAA;AAAP,QAAqBF,SAAS,CAACM,cAAD,CAApC;AACAF,IAAAA,QAAQ,CAAC;AACPH,MAAAA,GADO;AAEPC,MAAAA;AAFO,KAAD,CAAR;AAID,GAPuB,EAQxB,CAACF,SAAD,EAAYI,QAAZ,CARwB,CAA1B;AAWA,SAAO,CAACzB,KAAD,EAAQ0B,iBAAR,CAAP;AACD,CAjCM","sourcesContent":["import currency from 'currency.js';\nimport { useCallback, useState } from 'react';\nimport { extractNumbersFromString } from '../../../../utils/extractNumbersFromString';\nimport { MaskValue } from './useStringMask';\n\nexport type CurrencyOptions = currency.Options;\n\nconst DEFAULT_OPTIONS: CurrencyOptions = {\n symbol: 'R$ ',\n separator: '.',\n decimal: ',',\n precision: 2,\n};\n\nconst getRegex = (precision: number) =>\n new RegExp(`\\\\B(?=(\\\\d{${precision}})(?!\\\\d))`, 'g');\n\nexport const getInternalNumberAndMask = (\n value: string | number,\n options?: CurrencyOptions\n): { internalNumber: number; mergedOptions: CurrencyOptions } => {\n const mergedOptions = { ...DEFAULT_OPTIONS, ...options };\n const { precision = -1 } = mergedOptions;\n\n let internalNumber;\n\n if (typeof value === 'number') {\n if (precision) {\n let stringValue = String(value);\n const decimalIndex = stringValue.indexOf('.');\n const currentPrecision = decimalIndex + precision;\n if (decimalIndex !== -1 && currentPrecision <= stringValue.length) {\n const zeros = stringValue.length + 1 - currentPrecision;\n for (let i = 0; i < zeros; i++) stringValue = stringValue + `0`;\n }\n internalNumber = Number(stringValue);\n } else {\n internalNumber = value;\n }\n } else {\n const onlyNumbers = String(extractNumbersFromString(value));\n const padZeros = String(onlyNumbers).padStart(precision + 1, '0');\n internalNumber = Number(padZeros.replace(getRegex(precision), '.'));\n }\n\n if (internalNumber > Number.MAX_SAFE_INTEGER) {\n internalNumber = Number.MAX_SAFE_INTEGER;\n }\n\n if (internalNumber < Number.MIN_SAFE_INTEGER) {\n internalNumber = Number.MIN_SAFE_INTEGER;\n }\n\n return {\n internalNumber,\n mergedOptions,\n };\n};\n\n/**\n * TODO:\n * @param options\n * @param defaultValue\n * @returns\n */\nexport const useNumberMask = (\n options?: CurrencyOptions,\n defaultValue?: string | number\n): [MaskValue, (value: string | number) => void] => {\n const applyMask = useCallback(\n (value: string | number = 0): MaskValue => {\n const { internalNumber, mergedOptions } = getInternalNumberAndMask(\n value,\n options\n );\n\n return {\n raw: internalNumber,\n formatted: currency(internalNumber).format(mergedOptions),\n };\n },\n [options, getRegex]\n );\n\n const [value, setValue] = useState<MaskValue>(applyMask(defaultValue));\n\n const handleChangeValue = useCallback(\n (formattedValue: string | number) => {\n const { raw, formatted } = applyMask(formattedValue);\n setValue({\n raw,\n formatted,\n });\n },\n [applyMask, setValue]\n );\n\n return [value, handleChangeValue];\n};\n"],"file":"useNumberMask.js"}
1
+ {"version":3,"file":"useNumberMask.js","names":["DEFAULT_OPTIONS","symbol","separator","decimal","precision","getRegex","RegExp","getInternalNumberAndMask","value","options","mergedOptions","internalNumber","stringValue","String","decimalIndex","indexOf","currentPrecision","length","zeros","i","Number","onlyNumbers","extractNumbersFromString","padZeros","padStart","replace","MAX_SAFE_INTEGER","MIN_SAFE_INTEGER","useNumberMask","defaultValue","applyMask","useCallback","raw","formatted","currency","format","setValue","useState","handleChangeValue","formattedValue"],"sources":["../../../../../src/components/atoms/Input/hooks/useNumberMask.ts"],"sourcesContent":["import currency from 'currency.js';\nimport { useCallback, useState } from 'react';\nimport { extractNumbersFromString } from '../../../../utils/extractNumbersFromString';\nimport { MaskValue } from './useStringMask';\n\nexport type CurrencyOptions = currency.Options;\n\nconst DEFAULT_OPTIONS: CurrencyOptions = {\n symbol: 'R$ ',\n separator: '.',\n decimal: ',',\n precision: 2,\n};\n\nconst getRegex = (precision: number) =>\n new RegExp(`\\\\B(?=(\\\\d{${precision}})(?!\\\\d))`, 'g');\n\nexport const getInternalNumberAndMask = (\n value: string | number,\n options?: CurrencyOptions\n): { internalNumber: number; mergedOptions: CurrencyOptions } => {\n const mergedOptions = { ...DEFAULT_OPTIONS, ...options };\n const { precision = -1 } = mergedOptions;\n\n let internalNumber;\n\n if (typeof value === 'number') {\n if (precision) {\n let stringValue = String(value);\n const decimalIndex = stringValue.indexOf('.');\n const currentPrecision = decimalIndex + precision;\n if (decimalIndex !== -1 && currentPrecision <= stringValue.length) {\n const zeros = stringValue.length + 1 - currentPrecision;\n for (let i = 0; i < zeros; i++) stringValue = stringValue + `0`;\n }\n internalNumber = Number(stringValue);\n } else {\n internalNumber = value;\n }\n } else {\n const onlyNumbers = String(extractNumbersFromString(value));\n const padZeros = String(onlyNumbers).padStart(precision + 1, '0');\n internalNumber = Number(padZeros.replace(getRegex(precision), '.'));\n }\n\n if (internalNumber > Number.MAX_SAFE_INTEGER) {\n internalNumber = Number.MAX_SAFE_INTEGER;\n }\n\n if (internalNumber < Number.MIN_SAFE_INTEGER) {\n internalNumber = Number.MIN_SAFE_INTEGER;\n }\n\n return {\n internalNumber,\n mergedOptions,\n };\n};\n\n/**\n * TODO:\n * @param options\n * @param defaultValue\n * @returns\n */\nexport const useNumberMask = (\n options?: CurrencyOptions,\n defaultValue?: string | number\n): [MaskValue, (value: string | number) => void] => {\n const applyMask = useCallback(\n (value: string | number = 0): MaskValue => {\n const { internalNumber, mergedOptions } = getInternalNumberAndMask(\n value,\n options\n );\n\n return {\n raw: internalNumber,\n formatted: currency(internalNumber).format(mergedOptions),\n };\n },\n [options, getRegex]\n );\n\n const [value, setValue] = useState<MaskValue>(applyMask(defaultValue));\n\n const handleChangeValue = useCallback(\n (formattedValue: string | number) => {\n const { raw, formatted } = applyMask(formattedValue);\n setValue({\n raw,\n formatted,\n });\n },\n [applyMask, setValue]\n );\n\n return [value, handleChangeValue];\n};\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;;;AAKA,MAAMA,eAAgC,GAAG;EACvCC,MAAM,EAAE,KAD+B;EAEvCC,SAAS,EAAE,GAF4B;EAGvCC,OAAO,EAAE,GAH8B;EAIvCC,SAAS,EAAE;AAJ4B,CAAzC;;AAOA,MAAMC,QAAQ,GAAID,SAAD,IACf,IAAIE,MAAJ,sBAAyBF,SAAzB,iBAAgD,GAAhD,CADF;;AAGO,MAAMG,wBAAwB,GAAG,CACtCC,KADsC,EAEtCC,OAFsC,KAGyB;EAC/D,MAAMC,aAAa,GAAG,EAAE,GAAGV,eAAL;IAAsB,GAAGS;EAAzB,CAAtB;EACA,MAAM;IAAEL,SAAS,GAAG,CAAC;EAAf,IAAqBM,aAA3B;EAEA,IAAIC,cAAJ;;EAEA,IAAI,OAAOH,KAAP,KAAiB,QAArB,EAA+B;IAC7B,IAAIJ,SAAJ,EAAe;MACb,IAAIQ,WAAW,GAAGC,MAAM,CAACL,KAAD,CAAxB;MACA,MAAMM,YAAY,GAAGF,WAAW,CAACG,OAAZ,CAAoB,GAApB,CAArB;MACA,MAAMC,gBAAgB,GAAGF,YAAY,GAAGV,SAAxC;;MACA,IAAIU,YAAY,KAAK,CAAC,CAAlB,IAAuBE,gBAAgB,IAAIJ,WAAW,CAACK,MAA3D,EAAmE;QAC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wB,MAAzB,CAAgCzB,aAAhC;IAFN,CAAP;EAID,CAXe,EAYhB,CAACD,OAAD,EAAUJ,QAAV,CAZgB,CAAlB;EAeA,MAAM,CAACG,KAAD,EAAQ4B,QAAR,IAAoB,IAAAC,eAAA,EAAoBP,SAAS,CAACD,YAAD,CAA7B,CAA1B;EAEA,MAAMS,iBAAiB,GAAG,IAAAP,kBAAA,EACvBQ,cAAD,IAAqC;IACnC,MAAM;MAAEP,GAAF;MAAOC;IAAP,IAAqBH,SAAS,CAACS,cAAD,CAApC;IACAH,QAAQ,CAAC;MACPJ,GADO;MAEPC;IAFO,CAAD,CAAR;EAID,CAPuB,EAQxB,CAACH,SAAD,EAAYM,QAAZ,CARwB,CAA1B;EAWA,OAAO,CAAC5B,KAAD,EAAQ8B,iBAAR,CAAP;AACD,CAjCM"}
@@ -1,11 +1,15 @@
1
1
  "use strict";
2
2
 
3
- exports.__esModule = true;
4
- exports.useStringMask = exports.getMask = exports.mergeMask = void 0;
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.useStringMask = exports.mergeMask = exports.getMask = void 0;
5
7
 
6
8
  var _react = require("react");
7
9
 
8
- const mergeMask = (value = '', mask) => {
10
+ const mergeMask = function () {
11
+ let value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
12
+ let mask = arguments.length > 1 ? arguments[1] : undefined;
9
13
  let formatted = '';
10
14
  let raw = '';
11
15
  let iMask = 0;
@@ -78,7 +82,8 @@ const getMask = (mask, newValue) => {
78
82
  exports.getMask = getMask;
79
83
 
80
84
  const useStringMask = (mask, defaultValue) => {
81
- const applyMask = (0, _react.useCallback)((value = '') => {
85
+ const applyMask = (0, _react.useCallback)(function () {
86
+ let value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
82
87
  const selectedMask = getMask(mask, value);
83
88
  const {
84
89
  formatted,
@@ -89,12 +94,12 @@ const useStringMask = (mask, defaultValue) => {
89
94
  formatted
90
95
  };
91
96
  }, [mask]);
92
- const [value, setValue] = (0, _react.useState)(applyMask(defaultValue == null ? void 0 : defaultValue.toString()));
97
+ const [value, setValue] = (0, _react.useState)(applyMask(defaultValue === null || defaultValue === void 0 ? void 0 : defaultValue.toString()));
93
98
  const handleChangeValue = (0, _react.useCallback)(formattedValue => {
94
99
  const {
95
100
  raw,
96
101
  formatted
97
- } = applyMask(formattedValue == null ? void 0 : formattedValue.toString());
102
+ } = applyMask(formattedValue === null || formattedValue === void 0 ? void 0 : formattedValue.toString());
98
103
  setValue({
99
104
  raw,
100
105
  formatted
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/components/atoms/Input/hooks/useStringMask.ts"],"names":["mergeMask","value","mask","formatted","raw","iMask","iChars","length","maskChar","valueChar","rawValueChar","maskCharRegex","Array","isArray","matchRegex","RegExp","test","getMask","newValue","maskArray","regexArray","forEach","exp","push","i","useStringMask","defaultValue","applyMask","selectedMask","setValue","toString","handleChangeValue","formattedValue"],"mappings":";;;;;AAAA;;AAeO,MAAMA,SAAS,GAAG,CAACC,KAAK,GAAG,EAAT,EAAaC,IAAb,KAA6C;AACpE,MAAIC,SAAS,GAAG,EAAhB;AACA,MAAIC,GAAG,GAAG,EAAV;AACA,MAAIC,KAAK,GAAG,CAAZ;AACA,MAAIC,MAAM,GAAG,CAAb;;AAEA,SAAO,EAAED,KAAK,KAAKH,IAAI,CAACK,MAAf,IAAyBD,MAAM,KAAKL,KAAK,CAACM,MAA5C,CAAP,EAA4D;AAC1D,UAAMC,QAAQ,GAAGN,IAAI,CAACG,KAAD,CAArB;AACA,UAAMI,SAAS,GAAGR,KAAK,CAACK,MAAD,CAAvB;;AAEA,QAAIE,QAAQ,KAAKC,SAAjB,EAA4B;AAC1BN,MAAAA,SAAS,IAAIK,QAAb;AACAF,MAAAA,MAAM;AACND,MAAAA,KAAK;AACL;AACD;;AAED,UAAMK,YAAY,GAAGT,KAAK,CAACK,MAAD,CAA1B;;AAEA,QAAI,OAAOE,QAAP,KAAoB,QA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,CAAC5B,KAAD,EAAQ8B,iBAAR,CAAP;AACD,CAjCM","sourcesContent":["import { useCallback, useState } from 'react';\n\nexport interface MaskValue {\n formatted?: string;\n raw?: string | number;\n}\n\nexport type MaskType = string | RegExp | Array<RegExp>;\n\n/**\n * TODO:\n * @param value\n * @param mask\n * @returns\n */\nexport const mergeMask = (value = '', mask: MaskType[]): MaskValue => {\n let formatted = '';\n let raw = '';\n let iMask = 0;\n let iChars = 0;\n\n while (!(iMask === mask.length || iChars === value.length)) {\n const maskChar = mask[iMask];\n const valueChar = value[iChars];\n\n if (maskChar === valueChar) {\n formatted += maskChar;\n iChars++;\n iMask++;\n continue;\n }\n\n const rawValueChar = value[iChars];\n\n if (typeof maskChar === 'object') {\n iChars++;\n\n const maskCharRegex = Array.isArray(maskChar) ? maskChar[0] : maskChar;\n const matchRegex = RegExp(maskCharRegex).test(valueChar);\n\n if (matchRegex) {\n formatted += valueChar;\n raw += rawValueChar;\n iMask++;\n }\n } else {\n formatted += maskChar;\n iMask++;\n }\n }\n\n return { raw, formatted };\n};\n\nexport const getMask = (\n mask: MaskType[] | ((value: string) => MaskType[]),\n newValue: string\n): MaskType[] => {\n let maskArray: MaskType[];\n const regexArray: MaskType[] = [];\n\n if (typeof mask === 'function') {\n maskArray = mask(newValue);\n } else {\n maskArray = mask;\n }\n\n maskArray.forEach(exp => {\n if (typeof exp !== 'string') {\n if (Array.isArray(exp)) regexArray.push(exp);\n else regexArray.push(exp);\n } else {\n for (let i = 0; i < exp.length; i++) {\n if (exp[i] === '\\\\') {\n regexArray.push(exp[i + 1]);\n i++;\n } else {\n if (exp[i] === '9') regexArray.push(/\\d/);\n else if (exp[i] === 'a') regexArray.push(/[a-zA-Z]/);\n else regexArray.push(exp[i]);\n }\n }\n }\n });\n\n return regexArray;\n};\n\n/**\n * TODO:\n * @param mask\n * @param defaultValue\n * @returns\n */\nexport const useStringMask = (\n mask: MaskType[] | ((value: string) => MaskType[]),\n defaultValue?: string | number\n): [MaskValue, (text: string | number) => void] => {\n const applyMask = useCallback(\n (value = ''): MaskValue => {\n const selectedMask = getMask(mask, value);\n const { formatted, raw } = mergeMask(value, selectedMask);\n\n return {\n raw,\n formatted,\n };\n },\n [mask]\n );\n\n const [value, setValue] = useState<MaskValue>(\n applyMask(defaultValue?.toString())\n );\n\n const handleChangeValue = useCallback(\n (formattedValue: string | number) => {\n const { raw, formatted } = applyMask(formattedValue?.toString());\n setValue({\n raw,\n formatted,\n });\n },\n [applyMask, setValue]\n );\n\n return [value, handleChangeValue];\n};\n"],"file":"useStringMask.js"}
1
+ {"version":3,"file":"useStringMask.js","names":["mergeMask","value","mask","formatted","raw","iMask","iChars","length","maskChar","valueChar","rawValueChar","maskCharRegex","Array","isArray","matchRegex","RegExp","test","getMask","newValue","maskArray","regexArray","forEach","exp","push","i","useStringMask","defaultValue","applyMask","useCallback","selectedMask","setValue","useState","toString","handleChangeValue","formattedValue"],"sources":["../../../../../src/components/atoms/Input/hooks/useStringMask.ts"],"sourcesContent":["import { useCallback, useState } from 'react';\n\nexport interface MaskValue {\n formatted?: string;\n raw?: string | number;\n}\n\nexport type MaskType = string | RegExp | Array<RegExp>;\n\n/**\n * TODO:\n * @param value\n * @param mask\n * @returns\n */\nexport const mergeMask = (value = '', mask: MaskType[]): MaskValue => {\n let formatted = '';\n let raw = '';\n let iMask = 0;\n let iChars = 0;\n\n while (!(iMask === mask.length || iChars === value.length)) {\n const maskChar = mask[iMask];\n const valueChar = value[iChars];\n\n if (maskChar === valueChar) {\n formatted += maskChar;\n iChars++;\n iMask++;\n continue;\n }\n\n const rawValueChar = value[iChars];\n\n if (typeof maskChar === 'object') {\n iChars++;\n\n const maskCharRegex = Array.isArray(maskChar) ? maskChar[0] : maskChar;\n const matchRegex = RegExp(maskCharRegex).test(valueChar);\n\n if (matchRegex) {\n formatted += valueChar;\n raw += rawValueChar;\n iMask++;\n }\n } else {\n formatted += maskChar;\n iMask++;\n }\n }\n\n return { raw, formatted };\n};\n\nexport const getMask = (\n mask: MaskType[] | ((value: string) => MaskType[]),\n newValue: string\n): MaskType[] => {\n let maskArray: MaskType[];\n const regexArray: MaskType[] = [];\n\n if (typeof mask === 'function') {\n maskArray = mask(newValue);\n } else {\n maskArray = mask;\n }\n\n maskArray.forEach(exp => {\n if (typeof exp !== 'string') {\n if (Array.isArray(exp)) regexArray.push(exp);\n else regexArray.push(exp);\n } else {\n for (let i = 0; i < exp.length; i++) {\n if (exp[i] === '\\\\') {\n regexArray.push(exp[i + 1]);\n i++;\n } else {\n if (exp[i] === '9') regexArray.push(/\\d/);\n else if (exp[i] === 'a') regexArray.push(/[a-zA-Z]/);\n else regexArray.push(exp[i]);\n }\n }\n }\n });\n\n return regexArray;\n};\n\n/**\n * TODO:\n * @param mask\n * @param defaultValue\n * @returns\n */\nexport const useStringMask = (\n mask: MaskType[] | ((value: string) => MaskType[]),\n defaultValue?: string | number\n): [MaskValue, (text: string | number) => void] => {\n const applyMask = useCallback(\n (value = ''): MaskValue => {\n const selectedMask = getMask(mask, value);\n const { formatted, raw } = mergeMask(value, selectedMask);\n\n return {\n raw,\n formatted,\n };\n },\n [mask]\n );\n\n const [value, setValue] = useState<MaskValue>(\n applyMask(defaultValue?.toString())\n );\n\n const handleChangeValue = useCallback(\n (formattedValue: string | number) => {\n const { raw, formatted } = applyMask(formattedValue?.toString());\n setValue({\n raw,\n formatted,\n });\n },\n [applyMask, setValue]\n );\n\n return [value, handleChangeValue];\n};\n"],"mappings":";;;;;;;AAAA;;AAeO,MAAMA,SAAS,GAAG,YAA6C;EAAA,IAA5CC,KAA4C,uEAApC,EAAoC;EAAA,IAAhCC,IAAgC;EACpE,IAAIC,SAAS,GAAG,EAAhB;EACA,IAAIC,GAAG,GAAG,EAAV;EACA,IAAIC,KAAK,GAAG,CAAZ;EACA,IAAIC,MAAM,GAAG,CAAb;;EAEA,OAAO,EAAED,KAAK,KAAKH,IAAI,CAACK,MAAf,IAAyBD,MAAM,KAAKL,KAAK,CAACM,MAA5C,CAAP,EAA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OD;IAAP,IAAqBwB,SAAS,CAACO,cAAD,aAACA,cAAD,uBAACA,cAAc,CAAEF,QAAhB,EAAD,CAApC;IACAF,QAAQ,CAAC;MACP1B,GADO;MAEPD;IAFO,CAAD,CAAR;EAID,CAPuB,EAQxB,CAACwB,SAAD,EAAYG,QAAZ,CARwB,CAA1B;EAWA,OAAO,CAAC7B,KAAD,EAAQgC,iBAAR,CAAP;AACD,CAjCM"}
@@ -2,8 +2,12 @@ export { default as Hint } from './Hint';
2
2
  export * from './hooks/useInputFocus';
3
3
  export * from './hooks/useNumberMask';
4
4
  export * from './hooks/useStringMask';
5
- export { default as InputContainer, InputContainerProps, InputVariantType, } from './InputContainer/InputContainer';
6
- export { default as InputElement, InputElementProps, } from './InputElement/InputElement';
7
- export { default as InputMaskElement, InputMaskElementProps, } from './InputMaskElement/InputMaskElement';
8
- export { PressableInputContainer, PressableInputContainerProps, } from './PressableInputContainer';
5
+ export { default as InputContainer } from './InputContainer/InputContainer';
6
+ export type { InputContainerProps, InputVariantType, } from './InputContainer/InputContainer';
7
+ export { default as InputElement } from './InputElement/InputElement';
8
+ export type { InputElementProps } from './InputElement/InputElement';
9
+ export { default as InputMaskElement } from './InputMaskElement/InputMaskElement';
10
+ export type { InputMaskElementProps } from './InputMaskElement/InputMaskElement';
11
+ export { PressableInputContainer } from './PressableInputContainer';
12
+ export type { PressableInputContainerProps } from './PressableInputContainer';
9
13
  export { StyledBorderKeeper, disabledInputStyles } from './styled';