app-expo-cli 1.0.5 → 1.0.7

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 (74) hide show
  1. package/README.md +11 -5
  2. package/package.json +1 -1
  3. package/src/copy-template.js +19 -1
  4. package/src/install-deps.js +6 -0
  5. package/template/assets/fonts/Inter_18pt-Black.ttf +0 -0
  6. package/template/assets/fonts/Inter_18pt-BlackItalic.ttf +0 -0
  7. package/template/assets/icon/index.ts +146 -0
  8. package/template/assets/images/about_us.png +0 -0
  9. package/template/assets/images/index.ts +6 -0
  10. package/template/assets/images/logo.png +0 -0
  11. package/template/assets/images/privacy_policy.png +0 -0
  12. package/template/assets/images/terms_and_conditions.png +0 -0
  13. package/template/src/app/_layout.tsx +3 -3
  14. package/template/src/app/auth/change_pass.tsx +18 -15
  15. package/template/src/app/auth/change_pass_modal.tsx +32 -51
  16. package/template/src/app/auth/forgot.tsx +74 -88
  17. package/template/src/app/auth/index.tsx +161 -192
  18. package/template/src/app/auth/opt_verify.tsx +93 -103
  19. package/template/src/app/auth/register.tsx +198 -260
  20. package/template/src/app/auth/reset_pass.tsx +102 -105
  21. package/template/src/app/index.tsx +70 -7
  22. package/template/src/app/modals/confirmation_logout_modal.tsx +0 -5
  23. package/template/src/app/modals/success_modal.tsx +28 -48
  24. package/template/src/app/settings/about_us.tsx +1 -1
  25. package/template/src/app/settings/privacy_policy.tsx +1 -1
  26. package/template/src/app/settings/terms_and_conditions.tsx +1 -1
  27. package/template/src/lib/DateTimePicker/DateTimePicker.tsx +63 -0
  28. package/template/src/lib/Empty/EmptyCard.tsx +67 -0
  29. package/template/src/lib/Error/GlobalErrorBoundary.tsx +111 -0
  30. package/template/src/lib/animate/AniImage.tsx +32 -0
  31. package/template/src/lib/backHeader/BackButton.tsx +62 -0
  32. package/template/src/lib/backHeader/BackWithCoponent.tsx +112 -0
  33. package/template/src/lib/backHeader/BackWithHeader.tsx +46 -0
  34. package/template/src/lib/backHeader/BackWithTitle.tsx +53 -0
  35. package/template/src/lib/buttons/IButton.tsx +69 -0
  36. package/template/src/lib/buttons/IwtButton.tsx +199 -0
  37. package/template/src/lib/buttons/Or.tsx +27 -0
  38. package/template/src/lib/buttons/SimpleButton.tsx +45 -0
  39. package/template/src/lib/buttons/TButton.tsx +70 -0
  40. package/template/src/lib/cards/Card.tsx +175 -0
  41. package/template/src/lib/cards/OptionSelect.tsx +44 -0
  42. package/template/src/lib/cards/SearchCard.tsx +35 -0
  43. package/template/src/lib/editor/TextEditor.tsx +81 -0
  44. package/template/src/lib/expend/ExpendComponent.tsx +36 -0
  45. package/template/src/lib/imageViewer/ImageViwer.tsx +332 -0
  46. package/template/src/lib/imageZoomer/ImageZoomer.tsx +104 -0
  47. package/template/src/lib/inputs/CheckBox.tsx +86 -0
  48. package/template/src/lib/inputs/InputText.tsx +232 -0
  49. package/template/src/lib/loader/GLoading.tsx +26 -0
  50. package/template/src/lib/loading/MLoading.tsx +14 -0
  51. package/template/src/lib/loading/SLoading.tsx +14 -0
  52. package/template/src/lib/modals/ActionModal.tsx +97 -0
  53. package/template/src/lib/modals/BottomModal.tsx +224 -0
  54. package/template/src/lib/modals/ConfrimationModal.tsx +116 -0
  55. package/template/src/lib/modals/DateModal.tsx +152 -0
  56. package/template/src/lib/modals/NormalModal.tsx +73 -0
  57. package/template/src/lib/modals/SideModal.tsx +57 -0
  58. package/template/src/lib/modals/Toaster.tsx +256 -0
  59. package/template/src/lib/payment/PaymentCardForD.tsx +47 -0
  60. package/template/src/lib/progressBar/ProgressBar.tsx +64 -0
  61. package/template/src/lib/tailwind.js +9 -0
  62. package/template/src/lib/ui/Avatar.tsx +55 -0
  63. package/template/src/redux/api-config/baseApi.ts +0 -22
  64. package/template/src/redux/interface/interface.ts +11 -193
  65. package/template/src/redux/store.ts +2 -2
  66. package/template/src/app/home/_layout.tsx +0 -29
  67. package/template/src/app/home/drawer/_layout.tsx +0 -27
  68. package/template/src/app/home/tabs/_layout.tsx +0 -75
  69. package/template/src/app/home/tabs/index.tsx +0 -11
  70. package/template/src/app/modals/payment_modal.tsx +0 -105
  71. package/template/src/hooks/useCheckLocation.ts +0 -36
  72. package/template/src/hooks/useDocPicker.ts +0 -83
  73. package/template/src/hooks/useSuggestionLocation.ts +0 -36
  74. package/template/src/hooks/useUploadProgress.ts +0 -127
@@ -0,0 +1,27 @@
1
+ import { Text, View } from "react-native";
2
+
3
+ import React from "react";
4
+ import tw from "../tailwind";
5
+
6
+ interface IOR {
7
+ containerStyle?: {};
8
+ title?: string;
9
+ titleStyle?: {};
10
+ lineStyle?: {};
11
+ }
12
+
13
+ const Or = ({ containerStyle, title, titleStyle, lineStyle }: IOR) => {
14
+ return (
15
+ <View
16
+ style={[tw`items-center gap-3 justify-center flex-row `, containerStyle]}
17
+ >
18
+ <View style={[tw`border-[.2px] flex-1 border-[#888888]`, lineStyle]} />
19
+ <Text style={[tw`text-xs font-InterRegular text-gray-300`, titleStyle]}>
20
+ {title || "Or"}
21
+ </Text>
22
+ <View style={[tw`border-[.2px] flex-1 border-[#888888]`, lineStyle]} />
23
+ </View>
24
+ );
25
+ };
26
+
27
+ export default Or;
@@ -0,0 +1,45 @@
1
+ import { Text, TouchableOpacity } from "react-native";
2
+
3
+ import React from "react";
4
+ import { SvgXml } from "react-native-svg";
5
+ import tw from "../tailwind";
6
+
7
+ interface SimpleButtonProps {
8
+ onPress?: () => void;
9
+ svgIcon?: any;
10
+ svgHeight?: number;
11
+ svgWidth?: number;
12
+ title?: string;
13
+ titleStyle?: any;
14
+ containerStyle?: any;
15
+ }
16
+
17
+ const SimpleButton = ({
18
+ containerStyle,
19
+ onPress,
20
+ svgIcon,
21
+ title,
22
+ titleStyle,
23
+ svgHeight = 16,
24
+ svgWidth = 16,
25
+ }: SimpleButtonProps) => {
26
+ return (
27
+ <TouchableOpacity
28
+ onPress={onPress}
29
+ activeOpacity={0.5}
30
+ style={[
31
+ tw`border-2 border-[#E8E8EA] px-3 py-1 flex-row items-center rounded-full`,
32
+ containerStyle,
33
+ ]}
34
+ >
35
+ {title && (
36
+ <Text style={[tw`text-primary font-RobotoBold text-xs`, titleStyle]}>
37
+ {title}
38
+ </Text>
39
+ )}
40
+ {svgIcon && <SvgXml height={svgHeight} width={svgWidth} xml={svgIcon} />}
41
+ </TouchableOpacity>
42
+ );
43
+ };
44
+
45
+ export default SimpleButton;
@@ -0,0 +1,70 @@
1
+ import { ActivityIndicator, Text, TouchableOpacity } from "react-native";
2
+
3
+ import { LinearGradient } from "expo-linear-gradient";
4
+ import React from "react";
5
+ import tw from "../tailwind";
6
+
7
+ interface IButton {
8
+ containerStyle?: {};
9
+ titleStyle?: {};
10
+ title?: string;
11
+ isLoading?: boolean;
12
+ onPress?: () => void;
13
+ loadingColor?: string;
14
+ disabled?: boolean;
15
+ offGradient?: boolean;
16
+ gradinLayoutStyle?: {};
17
+ }
18
+
19
+ const TButton = ({
20
+ containerStyle,
21
+ title,
22
+ titleStyle,
23
+ isLoading,
24
+ onPress,
25
+ loadingColor,
26
+ disabled,
27
+ offGradient,
28
+ gradinLayoutStyle,
29
+ }: IButton) => {
30
+ return (
31
+ <TouchableOpacity
32
+ onPress={onPress}
33
+ disabled={isLoading || disabled}
34
+ // activeOpacity={0.5}
35
+ style={[
36
+ tw` h-14 flex-row justify-center items-center gap-3 rounded-full ${
37
+ disabled ? "opacity-60" : "opacity-100"
38
+ }`,
39
+ containerStyle,
40
+ ]}
41
+ >
42
+ <LinearGradient
43
+ // Background Linear Gradient
44
+ colors={
45
+ offGradient ? ["transparent", "transparent"] : ["#FF8787", "#8578B4"]
46
+ }
47
+ style={[
48
+ tw`w-full h-full flex-row justify-center items-center gap-3 rounded-full`,
49
+ gradinLayoutStyle,
50
+ ]}
51
+ >
52
+ {isLoading && (
53
+ <ActivityIndicator color={loadingColor ? loadingColor : "white"} />
54
+ )}
55
+ {title && (
56
+ <Text
57
+ style={[
58
+ tw`text-white font-InterSemiBold text-base text-center `,
59
+ titleStyle,
60
+ ]}
61
+ >
62
+ {title}
63
+ </Text>
64
+ )}
65
+ </LinearGradient>
66
+ </TouchableOpacity>
67
+ );
68
+ };
69
+
70
+ export default TButton;
@@ -0,0 +1,175 @@
1
+ import { ActivityIndicator, Text, TouchableOpacity, View } from "react-native";
2
+
3
+ import { AnimatedImage } from "react-native-ui-lib";
4
+ import React from "react";
5
+ import { SvgXml } from "react-native-svg";
6
+ import tw from "../tailwind";
7
+
8
+ export interface ICardProps {
9
+ children?: React.ReactNode;
10
+ containerStyle?: any;
11
+ cardStyle?: any;
12
+ component?: React.ReactNode;
13
+ OuterComponent?: React.ReactNode;
14
+ onPress?: () => void;
15
+
16
+ layoutStyle?: any;
17
+ }
18
+
19
+ const Card = ({
20
+ children,
21
+ cardStyle,
22
+ component,
23
+ containerStyle,
24
+ OuterComponent,
25
+ layoutStyle,
26
+ onPress,
27
+ }: ICardProps) => {
28
+ return (
29
+ <View style={[tw`flex-row items-center justify-between`, layoutStyle]}>
30
+ <TouchableOpacity
31
+ activeOpacity={0.6}
32
+ disabled={!onPress}
33
+ onPress={onPress}
34
+ style={[
35
+ tw`bg-primary600 p-2 rounded-md flex-row justify-between items-center flex-1`,
36
+ cardStyle,
37
+ ]}
38
+ >
39
+ <View style={[tw``, containerStyle]}>{children}</View>
40
+ {component && <View>{component}</View>}
41
+ </TouchableOpacity>
42
+ {OuterComponent && <View>{OuterComponent}</View>}
43
+ </View>
44
+ );
45
+ };
46
+
47
+ export interface ICardImageProps {
48
+ source: { uri: string };
49
+ containerStyle?: any;
50
+ imageStyle?: any;
51
+ children?: React.ReactNode;
52
+ }
53
+
54
+ Card.Image = ({
55
+ source,
56
+ containerStyle,
57
+ imageStyle,
58
+ children,
59
+ }: ICardImageProps) => {
60
+ return (
61
+ <>
62
+ {children ? (
63
+ children
64
+ ) : (
65
+ <>
66
+ <AnimatedImage
67
+ containerStyle={[
68
+ tw`aspect-square items-center rounded-md`,
69
+ containerStyle,
70
+ ]}
71
+ errorSource={source}
72
+ // onError={e => console.log(e)}
73
+ animationDuration={500}
74
+ style={[tw`aspect-square rounded-md`, imageStyle]}
75
+ loader={<ActivityIndicator color="white" size={"small"} />}
76
+ source={
77
+ source?.uri
78
+ ? source
79
+ : require("../../assets/images/icons/no_image.png")
80
+ }
81
+ />
82
+ </>
83
+ )}
84
+ </>
85
+ );
86
+ };
87
+
88
+ export interface ICardDetailsProps {
89
+ children?: React.ReactNode;
90
+ containerStyle?: any;
91
+ detailsContainerStyle?: any;
92
+ svgStyle?: any;
93
+ textStyle?: any;
94
+ data?: Array<{
95
+ title?: string;
96
+ icons?: React.ReactNode;
97
+ titleStyle?: any;
98
+ }>;
99
+ }
100
+
101
+ Card.Details = ({
102
+ children,
103
+ data,
104
+ containerStyle,
105
+ detailsContainerStyle,
106
+ svgStyle,
107
+ textStyle,
108
+ }: ICardDetailsProps) => {
109
+ return (
110
+ <>
111
+ {children ? (
112
+ children
113
+ ) : (
114
+ <View style={[tw`justify-start gap-1 `, containerStyle]}>
115
+ {data?.map((item, index) => {
116
+ return (
117
+ <View
118
+ key={index}
119
+ style={[
120
+ tw`flex-row items-center gap-1.5`,
121
+ detailsContainerStyle,
122
+ ]}
123
+ >
124
+ {item?.icons && <SvgXml xml={item.icons} {...svgStyle} />}
125
+ {item?.title && (
126
+ <Text
127
+ numberOfLines={1}
128
+ style={[
129
+ tw`text-white font-DegularDisplayRegular text-sm `,
130
+ item.titleStyle,
131
+ ]}
132
+ >
133
+ {item.title}
134
+ </Text>
135
+ )}
136
+ </View>
137
+ );
138
+ })}
139
+ </View>
140
+ )}
141
+ </>
142
+ );
143
+ };
144
+
145
+ interface CardButtonProps {
146
+ total: number;
147
+ checkedIn: number;
148
+ onPress?: () => void;
149
+ }
150
+
151
+ Card.Button = ({ checkedIn, total, onPress }: CardButtonProps) => {
152
+ return (
153
+ <>
154
+ <TouchableOpacity
155
+ activeOpacity={0.6}
156
+ disabled={total == 0}
157
+ onPress={onPress}
158
+ style={tw`px-2 ${
159
+ total == 0 ? "bg-green-900" : "bg-green-600"
160
+ } rounded-lg h-10 items-center justify-center`}
161
+ >
162
+ <Text
163
+ style={tw` ${
164
+ // checkedIn === total ? 'text-white400' : 'text-white50'
165
+ "text-white50"
166
+ } font-RobotoBlack`}
167
+ >
168
+ Checked in {checkedIn}/{total}
169
+ </Text>
170
+ </TouchableOpacity>
171
+ </>
172
+ );
173
+ };
174
+
175
+ export default Card;
@@ -0,0 +1,44 @@
1
+ import React, { Dispatch, SetStateAction } from "react";
2
+ import { Text, TouchableOpacity, View } from "react-native";
3
+
4
+ import tw from "../tailwind";
5
+
6
+ interface IOptionSelectProps {
7
+ setSelectOption: Dispatch<SetStateAction<string>>;
8
+ data: Array<string>;
9
+ selectOption: string;
10
+ containerStyle?: any;
11
+ selectStyle?: any;
12
+ textstyle?: any;
13
+ }
14
+
15
+ const OptionSelect = ({
16
+ data,
17
+ selectOption,
18
+ setSelectOption,
19
+ containerStyle,
20
+ selectStyle,
21
+ textstyle,
22
+ }: IOptionSelectProps) => {
23
+ return (
24
+ <View style={[tw`flex-row justify-between gap-2`, containerStyle]}>
25
+ {data.map((item, index) => (
26
+ <TouchableOpacity
27
+ key={index}
28
+ style={[
29
+ tw`p-2 rounded-lg items-center justify-center flex-1`,
30
+ selectStyle,
31
+ selectOption === item && tw`bg-primary40`,
32
+ ]}
33
+ onPress={() => setSelectOption(item)}
34
+ >
35
+ <Text style={[tw`text-white50 text-xs font-RobotoBold`, textstyle]}>
36
+ {item}
37
+ </Text>
38
+ </TouchableOpacity>
39
+ ))}
40
+ </View>
41
+ );
42
+ };
43
+
44
+ export default OptionSelect;
@@ -0,0 +1,35 @@
1
+ import { IconSearchGray } from "@/icons/icons";
2
+ import React from "react";
3
+ import { View } from "react-native";
4
+ import InputText from "../inputs/InputText";
5
+ import tw from "../tailwind";
6
+
7
+ interface SearchCardProps {
8
+ setSearch?: React.Dispatch<React.SetStateAction<string>>;
9
+ search?: string;
10
+ placeholder?: string;
11
+ containerStyle?: any;
12
+ fieldStyle?: any;
13
+ focusSTyle?: any;
14
+ Component?: React.ReactNode;
15
+ ref?: any;
16
+ label?: string;
17
+ onPress?: () => void;
18
+ }
19
+
20
+ const SearchCard = ({ search, setSearch }: SearchCardProps) => {
21
+ return (
22
+ <View style={tw`h-12 px-2`}>
23
+ <InputText
24
+ svgFirstIcon={IconSearchGray}
25
+ value={search}
26
+ onChangeText={(text) => setSearch && setSearch(text)}
27
+ placeholder="Search"
28
+ style={tw`text-black`}
29
+ containerStyle={tw` border border-gray-500 rounded-full h-12 flex-1`}
30
+ />
31
+ </View>
32
+ );
33
+ };
34
+
35
+ export default SearchCard;
@@ -0,0 +1,81 @@
1
+ import {
2
+ KeyboardAvoidingView,
3
+ Platform,
4
+ SafeAreaView,
5
+ ScrollView,
6
+ Text,
7
+ } from "react-native";
8
+ import {
9
+ RichEditor,
10
+ RichToolbar,
11
+ actions,
12
+ } from "react-native-pell-rich-editor";
13
+
14
+ import { _HIGHT } from "@/src/utils/utils";
15
+ import React from "react";
16
+ import tw from "../tailwind";
17
+
18
+ const handleHead = ({ tintColor }: any) => (
19
+ <Text style={{ color: tintColor }}>H1</Text>
20
+ );
21
+
22
+ const handleLink = ({ tintColor }: any) => (
23
+ <Text style={{ color: tintColor }}>Link</Text>
24
+ );
25
+
26
+ interface TextEditorProps {
27
+ onChange?: (descriptionText: string) => void;
28
+ onFocus?: (isEditing: boolean) => void;
29
+ value?: string;
30
+ }
31
+
32
+ const TextEditor = ({ onChange, onFocus, value }: TextEditorProps) => {
33
+ const richText = React.useRef<null>(null);
34
+ return (
35
+ <SafeAreaView>
36
+ <ScrollView>
37
+ <KeyboardAvoidingView
38
+ behavior={Platform.OS === "ios" ? "padding" : "height"}
39
+ style={{ flex: 1 }}
40
+ >
41
+ <RichToolbar
42
+ style={tw`bg-transparent border border-secondary rounded-t-md`}
43
+ editor={richText}
44
+ actions={[
45
+ actions.setBold,
46
+ actions.setItalic,
47
+ actions.setUnderline,
48
+ actions.heading1,
49
+ actions.insertBulletsList,
50
+ actions.insertOrderedList,
51
+ actions.insertLink,
52
+ ]}
53
+ iconMap={{
54
+ [actions.heading1]: handleHead,
55
+ [actions.insertLink]: handleLink,
56
+ }}
57
+ />
58
+ <RichEditor
59
+ initialHeight={_HIGHT * 0.3}
60
+ initialContentHTML={value}
61
+ placeholder="Write your caption"
62
+ style={tw`bg-transparent border border-t-0 border-secondary rounded-b-md p-2 text-white`}
63
+ editorStyle={tw`bg-transparent border border-secondary rounded-md p-2 text-white`}
64
+ ref={richText}
65
+ onChange={(text) => {
66
+ onChange && onChange(text);
67
+ }}
68
+ onFocus={() => {
69
+ onFocus && onFocus(true);
70
+ }}
71
+ onBlur={() => {
72
+ onFocus && onFocus(false);
73
+ }}
74
+ />
75
+ </KeyboardAvoidingView>
76
+ </ScrollView>
77
+ </SafeAreaView>
78
+ );
79
+ };
80
+
81
+ export default TextEditor;
@@ -0,0 +1,36 @@
1
+ import { Text, View } from "react-native";
2
+
3
+ import { ExpandableSection } from "react-native-ui-lib";
4
+ import { IFaq } from "../../redux/interface/additional";
5
+ import { IconDownArrow } from "../../icons/icons";
6
+ import React from "react";
7
+ import { SvgXml } from "react-native-svg";
8
+ import tw from "../tailwind";
9
+
10
+ const ExpendComponent = ({ item }: { item: IFaq }) => {
11
+ const [expend, setExpended] = React.useState(false);
12
+ return (
13
+ <View style={tw`mx-[4%] gap-2 py-5 border-b border-b-black100`}>
14
+ <ExpandableSection
15
+ expanded={expend}
16
+ sectionHeader={
17
+ <View style={tw`flex-row justify-between items-center`}>
18
+ <Text style={tw`text-black900 font-RobotoBold text-base`}>
19
+ {item.question}
20
+ </Text>
21
+ <SvgXml xml={IconDownArrow} />
22
+ </View>
23
+ }
24
+ onPress={() => setExpended(!expend)}
25
+ >
26
+ <View style={tw`my-2`}>
27
+ <Text style={tw`text-black600 font-DegularDisplayRegular text-sm`}>
28
+ {item.answer}
29
+ </Text>
30
+ </View>
31
+ </ExpandableSection>
32
+ </View>
33
+ );
34
+ };
35
+
36
+ export default ExpendComponent;