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.
Files changed (83) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +112 -0
  3. package/bin/cli.js +9 -0
  4. package/dist/babel.js +198 -0
  5. package/dist/bootstrap.js +54 -0
  6. package/dist/fonts.js +98 -0
  7. package/dist/index.js +120 -0
  8. package/dist/install.js +243 -0
  9. package/dist/overlay.js +141 -0
  10. package/dist/patch.js +212 -0
  11. package/dist/prompts.js +115 -0
  12. package/dist/scaffold.js +43 -0
  13. package/dist/sdkNotes.js +19 -0
  14. package/dist/util.js +48 -0
  15. package/package.json +56 -0
  16. package/templates/base/assets/fonts/.gitkeep +0 -0
  17. package/templates/base/assets/images/.gitkeep +0 -0
  18. package/templates/base/assets/index.ts +8 -0
  19. package/templates/base/src/app/_layout.tsx +39 -0
  20. package/templates/base/src/app/index.tsx +13 -0
  21. package/templates/base/src/app/routes.tsx +9 -0
  22. package/templates/base/src/core/hooks/.gitkeep +0 -0
  23. package/templates/base/src/core/redux/hooks.ts +6 -0
  24. package/templates/base/src/core/redux/mmkvStorage.ts +18 -0
  25. package/templates/base/src/core/redux/reducers.ts +20 -0
  26. package/templates/base/src/core/redux/slices/userSlice.ts +31 -0
  27. package/templates/base/src/core/redux/store.ts +28 -0
  28. package/templates/base/src/core/services/.gitkeep +0 -0
  29. package/templates/base/src/core/tanstack/index.tsx +93 -0
  30. package/templates/base/src/core/tanstack/tanstack-keys.ts +42 -0
  31. package/templates/base/src/core/utils/config.ts +50 -0
  32. package/templates/base/src/core/utils/constants.ts +11 -0
  33. package/templates/base/src/core/utils/endpoints.ts +29 -0
  34. package/templates/base/src/core/utils/types.ts +47 -0
  35. package/templates/base/src/core/utils/validation.ts +10 -0
  36. package/templates/base/src/features/.gitkeep +0 -0
  37. package/templates/base/src/ui/appComponents/AppRefreshControl/index.tsx +39 -0
  38. package/templates/base/src/ui/appComponents/appButton/index.tsx +122 -0
  39. package/templates/base/src/ui/appComponents/appColumnView/index.tsx +320 -0
  40. package/templates/base/src/ui/appComponents/appFlashList/index.tsx +191 -0
  41. package/templates/base/src/ui/appComponents/appFlatList/index.tsx +172 -0
  42. package/templates/base/src/ui/appComponents/appIcon/index.tsx +105 -0
  43. package/templates/base/src/ui/appComponents/appInput/index.tsx +226 -0
  44. package/templates/base/src/ui/appComponents/appKeyboardAvoidingView/index.tsx +168 -0
  45. package/templates/base/src/ui/appComponents/appKeyboardAwareScrollView/index.tsx +188 -0
  46. package/templates/base/src/ui/appComponents/appLogger/index.tsx +22 -0
  47. package/templates/base/src/ui/appComponents/appPressable/index.tsx +220 -0
  48. package/templates/base/src/ui/appComponents/appRowView/index.tsx +320 -0
  49. package/templates/base/src/ui/appComponents/appSafeAreaInsets/index.tsx +24 -0
  50. package/templates/base/src/ui/appComponents/appScrollView/index.tsx +166 -0
  51. package/templates/base/src/ui/appComponents/appSkeleton/index.tsx +22 -0
  52. package/templates/base/src/ui/appComponents/appStatusBar/index.tsx +8 -0
  53. package/templates/base/src/ui/appComponents/appTabHeader/index.tsx +111 -0
  54. package/templates/base/src/ui/appComponents/appText/index.tsx +258 -0
  55. package/templates/base/src/ui/appComponents/appTextWrapper/index.tsx +84 -0
  56. package/templates/base/src/ui/appComponents/appWrapper/index.tsx +56 -0
  57. package/templates/base/src/ui/appComponents/customActivityIndicator/index.tsx +34 -0
  58. package/templates/base/src/ui/appComponents/customGetPermissionModal/index.tsx +62 -0
  59. package/templates/base/src/ui/appComponents/customModal/index.tsx +26 -0
  60. package/templates/base/src/ui/appComponents/customTextInput/index.tsx +143 -0
  61. package/templates/base/src/ui/components/.gitkeep +0 -0
  62. package/templates/base/src/ui/components/avatarBlock/index.tsx +42 -0
  63. package/templates/base/src/ui/components/backgroundGradient/index.tsx +24 -0
  64. package/templates/base/src/ui/components/errorFallback/index.tsx +40 -0
  65. package/templates/base/src/ui/iconComponents/IconFontAwesome6/index.tsx +22 -0
  66. package/templates/base/src/ui/iconComponents/IoniconsIcons/index.tsx +33 -0
  67. package/templates/base/src/ui/iconComponents/antDesignicons/index.tsx +22 -0
  68. package/templates/base/src/ui/iconComponents/featherIcons/index.tsx +22 -0
  69. package/templates/base/src/ui/iconComponents/materialCommunityIcons/index.tsx +24 -0
  70. package/templates/base/src/ui/iconComponents/materialIcons/index.tsx +23 -0
  71. package/templates/base/src/ui/iconComponents/octiconsIcons/index.tsx +23 -0
  72. package/templates/base/src/ui/theme/allFileStyles.ts +39 -0
  73. package/templates/base/src/ui/theme/colors.ts +54 -0
  74. package/templates/base/src/ui/theme/fonts.ts +3 -0
  75. package/templates/base/src/ui/theme/responsive.ts +27 -0
  76. package/templates/bottom-sheet/src/ui/appComponents/BottomSheetKeyboardAwareScrollView/index.tsx +111 -0
  77. package/templates/bottom-sheet/src/ui/appComponents/appBottomSheetBackdrop/index.tsx +27 -0
  78. package/templates/bottom-sheet/src/ui/appComponents/appBottomSheetScrollView/index.tsx +99 -0
  79. package/templates/bottom-sheet/src/ui/appComponents/appBottomSheetView/index.tsx +173 -0
  80. package/templates/bottom-sheet/src/ui/appComponents/customBottomSheetModal/index.tsx +17 -0
  81. package/templates/claude-command/init-app.md +41 -0
  82. package/templates/image-picker/media-constants.snippet.ts +18 -0
  83. package/templates/image-picker/src/core/services/PermissionService.ts +48 -0
@@ -0,0 +1,320 @@
1
+ import { RF } from "@theme/responsive";
2
+ import React from "react";
3
+ import {
4
+ DimensionValue,
5
+ StyleProp,
6
+ View,
7
+ ViewProps,
8
+ ViewStyle,
9
+ } from "react-native";
10
+
11
+ type RowProps = ViewProps & {
12
+ children?: React.ReactNode;
13
+
14
+ padding?: number;
15
+ paddingHorizontal?: number;
16
+ paddingVertical?: number;
17
+ paddingTop?: number;
18
+ paddingBottom?: number;
19
+ paddingLeft?: number;
20
+ paddingRight?: number;
21
+ paddingStart?: number;
22
+ paddingEnd?: number;
23
+
24
+ margin?: number;
25
+ marginHorizontal?: number;
26
+ marginVertical?: number;
27
+ marginTop?: number;
28
+ marginBottom?: number;
29
+ marginLeft?: number;
30
+ marginRight?: number;
31
+ marginStart?: number;
32
+ marginEnd?: number;
33
+
34
+ flex?: number;
35
+ flexGrow?: number;
36
+ flexShrink?: number;
37
+ flexBasis?: number | DimensionValue;
38
+ flexWrap?: ViewStyle["flexWrap"];
39
+ alignItems?: ViewStyle["alignItems"];
40
+ justifyContent?: ViewStyle["justifyContent"];
41
+ alignSelf?: ViewStyle["alignSelf"];
42
+ alignContent?: ViewStyle["alignContent"];
43
+
44
+ columnGap?: number;
45
+ gap?: number;
46
+
47
+ width?: number | DimensionValue;
48
+ height?: number | DimensionValue;
49
+ minWidth?: number | DimensionValue;
50
+ maxWidth?: number | DimensionValue;
51
+ minHeight?: number | DimensionValue;
52
+ maxHeight?: number | DimensionValue;
53
+ aspectRatio?: number;
54
+
55
+ position?: ViewStyle["position"];
56
+ top?: number | DimensionValue;
57
+ bottom?: number | DimensionValue;
58
+ left?: number | DimensionValue;
59
+ right?: number | DimensionValue;
60
+ start?: number | DimensionValue;
61
+ end?: number | DimensionValue;
62
+ zIndex?: number;
63
+
64
+ backgroundColor?: string;
65
+ opacity?: number;
66
+ overflow?: ViewStyle["overflow"];
67
+ display?: ViewStyle["display"];
68
+ direction?: ViewStyle["direction"];
69
+
70
+ borderRadius?: number;
71
+ borderTopLeftRadius?: number;
72
+ borderTopRightRadius?: number;
73
+ borderBottomLeftRadius?: number;
74
+ borderBottomRightRadius?: number;
75
+ borderStartRadius?: number;
76
+ borderEndRadius?: number;
77
+
78
+ borderWidth?: number;
79
+ borderTopWidth?: number;
80
+ borderBottomWidth?: number;
81
+ borderLeftWidth?: number;
82
+ borderRightWidth?: number;
83
+ borderStartWidth?: number;
84
+ borderEndWidth?: number;
85
+
86
+ borderColor?: string;
87
+ borderTopColor?: string;
88
+ borderBottomColor?: string;
89
+ borderLeftColor?: string;
90
+ borderRightColor?: string;
91
+ borderStartColor?: string;
92
+ borderEndColor?: string;
93
+ borderStyle?: ViewStyle["borderStyle"];
94
+
95
+ shadowColor?: string;
96
+ shadowOffset?: { width: number; height: number };
97
+ shadowOpacity?: number;
98
+ shadowRadius?: number;
99
+ elevation?: number;
100
+
101
+ transform?: ViewStyle["transform"];
102
+ backfaceVisibility?: ViewStyle["backfaceVisibility"];
103
+ };
104
+
105
+ const AppRowView: React.FC<RowProps> = ({
106
+ children,
107
+ style,
108
+ padding,
109
+ paddingHorizontal,
110
+ paddingVertical,
111
+ paddingTop,
112
+ paddingBottom,
113
+ paddingLeft,
114
+ paddingRight,
115
+ paddingStart,
116
+ paddingEnd,
117
+ margin,
118
+ marginHorizontal,
119
+ marginVertical,
120
+ marginTop,
121
+ marginBottom,
122
+ marginLeft,
123
+ marginRight,
124
+ marginStart,
125
+ marginEnd,
126
+ flex,
127
+ flexGrow,
128
+ flexShrink,
129
+ flexBasis,
130
+ flexWrap,
131
+ alignItems,
132
+ justifyContent,
133
+ alignSelf,
134
+ alignContent,
135
+ columnGap,
136
+ gap,
137
+
138
+ width,
139
+ height,
140
+ minWidth,
141
+ maxWidth,
142
+ minHeight,
143
+ maxHeight,
144
+ aspectRatio,
145
+ position,
146
+ top,
147
+ bottom,
148
+ left,
149
+ right,
150
+ start,
151
+ end,
152
+ zIndex,
153
+ backgroundColor,
154
+ opacity,
155
+ overflow,
156
+ display,
157
+ direction,
158
+ borderRadius,
159
+ borderTopLeftRadius,
160
+ borderTopRightRadius,
161
+ borderBottomLeftRadius,
162
+ borderBottomRightRadius,
163
+ borderStartRadius,
164
+ borderEndRadius,
165
+ borderWidth,
166
+ borderTopWidth,
167
+ borderBottomWidth,
168
+ borderLeftWidth,
169
+ borderRightWidth,
170
+ borderStartWidth,
171
+ borderEndWidth,
172
+ borderColor,
173
+ borderTopColor,
174
+ borderBottomColor,
175
+ borderLeftColor,
176
+ borderRightColor,
177
+ borderStartColor,
178
+ borderEndColor,
179
+ borderStyle,
180
+ shadowColor,
181
+ shadowOffset,
182
+ shadowOpacity,
183
+ shadowRadius,
184
+ elevation,
185
+ transform,
186
+ backfaceVisibility,
187
+ ...rest
188
+ }) => {
189
+ const toDim = (v?: number | DimensionValue) =>
190
+ v === undefined
191
+ ? undefined
192
+ : typeof v === "number"
193
+ ? (RF(v) as unknown as DimensionValue)
194
+ : v;
195
+
196
+ const customStyle: ViewStyle = {
197
+ flexDirection: "row",
198
+
199
+ padding: padding !== undefined ? RF(padding) : undefined,
200
+ paddingHorizontal:
201
+ paddingHorizontal !== undefined ? RF(paddingHorizontal) : undefined,
202
+ paddingVertical:
203
+ paddingVertical !== undefined ? RF(paddingVertical) : undefined,
204
+ paddingTop: paddingTop !== undefined ? RF(paddingTop) : undefined,
205
+ paddingBottom: paddingBottom !== undefined ? RF(paddingBottom) : undefined,
206
+ paddingLeft: paddingLeft !== undefined ? RF(paddingLeft) : undefined,
207
+ paddingRight: paddingRight !== undefined ? RF(paddingRight) : undefined,
208
+ paddingStart: paddingStart !== undefined ? RF(paddingStart) : undefined,
209
+ paddingEnd: paddingEnd !== undefined ? RF(paddingEnd) : undefined,
210
+
211
+ margin: margin !== undefined ? RF(margin) : undefined,
212
+ marginHorizontal:
213
+ marginHorizontal !== undefined ? RF(marginHorizontal) : undefined,
214
+ marginVertical:
215
+ marginVertical !== undefined ? RF(marginVertical) : undefined,
216
+ marginTop: marginTop !== undefined ? RF(marginTop) : undefined,
217
+ marginBottom: marginBottom !== undefined ? RF(marginBottom) : undefined,
218
+ marginLeft: marginLeft !== undefined ? RF(marginLeft) : undefined,
219
+ marginRight: marginRight !== undefined ? RF(marginRight) : undefined,
220
+ marginStart: marginStart !== undefined ? RF(marginStart) : undefined,
221
+ marginEnd: marginEnd !== undefined ? RF(marginEnd) : undefined,
222
+
223
+ flex,
224
+ flexGrow,
225
+ flexShrink,
226
+ flexBasis: flexBasis as any,
227
+ flexWrap,
228
+ alignItems,
229
+ justifyContent,
230
+ alignSelf,
231
+ alignContent,
232
+
233
+ columnGap: columnGap !== undefined ? RF(columnGap) : undefined,
234
+ gap: gap !== undefined ? RF(gap) : undefined,
235
+
236
+ width: toDim(width),
237
+ height: toDim(height),
238
+ minWidth: toDim(minWidth),
239
+ maxWidth: toDim(maxWidth),
240
+ minHeight: toDim(minHeight),
241
+ maxHeight: toDim(maxHeight),
242
+ aspectRatio,
243
+
244
+ position,
245
+ top: toDim(top),
246
+ bottom: toDim(bottom),
247
+ left: toDim(left),
248
+ right: toDim(right),
249
+ start: toDim(start),
250
+ end: toDim(end),
251
+ zIndex,
252
+
253
+ backgroundColor,
254
+ opacity,
255
+ overflow,
256
+ display,
257
+ direction,
258
+
259
+ borderRadius: borderRadius !== undefined ? RF(borderRadius) : undefined,
260
+ borderTopLeftRadius:
261
+ borderTopLeftRadius !== undefined ? RF(borderTopLeftRadius) : undefined,
262
+ borderTopRightRadius:
263
+ borderTopRightRadius !== undefined ? RF(borderTopRightRadius) : undefined,
264
+ borderBottomLeftRadius:
265
+ borderBottomLeftRadius !== undefined
266
+ ? RF(borderBottomLeftRadius)
267
+ : undefined,
268
+ borderBottomRightRadius:
269
+ borderBottomRightRadius !== undefined
270
+ ? RF(borderBottomRightRadius)
271
+ : undefined,
272
+
273
+ borderWidth: borderWidth !== undefined ? RF(borderWidth) : undefined,
274
+ borderTopWidth:
275
+ borderTopWidth !== undefined ? RF(borderTopWidth) : undefined,
276
+ borderBottomWidth:
277
+ borderBottomWidth !== undefined ? RF(borderBottomWidth) : undefined,
278
+ borderLeftWidth:
279
+ borderLeftWidth !== undefined ? RF(borderLeftWidth) : undefined,
280
+ borderRightWidth:
281
+ borderRightWidth !== undefined ? RF(borderRightWidth) : undefined,
282
+ borderStartWidth:
283
+ borderStartWidth !== undefined ? RF(borderStartWidth) : undefined,
284
+ borderEndWidth:
285
+ borderEndWidth !== undefined ? RF(borderEndWidth) : undefined,
286
+
287
+ borderColor,
288
+ borderTopColor,
289
+ borderBottomColor,
290
+ borderLeftColor,
291
+ borderRightColor,
292
+ borderStartColor,
293
+ borderEndColor,
294
+ borderStyle,
295
+
296
+ shadowColor,
297
+ shadowOffset,
298
+ shadowOpacity,
299
+ shadowRadius,
300
+ elevation,
301
+
302
+ transform,
303
+ backfaceVisibility,
304
+ };
305
+
306
+ return (
307
+ <View
308
+ style={[
309
+ { flexDirection: "row" },
310
+ customStyle,
311
+ style as StyleProp<ViewStyle>,
312
+ ]}
313
+ {...rest}
314
+ >
315
+ {children}
316
+ </View>
317
+ );
318
+ };
319
+
320
+ export default AppRowView;
@@ -0,0 +1,24 @@
1
+ import { RF } from '@theme/responsive';
2
+ import { ANDROID } from '@utils/constants';
3
+ import React, { createContext, useContext } from 'react';
4
+ import { useSafeAreaInsets } from 'react-native-safe-area-context';
5
+
6
+ const SafeAreaInsetsContext = createContext({});
7
+
8
+ export const SafeAreaInsetsProvider = ({ children }: any) => {
9
+ let insets = useSafeAreaInsets();
10
+ let customInsets = { ...insets };
11
+ if (ANDROID) {
12
+ customInsets = { ...insets, bottom: insets?.bottom + RF(12) };
13
+ }
14
+
15
+ return (
16
+ <SafeAreaInsetsContext.Provider value={customInsets}>
17
+ {children}
18
+ </SafeAreaInsetsContext.Provider>
19
+ );
20
+ };
21
+
22
+ export const useSafeArea = () => {
23
+ return useContext(SafeAreaInsetsContext);
24
+ };
@@ -0,0 +1,166 @@
1
+ import { RF } from '@theme/responsive';
2
+ import React, { ComponentProps, forwardRef } from 'react';
3
+ import { DimensionValue, ScrollView, ViewStyle } from 'react-native';
4
+
5
+ type RNScrollViewProps = ComponentProps<typeof ScrollView>;
6
+
7
+ interface ExtraStyleProps {
8
+ horizontal?: boolean;
9
+ showsHorizontalScrollIndicator?: boolean;
10
+ showsVerticalScrollIndicator?: boolean;
11
+ padding?: number;
12
+ paddingTop?: number;
13
+ paddingBottom?: number;
14
+ paddingLeft?: number;
15
+ paddingRight?: number;
16
+ paddingHorizontal?: number;
17
+ paddingVertical?: number;
18
+
19
+ margin?: number;
20
+ marginTop?: number;
21
+ marginBottom?: number;
22
+ marginLeft?: number;
23
+ marginRight?: number;
24
+ marginHorizontal?: number;
25
+ marginVertical?: number;
26
+
27
+ borderRadius?: number;
28
+
29
+ flex?: number;
30
+ flexGrow?: number;
31
+ flexShrink?: number;
32
+ flexBasis?: number | DimensionValue;
33
+ flexWrap?: ViewStyle['flexWrap'];
34
+ flexDirection?: ViewStyle['flexDirection'];
35
+ alignItems?: ViewStyle['alignItems'];
36
+ justifyContent?: ViewStyle['justifyContent'];
37
+ alignSelf?: ViewStyle['alignSelf'];
38
+ gap?: number;
39
+
40
+ backgroundColor?: string;
41
+
42
+ height?: DimensionValue;
43
+ maxHeight?: DimensionValue;
44
+ minHeight?: DimensionValue;
45
+ maxWidth?: DimensionValue;
46
+ minWidth?: DimensionValue;
47
+ width?: DimensionValue;
48
+ aspectRatio?: number;
49
+ }
50
+
51
+ export type AppScrollViewProps = RNScrollViewProps & ExtraStyleProps;
52
+
53
+ const AppScrollView = forwardRef<
54
+ React.ComponentRef<typeof ScrollView>,
55
+ AppScrollViewProps
56
+ >(
57
+ (
58
+ {
59
+ children,
60
+ style,
61
+ contentContainerStyle,
62
+ padding,
63
+ paddingTop,
64
+ paddingBottom,
65
+ paddingLeft,
66
+ paddingRight,
67
+ paddingHorizontal,
68
+ paddingVertical,
69
+ margin,
70
+ marginTop,
71
+ marginBottom,
72
+ marginLeft,
73
+ marginRight,
74
+ marginHorizontal,
75
+ marginVertical,
76
+ flex,
77
+ flexGrow,
78
+ flexShrink,
79
+ flexBasis,
80
+ flexWrap,
81
+ flexDirection,
82
+ alignItems,
83
+ justifyContent,
84
+ alignSelf,
85
+ gap,
86
+ backgroundColor,
87
+ borderRadius,
88
+ height,
89
+ maxHeight,
90
+ minHeight,
91
+ maxWidth,
92
+ minWidth,
93
+ width,
94
+ aspectRatio,
95
+ ...rest
96
+ },
97
+ ref,
98
+ ) => {
99
+ const toDim = (v?: number | DimensionValue) =>
100
+ v === undefined
101
+ ? undefined
102
+ : typeof v === 'number'
103
+ ? (RF(v) as unknown as DimensionValue)
104
+ : v;
105
+
106
+ const spacingStyle: ViewStyle = {
107
+ padding: padding !== undefined ? RF(padding) : undefined,
108
+ paddingTop: paddingTop !== undefined ? RF(paddingTop) : undefined,
109
+ paddingBottom:
110
+ paddingBottom !== undefined ? RF(paddingBottom) : undefined,
111
+ paddingLeft: paddingLeft !== undefined ? RF(paddingLeft) : undefined,
112
+ paddingRight: paddingRight !== undefined ? RF(paddingRight) : undefined,
113
+ paddingHorizontal:
114
+ paddingHorizontal !== undefined ? RF(paddingHorizontal) : undefined,
115
+ paddingVertical:
116
+ paddingVertical !== undefined ? RF(paddingVertical) : undefined,
117
+
118
+ margin: margin !== undefined ? RF(margin) : undefined,
119
+ marginTop: marginTop !== undefined ? RF(marginTop) : undefined,
120
+ marginBottom: marginBottom !== undefined ? RF(marginBottom) : undefined,
121
+ marginLeft: marginLeft !== undefined ? RF(marginLeft) : undefined,
122
+ marginRight: marginRight !== undefined ? RF(marginRight) : undefined,
123
+ marginHorizontal:
124
+ marginHorizontal !== undefined ? RF(marginHorizontal) : undefined,
125
+ marginVertical:
126
+ marginVertical !== undefined ? RF(marginVertical) : undefined,
127
+
128
+ borderRadius: borderRadius !== undefined ? RF(borderRadius) : undefined,
129
+
130
+ flex,
131
+ flexGrow,
132
+ flexShrink,
133
+ flexBasis: toDim(flexBasis),
134
+ flexDirection,
135
+ flexWrap,
136
+ alignItems,
137
+ justifyContent,
138
+ alignSelf,
139
+ gap: gap !== undefined ? RF(gap) : undefined,
140
+
141
+ backgroundColor,
142
+ height: toDim(height),
143
+ maxHeight: toDim(maxHeight),
144
+ minHeight: toDim(minHeight),
145
+ maxWidth: toDim(maxWidth),
146
+ minWidth: toDim(minWidth),
147
+ width: toDim(width),
148
+ aspectRatio: aspectRatio !== undefined ? RF(aspectRatio) : undefined,
149
+ };
150
+
151
+ return (
152
+ <ScrollView
153
+ ref={ref}
154
+ style={style}
155
+ contentContainerStyle={[spacingStyle, contentContainerStyle]}
156
+ {...rest}
157
+ >
158
+ {children}
159
+ </ScrollView>
160
+ );
161
+ },
162
+ );
163
+
164
+ AppScrollView.displayName = 'AppScrollView';
165
+
166
+ export default AppScrollView;
@@ -0,0 +1,22 @@
1
+ import { Colors } from "@theme/colors";
2
+ import Skeleton, { ISkeletonProps } from "react-native-reanimated-skeleton";
3
+
4
+ const AppSkeleton = ({
5
+ boneColor = Colors.GRAY_2,
6
+ highlightColor = Colors.WHITE,
7
+ animationType = "shiver",
8
+ duration = 1000,
9
+ ...props
10
+ }: ISkeletonProps) => {
11
+ return (
12
+ <Skeleton
13
+ boneColor={boneColor}
14
+ highlightColor={highlightColor}
15
+ animationType={animationType}
16
+ duration={duration}
17
+ {...props}
18
+ />
19
+ );
20
+ };
21
+
22
+ export default AppSkeleton;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import {StatusBar, StatusBarProps} from 'react-native';
3
+
4
+ const AppStatusBar: React.FC<StatusBarProps> = props => {
5
+ return <StatusBar {...props} />;
6
+ };
7
+
8
+ export default AppStatusBar;
@@ -0,0 +1,111 @@
1
+ import AppColumnView from "@appComponents/appColumnView";
2
+ import AppIcon from "@appComponents/appIcon";
3
+ import AppPressable from "@appComponents/appPressable";
4
+ import AppRowView from "@appComponents/appRowView";
5
+ import AppText from "@appComponents/appText";
6
+ import { Images } from "@assets";
7
+ import AvatarBlock from "@components/avatarBlock";
8
+ import IoniconsIcons from "@icons/IoniconsIcons";
9
+ import OcticonsIcons from "@icons/octiconsIcons";
10
+ import { Colors } from "@theme/colors";
11
+ import { Fonts } from "@theme/fonts";
12
+ import { useRouter } from "expo-router";
13
+ import React from "react";
14
+
15
+ interface IAppTabHeader {
16
+ title: string;
17
+ subTitle: string;
18
+ onPressDownload?: () => void;
19
+ onFilterPress?: () => void;
20
+ avatarUri: string | null;
21
+ onNotificationPress?: () => void;
22
+ subTitleIcon?: React.ReactNode;
23
+ }
24
+
25
+ const AppTabHeader = (props: IAppTabHeader) => {
26
+ const {
27
+ avatarUri,
28
+ onPressDownload,
29
+ onFilterPress,
30
+ onNotificationPress,
31
+ title,
32
+ subTitle,
33
+ subTitleIcon,
34
+ } = props;
35
+ const router = useRouter();
36
+
37
+ return (
38
+ <AppRowView
39
+ justifyContent="space-between"
40
+ alignItems="flex-start"
41
+ marginBottom={12}
42
+ >
43
+ <AppColumnView flex={1} paddingRight={12}>
44
+ <AppText size={16} fontFamily={Fonts.BOLD} color={Colors.BLACK}>
45
+ {title}
46
+ </AppText>
47
+ <AppRowView alignItems="center" gap={6}>
48
+ {subTitleIcon}
49
+ <AppText size={12} fontFamily={Fonts.MEDIUM} color={Colors.GRAY_6}>
50
+ {subTitle}
51
+ </AppText>
52
+ </AppRowView>
53
+ </AppColumnView>
54
+
55
+ <AppRowView alignItems="center" gap={12}>
56
+ {onNotificationPress ? (
57
+ <AppPressable onPress={onNotificationPress} hitSlop={10}>
58
+ <AppColumnView>
59
+ <AppIcon path={Images.notification} size={22} />
60
+ <AppColumnView
61
+ position="absolute"
62
+ top={0}
63
+ right={0}
64
+ width={12}
65
+ height={12}
66
+ borderRadius={6}
67
+ backgroundColor={Colors.NOTIFICATION}
68
+ />
69
+ </AppColumnView>
70
+ </AppPressable>
71
+ ) : onFilterPress ? (
72
+ <AppPressable onPress={onFilterPress} hitSlop={10}>
73
+ <AppColumnView
74
+ height={40}
75
+ width={40}
76
+ borderRadius={10}
77
+ backgroundColor={Colors.GRAY_1}
78
+ alignItems="center"
79
+ justifyContent="center"
80
+ >
81
+ <IoniconsIcons
82
+ icon="options-outline"
83
+ color={Colors.GRAY_5}
84
+ size={22}
85
+ />
86
+ </AppColumnView>
87
+ </AppPressable>
88
+ ) : onPressDownload ? (
89
+ <AppPressable
90
+ onPress={onPressDownload}
91
+ hitSlop={10}
92
+ height={44}
93
+ width={44}
94
+ borderRadius={22}
95
+ backgroundColor={Colors.GRAY_1}
96
+ alignItems="center"
97
+ justifyContent="center"
98
+ >
99
+ <OcticonsIcons icon="download" color={Colors.GRAY_5} size={22} />
100
+ </AppPressable>
101
+ ) : null}
102
+ <AvatarBlock
103
+ avatarUri={avatarUri}
104
+ onPressProfile={() => router.push("/(coach)/basic-info")}
105
+ />
106
+ </AppRowView>
107
+ </AppRowView>
108
+ );
109
+ };
110
+
111
+ export default AppTabHeader;