@nexara/nativeflow 0.1.1 → 0.1.4

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 (287) hide show
  1. package/lib/commonjs/components/Button/Button.js +61 -47
  2. package/lib/commonjs/components/Button/Button.js.map +1 -1
  3. package/lib/commonjs/components/CheckBox/CheckBox.js +39 -29
  4. package/lib/commonjs/components/CheckBox/CheckBox.js.map +1 -1
  5. package/lib/commonjs/components/Chip/Chip.js +2 -2
  6. package/lib/commonjs/components/Chip/Chip.js.map +1 -1
  7. package/lib/commonjs/components/Dialog/Dialog.js +53 -48
  8. package/lib/commonjs/components/Dialog/Dialog.js.map +1 -1
  9. package/lib/commonjs/components/Dialog/DialogBody.js +6 -8
  10. package/lib/commonjs/components/Dialog/DialogBody.js.map +1 -1
  11. package/lib/commonjs/components/Dialog/DialogDescription.js +5 -8
  12. package/lib/commonjs/components/Dialog/DialogDescription.js.map +1 -1
  13. package/lib/commonjs/components/Dialog/DialogFoot.js +13 -13
  14. package/lib/commonjs/components/Dialog/DialogFoot.js.map +1 -1
  15. package/lib/commonjs/components/Dialog/DialogHead.js +17 -16
  16. package/lib/commonjs/components/Dialog/DialogHead.js.map +1 -1
  17. package/lib/commonjs/components/Divider/Divider.js +5 -9
  18. package/lib/commonjs/components/Divider/Divider.js.map +1 -1
  19. package/lib/commonjs/components/Grid/Grid.js +0 -1
  20. package/lib/commonjs/components/Grid/Grid.js.map +1 -1
  21. package/lib/commonjs/components/Header/Header.js.map +1 -1
  22. package/lib/commonjs/components/Icon/Icon.js +9 -5
  23. package/lib/commonjs/components/Icon/Icon.js.map +1 -1
  24. package/lib/commonjs/components/IconButton/IconButton.js +6 -3
  25. package/lib/commonjs/components/IconButton/IconButton.js.map +1 -1
  26. package/lib/commonjs/components/Link/Link.js +13 -15
  27. package/lib/commonjs/components/Link/Link.js.map +1 -1
  28. package/lib/commonjs/components/Menu/Menu.js +51 -54
  29. package/lib/commonjs/components/Menu/Menu.js.map +1 -1
  30. package/lib/commonjs/components/Menu/MenuItem.js +0 -2
  31. package/lib/commonjs/components/Menu/MenuItem.js.map +1 -1
  32. package/lib/commonjs/components/Portal/Portal.js +1 -1
  33. package/lib/commonjs/components/Portal/Portal.js.map +1 -1
  34. package/lib/commonjs/components/Progress/Progress.js +25 -15
  35. package/lib/commonjs/components/Progress/Progress.js.map +1 -1
  36. package/lib/commonjs/components/Stack/HStack.js +9 -13
  37. package/lib/commonjs/components/Stack/HStack.js.map +1 -1
  38. package/lib/commonjs/components/Stack/VStack.js +5 -6
  39. package/lib/commonjs/components/Stack/VStack.js.map +1 -1
  40. package/lib/commonjs/components/StyledComponents/StyledText.js +11 -14
  41. package/lib/commonjs/components/StyledComponents/StyledText.js.map +1 -1
  42. package/lib/commonjs/components/StyledComponents/StyledView.js +14 -14
  43. package/lib/commonjs/components/StyledComponents/StyledView.js.map +1 -1
  44. package/lib/commonjs/components/Switch/Switch.js +4 -4
  45. package/lib/commonjs/components/Switch/Switch.js.map +1 -1
  46. package/lib/commonjs/components/TouchableRipple/TouchableRipple.js +90 -103
  47. package/lib/commonjs/components/TouchableRipple/TouchableRipple.js.map +1 -1
  48. package/lib/commonjs/components/UserInput/UserInput.js +31 -34
  49. package/lib/commonjs/components/UserInput/UserInput.js.map +1 -1
  50. package/lib/commonjs/helpers/LightenColorShades.js +18 -5
  51. package/lib/commonjs/helpers/LightenColorShades.js.map +1 -1
  52. package/lib/commonjs/helpers/ResponsiveCalculations.js +30 -4
  53. package/lib/commonjs/helpers/ResponsiveCalculations.js.map +1 -1
  54. package/lib/commonjs/helpers/index.js +16 -0
  55. package/lib/commonjs/helpers/index.js.map +1 -1
  56. package/lib/commonjs/index.js +0 -7
  57. package/lib/commonjs/index.js.map +1 -1
  58. package/lib/commonjs/themes/LightTheme.js +1 -3
  59. package/lib/commonjs/themes/LightTheme.js.map +1 -1
  60. package/lib/commonjs/types/index.js +11 -0
  61. package/lib/commonjs/types/index.js.map +1 -1
  62. package/lib/commonjs/types/progress.type.js +2 -0
  63. package/lib/commonjs/types/progress.type.js.map +1 -0
  64. package/lib/module/components/Button/Button.js +62 -48
  65. package/lib/module/components/Button/Button.js.map +1 -1
  66. package/lib/module/components/CheckBox/CheckBox.js +41 -31
  67. package/lib/module/components/CheckBox/CheckBox.js.map +1 -1
  68. package/lib/module/components/Chip/Chip.js +2 -2
  69. package/lib/module/components/Chip/Chip.js.map +1 -1
  70. package/lib/module/components/Dialog/Dialog.js +53 -48
  71. package/lib/module/components/Dialog/Dialog.js.map +1 -1
  72. package/lib/module/components/Dialog/DialogBody.js +7 -9
  73. package/lib/module/components/Dialog/DialogBody.js.map +1 -1
  74. package/lib/module/components/Dialog/DialogDescription.js +6 -9
  75. package/lib/module/components/Dialog/DialogDescription.js.map +1 -1
  76. package/lib/module/components/Dialog/DialogFoot.js +13 -13
  77. package/lib/module/components/Dialog/DialogFoot.js.map +1 -1
  78. package/lib/module/components/Dialog/DialogHead.js +17 -16
  79. package/lib/module/components/Dialog/DialogHead.js.map +1 -1
  80. package/lib/module/components/Divider/Divider.js +5 -9
  81. package/lib/module/components/Divider/Divider.js.map +1 -1
  82. package/lib/module/components/Grid/Grid.js +0 -1
  83. package/lib/module/components/Grid/Grid.js.map +1 -1
  84. package/lib/module/components/Header/Header.js.map +1 -1
  85. package/lib/module/components/Icon/Icon.js +7 -4
  86. package/lib/module/components/Icon/Icon.js.map +1 -1
  87. package/lib/module/components/IconButton/IconButton.js +5 -3
  88. package/lib/module/components/IconButton/IconButton.js.map +1 -1
  89. package/lib/module/components/Link/Link.js +14 -16
  90. package/lib/module/components/Link/Link.js.map +1 -1
  91. package/lib/module/components/Menu/Menu.js +51 -54
  92. package/lib/module/components/Menu/Menu.js.map +1 -1
  93. package/lib/module/components/Menu/MenuItem.js +0 -2
  94. package/lib/module/components/Menu/MenuItem.js.map +1 -1
  95. package/lib/module/components/Portal/Portal.js +1 -1
  96. package/lib/module/components/Portal/Portal.js.map +1 -1
  97. package/lib/module/components/Progress/Progress.js +26 -16
  98. package/lib/module/components/Progress/Progress.js.map +1 -1
  99. package/lib/module/components/Stack/HStack.js +9 -13
  100. package/lib/module/components/Stack/HStack.js.map +1 -1
  101. package/lib/module/components/Stack/VStack.js +6 -7
  102. package/lib/module/components/Stack/VStack.js.map +1 -1
  103. package/lib/module/components/StyledComponents/StyledText.js +12 -15
  104. package/lib/module/components/StyledComponents/StyledText.js.map +1 -1
  105. package/lib/module/components/StyledComponents/StyledView.js +15 -15
  106. package/lib/module/components/StyledComponents/StyledView.js.map +1 -1
  107. package/lib/module/components/Switch/Switch.js +4 -4
  108. package/lib/module/components/Switch/Switch.js.map +1 -1
  109. package/lib/module/components/TouchableRipple/TouchableRipple.js +90 -96
  110. package/lib/module/components/TouchableRipple/TouchableRipple.js.map +1 -1
  111. package/lib/module/components/UserInput/UserInput.js +32 -37
  112. package/lib/module/components/UserInput/UserInput.js.map +1 -1
  113. package/lib/module/components/UserInput/UserInputV2.js.map +1 -1
  114. package/lib/module/helpers/LightenColorShades.js +18 -5
  115. package/lib/module/helpers/LightenColorShades.js.map +1 -1
  116. package/lib/module/helpers/ResponsiveCalculations.js +28 -3
  117. package/lib/module/helpers/ResponsiveCalculations.js.map +1 -1
  118. package/lib/module/helpers/index.js +1 -0
  119. package/lib/module/helpers/index.js.map +1 -1
  120. package/lib/module/index.js +5 -5
  121. package/lib/module/index.js.map +1 -2
  122. package/lib/module/themes/LightTheme.js +1 -2
  123. package/lib/module/themes/LightTheme.js.map +1 -1
  124. package/lib/module/types/index.js +1 -0
  125. package/lib/module/types/index.js.map +1 -1
  126. package/lib/module/types/progress.type.js +2 -0
  127. package/lib/module/types/progress.type.js.map +1 -0
  128. package/lib/typescript/commonjs/src/components/Button/Button.d.ts.map +1 -1
  129. package/lib/typescript/commonjs/src/components/CheckBox/CheckBox.d.ts.map +1 -1
  130. package/lib/typescript/commonjs/src/components/Dialog/Dialog.d.ts.map +1 -1
  131. package/lib/typescript/commonjs/src/components/Dialog/DialogBody.d.ts.map +1 -1
  132. package/lib/typescript/commonjs/src/components/Dialog/DialogFoot.d.ts.map +1 -1
  133. package/lib/typescript/commonjs/src/components/Dialog/DialogHead.d.ts.map +1 -1
  134. package/lib/typescript/commonjs/src/components/Divider/Divider.d.ts.map +1 -1
  135. package/lib/typescript/commonjs/src/components/Grid/Grid.d.ts.map +1 -1
  136. package/lib/typescript/commonjs/src/components/Header/Header.d.ts +1 -0
  137. package/lib/typescript/commonjs/src/components/Header/Header.d.ts.map +1 -1
  138. package/lib/typescript/commonjs/src/components/Icon/Icon.d.ts +1 -1
  139. package/lib/typescript/commonjs/src/components/Icon/Icon.d.ts.map +1 -1
  140. package/lib/typescript/commonjs/src/components/IconButton/IconButton.d.ts +2 -2
  141. package/lib/typescript/commonjs/src/components/IconButton/IconButton.d.ts.map +1 -1
  142. package/lib/typescript/commonjs/src/components/Link/Link.d.ts +4 -0
  143. package/lib/typescript/commonjs/src/components/Link/Link.d.ts.map +1 -1
  144. package/lib/typescript/commonjs/src/components/Menu/Menu.d.ts.map +1 -1
  145. package/lib/typescript/commonjs/src/components/Menu/MenuItem.d.ts.map +1 -1
  146. package/lib/typescript/commonjs/src/components/Portal/Portal.d.ts +1 -1
  147. package/lib/typescript/commonjs/src/components/Portal/Portal.d.ts.map +1 -1
  148. package/lib/typescript/commonjs/src/components/Progress/Progress.d.ts +1 -12
  149. package/lib/typescript/commonjs/src/components/Progress/Progress.d.ts.map +1 -1
  150. package/lib/typescript/commonjs/src/components/Stack/HStack.d.ts.map +1 -1
  151. package/lib/typescript/commonjs/src/components/Stack/VStack.d.ts.map +1 -1
  152. package/lib/typescript/commonjs/src/components/StyledComponents/StyledText.d.ts.map +1 -1
  153. package/lib/typescript/commonjs/src/components/StyledComponents/StyledView.d.ts.map +1 -1
  154. package/lib/typescript/commonjs/src/components/TouchableRipple/TouchableRipple.d.ts +0 -10
  155. package/lib/typescript/commonjs/src/components/TouchableRipple/TouchableRipple.d.ts.map +1 -1
  156. package/lib/typescript/commonjs/src/components/UserInput/UserInput.d.ts +1 -34
  157. package/lib/typescript/commonjs/src/components/UserInput/UserInput.d.ts.map +1 -1
  158. package/lib/typescript/commonjs/src/components/UserInput/UserInputV2.d.ts +1 -1
  159. package/lib/typescript/commonjs/src/components/UserInput/UserInputV2.d.ts.map +1 -1
  160. package/lib/typescript/commonjs/src/helpers/LightenColorShades.d.ts +1 -1
  161. package/lib/typescript/commonjs/src/helpers/LightenColorShades.d.ts.map +1 -1
  162. package/lib/typescript/commonjs/src/helpers/ResponsiveCalculations.d.ts +1 -0
  163. package/lib/typescript/commonjs/src/helpers/ResponsiveCalculations.d.ts.map +1 -1
  164. package/lib/typescript/commonjs/src/helpers/index.d.ts +1 -0
  165. package/lib/typescript/commonjs/src/helpers/index.d.ts.map +1 -1
  166. package/lib/typescript/commonjs/src/index.d.ts +0 -2
  167. package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
  168. package/lib/typescript/commonjs/src/themes/LightTheme.d.ts.map +1 -1
  169. package/lib/typescript/commonjs/src/types/button.type.d.ts +3 -2
  170. package/lib/typescript/commonjs/src/types/button.type.d.ts.map +1 -1
  171. package/lib/typescript/commonjs/src/types/chip.type.d.ts +1 -0
  172. package/lib/typescript/commonjs/src/types/chip.type.d.ts.map +1 -1
  173. package/lib/typescript/commonjs/src/types/dialog.type.d.ts +4 -6
  174. package/lib/typescript/commonjs/src/types/dialog.type.d.ts.map +1 -1
  175. package/lib/typescript/commonjs/src/types/index.d.ts +1 -0
  176. package/lib/typescript/commonjs/src/types/index.d.ts.map +1 -1
  177. package/lib/typescript/commonjs/src/types/menu.type.d.ts +7 -2
  178. package/lib/typescript/commonjs/src/types/menu.type.d.ts.map +1 -1
  179. package/lib/typescript/commonjs/src/types/progress.type.d.ts +13 -0
  180. package/lib/typescript/commonjs/src/types/progress.type.d.ts.map +1 -0
  181. package/lib/typescript/commonjs/src/types/stack.type.d.ts +6 -4
  182. package/lib/typescript/commonjs/src/types/stack.type.d.ts.map +1 -1
  183. package/lib/typescript/commonjs/src/types/styledComponents.type.d.ts +7 -1
  184. package/lib/typescript/commonjs/src/types/styledComponents.type.d.ts.map +1 -1
  185. package/lib/typescript/commonjs/src/types/userInput.type.d.ts +7 -1
  186. package/lib/typescript/commonjs/src/types/userInput.type.d.ts.map +1 -1
  187. package/lib/typescript/module/src/components/Button/Button.d.ts.map +1 -1
  188. package/lib/typescript/module/src/components/CheckBox/CheckBox.d.ts.map +1 -1
  189. package/lib/typescript/module/src/components/Dialog/Dialog.d.ts.map +1 -1
  190. package/lib/typescript/module/src/components/Dialog/DialogBody.d.ts.map +1 -1
  191. package/lib/typescript/module/src/components/Dialog/DialogFoot.d.ts.map +1 -1
  192. package/lib/typescript/module/src/components/Dialog/DialogHead.d.ts.map +1 -1
  193. package/lib/typescript/module/src/components/Divider/Divider.d.ts.map +1 -1
  194. package/lib/typescript/module/src/components/Grid/Grid.d.ts.map +1 -1
  195. package/lib/typescript/module/src/components/Header/Header.d.ts +1 -0
  196. package/lib/typescript/module/src/components/Header/Header.d.ts.map +1 -1
  197. package/lib/typescript/module/src/components/Icon/Icon.d.ts +1 -1
  198. package/lib/typescript/module/src/components/Icon/Icon.d.ts.map +1 -1
  199. package/lib/typescript/module/src/components/IconButton/IconButton.d.ts +2 -2
  200. package/lib/typescript/module/src/components/IconButton/IconButton.d.ts.map +1 -1
  201. package/lib/typescript/module/src/components/Link/Link.d.ts +4 -0
  202. package/lib/typescript/module/src/components/Link/Link.d.ts.map +1 -1
  203. package/lib/typescript/module/src/components/Menu/Menu.d.ts.map +1 -1
  204. package/lib/typescript/module/src/components/Menu/MenuItem.d.ts.map +1 -1
  205. package/lib/typescript/module/src/components/Portal/Portal.d.ts +1 -1
  206. package/lib/typescript/module/src/components/Portal/Portal.d.ts.map +1 -1
  207. package/lib/typescript/module/src/components/Progress/Progress.d.ts +1 -12
  208. package/lib/typescript/module/src/components/Progress/Progress.d.ts.map +1 -1
  209. package/lib/typescript/module/src/components/Stack/HStack.d.ts.map +1 -1
  210. package/lib/typescript/module/src/components/Stack/VStack.d.ts.map +1 -1
  211. package/lib/typescript/module/src/components/StyledComponents/StyledText.d.ts.map +1 -1
  212. package/lib/typescript/module/src/components/StyledComponents/StyledView.d.ts.map +1 -1
  213. package/lib/typescript/module/src/components/TouchableRipple/TouchableRipple.d.ts +0 -10
  214. package/lib/typescript/module/src/components/TouchableRipple/TouchableRipple.d.ts.map +1 -1
  215. package/lib/typescript/module/src/components/UserInput/UserInput.d.ts +1 -34
  216. package/lib/typescript/module/src/components/UserInput/UserInput.d.ts.map +1 -1
  217. package/lib/typescript/module/src/components/UserInput/UserInputV2.d.ts +1 -1
  218. package/lib/typescript/module/src/components/UserInput/UserInputV2.d.ts.map +1 -1
  219. package/lib/typescript/module/src/helpers/LightenColorShades.d.ts +1 -1
  220. package/lib/typescript/module/src/helpers/LightenColorShades.d.ts.map +1 -1
  221. package/lib/typescript/module/src/helpers/ResponsiveCalculations.d.ts +1 -0
  222. package/lib/typescript/module/src/helpers/ResponsiveCalculations.d.ts.map +1 -1
  223. package/lib/typescript/module/src/helpers/index.d.ts +1 -0
  224. package/lib/typescript/module/src/helpers/index.d.ts.map +1 -1
  225. package/lib/typescript/module/src/index.d.ts +0 -2
  226. package/lib/typescript/module/src/index.d.ts.map +1 -1
  227. package/lib/typescript/module/src/themes/LightTheme.d.ts.map +1 -1
  228. package/lib/typescript/module/src/types/button.type.d.ts +3 -2
  229. package/lib/typescript/module/src/types/button.type.d.ts.map +1 -1
  230. package/lib/typescript/module/src/types/chip.type.d.ts +1 -0
  231. package/lib/typescript/module/src/types/chip.type.d.ts.map +1 -1
  232. package/lib/typescript/module/src/types/dialog.type.d.ts +4 -6
  233. package/lib/typescript/module/src/types/dialog.type.d.ts.map +1 -1
  234. package/lib/typescript/module/src/types/index.d.ts +1 -0
  235. package/lib/typescript/module/src/types/index.d.ts.map +1 -1
  236. package/lib/typescript/module/src/types/menu.type.d.ts +7 -2
  237. package/lib/typescript/module/src/types/menu.type.d.ts.map +1 -1
  238. package/lib/typescript/module/src/types/progress.type.d.ts +13 -0
  239. package/lib/typescript/module/src/types/progress.type.d.ts.map +1 -0
  240. package/lib/typescript/module/src/types/stack.type.d.ts +6 -4
  241. package/lib/typescript/module/src/types/stack.type.d.ts.map +1 -1
  242. package/lib/typescript/module/src/types/styledComponents.type.d.ts +7 -1
  243. package/lib/typescript/module/src/types/styledComponents.type.d.ts.map +1 -1
  244. package/lib/typescript/module/src/types/userInput.type.d.ts +7 -1
  245. package/lib/typescript/module/src/types/userInput.type.d.ts.map +1 -1
  246. package/package.json +29 -19
  247. package/src/components/Button/Button.tsx +122 -79
  248. package/src/components/CheckBox/CheckBox.tsx +61 -49
  249. package/src/components/Chip/Chip.tsx +2 -2
  250. package/src/components/Dialog/Dialog.tsx +55 -51
  251. package/src/components/Dialog/DialogBody.tsx +7 -9
  252. package/src/components/Dialog/DialogDescription.tsx +10 -10
  253. package/src/components/Dialog/DialogFoot.tsx +15 -13
  254. package/src/components/Dialog/DialogHead.tsx +20 -17
  255. package/src/components/Divider/Divider.tsx +5 -10
  256. package/src/components/Grid/Grid.tsx +0 -1
  257. package/src/components/Header/Header.tsx +1 -0
  258. package/src/components/Icon/Icon.tsx +8 -4
  259. package/src/components/IconButton/IconButton.tsx +6 -6
  260. package/src/components/Link/Link.tsx +24 -7
  261. package/src/components/Menu/Menu.tsx +51 -51
  262. package/src/components/Menu/MenuItem.tsx +0 -2
  263. package/src/components/Portal/Portal.tsx +2 -2
  264. package/src/components/Progress/Progress.tsx +32 -35
  265. package/src/components/Stack/HStack.tsx +12 -14
  266. package/src/components/Stack/VStack.tsx +10 -9
  267. package/src/components/StyledComponents/StyledText.tsx +4 -7
  268. package/src/components/StyledComponents/StyledView.tsx +6 -2
  269. package/src/components/Switch/Switch.tsx +4 -4
  270. package/src/components/TouchableRipple/TouchableRipple.tsx +83 -83
  271. package/src/components/UserInput/UserInput.tsx +45 -39
  272. package/src/components/UserInput/UserInputV2.tsx +2 -2
  273. package/src/helpers/LightenColorShades.ts +26 -6
  274. package/src/helpers/ResponsiveCalculations.ts +28 -3
  275. package/src/helpers/index.ts +2 -1
  276. package/src/index.ts +2 -2
  277. package/src/themes/LightTheme.ts +1 -2
  278. package/src/types/button.type.ts +3 -2
  279. package/src/types/chip.type.ts +1 -0
  280. package/src/types/dialog.type.ts +6 -8
  281. package/src/types/index.ts +2 -1
  282. package/src/types/menu.type.ts +8 -2
  283. package/src/types/progress.type.ts +16 -0
  284. package/src/types/stack.type.ts +6 -4
  285. package/src/types/styledComponents.type.ts +8 -1
  286. package/src/types/userInput.type.ts +8 -1
  287. package/src/index.tsx +0 -3
@@ -19,24 +19,13 @@ const DialogHead: React.FC<props> = ({
19
19
  textStyle,
20
20
  children
21
21
  }) => {
22
- const STYLES = StyleSheet.create({
23
- CONTAINER: {
24
- borderBottomWidth: variant == 'default' ? 0.7 : 0,
25
- borderColor: '#d4d4d4',
26
- padding: moderateScale(variant === 'default' ? 16 : 25),
27
- paddingBottom: moderateScale(16),
28
- justifyContent: 'space-between',
29
- flexDirection: 'row',
30
- },
31
- HEADER_TEXT: {
32
- // fontSize: responsiveFontSize(15),
33
- fontWeight: 'bold',
34
- color: '#000',
35
- }
36
- });
22
+ const dynamicStyles = {
23
+ borderBottomWidth: variant == 'default' ? 0.7 : 0,
24
+ padding: moderateScale(variant === 'default' ? 16 : 25),
25
+ };
37
26
  return (<>
38
27
 
39
- <View style={[STYLES.CONTAINER, containerStyle]}>
28
+ <View style={[STYLES.CONTAINER, dynamicStyles, containerStyle]}>
40
29
  <View>
41
30
  <StyledText style={[STYLES.HEADER_TEXT, textStyle]} fs={fs} variant={textVariant}>{title}</StyledText>
42
31
  {children}
@@ -48,4 +37,18 @@ const DialogHead: React.FC<props> = ({
48
37
  </>);
49
38
  }
50
39
  export default DialogHead;
51
- export type { DialogHeadProps };
40
+ export type { DialogHeadProps };
41
+
42
+
43
+ const STYLES = StyleSheet.create({
44
+ CONTAINER: {
45
+ borderColor: '#d4d4d4',
46
+ paddingBottom: moderateScale(16),
47
+ justifyContent: 'space-between',
48
+ flexDirection: 'row',
49
+ },
50
+ HEADER_TEXT: {
51
+ fontWeight: 'bold',
52
+ color: '#000',
53
+ }
54
+ });
@@ -1,5 +1,4 @@
1
1
  import React from 'react';
2
- import { StyleSheet } from "react-native";
3
2
  import type { ViewStyle, StyleProp } from "react-native";
4
3
  import { StyledView } from '../StyledComponents';
5
4
  import { useTheme } from '../../hooks';
@@ -13,22 +12,18 @@ type DividerProps = {
13
12
 
14
13
  const Divider: React.FC<DividerProps> = ({
15
14
  thickness = 0.2,
16
- // color = '#DCDBDB',
17
15
  color,
18
16
  style
19
17
  }) => {
20
18
 
21
19
  const theme = useTheme();
22
20
 
23
- const STYLES = StyleSheet.create({
24
- CONTAINER: {
25
- borderWidth: thickness,
26
- borderColor: color ?? theme?.colors.dividerColor
27
- }
28
- });
29
-
21
+ const dynamicStyles = {
22
+ borderWidth: thickness,
23
+ borderColor: color ?? theme?.colors.dividerColor
24
+ };
30
25
  return (<>
31
- <StyledView style={[STYLES.CONTAINER, style]} />
26
+ <StyledView style={[dynamicStyles, style]} />
32
27
  </>);
33
28
  };
34
29
  export default Divider;
@@ -45,7 +45,6 @@ const Grid: React.FC<GridProps> = ({
45
45
  paddingHorizontal: spacingH,
46
46
  paddingVertical: spacingV,
47
47
  gap: spacing,
48
- // flexShrink:1
49
48
  },
50
49
  });
51
50
  return (<>
@@ -1,4 +1,5 @@
1
1
  import React from 'react';
2
+ import type { JSX } from 'react';
2
3
  import { View, StyleSheet, TouchableOpacity } from 'react-native';
3
4
  import { moderateScale, moderateVerticalScale, responsiveFontSize } from '../../helpers/ResponsiveCalculations';
4
5
  import { StyledText } from '../StyledComponents';
@@ -1,4 +1,4 @@
1
- import React from "react";
1
+ import React, { useMemo, type JSX } from "react";
2
2
  import { verticalScale } from "../../helpers/ResponsiveCalculations";
3
3
  import { useTheme } from "../../hooks";
4
4
 
@@ -14,14 +14,18 @@ const Icon: React.FC<IconProps> = ({
14
14
  }) => {
15
15
  const theme = useTheme(!color && !renderIcon?.props.color);
16
16
 
17
- return (<>
18
- {React.cloneElement(renderIcon as React.ReactElement<any>,
17
+ const renderCallBackIcon = useMemo(() => {
18
+ return React.cloneElement(renderIcon as React.ReactElement<any>,
19
19
  {
20
20
  ...renderIcon?.props,
21
21
  size: verticalScale(renderIcon?.props?.size ?? 15),
22
22
  color: color ?? (renderIcon?.props.color ?? theme?.colors.iconPrimary)
23
23
  }
24
- )}
24
+ )
25
+ }, [color, theme]);
26
+
27
+ return (<>
28
+ {renderCallBackIcon}
25
29
  </>)
26
30
  }
27
31
  export default Icon;
@@ -1,13 +1,13 @@
1
1
  import React from "react";
2
2
  import type { ReactNode } from "react";
3
- import type { PressableProps } from "react-native";
3
+ import { TouchableOpacity, type TouchableOpacityProps } from "react-native";
4
4
  import { StyledView } from "../StyledComponents";
5
- import TouchableRipple from "../TouchableRipple/TouchableRipple";
5
+ // import TouchableRipple from "../TouchableRipple/TouchableRipple";
6
6
  import Icon from "../Icon/Icon";
7
7
  import { verticalScale } from "../../helpers/ResponsiveCalculations";
8
8
 
9
9
 
10
- type IconButtonProps = PressableProps & {
10
+ type IconButtonProps = TouchableOpacityProps & {
11
11
  rippleColor?: string;
12
12
  children?: ReactNode;
13
13
  }
@@ -20,15 +20,15 @@ const IconButton: React.FC<IconButtonProps> = ({
20
20
 
21
21
  return (<>
22
22
  <StyledView style={{ alignSelf: 'flex-start' }}>
23
- <TouchableRipple
24
- rippleColor={rippleColor}
23
+ <TouchableOpacity
24
+ // rippleColor={rippleColor}
25
25
  style={{ borderRadius: 100, padding: verticalScale(8) }}
26
26
  {...rest}
27
27
  >
28
28
  <Icon
29
29
  renderIcon={React.cloneElement(children as React.ReactElement<any>)}
30
30
  />
31
- </TouchableRipple>
31
+ </TouchableOpacity>
32
32
  </StyledView>
33
33
  </>)
34
34
  }
@@ -1,31 +1,48 @@
1
1
  import type React from "react";
2
2
  import { StyledText } from "../StyledComponents";
3
- import { Linking, TouchableOpacity } from "react-native";
3
+ import { Linking, StyleSheet, TouchableOpacity, type TextStyle } from "react-native";
4
4
  import { useCallback } from "react";
5
+ import type { TypographyVariant } from "../../types";
5
6
 
6
7
 
7
8
  type props = {
8
9
  title: string;
9
10
  href: string;
11
+ textVariant?: TypographyVariant;
12
+ style?: TextStyle
10
13
  }
11
14
 
12
15
  const Link: React.FC<props> = ({
13
16
  title = '',
14
- href
17
+ href,
18
+ textVariant = 'h5',
19
+ style
15
20
  }) => {
16
21
  const onUserPress = useCallback(async () => {
17
22
  const supported = await Linking.canOpenURL(href);
18
23
  if (supported) {
19
24
  await Linking.openURL(href);
20
25
  }
21
- }, []);
26
+ }, [href]);
22
27
  return (<>
23
28
  <TouchableOpacity onPress={onUserPress}>
24
- <StyledText variant='h5' color='#0000FF'
25
- style={{ includeFontPadding: false, alignItems: 'baseline', borderBottomColor: '#0000FF', borderBottomWidth: 1, alignSelf: 'flex-start', padding: 0, margin: 0, lineHeight: undefined, flexShrink: 1, textAlignVertical: 'bottom', }}
26
- >{title}</StyledText>
29
+ <StyledText
30
+ variant={textVariant}
31
+ color='#0000FF'
32
+ style={[STYLES.TEXT, style]}
33
+ >
34
+ {title}
35
+ </StyledText>
27
36
  </TouchableOpacity>
28
37
  </>)
29
38
  }
30
39
 
31
- export default Link;
40
+ export default Link;
41
+
42
+ const STYLES = StyleSheet.create({
43
+ TEXT: {
44
+ borderBottomColor: '#0000FF',
45
+ borderBottomWidth: 0.8,
46
+ alignSelf: 'flex-start',
47
+ }
48
+ });
@@ -1,7 +1,6 @@
1
1
  import React, { useState, useRef, useCallback, useEffect, } from "react";
2
- import { StyleSheet, Pressable, View, ScrollView } from "react-native";
2
+ import { StyleSheet, Pressable, View, ScrollView, Animated } from "react-native";
3
3
  import { StyledView } from "../StyledComponents";
4
- import Animated, { useAnimatedStyle, useSharedValue, withTiming } from "react-native-reanimated";
5
4
  import Portal from "../Portal/Portal";
6
5
  import { positionCalculations } from "./calculations";
7
6
  import type { menuLayoutTypes, anchorLayoutTypes } from "./calculations";
@@ -19,20 +18,20 @@ const Menu: React.FC<MenuProps> = ({
19
18
  style,
20
19
  children
21
20
  }) => {
22
-
23
21
  const [isVisible, setIsVisible] = useState<boolean>(false);
24
22
  const anchorLayoutRef = useRef<anchorLayoutTypes>({ pageY: 0, pageX: 0, height: 0, width: 0 });
25
23
  const menuLayoutRef = useRef<menuLayoutTypes>({ height: 0, width: 0 });
26
- const buttonRef = useRef<View | null>(null);
27
- const scaleSharedValue = useSharedValue(0.5);
24
+ const buttonRef = useRef<View>(null!);
25
+ const animatedScaleRef = useRef(new Animated.Value(1)).current;
26
+
28
27
  const positions = (useCallback(() => (positionCalculations(anchorLayoutRef.current, menuLayoutRef.current, placement)), [menuLayoutRef, anchorLayoutRef, placement]))();
29
28
 
30
29
  useEffect(() => {
31
- if ((disableBuiltInState && isOpen) || isVisible) {
32
- scaleSharedValue.value = withTiming(1, { duration: 150 });
33
- } else {
34
- scaleSharedValue.value = 0;
35
- }
30
+ Animated.timing(animatedScaleRef, {
31
+ toValue: (disableBuiltInState && isOpen) || isVisible ? 1 : 0,
32
+ duration: 150,
33
+ useNativeDriver: true,
34
+ }).start();
36
35
  }, [isOpen, isVisible]);
37
36
 
38
37
  const measureLayout = useCallback(() => {
@@ -63,14 +62,17 @@ const Menu: React.FC<MenuProps> = ({
63
62
 
64
63
  const renderChildren = (useCallback(() => {
65
64
  return (<ScrollView>
66
- {React.Children?.toArray(children).map((e) => {
67
- return React.cloneElement(e as React.ReactElement, {
68
- onPress: () => {
69
- (e as React.ReactElement)?.props?.onPress?.();
70
- onSelect?.((e as React.ReactElement)?.props?.name);
71
- onClose();
72
- }
73
- });
65
+ {React.Children?.toArray(children).map((child) => {
66
+ if (React.isValidElement<{ onPress: () => void; name: string; }>(child)) {
67
+ return React.cloneElement(child, {
68
+ onPress: () => {
69
+ (child)?.props?.onPress?.();
70
+ onSelect?.((child)?.props?.name);
71
+ onClose();
72
+ }
73
+ });
74
+ }
75
+ return null;
74
76
  })}
75
77
  </ScrollView>)
76
78
 
@@ -79,34 +81,15 @@ const Menu: React.FC<MenuProps> = ({
79
81
  const scale: number = disableBuiltInState ? Number(isOpen) : Number(isVisible);
80
82
  const pointerEvent = (isVisible && !disableBuiltInState) || (isOpen && disableBuiltInState) ? 'auto' : 'none';
81
83
 
82
- const STYLES = StyleSheet.create({
83
- CONTAINER: {
84
- // width: horizontalScale(130),
85
- shadowColor: "#000",
86
- backgroundColor: '#fff',
87
- shadowOffset: {
88
- width: 0,
89
- height: 2,
90
- },
91
- shadowOpacity: 0.23,
92
- shadowRadius: 2.62,
93
- elevation: 4,
94
- position: 'absolute',
95
- left: positions.left,
96
- top: positions.top,
97
- borderRadius: 5,
98
- maxHeight: 400,
99
- minWidth: horizontalScale(150),
100
- paddingVertical: verticalScale(5)
101
- }
102
- });
84
+ const dynamicStyles = {
85
+ left: positions.left,
86
+ top: positions.top,
87
+ };
103
88
 
104
- const menuAnimatedStyle = useAnimatedStyle(() => {
105
- return {
106
- transform: [{ scale: scaleSharedValue.value }],
107
- opacity: scaleSharedValue.value
108
- }
109
- });
89
+ const menuAnimatedStyle = {
90
+ transform: [{ scale: animatedScaleRef }],
91
+ opacity: animatedScaleRef
92
+ };
110
93
 
111
94
  return (<>
112
95
 
@@ -119,7 +102,7 @@ const Menu: React.FC<MenuProps> = ({
119
102
  onPress={onClose}>
120
103
  <Animated.View
121
104
  onStartShouldSetResponder={() => true}
122
- style={[STYLES.CONTAINER, menuAnimatedStyle, style]}
105
+ style={[STYLES.MENU_CONT, dynamicStyles, menuAnimatedStyle, style]}
123
106
  onLayout={({ nativeEvent: { layout: { height, width } } }) => menuLayoutRef.current = { width, height }}
124
107
  >
125
108
  {renderChildren}
@@ -127,13 +110,30 @@ const Menu: React.FC<MenuProps> = ({
127
110
  </Pressable>
128
111
  </Portal>
129
112
 
130
- <StyledView alignItems='flex-start'>
131
- <View ref={buttonRef} onLayout={measureLayout}>
132
- {anchor && React.cloneElement(anchor, { onPress: onOpen })}
133
- </View>
113
+ <StyledView alignItems='flex-start' ref={buttonRef} onLayout={measureLayout}>
114
+ {anchor && React.isValidElement<{ onPress: () => void }>(anchor) && React.cloneElement(anchor, { onPress: onOpen })}
134
115
  </StyledView>
135
116
 
136
117
  </>)
137
118
  }
138
119
  export default Menu;
139
- export type { MenuProps };
120
+ export type { MenuProps };
121
+
122
+ const STYLES = StyleSheet.create({
123
+ MENU_CONT: {
124
+ shadowColor: "#000",
125
+ backgroundColor: '#fff',
126
+ shadowOffset: {
127
+ width: 0,
128
+ height: 2,
129
+ },
130
+ shadowOpacity: 0.23,
131
+ shadowRadius: 2.62,
132
+ elevation: 4,
133
+ position: 'absolute',
134
+ borderRadius: 5,
135
+ maxHeight: 400,
136
+ minWidth: horizontalScale(150),
137
+ paddingVertical: verticalScale(5)
138
+ }
139
+ });
@@ -5,8 +5,6 @@ import { horizontalScale, moderateScale, verticalScale } from "../../helpers/Res
5
5
  import type { MenuItemProps } from "../../types";
6
6
 
7
7
  const MenuItem: React.FC<MenuItemProps> = ({
8
- // paddingV = 12,
9
- // paddingH = 12,
10
8
  paddingV = 11,
11
9
  paddingH = 17,
12
10
  gap = 12,
@@ -3,13 +3,13 @@ import PortalContext from "./PortalContext";
3
3
 
4
4
  interface PortalProps {
5
5
  children: React.ReactNode,
6
- name: string
6
+ name?: string
7
7
  }
8
8
  const Portal: React.FC<PortalProps> = ({ children, name }) => {
9
9
  const { addComponent, removeComponent } = useContext(PortalContext);
10
10
 
11
11
  useEffect(() => {
12
- const uniqueId = name ?? Math.random() * 50;
12
+ const uniqueId = name ?? `${Math.random() * 50}`;
13
13
  addComponent({ name: uniqueId, component: children });
14
14
  return () => removeComponent(uniqueId);
15
15
  }, [children, name]);
@@ -1,33 +1,16 @@
1
- import React, { useEffect, useRef } from 'react';
1
+ import React, { useEffect, useMemo, useRef } from 'react';
2
2
  import { Animated, StyleSheet } from "react-native";
3
3
  import { moderateScale, verticalScale, } from "../../helpers/ResponsiveCalculations";
4
4
  import { StyledView } from '../StyledComponents';
5
5
  import { useTheme } from '../../hooks';
6
-
7
-
8
- type ProgressProps = {
9
- /** Current progress value (0-100) */
10
- value?: number;
11
-
12
- /** Thickness of the progress bar */
13
- thickness?: number;
14
-
15
- /** Border radius of the progress bar */
16
- br?: number;
17
-
18
- /** Background color of the track (unfilled part) */
19
- trackColor?: string;
20
-
21
- /** Color of the progress (filled part) */
22
- color?: string;
23
- }
6
+ import type { ProgressProps } from '../../types';
24
7
 
25
8
  const Progress: React.FC<ProgressProps> = ({
26
9
  value = 50,
27
10
  thickness = 5,
28
11
  br = 100,
29
12
  trackColor = '#E8E8E8',
30
- color,
13
+ progressColor,
31
14
  }) => {
32
15
 
33
16
  const animatedWidth = useRef(new Animated.Value(value)).current;
@@ -35,35 +18,49 @@ const Progress: React.FC<ProgressProps> = ({
35
18
 
36
19
  useEffect(() => {
37
20
  Animated.timing(animatedWidth, {
38
- toValue: value,
21
+ toValue: value / 100,
39
22
  duration: 1000,
40
- useNativeDriver: false,
23
+ useNativeDriver: true,
41
24
  }).start();
42
25
  }, [value]);
43
26
 
44
- const STYLES = StyleSheet.create({
27
+ const dynamicStyles = useMemo(() => ({
45
28
  TRACK: {
46
29
  backgroundColor: trackColor,
47
30
  borderRadius: moderateScale(br),
48
- overflow: 'hidden'
31
+ height: verticalScale(thickness),
49
32
  },
50
33
  TRACK_ITEM: {
51
- backgroundColor: color ?? theme?.colors.primary,
52
- height: verticalScale(thickness),
53
- borderRadius: moderateScale(br)
34
+ backgroundColor: progressColor ?? theme?.colors.primary,
35
+ borderRadius: moderateScale(br),
54
36
  }
55
- });
37
+ }), [br, trackColor, thickness, progressColor, theme]);
38
+
39
+ const animatedViewStyle = {
40
+ transform: [{ scaleX: animatedWidth }],
41
+ transformOrigin: 'left'
42
+ }
56
43
 
57
44
  return (<>
58
- <StyledView style={STYLES.TRACK}>
59
- <Animated.View style={[STYLES.TRACK_ITEM, {
60
- width: animatedWidth.interpolate({
61
- inputRange: [0, 100],
62
- outputRange: ['0%', '100%'],
63
- })
64
- }]} />
45
+ <StyledView
46
+ style={[STYLES.TRACK, dynamicStyles.TRACK]}
47
+ >
48
+ <Animated.View
49
+ style={[STYLES.TRACK_ITEM, dynamicStyles.TRACK_ITEM, animatedViewStyle]}
50
+ />
65
51
  </StyledView>
66
52
  </>);
67
53
  };
68
54
  export default Progress;
69
55
  export type { ProgressProps };
56
+
57
+ const STYLES = StyleSheet.create({
58
+ TRACK: {
59
+ overflow: 'hidden',
60
+ width: '100%',
61
+ },
62
+ TRACK_ITEM: {
63
+ width: "100%",
64
+ height: '100%'
65
+ }
66
+ });
@@ -1,37 +1,35 @@
1
1
  import React, { useMemo } from "react";
2
- import { StyleSheet, View } from "react-native";
2
+ import type { ViewStyle } from "react-native";
3
3
  import { horizontalScale } from "../../helpers/ResponsiveCalculations";
4
4
  import type { HStackProps } from "../../types";
5
+ import { StyledView } from "../StyledComponents";
5
6
 
6
7
  const HStack: React.FC<HStackProps> = ({
7
8
  justify,
8
9
  align = 'center',
9
10
  fWrap = 'wrap',
10
11
  gap = 10,
11
- containerStyle,
12
+ style,
12
13
  children,
13
14
  ...rest
14
15
  }) => {
15
16
  const calculatedGap: number = useMemo(() => horizontalScale(gap), [gap]);
16
- const viewProps = {
17
+
18
+ const viewProps: ViewStyle = {
17
19
  gap: calculatedGap,
20
+ flexDirection: 'row',
21
+ justifyContent: justify,
22
+ alignItems: align,
23
+ flexWrap: fWrap,
18
24
  };
19
- const STYLES = StyleSheet.create({
20
- HSTACK: {
21
- flexDirection: 'row',
22
- justifyContent: justify,
23
- alignItems: align,
24
- flexWrap: fWrap,
25
- }
26
- });
27
25
 
28
26
  return (<>
29
- <View
30
- style={[viewProps, STYLES.HSTACK, containerStyle]}
27
+ <StyledView
28
+ style={[viewProps, style]}
31
29
  {...rest}
32
30
  >
33
31
  {children}
34
- </View>
32
+ </StyledView>
35
33
  </>)
36
34
  }
37
35
  export default HStack;
@@ -1,30 +1,31 @@
1
1
  import React, { useMemo } from "react";
2
- import { View } from "react-native";
3
- import { horizontalScale } from "../../helpers/ResponsiveCalculations";
2
+ import { verticalScale } from "../../helpers/ResponsiveCalculations";
4
3
  import type { VStackProps } from "../../types";
4
+ import { StyledView } from "../StyledComponents";
5
+ import type { ViewStyle } from "react-native";
5
6
 
6
7
  const VStack: React.FC<VStackProps> = ({
7
8
  children,
8
9
  align,
9
10
  gap = 10,
10
- containerStyle,
11
+ style,
11
12
  ...rest
12
13
  }) => {
13
14
 
14
- const calculatedGap: number = useMemo(() => horizontalScale(gap), [gap]);
15
- const viewProps = {
15
+ const calculatedGap: number = useMemo(() => verticalScale(gap), [gap]);
16
+
17
+ const viewProps: ViewStyle = {
16
18
  flexDirection: 'column',
17
19
  alignItems: align,
18
20
  gap: calculatedGap,
19
21
  };
20
22
  return (<>
21
- <View
22
- {...viewProps}
23
- style={containerStyle}
23
+ <StyledView
24
+ style={[viewProps, style]}
24
25
  {...rest}
25
26
  >
26
27
  {children}
27
- </View>
28
+ </StyledView>
28
29
  </>)
29
30
  }
30
31
  export default VStack;
@@ -16,14 +16,11 @@ const StyledText: React.FC<StyledTextProps> = ({
16
16
  themeColor,
17
17
  primary,
18
18
  secondary,
19
- ...props
19
+ ...rest
20
20
  }) => {
21
-
22
21
  const { colors, typography: { variantSizes } }: any = useTheme();
23
-
24
- return (<>
22
+ return (
25
23
  <Text
26
- allowFontScaling={false}
27
24
  style={[{
28
25
  fontSize: responsiveFontSize(fs ?? variantSizes[variant]),
29
26
  fontFamily: ff ?? '',
@@ -33,11 +30,11 @@ const StyledText: React.FC<StyledTextProps> = ({
33
30
  },
34
31
  style,
35
32
  ]}
36
- {...props}
33
+ {...rest}
37
34
  >
38
35
  {children}
39
36
  </Text>
40
- </>);
37
+ );
41
38
  };
42
39
 
43
40
  export default StyledText;
@@ -15,10 +15,13 @@ const StyledView: React.FC<StyledViewProps> = ({
15
15
  w,
16
16
  children,
17
17
  style,
18
+ ref,
18
19
  ...rest
19
20
  }) => {
21
+
20
22
  const theme = useTheme(themeBg);
21
- return (<>
23
+
24
+ return (
22
25
  <View
23
26
  style={[{
24
27
  flex: f,
@@ -31,11 +34,12 @@ const StyledView: React.FC<StyledViewProps> = ({
31
34
  },
32
35
  style
33
36
  ]}
37
+ ref={ref}
34
38
  {...rest}
35
39
  >
36
40
  {children}
37
41
  </View>
38
- </>);
42
+ );
39
43
  };
40
44
 
41
45
  export default StyledView;