@tecsinapse/react-core 1.19.0 → 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 (687) hide show
  1. package/CHANGELOG.md +11 -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 +62 -57
  25. package/dist/components/atoms/BoxContent/styled.js.map +1 -1
  26. package/dist/components/atoms/Button/Button.js +19 -16
  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 +3 -1
  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 +3 -1
  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 +31 -19
  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 +11 -7
  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 +15 -11
  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 +62 -44
  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.js +24 -20
  77. package/dist/components/atoms/GroupButton/GroupButton.js.map +1 -1
  78. package/dist/components/atoms/GroupButton/GroupButtonOption.js +9 -6
  79. package/dist/components/atoms/GroupButton/GroupButtonOption.js.map +1 -1
  80. package/dist/components/atoms/GroupButton/index.d.ts +4 -2
  81. package/dist/components/atoms/GroupButton/index.js +18 -14
  82. package/dist/components/atoms/GroupButton/index.js.map +1 -1
  83. package/dist/components/atoms/GroupButton/styled.js +97 -100
  84. package/dist/components/atoms/GroupButton/styled.js.map +1 -1
  85. package/dist/components/atoms/Icon/Icon.js +14 -11
  86. package/dist/components/atoms/Icon/Icon.js.map +1 -1
  87. package/dist/components/atoms/Icon/helpers.js +13 -7
  88. package/dist/components/atoms/Icon/helpers.js.map +1 -1
  89. package/dist/components/atoms/Icon/index.d.ts +2 -1
  90. package/dist/components/atoms/Icon/index.js +11 -9
  91. package/dist/components/atoms/Icon/index.js.map +1 -1
  92. package/dist/components/atoms/Input/Hint.js +9 -6
  93. package/dist/components/atoms/Input/Hint.js.map +1 -1
  94. package/dist/components/atoms/Input/InputContainer/InputContainer.js +22 -19
  95. package/dist/components/atoms/Input/InputContainer/InputContainer.js.map +1 -1
  96. package/dist/components/atoms/Input/InputElement/InputElement.js +12 -9
  97. package/dist/components/atoms/Input/InputElement/InputElement.js.map +1 -1
  98. package/dist/components/atoms/Input/InputMaskElement/InputMaskElement.js +16 -13
  99. package/dist/components/atoms/Input/InputMaskElement/InputMaskElement.js.map +1 -1
  100. package/dist/components/atoms/Input/PressableInputContainer/PressableInputContainer.js +11 -8
  101. package/dist/components/atoms/Input/PressableInputContainer/PressableInputContainer.js.map +1 -1
  102. package/dist/components/atoms/Input/PressableInputContainer/index.d.ts +2 -1
  103. package/dist/components/atoms/Input/PressableInputContainer/index.js +11 -9
  104. package/dist/components/atoms/Input/PressableInputContainer/index.js.map +1 -1
  105. package/dist/components/atoms/Input/PressableInputContainer/styled.js +9 -4
  106. package/dist/components/atoms/Input/PressableInputContainer/styled.js.map +1 -1
  107. package/dist/components/atoms/Input/hooks/useInputFocus.js +5 -2
  108. package/dist/components/atoms/Input/hooks/useInputFocus.js.map +1 -1
  109. package/dist/components/atoms/Input/hooks/useNumberMask.js +7 -4
  110. package/dist/components/atoms/Input/hooks/useNumberMask.js.map +1 -1
  111. package/dist/components/atoms/Input/hooks/useStringMask.js +10 -5
  112. package/dist/components/atoms/Input/hooks/useStringMask.js.map +1 -1
  113. package/dist/components/atoms/Input/index.d.ts +8 -4
  114. package/dist/components/atoms/Input/index.js +66 -35
  115. package/dist/components/atoms/Input/index.js.map +1 -1
  116. package/dist/components/atoms/Input/styled.js +119 -106
  117. package/dist/components/atoms/Input/styled.js.map +1 -1
  118. package/dist/components/atoms/Paper/Paper.js +13 -8
  119. package/dist/components/atoms/Paper/Paper.js.map +1 -1
  120. package/dist/components/atoms/Paper/index.d.ts +2 -1
  121. package/dist/components/atoms/Paper/index.js +11 -9
  122. package/dist/components/atoms/Paper/index.js.map +1 -1
  123. package/dist/components/atoms/Paper/styled.js +8 -5
  124. package/dist/components/atoms/Paper/styled.js.map +1 -1
  125. package/dist/components/atoms/PressableSurface/PressableSurface.js +27 -18
  126. package/dist/components/atoms/PressableSurface/PressableSurface.js.map +1 -1
  127. package/dist/components/atoms/PressableSurface/index.d.ts +2 -1
  128. package/dist/components/atoms/PressableSurface/index.js +11 -9
  129. package/dist/components/atoms/PressableSurface/index.js.map +1 -1
  130. package/dist/components/atoms/ProgressBar/ProgressBar.js +20 -15
  131. package/dist/components/atoms/ProgressBar/ProgressBar.js.map +1 -1
  132. package/dist/components/atoms/ProgressBar/index.d.ts +2 -1
  133. package/dist/components/atoms/ProgressBar/index.js +11 -9
  134. package/dist/components/atoms/ProgressBar/index.js.map +1 -1
  135. package/dist/components/atoms/ProgressBar/styled.js +38 -29
  136. package/dist/components/atoms/ProgressBar/styled.js.map +1 -1
  137. package/dist/components/atoms/RadioButton/RadioButton.js +15 -11
  138. package/dist/components/atoms/RadioButton/RadioButton.js.map +1 -1
  139. package/dist/components/atoms/RadioButton/index.d.ts +2 -1
  140. package/dist/components/atoms/RadioButton/index.js +11 -9
  141. package/dist/components/atoms/RadioButton/index.js.map +1 -1
  142. package/dist/components/atoms/RadioButton/styled.js +38 -29
  143. package/dist/components/atoms/RadioButton/styled.js.map +1 -1
  144. package/dist/components/atoms/Switch/Switch.js +15 -12
  145. package/dist/components/atoms/Switch/Switch.js.map +1 -1
  146. package/dist/components/atoms/Switch/animation.js +3 -1
  147. package/dist/components/atoms/Switch/animation.js.map +1 -1
  148. package/dist/components/atoms/Switch/index.d.ts +2 -1
  149. package/dist/components/atoms/Switch/index.js +11 -9
  150. package/dist/components/atoms/Switch/index.js.map +1 -1
  151. package/dist/components/atoms/Switch/styled.js +29 -22
  152. package/dist/components/atoms/Switch/styled.js.map +1 -1
  153. package/dist/components/atoms/Tag/Tag.js +14 -11
  154. package/dist/components/atoms/Tag/Tag.js.map +1 -1
  155. package/dist/components/atoms/Tag/index.d.ts +2 -1
  156. package/dist/components/atoms/Tag/index.js +11 -9
  157. package/dist/components/atoms/Tag/index.js.map +1 -1
  158. package/dist/components/atoms/Tag/styled.js +47 -43
  159. package/dist/components/atoms/Tag/styled.js.map +1 -1
  160. package/dist/components/atoms/Text/Text.js +18 -15
  161. package/dist/components/atoms/Text/Text.js.map +1 -1
  162. package/dist/components/atoms/Text/functions.js +3 -1
  163. package/dist/components/atoms/Text/functions.js.map +1 -1
  164. package/dist/components/atoms/Text/index.d.ts +2 -1
  165. package/dist/components/atoms/Text/index.js +11 -9
  166. package/dist/components/atoms/Text/index.js.map +1 -1
  167. package/dist/components/atoms/Text/styled.js +51 -33
  168. package/dist/components/atoms/Text/styled.js.map +1 -1
  169. package/dist/components/atoms/shared/PaperAndCard.js +29 -20
  170. package/dist/components/atoms/shared/PaperAndCard.js.map +1 -1
  171. package/dist/components/molecules/Calendar/Calendar.js +20 -16
  172. package/dist/components/molecules/Calendar/Calendar.js.map +1 -1
  173. package/dist/components/molecules/Calendar/components/MonthWeek.js +16 -12
  174. package/dist/components/molecules/Calendar/components/MonthWeek.js.map +1 -1
  175. package/dist/components/molecules/Calendar/components/Weekdays.js +9 -6
  176. package/dist/components/molecules/Calendar/components/Weekdays.js.map +1 -1
  177. package/dist/components/molecules/Calendar/components/index.js +15 -6
  178. package/dist/components/molecules/Calendar/components/index.js.map +1 -1
  179. package/dist/components/molecules/Calendar/index.d.ts +2 -1
  180. package/dist/components/molecules/Calendar/index.js +11 -12
  181. package/dist/components/molecules/Calendar/index.js.map +1 -1
  182. package/dist/components/molecules/Calendar/styled.js +58 -70
  183. package/dist/components/molecules/Calendar/styled.js.map +1 -1
  184. package/dist/components/molecules/DatePicker/DatePicker.js +33 -30
  185. package/dist/components/molecules/DatePicker/DatePicker.js.map +1 -1
  186. package/dist/components/molecules/DatePicker/index.d.ts +2 -1
  187. package/dist/components/molecules/DatePicker/index.js +11 -9
  188. package/dist/components/molecules/DatePicker/index.js.map +1 -1
  189. package/dist/components/molecules/DatePicker/styled.js +19 -13
  190. package/dist/components/molecules/DatePicker/styled.js.map +1 -1
  191. package/dist/components/molecules/DateTimePicker/DateTimePicker.js +42 -39
  192. package/dist/components/molecules/DateTimePicker/DateTimePicker.js.map +1 -1
  193. package/dist/components/molecules/DateTimePicker/index.d.ts +2 -1
  194. package/dist/components/molecules/DateTimePicker/index.js +11 -9
  195. package/dist/components/molecules/DateTimePicker/index.js.map +1 -1
  196. package/dist/components/molecules/DateTimePicker/styled.js +13 -6
  197. package/dist/components/molecules/DateTimePicker/styled.js.map +1 -1
  198. package/dist/components/molecules/DateTimeSelector/DateTimeSelector.js +28 -26
  199. package/dist/components/molecules/DateTimeSelector/DateTimeSelector.js.map +1 -1
  200. package/dist/components/molecules/DateTimeSelector/Selector.js +18 -14
  201. package/dist/components/molecules/DateTimeSelector/Selector.js.map +1 -1
  202. package/dist/components/molecules/DateTimeSelector/index.d.ts +2 -1
  203. package/dist/components/molecules/DateTimeSelector/index.js +11 -10
  204. package/dist/components/molecules/DateTimeSelector/index.js.map +1 -1
  205. package/dist/components/molecules/DateTimeSelector/styled.js +88 -68
  206. package/dist/components/molecules/DateTimeSelector/styled.js.map +1 -1
  207. package/dist/components/molecules/Grid/functions.js +6 -2
  208. package/dist/components/molecules/Grid/functions.js.map +1 -1
  209. package/dist/components/molecules/Grid/index.js +15 -5
  210. package/dist/components/molecules/Grid/index.js.map +1 -1
  211. package/dist/components/molecules/HintInputContainer/HintInputContainer.js +18 -14
  212. package/dist/components/molecules/HintInputContainer/HintInputContainer.js.map +1 -1
  213. package/dist/components/molecules/HintInputContainer/index.js +9 -4
  214. package/dist/components/molecules/HintInputContainer/index.js.map +1 -1
  215. package/dist/components/molecules/IconTextButton/IconComponent.js +13 -8
  216. package/dist/components/molecules/IconTextButton/IconComponent.js.map +1 -1
  217. package/dist/components/molecules/IconTextButton/IconTextButton.js +3 -1
  218. package/dist/components/molecules/IconTextButton/index.d.ts +1 -1
  219. package/dist/components/molecules/IconTextButton/index.js +9 -9
  220. package/dist/components/molecules/IconTextButton/index.js.map +1 -1
  221. package/dist/components/molecules/IconTextButton/styled.js +15 -14
  222. package/dist/components/molecules/IconTextButton/styled.js.map +1 -1
  223. package/dist/components/molecules/InputPassword/InputPasswordIcon.js +9 -6
  224. package/dist/components/molecules/InputPassword/InputPasswordIcon.js.map +1 -1
  225. package/dist/components/molecules/InputPassword/index.js +9 -4
  226. package/dist/components/molecules/InputPassword/index.js.map +1 -1
  227. package/dist/components/molecules/InputPassword/styled.js +13 -6
  228. package/dist/components/molecules/InputPassword/styled.js.map +1 -1
  229. package/dist/components/molecules/LabeledSwitch/LabeledSwitch.js +3 -1
  230. package/dist/components/molecules/LabeledSwitch/index.d.ts +1 -1
  231. package/dist/components/molecules/LabeledSwitch/index.js +3 -7
  232. package/dist/components/molecules/LabeledSwitch/index.js.map +1 -1
  233. package/dist/components/molecules/Snackbar/Snackbar.js +24 -20
  234. package/dist/components/molecules/Snackbar/Snackbar.js.map +1 -1
  235. package/dist/components/molecules/Snackbar/index.d.ts +2 -1
  236. package/dist/components/molecules/Snackbar/index.js +11 -9
  237. package/dist/components/molecules/Snackbar/index.js.map +1 -1
  238. package/dist/components/molecules/Snackbar/styled.js +52 -76
  239. package/dist/components/molecules/Snackbar/styled.js.map +1 -1
  240. package/dist/components/molecules/TextArea/TextArea.js +29 -26
  241. package/dist/components/molecules/TextArea/TextArea.js.map +1 -1
  242. package/dist/components/molecules/TextArea/index.d.ts +2 -1
  243. package/dist/components/molecules/TextArea/index.js +17 -11
  244. package/dist/components/molecules/TextArea/index.js.map +1 -1
  245. package/dist/components/molecules/TextArea/styled.js +15 -13
  246. package/dist/components/molecules/TextArea/styled.js.map +1 -1
  247. package/dist/hooks/index.js +15 -6
  248. package/dist/hooks/index.js.map +1 -1
  249. package/dist/hooks/useDebouncedState.js +5 -2
  250. package/dist/hooks/useDebouncedState.js.map +1 -1
  251. package/dist/hooks/useTheme.js +3 -1
  252. package/dist/hooks/useTheme.js.map +1 -1
  253. package/dist/index.d.ts +57 -29
  254. package/dist/index.js +303 -187
  255. package/dist/index.js.map +1 -1
  256. package/dist/styles/ThemeProvider.js +8 -5
  257. package/dist/styles/ThemeProvider.js.map +1 -1
  258. package/dist/styles/definitions.js +6 -3
  259. package/dist/styles/definitions.js.map +1 -1
  260. package/dist/styles/light.js +3 -1
  261. package/dist/styles/light.js.map +1 -1
  262. package/dist/types/defaults.js +3 -1
  263. package/dist/utils/IPhoneXHelper.js +3 -1
  264. package/dist/utils/IPhoneXHelper.js.map +1 -1
  265. package/dist/utils/ResponsiveFontSize.js +6 -3
  266. package/dist/utils/ResponsiveFontSize.js.map +1 -1
  267. package/dist/utils/extractNumbersFromString.js +3 -1
  268. package/dist/utils/extractNumbersFromString.js.map +1 -1
  269. package/dist/utils/formatWithMask.js +3 -1
  270. package/dist/utils/formatWithMask.js.map +1 -1
  271. package/dist/utils/index.js +51 -12
  272. package/dist/utils/index.js.map +1 -1
  273. package/dist/utils/lightenDarkenColor.js +3 -1
  274. package/dist/utils/lightenDarkenColor.js.map +1 -1
  275. package/dist/utils/masks.js +5 -3
  276. package/dist/utils/masks.js.map +1 -1
  277. package/dist/utils/variantComplement.js +3 -1
  278. package/dist/utils/variantComplement.js.map +1 -1
  279. package/esm/components/atoms/Avatar/Avatar.d.ts +14 -0
  280. package/esm/components/atoms/Avatar/Avatar.js +50 -0
  281. package/esm/components/atoms/Avatar/Avatar.js.map +1 -0
  282. package/esm/components/atoms/Avatar/helpers.d.ts +1 -0
  283. package/esm/components/atoms/Avatar/helpers.js +12 -0
  284. package/esm/components/atoms/Avatar/helpers.js.map +1 -0
  285. package/esm/components/atoms/Avatar/index.d.ts +2 -0
  286. package/esm/components/atoms/Avatar/index.js +2 -0
  287. package/esm/components/atoms/Avatar/index.js.map +1 -0
  288. package/esm/components/atoms/Avatar/styled.d.ts +28 -0
  289. package/esm/components/atoms/Avatar/styled.js +33 -0
  290. package/esm/components/atoms/Avatar/styled.js.map +1 -0
  291. package/esm/components/atoms/Badge/Badge.d.ts +11 -0
  292. package/esm/components/atoms/Badge/Badge.js +20 -0
  293. package/esm/components/atoms/Badge/Badge.js.map +1 -0
  294. package/esm/components/atoms/Badge/index.d.ts +2 -0
  295. package/esm/components/atoms/Badge/index.js +2 -0
  296. package/esm/components/atoms/Badge/index.js.map +1 -0
  297. package/esm/components/atoms/Badge/styled.d.ts +15 -0
  298. package/esm/components/atoms/Badge/styled.js +20 -0
  299. package/esm/components/atoms/Badge/styled.js.map +1 -0
  300. package/esm/components/atoms/BoxContent/BoxContent.d.ts +7 -0
  301. package/esm/components/atoms/BoxContent/BoxContent.js +18 -0
  302. package/esm/components/atoms/BoxContent/BoxContent.js.map +1 -0
  303. package/esm/components/atoms/BoxContent/index.d.ts +2 -0
  304. package/esm/components/atoms/BoxContent/index.js +2 -0
  305. package/esm/components/atoms/BoxContent/index.js.map +1 -0
  306. package/esm/components/atoms/BoxContent/styled.d.ts +24 -0
  307. package/esm/components/atoms/BoxContent/styled.js +55 -0
  308. package/esm/components/atoms/BoxContent/styled.js.map +1 -0
  309. package/esm/components/atoms/Button/Button.d.ts +28 -0
  310. package/esm/components/atoms/Button/Button.js +76 -0
  311. package/esm/components/atoms/Button/Button.js.map +1 -0
  312. package/esm/components/atoms/Button/States/BaseState.d.ts +7 -0
  313. package/esm/components/atoms/Button/States/BaseState.js +29 -0
  314. package/esm/components/atoms/Button/States/BaseState.js.map +1 -0
  315. package/esm/components/atoms/Button/States/Error.d.ts +4 -0
  316. package/esm/components/atoms/Button/States/Error.js +11 -0
  317. package/esm/components/atoms/Button/States/Error.js.map +1 -0
  318. package/esm/components/atoms/Button/States/Loading.d.ts +4 -0
  319. package/esm/components/atoms/Button/States/Loading.js +26 -0
  320. package/esm/components/atoms/Button/States/Loading.js.map +1 -0
  321. package/esm/components/atoms/Button/States/Success.d.ts +4 -0
  322. package/esm/components/atoms/Button/States/Success.js +11 -0
  323. package/esm/components/atoms/Button/States/Success.js.map +1 -0
  324. package/esm/components/atoms/Button/States/index.d.ts +3 -0
  325. package/esm/components/atoms/Button/States/index.js +4 -0
  326. package/esm/components/atoms/Button/States/index.js.map +1 -0
  327. package/esm/components/atoms/Button/States/styled.d.ts +16 -0
  328. package/esm/components/atoms/Button/States/styled.js +25 -0
  329. package/esm/components/atoms/Button/States/styled.js.map +1 -0
  330. package/esm/components/atoms/Button/index.d.ts +3 -0
  331. package/esm/components/atoms/Button/index.js +3 -0
  332. package/esm/components/atoms/Button/index.js.map +1 -0
  333. package/esm/components/atoms/Button/styled.d.ts +8 -0
  334. package/esm/components/atoms/Button/styled.js +42 -0
  335. package/esm/components/atoms/Button/styled.js.map +1 -0
  336. package/esm/components/atoms/Card/Card.d.ts +9 -0
  337. package/esm/components/atoms/Card/Card.js +33 -0
  338. package/esm/components/atoms/Card/Card.js.map +1 -0
  339. package/esm/components/atoms/Card/Footer/Footer.d.ts +7 -0
  340. package/esm/components/atoms/Card/Footer/Footer.js +13 -0
  341. package/esm/components/atoms/Card/Footer/Footer.js.map +1 -0
  342. package/esm/components/atoms/Card/Footer/index.d.ts +2 -0
  343. package/esm/components/atoms/Card/Footer/index.js +2 -0
  344. package/esm/components/atoms/Card/Footer/index.js.map +1 -0
  345. package/esm/components/atoms/Card/Header/Header.d.ts +7 -0
  346. package/esm/components/atoms/Card/Header/Header.js +13 -0
  347. package/esm/components/atoms/Card/Header/Header.js.map +1 -0
  348. package/esm/components/atoms/Card/Header/index.d.ts +2 -0
  349. package/esm/components/atoms/Card/Header/index.js +2 -0
  350. package/esm/components/atoms/Card/Header/index.js.map +1 -0
  351. package/esm/components/atoms/Card/index.d.ts +2 -0
  352. package/esm/components/atoms/Card/index.js +2 -0
  353. package/esm/components/atoms/Card/index.js.map +1 -0
  354. package/esm/components/atoms/Card/styled.d.ts +8 -0
  355. package/esm/components/atoms/Card/styled.js +11 -0
  356. package/esm/components/atoms/Card/styled.js.map +1 -0
  357. package/esm/components/atoms/Checkbox/Checkbox.d.ts +14 -0
  358. package/esm/components/atoms/Checkbox/Checkbox.js +56 -0
  359. package/esm/components/atoms/Checkbox/Checkbox.js.map +1 -0
  360. package/esm/components/atoms/Checkbox/index.d.ts +2 -0
  361. package/esm/components/atoms/Checkbox/index.js +2 -0
  362. package/esm/components/atoms/Checkbox/index.js.map +1 -0
  363. package/esm/components/atoms/Checkbox/styled.d.ts +27 -0
  364. package/esm/components/atoms/Checkbox/styled.js +50 -0
  365. package/esm/components/atoms/Checkbox/styled.js.map +1 -0
  366. package/esm/components/atoms/Divider/Divider.d.ts +8 -0
  367. package/esm/components/atoms/Divider/Divider.js +18 -0
  368. package/esm/components/atoms/Divider/Divider.js.map +1 -0
  369. package/esm/components/atoms/Divider/index.d.ts +2 -0
  370. package/esm/components/atoms/Divider/index.js +2 -0
  371. package/esm/components/atoms/Divider/index.js.map +1 -0
  372. package/esm/components/atoms/Divider/styled.d.ts +13 -0
  373. package/esm/components/atoms/Divider/styled.js +28 -0
  374. package/esm/components/atoms/Divider/styled.js.map +1 -0
  375. package/esm/components/atoms/GroupButton/GroupButton.d.ts +32 -0
  376. package/esm/components/atoms/GroupButton/GroupButton.js +78 -0
  377. package/esm/components/atoms/GroupButton/GroupButton.js.map +1 -0
  378. package/esm/components/atoms/GroupButton/GroupButtonOption.d.ts +9 -0
  379. package/esm/components/atoms/GroupButton/GroupButtonOption.js +19 -0
  380. package/esm/components/atoms/GroupButton/GroupButtonOption.js.map +1 -0
  381. package/esm/components/atoms/GroupButton/index.d.ts +4 -0
  382. package/esm/components/atoms/GroupButton/index.js +3 -0
  383. package/esm/components/atoms/GroupButton/index.js.map +1 -0
  384. package/esm/components/atoms/GroupButton/styled.d.ts +42 -0
  385. package/esm/components/atoms/GroupButton/styled.js +97 -0
  386. package/esm/components/atoms/GroupButton/styled.js.map +1 -0
  387. package/esm/components/atoms/Icon/Icon.d.ts +14 -0
  388. package/esm/components/atoms/Icon/Icon.js +37 -0
  389. package/esm/components/atoms/Icon/Icon.js.map +1 -0
  390. package/esm/components/atoms/Icon/helpers.d.ts +4 -0
  391. package/esm/components/atoms/Icon/helpers.js +78 -0
  392. package/esm/components/atoms/Icon/helpers.js.map +1 -0
  393. package/esm/components/atoms/Icon/index.d.ts +2 -0
  394. package/esm/components/atoms/Icon/index.js +2 -0
  395. package/esm/components/atoms/Icon/index.js.map +1 -0
  396. package/esm/components/atoms/Input/Hint.d.ts +10 -0
  397. package/esm/components/atoms/Input/Hint.js +41 -0
  398. package/esm/components/atoms/Input/Hint.js.map +1 -0
  399. package/esm/components/atoms/Input/InputContainer/InputContainer.d.ts +29 -0
  400. package/esm/components/atoms/Input/InputContainer/InputContainer.js +66 -0
  401. package/esm/components/atoms/Input/InputContainer/InputContainer.js.map +1 -0
  402. package/esm/components/atoms/Input/InputElement/InputElement.d.ts +13 -0
  403. package/esm/components/atoms/Input/InputElement/InputElement.js +37 -0
  404. package/esm/components/atoms/Input/InputElement/InputElement.js.map +1 -0
  405. package/esm/components/atoms/Input/InputMaskElement/InputMaskElement.d.ts +16 -0
  406. package/esm/components/atoms/Input/InputMaskElement/InputMaskElement.js +92 -0
  407. package/esm/components/atoms/Input/InputMaskElement/InputMaskElement.js.map +1 -0
  408. package/esm/components/atoms/Input/PressableInputContainer/PressableInputContainer.d.ts +10 -0
  409. package/esm/components/atoms/Input/PressableInputContainer/PressableInputContainer.js +30 -0
  410. package/esm/components/atoms/Input/PressableInputContainer/PressableInputContainer.js.map +1 -0
  411. package/esm/components/atoms/Input/PressableInputContainer/index.d.ts +2 -0
  412. package/esm/components/atoms/Input/PressableInputContainer/index.js +2 -0
  413. package/esm/components/atoms/Input/PressableInputContainer/index.js.map +1 -0
  414. package/esm/components/atoms/Input/PressableInputContainer/styled.d.ts +5 -0
  415. package/esm/components/atoms/Input/PressableInputContainer/styled.js +7 -0
  416. package/esm/components/atoms/Input/PressableInputContainer/styled.js.map +1 -0
  417. package/esm/components/atoms/Input/hooks/useInputFocus.d.ts +5 -0
  418. package/esm/components/atoms/Input/hooks/useInputFocus.js +40 -0
  419. package/esm/components/atoms/Input/hooks/useInputFocus.js.map +1 -0
  420. package/esm/components/atoms/Input/hooks/useNumberMask.d.ts +8 -0
  421. package/esm/components/atoms/Input/hooks/useNumberMask.js +108 -0
  422. package/esm/components/atoms/Input/hooks/useNumberMask.js.map +1 -0
  423. package/esm/components/atoms/Input/hooks/useStringMask.d.ts +8 -0
  424. package/esm/components/atoms/Input/hooks/useStringMask.js +116 -0
  425. package/esm/components/atoms/Input/hooks/useStringMask.js.map +1 -0
  426. package/esm/components/atoms/Input/index.d.ts +13 -0
  427. package/esm/components/atoms/Input/index.js +10 -0
  428. package/esm/components/atoms/Input/index.js.map +1 -0
  429. package/esm/components/atoms/Input/styled.d.ts +64 -0
  430. package/esm/components/atoms/Input/styled.js +93 -0
  431. package/esm/components/atoms/Input/styled.js.map +1 -0
  432. package/esm/components/atoms/Paper/Paper.d.ts +8 -0
  433. package/esm/components/atoms/Paper/Paper.js +24 -0
  434. package/esm/components/atoms/Paper/Paper.js.map +1 -0
  435. package/esm/components/atoms/Paper/index.d.ts +2 -0
  436. package/esm/components/atoms/Paper/index.js +2 -0
  437. package/esm/components/atoms/Paper/index.js.map +1 -0
  438. package/esm/components/atoms/Paper/styled.d.ts +9 -0
  439. package/esm/components/atoms/Paper/styled.js +11 -0
  440. package/esm/components/atoms/Paper/styled.js.map +1 -0
  441. package/esm/components/atoms/PressableSurface/PressableSurface.d.ts +10 -0
  442. package/esm/components/atoms/PressableSurface/PressableSurface.js +86 -0
  443. package/esm/components/atoms/PressableSurface/PressableSurface.js.map +1 -0
  444. package/esm/components/atoms/PressableSurface/index.d.ts +2 -0
  445. package/esm/components/atoms/PressableSurface/index.js +2 -0
  446. package/esm/components/atoms/PressableSurface/index.js.map +1 -0
  447. package/esm/components/atoms/ProgressBar/ProgressBar.d.ts +18 -0
  448. package/esm/components/atoms/ProgressBar/ProgressBar.js +90 -0
  449. package/esm/components/atoms/ProgressBar/ProgressBar.js.map +1 -0
  450. package/esm/components/atoms/ProgressBar/index.d.ts +2 -0
  451. package/esm/components/atoms/ProgressBar/index.js +2 -0
  452. package/esm/components/atoms/ProgressBar/index.js.map +1 -0
  453. package/esm/components/atoms/ProgressBar/styled.d.ts +20 -0
  454. package/esm/components/atoms/ProgressBar/styled.js +26 -0
  455. package/esm/components/atoms/ProgressBar/styled.js.map +1 -0
  456. package/esm/components/atoms/RadioButton/RadioButton.d.ts +14 -0
  457. package/esm/components/atoms/RadioButton/RadioButton.js +51 -0
  458. package/esm/components/atoms/RadioButton/RadioButton.js.map +1 -0
  459. package/esm/components/atoms/RadioButton/index.d.ts +2 -0
  460. package/esm/components/atoms/RadioButton/index.js +2 -0
  461. package/esm/components/atoms/RadioButton/index.js.map +1 -0
  462. package/esm/components/atoms/RadioButton/styled.d.ts +27 -0
  463. package/esm/components/atoms/RadioButton/styled.js +30 -0
  464. package/esm/components/atoms/RadioButton/styled.js.map +1 -0
  465. package/esm/components/atoms/Switch/Switch.d.ts +16 -0
  466. package/esm/components/atoms/Switch/Switch.js +87 -0
  467. package/esm/components/atoms/Switch/Switch.js.map +1 -0
  468. package/esm/components/atoms/Switch/animation.d.ts +2 -0
  469. package/esm/components/atoms/Switch/animation.js +33 -0
  470. package/esm/components/atoms/Switch/animation.js.map +1 -0
  471. package/esm/components/atoms/Switch/index.d.ts +2 -0
  472. package/esm/components/atoms/Switch/index.js +2 -0
  473. package/esm/components/atoms/Switch/index.js.map +1 -0
  474. package/esm/components/atoms/Switch/styled.d.ts +16 -0
  475. package/esm/components/atoms/Switch/styled.js +24 -0
  476. package/esm/components/atoms/Switch/styled.js.map +1 -0
  477. package/esm/components/atoms/Tag/Tag.d.ts +12 -0
  478. package/esm/components/atoms/Tag/Tag.js +80 -0
  479. package/esm/components/atoms/Tag/Tag.js.map +1 -0
  480. package/esm/components/atoms/Tag/index.d.ts +2 -0
  481. package/esm/components/atoms/Tag/index.js +2 -0
  482. package/esm/components/atoms/Tag/index.js.map +1 -0
  483. package/esm/components/atoms/Tag/styled.d.ts +24 -0
  484. package/esm/components/atoms/Tag/styled.js +39 -0
  485. package/esm/components/atoms/Tag/styled.js.map +1 -0
  486. package/esm/components/atoms/Text/Text.d.ts +19 -0
  487. package/esm/components/atoms/Text/Text.js +47 -0
  488. package/esm/components/atoms/Text/Text.js.map +1 -0
  489. package/esm/components/atoms/Text/functions.d.ts +2 -0
  490. package/esm/components/atoms/Text/functions.js +7 -0
  491. package/esm/components/atoms/Text/functions.js.map +1 -0
  492. package/esm/components/atoms/Text/index.d.ts +2 -0
  493. package/esm/components/atoms/Text/index.js +2 -0
  494. package/esm/components/atoms/Text/index.js.map +1 -0
  495. package/esm/components/atoms/Text/styled.d.ts +20 -0
  496. package/esm/components/atoms/Text/styled.js +46 -0
  497. package/esm/components/atoms/Text/styled.js.map +1 -0
  498. package/esm/components/atoms/shared/PaperAndCard.d.ts +5 -0
  499. package/esm/components/atoms/shared/PaperAndCard.js +25 -0
  500. package/esm/components/atoms/shared/PaperAndCard.js.map +1 -0
  501. package/esm/components/molecules/Calendar/Calendar.d.ts +20 -0
  502. package/esm/components/molecules/Calendar/Calendar.js +144 -0
  503. package/esm/components/molecules/Calendar/Calendar.js.map +1 -0
  504. package/esm/components/molecules/Calendar/components/MonthWeek.d.ts +13 -0
  505. package/esm/components/molecules/Calendar/components/MonthWeek.js +128 -0
  506. package/esm/components/molecules/Calendar/components/MonthWeek.js.map +1 -0
  507. package/esm/components/molecules/Calendar/components/Weekdays.d.ts +8 -0
  508. package/esm/components/molecules/Calendar/components/Weekdays.js +29 -0
  509. package/esm/components/molecules/Calendar/components/Weekdays.js.map +1 -0
  510. package/esm/components/molecules/Calendar/components/index.d.ts +2 -0
  511. package/esm/components/molecules/Calendar/components/index.js +3 -0
  512. package/esm/components/molecules/Calendar/components/index.js.map +1 -0
  513. package/esm/components/molecules/Calendar/index.d.ts +2 -0
  514. package/esm/components/molecules/Calendar/index.js +2 -0
  515. package/esm/components/molecules/Calendar/index.js.map +1 -0
  516. package/esm/components/molecules/Calendar/styled.d.ts +61 -0
  517. package/esm/components/molecules/Calendar/styled.js +56 -0
  518. package/esm/components/molecules/Calendar/styled.js.map +1 -0
  519. package/esm/components/molecules/DatePicker/DatePicker.d.ts +19 -0
  520. package/esm/components/molecules/DatePicker/DatePicker.js +120 -0
  521. package/esm/components/molecules/DatePicker/DatePicker.js.map +1 -0
  522. package/esm/components/molecules/DatePicker/index.d.ts +2 -0
  523. package/esm/components/molecules/DatePicker/index.js +2 -0
  524. package/esm/components/molecules/DatePicker/index.js.map +1 -0
  525. package/esm/components/molecules/DatePicker/styled.d.ts +15 -0
  526. package/esm/components/molecules/DatePicker/styled.js +22 -0
  527. package/esm/components/molecules/DatePicker/styled.js.map +1 -0
  528. package/esm/components/molecules/DateTimePicker/DateTimePicker.d.ts +17 -0
  529. package/esm/components/molecules/DateTimePicker/DateTimePicker.js +122 -0
  530. package/esm/components/molecules/DateTimePicker/DateTimePicker.js.map +1 -0
  531. package/esm/components/molecules/DateTimePicker/index.d.ts +2 -0
  532. package/esm/components/molecules/DateTimePicker/index.js +2 -0
  533. package/esm/components/molecules/DateTimePicker/index.js.map +1 -0
  534. package/esm/components/molecules/DateTimePicker/styled.d.ts +8 -0
  535. package/esm/components/molecules/DateTimePicker/styled.js +12 -0
  536. package/esm/components/molecules/DateTimePicker/styled.js.map +1 -0
  537. package/esm/components/molecules/DateTimeSelector/DateTimeSelector.d.ts +28 -0
  538. package/esm/components/molecules/DateTimeSelector/DateTimeSelector.js +219 -0
  539. package/esm/components/molecules/DateTimeSelector/DateTimeSelector.js.map +1 -0
  540. package/esm/components/molecules/DateTimeSelector/Selector.d.ts +17 -0
  541. package/esm/components/molecules/DateTimeSelector/Selector.js +113 -0
  542. package/esm/components/molecules/DateTimeSelector/Selector.js.map +1 -0
  543. package/esm/components/molecules/DateTimeSelector/index.d.ts +2 -0
  544. package/esm/components/molecules/DateTimeSelector/index.js +2 -0
  545. package/esm/components/molecules/DateTimeSelector/index.js.map +1 -0
  546. package/esm/components/molecules/DateTimeSelector/styled.d.ts +52 -0
  547. package/esm/components/molecules/DateTimeSelector/styled.js +54 -0
  548. package/esm/components/molecules/DateTimeSelector/styled.js.map +1 -0
  549. package/esm/components/molecules/Grid/functions.d.ts +3 -0
  550. package/esm/components/molecules/Grid/functions.js +16 -0
  551. package/esm/components/molecules/Grid/functions.js.map +1 -0
  552. package/esm/components/molecules/Grid/index.d.ts +42 -0
  553. package/esm/components/molecules/Grid/index.js +2 -0
  554. package/esm/components/molecules/Grid/index.js.map +1 -0
  555. package/esm/components/molecules/HintInputContainer/HintInputContainer.d.ts +17 -0
  556. package/esm/components/molecules/HintInputContainer/HintInputContainer.js +46 -0
  557. package/esm/components/molecules/HintInputContainer/HintInputContainer.js.map +1 -0
  558. package/esm/components/molecules/HintInputContainer/index.d.ts +2 -0
  559. package/esm/components/molecules/HintInputContainer/index.js +2 -0
  560. package/esm/components/molecules/HintInputContainer/index.js.map +1 -0
  561. package/esm/components/molecules/HintInputContainer/styled.d.ts +0 -0
  562. package/esm/components/molecules/HintInputContainer/styled.js +2 -0
  563. package/esm/components/molecules/HintInputContainer/styled.js.map +1 -0
  564. package/esm/components/molecules/IconTextButton/IconComponent.d.ts +9 -0
  565. package/esm/components/molecules/IconTextButton/IconComponent.js +20 -0
  566. package/esm/components/molecules/IconTextButton/IconComponent.js.map +1 -0
  567. package/esm/components/molecules/IconTextButton/IconTextButton.d.ts +8 -0
  568. package/esm/components/molecules/IconTextButton/IconTextButton.js +2 -0
  569. package/esm/components/molecules/IconTextButton/IconTextButton.js.map +1 -0
  570. package/esm/components/molecules/IconTextButton/index.d.ts +2 -0
  571. package/esm/components/molecules/IconTextButton/index.js +2 -0
  572. package/esm/components/molecules/IconTextButton/index.js.map +1 -0
  573. package/esm/components/molecules/IconTextButton/styled.d.ts +11 -0
  574. package/esm/components/molecules/IconTextButton/styled.js +14 -0
  575. package/esm/components/molecules/IconTextButton/styled.js.map +1 -0
  576. package/esm/components/molecules/InputPassword/InputPasswordIcon.d.ts +8 -0
  577. package/esm/components/molecules/InputPassword/InputPasswordIcon.js +33 -0
  578. package/esm/components/molecules/InputPassword/InputPasswordIcon.js.map +1 -0
  579. package/esm/components/molecules/InputPassword/index.d.ts +1 -0
  580. package/esm/components/molecules/InputPassword/index.js +2 -0
  581. package/esm/components/molecules/InputPassword/index.js.map +1 -0
  582. package/esm/components/molecules/InputPassword/styled.d.ts +7 -0
  583. package/esm/components/molecules/InputPassword/styled.js +11 -0
  584. package/esm/components/molecules/InputPassword/styled.js.map +1 -0
  585. package/esm/components/molecules/LabeledSwitch/LabeledSwitch.d.ts +7 -0
  586. package/esm/components/molecules/LabeledSwitch/LabeledSwitch.js +2 -0
  587. package/esm/components/molecules/LabeledSwitch/LabeledSwitch.js.map +1 -0
  588. package/esm/components/molecules/LabeledSwitch/index.d.ts +1 -0
  589. package/esm/components/molecules/LabeledSwitch/index.js +2 -0
  590. package/esm/components/molecules/LabeledSwitch/index.js.map +1 -0
  591. package/esm/components/molecules/Snackbar/Snackbar.d.ts +19 -0
  592. package/esm/components/molecules/Snackbar/Snackbar.js +103 -0
  593. package/esm/components/molecules/Snackbar/Snackbar.js.map +1 -0
  594. package/esm/components/molecules/Snackbar/index.d.ts +2 -0
  595. package/esm/components/molecules/Snackbar/index.js +2 -0
  596. package/esm/components/molecules/Snackbar/index.js.map +1 -0
  597. package/esm/components/molecules/Snackbar/styled.d.ts +47 -0
  598. package/esm/components/molecules/Snackbar/styled.js +54 -0
  599. package/esm/components/molecules/Snackbar/styled.js.map +1 -0
  600. package/esm/components/molecules/TextArea/TextArea.d.ts +14 -0
  601. package/esm/components/molecules/TextArea/TextArea.js +77 -0
  602. package/esm/components/molecules/TextArea/TextArea.js.map +1 -0
  603. package/esm/components/molecules/TextArea/index.d.ts +3 -0
  604. package/esm/components/molecules/TextArea/index.js +3 -0
  605. package/esm/components/molecules/TextArea/index.js.map +1 -0
  606. package/esm/components/molecules/TextArea/styled.d.ts +12 -0
  607. package/esm/components/molecules/TextArea/styled.js +14 -0
  608. package/esm/components/molecules/TextArea/styled.js.map +1 -0
  609. package/esm/hooks/index.d.ts +2 -0
  610. package/esm/hooks/index.js +3 -0
  611. package/esm/hooks/index.js.map +1 -0
  612. package/esm/hooks/useDebouncedState.d.ts +2 -0
  613. package/esm/hooks/useDebouncedState.js +31 -0
  614. package/esm/hooks/useDebouncedState.js.map +1 -0
  615. package/esm/hooks/useTheme.d.ts +2 -0
  616. package/esm/hooks/useTheme.js +5 -0
  617. package/esm/hooks/useTheme.js.map +1 -0
  618. package/esm/index.d.ts +64 -0
  619. package/esm/index.js +36 -0
  620. package/esm/index.js.map +1 -0
  621. package/esm/styles/ThemeProvider.d.ts +4 -0
  622. package/esm/styles/ThemeProvider.js +13 -0
  623. package/esm/styles/ThemeProvider.js.map +1 -0
  624. package/esm/styles/definitions.d.ts +45 -0
  625. package/esm/styles/definitions.js +168 -0
  626. package/esm/styles/definitions.js.map +1 -0
  627. package/esm/styles/light.d.ts +2 -0
  628. package/esm/styles/light.js +42 -0
  629. package/esm/styles/light.js.map +1 -0
  630. package/esm/types/defaults.d.ts +134 -0
  631. package/esm/types/defaults.js +2 -0
  632. package/esm/types/defaults.js.map +1 -0
  633. package/esm/utils/IPhoneXHelper.d.ts +4 -0
  634. package/esm/utils/IPhoneXHelper.js +23 -0
  635. package/esm/utils/IPhoneXHelper.js.map +1 -0
  636. package/esm/utils/ResponsiveFontSize.d.ts +3 -0
  637. package/esm/utils/ResponsiveFontSize.js +37 -0
  638. package/esm/utils/ResponsiveFontSize.js.map +1 -0
  639. package/esm/utils/extractNumbersFromString.d.ts +2 -0
  640. package/esm/utils/extractNumbersFromString.js +7 -0
  641. package/esm/utils/extractNumbersFromString.js.map +1 -0
  642. package/esm/utils/formatWithMask.d.ts +3 -0
  643. package/esm/utils/formatWithMask.js +19 -0
  644. package/esm/utils/formatWithMask.js.map +1 -0
  645. package/esm/utils/index.d.ts +7 -0
  646. package/esm/utils/index.js +8 -0
  647. package/esm/utils/index.js.map +1 -0
  648. package/esm/utils/lightenDarkenColor.d.ts +1 -0
  649. package/esm/utils/lightenDarkenColor.js +18 -0
  650. package/esm/utils/lightenDarkenColor.js.map +1 -0
  651. package/esm/utils/masks.d.ts +11 -0
  652. package/esm/utils/masks.js +19 -0
  653. package/esm/utils/masks.js.map +1 -0
  654. package/esm/utils/variantComplement.d.ts +6 -0
  655. package/esm/utils/variantComplement.js +26 -0
  656. package/esm/utils/variantComplement.js.map +1 -0
  657. package/package.json +9 -4
  658. package/src/components/atoms/Avatar/index.ts +2 -1
  659. package/src/components/atoms/Badge/index.ts +2 -1
  660. package/src/components/atoms/BoxContent/index.ts +2 -1
  661. package/src/components/atoms/Button/index.ts +3 -3
  662. package/src/components/atoms/Card/Footer/index.ts +2 -1
  663. package/src/components/atoms/Card/Header/index.ts +2 -1
  664. package/src/components/atoms/Card/index.ts +2 -1
  665. package/src/components/atoms/Checkbox/index.ts +2 -1
  666. package/src/components/atoms/Divider/index.ts +2 -1
  667. package/src/components/atoms/GroupButton/index.ts +4 -9
  668. package/src/components/atoms/Icon/index.ts +2 -1
  669. package/src/components/atoms/Input/PressableInputContainer/index.ts +2 -4
  670. package/src/components/atoms/Input/index.ts +8 -14
  671. package/src/components/atoms/Paper/index.ts +2 -1
  672. package/src/components/atoms/PressableSurface/index.ts +2 -4
  673. package/src/components/atoms/ProgressBar/index.ts +2 -1
  674. package/src/components/atoms/RadioButton/index.ts +2 -1
  675. package/src/components/atoms/Switch/index.ts +2 -1
  676. package/src/components/atoms/Tag/index.ts +2 -1
  677. package/src/components/atoms/Text/index.ts +2 -1
  678. package/src/components/molecules/Calendar/index.ts +2 -2
  679. package/src/components/molecules/DatePicker/index.ts +2 -1
  680. package/src/components/molecules/DateTimePicker/index.ts +2 -4
  681. package/src/components/molecules/DateTimeSelector/index.ts +2 -2
  682. package/src/components/molecules/IconTextButton/index.ts +4 -1
  683. package/src/components/molecules/LabeledSwitch/index.ts +1 -1
  684. package/src/components/molecules/Snackbar/index.ts +2 -1
  685. package/src/components/molecules/TextArea/index.ts +2 -1
  686. package/src/index.ts +64 -56
  687. package/tsconfig.build.esm.json +10 -0
@@ -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,"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,CAC3BC,OAD2B,EAE3BC,MAF2B,EAG3BC,YAAY,GAAG,IAHY,KAIxB;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
+ {"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,"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,CAAY,cAAaF,SAAU,YAAnC,EAAgD,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,Y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B,GAAG,EAAErB,cADA;MAELsB,SAAS,EAAE,IAAAC,iBAAA,EAASvB,cAAT,EAAyBwB,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
+ {"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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,CAAP;AACD,CAjCM"}
@@ -1,11 +1,15 @@
1
1
  "use strict";
2
2
 
3
- exports.__esModule = true;
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
4
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,"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,CAACC,KAAK,GAAG,EAAT,EAAaC,IAAb,KAA6C;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,EAA4D;IAC1D,MAAMC,QAAQ,GAAGN,IAAI,CAACG,KAAD,CAArB;IACA,MAAMI,SAAS,GAAGR,KAAK,CAACK,MAAD,CAAvB;;IAEA,IAAIE,QAAQ,KAAKC,SAAjB,EAA4B;MAC1BN,SAAS,IAAIK,QAAb;MACAF,MAAM;MACND,KAAK;MACL;IACD;;IAED,MAAMK,YAAY,GAAGT,KAAK,CAACK,MAAD,CAA1B;;IAEA,IAAI,OAAOE,QAAP,KAAoB,QAAxB,EAAkC;MAChCF,MAAM;MAEN,MAAMK,aAAa,GAAGC,KAAK,CAACC,OAAN,CAAcL,QAAd,IAA0BA,QAAQ,CAAC,CAAD,CAAlC,GAAwCA,QAA9D;MACA,MAAMM,UAAU,GAAGC,MAAM,CAACJ,aAAD,CAAN,CAAsBK,IAAtB,CAA2BP,SAA3B,CAAnB;;MAEA,IAAIK,UAAJ,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;IACF;EACF,CAhBD;EAkBA,OAAOJ,UAAP;AACD,CAhCM;;;;AAwCA,MAAMK,aAAa,GAAG,CAC3BvB,IAD2B,EAE3BwB,YAF2B,KAGsB;EACjD,MAAMC,SAAS,GAAG,IAAAC,kBAAA,EAChB,CAAC3B,KAAK,GAAG,EAAT,KAA2B;IACzB,MAAM4B,YAAY,GAAGZ,OAAO,CAACf,IAAD,EAAOD,KAAP,CAA5B;IACA,MAAM;MAAEE,SAAF;MAAaC;IAAb,IAAqBJ,SAAS,CAACC,KAAD,EAAQ4B,YAAR,CAApC;IAEA,OAAO;MACLzB,GADK;MAELD;IAFK,CAAP;EAID,CATe,EAUhB,CAACD,IAAD,CAVgB,CAAlB;EAaA,MAAM,CAACD,KAAD,EAAQ6B,QAAR,IAAoB,IAAAC,eAAA,EACxBJ,SAAS,CAACD,YAAD,oBAACA,YAAY,CAAEM,QAAd,EAAD,CADe,CAA1B;EAIA,MAAMC,iBAAiB,GAAG,IAAAL,kBAAA,EACvBM,cAAD,IAAqC;IACnC,MAAM;MAAE9B,GAAF;MAAOD;IAAP,IAAqBwB,SAAS,CAACO,cAAD,oBAACA,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"}
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,EAA4D;IAC1D,MAAMC,QAAQ,GAAGN,IAAI,CAACG,KAAD,CAArB;IACA,MAAMI,SAAS,GAAGR,KAAK,CAACK,MAAD,CAAvB;;IAEA,IAAIE,QAAQ,KAAKC,SAAjB,EAA4B;MAC1BN,SAAS,IAAIK,QAAb;MACAF,MAAM;MACND,KAAK;MACL;IACD;;IAED,MAAMK,YAAY,GAAGT,KAAK,CAACK,MAAD,CAA1B;;IAEA,IAAI,OAAOE,QAAP,KAAoB,QAAxB,EAAkC;MAChCF,MAAM;MAEN,MAAMK,aAAa,GAAGC,KAAK,CAACC,OAAN,CAAcL,QAAd,IAA0BA,QAAQ,CAAC,CAAD,CAAlC,GAAwCA,QAA9D;MACA,MAAMM,UAAU,GAAGC,MAAM,CAACJ,aAAD,CAAN,CAAsBK,IAAtB,CAA2BP,SAA3B,CAAnB;;MAEA,IAAIK,UAAJ,EAAgB;QACdX,SAAS,IAAIM,SAAb;QACAL,GAAG,IAAIM,YAAP;QACAL,KAAK;MACN;IACF,CAXD,MAWO;MACLF,SAAS,IAAIK,QAAb;MAC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sB;EACjD,MAAMC,SAAS,GAAG,IAAAC,kBAAA,EAChB,YAA2B;IAAA,IAA1B3B,KAA0B,uEAAlB,EAAkB;IACzB,MAAM4B,YAAY,GAAGZ,OAAO,CAACf,IAAD,EAAOD,KAAP,CAA5B;IACA,MAAM;MAAEE,SAAF;MAAaC;IAAb,IAAqBJ,SAAS,CAACC,KAAD,EAAQ4B,YAAR,CAApC;IAEA,OAAO;MACLzB,GADK;MAELD;IAFK,CAAP;EAID,CATe,EAUhB,CAACD,IAAD,CAVgB,CAAlB;EAaA,MAAM,CAACD,KAAD,EAAQ6B,QAAR,IAAoB,IAAAC,eAAA,EACxBJ,SAAS,CAACD,YAAD,aAACA,YAAD,uBAACA,YAAY,CAAEM,QAAd,EAAD,CADe,CAA1B;EAIA,MAAMC,iBAAiB,GAAG,IAAAL,kBAAA,EACvBM,cAAD,IAAqC;IACnC,MAAM;MAAE9B,GAAF;MAAOD;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';
@@ -1,33 +1,74 @@
1
1
  "use strict";
2
2
 
3
- exports.__esModule = true;
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
4
6
  var _exportNames = {
5
7
  Hint: true,
6
8
  InputContainer: true,
7
9
  InputElement: true,
8
10
  InputMaskElement: true,
9
- InputContainerProps: true,
10
- InputVariantType: true,
11
- InputElementProps: true,
12
- InputMaskElementProps: true,
13
11
  PressableInputContainer: true,
14
- PressableInputContainerProps: true,
15
12
  StyledBorderKeeper: true,
16
13
  disabledInputStyles: true
17
14
  };
18
- exports.disabledInputStyles = exports.StyledBorderKeeper = exports.PressableInputContainerProps = exports.PressableInputContainer = exports.InputVariantType = exports.InputMaskElementProps = exports.InputMaskElement = exports.InputElementProps = exports.InputElement = exports.InputContainerProps = exports.InputContainer = exports.Hint = void 0;
15
+ Object.defineProperty(exports, "Hint", {
16
+ enumerable: true,
17
+ get: function () {
18
+ return _Hint.default;
19
+ }
20
+ });
21
+ Object.defineProperty(exports, "InputContainer", {
22
+ enumerable: true,
23
+ get: function () {
24
+ return _InputContainer.default;
25
+ }
26
+ });
27
+ Object.defineProperty(exports, "InputElement", {
28
+ enumerable: true,
29
+ get: function () {
30
+ return _InputElement.default;
31
+ }
32
+ });
33
+ Object.defineProperty(exports, "InputMaskElement", {
34
+ enumerable: true,
35
+ get: function () {
36
+ return _InputMaskElement.default;
37
+ }
38
+ });
39
+ Object.defineProperty(exports, "PressableInputContainer", {
40
+ enumerable: true,
41
+ get: function () {
42
+ return _PressableInputContainer.PressableInputContainer;
43
+ }
44
+ });
45
+ Object.defineProperty(exports, "StyledBorderKeeper", {
46
+ enumerable: true,
47
+ get: function () {
48
+ return _styled.StyledBorderKeeper;
49
+ }
50
+ });
51
+ Object.defineProperty(exports, "disabledInputStyles", {
52
+ enumerable: true,
53
+ get: function () {
54
+ return _styled.disabledInputStyles;
55
+ }
56
+ });
19
57
 
20
58
  var _Hint = _interopRequireDefault(require("./Hint"));
21
59
 
22
- exports.Hint = _Hint.default;
23
-
24
60
  var _useInputFocus = require("./hooks/useInputFocus");
25
61
 
26
62
  Object.keys(_useInputFocus).forEach(function (key) {
27
63
  if (key === "default" || key === "__esModule") return;
28
64
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
29
65
  if (key in exports && exports[key] === _useInputFocus[key]) return;
30
- exports[key] = _useInputFocus[key];
66
+ Object.defineProperty(exports, key, {
67
+ enumerable: true,
68
+ get: function () {
69
+ return _useInputFocus[key];
70
+ }
71
+ });
31
72
  });
32
73
 
33
74
  var _useNumberMask = require("./hooks/useNumberMask");
@@ -36,7 +77,12 @@ Object.keys(_useNumberMask).forEach(function (key) {
36
77
  if (key === "default" || key === "__esModule") return;
37
78
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
38
79
  if (key in exports && exports[key] === _useNumberMask[key]) return;
39
- exports[key] = _useNumberMask[key];
80
+ Object.defineProperty(exports, key, {
81
+ enumerable: true,
82
+ get: function () {
83
+ return _useNumberMask[key];
84
+ }
85
+ });
40
86
  });
41
87
 
42
88
  var _useStringMask = require("./hooks/useStringMask");
@@ -45,38 +91,23 @@ Object.keys(_useStringMask).forEach(function (key) {
45
91
  if (key === "default" || key === "__esModule") return;
46
92
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
47
93
  if (key in exports && exports[key] === _useStringMask[key]) return;
48
- exports[key] = _useStringMask[key];
94
+ Object.defineProperty(exports, key, {
95
+ enumerable: true,
96
+ get: function () {
97
+ return _useStringMask[key];
98
+ }
99
+ });
49
100
  });
50
101
 
51
- var _InputContainer = _interopRequireWildcard(require("./InputContainer/InputContainer"));
52
-
53
- exports.InputContainer = _InputContainer.default;
54
- exports.InputContainerProps = _InputContainer.InputContainerProps;
55
- exports.InputVariantType = _InputContainer.InputVariantType;
56
-
57
- var _InputElement = _interopRequireWildcard(require("./InputElement/InputElement"));
58
-
59
- exports.InputElement = _InputElement.default;
60
- exports.InputElementProps = _InputElement.InputElementProps;
102
+ var _InputContainer = _interopRequireDefault(require("./InputContainer/InputContainer"));
61
103
 
62
- var _InputMaskElement = _interopRequireWildcard(require("./InputMaskElement/InputMaskElement"));
104
+ var _InputElement = _interopRequireDefault(require("./InputElement/InputElement"));
63
105
 
64
- exports.InputMaskElement = _InputMaskElement.default;
65
- exports.InputMaskElementProps = _InputMaskElement.InputMaskElementProps;
106
+ var _InputMaskElement = _interopRequireDefault(require("./InputMaskElement/InputMaskElement"));
66
107
 
67
108
  var _PressableInputContainer = require("./PressableInputContainer");
68
109
 
69
- exports.PressableInputContainer = _PressableInputContainer.PressableInputContainer;
70
- exports.PressableInputContainerProps = _PressableInputContainer.PressableInputContainerProps;
71
-
72
110
  var _styled = require("./styled");
73
111
 
74
- exports.StyledBorderKeeper = _styled.StyledBorderKeeper;
75
- exports.disabledInputStyles = _styled.disabledInputStyles;
76
-
77
- 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); }
78
-
79
- 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; }
80
-
81
112
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
82
113
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/atoms/Input/index.ts"],"sourcesContent":["export { default as Hint } from './Hint';\nexport * from './hooks/useInputFocus';\nexport * from './hooks/useNumberMask';\nexport * from './hooks/useStringMask';\nexport {\n default as InputContainer,\n InputContainerProps,\n InputVariantType,\n} from './InputContainer/InputContainer';\nexport {\n default as InputElement,\n InputElementProps,\n} from './InputElement/InputElement';\nexport {\n default as InputMaskElement,\n InputMaskElementProps,\n} from './InputMaskElement/InputMaskElement';\nexport {\n PressableInputContainer,\n PressableInputContainerProps,\n} from './PressableInputContainer';\nexport { StyledBorderKeeper, disabledInputStyles } from './styled';\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;;;;AACA;;AAAA;EAAA;EAAA;EAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;EAAA;AAAA;;AACA;;;;;;AAKA;;;;;AAIA;;;;;AAIA;;;;;AAIA"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/atoms/Input/index.ts"],"sourcesContent":["export { default as Hint } from './Hint';\nexport * from './hooks/useInputFocus';\nexport * from './hooks/useNumberMask';\nexport * from './hooks/useStringMask';\nexport { default as InputContainer } from './InputContainer/InputContainer';\nexport type {\n InputContainerProps,\n InputVariantType,\n} from './InputContainer/InputContainer';\nexport { default as InputElement } from './InputElement/InputElement';\nexport type { InputElementProps } from './InputElement/InputElement';\nexport { default as InputMaskElement } from './InputMaskElement/InputMaskElement';\nexport type { InputMaskElementProps } from './InputMaskElement/InputMaskElement';\nexport { PressableInputContainer } from './PressableInputContainer';\nexport type { PressableInputContainerProps } from './PressableInputContainer';\nexport { StyledBorderKeeper, disabledInputStyles } from './styled';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAKA;;AAEA;;AAEA;;AAEA"}
@@ -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.disabledInputStyles = exports.StyledLabelContainer = exports.StyledInputElementBase = exports.StyledInputElement = exports.StyledInputContainer = exports.StyledIconContent = exports.StyledHintIcon = exports.StyledHintContainer = exports.StyledBorderKeeper = void 0;
5
7
 
6
8
  var _native = _interopRequireWildcard(require("@emotion/native"));
@@ -11,126 +13,137 @@ var _ResponsiveFontSize = require("../../../utils/ResponsiveFontSize");
11
13
 
12
14
  var _Icon = require("../Icon");
13
15
 
16
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14;
17
+
14
18
  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); }
15
19
 
16
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; }
17
21
 
18
- const leftIconStyles = ({
19
- leftComponent,
20
- theme
21
- }) => !leftComponent && (0, _native.css)`
22
- padding-left: ${theme.spacing.centi};
23
- `;
24
-
25
- const rightIconStyles = ({
26
- rightComponent,
27
- theme
28
- }) => !rightComponent && (0, _native.css)`
29
- padding-right: ${theme.spacing.centi};
30
- `;
31
-
32
- const disabledContainerStyles = ({
33
- disabled
34
- }) => disabled && (0, _native.css)`
35
- background-color: transparent;
36
- `;
37
-
38
- const disabledInputStyles = ({
39
- disabled,
40
- theme
41
- }) => disabled && (0, _native.css)`
42
- color: ${theme == null ? void 0 : theme.color.secondary.light};
43
- `;
22
+ function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
23
+
24
+ const leftIconStyles = _ref => {
25
+ let {
26
+ leftComponent,
27
+ theme
28
+ } = _ref;
29
+ return !leftComponent && (0, _native.css)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n padding-left: ", ";\n "])), theme.spacing.centi);
30
+ };
31
+
32
+ const rightIconStyles = _ref2 => {
33
+ let {
34
+ rightComponent,
35
+ theme
36
+ } = _ref2;
37
+ return !rightComponent && (0, _native.css)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n padding-right: ", ";\n "])), theme.spacing.centi);
38
+ };
39
+
40
+ const disabledContainerStyles = _ref3 => {
41
+ let {
42
+ disabled
43
+ } = _ref3;
44
+ return disabled && (0, _native.css)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n background-color: transparent;\n "])));
45
+ };
46
+
47
+ const disabledInputStyles = _ref4 => {
48
+ let {
49
+ disabled,
50
+ theme
51
+ } = _ref4;
52
+ return disabled && (0, _native.css)(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n color: ", ";\n "])), theme === null || theme === void 0 ? void 0 : theme.color.secondary.light);
53
+ };
44
54
 
45
55
  exports.disabledInputStyles = disabledInputStyles;
46
56
 
47
- const focusedStyles = ({
48
- focused,
49
- borderColor = 'secondary',
50
- theme
51
- }) => focused && (0, _native.css)`
52
- border-width: ${theme.borderWidth.nano};
53
- border-color: ${theme.color[borderColor].dark};
54
- `;
55
-
56
- const StyledIconContent = _native.default.View`
57
- z-index: ${({
58
- theme
59
- }) => theme.zIndex.default};
60
- flex-direction: row;
61
- align-items: center;
62
- `;
57
+ const focusedStyles = _ref5 => {
58
+ let {
59
+ focused,
60
+ borderColor = 'secondary',
61
+ theme
62
+ } = _ref5;
63
+ return focused && (0, _native.css)(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n border-width: ", ";\n border-color: ", ";\n "])), theme.borderWidth.nano, theme.color[borderColor].dark);
64
+ };
65
+
66
+ const StyledIconContent = _native.default.View(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n z-index: ", ";\n flex-direction: row;\n align-items: center;\n"])), _ref6 => {
67
+ let {
68
+ theme
69
+ } = _ref6;
70
+ return theme.zIndex.default;
71
+ });
72
+
63
73
  exports.StyledIconContent = StyledIconContent;
64
- const StyledInputContainer = _native.default.View`
65
- flex-direction: row;
66
- align-items: center;
67
- min-height: ${(0, _ResponsiveFontSize.RFValueStr)('44px')};
68
- `;
74
+
75
+ const StyledInputContainer = _native.default.View(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n flex-direction: row;\n align-items: center;\n min-height: ", ";\n"])), (0, _ResponsiveFontSize.RFValueStr)('44px'));
76
+
69
77
  exports.StyledInputContainer = StyledInputContainer;
70
- const StyledInputElementBase = (0, _native.default)(_reactNative.TextInput)`
71
- font-family: ${({
72
- theme
73
- }) => `'${theme.font.stack.default}'`};
74
- font-size: ${({
75
- theme
76
- }) => theme.typography.base.fontSize};
77
- font-weight: ${({
78
- theme
79
- }) => theme.font.weight.bold};
80
- color: ${({
81
- theme
82
- }) => theme.font.color.dark};
83
- `;
78
+ const StyledInputElementBase = (0, _native.default)(_reactNative.TextInput)(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n font-family: ", ";\n font-size: ", ";\n font-weight: ", ";\n color: ", ";\n"])), _ref7 => {
79
+ let {
80
+ theme
81
+ } = _ref7;
82
+ return "'".concat(theme.font.stack.default, "'");
83
+ }, _ref8 => {
84
+ let {
85
+ theme
86
+ } = _ref8;
87
+ return theme.typography.base.fontSize;
88
+ }, _ref9 => {
89
+ let {
90
+ theme
91
+ } = _ref9;
92
+ return theme.font.weight.bold;
93
+ }, _ref10 => {
94
+ let {
95
+ theme
96
+ } = _ref10;
97
+ return theme.font.color.dark;
98
+ });
84
99
  exports.StyledInputElementBase = StyledInputElementBase;
85
100
 
86
- const StyledLabelContainer = _native.default.View(props => (0, _native.css)`
87
- flex: 1;
88
- padding: ${props.theme.spacing.micro} 0;
89
- ${leftIconStyles(props)}
90
- ${rightIconStyles(props)}
91
- `);
101
+ const StyledLabelContainer = _native.default.View(props => (0, _native.css)(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n flex: 1;\n padding: ", " 0;\n ", "\n ", "\n "])), props.theme.spacing.micro, leftIconStyles(props), rightIconStyles(props)));
92
102
 
93
103
  exports.StyledLabelContainer = StyledLabelContainer;
94
- const StyledBorderKeeperBase = _native.default.View`
95
- background-color: ${({
96
- theme
97
- }) => theme.miscellaneous.surfaceColor};
98
- border-color: ${({
99
- theme,
100
- borderColor = 'secondary',
101
- borderColorGradation = 'light'
102
- }) => theme.color[borderColor][borderColorGradation]};
103
- border-radius: ${({
104
- theme
105
- }) => theme.borderRadius.mili};
106
- border-width: ${({
107
- theme
108
- }) => theme.borderWidth.pico};
109
- position: absolute;
110
- width: 100%;
111
- height: 100%;
112
- `;
113
- const StyledBorderKeeper = (0, _native.default)(StyledBorderKeeperBase)(props => (0, _native.css)`
114
- ${focusedStyles(props)}
115
- ${disabledContainerStyles(props)}
116
- `);
104
+
105
+ const StyledBorderKeeperBase = _native.default.View(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n background-color: ", ";\n border-color: ", ";\n border-radius: ", ";\n border-width: ", ";\n position: absolute;\n width: 100%;\n height: 100%;\n"])), _ref11 => {
106
+ let {
107
+ theme
108
+ } = _ref11;
109
+ return theme.miscellaneous.surfaceColor;
110
+ }, _ref12 => {
111
+ let {
112
+ theme,
113
+ borderColor = 'secondary',
114
+ borderColorGradation = 'light'
115
+ } = _ref12;
116
+ return theme.color[borderColor][borderColorGradation];
117
+ }, _ref13 => {
118
+ let {
119
+ theme
120
+ } = _ref13;
121
+ return theme.borderRadius.mili;
122
+ }, _ref14 => {
123
+ let {
124
+ theme
125
+ } = _ref14;
126
+ return theme.borderWidth.pico;
127
+ });
128
+
129
+ const StyledBorderKeeper = (0, _native.default)(StyledBorderKeeperBase)(props => (0, _native.css)(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n ", "\n ", "\n "])), focusedStyles(props), disabledContainerStyles(props)));
117
130
  exports.StyledBorderKeeper = StyledBorderKeeper;
118
- const StyledInputElement = (0, _native.default)(StyledInputElementBase)(props => (0, _native.css)`
119
- ${disabledInputStyles(props)}
120
- `);
131
+ const StyledInputElement = (0, _native.default)(StyledInputElementBase)(props => (0, _native.css)(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n ", "\n "])), disabledInputStyles(props)));
121
132
  exports.StyledInputElement = StyledInputElement;
122
- const StyledHintContainer = _native.default.View`
123
- margin-top: ${({
124
- theme
125
- }) => theme.spacing.micro};
126
- flex-direction: row;
127
- align-items: center;
128
- `;
133
+
134
+ const StyledHintContainer = _native.default.View(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n margin-top: ", ";\n flex-direction: row;\n align-items: center;\n"])), _ref15 => {
135
+ let {
136
+ theme
137
+ } = _ref15;
138
+ return theme.spacing.micro;
139
+ });
140
+
129
141
  exports.StyledHintContainer = StyledHintContainer;
130
- const StyledHintIcon = (0, _native.default)(_Icon.Icon)`
131
- margin-right: ${({
132
- theme
133
- }) => theme.spacing.micro};
134
- `;
142
+ const StyledHintIcon = (0, _native.default)(_Icon.Icon)(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["\n margin-right: ", ";\n"])), _ref16 => {
143
+ let {
144
+ theme
145
+ } = _ref16;
146
+ return theme.spacing.micro;
147
+ });
135
148
  exports.StyledHintIcon = StyledHintIcon;
136
149
  //# sourceMappingURL=styled.js.map