@nexara/nativeflow 0.1.2 → 0.1.6

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 (149) hide show
  1. package/README.md +2 -36
  2. package/lib/commonjs/components/Button/Button.js +13 -12
  3. package/lib/commonjs/components/Button/Button.js.map +1 -1
  4. package/lib/commonjs/components/Chip/Chip.js +2 -2
  5. package/lib/commonjs/components/Chip/Chip.js.map +1 -1
  6. package/lib/commonjs/components/Dialog/Dialog.js +2 -1
  7. package/lib/commonjs/components/Dialog/Dialog.js.map +1 -1
  8. package/lib/commonjs/components/Dialog/DialogDescription.js +1 -1
  9. package/lib/commonjs/components/Dialog/DialogDescription.js.map +1 -1
  10. package/lib/commonjs/components/Dialog/DialogFoot.js.map +1 -1
  11. package/lib/commonjs/components/Divider/Divider.js +0 -1
  12. package/lib/commonjs/components/Divider/Divider.js.map +1 -1
  13. package/lib/commonjs/components/Grid/Grid.js +0 -1
  14. package/lib/commonjs/components/Grid/Grid.js.map +1 -1
  15. package/lib/commonjs/components/Icon/Icon.js.map +1 -1
  16. package/lib/commonjs/components/IconButton/IconButton.js +6 -3
  17. package/lib/commonjs/components/IconButton/IconButton.js.map +1 -1
  18. package/lib/commonjs/components/Menu/Menu.js.map +1 -1
  19. package/lib/commonjs/components/Stack/HStack.js +2 -4
  20. package/lib/commonjs/components/Stack/HStack.js.map +1 -1
  21. package/lib/commonjs/components/Stack/VStack.js +4 -7
  22. package/lib/commonjs/components/Stack/VStack.js.map +1 -1
  23. package/lib/commonjs/components/StyledComponents/StyledText.js +3 -5
  24. package/lib/commonjs/components/StyledComponents/StyledText.js.map +1 -1
  25. package/lib/commonjs/components/Switch/Switch.js +2 -2
  26. package/lib/commonjs/components/Switch/Switch.js.map +1 -1
  27. package/lib/commonjs/components/TouchableRipple/TouchableRipple.js +90 -103
  28. package/lib/commonjs/components/TouchableRipple/TouchableRipple.js.map +1 -1
  29. package/lib/commonjs/components/UserInput/UserInput.js +2 -2
  30. package/lib/commonjs/components/UserInput/UserInput.js.map +1 -1
  31. package/lib/commonjs/index.js +4 -12
  32. package/lib/commonjs/index.js.map +1 -2
  33. package/lib/module/components/Button/Button.js +14 -13
  34. package/lib/module/components/Button/Button.js.map +1 -1
  35. package/lib/module/components/Chip/Chip.js +2 -2
  36. package/lib/module/components/Chip/Chip.js.map +1 -1
  37. package/lib/module/components/Dialog/Dialog.js +2 -1
  38. package/lib/module/components/Dialog/Dialog.js.map +1 -1
  39. package/lib/module/components/Dialog/DialogDescription.js +1 -1
  40. package/lib/module/components/Dialog/DialogDescription.js.map +1 -1
  41. package/lib/module/components/Dialog/DialogFoot.js.map +1 -1
  42. package/lib/module/components/Divider/Divider.js +0 -1
  43. package/lib/module/components/Divider/Divider.js.map +1 -1
  44. package/lib/module/components/Grid/Grid.js +0 -1
  45. package/lib/module/components/Grid/Grid.js.map +1 -1
  46. package/lib/module/components/Icon/Icon.js.map +1 -1
  47. package/lib/module/components/IconButton/IconButton.js +5 -3
  48. package/lib/module/components/IconButton/IconButton.js.map +1 -1
  49. package/lib/module/components/Menu/Menu.js.map +1 -1
  50. package/lib/module/components/Stack/HStack.js +2 -4
  51. package/lib/module/components/Stack/HStack.js.map +1 -1
  52. package/lib/module/components/Stack/VStack.js +5 -8
  53. package/lib/module/components/Stack/VStack.js.map +1 -1
  54. package/lib/module/components/StyledComponents/StyledText.js +3 -5
  55. package/lib/module/components/StyledComponents/StyledText.js.map +1 -1
  56. package/lib/module/components/Switch/Switch.js +2 -2
  57. package/lib/module/components/Switch/Switch.js.map +1 -1
  58. package/lib/module/components/TouchableRipple/TouchableRipple.js +90 -96
  59. package/lib/module/components/TouchableRipple/TouchableRipple.js.map +1 -1
  60. package/lib/module/components/UserInput/UserInput.js +2 -2
  61. package/lib/module/components/UserInput/UserInput.js.map +1 -1
  62. package/lib/module/components/UserInput/UserInputV2.js.map +1 -1
  63. package/lib/module/index.js +3 -1
  64. package/lib/module/index.js.map +1 -1
  65. package/lib/typescript/commonjs/src/components/Button/Button.d.ts.map +1 -1
  66. package/lib/typescript/commonjs/src/components/Dialog/Dialog.d.ts.map +1 -1
  67. package/lib/typescript/commonjs/src/components/Divider/Divider.d.ts.map +1 -1
  68. package/lib/typescript/commonjs/src/components/Grid/Grid.d.ts.map +1 -1
  69. package/lib/typescript/commonjs/src/components/Icon/Icon.d.ts +1 -2
  70. package/lib/typescript/commonjs/src/components/Icon/Icon.d.ts.map +1 -1
  71. package/lib/typescript/commonjs/src/components/IconButton/IconButton.d.ts +2 -2
  72. package/lib/typescript/commonjs/src/components/IconButton/IconButton.d.ts.map +1 -1
  73. package/lib/typescript/commonjs/src/components/Stack/HStack.d.ts.map +1 -1
  74. package/lib/typescript/commonjs/src/components/Stack/VStack.d.ts.map +1 -1
  75. package/lib/typescript/commonjs/src/components/StyledComponents/StyledText.d.ts.map +1 -1
  76. package/lib/typescript/commonjs/src/components/TouchableRipple/TouchableRipple.d.ts +0 -10
  77. package/lib/typescript/commonjs/src/components/TouchableRipple/TouchableRipple.d.ts.map +1 -1
  78. package/lib/typescript/commonjs/src/components/UserInput/UserInputV2.d.ts +1 -1
  79. package/lib/typescript/commonjs/src/components/UserInput/UserInputV2.d.ts.map +1 -1
  80. package/lib/typescript/commonjs/src/index.d.ts +0 -2
  81. package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
  82. package/lib/typescript/commonjs/src/types/button.type.d.ts +2 -2
  83. package/lib/typescript/commonjs/src/types/button.type.d.ts.map +1 -1
  84. package/lib/typescript/commonjs/src/types/chip.type.d.ts +1 -0
  85. package/lib/typescript/commonjs/src/types/chip.type.d.ts.map +1 -1
  86. package/lib/typescript/commonjs/src/types/dialog.type.d.ts +4 -4
  87. package/lib/typescript/commonjs/src/types/dialog.type.d.ts.map +1 -1
  88. package/lib/typescript/commonjs/src/types/menu.type.d.ts +7 -2
  89. package/lib/typescript/commonjs/src/types/menu.type.d.ts.map +1 -1
  90. package/lib/typescript/commonjs/src/types/stack.type.d.ts +4 -13
  91. package/lib/typescript/commonjs/src/types/stack.type.d.ts.map +1 -1
  92. package/lib/typescript/commonjs/src/types/userInput.type.d.ts +1 -0
  93. package/lib/typescript/commonjs/src/types/userInput.type.d.ts.map +1 -1
  94. package/lib/typescript/module/src/components/Button/Button.d.ts.map +1 -1
  95. package/lib/typescript/module/src/components/Dialog/Dialog.d.ts.map +1 -1
  96. package/lib/typescript/module/src/components/Divider/Divider.d.ts.map +1 -1
  97. package/lib/typescript/module/src/components/Grid/Grid.d.ts.map +1 -1
  98. package/lib/typescript/module/src/components/Icon/Icon.d.ts +1 -2
  99. package/lib/typescript/module/src/components/Icon/Icon.d.ts.map +1 -1
  100. package/lib/typescript/module/src/components/IconButton/IconButton.d.ts +2 -2
  101. package/lib/typescript/module/src/components/IconButton/IconButton.d.ts.map +1 -1
  102. package/lib/typescript/module/src/components/Stack/HStack.d.ts.map +1 -1
  103. package/lib/typescript/module/src/components/Stack/VStack.d.ts.map +1 -1
  104. package/lib/typescript/module/src/components/StyledComponents/StyledText.d.ts.map +1 -1
  105. package/lib/typescript/module/src/components/TouchableRipple/TouchableRipple.d.ts +0 -10
  106. package/lib/typescript/module/src/components/TouchableRipple/TouchableRipple.d.ts.map +1 -1
  107. package/lib/typescript/module/src/components/UserInput/UserInputV2.d.ts +1 -1
  108. package/lib/typescript/module/src/components/UserInput/UserInputV2.d.ts.map +1 -1
  109. package/lib/typescript/module/src/index.d.ts +0 -2
  110. package/lib/typescript/module/src/index.d.ts.map +1 -1
  111. package/lib/typescript/module/src/types/button.type.d.ts +2 -2
  112. package/lib/typescript/module/src/types/button.type.d.ts.map +1 -1
  113. package/lib/typescript/module/src/types/chip.type.d.ts +1 -0
  114. package/lib/typescript/module/src/types/chip.type.d.ts.map +1 -1
  115. package/lib/typescript/module/src/types/dialog.type.d.ts +4 -4
  116. package/lib/typescript/module/src/types/dialog.type.d.ts.map +1 -1
  117. package/lib/typescript/module/src/types/menu.type.d.ts +7 -2
  118. package/lib/typescript/module/src/types/menu.type.d.ts.map +1 -1
  119. package/lib/typescript/module/src/types/stack.type.d.ts +4 -13
  120. package/lib/typescript/module/src/types/stack.type.d.ts.map +1 -1
  121. package/lib/typescript/module/src/types/userInput.type.d.ts +1 -0
  122. package/lib/typescript/module/src/types/userInput.type.d.ts.map +1 -1
  123. package/package.json +29 -19
  124. package/src/components/Button/Button.tsx +21 -13
  125. package/src/components/Chip/Chip.tsx +2 -2
  126. package/src/components/Dialog/Dialog.tsx +2 -1
  127. package/src/components/Dialog/DialogDescription.tsx +1 -1
  128. package/src/components/Dialog/DialogFoot.tsx +1 -1
  129. package/src/components/Divider/Divider.tsx +0 -1
  130. package/src/components/Grid/Grid.tsx +0 -1
  131. package/src/components/Icon/Icon.tsx +1 -2
  132. package/src/components/IconButton/IconButton.tsx +6 -6
  133. package/src/components/Menu/Menu.tsx +1 -1
  134. package/src/components/Stack/HStack.tsx +5 -7
  135. package/src/components/Stack/VStack.tsx +8 -10
  136. package/src/components/StyledComponents/StyledText.tsx +2 -3
  137. package/src/components/StyledComponents/StyledView.tsx +1 -1
  138. package/src/components/Switch/Switch.tsx +2 -2
  139. package/src/components/TouchableRipple/TouchableRipple.tsx +83 -83
  140. package/src/components/UserInput/UserInput.tsx +2 -2
  141. package/src/components/UserInput/UserInputV2.tsx +2 -2
  142. package/src/index.ts +2 -2
  143. package/src/types/button.type.ts +2 -2
  144. package/src/types/chip.type.ts +1 -0
  145. package/src/types/dialog.type.ts +6 -5
  146. package/src/types/menu.type.ts +8 -2
  147. package/src/types/stack.type.ts +4 -15
  148. package/src/types/userInput.type.ts +1 -0
  149. package/src/index.tsx +0 -3
package/package.json CHANGED
@@ -1,10 +1,11 @@
1
1
  {
2
2
  "name": "@nexara/nativeflow",
3
- "version": "0.1.2",
3
+ "version": "0.1.6",
4
4
  "description": "Beautiful, responsive, and customizable UI components for React Native – built for performance and seamless experiences.",
5
5
  "source": "./src/index.ts",
6
6
  "main": "./lib/commonjs/index.js",
7
7
  "module": "./lib/module/index.js",
8
+ "sideEffects": false,
8
9
  "exports": {
9
10
  ".": {
10
11
  "import": {
@@ -43,12 +44,30 @@
43
44
  "lint": "eslint \"**/*.{js,ts,tsx}\"",
44
45
  "clean": "del-cli lib",
45
46
  "prepare": "bob build",
46
- "release": "release-it"
47
+ "size": "size-limit",
48
+ "release": "release-it",
49
+ "build-docs": "cd docs && yarn build",
50
+ "start-docs": "cd docs && yarn start"
47
51
  },
48
52
  "keywords": [
49
53
  "react-native",
50
54
  "ios",
51
- "android"
55
+ "android",
56
+ "react-native",
57
+ "react-native-ui",
58
+ "react-native-components",
59
+ "react-native-library",
60
+ "mobile-ui",
61
+ "react-native-kit",
62
+ "cross-platform-ui",
63
+ "react-native-ios",
64
+ "react-native-android",
65
+ "ui-components",
66
+ "custom-components",
67
+ "react-native-design-system",
68
+ "react-native-styling",
69
+ "rn-ui",
70
+ "react-native-ui-kit"
52
71
  ],
53
72
  "repository": {
54
73
  "type": "git",
@@ -71,7 +90,7 @@
71
90
  "@react-native/eslint-config": "^0.73.1",
72
91
  "@release-it/conventional-changelog": "^9.0.2",
73
92
  "@types/jest": "^29.5.5",
74
- "@types/react": "^18.2.44",
93
+ "@types/react": "^19.0.0",
75
94
  "commitlint": "^17.0.2",
76
95
  "del-cli": "^5.1.0",
77
96
  "eslint": "^8.51.0",
@@ -79,25 +98,20 @@
79
98
  "eslint-plugin-prettier": "^5.0.1",
80
99
  "jest": "^29.7.0",
81
100
  "prettier": "^3.0.3",
82
- "react": "18.3.1",
83
- "react-native": "0.76.7",
101
+ "react": "^19.0.0",
102
+ "react-native": "^0.78.0",
84
103
  "react-native-builder-bob": "^0.36.0",
85
- "react-native-gesture-handler": "^2.24.0",
86
- "react-native-reanimated": "~3.16.1",
87
104
  "react-native-svg": "^15.11.2",
88
105
  "release-it": "^17.10.0",
89
106
  "typescript": "^5.2.2"
90
107
  },
91
- "resolutions": {
92
- "@types/react": "^18.2.44"
93
- },
94
108
  "peerDependencies": {
95
- "react": "*",
96
- "react-native": "*",
97
- "react-native-reanimated": "~3.16.1"
109
+ "react": "^18.0.0 || ^19.0.0",
110
+ "react-native": ">=0.72.0"
98
111
  },
99
112
  "workspaces": [
100
- "example"
113
+ "example",
114
+ "docs"
101
115
  ],
102
116
  "packageManager": "yarn@3.6.1",
103
117
  "jest": {
@@ -189,9 +203,5 @@
189
203
  "languages": "js",
190
204
  "type": "library",
191
205
  "version": "0.48.3"
192
- },
193
- "dependencies": {
194
- "color": "^5.0.0",
195
- "lucide-react-native": "^0.479.0"
196
206
  }
197
207
  }
@@ -1,12 +1,10 @@
1
1
  import React from 'react';
2
2
  import type { JSX } from 'react';
3
- import { StyleSheet } from "react-native";
4
- import type { ViewStyle } from 'react-native';
3
+ import { StyleSheet, TouchableOpacity, type ViewStyle } from "react-native";
5
4
  import { verticalScale, horizontalScale } from "../../helpers/ResponsiveCalculations";
6
5
  import { StyledText, StyledView } from '../StyledComponents';
7
6
  import { useTheme } from '../../hooks';
8
7
  import { getButtonColors } from './utils';
9
- import TouchableRipple from '../TouchableRipple/TouchableRipple';
10
8
  import type { ButtonProps } from '../../types';
11
9
 
12
10
 
@@ -34,7 +32,7 @@ const Button: React.FC<ButtonProps> = ({
34
32
  buttonContainerStyle,
35
33
  textStyle,
36
34
  onPress,
37
- ...props
35
+ ...rest
38
36
  }) => {
39
37
  const theme: any = useTheme();
40
38
 
@@ -83,13 +81,21 @@ const Button: React.FC<ButtonProps> = ({
83
81
  return (<>
84
82
  {type === 'flat' && (
85
83
  <StyledView style={[STYLES.FLAT_BTN_MAIN_CONT, dynamicStyles.FLAT_BTN_MAIN_CONT]}>
86
- <TouchableRipple
84
+ <TouchableOpacity
87
85
  onPress={onPress}
88
- rippleColor={rippleColor}
86
+ // rippleColor={rippleColor}
89
87
  disabled={disabled}
90
88
  // ref={ref}
91
- {...props}
89
+ {...rest}
92
90
  >
91
+
92
+ {/* <TouchableRipple
93
+ onPress={onPress}
94
+ rippleColor={rippleColor}
95
+ disabled={disabled}
96
+ // ref={ref}
97
+ {...rest}
98
+ > */}
93
99
  <StyledView
94
100
  style={[
95
101
  STYLES.FLAT_BTN_INNER_CONT,
@@ -125,16 +131,18 @@ const Button: React.FC<ButtonProps> = ({
125
131
  </StyledView>
126
132
  )}
127
133
  </StyledView>
128
- </TouchableRipple>
134
+ {/* </TouchableRipple> */}
135
+ </TouchableOpacity>
136
+
129
137
  </StyledView>
130
138
  )}
131
139
 
132
140
  {type === 'round' && (
133
141
  <StyledView style={STYLES.ROUND_BTN_MAIN_CONT} >
134
- <TouchableRipple
142
+ <TouchableOpacity
135
143
  onPress={onPress}
136
- rippleColor={rippleColor}
137
- {...props}
144
+ // rippleColor={rippleColor}
145
+ {...rest}
138
146
  >
139
147
  <StyledView
140
148
  style={[
@@ -147,7 +155,7 @@ const Button: React.FC<ButtonProps> = ({
147
155
  >
148
156
  {renderIcon && cloneElement(renderIcon)}
149
157
  </StyledView>
150
- </TouchableRipple>
158
+ </TouchableOpacity>
151
159
  </StyledView>
152
160
  )}
153
161
  </>
@@ -176,7 +184,7 @@ const STYLES = StyleSheet.create({
176
184
  ROUND_BTN_MAIN_CONT: {
177
185
  overflow: 'hidden',
178
186
  borderRadius: verticalScale(100),
179
- // alignSelf: 'flex-start',
187
+ alignSelf: 'flex-start',
180
188
  },
181
189
  ROUND_BTN_INNER_CONT: {
182
190
  alignItems: 'center',
@@ -23,7 +23,7 @@ const Chip: React.FC<ChipProps> = ({
23
23
  renderRightIcon,
24
24
  containerStyle,
25
25
  textStyle,
26
- ...props
26
+ ...rest
27
27
  }) => {
28
28
 
29
29
  const theme: any = useTheme();
@@ -58,7 +58,7 @@ const Chip: React.FC<ChipProps> = ({
58
58
  android_ripple={{
59
59
  color: rippleColor,
60
60
  }}
61
- {...props}
61
+ {...rest}
62
62
  disabled={disabled}
63
63
  >
64
64
  <StyledView style={[STYLES.CONTAINER, containerStyle]}>
@@ -14,6 +14,7 @@ const Dialog = forwardRef<DialogRefProps, DialogProps>(({
14
14
  backdropColor = 'rgba(0, 0, 0, 0.5)',
15
15
  // animationDuration = 800,
16
16
  onClose,
17
+ containerStyle,
17
18
  children,
18
19
  }, ref) => {
19
20
 
@@ -88,7 +89,7 @@ const Dialog = forwardRef<DialogRefProps, DialogProps>(({
88
89
  onStartShouldSetResponder={handleStartShouldSetResponder}
89
90
  >
90
91
  <Animated.View
91
- style={[STYLES.MODAL_CONT, dynamicModalContStyles, modalContAnimatedStyles]}
92
+ style={[STYLES.MODAL_CONT, dynamicModalContStyles, modalContAnimatedStyles, containerStyle]}
92
93
  onStartShouldSetResponder={() => true}
93
94
  >
94
95
  {renderChildrenWithVariant()}
@@ -5,8 +5,8 @@ import { StyledText } from '../StyledComponents';
5
5
  import type { DialogDescriptionProps } from '../../types';
6
6
 
7
7
  const DialogDescription: React.FC<DialogDescriptionProps> = ({
8
- fs,
9
8
  textVariant = 'h5',
9
+ fs,
10
10
  containerStyle,
11
11
  textStyle,
12
12
  children,
@@ -20,7 +20,7 @@ const DialogFoot: React.FC<props> = ({
20
20
  paddingHorizontal: moderateScale(variant === 'default' ? 16 : 25),
21
21
  };
22
22
  return (<>
23
- <Stack.H style={[STYLES.CONTAINER, dynamicStyles, containerStyle]}>
23
+ <Stack.H style={[STYLES.CONTAINER, dynamicStyles, containerStyle]}>
24
24
  {children}
25
25
  </Stack.H>
26
26
  </>);
@@ -12,7 +12,6 @@ type DividerProps = {
12
12
 
13
13
  const Divider: React.FC<DividerProps> = ({
14
14
  thickness = 0.2,
15
- // color = '#DCDBDB',
16
15
  color,
17
16
  style
18
17
  }) => {
@@ -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,5 +1,4 @@
1
- import React, { useMemo } from "react";
2
- import type { JSX } from 'react';
1
+ import React, { useMemo, type JSX } from "react";
3
2
  import { verticalScale } from "../../helpers/ResponsiveCalculations";
4
3
  import { useTheme } from "../../hooks";
5
4
 
@@ -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
  }
@@ -21,7 +21,7 @@ const Menu: React.FC<MenuProps> = ({
21
21
  const [isVisible, setIsVisible] = useState<boolean>(false);
22
22
  const anchorLayoutRef = useRef<anchorLayoutTypes>({ pageY: 0, pageX: 0, height: 0, width: 0 });
23
23
  const menuLayoutRef = useRef<menuLayoutTypes>({ height: 0, width: 0 });
24
- const buttonRef = useRef<View | null>(null);
24
+ const buttonRef = useRef<View>(null!);
25
25
  const animatedScaleRef = useRef(new Animated.Value(1)).current;
26
26
 
27
27
  const positions = (useCallback(() => (positionCalculations(anchorLayoutRef.current, menuLayoutRef.current, placement)), [menuLayoutRef, anchorLayoutRef, placement]))();
@@ -1,8 +1,8 @@
1
1
  import React, { useMemo } from "react";
2
- import { View } from "react-native";
2
+ import type { ViewStyle } from "react-native";
3
3
  import { horizontalScale } from "../../helpers/ResponsiveCalculations";
4
- import type { ViewStyle } from 'react-native';
5
4
  import type { HStackProps } from "../../types";
5
+ import { StyledView } from "../StyledComponents";
6
6
 
7
7
  const HStack: React.FC<HStackProps> = ({
8
8
  justify,
@@ -11,11 +11,10 @@ const HStack: React.FC<HStackProps> = ({
11
11
  gap = 10,
12
12
  style,
13
13
  children,
14
- ref,
15
14
  ...rest
16
15
  }) => {
17
16
  const calculatedGap: number = useMemo(() => horizontalScale(gap), [gap]);
18
-
17
+
19
18
  const viewProps: ViewStyle = {
20
19
  gap: calculatedGap,
21
20
  flexDirection: 'row',
@@ -25,13 +24,12 @@ const HStack: React.FC<HStackProps> = ({
25
24
  };
26
25
 
27
26
  return (<>
28
- <View
27
+ <StyledView
29
28
  style={[viewProps, style]}
30
- ref={ref}
31
29
  {...rest}
32
30
  >
33
31
  {children}
34
- </View>
32
+ </StyledView>
35
33
  </>)
36
34
  }
37
35
  export default HStack;
@@ -1,33 +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
11
  style,
11
- ref,
12
12
  ...rest
13
13
  }) => {
14
14
 
15
- const calculatedGap: number = useMemo(() => horizontalScale(gap), [gap]);
15
+ const calculatedGap: number = useMemo(() => verticalScale(gap), [gap]);
16
16
 
17
- const viewProps = {
17
+ const viewProps: ViewStyle = {
18
18
  flexDirection: 'column',
19
19
  alignItems: align,
20
20
  gap: calculatedGap,
21
21
  };
22
22
  return (<>
23
- <View
24
- {...viewProps}
25
- style={style}
26
- ref={ref}
23
+ <StyledView
24
+ style={[viewProps, style]}
27
25
  {...rest}
28
26
  >
29
27
  {children}
30
- </View>
28
+ </StyledView>
31
29
  </>)
32
30
  }
33
31
  export default VStack;
@@ -16,12 +16,11 @@ const StyledText: React.FC<StyledTextProps> = ({
16
16
  themeColor,
17
17
  primary,
18
18
  secondary,
19
- ...props
19
+ ...rest
20
20
  }) => {
21
21
  const { colors, typography: { variantSizes } }: any = useTheme();
22
22
  return (
23
23
  <Text
24
- // allowFontScaling={false}
25
24
  style={[{
26
25
  fontSize: responsiveFontSize(fs ?? variantSizes[variant]),
27
26
  fontFamily: ff ?? '',
@@ -31,7 +30,7 @@ const StyledText: React.FC<StyledTextProps> = ({
31
30
  },
32
31
  style,
33
32
  ]}
34
- {...props}
33
+ {...rest}
35
34
  >
36
35
  {children}
37
36
  </Text>
@@ -18,7 +18,7 @@ const StyledView: React.FC<StyledViewProps> = ({
18
18
  ref,
19
19
  ...rest
20
20
  }) => {
21
-
21
+
22
22
  const theme = useTheme(themeBg);
23
23
 
24
24
  return (
@@ -13,7 +13,7 @@ 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();
@@ -27,7 +27,7 @@ const Switch: React.FC<SwitchProps> = ({
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 };
@@ -34,7 +34,7 @@ const UserInput: React.FC<UserInputProps> = ({
34
34
  renderRightIcon,
35
35
  styles,
36
36
  ref,
37
- ...props
37
+ ...rest
38
38
  }) => {
39
39
 
40
40
  const theme: any = useTheme();
@@ -88,7 +88,7 @@ const UserInput: React.FC<UserInputProps> = ({
88
88
  editable={!disabled}
89
89
  multiline={multiline}
90
90
  cursorColor={computedCursorColor}
91
- {...props}
91
+ {...rest}
92
92
  />
93
93
  {
94
94
  renderRightIcon
@@ -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>