@tecsinapse/react-core 1.20.0 → 1.21.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 (573) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/dist/components/atoms/Avatar/Avatar.d.ts +1 -1
  3. package/dist/components/atoms/Avatar/Avatar.js +30 -42
  4. package/dist/components/atoms/Avatar/Avatar.js.map +1 -1
  5. package/dist/components/atoms/Avatar/Avatar.stories.d.ts +9 -0
  6. package/dist/components/atoms/Avatar/helpers.js +6 -11
  7. package/dist/components/atoms/Avatar/helpers.js.map +1 -1
  8. package/dist/components/atoms/Avatar/styled.js +41 -54
  9. package/dist/components/atoms/Avatar/styled.js.map +1 -1
  10. package/dist/components/atoms/Badge/Badge.js +17 -23
  11. package/dist/components/atoms/Badge/Badge.js.map +1 -1
  12. package/dist/components/atoms/Badge/styled.js +44 -31
  13. package/dist/components/atoms/Badge/styled.js.map +1 -1
  14. package/dist/components/atoms/BoxContent/BoxContent.js +38 -18
  15. package/dist/components/atoms/BoxContent/BoxContent.js.map +1 -1
  16. package/dist/components/atoms/BoxContent/BoxContent.stories.d.ts +9 -0
  17. package/dist/components/atoms/BoxContent/styled.d.ts +1 -1
  18. package/dist/components/atoms/BoxContent/styled.js +53 -73
  19. package/dist/components/atoms/BoxContent/styled.js.map +1 -1
  20. package/dist/components/atoms/Button/Button.js +77 -51
  21. package/dist/components/atoms/Button/Button.js.map +1 -1
  22. package/dist/components/atoms/Button/States/BaseState.d.ts +1 -1
  23. package/dist/components/atoms/Button/States/BaseState.js +27 -36
  24. package/dist/components/atoms/Button/States/BaseState.js.map +1 -1
  25. package/dist/components/atoms/Button/States/Error.d.ts +1 -1
  26. package/dist/components/atoms/Button/States/Error.js +28 -17
  27. package/dist/components/atoms/Button/States/Error.js.map +1 -1
  28. package/dist/components/atoms/Button/States/Loading.d.ts +1 -1
  29. package/dist/components/atoms/Button/States/Loading.js +26 -35
  30. package/dist/components/atoms/Button/States/Loading.js.map +1 -1
  31. package/dist/components/atoms/Button/States/Success.d.ts +1 -1
  32. package/dist/components/atoms/Button/States/Success.js +28 -17
  33. package/dist/components/atoms/Button/States/Success.js.map +1 -1
  34. package/dist/components/atoms/Button/States/styled.js +17 -39
  35. package/dist/components/atoms/Button/States/styled.js.map +1 -1
  36. package/dist/components/atoms/Button/styled.js +52 -50
  37. package/dist/components/atoms/Button/styled.js.map +1 -1
  38. package/dist/components/atoms/Card/Card.js +52 -28
  39. package/dist/components/atoms/Card/Card.js.map +1 -1
  40. package/dist/components/atoms/Card/Card.stories.d.ts +9 -0
  41. package/dist/components/atoms/Card/Footer/Footer.js +10 -21
  42. package/dist/components/atoms/Card/Footer/Footer.js.map +1 -1
  43. package/dist/components/atoms/Card/Header/Header.js +10 -21
  44. package/dist/components/atoms/Card/Header/Header.js.map +1 -1
  45. package/dist/components/atoms/Card/styled.js +14 -17
  46. package/dist/components/atoms/Card/styled.js.map +1 -1
  47. package/dist/components/atoms/Checkbox/Checkbox.js +66 -39
  48. package/dist/components/atoms/Checkbox/Checkbox.js.map +1 -1
  49. package/dist/components/atoms/Checkbox/Checkbox.stories.d.ts +9 -0
  50. package/dist/components/atoms/Checkbox/styled.js +39 -68
  51. package/dist/components/atoms/Checkbox/styled.js.map +1 -1
  52. package/dist/components/atoms/Divider/Divider.js +38 -18
  53. package/dist/components/atoms/Divider/Divider.js.map +1 -1
  54. package/dist/components/atoms/Divider/Divider.stories.d.ts +9 -0
  55. package/dist/components/atoms/Divider/styled.js +30 -43
  56. package/dist/components/atoms/Divider/styled.js.map +1 -1
  57. package/dist/components/atoms/GroupButton/GroupButton.js +68 -47
  58. package/dist/components/atoms/GroupButton/GroupButton.js.map +1 -1
  59. package/dist/components/atoms/GroupButton/GroupButton.stories.d.ts +8 -0
  60. package/dist/components/atoms/GroupButton/GroupButtonOption.js +16 -23
  61. package/dist/components/atoms/GroupButton/GroupButtonOption.js.map +1 -1
  62. package/dist/components/atoms/GroupButton/styled.js +113 -124
  63. package/dist/components/atoms/GroupButton/styled.js.map +1 -1
  64. package/dist/components/atoms/Icon/Icon.js +64 -31
  65. package/dist/components/atoms/Icon/Icon.js.map +1 -1
  66. package/dist/components/atoms/Icon/Icon.stories.d.ts +9 -0
  67. package/dist/components/atoms/Icon/helpers.d.ts +2 -2
  68. package/dist/components/atoms/Icon/helpers.js +110 -77
  69. package/dist/components/atoms/Icon/helpers.js.map +1 -1
  70. package/dist/components/atoms/Input/Hint.js +19 -34
  71. package/dist/components/atoms/Input/Hint.js.map +1 -1
  72. package/dist/components/atoms/Input/InputContainer/InputContainer.js +81 -44
  73. package/dist/components/atoms/Input/InputContainer/InputContainer.js.map +1 -1
  74. package/dist/components/atoms/Input/InputElement/InputElement.js +68 -40
  75. package/dist/components/atoms/Input/InputElement/InputElement.js.map +1 -1
  76. package/dist/components/atoms/Input/InputMaskElement/InputMaskElement.js +109 -83
  77. package/dist/components/atoms/Input/InputMaskElement/InputMaskElement.js.map +1 -1
  78. package/dist/components/atoms/Input/PressableInputContainer/PressableInputContainer.js +67 -31
  79. package/dist/components/atoms/Input/PressableInputContainer/PressableInputContainer.js.map +1 -1
  80. package/dist/components/atoms/Input/PressableInputContainer/styled.js +9 -12
  81. package/dist/components/atoms/Input/PressableInputContainer/styled.js.map +1 -1
  82. package/dist/components/atoms/Input/hooks/useInputFocus.d.ts +1 -1
  83. package/dist/components/atoms/Input/hooks/useInputFocus.js +8 -12
  84. package/dist/components/atoms/Input/hooks/useInputFocus.js.map +1 -1
  85. package/dist/components/atoms/Input/hooks/useNumberMask.d.ts +2 -2
  86. package/dist/components/atoms/Input/hooks/useNumberMask.js +67 -66
  87. package/dist/components/atoms/Input/hooks/useNumberMask.js.map +1 -1
  88. package/dist/components/atoms/Input/hooks/useStringMask.d.ts +1 -1
  89. package/dist/components/atoms/Input/hooks/useStringMask.js +49 -60
  90. package/dist/components/atoms/Input/hooks/useStringMask.js.map +1 -1
  91. package/dist/components/atoms/Input/styled.js +106 -144
  92. package/dist/components/atoms/Input/styled.js.map +1 -1
  93. package/dist/components/atoms/Paper/Paper.js +47 -21
  94. package/dist/components/atoms/Paper/Paper.js.map +1 -1
  95. package/dist/components/atoms/Paper/Paper.stories.d.ts +9 -0
  96. package/dist/components/atoms/Paper/styled.js +14 -17
  97. package/dist/components/atoms/Paper/styled.js.map +1 -1
  98. package/dist/components/atoms/PressableSurface/PressableSurface.js +78 -68
  99. package/dist/components/atoms/PressableSurface/PressableSurface.js.map +1 -1
  100. package/dist/components/atoms/ProgressBar/ProgressBar.js +88 -44
  101. package/dist/components/atoms/ProgressBar/ProgressBar.js.map +1 -1
  102. package/dist/components/atoms/ProgressBar/ProgressBar.stories.d.ts +9 -0
  103. package/dist/components/atoms/ProgressBar/styled.js +39 -51
  104. package/dist/components/atoms/ProgressBar/styled.js.map +1 -1
  105. package/dist/components/atoms/RadioButton/RadioButton.js +60 -33
  106. package/dist/components/atoms/RadioButton/RadioButton.js.map +1 -1
  107. package/dist/components/atoms/RadioButton/RadioButton.stories.d.ts +9 -0
  108. package/dist/components/atoms/RadioButton/styled.js +28 -44
  109. package/dist/components/atoms/RadioButton/styled.js.map +1 -1
  110. package/dist/components/atoms/Switch/Switch.js +94 -73
  111. package/dist/components/atoms/Switch/Switch.js.map +1 -1
  112. package/dist/components/atoms/Switch/Switch.stories.d.ts +9 -0
  113. package/dist/components/atoms/Switch/animation.js +12 -20
  114. package/dist/components/atoms/Switch/animation.js.map +1 -1
  115. package/dist/components/atoms/Switch/styled.js +36 -44
  116. package/dist/components/atoms/Switch/styled.js.map +1 -1
  117. package/dist/components/atoms/Tag/Tag.js +65 -45
  118. package/dist/components/atoms/Tag/Tag.js.map +1 -1
  119. package/dist/components/atoms/Tag/styled.js +43 -63
  120. package/dist/components/atoms/Tag/styled.js.map +1 -1
  121. package/dist/components/atoms/Text/Text.js +71 -37
  122. package/dist/components/atoms/Text/Text.js.map +1 -1
  123. package/dist/components/atoms/Text/Text.stories.d.ts +9 -0
  124. package/dist/components/atoms/Text/functions.js +5 -10
  125. package/dist/components/atoms/Text/functions.js.map +1 -1
  126. package/dist/components/atoms/Text/styled.js +29 -67
  127. package/dist/components/atoms/Text/styled.js.map +1 -1
  128. package/dist/components/atoms/shared/PaperAndCard.d.ts +1 -1
  129. package/dist/components/atoms/shared/PaperAndCard.js +17 -32
  130. package/dist/components/atoms/shared/PaperAndCard.js.map +1 -1
  131. package/dist/components/molecules/Calendar/Calendar.js +148 -98
  132. package/dist/components/molecules/Calendar/Calendar.js.map +1 -1
  133. package/dist/components/molecules/Calendar/Calendar.stories.d.ts +8 -0
  134. package/dist/components/molecules/Calendar/components/MonthWeek.js +92 -125
  135. package/dist/components/molecules/Calendar/components/MonthWeek.js.map +1 -1
  136. package/dist/components/molecules/Calendar/components/Weekdays.js +16 -29
  137. package/dist/components/molecules/Calendar/components/Weekdays.js.map +1 -1
  138. package/dist/components/molecules/Calendar/styled.js +88 -91
  139. package/dist/components/molecules/Calendar/styled.js.map +1 -1
  140. package/dist/components/molecules/DatePicker/DatePicker.js +133 -86
  141. package/dist/components/molecules/DatePicker/DatePicker.js.map +1 -1
  142. package/dist/components/molecules/DatePicker/styled.js +34 -40
  143. package/dist/components/molecules/DatePicker/styled.js.map +1 -1
  144. package/dist/components/molecules/DateTimePicker/DateTimePicker.js +150 -85
  145. package/dist/components/molecules/DateTimePicker/DateTimePicker.js.map +1 -1
  146. package/dist/components/molecules/DateTimePicker/styled.js +10 -18
  147. package/dist/components/molecules/DateTimePicker/styled.js.map +1 -1
  148. package/dist/components/molecules/DateTimeSelector/DateTimeSelector.js +174 -146
  149. package/dist/components/molecules/DateTimeSelector/DateTimeSelector.js.map +1 -1
  150. package/dist/components/molecules/DateTimeSelector/Selector.js +101 -69
  151. package/dist/components/molecules/DateTimeSelector/Selector.js.map +1 -1
  152. package/dist/components/molecules/DateTimeSelector/styled.js +67 -105
  153. package/dist/components/molecules/DateTimeSelector/styled.js.map +1 -1
  154. package/dist/components/molecules/Grid/functions.d.ts +1 -1
  155. package/dist/components/molecules/Grid/functions.js +22 -16
  156. package/dist/components/molecules/Grid/functions.js.map +1 -1
  157. package/dist/components/molecules/HintInputContainer/HintInputContainer.js +84 -36
  158. package/dist/components/molecules/HintInputContainer/HintInputContainer.js.map +1 -1
  159. package/dist/components/molecules/IconTextButton/IconComponent.js +38 -31
  160. package/dist/components/molecules/IconTextButton/IconComponent.js.map +1 -1
  161. package/dist/components/molecules/InputPassword/InputPasswordIcon.js +53 -28
  162. package/dist/components/molecules/InputPassword/InputPasswordIcon.js.map +1 -1
  163. package/dist/components/molecules/InputPassword/styled.js +15 -18
  164. package/dist/components/molecules/InputPassword/styled.js.map +1 -1
  165. package/dist/components/molecules/Snackbar/Snackbar.d.ts +1 -1
  166. package/dist/components/molecules/Snackbar/Snackbar.js +64 -71
  167. package/dist/components/molecules/Snackbar/Snackbar.js.map +1 -1
  168. package/dist/components/molecules/Snackbar/styled.js +92 -73
  169. package/dist/components/molecules/Snackbar/styled.js.map +1 -1
  170. package/dist/components/molecules/TextArea/TextArea.js +63 -72
  171. package/dist/components/molecules/TextArea/TextArea.js.map +1 -1
  172. package/dist/components/molecules/TextArea/styled.js +33 -27
  173. package/dist/components/molecules/TextArea/styled.js.map +1 -1
  174. package/dist/hooks/useDebouncedState.js +14 -14
  175. package/dist/hooks/useDebouncedState.js.map +1 -1
  176. package/dist/hooks/useTheme.js +5 -8
  177. package/dist/hooks/useTheme.js.map +1 -1
  178. package/dist/index.js +141 -455
  179. package/dist/index.js.map +1 -1
  180. package/dist/styles/ThemeProvider.js +13 -19
  181. package/dist/styles/ThemeProvider.js.map +1 -1
  182. package/dist/styles/definitions.js +107 -104
  183. package/dist/styles/definitions.js.map +1 -1
  184. package/dist/styles/light.js +47 -36
  185. package/dist/styles/light.js.map +1 -1
  186. package/dist/utils/IPhoneXHelper.js +13 -19
  187. package/dist/utils/IPhoneXHelper.js.map +1 -1
  188. package/dist/utils/ResponsiveFontSize.d.ts +1 -1
  189. package/dist/utils/ResponsiveFontSize.js +22 -42
  190. package/dist/utils/ResponsiveFontSize.js.map +1 -1
  191. package/dist/utils/extractNumbersFromString.js +6 -11
  192. package/dist/utils/extractNumbersFromString.js.map +1 -1
  193. package/dist/utils/formatWithMask.js +23 -20
  194. package/dist/utils/formatWithMask.js.map +1 -1
  195. package/dist/utils/lightenDarkenColor.js +19 -15
  196. package/dist/utils/lightenDarkenColor.js.map +1 -1
  197. package/dist/utils/masks.js +16 -18
  198. package/dist/utils/masks.js.map +1 -1
  199. package/dist/utils/variantComplement.js +24 -25
  200. package/dist/utils/variantComplement.js.map +1 -1
  201. package/esm/components/atoms/Avatar/Avatar.d.ts +1 -1
  202. package/esm/components/atoms/Avatar/Avatar.js +25 -43
  203. package/esm/components/atoms/Avatar/Avatar.js.map +1 -1
  204. package/esm/components/atoms/Avatar/helpers.js +6 -8
  205. package/esm/components/atoms/Avatar/helpers.js.map +1 -1
  206. package/esm/components/atoms/Avatar/styled.js +32 -30
  207. package/esm/components/atoms/Avatar/styled.js.map +1 -1
  208. package/esm/components/atoms/Badge/Badge.js +15 -16
  209. package/esm/components/atoms/Badge/Badge.js.map +1 -1
  210. package/esm/components/atoms/Badge/styled.js +34 -15
  211. package/esm/components/atoms/Badge/styled.js.map +1 -1
  212. package/esm/components/atoms/BoxContent/BoxContent.js +35 -15
  213. package/esm/components/atoms/BoxContent/BoxContent.js.map +1 -1
  214. package/esm/components/atoms/BoxContent/styled.d.ts +3 -16
  215. package/esm/components/atoms/BoxContent/styled.js +48 -49
  216. package/esm/components/atoms/BoxContent/styled.js.map +1 -1
  217. package/esm/components/atoms/Button/Button.js +79 -56
  218. package/esm/components/atoms/Button/Button.js.map +1 -1
  219. package/esm/components/atoms/Button/States/BaseState.d.ts +1 -1
  220. package/esm/components/atoms/Button/States/BaseState.js +22 -22
  221. package/esm/components/atoms/Button/States/BaseState.js.map +1 -1
  222. package/esm/components/atoms/Button/States/Error.d.ts +1 -1
  223. package/esm/components/atoms/Button/States/Error.js +26 -7
  224. package/esm/components/atoms/Button/States/Error.js.map +1 -1
  225. package/esm/components/atoms/Button/States/Loading.d.ts +1 -1
  226. package/esm/components/atoms/Button/States/Loading.js +20 -20
  227. package/esm/components/atoms/Button/States/Loading.js.map +1 -1
  228. package/esm/components/atoms/Button/States/Success.d.ts +1 -1
  229. package/esm/components/atoms/Button/States/Success.js +26 -7
  230. package/esm/components/atoms/Button/States/Success.js.map +1 -1
  231. package/esm/components/atoms/Button/States/styled.d.ts +2 -11
  232. package/esm/components/atoms/Button/States/styled.js +13 -22
  233. package/esm/components/atoms/Button/States/styled.js.map +1 -1
  234. package/esm/components/atoms/Button/styled.js +43 -35
  235. package/esm/components/atoms/Button/styled.js.map +1 -1
  236. package/esm/components/atoms/Card/Card.js +52 -27
  237. package/esm/components/atoms/Card/Card.js.map +1 -1
  238. package/esm/components/atoms/Card/Footer/Footer.js +6 -10
  239. package/esm/components/atoms/Card/Footer/Footer.js.map +1 -1
  240. package/esm/components/atoms/Card/Header/Header.js +6 -10
  241. package/esm/components/atoms/Card/Header/Header.js.map +1 -1
  242. package/esm/components/atoms/Card/styled.d.ts +1 -8
  243. package/esm/components/atoms/Card/styled.js +11 -9
  244. package/esm/components/atoms/Card/styled.js.map +1 -1
  245. package/esm/components/atoms/Checkbox/Checkbox.js +66 -40
  246. package/esm/components/atoms/Checkbox/Checkbox.js.map +1 -1
  247. package/esm/components/atoms/Checkbox/styled.d.ts +3 -7
  248. package/esm/components/atoms/Checkbox/styled.js +35 -48
  249. package/esm/components/atoms/Checkbox/styled.js.map +1 -1
  250. package/esm/components/atoms/Divider/Divider.js +35 -15
  251. package/esm/components/atoms/Divider/Divider.js.map +1 -1
  252. package/esm/components/atoms/Divider/styled.d.ts +1 -13
  253. package/esm/components/atoms/Divider/styled.js +21 -25
  254. package/esm/components/atoms/Divider/styled.js.map +1 -1
  255. package/esm/components/atoms/GroupButton/GroupButton.js +83 -62
  256. package/esm/components/atoms/GroupButton/GroupButton.js.map +1 -1
  257. package/esm/components/atoms/GroupButton/GroupButtonOption.js +13 -13
  258. package/esm/components/atoms/GroupButton/GroupButtonOption.js.map +1 -1
  259. package/esm/components/atoms/GroupButton/styled.js +101 -84
  260. package/esm/components/atoms/GroupButton/styled.js.map +1 -1
  261. package/esm/components/atoms/Icon/Icon.js +64 -33
  262. package/esm/components/atoms/Icon/Icon.js.map +1 -1
  263. package/esm/components/atoms/Icon/helpers.d.ts +1 -1
  264. package/esm/components/atoms/Icon/helpers.js +88 -64
  265. package/esm/components/atoms/Icon/helpers.js.map +1 -1
  266. package/esm/components/atoms/Input/Hint.js +18 -26
  267. package/esm/components/atoms/Input/Hint.js.map +1 -1
  268. package/esm/components/atoms/Input/InputContainer/InputContainer.js +88 -55
  269. package/esm/components/atoms/Input/InputContainer/InputContainer.js.map +1 -1
  270. package/esm/components/atoms/Input/InputElement/InputElement.js +64 -34
  271. package/esm/components/atoms/Input/InputElement/InputElement.js.map +1 -1
  272. package/esm/components/atoms/Input/InputMaskElement/InputMaskElement.js +102 -87
  273. package/esm/components/atoms/Input/InputMaskElement/InputMaskElement.js.map +1 -1
  274. package/esm/components/atoms/Input/PressableInputContainer/PressableInputContainer.js +50 -25
  275. package/esm/components/atoms/Input/PressableInputContainer/PressableInputContainer.js.map +1 -1
  276. package/esm/components/atoms/Input/PressableInputContainer/styled.js +6 -5
  277. package/esm/components/atoms/Input/PressableInputContainer/styled.js.map +1 -1
  278. package/esm/components/atoms/Input/hooks/useInputFocus.d.ts +1 -1
  279. package/esm/components/atoms/Input/hooks/useInputFocus.js +11 -26
  280. package/esm/components/atoms/Input/hooks/useInputFocus.js.map +1 -1
  281. package/esm/components/atoms/Input/hooks/useNumberMask.d.ts +2 -2
  282. package/esm/components/atoms/Input/hooks/useNumberMask.js +67 -84
  283. package/esm/components/atoms/Input/hooks/useNumberMask.js.map +1 -1
  284. package/esm/components/atoms/Input/hooks/useStringMask.d.ts +1 -1
  285. package/esm/components/atoms/Input/hooks/useStringMask.js +58 -79
  286. package/esm/components/atoms/Input/hooks/useStringMask.js.map +1 -1
  287. package/esm/components/atoms/Input/styled.js +91 -89
  288. package/esm/components/atoms/Input/styled.js.map +1 -1
  289. package/esm/components/atoms/Paper/Paper.js +45 -20
  290. package/esm/components/atoms/Paper/Paper.js.map +1 -1
  291. package/esm/components/atoms/Paper/styled.d.ts +1 -9
  292. package/esm/components/atoms/Paper/styled.js +11 -9
  293. package/esm/components/atoms/Paper/styled.js.map +1 -1
  294. package/esm/components/atoms/PressableSurface/PressableSurface.js +83 -66
  295. package/esm/components/atoms/PressableSurface/PressableSurface.js.map +1 -1
  296. package/esm/components/atoms/ProgressBar/ProgressBar.js +79 -64
  297. package/esm/components/atoms/ProgressBar/ProgressBar.js.map +1 -1
  298. package/esm/components/atoms/ProgressBar/styled.js +30 -24
  299. package/esm/components/atoms/ProgressBar/styled.js.map +1 -1
  300. package/esm/components/atoms/RadioButton/RadioButton.js +61 -35
  301. package/esm/components/atoms/RadioButton/RadioButton.js.map +1 -1
  302. package/esm/components/atoms/RadioButton/styled.js +24 -28
  303. package/esm/components/atoms/RadioButton/styled.js.map +1 -1
  304. package/esm/components/atoms/Switch/Switch.js +88 -62
  305. package/esm/components/atoms/Switch/Switch.js.map +1 -1
  306. package/esm/components/atoms/Switch/animation.js +7 -5
  307. package/esm/components/atoms/Switch/animation.js.map +1 -1
  308. package/esm/components/atoms/Switch/styled.d.ts +2 -14
  309. package/esm/components/atoms/Switch/styled.js +27 -22
  310. package/esm/components/atoms/Switch/styled.js.map +1 -1
  311. package/esm/components/atoms/Tag/Tag.js +69 -63
  312. package/esm/components/atoms/Tag/Tag.js.map +1 -1
  313. package/esm/components/atoms/Tag/styled.js +31 -35
  314. package/esm/components/atoms/Tag/styled.js.map +1 -1
  315. package/esm/components/atoms/Text/Text.js +72 -43
  316. package/esm/components/atoms/Text/Text.js.map +1 -1
  317. package/esm/components/atoms/Text/functions.js +5 -7
  318. package/esm/components/atoms/Text/functions.js.map +1 -1
  319. package/esm/components/atoms/Text/styled.d.ts +2 -16
  320. package/esm/components/atoms/Text/styled.js +19 -43
  321. package/esm/components/atoms/Text/styled.js.map +1 -1
  322. package/esm/components/atoms/shared/PaperAndCard.d.ts +1 -3
  323. package/esm/components/atoms/shared/PaperAndCard.js +16 -20
  324. package/esm/components/atoms/shared/PaperAndCard.js.map +1 -1
  325. package/esm/components/molecules/Calendar/Calendar.js +130 -124
  326. package/esm/components/molecules/Calendar/Calendar.js.map +1 -1
  327. package/esm/components/molecules/Calendar/components/MonthWeek.js +80 -98
  328. package/esm/components/molecules/Calendar/components/MonthWeek.js.map +1 -1
  329. package/esm/components/molecules/Calendar/components/Weekdays.js +19 -25
  330. package/esm/components/molecules/Calendar/components/Weekdays.js.map +1 -1
  331. package/esm/components/molecules/Calendar/styled.js +79 -52
  332. package/esm/components/molecules/Calendar/styled.js.map +1 -1
  333. package/esm/components/molecules/DatePicker/DatePicker.js +131 -95
  334. package/esm/components/molecules/DatePicker/DatePicker.js.map +1 -1
  335. package/esm/components/molecules/DatePicker/styled.js +25 -19
  336. package/esm/components/molecules/DatePicker/styled.js.map +1 -1
  337. package/esm/components/molecules/DateTimePicker/DateTimePicker.js +155 -102
  338. package/esm/components/molecules/DateTimePicker/DateTimePicker.js.map +1 -1
  339. package/esm/components/molecules/DateTimePicker/styled.js +8 -10
  340. package/esm/components/molecules/DateTimePicker/styled.js.map +1 -1
  341. package/esm/components/molecules/DateTimeSelector/DateTimeSelector.js +175 -179
  342. package/esm/components/molecules/DateTimeSelector/DateTimeSelector.js.map +1 -1
  343. package/esm/components/molecules/DateTimeSelector/Selector.js +93 -82
  344. package/esm/components/molecules/DateTimeSelector/Selector.js.map +1 -1
  345. package/esm/components/molecules/DateTimeSelector/styled.js +54 -52
  346. package/esm/components/molecules/DateTimeSelector/styled.js.map +1 -1
  347. package/esm/components/molecules/Grid/functions.d.ts +1 -1
  348. package/esm/components/molecules/Grid/functions.js +23 -13
  349. package/esm/components/molecules/Grid/functions.js.map +1 -1
  350. package/esm/components/molecules/HintInputContainer/HintInputContainer.js +71 -36
  351. package/esm/components/molecules/HintInputContainer/HintInputContainer.js.map +1 -1
  352. package/esm/components/molecules/IconTextButton/IconComponent.js +31 -17
  353. package/esm/components/molecules/IconTextButton/IconComponent.js.map +1 -1
  354. package/esm/components/molecules/InputPassword/InputPasswordIcon.js +48 -24
  355. package/esm/components/molecules/InputPassword/InputPasswordIcon.js.map +1 -1
  356. package/esm/components/molecules/InputPassword/styled.js +12 -9
  357. package/esm/components/molecules/InputPassword/styled.js.map +1 -1
  358. package/esm/components/molecules/Snackbar/Snackbar.d.ts +1 -1
  359. package/esm/components/molecules/Snackbar/Snackbar.js +64 -65
  360. package/esm/components/molecules/Snackbar/Snackbar.js.map +1 -1
  361. package/esm/components/molecules/Snackbar/styled.js +84 -48
  362. package/esm/components/molecules/Snackbar/styled.js.map +1 -1
  363. package/esm/components/molecules/TextArea/TextArea.js +66 -67
  364. package/esm/components/molecules/TextArea/TextArea.js.map +1 -1
  365. package/esm/components/molecules/TextArea/styled.d.ts +2 -12
  366. package/esm/components/molecules/TextArea/styled.js +25 -12
  367. package/esm/components/molecules/TextArea/styled.js.map +1 -1
  368. package/esm/hooks/useDebouncedState.js +13 -28
  369. package/esm/hooks/useDebouncedState.js.map +1 -1
  370. package/esm/hooks/useTheme.js +6 -5
  371. package/esm/hooks/useTheme.js.map +1 -1
  372. package/esm/index.js +55 -36
  373. package/esm/index.js.map +1 -1
  374. package/esm/styles/ThemeProvider.js +10 -9
  375. package/esm/styles/ThemeProvider.js.map +1 -1
  376. package/esm/styles/definitions.js +107 -117
  377. package/esm/styles/definitions.js.map +1 -1
  378. package/esm/styles/light.js +44 -31
  379. package/esm/styles/light.js.map +1 -1
  380. package/esm/utils/IPhoneXHelper.js +11 -9
  381. package/esm/utils/IPhoneXHelper.js.map +1 -1
  382. package/esm/utils/ResponsiveFontSize.d.ts +1 -1
  383. package/esm/utils/ResponsiveFontSize.js +26 -31
  384. package/esm/utils/ResponsiveFontSize.js.map +1 -1
  385. package/esm/utils/extractNumbersFromString.js +5 -7
  386. package/esm/utils/extractNumbersFromString.js.map +1 -1
  387. package/esm/utils/formatWithMask.js +20 -13
  388. package/esm/utils/formatWithMask.js.map +1 -1
  389. package/esm/utils/lightenDarkenColor.js +23 -14
  390. package/esm/utils/lightenDarkenColor.js.map +1 -1
  391. package/esm/utils/masks.js +18 -17
  392. package/esm/utils/masks.js.map +1 -1
  393. package/esm/utils/variantComplement.js +23 -21
  394. package/esm/utils/variantComplement.js.map +1 -1
  395. package/package.json +4 -7
  396. package/rollup.config.js +36 -0
  397. package/src/components/atoms/Avatar/Avatar.stories.tsx +2 -3
  398. package/src/components/atoms/Avatar/Avatar.tsx +1 -1
  399. package/src/components/atoms/Button/States/BaseState.tsx +1 -1
  400. package/src/components/atoms/Button/States/Error.tsx +2 -2
  401. package/src/components/atoms/Button/States/Loading.tsx +1 -1
  402. package/src/components/atoms/Button/States/Success.tsx +2 -2
  403. package/src/components/atoms/Icon/Icon.tsx +6 -2
  404. package/src/components/atoms/Icon/helpers.ts +18 -16
  405. package/src/components/molecules/Grid/functions.ts +2 -6
  406. package/src/components/molecules/IconTextButton/IconComponent.tsx +2 -6
  407. package/src/components/molecules/IconTextButton/{IconTextButton.tsx → IconTextButton.ts} +0 -0
  408. package/src/components/molecules/Snackbar/Snackbar.tsx +1 -1
  409. package/tsconfig.build.json +2 -1
  410. package/babel.config.esm.js +0 -34
  411. package/dist/components/atoms/Avatar/index.js +0 -16
  412. package/dist/components/atoms/Avatar/index.js.map +0 -1
  413. package/dist/components/atoms/Badge/index.js +0 -16
  414. package/dist/components/atoms/Badge/index.js.map +0 -1
  415. package/dist/components/atoms/BoxContent/index.js +0 -16
  416. package/dist/components/atoms/BoxContent/index.js.map +0 -1
  417. package/dist/components/atoms/Button/States/index.js +0 -32
  418. package/dist/components/atoms/Button/States/index.js.map +0 -1
  419. package/dist/components/atoms/Button/index.js +0 -36
  420. package/dist/components/atoms/Button/index.js.map +0 -1
  421. package/dist/components/atoms/Card/Footer/index.js +0 -16
  422. package/dist/components/atoms/Card/Footer/index.js.map +0 -1
  423. package/dist/components/atoms/Card/Header/index.js +0 -16
  424. package/dist/components/atoms/Card/Header/index.js.map +0 -1
  425. package/dist/components/atoms/Card/index.js +0 -16
  426. package/dist/components/atoms/Card/index.js.map +0 -1
  427. package/dist/components/atoms/Checkbox/index.js +0 -16
  428. package/dist/components/atoms/Checkbox/index.js.map +0 -1
  429. package/dist/components/atoms/Divider/index.js +0 -16
  430. package/dist/components/atoms/Divider/index.js.map +0 -1
  431. package/dist/components/atoms/GroupButton/index.js +0 -24
  432. package/dist/components/atoms/GroupButton/index.js.map +0 -1
  433. package/dist/components/atoms/Icon/index.js +0 -16
  434. package/dist/components/atoms/Icon/index.js.map +0 -1
  435. package/dist/components/atoms/Input/PressableInputContainer/index.js +0 -16
  436. package/dist/components/atoms/Input/PressableInputContainer/index.js.map +0 -1
  437. package/dist/components/atoms/Input/index.js +0 -113
  438. package/dist/components/atoms/Input/index.js.map +0 -1
  439. package/dist/components/atoms/Paper/index.js +0 -16
  440. package/dist/components/atoms/Paper/index.js.map +0 -1
  441. package/dist/components/atoms/PressableSurface/index.js +0 -16
  442. package/dist/components/atoms/PressableSurface/index.js.map +0 -1
  443. package/dist/components/atoms/ProgressBar/index.js +0 -16
  444. package/dist/components/atoms/ProgressBar/index.js.map +0 -1
  445. package/dist/components/atoms/RadioButton/index.js +0 -16
  446. package/dist/components/atoms/RadioButton/index.js.map +0 -1
  447. package/dist/components/atoms/Switch/index.js +0 -16
  448. package/dist/components/atoms/Switch/index.js.map +0 -1
  449. package/dist/components/atoms/Tag/index.js +0 -16
  450. package/dist/components/atoms/Tag/index.js.map +0 -1
  451. package/dist/components/atoms/Text/index.js +0 -16
  452. package/dist/components/atoms/Text/index.js.map +0 -1
  453. package/dist/components/molecules/Calendar/components/index.js +0 -24
  454. package/dist/components/molecules/Calendar/components/index.js.map +0 -1
  455. package/dist/components/molecules/Calendar/index.js +0 -16
  456. package/dist/components/molecules/Calendar/index.js.map +0 -1
  457. package/dist/components/molecules/DatePicker/index.js +0 -16
  458. package/dist/components/molecules/DatePicker/index.js.map +0 -1
  459. package/dist/components/molecules/DateTimePicker/index.js +0 -16
  460. package/dist/components/molecules/DateTimePicker/index.js.map +0 -1
  461. package/dist/components/molecules/DateTimeSelector/index.js +0 -16
  462. package/dist/components/molecules/DateTimeSelector/index.js.map +0 -1
  463. package/dist/components/molecules/Grid/index.js +0 -20
  464. package/dist/components/molecules/Grid/index.js.map +0 -1
  465. package/dist/components/molecules/HintInputContainer/index.js +0 -16
  466. package/dist/components/molecules/HintInputContainer/index.js.map +0 -1
  467. package/dist/components/molecules/HintInputContainer/styled.js +0 -2
  468. package/dist/components/molecules/HintInputContainer/styled.js.map +0 -1
  469. package/dist/components/molecules/IconTextButton/IconTextButton.js +0 -6
  470. package/dist/components/molecules/IconTextButton/IconTextButton.js.map +0 -1
  471. package/dist/components/molecules/IconTextButton/index.js +0 -16
  472. package/dist/components/molecules/IconTextButton/index.js.map +0 -1
  473. package/dist/components/molecules/IconTextButton/styled.d.ts +0 -4
  474. package/dist/components/molecules/IconTextButton/styled.js +0 -29
  475. package/dist/components/molecules/IconTextButton/styled.js.map +0 -1
  476. package/dist/components/molecules/InputPassword/index.js +0 -16
  477. package/dist/components/molecules/InputPassword/index.js.map +0 -1
  478. package/dist/components/molecules/LabeledSwitch/LabeledSwitch.js +0 -6
  479. package/dist/components/molecules/LabeledSwitch/LabeledSwitch.js.map +0 -1
  480. package/dist/components/molecules/LabeledSwitch/index.js +0 -6
  481. package/dist/components/molecules/LabeledSwitch/index.js.map +0 -1
  482. package/dist/components/molecules/Snackbar/index.js +0 -16
  483. package/dist/components/molecules/Snackbar/index.js.map +0 -1
  484. package/dist/components/molecules/TextArea/index.js +0 -24
  485. package/dist/components/molecules/TextArea/index.js.map +0 -1
  486. package/dist/hooks/index.js +0 -22
  487. package/dist/hooks/index.js.map +0 -1
  488. package/dist/types/defaults.js +0 -6
  489. package/dist/types/defaults.js.map +0 -1
  490. package/dist/utils/index.js +0 -103
  491. package/dist/utils/index.js.map +0 -1
  492. package/esm/components/atoms/Avatar/index.js +0 -2
  493. package/esm/components/atoms/Avatar/index.js.map +0 -1
  494. package/esm/components/atoms/Badge/index.js +0 -2
  495. package/esm/components/atoms/Badge/index.js.map +0 -1
  496. package/esm/components/atoms/BoxContent/index.js +0 -2
  497. package/esm/components/atoms/BoxContent/index.js.map +0 -1
  498. package/esm/components/atoms/Button/States/index.js +0 -4
  499. package/esm/components/atoms/Button/States/index.js.map +0 -1
  500. package/esm/components/atoms/Button/index.js +0 -3
  501. package/esm/components/atoms/Button/index.js.map +0 -1
  502. package/esm/components/atoms/Card/Footer/index.js +0 -2
  503. package/esm/components/atoms/Card/Footer/index.js.map +0 -1
  504. package/esm/components/atoms/Card/Header/index.js +0 -2
  505. package/esm/components/atoms/Card/Header/index.js.map +0 -1
  506. package/esm/components/atoms/Card/index.js +0 -2
  507. package/esm/components/atoms/Card/index.js.map +0 -1
  508. package/esm/components/atoms/Checkbox/index.js +0 -2
  509. package/esm/components/atoms/Checkbox/index.js.map +0 -1
  510. package/esm/components/atoms/Divider/index.js +0 -2
  511. package/esm/components/atoms/Divider/index.js.map +0 -1
  512. package/esm/components/atoms/GroupButton/index.js +0 -3
  513. package/esm/components/atoms/GroupButton/index.js.map +0 -1
  514. package/esm/components/atoms/Icon/index.js +0 -2
  515. package/esm/components/atoms/Icon/index.js.map +0 -1
  516. package/esm/components/atoms/Input/PressableInputContainer/index.js +0 -2
  517. package/esm/components/atoms/Input/PressableInputContainer/index.js.map +0 -1
  518. package/esm/components/atoms/Input/index.js +0 -10
  519. package/esm/components/atoms/Input/index.js.map +0 -1
  520. package/esm/components/atoms/Paper/index.js +0 -2
  521. package/esm/components/atoms/Paper/index.js.map +0 -1
  522. package/esm/components/atoms/PressableSurface/index.js +0 -2
  523. package/esm/components/atoms/PressableSurface/index.js.map +0 -1
  524. package/esm/components/atoms/ProgressBar/index.js +0 -2
  525. package/esm/components/atoms/ProgressBar/index.js.map +0 -1
  526. package/esm/components/atoms/RadioButton/index.js +0 -2
  527. package/esm/components/atoms/RadioButton/index.js.map +0 -1
  528. package/esm/components/atoms/Switch/index.js +0 -2
  529. package/esm/components/atoms/Switch/index.js.map +0 -1
  530. package/esm/components/atoms/Tag/index.js +0 -2
  531. package/esm/components/atoms/Tag/index.js.map +0 -1
  532. package/esm/components/atoms/Text/index.js +0 -2
  533. package/esm/components/atoms/Text/index.js.map +0 -1
  534. package/esm/components/molecules/Calendar/components/index.js +0 -3
  535. package/esm/components/molecules/Calendar/components/index.js.map +0 -1
  536. package/esm/components/molecules/Calendar/index.js +0 -2
  537. package/esm/components/molecules/Calendar/index.js.map +0 -1
  538. package/esm/components/molecules/DatePicker/index.js +0 -2
  539. package/esm/components/molecules/DatePicker/index.js.map +0 -1
  540. package/esm/components/molecules/DateTimePicker/index.js +0 -2
  541. package/esm/components/molecules/DateTimePicker/index.js.map +0 -1
  542. package/esm/components/molecules/DateTimeSelector/index.js +0 -2
  543. package/esm/components/molecules/DateTimeSelector/index.js.map +0 -1
  544. package/esm/components/molecules/Grid/index.js +0 -2
  545. package/esm/components/molecules/Grid/index.js.map +0 -1
  546. package/esm/components/molecules/HintInputContainer/index.js +0 -2
  547. package/esm/components/molecules/HintInputContainer/index.js.map +0 -1
  548. package/esm/components/molecules/HintInputContainer/styled.js +0 -2
  549. package/esm/components/molecules/HintInputContainer/styled.js.map +0 -1
  550. package/esm/components/molecules/IconTextButton/IconTextButton.js +0 -2
  551. package/esm/components/molecules/IconTextButton/IconTextButton.js.map +0 -1
  552. package/esm/components/molecules/IconTextButton/index.js +0 -2
  553. package/esm/components/molecules/IconTextButton/index.js.map +0 -1
  554. package/esm/components/molecules/IconTextButton/styled.d.ts +0 -11
  555. package/esm/components/molecules/IconTextButton/styled.js +0 -14
  556. package/esm/components/molecules/IconTextButton/styled.js.map +0 -1
  557. package/esm/components/molecules/InputPassword/index.js +0 -2
  558. package/esm/components/molecules/InputPassword/index.js.map +0 -1
  559. package/esm/components/molecules/LabeledSwitch/LabeledSwitch.js +0 -2
  560. package/esm/components/molecules/LabeledSwitch/LabeledSwitch.js.map +0 -1
  561. package/esm/components/molecules/LabeledSwitch/index.js +0 -2
  562. package/esm/components/molecules/LabeledSwitch/index.js.map +0 -1
  563. package/esm/components/molecules/Snackbar/index.js +0 -2
  564. package/esm/components/molecules/Snackbar/index.js.map +0 -1
  565. package/esm/components/molecules/TextArea/index.js +0 -3
  566. package/esm/components/molecules/TextArea/index.js.map +0 -1
  567. package/esm/hooks/index.js +0 -3
  568. package/esm/hooks/index.js.map +0 -1
  569. package/esm/types/defaults.js +0 -2
  570. package/esm/types/defaults.js.map +0 -1
  571. package/esm/utils/index.js +0 -8
  572. package/esm/utils/index.js.map +0 -1
  573. package/src/components/molecules/IconTextButton/styled.ts +0 -20
@@ -1 +1 @@
1
- {"version":3,"file":"animation.js","names":["Animated","Easing","ANIMATION_SPEED","transitionSwitch","active","translate","transitionValue","animatedColor","timing","toValue","duration","easing","out","ease","useNativeDriver","start"],"sources":["../../../../src/components/atoms/Switch/animation.ts"],"sourcesContent":["import { Animated, Easing } from 'react-native';\n\nconst ANIMATION_SPEED = 140;\n\nexport const transitionSwitch = (\n active: boolean,\n translate: number,\n transitionValue: Animated.Value,\n animatedColor: Animated.Value\n): void => {\n if (translate <= 0) return;\n\n if (active) {\n Animated.timing(transitionValue, {\n toValue: translate,\n duration: ANIMATION_SPEED,\n easing: Easing.out(Easing.ease),\n useNativeDriver: true,\n }).start();\n Animated.timing(animatedColor, {\n toValue: 1,\n duration: ANIMATION_SPEED,\n useNativeDriver: false,\n }).start();\n return;\n }\n\n Animated.timing(transitionValue, {\n toValue: 0,\n duration: ANIMATION_SPEED,\n easing: Easing.out(Easing.ease),\n useNativeDriver: true,\n }).start();\n Animated.timing(animatedColor, {\n toValue: 0,\n duration: ANIMATION_SPEED,\n useNativeDriver: false,\n }).start();\n};\n"],"mappings":"AAAA,SAASA,QAAT,EAAmBC,MAAnB,QAAiC,cAAjC;AAEA,IAAMC,eAAe,GAAG,GAAxB;AAEA,OAAO,IAAMC,gBAAgB,GAAG,SAAnBA,gBAAmB,CAC9BC,MAD8B,EAE9BC,SAF8B,EAG9BC,eAH8B,EAI9BC,aAJ8B,EAKrB;EACT,IAAIF,SAAS,IAAI,CAAjB,EAAoB;;EAEpB,IAAID,MAAJ,EAAY;IACVJ,QAAQ,CAACQ,MAAT,CAAgBF,eAAhB,EAAiC;MAC/BG,OAAO,EAAEJ,SADsB;MAE/BK,QAAQ,EAAER,eAFqB;MAG/BS,MAAM,EAAEV,MAAM,CAACW,GAAP,CAAWX,MAAM,CAACY,IAAlB,CAHuB;MAI/BC,eAAe,EAAE;IAJc,CAAjC,EAKGC,KALH;IAMAf,QAAQ,CAACQ,MAAT,CAAgBD,aAAhB,EAA+B;MAC7BE,OAAO,EAAE,CADoB;MAE7BC,QAAQ,EAAER,eAFmB;MAG7BY,eAAe,EAAE;IAHY,CAA/B,EAIGC,KAJH;IAKA;EACD;;EAEDf,QAAQ,CAACQ,MAAT,CAAgBF,eAAhB,EAAiC;IAC/BG,OAAO,EAAE,CADsB;IAE/BC,QAAQ,EAAER,eAFqB;IAG/BS,MAAM,EAAEV,MAAM,CAACW,GAAP,CAAWX,MAAM,CAACY,IAAlB,CAHuB;IAI/BC,eAAe,EAAE;EAJc,CAAjC,EAKGC,KALH;EAMAf,QAAQ,CAACQ,MAAT,CAAgBD,aAAhB,EAA+B;IAC7BE,OAAO,EAAE,CADoB;IAE7BC,QAAQ,EAAER,eAFmB;IAG7BY,eAAe,EAAE;EAHY,CAA/B,EAIGC,KAJH;AAKD,CAlCM"}
1
+ {"version":3,"file":"animation.js","sources":["../../../../src/components/atoms/Switch/animation.ts"],"sourcesContent":["import { Animated, Easing } from 'react-native';\n\nconst ANIMATION_SPEED = 140;\n\nexport const transitionSwitch = (\n active: boolean,\n translate: number,\n transitionValue: Animated.Value,\n animatedColor: Animated.Value\n): void => {\n if (translate <= 0) return;\n\n if (active) {\n Animated.timing(transitionValue, {\n toValue: translate,\n duration: ANIMATION_SPEED,\n easing: Easing.out(Easing.ease),\n useNativeDriver: true,\n }).start();\n Animated.timing(animatedColor, {\n toValue: 1,\n duration: ANIMATION_SPEED,\n useNativeDriver: false,\n }).start();\n return;\n }\n\n Animated.timing(transitionValue, {\n toValue: 0,\n duration: ANIMATION_SPEED,\n easing: Easing.out(Easing.ease),\n useNativeDriver: true,\n }).start();\n Animated.timing(animatedColor, {\n toValue: 0,\n duration: ANIMATION_SPEED,\n useNativeDriver: false,\n }).start();\n};\n"],"names":[],"mappings":";;AAEA,MAAM,eAAkB,GAAA,GAAA,CAAA;AAEjB,MAAM,gBAAmB,GAAA,CAC9B,MACA,EAAA,SAAA,EACA,iBACA,aACS,KAAA;AACT,EAAA,IAAI,SAAa,IAAA,CAAA;AAAG,IAAA,OAAA;AAEpB,EAAA,IAAI,MAAQ,EAAA;AACV,IAAA,QAAA,CAAS,OAAO,eAAiB,EAAA;AAAA,MAC/B,OAAS,EAAA,SAAA;AAAA,MACT,QAAU,EAAA,eAAA;AAAA,MACV,MAAQ,EAAA,MAAA,CAAO,GAAI,CAAA,MAAA,CAAO,IAAI,CAAA;AAAA,MAC9B,eAAiB,EAAA,IAAA;AAAA,KAClB,EAAE,KAAM,EAAA,CAAA;AACT,IAAA,QAAA,CAAS,OAAO,aAAe,EAAA;AAAA,MAC7B,OAAS,EAAA,CAAA;AAAA,MACT,QAAU,EAAA,eAAA;AAAA,MACV,eAAiB,EAAA,KAAA;AAAA,KAClB,EAAE,KAAM,EAAA,CAAA;AACT,IAAA,OAAA;AAAA,GACF;AAEA,EAAA,QAAA,CAAS,OAAO,eAAiB,EAAA;AAAA,IAC/B,OAAS,EAAA,CAAA;AAAA,IACT,QAAU,EAAA,eAAA;AAAA,IACV,MAAQ,EAAA,MAAA,CAAO,GAAI,CAAA,MAAA,CAAO,IAAI,CAAA;AAAA,IAC9B,eAAiB,EAAA,IAAA;AAAA,GAClB,EAAE,KAAM,EAAA,CAAA;AACT,EAAA,QAAA,CAAS,OAAO,aAAe,EAAA;AAAA,IAC7B,OAAS,EAAA,CAAA;AAAA,IACT,QAAU,EAAA,eAAA;AAAA,IACV,eAAiB,EAAA,KAAA;AAAA,GAClB,EAAE,KAAM,EAAA,CAAA;AACX;;;;"}
@@ -1,16 +1,4 @@
1
- /// <reference types="react" />
2
- import { Animated } from 'react-native';
3
1
  export declare const SWITCH_BODY_WIDTH = "40px";
4
2
  export declare const SWITCH_PIN_WIDTH = "16px";
5
- export declare const StyledSwitchContent: import("@emotion/native").StyledComponent<Animated.AnimatedProps<import("react-native").ViewProps & import("react").RefAttributes<import("react-native").View>> & {
6
- children?: import("react").ReactNode;
7
- } & {
8
- theme?: import("@emotion/react").Theme | undefined;
9
- as?: import("react").ElementType<any> | undefined;
10
- } & Partial<import("@tecsinapse/react-core").ThemeProviderProps>, {}, {}>;
11
- export declare const StyledSwitch: import("@emotion/native").StyledComponent<Animated.AnimatedProps<import("react-native").ViewProps & import("react").RefAttributes<import("react-native").View>> & {
12
- children?: import("react").ReactNode;
13
- } & {
14
- theme?: import("@emotion/react").Theme | undefined;
15
- as?: import("react").ElementType<any> | undefined;
16
- } & Partial<import("@tecsinapse/react-core").ThemeProviderProps>, {}, {}>;
3
+ export declare const StyledSwitchContent: import("@emotion/native").StyledComponent<any, {}, {}>;
4
+ export declare const StyledSwitch: import("@emotion/native").StyledComponent<any, {}, {}>;
@@ -1,24 +1,29 @@
1
- var _templateObject, _templateObject2;
2
-
3
- function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
4
-
5
1
  import styled from '@emotion/native';
6
2
  import { Animated } from 'react-native';
7
- import { RFValueStr } from '../../../utils';
8
- export var SWITCH_BODY_WIDTH = '40px';
9
- export var SWITCH_PIN_WIDTH = '16px';
10
- export var StyledSwitchContent = styled(Animated.View)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n border-radius: ", ";\n padding: 0 ", ";\n justify-content: center;\n width: ", ";\n height: ", ";\n"])), function (_ref) {
11
- var theme = _ref.theme;
12
- return theme.borderRadius.pill;
13
- }, function (_ref2) {
14
- var theme = _ref2.theme;
15
- return theme.spacing.micro;
16
- }, RFValueStr(SWITCH_BODY_WIDTH), RFValueStr('22px'));
17
- export var StyledSwitch = styled(Animated.View)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n border-radius: ", ";\n background-color: ", ";\n width: ", ";\n height: ", ";\n"])), function (_ref3) {
18
- var theme = _ref3.theme;
19
- return theme.borderRadius.pill;
20
- }, function (_ref4) {
21
- var theme = _ref4.theme;
22
- return theme.miscellaneous.surfaceColor;
23
- }, RFValueStr(SWITCH_PIN_WIDTH), RFValueStr('16px'));
24
- //# sourceMappingURL=styled.js.map
3
+ import 'react';
4
+ import '../Text/styled.js';
5
+ import '../Input/styled.js';
6
+ import 'currency.js';
7
+ import '../Input/InputElement/InputElement.js';
8
+ import '../Input/InputMaskElement/InputMaskElement.js';
9
+ import '../Input/PressableInputContainer/styled.js';
10
+ import { RFValueStr } from '../../../utils/ResponsiveFontSize.js';
11
+
12
+ const SWITCH_BODY_WIDTH = "40px";
13
+ const SWITCH_PIN_WIDTH = "16px";
14
+ const StyledSwitchContent = styled(Animated.View)`
15
+ border-radius: ${({ theme }) => theme.borderRadius.pill};
16
+ padding: 0 ${({ theme }) => theme.spacing.micro};
17
+ justify-content: center;
18
+ width: ${RFValueStr(SWITCH_BODY_WIDTH)};
19
+ height: ${RFValueStr("22px")};
20
+ `;
21
+ const StyledSwitch = styled(Animated.View)`
22
+ border-radius: ${({ theme }) => theme.borderRadius.pill};
23
+ background-color: ${({ theme }) => theme.miscellaneous.surfaceColor};
24
+ width: ${RFValueStr(SWITCH_PIN_WIDTH)};
25
+ height: ${RFValueStr("16px")};
26
+ `;
27
+
28
+ export { SWITCH_BODY_WIDTH, SWITCH_PIN_WIDTH, StyledSwitch, StyledSwitchContent };
29
+ //# sourceMappingURL=styled.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"styled.js","names":["styled","Animated","RFValueStr","SWITCH_BODY_WIDTH","SWITCH_PIN_WIDTH","StyledSwitchContent","View","theme","borderRadius","pill","spacing","micro","StyledSwitch","miscellaneous","surfaceColor"],"sources":["../../../../src/components/atoms/Switch/styled.ts"],"sourcesContent":["import styled from '@emotion/native';\nimport { Animated } from 'react-native';\nimport { StyleProps } from '@tecsinapse/react-core';\nimport { RFValueStr } from '../../../utils';\n\nexport const SWITCH_BODY_WIDTH = '40px';\nexport const SWITCH_PIN_WIDTH = '16px';\n\nexport const StyledSwitchContent = styled(Animated.View)<Partial<StyleProps>>`\n border-radius: ${({ theme }) => theme.borderRadius.pill};\n padding: 0 ${({ theme }) => theme.spacing.micro};\n justify-content: center;\n width: ${RFValueStr(SWITCH_BODY_WIDTH)};\n height: ${RFValueStr('22px')};\n`;\n\nexport const StyledSwitch = styled(Animated.View)<Partial<StyleProps>>`\n border-radius: ${({ theme }) => theme.borderRadius.pill};\n background-color: ${({ theme }) => theme.miscellaneous.surfaceColor};\n width: ${RFValueStr(SWITCH_PIN_WIDTH)};\n height: ${RFValueStr('16px')};\n`;\n"],"mappings":";;;;AAAA,OAAOA,MAAP,MAAmB,iBAAnB;AACA,SAASC,QAAT,QAAyB,cAAzB;AAEA,SAASC,UAAT,QAA2B,gBAA3B;AAEA,OAAO,IAAMC,iBAAiB,GAAG,MAA1B;AACP,OAAO,IAAMC,gBAAgB,GAAG,MAAzB;AAEP,OAAO,IAAMC,mBAAmB,GAAGL,MAAM,CAACC,QAAQ,CAACK,IAAV,CAAT,iLACb;EAAA,IAAGC,KAAH,QAAGA,KAAH;EAAA,OAAeA,KAAK,CAACC,YAAN,CAAmBC,IAAlC;AAAA,CADa,EAEjB;EAAA,IAAGF,KAAH,SAAGA,KAAH;EAAA,OAAeA,KAAK,CAACG,OAAN,CAAcC,KAA7B;AAAA,CAFiB,EAIrBT,UAAU,CAACC,iBAAD,CAJW,EAKpBD,UAAU,CAAC,MAAD,CALU,CAAzB;AAQP,OAAO,IAAMU,YAAY,GAAGZ,MAAM,CAACC,QAAQ,CAACK,IAAV,CAAT,8JACN;EAAA,IAAGC,KAAH,SAAGA,KAAH;EAAA,OAAeA,KAAK,CAACC,YAAN,CAAmBC,IAAlC;AAAA,CADM,EAEH;EAAA,IAAGF,KAAH,SAAGA,KAAH;EAAA,OAAeA,KAAK,CAACM,aAAN,CAAoBC,YAAnC;AAAA,CAFG,EAGdZ,UAAU,CAACE,gBAAD,CAHI,EAIbF,UAAU,CAAC,MAAD,CAJG,CAAlB"}
1
+ {"version":3,"file":"styled.js","sources":["../../../../src/components/atoms/Switch/styled.ts"],"sourcesContent":["import styled from '@emotion/native';\nimport { Animated } from 'react-native';\nimport { StyleProps } from '@tecsinapse/react-core';\nimport { RFValueStr } from '../../../utils';\n\nexport const SWITCH_BODY_WIDTH = '40px';\nexport const SWITCH_PIN_WIDTH = '16px';\n\nexport const StyledSwitchContent = styled(Animated.View)<Partial<StyleProps>>`\n border-radius: ${({ theme }) => theme.borderRadius.pill};\n padding: 0 ${({ theme }) => theme.spacing.micro};\n justify-content: center;\n width: ${RFValueStr(SWITCH_BODY_WIDTH)};\n height: ${RFValueStr('22px')};\n`;\n\nexport const StyledSwitch = styled(Animated.View)<Partial<StyleProps>>`\n border-radius: ${({ theme }) => theme.borderRadius.pill};\n background-color: ${({ theme }) => theme.miscellaneous.surfaceColor};\n width: ${RFValueStr(SWITCH_PIN_WIDTH)};\n height: ${RFValueStr('16px')};\n`;\n"],"names":[],"mappings":";;;;;;;;;;;AAKO,MAAM,iBAAoB,GAAA,OAAA;AAC1B,MAAM,gBAAmB,GAAA,OAAA;AAEnB,MAAA,mBAAA,GAAsB,MAAO,CAAA,QAAA,CAAS,IAAI,CAAA,CAAA;AAAA,iBAAA,EACpC,CAAC,EAAE,KAAM,EAAA,KAAM,MAAM,YAAa,CAAA,IAAA,CAAA;AAAA,aAAA,EACtC,CAAC,EAAE,KAAM,EAAA,KAAM,MAAM,OAAQ,CAAA,KAAA,CAAA;AAAA;AAAA,SAAA,EAEjC,WAAW,iBAAiB,CAAA,CAAA;AAAA,UAAA,EAC3B,WAAW,MAAM,CAAA,CAAA;AAAA,EAAA;AAGhB,MAAA,YAAA,GAAe,MAAO,CAAA,QAAA,CAAS,IAAI,CAAA,CAAA;AAAA,iBAAA,EAC7B,CAAC,EAAE,KAAM,EAAA,KAAM,MAAM,YAAa,CAAA,IAAA,CAAA;AAAA,oBAAA,EAC/B,CAAC,EAAE,KAAM,EAAA,KAAM,MAAM,aAAc,CAAA,YAAA,CAAA;AAAA,SAAA,EAC9C,WAAW,gBAAgB,CAAA,CAAA;AAAA,UAAA,EAC1B,WAAW,MAAM,CAAA,CAAA;AAAA;;;;"}
@@ -1,74 +1,80 @@
1
- var _excluded = ["value", "icon", "variant", "dismiss", "onDismiss", "style"];
2
-
3
- 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); }
4
-
5
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
6
-
7
- function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
8
-
9
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
10
-
11
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
12
-
13
- function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
14
-
15
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
16
-
17
- function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
18
-
19
- function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
20
-
21
- import React, { useCallback, useState } from 'react';
1
+ import React__default, { useState, useCallback } from 'react';
22
2
  import { Animated } from 'react-native';
23
- import { PressableSurface } from '../PressableSurface';
24
- import { StyledCloseIcon, StyledLeftIcon, StyledTagContainer } from './styled';
25
-
26
- var Tag = function Tag(_ref) {
27
- var value = _ref.value,
28
- icon = _ref.icon,
29
- _ref$variant = _ref.variant,
30
- variant = _ref$variant === void 0 ? 'small' : _ref$variant,
31
- _ref$dismiss = _ref.dismiss,
32
- canDismiss = _ref$dismiss === void 0 ? false : _ref$dismiss,
33
- onDismiss = _ref.onDismiss,
34
- style = _ref.style,
35
- rest = _objectWithoutProperties(_ref, _excluded);
36
-
37
- var _useState = useState(false),
38
- _useState2 = _slicedToArray(_useState, 2),
39
- dismiss = _useState2[0],
40
- setDismiss = _useState2[1];
41
-
42
- var fadeAnim = React.useRef(new Animated.Value(1)).current;
43
- var duration = 300;
44
-
45
- var fadeOut = function fadeOut() {
3
+ import PressableSurface from '../PressableSurface/PressableSurface.js';
4
+ import { StyledTagContainer, StyledLeftIcon, StyledCloseIcon } from './styled.js';
5
+
6
+ var __defProp = Object.defineProperty;
7
+ var __defProps = Object.defineProperties;
8
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
9
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
10
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
11
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
12
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
13
+ var __spreadValues = (a, b) => {
14
+ for (var prop in b || (b = {}))
15
+ if (__hasOwnProp.call(b, prop))
16
+ __defNormalProp(a, prop, b[prop]);
17
+ if (__getOwnPropSymbols)
18
+ for (var prop of __getOwnPropSymbols(b)) {
19
+ if (__propIsEnum.call(b, prop))
20
+ __defNormalProp(a, prop, b[prop]);
21
+ }
22
+ return a;
23
+ };
24
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
25
+ var __objRest = (source, exclude) => {
26
+ var target = {};
27
+ for (var prop in source)
28
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
29
+ target[prop] = source[prop];
30
+ if (source != null && __getOwnPropSymbols)
31
+ for (var prop of __getOwnPropSymbols(source)) {
32
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
33
+ target[prop] = source[prop];
34
+ }
35
+ return target;
36
+ };
37
+ const Tag = (_a) => {
38
+ var _b = _a, {
39
+ value,
40
+ icon,
41
+ variant = "small",
42
+ dismiss: canDismiss = false,
43
+ onDismiss,
44
+ style
45
+ } = _b, rest = __objRest(_b, [
46
+ "value",
47
+ "icon",
48
+ "variant",
49
+ "dismiss",
50
+ "onDismiss",
51
+ "style"
52
+ ]);
53
+ const [dismiss, setDismiss] = useState(false);
54
+ const fadeAnim = React__default.useRef(new Animated.Value(1)).current;
55
+ const duration = 300;
56
+ const fadeOut = () => {
46
57
  Animated.timing(fadeAnim, {
47
58
  toValue: 0,
48
- duration: duration,
59
+ duration,
49
60
  useNativeDriver: true
50
61
  }).start();
51
62
  };
52
-
53
- var handleDismiss = useCallback(function () {
54
- onDismiss === null || onDismiss === void 0 ? void 0 : onDismiss();
63
+ const handleDismiss = useCallback(() => {
64
+ onDismiss == null ? void 0 : onDismiss();
55
65
  fadeOut();
56
- setTimeout(function () {
57
- return setDismiss(true);
58
- }, duration);
66
+ setTimeout(() => setDismiss(true), duration);
59
67
  }, [onDismiss]);
60
- return React.createElement(StyledTagContainer, _extends({}, rest, {
61
- variant: variant,
62
- style: [{
63
- opacity: fadeAnim
64
- }, style],
68
+ return /* @__PURE__ */ React__default.createElement(StyledTagContainer, __spreadProps(__spreadValues({}, rest), {
69
+ variant,
70
+ style: [{ opacity: fadeAnim }, style],
65
71
  visible: !dismiss
66
- }), icon && React.createElement(StyledLeftIcon, _extends({
67
- size: icon.size || 'micro',
68
- colorVariant: icon.colorVariant || 'primary'
69
- }, icon)), value, canDismiss && React.createElement(PressableSurface, {
72
+ }), icon && /* @__PURE__ */ React__default.createElement(StyledLeftIcon, __spreadValues({
73
+ size: icon.size || "micro",
74
+ colorVariant: icon.colorVariant || "primary"
75
+ }, icon)), value, canDismiss && /* @__PURE__ */ React__default.createElement(PressableSurface, {
70
76
  onPress: handleDismiss
71
- }, React.createElement(StyledCloseIcon, {
77
+ }, /* @__PURE__ */ React__default.createElement(StyledCloseIcon, {
72
78
  name: "close-outline",
73
79
  type: "ionicon",
74
80
  size: "centi",
@@ -76,5 +82,5 @@ var Tag = function Tag(_ref) {
76
82
  })));
77
83
  };
78
84
 
79
- export default Tag;
80
- //# sourceMappingURL=Tag.js.map
85
+ export { Tag as default };
86
+ //# sourceMappingURL=Tag.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Tag.js","names":["React","useCallback","useState","Animated","PressableSurface","StyledCloseIcon","StyledLeftIcon","StyledTagContainer","Tag","value","icon","variant","dismiss","canDismiss","onDismiss","style","rest","setDismiss","fadeAnim","useRef","Value","current","duration","fadeOut","timing","toValue","useNativeDriver","start","handleDismiss","setTimeout","opacity","size","colorVariant"],"sources":["../../../../src/components/atoms/Tag/Tag.tsx"],"sourcesContent":["import React, { useCallback, useState } from 'react';\nimport { Animated, ViewProps } from 'react-native';\nimport { IconProps } from '../Icon';\nimport { PressableSurface } from '../PressableSurface';\nimport { StyledCloseIcon, StyledLeftIcon, StyledTagContainer } from './styled';\n\nexport interface TagProps extends ViewProps {\n value: React.ReactNode;\n icon?: IconProps;\n dismiss?: boolean;\n onDismiss?: () => void;\n variant?: 'small' | 'default';\n}\n\nconst Tag: React.FC<TagProps> = ({\n value,\n icon,\n variant = 'small',\n dismiss: canDismiss = false,\n onDismiss,\n style,\n ...rest\n}): JSX.Element => {\n const [dismiss, setDismiss] = useState(false);\n const fadeAnim = React.useRef(new Animated.Value(1)).current;\n const duration = 300;\n\n const fadeOut = () => {\n Animated.timing(fadeAnim, {\n toValue: 0,\n duration,\n useNativeDriver: true,\n }).start();\n };\n\n const handleDismiss = useCallback(() => {\n onDismiss?.();\n fadeOut();\n setTimeout(() => setDismiss(true), duration);\n }, [onDismiss]);\n\n return (\n <StyledTagContainer\n {...rest}\n variant={variant}\n style={[{ opacity: fadeAnim as unknown as number }, style]}\n visible={!dismiss}\n >\n {icon && (\n <StyledLeftIcon\n size={icon.size || 'micro'}\n colorVariant={icon.colorVariant || 'primary'}\n {...icon}\n />\n )}\n {value}\n {canDismiss && (\n <PressableSurface onPress={handleDismiss}>\n <StyledCloseIcon\n name=\"close-outline\"\n type=\"ionicon\"\n size=\"centi\"\n fontColor=\"medium\"\n />\n </PressableSurface>\n )}\n </StyledTagContainer>\n );\n};\n\nexport default Tag;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,OAAOA,KAAP,IAAgBC,WAAhB,EAA6BC,QAA7B,QAA6C,OAA7C;AACA,SAASC,QAAT,QAAoC,cAApC;AAEA,SAASC,gBAAT,QAAiC,qBAAjC;AACA,SAASC,eAAT,EAA0BC,cAA1B,EAA0CC,kBAA1C,QAAoE,UAApE;;AAUA,IAAMC,GAAuB,GAAG,SAA1BA,GAA0B,OAQb;EAAA,IAPjBC,KAOiB,QAPjBA,KAOiB;EAAA,IANjBC,IAMiB,QANjBA,IAMiB;EAAA,wBALjBC,OAKiB;EAAA,IALjBA,OAKiB,6BALP,OAKO;EAAA,wBAJjBC,OAIiB;EAAA,IAJRC,UAIQ,6BAJK,KAIL;EAAA,IAHjBC,SAGiB,QAHjBA,SAGiB;EAAA,IAFjBC,KAEiB,QAFjBA,KAEiB;EAAA,IADdC,IACc;;EACjB,gBAA8Bd,QAAQ,CAAC,KAAD,CAAtC;EAAA;EAAA,IAAOU,OAAP;EAAA,IAAgBK,UAAhB;;EACA,IAAMC,QAAQ,GAAGlB,KAAK,CAACmB,MAAN,CAAa,IAAIhB,QAAQ,CAACiB,KAAb,CAAmB,CAAnB,CAAb,EAAoCC,OAArD;EACA,IAAMC,QAAQ,GAAG,GAAjB;;EAEA,IAAMC,OAAO,GAAG,SAAVA,OAAU,GAAM;IACpBpB,QAAQ,CAACqB,MAAT,CAAgBN,QAAhB,EAA0B;MACxBO,OAAO,EAAE,CADe;MAExBH,QAAQ,EAARA,QAFwB;MAGxBI,eAAe,EAAE;IAHO,CAA1B,EAIGC,KAJH;EAKD,CAND;;EAQA,IAAMC,aAAa,GAAG3B,WAAW,CAAC,YAAM;IACtCa,SAAS,SAAT,IAAAA,SAAS,WAAT,YAAAA,SAAS;IACTS,OAAO;IACPM,UAAU,CAAC;MAAA,OAAMZ,UAAU,CAAC,IAAD,CAAhB;IAAA,CAAD,EAAyBK,QAAzB,CAAV;EACD,CAJgC,EAI9B,CAACR,SAAD,CAJ8B,CAAjC;EAMA,OACE,oBAAC,kBAAD,eACME,IADN;IAEE,OAAO,EAAEL,OAFX;IAGE,KAAK,EAAE,CAAC;MAAEmB,OAAO,EAAEZ;IAAX,CAAD,EAA6CH,KAA7C,CAHT;IAIE,OAAO,EAAE,CAACH;EAJZ,IAMGF,IAAI,IACH,oBAAC,cAAD;IACE,IAAI,EAAEA,IAAI,CAACqB,IAAL,IAAa,OADrB;IAEE,YAAY,EAAErB,IAAI,CAACsB,YAAL,IAAqB;EAFrC,GAGMtB,IAHN,EAPJ,EAaGD,KAbH,EAcGI,UAAU,IACT,oBAAC,gBAAD;IAAkB,OAAO,EAAEe;EAA3B,GACE,oBAAC,eAAD;IACE,IAAI,EAAC,eADP;IAEE,IAAI,EAAC,SAFP;IAGE,IAAI,EAAC,OAHP;IAIE,SAAS,EAAC;EAJZ,EADF,CAfJ,CADF;AA2BD,CAtDD;;AAwDA,eAAepB,GAAf"}
1
+ {"version":3,"file":"Tag.js","sources":["../../../../src/components/atoms/Tag/Tag.tsx"],"sourcesContent":["import React, { useCallback, useState } from 'react';\nimport { Animated, ViewProps } from 'react-native';\nimport { IconProps } from '../Icon';\nimport { PressableSurface } from '../PressableSurface';\nimport { StyledCloseIcon, StyledLeftIcon, StyledTagContainer } from './styled';\n\nexport interface TagProps extends ViewProps {\n value: React.ReactNode;\n icon?: IconProps;\n dismiss?: boolean;\n onDismiss?: () => void;\n variant?: 'small' | 'default';\n}\n\nconst Tag: React.FC<TagProps> = ({\n value,\n icon,\n variant = 'small',\n dismiss: canDismiss = false,\n onDismiss,\n style,\n ...rest\n}): JSX.Element => {\n const [dismiss, setDismiss] = useState(false);\n const fadeAnim = React.useRef(new Animated.Value(1)).current;\n const duration = 300;\n\n const fadeOut = () => {\n Animated.timing(fadeAnim, {\n toValue: 0,\n duration,\n useNativeDriver: true,\n }).start();\n };\n\n const handleDismiss = useCallback(() => {\n onDismiss?.();\n fadeOut();\n setTimeout(() => setDismiss(true), duration);\n }, [onDismiss]);\n\n return (\n <StyledTagContainer\n {...rest}\n variant={variant}\n style={[{ opacity: fadeAnim as unknown as number }, style]}\n visible={!dismiss}\n >\n {icon && (\n <StyledLeftIcon\n size={icon.size || 'micro'}\n colorVariant={icon.colorVariant || 'primary'}\n {...icon}\n />\n )}\n {value}\n {canDismiss && (\n <PressableSurface onPress={handleDismiss}>\n <StyledCloseIcon\n name=\"close-outline\"\n type=\"ionicon\"\n size=\"centi\"\n fontColor=\"medium\"\n />\n </PressableSurface>\n )}\n </StyledTagContainer>\n );\n};\n\nexport default Tag;\n"],"names":["React"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAcM,MAAA,GAAA,GAA0B,CAAC,EAQd,KAAA;AARc,EAC/B,IAAA,EAAA,GAAA,EAAA,EAAA;AAAA,IAAA,KAAA;AAAA,IACA,IAAA;AAAA,IACA,OAAU,GAAA,OAAA;AAAA,IACV,SAAS,UAAa,GAAA,KAAA;AAAA,IACtB,SAAA;AAAA,IACA,KAAA;AAAA,GApBF,GAciC,EAO5B,EAAA,IAAA,GAAA,SAAA,CAP4B,EAO5B,EAAA;AAAA,IANH,OAAA;AAAA,IACA,MAAA;AAAA,IACA,SAAA;AAAA,IACA,SAAA;AAAA,IACA,WAAA;AAAA,IACA,OAAA;AAAA,GAAA,CAAA,CAAA;AAGA,EAAA,MAAM,CAAC,OAAA,EAAS,UAAU,CAAA,GAAI,SAAS,KAAK,CAAA,CAAA;AAC5C,EAAM,MAAA,QAAA,GAAWA,eAAM,MAAO,CAAA,IAAI,SAAS,KAAM,CAAA,CAAC,CAAC,CAAE,CAAA,OAAA,CAAA;AACrD,EAAA,MAAM,QAAW,GAAA,GAAA,CAAA;AAEjB,EAAA,MAAM,UAAU,MAAM;AACpB,IAAA,QAAA,CAAS,OAAO,QAAU,EAAA;AAAA,MACxB,OAAS,EAAA,CAAA;AAAA,MACT,QAAA;AAAA,MACA,eAAiB,EAAA,IAAA;AAAA,KAClB,EAAE,KAAM,EAAA,CAAA;AAAA,GACX,CAAA;AAEA,EAAM,MAAA,aAAA,GAAgB,YAAY,MAAM;AACtC,IAAA,SAAA,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,SAAA,EAAA,CAAA;AACA,IAAQ,OAAA,EAAA,CAAA;AACR,IAAA,UAAA,CAAW,MAAM,UAAA,CAAW,IAAI,CAAA,EAAG,QAAQ,CAAA,CAAA;AAAA,GAC7C,EAAG,CAAC,SAAS,CAAC,CAAA,CAAA;AAEd,EACE,uBAAAA,cAAA,CAAA,aAAA,CAAC,qDACK,IADL,CAAA,EAAA;AAAA,IAEC,OAAA;AAAA,IACA,OAAO,CAAC,EAAE,OAAS,EAAA,QAAA,IAAiC,KAAK,CAAA;AAAA,IACzD,SAAS,CAAC,OAAA;AAAA,GAAA,CAAA,EAET,wBACEA,cAAA,CAAA,aAAA,CAAA,cAAA,EAAA,cAAA,CAAA;AAAA,IACC,IAAA,EAAM,KAAK,IAAQ,IAAA,OAAA;AAAA,IACnB,YAAA,EAAc,KAAK,YAAgB,IAAA,SAAA;AAAA,GAAA,EAC/B,IACN,CAAA,CAAA,EAED,KACA,EAAA,UAAA,oBACEA,cAAA,CAAA,aAAA,CAAA,gBAAA,EAAA;AAAA,IAAiB,OAAS,EAAA,aAAA;AAAA,GAAA,kBACxBA,cAAA,CAAA,aAAA,CAAA,eAAA,EAAA;AAAA,IACC,IAAK,EAAA,eAAA;AAAA,IACL,IAAK,EAAA,SAAA;AAAA,IACL,IAAK,EAAA,OAAA;AAAA,IACL,SAAU,EAAA,QAAA;AAAA,GACZ,CACF,CAEJ,CAAA,CAAA;AAEJ;;;;"}
@@ -1,39 +1,35 @@
1
- var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
2
-
3
- function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
4
-
5
1
  import styled, { css } from '@emotion/native';
6
2
  import { Animated } from 'react-native';
7
- import { Icon } from '../Icon';
8
-
9
- var smallVariant = function smallVariant(_ref) {
10
- var theme = _ref.theme,
11
- variant = _ref.variant;
12
- return variant === 'small' && css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n border-radius: ", ";\n padding: ", " ", ";\n "])), theme.borderRadius.micro, theme.spacing.nano, theme.spacing.mili);
13
- };
3
+ import Icon from '../Icon/Icon.js';
14
4
 
15
- var defaultVariant = function defaultVariant(_ref2) {
16
- var theme = _ref2.theme,
17
- variant = _ref2.variant;
18
- return variant === 'default' && css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n border-radius: ", ";\n padding: ", " ", ";\n "])), theme.borderRadius.mili, theme.spacing.micro, theme.spacing.centi);
19
- };
5
+ const smallVariant = ({ theme, variant }) => variant === "small" && css`
6
+ border-radius: ${theme.borderRadius.micro};
7
+ padding: ${theme.spacing.nano} ${theme.spacing.mili};
8
+ `;
9
+ const defaultVariant = ({ theme, variant }) => variant === "default" && css`
10
+ border-radius: ${theme.borderRadius.mili};
11
+ padding: ${theme.spacing.micro} ${theme.spacing.centi};
12
+ `;
13
+ const StyledTagContainerBase = styled(Animated.View)`
14
+ background-color: ${({ theme }) => theme.miscellaneous.bodyColor};
15
+ flex-direction: row;
16
+ justify-content: center;
17
+ align-items: center;
18
+ align-self: center;
19
+ display: ${({ visible }) => visible ? "flex" : "none"};
20
+ `;
21
+ const StyledTagContainer = styled(StyledTagContainerBase)(
22
+ (props) => css`
23
+ ${smallVariant(props)}
24
+ ${defaultVariant(props)}
25
+ `
26
+ );
27
+ const StyledLeftIcon = styled(Icon)`
28
+ margin-right: ${({ theme }) => theme.spacing.micro};
29
+ `;
30
+ const StyledCloseIcon = styled(Icon)`
31
+ margin-left: ${({ theme }) => theme.spacing.nano};
32
+ `;
20
33
 
21
- var StyledTagContainerBase = styled(Animated.View)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n background-color: ", ";\n flex-direction: row;\n justify-content: center;\n align-items: center;\n align-self: center;\n display: ", ";\n"])), function (_ref3) {
22
- var theme = _ref3.theme;
23
- return theme.miscellaneous.bodyColor;
24
- }, function (_ref4) {
25
- var visible = _ref4.visible;
26
- return visible ? 'flex' : 'none';
27
- });
28
- export var StyledTagContainer = styled(StyledTagContainerBase)(function (props) {
29
- return css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n ", "\n ", "\n "])), smallVariant(props), defaultVariant(props));
30
- });
31
- export var StyledLeftIcon = styled(Icon)(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n margin-right: ", ";\n"])), function (_ref5) {
32
- var theme = _ref5.theme;
33
- return theme.spacing.micro;
34
- });
35
- export var StyledCloseIcon = styled(Icon)(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n margin-left: ", ";\n"])), function (_ref6) {
36
- var theme = _ref6.theme;
37
- return theme.spacing.nano;
38
- });
39
- //# sourceMappingURL=styled.js.map
34
+ export { StyledCloseIcon, StyledLeftIcon, StyledTagContainer };
35
+ //# sourceMappingURL=styled.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"styled.js","names":["styled","css","Animated","Icon","smallVariant","theme","variant","borderRadius","micro","spacing","nano","mili","defaultVariant","centi","StyledTagContainerBase","View","miscellaneous","bodyColor","visible","StyledTagContainer","props","StyledLeftIcon","StyledCloseIcon"],"sources":["../../../../src/components/atoms/Tag/styled.ts"],"sourcesContent":["import styled, { css } from '@emotion/native';\nimport { Animated, ViewProps } from 'react-native';\nimport { StyleProps } from '../../../types/defaults';\nimport { Icon, IconProps } from '../Icon';\nimport { TagProps } from './Tag';\n\nconst smallVariant = ({ theme, variant }: Partial<TagProps> & StyleProps) =>\n variant === 'small' &&\n css`\n border-radius: ${theme.borderRadius.micro};\n padding: ${theme.spacing.nano} ${theme.spacing.mili};\n `;\n\nconst defaultVariant = ({ theme, variant }: Partial<TagProps> & StyleProps) =>\n variant === 'default' &&\n css`\n border-radius: ${theme.borderRadius.mili};\n padding: ${theme.spacing.micro} ${theme.spacing.centi};\n `;\n\nconst StyledTagContainerBase = styled(Animated.View)<\n Partial<TagProps> & Partial<StyleProps> & ViewProps & { visible: boolean }\n>`\n background-color: ${({ theme }) => theme.miscellaneous.bodyColor};\n flex-direction: row;\n justify-content: center;\n align-items: center;\n align-self: center;\n display: ${({ visible }) => (visible ? 'flex' : 'none')};\n`;\n\nexport const StyledTagContainer = styled(StyledTagContainerBase)(\n props => css`\n ${smallVariant(props)}\n ${defaultVariant(props)}\n `\n);\n\nexport const StyledLeftIcon = styled(Icon)<Partial<StyleProps> & IconProps>`\n margin-right: ${({ theme }) => theme.spacing.micro};\n`;\n\nexport const StyledCloseIcon = styled(Icon)<Partial<StyleProps> & IconProps>`\n margin-left: ${({ theme }) => theme.spacing.nano};\n`;\n"],"mappings":";;;;AAAA,OAAOA,MAAP,IAAiBC,GAAjB,QAA4B,iBAA5B;AACA,SAASC,QAAT,QAAoC,cAApC;AAEA,SAASC,IAAT,QAAgC,SAAhC;;AAGA,IAAMC,YAAY,GAAG,SAAfA,YAAe;EAAA,IAAGC,KAAH,QAAGA,KAAH;EAAA,IAAUC,OAAV,QAAUA,OAAV;EAAA,OACnBA,OAAO,KAAK,OAAZ,IACAL,GADA,6HAEmBI,KAAK,CAACE,YAAN,CAAmBC,KAFtC,EAGaH,KAAK,CAACI,OAAN,CAAcC,IAH3B,EAGmCL,KAAK,CAACI,OAAN,CAAcE,IAHjD,CADmB;AAAA,CAArB;;AAOA,IAAMC,cAAc,GAAG,SAAjBA,cAAiB;EAAA,IAAGP,KAAH,SAAGA,KAAH;EAAA,IAAUC,OAAV,SAAUA,OAAV;EAAA,OACrBA,OAAO,KAAK,SAAZ,IACAL,GADA,+HAEmBI,KAAK,CAACE,YAAN,CAAmBI,IAFtC,EAGaN,KAAK,CAACI,OAAN,CAAcD,KAH3B,EAGoCH,KAAK,CAACI,OAAN,CAAcI,KAHlD,CADqB;AAAA,CAAvB;;AAOA,IAAMC,sBAAsB,GAAGd,MAAM,CAACE,QAAQ,CAACa,IAAV,CAAT,0NAGN;EAAA,IAAGV,KAAH,SAAGA,KAAH;EAAA,OAAeA,KAAK,CAACW,aAAN,CAAoBC,SAAnC;AAAA,CAHM,EAQf;EAAA,IAAGC,OAAH,SAAGA,OAAH;EAAA,OAAkBA,OAAO,GAAG,MAAH,GAAY,MAArC;AAAA,CARe,CAA5B;AAWA,OAAO,IAAMC,kBAAkB,GAAGnB,MAAM,CAACc,sBAAD,CAAN,CAChC,UAAAM,KAAK;EAAA,OAAInB,GAAJ,gGACDG,YAAY,CAACgB,KAAD,CADX,EAEDR,cAAc,CAACQ,KAAD,CAFb;AAAA,CAD2B,CAA3B;AAOP,OAAO,IAAMC,cAAc,GAAGrB,MAAM,CAACG,IAAD,CAAT,iGACT;EAAA,IAAGE,KAAH,SAAGA,KAAH;EAAA,OAAeA,KAAK,CAACI,OAAN,CAAcD,KAA7B;AAAA,CADS,CAApB;AAIP,OAAO,IAAMc,eAAe,GAAGtB,MAAM,CAACG,IAAD,CAAT,gGACX;EAAA,IAAGE,KAAH,SAAGA,KAAH;EAAA,OAAeA,KAAK,CAACI,OAAN,CAAcC,IAA7B;AAAA,CADW,CAArB"}
1
+ {"version":3,"file":"styled.js","sources":["../../../../src/components/atoms/Tag/styled.ts"],"sourcesContent":["import styled, { css } from '@emotion/native';\nimport { Animated, ViewProps } from 'react-native';\nimport { StyleProps } from '../../../types/defaults';\nimport { Icon, IconProps } from '../Icon';\nimport { TagProps } from './Tag';\n\nconst smallVariant = ({ theme, variant }: Partial<TagProps> & StyleProps) =>\n variant === 'small' &&\n css`\n border-radius: ${theme.borderRadius.micro};\n padding: ${theme.spacing.nano} ${theme.spacing.mili};\n `;\n\nconst defaultVariant = ({ theme, variant }: Partial<TagProps> & StyleProps) =>\n variant === 'default' &&\n css`\n border-radius: ${theme.borderRadius.mili};\n padding: ${theme.spacing.micro} ${theme.spacing.centi};\n `;\n\nconst StyledTagContainerBase = styled(Animated.View)<\n Partial<TagProps> & Partial<StyleProps> & ViewProps & { visible: boolean }\n>`\n background-color: ${({ theme }) => theme.miscellaneous.bodyColor};\n flex-direction: row;\n justify-content: center;\n align-items: center;\n align-self: center;\n display: ${({ visible }) => (visible ? 'flex' : 'none')};\n`;\n\nexport const StyledTagContainer = styled(StyledTagContainerBase)(\n props => css`\n ${smallVariant(props)}\n ${defaultVariant(props)}\n `\n);\n\nexport const StyledLeftIcon = styled(Icon)<Partial<StyleProps> & IconProps>`\n margin-right: ${({ theme }) => theme.spacing.micro};\n`;\n\nexport const StyledCloseIcon = styled(Icon)<Partial<StyleProps> & IconProps>`\n margin-left: ${({ theme }) => theme.spacing.nano};\n`;\n"],"names":[],"mappings":";;;;AAMA,MAAM,eAAe,CAAC,EAAE,OAAO,OAAQ,EAAA,KACrC,YAAY,OACZ,IAAA,GAAA,CAAA;AAAA,mBAAA,EACmB,MAAM,YAAa,CAAA,KAAA,CAAA;AAAA,aAAA,EACzB,KAAM,CAAA,OAAA,CAAQ,IAAQ,CAAA,CAAA,EAAA,KAAA,CAAM,OAAQ,CAAA,IAAA,CAAA;AAAA,EAAA,CAAA,CAAA;AAGnD,MAAM,iBAAiB,CAAC,EAAE,OAAO,OAAQ,EAAA,KACvC,YAAY,SACZ,IAAA,GAAA,CAAA;AAAA,mBAAA,EACmB,MAAM,YAAa,CAAA,IAAA,CAAA;AAAA,aAAA,EACzB,KAAM,CAAA,OAAA,CAAQ,KAAS,CAAA,CAAA,EAAA,KAAA,CAAM,OAAQ,CAAA,KAAA,CAAA;AAAA,EAAA,CAAA,CAAA;AAGpD,MAAM,sBAAA,GAAyB,MAAO,CAAA,QAAA,CAAS,IAAI,CAAA,CAAA;AAAA,oBAAA,EAG7B,CAAC,EAAE,KAAM,EAAA,KAAM,MAAM,aAAc,CAAA,SAAA,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA,WAAA,EAK5C,CAAC,EAAE,OAAQ,EAAA,KAAO,UAAU,MAAS,GAAA,MAAA,CAAA;AAAA,CAAA,CAAA;AAGrC,MAAA,kBAAA,GAAqB,OAAO,sBAAsB,CAAA;AAAA,EAC7D,CAAS,KAAA,KAAA,GAAA,CAAA;AAAA,IAAA,EACL,aAAa,KAAK,CAAA,CAAA;AAAA,IAAA,EAClB,eAAe,KAAK,CAAA,CAAA;AAAA,EAAA,CAAA;AAE1B,EAAA;AAEa,MAAA,cAAA,GAAiB,OAAO,IAAI,CAAA,CAAA;AAAA,gBAAA,EACvB,CAAC,EAAE,KAAM,EAAA,KAAM,MAAM,OAAQ,CAAA,KAAA,CAAA;AAAA,EAAA;AAGlC,MAAA,eAAA,GAAkB,OAAO,IAAI,CAAA,CAAA;AAAA,eAAA,EACzB,CAAC,EAAE,KAAM,EAAA,KAAM,MAAM,OAAQ,CAAA,IAAA,CAAA;AAAA;;;;"}
@@ -1,47 +1,76 @@
1
- var _excluded = ["children", "style", "fontColor", "colorTone", "colorVariant", "fontWeight", "typography", "numberOfLines", "ellipsizeMode", "textTransform", "capitalFirst"];
1
+ import React__default from 'react';
2
+ import { StyledColoredText } from './styled.js';
3
+ import { getLabel } from './functions.js';
2
4
 
3
- 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); }
4
-
5
- function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
6
-
7
- function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
8
-
9
- import React from 'react';
10
- import { StyledColoredText } from './styled';
11
- import { getLabel } from './functions';
12
-
13
- var Text = function Text(_ref) {
14
- var children = _ref.children,
15
- style = _ref.style,
16
- _ref$fontColor = _ref.fontColor,
17
- fontColor = _ref$fontColor === void 0 ? 'dark' : _ref$fontColor,
18
- _ref$colorTone = _ref.colorTone,
19
- colorTone = _ref$colorTone === void 0 ? 'medium' : _ref$colorTone,
20
- colorVariant = _ref.colorVariant,
21
- _ref$fontWeight = _ref.fontWeight,
22
- fontWeight = _ref$fontWeight === void 0 ? 'regular' : _ref$fontWeight,
23
- _ref$typography = _ref.typography,
24
- typography = _ref$typography === void 0 ? 'base' : _ref$typography,
25
- numberOfLines = _ref.numberOfLines,
26
- ellipsizeMode = _ref.ellipsizeMode,
27
- _ref$textTransform = _ref.textTransform,
28
- textTransform = _ref$textTransform === void 0 ? 'none' : _ref$textTransform,
29
- _ref$capitalFirst = _ref.capitalFirst,
30
- capitalFirst = _ref$capitalFirst === void 0 ? false : _ref$capitalFirst,
31
- rest = _objectWithoutProperties(_ref, _excluded);
32
-
33
- return React.createElement(StyledColoredText, _extends({}, rest, {
34
- style: style,
35
- fontColor: fontColor,
36
- colorTone: colorTone,
37
- colorVariant: colorVariant,
38
- fontWeight: fontWeight,
39
- typography: typography,
40
- numberOfLines: numberOfLines,
41
- ellipsizeMode: ellipsizeMode,
42
- textTransform: textTransform
5
+ var __defProp = Object.defineProperty;
6
+ var __defProps = Object.defineProperties;
7
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
8
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
9
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
10
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
11
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
12
+ var __spreadValues = (a, b) => {
13
+ for (var prop in b || (b = {}))
14
+ if (__hasOwnProp.call(b, prop))
15
+ __defNormalProp(a, prop, b[prop]);
16
+ if (__getOwnPropSymbols)
17
+ for (var prop of __getOwnPropSymbols(b)) {
18
+ if (__propIsEnum.call(b, prop))
19
+ __defNormalProp(a, prop, b[prop]);
20
+ }
21
+ return a;
22
+ };
23
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
24
+ var __objRest = (source, exclude) => {
25
+ var target = {};
26
+ for (var prop in source)
27
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
28
+ target[prop] = source[prop];
29
+ if (source != null && __getOwnPropSymbols)
30
+ for (var prop of __getOwnPropSymbols(source)) {
31
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
32
+ target[prop] = source[prop];
33
+ }
34
+ return target;
35
+ };
36
+ const Text = (_a) => {
37
+ var _b = _a, {
38
+ children,
39
+ style,
40
+ fontColor = "dark",
41
+ colorTone = "medium",
42
+ colorVariant,
43
+ fontWeight = "regular",
44
+ typography = "base",
45
+ numberOfLines,
46
+ ellipsizeMode,
47
+ textTransform = "none",
48
+ capitalFirst = false
49
+ } = _b, rest = __objRest(_b, [
50
+ "children",
51
+ "style",
52
+ "fontColor",
53
+ "colorTone",
54
+ "colorVariant",
55
+ "fontWeight",
56
+ "typography",
57
+ "numberOfLines",
58
+ "ellipsizeMode",
59
+ "textTransform",
60
+ "capitalFirst"
61
+ ]);
62
+ return /* @__PURE__ */ React__default.createElement(StyledColoredText, __spreadProps(__spreadValues({}, rest), {
63
+ style,
64
+ fontColor,
65
+ colorTone,
66
+ colorVariant,
67
+ fontWeight,
68
+ typography,
69
+ numberOfLines,
70
+ ellipsizeMode,
71
+ textTransform
43
72
  }), getLabel(children, capitalFirst));
44
73
  };
45
74
 
46
- export default Text;
47
- //# sourceMappingURL=Text.js.map
75
+ export { Text as default };
76
+ //# sourceMappingURL=Text.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Text.js","names":["React","StyledColoredText","getLabel","Text","children","style","fontColor","colorTone","colorVariant","fontWeight","typography","numberOfLines","ellipsizeMode","textTransform","capitalFirst","rest"],"sources":["../../../../src/components/atoms/Text/Text.tsx"],"sourcesContent":["import React, { FC } from 'react';\nimport {\n ColorGradationType,\n ColorType,\n FontColorType,\n FontStackType,\n FontWeightType,\n TypographyVariationType,\n} from '@tecsinapse/react-core';\nimport { StyleProp, TextStyle } from 'react-native';\nimport { StyledColoredText } from './styled';\nimport { getLabel } from './functions';\n\nexport interface TextProps {\n /** Font theme text color */\n fontColor?: FontColorType;\n /** Font theme weight */\n fontWeight?: FontWeightType;\n /** Font theme sizes */\n typography?: TypographyVariationType;\n /** Font theme stack */\n fontStack?: FontStackType;\n /** Palette theme colors. You can specify this prop to override theme fontColor */\n colorVariant?: ColorType;\n /** Palette theme colors gradation */\n colorTone?: ColorGradationType;\n numberOfLines?: number;\n ellipsizeMode?: 'head' | 'middle' | 'tail' | 'clip';\n textTransform?: 'none' | 'uppercase' | 'lowercase' | 'capitalize';\n capitalFirst?: boolean;\n style?: StyleProp<TextStyle>;\n children?: React.ReactNode;\n}\n\n/** NOTE: When using colors, be careful to not override fontColor by using colorVariant and colorTone, referent to theme colors and not text colors. */\nconst Text: FC<TextProps> = ({\n children,\n style,\n fontColor = 'dark',\n colorTone = 'medium',\n colorVariant,\n fontWeight = 'regular',\n typography = 'base',\n numberOfLines,\n ellipsizeMode,\n textTransform = 'none',\n capitalFirst = false,\n ...rest\n}): JSX.Element => {\n return (\n <StyledColoredText\n {...rest}\n style={style}\n fontColor={fontColor}\n colorTone={colorTone}\n colorVariant={colorVariant}\n fontWeight={fontWeight}\n typography={typography}\n numberOfLines={numberOfLines}\n ellipsizeMode={ellipsizeMode}\n textTransform={textTransform}\n >\n {getLabel(children, capitalFirst)}\n </StyledColoredText>\n );\n};\n\nexport default Text;\n"],"mappings":";;;;;;;;AAAA,OAAOA,KAAP,MAA0B,OAA1B;AAUA,SAASC,iBAAT,QAAkC,UAAlC;AACA,SAASC,QAAT,QAAyB,aAAzB;;AAwBA,IAAMC,IAAmB,GAAG,SAAtBA,IAAsB,OAaT;EAAA,IAZjBC,QAYiB,QAZjBA,QAYiB;EAAA,IAXjBC,KAWiB,QAXjBA,KAWiB;EAAA,0BAVjBC,SAUiB;EAAA,IAVjBA,SAUiB,+BAVL,MAUK;EAAA,0BATjBC,SASiB;EAAA,IATjBA,SASiB,+BATL,QASK;EAAA,IARjBC,YAQiB,QARjBA,YAQiB;EAAA,2BAPjBC,UAOiB;EAAA,IAPjBA,UAOiB,gCAPJ,SAOI;EAAA,2BANjBC,UAMiB;EAAA,IANjBA,UAMiB,gCANJ,MAMI;EAAA,IALjBC,aAKiB,QALjBA,aAKiB;EAAA,IAJjBC,aAIiB,QAJjBA,aAIiB;EAAA,8BAHjBC,aAGiB;EAAA,IAHjBA,aAGiB,mCAHD,MAGC;EAAA,6BAFjBC,YAEiB;EAAA,IAFjBA,YAEiB,kCAFF,KAEE;EAAA,IADdC,IACc;;EACjB,OACE,oBAAC,iBAAD,eACMA,IADN;IAEE,KAAK,EAAEV,KAFT;IAGE,SAAS,EAAEC,SAHb;IAIE,SAAS,EAAEC,SAJb;IAKE,YAAY,EAAEC,YALhB;IAME,UAAU,EAAEC,UANd;IAOE,UAAU,EAAEC,UAPd;IAQE,aAAa,EAAEC,aARjB;IASE,aAAa,EAAEC,aATjB;IAUE,aAAa,EAAEC;EAVjB,IAYGX,QAAQ,CAACE,QAAD,EAAWU,YAAX,CAZX,CADF;AAgBD,CA9BD;;AAgCA,eAAeX,IAAf"}
1
+ {"version":3,"file":"Text.js","sources":["../../../../src/components/atoms/Text/Text.tsx"],"sourcesContent":["import React, { FC } from 'react';\nimport {\n ColorGradationType,\n ColorType,\n FontColorType,\n FontStackType,\n FontWeightType,\n TypographyVariationType,\n} from '@tecsinapse/react-core';\nimport { StyleProp, TextStyle } from 'react-native';\nimport { StyledColoredText } from './styled';\nimport { getLabel } from './functions';\n\nexport interface TextProps {\n /** Font theme text color */\n fontColor?: FontColorType;\n /** Font theme weight */\n fontWeight?: FontWeightType;\n /** Font theme sizes */\n typography?: TypographyVariationType;\n /** Font theme stack */\n fontStack?: FontStackType;\n /** Palette theme colors. You can specify this prop to override theme fontColor */\n colorVariant?: ColorType;\n /** Palette theme colors gradation */\n colorTone?: ColorGradationType;\n numberOfLines?: number;\n ellipsizeMode?: 'head' | 'middle' | 'tail' | 'clip';\n textTransform?: 'none' | 'uppercase' | 'lowercase' | 'capitalize';\n capitalFirst?: boolean;\n style?: StyleProp<TextStyle>;\n children?: React.ReactNode;\n}\n\n/** NOTE: When using colors, be careful to not override fontColor by using colorVariant and colorTone, referent to theme colors and not text colors. */\nconst Text: FC<TextProps> = ({\n children,\n style,\n fontColor = 'dark',\n colorTone = 'medium',\n colorVariant,\n fontWeight = 'regular',\n typography = 'base',\n numberOfLines,\n ellipsizeMode,\n textTransform = 'none',\n capitalFirst = false,\n ...rest\n}): JSX.Element => {\n return (\n <StyledColoredText\n {...rest}\n style={style}\n fontColor={fontColor}\n colorTone={colorTone}\n colorVariant={colorVariant}\n fontWeight={fontWeight}\n typography={typography}\n numberOfLines={numberOfLines}\n ellipsizeMode={ellipsizeMode}\n textTransform={textTransform}\n >\n {getLabel(children, capitalFirst)}\n </StyledColoredText>\n );\n};\n\nexport default Text;\n"],"names":["React"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmCM,MAAA,IAAA,GAAsB,CAAC,EAaV,KAAA;AAbU,EAC3B,IAAA,EAAA,GAAA,EAAA,EAAA;AAAA,IAAA,QAAA;AAAA,IACA,KAAA;AAAA,IACA,SAAY,GAAA,MAAA;AAAA,IACZ,SAAY,GAAA,QAAA;AAAA,IACZ,YAAA;AAAA,IACA,UAAa,GAAA,SAAA;AAAA,IACb,UAAa,GAAA,MAAA;AAAA,IACb,aAAA;AAAA,IACA,aAAA;AAAA,IACA,aAAgB,GAAA,MAAA;AAAA,IAChB,YAAe,GAAA,KAAA;AAAA,GA9CjB,GAmC6B,EAYxB,EAAA,IAAA,GAAA,SAAA,CAZwB,EAYxB,EAAA;AAAA,IAXH,UAAA;AAAA,IACA,OAAA;AAAA,IACA,WAAA;AAAA,IACA,WAAA;AAAA,IACA,cAAA;AAAA,IACA,YAAA;AAAA,IACA,YAAA;AAAA,IACA,eAAA;AAAA,IACA,eAAA;AAAA,IACA,eAAA;AAAA,IACA,cAAA;AAAA,GAAA,CAAA,CAAA;AAGA,EACE,uBAAAA,cAAA,CAAA,aAAA,CAAC,oDACK,IADL,CAAA,EAAA;AAAA,IAEC,KAAA;AAAA,IACA,SAAA;AAAA,IACA,SAAA;AAAA,IACA,YAAA;AAAA,IACA,UAAA;AAAA,IACA,UAAA;AAAA,IACA,aAAA;AAAA,IACA,aAAA;AAAA,IACA,aAAA;AAAA,GAEC,CAAA,EAAA,QAAA,CAAS,QAAU,EAAA,YAAY,CAClC,CAAA,CAAA;AAEJ;;;;"}
@@ -1,7 +1,5 @@
1
- export var getFirstCapitalCharacter = function getFirstCapitalCharacter(value) {
2
- return value.charAt(0).toUpperCase().concat(value.slice(1));
3
- };
4
- export var getLabel = function getLabel(children, capitalFirst) {
5
- return typeof children === 'string' && capitalFirst ? getFirstCapitalCharacter(children) : children;
6
- };
7
- //# sourceMappingURL=functions.js.map
1
+ const getFirstCapitalCharacter = (value) => value.charAt(0).toUpperCase().concat(value.slice(1));
2
+ const getLabel = (children, capitalFirst) => typeof children === "string" && capitalFirst ? getFirstCapitalCharacter(children) : children;
3
+
4
+ export { getFirstCapitalCharacter, getLabel };
5
+ //# sourceMappingURL=functions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"functions.js","names":["getFirstCapitalCharacter","value","charAt","toUpperCase","concat","slice","getLabel","children","capitalFirst"],"sources":["../../../../src/components/atoms/Text/functions.ts"],"sourcesContent":["export const getFirstCapitalCharacter = (value: string): string =>\n value.charAt(0).toUpperCase().concat(value.slice(1));\n\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\nexport const getLabel = (children, capitalFirst: boolean) =>\n typeof children === 'string' && capitalFirst\n ? getFirstCapitalCharacter(children)\n : children;\n"],"mappings":"AAAA,OAAO,IAAMA,wBAAwB,GAAG,SAA3BA,wBAA2B,CAACC,KAAD;EAAA,OACtCA,KAAK,CAACC,MAAN,CAAa,CAAb,EAAgBC,WAAhB,GAA8BC,MAA9B,CAAqCH,KAAK,CAACI,KAAN,CAAY,CAAZ,CAArC,CADsC;AAAA,CAAjC;AAIP,OAAO,IAAMC,QAAQ,GAAG,SAAXA,QAAW,CAACC,QAAD,EAAWC,YAAX;EAAA,OACtB,OAAOD,QAAP,KAAoB,QAApB,IAAgCC,YAAhC,GACIR,wBAAwB,CAACO,QAAD,CAD5B,GAEIA,QAHkB;AAAA,CAAjB"}
1
+ {"version":3,"file":"functions.js","sources":["../../../../src/components/atoms/Text/functions.ts"],"sourcesContent":["export const getFirstCapitalCharacter = (value: string): string =>\n value.charAt(0).toUpperCase().concat(value.slice(1));\n\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\nexport const getLabel = (children, capitalFirst: boolean) =>\n typeof children === 'string' && capitalFirst\n ? getFirstCapitalCharacter(children)\n : children;\n"],"names":[],"mappings":"AAAO,MAAM,wBAA2B,GAAA,CAAC,KACvC,KAAA,KAAA,CAAM,MAAO,CAAA,CAAC,CAAE,CAAA,WAAA,EAAc,CAAA,MAAA,CAAO,KAAM,CAAA,KAAA,CAAM,CAAC,CAAC,EAAA;AAGxC,MAAA,QAAA,GAAW,CAAC,QAAA,EAAU,YACjC,KAAA,OAAO,aAAa,QAAY,IAAA,YAAA,GAC5B,wBAAyB,CAAA,QAAQ,CACjC,GAAA;;;;"}
@@ -1,20 +1,6 @@
1
1
  /// <reference types="react" />
2
- import { TextProps } from '@tecsinapse/react-core';
3
2
  import { Text as RNText } from 'react-native';
4
- export declare const StyledText: import("@emotion/native").StyledComponent<import("react-native").TextProps & {
5
- theme?: import("@emotion/react").Theme | undefined;
6
- as?: import("react").ElementType<any> | undefined;
7
- } & TextProps & Partial<import("@tecsinapse/react-core").ThemeProviderProps>, {}, {
3
+ export declare const StyledText: import("@emotion/native").StyledComponent<any, {}, {
8
4
  ref?: import("react").Ref<RNText> | undefined;
9
5
  }>;
10
- export declare const StyledColoredText: import("@emotion/native").StyledComponent<import("react-native").TextProps & {
11
- theme?: import("@emotion/react").Theme | undefined;
12
- as?: import("react").ElementType<any> | undefined;
13
- } & TextProps & Partial<import("@tecsinapse/react-core").ThemeProviderProps> & {
14
- ref?: import("react").Ref<RNText> | undefined;
15
- } & {
16
- children?: import("react").ReactNode;
17
- } & {
18
- theme?: import("@emotion/react").Theme | undefined;
19
- as?: import("react").ElementType<any> | undefined;
20
- }, {}, {}>;
6
+ export declare const StyledColoredText: import("@emotion/native").StyledComponent<any, {}, {}>;