@tecsinapse/react-native-kit 1.20.0 → 1.22.0-beta.13

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 (415) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/components/atoms/Avatar/Avatar.d.ts +2 -1
  3. package/dist/components/atoms/Avatar/Avatar.js +34 -20
  4. package/dist/components/atoms/Avatar/Avatar.js.map +1 -1
  5. package/dist/components/atoms/Avatar/index.d.ts +1 -1
  6. package/dist/components/atoms/Badge/Badge.js +58 -29
  7. package/dist/components/atoms/Badge/Badge.js.map +1 -1
  8. package/dist/components/atoms/Badge/index.d.ts +2 -1
  9. package/dist/components/atoms/BottomNavigator/BottomNavigator.js +71 -39
  10. package/dist/components/atoms/BottomNavigator/BottomNavigator.js.map +1 -1
  11. package/dist/components/atoms/BottomNavigator/Item.js +68 -31
  12. package/dist/components/atoms/BottomNavigator/Item.js.map +1 -1
  13. package/dist/components/atoms/BottomNavigator/index.d.ts +3 -2
  14. package/dist/components/atoms/BottomNavigator/styled.js +25 -42
  15. package/dist/components/atoms/BottomNavigator/styled.js.map +1 -1
  16. package/dist/components/atoms/Button/Button.js +55 -23
  17. package/dist/components/atoms/Button/Button.js.map +1 -1
  18. package/dist/components/atoms/Button/States/Error.d.ts +1 -1
  19. package/dist/components/atoms/Button/States/Error.js +34 -22
  20. package/dist/components/atoms/Button/States/Error.js.map +1 -1
  21. package/dist/components/atoms/Button/States/Loading.d.ts +1 -1
  22. package/dist/components/atoms/Button/States/Loading.js +34 -22
  23. package/dist/components/atoms/Button/States/Loading.js.map +1 -1
  24. package/dist/components/atoms/Button/States/Success.d.ts +1 -1
  25. package/dist/components/atoms/Button/States/Success.js +34 -22
  26. package/dist/components/atoms/Button/States/Success.js.map +1 -1
  27. package/dist/components/atoms/Button/index.d.ts +2 -1
  28. package/dist/components/atoms/GroupButton/GroupButtonOption.js +34 -21
  29. package/dist/components/atoms/GroupButton/GroupButtonOption.js.map +1 -1
  30. package/dist/components/atoms/Header/Header.js +75 -32
  31. package/dist/components/atoms/Header/Header.js.map +1 -1
  32. package/dist/components/atoms/Header/index.d.ts +2 -1
  33. package/dist/components/atoms/Header/styled.js +14 -15
  34. package/dist/components/atoms/Header/styled.js.map +1 -1
  35. package/dist/components/atoms/Input/Input.js +133 -89
  36. package/dist/components/atoms/Input/Input.js.map +1 -1
  37. package/dist/components/atoms/Input/index.d.ts +2 -1
  38. package/dist/components/atoms/Input/styled.js +12 -14
  39. package/dist/components/atoms/Input/styled.js.map +1 -1
  40. package/dist/components/atoms/InputMask/InputMask.js +135 -87
  41. package/dist/components/atoms/InputMask/InputMask.js.map +1 -1
  42. package/dist/components/atoms/InputMask/index.d.ts +2 -1
  43. package/dist/components/atoms/InputMask/styled.js +15 -17
  44. package/dist/components/atoms/InputMask/styled.js.map +1 -1
  45. package/dist/components/atoms/Modal/ModalGroupManager.js +47 -29
  46. package/dist/components/atoms/Modal/ModalGroupManager.js.map +1 -1
  47. package/dist/components/atoms/Modal/ModalLifecycleHandler.js +94 -87
  48. package/dist/components/atoms/Modal/ModalLifecycleHandler.js.map +1 -1
  49. package/dist/components/atoms/Modal/ui/BaseModalView.js +106 -105
  50. package/dist/components/atoms/Modal/ui/BaseModalView.js.map +1 -1
  51. package/dist/components/atoms/Modal/ui/styled.js +19 -21
  52. package/dist/components/atoms/Modal/ui/styled.js.map +1 -1
  53. package/dist/components/atoms/Modal/useLazyModalManager.js +22 -23
  54. package/dist/components/atoms/Modal/useLazyModalManager.js.map +1 -1
  55. package/dist/components/atoms/Modal/useModalManager.js +14 -19
  56. package/dist/components/atoms/Modal/useModalManager.js.map +1 -1
  57. package/dist/components/atoms/Modal/useModalRemoteControl.js +10 -12
  58. package/dist/components/atoms/Modal/useModalRemoteControl.js.map +1 -1
  59. package/dist/components/atoms/Skeleton/Pulse.js +20 -22
  60. package/dist/components/atoms/Skeleton/Pulse.js.map +1 -1
  61. package/dist/components/atoms/Skeleton/Skeleton.js +77 -55
  62. package/dist/components/atoms/Skeleton/Skeleton.js.map +1 -1
  63. package/dist/components/atoms/Skeleton/Wave.js +36 -40
  64. package/dist/components/atoms/Skeleton/Wave.js.map +1 -1
  65. package/dist/components/atoms/Skeleton/animation.js +29 -29
  66. package/dist/components/atoms/Skeleton/animation.js.map +1 -1
  67. package/dist/components/atoms/Skeleton/index.d.ts +2 -1
  68. package/dist/components/atoms/Skeleton/styled.js +12 -18
  69. package/dist/components/atoms/Skeleton/styled.js.map +1 -1
  70. package/dist/components/atoms/SnappingSlider/SnappingSlider.js +76 -36
  71. package/dist/components/atoms/SnappingSlider/SnappingSlider.js.map +1 -1
  72. package/dist/components/atoms/SnappingSlider/index.d.ts +2 -1
  73. package/dist/components/atoms/Tag/Tag.js +45 -25
  74. package/dist/components/atoms/Tag/Tag.js.map +1 -1
  75. package/dist/components/atoms/Tag/index.d.ts +2 -1
  76. package/dist/components/atoms/Text/Text.js +38 -15
  77. package/dist/components/atoms/Text/Text.js.map +1 -1
  78. package/dist/components/atoms/Text/index.d.ts +2 -1
  79. package/dist/components/atoms/Text/styled.js +16 -19
  80. package/dist/components/atoms/Text/styled.js.map +1 -1
  81. package/dist/components/atoms/TextArea/TextArea.js +122 -74
  82. package/dist/components/atoms/TextArea/TextArea.js.map +1 -1
  83. package/dist/components/atoms/TextArea/index.d.ts +2 -1
  84. package/dist/components/atoms/TextArea/styled.js +9 -9
  85. package/dist/components/atoms/TextArea/styled.js.map +1 -1
  86. package/dist/components/molecules/Calendar/Calendar.js +54 -25
  87. package/dist/components/molecules/Calendar/Calendar.js.map +1 -1
  88. package/dist/components/molecules/DatePicker/DatePicker.js +67 -42
  89. package/dist/components/molecules/DatePicker/DatePicker.js.map +1 -1
  90. package/dist/components/molecules/DatePicker/index.d.ts +2 -1
  91. package/dist/components/molecules/DatePicker/styled.js +10 -11
  92. package/dist/components/molecules/DatePicker/styled.js.map +1 -1
  93. package/dist/components/molecules/DateTimePicker/DateTimePicker.js +61 -34
  94. package/dist/components/molecules/DateTimePicker/DateTimePicker.js.map +1 -1
  95. package/dist/components/molecules/DateTimePicker/index.d.ts +2 -1
  96. package/dist/components/molecules/DateTimeSelector/DateTimeSelector.js +54 -25
  97. package/dist/components/molecules/DateTimeSelector/DateTimeSelector.js.map +1 -1
  98. package/dist/components/molecules/Grid/Grid.js +79 -42
  99. package/dist/components/molecules/Grid/Grid.js.map +1 -1
  100. package/dist/components/molecules/Grid/Item/Item.js +90 -56
  101. package/dist/components/molecules/Grid/Item/Item.js.map +1 -1
  102. package/dist/components/molecules/IconTextButton/IconTextButton.js +70 -42
  103. package/dist/components/molecules/IconTextButton/IconTextButton.js.map +1 -1
  104. package/dist/components/molecules/IconTextButton/TextComponent.js +38 -26
  105. package/dist/components/molecules/IconTextButton/TextComponent.js.map +1 -1
  106. package/dist/components/molecules/IconTextButton/index.d.ts +2 -1
  107. package/dist/components/molecules/IconTextButton/styled.js +22 -31
  108. package/dist/components/molecules/IconTextButton/styled.js.map +1 -1
  109. package/dist/components/molecules/InputPassword/InputPassword.js +60 -37
  110. package/dist/components/molecules/InputPassword/InputPassword.js.map +1 -1
  111. package/dist/components/molecules/InputPassword/index.d.ts +2 -1
  112. package/dist/components/molecules/LabeledSwitch/LabelComponent.js +58 -29
  113. package/dist/components/molecules/LabeledSwitch/LabelComponent.js.map +1 -1
  114. package/dist/components/molecules/LabeledSwitch/LabeledSwitch.js +70 -41
  115. package/dist/components/molecules/LabeledSwitch/LabeledSwitch.js.map +1 -1
  116. package/dist/components/molecules/LabeledSwitch/index.d.ts +2 -1
  117. package/dist/components/molecules/LabeledSwitch/styled.js +18 -20
  118. package/dist/components/molecules/LabeledSwitch/styled.js.map +1 -1
  119. package/dist/components/molecules/Select/Modal.js +206 -133
  120. package/dist/components/molecules/Select/Modal.js.map +1 -1
  121. package/dist/components/molecules/Select/Select.js +217 -135
  122. package/dist/components/molecules/Select/Select.js.map +1 -1
  123. package/dist/components/molecules/Select/index.d.ts +2 -1
  124. package/dist/components/molecules/Select/styled.js +54 -83
  125. package/dist/components/molecules/Select/styled.js.map +1 -1
  126. package/dist/components/molecules/Snackbar/Snackbar.d.ts +1 -1
  127. package/dist/components/molecules/Snackbar/Snackbar.js +52 -28
  128. package/dist/components/molecules/Snackbar/Snackbar.js.map +1 -1
  129. package/dist/components/molecules/Snackbar/index.d.ts +2 -1
  130. package/dist/components/molecules/Snackbar/styled.js +11 -14
  131. package/dist/components/molecules/Snackbar/styled.js.map +1 -1
  132. package/dist/index.d.ts +38 -19
  133. package/dist/index.js +80 -191
  134. package/dist/index.js.map +1 -1
  135. package/dist/utils/date.js +31 -19
  136. package/dist/utils/date.js.map +1 -1
  137. package/esm/components/atoms/Avatar/Avatar.d.ts +4 -0
  138. package/esm/components/atoms/Avatar/Avatar.js +31 -0
  139. package/esm/components/atoms/Avatar/Avatar.js.map +1 -0
  140. package/esm/components/atoms/Avatar/index.d.ts +1 -0
  141. package/esm/components/atoms/Badge/Badge.d.ts +8 -0
  142. package/esm/components/atoms/Badge/Badge.js +56 -0
  143. package/esm/components/atoms/Badge/Badge.js.map +1 -0
  144. package/esm/components/atoms/Badge/index.d.ts +2 -0
  145. package/esm/components/atoms/BottomNavigator/BottomNavigator.d.ts +13 -0
  146. package/esm/components/atoms/BottomNavigator/BottomNavigator.js +61 -0
  147. package/esm/components/atoms/BottomNavigator/BottomNavigator.js.map +1 -0
  148. package/esm/components/atoms/BottomNavigator/Item.d.ts +19 -0
  149. package/esm/components/atoms/BottomNavigator/Item.js +58 -0
  150. package/esm/components/atoms/BottomNavigator/Item.js.map +1 -0
  151. package/esm/components/atoms/BottomNavigator/index.d.ts +3 -0
  152. package/esm/components/atoms/BottomNavigator/styled.d.ts +11 -0
  153. package/esm/components/atoms/BottomNavigator/styled.js +31 -0
  154. package/esm/components/atoms/BottomNavigator/styled.js.map +1 -0
  155. package/esm/components/atoms/Button/Button.d.ts +6 -0
  156. package/esm/components/atoms/Button/Button.js +57 -0
  157. package/esm/components/atoms/Button/Button.js.map +1 -0
  158. package/esm/components/atoms/Button/States/Error.d.ts +4 -0
  159. package/esm/components/atoms/Button/States/Error.js +31 -0
  160. package/esm/components/atoms/Button/States/Error.js.map +1 -0
  161. package/esm/components/atoms/Button/States/Loading.d.ts +4 -0
  162. package/esm/components/atoms/Button/States/Loading.js +31 -0
  163. package/esm/components/atoms/Button/States/Loading.js.map +1 -0
  164. package/esm/components/atoms/Button/States/Success.d.ts +4 -0
  165. package/esm/components/atoms/Button/States/Success.js +31 -0
  166. package/esm/components/atoms/Button/States/Success.js.map +1 -0
  167. package/esm/components/atoms/Button/States/index.d.ts +3 -0
  168. package/esm/components/atoms/Button/index.d.ts +3 -0
  169. package/esm/components/atoms/GroupButton/GroupButtonOption.d.ts +2 -0
  170. package/esm/components/atoms/GroupButton/GroupButtonOption.js +31 -0
  171. package/esm/components/atoms/GroupButton/GroupButtonOption.js.map +1 -0
  172. package/esm/components/atoms/GroupButton/index.d.ts +1 -0
  173. package/esm/components/atoms/Header/Header.d.ts +12 -0
  174. package/esm/components/atoms/Header/Header.js +62 -0
  175. package/esm/components/atoms/Header/Header.js.map +1 -0
  176. package/esm/components/atoms/Header/index.d.ts +2 -0
  177. package/esm/components/atoms/Header/styled.d.ts +8 -0
  178. package/esm/components/atoms/Header/styled.js +19 -0
  179. package/esm/components/atoms/Header/styled.js.map +1 -0
  180. package/esm/components/atoms/Input/Input.d.ts +9 -0
  181. package/esm/components/atoms/Input/Input.js +133 -0
  182. package/esm/components/atoms/Input/Input.js.map +1 -0
  183. package/esm/components/atoms/Input/index.d.ts +2 -0
  184. package/esm/components/atoms/Input/styled.d.ts +1 -0
  185. package/esm/components/atoms/Input/styled.js +13 -0
  186. package/esm/components/atoms/Input/styled.js.map +1 -0
  187. package/esm/components/atoms/InputMask/InputMask.d.ts +8 -0
  188. package/esm/components/atoms/InputMask/InputMask.js +134 -0
  189. package/esm/components/atoms/InputMask/InputMask.js.map +1 -0
  190. package/esm/components/atoms/InputMask/index.d.ts +2 -0
  191. package/esm/components/atoms/InputMask/styled.d.ts +5 -0
  192. package/esm/components/atoms/InputMask/styled.js +16 -0
  193. package/esm/components/atoms/InputMask/styled.js.map +1 -0
  194. package/esm/components/atoms/Modal/ModalGroupManager.d.ts +4 -0
  195. package/esm/components/atoms/Modal/ModalGroupManager.js +48 -0
  196. package/esm/components/atoms/Modal/ModalGroupManager.js.map +1 -0
  197. package/esm/components/atoms/Modal/ModalLifecycleHandler.d.ts +24 -0
  198. package/esm/components/atoms/Modal/ModalLifecycleHandler.js +101 -0
  199. package/esm/components/atoms/Modal/ModalLifecycleHandler.js.map +1 -0
  200. package/esm/components/atoms/Modal/index.d.ts +7 -0
  201. package/esm/components/atoms/Modal/ui/BaseModalView.d.ts +3 -0
  202. package/esm/components/atoms/Modal/ui/BaseModalView.js +143 -0
  203. package/esm/components/atoms/Modal/ui/BaseModalView.js.map +1 -0
  204. package/esm/components/atoms/Modal/ui/styled.d.ts +6 -0
  205. package/esm/components/atoms/Modal/ui/styled.js +24 -0
  206. package/esm/components/atoms/Modal/ui/styled.js.map +1 -0
  207. package/esm/components/atoms/Modal/ui/types.d.ts +10 -0
  208. package/esm/components/atoms/Modal/useLazyModalManager.d.ts +8 -0
  209. package/esm/components/atoms/Modal/useLazyModalManager.js +33 -0
  210. package/esm/components/atoms/Modal/useLazyModalManager.js.map +1 -0
  211. package/esm/components/atoms/Modal/useModalManager.d.ts +6 -0
  212. package/esm/components/atoms/Modal/useModalManager.js +24 -0
  213. package/esm/components/atoms/Modal/useModalManager.js.map +1 -0
  214. package/esm/components/atoms/Modal/useModalRemoteControl.d.ts +4 -0
  215. package/esm/components/atoms/Modal/useModalRemoteControl.js +18 -0
  216. package/esm/components/atoms/Modal/useModalRemoteControl.js.map +1 -0
  217. package/esm/components/atoms/Skeleton/Pulse.d.ts +2 -0
  218. package/esm/components/atoms/Skeleton/Pulse.js +32 -0
  219. package/esm/components/atoms/Skeleton/Pulse.js.map +1 -0
  220. package/esm/components/atoms/Skeleton/Skeleton.d.ts +12 -0
  221. package/esm/components/atoms/Skeleton/Skeleton.js +87 -0
  222. package/esm/components/atoms/Skeleton/Skeleton.js.map +1 -0
  223. package/esm/components/atoms/Skeleton/Wave.d.ts +2 -0
  224. package/esm/components/atoms/Skeleton/Wave.js +50 -0
  225. package/esm/components/atoms/Skeleton/Wave.js.map +1 -0
  226. package/esm/components/atoms/Skeleton/animation.d.ts +3 -0
  227. package/esm/components/atoms/Skeleton/animation.js +45 -0
  228. package/esm/components/atoms/Skeleton/animation.js.map +1 -0
  229. package/esm/components/atoms/Skeleton/index.d.ts +2 -0
  230. package/esm/components/atoms/Skeleton/styled.d.ts +7 -0
  231. package/esm/components/atoms/Skeleton/styled.js +13 -0
  232. package/esm/components/atoms/Skeleton/styled.js.map +1 -0
  233. package/esm/components/atoms/Skeleton/types.d.ts +12 -0
  234. package/esm/components/atoms/SnappingSlider/SnappingSlider.d.ts +10 -0
  235. package/esm/components/atoms/SnappingSlider/SnappingSlider.js +79 -0
  236. package/esm/components/atoms/SnappingSlider/SnappingSlider.js.map +1 -0
  237. package/esm/components/atoms/SnappingSlider/index.d.ts +2 -0
  238. package/esm/components/atoms/Tag/Tag.d.ts +7 -0
  239. package/esm/components/atoms/Tag/Tag.js +47 -0
  240. package/esm/components/atoms/Tag/Tag.js.map +1 -0
  241. package/esm/components/atoms/Tag/index.d.ts +2 -0
  242. package/esm/components/atoms/Text/Text.d.ts +5 -0
  243. package/esm/components/atoms/Text/Text.js +38 -0
  244. package/esm/components/atoms/Text/Text.js.map +1 -0
  245. package/esm/components/atoms/Text/index.d.ts +2 -0
  246. package/esm/components/atoms/Text/styled.d.ts +10 -0
  247. package/esm/components/atoms/Text/styled.js +20 -0
  248. package/esm/components/atoms/Text/styled.js.map +1 -0
  249. package/esm/components/atoms/TextArea/TextArea.d.ts +5 -0
  250. package/esm/components/atoms/TextArea/TextArea.js +129 -0
  251. package/esm/components/atoms/TextArea/TextArea.js.map +1 -0
  252. package/esm/components/atoms/TextArea/index.d.ts +2 -0
  253. package/esm/components/atoms/TextArea/styled.d.ts +4 -0
  254. package/esm/components/atoms/TextArea/styled.js +8 -0
  255. package/esm/components/atoms/TextArea/styled.js.map +1 -0
  256. package/esm/components/molecules/Calendar/Calendar.d.ts +1 -0
  257. package/esm/components/molecules/Calendar/Calendar.js +50 -0
  258. package/esm/components/molecules/Calendar/Calendar.js.map +1 -0
  259. package/esm/components/molecules/Calendar/index.d.ts +1 -0
  260. package/esm/components/molecules/DatePicker/DatePicker.d.ts +3 -0
  261. package/esm/components/molecules/DatePicker/DatePicker.js +76 -0
  262. package/esm/components/molecules/DatePicker/DatePicker.js.map +1 -0
  263. package/esm/components/molecules/DatePicker/index.d.ts +2 -0
  264. package/esm/components/molecules/DatePicker/styled.d.ts +4 -0
  265. package/esm/components/molecules/DatePicker/styled.js +9 -0
  266. package/esm/components/molecules/DatePicker/styled.js.map +1 -0
  267. package/esm/components/molecules/DateTimePicker/DateTimePicker.d.ts +4 -0
  268. package/esm/components/molecules/DateTimePicker/DateTimePicker.js +66 -0
  269. package/esm/components/molecules/DateTimePicker/DateTimePicker.js.map +1 -0
  270. package/esm/components/molecules/DateTimePicker/index.d.ts +2 -0
  271. package/esm/components/molecules/DateTimeSelector/DateTimeSelector.d.ts +3 -0
  272. package/esm/components/molecules/DateTimeSelector/DateTimeSelector.js +50 -0
  273. package/esm/components/molecules/DateTimeSelector/DateTimeSelector.js.map +1 -0
  274. package/esm/components/molecules/DateTimeSelector/index.d.ts +1 -0
  275. package/esm/components/molecules/Grid/Grid.d.ts +5 -0
  276. package/esm/components/molecules/Grid/Grid.js +88 -0
  277. package/esm/components/molecules/Grid/Grid.js.map +1 -0
  278. package/esm/components/molecules/Grid/Item/Item.d.ts +7 -0
  279. package/esm/components/molecules/Grid/Item/Item.js +106 -0
  280. package/esm/components/molecules/Grid/Item/Item.js.map +1 -0
  281. package/esm/components/molecules/Grid/Item/index.d.ts +1 -0
  282. package/esm/components/molecules/Grid/index.d.ts +2 -0
  283. package/esm/components/molecules/IconTextButton/IconTextButton.d.ts +6 -0
  284. package/esm/components/molecules/IconTextButton/IconTextButton.js +72 -0
  285. package/esm/components/molecules/IconTextButton/IconTextButton.js.map +1 -0
  286. package/esm/components/molecules/IconTextButton/TextComponent.d.ts +12 -0
  287. package/esm/components/molecules/IconTextButton/TextComponent.js +40 -0
  288. package/esm/components/molecules/IconTextButton/TextComponent.js.map +1 -0
  289. package/esm/components/molecules/IconTextButton/index.d.ts +2 -0
  290. package/esm/components/molecules/IconTextButton/styled.d.ts +2 -0
  291. package/esm/components/molecules/IconTextButton/styled.js +28 -0
  292. package/esm/components/molecules/IconTextButton/styled.js.map +1 -0
  293. package/esm/components/molecules/InputPassword/InputPassword.d.ts +6 -0
  294. package/esm/components/molecules/InputPassword/InputPassword.js +54 -0
  295. package/esm/components/molecules/InputPassword/InputPassword.js.map +1 -0
  296. package/esm/components/molecules/InputPassword/index.d.ts +2 -0
  297. package/esm/components/molecules/LabeledSwitch/LabelComponent.d.ts +13 -0
  298. package/esm/components/molecules/LabeledSwitch/LabelComponent.js +59 -0
  299. package/esm/components/molecules/LabeledSwitch/LabelComponent.js.map +1 -0
  300. package/esm/components/molecules/LabeledSwitch/LabeledSwitch.d.ts +8 -0
  301. package/esm/components/molecules/LabeledSwitch/LabeledSwitch.js +76 -0
  302. package/esm/components/molecules/LabeledSwitch/LabeledSwitch.js.map +1 -0
  303. package/esm/components/molecules/LabeledSwitch/index.d.ts +2 -0
  304. package/esm/components/molecules/LabeledSwitch/styled.d.ts +9 -0
  305. package/esm/components/molecules/LabeledSwitch/styled.js +24 -0
  306. package/esm/components/molecules/LabeledSwitch/styled.js.map +1 -0
  307. package/esm/components/molecules/Select/Modal.d.ts +7 -0
  308. package/esm/components/molecules/Select/Modal.js +230 -0
  309. package/esm/components/molecules/Select/Modal.js.map +1 -0
  310. package/esm/components/molecules/Select/Select.d.ts +24 -0
  311. package/esm/components/molecules/Select/Select.js +240 -0
  312. package/esm/components/molecules/Select/Select.js.map +1 -0
  313. package/esm/components/molecules/Select/index.d.ts +2 -0
  314. package/esm/components/molecules/Select/styled.d.ts +41 -0
  315. package/esm/components/molecules/Select/styled.js +78 -0
  316. package/esm/components/molecules/Select/styled.js.map +1 -0
  317. package/esm/components/molecules/Snackbar/Snackbar.d.ts +9 -0
  318. package/esm/components/molecules/Snackbar/Snackbar.js +51 -0
  319. package/esm/components/molecules/Snackbar/Snackbar.js.map +1 -0
  320. package/esm/components/molecules/Snackbar/index.d.ts +2 -0
  321. package/esm/components/molecules/Snackbar/styled.d.ts +4 -0
  322. package/esm/components/molecules/Snackbar/styled.js +10 -0
  323. package/esm/components/molecules/Snackbar/styled.js.map +1 -0
  324. package/esm/index.d.ts +44 -0
  325. package/esm/index.js +35 -0
  326. package/esm/index.js.map +1 -0
  327. package/esm/utils/date.d.ts +1 -0
  328. package/esm/utils/date.js +16 -0
  329. package/esm/utils/date.js.map +1 -0
  330. package/package.json +8 -5
  331. package/rollup.config.js +39 -0
  332. package/src/components/atoms/Avatar/Avatar.tsx +3 -1
  333. package/src/components/atoms/Avatar/index.ts +1 -1
  334. package/src/components/atoms/Badge/index.ts +2 -1
  335. package/src/components/atoms/BottomNavigator/index.ts +3 -5
  336. package/src/components/atoms/Button/States/Error.tsx +1 -1
  337. package/src/components/atoms/Button/States/Loading.tsx +1 -1
  338. package/src/components/atoms/Button/States/Success.tsx +1 -1
  339. package/src/components/atoms/Button/index.ts +2 -1
  340. package/src/components/atoms/Header/index.ts +2 -1
  341. package/src/components/atoms/Input/index.ts +2 -1
  342. package/src/components/atoms/InputMask/index.ts +2 -1
  343. package/src/components/atoms/Skeleton/index.ts +2 -1
  344. package/src/components/atoms/SnappingSlider/index.ts +2 -4
  345. package/src/components/atoms/Tag/index.ts +2 -1
  346. package/src/components/atoms/Text/index.ts +2 -1
  347. package/src/components/atoms/TextArea/index.ts +2 -1
  348. package/src/components/molecules/DatePicker/index.ts +2 -1
  349. package/src/components/molecules/DateTimePicker/index.ts +2 -1
  350. package/src/components/molecules/IconTextButton/index.ts +2 -4
  351. package/src/components/molecules/InputPassword/index.ts +2 -4
  352. package/src/components/molecules/LabeledSwitch/index.ts +2 -4
  353. package/src/components/molecules/Select/Modal.tsx +1 -1
  354. package/src/components/molecules/Select/Select.tsx +3 -2
  355. package/src/components/molecules/Select/index.ts +2 -1
  356. package/src/components/molecules/Snackbar/Snackbar.tsx +1 -1
  357. package/src/components/molecules/Snackbar/index.ts +2 -1
  358. package/src/index.ts +37 -46
  359. package/tsconfig.build.esm.json +10 -0
  360. package/dist/components/atoms/Avatar/index.js +0 -9
  361. package/dist/components/atoms/Avatar/index.js.map +0 -1
  362. package/dist/components/atoms/Badge/index.js +0 -14
  363. package/dist/components/atoms/Badge/index.js.map +0 -1
  364. package/dist/components/atoms/BottomNavigator/index.js +0 -18
  365. package/dist/components/atoms/BottomNavigator/index.js.map +0 -1
  366. package/dist/components/atoms/Button/States/index.js +0 -19
  367. package/dist/components/atoms/Button/States/index.js.map +0 -1
  368. package/dist/components/atoms/Button/index.js +0 -16
  369. package/dist/components/atoms/Button/index.js.map +0 -1
  370. package/dist/components/atoms/GroupButton/index.js +0 -11
  371. package/dist/components/atoms/GroupButton/index.js.map +0 -1
  372. package/dist/components/atoms/Header/index.js +0 -14
  373. package/dist/components/atoms/Header/index.js.map +0 -1
  374. package/dist/components/atoms/Input/index.js +0 -14
  375. package/dist/components/atoms/Input/index.js.map +0 -1
  376. package/dist/components/atoms/InputMask/index.js +0 -14
  377. package/dist/components/atoms/InputMask/index.js.map +0 -1
  378. package/dist/components/atoms/Modal/index.js +0 -60
  379. package/dist/components/atoms/Modal/index.js.map +0 -1
  380. package/dist/components/atoms/Modal/ui/types.js +0 -4
  381. package/dist/components/atoms/Modal/ui/types.js.map +0 -1
  382. package/dist/components/atoms/Skeleton/index.js +0 -14
  383. package/dist/components/atoms/Skeleton/index.js.map +0 -1
  384. package/dist/components/atoms/Skeleton/types.js +0 -4
  385. package/dist/components/atoms/Skeleton/types.js.map +0 -1
  386. package/dist/components/atoms/SnappingSlider/index.js +0 -14
  387. package/dist/components/atoms/SnappingSlider/index.js.map +0 -1
  388. package/dist/components/atoms/Tag/index.js +0 -14
  389. package/dist/components/atoms/Tag/index.js.map +0 -1
  390. package/dist/components/atoms/Text/index.js +0 -14
  391. package/dist/components/atoms/Text/index.js.map +0 -1
  392. package/dist/components/atoms/TextArea/index.js +0 -14
  393. package/dist/components/atoms/TextArea/index.js.map +0 -1
  394. package/dist/components/molecules/Calendar/index.js +0 -9
  395. package/dist/components/molecules/Calendar/index.js.map +0 -1
  396. package/dist/components/molecules/DatePicker/index.js +0 -10
  397. package/dist/components/molecules/DatePicker/index.js.map +0 -1
  398. package/dist/components/molecules/DateTimePicker/index.js +0 -10
  399. package/dist/components/molecules/DateTimePicker/index.js.map +0 -1
  400. package/dist/components/molecules/DateTimeSelector/index.js +0 -9
  401. package/dist/components/molecules/DateTimeSelector/index.js.map +0 -1
  402. package/dist/components/molecules/Grid/Item/index.js +0 -14
  403. package/dist/components/molecules/Grid/Item/index.js.map +0 -1
  404. package/dist/components/molecules/Grid/index.js +0 -15
  405. package/dist/components/molecules/Grid/index.js.map +0 -1
  406. package/dist/components/molecules/IconTextButton/index.js +0 -14
  407. package/dist/components/molecules/IconTextButton/index.js.map +0 -1
  408. package/dist/components/molecules/InputPassword/index.js +0 -14
  409. package/dist/components/molecules/InputPassword/index.js.map +0 -1
  410. package/dist/components/molecules/LabeledSwitch/index.js +0 -14
  411. package/dist/components/molecules/LabeledSwitch/index.js.map +0 -1
  412. package/dist/components/molecules/Select/index.js +0 -14
  413. package/dist/components/molecules/Select/index.js.map +0 -1
  414. package/dist/components/molecules/Snackbar/index.js +0 -14
  415. package/dist/components/molecules/Snackbar/index.js.map +0 -1
@@ -0,0 +1,33 @@
1
+ import { useState, useCallback, useEffect } from 'react';
2
+ import { v4 } from 'uuid';
3
+ import { modalLifecycle } from './ModalGroupManager.js';
4
+
5
+ const useLazyModalManager = (modalId) => {
6
+ const [id] = useState(modalId != null ? modalId : v4());
7
+ const requestUpdate = useCallback(() => modalLifecycle.update(), []);
8
+ const sync = useCallback(
9
+ (modal) => {
10
+ modalLifecycle.sync(id, () => modal);
11
+ return null;
12
+ },
13
+ [id]
14
+ );
15
+ const show = useCallback(() => {
16
+ modalLifecycle.show(id);
17
+ }, [id]);
18
+ const close = useCallback(() => {
19
+ modalLifecycle.close(id);
20
+ }, [id]);
21
+ useEffect(() => {
22
+ return () => modalLifecycle.destroy(id);
23
+ }, []);
24
+ return {
25
+ requestUpdate,
26
+ sync,
27
+ show,
28
+ close
29
+ };
30
+ };
31
+
32
+ export { useLazyModalManager };
33
+ //# sourceMappingURL=useLazyModalManager.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useLazyModalManager.js","sources":["../../../../src/components/atoms/Modal/useLazyModalManager.ts"],"sourcesContent":["import { ReactElement, useCallback, useEffect, useState } from 'react';\nimport { v4 as uuidv4 } from 'uuid';\nimport { modalLifecycle } from './ModalGroupManager';\nimport { IBaseModal } from './ui/types';\n\n/**\n * Use this hook to tell the modal lifecycle handler that you want to add\n * a new modal component.\n *\n * @returns\n * @param modalId\n */\nexport const useLazyModalManager = (modalId?: string) => {\n const [id] = useState(modalId ?? uuidv4());\n\n const requestUpdate = useCallback(() => modalLifecycle.update(), []);\n\n const sync = useCallback(\n (modal: ReactElement<IBaseModal>) => {\n modalLifecycle.sync(id, () => modal);\n return null;\n },\n [id]\n );\n\n const show = useCallback(() => {\n modalLifecycle.show(id);\n }, [id]);\n\n const close = useCallback(() => {\n modalLifecycle.close(id);\n }, [id]);\n\n useEffect(() => {\n return () => modalLifecycle.destroy(id);\n }, []);\n\n return {\n requestUpdate,\n sync,\n show,\n close,\n };\n};\n"],"names":["uuidv4"],"mappings":";;;;AAYa,MAAA,mBAAA,GAAsB,CAAC,OAAqB,KAAA;AACvD,EAAA,MAAM,CAAC,EAAE,CAAA,GAAI,QAAS,CAAA,OAAA,IAAA,IAAA,GAAA,OAAA,GAAWA,IAAQ,CAAA,CAAA;AAEzC,EAAA,MAAM,gBAAgB,WAAY,CAAA,MAAM,eAAe,MAAO,EAAA,EAAG,EAAE,CAAA,CAAA;AAEnE,EAAA,MAAM,IAAO,GAAA,WAAA;AAAA,IACX,CAAC,KAAoC,KAAA;AACnC,MAAe,cAAA,CAAA,IAAA,CAAK,EAAI,EAAA,MAAM,KAAK,CAAA,CAAA;AACnC,MAAO,OAAA,IAAA,CAAA;AAAA,KACT;AAAA,IACA,CAAC,EAAE,CAAA;AAAA,GACL,CAAA;AAEA,EAAM,MAAA,IAAA,GAAO,YAAY,MAAM;AAC7B,IAAA,cAAA,CAAe,KAAK,EAAE,CAAA,CAAA;AAAA,GACxB,EAAG,CAAC,EAAE,CAAC,CAAA,CAAA;AAEP,EAAM,MAAA,KAAA,GAAQ,YAAY,MAAM;AAC9B,IAAA,cAAA,CAAe,MAAM,EAAE,CAAA,CAAA;AAAA,GACzB,EAAG,CAAC,EAAE,CAAC,CAAA,CAAA;AAEP,EAAA,SAAA,CAAU,MAAM;AACd,IAAO,OAAA,MAAM,cAAe,CAAA,OAAA,CAAQ,EAAE,CAAA,CAAA;AAAA,GACxC,EAAG,EAAE,CAAA,CAAA;AAEL,EAAO,OAAA;AAAA,IACL,aAAA;AAAA,IACA,IAAA;AAAA,IACA,IAAA;AAAA,IACA,KAAA;AAAA,GACF,CAAA;AACF;;;;"}
@@ -0,0 +1,6 @@
1
+ import { ReactElement } from 'react';
2
+ import { IBaseModal } from './ui/types';
3
+ export declare const useModalManager: (modal: () => ReactElement<IBaseModal>, modalId?: string | undefined) => {
4
+ show: () => void;
5
+ close: () => void;
6
+ };
@@ -0,0 +1,24 @@
1
+ import { useState, useCallback, useEffect } from 'react';
2
+ import { v4 } from 'uuid';
3
+ import { modalLifecycle } from './ModalGroupManager.js';
4
+
5
+ const useModalManager = (modal, modalId) => {
6
+ const [id] = useState(modalId != null ? modalId : v4());
7
+ modalLifecycle.sync(id, modal);
8
+ const show = useCallback(() => {
9
+ modalLifecycle.show(id);
10
+ }, [id]);
11
+ const close = useCallback(() => {
12
+ modalLifecycle.close(id);
13
+ }, [id]);
14
+ useEffect(() => {
15
+ return () => modalLifecycle.destroy(id);
16
+ }, []);
17
+ return {
18
+ show,
19
+ close
20
+ };
21
+ };
22
+
23
+ export { useModalManager };
24
+ //# sourceMappingURL=useModalManager.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useModalManager.js","sources":["../../../../src/components/atoms/Modal/useModalManager.ts"],"sourcesContent":["import { ReactElement, useCallback, useEffect, useState } from 'react';\nimport { v4 as uuidv4 } from 'uuid';\nimport { modalLifecycle } from './ModalGroupManager';\nimport { IBaseModal } from './ui/types';\n\n/**\n * Use this hook to tell the modal lifecycle handler that you want to add\n * a new modal component.\n *\n * @param id\n * @param modal\n * @returns\n */\nexport const useModalManager = (\n modal: () => ReactElement<IBaseModal>,\n modalId?: string\n) => {\n const [id] = useState(modalId ?? uuidv4());\n modalLifecycle.sync(id, modal);\n\n const show = useCallback(() => {\n modalLifecycle.show(id);\n }, [id]);\n\n const close = useCallback(() => {\n modalLifecycle.close(id);\n }, [id]);\n\n useEffect(() => {\n return () => modalLifecycle.destroy(id);\n }, []);\n\n return {\n show,\n close,\n };\n};\n"],"names":["uuidv4"],"mappings":";;;;AAaa,MAAA,eAAA,GAAkB,CAC7B,KAAA,EACA,OACG,KAAA;AACH,EAAA,MAAM,CAAC,EAAE,CAAA,GAAI,QAAS,CAAA,OAAA,IAAA,IAAA,GAAA,OAAA,GAAWA,IAAQ,CAAA,CAAA;AACzC,EAAe,cAAA,CAAA,IAAA,CAAK,IAAI,KAAK,CAAA,CAAA;AAE7B,EAAM,MAAA,IAAA,GAAO,YAAY,MAAM;AAC7B,IAAA,cAAA,CAAe,KAAK,EAAE,CAAA,CAAA;AAAA,GACxB,EAAG,CAAC,EAAE,CAAC,CAAA,CAAA;AAEP,EAAM,MAAA,KAAA,GAAQ,YAAY,MAAM;AAC9B,IAAA,cAAA,CAAe,MAAM,EAAE,CAAA,CAAA;AAAA,GACzB,EAAG,CAAC,EAAE,CAAC,CAAA,CAAA;AAEP,EAAA,SAAA,CAAU,MAAM;AACd,IAAO,OAAA,MAAM,cAAe,CAAA,OAAA,CAAQ,EAAE,CAAA,CAAA;AAAA,GACxC,EAAG,EAAE,CAAA,CAAA;AAEL,EAAO,OAAA;AAAA,IACL,IAAA;AAAA,IACA,KAAA;AAAA,GACF,CAAA;AACF;;;;"}
@@ -0,0 +1,4 @@
1
+ export declare const useModalRemoteControl: (modalId: string) => {
2
+ show: () => void;
3
+ close: () => void;
4
+ };
@@ -0,0 +1,18 @@
1
+ import { useCallback } from 'react';
2
+ import { modalLifecycle } from './ModalGroupManager.js';
3
+
4
+ const useModalRemoteControl = (modalId) => {
5
+ const show = useCallback(() => {
6
+ modalLifecycle.show(modalId);
7
+ }, [modalId]);
8
+ const close = useCallback(() => {
9
+ modalLifecycle.close(modalId);
10
+ }, [modalId]);
11
+ return {
12
+ show,
13
+ close
14
+ };
15
+ };
16
+
17
+ export { useModalRemoteControl };
18
+ //# sourceMappingURL=useModalRemoteControl.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useModalRemoteControl.js","sources":["../../../../src/components/atoms/Modal/useModalRemoteControl.ts"],"sourcesContent":["import { useCallback } from 'react';\nimport { modalLifecycle } from './ModalGroupManager';\n\n/**\n * Use it to control a specific modal wherever it's.\n * Just provide an id of a specific instance.\n *\n * @param modalId\n * @returns\n */\nexport const useModalRemoteControl = (modalId: string) => {\n const show = useCallback(() => {\n modalLifecycle.show(modalId);\n }, [modalId]);\n\n const close = useCallback(() => {\n modalLifecycle.close(modalId);\n }, [modalId]);\n\n return {\n show,\n close,\n };\n};\n"],"names":[],"mappings":";;;AAUa,MAAA,qBAAA,GAAwB,CAAC,OAAoB,KAAA;AACxD,EAAM,MAAA,IAAA,GAAO,YAAY,MAAM;AAC7B,IAAA,cAAA,CAAe,KAAK,OAAO,CAAA,CAAA;AAAA,GAC7B,EAAG,CAAC,OAAO,CAAC,CAAA,CAAA;AAEZ,EAAM,MAAA,KAAA,GAAQ,YAAY,MAAM;AAC9B,IAAA,cAAA,CAAe,MAAM,OAAO,CAAA,CAAA;AAAA,GAC9B,EAAG,CAAC,OAAO,CAAC,CAAA,CAAA;AAEZ,EAAO,OAAA;AAAA,IACL,IAAA;AAAA,IACA,KAAA;AAAA,GACF,CAAA;AACF;;;;"}
@@ -0,0 +1,2 @@
1
+ import { IAnimationComponent } from './types';
2
+ export declare const Pulse: ({ active, width, height, childrenLayout, }: IAnimationComponent) => JSX.Element;
@@ -0,0 +1,32 @@
1
+ import { Animated } from 'react-native';
2
+ import React__default, { useRef, useEffect } from 'react';
3
+ import { pulseAnimation } from './animation.js';
4
+
5
+ const Pulse = ({
6
+ active = true,
7
+ width,
8
+ height,
9
+ childrenLayout
10
+ }) => {
11
+ var _a, _b;
12
+ const animatedValue = useRef(new Animated.Value(0)).current;
13
+ useEffect(() => {
14
+ pulseAnimation(active, animatedValue);
15
+ }, [active]);
16
+ return /* @__PURE__ */ React__default.createElement(Animated.View, {
17
+ style: {
18
+ width: width != null ? width : childrenLayout.width,
19
+ height: height != null ? height : childrenLayout.height,
20
+ backgroundColor: "rgba(0,0,0,0.05)",
21
+ position: "absolute",
22
+ top: (_a = childrenLayout.x) != null ? _a : 0,
23
+ left: (_b = childrenLayout.y) != null ? _b : 0,
24
+ zIndex: 2,
25
+ overflow: "hidden",
26
+ opacity: animatedValue
27
+ }
28
+ });
29
+ };
30
+
31
+ export { Pulse };
32
+ //# sourceMappingURL=Pulse.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Pulse.js","sources":["../../../../src/components/atoms/Skeleton/Pulse.tsx"],"sourcesContent":["import { Animated } from 'react-native';\nimport React, { useEffect, useRef } from 'react';\nimport { pulseAnimation } from './animation';\nimport { IAnimationComponent } from './types';\n\nexport const Pulse = ({\n active = true,\n width,\n height,\n childrenLayout,\n}: IAnimationComponent) => {\n const animatedValue = useRef(new Animated.Value(0)).current;\n\n useEffect(() => {\n pulseAnimation(active, animatedValue);\n }, [active]);\n\n return (\n <Animated.View\n style={{\n width: width ?? childrenLayout.width,\n height: height ?? childrenLayout.height,\n backgroundColor: 'rgba(0,0,0,0.05)',\n position: 'absolute',\n top: childrenLayout.x ?? 0,\n left: childrenLayout.y ?? 0,\n zIndex: 2,\n overflow: 'hidden',\n opacity: animatedValue,\n }}\n />\n );\n};\n"],"names":["React"],"mappings":";;;;AAKO,MAAM,QAAQ,CAAC;AAAA,EACpB,MAAS,GAAA,IAAA;AAAA,EACT,KAAA;AAAA,EACA,MAAA;AAAA,EACA,cAAA;AACF,CAA2B,KAAA;AAV3B,EAAA,IAAA,EAAA,EAAA,EAAA,CAAA;AAWE,EAAA,MAAM,gBAAgB,MAAO,CAAA,IAAI,SAAS,KAAM,CAAA,CAAC,CAAC,CAAE,CAAA,OAAA,CAAA;AAEpD,EAAA,SAAA,CAAU,MAAM;AACd,IAAA,cAAA,CAAe,QAAQ,aAAa,CAAA,CAAA;AAAA,GACtC,EAAG,CAAC,MAAM,CAAC,CAAA,CAAA;AAEX,EACE,uBAAAA,cAAA,CAAA,aAAA,CAAC,SAAS,IAAT,EAAA;AAAA,IACC,KAAO,EAAA;AAAA,MACL,KAAA,EAAO,wBAAS,cAAe,CAAA,KAAA;AAAA,MAC/B,MAAA,EAAQ,0BAAU,cAAe,CAAA,MAAA;AAAA,MACjC,eAAiB,EAAA,kBAAA;AAAA,MACjB,QAAU,EAAA,UAAA;AAAA,MACV,GAAA,EAAA,CAAK,EAAe,GAAA,cAAA,CAAA,CAAA,KAAf,IAAoB,GAAA,EAAA,GAAA,CAAA;AAAA,MACzB,IAAA,EAAA,CAAM,EAAe,GAAA,cAAA,CAAA,CAAA,KAAf,IAAoB,GAAA,EAAA,GAAA,CAAA;AAAA,MAC1B,MAAQ,EAAA,CAAA;AAAA,MACR,QAAU,EAAA,QAAA;AAAA,MACV,OAAS,EAAA,aAAA;AAAA,KACX;AAAA,GACF,CAAA,CAAA;AAEJ;;;;"}
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ import { BorderRadiusType } from '@tecsinapse/react-core';
3
+ import { ViewProps } from 'react-native';
4
+ export interface SkeletonProps extends ViewProps {
5
+ width?: number;
6
+ height?: number;
7
+ radius?: BorderRadiusType;
8
+ active?: boolean;
9
+ animation?: 'wave' | 'pulse';
10
+ }
11
+ declare const Skeleton: React.FC<SkeletonProps>;
12
+ export default Skeleton;
@@ -0,0 +1,87 @@
1
+ import React__default, { useState } from 'react';
2
+ import { View } from 'react-native';
3
+ import { Wrapper } from './styled.js';
4
+ import { Wave } from './Wave.js';
5
+ import { Pulse } from './Pulse.js';
6
+
7
+ var __defProp = Object.defineProperty;
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 __objRest = (source, exclude) => {
24
+ var target = {};
25
+ for (var prop in source)
26
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
27
+ target[prop] = source[prop];
28
+ if (source != null && __getOwnPropSymbols)
29
+ for (var prop of __getOwnPropSymbols(source)) {
30
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
31
+ target[prop] = source[prop];
32
+ }
33
+ return target;
34
+ };
35
+ const Skeleton = (_a) => {
36
+ var _b = _a, {
37
+ children,
38
+ width,
39
+ height,
40
+ radius,
41
+ active = true,
42
+ animation = "wave"
43
+ } = _b, rest = __objRest(_b, [
44
+ "children",
45
+ "width",
46
+ "height",
47
+ "radius",
48
+ "active",
49
+ "animation"
50
+ ]);
51
+ const [childrenLayout, setChildrenLayout] = useState({
52
+ width: 0,
53
+ height: 0,
54
+ y: 0,
55
+ x: 0
56
+ });
57
+ if (!width && !height && !children) {
58
+ throw new Error(
59
+ "[Skeleton] You should provide children or specify width and height"
60
+ );
61
+ }
62
+ const getChildrenLayout = (event) => {
63
+ setChildrenLayout(event.nativeEvent.layout);
64
+ };
65
+ return /* @__PURE__ */ React__default.createElement(Wrapper, __spreadValues({
66
+ width,
67
+ height,
68
+ radius
69
+ }, rest), active && animation === "wave" ? /* @__PURE__ */ React__default.createElement(Wave, {
70
+ active,
71
+ width,
72
+ height,
73
+ childrenLayout
74
+ }) : /* @__PURE__ */ React__default.createElement(React__default.Fragment, null), active && animation === "pulse" ? /* @__PURE__ */ React__default.createElement(Pulse, {
75
+ active,
76
+ width,
77
+ height,
78
+ childrenLayout
79
+ }) : /* @__PURE__ */ React__default.createElement(React__default.Fragment, null), /* @__PURE__ */ React__default.createElement(View, {
80
+ onLayout: (event) => getChildrenLayout(event),
81
+ style: { opacity: active ? 0 : 1 },
82
+ pointerEvents: active ? "none" : "auto"
83
+ }, children));
84
+ };
85
+
86
+ export { Skeleton as default };
87
+ //# sourceMappingURL=Skeleton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Skeleton.js","sources":["../../../../src/components/atoms/Skeleton/Skeleton.tsx"],"sourcesContent":["import React, { useState } from 'react';\nimport { BorderRadiusType } from '@tecsinapse/react-core';\nimport { LayoutChangeEvent, View, ViewProps } from 'react-native';\nimport { Wrapper } from './styled';\nimport { Wave } from './Wave';\nimport { Pulse } from './Pulse';\nimport { ChildrenLayout } from './types';\n\nexport interface SkeletonProps extends ViewProps {\n width?: number;\n height?: number;\n radius?: BorderRadiusType;\n active?: boolean;\n animation?: 'wave' | 'pulse';\n}\n\nconst Skeleton: React.FC<SkeletonProps> = ({\n children,\n width,\n height,\n radius,\n active = true,\n animation = 'wave',\n ...rest\n}) => {\n const [childrenLayout, setChildrenLayout] = useState<ChildrenLayout>({\n width: 0,\n height: 0,\n y: 0,\n x: 0,\n });\n\n if (!width && !height && !children) {\n throw new Error(\n '[Skeleton] You should provide children or specify width and height'\n );\n }\n\n const getChildrenLayout = (event: LayoutChangeEvent) => {\n setChildrenLayout(event.nativeEvent.layout);\n };\n\n return (\n <Wrapper width={width} height={height} radius={radius} {...rest}>\n {active && animation === 'wave' ? (\n <Wave\n active={active}\n width={width}\n height={height}\n childrenLayout={childrenLayout}\n />\n ) : (\n <></>\n )}\n\n {active && animation === 'pulse' ? (\n <Pulse\n active={active}\n width={width}\n height={height}\n childrenLayout={childrenLayout}\n />\n ) : (\n <></>\n )}\n <View\n onLayout={event => getChildrenLayout(event)}\n style={{ opacity: active ? 0 : 1 }}\n pointerEvents={active ? 'none' : 'auto'}\n >\n {children}\n </View>\n </Wrapper>\n );\n};\n\nexport default Skeleton;\n"],"names":["React"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgBM,MAAA,QAAA,GAAoC,CAAC,EAQrC,KAAA;AARqC,EACzC,IAAA,EAAA,GAAA,EAAA,EAAA;AAAA,IAAA,QAAA;AAAA,IACA,KAAA;AAAA,IACA,MAAA;AAAA,IACA,MAAA;AAAA,IACA,MAAS,GAAA,IAAA;AAAA,IACT,SAAY,GAAA,MAAA;AAAA,GAtBd,GAgB2C,EAOtC,EAAA,IAAA,GAAA,SAAA,CAPsC,EAOtC,EAAA;AAAA,IANH,UAAA;AAAA,IACA,OAAA;AAAA,IACA,QAAA;AAAA,IACA,QAAA;AAAA,IACA,QAAA;AAAA,IACA,WAAA;AAAA,GAAA,CAAA,CAAA;AAGA,EAAA,MAAM,CAAC,cAAA,EAAgB,iBAAiB,CAAA,GAAI,QAAyB,CAAA;AAAA,IACnE,KAAO,EAAA,CAAA;AAAA,IACP,MAAQ,EAAA,CAAA;AAAA,IACR,CAAG,EAAA,CAAA;AAAA,IACH,CAAG,EAAA,CAAA;AAAA,GACJ,CAAA,CAAA;AAED,EAAA,IAAI,CAAC,KAAA,IAAS,CAAC,MAAA,IAAU,CAAC,QAAU,EAAA;AAClC,IAAA,MAAM,IAAI,KAAA;AAAA,MACR,oEAAA;AAAA,KACF,CAAA;AAAA,GACF;AAEA,EAAM,MAAA,iBAAA,GAAoB,CAAC,KAA6B,KAAA;AACtD,IAAkB,iBAAA,CAAA,KAAA,CAAM,YAAY,MAAM,CAAA,CAAA;AAAA,GAC5C,CAAA;AAEA,EAAA,uBACGA,cAAA,CAAA,aAAA,CAAA,OAAA,EAAA,cAAA,CAAA;AAAA,IAAQ,KAAA;AAAA,IAAc,MAAA;AAAA,IAAgB,MAAA;AAAA,GAAA,EAAoB,IACxD,CAAA,EAAA,MAAA,IAAU,SAAc,KAAA,MAAA,mBACtBA,cAAA,CAAA,aAAA,CAAA,IAAA,EAAA;AAAA,IACC,MAAA;AAAA,IACA,KAAA;AAAA,IACA,MAAA;AAAA,IACA,cAAA;AAAA,GACF,oBAEEA,cAAA,CAAA,aAAA,CAAAA,cAAA,CAAA,QAAA,EAAA,IAAA,CAAA,EAGH,MAAU,IAAA,SAAA,KAAc,0BACtBA,cAAA,CAAA,aAAA,CAAA,KAAA,EAAA;AAAA,IACC,MAAA;AAAA,IACA,KAAA;AAAA,IACA,MAAA;AAAA,IACA,cAAA;AAAA,GACF,CAAA,mBAEEA,cAAA,CAAA,aAAA,CAAAA,cAAA,CAAA,QAAA,EAAA,IAAA,CAAA,kBAEHA,cAAA,CAAA,aAAA,CAAA,IAAA,EAAA;AAAA,IACC,QAAA,EAAU,CAAS,KAAA,KAAA,iBAAA,CAAkB,KAAK,CAAA;AAAA,IAC1C,KAAO,EAAA,EAAE,OAAS,EAAA,MAAA,GAAS,IAAI,CAAE,EAAA;AAAA,IACjC,aAAA,EAAe,SAAS,MAAS,GAAA,MAAA;AAAA,GAAA,EAEhC,QACH,CACF,CAAA,CAAA;AAEJ;;;;"}
@@ -0,0 +1,2 @@
1
+ import { IAnimationComponent } from './types';
2
+ export declare const Wave: ({ active, width, height, childrenLayout, }: IAnimationComponent) => JSX.Element;
@@ -0,0 +1,50 @@
1
+ import React__default, { useRef, useEffect } from 'react';
2
+ import { Animated } from 'react-native';
3
+ import LinearGradient from 'react-native-linear-gradient';
4
+ import { waveAnimation } from './animation.js';
5
+
6
+ const AnimatedLinearGradient = Animated.createAnimatedComponent(LinearGradient);
7
+ const Wave = ({
8
+ active = true,
9
+ width,
10
+ height,
11
+ childrenLayout
12
+ }) => {
13
+ var _a, _b;
14
+ const range = width != null ? width : childrenLayout.width;
15
+ const animatedValue = useRef(new Animated.Value(0)).current;
16
+ const translateX = animatedValue.interpolate({
17
+ inputRange: [0, 1],
18
+ outputRange: [-range, range]
19
+ });
20
+ useEffect(() => {
21
+ waveAnimation(active, animatedValue);
22
+ }, [active]);
23
+ return /* @__PURE__ */ React__default.createElement(AnimatedLinearGradient, {
24
+ colors: [
25
+ "transparent",
26
+ "rgba(0,0,0,0.05)",
27
+ "rgba(0,0,0,0.1)",
28
+ "transparent"
29
+ ],
30
+ start: { x: 0, y: 0 },
31
+ end: { x: 1, y: 0 },
32
+ style: {
33
+ width: width != null ? width : childrenLayout.width,
34
+ height: height != null ? height : childrenLayout.height,
35
+ position: "absolute",
36
+ top: (_a = childrenLayout.y) != null ? _a : 0,
37
+ left: (_b = childrenLayout.x) != null ? _b : 0,
38
+ zIndex: 2,
39
+ overflow: "hidden",
40
+ transform: [
41
+ {
42
+ translateX
43
+ }
44
+ ]
45
+ }
46
+ });
47
+ };
48
+
49
+ export { Wave };
50
+ //# sourceMappingURL=Wave.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Wave.js","sources":["../../../../src/components/atoms/Skeleton/Wave.tsx"],"sourcesContent":["import React, { useEffect, useRef } from 'react';\nimport { Animated } from 'react-native';\nimport LinearGradient from 'react-native-linear-gradient';\nimport { waveAnimation } from './animation';\nimport { IAnimationComponent } from './types';\n\nconst AnimatedLinearGradient = Animated.createAnimatedComponent(LinearGradient);\n\nexport const Wave = ({\n active = true,\n width,\n height,\n childrenLayout,\n}: IAnimationComponent) => {\n const range = width ?? childrenLayout.width;\n const animatedValue = useRef(new Animated.Value(0)).current;\n\n const translateX = animatedValue.interpolate({\n inputRange: [0, 1],\n outputRange: [-range, range],\n });\n\n useEffect(() => {\n waveAnimation(active, animatedValue);\n }, [active]);\n\n return (\n <AnimatedLinearGradient\n colors={[\n 'transparent',\n 'rgba(0,0,0,0.05)',\n 'rgba(0,0,0,0.1)',\n 'transparent',\n ]}\n start={{ x: 0, y: 0 }}\n end={{ x: 1, y: 0 }}\n style={{\n width: width ?? childrenLayout.width,\n height: height ?? childrenLayout.height,\n position: 'absolute',\n top: childrenLayout.y ?? 0,\n left: childrenLayout.x ?? 0,\n zIndex: 2,\n overflow: 'hidden',\n transform: [\n {\n translateX: translateX,\n },\n ],\n }}\n />\n );\n};\n"],"names":["React"],"mappings":";;;;;AAMA,MAAM,sBAAA,GAAyB,QAAS,CAAA,uBAAA,CAAwB,cAAc,CAAA,CAAA;AAEvE,MAAM,OAAO,CAAC;AAAA,EACnB,MAAS,GAAA,IAAA;AAAA,EACT,KAAA;AAAA,EACA,MAAA;AAAA,EACA,cAAA;AACF,CAA2B,KAAA;AAb3B,EAAA,IAAA,EAAA,EAAA,EAAA,CAAA;AAcE,EAAM,MAAA,KAAA,GAAQ,wBAAS,cAAe,CAAA,KAAA,CAAA;AACtC,EAAA,MAAM,gBAAgB,MAAO,CAAA,IAAI,SAAS,KAAM,CAAA,CAAC,CAAC,CAAE,CAAA,OAAA,CAAA;AAEpD,EAAM,MAAA,UAAA,GAAa,cAAc,WAAY,CAAA;AAAA,IAC3C,UAAA,EAAY,CAAC,CAAA,EAAG,CAAC,CAAA;AAAA,IACjB,WAAa,EAAA,CAAC,CAAC,KAAA,EAAO,KAAK,CAAA;AAAA,GAC5B,CAAA,CAAA;AAED,EAAA,SAAA,CAAU,MAAM;AACd,IAAA,aAAA,CAAc,QAAQ,aAAa,CAAA,CAAA;AAAA,GACrC,EAAG,CAAC,MAAM,CAAC,CAAA,CAAA;AAEX,EAAA,uBACGA,cAAA,CAAA,aAAA,CAAA,sBAAA,EAAA;AAAA,IACC,MAAQ,EAAA;AAAA,MACN,aAAA;AAAA,MACA,kBAAA;AAAA,MACA,iBAAA;AAAA,MACA,aAAA;AAAA,KACF;AAAA,IACA,KAAO,EAAA,EAAE,CAAG,EAAA,CAAA,EAAG,GAAG,CAAE,EAAA;AAAA,IACpB,GAAK,EAAA,EAAE,CAAG,EAAA,CAAA,EAAG,GAAG,CAAE,EAAA;AAAA,IAClB,KAAO,EAAA;AAAA,MACL,KAAA,EAAO,wBAAS,cAAe,CAAA,KAAA;AAAA,MAC/B,MAAA,EAAQ,0BAAU,cAAe,CAAA,MAAA;AAAA,MACjC,QAAU,EAAA,UAAA;AAAA,MACV,GAAA,EAAA,CAAK,EAAe,GAAA,cAAA,CAAA,CAAA,KAAf,IAAoB,GAAA,EAAA,GAAA,CAAA;AAAA,MACzB,IAAA,EAAA,CAAM,EAAe,GAAA,cAAA,CAAA,CAAA,KAAf,IAAoB,GAAA,EAAA,GAAA,CAAA;AAAA,MAC1B,MAAQ,EAAA,CAAA;AAAA,MACR,QAAU,EAAA,QAAA;AAAA,MACV,SAAW,EAAA;AAAA,QACT;AAAA,UACE,UAAA;AAAA,SACF;AAAA,OACF;AAAA,KACF;AAAA,GACF,CAAA,CAAA;AAEJ;;;;"}
@@ -0,0 +1,3 @@
1
+ import { Animated } from 'react-native';
2
+ export declare const waveAnimation: (active: boolean, animatedValue: Animated.Value) => void;
3
+ export declare const pulseAnimation: (active: boolean, animatedValue: Animated.Value) => void;
@@ -0,0 +1,45 @@
1
+ import { Animated, Easing } from 'react-native';
2
+
3
+ const waveAnimation = (active, animatedValue) => {
4
+ if (active) {
5
+ Animated.loop(
6
+ Animated.timing(animatedValue, {
7
+ toValue: 1,
8
+ duration: 1600,
9
+ easing: Easing.inOut(Easing.linear),
10
+ useNativeDriver: true
11
+ })
12
+ ).start();
13
+ return;
14
+ }
15
+ Animated.timing(animatedValue, {
16
+ toValue: 0,
17
+ useNativeDriver: true
18
+ }).start();
19
+ };
20
+ const pulseAnimation = (active, animatedValue) => {
21
+ if (active) {
22
+ Animated.loop(
23
+ Animated.sequence([
24
+ Animated.timing(animatedValue, {
25
+ toValue: 1,
26
+ duration: 800,
27
+ useNativeDriver: true
28
+ }),
29
+ Animated.timing(animatedValue, {
30
+ toValue: 0,
31
+ duration: 800,
32
+ useNativeDriver: true
33
+ })
34
+ ])
35
+ ).start();
36
+ return;
37
+ }
38
+ Animated.timing(animatedValue, {
39
+ toValue: 0,
40
+ useNativeDriver: true
41
+ }).start();
42
+ };
43
+
44
+ export { pulseAnimation, waveAnimation };
45
+ //# sourceMappingURL=animation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"animation.js","sources":["../../../../src/components/atoms/Skeleton/animation.ts"],"sourcesContent":["import { Animated, Easing } from 'react-native';\n\nexport const waveAnimation = (\n active: boolean,\n animatedValue: Animated.Value\n): void => {\n if (active) {\n Animated.loop(\n Animated.timing(animatedValue, {\n toValue: 1,\n duration: 1600,\n easing: Easing.inOut(Easing.linear),\n useNativeDriver: true,\n })\n ).start();\n return;\n }\n Animated.timing(animatedValue, {\n toValue: 0,\n useNativeDriver: true,\n }).start();\n};\n\nexport const pulseAnimation = (\n active: boolean,\n animatedValue: Animated.Value\n): void => {\n if (active) {\n Animated.loop(\n Animated.sequence([\n Animated.timing(animatedValue, {\n toValue: 1,\n duration: 800,\n useNativeDriver: true,\n }),\n Animated.timing(animatedValue, {\n toValue: 0,\n duration: 800,\n useNativeDriver: true,\n }),\n ])\n ).start();\n return;\n }\n Animated.timing(animatedValue, {\n toValue: 0,\n useNativeDriver: true,\n }).start();\n};\n"],"names":[],"mappings":";;AAEa,MAAA,aAAA,GAAgB,CAC3B,MAAA,EACA,aACS,KAAA;AACT,EAAA,IAAI,MAAQ,EAAA;AACV,IAAS,QAAA,CAAA,IAAA;AAAA,MACP,QAAA,CAAS,OAAO,aAAe,EAAA;AAAA,QAC7B,OAAS,EAAA,CAAA;AAAA,QACT,QAAU,EAAA,IAAA;AAAA,QACV,MAAQ,EAAA,MAAA,CAAO,KAAM,CAAA,MAAA,CAAO,MAAM,CAAA;AAAA,QAClC,eAAiB,EAAA,IAAA;AAAA,OAClB,CAAA;AAAA,MACD,KAAM,EAAA,CAAA;AACR,IAAA,OAAA;AAAA,GACF;AACA,EAAA,QAAA,CAAS,OAAO,aAAe,EAAA;AAAA,IAC7B,OAAS,EAAA,CAAA;AAAA,IACT,eAAiB,EAAA,IAAA;AAAA,GAClB,EAAE,KAAM,EAAA,CAAA;AACX,EAAA;AAEa,MAAA,cAAA,GAAiB,CAC5B,MAAA,EACA,aACS,KAAA;AACT,EAAA,IAAI,MAAQ,EAAA;AACV,IAAS,QAAA,CAAA,IAAA;AAAA,MACP,SAAS,QAAS,CAAA;AAAA,QAChB,QAAA,CAAS,OAAO,aAAe,EAAA;AAAA,UAC7B,OAAS,EAAA,CAAA;AAAA,UACT,QAAU,EAAA,GAAA;AAAA,UACV,eAAiB,EAAA,IAAA;AAAA,SAClB,CAAA;AAAA,QACD,QAAA,CAAS,OAAO,aAAe,EAAA;AAAA,UAC7B,OAAS,EAAA,CAAA;AAAA,UACT,QAAU,EAAA,GAAA;AAAA,UACV,eAAiB,EAAA,IAAA;AAAA,SAClB,CAAA;AAAA,OACF,CAAA;AAAA,MACD,KAAM,EAAA,CAAA;AACR,IAAA,OAAA;AAAA,GACF;AACA,EAAA,QAAA,CAAS,OAAO,aAAe,EAAA;AAAA,IAC7B,OAAS,EAAA,CAAA;AAAA,IACT,eAAiB,EAAA,IAAA;AAAA,GAClB,EAAE,KAAM,EAAA,CAAA;AACX;;;;"}
@@ -0,0 +1,2 @@
1
+ export { default as Skeleton } from './Skeleton';
2
+ export type { SkeletonProps } from './Skeleton';
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ export declare const Wrapper: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
3
+ theme?: import("@emotion/react").Theme | undefined;
4
+ as?: import("react").ElementType<any> | undefined;
5
+ } & Partial<any>, {}, {
6
+ ref?: import("react").Ref<import("react-native").View> | undefined;
7
+ }>;
@@ -0,0 +1,13 @@
1
+ import styled from '@emotion/native';
2
+ import { RFValueStr } from '@tecsinapse/react-core';
3
+
4
+ const Wrapper = styled.View`
5
+ width: ${({ width }) => width ? `${RFValueStr(`${width}px`)}` : "100%"};
6
+ height: ${({ height }) => height ? `${RFValueStr(`${height}px`)}` : "auto"};
7
+ border-radius: ${({ theme, radius }) => radius ? theme.borderRadius[radius] : 0};
8
+ overflow: hidden;
9
+ position: relative;
10
+ `;
11
+
12
+ export { Wrapper };
13
+ //# sourceMappingURL=styled.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styled.js","sources":["../../../../src/components/atoms/Skeleton/styled.ts"],"sourcesContent":["import styled from '@emotion/native';\nimport { RFValueStr, StyleProps } from '@tecsinapse/react-core';\nimport { SkeletonProps } from './Skeleton';\n\nexport const Wrapper = styled.View<Partial<StyleProps & SkeletonProps>>`\n width: ${({ width }) => (width ? `${RFValueStr(`${width}px`)}` : '100%')};\n height: ${({ height }) => (height ? `${RFValueStr(`${height}px`)}` : 'auto')};\n border-radius: ${({ theme, radius }: StyleProps & Partial<SkeletonProps>) =>\n radius ? theme.borderRadius[radius] : 0};\n overflow: hidden;\n position: relative;\n`;\n"],"names":[],"mappings":";;;AAIO,MAAM,UAAU,MAAO,CAAA,IAAA,CAAA;AAAA,SACnB,EAAA,CAAC,EAAE,KAAM,EAAA,KAAO,QAAQ,CAAG,EAAA,UAAA,CAAW,CAAG,EAAA,KAAA,CAAA,EAAA,CAAS,CAAM,CAAA,CAAA,GAAA,MAAA,CAAA;AAAA,UACvD,EAAA,CAAC,EAAE,MAAO,EAAA,KAAO,SAAS,CAAG,EAAA,UAAA,CAAW,CAAG,EAAA,MAAA,CAAA,EAAA,CAAU,CAAM,CAAA,CAAA,GAAA,MAAA,CAAA;AAAA,iBACpD,EAAA,CAAC,EAAE,KAAO,EAAA,MAAA,OACzB,MAAS,GAAA,KAAA,CAAM,aAAa,MAAU,CAAA,GAAA,CAAA,CAAA;AAAA;AAAA;AAAA;;;;"}
@@ -0,0 +1,12 @@
1
+ export declare type ChildrenLayout = {
2
+ width: number;
3
+ height: number;
4
+ x: number;
5
+ y: number;
6
+ };
7
+ export interface IAnimationComponent {
8
+ width?: number;
9
+ height?: number;
10
+ active?: boolean;
11
+ childrenLayout: ChildrenLayout;
12
+ }
@@ -0,0 +1,10 @@
1
+ import * as React from 'react';
2
+ import { ScrollViewProps } from 'react-native';
3
+ import { SpacingType } from '@tecsinapse/react-core';
4
+ export interface SnappingSliderProps extends Omit<ScrollViewProps, 'horizontal' | 'snapToOffsets'> {
5
+ showAmount: number;
6
+ scrollAmount: number;
7
+ spacing?: SpacingType;
8
+ }
9
+ declare const SnappingSlider: React.FC<SnappingSliderProps>;
10
+ export default SnappingSlider;
@@ -0,0 +1,79 @@
1
+ import * as React from 'react';
2
+ import { Dimensions, ScrollView, View } from 'react-native';
3
+ import { extractNumbersFromString } from '@tecsinapse/react-core';
4
+ import { useTheme } from '@emotion/react';
5
+
6
+ var __defProp = Object.defineProperty;
7
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
8
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
9
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
10
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
11
+ var __spreadValues = (a, b) => {
12
+ for (var prop in b || (b = {}))
13
+ if (__hasOwnProp.call(b, prop))
14
+ __defNormalProp(a, prop, b[prop]);
15
+ if (__getOwnPropSymbols)
16
+ for (var prop of __getOwnPropSymbols(b)) {
17
+ if (__propIsEnum.call(b, prop))
18
+ __defNormalProp(a, prop, b[prop]);
19
+ }
20
+ return a;
21
+ };
22
+ var __objRest = (source, exclude) => {
23
+ var target = {};
24
+ for (var prop in source)
25
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
26
+ target[prop] = source[prop];
27
+ if (source != null && __getOwnPropSymbols)
28
+ for (var prop of __getOwnPropSymbols(source)) {
29
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
30
+ target[prop] = source[prop];
31
+ }
32
+ return target;
33
+ };
34
+ const SnappingSlider = (_a) => {
35
+ var _b = _a, {
36
+ children,
37
+ showAmount,
38
+ scrollAmount,
39
+ spacing
40
+ } = _b, rest = __objRest(_b, [
41
+ "children",
42
+ "showAmount",
43
+ "scrollAmount",
44
+ "spacing"
45
+ ]);
46
+ const theme = useTheme();
47
+ const childCount = React.Children.count(children);
48
+ const screenWidth = Dimensions.get("window").width;
49
+ const totalSlideWidth = Math.round(screenWidth / showAmount);
50
+ const horizontalPadding = spacing ? extractNumbersFromString(theme.spacing[spacing]) / 2 : 0;
51
+ const snapToOffsets = [
52
+ ...Array(Math.ceil(childCount / scrollAmount)).keys()
53
+ ].map((index) => {
54
+ const offset = totalSlideWidth * scrollAmount * index;
55
+ const padCompensation = horizontalPadding * Math.sign(index);
56
+ return offset + padCompensation;
57
+ });
58
+ return /* @__PURE__ */ React.createElement(ScrollView, __spreadValues({
59
+ horizontal: true,
60
+ snapToOffsets,
61
+ snapToStart: true,
62
+ snapToEnd: true,
63
+ showsHorizontalScrollIndicator: false
64
+ }, rest), React.Children.map(children, (child, index) => {
65
+ const isFirst = index === 0;
66
+ const isLast = index === childCount - 1;
67
+ return /* @__PURE__ */ React.createElement(View, {
68
+ style: {
69
+ width: totalSlideWidth,
70
+ paddingHorizontal: horizontalPadding,
71
+ paddingLeft: isFirst ? 0 : horizontalPadding,
72
+ paddingRight: isLast ? 0 : horizontalPadding
73
+ }
74
+ }, child);
75
+ }));
76
+ };
77
+
78
+ export { SnappingSlider as default };
79
+ //# sourceMappingURL=SnappingSlider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SnappingSlider.js","sources":["../../../../src/components/atoms/SnappingSlider/SnappingSlider.tsx"],"sourcesContent":["import * as React from 'react';\nimport { Dimensions, ScrollView, ScrollViewProps, View } from 'react-native';\nimport {\n extractNumbersFromString,\n SpacingType,\n ThemeProp,\n} from '@tecsinapse/react-core';\nimport { useTheme } from '@emotion/react';\n\nexport interface SnappingSliderProps\n extends Omit<ScrollViewProps, 'horizontal' | 'snapToOffsets'> {\n /**\n * Amount in screen elements.\n * Should never be lower than scrollAmount, otherwise some elements will be skipped.\n */\n showAmount: number;\n\n /**\n * Amount of items to scroll within a single swipe.\n * Should never be greater than showAmount, otherwise some elements will be skipped.\n */\n scrollAmount: number;\n\n /**\n * Spacing between elements.\n * Must be one of [nano, micro, mili, centi, deca, kilo, mega, giga, tera, peta, hexa]\n */\n spacing?: SpacingType;\n}\n\nconst SnappingSlider: React.FC<SnappingSliderProps> = ({\n children,\n showAmount,\n scrollAmount,\n spacing,\n ...rest\n}) => {\n const theme = useTheme() as ThemeProp;\n\n const childCount = React.Children.count(children);\n const screenWidth = Dimensions.get('window').width;\n const totalSlideWidth = Math.round(screenWidth / showAmount);\n const horizontalPadding = spacing\n ? extractNumbersFromString(theme.spacing[spacing]) / 2\n : 0;\n\n const snapToOffsets = [\n ...Array(Math.ceil(childCount / scrollAmount)).keys(),\n ].map(index => {\n const offset = totalSlideWidth * scrollAmount * index;\n const padCompensation = horizontalPadding * Math.sign(index);\n return offset + padCompensation;\n });\n\n return (\n <ScrollView\n horizontal\n snapToOffsets={snapToOffsets}\n snapToStart\n snapToEnd\n showsHorizontalScrollIndicator={false}\n {...rest}\n >\n {React.Children.map(children, (child, index) => {\n const isFirst = index === 0;\n const isLast = index === childCount - 1;\n\n return (\n <View\n style={{\n width: totalSlideWidth,\n paddingHorizontal: horizontalPadding,\n paddingLeft: isFirst ? 0 : horizontalPadding,\n paddingRight: isLast ? 0 : horizontalPadding,\n }}\n >\n {child}\n </View>\n );\n })}\n </ScrollView>\n );\n};\n\nexport default SnappingSlider;\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BM,MAAA,cAAA,GAAgD,CAAC,EAMjD,KAAA;AANiD,EACrD,IAAA,EAAA,GAAA,EAAA,EAAA;AAAA,IAAA,QAAA;AAAA,IACA,UAAA;AAAA,IACA,YAAA;AAAA,IACA,OAAA;AAAA,GAlCF,GA8BuD,EAKlD,EAAA,IAAA,GAAA,SAAA,CALkD,EAKlD,EAAA;AAAA,IAJH,UAAA;AAAA,IACA,YAAA;AAAA,IACA,cAAA;AAAA,IACA,SAAA;AAAA,GAAA,CAAA,CAAA;AAGA,EAAA,MAAM,QAAQ,QAAS,EAAA,CAAA;AAEvB,EAAA,MAAM,UAAa,GAAA,KAAA,CAAM,QAAS,CAAA,KAAA,CAAM,QAAQ,CAAA,CAAA;AAChD,EAAA,MAAM,WAAc,GAAA,UAAA,CAAW,GAAI,CAAA,QAAQ,CAAE,CAAA,KAAA,CAAA;AAC7C,EAAA,MAAM,eAAkB,GAAA,IAAA,CAAK,KAAM,CAAA,WAAA,GAAc,UAAU,CAAA,CAAA;AAC3D,EAAA,MAAM,oBAAoB,OACtB,GAAA,wBAAA,CAAyB,MAAM,OAAQ,CAAA,OAAA,CAAQ,IAAI,CACnD,GAAA,CAAA,CAAA;AAEJ,EAAA,MAAM,aAAgB,GAAA;AAAA,IACpB,GAAG,MAAM,IAAK,CAAA,IAAA,CAAK,aAAa,YAAY,CAAC,EAAE,IAAK,EAAA;AAAA,GACtD,CAAE,IAAI,CAAS,KAAA,KAAA;AACb,IAAM,MAAA,MAAA,GAAS,kBAAkB,YAAe,GAAA,KAAA,CAAA;AAChD,IAAA,MAAM,eAAkB,GAAA,iBAAA,GAAoB,IAAK,CAAA,IAAA,CAAK,KAAK,CAAA,CAAA;AAC3D,IAAA,OAAO,MAAS,GAAA,eAAA,CAAA;AAAA,GACjB,CAAA,CAAA;AAED,EAAA,uBACG,KAAA,CAAA,aAAA,CAAA,UAAA,EAAA,cAAA,CAAA;AAAA,IACC,UAAU,EAAA,IAAA;AAAA,IACV,aAAA;AAAA,IACA,WAAW,EAAA,IAAA;AAAA,IACX,SAAS,EAAA,IAAA;AAAA,IACT,8BAAgC,EAAA,KAAA;AAAA,GAAA,EAC5B,OAEH,KAAM,CAAA,QAAA,CAAS,IAAI,QAAU,EAAA,CAAC,OAAO,KAAU,KAAA;AAC9C,IAAA,MAAM,UAAU,KAAU,KAAA,CAAA,CAAA;AAC1B,IAAM,MAAA,MAAA,GAAS,UAAU,UAAa,GAAA,CAAA,CAAA;AAEtC,IAAA,uBACG,KAAA,CAAA,aAAA,CAAA,IAAA,EAAA;AAAA,MACC,KAAO,EAAA;AAAA,QACL,KAAO,EAAA,eAAA;AAAA,QACP,iBAAmB,EAAA,iBAAA;AAAA,QACnB,WAAA,EAAa,UAAU,CAAI,GAAA,iBAAA;AAAA,QAC3B,YAAA,EAAc,SAAS,CAAI,GAAA,iBAAA;AAAA,OAC7B;AAAA,KAAA,EAEC,KACH,CAAA,CAAA;AAAA,GAEH,CACH,CAAA,CAAA;AAEJ;;;;"}
@@ -0,0 +1,2 @@
1
+ export { default as SnappingSlider } from './SnappingSlider';
2
+ export type { SnappingSliderProps } from './SnappingSlider';
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import { TagProps as TagCoreProps } from '@tecsinapse/react-core';
3
+ export interface TagProps extends Omit<TagCoreProps, 'value'> {
4
+ value: string;
5
+ }
6
+ declare const Tag: React.FC<TagProps>;
7
+ export default Tag;
@@ -0,0 +1,47 @@
1
+ import React__default from 'react';
2
+ import { Tag as Tag$1 } from '@tecsinapse/react-core';
3
+ import Text from '../Text/Text.js';
4
+
5
+ var __defProp = Object.defineProperty;
6
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
9
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
10
+ var __spreadValues = (a, b) => {
11
+ for (var prop in b || (b = {}))
12
+ if (__hasOwnProp.call(b, prop))
13
+ __defNormalProp(a, prop, b[prop]);
14
+ if (__getOwnPropSymbols)
15
+ for (var prop of __getOwnPropSymbols(b)) {
16
+ if (__propIsEnum.call(b, prop))
17
+ __defNormalProp(a, prop, b[prop]);
18
+ }
19
+ return a;
20
+ };
21
+ var __objRest = (source, exclude) => {
22
+ var target = {};
23
+ for (var prop in source)
24
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
25
+ target[prop] = source[prop];
26
+ if (source != null && __getOwnPropSymbols)
27
+ for (var prop of __getOwnPropSymbols(source)) {
28
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
29
+ target[prop] = source[prop];
30
+ }
31
+ return target;
32
+ };
33
+ const Tag = (_a) => {
34
+ var _b = _a, { value } = _b, rest = __objRest(_b, ["value"]);
35
+ return /* @__PURE__ */ React__default.createElement(Tag$1, __spreadValues({
36
+ value: /* @__PURE__ */ React__default.createElement(Text, {
37
+ colorVariant: "secondary",
38
+ colorTone: "dark",
39
+ fontStack: "default",
40
+ fontWeight: "bold",
41
+ typography: rest.variant === "small" ? "sub" : "base"
42
+ }, value)
43
+ }, rest));
44
+ };
45
+
46
+ export { Tag as default };
47
+ //# sourceMappingURL=Tag.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Tag.js","sources":["../../../../src/components/atoms/Tag/Tag.tsx"],"sourcesContent":["import React from 'react';\nimport {\n Tag as TagCore,\n TagProps as TagCoreProps,\n} from '@tecsinapse/react-core';\nimport { Text } from '../Text';\n\nexport interface TagProps extends Omit<TagCoreProps, 'value'> {\n value: string;\n}\n\nconst Tag: React.FC<TagProps> = ({ value, ...rest }): JSX.Element => {\n return (\n <TagCore\n value={\n <Text\n colorVariant=\"secondary\"\n colorTone=\"dark\"\n fontStack=\"default\"\n fontWeight=\"bold\"\n typography={rest.variant === 'small' ? 'sub' : 'base'}\n >\n {value}\n </Text>\n }\n {...rest}\n />\n );\n};\n\nexport default Tag;\n"],"names":["React","TagCore"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAWM,MAAA,GAAA,GAA0B,CAAC,EAAoC,KAAA;AAApC,EAAA,IAAA,EAAA,GAAA,EAAA,EAAE,EAXnC,KAAA,EAAA,GAWiC,EAAY,EAAA,IAAA,GAAA,SAAA,CAAZ,IAAY,CAAV,OAAA,CAAA,CAAA,CAAA;AACjC,EAAA,uBACGA,cAAA,CAAA,aAAA,CAAAC,KAAA,EAAA,cAAA,CAAA;AAAA,IACC,uBACGD,cAAA,CAAA,aAAA,CAAA,IAAA,EAAA;AAAA,MACC,YAAa,EAAA,WAAA;AAAA,MACb,SAAU,EAAA,MAAA;AAAA,MACV,SAAU,EAAA,SAAA;AAAA,MACV,UAAW,EAAA,MAAA;AAAA,MACX,UAAY,EAAA,IAAA,CAAK,OAAY,KAAA,OAAA,GAAU,KAAQ,GAAA,MAAA;AAAA,KAAA,EAE9C,KACH,CAAA;AAAA,GAAA,EAEE,IACN,CAAA,CAAA,CAAA;AAEJ;;;;"}
@@ -0,0 +1,2 @@
1
+ export { default as Tag } from './Tag';
2
+ export type { TagProps } from './Tag';
@@ -0,0 +1,5 @@
1
+ import { TextProps } from '@tecsinapse/react-core';
2
+ import { FC } from 'react';
3
+ export declare type TextNativeProps = TextProps;
4
+ declare const Text: FC<TextNativeProps>;
5
+ export default Text;