codingpixel-expo-app 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +112 -0
- package/bin/cli.js +9 -0
- package/dist/babel.js +198 -0
- package/dist/bootstrap.js +54 -0
- package/dist/fonts.js +98 -0
- package/dist/index.js +120 -0
- package/dist/install.js +243 -0
- package/dist/overlay.js +141 -0
- package/dist/patch.js +212 -0
- package/dist/prompts.js +115 -0
- package/dist/scaffold.js +43 -0
- package/dist/sdkNotes.js +19 -0
- package/dist/util.js +48 -0
- package/package.json +56 -0
- package/templates/base/assets/fonts/.gitkeep +0 -0
- package/templates/base/assets/images/.gitkeep +0 -0
- package/templates/base/assets/index.ts +8 -0
- package/templates/base/src/app/_layout.tsx +39 -0
- package/templates/base/src/app/index.tsx +13 -0
- package/templates/base/src/app/routes.tsx +9 -0
- package/templates/base/src/core/hooks/.gitkeep +0 -0
- package/templates/base/src/core/redux/hooks.ts +6 -0
- package/templates/base/src/core/redux/mmkvStorage.ts +18 -0
- package/templates/base/src/core/redux/reducers.ts +20 -0
- package/templates/base/src/core/redux/slices/userSlice.ts +31 -0
- package/templates/base/src/core/redux/store.ts +28 -0
- package/templates/base/src/core/services/.gitkeep +0 -0
- package/templates/base/src/core/tanstack/index.tsx +93 -0
- package/templates/base/src/core/tanstack/tanstack-keys.ts +42 -0
- package/templates/base/src/core/utils/config.ts +50 -0
- package/templates/base/src/core/utils/constants.ts +11 -0
- package/templates/base/src/core/utils/endpoints.ts +29 -0
- package/templates/base/src/core/utils/types.ts +47 -0
- package/templates/base/src/core/utils/validation.ts +10 -0
- package/templates/base/src/features/.gitkeep +0 -0
- package/templates/base/src/ui/appComponents/AppRefreshControl/index.tsx +39 -0
- package/templates/base/src/ui/appComponents/appButton/index.tsx +122 -0
- package/templates/base/src/ui/appComponents/appColumnView/index.tsx +320 -0
- package/templates/base/src/ui/appComponents/appFlashList/index.tsx +191 -0
- package/templates/base/src/ui/appComponents/appFlatList/index.tsx +172 -0
- package/templates/base/src/ui/appComponents/appIcon/index.tsx +105 -0
- package/templates/base/src/ui/appComponents/appInput/index.tsx +226 -0
- package/templates/base/src/ui/appComponents/appKeyboardAvoidingView/index.tsx +168 -0
- package/templates/base/src/ui/appComponents/appKeyboardAwareScrollView/index.tsx +188 -0
- package/templates/base/src/ui/appComponents/appLogger/index.tsx +22 -0
- package/templates/base/src/ui/appComponents/appPressable/index.tsx +220 -0
- package/templates/base/src/ui/appComponents/appRowView/index.tsx +320 -0
- package/templates/base/src/ui/appComponents/appSafeAreaInsets/index.tsx +24 -0
- package/templates/base/src/ui/appComponents/appScrollView/index.tsx +166 -0
- package/templates/base/src/ui/appComponents/appSkeleton/index.tsx +22 -0
- package/templates/base/src/ui/appComponents/appStatusBar/index.tsx +8 -0
- package/templates/base/src/ui/appComponents/appTabHeader/index.tsx +111 -0
- package/templates/base/src/ui/appComponents/appText/index.tsx +258 -0
- package/templates/base/src/ui/appComponents/appTextWrapper/index.tsx +84 -0
- package/templates/base/src/ui/appComponents/appWrapper/index.tsx +56 -0
- package/templates/base/src/ui/appComponents/customActivityIndicator/index.tsx +34 -0
- package/templates/base/src/ui/appComponents/customGetPermissionModal/index.tsx +62 -0
- package/templates/base/src/ui/appComponents/customModal/index.tsx +26 -0
- package/templates/base/src/ui/appComponents/customTextInput/index.tsx +143 -0
- package/templates/base/src/ui/components/.gitkeep +0 -0
- package/templates/base/src/ui/components/avatarBlock/index.tsx +42 -0
- package/templates/base/src/ui/components/backgroundGradient/index.tsx +24 -0
- package/templates/base/src/ui/components/errorFallback/index.tsx +40 -0
- package/templates/base/src/ui/iconComponents/IconFontAwesome6/index.tsx +22 -0
- package/templates/base/src/ui/iconComponents/IoniconsIcons/index.tsx +33 -0
- package/templates/base/src/ui/iconComponents/antDesignicons/index.tsx +22 -0
- package/templates/base/src/ui/iconComponents/featherIcons/index.tsx +22 -0
- package/templates/base/src/ui/iconComponents/materialCommunityIcons/index.tsx +24 -0
- package/templates/base/src/ui/iconComponents/materialIcons/index.tsx +23 -0
- package/templates/base/src/ui/iconComponents/octiconsIcons/index.tsx +23 -0
- package/templates/base/src/ui/theme/allFileStyles.ts +39 -0
- package/templates/base/src/ui/theme/colors.ts +54 -0
- package/templates/base/src/ui/theme/fonts.ts +3 -0
- package/templates/base/src/ui/theme/responsive.ts +27 -0
- package/templates/bottom-sheet/src/ui/appComponents/BottomSheetKeyboardAwareScrollView/index.tsx +111 -0
- package/templates/bottom-sheet/src/ui/appComponents/appBottomSheetBackdrop/index.tsx +27 -0
- package/templates/bottom-sheet/src/ui/appComponents/appBottomSheetScrollView/index.tsx +99 -0
- package/templates/bottom-sheet/src/ui/appComponents/appBottomSheetView/index.tsx +173 -0
- package/templates/bottom-sheet/src/ui/appComponents/customBottomSheetModal/index.tsx +17 -0
- package/templates/claude-command/init-app.md +41 -0
- package/templates/image-picker/media-constants.snippet.ts +18 -0
- package/templates/image-picker/src/core/services/PermissionService.ts +48 -0
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
import { Colors } from '@theme/colors';
|
|
2
|
+
import { Fonts } from '@theme/fonts';
|
|
3
|
+
import { RF, RFT } from '@theme/responsive';
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import { DimensionValue, Text, TextProps, TextStyle } from 'react-native';
|
|
6
|
+
|
|
7
|
+
interface AppTextProps extends TextProps {
|
|
8
|
+
size?: number;
|
|
9
|
+
color?: string;
|
|
10
|
+
fontFamily?: string;
|
|
11
|
+
capital?: boolean;
|
|
12
|
+
center?: boolean;
|
|
13
|
+
italic?: boolean;
|
|
14
|
+
|
|
15
|
+
flex?: number;
|
|
16
|
+
flexGrow?: number;
|
|
17
|
+
flexShrink?: number;
|
|
18
|
+
flexBasis?: number | DimensionValue;
|
|
19
|
+
alignSelf?: TextStyle['alignSelf'];
|
|
20
|
+
textAlign?: TextStyle['textAlign'];
|
|
21
|
+
width?: number | DimensionValue;
|
|
22
|
+
height?: number | DimensionValue;
|
|
23
|
+
minWidth?: number | DimensionValue;
|
|
24
|
+
maxWidth?: number | DimensionValue;
|
|
25
|
+
minHeight?: number | DimensionValue;
|
|
26
|
+
maxHeight?: number | DimensionValue;
|
|
27
|
+
|
|
28
|
+
position?: TextStyle['position'];
|
|
29
|
+
top?: number | DimensionValue;
|
|
30
|
+
bottom?: number | DimensionValue;
|
|
31
|
+
left?: number | DimensionValue;
|
|
32
|
+
right?: number | DimensionValue;
|
|
33
|
+
zIndex?: number;
|
|
34
|
+
|
|
35
|
+
margin?: number;
|
|
36
|
+
marginTop?: number;
|
|
37
|
+
marginBottom?: number;
|
|
38
|
+
marginLeft?: number;
|
|
39
|
+
marginRight?: number;
|
|
40
|
+
marginHorizontal?: number;
|
|
41
|
+
marginVertical?: number;
|
|
42
|
+
|
|
43
|
+
padding?: number;
|
|
44
|
+
paddingTop?: number;
|
|
45
|
+
paddingBottom?: number;
|
|
46
|
+
paddingLeft?: number;
|
|
47
|
+
paddingRight?: number;
|
|
48
|
+
paddingStart?: number;
|
|
49
|
+
paddingEnd?: number;
|
|
50
|
+
paddingHorizontal?: number;
|
|
51
|
+
paddingVertical?: number;
|
|
52
|
+
|
|
53
|
+
backgroundColor?: string;
|
|
54
|
+
borderRadius?: number;
|
|
55
|
+
borderTopLeftRadius?: number;
|
|
56
|
+
borderTopRightRadius?: number;
|
|
57
|
+
borderBottomLeftRadius?: number;
|
|
58
|
+
borderBottomRightRadius?: number;
|
|
59
|
+
|
|
60
|
+
borderWidth?: number;
|
|
61
|
+
borderTopWidth?: number;
|
|
62
|
+
borderBottomWidth?: number;
|
|
63
|
+
borderLeftWidth?: number;
|
|
64
|
+
borderRightWidth?: number;
|
|
65
|
+
borderColor?: string;
|
|
66
|
+
borderTopColor?: string;
|
|
67
|
+
borderBottomColor?: string;
|
|
68
|
+
borderLeftColor?: string;
|
|
69
|
+
borderRightColor?: string;
|
|
70
|
+
borderStyle?: TextStyle['borderStyle'];
|
|
71
|
+
|
|
72
|
+
textShadowColor?: string;
|
|
73
|
+
textShadowOffset?: { width: number; height: number };
|
|
74
|
+
textShadowRadius?: number;
|
|
75
|
+
|
|
76
|
+
lineHeight?: number;
|
|
77
|
+
letterSpacing?: number;
|
|
78
|
+
opacity?: number;
|
|
79
|
+
textDecorationLine?: TextStyle['textDecorationLine'];
|
|
80
|
+
textTransform?: TextStyle['textTransform'];
|
|
81
|
+
includeFontPadding?: boolean;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
const AppText: React.FC<AppTextProps> = props => {
|
|
85
|
+
const {
|
|
86
|
+
children,
|
|
87
|
+
size = 12,
|
|
88
|
+
color = Colors.PRIMARY,
|
|
89
|
+
fontFamily = Fonts.REGULAR,
|
|
90
|
+
capital = false,
|
|
91
|
+
center = false,
|
|
92
|
+
italic,
|
|
93
|
+
style,
|
|
94
|
+
flex,
|
|
95
|
+
flexGrow,
|
|
96
|
+
flexShrink,
|
|
97
|
+
flexBasis,
|
|
98
|
+
alignSelf,
|
|
99
|
+
width,
|
|
100
|
+
height,
|
|
101
|
+
minWidth,
|
|
102
|
+
maxWidth,
|
|
103
|
+
minHeight,
|
|
104
|
+
maxHeight,
|
|
105
|
+
textAlign,
|
|
106
|
+
position,
|
|
107
|
+
top,
|
|
108
|
+
bottom,
|
|
109
|
+
left,
|
|
110
|
+
right,
|
|
111
|
+
zIndex,
|
|
112
|
+
margin,
|
|
113
|
+
marginTop,
|
|
114
|
+
marginBottom,
|
|
115
|
+
marginLeft,
|
|
116
|
+
marginRight,
|
|
117
|
+
marginHorizontal,
|
|
118
|
+
marginVertical,
|
|
119
|
+
padding,
|
|
120
|
+
paddingTop,
|
|
121
|
+
paddingBottom,
|
|
122
|
+
paddingStart,
|
|
123
|
+
paddingEnd,
|
|
124
|
+
paddingLeft,
|
|
125
|
+
paddingRight,
|
|
126
|
+
paddingHorizontal,
|
|
127
|
+
paddingVertical,
|
|
128
|
+
backgroundColor,
|
|
129
|
+
borderRadius,
|
|
130
|
+
borderTopLeftRadius,
|
|
131
|
+
borderTopRightRadius,
|
|
132
|
+
borderBottomLeftRadius,
|
|
133
|
+
borderBottomRightRadius,
|
|
134
|
+
borderWidth,
|
|
135
|
+
borderTopWidth,
|
|
136
|
+
borderBottomWidth,
|
|
137
|
+
borderLeftWidth,
|
|
138
|
+
borderRightWidth,
|
|
139
|
+
borderColor,
|
|
140
|
+
borderTopColor,
|
|
141
|
+
borderBottomColor,
|
|
142
|
+
borderLeftColor,
|
|
143
|
+
borderRightColor,
|
|
144
|
+
borderStyle,
|
|
145
|
+
textShadowColor,
|
|
146
|
+
textShadowOffset,
|
|
147
|
+
textShadowRadius,
|
|
148
|
+
lineHeight,
|
|
149
|
+
letterSpacing,
|
|
150
|
+
opacity,
|
|
151
|
+
textDecorationLine,
|
|
152
|
+
textTransform,
|
|
153
|
+
includeFontPadding,
|
|
154
|
+
lineBreakMode,
|
|
155
|
+
...rest
|
|
156
|
+
} = props;
|
|
157
|
+
|
|
158
|
+
const toDim = (v?: number | DimensionValue) =>
|
|
159
|
+
v === undefined ? undefined : typeof v === 'number' ? RF(v) : v;
|
|
160
|
+
|
|
161
|
+
const textStyle: TextStyle = {
|
|
162
|
+
fontSize: RFT(size),
|
|
163
|
+
fontFamily,
|
|
164
|
+
color,
|
|
165
|
+
fontStyle: italic ? 'italic' : 'normal',
|
|
166
|
+
textTransform: capital ? 'uppercase' : textTransform || 'none',
|
|
167
|
+
textAlign: center ? 'center' : textAlign,
|
|
168
|
+
lineHeight: lineHeight ? RFT(lineHeight) : undefined,
|
|
169
|
+
letterSpacing: letterSpacing ? RFT(letterSpacing) : undefined,
|
|
170
|
+
opacity,
|
|
171
|
+
|
|
172
|
+
flex,
|
|
173
|
+
flexGrow,
|
|
174
|
+
flexShrink,
|
|
175
|
+
flexBasis: flexBasis as any,
|
|
176
|
+
alignSelf,
|
|
177
|
+
width: toDim(width),
|
|
178
|
+
height: toDim(height),
|
|
179
|
+
minWidth: toDim(minWidth),
|
|
180
|
+
maxWidth: toDim(maxWidth),
|
|
181
|
+
minHeight: toDim(minHeight),
|
|
182
|
+
maxHeight: toDim(maxHeight),
|
|
183
|
+
|
|
184
|
+
position,
|
|
185
|
+
top: toDim(top),
|
|
186
|
+
bottom: toDim(bottom),
|
|
187
|
+
left: toDim(left),
|
|
188
|
+
right: toDim(right),
|
|
189
|
+
zIndex,
|
|
190
|
+
|
|
191
|
+
margin: margin !== undefined ? RF(margin) : undefined,
|
|
192
|
+
marginTop: marginTop !== undefined ? RF(marginTop) : undefined,
|
|
193
|
+
marginBottom: marginBottom !== undefined ? RF(marginBottom) : undefined,
|
|
194
|
+
marginLeft: marginLeft !== undefined ? RF(marginLeft) : undefined,
|
|
195
|
+
marginRight: marginRight !== undefined ? RF(marginRight) : undefined,
|
|
196
|
+
marginHorizontal:
|
|
197
|
+
marginHorizontal !== undefined ? RF(marginHorizontal) : undefined,
|
|
198
|
+
marginVertical:
|
|
199
|
+
marginVertical !== undefined ? RF(marginVertical) : undefined,
|
|
200
|
+
|
|
201
|
+
padding: padding !== undefined ? RF(padding) : undefined,
|
|
202
|
+
paddingTop: paddingTop !== undefined ? RF(paddingTop) : undefined,
|
|
203
|
+
paddingBottom: paddingBottom !== undefined ? RF(paddingBottom) : undefined,
|
|
204
|
+
paddingLeft: paddingStart !== undefined ? RF(paddingStart) : undefined,
|
|
205
|
+
paddingStart: paddingLeft !== undefined ? RF(paddingLeft) : undefined,
|
|
206
|
+
paddingEnd: paddingEnd !== undefined ? RF(paddingEnd) : undefined,
|
|
207
|
+
paddingRight: paddingRight !== undefined ? RF(paddingRight) : undefined,
|
|
208
|
+
paddingHorizontal:
|
|
209
|
+
paddingHorizontal !== undefined ? RF(paddingHorizontal) : undefined,
|
|
210
|
+
paddingVertical:
|
|
211
|
+
paddingVertical !== undefined ? RF(paddingVertical) : undefined,
|
|
212
|
+
|
|
213
|
+
backgroundColor,
|
|
214
|
+
borderRadius: borderRadius !== undefined ? RF(borderRadius) : undefined,
|
|
215
|
+
borderTopLeftRadius:
|
|
216
|
+
borderTopLeftRadius !== undefined ? RF(borderTopLeftRadius) : undefined,
|
|
217
|
+
borderTopRightRadius:
|
|
218
|
+
borderTopRightRadius !== undefined ? RF(borderTopRightRadius) : undefined,
|
|
219
|
+
borderBottomLeftRadius:
|
|
220
|
+
borderBottomLeftRadius !== undefined
|
|
221
|
+
? RF(borderBottomLeftRadius)
|
|
222
|
+
: undefined,
|
|
223
|
+
borderBottomRightRadius:
|
|
224
|
+
borderBottomRightRadius !== undefined
|
|
225
|
+
? RF(borderBottomRightRadius)
|
|
226
|
+
: undefined,
|
|
227
|
+
|
|
228
|
+
borderWidth: borderWidth !== undefined ? RF(borderWidth) : undefined,
|
|
229
|
+
borderTopWidth:
|
|
230
|
+
borderTopWidth !== undefined ? RF(borderTopWidth) : undefined,
|
|
231
|
+
borderBottomWidth:
|
|
232
|
+
borderBottomWidth !== undefined ? RF(borderBottomWidth) : undefined,
|
|
233
|
+
borderLeftWidth:
|
|
234
|
+
borderLeftWidth !== undefined ? RF(borderLeftWidth) : undefined,
|
|
235
|
+
borderRightWidth:
|
|
236
|
+
borderRightWidth !== undefined ? RF(borderRightWidth) : undefined,
|
|
237
|
+
borderColor,
|
|
238
|
+
borderTopColor,
|
|
239
|
+
borderBottomColor,
|
|
240
|
+
borderLeftColor,
|
|
241
|
+
borderRightColor,
|
|
242
|
+
borderStyle,
|
|
243
|
+
|
|
244
|
+
textShadowColor,
|
|
245
|
+
textShadowOffset,
|
|
246
|
+
textShadowRadius,
|
|
247
|
+
|
|
248
|
+
includeFontPadding,
|
|
249
|
+
};
|
|
250
|
+
|
|
251
|
+
return (
|
|
252
|
+
<Text allowFontScaling={false} style={[textStyle, style]} {...rest}>
|
|
253
|
+
{children}
|
|
254
|
+
</Text>
|
|
255
|
+
);
|
|
256
|
+
};
|
|
257
|
+
|
|
258
|
+
export default AppText;
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import AppText from '@appComponents/appText';
|
|
2
|
+
import { Colors } from '@theme/colors';
|
|
3
|
+
import { Fonts } from '@theme/fonts';
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import { TextProps, TextStyle } from 'react-native';
|
|
6
|
+
import AppPressable from '../appPressable';
|
|
7
|
+
|
|
8
|
+
interface Props extends TextProps {
|
|
9
|
+
style: any;
|
|
10
|
+
size: number;
|
|
11
|
+
color?: string;
|
|
12
|
+
capital: boolean;
|
|
13
|
+
children: any;
|
|
14
|
+
fontFamily: string;
|
|
15
|
+
numberOfLines: number;
|
|
16
|
+
linHeight: number;
|
|
17
|
+
italic: boolean;
|
|
18
|
+
onPress?: () => void;
|
|
19
|
+
center: boolean;
|
|
20
|
+
containerStyle?: any;
|
|
21
|
+
disabled?: boolean;
|
|
22
|
+
textAlign?: TextStyle['textAlign'];
|
|
23
|
+
|
|
24
|
+
marginText?: number;
|
|
25
|
+
marginTopText?: number;
|
|
26
|
+
marginBottomText?: number;
|
|
27
|
+
marginLeftText?: number;
|
|
28
|
+
marginRightText?: number;
|
|
29
|
+
marginHorizontalText?: number;
|
|
30
|
+
marginVerticalText?: number;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const AppTextWrapper = (props: Partial<Props>) => {
|
|
34
|
+
const {
|
|
35
|
+
size = 12,
|
|
36
|
+
color = Colors.PRIMARY,
|
|
37
|
+
style,
|
|
38
|
+
numberOfLines = 0,
|
|
39
|
+
capital = false,
|
|
40
|
+
onPress,
|
|
41
|
+
center,
|
|
42
|
+
italic = false,
|
|
43
|
+
fontFamily = Fonts.REGULAR,
|
|
44
|
+
containerStyle,
|
|
45
|
+
disabled,
|
|
46
|
+
linHeight,
|
|
47
|
+
textAlign,
|
|
48
|
+
marginText,
|
|
49
|
+
marginTopText,
|
|
50
|
+
marginBottomText,
|
|
51
|
+
marginLeftText,
|
|
52
|
+
marginRightText,
|
|
53
|
+
marginHorizontalText,
|
|
54
|
+
marginVerticalText,
|
|
55
|
+
} = props;
|
|
56
|
+
return (
|
|
57
|
+
<AppPressable onPress={onPress} disabled={disabled} style={containerStyle}>
|
|
58
|
+
<AppText
|
|
59
|
+
numberOfLines={numberOfLines}
|
|
60
|
+
allowFontScaling={false}
|
|
61
|
+
fontFamily={fontFamily}
|
|
62
|
+
size={size}
|
|
63
|
+
color={color}
|
|
64
|
+
capital={capital}
|
|
65
|
+
center={center}
|
|
66
|
+
italic={italic}
|
|
67
|
+
lineHeight={linHeight}
|
|
68
|
+
textAlign={textAlign}
|
|
69
|
+
margin={marginText}
|
|
70
|
+
marginTop={marginTopText}
|
|
71
|
+
marginBottom={marginBottomText}
|
|
72
|
+
marginLeft={marginLeftText}
|
|
73
|
+
marginRight={marginRightText}
|
|
74
|
+
marginHorizontal={marginHorizontalText}
|
|
75
|
+
marginVertical={marginVerticalText}
|
|
76
|
+
style={style}
|
|
77
|
+
>
|
|
78
|
+
{props.children}
|
|
79
|
+
</AppText>
|
|
80
|
+
</AppPressable>
|
|
81
|
+
);
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
export default AppTextWrapper;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import AppStatusBar from "@appComponents/appStatusBar";
|
|
2
|
+
import BackgroundGradient from "@components/backgroundGradient";
|
|
3
|
+
import { Colors } from "@theme/colors";
|
|
4
|
+
import React from "react";
|
|
5
|
+
import AppColumnView from "../appColumnView";
|
|
6
|
+
import { useSafeArea } from "../appSafeAreaInsets";
|
|
7
|
+
|
|
8
|
+
interface Props {
|
|
9
|
+
children: any;
|
|
10
|
+
noPaddingTop: any;
|
|
11
|
+
noPaddingBottom: any;
|
|
12
|
+
bgColor?: string;
|
|
13
|
+
barStyle: "dark-content" | "default" | "light-content";
|
|
14
|
+
tabBarHeight?: number;
|
|
15
|
+
statusBarColor?: string;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const AppWrapper = ({
|
|
19
|
+
barStyle = "dark-content",
|
|
20
|
+
children,
|
|
21
|
+
noPaddingTop,
|
|
22
|
+
noPaddingBottom,
|
|
23
|
+
bgColor = Colors.WHITE,
|
|
24
|
+
tabBarHeight,
|
|
25
|
+
statusBarColor = "white",
|
|
26
|
+
}: Partial<Props>) => {
|
|
27
|
+
const insets: any = useSafeArea();
|
|
28
|
+
|
|
29
|
+
const paddingTop = noPaddingTop ? 0 : insets.top;
|
|
30
|
+
const paddingBottom = tabBarHeight
|
|
31
|
+
? tabBarHeight
|
|
32
|
+
: noPaddingBottom
|
|
33
|
+
? 0
|
|
34
|
+
: insets.bottom;
|
|
35
|
+
|
|
36
|
+
return (
|
|
37
|
+
<>
|
|
38
|
+
<AppStatusBar
|
|
39
|
+
barStyle={barStyle}
|
|
40
|
+
translucent={true} // safer default on Android
|
|
41
|
+
backgroundColor={statusBarColor}
|
|
42
|
+
/>
|
|
43
|
+
<AppColumnView
|
|
44
|
+
flex={1}
|
|
45
|
+
paddingBottom={paddingBottom}
|
|
46
|
+
paddingTop={paddingTop}
|
|
47
|
+
backgroundColor={bgColor}
|
|
48
|
+
>
|
|
49
|
+
<BackgroundGradient />
|
|
50
|
+
{children}
|
|
51
|
+
</AppColumnView>
|
|
52
|
+
</>
|
|
53
|
+
);
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
export default AppWrapper;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import {RF} from '@theme/responsive';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import {ActivityIndicator, ActivityIndicatorProps} from 'react-native';
|
|
4
|
+
|
|
5
|
+
interface CustomActivityIndicatorProps extends ActivityIndicatorProps {
|
|
6
|
+
size?: 'small' | 'large' | number;
|
|
7
|
+
color?: string;
|
|
8
|
+
width?: number;
|
|
9
|
+
height?: number;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const CustomActivityIndicator: React.FC<CustomActivityIndicatorProps> = ({
|
|
13
|
+
size = 'small',
|
|
14
|
+
color = '#000',
|
|
15
|
+
width,
|
|
16
|
+
height,
|
|
17
|
+
...rest
|
|
18
|
+
}) => {
|
|
19
|
+
const indicatorStyle = {
|
|
20
|
+
width: width ? RF(width) : undefined,
|
|
21
|
+
height: height ? RF(height) : undefined,
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
return (
|
|
25
|
+
<ActivityIndicator
|
|
26
|
+
size={size}
|
|
27
|
+
color={color}
|
|
28
|
+
style={indicatorStyle}
|
|
29
|
+
{...rest}
|
|
30
|
+
/>
|
|
31
|
+
);
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export default CustomActivityIndicator;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import AppButton from "@appComponents/appButton";
|
|
2
|
+
import AppColumnView from "@appComponents/appColumnView";
|
|
3
|
+
import AppText from "@appComponents/appText";
|
|
4
|
+
import CustomModal, { ModalAnimationType } from "@appComponents/customModal";
|
|
5
|
+
import { Colors } from "@theme/colors";
|
|
6
|
+
import { Fonts } from "@theme/fonts";
|
|
7
|
+
import React from "react";
|
|
8
|
+
|
|
9
|
+
const CustomGetPermissionModal = ({ visible, onClose, message }: any) => {
|
|
10
|
+
return (
|
|
11
|
+
<CustomModal
|
|
12
|
+
visible={visible}
|
|
13
|
+
transparent
|
|
14
|
+
animationType={ModalAnimationType.FADE}
|
|
15
|
+
>
|
|
16
|
+
<AppColumnView
|
|
17
|
+
flex={1}
|
|
18
|
+
backgroundColor={"rgba(0,0,0,0.5)"}
|
|
19
|
+
justifyContent="center"
|
|
20
|
+
alignItems="center"
|
|
21
|
+
>
|
|
22
|
+
<AppColumnView
|
|
23
|
+
backgroundColor={Colors.WHITE}
|
|
24
|
+
borderRadius={16}
|
|
25
|
+
padding={24}
|
|
26
|
+
width={"80%"}
|
|
27
|
+
shadowColor="#000"
|
|
28
|
+
shadowOpacity={0.25}
|
|
29
|
+
shadowOffset={{ width: 0, height: 2 }}
|
|
30
|
+
elevation={5}
|
|
31
|
+
gap={24}
|
|
32
|
+
>
|
|
33
|
+
<AppColumnView gap={16} alignItems="center">
|
|
34
|
+
<AppText fontFamily={Fonts.BOLD} size={18} color={Colors.PRIMARY}>
|
|
35
|
+
Permission Required
|
|
36
|
+
</AppText>
|
|
37
|
+
<AppText
|
|
38
|
+
size={16}
|
|
39
|
+
color={Colors.GRAY_4}
|
|
40
|
+
textAlign="center"
|
|
41
|
+
lineHeight={20}
|
|
42
|
+
>
|
|
43
|
+
{message}
|
|
44
|
+
</AppText>
|
|
45
|
+
</AppColumnView>
|
|
46
|
+
|
|
47
|
+
<AppButton
|
|
48
|
+
title="Cancel"
|
|
49
|
+
onPress={onClose}
|
|
50
|
+
bgColor={Colors.PRIMARY}
|
|
51
|
+
titleColor={Colors.WHITE}
|
|
52
|
+
padding={12}
|
|
53
|
+
titleSize={12}
|
|
54
|
+
noRightIcon={true}
|
|
55
|
+
/>
|
|
56
|
+
</AppColumnView>
|
|
57
|
+
</AppColumnView>
|
|
58
|
+
</CustomModal>
|
|
59
|
+
);
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
export default CustomGetPermissionModal;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import {Modal, ModalProps} from 'react-native';
|
|
3
|
+
|
|
4
|
+
export enum ModalAnimationType {
|
|
5
|
+
NONE = 'none',
|
|
6
|
+
SLIDE = 'slide',
|
|
7
|
+
FADE = 'fade',
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
interface CustomModalProps extends Omit<ModalProps, 'animationType'> {
|
|
11
|
+
animationType?: ModalAnimationType;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
const CustomModal: React.FC<CustomModalProps> = ({
|
|
15
|
+
children,
|
|
16
|
+
animationType = ModalAnimationType.FADE,
|
|
17
|
+
...rest
|
|
18
|
+
}) => {
|
|
19
|
+
return (
|
|
20
|
+
<Modal animationType={animationType} {...rest}>
|
|
21
|
+
{children}
|
|
22
|
+
</Modal>
|
|
23
|
+
);
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export default CustomModal;
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import { Colors } from "@theme/colors";
|
|
2
|
+
import { Fonts } from "@theme/fonts";
|
|
3
|
+
import { RF, RFT } from "@theme/responsive";
|
|
4
|
+
import React, { forwardRef } from "react";
|
|
5
|
+
import {
|
|
6
|
+
DimensionValue,
|
|
7
|
+
TextInput,
|
|
8
|
+
TextInputProps,
|
|
9
|
+
TextStyle,
|
|
10
|
+
} from "react-native";
|
|
11
|
+
|
|
12
|
+
interface CustomTextInputProps extends Omit<TextInputProps, "textAlign"> {
|
|
13
|
+
flex?: number;
|
|
14
|
+
width?: DimensionValue | number;
|
|
15
|
+
height?: number;
|
|
16
|
+
maxHeight?: number;
|
|
17
|
+
padding?: number;
|
|
18
|
+
paddingHorizontal?: number;
|
|
19
|
+
paddingVertical?: number;
|
|
20
|
+
paddingTop?: number;
|
|
21
|
+
paddingBottom?: number;
|
|
22
|
+
paddingLeft?: number;
|
|
23
|
+
paddingRight?: number;
|
|
24
|
+
margin?: number;
|
|
25
|
+
marginHorizontal?: number;
|
|
26
|
+
marginVertical?: number;
|
|
27
|
+
marginTop?: number;
|
|
28
|
+
marginBottom?: number;
|
|
29
|
+
marginLeft?: number;
|
|
30
|
+
marginRight?: number;
|
|
31
|
+
borderRadius?: number;
|
|
32
|
+
borderWidth?: number;
|
|
33
|
+
borderBottomWidth?: number;
|
|
34
|
+
borderTopWidth?: number;
|
|
35
|
+
borderLeftWidth?: number;
|
|
36
|
+
borderRightWidth?: number;
|
|
37
|
+
borderBottomColor?: string;
|
|
38
|
+
borderTopColor?: string;
|
|
39
|
+
borderLeftColor?: string;
|
|
40
|
+
borderRightColor?: string;
|
|
41
|
+
borderColor?: string;
|
|
42
|
+
borderStyle?: "solid" | "dotted" | "dashed";
|
|
43
|
+
backgroundColor?: string;
|
|
44
|
+
color?: string;
|
|
45
|
+
fontSize?: number;
|
|
46
|
+
fontFamily?: string;
|
|
47
|
+
textAlign?: TextStyle["textAlign"]; // ✅ Fix type conflict
|
|
48
|
+
textAlignVertical?: TextStyle["textAlignVertical"];
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
const CustomTextInput = forwardRef<TextInput, CustomTextInputProps>(
|
|
52
|
+
(
|
|
53
|
+
{
|
|
54
|
+
flex,
|
|
55
|
+
width,
|
|
56
|
+
height,
|
|
57
|
+
maxHeight,
|
|
58
|
+
padding,
|
|
59
|
+
paddingHorizontal,
|
|
60
|
+
paddingVertical,
|
|
61
|
+
paddingTop,
|
|
62
|
+
paddingBottom,
|
|
63
|
+
paddingLeft,
|
|
64
|
+
paddingRight,
|
|
65
|
+
margin,
|
|
66
|
+
marginHorizontal,
|
|
67
|
+
marginVertical,
|
|
68
|
+
marginTop,
|
|
69
|
+
marginBottom,
|
|
70
|
+
marginLeft,
|
|
71
|
+
marginRight,
|
|
72
|
+
borderRadius,
|
|
73
|
+
borderWidth,
|
|
74
|
+
borderBottomWidth,
|
|
75
|
+
borderTopWidth,
|
|
76
|
+
borderLeftWidth,
|
|
77
|
+
borderRightWidth,
|
|
78
|
+
borderBottomColor,
|
|
79
|
+
borderTopColor,
|
|
80
|
+
borderLeftColor,
|
|
81
|
+
borderRightColor,
|
|
82
|
+
borderColor,
|
|
83
|
+
borderStyle,
|
|
84
|
+
backgroundColor,
|
|
85
|
+
color = Colors.PRIMARY,
|
|
86
|
+
fontSize = RFT(14),
|
|
87
|
+
fontFamily = Fonts.MEDIUM,
|
|
88
|
+
textAlign,
|
|
89
|
+
style,
|
|
90
|
+
...rest
|
|
91
|
+
},
|
|
92
|
+
ref,
|
|
93
|
+
) => {
|
|
94
|
+
const toDim = (v?: number | DimensionValue) =>
|
|
95
|
+
v === undefined
|
|
96
|
+
? undefined
|
|
97
|
+
: typeof v === "number"
|
|
98
|
+
? (RF(v) as unknown as DimensionValue)
|
|
99
|
+
: v;
|
|
100
|
+
|
|
101
|
+
const inputStyle: TextStyle = {
|
|
102
|
+
flex,
|
|
103
|
+
width: toDim(width),
|
|
104
|
+
height: height ? RF(height) : undefined,
|
|
105
|
+
maxHeight: maxHeight ? RF(maxHeight) : undefined,
|
|
106
|
+
padding: padding ? RF(padding) : undefined,
|
|
107
|
+
paddingHorizontal: paddingHorizontal ? RF(paddingHorizontal) : undefined,
|
|
108
|
+
paddingVertical: paddingVertical ? RF(paddingVertical) : undefined,
|
|
109
|
+
paddingTop: paddingTop ? RF(paddingTop) : undefined,
|
|
110
|
+
paddingBottom: paddingBottom ? RF(paddingBottom) : undefined,
|
|
111
|
+
paddingLeft: paddingLeft ? RF(paddingLeft) : undefined,
|
|
112
|
+
paddingRight: paddingRight ? RF(paddingRight) : undefined,
|
|
113
|
+
margin: margin ? RF(margin) : undefined,
|
|
114
|
+
marginHorizontal: marginHorizontal ? RF(marginHorizontal) : undefined,
|
|
115
|
+
marginVertical: marginVertical ? RF(marginVertical) : undefined,
|
|
116
|
+
marginTop: marginTop ? RF(marginTop) : undefined,
|
|
117
|
+
marginBottom: marginBottom ? RF(marginBottom) : undefined,
|
|
118
|
+
marginLeft: marginLeft ? RF(marginLeft) : undefined,
|
|
119
|
+
marginRight: marginRight ? RF(marginRight) : undefined,
|
|
120
|
+
borderRadius: borderRadius ? RF(borderRadius) : undefined,
|
|
121
|
+
borderWidth,
|
|
122
|
+
borderBottomWidth,
|
|
123
|
+
borderTopWidth,
|
|
124
|
+
borderLeftWidth,
|
|
125
|
+
borderRightWidth,
|
|
126
|
+
borderBottomColor,
|
|
127
|
+
borderTopColor,
|
|
128
|
+
borderLeftColor,
|
|
129
|
+
borderRightColor,
|
|
130
|
+
borderColor,
|
|
131
|
+
borderStyle,
|
|
132
|
+
backgroundColor,
|
|
133
|
+
color,
|
|
134
|
+
fontSize,
|
|
135
|
+
fontFamily,
|
|
136
|
+
textAlign,
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
return <TextInput ref={ref} style={[inputStyle, style]} {...rest} />;
|
|
140
|
+
},
|
|
141
|
+
);
|
|
142
|
+
|
|
143
|
+
export default CustomTextInput;
|
|
File without changes
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import AppColumnView from "@appComponents/appColumnView";
|
|
2
|
+
import AppIcon from "@appComponents/appIcon";
|
|
3
|
+
import AppPressable from "@appComponents/appPressable";
|
|
4
|
+
import IoniconsIcons from "@icons/IoniconsIcons";
|
|
5
|
+
import { Colors } from "@theme/colors";
|
|
6
|
+
import React from "react";
|
|
7
|
+
|
|
8
|
+
type AvatarBlockProps = {
|
|
9
|
+
avatarUri: string | null;
|
|
10
|
+
onPressProfile?: () => void;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
const AvatarBlock = ({ avatarUri, onPressProfile }: AvatarBlockProps) => {
|
|
14
|
+
if (avatarUri) {
|
|
15
|
+
return (
|
|
16
|
+
<AppIcon
|
|
17
|
+
uri={avatarUri}
|
|
18
|
+
width={44}
|
|
19
|
+
height={44}
|
|
20
|
+
borderRadius={22}
|
|
21
|
+
resizeMode="cover"
|
|
22
|
+
onPress={onPressProfile}
|
|
23
|
+
/>
|
|
24
|
+
);
|
|
25
|
+
}
|
|
26
|
+
return (
|
|
27
|
+
<AppPressable onPress={onPressProfile}>
|
|
28
|
+
<AppColumnView
|
|
29
|
+
height={44}
|
|
30
|
+
width={44}
|
|
31
|
+
borderRadius={22}
|
|
32
|
+
backgroundColor={Colors.PRIMARY_7}
|
|
33
|
+
alignItems="center"
|
|
34
|
+
justifyContent="center"
|
|
35
|
+
>
|
|
36
|
+
<IoniconsIcons icon="person" color={Colors.PRIMARY} size={22} />
|
|
37
|
+
</AppColumnView>
|
|
38
|
+
</AppPressable>
|
|
39
|
+
);
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
export default AvatarBlock;
|