@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
@@ -13,21 +13,21 @@ const Switch: React.FC<SwitchProps> = ({
13
13
  activeTrackColor,
14
14
  inactiveTrackColor = '#808080',
15
15
  onChange,
16
- ...props
16
+ ...rest
17
17
  }) => {
18
18
 
19
19
  const theme: any = useTheme();
20
- const switchColor = disabled ? '#808080' : color ?? theme.colors.switchColor;
20
+ const switchColor = disabled ? '#808080' : color ?? theme.colors.primary;
21
21
 
22
22
  return (<>
23
23
  <NativeSwitch
24
24
  value={checked}
25
- trackColor={{ true: LightenColorShades(activeTrackColor ?? switchColor, 90), false: LightenColorShades(inactiveTrackColor, 60) }}
25
+ trackColor={{ true: LightenColorShades(activeTrackColor ?? switchColor, 50), false: LightenColorShades(inactiveTrackColor, 60) }}
26
26
  thumbColor={switchColor}
27
27
  onValueChange={onChange}
28
28
  style={{ transform: [{ scaleX: moderateScale(size) }, { scaleY: moderateScale(size) }] }}
29
29
  disabled={disabled}
30
- {...props}
30
+ {...rest}
31
31
  />
32
32
  </>)
33
33
  }
@@ -1,92 +1,92 @@
1
- import React from 'react';
2
- import { Pressable, StyleSheet } from "react-native";
3
- import type { ViewStyle, StyleProp, PressableProps } from "react-native";
4
- import { Gesture, GestureDetector, GestureHandlerRootView } from 'react-native-gesture-handler';
5
- import Animated, { useAnimatedStyle, useSharedValue, withTiming, } from 'react-native-reanimated';
6
- import { StyledView } from '../StyledComponents';
1
+ // import React from 'react';
2
+ // import { Pressable, StyleSheet } from "react-native";
3
+ // import type { ViewStyle, StyleProp, PressableProps } from "react-native";
4
+ // import { Gesture, GestureDetector, GestureHandlerRootView } from 'react-native-gesture-handler';
5
+ // import Animated, { useAnimatedStyle, useSharedValue, withTiming, } from 'react-native-reanimated';
6
+ // import { StyledView } from '../StyledComponents';
7
7
 
8
8
 
9
- type TouchableRippleProps = PressableProps & {
10
- rippleColor?: string;
11
- style?: StyleProp<ViewStyle>;
12
- children?: React.ReactNode;
13
- }
9
+ // type TouchableRippleProps = PressableProps & {
10
+ // rippleColor?: string;
11
+ // style?: StyleProp<ViewStyle>;
12
+ // children?: React.ReactNode;
13
+ // }
14
14
 
15
- const TouchableRipple: React.FC<TouchableRippleProps> = ({
16
- rippleColor = '#b6b6b681',
17
- style,
18
- children,
19
- ...props
20
- }) => {
15
+ // const TouchableRipple: React.FC<TouchableRippleProps> = ({
16
+ // rippleColor = '#b6b6b681',
17
+ // style,
18
+ // children,
19
+ // ...rest
20
+ // }) => {
21
21
 
22
- const positionX = useSharedValue(0);
23
- const positionY = useSharedValue(0);
24
- const overlayHeight = useSharedValue(0);
25
- const overlayWidth = useSharedValue(0);
26
- const scale = useSharedValue(0);
27
- const opacity = useSharedValue(1);
22
+ // const positionX = useSharedValue(0);
23
+ // const positionY = useSharedValue(0);
24
+ // const overlayHeight = useSharedValue(0);
25
+ // const overlayWidth = useSharedValue(0);
26
+ // const scale = useSharedValue(0);
27
+ // const opacity = useSharedValue(1);
28
28
 
29
- const STYLES = StyleSheet.create({
30
- OVERLAY: {
31
- position: 'absolute',
32
- top: 0,
33
- left: 0,
34
- zIndex: -1
35
- }
36
- });
29
+ // const STYLES = StyleSheet.create({
30
+ // OVERLAY: {
31
+ // position: 'absolute',
32
+ // top: 0,
33
+ // left: 0,
34
+ // zIndex: -1
35
+ // }
36
+ // });
37
37
 
38
- const effectAnimatedStyle = useAnimatedStyle(() => {
39
- const radius = Math.sqrt(overlayWidth.value ** 2 + overlayHeight.value ** 2);
40
- return {
41
- height: radius * 2,
42
- width: radius * 2,
43
- opacity: opacity.value,
44
- borderRadius: radius,
45
- backgroundColor: rippleColor,
46
- transform: [
47
- { translateX: positionX.value - radius },
48
- { translateY: positionY.value - radius },
49
- {
50
- scale: scale.value
51
- }
52
- ]
53
- }
54
- });
38
+ // const effectAnimatedStyle = useAnimatedStyle(() => {
39
+ // const radius = Math.sqrt(overlayWidth.value ** 2 + overlayHeight.value ** 2);
40
+ // return {
41
+ // height: radius * 2,
42
+ // width: radius * 2,
43
+ // opacity: opacity.value,
44
+ // borderRadius: radius,
45
+ // backgroundColor: rippleColor,
46
+ // transform: [
47
+ // { translateX: positionX.value - radius },
48
+ // { translateY: positionY.value - radius },
49
+ // {
50
+ // scale: scale.value
51
+ // }
52
+ // ]
53
+ // }
54
+ // });
55
55
 
56
- const onGesturePress = !props.disabled ? Gesture.Tap().runOnJS(true).onTouchesDown(({ allTouches }: { allTouches: any }) => {
57
- positionX.value = allTouches[0].x;
58
- positionY.value = allTouches[0].y;
59
- opacity.value = 1;
60
- scale.value = 0;
61
- scale.value = withTiming(1, { duration: 600 });
62
- }).onTouchesUp(() => {
63
- opacity.value = withTiming(0, { duration: 800 });
64
- }).onTouchesCancelled(() => {
65
- opacity.value = withTiming(0, { duration: 800 });
66
- }) : Gesture.Simultaneous();
56
+ // const onGesturePress = !props.disabled ? Gesture.Tap().runOnJS(true).onTouchesDown(({ allTouches }: { allTouches: any }) => {
57
+ // positionX.value = allTouches[0].x;
58
+ // positionY.value = allTouches[0].y;
59
+ // opacity.value = 1;
60
+ // scale.value = 0;
61
+ // scale.value = withTiming(1, { duration: 600 });
62
+ // }).onTouchesUp(() => {
63
+ // opacity.value = withTiming(0, { duration: 800 });
64
+ // }).onTouchesCancelled(() => {
65
+ // opacity.value = withTiming(0, { duration: 800 });
66
+ // }) : Gesture.Simultaneous();
67
67
 
68
68
 
69
- return (<>
70
- <GestureHandlerRootView style={{ width: '100%' }}>
71
- <GestureDetector gesture={onGesturePress}>
72
- <Pressable
73
- {...props}
74
- >
75
- <StyledView
76
- overflow='hidden'
77
- onLayout={({ nativeEvent: { layout: { height, width } } }) => {
78
- overlayHeight.value = height;
79
- overlayWidth.value = width;
80
- }}
81
- style={style}
82
- >
83
- {children}
84
- <Animated.View style={[STYLES.OVERLAY, effectAnimatedStyle]} />
85
- </StyledView>
86
- </Pressable>
87
- </GestureDetector>
88
- </GestureHandlerRootView>
89
- </>);
90
- };
91
- export default TouchableRipple;
92
- export type { TouchableRippleProps };
69
+ // return (<>
70
+ // <GestureHandlerRootView style={{ width: '100%' }}>
71
+ // <GestureDetector gesture={onGesturePress}>
72
+ // <Pressable
73
+ // {...rest}
74
+ // >
75
+ // <StyledView
76
+ // overflow='hidden'
77
+ // onLayout={({ nativeEvent: { layout: { height, width } } }) => {
78
+ // overlayHeight.value = height;
79
+ // overlayWidth.value = width;
80
+ // }}
81
+ // style={style}
82
+ // >
83
+ // {children}
84
+ // <Animated.View style={[STYLES.OVERLAY, effectAnimatedStyle]} />
85
+ // </StyledView>
86
+ // </Pressable>
87
+ // </GestureDetector>
88
+ // </GestureHandlerRootView>
89
+ // </>);
90
+ // };
91
+ // export default TouchableRipple;
92
+ // export type { TouchableRippleProps };
@@ -1,12 +1,13 @@
1
- import { forwardRef, useMemo } from 'react';
2
- import { TextInput, StyleSheet } from 'react-native';
1
+ import { useMemo } from 'react';
2
+ import { TextInput, StyleSheet, type ViewStyle } from 'react-native';
3
+ import type { TextStyle } from 'react-native';
3
4
  import { responsiveFontSize, verticalScale, horizontalScale } from '../../helpers/ResponsiveCalculations';
4
5
  import { useTheme } from '../../hooks';
5
6
  import { StyledText, StyledView } from '../StyledComponents';
6
7
  import type { UserInputProps } from '../../types';
7
8
  import generateColors from './generateColors';
8
9
 
9
- const UserInput = forwardRef<TextInput, UserInputProps>(({
10
+ const UserInput: React.FC<UserInputProps> = ({
10
11
  variant = 'standard',
11
12
  label,
12
13
  bg,
@@ -32,8 +33,9 @@ const UserInput = forwardRef<TextInput, UserInputProps>(({
32
33
  renderLeftIcon,
33
34
  renderRightIcon,
34
35
  styles,
35
- ...props
36
- }, ref) => {
36
+ ref,
37
+ ...rest
38
+ }) => {
37
39
 
38
40
  const theme: any = useTheme();
39
41
 
@@ -43,56 +45,50 @@ const UserInput = forwardRef<TextInput, UserInputProps>(({
43
45
  computedLabelColor
44
46
  } = useMemo(() => generateColors(theme, isError, cursorColor, placeholderColor, labelColor), [theme, isError, cursorColor, placeholderColor, labelColor]);
45
47
 
46
- const STYLES = StyleSheet.create({
48
+ const dynamicStyles = {
47
49
  INPUT_CONT: {
48
- flexDirection: 'row',
49
- alignItems: multiline ? 'flex-start' : 'center',
50
+ alignItems: multiline ? 'flex-start' : 'center' as ViewStyle['alignItems'],
50
51
  backgroundColor: disabled ? theme.colors.disable : bg ?? theme.colors.inputBgColor,
51
52
  borderColor: isError ? theme.colors.error : strokeColor ?? theme.colors.outline,
52
53
  borderWidth: variant === 'standard' ? 0 : stroke,
53
54
  borderBottomWidth: stroke,
54
- paddingHorizontal: horizontalScale(14),
55
55
  borderRadius: verticalScale(br),
56
- gap: horizontalScale(10),
57
- height: multiline ? 'auto' : verticalScale(48),
58
- paddingVertical: multiline ? horizontalScale(10) : 'auto',
56
+ height: multiline ? undefined : verticalScale(48),
57
+ paddingVertical: multiline ? horizontalScale(10) : undefined,
59
58
  },
60
59
  INPUT: {
61
60
  color: disabled ? theme.colors.textDisable : isError ? theme.colors.error : inputTextColor ?? theme.colors.textPrimary,
62
61
  fontSize: responsiveFontSize(inputFs),
63
- textAlignVertical: multiline ? 'top' : 'center',
64
- minHeight: multiline ? 100 : 'auto',
65
- maxHeight: multiline ? 150 : 'auto',
66
- padding: 0,
67
- flex: 1,
62
+ textAlignVertical: (multiline ? 'top' : 'center') as TextStyle['textAlignVertical'],
63
+ minHeight: multiline ? 100 : undefined,
64
+ maxHeight: multiline ? 150 : undefined,
68
65
  },
69
66
  ERROR_HELPER_TEXT: {
70
67
  color: theme.colors.error,
71
- paddingHorizontal: 5
72
68
  }
73
- });
69
+ };
74
70
 
75
71
  return (<>
76
- <StyledView gap={verticalScale(5)} style={styles?.mainContainer}>
72
+ <StyledView gap={verticalScale(5)} style={styles?.mainContainer} w='100%'>
77
73
  {
78
74
  label &&
79
75
  <StyledText variant={textVariant?.label} fs={labelFs} color={computedLabelColor} style={styles?.label}>{label}</StyledText>
80
76
  }
81
77
  <StyledView
82
- style={[STYLES.INPUT_CONT, styles?.inputContainer]}
78
+ style={[STYLES.INPUT_CONT, dynamicStyles.INPUT_CONT, styles?.inputContainer]}
83
79
  >
84
80
  {
85
81
  renderLeftIcon
86
82
  }
87
83
  <TextInput
88
84
  ref={ref}
89
- style={[STYLES.INPUT, styles?.input]}
85
+ style={[STYLES.INPUT, dynamicStyles.INPUT, styles?.input]}
90
86
  placeholder={placeholder}
91
87
  placeholderTextColor={computedPlaceholderColor}
92
88
  editable={!disabled}
93
89
  multiline={multiline}
94
90
  cursorColor={computedCursorColor}
95
- {...props}
91
+ {...rest}
96
92
  />
97
93
  {
98
94
  renderRightIcon
@@ -100,25 +96,35 @@ const UserInput = forwardRef<TextInput, UserInputProps>(({
100
96
  </StyledView>
101
97
  {
102
98
  (isError && helperText) &&
103
- <StyledText variant={textVariant?.helperText} fs={helperTextFS} style={[STYLES.ERROR_HELPER_TEXT, styles?.helperText]}>{helperText}</StyledText>
99
+ <StyledText
100
+ variant={textVariant?.helperText}
101
+ fs={helperTextFS}
102
+ style={[
103
+ STYLES.ERROR_HELPER_TEXT,
104
+ dynamicStyles.ERROR_HELPER_TEXT,
105
+ styles?.helperText
106
+ ]}
107
+ >
108
+ {helperText}
109
+ </StyledText>
104
110
  }
105
111
  </StyledView>
106
112
  </>)
107
- });
113
+ };
108
114
  export default UserInput;
109
115
  export type { UserInputProps };
110
116
 
111
- // const STYLES = StyleSheet.create({
112
- // INPUT_CONT: {
113
- // flexDirection: 'row',
114
- // paddingHorizontal: horizontalScale(14),
115
- // gap: horizontalScale(10),
116
- // },
117
- // INPUT: {
118
- // padding: 0,
119
- // flex: 1,
120
- // },
121
- // ERROR_HELPER_TEXT: {
122
- // paddingHorizontal: 5
123
- // }
124
- // });
117
+ const STYLES = StyleSheet.create({
118
+ INPUT_CONT: {
119
+ flexDirection: 'row',
120
+ paddingHorizontal: horizontalScale(14),
121
+ gap: horizontalScale(10),
122
+ },
123
+ INPUT: {
124
+ padding: 0,
125
+ flex: 1,
126
+ },
127
+ ERROR_HELPER_TEXT: {
128
+ paddingHorizontal: 5
129
+ }
130
+ });
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import React, { type JSX } from 'react';
2
2
  import { StyleSheet, View } from 'react-native';
3
3
  import type { TextInputProps, ViewStyle, TextStyle } from "react-native";
4
4
  import { responsiveFontSize, verticalScale, horizontalScale } from '../../helpers/ResponsiveCalculations';
@@ -116,7 +116,7 @@ const UserInputV2: React.FC<UserInputV2Props> = ({
116
116
  editable={!isDisabled}
117
117
  multiline={multiline}
118
118
  cursorColor={cursor}
119
- {...props}
119
+ {...rest}
120
120
  /> */}
121
121
  <StyledText>Email</StyledText>
122
122
  </View>
@@ -1,7 +1,27 @@
1
- const LightenColorShades = (hex:string, amount: number)=> {
2
- let r = Math.min(255, parseInt(hex.slice(1, 3), 16) + amount);
3
- let g = Math.min(255, parseInt(hex.slice(3, 5), 16) + amount);
4
- let b = Math.min(255, parseInt(hex.slice(5, 7), 16) + amount);
5
- return `#${((1 << 24) + (r << 16) + (g << 8) + b).toString(16).slice(1)}`;
6
- }
1
+ const LightenColorShades = (color: string, amount: number): string => {
2
+ if (color.startsWith("#")) {
3
+ color = color.slice(1);
4
+ }
5
+ if (color.length === 3) {
6
+ color = color.split("").map(c => c + c).join("");
7
+ }
8
+ if (color.length !== 6) {
9
+ throw new Error("Invalid HEX color.");
10
+ }
11
+
12
+ const getValidColorValue = (start: number): number => {
13
+ const value = parseInt(color.slice(start, start + 2), 16);
14
+ return Number.isNaN(value) ? 0 : Math.min(255, Math.max(0, value + amount));
15
+ };
16
+
17
+ const r: number = getValidColorValue(0);
18
+ const g: number = getValidColorValue(2);
19
+ const b: number = getValidColorValue(4);
20
+
21
+ return `#${((1 << 24) + (r << 16) + (g << 8) + b)
22
+ .toString(16)
23
+ .slice(1)
24
+ .toUpperCase()}`;
25
+ };
26
+
7
27
  export default LightenColorShades;
@@ -13,7 +13,11 @@ const guidelineBaseWidth = 350;
13
13
  const guidelineBaseHeight = 680;
14
14
  const [shortDimension, longDimension] = SCREEN_WIDTH < SCREEN_HEIGHT ? [SCREEN_WIDTH, SCREEN_HEIGHT] : [SCREEN_HEIGHT, SCREEN_WIDTH];
15
15
 
16
+ const scalingCache = new Map<'hScale' | 'vScale' | 'fs', object>();
16
17
 
18
+ export const fun = () => {
19
+ return scalingCache
20
+ }
17
21
  const checkIsPhone = (size: number): number => {
18
22
  if (SCREEN_WIDTH <= 430 && SCREEN_WIDTH >= 375) {
19
23
  return size;
@@ -24,11 +28,18 @@ export const horizontalScale = (size: number): number => {
24
28
  if (checkIsPhone(size)) {
25
29
  return size;
26
30
  }
31
+ const hScaleCache: any = scalingCache.get('hScale') || {};
32
+ if (hScaleCache?.[size]) {
33
+ return hScaleCache?.[size];
34
+ }
27
35
  const slowDownRate = SCREEN_WIDTH < 375 ? 2 : 0.40;
28
36
  let scale = (shortDimension / guidelineBaseHeight);
29
37
  scale = 1 + (scale - 1) * slowDownRate;
30
38
  let adjustedSize = size * Math.max(scale, 0.80);
31
- return Math.floor(PixelRatio.roundToNearestPixel(adjustedSize));
39
+ const finalSize = Math.floor(PixelRatio.roundToNearestPixel(adjustedSize));
40
+ hScaleCache[size] = finalSize;
41
+ scalingCache.set('hScale', hScaleCache)
42
+ return finalSize;
32
43
  }
33
44
 
34
45
 
@@ -36,11 +47,18 @@ export const verticalScale = (size: number): number => {
36
47
  if (checkIsPhone(size)) {
37
48
  return size;
38
49
  }
50
+ const vScaleCache: any = scalingCache.get('vScale') || {};
51
+ if (vScaleCache?.[size]) {
52
+ return vScaleCache?.[size];
53
+ }
39
54
  const slowDownRate = SCREEN_WIDTH < 375 ? 2 : 0.40;
40
55
  let scale = (longDimension / guidelineBaseHeight);
41
56
  scale = 1 + (scale - 1) * slowDownRate;
42
57
  let adjustedSize = size * Math.max(scale, 0.80);
43
- return Math.floor(PixelRatio.roundToNearestPixel(adjustedSize));
58
+ const finalSize = Math.floor(PixelRatio.roundToNearestPixel(adjustedSize));
59
+ vScaleCache[size] = finalSize;
60
+ scalingCache.set('vScale', vScaleCache)
61
+ return finalSize;
44
62
  }
45
63
 
46
64
 
@@ -63,13 +81,20 @@ export const responsiveFontSize = (fontSize: number): number => {
63
81
  if (checkIsPhone(fontSize)) {
64
82
  return fontSize;
65
83
  }
84
+ const fsCache: any = scalingCache.get('fs') || {};
85
+ if (fsCache?.[fontSize]) {
86
+ return fsCache?.[fontSize];
87
+ }
66
88
  const slowDownRate = SCREEN_WIDTH < 375 ? 2 : 0.20
67
89
  const screenDiagonal = Math.sqrt(SCREEN_WIDTH ** 2 + SCREEN_HEIGHT ** 2);
68
90
  const baseScreenDiagonal = Math.sqrt(360 ** 2 + 640 ** 2);
69
91
  let scale = screenDiagonal / baseScreenDiagonal;
70
92
  scale = 1 + (scale - 1) * slowDownRate;
71
93
  let adjustedFontSize = fontSize * Math.max(scale, 0.85);
72
- return Math.floor(PixelRatio.roundToNearestPixel(adjustedFontSize))
94
+ const finalSize = Math.floor(PixelRatio.roundToNearestPixel(adjustedFontSize));
95
+ fsCache[fontSize] = finalSize;
96
+ scalingCache.set('vScale', fsCache)
97
+ return finalSize;
73
98
  };
74
99
 
75
100
 
@@ -1,2 +1,3 @@
1
1
  export { default as getGridValue } from './CalculateGridSize';
2
- export { default as deviceScreenSizeCategory } from './DeviceSizeCategory';
2
+ export { default as deviceScreenSizeCategory } from './DeviceSizeCategory';
3
+ export * from "./ResponsiveCalculations";
package/src/index.ts CHANGED
@@ -11,7 +11,7 @@ export { default as Progress } from './components/Progress/Progress';
11
11
  export { default as Slider } from './components/Slider/Slider';
12
12
  export { default as Surface } from './components/Surface/Surface';
13
13
  export { default as Switch } from './components/Switch/Switch';
14
- export { default as TouchableRipple } from './components/TouchableRipple/TouchableRipple';
14
+ // export { default as TouchableRipple } from './components/TouchableRipple/TouchableRipple';
15
15
  export { Dialog, DialogHead, DialogBody, DialogFoot, DialogDescription } from './components/Dialog';
16
16
  export { default as CheckBox } from './components/CheckBox/CheckBox';
17
17
  export { default as Avatar } from './components/Avatar';
@@ -41,7 +41,7 @@ export type { ProgressProps } from './components/Progress/Progress';
41
41
  export type { SliderProps } from './components/Slider/Slider';
42
42
  export type { SurfaceProps } from './components/Surface/Surface';
43
43
  export type { SwitchProps } from './components/Switch/Switch';
44
- export type { TouchableRippleProps } from './components/TouchableRipple/TouchableRipple';
44
+ // export type { TouchableRippleProps } from './components/TouchableRipple/TouchableRipple';
45
45
  export type { DialogProps, DialogHeadProps, DialogBodyProps, DialogFootProps, DialogDescriptionProps } from './components/Dialog';
46
46
  export type { CheckBoxProps } from './components/CheckBox/CheckBox';
47
47
  export type { AvatarTextProps, AvatarImageProps } from './components/Avatar';
@@ -1,4 +1,3 @@
1
- import Color from "color";
2
1
  import { dialogSizes, typographySizes } from "../constants";
3
2
  import type { ThemeTypes } from "../types";
4
3
 
@@ -56,7 +55,7 @@ import type { ThemeTypes } from "../types";
56
55
  // switchColor: '#353935',
57
56
  // error: '#ED2939',
58
57
  // })
59
- console.log(Color('rgba(0, 0, 0, 1)').alpha(0.12).rgb().string())
58
+ // console.log(Color('rgba(0, 0, 0, 1)').alpha(0.12).rgb().string())
60
59
  const LightTheme: ThemeTypes = {
61
60
  isDark: false,
62
61
  colors: {
@@ -1,10 +1,11 @@
1
- import type { PressableProps, StyleProp, TextStyle, ViewStyle } from "react-native";
1
+ import type { StyleProp, TextStyle, TouchableOpacityProps, ViewStyle } from "react-native";
2
2
  import type { ButtonVariant, TypographyVariant } from "./common.type";
3
+ import type { JSX } from "react";
3
4
 
4
5
  /**
5
6
  * @see https://rn-nativeflow-docs.onrender.com/docs/components/button
6
7
  */
7
- export type ButtonProps = PressableProps & {
8
+ export type ButtonProps = TouchableOpacityProps & {
8
9
  /** Specifies the button style variant (e.g., 'contained', 'outlined') */
9
10
  variant?: ButtonVariant;
10
11
 
@@ -1,3 +1,4 @@
1
+ import type { JSX } from "react";
1
2
  import type { PressableProps, StyleProp, TextStyle, ViewStyle } from "react-native";
2
3
 
3
4
  export type ChipProps = PressableProps & {
@@ -11,9 +11,6 @@ export type DialogProps = {
11
11
  /** Defines the dialog style variant */
12
12
  variant?: DialogVariant;
13
13
 
14
- /** Controls the visibility of the dialog */
15
- isVisible?: boolean;
16
-
17
14
  /** Defines the horizontal size of the dialog */
18
15
  size?: 'xs' | 'sm' | 'md' | 'lg' | 'full';
19
16
 
@@ -23,12 +20,12 @@ export type DialogProps = {
23
20
  /** Background color of the backdrop */
24
21
  backdropColor?: string;
25
22
 
26
- /** Duration of the animation in milliseconds */
27
- animationDuration?: number;
28
-
29
23
  /** Callback function triggered when the dialog is closed */
30
24
  onClose?: () => void;
31
25
 
26
+ /** Custom styles for the dialog container */
27
+ containerStyle?: StyleProp<ViewStyle>;
28
+
32
29
  /** Content to be displayed inside the dialog */
33
30
  children?: ReactNode;
34
31
  };
@@ -46,12 +43,13 @@ export type DialogBodyProps = {
46
43
  };
47
44
 
48
45
  export type DialogDescriptionProps = {
49
- /** Font size for the dialog description text */
50
- fs?: number;
51
46
 
52
47
  /** Variant of the typography to be applied to the text */
53
48
  textVariant?: TypographyVariant;
54
49
 
50
+ /** Font size for the dialog description text */
51
+ fs?: number;
52
+
55
53
  /** Style for the container wrapping the dialog description */
56
54
  containerStyle?: StyleProp<ViewStyle>;
57
55
 
@@ -9,4 +9,5 @@ export * from './menu.type';
9
9
  export * from './stack.type';
10
10
  export * from './styledComponents.type';
11
11
  export * from './switch.type';
12
- export * from './userInput.type';
12
+ export * from './userInput.type';
13
+ export * from './progress.type'
@@ -1,5 +1,5 @@
1
- import type { ReactNode } from "react";
2
- import type { StyleProp, TextStyle, TouchableOpacityProps, ViewStyle } from "react-native";
1
+ import type { JSX, ReactNode } from "react";
2
+ import type { StyleProp, TextStyle, TouchableOpacityProps, View, ViewStyle } from "react-native";
3
3
  import type { TypographyVariant } from "./common.type";
4
4
 
5
5
 
@@ -52,6 +52,12 @@ export type MenuProps = {
52
52
  * Child components to be rendered inside the menu.
53
53
  */
54
54
  children?: ReactNode;
55
+
56
+ /**
57
+ * A ref to access the underlying View component.
58
+ * This can be used for measuring layout, animations, or imperative interactions.
59
+ */
60
+ ref?: React.RefObject<View | null>
55
61
  };
56
62
 
57
63
 
@@ -0,0 +1,16 @@
1
+ export type ProgressProps = {
2
+ /** Current progress value (0-100) */
3
+ value?: number;
4
+
5
+ /** Thickness of the progress bar */
6
+ thickness?: number;
7
+
8
+ /** Border radius of the progress bar */
9
+ br?: number;
10
+
11
+ /** Background color of the track (unfilled part) */
12
+ trackColor?: string;
13
+
14
+ /** Color of the progress (filled part) */
15
+ progressColor?: string;
16
+ }