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,385 @@
1
+ import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
2
+ import {
3
+ Animated,
4
+ Dimensions,
5
+ FlatList,
6
+ View,
7
+ type LayoutChangeEvent,
8
+ type ListRenderItem,
9
+ type NativeScrollEvent,
10
+ type NativeSyntheticEvent,
11
+ } from 'react-native';
12
+
13
+ import AnimatedTabIndicator from './AnimatedTabIndicator';
14
+ import TabBarItem from './TabBarItem';
15
+ import TabScene from './TabScene';
16
+ import { styles } from './styles';
17
+ import {
18
+ buildTabLayoutMetrics,
19
+ getCenteredTabScrollOffset,
20
+ getCenteredTabScrollOffsetFromProgress,
21
+ getMaxTabScrollOffset,
22
+ } from './tabBarScroll';
23
+ import type { CustomSlideTabsProps, SlideTabItem } from './types';
24
+
25
+ const CustomSlideTabs = <TData = unknown, TError = unknown>({
26
+ tabs,
27
+ renderScene,
28
+ fetchSceneData,
29
+ initialIndex = 0,
30
+ lazy = true,
31
+ fetchWhenActive = true,
32
+ refetchOnRevisit = false,
33
+ keepPreviousSceneData = true,
34
+ onTabChange,
35
+ renderTab,
36
+ renderSceneHeader,
37
+ showSceneHeading = true,
38
+ animatedIndicator = true,
39
+ showUnderline = true,
40
+ tabBarStyle,
41
+ tabStyle,
42
+ activeTabStyle,
43
+ tabTextStyle,
44
+ activeTabTextStyle,
45
+ tabImageStyle,
46
+ activeTabImageStyle,
47
+ underlineStyle,
48
+ indicatorPillStyle,
49
+ sceneHeadingStyle,
50
+ sceneSubtitleStyle,
51
+ sceneHeaderStyle,
52
+ sceneContainerStyle,
53
+ sceneStyle,
54
+ pageWidth,
55
+ }: CustomSlideTabsProps<TData, TError>) => {
56
+ const [selectedIndex, setSelectedIndex] = useState(initialIndex);
57
+ const [visitedIndexes, setVisitedIndexes] = useState<Set<number>>(
58
+ () => new Set([initialIndex])
59
+ );
60
+ const [containerWidth, setContainerWidth] = useState(
61
+ pageWidth ?? Dimensions.get('window').width
62
+ );
63
+ const [tabWidthsVersion, setTabWidthsVersion] = useState(0);
64
+
65
+ const tabListRef = useRef<FlatList<SlideTabItem> | null>(null);
66
+ const pagerRef = useRef<FlatList<SlideTabItem> | null>(null);
67
+ const tabWidthsRef = useRef<number[]>([]);
68
+ const tabBarWidthRef = useRef(0);
69
+ const tabBarScrollXRef = useRef(0);
70
+ const tabLayoutMetricsRef = useRef(buildTabLayoutMetrics([]));
71
+ const pagerScrollX = useRef(new Animated.Value(0)).current;
72
+ const tabBarScrollX = useRef(new Animated.Value(0)).current;
73
+
74
+ const resolvedWidth = pageWidth ?? containerWidth;
75
+
76
+ const tabWidthsSnapshot = useMemo(
77
+ () =>
78
+ tabs.map((_, index) =>
79
+ tabWidthsVersion >= 0 ? tabWidthsRef.current[index] : undefined
80
+ ),
81
+ [tabWidthsVersion, tabs]
82
+ );
83
+
84
+ const tabLayoutMetrics = useMemo(() => {
85
+ const metrics = buildTabLayoutMetrics(tabWidthsSnapshot);
86
+ tabLayoutMetricsRef.current = metrics;
87
+ return metrics;
88
+ }, [tabWidthsSnapshot]);
89
+
90
+ const applyTabBarScroll = useCallback(
91
+ (offset: number, animated: boolean) => {
92
+ const maxOffset = getMaxTabScrollOffset(
93
+ tabLayoutMetricsRef.current,
94
+ tabBarWidthRef.current
95
+ );
96
+ const safeOffset = Math.min(maxOffset, Math.max(0, offset));
97
+
98
+ tabListRef.current?.scrollToOffset({
99
+ offset: safeOffset,
100
+ animated,
101
+ });
102
+ tabBarScrollXRef.current = safeOffset;
103
+ tabBarScrollX.setValue(safeOffset);
104
+ },
105
+ [tabBarScrollX]
106
+ );
107
+
108
+ const scrollTabBarToIndex = useCallback(
109
+ (index: number, animated: boolean) => {
110
+ const nextOffset = getCenteredTabScrollOffset(
111
+ index,
112
+ tabLayoutMetricsRef.current,
113
+ tabBarWidthRef.current
114
+ );
115
+
116
+ if (nextOffset == null) {
117
+ return;
118
+ }
119
+
120
+ applyTabBarScroll(nextOffset, animated);
121
+ },
122
+ [applyTabBarScroll]
123
+ );
124
+
125
+ const scrollTabBarToProgress = useCallback(
126
+ (progress: number, animated: boolean) => {
127
+ const nextOffset = getCenteredTabScrollOffsetFromProgress(
128
+ progress,
129
+ tabLayoutMetricsRef.current,
130
+ tabBarWidthRef.current
131
+ );
132
+
133
+ if (nextOffset == null) {
134
+ return;
135
+ }
136
+
137
+ applyTabBarScroll(nextOffset, animated);
138
+ },
139
+ [applyTabBarScroll]
140
+ );
141
+
142
+ const handleTabMeasure = useCallback((index: number, width: number) => {
143
+ if (tabWidthsRef.current[index] === width) {
144
+ return;
145
+ }
146
+
147
+ tabWidthsRef.current[index] = width;
148
+ setTabWidthsVersion((current) => current + 1);
149
+ }, []);
150
+
151
+ const scrollPagerToIndex = useCallback((index: number, animated = true) => {
152
+ pagerRef.current?.scrollToIndex({ index, animated });
153
+ }, []);
154
+
155
+ const selectTab = useCallback(
156
+ (index: number, animated = true) => {
157
+ if (index < 0 || index >= tabs.length) {
158
+ return;
159
+ }
160
+
161
+ setSelectedIndex(index);
162
+ setVisitedIndexes((current) => {
163
+ const next = new Set(current);
164
+ next.add(index);
165
+ return next;
166
+ });
167
+ scrollPagerToIndex(index, animated);
168
+ onTabChange?.(index, tabs[index]!);
169
+ },
170
+ [onTabChange, scrollPagerToIndex, tabs]
171
+ );
172
+
173
+ const onPagerMomentumEnd = useCallback(
174
+ (event: NativeSyntheticEvent<NativeScrollEvent>) => {
175
+ const offsetX = event.nativeEvent.contentOffset.x;
176
+ const nextIndex = Math.round(offsetX / resolvedWidth);
177
+ const safeIndex = Math.max(0, Math.min(nextIndex, tabs.length - 1));
178
+
179
+ if (safeIndex !== selectedIndex) {
180
+ setSelectedIndex(safeIndex);
181
+ setVisitedIndexes((current) => {
182
+ const next = new Set(current);
183
+ next.add(safeIndex);
184
+ return next;
185
+ });
186
+ onTabChange?.(safeIndex, tabs[safeIndex]!);
187
+ }
188
+ },
189
+ [onTabChange, resolvedWidth, selectedIndex, tabs]
190
+ );
191
+
192
+ const onContainerLayout = useCallback(
193
+ (event: LayoutChangeEvent) => {
194
+ if (!pageWidth) {
195
+ setContainerWidth(event.nativeEvent.layout.width);
196
+ }
197
+ },
198
+ [pageWidth]
199
+ );
200
+
201
+ const onTabBarLayout = useCallback(
202
+ (event: LayoutChangeEvent) => {
203
+ tabBarWidthRef.current = event.nativeEvent.layout.width;
204
+ scrollTabBarToIndex(selectedIndex, false);
205
+ },
206
+ [scrollTabBarToIndex, selectedIndex]
207
+ );
208
+
209
+ const onTabBarScroll = useMemo(
210
+ () =>
211
+ Animated.event(
212
+ [{ nativeEvent: { contentOffset: { x: tabBarScrollX } } }],
213
+ {
214
+ useNativeDriver: false,
215
+ listener: (event: NativeSyntheticEvent<NativeScrollEvent>) => {
216
+ tabBarScrollXRef.current = event.nativeEvent.contentOffset.x;
217
+ },
218
+ }
219
+ ),
220
+ [tabBarScrollX]
221
+ );
222
+
223
+ const onPagerScroll = useMemo(
224
+ () =>
225
+ Animated.event(
226
+ [{ nativeEvent: { contentOffset: { x: pagerScrollX } } }],
227
+ {
228
+ useNativeDriver: false,
229
+ listener: (event: NativeSyntheticEvent<NativeScrollEvent>) => {
230
+ if (resolvedWidth <= 0) {
231
+ return;
232
+ }
233
+
234
+ const progress = event.nativeEvent.contentOffset.x / resolvedWidth;
235
+ scrollTabBarToProgress(progress, false);
236
+ },
237
+ }
238
+ ),
239
+ [pagerScrollX, resolvedWidth, scrollTabBarToProgress]
240
+ );
241
+
242
+ useEffect(() => {
243
+ pagerScrollX.setValue(initialIndex * resolvedWidth);
244
+ }, [initialIndex, pagerScrollX, resolvedWidth]);
245
+
246
+ useEffect(() => {
247
+ tabWidthsRef.current = [];
248
+ setTabWidthsVersion((current) => current + 1);
249
+ }, [tabs]);
250
+
251
+ useEffect(() => {
252
+ scrollPagerToIndex(initialIndex, false);
253
+ scrollTabBarToIndex(initialIndex, false);
254
+ }, [initialIndex, scrollPagerToIndex, scrollTabBarToIndex]);
255
+
256
+ useEffect(() => {
257
+ if (tabLayoutMetrics.some((metric) => metric.width > 0)) {
258
+ scrollTabBarToIndex(selectedIndex, false);
259
+ }
260
+ }, [tabLayoutMetrics, scrollTabBarToIndex, selectedIndex]);
261
+
262
+ const tabBarData = useMemo(() => tabs, [tabs]);
263
+
264
+ const renderPagerItem: ListRenderItem<SlideTabItem> = useCallback(
265
+ ({ item, index }) => (
266
+ <View style={{ width: resolvedWidth }}>
267
+ <TabScene
268
+ tab={item}
269
+ index={index}
270
+ isActive={selectedIndex === index}
271
+ shouldMount={!lazy || visitedIndexes.has(index)}
272
+ fetchSceneData={fetchSceneData}
273
+ fetchWhenActive={fetchWhenActive}
274
+ refetchOnRevisit={refetchOnRevisit}
275
+ keepPreviousSceneData={keepPreviousSceneData}
276
+ renderScene={renderScene}
277
+ renderSceneHeader={renderSceneHeader}
278
+ showSceneHeading={showSceneHeading}
279
+ sceneStyle={sceneStyle}
280
+ sceneHeaderStyle={sceneHeaderStyle}
281
+ sceneHeadingStyle={sceneHeadingStyle}
282
+ sceneSubtitleStyle={sceneSubtitleStyle}
283
+ />
284
+ </View>
285
+ ),
286
+ [
287
+ fetchSceneData,
288
+ fetchWhenActive,
289
+ keepPreviousSceneData,
290
+ lazy,
291
+ refetchOnRevisit,
292
+ renderScene,
293
+ renderSceneHeader,
294
+ resolvedWidth,
295
+ sceneHeaderStyle,
296
+ sceneHeadingStyle,
297
+ sceneStyle,
298
+ sceneSubtitleStyle,
299
+ selectedIndex,
300
+ showSceneHeading,
301
+ visitedIndexes,
302
+ ]
303
+ );
304
+
305
+ return (
306
+ <View style={styles.container} onLayout={onContainerLayout}>
307
+ <View style={[styles.tabBar, tabBarStyle]} onLayout={onTabBarLayout}>
308
+ {animatedIndicator && (
309
+ <AnimatedTabIndicator
310
+ metrics={tabLayoutMetrics}
311
+ pagerScrollX={pagerScrollX}
312
+ tabBarScrollX={tabBarScrollX}
313
+ pageWidth={resolvedWidth}
314
+ initialScrollX={selectedIndex * resolvedWidth}
315
+ showPill
316
+ showUnderline={showUnderline}
317
+ pillStyle={indicatorPillStyle}
318
+ underlineStyle={underlineStyle}
319
+ />
320
+ )}
321
+ <FlatList
322
+ ref={tabListRef}
323
+ horizontal
324
+ showsHorizontalScrollIndicator={false}
325
+ data={tabBarData}
326
+ keyExtractor={(item) => item.key}
327
+ contentContainerStyle={styles.tabBarContent}
328
+ scrollEventThrottle={16}
329
+ onScroll={onTabBarScroll}
330
+ renderItem={({ item, index }) => (
331
+ <TabBarItem
332
+ item={item}
333
+ index={index}
334
+ isActive={selectedIndex === index}
335
+ showUnderline={showUnderline}
336
+ useAnimatedIndicator={animatedIndicator}
337
+ renderTab={renderTab}
338
+ tabStyle={tabStyle}
339
+ activeTabStyle={activeTabStyle}
340
+ tabTextStyle={tabTextStyle}
341
+ activeTabTextStyle={activeTabTextStyle}
342
+ tabImageStyle={tabImageStyle}
343
+ activeTabImageStyle={activeTabImageStyle}
344
+ underlineStyle={underlineStyle}
345
+ onMeasure={handleTabMeasure}
346
+ onPress={selectTab}
347
+ />
348
+ )}
349
+ />
350
+ </View>
351
+
352
+ <Animated.FlatList
353
+ ref={pagerRef}
354
+ horizontal
355
+ pagingEnabled
356
+ bounces={false}
357
+ scrollEventThrottle={16}
358
+ showsHorizontalScrollIndicator={false}
359
+ data={tabBarData}
360
+ keyExtractor={(item) => `scene-${item.key}`}
361
+ style={[styles.pager, sceneContainerStyle]}
362
+ getItemLayout={(_, index) => ({
363
+ length: resolvedWidth,
364
+ offset: resolvedWidth * index,
365
+ index,
366
+ })}
367
+ onScroll={onPagerScroll}
368
+ onMomentumScrollEnd={onPagerMomentumEnd}
369
+ onScrollToIndexFailed={({ index }) => {
370
+ setTimeout(() => scrollPagerToIndex(index), 100);
371
+ }}
372
+ renderItem={renderPagerItem}
373
+ />
374
+ </View>
375
+ );
376
+ };
377
+
378
+ export default CustomSlideTabs;
379
+ export type {
380
+ CustomSlideTabsProps,
381
+ SlideTabItem,
382
+ SlideTabSceneState,
383
+ SlideTabFetcher,
384
+ SlideTabIconComponent,
385
+ } from './types';
@@ -0,0 +1,136 @@
1
+ import {
2
+ StyleSheet,
3
+ type ImageStyle,
4
+ type TextStyle,
5
+ type ViewStyle,
6
+ } from 'react-native';
7
+
8
+ export const styles = StyleSheet.create({
9
+ container: {
10
+ flex: 1,
11
+ },
12
+ tabBar: {
13
+ flexGrow: 0,
14
+ position: 'relative',
15
+ overflow: 'hidden',
16
+ },
17
+ tabBarContent: {
18
+ paddingHorizontal: 12,
19
+ gap: 8,
20
+ },
21
+ tabItem: {
22
+ alignItems: 'center',
23
+ justifyContent: 'center',
24
+ paddingHorizontal: 14,
25
+ paddingVertical: 10,
26
+ minWidth: 88,
27
+ zIndex: 1,
28
+ },
29
+ tabItemTransparent: {
30
+ backgroundColor: 'transparent',
31
+ },
32
+ tabItemActive: {
33
+ backgroundColor: '#E7F1FF',
34
+ borderRadius: 10,
35
+ },
36
+ tabContent: {
37
+ flexDirection: 'row',
38
+ alignItems: 'center',
39
+ gap: 8,
40
+ },
41
+ tabImage: {
42
+ width: 18,
43
+ height: 18,
44
+ opacity: 0.7,
45
+ },
46
+ tabImageActive: {
47
+ opacity: 1,
48
+ },
49
+ tabText: {
50
+ fontSize: 13,
51
+ fontWeight: '600',
52
+ color: '#6C757D',
53
+ textTransform: 'uppercase',
54
+ letterSpacing: 0.4,
55
+ },
56
+ tabTextActive: {
57
+ color: '#0D6EFD',
58
+ },
59
+ underline: {
60
+ marginTop: 8,
61
+ height: 3,
62
+ width: '100%',
63
+ borderRadius: 2,
64
+ backgroundColor: '#0D6EFD',
65
+ },
66
+ indicatorPill: {
67
+ position: 'absolute',
68
+ top: 6,
69
+ bottom: 6,
70
+ borderRadius: 10,
71
+ backgroundColor: '#E7F1FF',
72
+ zIndex: 0,
73
+ },
74
+ indicatorUnderline: {
75
+ position: 'absolute',
76
+ bottom: 0,
77
+ height: 3,
78
+ borderRadius: 2,
79
+ backgroundColor: '#0D6EFD',
80
+ zIndex: 2,
81
+ },
82
+ badge: {
83
+ minWidth: 18,
84
+ height: 18,
85
+ borderRadius: 9,
86
+ paddingHorizontal: 5,
87
+ alignItems: 'center',
88
+ justifyContent: 'center',
89
+ backgroundColor: '#DC3545',
90
+ },
91
+ badgeText: {
92
+ fontSize: 10,
93
+ fontWeight: '700',
94
+ color: '#FFFFFF',
95
+ },
96
+ pager: {
97
+ flex: 1,
98
+ },
99
+ scene: {
100
+ flex: 1,
101
+ },
102
+ scenePlaceholder: {
103
+ flex: 1,
104
+ alignItems: 'center',
105
+ justifyContent: 'center',
106
+ padding: 20,
107
+ },
108
+ scenePlaceholderText: {
109
+ fontSize: 14,
110
+ color: '#6C757D',
111
+ },
112
+ sceneHeader: {
113
+ gap: 4,
114
+ marginBottom: 12,
115
+ },
116
+ sceneHeading: {
117
+ fontSize: 20,
118
+ fontWeight: '700',
119
+ color: '#212529',
120
+ },
121
+ sceneSubtitle: {
122
+ fontSize: 14,
123
+ color: '#6C757D',
124
+ lineHeight: 20,
125
+ },
126
+ });
127
+
128
+ export const defaultTheme = {
129
+ tabItem: styles.tabItem as ViewStyle,
130
+ tabItemActive: styles.tabItemActive as ViewStyle,
131
+ tabImage: styles.tabImage as ImageStyle,
132
+ tabImageActive: styles.tabImageActive as ImageStyle,
133
+ tabText: styles.tabText as TextStyle,
134
+ tabTextActive: styles.tabTextActive as TextStyle,
135
+ underline: styles.underline as ViewStyle,
136
+ };
@@ -0,0 +1,92 @@
1
+ export const TAB_BAR_HORIZONTAL_PADDING = 12;
2
+ export const TAB_BAR_ITEM_GAP = 8;
3
+
4
+ export type TabLayoutMetric = {
5
+ offset: number;
6
+ width: number;
7
+ };
8
+
9
+ export const buildTabLayoutMetrics = (
10
+ widths: Array<number | undefined>
11
+ ): TabLayoutMetric[] => {
12
+ let offset = TAB_BAR_HORIZONTAL_PADDING;
13
+
14
+ return widths.map((width) => {
15
+ const safeWidth = width ?? 0;
16
+ const metric = { offset, width: safeWidth };
17
+ offset += safeWidth + TAB_BAR_ITEM_GAP;
18
+ return metric;
19
+ });
20
+ };
21
+
22
+ export const getMaxTabScrollOffset = (
23
+ metrics: TabLayoutMetric[],
24
+ tabBarWidth: number
25
+ ) => {
26
+ if (metrics.length === 0 || tabBarWidth <= 0) {
27
+ return 0;
28
+ }
29
+
30
+ const lastMetric = metrics[metrics.length - 1]!;
31
+ const contentWidth =
32
+ lastMetric.offset + lastMetric.width + TAB_BAR_HORIZONTAL_PADDING;
33
+
34
+ return Math.max(0, contentWidth - tabBarWidth);
35
+ };
36
+
37
+ export const getCenteredTabScrollOffset = (
38
+ index: number,
39
+ metrics: TabLayoutMetric[],
40
+ tabBarWidth: number
41
+ ): number | null => {
42
+ const layout = metrics[index];
43
+
44
+ if (!layout?.width || tabBarWidth <= 0) {
45
+ return null;
46
+ }
47
+
48
+ const tabCenter = layout.offset + layout.width / 2;
49
+ const maxOffset = getMaxTabScrollOffset(metrics, tabBarWidth);
50
+
51
+ return Math.min(maxOffset, Math.max(0, tabCenter - tabBarWidth / 2));
52
+ };
53
+
54
+ export const getCenteredTabScrollOffsetFromProgress = (
55
+ progress: number,
56
+ metrics: TabLayoutMetric[],
57
+ tabBarWidth: number
58
+ ): number | null => {
59
+ const { left, width } = getIndicatorAtProgress(progress, metrics);
60
+
61
+ if (width <= 0 || tabBarWidth <= 0) {
62
+ return null;
63
+ }
64
+
65
+ const tabCenter = left + width / 2;
66
+ const maxOffset = getMaxTabScrollOffset(metrics, tabBarWidth);
67
+
68
+ return Math.min(maxOffset, Math.max(0, tabCenter - tabBarWidth / 2));
69
+ };
70
+
71
+ export const getIndicatorAtProgress = (
72
+ progress: number,
73
+ metrics: TabLayoutMetric[]
74
+ ): { left: number; width: number } => {
75
+ if (metrics.length === 0) {
76
+ return { left: TAB_BAR_HORIZONTAL_PADDING, width: 0 };
77
+ }
78
+
79
+ const maxIndex = metrics.length - 1;
80
+ const clampedProgress = Math.max(0, Math.min(progress, maxIndex));
81
+ const baseIndex = Math.min(Math.floor(clampedProgress), maxIndex);
82
+ const nextIndex = Math.min(baseIndex + 1, maxIndex);
83
+ const blend = clampedProgress - baseIndex;
84
+
85
+ const current = metrics[baseIndex]!;
86
+ const next = metrics[nextIndex]!;
87
+
88
+ return {
89
+ left: current.offset + (next.offset - current.offset) * blend,
90
+ width: current.width + (next.width - current.width) * blend,
91
+ };
92
+ };
@@ -0,0 +1,87 @@
1
+ import type { ComponentType, ReactNode } from 'react';
2
+ import type {
3
+ ImageSourcePropType,
4
+ ImageStyle,
5
+ StyleProp,
6
+ TextStyle,
7
+ ViewStyle,
8
+ } from 'react-native';
9
+
10
+ import type { ApiFetcher } from '../../customHooks/types';
11
+
12
+ export type SlideTabIconComponent = ComponentType<{
13
+ size?: number;
14
+ color?: string;
15
+ [key: string]: unknown;
16
+ }>;
17
+
18
+ export type SlideTabItem = {
19
+ key: string;
20
+ title: string;
21
+ /** Custom scene heading — defaults to title when omitted */
22
+ heading?: string;
23
+ /** Optional subtitle shown below scene heading */
24
+ subtitle?: string;
25
+ image?: ImageSourcePropType;
26
+ LeftIcon?: SlideTabIconComponent;
27
+ badge?: number | string;
28
+ };
29
+
30
+ export type SlideTabSceneState<TData, TError = unknown> = {
31
+ tab: SlideTabItem;
32
+ index: number;
33
+ isActive: boolean;
34
+ data: TData | null;
35
+ error: TError | null;
36
+ isIdle: boolean;
37
+ isLoading: boolean;
38
+ isSuccess: boolean;
39
+ isError: boolean;
40
+ refetch: () => Promise<TData | null | undefined>;
41
+ reset: () => void;
42
+ };
43
+
44
+ export type CustomSlideTabsProps<TData = unknown, TError = unknown> = {
45
+ tabs: SlideTabItem[];
46
+ renderScene: (state: SlideTabSceneState<TData, TError>) => ReactNode;
47
+ fetchSceneData?: (
48
+ tab: SlideTabItem,
49
+ index: number,
50
+ signal?: AbortSignal
51
+ ) => Promise<TData>;
52
+ initialIndex?: number;
53
+ lazy?: boolean;
54
+ fetchWhenActive?: boolean;
55
+ refetchOnRevisit?: boolean;
56
+ keepPreviousSceneData?: boolean;
57
+ onTabChange?: (index: number, tab: SlideTabItem) => void;
58
+ /** Fully custom tab label — overrides default title/image layout */
59
+ renderTab?: (
60
+ tab: SlideTabItem,
61
+ index: number,
62
+ isActive: boolean
63
+ ) => ReactNode;
64
+ /** Custom scene heading — overrides heading/subtitle from tab config */
65
+ renderSceneHeader?: (state: SlideTabSceneState<TData, TError>) => ReactNode;
66
+ showSceneHeading?: boolean;
67
+ /** Animated sliding pill + underline on the tab bar */
68
+ animatedIndicator?: boolean;
69
+ showUnderline?: boolean;
70
+ tabBarStyle?: StyleProp<ViewStyle>;
71
+ tabStyle?: StyleProp<ViewStyle>;
72
+ activeTabStyle?: StyleProp<ViewStyle>;
73
+ tabTextStyle?: StyleProp<TextStyle>;
74
+ activeTabTextStyle?: StyleProp<TextStyle>;
75
+ tabImageStyle?: StyleProp<ImageStyle>;
76
+ activeTabImageStyle?: StyleProp<ImageStyle>;
77
+ underlineStyle?: StyleProp<ViewStyle>;
78
+ indicatorPillStyle?: StyleProp<ViewStyle>;
79
+ sceneHeadingStyle?: StyleProp<TextStyle>;
80
+ sceneSubtitleStyle?: StyleProp<TextStyle>;
81
+ sceneHeaderStyle?: StyleProp<ViewStyle>;
82
+ sceneContainerStyle?: StyleProp<ViewStyle>;
83
+ sceneStyle?: StyleProp<ViewStyle>;
84
+ pageWidth?: number;
85
+ };
86
+
87
+ export type SlideTabFetcher<TData> = ApiFetcher<TData>;