@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.
- package/README.md +2 -36
- package/lib/commonjs/components/Button/Button.js +13 -12
- package/lib/commonjs/components/Button/Button.js.map +1 -1
- package/lib/commonjs/components/Chip/Chip.js +2 -2
- package/lib/commonjs/components/Chip/Chip.js.map +1 -1
- package/lib/commonjs/components/Dialog/Dialog.js +2 -1
- package/lib/commonjs/components/Dialog/Dialog.js.map +1 -1
- package/lib/commonjs/components/Dialog/DialogDescription.js +1 -1
- package/lib/commonjs/components/Dialog/DialogDescription.js.map +1 -1
- package/lib/commonjs/components/Dialog/DialogFoot.js.map +1 -1
- package/lib/commonjs/components/Divider/Divider.js +0 -1
- package/lib/commonjs/components/Divider/Divider.js.map +1 -1
- package/lib/commonjs/components/Grid/Grid.js +0 -1
- package/lib/commonjs/components/Grid/Grid.js.map +1 -1
- package/lib/commonjs/components/Icon/Icon.js.map +1 -1
- package/lib/commonjs/components/IconButton/IconButton.js +6 -3
- package/lib/commonjs/components/IconButton/IconButton.js.map +1 -1
- package/lib/commonjs/components/Menu/Menu.js.map +1 -1
- package/lib/commonjs/components/Stack/HStack.js +2 -4
- package/lib/commonjs/components/Stack/HStack.js.map +1 -1
- package/lib/commonjs/components/Stack/VStack.js +4 -7
- package/lib/commonjs/components/Stack/VStack.js.map +1 -1
- package/lib/commonjs/components/StyledComponents/StyledText.js +3 -5
- package/lib/commonjs/components/StyledComponents/StyledText.js.map +1 -1
- package/lib/commonjs/components/Switch/Switch.js +2 -2
- package/lib/commonjs/components/Switch/Switch.js.map +1 -1
- package/lib/commonjs/components/TouchableRipple/TouchableRipple.js +90 -103
- package/lib/commonjs/components/TouchableRipple/TouchableRipple.js.map +1 -1
- package/lib/commonjs/components/UserInput/UserInput.js +2 -2
- package/lib/commonjs/components/UserInput/UserInput.js.map +1 -1
- package/lib/commonjs/index.js +4 -12
- package/lib/commonjs/index.js.map +1 -2
- package/lib/module/components/Button/Button.js +14 -13
- package/lib/module/components/Button/Button.js.map +1 -1
- package/lib/module/components/Chip/Chip.js +2 -2
- package/lib/module/components/Chip/Chip.js.map +1 -1
- package/lib/module/components/Dialog/Dialog.js +2 -1
- package/lib/module/components/Dialog/Dialog.js.map +1 -1
- package/lib/module/components/Dialog/DialogDescription.js +1 -1
- package/lib/module/components/Dialog/DialogDescription.js.map +1 -1
- package/lib/module/components/Dialog/DialogFoot.js.map +1 -1
- package/lib/module/components/Divider/Divider.js +0 -1
- package/lib/module/components/Divider/Divider.js.map +1 -1
- package/lib/module/components/Grid/Grid.js +0 -1
- package/lib/module/components/Grid/Grid.js.map +1 -1
- package/lib/module/components/Icon/Icon.js.map +1 -1
- package/lib/module/components/IconButton/IconButton.js +5 -3
- package/lib/module/components/IconButton/IconButton.js.map +1 -1
- package/lib/module/components/Menu/Menu.js.map +1 -1
- package/lib/module/components/Stack/HStack.js +2 -4
- package/lib/module/components/Stack/HStack.js.map +1 -1
- package/lib/module/components/Stack/VStack.js +5 -8
- package/lib/module/components/Stack/VStack.js.map +1 -1
- package/lib/module/components/StyledComponents/StyledText.js +3 -5
- package/lib/module/components/StyledComponents/StyledText.js.map +1 -1
- package/lib/module/components/Switch/Switch.js +2 -2
- package/lib/module/components/Switch/Switch.js.map +1 -1
- package/lib/module/components/TouchableRipple/TouchableRipple.js +90 -96
- package/lib/module/components/TouchableRipple/TouchableRipple.js.map +1 -1
- package/lib/module/components/UserInput/UserInput.js +2 -2
- package/lib/module/components/UserInput/UserInput.js.map +1 -1
- package/lib/module/components/UserInput/UserInputV2.js.map +1 -1
- package/lib/module/index.js +3 -1
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/commonjs/src/components/Button/Button.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Dialog/Dialog.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Divider/Divider.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Grid/Grid.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Icon/Icon.d.ts +1 -2
- package/lib/typescript/commonjs/src/components/Icon/Icon.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/IconButton/IconButton.d.ts +2 -2
- package/lib/typescript/commonjs/src/components/IconButton/IconButton.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Stack/HStack.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Stack/VStack.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/StyledComponents/StyledText.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/TouchableRipple/TouchableRipple.d.ts +0 -10
- package/lib/typescript/commonjs/src/components/TouchableRipple/TouchableRipple.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/UserInput/UserInputV2.d.ts +1 -1
- package/lib/typescript/commonjs/src/components/UserInput/UserInputV2.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/index.d.ts +0 -2
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/types/button.type.d.ts +2 -2
- package/lib/typescript/commonjs/src/types/button.type.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/types/chip.type.d.ts +1 -0
- package/lib/typescript/commonjs/src/types/chip.type.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/types/dialog.type.d.ts +4 -4
- package/lib/typescript/commonjs/src/types/dialog.type.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/types/menu.type.d.ts +7 -2
- package/lib/typescript/commonjs/src/types/menu.type.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/types/stack.type.d.ts +4 -13
- package/lib/typescript/commonjs/src/types/stack.type.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/types/userInput.type.d.ts +1 -0
- package/lib/typescript/commonjs/src/types/userInput.type.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Button/Button.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Dialog/Dialog.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Divider/Divider.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Grid/Grid.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Icon/Icon.d.ts +1 -2
- package/lib/typescript/module/src/components/Icon/Icon.d.ts.map +1 -1
- package/lib/typescript/module/src/components/IconButton/IconButton.d.ts +2 -2
- package/lib/typescript/module/src/components/IconButton/IconButton.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Stack/HStack.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Stack/VStack.d.ts.map +1 -1
- package/lib/typescript/module/src/components/StyledComponents/StyledText.d.ts.map +1 -1
- package/lib/typescript/module/src/components/TouchableRipple/TouchableRipple.d.ts +0 -10
- package/lib/typescript/module/src/components/TouchableRipple/TouchableRipple.d.ts.map +1 -1
- package/lib/typescript/module/src/components/UserInput/UserInputV2.d.ts +1 -1
- package/lib/typescript/module/src/components/UserInput/UserInputV2.d.ts.map +1 -1
- package/lib/typescript/module/src/index.d.ts +0 -2
- package/lib/typescript/module/src/index.d.ts.map +1 -1
- package/lib/typescript/module/src/types/button.type.d.ts +2 -2
- package/lib/typescript/module/src/types/button.type.d.ts.map +1 -1
- package/lib/typescript/module/src/types/chip.type.d.ts +1 -0
- package/lib/typescript/module/src/types/chip.type.d.ts.map +1 -1
- package/lib/typescript/module/src/types/dialog.type.d.ts +4 -4
- package/lib/typescript/module/src/types/dialog.type.d.ts.map +1 -1
- package/lib/typescript/module/src/types/menu.type.d.ts +7 -2
- package/lib/typescript/module/src/types/menu.type.d.ts.map +1 -1
- package/lib/typescript/module/src/types/stack.type.d.ts +4 -13
- package/lib/typescript/module/src/types/stack.type.d.ts.map +1 -1
- package/lib/typescript/module/src/types/userInput.type.d.ts +1 -0
- package/lib/typescript/module/src/types/userInput.type.d.ts.map +1 -1
- package/package.json +29 -19
- package/src/components/Button/Button.tsx +21 -13
- package/src/components/Chip/Chip.tsx +2 -2
- package/src/components/Dialog/Dialog.tsx +2 -1
- package/src/components/Dialog/DialogDescription.tsx +1 -1
- package/src/components/Dialog/DialogFoot.tsx +1 -1
- package/src/components/Divider/Divider.tsx +0 -1
- package/src/components/Grid/Grid.tsx +0 -1
- package/src/components/Icon/Icon.tsx +1 -2
- package/src/components/IconButton/IconButton.tsx +6 -6
- package/src/components/Menu/Menu.tsx +1 -1
- package/src/components/Stack/HStack.tsx +5 -7
- package/src/components/Stack/VStack.tsx +8 -10
- package/src/components/StyledComponents/StyledText.tsx +2 -3
- package/src/components/StyledComponents/StyledView.tsx +1 -1
- package/src/components/Switch/Switch.tsx +2 -2
- package/src/components/TouchableRipple/TouchableRipple.tsx +83 -83
- package/src/components/UserInput/UserInput.tsx +2 -2
- package/src/components/UserInput/UserInputV2.tsx +2 -2
- package/src/index.ts +2 -2
- package/src/types/button.type.ts +2 -2
- package/src/types/chip.type.ts +1 -0
- package/src/types/dialog.type.ts +6 -5
- package/src/types/menu.type.ts +8 -2
- package/src/types/stack.type.ts +4 -15
- package/src/types/userInput.type.ts +1 -0
- 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.
|
|
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
|
-
"
|
|
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": "^
|
|
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": "
|
|
83
|
-
"react-native": "0.
|
|
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
|
-
...
|
|
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
|
-
<
|
|
84
|
+
<TouchableOpacity
|
|
87
85
|
onPress={onPress}
|
|
88
|
-
rippleColor={rippleColor}
|
|
86
|
+
// rippleColor={rippleColor}
|
|
89
87
|
disabled={disabled}
|
|
90
88
|
// ref={ref}
|
|
91
|
-
{...
|
|
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
|
-
|
|
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
|
-
<
|
|
142
|
+
<TouchableOpacity
|
|
135
143
|
onPress={onPress}
|
|
136
|
-
rippleColor={rippleColor}
|
|
137
|
-
{...
|
|
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
|
-
</
|
|
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
|
-
|
|
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
|
-
...
|
|
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
|
-
{...
|
|
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()}
|
|
@@ -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
|
|
23
|
+
<Stack.H style={[STYLES.CONTAINER, dynamicStyles, containerStyle]}>
|
|
24
24
|
{children}
|
|
25
25
|
</Stack.H>
|
|
26
26
|
</>);
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import type { ReactNode } from "react";
|
|
3
|
-
import type
|
|
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 =
|
|
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
|
-
<
|
|
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
|
-
</
|
|
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
|
|
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 {
|
|
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
|
-
<
|
|
27
|
+
<StyledView
|
|
29
28
|
style={[viewProps, style]}
|
|
30
|
-
ref={ref}
|
|
31
29
|
{...rest}
|
|
32
30
|
>
|
|
33
31
|
{children}
|
|
34
|
-
</
|
|
32
|
+
</StyledView>
|
|
35
33
|
</>)
|
|
36
34
|
}
|
|
37
35
|
export default HStack;
|
|
@@ -1,33 +1,31 @@
|
|
|
1
1
|
import React, { useMemo } from "react";
|
|
2
|
-
import {
|
|
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(() =>
|
|
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
|
-
<
|
|
24
|
-
{
|
|
25
|
-
style={style}
|
|
26
|
-
ref={ref}
|
|
23
|
+
<StyledView
|
|
24
|
+
style={[viewProps, style]}
|
|
27
25
|
{...rest}
|
|
28
26
|
>
|
|
29
27
|
{children}
|
|
30
|
-
</
|
|
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
|
-
...
|
|
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
|
-
{...
|
|
33
|
+
{...rest}
|
|
35
34
|
>
|
|
36
35
|
{children}
|
|
37
36
|
</Text>
|
|
@@ -13,7 +13,7 @@ const Switch: React.FC<SwitchProps> = ({
|
|
|
13
13
|
activeTrackColor,
|
|
14
14
|
inactiveTrackColor = '#808080',
|
|
15
15
|
onChange,
|
|
16
|
-
...
|
|
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
|
-
{...
|
|
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
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}) => {
|
|
15
|
+
// const TouchableRipple: React.FC<TouchableRippleProps> = ({
|
|
16
|
+
// rippleColor = '#b6b6b681',
|
|
17
|
+
// style,
|
|
18
|
+
// children,
|
|
19
|
+
// ...rest
|
|
20
|
+
// }) => {
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
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
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
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
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
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
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
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
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
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
|
-
...
|
|
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
|
-
{...
|
|
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
|
-
{...
|
|
119
|
+
{...rest}
|
|
120
120
|
/> */}
|
|
121
121
|
<StyledText>Email</StyledText>
|
|
122
122
|
</View>
|