@tecsinapse/react-core 1.17.3 → 1.19.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 (263) hide show
  1. package/CHANGELOG.md +39 -0
  2. package/dist/components/atoms/Avatar/Avatar.js.map +1 -1
  3. package/dist/components/atoms/Avatar/helpers.js.map +1 -1
  4. package/dist/components/atoms/Avatar/index.js.map +1 -1
  5. package/dist/components/atoms/Avatar/styled.js.map +1 -1
  6. package/dist/components/atoms/Badge/Badge.js.map +1 -1
  7. package/dist/components/atoms/Badge/index.js.map +1 -1
  8. package/dist/components/atoms/Badge/styled.js.map +1 -1
  9. package/dist/components/atoms/BoxContent/BoxContent.js.map +1 -1
  10. package/dist/components/atoms/BoxContent/index.js.map +1 -1
  11. package/dist/components/atoms/BoxContent/styled.js +1 -1
  12. package/dist/components/atoms/BoxContent/styled.js.map +1 -1
  13. package/dist/components/atoms/Button/Button.js +1 -1
  14. package/dist/components/atoms/Button/Button.js.map +1 -1
  15. package/dist/components/atoms/Button/States/BaseState.js.map +1 -1
  16. package/dist/components/atoms/Button/States/Error.js +1 -1
  17. package/dist/components/atoms/Button/States/Error.js.map +1 -1
  18. package/dist/components/atoms/Button/States/Loading.js.map +1 -1
  19. package/dist/components/atoms/Button/States/Success.js +1 -1
  20. package/dist/components/atoms/Button/States/Success.js.map +1 -1
  21. package/dist/components/atoms/Button/States/index.js.map +1 -1
  22. package/dist/components/atoms/Button/States/styled.js +1 -1
  23. package/dist/components/atoms/Button/States/styled.js.map +1 -1
  24. package/dist/components/atoms/Button/index.js +1 -1
  25. package/dist/components/atoms/Button/index.js.map +1 -1
  26. package/dist/components/atoms/Button/styled.js.map +1 -1
  27. package/dist/components/atoms/Card/Card.js +1 -1
  28. package/dist/components/atoms/Card/Card.js.map +1 -1
  29. package/dist/components/atoms/Card/Footer/Footer.js.map +1 -1
  30. package/dist/components/atoms/Card/Footer/index.js.map +1 -1
  31. package/dist/components/atoms/Card/Header/Header.js.map +1 -1
  32. package/dist/components/atoms/Card/Header/index.js.map +1 -1
  33. package/dist/components/atoms/Card/index.js.map +1 -1
  34. package/dist/components/atoms/Card/styled.js.map +1 -1
  35. package/dist/components/atoms/Checkbox/Checkbox.js +1 -1
  36. package/dist/components/atoms/Checkbox/Checkbox.js.map +1 -1
  37. package/dist/components/atoms/Checkbox/index.js.map +1 -1
  38. package/dist/components/atoms/Checkbox/styled.js +1 -1
  39. package/dist/components/atoms/Checkbox/styled.js.map +1 -1
  40. package/dist/components/atoms/Divider/Divider.js.map +1 -1
  41. package/dist/components/atoms/Divider/index.js.map +1 -1
  42. package/dist/components/atoms/Divider/styled.js.map +1 -1
  43. package/dist/components/atoms/GroupButton/GroupButton.d.ts +1 -1
  44. package/dist/components/atoms/GroupButton/GroupButton.js +1 -1
  45. package/dist/components/atoms/GroupButton/GroupButton.js.map +1 -1
  46. package/dist/components/atoms/GroupButton/GroupButtonOption.js.map +1 -1
  47. package/dist/components/atoms/GroupButton/index.js +1 -1
  48. package/dist/components/atoms/GroupButton/index.js.map +1 -1
  49. package/dist/components/atoms/GroupButton/styled.js +1 -1
  50. package/dist/components/atoms/GroupButton/styled.js.map +1 -1
  51. package/dist/components/atoms/Icon/Icon.js +1 -1
  52. package/dist/components/atoms/Icon/Icon.js.map +1 -1
  53. package/dist/components/atoms/Icon/helpers.js +1 -1
  54. package/dist/components/atoms/Icon/helpers.js.map +1 -1
  55. package/dist/components/atoms/Icon/index.js.map +1 -1
  56. package/dist/components/atoms/Input/Hint.js.map +1 -1
  57. package/dist/components/atoms/Input/InputContainer/InputContainer.d.ts +1 -1
  58. package/dist/components/atoms/Input/InputContainer/InputContainer.js +1 -1
  59. package/dist/components/atoms/Input/InputContainer/InputContainer.js.map +1 -1
  60. package/dist/components/atoms/Input/InputElement/InputElement.d.ts +3 -4
  61. package/dist/components/atoms/Input/InputElement/InputElement.js +1 -1
  62. package/dist/components/atoms/Input/InputElement/InputElement.js.map +1 -1
  63. package/dist/components/atoms/Input/InputMaskElement/InputMaskElement.d.ts +3 -4
  64. package/dist/components/atoms/Input/InputMaskElement/InputMaskElement.js +1 -1
  65. package/dist/components/atoms/Input/InputMaskElement/InputMaskElement.js.map +1 -1
  66. package/dist/components/atoms/Input/PressableInputContainer/PressableInputContainer.js +1 -1
  67. package/dist/components/atoms/Input/PressableInputContainer/PressableInputContainer.js.map +1 -1
  68. package/dist/components/atoms/Input/PressableInputContainer/index.js.map +1 -1
  69. package/dist/components/atoms/Input/PressableInputContainer/styled.js.map +1 -1
  70. package/dist/components/atoms/Input/hooks/useInputFocus.js.map +1 -1
  71. package/dist/components/atoms/Input/hooks/useNumberMask.js.map +1 -1
  72. package/dist/components/atoms/Input/hooks/useStringMask.js +1 -1
  73. package/dist/components/atoms/Input/hooks/useStringMask.js.map +1 -1
  74. package/dist/components/atoms/Input/index.js +1 -1
  75. package/dist/components/atoms/Input/index.js.map +1 -1
  76. package/dist/components/atoms/Input/styled.js +1 -1
  77. package/dist/components/atoms/Input/styled.js.map +1 -1
  78. package/dist/components/atoms/Paper/Paper.js +1 -1
  79. package/dist/components/atoms/Paper/Paper.js.map +1 -1
  80. package/dist/components/atoms/Paper/index.js.map +1 -1
  81. package/dist/components/atoms/Paper/styled.js.map +1 -1
  82. package/dist/components/atoms/PressableSurface/PressableSurface.js +1 -1
  83. package/dist/components/atoms/PressableSurface/PressableSurface.js.map +1 -1
  84. package/dist/components/atoms/PressableSurface/index.js.map +1 -1
  85. package/dist/components/atoms/ProgressBar/ProgressBar.d.ts +1 -1
  86. package/dist/components/atoms/ProgressBar/ProgressBar.js.map +1 -1
  87. package/dist/components/atoms/ProgressBar/index.js.map +1 -1
  88. package/dist/components/atoms/ProgressBar/styled.js +1 -1
  89. package/dist/components/atoms/ProgressBar/styled.js.map +1 -1
  90. package/dist/components/atoms/RadioButton/RadioButton.js +1 -1
  91. package/dist/components/atoms/RadioButton/RadioButton.js.map +1 -1
  92. package/dist/components/atoms/RadioButton/index.js.map +1 -1
  93. package/dist/components/atoms/RadioButton/styled.js +1 -1
  94. package/dist/components/atoms/RadioButton/styled.js.map +1 -1
  95. package/dist/components/atoms/Switch/Switch.d.ts +1 -1
  96. package/dist/components/atoms/Switch/Switch.js +1 -1
  97. package/dist/components/atoms/Switch/Switch.js.map +1 -1
  98. package/dist/components/atoms/Switch/animation.js.map +1 -1
  99. package/dist/components/atoms/Switch/index.js.map +1 -1
  100. package/dist/components/atoms/Switch/styled.d.ts +2 -14
  101. package/dist/components/atoms/Switch/styled.js +1 -1
  102. package/dist/components/atoms/Switch/styled.js.map +1 -1
  103. package/dist/components/atoms/Tag/Tag.js +1 -1
  104. package/dist/components/atoms/Tag/Tag.js.map +1 -1
  105. package/dist/components/atoms/Tag/index.js.map +1 -1
  106. package/dist/components/atoms/Tag/styled.js +1 -1
  107. package/dist/components/atoms/Tag/styled.js.map +1 -1
  108. package/dist/components/atoms/Text/Text.js +1 -1
  109. package/dist/components/atoms/Text/Text.js.map +1 -1
  110. package/dist/components/atoms/Text/functions.js.map +1 -1
  111. package/dist/components/atoms/Text/index.js.map +1 -1
  112. package/dist/components/atoms/Text/styled.js +1 -1
  113. package/dist/components/atoms/Text/styled.js.map +1 -1
  114. package/dist/components/atoms/shared/PaperAndCard.js.map +1 -1
  115. package/dist/components/molecules/Calendar/Calendar.js.map +1 -1
  116. package/dist/components/molecules/Calendar/components/MonthWeek.js.map +1 -1
  117. package/dist/components/molecules/Calendar/components/Weekdays.js.map +1 -1
  118. package/dist/components/molecules/Calendar/components/index.js +1 -1
  119. package/dist/components/molecules/Calendar/components/index.js.map +1 -1
  120. package/dist/components/molecules/Calendar/index.d.ts +1 -1
  121. package/dist/components/molecules/Calendar/index.js +1 -1
  122. package/dist/components/molecules/Calendar/index.js.map +1 -1
  123. package/dist/components/molecules/Calendar/styled.js +1 -1
  124. package/dist/components/molecules/Calendar/styled.js.map +1 -1
  125. package/dist/components/molecules/DatePicker/DatePicker.js +1 -1
  126. package/dist/components/molecules/DatePicker/DatePicker.js.map +1 -1
  127. package/dist/components/molecules/DatePicker/index.js.map +1 -1
  128. package/dist/components/molecules/DatePicker/styled.js +1 -1
  129. package/dist/components/molecules/DatePicker/styled.js.map +1 -1
  130. package/dist/components/molecules/DateTimePicker/DateTimePicker.js +1 -1
  131. package/dist/components/molecules/DateTimePicker/DateTimePicker.js.map +1 -1
  132. package/dist/components/molecules/DateTimePicker/index.js.map +1 -1
  133. package/dist/components/molecules/DateTimePicker/styled.js.map +1 -1
  134. package/dist/components/molecules/DateTimeSelector/DateTimeSelector.js +2 -1
  135. package/dist/components/molecules/DateTimeSelector/DateTimeSelector.js.map +1 -1
  136. package/dist/components/molecules/DateTimeSelector/Selector.js.map +1 -1
  137. package/dist/components/molecules/DateTimeSelector/index.js +1 -1
  138. package/dist/components/molecules/DateTimeSelector/index.js.map +1 -1
  139. package/dist/components/molecules/DateTimeSelector/styled.js +1 -1
  140. package/dist/components/molecules/DateTimeSelector/styled.js.map +1 -1
  141. package/dist/components/molecules/Grid/functions.d.ts +3 -0
  142. package/dist/components/molecules/Grid/functions.js +21 -0
  143. package/dist/components/molecules/Grid/functions.js.map +1 -0
  144. package/dist/components/molecules/Grid/index.d.ts +42 -2
  145. package/dist/components/molecules/Grid/index.js +4 -13
  146. package/dist/components/molecules/Grid/index.js.map +1 -1
  147. package/dist/components/molecules/HintInputContainer/HintInputContainer.js +1 -1
  148. package/dist/components/molecules/HintInputContainer/HintInputContainer.js.map +1 -1
  149. package/dist/components/molecules/HintInputContainer/index.js.map +1 -1
  150. package/dist/components/molecules/HintInputContainer/styled.js.map +1 -1
  151. package/dist/components/molecules/IconTextButton/IconComponent.d.ts +9 -0
  152. package/dist/components/molecules/IconTextButton/IconComponent.js +28 -0
  153. package/dist/components/molecules/IconTextButton/IconComponent.js.map +1 -0
  154. package/dist/components/molecules/IconTextButton/IconTextButton.d.ts +8 -0
  155. package/dist/components/molecules/IconTextButton/IconTextButton.js +4 -0
  156. package/dist/components/molecules/IconTextButton/IconTextButton.js.map +1 -0
  157. package/dist/components/molecules/IconTextButton/index.d.ts +2 -0
  158. package/dist/components/molecules/IconTextButton/index.js +16 -0
  159. package/dist/components/molecules/IconTextButton/index.js.map +1 -0
  160. package/dist/components/molecules/IconTextButton/styled.d.ts +4 -0
  161. package/dist/components/molecules/{Grid/Item/index.js → IconTextButton/styled.js} +19 -5
  162. package/dist/components/molecules/IconTextButton/styled.js.map +1 -0
  163. package/dist/components/molecules/InputPassword/InputPasswordIcon.js +1 -1
  164. package/dist/components/molecules/InputPassword/InputPasswordIcon.js.map +1 -1
  165. package/dist/components/molecules/InputPassword/index.js.map +1 -1
  166. package/dist/components/molecules/InputPassword/styled.js.map +1 -1
  167. package/dist/components/molecules/LabeledSwitch/LabeledSwitch.d.ts +7 -0
  168. package/dist/components/molecules/LabeledSwitch/LabeledSwitch.js +4 -0
  169. package/dist/components/molecules/LabeledSwitch/LabeledSwitch.js.map +1 -0
  170. package/dist/components/molecules/LabeledSwitch/index.d.ts +1 -0
  171. package/dist/components/molecules/LabeledSwitch/index.js +10 -0
  172. package/dist/components/molecules/LabeledSwitch/index.js.map +1 -0
  173. package/dist/components/molecules/Snackbar/Snackbar.js +1 -1
  174. package/dist/components/molecules/Snackbar/Snackbar.js.map +1 -1
  175. package/dist/components/molecules/Snackbar/index.js.map +1 -1
  176. package/dist/components/molecules/Snackbar/styled.js +1 -1
  177. package/dist/components/molecules/Snackbar/styled.js.map +1 -1
  178. package/dist/components/molecules/TextArea/TextArea.d.ts +1 -1
  179. package/dist/components/molecules/TextArea/TextArea.js.map +1 -1
  180. package/dist/components/molecules/TextArea/index.js +1 -1
  181. package/dist/components/molecules/TextArea/index.js.map +1 -1
  182. package/dist/components/molecules/TextArea/styled.d.ts +2 -14
  183. package/dist/components/molecules/TextArea/styled.js.map +1 -1
  184. package/dist/hooks/index.js.map +1 -1
  185. package/dist/hooks/useDebouncedState.js +1 -1
  186. package/dist/hooks/useDebouncedState.js.map +1 -1
  187. package/dist/hooks/useTheme.js.map +1 -1
  188. package/dist/index.d.ts +7 -5
  189. package/dist/index.js +58 -30
  190. package/dist/index.js.map +1 -1
  191. package/dist/styles/ThemeProvider.js.map +1 -1
  192. package/dist/styles/definitions.d.ts +2 -1
  193. package/dist/styles/definitions.js +7 -1
  194. package/dist/styles/definitions.js.map +1 -1
  195. package/dist/styles/light.js +2 -1
  196. package/dist/styles/light.js.map +1 -1
  197. package/dist/types/defaults.d.ts +8 -2
  198. package/dist/types/defaults.js.map +1 -1
  199. package/dist/utils/IPhoneXHelper.js +3 -3
  200. package/dist/utils/IPhoneXHelper.js.map +1 -1
  201. package/dist/utils/ResponsiveFontSize.js +6 -6
  202. package/dist/utils/ResponsiveFontSize.js.map +1 -1
  203. package/dist/utils/extractNumbersFromString.js +1 -1
  204. package/dist/utils/extractNumbersFromString.js.map +1 -1
  205. package/dist/utils/formatWithMask.js.map +1 -1
  206. package/dist/utils/index.d.ts +5 -4
  207. package/dist/utils/index.js +28 -19
  208. package/dist/utils/index.js.map +1 -1
  209. package/dist/utils/lightenDarkenColor.js.map +1 -1
  210. package/dist/utils/masks.js.map +1 -1
  211. package/dist/utils/variantComplement.d.ts +6 -0
  212. package/dist/utils/variantComplement.js +35 -0
  213. package/dist/utils/variantComplement.js.map +1 -0
  214. package/package.json +5 -5
  215. package/src/components/atoms/Badge/styled.ts +2 -3
  216. package/src/components/atoms/GroupButton/GroupButton.tsx +2 -5
  217. package/src/components/atoms/Input/InputContainer/InputContainer.tsx +3 -3
  218. package/src/components/atoms/Input/InputElement/InputElement.tsx +4 -5
  219. package/src/components/atoms/Input/InputMaskElement/InputMaskElement.tsx +4 -5
  220. package/src/components/atoms/ProgressBar/ProgressBar.tsx +2 -4
  221. package/src/components/atoms/Switch/Switch.tsx +39 -19
  222. package/src/components/atoms/Switch/animation.ts +4 -6
  223. package/src/components/atoms/Switch/styled.ts +4 -6
  224. package/src/components/atoms/Tag/Tag.tsx +1 -1
  225. package/src/components/atoms/shared/PaperAndCard.ts +1 -1
  226. package/src/components/molecules/Calendar/index.ts +1 -1
  227. package/src/components/molecules/DatePicker/DatePicker.tsx +12 -8
  228. package/src/components/molecules/DateTimePicker/DateTimePicker.tsx +19 -11
  229. package/src/components/molecules/DateTimeSelector/DateTimeSelector.tsx +0 -1
  230. package/src/components/molecules/Grid/functions.ts +29 -0
  231. package/src/components/molecules/Grid/index.ts +66 -2
  232. package/src/components/molecules/HintInputContainer/HintInputContainer.tsx +6 -1
  233. package/src/components/molecules/IconTextButton/IconComponent.tsx +31 -0
  234. package/src/components/molecules/IconTextButton/IconTextButton.tsx +10 -0
  235. package/src/components/molecules/IconTextButton/index.ts +2 -0
  236. package/src/components/molecules/IconTextButton/styled.ts +20 -0
  237. package/src/components/molecules/LabeledSwitch/LabeledSwitch.tsx +9 -0
  238. package/src/components/molecules/LabeledSwitch/index.ts +1 -0
  239. package/src/components/molecules/Snackbar/Snackbar.tsx +1 -1
  240. package/src/components/molecules/Snackbar/styled.ts +6 -2
  241. package/src/components/molecules/TextArea/TextArea.tsx +6 -2
  242. package/src/components/molecules/TextArea/styled.ts +5 -2
  243. package/src/hooks/useDebouncedState.ts +1 -1
  244. package/src/index.ts +26 -6
  245. package/src/styles/definitions.ts +8 -1
  246. package/src/styles/light.ts +2 -0
  247. package/src/types/defaults.ts +11 -1
  248. package/src/utils/IPhoneXHelper.ts +27 -22
  249. package/src/utils/ResponsiveFontSize.ts +55 -36
  250. package/src/utils/index.ts +5 -4
  251. package/src/utils/variantComplement.ts +36 -0
  252. package/dist/components/molecules/Grid/Grid.d.ts +0 -15
  253. package/dist/components/molecules/Grid/Grid.js +0 -55
  254. package/dist/components/molecules/Grid/Grid.js.map +0 -1
  255. package/dist/components/molecules/Grid/Item/Item.d.ts +0 -30
  256. package/dist/components/molecules/Grid/Item/Item.js +0 -68
  257. package/dist/components/molecules/Grid/Item/Item.js.map +0 -1
  258. package/dist/components/molecules/Grid/Item/index.d.ts +0 -1
  259. package/dist/components/molecules/Grid/Item/index.js.map +0 -1
  260. package/src/components/molecules/Grid/Grid.stories.tsx +0 -132
  261. package/src/components/molecules/Grid/Grid.tsx +0 -87
  262. package/src/components/molecules/Grid/Item/Item.tsx +0 -93
  263. package/src/components/molecules/Grid/Item/index.ts +0 -1
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
 
3
3
  exports.__esModule = true;
4
- exports.GroupButtonOptionProps = exports.GroupButtonValue = exports.GroupButtonProps = exports.GroupButtonOption = exports.GroupButton = void 0;
4
+ exports.GroupButtonValue = exports.GroupButtonProps = exports.GroupButtonOptionProps = exports.GroupButtonOption = exports.GroupButton = void 0;
5
5
 
6
6
  var _GroupButton = _interopRequireWildcard(require("./GroupButton"));
7
7
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/atoms/GroupButton/index.ts"],"names":[],"mappings":";;;;;AAAA;;;;;;AAKA","sourcesContent":["export {\n default as GroupButton,\n GroupButtonProps,\n GroupButtonValue,\n} from './GroupButton';\nexport {\n default as GroupButtonOption,\n GroupButtonOptionProps,\n} from './GroupButtonOption';\n"],"file":"index.js"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/atoms/GroupButton/index.ts"],"sourcesContent":["export {\n default as GroupButton,\n GroupButtonProps,\n GroupButtonValue,\n} from './GroupButton';\nexport {\n default as GroupButtonOption,\n GroupButtonOptionProps,\n} from './GroupButtonOption';\n"],"mappings":";;;;;AAAA;;;;;;AAKA"}
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
 
3
3
  exports.__esModule = true;
4
- exports.StyledPressable = exports.StyledDivider = exports.StyledOption = exports.getStyledGroupItemText = exports.StyledGroupButton = void 0;
4
+ exports.getStyledGroupItemText = exports.StyledPressable = exports.StyledOption = exports.StyledGroupButton = exports.StyledDivider = void 0;
5
5
 
6
6
  var _native = _interopRequireWildcard(require("@emotion/native"));
7
7
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/atoms/GroupButton/styled.ts"],"names":["StyledGroupButton","styled","View","disabledStyles","disabled","isActive","getStyledGroupItemText","component","active","theme","miscellaneous","surfaceColor","color","secondary","medium","activeStyles","activeBorderColor","activeBorderColorTone","inactiveStyles","inactiveBackgroundColor","inactiveBackgroundColorTone","inactiveBorderColor","inactiveBorderColorTone","leftStyles","isFirstOption","borderRadius","mili","borderWidth","pico","rightStyles","isLastOption","sizeStyles","buttonSize","spacing","deca","kilo","StyledPressableBase","PressableSurface","StyledOption","StyledDivider","light","StyledPressable","props"],"mappings":";;;;;AAAA;;AAGA;;AAEA;;;;;;AAYO,MAAMA,iBAAiB,GAAGC,gBAAOC,IAA0B;AAClE;AACA,CAFO;;;AAKP,MAAMC,cAAc,GAAG,CAAC;AACtBC,EAAAA,QADsB;AAEtBC,EAAAA;AAFsB,CAAD,KAIrBD,QAAQ,IACR,CAACC,QADD,IAEA,gBAAI;AACN;AACA,GARA;;AAUO,MAAMC,sBAAsB,GAAIC,SAAD,IAA8B;AAClE,SAAO,qBAAOA,SAAP,CAEL;AACJ,aAAa,CAAC;AAAEC,IAAAA,MAAF;AAAUC,IAAAA;AAAV,GAAD,KACPD,MAAM,GAAGC,KAAK,CAACC,aAAN,CAAoBC,YAAvB,GAAsCF,KAAK,CAACG,KAAN,CAAYC,SAAZ,CAAsBC,MAAO;AAC/E,GALE;AAMD,CAPM;;;;AASP,MAAMC,YAAY,GAAG,CAAC;AACpBN,EAAAA,KADoB;AAEpBJ,EAAAA,QAFoB;AAGpBW,EAAAA,iBAAiB,GAAG,WAHA;AAIpBC,EAAAA,qBAAqB,GAAG;AAJJ,CAAD,KAMnBZ,QAAQ,IACR,gBAAI;AACN,oBAAoBI,KADf,oBACeA,KAAK,CAAEG,KAAP,CAAaI,iBAAb,EAAgCC,qBAAhC,CAAuD;AAC3E,GATA;;AAWA,MAAMC,cAAc,GAAG,CAAC;AACtBT,EAAAA,KADsB;AAEtBJ,EAAAA,QAFsB;AAGtBc,EAAAA,uBAHsB;AAItBC,EAAAA,2BAJsB;AAKtBC,EAAAA,mBA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AAD,CAAQ;AAC5B,GAR+B,CAAxB","sourcesContent":["import styled, { css } from '@emotion/native';\nimport { FC } from 'react';\nimport { StyleProps } from '../../../types/defaults';\nimport { RFValueStr } from '../../../utils';\nimport { ButtonSizeType } from '../Button';\nimport { PressableSurface } from '../PressableSurface';\nimport { TextProps } from '../Text';\nimport { GroupButtonOptions } from './GroupButton';\nimport { GroupButtonOptionProps } from './GroupButtonOption';\n\ninterface PressableOptions extends GroupButtonOptions {\n isActive: boolean;\n isFirstOption: boolean;\n isLastOption: boolean;\n buttonSize?: ButtonSizeType;\n}\n\nexport const StyledGroupButton = styled.View<Partial<StyleProps>>`\n flex-direction: row;\n`;\n\n// TO FIXED: hexa color to theme definitions\nconst disabledStyles = ({\n disabled,\n isActive,\n}: PressableOptions & Partial<StyleProps>) =>\n disabled &&\n !isActive &&\n css`\n background-color: #dcdcdc;\n `;\n\nexport const getStyledGroupItemText = (component: FC<TextProps>) => {\n return styled(component)<\n Partial<GroupButtonOptionProps> & Partial<StyleProps>\n >`\n color: ${({ active, theme }) =>\n active ? theme.miscellaneous.surfaceColor : theme.color.secondary.medium};\n `;\n};\n\nconst activeStyles = ({\n theme,\n isActive,\n activeBorderColor = 'secondary',\n activeBorderColorTone = 'medium',\n}: PressableOptions & Partial<StyleProps>) =>\n isActive &&\n css`\n border-color: ${theme?.color[activeBorderColor][activeBorderColorTone]};\n `;\n\nconst inactiveStyles = ({\n theme,\n isActive,\n inactiveBackgroundColor,\n inactiveBackgroundColorTone,\n inactiveBorderColor = 'secondary',\n inactiveBorderColorTone = 'light',\n}: PressableOptions & Partial<StyleProps>) => {\n if (!isActive && inactiveBackgroundColor && inactiveBackgroundColorTone) {\n return css`\n border-color: ${theme?.color[inactiveBorderColor][\n inactiveBorderColorTone\n ]};\n `;\n }\n\n if (!isActive) {\n return css`\n border-color: ${theme?.color[inactiveBorderColor][\n inactiveBorderColorTone\n ]};\n `;\n }\n};\n\nconst leftStyles = ({\n theme,\n isFirstOption,\n}: PressableOptions & Partial<StyleProps>) =>\n isFirstOption &&\n css`\n border-top-left-radius: ${theme?.borderRadius.mili};\n border-bottom-left-radius: ${theme?.borderRadius.mili};\n border-left-width: ${theme?.borderWidth.pico};\n `;\n\nconst rightStyles = ({\n theme,\n isLastOption,\n}: PressableOptions & Partial<StyleProps>) =>\n isLastOption &&\n css`\n border-top-right-radius: ${theme?.borderRadius.mili};\n border-bottom-right-radius: ${theme?.borderRadius.mili};\n border-right-width: ${theme?.borderWidth.pico};\n `;\n\nconst sizeStyles = ({\n theme,\n buttonSize = 'small',\n}: PressableOptions & Partial<StyleProps>) => {\n switch (buttonSize) {\n case 'small':\n return css`\n padding: ${theme?.spacing.mili} ${theme?.spacing.deca};\n min-height: ${RFValueStr('34px')};\n `;\n default:\n return css`\n padding: ${theme?.spacing.mili} ${theme?.spacing.kilo};\n min-height: ${RFValueStr('44px')};\n `;\n }\n};\n\nconst StyledPressableBase = styled(PressableSurface)<\n PressableOptions & Partial<StyleProps>\n>`\n border-top-width: ${({ theme }) => theme.borderWidth.pico};\n border-bottom-width: ${({ theme }) => theme.borderWidth.pico};\n justify-content: center;\n align-items: center;\n flex: 1;\n`;\n\nexport const StyledOption = styled.View`\n flex-direction: row;\n flex: 1;\n`;\n\nexport const StyledDivider = styled.View<Partial<StyleProps>>`\n width: ${({ theme }) => theme.borderWidth.pico};\n background-color: ${({ theme }) => theme.color.secondary.light}; ;\n`;\n\nexport const StyledPressable = styled(StyledPressableBase)(\n (props: PressableOptions & Partial<StyleProps>) => css`\n ${activeStyles(props)}\n ${inactiveStyles(props)}\n ${leftStyles(props)}\n ${rightStyles(props)}\n ${sizeStyles(props)}\n ${disabledStyles(props)}\n `\n);\n"],"file":"styled.js"}
1
+ {"version":3,"file":"styled.js","names":["StyledGroupButton","styled","View","disabledStyles","disabled","isActive","css","getStyledGroupItemText","component","active","theme","miscellaneous","surfaceColor","color","secondary","medium","activeStyles","activeBorderColor","activeBorderColorTone","inactiveStyles","inactiveBackgroundColor","inactiveBackgroundColorTone","inactiveBorderColor","inactiveBorderColorTone","leftStyles","isFirstOption","borderRadius","mili","borderWidth","pico","rightStyles","isLastOption","sizeStyles","buttonSize","spacing","deca","RFValueStr","kilo","StyledPressableBase","PressableSurface","StyledOption","StyledDivider","light","StyledPressable","props"],"sources":["../../../../src/components/atoms/GroupButton/styled.ts"],"sourcesContent":["import styled, { css } from '@emotion/native';\nimport { FC } from 'react';\nimport { StyleProps } from '../../../types/defaults';\nimport { RFValueStr } from '../../../utils';\nimport { ButtonSizeType } from '../Button';\nimport { PressableSurface } from '../PressableSurface';\nimport { TextProps } from '../Text';\nimport { GroupButtonOptions } from './GroupButton';\nimport { GroupButtonOptionProps } from './GroupButtonOption';\n\ninterface PressableOptions extends GroupButtonOptions {\n isActive: boolean;\n isFirstOption: boolean;\n isLastOption: boolean;\n buttonSize?: ButtonSizeType;\n}\n\nexport const StyledGroupButton = styled.View<Partial<StyleProps>>`\n flex-direction: row;\n`;\n\n// TO FIXED: hexa color to theme definitions\nconst disabledStyles = ({\n disabled,\n isActive,\n}: PressableOptions & Partial<StyleProps>) =>\n disabled &&\n !isActive &&\n css`\n background-color: #dcdcdc;\n `;\n\nexport const getStyledGroupItemText = (component: FC<TextProps>) => {\n return styled(component)<\n Partial<GroupButtonOptionProps> & Partial<StyleProps>\n >`\n color: ${({ active, theme }) =>\n active ? theme.miscellaneous.surfaceColor : theme.color.secondary.medium};\n `;\n};\n\nconst activeStyles = ({\n theme,\n isActive,\n activeBorderColor = 'secondary',\n activeBorderColorTone = 'medium',\n}: PressableOptions & Partial<StyleProps>) =>\n isActive &&\n css`\n border-color: ${theme?.color[activeBorderColor][activeBorderColorTone]};\n `;\n\nconst inactiveStyles = ({\n theme,\n isActive,\n inactiveBackgroundColor,\n inactiveBackgroundColorTone,\n inactiveBorderColor = 'secondary',\n inactiveBorderColorTone = 'light',\n}: PressableOptions & Partial<StyleProps>) => {\n if (!isActive && inactiveBackgroundColor && inactiveBackgroundColorTone) {\n return css`\n border-color: ${theme?.color[inactiveBorderColor][\n inactiveBorderColorTone\n ]};\n `;\n }\n\n if (!isActive) {\n return css`\n border-color: ${theme?.color[inactiveBorderColor][\n inactiveBorderColorTone\n ]};\n `;\n }\n};\n\nconst leftStyles = ({\n theme,\n isFirstOption,\n}: PressableOptions & Partial<StyleProps>) =>\n isFirstOption &&\n css`\n border-top-left-radius: ${theme?.borderRadius.mili};\n border-bottom-left-radius: ${theme?.borderRadius.mili};\n border-left-width: ${theme?.borderWidth.pico};\n `;\n\nconst rightStyles = ({\n theme,\n isLastOption,\n}: PressableOptions & Partial<StyleProps>) =>\n isLastOption &&\n css`\n border-top-right-radius: ${theme?.borderRadius.mili};\n border-bottom-right-radius: ${theme?.borderRadius.mili};\n border-right-width: ${theme?.borderWidth.pico};\n `;\n\nconst sizeStyles = ({\n theme,\n buttonSize = 'small',\n}: PressableOptions & Partial<StyleProps>) => {\n switch (buttonSize) {\n case 'small':\n return css`\n padding: ${theme?.spacing.mili} ${theme?.spacing.deca};\n min-height: ${RFValueStr('34px')};\n `;\n default:\n return css`\n padding: ${theme?.spacing.mili} ${theme?.spacing.kilo};\n min-height: ${RFValueStr('44px')};\n `;\n }\n};\n\nconst StyledPressableBase = styled(PressableSurface)<\n PressableOptions & Partial<StyleProps>\n>`\n border-top-width: ${({ theme }) => theme.borderWidth.pico};\n border-bottom-width: ${({ theme }) => theme.borderWidth.pico};\n justify-content: center;\n align-items: center;\n flex: 1;\n`;\n\nexport const StyledOption = styled.View`\n flex-direction: row;\n flex: 1;\n`;\n\nexport const StyledDivider = styled.View<Partial<StyleProps>>`\n width: ${({ theme }) => theme.borderWidth.pico};\n background-color: ${({ theme }) => theme.color.secondary.light}; ;\n`;\n\nexport const StyledPressable = styled(StyledPressableBase)(\n (props: PressableOptions & Partial<StyleProps>) => css`\n ${activeStyles(props)}\n ${inactiveStyles(props)}\n ${leftStyles(props)}\n ${rightStyles(props)}\n ${sizeStyles(props)}\n ${disabledStyles(props)}\n `\n);\n"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D,iBAAA,EAAW,MAAX,CAAmB;AACzC,OAHM;EAPJ;AAYD,CAhBD;;AAkBA,MAAME,mBAAmB,GAAG,IAAArC,eAAA,EAAOsC,kCAAP,CAE1B;AACF,sBAAsB,CAAC;EAAE7B;AAAF,CAAD,KAAeA,KAAK,CAACkB,WAAN,CAAkBC,IAAK;AAC5D,yBAAyB,CAAC;EAAEnB;AAAF,CAAD,KAAeA,KAAK,CAACkB,WAAN,CAAkBC,IAAK;AAC/D;AACA;AACA;AACA,CARA;AAUO,MAAMW,YAAY,GAAGvC,eAAA,CAAOC,IAAK;AACxC;AACA;AACA,CAHO;;AAKA,MAAMuC,aAAa,GAAGxC,eAAA,CAAOC,IAA0B;AAC9D,WAAW,CAAC;EAAEQ;AAAF,CAAD,KAAeA,KAAK,CAACkB,WAAN,CAAkBC,IAAK;AACjD,sBAAsB,CAAC;EAAEnB;AAAF,CAAD,KAAeA,KAAK,CAACG,KAAN,CAAYC,SAAZ,CAAsB4B,KAAM;AACjE,CAHO;;AAKA,MAAMC,eAAe,GAAG,IAAA1C,eAAA,EAAOqC,mBAAP,EAC5BM,KAAD,IAAmD,IAAAtC,WAAA,CAAI;AACzD,MAAMU,YAAY,CAAC4B,KAAD,CAAQ;AAC1B,MAAMzB,cAAc,CAACyB,KAAD,CAAQ;AAC5B,MAAMpB,UAAU,CAACoB,KAAD,CAAQ;AACxB,MAAMd,WAAW,CAACc,KAAD,CAAQ;AACzB,MAAMZ,UAAU,CAACY,KAAD,CAAQ;AACxB,MAAMzC,cAAc,CAACyC,KAAD,CAAQ;AAC5B,GAR+B,CAAxB"}
@@ -11,7 +11,7 @@ var _helpers = require("./helpers");
11
11
 
12
12
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
13
 
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); }
14
+ 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); }
15
15
 
16
16
  const Icon = ({
17
17
  name,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/atoms/Icon/Icon.tsx"],"names":["Icon","name","size","type","style","fontColor","colorVariant","colorTone","rest","theme","color","RNVIcon"],"mappings":";;;;;AAAA;;AAEA;;AASA;;;;;;AAmBA,MAAMA,IAAmB,GAAG,CAAC;AAC3BC,EAAAA,IAD2B;AAE3BC,EAAAA,IAAI,GAAG,OAFoB;AAG3BC,EAAAA,IAH2B;AAI3BC,EAAAA,KAJ2B;AAK3BC,EAAAA,SAAS,GAAG,MALe;AAM3BC,EAAAA,YAN2B;AAO3BC,EAAAA,SAAS,GAAG,QAPe;AAQ3B,KAAGC;AARwB,CAAD,KAStB;AACJ,QAAMC,KAAK,GAAG,uBAAd;AACA,QAAMC,KAAK,GAAG,2BAAaJ,YAAb,EAA2BC,SAA3B,EAAsCF,SAAtC,EAAiDI,KAAjD,CAAd;AACA,QAAME,OAAO,GAAG,+BAAiBR,IAAjB,EAAuBD,IAAvB,CAAhB;AAEA,SAAO,6BAAC,OAAD,eAAaM,IAAb;AAAmB,IAAA,KAAK,EAAEJ,KAA1B;AAAiC,IAAA,IAAI,EAAEH,IAAvC;AAA6C,IAAA,KAAK,EAAES;AAApD,KAAP;AACD,CAfD;;eAiBeV,I","sourcesContent":["import React, { FC } from 'react';\nimport { StyleProp, TextStyle } from 'react-native';\nimport { useTheme } from '@emotion/react';\nimport {\n ColorGradationType,\n ColorType,\n FontColorType,\n IconSizeType,\n IconType,\n ThemeProp,\n} from '@tecsinapse/react-core';\nimport { getIconColor, getIconComponent } from './helpers';\n\nexport interface IconProps {\n /** Name of the icon. You must use the same icons from react-native-vector-icons */\n name: string;\n /** Default icon sizes from theme */\n size?: IconSizeType;\n /** Icon family. You must use the same icons from react-native-vector-icons */\n type: IconType;\n /** Font theme fill color */\n fontColor?: FontColorType;\n /** Palette theme fill color */\n colorVariant?: ColorType;\n /** Palette theme gradation fill color */\n colorTone?: ColorGradationType;\n style?: StyleProp<TextStyle>;\n}\n\n/** NOTE: When using colors, the order matters if you're trying to merge multiple types. */\nconst Icon: FC<IconProps> = ({\n name,\n size = 'centi',\n type,\n style,\n fontColor = 'dark',\n colorVariant,\n colorTone = 'medium',\n ...rest\n}) => {\n const theme = useTheme() as ThemeProp;\n const color = getIconColor(colorVariant, colorTone, fontColor, theme);\n const RNVIcon = getIconComponent(type, size);\n\n return <RNVIcon {...rest} style={style} name={name} color={color} />;\n};\n\nexport default Icon;\n"],"file":"Icon.js"}
1
+ {"version":3,"file":"Icon.js","names":["Icon","name","size","type","style","fontColor","colorVariant","colorTone","rest","theme","useTheme","color","getIconColor","RNVIcon","getIconComponent"],"sources":["../../../../src/components/atoms/Icon/Icon.tsx"],"sourcesContent":["import React, { FC } from 'react';\nimport { StyleProp, TextStyle } from 'react-native';\nimport { useTheme } from '@emotion/react';\nimport {\n ColorGradationType,\n ColorType,\n FontColorType,\n IconSizeType,\n IconType,\n ThemeProp,\n} from '@tecsinapse/react-core';\nimport { getIconColor, getIconComponent } from './helpers';\n\nexport interface IconProps {\n /** Name of the icon. You must use the same icons from react-native-vector-icons */\n name: string;\n /** Default icon sizes from theme */\n size?: IconSizeType;\n /** Icon family. You must use the same icons from react-native-vector-icons */\n type: IconType;\n /** Font theme fill color */\n fontColor?: FontColorType;\n /** Palette theme fill color */\n colorVariant?: ColorType;\n /** Palette theme gradation fill color */\n colorTone?: ColorGradationType;\n style?: StyleProp<TextStyle>;\n}\n\n/** NOTE: When using colors, the order matters if you're trying to merge multiple types. */\nconst Icon: FC<IconProps> = ({\n name,\n size = 'centi',\n type,\n style,\n fontColor = 'dark',\n colorVariant,\n colorTone = 'medium',\n ...rest\n}) => {\n const theme = useTheme() as ThemeProp;\n const color = getIconColor(colorVariant, colorTone, fontColor, theme);\n const RNVIcon = getIconComponent(type, size);\n\n return <RNVIcon {...rest} style={style} name={name} color={color} />;\n};\n\nexport default Icon;\n"],"mappings":";;;;;AAAA;;AAEA;;AASA;;;;;;AAmBA,MAAMA,IAAmB,GAAG,CAAC;EAC3BC,IAD2B;EAE3BC,IAAI,GAAG,OAFoB;EAG3BC,IAH2B;EAI3BC,KAJ2B;EAK3BC,SAAS,GAAG,MALe;EAM3BC,YAN2B;EAO3BC,SAAS,GAAG,QAPe;EAQ3B,GAAGC;AARwB,CAAD,KAStB;EACJ,MAAMC,KAAK,GAAG,IAAAC,gBAAA,GAAd;EACA,MAAMC,KAAK,GAAG,IAAAC,qBAAA,EAAaN,YAAb,EAA2BC,SAA3B,EAAsCF,SAAtC,EAAiDI,KAAjD,CAAd;EACA,MAAMI,OAAO,GAAG,IAAAC,yBAAA,EAAiBX,IAAjB,EAAuBD,IAAvB,CAAhB;EAEA,OAAO,6BAAC,OAAD,eAAaM,IAAb;IAAmB,KAAK,EAAEJ,KAA1B;IAAiC,IAAI,EAAEH,IAAvC;IAA6C,KAAK,EAAEU;EAApD,GAAP;AACD,CAfD;;eAiBeX,I"}
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
 
3
3
  exports.__esModule = true;
4
- exports.getIconColor = exports.getIconComponent = exports.registerCustomIconType = void 0;
4
+ exports.registerCustomIconType = exports.getIconComponent = exports.getIconColor = void 0;
5
5
 
6
6
  var _native = _interopRequireDefault(require("@emotion/native"));
7
7
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/atoms/Icon/helpers.ts"],"names":["customIcons","registerCustomIconType","id","customIcon","getStyledIcon","Component","size","theme","iconSize","getIconComponent","type","require","default","Object","prototype","hasOwnProperty","call","getIconColor","colorVariant","colorGradation","fontColor","color","font"],"mappings":";;;;;AAQA;;;;AAGA,MAAMA,WAAgB,GAAG,EAAzB;;AAEO,MAAMC,sBAAs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Content":["import {\n ColorGradationType,\n ColorType,\n FontColorType,\n IconSizeType,\n IconType,\n ThemeProp,\n} from '@tecsinapse/react-core';\nimport styled from '@emotion/native';\n\n/* eslint-disable */\nconst customIcons: any = {};\n\nexport const registerCustomIconType = (id: string, customIcon: any) => {\n customIcons[id] = customIcon;\n};\n\nconst getStyledIcon = (Component, size) => styled(Component)`\n font-size: ${({ theme }) => theme.iconSize[size]};\n text-align: center;\n`;\n\nexport const getIconComponent = (type: IconType, size: IconSizeType): any => {\n switch (type) {\n case 'zocial':\n return getStyledIcon(\n require('react-native-vector-icons/dist/Zocial').default,\n size\n );\n case 'octicon':\n return getStyledIcon(\n require('react-native-vector-icons/dist/Octicons').default,\n size\n );\n case 'material':\n return getStyledIcon(\n require('react-native-vector-icons/dist/MaterialIcons').default,\n size\n );\n case 'material-community':\n return getStyledIcon(\n require('react-native-vector-icons/dist/MaterialCommunityIcons')\n .default,\n size\n );\n case 'ionicon':\n return getStyledIcon(\n require('react-native-vector-icons/dist/Ionicons').default,\n size\n );\n case 'foundation':\n return getStyledIcon(\n require('react-native-vector-icons/dist/Foundation').default,\n size\n );\n case 'evilicon':\n return getStyledIcon(\n require('react-native-vector-icons/dist/EvilIcons').default,\n size\n );\n case 'entypo':\n return getStyledIcon(\n require('react-native-vector-icons/dist/Entypo').default,\n size\n );\n case 'font-awesome':\n return getStyledIcon(\n require('react-native-vector-icons/dist/FontAwesome').default,\n size\n );\n case 'font-awesome-5':\n return getStyledIcon(\n require('react-native-vector-icons/dist/FontAwesome5').default,\n size\n );\n case 'simple-line-icon':\n return getStyledIcon(\n require('react-native-vector-icons/dist/SimpleLineIcons').default,\n size\n );\n case 'feather':\n return getStyledIcon(\n require('react-native-vector-icons/dist/Feather').default,\n size\n );\n case 'antdesign':\n case 'ant-design':\n return getStyledIcon(\n require('react-native-vector-icons/dist/AntDesign').default,\n size\n );\n case 'fontisto':\n return getStyledIcon(\n require('react-native-vector-icons/dist/Fontisto').default,\n size\n );\n default:\n if (Object.prototype.hasOwnProperty.call(customIcons, type)) {\n return getStyledIcon(customIcons[type], size);\n }\n return getStyledIcon(\n require('react-native-vector-icons/dist/MaterialIcons').default,\n size\n );\n }\n};\n/* eslint-enable */\nexport const getIconColor = (\n colorVariant: ColorType | undefined,\n colorGradation: ColorGradationType | undefined,\n fontColor: FontColorType,\n theme: ThemeProp\n): string => {\n if (colorVariant && colorGradation) {\n return theme.color[colorVariant][colorGradation];\n }\n return theme.font.color[fontColor];\n};\n"],"file":"helpers.js"}
1
+ {"version":3,"file":"helpers.js","names":["customIcons","registerCustomIconType","id","customIcon","getStyledIcon","Component","size","styled","theme","iconSize","getIconComponent","type","require","default","Object","prototype","hasOwnProperty","call","getIconColor","colorVariant","colorGradation","fontColor","color","font"],"sources":["../../../../src/components/atoms/Icon/helpers.ts"],"sourcesContent":["import {\n ColorGradationType,\n ColorType,\n FontColorType,\n IconSizeType,\n IconType,\n ThemeProp,\n} from '@tecsinapse/react-core';\nimport styled from '@emotion/native';\n\n/* eslint-disable */\nconst customIcons: any = {};\n\nexport const registerCustomIconType = (id: string, customIcon: any) => {\n customIcons[id] = customIcon;\n};\n\nconst getStyledIcon = (Component, size) => styled(Component)`\n font-size: ${({ theme }) => theme.iconSize[size]};\n text-align: center;\n`;\n\nexport const getIconComponent = (type: IconType, size: IconSizeType): any => {\n switch (type) {\n case 'zocial':\n return getStyledIcon(\n require('react-native-vector-icons/dist/Zocial').default,\n size\n );\n case 'octicon':\n return getStyledIcon(\n require('react-native-vector-icons/dist/Octicons').default,\n size\n );\n case 'material':\n return getStyledIcon(\n require('react-native-vector-icons/dist/MaterialIcons').default,\n size\n );\n case 'material-community':\n return getStyledIcon(\n require('react-native-vector-icons/dist/MaterialCommunityIcons')\n .default,\n size\n );\n case 'ionicon':\n return getStyledIcon(\n require('react-native-vector-icons/dist/Ionicons').default,\n size\n );\n case 'foundation':\n return getStyledIcon(\n require('react-native-vector-icons/dist/Foundation').default,\n size\n );\n case 'evilicon':\n return getStyledIcon(\n require('react-native-vector-icons/dist/EvilIcons').default,\n size\n );\n case 'entypo':\n return getStyledIcon(\n require('react-native-vector-icons/dist/Entypo').default,\n size\n );\n case 'font-awesome':\n return getStyledIcon(\n require('react-native-vector-icons/dist/FontAwesome').default,\n size\n );\n case 'font-awesome-5':\n return getStyledIcon(\n require('react-native-vector-icons/dist/FontAwesome5').default,\n size\n );\n case 'simple-line-icon':\n return getStyledIcon(\n require('react-native-vector-icons/dist/SimpleLineIcons').default,\n size\n );\n case 'feather':\n return getStyledIcon(\n require('react-native-vector-icons/dist/Feather').default,\n size\n );\n case 'antdesign':\n case 'ant-design':\n return getStyledIcon(\n require('react-native-vector-icons/dist/AntDesign').default,\n size\n );\n case 'fontisto':\n return getStyledIcon(\n require('react-native-vector-icons/dist/Fontisto').default,\n size\n );\n default:\n if (Object.prototype.hasOwnProperty.call(customIcons, type)) {\n return getStyledIcon(customIcons[type], size);\n }\n return getStyledIcon(\n require('react-native-vector-icons/dist/MaterialIcons').default,\n size\n );\n }\n};\n/* eslint-enable */\nexport const getIconColor = (\n colorVariant: ColorType | undefined,\n colorGradation: ColorGradationType | undefined,\n fontColor: FontColorType,\n theme: ThemeProp\n): string => {\n if (colorVariant && colorGradation) {\n return theme.color[colorVariant][colorGradation];\n }\n return theme.font.color[fontColor];\n};\n"],"mappings":";;;;;AAQA;;;;AAGA,MAAMA,WAAgB,GAAG,EAAzB;;AAEO,MAAMC,sBAAsB,GAAG,CAACC,EAAD,EAAaC,UAAb,KAAiC;EACrEH,WAAW,CAACE,EAAD,CAAX,GAAkBC,UAAlB;AACD,CAFM;;;;AAIP,MAAMC,aAAa,GAAG,CAACC,SAAD,EAAYC,IAAZ,KAAqB,IAAAC,eAAA,EAAOF,SAAP,CAAkB;AAC7D,eAAe,CAAC;EAAEG;AAAF,CAAD,KAAeA,KAAK,CAACC,QAAN,CAAeH,IAAf,CAAqB;AACnD;AACA,CAHA;;AAKO,MAAMI,gBAAgB,GAAG,CAACC,IAAD,EAAi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AOF,aAAa,CAClBQ,OAAO,CAAC,wCAAD,CAAP,CAAkDC,OADhC,EAElBP,IAFkB,CAApB;;IAIF,KAAK,WAAL;IACA,KAAK,YAAL;MACE,OAAOF,aAAa,CAClBQ,OAAO,CAAC,0CAAD,CAAP,CAAoDC,OADlC,EAElBP,IAFkB,CAApB;;IAIF,KAAK,UAAL;MACE,OAAOF,aAAa,CAClBQ,OAAO,CAAC,yCAAD,CAAP,CAAmDC,OADjC,EAElBP,IAFkB,CAApB;;IAIF;MACE,IAAIQ,MAAM,CAACC,SAAP,CAAiBC,cAAjB,CAAgCC,IAAhC,CAAqCjB,WAArC,EAAkDW,IAAlD,CAAJ,EAA6D;QAC3D,OAAOP,aAAa,CAACJ,WAAW,CAACW,IAAD,CAAZ,EAAoBL,IAApB,CAApB;MACD;;MACD,OAAOF,aAAa,CAClBQ,OAAO,CAAC,8CAAD,CAAP,CAAwDC,OADtC,EAElBP,IAFkB,CAApB;EA7EJ;AAkFD,CAnFM;;;;AAqFA,MAAMY,YAAY,GAAG,CAC1BC,YAD0B,EAE1BC,cAF0B,EAG1BC,SAH0B,EAI1Bb,KAJ0B,KAKf;EACX,IAAIW,YAAY,IAAIC,cAApB,EAAoC;IAClC,OAAOZ,KAAK,CAACc,KAAN,CAAYH,YAAZ,EAA0BC,cAA1B,CAAP;EACD;;EACD,OAAOZ,KAAK,CAACe,IAAN,CAAWD,KAAX,CAAiBD,SAAjB,CAAP;AACD,CAVM"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/atoms/Icon/index.ts"],"names":[],"mappings":";;;;;AAAA","sourcesContent":["export { default as Icon, IconProps } from './Icon';\n"],"file":"index.js"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/atoms/Icon/index.ts"],"sourcesContent":["export { default as Icon, IconProps } from './Icon';\n"],"mappings":";;;;;AAAA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/atoms/Input/Hint.tsx"],"names":["Hint","variant","text","TextComponent","Text","color","icon"],"mappings":";;;;;AAAA;;AAGA;;AACA;;;;AAQA,MAAMA,IAAmB,GAAG,CAAC;AAAEC,EAAAA,OAAF;AAAWC,EAAAA,IAAX;AAAiBC,EAAAA,aAAa,GAAGC;AAAjC,CAAD,KAA6C;AACvE,MAAIC,KAAJ;AACA,MAAIC,IAAJ;;AAEA,UAAQL,OAAR;AACE,SAAK,SAAL;AACEI,MAAAA,KAAK,GAAG,WAAR;AACA;;AACF,SAAK,OAAL;AACEA,MAAAA,KAAK,GAAG,OAAR;AACAC,MAAAA,IAAI,GAAG,sBAAP;AACA;;AACF,SAAK,SAAL;AACED,MAAAA,KAAK,GAAG,SAAR;AACAC,MAAAA,IAAI,GAAG,0BAAP;AACA;AAXJ;;AAcA,SACE,6BAAC,2BAAD,QACGA,IAAI,IACH,6BAAC,sBAAD;AACE,IAAA,IAAI,EAAEA,IADR;AAEE,IAAA,IAAI,EAAC,SAFP;AAGE,IAAA,IAAI,EAAC,OAHP;AAIE,IAAA,YAAY,EAAED;AAJhB,IAFJ,EASE,6BAAC,aAAD;AAAe,IAAA,UAAU,EAAC,OAA1B;AAAkC,IAAA,YAAY,EAAEA;AAAhD,KACGH,IADH,CATF,CADF;AAeD,CAjCD;;eAmCeF,I","sourcesContent":["import React, { FC } from 'react';\nimport { ColorType } from '../../../types/defaults';\nimport { InputVariantType } from '../Input';\nimport { Text, TextProps } from '../Text';\nimport { StyledHintContainer, StyledHintIcon } from './styled';\n\ninterface HintProps {\n text?: string;\n variant: InputVariantType;\n TextComponent?: FC<TextProps>;\n}\n\nconst Hint: FC<HintProps> = ({ variant, text, TextComponent = Text }) => {\n let color: ColorType;\n let icon;\n\n switch (variant) {\n case 'default':\n color = 'secondary';\n break;\n case 'error':\n color = 'error';\n icon = 'close-circle-outline';\n break;\n case 'success':\n color = 'success';\n icon = 'checkmark-circle-outline';\n break;\n }\n\n return (\n <StyledHintContainer>\n {icon && (\n <StyledHintIcon\n name={icon}\n type=\"ionicon\"\n size=\"centi\"\n colorVariant={color}\n />\n )}\n <TextComponent typography=\"label\" colorVariant={color}>\n {text}\n </TextComponent>\n </StyledHintContainer>\n );\n};\n\nexport default Hint;\n"],"file":"Hint.js"}
1
+ {"version":3,"file":"Hint.js","names":["Hint","variant","text","TextComponent","Text","color","icon"],"sources":["../../../../src/components/atoms/Input/Hint.tsx"],"sourcesContent":["import React, { FC } from 'react';\nimport { ColorType } from '../../../types/defaults';\nimport { InputVariantType } from '../Input';\nimport { Text, TextProps } from '../Text';\nimport { StyledHintContainer, StyledHintIcon } from './styled';\n\ninterface HintProps {\n text?: string;\n variant: InputVariantType;\n TextComponent?: FC<TextProps>;\n}\n\nconst Hint: FC<HintProps> = ({ variant, text, TextComponent = Text }) => {\n let color: ColorType;\n let icon;\n\n switch (variant) {\n case 'default':\n color = 'secondary';\n break;\n case 'error':\n color = 'error';\n icon = 'close-circle-outline';\n break;\n case 'success':\n color = 'success';\n icon = 'checkmark-circle-outline';\n break;\n }\n\n return (\n <StyledHintContainer>\n {icon && (\n <StyledHintIcon\n name={icon}\n type=\"ionicon\"\n size=\"centi\"\n colorVariant={color}\n />\n )}\n <TextComponent typography=\"label\" colorVariant={color}>\n {text}\n </TextComponent>\n </StyledHintContainer>\n );\n};\n\nexport default Hint;\n"],"mappings":";;;;;AAAA;;AAGA;;AACA;;;;AAQA,MAAMA,IAAmB,GAAG,CAAC;EAAEC,OAAF;EAAWC,IAAX;EAAiBC,aAAa,GAAGC;AAAjC,CAAD,KAA6C;EACvE,IAAIC,KAAJ;EACA,IAAIC,IAAJ;;EAEA,QAAQL,OAAR;IACE,KAAK,SAAL;MACEI,KAAK,GAAG,WAAR;MACA;;IACF,KAAK,OAAL;MACEA,KAAK,GAAG,OAAR;MACAC,IAAI,GAAG,sBAAP;MACA;;IACF,KAAK,SAAL;MACED,KAAK,GAAG,SAAR;MACAC,IAAI,GAAG,0BAAP;MACA;EAXJ;;EAcA,OACE,6BAAC,2BAAD,QACGA,IAAI,IACH,6BAAC,sBAAD;IACE,IAAI,EAAEA,IADR;IAEE,IAAI,EAAC,SAFP;IAGE,IAAI,EAAC,OAHP;IAIE,YAAY,EAAED;EAJhB,EAFJ,EASE,6BAAC,aAAD;IAAe,UAAU,EAAC,OAA1B;IAAkC,YAAY,EAAEA;EAAhD,GACGH,IADH,CATF,CADF;AAeD,CAjCD;;eAmCeF,I"}
@@ -1,7 +1,7 @@
1
1
  import { FC } from 'react';
2
2
  import { StyleProp, ViewStyle } from 'react-native';
3
3
  import { InputElementProps } from '..';
4
- import { ColorGradationType, ColorType, FontColorType, FontStackType, FontWeightType, TypographyVariationType } from '../../../../types/defaults';
4
+ import { ColorGradationType, ColorType, FontColorType, FontStackType, FontWeightType, TypographyVariationType } from '@tecsinapse/react-core';
5
5
  import { TextProps } from '../../Text';
6
6
  export declare type InputVariantType = 'default' | 'error' | 'success';
7
7
  export interface InputContainerProps {
@@ -11,7 +11,7 @@ var _styled = require("../styled");
11
11
 
12
12
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
13
 
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); }
14
+ 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); }
15
15
 
16
16
  const InputContainer = ({
17
17
  label,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/components/atoms/Input/InputContainer/InputContainer.tsx"],"names":["InputContainer","label","labelColor","labelColorTone","labelColorVariant","labelTypography","labelStack","labelWeight","LabelComponent","Text","leftComponent","rightComponent","inputContainerStyle","disabled","focused","variant","children","rest","_defaultLabelColor","_labelColorVariant","_labelColorTone"],"mappings":";;;;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AEC,UADb;AAEE,IAAA,SAAS,EAAEkB,eAFb;AAGE,IAAA,YAAY,EAAED,kBAHhB;AAIE,IAAA,UAAU,EAAEd,eAJd;AAKE,IAAA,UAAU,EAAEE,WALd;AAME,IAAA,SAAS,EAAED;AANb,KAQGL,KARH,CALJ,EAgBGe,QAhBH,CAdF,EAiCGL,cAAc,IACb,6BAAC,yBAAD,QAAoBA,cAApB,CAlCJ,CADF;AAuCD,CA/DD;;eAiEeX,c","sourcesContent":["import React, { FC } from 'react';\nimport { StyleProp, ViewStyle } from 'react-native';\nimport { InputElementProps } from '..';\nimport {\n ColorGradationType,\n ColorType,\n FontColorType,\n FontStackType,\n FontWeightType,\n TypographyVariationType\n} from '../../../../types/defaults';\nimport { Text, TextProps } from '../../Text';\nimport {\n StyledBorderKeeper,\n StyledIconContent,\n StyledInputContainer,\n StyledLabelContainer\n} from '../styled';\n\nexport type InputVariantType = 'default' | 'error' | 'success';\n\nexport interface InputContainerProps {\n label?: string;\n labelColor?: FontColorType;\n labelColorVariant?: ColorType;\n labelColorTone?: ColorGradationType;\n labelTypography?: TypographyVariationType;\n labelStack?: FontStackType;\n LabelComponent?: FC<TextProps>;\n labelWeight?: FontWeightType;\n leftComponent?: JSX.Element;\n rightComponent?: JSX.Element;\n borderColor?: ColorType;\n borderColorGradation?: ColorGradationType;\n style?: StyleProp<ViewStyle>;\n inputContainerStyle?: StyleProp<ViewStyle>;\n focused?: boolean;\n disabled?: boolean;\n variant?: InputVariantType;\n hint?: string;\n hintComponent?: JSX.Element;\n}\n\nconst InputContainer: FC<InputContainerProps & Partial<InputElementProps>> = ({\n label,\n labelColor = 'medium',\n labelColorTone,\n labelColorVariant,\n labelTypography = 'label',\n labelStack = 'default',\n labelWeight = 'bold',\n LabelComponent = Text,\n leftComponent,\n rightComponent,\n inputContainerStyle,\n disabled,\n focused,\n variant,\n children,\n ...rest\n}): JSX.Element => {\n let _defaultLabelColor = labelColorVariant;\n if (variant === 'error') _defaultLabelColor = 'error';\n if (variant === 'success') _defaultLabelColor = 'success';\n const _labelColorVariant = disabled ? 'secondary' : _defaultLabelColor;\n const _labelColorTone = disabled ? 'light' : labelColorTone;\n\n return (\n <StyledInputContainer\n {...rest}\n style={inputContainerStyle}\n focused={focused}\n disabled={disabled}\n >\n <StyledBorderKeeper\n focused={focused}\n disabled={disabled}\n borderColor={_defaultLabelColor}\n />\n\n {leftComponent && <StyledIconContent>{leftComponent}</StyledIconContent>}\n\n <StyledLabelContainer\n leftComponent={leftComponent}\n rightComponent={rightComponent}\n >\n {label && (\n <LabelComponent\n fontColor={labelColor}\n colorTone={_labelColorTone}\n colorVariant={_labelColorVariant}\n typography={labelTypography}\n fontWeight={labelWeight}\n fontStack={labelStack}\n >\n {label}\n </LabelComponent>\n )}\n {children}\n </StyledLabelContainer>\n\n {rightComponent && (\n <StyledIconContent>{rightComponent}</StyledIconContent>\n )}\n </StyledInputContainer>\n );\n};\n\nexport default InputContainer;\n"],"file":"InputContainer.js"}
1
+ {"version":3,"file":"InputContainer.js","names":["InputContainer","label","labelColor","labelColorTone","labelColorVariant","labelTypography","labelStack","labelWeight","LabelComponent","Text","leftComponent","rightComponent","inputContainerStyle","disabled","focused","variant","children","rest","_defaultLabelColor","_labelColorVariant","_labelColorTone"],"sources":["../../../../../src/components/atoms/Input/InputContainer/InputContainer.tsx"],"sourcesContent":["import React, { FC } from 'react';\nimport { StyleProp, ViewStyle } from 'react-native';\nimport { InputElementProps } from '..';\nimport {\n ColorGradationType,\n ColorType,\n FontColorType,\n FontStackType,\n FontWeightType,\n TypographyVariationType,\n} from '@tecsinapse/react-core';\nimport { Text, TextProps } from '../../Text';\nimport {\n StyledBorderKeeper,\n StyledIconContent,\n StyledInputContainer,\n StyledLabelContainer,\n} from '../styled';\n\nexport type InputVariantType = 'default' | 'error' | 'success';\n\nexport interface InputContainerProps {\n label?: string;\n labelColor?: FontColorType;\n labelColorVariant?: ColorType;\n labelColorTone?: ColorGradationType;\n labelTypography?: TypographyVariationType;\n labelStack?: FontStackType;\n LabelComponent?: FC<TextProps>;\n labelWeight?: FontWeightType;\n leftComponent?: JSX.Element;\n rightComponent?: JSX.Element;\n borderColor?: ColorType;\n borderColorGradation?: ColorGradationType;\n style?: StyleProp<ViewStyle>;\n inputContainerStyle?: StyleProp<ViewStyle>;\n focused?: boolean;\n disabled?: boolean;\n variant?: InputVariantType;\n hint?: string;\n hintComponent?: JSX.Element;\n}\n\nconst InputContainer: FC<InputContainerProps & Partial<InputElementProps>> = ({\n label,\n labelColor = 'medium',\n labelColorTone,\n labelColorVariant,\n labelTypography = 'label',\n labelStack = 'default',\n labelWeight = 'bold',\n LabelComponent = Text,\n leftComponent,\n rightComponent,\n inputContainerStyle,\n disabled,\n focused,\n variant,\n children,\n ...rest\n}): JSX.Element => {\n let _defaultLabelColor = labelColorVariant;\n if (variant === 'error') _defaultLabelColor = 'error';\n if (variant === 'success') _defaultLabelColor = 'success';\n const _labelColorVariant = disabled ? 'secondary' : _defaultLabelColor;\n const _labelColorTone = disabled ? 'light' : labelColorTone;\n\n return (\n <StyledInputContainer\n {...rest}\n style={inputContainerStyle}\n focused={focused}\n disabled={disabled}\n >\n <StyledBorderKeeper\n focused={focused}\n disabled={disabled}\n borderColor={_defaultLabelColor}\n />\n\n {leftComponent && <StyledIconContent>{leftComponent}</StyledIconContent>}\n\n <StyledLabelContainer\n leftComponent={leftComponent}\n rightComponent={rightComponent}\n >\n {label && (\n <LabelComponent\n fontColor={labelColor}\n colorTone={_labelColorTone}\n colorVariant={_labelColorVariant}\n typography={labelTypography}\n fontWeight={labelWeight}\n fontStack={labelStack}\n >\n {label}\n </LabelComponent>\n )}\n {children}\n </StyledLabelContainer>\n\n {rightComponent && (\n <StyledIconContent>{rightComponent}</StyledIconContent>\n )}\n </StyledInputContainer>\n );\n};\n\nexport default InputContainer;\n"],"mappings":";;;;;AAAA;;AAWA;;AACA;;;;;;AA+BA,MAAMA,cAAoE,GAAG,CAAC;EAC5EC,KAD4E;EAE5EC,UAAU,G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EeX,c"}
@@ -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
  export interface InputElementProps extends Omit<TextInputProps, 'onChange' | 'value' | 'ref'> {
4
4
  style?: StyleProp<TextStyle>;
5
5
  value?: string;
@@ -8,7 +8,6 @@ export interface InputElementProps extends Omit<TextInputProps, 'onChange' | 'va
8
8
  onChange?: (value: string) => void;
9
9
  onFocus?: () => void;
10
10
  onBlur?: () => void;
11
- ref?: React.Ref<any>;
12
11
  }
13
- declare const InputElement: FC<InputElementProps>;
12
+ declare const InputElement: React.ForwardRefExoticComponent<InputElementProps & React.RefAttributes<TextInput>>;
14
13
  export default InputElement;
@@ -11,7 +11,7 @@ var _styled = require("../styled");
11
11
 
12
12
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
13
 
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); }
14
+ 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); }
15
15
 
16
16
  const InputElement = _react2.default.forwardRef(({
17
17
  onChange,
@@ -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","onChange","placeholder","value","disabled","placeholderTextColor","rest","ref","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,CACE;EACEC,QADF;EAEEC,WAFF;EAGEC,KAHF;EAIEC,QAAQ,GAAG,KAJb;EAKEC,oBALF;EAME,GAAGC;AANL,CADF,EASEC,GATF,KAUkB;EAChB,MAAMC,KAAK,GAAG,IAAAC,eAAA,GAAd;;EACA,MAAMC,iBAAiB,GAAGL,oBAAoB,IAAIG,KAAK,CAACG,IAAN,CAAWC,KAAX,CAAiBC,IAAnE;;EAEA,OACE,8BAAC,0BAAD,eACMP,IADN;IAEE,GAAG,EAAEC,GAFP;IAGE,YAAY,EAAEN,QAHhB;IAIE,KAAK,EAAEE,KAJT;IAKE,WAAW,EAAED,WALf;IAME,oBAAoB,EAAEQ,iBANxB;IAOE,QAAQ,EAAEN,QAPZ;IAQE,QAAQ,EAAE,CAACA;EARb,GADF;AAYD,CA3BkB,CAArB;;AA8BAN,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;
@@ -17,7 +17,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
17
17
 
18
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; }
19
19
 
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); }
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); }
21
21
 
22
22
  const InputMaskElement = _react2.default.forwardRef(({
23
23
  onChange,
@@ -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,UA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;AACF,KAbD,MAaO,IAAIe,SAAS,KAAKH,SAAd,IAA2BZ,KAAK,KAAKY,SAAzC,EAAoD;AACzDS,MAAAA,aAAa,CAACrB,KAAD,CAAb;AACD;AACF,GAlBD,EAkBG,CAACA,KAAD,CAlBH;AAoBA,SACE,8BAAC,0BAAD,eACMI,IADN;AAEE,IAAA,GAAG,EAAEC,GAFP;AAGE,IAAA,YAAY,EAAEgB,aAHhB;AAIE,IAAA,KAAK,EAAEJ,MAJT;AAKE,IAAA,WAAW,EAAElB,WALf;AAME,IAAA,oBAAoB,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","onChange","placeholder","value","disabled","placeholderTextColor","mask","rest","ref","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,CACE;EACEC,QADF;EAEEC,WAFF;EAGEC,KAHF;EAIEC,QAAQ,GAAG,KAJb;EAKEC,oBALF;EAMEC,IANF;EAOE,GAAGC;AAPL,CADF,EAUEC,GAVF,KAWkB;EAChB,MAAMC,KAAK,GAAG,IAAAC,eAAA,GAAd;;EAEA,MAAMC,iBAAiB,GAAGN,oBAAoB,IAAII,KAAK,CAACG,IA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vB,EAKE;MAEA,IACEA,SAAS,CAACM,GAAV,KAAkBX,SAAlB,IACAK,SAAS,CAACM,GAAV,CAAcH,QAAd,OAA6BrB,KAAK,CAACqB,QAAN,EAF/B,EAGE;QACAI,aAAa,CAACzB,KAAD,CAAb;MACD;IACF,CAbD,MAaO,IAAIkB,SAAS,KAAKL,SAAd,IAA2Bb,KAAK,KAAKa,SAAzC,EAAoD;MACzDY,aAAa,CAACzB,KAAD,CAAb;IACD;EACF,CAlBD,EAkBG,CAACA,KAAD,CAlBH;EAoBA,OACE,8BAAC,0BAAD,eACMI,IADN;IAEE,GAAG,EAAEC,GAFP;IAGE,YAAY,EAAEoB,aAHhB;IAIE,KAAK,EAAEL,MAJT;IAKE,WAAW,EAAErB,WALf;IAME,oBAAoB,EAAES,iBANxB;IAOE,QAAQ,EAAEP,QAPZ;IAQE,QAAQ,EAAE,CAACA;EARb,GADF;AAYD,CArFsB,CAAzB;;AAwFAN,gBAAgB,CAACgC,WAAjB,GAA+B,kBAA/B;eAEehC,gB"}
@@ -15,7 +15,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
15
15
 
16
16
  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
17
 
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); }
18
+ 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
19
 
20
20
  const PressableInputContainer = ({
21
21
  onPress,
@@ -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,CAAC;EACvEC,OADuE;EAEvEC,QAFuE;EAGvEC,KAHuE;EAIvEC,QAJuE;EAKvE,GAAGC;AALoE,CAAD,KAMlE;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 @@
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 {\n default as PressableInputContainer,\n PressableInputContainerProps,\n} from './PressableInputContainer';\n"],"mappings":";;;;;AAAA"}
@@ -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,SAAU;AACvD;AACA,CAFO"}
@@ -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,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 +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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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,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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O,gBAAxB;EACD;;EAED,OAAO;IACLhB,cADK;IAELD;EAFK,CAAP;AAID,CAxCM;;;;AAgDA,MAAMkB,aAAa,GAAG,CAC3BnB,OAD2B,EAE3BoB,YAF2B,KAGuB;EAClD,MAAMC,SAAS,GAAG,IAAAC,kBAAA,EAChB,CAACvB,KAAsB,GAAG,CAA1B,KAA2C;IACzC,MAAM;MAAEG,cAAF;MAAkBD;IAAlB,IAAoCH,wBAAwB,CAChEC,KADgE,EAEhEC,OAFgE,CAAlE;IAKA,OAAO;MACLuB,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,7 +1,7 @@
1
1
  "use strict";
2
2
 
3
3
  exports.__esModule = true;
4
- exports.useStringMask = exports.getMask = exports.mergeMask = void 0;
4
+ exports.useStringMask = exports.mergeMask = exports.getMask = void 0;
5
5
 
6
6
  var _react = require("react");
7
7
 
@@ -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,QAAxB,EAAkC;AAChCF,MAAAA,MAAM;AAEN,YAAMK,aAAa,GAAGC,KAAK,CAACC,OAAN,CAAcL,QAAd,IAA0BA,QAAQ,CAAC,CAAD,CAAlC,GAAwCA,QAA9D;AACA,YAAMM,UAAU,GAAGC,MAAM,CAACJ,aAAD,CAAN,CAAsBK,IAAtB,CAA2BP,SAA3B,CAAnB;;AAEA,UAAIK,UAAJ,EAAgB;AACdX,QAAAA,SAAS,IAAIM,SAAb;AACAL,QAAAA,GAAG,IAAIM,YAAP;AACAL,QAAAA,KAAK;AACN;AACF,KAXD,MAWO;AACLF,MAAAA,SAAS,IAAIK,QAAb;AACAH,MAAAA,KAAK;AACN;AACF;;AAED,SAAO;AAAED,IAAAA,GAAF;AAAOD,IAAAA;AAAP,GAAP;AACD,C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ChB,CAAC1B,KAAK,GAAG,EAAT,KAA2B;AACzB,UAAM2B,YAAY,GAAGX,OAAO,CAACf,IAAD,EAAOD,KAAP,CAA5B;AACA,UAAM;AAAEE,MAAAA,SAAF;AAAaC,MAAAA;AAAb,QAAqBJ,SAAS,CAACC,KAAD,EAAQ2B,YAAR,CAApC;AAEA,WAAO;AACLxB,MAAAA,GADK;AAELD,MAAAA;AAFK,KAAP;AAID,GATe,EAUhB,CAACD,IAAD,CAVgB,CAAlB;AAaA,QAAM,CAACD,KAAD,EAAQ4B,QAAR,IAAoB,qBACxBF,SAAS,CAACD,YAAD,oBAACA,YAAY,CAAEI,QAAd,EAAD,CADe,CAA1B;AAIA,QAAMC,iBAAiB,GAAG,wBACvBC,cAAD,IAAqC;AACnC,UAAM;AAAE5B,MAAAA,GAAF;AAAOD,MAAAA;AAAP,QAAqBwB,SAAS,CAACK,cAAD,oBAACA,cAAc,CAAEF,QAAhB,EAAD,CAApC;AACAD,IAAAA,QAAQ,CAAC;AACPzB,MAAAA,GADO;AAEPD,MAAAA;AAFO,KAAD,CAAR;AAID,GAPuB,EAQxB,CAACwB,SAAD,EAAYE,QAAZ,CARwB,CAA1B;AAWA,SAAO,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,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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G,CAACE,CAAD,CAAnB;QACN;MACF;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"}
@@ -15,7 +15,7 @@ var _exportNames = {
15
15
  StyledBorderKeeper: true,
16
16
  disabledInputStyles: true
17
17
  };
18
- exports.disabledInputStyles = exports.StyledBorderKeeper = exports.PressableInputContainerProps = exports.PressableInputContainer = exports.InputMaskElementProps = exports.InputElementProps = exports.InputVariantType = exports.InputContainerProps = exports.InputMaskElement = exports.InputElement = exports.InputContainer = exports.Hint = void 0;
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;
19
19
 
20
20
  var _Hint = _interopRequireDefault(require("./Hint"));
21
21
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/atoms/Input/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;;;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;;;;;AAKA;;;;;AAIA;;;;;AAIA;;;;;AAIA","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"],"file":"index.js"}
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,7 +1,7 @@
1
1
  "use strict";
2
2
 
3
3
  exports.__esModule = true;
4
- exports.StyledHintIcon = exports.StyledHintContainer = exports.StyledInputElement = exports.StyledBorderKeeper = exports.StyledLabelContainer = exports.StyledInputElementBase = exports.StyledInputContainer = exports.StyledIconContent = exports.disabledInputStyles = void 0;
4
+ exports.disabledInputStyles = exports.StyledLabelContainer = exports.StyledInputElementBase = exports.StyledInputElement = exports.StyledInputContainer = exports.StyledIconContent = exports.StyledHintIcon = exports.StyledHintContainer = exports.StyledBorderKeeper = void 0;
5
5
 
6
6
  var _native = _interopRequireWildcard(require("@emotion/native"));
7
7
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/atoms/Input/styled.ts"],"names":["leftIconStyles","leftComponent","theme","spacing","centi","rightIconStyles","rightComponent","disabledContainerStyles","disabled","disabledInputStyles","color","secondary","light","focusedStyles","focused","borderColor","borderWidth","nano","dark","StyledIconContent","styled","View","zIndex","default","StyledInputContainer","StyledInputElementBase","TextInput","font","stack","typography","base","fontSize","weight","bold","StyledLabelContainer","props","micro","StyledBorderKeeperBase","miscellaneous","surfaceColor","borderColorGradation","borderRadius","mili","pico","StyledBorderKeeper","StyledInputElement","StyledHintContainer","StyledHintIcon","Icon"],"mappings":";;;;;AAAA;;AACA;;AAGA;;AACA;;;;;;AAGA,MAAMA,cAAc,GAAG,CAAC;AACtBC,EAAAA,aADsB;AAEtBC,EAAAA;AAFsB,CAAD,KAIrB,CAACD,aAAD,IACA,gBAAI;AACN,oBAAoBC,KAAK,CAACC,OAAN,CAAcC,KAAM;AACxC,GAPA;;AASA,MAAMC,eA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AAI,gBAAI;AACf,MAAM1B,mBAAmB,CAAC0B,KAAD,CAAQ;AACjC,GALkC,CAA3B;;AAQA,MAAMW,mBAAmB,GAAG1B,gBAAOC,IAA0B;AACpE,gBAAgB,CAAC;AAAEnB,EAAAA;AAAF,CAAD,KAAeA,KAAK,CAACC,OAAN,CAAciC,KAAM;AACnD;AACA;AACA,CAJO;;AAMA,MAAMW,cAAc,GAAG,qBAAOC,UAAP,CAAkC;AAChE,kBAAkB,CAAC;AAAE9C,EAAAA;AAAF,CAAD,KAAeA,KAAK,CAACC,OAAN,CAAciC,KAAM;AACrD,CAFO","sourcesContent":["import styled, { css } from '@emotion/native';\nimport { TextInput } from 'react-native';\nimport { InputElementProps } from '.';\nimport { StyleProps } from '../../../types/defaults';\nimport { RFValueStr } from '../../../utils/ResponsiveFontSize';\nimport { Icon } from '../Icon';\nimport { InputContainerProps } from './InputContainer/InputContainer';\n\nconst leftIconStyles = ({\n leftComponent,\n theme,\n}: Partial<InputContainerProps> & StyleProps) =>\n !leftComponent &&\n css`\n padding-left: ${theme.spacing.centi};\n `;\n\nconst rightIconStyles = ({\n rightComponent,\n theme,\n}: Partial<InputContainerProps> & StyleProps) =>\n !rightComponent &&\n css`\n padding-right: ${theme.spacing.centi};\n `;\n\nconst disabledContainerStyles = ({\n disabled,\n}: Partial<InputContainerProps> & StyleProps) =>\n disabled &&\n css`\n background-color: transparent;\n `;\n\nexport const disabledInputStyles = ({\n disabled,\n theme,\n}: Partial<InputContainerProps> & Partial<StyleProps>) =>\n disabled &&\n css`\n color: ${theme?.color.secondary.light};\n `;\n\nconst focusedStyles = ({\n focused,\n borderColor = 'secondary',\n theme,\n}: Partial<InputContainerProps> & StyleProps) =>\n focused &&\n css`\n border-width: ${theme.borderWidth.nano};\n border-color: ${theme.color[borderColor].dark};\n `;\n\nexport const StyledIconContent = styled.View<Partial<StyleProps>>`\n z-index: ${({ theme }) => theme.zIndex.default};\n flex-direction: row;\n align-items: center;\n`;\n\nexport const StyledInputContainer = styled.View<\n Partial<InputContainerProps> & Partial<StyleProps>\n>`\n flex-direction: row;\n align-items: center;\n min-height: ${RFValueStr('44px')};\n`;\n\nexport const StyledInputElementBase = styled(TextInput)<\n InputElementProps & Partial<StyleProps>\n>`\n font-family: ${({ theme }) => `'${theme.font.stack.default}'`};\n font-size: ${({ theme }) => theme.typography.base.fontSize};\n font-weight: ${({ theme }) => theme.font.weight.bold};\n color: ${({ theme }) => theme.font.color.dark};\n`;\n\nexport const StyledLabelContainer = styled.View<\n Partial<InputContainerProps> & Partial<StyleProps>\n>(\n props => css`\n flex: 1;\n padding: ${props.theme.spacing.micro} 0;\n ${leftIconStyles(props)}\n ${rightIconStyles(props)}\n `\n);\n\nconst StyledBorderKeeperBase = styled.View<\n Partial<InputContainerProps> & Partial<StyleProps>\n>`\n background-color: ${({ theme }) => theme.miscellaneous.surfaceColor};\n border-color: ${({\n theme,\n borderColor = 'secondary',\n borderColorGradation = 'light',\n }) => theme.color[borderColor][borderColorGradation]};\n border-radius: ${({ theme }) => theme.borderRadius.mili};\n border-width: ${({ theme }) => theme.borderWidth.pico};\n position: absolute;\n width: 100%;\n height: 100%;\n`;\n\nexport const StyledBorderKeeper = styled(StyledBorderKeeperBase)<\n Partial<StyleProps>\n>(\n props => css`\n ${focusedStyles(props)}\n ${disabledContainerStyles(props)}\n `\n);\n\nexport const StyledInputElement = styled(StyledInputElementBase)<\n InputElementProps & Partial<StyleProps>\n>(\n props => css`\n ${disabledInputStyles(props)}\n `\n);\n\nexport const StyledHintContainer = styled.View<Partial<StyleProps>>`\n margin-top: ${({ theme }) => theme.spacing.micro};\n flex-direction: row;\n align-items: center;\n`;\n\nexport const StyledHintIcon = styled(Icon)<Partial<StyleProps>>`\n margin-right: ${({ theme }) => theme.spacing.micro};\n`;\n"],"file":"styled.js"}
1
+ {"version":3,"file":"styled.js","names":["leftIconStyles","leftComponent","theme","css","spacing","centi","rightIconStyles","rightComponent","disabledContainerStyles","disabled","disabledInputStyles","color","secondary","light","focusedStyles","focused","borderColor","borderWidth","nano","dark","StyledIconContent","styled","View","zIndex","default","StyledInputContainer","RFValueStr","StyledInputElementBase","TextInput","font","stack","typography","base","fontSize","weight","bold","StyledLabelContainer","props","micro","StyledBorderKeeperBase","miscellaneous","surfaceColor","borderColorGradation","borderRadius","mili","pico","StyledBorderKeeper","StyledInputElement","StyledHintContainer","StyledHintIcon","Icon"],"sources":["../../../../src/components/atoms/Input/styled.ts"],"sourcesContent":["import styled, { css } from '@emotion/native';\nimport { TextInput } from 'react-native';\nimport { InputElementProps } from '.';\nimport { StyleProps } from '../../../types/defaults';\nimport { RFValueStr } from '../../../utils/ResponsiveFontSize';\nimport { Icon } from '../Icon';\nimport { InputContainerProps } from './InputContainer/InputContainer';\n\nconst leftIconStyles = ({\n leftComponent,\n theme,\n}: Partial<InputContainerProps> & StyleProps) =>\n !leftComponent &&\n css`\n padding-left: ${theme.spacing.centi};\n `;\n\nconst rightIconStyles = ({\n rightComponent,\n theme,\n}: Partial<InputContainerProps> & StyleProps) =>\n !rightComponent &&\n css`\n padding-right: ${theme.spacing.centi};\n `;\n\nconst disabledContainerStyles = ({\n disabled,\n}: Partial<InputContainerProps> & StyleProps) =>\n disabled &&\n css`\n background-color: transparent;\n `;\n\nexport const disabledInputStyles = ({\n disabled,\n theme,\n}: Partial<InputContainerProps> & Partial<StyleProps>) =>\n disabled &&\n css`\n color: ${theme?.color.secondary.light};\n `;\n\nconst focusedStyles = ({\n focused,\n borderColor = 'secondary',\n theme,\n}: Partial<InputContainerProps> & StyleProps) =>\n focused &&\n css`\n border-width: ${theme.borderWidth.nano};\n border-color: ${theme.color[borderColor].dark};\n `;\n\nexport const StyledIconContent = styled.View<Partial<StyleProps>>`\n z-index: ${({ theme }) => theme.zIndex.default};\n flex-direction: row;\n align-items: center;\n`;\n\nexport const StyledInputContainer = styled.View<\n Partial<InputContainerProps> & Partial<StyleProps>\n>`\n flex-direction: row;\n align-items: center;\n min-height: ${RFValueStr('44px')};\n`;\n\nexport const StyledInputElementBase = styled(TextInput)<\n InputElementProps & Partial<StyleProps>\n>`\n font-family: ${({ theme }) => `'${theme.font.stack.default}'`};\n font-size: ${({ theme }) => theme.typography.base.fontSize};\n font-weight: ${({ theme }) => theme.font.weight.bold};\n color: ${({ theme }) => theme.font.color.dark};\n`;\n\nexport const StyledLabelContainer = styled.View<\n Partial<InputContainerProps> & Partial<StyleProps>\n>(\n props => css`\n flex: 1;\n padding: ${props.theme.spacing.micro} 0;\n ${leftIconStyles(props)}\n ${rightIconStyles(props)}\n `\n);\n\nconst StyledBorderKeeperBase = styled.View<\n Partial<InputContainerProps> & Partial<StyleProps>\n>`\n background-color: ${({ theme }) => theme.miscellaneous.surfaceColor};\n border-color: ${({\n theme,\n borderColor = 'secondary',\n borderColorGradation = 'light',\n }) => theme.color[borderColor][borderColorGradation]};\n border-radius: ${({ theme }) => theme.borderRadius.mili};\n border-width: ${({ theme }) => theme.borderWidth.pico};\n position: absolute;\n width: 100%;\n height: 100%;\n`;\n\nexport const StyledBorderKeeper = styled(StyledBorderKeeperBase)<\n Partial<StyleProps>\n>(\n props => css`\n ${focusedStyles(props)}\n ${disabledContainerStyles(props)}\n `\n);\n\nexport const StyledInputElement = styled(StyledInputElementBase)<\n InputElementProps & Partial<StyleProps>\n>(\n props => css`\n ${disabledInputStyles(props)}\n `\n);\n\nexport const StyledHintContainer = styled.View<Partial<StyleProps>>`\n margin-top: ${({ theme }) => theme.spacing.micro};\n flex-direction: row;\n align-items: center;\n`;\n\nexport const StyledHintIcon = styled(Icon)<Partial<StyleProps>>`\n margin-right: ${({ theme }) => theme.spacing.micro};\n`;\n"],"mappings":";;;;;AAAA;;AACA;;AAGA;;AACA;;;;;;AAGA,MAAMA,cAAc,GAAG,CAAC;EACtBC,aADsB;EAEtBC;AAFsB,CAAD,KAIrB,CAACD,aAAD,IACA,IAAAE,WAAA,CAAI;AACN,oBAAoBD,KAAK,CAACE,OAAN,CAAcC,KAAM;AACxC,GAPA;;AASA,MAAM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AGhCU,KAAK,IAAI,IAAAlC,WAAA,CAAI;AACf,MAAMO,mBAAmB,CAAC2B,KAAD,CAAQ;AACjC,GALkC,CAA3B;;AAQA,MAAMW,mBAAmB,GAAG3B,eAAA,CAAOC,IAA0B;AACpE,gBAAgB,CAAC;EAAEpB;AAAF,CAAD,KAAeA,KAAK,CAACE,OAAN,CAAckC,KAAM;AACnD;AACA;AACA,CAJO;;AAMA,MAAMW,cAAc,GAAG,IAAA5B,eAAA,EAAO6B,UAAP,CAAkC;AAChE,kBAAkB,CAAC;EAAEhD;AAAF,CAAD,KAAeA,KAAK,CAACE,OAAN,CAAckC,KAAM;AACrD,CAFO"}
@@ -9,7 +9,7 @@ var _styled = require("./styled");
9
9
 
10
10
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
11
 
12
- 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); }
12
+ 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); }
13
13
 
14
14
  const Paper = ({
15
15
  children,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/atoms/Paper/Paper.tsx"],"names":["Paper","children","elevated","rest"],"mappings":";;;;;AAAA;;AAEA;;;;;;AAQA,MAAMA,KAAqB,GAAG,CAAC;AAC7BC,EAAAA,QAD6B;AAE7BC,EAAAA,QAAQ,GAAG,KAFkB;AAG7B,KAAGC;AAH0B,CAAD,KAK5B,6BAAC,mBAAD,eAAiBA,IAAjB;AAAuB,EAAA,QAAQ,EAAED;AAAjC,IACGD,QADH,CALF;;eAUeD,K","sourcesContent":["import React, { FC } from 'react';\nimport { StyleProp, ViewStyle } from 'react-native';\nimport { StyledPaper } from './styled';\n\nexport interface PaperProps {\n /** Creates elevation shadow */\n elevated?: boolean;\n style?: StyleProp<ViewStyle>;\n}\n\nconst Paper: FC<PaperProps> = ({\n children,\n elevated = false,\n ...rest\n}): JSX.Element => (\n <StyledPaper {...rest} elevated={elevated}>\n {children}\n </StyledPaper>\n);\n\nexport default Paper;\n"],"file":"Paper.js"}
1
+ {"version":3,"file":"Paper.js","names":["Paper","children","elevated","rest"],"sources":["../../../../src/components/atoms/Paper/Paper.tsx"],"sourcesContent":["import React, { FC } from 'react';\nimport { StyleProp, ViewStyle } from 'react-native';\nimport { StyledPaper } from './styled';\n\nexport interface PaperProps {\n /** Creates elevation shadow */\n elevated?: boolean;\n style?: StyleProp<ViewStyle>;\n}\n\nconst Paper: FC<PaperProps> = ({\n children,\n elevated = false,\n ...rest\n}): JSX.Element => (\n <StyledPaper {...rest} elevated={elevated}>\n {children}\n </StyledPaper>\n);\n\nexport default Paper;\n"],"mappings":";;;;;AAAA;;AAEA;;;;;;AAQA,MAAMA,KAAqB,GAAG,CAAC;EAC7BC,QAD6B;EAE7BC,QAAQ,GAAG,KAFkB;EAG7B,GAAGC;AAH0B,CAAD,KAK5B,6BAAC,mBAAD,eAAiBA,IAAjB;EAAuB,QAAQ,EAAED;AAAjC,IACGD,QADH,CALF;;eAUeD,K"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/atoms/Paper/index.ts"],"names":[],"mappings":";;;;;AAAA","sourcesContent":["export { default as Paper, PaperProps } from './Paper';\n"],"file":"index.js"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/atoms/Paper/index.ts"],"sourcesContent":["export { default as Paper, PaperProps } from './Paper';\n"],"mappings":";;;;;AAAA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/atoms/Paper/styled.ts"],"names":["StyledPaper","Animated","View","props"],"mappings":";;;;;AAAA;;AACA;;AAGA;;;;;;AAEO,MAAMA,WAAW,GAAG,qBAAOC,sBAASC,IAAhB,EAGzBC,KAAK,IAAI,gBAAI;AACf,MAAM,8BAAWA,KAAX,CAAkB;AACxB,MAAM,kCAAeA,KAAf,CAAsB;AAC5B,GAN2B,CAApB","sourcesContent":["import { Animated } from 'react-native';\nimport styled, { css } from '@emotion/native';\nimport { StyleProps } from '@tecsinapse/react-core';\nimport { PaperProps } from './Paper';\nimport { baseStyles, elevatedStyles } from '../shared/PaperAndCard';\n\nexport const StyledPaper = styled(Animated.View)<\n PaperProps & Partial<StyleProps>\n>(\n props => css`\n ${baseStyles(props)}\n ${elevatedStyles(props)}\n `\n);\n"],"file":"styled.js"}
1
+ {"version":3,"file":"styled.js","names":["StyledPaper","styled","Animated","View","props","css","baseStyles","elevatedStyles"],"sources":["../../../../src/components/atoms/Paper/styled.ts"],"sourcesContent":["import { Animated } from 'react-native';\nimport styled, { css } from '@emotion/native';\nimport { StyleProps } from '@tecsinapse/react-core';\nimport { PaperProps } from './Paper';\nimport { baseStyles, elevatedStyles } from '../shared/PaperAndCard';\n\nexport const StyledPaper = styled(Animated.View)<\n PaperProps & Partial<StyleProps>\n>(\n props => css`\n ${baseStyles(props)}\n ${elevatedStyles(props)}\n `\n);\n"],"mappings":";;;;;AAAA;;AACA;;AAGA;;;;;;AAEO,MAAMA,WAAW,GAAG,IAAAC,eAAA,EAAOC,qBAAA,CAASC,IAAhB,EAGzBC,KAAK,IAAI,IAAAC,WAAA,CAAI;AACf,MAAM,IAAAC,wBAAA,EAAWF,KAAX,CAAkB;AACxB,MAAM,IAAAG,4BAAA,EAAeH,KAAf,CAAsB;AAC5B,GAN2B,CAApB"}
@@ -13,7 +13,7 @@ var _utils = require("../../../utils");
13
13
 
14
14
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
15
 
16
- 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); }
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
17
 
18
18
  const COLOR_VARIATION_FACTOR = 25;
19
19