@test-web/react-native-sdk 1.0.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/README.md +58 -0
- package/android/build.gradle +50 -0
- package/android/src/main/AndroidManifest.xml +24 -0
- package/android/src/main/java/com/yourcompany/sdk/YourSDKModule.java +40 -0
- package/android/src/main/java/com/yourcompany/sdk/YourSDKPackage.java +24 -0
- package/ios/YourSDK-Bridging-Header.h +1 -0
- package/ios/YourSDK-Info.plist +30 -0
- package/ios/YourSDK.podspec +19 -0
- package/ios/YourSDKModule.h +5 -0
- package/ios/YourSDKModule.m +32 -0
- package/ios/YourSDKModule.swift +22 -0
- package/package.json +38 -0
- package/src/apis/index.ts +32 -0
- package/src/components/common/CustomOverlay.tsx +44 -0
- package/src/components/common/Footer.tsx +30 -0
- package/src/components/common/Header.tsx +29 -0
- package/src/components/common/Loader.tsx +23 -0
- package/src/components/index.tsx +6 -0
- package/src/components/ui/Button.tsx +41 -0
- package/src/components/ui/ThemedText.tsx +42 -0
- package/src/components/ui/index.tsx +2 -0
- package/src/context/IDMConfigurationContext.tsx +44 -0
- package/src/context/KeyboardContext.tsx +61 -0
- package/src/context/ThemeContext.tsx +34 -0
- package/src/context/themes.ts +134 -0
- package/src/hooks/useOrientation.ts +25 -0
- package/src/index.tsx +110 -0
- package/src/native/NativeModule.ts +10 -0
- package/src/screens/BackDocumentAdvice.tsx +52 -0
- package/src/screens/BarcodeAdvice.tsx +52 -0
- package/src/screens/BarcodeCapture.tsx +66 -0
- package/src/screens/CameraPermission.tsx +74 -0
- package/src/screens/DocumentCaptureBack.tsx +65 -0
- package/src/screens/DocumentCaptureFront.tsx +65 -0
- package/src/screens/FrontDocumentAdvice.tsx +52 -0
- package/src/screens/LocationPermission.tsx +74 -0
- package/src/screens/MrzAdvice.tsx +52 -0
- package/src/screens/MrzCapture.tsx +64 -0
- package/src/screens/NoCameraFound.tsx +64 -0
- package/src/screens/RetakeSelfie.tsx +56 -0
- package/src/screens/SelectDocuments.tsx +250 -0
- package/src/screens/SelfieAdvice.tsx +35 -0
- package/src/screens/SelfieCapture.tsx +56 -0
- package/src/screens/ThankYou.tsx +23 -0
- package/src/screens/VerifyIdentity.tsx +54 -0
- package/src/screens/index.tsx +17 -0
- package/src/styles/BarcodeAdviceStyles.ts +45 -0
- package/src/styles/DocumentAdviceStyles.ts +44 -0
- package/src/styles/DocumentCaptureStyles.ts +55 -0
- package/src/styles/PermissionStyle.ts +61 -0
- package/src/styles/RetakeStyles.ts +67 -0
- package/src/styles/ScannerStyles.ts +28 -0
- package/src/styles/SelectDocumentsStyles.ts +90 -0
- package/src/styles/SelfieAdviceStyles.ts +61 -0
- package/src/styles/SelfieCaptureStyles.ts +48 -0
- package/src/styles/ThankYouStyles.ts +31 -0
- package/src/styles/VerifyIdentityStyles.ts +86 -0
- package/src/types/IDMConf.ts +28 -0
- package/src/types/index.ts +12 -0
- package/src/utils/index.ts +19 -0
- package/src/utils/metadata_new.json +1 -0
- package/src/utils/performance.ts +176 -0
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { useNavigation } from '@react-navigation/native';
|
|
2
|
+
import { Image, Text, ScrollView } from 'react-native';
|
|
3
|
+
import Button from '../components/ui/Button';
|
|
4
|
+
import ThemedText from '../components/ui/ThemedText';
|
|
5
|
+
import getStyles from '../styles/SelfieAdviceStyles';
|
|
6
|
+
import { useTheme } from '../context/ThemeContext';
|
|
7
|
+
import { useOrientation } from '../hooks/useOrientation';
|
|
8
|
+
|
|
9
|
+
export default function SelfieAdvice() {
|
|
10
|
+
const { theme } = useTheme();
|
|
11
|
+
const orientation = useOrientation();
|
|
12
|
+
const styles = getStyles(theme, orientation);
|
|
13
|
+
const navigation = useNavigation();
|
|
14
|
+
|
|
15
|
+
return (
|
|
16
|
+
<ScrollView contentContainerStyle={styles.container}>
|
|
17
|
+
<ThemedText style={styles.maintitle} type="title">
|
|
18
|
+
Take a Selfie
|
|
19
|
+
</ThemedText>
|
|
20
|
+
{/* Add selfie.jpg image to assets/images/ */}
|
|
21
|
+
{/* <Image
|
|
22
|
+
source={require('../../assets/images/selfie.jpg')}
|
|
23
|
+
style={styles.selfie}
|
|
24
|
+
resizeMode="contain"
|
|
25
|
+
/> */}
|
|
26
|
+
<Text style={styles.text}>You have to allow Camera Permission.</Text>
|
|
27
|
+
<Button
|
|
28
|
+
title="Take a Selfie"
|
|
29
|
+
style={styles.buttonplace}
|
|
30
|
+
textStyle={styles.button}
|
|
31
|
+
onPress={() => navigation.navigate('SelfieCapture' as never)}
|
|
32
|
+
/>
|
|
33
|
+
</ScrollView>
|
|
34
|
+
);
|
|
35
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import React, { useState, useCallback } from 'react';
|
|
2
|
+
import { useNavigation } from '@react-navigation/native';
|
|
3
|
+
import { TouchableOpacity, View, StyleSheet, Text } from 'react-native';
|
|
4
|
+
import getStyles from '../styles/SelfieCaptureStyles';
|
|
5
|
+
import { useTheme } from '../context/ThemeContext';
|
|
6
|
+
import { useOrientation } from '../hooks/useOrientation';
|
|
7
|
+
import Loader from '../components/common/Loader';
|
|
8
|
+
|
|
9
|
+
export default function SelfieCapture() {
|
|
10
|
+
const { theme } = useTheme();
|
|
11
|
+
const orientation = useOrientation();
|
|
12
|
+
const styles = getStyles(theme, orientation);
|
|
13
|
+
const navigation = useNavigation();
|
|
14
|
+
const [loading, setLoading] = useState(false);
|
|
15
|
+
|
|
16
|
+
const takePhoto = useCallback(() => {
|
|
17
|
+
setLoading(true);
|
|
18
|
+
|
|
19
|
+
// Static implementation - simulate photo capture
|
|
20
|
+
setTimeout(() => {
|
|
21
|
+
setLoading(false);
|
|
22
|
+
navigation.navigate('SelectDocuments' as never);
|
|
23
|
+
}, 1000);
|
|
24
|
+
}, [navigation]);
|
|
25
|
+
|
|
26
|
+
return (
|
|
27
|
+
<View style={styles.container}>
|
|
28
|
+
{/* Camera placeholder */}
|
|
29
|
+
<View style={StyleSheet.absoluteFill}>
|
|
30
|
+
<View style={[StyleSheet.absoluteFill, { backgroundColor: '#000' }]}>
|
|
31
|
+
<Text style={[styles.text, { color: '#fff', marginTop: 100 }]}>
|
|
32
|
+
Camera View (Static)
|
|
33
|
+
</Text>
|
|
34
|
+
</View>
|
|
35
|
+
</View>
|
|
36
|
+
|
|
37
|
+
{/* Camera overlay - Add your overlay image to assets/images/photo-overlay.png */}
|
|
38
|
+
{/* <Image
|
|
39
|
+
source={require('../../assets/images/photo-overlay.png')}
|
|
40
|
+
style={styles.cameraoverlay}
|
|
41
|
+
resizeMode="contain"
|
|
42
|
+
/> */}
|
|
43
|
+
|
|
44
|
+
{/* Capture button */}
|
|
45
|
+
<View style={styles.buttonplace}>
|
|
46
|
+
<TouchableOpacity
|
|
47
|
+
style={styles.captureButton}
|
|
48
|
+
onPress={takePhoto}
|
|
49
|
+
activeOpacity={0.7}
|
|
50
|
+
/>
|
|
51
|
+
</View>
|
|
52
|
+
|
|
53
|
+
{loading && <Loader />}
|
|
54
|
+
</View>
|
|
55
|
+
);
|
|
56
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { View } from 'react-native';
|
|
3
|
+
import ThemedText from '../components/ui/ThemedText';
|
|
4
|
+
import getStyles from '../styles/ThankYouStyles';
|
|
5
|
+
import { useTheme } from '../context/ThemeContext';
|
|
6
|
+
import { useOrientation } from '../hooks/useOrientation';
|
|
7
|
+
|
|
8
|
+
export default function ThankYou() {
|
|
9
|
+
const { theme } = useTheme();
|
|
10
|
+
const orientation = useOrientation();
|
|
11
|
+
const styles = getStyles(theme, orientation);
|
|
12
|
+
|
|
13
|
+
return (
|
|
14
|
+
<View style={styles.container}>
|
|
15
|
+
<ThemedText style={styles.maintitle} type="title">
|
|
16
|
+
Thank You!
|
|
17
|
+
</ThemedText>
|
|
18
|
+
<ThemedText style={styles.subtitle} type="title">
|
|
19
|
+
Your information{'\n'}has been uploaded
|
|
20
|
+
</ThemedText>
|
|
21
|
+
</View>
|
|
22
|
+
);
|
|
23
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { useNavigation } from '@react-navigation/native';
|
|
3
|
+
import { Text, ScrollView, View } from 'react-native';
|
|
4
|
+
import { NativeStackNavigationProp } from '@react-navigation/native-stack';
|
|
5
|
+
import Button from '../components/ui/Button';
|
|
6
|
+
import ThemedText from '../components/ui/ThemedText';
|
|
7
|
+
import getStyles from '../styles/VerifyIdentityStyles';
|
|
8
|
+
import { useTheme } from '../context/ThemeContext';
|
|
9
|
+
import { useOrientation } from '../hooks/useOrientation';
|
|
10
|
+
|
|
11
|
+
type NavigationProp = NativeStackNavigationProp<any, 'VerifyIdentity'>;
|
|
12
|
+
|
|
13
|
+
export default function VerifyIdentity() {
|
|
14
|
+
const { theme } = useTheme();
|
|
15
|
+
const orientation = useOrientation();
|
|
16
|
+
const styles = getStyles(theme, orientation);
|
|
17
|
+
const navigation = useNavigation<NavigationProp>();
|
|
18
|
+
|
|
19
|
+
return (
|
|
20
|
+
<ScrollView contentContainerStyle={styles.container}>
|
|
21
|
+
<ThemedText style={styles.maintitle} type="title">
|
|
22
|
+
Verify your Identity
|
|
23
|
+
</ThemedText>
|
|
24
|
+
<Text style={styles.subtitle}>it will only take a few seconds</Text>
|
|
25
|
+
|
|
26
|
+
<View style={styles.list}>
|
|
27
|
+
<View style={styles.listItem}>
|
|
28
|
+
<View style={styles.numberCircle}>
|
|
29
|
+
<Text style={styles.numberText}>1</Text>
|
|
30
|
+
</View>
|
|
31
|
+
<Text style={styles.listText}>Take a Selfie</Text>
|
|
32
|
+
</View>
|
|
33
|
+
|
|
34
|
+
{orientation === 'portrait' && <View style={styles.saprater} />}
|
|
35
|
+
|
|
36
|
+
<View style={styles.listItem}>
|
|
37
|
+
<View style={styles.numberCircle}>
|
|
38
|
+
<Text style={styles.numberText}>2</Text>
|
|
39
|
+
</View>
|
|
40
|
+
<Text style={styles.listText}>Scan your ID</Text>
|
|
41
|
+
</View>
|
|
42
|
+
</View>
|
|
43
|
+
|
|
44
|
+
<Text style={styles.subtitle}>Camera and GPS Permission required</Text>
|
|
45
|
+
|
|
46
|
+
<Button
|
|
47
|
+
title="Let's Verify"
|
|
48
|
+
style={styles.buttonplace}
|
|
49
|
+
textStyle={styles.button}
|
|
50
|
+
onPress={() => navigation.navigate('SelfieAdvice' as never)}
|
|
51
|
+
/>
|
|
52
|
+
</ScrollView>
|
|
53
|
+
);
|
|
54
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export { default as VerifyIdentity } from './VerifyIdentity';
|
|
2
|
+
export { default as MrzCapture } from './MrzCapture';
|
|
3
|
+
export { default as BarcodeCapture } from './BarcodeCapture';
|
|
4
|
+
export { default as FrontDocumentAdvice } from './FrontDocumentAdvice';
|
|
5
|
+
export { default as BackDocumentAdvice } from './BackDocumentAdvice';
|
|
6
|
+
export { default as BarcodeAdvice } from './BarcodeAdvice';
|
|
7
|
+
export { default as DocumentCaptureFront } from './DocumentCaptureFront';
|
|
8
|
+
export { default as DocumentCaptureBack } from './DocumentCaptureBack';
|
|
9
|
+
export { default as SelectDocuments } from './SelectDocuments';
|
|
10
|
+
export { default as SelfieAdvice } from './SelfieAdvice';
|
|
11
|
+
export { default as SelfieCapture } from './SelfieCapture';
|
|
12
|
+
export { default as ThankYou } from './ThankYou';
|
|
13
|
+
export { default as RetakeSelfie } from './RetakeSelfie';
|
|
14
|
+
export { default as LocationPermission } from './LocationPermission';
|
|
15
|
+
export { default as CameraPermission } from './CameraPermission';
|
|
16
|
+
export { default as NoCameraFound } from './NoCameraFound';
|
|
17
|
+
export { default as MrzAdvice } from './MrzAdvice';
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { StyleSheet } from 'react-native';
|
|
2
|
+
import { Theme } from '../types';
|
|
3
|
+
import { Orientation } from '../hooks/useOrientation';
|
|
4
|
+
|
|
5
|
+
export default (theme: Theme, orientation: Orientation) => {
|
|
6
|
+
const isPortrait = orientation === 'portrait';
|
|
7
|
+
|
|
8
|
+
return StyleSheet.create({
|
|
9
|
+
container: {
|
|
10
|
+
flexGrow: 1,
|
|
11
|
+
backgroundColor: theme.colors.background,
|
|
12
|
+
alignItems: 'center',
|
|
13
|
+
paddingHorizontal: 20,
|
|
14
|
+
paddingTop: isPortrait ? 40 : 20,
|
|
15
|
+
},
|
|
16
|
+
maintitle: {
|
|
17
|
+
textAlign: 'center',
|
|
18
|
+
fontWeight: '300',
|
|
19
|
+
marginBottom: isPortrait ? 30 : 15,
|
|
20
|
+
color: theme.colors.text,
|
|
21
|
+
},
|
|
22
|
+
idcard: {
|
|
23
|
+
marginTop: isPortrait ? 20 : 10,
|
|
24
|
+
marginBottom: 0,
|
|
25
|
+
width: isPortrait ? 300 : 200,
|
|
26
|
+
height: isPortrait ? 200 : 150,
|
|
27
|
+
},
|
|
28
|
+
buttonplace: {
|
|
29
|
+
position: 'absolute',
|
|
30
|
+
bottom: isPortrait ? 80 : 20,
|
|
31
|
+
justifyContent: 'center',
|
|
32
|
+
alignItems: 'center',
|
|
33
|
+
},
|
|
34
|
+
button: {
|
|
35
|
+
backgroundColor: theme.colors.buttonBackground,
|
|
36
|
+
color: theme.colors.buttonText,
|
|
37
|
+
fontSize: 16,
|
|
38
|
+
fontWeight: 'bold',
|
|
39
|
+
paddingVertical: 6,
|
|
40
|
+
paddingHorizontal: 15,
|
|
41
|
+
borderRadius: 5,
|
|
42
|
+
textAlign: 'center',
|
|
43
|
+
},
|
|
44
|
+
});
|
|
45
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { StyleSheet } from 'react-native';
|
|
2
|
+
import { Theme } from '../types';
|
|
3
|
+
import { Orientation } from '../hooks/useOrientation';
|
|
4
|
+
|
|
5
|
+
export default (theme: Theme, orientation: Orientation) => {
|
|
6
|
+
const isPortrait = orientation === 'portrait';
|
|
7
|
+
return StyleSheet.create({
|
|
8
|
+
container: {
|
|
9
|
+
flexGrow: 1,
|
|
10
|
+
backgroundColor: theme.colors.background,
|
|
11
|
+
alignItems: 'center',
|
|
12
|
+
paddingHorizontal: 20,
|
|
13
|
+
paddingTop: isPortrait ? 40 : 20,
|
|
14
|
+
},
|
|
15
|
+
maintitle: {
|
|
16
|
+
textAlign: 'center',
|
|
17
|
+
fontWeight: '300',
|
|
18
|
+
marginBottom: isPortrait ? 30 : 15,
|
|
19
|
+
color: theme.colors.text,
|
|
20
|
+
},
|
|
21
|
+
idcard: {
|
|
22
|
+
marginTop: isPortrait ? 20 : 10,
|
|
23
|
+
marginBottom: 0,
|
|
24
|
+
width: isPortrait ? 300 : 200,
|
|
25
|
+
height: isPortrait ? 200 : 150,
|
|
26
|
+
},
|
|
27
|
+
buttonplace: {
|
|
28
|
+
position: 'absolute',
|
|
29
|
+
bottom: isPortrait ? 80 : 20,
|
|
30
|
+
justifyContent: 'center',
|
|
31
|
+
alignItems: 'center',
|
|
32
|
+
},
|
|
33
|
+
button: {
|
|
34
|
+
backgroundColor: theme.colors.buttonBackground,
|
|
35
|
+
color: theme.colors.buttonText,
|
|
36
|
+
fontSize: 16,
|
|
37
|
+
fontWeight: 'bold',
|
|
38
|
+
paddingVertical: 6,
|
|
39
|
+
paddingHorizontal: 15,
|
|
40
|
+
borderRadius: 5,
|
|
41
|
+
textAlign: 'center',
|
|
42
|
+
},
|
|
43
|
+
});
|
|
44
|
+
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { StyleSheet } from 'react-native';
|
|
2
|
+
import { Theme } from '../types';
|
|
3
|
+
import { Orientation } from '../hooks/useOrientation';
|
|
4
|
+
|
|
5
|
+
export default (theme: Theme, orientation: Orientation) => {
|
|
6
|
+
const isPortrait = orientation === 'portrait';
|
|
7
|
+
|
|
8
|
+
return StyleSheet.create({
|
|
9
|
+
container: {
|
|
10
|
+
flex: 1,
|
|
11
|
+
justifyContent: 'center',
|
|
12
|
+
backgroundColor: '#000',
|
|
13
|
+
},
|
|
14
|
+
topLabel: {
|
|
15
|
+
position: 'absolute',
|
|
16
|
+
top: isPortrait ? 60 : 30,
|
|
17
|
+
alignSelf: 'center',
|
|
18
|
+
color: '#fff',
|
|
19
|
+
fontSize: 18,
|
|
20
|
+
fontWeight: 'bold',
|
|
21
|
+
zIndex: 10,
|
|
22
|
+
},
|
|
23
|
+
bottomLabel: {
|
|
24
|
+
position: 'absolute',
|
|
25
|
+
bottom: isPortrait ? 150 : 100,
|
|
26
|
+
alignSelf: 'center',
|
|
27
|
+
color: '#fff',
|
|
28
|
+
fontSize: 14,
|
|
29
|
+
textAlign: 'center',
|
|
30
|
+
paddingHorizontal: 20,
|
|
31
|
+
zIndex: 10,
|
|
32
|
+
},
|
|
33
|
+
cardoverlay: {
|
|
34
|
+
position: 'absolute',
|
|
35
|
+
width: '80%',
|
|
36
|
+
height: '40%',
|
|
37
|
+
alignSelf: 'center',
|
|
38
|
+
top: '30%',
|
|
39
|
+
},
|
|
40
|
+
buttonplace: {
|
|
41
|
+
position: 'absolute',
|
|
42
|
+
bottom: isPortrait ? 50 : 20,
|
|
43
|
+
alignSelf: 'center',
|
|
44
|
+
zIndex: 10,
|
|
45
|
+
},
|
|
46
|
+
captureButton: {
|
|
47
|
+
width: 70,
|
|
48
|
+
height: 70,
|
|
49
|
+
backgroundColor: 'white',
|
|
50
|
+
borderRadius: 35,
|
|
51
|
+
borderWidth: 4,
|
|
52
|
+
borderColor: '#ccc',
|
|
53
|
+
},
|
|
54
|
+
});
|
|
55
|
+
};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { StyleSheet } from 'react-native';
|
|
2
|
+
import { Theme } from '../types';
|
|
3
|
+
import { Orientation } from '../hooks/useOrientation';
|
|
4
|
+
|
|
5
|
+
export default (theme: Theme, orientation: Orientation) => {
|
|
6
|
+
const isPortrait = orientation === 'portrait';
|
|
7
|
+
|
|
8
|
+
return StyleSheet.create({
|
|
9
|
+
container: {
|
|
10
|
+
flexGrow: 1,
|
|
11
|
+
backgroundColor: theme.colors.background,
|
|
12
|
+
alignItems: 'center',
|
|
13
|
+
paddingHorizontal: 20,
|
|
14
|
+
paddingTop: isPortrait ? 40 : 20,
|
|
15
|
+
},
|
|
16
|
+
logo: {
|
|
17
|
+
width: 150,
|
|
18
|
+
height: 50,
|
|
19
|
+
marginBottom: 20,
|
|
20
|
+
},
|
|
21
|
+
maintitle: {
|
|
22
|
+
textAlign: 'center',
|
|
23
|
+
fontWeight: '300',
|
|
24
|
+
marginBottom: 0,
|
|
25
|
+
color: theme.colors.text,
|
|
26
|
+
},
|
|
27
|
+
selfie: {
|
|
28
|
+
marginLeft: -20,
|
|
29
|
+
marginTop: isPortrait ? 20 : 10,
|
|
30
|
+
marginBottom: 0,
|
|
31
|
+
width: isPortrait ? 200 : 150,
|
|
32
|
+
height: isPortrait ? 200 : 150,
|
|
33
|
+
},
|
|
34
|
+
text: {
|
|
35
|
+
fontSize: 16,
|
|
36
|
+
color: theme.colors.text,
|
|
37
|
+
},
|
|
38
|
+
permissionText: {
|
|
39
|
+
fontSize: 16,
|
|
40
|
+
textAlign: 'center',
|
|
41
|
+
marginBottom: 30,
|
|
42
|
+
color: theme.colors.text,
|
|
43
|
+
},
|
|
44
|
+
buttonplace: {
|
|
45
|
+
position: 'absolute',
|
|
46
|
+
bottom: isPortrait ? 80 : 20,
|
|
47
|
+
justifyContent: 'center',
|
|
48
|
+
alignItems: 'center',
|
|
49
|
+
},
|
|
50
|
+
button: {
|
|
51
|
+
backgroundColor: theme.colors.buttonBackground,
|
|
52
|
+
color: theme.colors.buttonText,
|
|
53
|
+
fontSize: 16,
|
|
54
|
+
fontWeight: 'bold',
|
|
55
|
+
paddingVertical: 0,
|
|
56
|
+
paddingHorizontal: 15,
|
|
57
|
+
borderRadius: 5,
|
|
58
|
+
textAlign: 'center',
|
|
59
|
+
},
|
|
60
|
+
});
|
|
61
|
+
};
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { StyleSheet } from 'react-native';
|
|
2
|
+
import { Theme } from '../types';
|
|
3
|
+
import { Orientation } from '../hooks/useOrientation';
|
|
4
|
+
|
|
5
|
+
export default (theme: Theme, orientation: Orientation) => {
|
|
6
|
+
const isPortrait = orientation === 'portrait';
|
|
7
|
+
|
|
8
|
+
return StyleSheet.create({
|
|
9
|
+
container: {
|
|
10
|
+
flexGrow: 1,
|
|
11
|
+
backgroundColor: theme.colors.background,
|
|
12
|
+
alignItems: 'center',
|
|
13
|
+
paddingHorizontal: 20,
|
|
14
|
+
paddingTop: isPortrait ? 40 : 20,
|
|
15
|
+
},
|
|
16
|
+
title: {
|
|
17
|
+
fontSize: 22,
|
|
18
|
+
fontWeight: 'bold',
|
|
19
|
+
color: theme.colors.text,
|
|
20
|
+
textAlign: 'center',
|
|
21
|
+
marginBottom: 10,
|
|
22
|
+
},
|
|
23
|
+
subtitle: {
|
|
24
|
+
fontSize: 18,
|
|
25
|
+
color: theme.colors.subtitle,
|
|
26
|
+
textAlign: 'center',
|
|
27
|
+
marginBottom: 20,
|
|
28
|
+
},
|
|
29
|
+
errorMessage: {
|
|
30
|
+
fontSize: 14,
|
|
31
|
+
color: '#d32f2f',
|
|
32
|
+
textAlign: 'center',
|
|
33
|
+
marginBottom: 30,
|
|
34
|
+
paddingHorizontal: 20,
|
|
35
|
+
},
|
|
36
|
+
guideTitle: {
|
|
37
|
+
fontSize: 18,
|
|
38
|
+
fontWeight: 'bold',
|
|
39
|
+
color: theme.colors.text,
|
|
40
|
+
marginBottom: 15,
|
|
41
|
+
},
|
|
42
|
+
guideList: {
|
|
43
|
+
marginBottom: 30,
|
|
44
|
+
},
|
|
45
|
+
bullet: {
|
|
46
|
+
fontSize: 16,
|
|
47
|
+
color: theme.colors.text,
|
|
48
|
+
marginBottom: 10,
|
|
49
|
+
},
|
|
50
|
+
buttonplace: {
|
|
51
|
+
position: 'absolute',
|
|
52
|
+
bottom: isPortrait ? 80 : 20,
|
|
53
|
+
justifyContent: 'center',
|
|
54
|
+
alignItems: 'center',
|
|
55
|
+
},
|
|
56
|
+
button: {
|
|
57
|
+
backgroundColor: theme.colors.buttonBackground,
|
|
58
|
+
color: theme.colors.buttonText,
|
|
59
|
+
fontSize: 16,
|
|
60
|
+
fontWeight: 'bold',
|
|
61
|
+
paddingVertical: 6,
|
|
62
|
+
paddingHorizontal: 15,
|
|
63
|
+
borderRadius: 5,
|
|
64
|
+
textAlign: 'center',
|
|
65
|
+
},
|
|
66
|
+
});
|
|
67
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { StyleSheet } from 'react-native';
|
|
2
|
+
import { Theme } from '../types';
|
|
3
|
+
import { Orientation } from '../hooks/useOrientation';
|
|
4
|
+
|
|
5
|
+
export default (theme: Theme, orientation: Orientation) => {
|
|
6
|
+
const isPortrait = orientation === 'portrait';
|
|
7
|
+
|
|
8
|
+
return StyleSheet.create({
|
|
9
|
+
container: {
|
|
10
|
+
flex: 1,
|
|
11
|
+
backgroundColor: '#000',
|
|
12
|
+
},
|
|
13
|
+
camera: {
|
|
14
|
+
flex: 1,
|
|
15
|
+
},
|
|
16
|
+
topLabel: {
|
|
17
|
+
position: 'absolute',
|
|
18
|
+
top: isPortrait ? 60 : 30,
|
|
19
|
+
alignSelf: 'center',
|
|
20
|
+
color: '#fff',
|
|
21
|
+
fontSize: 18,
|
|
22
|
+
fontWeight: 'bold',
|
|
23
|
+
zIndex: 10,
|
|
24
|
+
textAlign: 'center',
|
|
25
|
+
paddingHorizontal: 20,
|
|
26
|
+
},
|
|
27
|
+
});
|
|
28
|
+
};
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { StyleSheet } from 'react-native';
|
|
2
|
+
import { Theme } from '../types';
|
|
3
|
+
import { Orientation } from '../hooks/useOrientation';
|
|
4
|
+
|
|
5
|
+
export default (theme: Theme, orientation: Orientation) => {
|
|
6
|
+
const isPortrait = orientation === 'portrait';
|
|
7
|
+
|
|
8
|
+
return StyleSheet.create({
|
|
9
|
+
container: {
|
|
10
|
+
flex: 1,
|
|
11
|
+
backgroundColor: theme.colors.background,
|
|
12
|
+
alignItems: 'center',
|
|
13
|
+
paddingHorizontal: 20,
|
|
14
|
+
paddingTop: isPortrait ? 60 : 20,
|
|
15
|
+
},
|
|
16
|
+
maintitle: {
|
|
17
|
+
textAlign: 'center',
|
|
18
|
+
fontWeight: '300',
|
|
19
|
+
marginBottom: 15,
|
|
20
|
+
color: theme.colors.text,
|
|
21
|
+
},
|
|
22
|
+
dropdownTrigger: {
|
|
23
|
+
marginBottom: 35,
|
|
24
|
+
width: 250,
|
|
25
|
+
borderWidth: 1,
|
|
26
|
+
borderColor: '#ccc',
|
|
27
|
+
borderRadius: 8,
|
|
28
|
+
padding: 12,
|
|
29
|
+
flexDirection: 'row',
|
|
30
|
+
justifyContent: 'space-between',
|
|
31
|
+
alignItems: 'center',
|
|
32
|
+
backgroundColor: theme.colors.background,
|
|
33
|
+
},
|
|
34
|
+
dropdownList: {
|
|
35
|
+
width: 250,
|
|
36
|
+
position: 'absolute',
|
|
37
|
+
top: 50,
|
|
38
|
+
zIndex: 1000,
|
|
39
|
+
backgroundColor: theme.colors.background,
|
|
40
|
+
borderWidth: 1,
|
|
41
|
+
borderColor: '#ccc',
|
|
42
|
+
borderRadius: 8,
|
|
43
|
+
maxHeight: 180,
|
|
44
|
+
elevation: 5,
|
|
45
|
+
shadowColor: '#000',
|
|
46
|
+
shadowOffset: { width: 0, height: 2 },
|
|
47
|
+
shadowOpacity: 0.2,
|
|
48
|
+
shadowRadius: 4,
|
|
49
|
+
},
|
|
50
|
+
downArrow: {
|
|
51
|
+
color: theme.colors.text,
|
|
52
|
+
},
|
|
53
|
+
dopDownLable: {
|
|
54
|
+
color: theme.colors.text,
|
|
55
|
+
},
|
|
56
|
+
dropdownItem: {
|
|
57
|
+
padding: 12,
|
|
58
|
+
borderBottomWidth: 1,
|
|
59
|
+
borderBottomColor: '#eee',
|
|
60
|
+
},
|
|
61
|
+
sapraterLine: {
|
|
62
|
+
width: '120%',
|
|
63
|
+
height: 1,
|
|
64
|
+
backgroundColor: '#ccc',
|
|
65
|
+
marginBottom: 25,
|
|
66
|
+
},
|
|
67
|
+
buttonplace: {
|
|
68
|
+
position: 'absolute',
|
|
69
|
+
bottom: isPortrait ? 80 : 20,
|
|
70
|
+
justifyContent: 'center',
|
|
71
|
+
alignItems: 'center',
|
|
72
|
+
},
|
|
73
|
+
button: {
|
|
74
|
+
backgroundColor: theme.colors.buttonBackground,
|
|
75
|
+
color: theme.colors.buttonText,
|
|
76
|
+
fontSize: 16,
|
|
77
|
+
fontWeight: 'bold',
|
|
78
|
+
paddingVertical: 6,
|
|
79
|
+
paddingHorizontal: 15,
|
|
80
|
+
borderRadius: 5,
|
|
81
|
+
textAlign: 'center',
|
|
82
|
+
},
|
|
83
|
+
searchbox: {
|
|
84
|
+
padding: 10,
|
|
85
|
+
borderBottomWidth: 1,
|
|
86
|
+
borderColor: '#ccc',
|
|
87
|
+
color: theme.colors.text,
|
|
88
|
+
},
|
|
89
|
+
});
|
|
90
|
+
};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { StyleSheet } from 'react-native';
|
|
2
|
+
import { Theme } from '../types';
|
|
3
|
+
import { Orientation } from '../hooks/useOrientation';
|
|
4
|
+
|
|
5
|
+
export default (theme: Theme, orientation: Orientation) => {
|
|
6
|
+
const isPortrait = orientation === 'portrait';
|
|
7
|
+
return StyleSheet.create({
|
|
8
|
+
container: {
|
|
9
|
+
flexGrow: 1,
|
|
10
|
+
backgroundColor: theme.colors.background,
|
|
11
|
+
alignItems: 'center',
|
|
12
|
+
paddingHorizontal: 20,
|
|
13
|
+
paddingTop: isPortrait ? 40 : 20,
|
|
14
|
+
},
|
|
15
|
+
logo: {
|
|
16
|
+
width: 150,
|
|
17
|
+
height: 50,
|
|
18
|
+
marginBottom: 20,
|
|
19
|
+
},
|
|
20
|
+
maintitle: {
|
|
21
|
+
textAlign: 'center',
|
|
22
|
+
fontWeight: '300',
|
|
23
|
+
marginBottom: 0,
|
|
24
|
+
color: theme.colors.text,
|
|
25
|
+
},
|
|
26
|
+
selfie: {
|
|
27
|
+
marginLeft: -20,
|
|
28
|
+
marginTop: isPortrait ? 5 : 5,
|
|
29
|
+
marginBottom: 0,
|
|
30
|
+
width: isPortrait ? 300 : 150,
|
|
31
|
+
height: isPortrait ? 300 : 150,
|
|
32
|
+
tintColor: theme.colors.text,
|
|
33
|
+
},
|
|
34
|
+
text: {
|
|
35
|
+
fontSize: 16,
|
|
36
|
+
color: theme.colors.text,
|
|
37
|
+
},
|
|
38
|
+
permissionText: {
|
|
39
|
+
fontSize: 16,
|
|
40
|
+
textAlign: 'center',
|
|
41
|
+
marginBottom: 30,
|
|
42
|
+
color: theme.colors.text,
|
|
43
|
+
},
|
|
44
|
+
buttonplace: {
|
|
45
|
+
position: 'absolute',
|
|
46
|
+
bottom: isPortrait ? 80 : 20,
|
|
47
|
+
justifyContent: 'center',
|
|
48
|
+
alignItems: 'center',
|
|
49
|
+
},
|
|
50
|
+
button: {
|
|
51
|
+
backgroundColor: theme.colors.buttonBackground,
|
|
52
|
+
color: theme.colors.buttonText,
|
|
53
|
+
fontSize: 16,
|
|
54
|
+
fontWeight: 'bold',
|
|
55
|
+
paddingVertical: 6,
|
|
56
|
+
paddingHorizontal: 15,
|
|
57
|
+
borderRadius: 5,
|
|
58
|
+
textAlign: 'center',
|
|
59
|
+
},
|
|
60
|
+
});
|
|
61
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { StyleSheet } from 'react-native';
|
|
2
|
+
import { Theme } from '../types';
|
|
3
|
+
import { Orientation } from '../hooks/useOrientation';
|
|
4
|
+
|
|
5
|
+
export default (theme: Theme, orientation: Orientation) => {
|
|
6
|
+
const isPortrait = orientation === 'portrait';
|
|
7
|
+
|
|
8
|
+
return StyleSheet.create({
|
|
9
|
+
container: {
|
|
10
|
+
flex: 1,
|
|
11
|
+
justifyContent: 'center',
|
|
12
|
+
backgroundColor: theme.colors.background,
|
|
13
|
+
},
|
|
14
|
+
button: {
|
|
15
|
+
width: 100,
|
|
16
|
+
height: 50,
|
|
17
|
+
},
|
|
18
|
+
cameraoverlay: {
|
|
19
|
+
position: 'absolute',
|
|
20
|
+
width: '100%',
|
|
21
|
+
height: '100%',
|
|
22
|
+
top: 0,
|
|
23
|
+
bottom: 0,
|
|
24
|
+
left: 0,
|
|
25
|
+
right: 0,
|
|
26
|
+
},
|
|
27
|
+
buttonplace: {
|
|
28
|
+
position: 'absolute',
|
|
29
|
+
bottom: isPortrait ? 50 : 20,
|
|
30
|
+
left: '50%',
|
|
31
|
+
marginLeft: -35,
|
|
32
|
+
},
|
|
33
|
+
captureButton: {
|
|
34
|
+
width: 70,
|
|
35
|
+
height: 70,
|
|
36
|
+
backgroundColor: 'white',
|
|
37
|
+
borderRadius: 35,
|
|
38
|
+
borderWidth: 4,
|
|
39
|
+
borderColor: '#ccc',
|
|
40
|
+
},
|
|
41
|
+
text: {
|
|
42
|
+
color: theme.colors.text,
|
|
43
|
+
fontSize: 16,
|
|
44
|
+
textAlign: 'center',
|
|
45
|
+
marginBottom: 20,
|
|
46
|
+
},
|
|
47
|
+
});
|
|
48
|
+
};
|