rn-custom-ui 1.0.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 (332) hide show
  1. package/LICENSE +20 -0
  2. package/README.md +477 -0
  3. package/lib/module/assets/images/close.png +0 -0
  4. package/lib/module/components/CustomCheckbox/index.js +99 -0
  5. package/lib/module/components/CustomCheckbox/index.js.map +1 -0
  6. package/lib/module/components/CustomCheckbox/styles.js +213 -0
  7. package/lib/module/components/CustomCheckbox/styles.js.map +1 -0
  8. package/lib/module/components/CustomCheckbox/types.js +4 -0
  9. package/lib/module/components/CustomCheckbox/types.js.map +1 -0
  10. package/lib/module/components/closeButton/index.js +45 -0
  11. package/lib/module/components/closeButton/index.js.map +1 -0
  12. package/lib/module/components/closeButton/types.js +4 -0
  13. package/lib/module/components/closeButton/types.js.map +1 -0
  14. package/lib/module/components/customButton/index.js +176 -0
  15. package/lib/module/components/customButton/index.js.map +1 -0
  16. package/lib/module/components/customButton/styles.js +282 -0
  17. package/lib/module/components/customButton/styles.js.map +1 -0
  18. package/lib/module/components/customButton/types.js +4 -0
  19. package/lib/module/components/customButton/types.js.map +1 -0
  20. package/lib/module/components/customDropDown/DropDownBottomSheet.js +57 -0
  21. package/lib/module/components/customDropDown/DropDownBottomSheet.js.map +1 -0
  22. package/lib/module/components/customDropDown/DropDownList.js +51 -0
  23. package/lib/module/components/customDropDown/DropDownList.js.map +1 -0
  24. package/lib/module/components/customDropDown/DropDownListItem.js +38 -0
  25. package/lib/module/components/customDropDown/DropDownListItem.js.map +1 -0
  26. package/lib/module/components/customDropDown/DropDownListModal.js +63 -0
  27. package/lib/module/components/customDropDown/DropDownListModal.js.map +1 -0
  28. package/lib/module/components/customDropDown/index.js +143 -0
  29. package/lib/module/components/customDropDown/index.js.map +1 -0
  30. package/lib/module/components/customDropDown/styles.js +189 -0
  31. package/lib/module/components/customDropDown/styles.js.map +1 -0
  32. package/lib/module/components/customDropDown/types.js +4 -0
  33. package/lib/module/components/customDropDown/types.js.map +1 -0
  34. package/lib/module/components/customDropDown/utils.js +17 -0
  35. package/lib/module/components/customDropDown/utils.js.map +1 -0
  36. package/lib/module/components/customList/ListEmpty.js +33 -0
  37. package/lib/module/components/customList/ListEmpty.js.map +1 -0
  38. package/lib/module/components/customList/ListFooterLoader.js +14 -0
  39. package/lib/module/components/customList/ListFooterLoader.js.map +1 -0
  40. package/lib/module/components/customList/defaultKeyExtractor.js +9 -0
  41. package/lib/module/components/customList/defaultKeyExtractor.js.map +1 -0
  42. package/lib/module/components/customList/getFlashList.js +19 -0
  43. package/lib/module/components/customList/getFlashList.js.map +1 -0
  44. package/lib/module/components/customList/index.js +117 -0
  45. package/lib/module/components/customList/index.js.map +1 -0
  46. package/lib/module/components/customList/styles.js +45 -0
  47. package/lib/module/components/customList/styles.js.map +1 -0
  48. package/lib/module/components/customList/types.js +4 -0
  49. package/lib/module/components/customList/types.js.map +1 -0
  50. package/lib/module/components/customModal/ModalFooter.js +44 -0
  51. package/lib/module/components/customModal/ModalFooter.js.map +1 -0
  52. package/lib/module/components/customModal/index.js +132 -0
  53. package/lib/module/components/customModal/index.js.map +1 -0
  54. package/lib/module/components/customModal/styles.js +123 -0
  55. package/lib/module/components/customModal/styles.js.map +1 -0
  56. package/lib/module/components/customModal/types.js +4 -0
  57. package/lib/module/components/customModal/types.js.map +1 -0
  58. package/lib/module/components/customModal/useCustomModal.js +23 -0
  59. package/lib/module/components/customModal/useCustomModal.js.map +1 -0
  60. package/lib/module/components/customNumberPad/NumberPadKey.js +39 -0
  61. package/lib/module/components/customNumberPad/NumberPadKey.js.map +1 -0
  62. package/lib/module/components/customNumberPad/index.js +156 -0
  63. package/lib/module/components/customNumberPad/index.js.map +1 -0
  64. package/lib/module/components/customNumberPad/styles.js +131 -0
  65. package/lib/module/components/customNumberPad/styles.js.map +1 -0
  66. package/lib/module/components/customNumberPad/types.js +4 -0
  67. package/lib/module/components/customNumberPad/types.js.map +1 -0
  68. package/lib/module/components/customNumberPad/useNumberPadInput.js +44 -0
  69. package/lib/module/components/customNumberPad/useNumberPadInput.js.map +1 -0
  70. package/lib/module/components/customNumberPad/utils.js +38 -0
  71. package/lib/module/components/customNumberPad/utils.js.map +1 -0
  72. package/lib/module/components/customSlideTabs/AnimatedTabIndicator.js +66 -0
  73. package/lib/module/components/customSlideTabs/AnimatedTabIndicator.js.map +1 -0
  74. package/lib/module/components/customSlideTabs/TabBarItem.js +61 -0
  75. package/lib/module/components/customSlideTabs/TabBarItem.js.map +1 -0
  76. package/lib/module/components/customSlideTabs/TabScene.js +88 -0
  77. package/lib/module/components/customSlideTabs/TabScene.js.map +1 -0
  78. package/lib/module/components/customSlideTabs/index.js +277 -0
  79. package/lib/module/components/customSlideTabs/index.js.map +1 -0
  80. package/lib/module/components/customSlideTabs/styles.js +132 -0
  81. package/lib/module/components/customSlideTabs/styles.js.map +1 -0
  82. package/lib/module/components/customSlideTabs/tabBarScroll.js +65 -0
  83. package/lib/module/components/customSlideTabs/tabBarScroll.js.map +1 -0
  84. package/lib/module/components/customSlideTabs/types.js +4 -0
  85. package/lib/module/components/customSlideTabs/types.js.map +1 -0
  86. package/lib/module/components/loading/index.js +34 -0
  87. package/lib/module/components/loading/index.js.map +1 -0
  88. package/lib/module/customFunctions/array.js +61 -0
  89. package/lib/module/customFunctions/array.js.map +1 -0
  90. package/lib/module/customFunctions/async.js +62 -0
  91. package/lib/module/customFunctions/async.js.map +1 -0
  92. package/lib/module/customFunctions/date.js +109 -0
  93. package/lib/module/customFunctions/date.js.map +1 -0
  94. package/lib/module/customFunctions/general.js +29 -0
  95. package/lib/module/customFunctions/general.js.map +1 -0
  96. package/lib/module/customFunctions/id.js +20 -0
  97. package/lib/module/customFunctions/id.js.map +1 -0
  98. package/lib/module/customFunctions/index.js +29 -0
  99. package/lib/module/customFunctions/index.js.map +1 -0
  100. package/lib/module/customFunctions/number.js +94 -0
  101. package/lib/module/customFunctions/number.js.map +1 -0
  102. package/lib/module/customFunctions/object.js +39 -0
  103. package/lib/module/customFunctions/object.js.map +1 -0
  104. package/lib/module/customFunctions/string.js +63 -0
  105. package/lib/module/customFunctions/string.js.map +1 -0
  106. package/lib/module/customFunctions/types.js +2 -0
  107. package/lib/module/customFunctions/types.js.map +1 -0
  108. package/lib/module/customFunctions/validation.js +34 -0
  109. package/lib/module/customFunctions/validation.js.map +1 -0
  110. package/lib/module/customHooks/errors.js +61 -0
  111. package/lib/module/customHooks/errors.js.map +1 -0
  112. package/lib/module/customHooks/fetchJson.js +36 -0
  113. package/lib/module/customHooks/fetchJson.js.map +1 -0
  114. package/lib/module/customHooks/index.js +10 -0
  115. package/lib/module/customHooks/index.js.map +1 -0
  116. package/lib/module/customHooks/internal.js +49 -0
  117. package/lib/module/customHooks/internal.js.map +1 -0
  118. package/lib/module/customHooks/types.js +2 -0
  119. package/lib/module/customHooks/types.js.map +1 -0
  120. package/lib/module/customHooks/useApi.js +91 -0
  121. package/lib/module/customHooks/useApi.js.map +1 -0
  122. package/lib/module/customHooks/useLazyApi.js +80 -0
  123. package/lib/module/customHooks/useLazyApi.js.map +1 -0
  124. package/lib/module/customHooks/useMutation.js +69 -0
  125. package/lib/module/customHooks/useMutation.js.map +1 -0
  126. package/lib/module/customHooks/usePaginatedApi.js +127 -0
  127. package/lib/module/customHooks/usePaginatedApi.js.map +1 -0
  128. package/lib/module/customHooks/usePollingApi.js +37 -0
  129. package/lib/module/customHooks/usePollingApi.js.map +1 -0
  130. package/lib/module/index.js +13 -0
  131. package/lib/module/index.js.map +1 -0
  132. package/lib/module/multiply.js +6 -0
  133. package/lib/module/multiply.js.map +1 -0
  134. package/lib/module/package.json +1 -0
  135. package/lib/typescript/package.json +1 -0
  136. package/lib/typescript/src/components/CustomCheckbox/index.d.ts +5 -0
  137. package/lib/typescript/src/components/CustomCheckbox/index.d.ts.map +1 -0
  138. package/lib/typescript/src/components/CustomCheckbox/styles.d.ts +67 -0
  139. package/lib/typescript/src/components/CustomCheckbox/styles.d.ts.map +1 -0
  140. package/lib/typescript/src/components/CustomCheckbox/types.d.ts +28 -0
  141. package/lib/typescript/src/components/CustomCheckbox/types.d.ts.map +1 -0
  142. package/lib/typescript/src/components/closeButton/index.d.ts +4 -0
  143. package/lib/typescript/src/components/closeButton/index.d.ts.map +1 -0
  144. package/lib/typescript/src/components/closeButton/types.d.ts +8 -0
  145. package/lib/typescript/src/components/closeButton/types.d.ts.map +1 -0
  146. package/lib/typescript/src/components/customButton/index.d.ts +5 -0
  147. package/lib/typescript/src/components/customButton/index.d.ts.map +1 -0
  148. package/lib/typescript/src/components/customButton/styles.d.ts +231 -0
  149. package/lib/typescript/src/components/customButton/styles.d.ts.map +1 -0
  150. package/lib/typescript/src/components/customButton/types.d.ts +46 -0
  151. package/lib/typescript/src/components/customButton/types.d.ts.map +1 -0
  152. package/lib/typescript/src/components/customDropDown/DropDownBottomSheet.d.ts +18 -0
  153. package/lib/typescript/src/components/customDropDown/DropDownBottomSheet.d.ts.map +1 -0
  154. package/lib/typescript/src/components/customDropDown/DropDownList.d.ts +17 -0
  155. package/lib/typescript/src/components/customDropDown/DropDownList.d.ts.map +1 -0
  156. package/lib/typescript/src/components/customDropDown/DropDownListItem.d.ts +15 -0
  157. package/lib/typescript/src/components/customDropDown/DropDownListItem.d.ts.map +1 -0
  158. package/lib/typescript/src/components/customDropDown/DropDownListModal.d.ts +19 -0
  159. package/lib/typescript/src/components/customDropDown/DropDownListModal.d.ts.map +1 -0
  160. package/lib/typescript/src/components/customDropDown/index.d.ts +5 -0
  161. package/lib/typescript/src/components/customDropDown/index.d.ts.map +1 -0
  162. package/lib/typescript/src/components/customDropDown/styles.d.ts +190 -0
  163. package/lib/typescript/src/components/customDropDown/styles.d.ts.map +1 -0
  164. package/lib/typescript/src/components/customDropDown/types.d.ts +37 -0
  165. package/lib/typescript/src/components/customDropDown/types.d.ts.map +1 -0
  166. package/lib/typescript/src/components/customDropDown/utils.d.ts +4 -0
  167. package/lib/typescript/src/components/customDropDown/utils.d.ts.map +1 -0
  168. package/lib/typescript/src/components/customList/ListEmpty.d.ts +10 -0
  169. package/lib/typescript/src/components/customList/ListEmpty.d.ts.map +1 -0
  170. package/lib/typescript/src/components/customList/ListFooterLoader.d.ts +3 -0
  171. package/lib/typescript/src/components/customList/ListFooterLoader.d.ts.map +1 -0
  172. package/lib/typescript/src/components/customList/defaultKeyExtractor.d.ts +2 -0
  173. package/lib/typescript/src/components/customList/defaultKeyExtractor.d.ts.map +1 -0
  174. package/lib/typescript/src/components/customList/getFlashList.d.ts +6 -0
  175. package/lib/typescript/src/components/customList/getFlashList.d.ts.map +1 -0
  176. package/lib/typescript/src/components/customList/index.d.ts +11 -0
  177. package/lib/typescript/src/components/customList/index.d.ts.map +1 -0
  178. package/lib/typescript/src/components/customList/styles.d.ts +42 -0
  179. package/lib/typescript/src/components/customList/styles.d.ts.map +1 -0
  180. package/lib/typescript/src/components/customList/types.d.ts +33 -0
  181. package/lib/typescript/src/components/customList/types.d.ts.map +1 -0
  182. package/lib/typescript/src/components/customModal/ModalFooter.d.ts +12 -0
  183. package/lib/typescript/src/components/customModal/ModalFooter.d.ts.map +1 -0
  184. package/lib/typescript/src/components/customModal/index.d.ts +6 -0
  185. package/lib/typescript/src/components/customModal/index.d.ts.map +1 -0
  186. package/lib/typescript/src/components/customModal/styles.d.ts +83 -0
  187. package/lib/typescript/src/components/customModal/styles.d.ts.map +1 -0
  188. package/lib/typescript/src/components/customModal/types.d.ts +36 -0
  189. package/lib/typescript/src/components/customModal/types.d.ts.map +1 -0
  190. package/lib/typescript/src/components/customModal/useCustomModal.d.ts +8 -0
  191. package/lib/typescript/src/components/customModal/useCustomModal.d.ts.map +1 -0
  192. package/lib/typescript/src/components/customNumberPad/NumberPadKey.d.ts +23 -0
  193. package/lib/typescript/src/components/customNumberPad/NumberPadKey.d.ts.map +1 -0
  194. package/lib/typescript/src/components/customNumberPad/index.d.ts +7 -0
  195. package/lib/typescript/src/components/customNumberPad/index.d.ts.map +1 -0
  196. package/lib/typescript/src/components/customNumberPad/styles.d.ts +37 -0
  197. package/lib/typescript/src/components/customNumberPad/styles.d.ts.map +1 -0
  198. package/lib/typescript/src/components/customNumberPad/types.d.ts +47 -0
  199. package/lib/typescript/src/components/customNumberPad/types.d.ts.map +1 -0
  200. package/lib/typescript/src/components/customNumberPad/useNumberPadInput.d.ts +16 -0
  201. package/lib/typescript/src/components/customNumberPad/useNumberPadInput.d.ts.map +1 -0
  202. package/lib/typescript/src/components/customNumberPad/utils.d.ts +4 -0
  203. package/lib/typescript/src/components/customNumberPad/utils.d.ts.map +1 -0
  204. package/lib/typescript/src/components/customSlideTabs/AnimatedTabIndicator.d.ts +16 -0
  205. package/lib/typescript/src/components/customSlideTabs/AnimatedTabIndicator.d.ts.map +1 -0
  206. package/lib/typescript/src/components/customSlideTabs/TabBarItem.d.ts +23 -0
  207. package/lib/typescript/src/components/customSlideTabs/TabBarItem.d.ts.map +1 -0
  208. package/lib/typescript/src/components/customSlideTabs/TabScene.d.ts +21 -0
  209. package/lib/typescript/src/components/customSlideTabs/TabScene.d.ts.map +1 -0
  210. package/lib/typescript/src/components/customSlideTabs/index.d.ts +5 -0
  211. package/lib/typescript/src/components/customSlideTabs/index.d.ts.map +1 -0
  212. package/lib/typescript/src/components/customSlideTabs/styles.d.ts +130 -0
  213. package/lib/typescript/src/components/customSlideTabs/styles.d.ts.map +1 -0
  214. package/lib/typescript/src/components/customSlideTabs/tabBarScroll.d.ts +15 -0
  215. package/lib/typescript/src/components/customSlideTabs/tabBarScroll.d.ts.map +1 -0
  216. package/lib/typescript/src/components/customSlideTabs/types.d.ts +68 -0
  217. package/lib/typescript/src/components/customSlideTabs/types.d.ts.map +1 -0
  218. package/lib/typescript/src/components/loading/index.d.ts +7 -0
  219. package/lib/typescript/src/components/loading/index.d.ts.map +1 -0
  220. package/lib/typescript/src/customFunctions/array.d.ts +7 -0
  221. package/lib/typescript/src/customFunctions/array.d.ts.map +1 -0
  222. package/lib/typescript/src/customFunctions/async.d.ts +9 -0
  223. package/lib/typescript/src/customFunctions/async.d.ts.map +1 -0
  224. package/lib/typescript/src/customFunctions/date.d.ts +18 -0
  225. package/lib/typescript/src/customFunctions/date.d.ts.map +1 -0
  226. package/lib/typescript/src/customFunctions/general.d.ts +7 -0
  227. package/lib/typescript/src/customFunctions/general.d.ts.map +1 -0
  228. package/lib/typescript/src/customFunctions/id.d.ts +4 -0
  229. package/lib/typescript/src/customFunctions/id.d.ts.map +1 -0
  230. package/lib/typescript/src/customFunctions/index.d.ts +26 -0
  231. package/lib/typescript/src/customFunctions/index.d.ts.map +1 -0
  232. package/lib/typescript/src/customFunctions/number.d.ts +15 -0
  233. package/lib/typescript/src/customFunctions/number.d.ts.map +1 -0
  234. package/lib/typescript/src/customFunctions/object.d.ts +6 -0
  235. package/lib/typescript/src/customFunctions/object.d.ts.map +1 -0
  236. package/lib/typescript/src/customFunctions/string.d.ts +20 -0
  237. package/lib/typescript/src/customFunctions/string.d.ts.map +1 -0
  238. package/lib/typescript/src/customFunctions/types.d.ts +22 -0
  239. package/lib/typescript/src/customFunctions/types.d.ts.map +1 -0
  240. package/lib/typescript/src/customFunctions/validation.d.ts +11 -0
  241. package/lib/typescript/src/customFunctions/validation.d.ts.map +1 -0
  242. package/lib/typescript/src/customHooks/errors.d.ts +16 -0
  243. package/lib/typescript/src/customHooks/errors.d.ts.map +1 -0
  244. package/lib/typescript/src/customHooks/fetchJson.d.ts +5 -0
  245. package/lib/typescript/src/customHooks/fetchJson.d.ts.map +1 -0
  246. package/lib/typescript/src/customHooks/index.d.ts +9 -0
  247. package/lib/typescript/src/customHooks/index.d.ts.map +1 -0
  248. package/lib/typescript/src/customHooks/internal.d.ts +12 -0
  249. package/lib/typescript/src/customHooks/internal.d.ts.map +1 -0
  250. package/lib/typescript/src/customHooks/types.d.ts +49 -0
  251. package/lib/typescript/src/customHooks/types.d.ts.map +1 -0
  252. package/lib/typescript/src/customHooks/useApi.d.ts +13 -0
  253. package/lib/typescript/src/customHooks/useApi.d.ts.map +1 -0
  254. package/lib/typescript/src/customHooks/useLazyApi.d.ts +14 -0
  255. package/lib/typescript/src/customHooks/useLazyApi.d.ts.map +1 -0
  256. package/lib/typescript/src/customHooks/useMutation.d.ts +15 -0
  257. package/lib/typescript/src/customHooks/useMutation.d.ts.map +1 -0
  258. package/lib/typescript/src/customHooks/usePaginatedApi.d.ts +19 -0
  259. package/lib/typescript/src/customHooks/usePaginatedApi.d.ts.map +1 -0
  260. package/lib/typescript/src/customHooks/usePollingApi.d.ts +13 -0
  261. package/lib/typescript/src/customHooks/usePollingApi.d.ts.map +1 -0
  262. package/lib/typescript/src/index.d.ts +11 -0
  263. package/lib/typescript/src/index.d.ts.map +1 -0
  264. package/lib/typescript/src/multiply.d.ts +2 -0
  265. package/lib/typescript/src/multiply.d.ts.map +1 -0
  266. package/package.json +181 -0
  267. package/src/assets/images/close.png +0 -0
  268. package/src/components/CustomCheckbox/index.tsx +143 -0
  269. package/src/components/CustomCheckbox/styles.ts +146 -0
  270. package/src/components/CustomCheckbox/types.ts +33 -0
  271. package/src/components/closeButton/index.tsx +40 -0
  272. package/src/components/closeButton/types.ts +13 -0
  273. package/src/components/customButton/index.tsx +288 -0
  274. package/src/components/customButton/styles.ts +247 -0
  275. package/src/components/customButton/types.ts +71 -0
  276. package/src/components/customDropDown/DropDownBottomSheet.tsx +70 -0
  277. package/src/components/customDropDown/DropDownList.tsx +88 -0
  278. package/src/components/customDropDown/DropDownListItem.tsx +74 -0
  279. package/src/components/customDropDown/DropDownListModal.tsx +86 -0
  280. package/src/components/customDropDown/index.tsx +213 -0
  281. package/src/components/customDropDown/styles.ts +184 -0
  282. package/src/components/customDropDown/types.ts +48 -0
  283. package/src/components/customDropDown/utils.ts +24 -0
  284. package/src/components/customList/ListEmpty.tsx +36 -0
  285. package/src/components/customList/ListFooterLoader.tsx +11 -0
  286. package/src/components/customList/defaultKeyExtractor.ts +7 -0
  287. package/src/components/customList/getFlashList.ts +26 -0
  288. package/src/components/customList/index.tsx +142 -0
  289. package/src/components/customList/styles.ts +43 -0
  290. package/src/components/customList/types.ts +60 -0
  291. package/src/components/customModal/ModalFooter.tsx +57 -0
  292. package/src/components/customModal/index.tsx +166 -0
  293. package/src/components/customModal/styles.ts +131 -0
  294. package/src/components/customModal/types.ts +48 -0
  295. package/src/components/customModal/useCustomModal.ts +25 -0
  296. package/src/components/customNumberPad/NumberPadKey.tsx +81 -0
  297. package/src/components/customNumberPad/index.tsx +204 -0
  298. package/src/components/customNumberPad/styles.ts +146 -0
  299. package/src/components/customNumberPad/types.ts +53 -0
  300. package/src/components/customNumberPad/useNumberPadInput.ts +56 -0
  301. package/src/components/customNumberPad/utils.ts +54 -0
  302. package/src/components/customSlideTabs/AnimatedTabIndicator.tsx +103 -0
  303. package/src/components/customSlideTabs/TabBarItem.tsx +118 -0
  304. package/src/components/customSlideTabs/TabScene.tsx +136 -0
  305. package/src/components/customSlideTabs/index.tsx +385 -0
  306. package/src/components/customSlideTabs/styles.ts +136 -0
  307. package/src/components/customSlideTabs/tabBarScroll.ts +92 -0
  308. package/src/components/customSlideTabs/types.ts +87 -0
  309. package/src/components/loading/index.tsx +34 -0
  310. package/src/customFunctions/array.ts +83 -0
  311. package/src/customFunctions/async.ts +85 -0
  312. package/src/customFunctions/date.ts +158 -0
  313. package/src/customFunctions/general.ts +35 -0
  314. package/src/customFunctions/id.ts +25 -0
  315. package/src/customFunctions/index.ts +91 -0
  316. package/src/customFunctions/number.ts +139 -0
  317. package/src/customFunctions/object.ts +59 -0
  318. package/src/customFunctions/string.ts +119 -0
  319. package/src/customFunctions/types.ts +25 -0
  320. package/src/customFunctions/validation.ts +49 -0
  321. package/src/customHooks/errors.ts +87 -0
  322. package/src/customHooks/fetchJson.ts +49 -0
  323. package/src/customHooks/index.ts +20 -0
  324. package/src/customHooks/internal.ts +67 -0
  325. package/src/customHooks/types.ts +71 -0
  326. package/src/customHooks/useApi.ts +107 -0
  327. package/src/customHooks/useLazyApi.ts +92 -0
  328. package/src/customHooks/useMutation.ts +97 -0
  329. package/src/customHooks/usePaginatedApi.ts +168 -0
  330. package/src/customHooks/usePollingApi.ts +48 -0
  331. package/src/index.tsx +63 -0
  332. package/src/multiply.tsx +3 -0
@@ -0,0 +1,132 @@
1
+ "use strict";
2
+
3
+ import { useMemo } from 'react';
4
+ import { Modal, Pressable, ScrollView, Text, View } from 'react-native';
5
+ import CloseButton from "../closeButton/index.js";
6
+ import ModalFooter from "./ModalFooter.js";
7
+ import { presentationStyles, styles } from "./styles.js";
8
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
9
+ const CustomModal = ({
10
+ visible,
11
+ onClose,
12
+ title,
13
+ description,
14
+ children,
15
+ presentation = 'center',
16
+ showCloseButton = true,
17
+ closeOnBackdropPress = true,
18
+ animationType,
19
+ scrollable = false,
20
+ containerStyle,
21
+ backdropStyle,
22
+ contentStyle,
23
+ headerStyle,
24
+ titleStyle,
25
+ descriptionStyle,
26
+ bodyStyle,
27
+ footerStyle,
28
+ footer,
29
+ primaryAction,
30
+ secondaryAction,
31
+ closeImage,
32
+ supportedOrientations = ['landscape', 'portrait'],
33
+ statusBarTranslucent,
34
+ testID
35
+ }) => {
36
+ const presentationStyle = presentationStyles[presentation];
37
+ const resolvedAnimationType = animationType ?? presentationStyle.animationType;
38
+ const contentInnerStyle = useMemo(() => {
39
+ if (presentation === 'fullscreen') {
40
+ return styles.fullscreenContentInner;
41
+ }
42
+ if (presentation === 'bottom') {
43
+ return styles.bottomContentInner;
44
+ }
45
+ return styles.contentInner;
46
+ }, [presentation]);
47
+ const showHeader = Boolean(title || description || showCloseButton);
48
+ const handleBackdropPress = () => {
49
+ if (closeOnBackdropPress) {
50
+ onClose();
51
+ }
52
+ };
53
+ const renderBody = () => {
54
+ if (!children) {
55
+ return null;
56
+ }
57
+ if (scrollable) {
58
+ return /*#__PURE__*/_jsx(ScrollView, {
59
+ style: [styles.body, styles.scrollBody, bodyStyle],
60
+ showsVerticalScrollIndicator: false,
61
+ bounces: false,
62
+ children: children
63
+ });
64
+ }
65
+ return /*#__PURE__*/_jsx(View, {
66
+ style: [styles.body, bodyStyle],
67
+ children: children
68
+ });
69
+ };
70
+ const renderContent = () => /*#__PURE__*/_jsx(Pressable, {
71
+ style: [presentationStyle.content, contentStyle],
72
+ onPress: () => {},
73
+ children: /*#__PURE__*/_jsxs(View, {
74
+ style: contentInnerStyle,
75
+ children: [presentation === 'bottom' && /*#__PURE__*/_jsx(View, {
76
+ style: styles.handle
77
+ }), showHeader && /*#__PURE__*/_jsxs(View, {
78
+ style: [styles.header, headerStyle],
79
+ children: [/*#__PURE__*/_jsxs(View, {
80
+ style: styles.headerText,
81
+ children: [!!title && /*#__PURE__*/_jsx(Text, {
82
+ style: [styles.title, titleStyle],
83
+ children: title
84
+ }), !!description && /*#__PURE__*/_jsx(Text, {
85
+ style: [styles.description, descriptionStyle],
86
+ children: description
87
+ })]
88
+ }), showCloseButton && /*#__PURE__*/_jsx(CloseButton, {
89
+ closeImage: closeImage,
90
+ containerStyle: styles.closeButton,
91
+ onPress: onClose
92
+ })]
93
+ }), renderBody(), /*#__PURE__*/_jsx(ModalFooter, {
94
+ footer: footer,
95
+ footerStyle: footerStyle,
96
+ primaryAction: primaryAction,
97
+ secondaryAction: secondaryAction
98
+ })]
99
+ })
100
+ });
101
+ return /*#__PURE__*/_jsx(Modal, {
102
+ transparent: presentation !== 'fullscreen',
103
+ visible: visible,
104
+ animationType: resolvedAnimationType,
105
+ supportedOrientations: supportedOrientations,
106
+ statusBarTranslucent: statusBarTranslucent,
107
+ testID: testID,
108
+ onRequestClose: onClose,
109
+ children: /*#__PURE__*/_jsx(View, {
110
+ style: [presentationStyle.backdrop, backdropStyle, containerStyle],
111
+ children: presentation === 'bottom' ? /*#__PURE__*/_jsxs(_Fragment, {
112
+ children: [closeOnBackdropPress && /*#__PURE__*/_jsx(Pressable, {
113
+ style: styles.backdropDismiss,
114
+ onPress: handleBackdropPress
115
+ }), renderContent()]
116
+ }) : presentation === 'center' ? /*#__PURE__*/_jsx(Pressable, {
117
+ style: [styles.backdropDismiss, {
118
+ justifyContent: 'center',
119
+ alignItems: 'center'
120
+ }],
121
+ onPress: handleBackdropPress,
122
+ children: /*#__PURE__*/_jsx(Pressable, {
123
+ onPress: () => {},
124
+ children: renderContent()
125
+ })
126
+ }) : renderContent()
127
+ })
128
+ });
129
+ };
130
+ export default CustomModal;
131
+ export { useCustomModal } from "./useCustomModal.js";
132
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["useMemo","Modal","Pressable","ScrollView","Text","View","CloseButton","ModalFooter","presentationStyles","styles","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","CustomModal","visible","onClose","title","description","children","presentation","showCloseButton","closeOnBackdropPress","animationType","scrollable","containerStyle","backdropStyle","contentStyle","headerStyle","titleStyle","descriptionStyle","bodyStyle","footerStyle","footer","primaryAction","secondaryAction","closeImage","supportedOrientations","statusBarTranslucent","testID","presentationStyle","resolvedAnimationType","contentInnerStyle","fullscreenContentInner","bottomContentInner","contentInner","showHeader","Boolean","handleBackdropPress","renderBody","style","body","scrollBody","showsVerticalScrollIndicator","bounces","renderContent","content","onPress","handle","header","headerText","closeButton","transparent","onRequestClose","backdrop","backdropDismiss","justifyContent","alignItems","useCustomModal"],"sourceRoot":"../../../../src","sources":["components/customModal/index.tsx"],"mappings":";;AAAA,SAASA,OAAO,QAAQ,OAAO;AAC/B,SAASC,KAAK,EAAEC,SAAS,EAAEC,UAAU,EAAEC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AAEvE,OAAOC,WAAW,MAAM,yBAAgB;AACxC,OAAOC,WAAW,MAAM,kBAAe;AACvC,SAASC,kBAAkB,EAAEC,MAAM,QAAQ,aAAU;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA,EAAAC,QAAA,IAAAC,SAAA;AAGtD,MAAMC,WAAW,GAAGA,CAAC;EACnBC,OAAO;EACPC,OAAO;E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AC,CAAY;MAAC,CAClD,CAAC,GAEZA,aAAa,CAAC;IACf,CACG;EAAC,CACF,CAAC;AAEZ,CAAC;AAED,eAAezC,WAAW;AAC1B,SAASsD,cAAc,QAAQ,qBAAkB","ignoreList":[]}
@@ -0,0 +1,123 @@
1
+ "use strict";
2
+
3
+ import { StyleSheet } from 'react-native';
4
+ export const presentationStyles = {
5
+ center: {
6
+ backdrop: {
7
+ flex: 1,
8
+ backgroundColor: 'rgba(0, 0, 0, 0.5)',
9
+ justifyContent: 'center',
10
+ alignItems: 'center',
11
+ padding: 20
12
+ },
13
+ content: {
14
+ width: '100%',
15
+ maxWidth: 400,
16
+ maxHeight: '80%',
17
+ backgroundColor: '#FFFFFF',
18
+ borderRadius: 12,
19
+ overflow: 'hidden'
20
+ },
21
+ animationType: 'fade'
22
+ },
23
+ bottom: {
24
+ backdrop: {
25
+ flex: 1,
26
+ backgroundColor: 'rgba(0, 0, 0, 0.5)',
27
+ justifyContent: 'flex-end'
28
+ },
29
+ content: {
30
+ width: '100%',
31
+ maxHeight: '85%',
32
+ backgroundColor: '#FFFFFF',
33
+ borderTopLeftRadius: 16,
34
+ borderTopRightRadius: 16,
35
+ overflow: 'hidden'
36
+ },
37
+ animationType: 'slide'
38
+ },
39
+ fullscreen: {
40
+ backdrop: {
41
+ flex: 1,
42
+ backgroundColor: '#FFFFFF'
43
+ },
44
+ content: {
45
+ flex: 1,
46
+ width: '100%',
47
+ backgroundColor: '#FFFFFF'
48
+ },
49
+ animationType: 'slide'
50
+ }
51
+ };
52
+ export const styles = StyleSheet.create({
53
+ backdropDismiss: {
54
+ ...StyleSheet.absoluteFill
55
+ },
56
+ contentInner: {
57
+ paddingHorizontal: 20,
58
+ paddingTop: 20,
59
+ paddingBottom: 16
60
+ },
61
+ bottomContentInner: {
62
+ paddingHorizontal: 20,
63
+ paddingTop: 12,
64
+ paddingBottom: 24
65
+ },
66
+ fullscreenContentInner: {
67
+ flex: 1,
68
+ paddingHorizontal: 20,
69
+ paddingTop: 56,
70
+ paddingBottom: 20
71
+ },
72
+ handle: {
73
+ alignSelf: 'center',
74
+ width: 40,
75
+ height: 4,
76
+ borderRadius: 2,
77
+ backgroundColor: '#DEE2E6',
78
+ marginTop: 12,
79
+ marginBottom: 8
80
+ },
81
+ header: {
82
+ flexDirection: 'row',
83
+ alignItems: 'flex-start',
84
+ justifyContent: 'space-between',
85
+ gap: 12,
86
+ marginBottom: 12
87
+ },
88
+ headerText: {
89
+ flex: 1,
90
+ gap: 6
91
+ },
92
+ title: {
93
+ fontSize: 18,
94
+ fontWeight: '700',
95
+ color: '#212529'
96
+ },
97
+ description: {
98
+ fontSize: 14,
99
+ color: '#6C757D',
100
+ lineHeight: 20
101
+ },
102
+ closeButton: {
103
+ position: 'relative',
104
+ top: 0,
105
+ right: 0
106
+ },
107
+ body: {
108
+ flexGrow: 0
109
+ },
110
+ scrollBody: {
111
+ maxHeight: 320
112
+ },
113
+ footer: {
114
+ flexDirection: 'row',
115
+ gap: 10,
116
+ marginTop: 16
117
+ },
118
+ footerButton: {
119
+ flex: 1,
120
+ alignSelf: 'auto'
121
+ }
122
+ });
123
+ //# sourceMappingURL=styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["StyleSheet","presentationStyles","center","backdrop","flex","backgroundColor","justifyContent","alignItems","padding","content","width","maxWidth","maxHeight","borderRadius","overflow","animationType","bottom","borderTopLeftRadius","borderTopRightRadius","fullscreen","styles","create","backdropDismiss","absoluteFill","contentInner","paddingHorizontal","paddingTop","paddingBottom","bottomContentInner","fullscreenContentInner","handle","alignSelf","height","marginTop","marginBottom","header","flexDirection","gap","headerText","title","fontSize","fontWeight","color","description","lineHeight","closeButton","position","top","right","body","flexGrow","scrollBody","footer","footerButton"],"sourceRoot":"../../../../src","sources":["components/customModal/styles.ts"],"mappings":";;AAAA,SAASA,UAAU,QAAwB,cAAc;AAIzD,OAAO,MAAMC,kBAOZ,GAAG;EACFC,MAAM,EAAE;IACNC,QAAQ,EAAE;MACRC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Root":"../../../../src","sources":["components/customModal/types.ts"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+
3
+ import { useCallback, useState } from 'react';
4
+ export const useCustomModal = (initialVisible = false) => {
5
+ const [visible, setVisible] = useState(initialVisible);
6
+ const open = useCallback(() => {
7
+ setVisible(true);
8
+ }, []);
9
+ const close = useCallback(() => {
10
+ setVisible(false);
11
+ }, []);
12
+ const toggle = useCallback(() => {
13
+ setVisible(current => !current);
14
+ }, []);
15
+ return {
16
+ visible,
17
+ setVisible,
18
+ open,
19
+ close,
20
+ toggle
21
+ };
22
+ };
23
+ //# sourceMappingURL=useCustomModal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["useCallback","useState","useCustomModal","initialVisible","visible","setVisible","open","close","toggle","current"],"sourceRoot":"../../../../src","sources":["components/customModal/useCustomModal.ts"],"mappings":";;AAAA,SAASA,WAAW,EAAEC,QAAQ,QAAQ,OAAO;AAE7C,OAAO,MAAMC,cAAc,GAAGA,CAACC,cAAc,GAAG,KAAK,KAAK;EACxD,MAAM,CAACC,OAAO,EAAEC,UAAU,CAAC,GAAGJ,QAAQ,CAACE,cAAc,CAAC;EAEtD,MAAMG,IAAI,GAAGN,WAAW,CAAC,MAAM;IAC7BK,UAAU,CAAC,IAAI,CAAC;EAClB,CAAC,EAAE,EAAE,CAAC;EAEN,MAAME,KAAK,GAAGP,WAAW,CAAC,MAAM;IAC9BK,UAAU,CAAC,KAAK,CAAC;EACnB,CAAC,EAAE,EAAE,CAAC;EAEN,MAAMG,MAAM,GAAGR,WAAW,CAAC,MAAM;IAC/BK,UAAU,CAAEI,OAAO,IAAK,CAACA,OAAO,CAAC;EACnC,CAAC,EAAE,EAAE,CAAC;EAEN,OAAO;IACLL,OAAO;IACPC,UAAU;IACVC,IAAI;IACJC,KAAK;IACLC;EACF,CAAC;AACH,CAAC","ignoreList":[]}
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+
3
+ import { useState } from 'react';
4
+ import { Pressable, Text } from 'react-native';
5
+ import { styles } from "./styles.js";
6
+ import { jsx as _jsx } from "react/jsx-runtime";
7
+ const NumberPadKey = ({
8
+ config,
9
+ onPress,
10
+ keyStyle,
11
+ keyTextStyle,
12
+ theme,
13
+ sizeStyle,
14
+ disabled = false
15
+ }) => {
16
+ const [pressed, setPressed] = useState(false);
17
+ const isDisabled = disabled || config.disabled;
18
+ const isMuted = config.type === 'backspace' || config.type === 'decimal';
19
+ return /*#__PURE__*/_jsx(Pressable, {
20
+ accessibilityRole: "keyboardkey",
21
+ accessibilityLabel: config.accessibilityLabel ?? (typeof config.label === 'string' ? config.label : config.id),
22
+ accessibilityState: {
23
+ disabled: isDisabled
24
+ },
25
+ disabled: isDisabled,
26
+ onPress: onPress,
27
+ onPressIn: () => setPressed(true),
28
+ onPressOut: () => setPressed(false),
29
+ style: [styles.key, sizeStyle.key, theme.key, {
30
+ flex: config.flex ?? 1
31
+ }, pressed && !isDisabled && theme.keyPressed, isDisabled && theme.keyDisabled, keyStyle],
32
+ children: /*#__PURE__*/_jsx(Text, {
33
+ style: [styles.keyText, sizeStyle.keyText, isMuted ? theme.keyTextMuted : theme.keyText, keyTextStyle],
34
+ children: config.label
35
+ })
36
+ });
37
+ };
38
+ export default NumberPadKey;
39
+ //# sourceMappingURL=NumberPadKey.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["useState","Pressable","Text","styles","jsx","_jsx","NumberPadKey","config","onPress","keyStyle","keyTextStyle","theme","sizeStyle","disabled","pressed","setPressed","isDisabled","isMuted","type","accessibilityRole","accessibilityLabel","label","id","accessibilityState","onPressIn","onPressOut","style","key","flex","keyPressed","keyDisabled","children","keyText","keyTextMuted"],"sourceRoot":"../../../../src","sources":["components/customNumberPad/NumberPadKey.tsx"],"mappings":";;AAAA,SAASA,QAAQ,QAAQ,OAAO;AAChC,SACEC,SAAS,EACTC,IAAI,QAIC,cAAc;AAErB,SAASC,MAAM,QAAQ,aAAU;AAAC,SAAAC,GAAA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OAAO,GAAGN,KAAK,CAACsB,YAAY,GAAGtB,KAAK,CAACqB,OAAO,EAC5CtB,YAAY,CACZ;MAAAqB,QAAA,EAEDxB,MAAM,CAACc;IAAK,CACT;EAAC,CACE,CAAC;AAEhB,CAAC;AAED,eAAef,YAAY","ignoreList":[]}
@@ -0,0 +1,156 @@
1
+ "use strict";
2
+
3
+ import { useCallback, useMemo } from 'react';
4
+ import { View } from 'react-native';
5
+ import NumberPadKey from "./NumberPadKey.js";
6
+ import { sizeStyles, styles, variantTheme } from "./styles.js";
7
+ import { applyNumberPadKey, NUMBER_PAD_ROWS } from "./utils.js";
8
+ import { jsx as _jsx } from "react/jsx-runtime";
9
+ const CustomNumberPad = ({
10
+ onKeyPress,
11
+ onBackspace,
12
+ value,
13
+ onChange,
14
+ maxLength,
15
+ allowDecimal = false,
16
+ decimalPlaces,
17
+ variant = 'default',
18
+ size = 'md',
19
+ disabled = false,
20
+ containerStyle,
21
+ rowStyle,
22
+ keyStyle,
23
+ keyTextStyle,
24
+ backspaceLabel = '⌫',
25
+ bottomLeftKey,
26
+ renderKey
27
+ }) => {
28
+ const theme = variantTheme[variant];
29
+ const sizing = sizeStyles[size];
30
+ const inputRules = useMemo(() => ({
31
+ maxLength,
32
+ allowDecimal,
33
+ decimalPlaces
34
+ }), [allowDecimal, decimalPlaces, maxLength]);
35
+ const handleKey = useCallback((key, customPress) => {
36
+ if (disabled) {
37
+ return;
38
+ }
39
+ if (customPress) {
40
+ customPress();
41
+ return;
42
+ }
43
+ if (key === 'backspace') {
44
+ onBackspace?.();
45
+ if (onChange) {
46
+ onChange(applyNumberPadKey(value ?? '', 'backspace', inputRules) ?? '');
47
+ }
48
+ onKeyPress?.('backspace');
49
+ return;
50
+ }
51
+ onKeyPress?.(key);
52
+ if (onChange) {
53
+ const next = applyNumberPadKey(value ?? '', key, inputRules);
54
+ if (next != null) {
55
+ onChange(next);
56
+ }
57
+ }
58
+ }, [disabled, inputRules, onBackspace, onChange, onKeyPress, value]);
59
+ const digitRows = useMemo(() => NUMBER_PAD_ROWS.map(row => row.map(digit => ({
60
+ id: digit,
61
+ label: digit,
62
+ value: digit,
63
+ type: 'digit',
64
+ accessibilityLabel: `Number ${digit}`
65
+ }))), []);
66
+ const bottomRow = useMemo(() => {
67
+ const keys = [];
68
+ if (bottomLeftKey) {
69
+ keys.push({
70
+ id: 'custom-bottom-left',
71
+ label: bottomLeftKey.label,
72
+ type: 'custom',
73
+ onPress: bottomLeftKey.onPress,
74
+ disabled: bottomLeftKey.disabled,
75
+ accessibilityLabel: bottomLeftKey.accessibilityLabel
76
+ });
77
+ } else if (allowDecimal) {
78
+ keys.push({
79
+ id: 'decimal',
80
+ label: '.',
81
+ value: '.',
82
+ type: 'decimal',
83
+ accessibilityLabel: 'Decimal point'
84
+ });
85
+ } else {
86
+ keys.push({
87
+ id: 'spacer',
88
+ label: '',
89
+ type: 'custom',
90
+ flex: 1
91
+ });
92
+ }
93
+ keys.push({
94
+ id: '0',
95
+ label: '0',
96
+ value: '0',
97
+ type: 'digit',
98
+ accessibilityLabel: 'Number 0'
99
+ });
100
+ keys.push({
101
+ id: 'backspace',
102
+ label: backspaceLabel,
103
+ value: 'backspace',
104
+ type: 'backspace',
105
+ accessibilityLabel: 'Backspace'
106
+ });
107
+ return keys;
108
+ }, [allowDecimal, backspaceLabel, bottomLeftKey]);
109
+ const rows = [...digitRows, bottomRow];
110
+ const renderPadKey = config => {
111
+ if (config.id === 'spacer') {
112
+ return /*#__PURE__*/_jsx(View, {
113
+ style: styles.spacer
114
+ }, config.id);
115
+ }
116
+ const onPress = () => {
117
+ if (config.type === 'custom') {
118
+ handleKey('', config.onPress);
119
+ return;
120
+ }
121
+ handleKey(config.value ?? '');
122
+ };
123
+ if (renderKey) {
124
+ return /*#__PURE__*/_jsx(View, {
125
+ style: {
126
+ flex: config.flex ?? 1
127
+ },
128
+ children: renderKey(config, onPress)
129
+ }, config.id);
130
+ }
131
+ return /*#__PURE__*/_jsx(NumberPadKey, {
132
+ config: config,
133
+ disabled: disabled,
134
+ keyStyle: keyStyle,
135
+ keyTextStyle: keyTextStyle,
136
+ onPress: onPress,
137
+ sizeStyle: sizing,
138
+ theme: theme
139
+ }, config.id);
140
+ };
141
+ return /*#__PURE__*/_jsx(View, {
142
+ style: [styles.container, theme.container, {
143
+ gap: sizing.gap
144
+ }, containerStyle],
145
+ children: rows.map((row, rowIndex) => /*#__PURE__*/_jsx(View, {
146
+ style: [styles.row, {
147
+ gap: sizing.gap
148
+ }, rowStyle],
149
+ children: row.map(renderPadKey)
150
+ }, `row-${rowIndex}`))
151
+ });
152
+ };
153
+ export default CustomNumberPad;
154
+ export { applyNumberPadKey, NUMBER_PAD_ROWS } from "./utils.js";
155
+ export { useNumberPadInput } from "./useNumberPadInput.js";
156
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["useCallback","useMemo","View","NumberPadKey","sizeStyles","styles","variantTheme","applyNumberPadKey","NUMBER_PAD_ROWS","jsx","_jsx","CustomNumberPad","onKeyPress","onBackspace","value","onChange","maxLength","allowDecimal","decimalPlaces","variant","size","disabled","containerStyle","rowStyle","keyStyle","keyTextStyle","backspaceLabel","bottomLeftKey","renderKey","theme","sizing","inputRules","handleKey","key","customPress","next","digitRows","map","row","digit","id","label","type","accessibilityLabel","bottomRow","keys","push","onPress","flex","rows","renderPadKey","config","style","spacer","children","sizeStyle","container","gap","rowIndex","useNumberPadInput"],"sourceRoot":"../../../../src","sources":["components/customNumberPad/index.tsx"],"mappings":";;AAAA,SAASA,WAAW,EAAEC,OAAO,QAAQ,OAAO;AAC5C,SAASC,IAAI,QAAQ,cAAc;AAEnC,OAAOC,YAAY,MAAM,mBAAgB;AACzC,SAASC,UAAU,EAAEC,MAAM,EAAEC,YAAY,QAAQ,aAAU;AAE3D,SAASC,iBAAiB,EAAEC,eAAe,QAAQ,YAAS;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAE7D,MAAMC,eAAe,GAAGA,CAAC;EACvBC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Q;MACjBQ,SAAS,EAAEzB,MAAO;MAClBD,KAAK,EAAEA;IAAM,GAPRsB,MAAM,CAACX,EAQb,CAAC;EAEN,CAAC;EAED,oBACE9B,IAAA,CAACR,IAAI;IACHkD,KAAK,EAAE,CACL/C,MAAM,CAACmD,SAAS,EAChB3B,KAAK,CAAC2B,SAAS,EACf;MAAEC,GAAG,EAAE3B,MAAM,CAAC2B;IAAI,CAAC,EACnBnC,cAAc,CACd;IAAAgC,QAAA,EAEDL,IAAI,CAACZ,GAAG,CAAC,CAACC,GAAG,EAAEoB,QAAQ,kBACtBhD,IAAA,CAACR,IAAI;MAEHkD,KAAK,EAAE,CAAC/C,MAAM,CAACiC,GAAG,EAAE;QAAEmB,GAAG,EAAE3B,MAAM,CAAC2B;MAAI,CAAC,EAAElC,QAAQ,CAAE;MAAA+B,QAAA,EAElDhB,GAAG,CAACD,GAAG,CAACa,YAAY;IAAC,GAHjB,OAAOQ,QAAQ,EAIhB,CACP;EAAC,CACE,CAAC;AAEX,CAAC;AAED,eAAe/C,eAAe;AAC9B,SAASJ,iBAAiB,EAAEC,eAAe,QAAQ,YAAS;AAC5D,SAASmD,iBAAiB,QAAQ,wBAAqB","ignoreList":[]}
@@ -0,0 +1,131 @@
1
+ "use strict";
2
+
3
+ import { StyleSheet } from 'react-native';
4
+ export const sizeStyles = {
5
+ sm: {
6
+ key: {
7
+ minHeight: 44,
8
+ borderRadius: 8
9
+ },
10
+ keyText: {
11
+ fontSize: 20
12
+ },
13
+ gap: 8
14
+ },
15
+ md: {
16
+ key: {
17
+ minHeight: 52,
18
+ borderRadius: 10
19
+ },
20
+ keyText: {
21
+ fontSize: 24
22
+ },
23
+ gap: 10
24
+ },
25
+ lg: {
26
+ key: {
27
+ minHeight: 60,
28
+ borderRadius: 12
29
+ },
30
+ keyText: {
31
+ fontSize: 28
32
+ },
33
+ gap: 12
34
+ }
35
+ };
36
+ export const variantTheme = {
37
+ default: {
38
+ container: {
39
+ backgroundColor: '#F8F9FA'
40
+ },
41
+ key: {
42
+ backgroundColor: '#FFFFFF',
43
+ borderWidth: 1,
44
+ borderColor: '#E9ECEF'
45
+ },
46
+ keyPressed: {
47
+ backgroundColor: '#E9ECEF'
48
+ },
49
+ keyText: {
50
+ color: '#212529',
51
+ fontWeight: '600'
52
+ },
53
+ keyTextMuted: {
54
+ color: '#6C757D',
55
+ fontWeight: '600'
56
+ },
57
+ keyDisabled: {
58
+ opacity: 0.45
59
+ }
60
+ },
61
+ primary: {
62
+ container: {
63
+ backgroundColor: '#E7F1FF'
64
+ },
65
+ key: {
66
+ backgroundColor: '#FFFFFF',
67
+ borderWidth: 1,
68
+ borderColor: '#B6D4FE'
69
+ },
70
+ keyPressed: {
71
+ backgroundColor: '#CFE2FF'
72
+ },
73
+ keyText: {
74
+ color: '#0D6EFD',
75
+ fontWeight: '700'
76
+ },
77
+ keyTextMuted: {
78
+ color: '#6EA8FE',
79
+ fontWeight: '700'
80
+ },
81
+ keyDisabled: {
82
+ opacity: 0.45
83
+ }
84
+ },
85
+ dark: {
86
+ container: {
87
+ backgroundColor: '#212529'
88
+ },
89
+ key: {
90
+ backgroundColor: '#343A40',
91
+ borderWidth: 1,
92
+ borderColor: '#495057'
93
+ },
94
+ keyPressed: {
95
+ backgroundColor: '#495057'
96
+ },
97
+ keyText: {
98
+ color: '#F8F9FA',
99
+ fontWeight: '600'
100
+ },
101
+ keyTextMuted: {
102
+ color: '#ADB5BD',
103
+ fontWeight: '600'
104
+ },
105
+ keyDisabled: {
106
+ opacity: 0.45
107
+ }
108
+ }
109
+ };
110
+ export const styles = StyleSheet.create({
111
+ container: {
112
+ padding: 12,
113
+ borderRadius: 16
114
+ },
115
+ row: {
116
+ flexDirection: 'row',
117
+ alignItems: 'stretch'
118
+ },
119
+ key: {
120
+ flex: 1,
121
+ alignItems: 'center',
122
+ justifyContent: 'center'
123
+ },
124
+ keyText: {
125
+ textAlign: 'center'
126
+ },
127
+ spacer: {
128
+ flex: 1
129
+ }
130
+ });
131
+ //# sourceMappingURL=styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["StyleSheet","sizeStyles","sm","key","minHeight","borderRadius","keyText","fontSize","gap","md","lg","variantTheme","default","container","backgroundColor","borderWidth","borderColor","keyPressed","color","fontWeight","keyTextMuted","keyDisabled","opacity","primary","dark","styles","create","padding","row","flexDirection","alignItems","flex","justifyContent","textAlign","spacer"],"sourceRoot":"../../../../src","sources":["components/customNumberPad/styles.ts"],"mappings":";;AAAA,SAASA,UAAU,QAAwC,cAAc;AAIzE,OAAO,MAAMC,UAGZ,GAAG;EACFC,EAAE,EAAE;IACFC,GAAG,EAAE;MACHC,SAAS,EAAE,EAAE;MACbC,YAAY,EAAE;IAChB,CAAC;IACDC,OAAO,EAAE;MACPC,QAAQ,EAAE;IACZ,CAAC;IACDC,GAAG,EAAE;EACP,CAAC;EACDC,EAAE,EAAE;IACFN,GAAG,EAAE;MACHC,SAAS,EAAE,EAAE;MACbC,YAAY,EAAE;IAChB,CAAC;IACDC,OAAO,EAAE;MACPC,QAAQ,EAAE;IACZ,CAAC;IACDC,GAAG,EAAE;EACP,CAAC;EACDE,EAAE,EAAE;IACFP,GAAG,EAAE;MACHC,SAAS,EAAE,EAAE;MACbC,YAAY,EAAE;IAChB,CAAC;IACDC,OAAO,EAAE;MACPC,QAAQ,EAAE;IACZ,CAAC;IACDC,GAAG,EAAE;EACP;AACF,CAAC;AAED,OAAO,MAAMG,YAUZ,GAAG;EACFC,OAAO,EAAE;IACPC,SAAS,EAAE;MACTC,eAAe,EAAE;IACnB,CAAC;IACDX,GAAG,EAAE;MACHW,eAAe,EAAE,SAAS;MAC1BC,WAAW,EAAE,CAAC;MACdC,WAAW,EAAE;IACf,CAAC;IACDC,UAAU,EAAE;MACVH,eAAe,EAAE;IACnB,CAAC;IACDR,OAAO,EAAE;MACPY,KAAK,EAAE,SAAS;MAChBC,UAAU,EAAE;IACd,CAAC;IACDC,YAAY,EAAE;MACZF,KAAK,EAAE,SAAS;MAChBC,U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S,EAAE;EACb,CAAC;EACDC,MAAM,EAAE;IACNH,IAAI,EAAE;EACR;AACF,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+
3
+ export {};
4
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../../src","sources":["components/customNumberPad/types.ts"],"mappings":"","ignoreList":[]}