@finspringinnovations/fdsdk 0.0.1
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 +184 -0
- package/lib/api/applicationApi.d.ts +1 -0
- package/lib/api/applicationApi.js +11 -0
- package/lib/api/bankApi.d.ts +352 -0
- package/lib/api/bankApi.js +54 -0
- package/lib/api/baseApi.d.ts +8 -0
- package/lib/api/baseApi.js +456 -0
- package/lib/api/customerApi.d.ts +855 -0
- package/lib/api/customerApi.js +213 -0
- package/lib/api/fdApi.d.ts +979 -0
- package/lib/api/fdApi.js +112 -0
- package/lib/api/fdCalculatorApi.d.ts +179 -0
- package/lib/api/fdCalculatorApi.js +36 -0
- package/lib/api/index.d.ts +14 -0
- package/lib/api/index.js +45 -0
- package/lib/api/interestRateApi.d.ts +585 -0
- package/lib/api/interestRateApi.js +101 -0
- package/lib/api/kycApi.d.ts +486 -0
- package/lib/api/kycApi.js +71 -0
- package/lib/api/masterDataApi.d.ts +158 -0
- package/lib/api/masterDataApi.js +32 -0
- package/lib/api/nomineeApi.d.ts +325 -0
- package/lib/api/nomineeApi.js +46 -0
- package/lib/api/onboardingApi.d.ts +192 -0
- package/lib/api/onboardingApi.js +41 -0
- package/lib/api/panApi.d.ts +0 -0
- package/lib/api/panApi.js +23 -0
- package/lib/api/paymentApi.d.ts +325 -0
- package/lib/api/paymentApi.js +46 -0
- package/lib/api/workflowApi.d.ts +654 -0
- package/lib/api/workflowApi.js +90 -0
- package/lib/assets/images/images.d.ts +4 -0
- package/lib/assets/images/images.js +10 -0
- package/lib/components/AadhaarInput.d.ts +13 -0
- package/lib/components/AadhaarInput.js +47 -0
- package/lib/components/ActionButton.d.ts +12 -0
- package/lib/components/ActionButton.js +87 -0
- package/lib/components/ActiveFDCard.d.ts +16 -0
- package/lib/components/ActiveFDCard.js +95 -0
- package/lib/components/AmountInput.d.ts +20 -0
- package/lib/components/AmountInput.js +144 -0
- package/lib/components/CheckboxOption.d.ts +11 -0
- package/lib/components/CheckboxOption.js +41 -0
- package/lib/components/CompanyHeader.d.ts +7 -0
- package/lib/components/CompanyHeader.js +57 -0
- package/lib/components/DropdownSelector.d.ts +9 -0
- package/lib/components/DropdownSelector.js +49 -0
- package/lib/components/EmptyState.d.ts +17 -0
- package/lib/components/EmptyState.js +44 -0
- package/lib/components/ErrorDisplay.d.ts +17 -0
- package/lib/components/ErrorDisplay.js +69 -0
- package/lib/components/FAQItem.d.ts +9 -0
- package/lib/components/FAQItem.js +52 -0
- package/lib/components/FDCard.d.ts +21 -0
- package/lib/components/FDCard.js +96 -0
- package/lib/components/FormDropdown.d.ts +18 -0
- package/lib/components/FormDropdown.js +155 -0
- package/lib/components/FormSection.d.ts +14 -0
- package/lib/components/FormSection.js +38 -0
- package/lib/components/Header.d.ts +14 -0
- package/lib/components/Header.js +52 -0
- package/lib/components/IFSCSearchResultCard.d.ts +13 -0
- package/lib/components/IFSCSearchResultCard.js +70 -0
- package/lib/components/InfoBox.d.ts +8 -0
- package/lib/components/InfoBox.js +39 -0
- package/lib/components/InterestRateCard.d.ts +8 -0
- package/lib/components/InterestRateCard.js +46 -0
- package/lib/components/LoadingIndicator.d.ts +12 -0
- package/lib/components/LoadingIndicator.js +30 -0
- package/lib/components/OTPInput.d.ts +17 -0
- package/lib/components/OTPInput.js +144 -0
- package/lib/components/PaymentDetailsCard.d.ts +20 -0
- package/lib/components/PaymentDetailsCard.js +68 -0
- package/lib/components/PendingFDBottomSheet.d.ts +18 -0
- package/lib/components/PendingFDBottomSheet.js +122 -0
- package/lib/components/SafeAreaWrapper.d.ts +13 -0
- package/lib/components/SafeAreaWrapper.js +41 -0
- package/lib/components/ScreenHeader.d.ts +11 -0
- package/lib/components/ScreenHeader.js +46 -0
- package/lib/components/StatusDisplay.d.ts +15 -0
- package/lib/components/StatusDisplay.js +88 -0
- package/lib/components/TextFieldWithLabel.d.ts +46 -0
- package/lib/components/TextFieldWithLabel.js +326 -0
- package/lib/components/TrustBox.d.ts +8 -0
- package/lib/components/TrustBox.js +45 -0
- package/lib/components/ValidationErrorAlert.d.ts +23 -0
- package/lib/components/ValidationErrorAlert.js +39 -0
- package/lib/components/ValidationMessage.d.ts +9 -0
- package/lib/components/ValidationMessage.js +98 -0
- package/lib/components/index.d.ts +35 -0
- package/lib/components/index.js +64 -0
- package/lib/config/apiConfig.d.ts +34 -0
- package/lib/config/apiConfig.js +158 -0
- package/lib/config/appDataConfig.d.ts +114 -0
- package/lib/config/appDataConfig.js +264 -0
- package/lib/config/encryptionConfig.d.ts +21 -0
- package/lib/config/encryptionConfig.js +61 -0
- package/lib/config/workflowConstants.d.ts +37 -0
- package/lib/config/workflowConstants.js +38 -0
- package/lib/constants/strings/bank.d.ts +72 -0
- package/lib/constants/strings/bank.js +86 -0
- package/lib/constants/strings/base64Images.d.ts +25 -0
- package/lib/constants/strings/base64Images.js +28 -0
- package/lib/constants/strings/common.d.ts +53 -0
- package/lib/constants/strings/common.js +62 -0
- package/lib/constants/strings/employee.d.ts +61 -0
- package/lib/constants/strings/employee.js +77 -0
- package/lib/constants/strings/faq.d.ts +14 -0
- package/lib/constants/strings/faq.js +20 -0
- package/lib/constants/strings/fd.d.ts +122 -0
- package/lib/constants/strings/fd.js +151 -0
- package/lib/constants/strings/home.d.ts +49 -0
- package/lib/constants/strings/home.js +62 -0
- package/lib/constants/strings/index.d.ts +16 -0
- package/lib/constants/strings/index.js +44 -0
- package/lib/constants/strings/kyc.d.ts +80 -0
- package/lib/constants/strings/kyc.js +94 -0
- package/lib/constants/strings/nominee.d.ts +64 -0
- package/lib/constants/strings/nominee.js +81 -0
- package/lib/hooks/useAuth.d.ts +25 -0
- package/lib/hooks/useAuth.js +39 -0
- package/lib/hooks/useFDData.d.ts +11 -0
- package/lib/hooks/useFDData.js +40 -0
- package/lib/index.d.ts +69 -0
- package/lib/index.js +182 -0
- package/lib/navigation/RootNavigator.d.ts +8 -0
- package/lib/navigation/RootNavigator.js +205 -0
- package/lib/navigation/SimpleNavigator.d.ts +11 -0
- package/lib/navigation/SimpleNavigator.js +107 -0
- package/lib/navigation/helpers.d.ts +11 -0
- package/lib/navigation/helpers.js +83 -0
- package/lib/navigation/index.d.ts +15 -0
- package/lib/navigation/index.js +42 -0
- package/lib/navigation/types.d.ts +113 -0
- package/lib/navigation/types.js +2 -0
- package/lib/navigation/workflowNavigator.d.ts +22 -0
- package/lib/navigation/workflowNavigator.js +104 -0
- package/lib/providers/ApiProvider.d.ts +7 -0
- package/lib/providers/ApiProvider.js +34 -0
- package/lib/providers/MasterDataProvider.d.ts +10 -0
- package/lib/providers/MasterDataProvider.js +54 -0
- package/lib/screens/AadhaarVerification.d.ts +7 -0
- package/lib/screens/AadhaarVerification.js +627 -0
- package/lib/screens/AddBankAccount.d.ts +22 -0
- package/lib/screens/AddBankAccount.js +381 -0
- package/lib/screens/BankDetail.d.ts +16 -0
- package/lib/screens/BankDetail.js +596 -0
- package/lib/screens/BookFD.d.ts +0 -0
- package/lib/screens/BookFD.js +315 -0
- package/lib/screens/Employee.d.ts +18 -0
- package/lib/screens/Employee.js +594 -0
- package/lib/screens/FDCalculator.d.ts +18 -0
- package/lib/screens/FDCalculator.js +759 -0
- package/lib/screens/FDList.d.ts +27 -0
- package/lib/screens/FDList.js +1008 -0
- package/lib/screens/FindIFSC.d.ts +16 -0
- package/lib/screens/FindIFSC.js +248 -0
- package/lib/screens/Home.d.ts +0 -0
- package/lib/screens/Home.js +143 -0
- package/lib/screens/NomineeDetail.d.ts +17 -0
- package/lib/screens/NomineeDetail.js +592 -0
- package/lib/screens/PayNow.d.ts +14 -0
- package/lib/screens/PayNow.js +230 -0
- package/lib/screens/Payment.d.ts +11 -0
- package/lib/screens/Payment.js +191 -0
- package/lib/screens/PaymentStatus.d.ts +16 -0
- package/lib/screens/PaymentStatus.js +397 -0
- package/lib/screens/ReviewKYC.d.ts +21 -0
- package/lib/screens/ReviewKYC.js +660 -0
- package/lib/state/paymentSession.d.ts +8 -0
- package/lib/state/paymentSession.js +13 -0
- package/lib/store/fdListSelectedSlice.d.ts +21 -0
- package/lib/store/fdListSelectedSlice.js +26 -0
- package/lib/store/hooks.d.ts +8 -0
- package/lib/store/hooks.js +31 -0
- package/lib/store/index.d.ts +3 -0
- package/lib/store/index.js +8 -0
- package/lib/store/onboardingSlice.d.ts +12 -0
- package/lib/store/onboardingSlice.js +32 -0
- package/lib/store/store.d.ts +13 -0
- package/lib/store/store.js +33 -0
- package/lib/theme/ThemeContext.d.ts +210 -0
- package/lib/theme/ThemeContext.js +90 -0
- package/lib/theme/colors.d.ts +80 -0
- package/lib/theme/colors.js +85 -0
- package/lib/theme/index.d.ts +34 -0
- package/lib/theme/index.js +69 -0
- package/lib/theme/shadows.d.ts +53 -0
- package/lib/theme/shadows.js +58 -0
- package/lib/theme/typography.d.ts +134 -0
- package/lib/theme/typography.js +143 -0
- package/lib/types/dataTypes.d.ts +34 -0
- package/lib/types/dataTypes.js +2 -0
- package/lib/types/workflowTypes.d.ts +2 -0
- package/lib/types/workflowTypes.js +2 -0
- package/lib/utils/apiLogger.d.ts +48 -0
- package/lib/utils/apiLogger.js +105 -0
- package/lib/utils/encryption.d.ts +28 -0
- package/lib/utils/encryption.js +113 -0
- package/lib/utils/getFDData.d.ts +48 -0
- package/lib/utils/getFDData.js +154 -0
- package/lib/utils/globalData.d.ts +2 -0
- package/lib/utils/globalData.js +10 -0
- package/package.json +76 -0
- package/src/api/applicationApi.ts +12 -0
- package/src/api/bankApi.ts +42 -0
- package/src/api/baseApi.ts +513 -0
- package/src/api/customerApi.ts +291 -0
- package/src/api/fdApi.ts +150 -0
- package/src/api/fdCalculatorApi.ts +41 -0
- package/src/api/index.ts +29 -0
- package/src/api/interestRateApi.ts +143 -0
- package/src/api/kycApi.ts +63 -0
- package/src/api/masterDataApi.ts +34 -0
- package/src/api/nomineeApi.ts +34 -0
- package/src/api/onboardingApi.ts +64 -0
- package/src/api/panApi.ts +25 -0
- package/src/api/paymentApi.ts +34 -0
- package/src/api/workflowApi.ts +94 -0
- package/src/assets/images/arrow-filled.png +0 -0
- package/src/assets/images/arrow-left.png +0 -0
- package/src/assets/images/backicon.png +0 -0
- package/src/assets/images/calendar.png +0 -0
- package/src/assets/images/chevron-down.png +0 -0
- package/src/assets/images/chevron-down@2x.png +0 -0
- package/src/assets/images/chevron-down@3x.png +0 -0
- package/src/assets/images/images.js +8 -0
- package/src/components/AadhaarInput.tsx +91 -0
- package/src/components/ActionButton.tsx +129 -0
- package/src/components/ActiveFDCard.tsx +158 -0
- package/src/components/AmountInput.tsx +217 -0
- package/src/components/CheckboxOption.tsx +93 -0
- package/src/components/CompanyHeader.tsx +78 -0
- package/src/components/DropdownSelector.tsx +77 -0
- package/src/components/EmptyState.tsx +109 -0
- package/src/components/ErrorDisplay.tsx +135 -0
- package/src/components/FAQItem.tsx +90 -0
- package/src/components/FDCard.tsx +165 -0
- package/src/components/FormDropdown.tsx +214 -0
- package/src/components/FormSection.tsx +86 -0
- package/src/components/Header.tsx +110 -0
- package/src/components/IFSCSearchResultCard.tsx +139 -0
- package/src/components/InfoBox.tsx +55 -0
- package/src/components/InterestRateCard.tsx +77 -0
- package/src/components/LoadingIndicator.tsx +63 -0
- package/src/components/OTPInput.tsx +213 -0
- package/src/components/PaymentDetailsCard.tsx +120 -0
- package/src/components/PendingFDBottomSheet.tsx +235 -0
- package/src/components/README.md +210 -0
- package/src/components/SafeAreaWrapper.tsx +68 -0
- package/src/components/ScreenHeader.tsx +83 -0
- package/src/components/StatusDisplay.tsx +139 -0
- package/src/components/TextFieldWithLabel.tsx +502 -0
- package/src/components/TrustBox.tsx +63 -0
- package/src/components/ValidationErrorAlert.tsx +57 -0
- package/src/components/ValidationMessage.tsx +134 -0
- package/src/components/index.tsx +47 -0
- package/src/config/apiConfig.ts +217 -0
- package/src/config/appDataConfig.ts +279 -0
- package/src/config/encryptionConfig.ts +65 -0
- package/src/config/workflowConstants.ts +43 -0
- package/src/constants/strings/README.md +146 -0
- package/src/constants/strings/bank.ts +92 -0
- package/src/constants/strings/base64Images.ts +29 -0
- package/src/constants/strings/common.ts +63 -0
- package/src/constants/strings/employee.ts +85 -0
- package/src/constants/strings/faq.ts +23 -0
- package/src/constants/strings/fd.ts +172 -0
- package/src/constants/strings/home.ts +67 -0
- package/src/constants/strings/index.ts +21 -0
- package/src/constants/strings/kyc.ts +100 -0
- package/src/constants/strings/nominee.ts +90 -0
- package/src/hooks/useAuth.ts +42 -0
- package/src/hooks/useFDData.ts +48 -0
- package/src/index.tsx +173 -0
- package/src/navigation/RootNavigator.tsx +352 -0
- package/src/navigation/SimpleNavigator.tsx +107 -0
- package/src/navigation/helpers.ts +85 -0
- package/src/navigation/index.tsx +81 -0
- package/src/navigation/types.ts +124 -0
- package/src/navigation/workflowNavigator.ts +131 -0
- package/src/providers/ApiProvider.tsx +43 -0
- package/src/providers/MasterDataProvider.tsx +30 -0
- package/src/screens/AadhaarVerification.tsx +809 -0
- package/src/screens/AddBankAccount.tsx +541 -0
- package/src/screens/BankDetail.tsx +826 -0
- package/src/screens/BookFD.tsx +330 -0
- package/src/screens/Employee.tsx +822 -0
- package/src/screens/FDCalculator.tsx +987 -0
- package/src/screens/FDList.tsx +1284 -0
- package/src/screens/FindIFSC.tsx +332 -0
- package/src/screens/Home.tsx +152 -0
- package/src/screens/NomineeDetail.tsx +800 -0
- package/src/screens/PayNow.tsx +282 -0
- package/src/screens/Payment.tsx +224 -0
- package/src/screens/PaymentStatus.tsx +561 -0
- package/src/screens/ReviewKYC.tsx +956 -0
- package/src/state/paymentSession.ts +13 -0
- package/src/store/fdListSelectedSlice.ts +42 -0
- package/src/store/hooks.ts +27 -0
- package/src/store/index.ts +3 -0
- package/src/store/onboardingSlice.ts +37 -0
- package/src/store/store.ts +35 -0
- package/src/theme/ThemeContext.tsx +82 -0
- package/src/theme/colors.ts +90 -0
- package/src/theme/index.ts +64 -0
- package/src/theme/shadows.ts +61 -0
- package/src/theme/typography.ts +151 -0
- package/src/types/dataTypes.ts +37 -0
- package/src/types/env.d.ts +93 -0
- package/src/types/workflowTypes.ts +12 -0
- package/src/utils/apiLogger.ts +166 -0
- package/src/utils/encryption.ts +159 -0
- package/src/utils/getFDData.ts +175 -0
- package/src/utils/globalData.ts +7 -0
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { View, Text, StyleSheet, TouchableOpacity } from 'react-native';
|
|
3
|
+
import Icon from 'react-native-vector-icons/Ionicons';
|
|
4
|
+
import { useColors, useTypography } from '../theme/ThemeContext';
|
|
5
|
+
|
|
6
|
+
export interface EmptyStateProps {
|
|
7
|
+
iconName?: string;
|
|
8
|
+
title: string;
|
|
9
|
+
subtitle?: string;
|
|
10
|
+
actionText?: string;
|
|
11
|
+
onAction?: () => void;
|
|
12
|
+
containerStyle?: object;
|
|
13
|
+
iconStyle?: object;
|
|
14
|
+
titleStyle?: object;
|
|
15
|
+
subtitleStyle?: object;
|
|
16
|
+
actionButtonStyle?: object;
|
|
17
|
+
actionTextStyle?: object;
|
|
18
|
+
showAction?: boolean;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const EmptyState: React.FC<EmptyStateProps> = ({
|
|
22
|
+
iconName = 'document-outline',
|
|
23
|
+
title,
|
|
24
|
+
subtitle,
|
|
25
|
+
actionText = 'Get Started',
|
|
26
|
+
onAction,
|
|
27
|
+
containerStyle,
|
|
28
|
+
iconStyle,
|
|
29
|
+
titleStyle,
|
|
30
|
+
subtitleStyle,
|
|
31
|
+
actionButtonStyle,
|
|
32
|
+
actionTextStyle,
|
|
33
|
+
showAction = true,
|
|
34
|
+
}) => {
|
|
35
|
+
const colors = useColors();
|
|
36
|
+
const typography = useTypography();
|
|
37
|
+
const styles = createStyles(colors, typography);
|
|
38
|
+
|
|
39
|
+
return (
|
|
40
|
+
<View style={[styles.container, containerStyle]}>
|
|
41
|
+
{/* Icon */}
|
|
42
|
+
<Icon
|
|
43
|
+
name={iconName}
|
|
44
|
+
size={64}
|
|
45
|
+
color={colors.textLight}
|
|
46
|
+
style={[styles.icon, iconStyle]}
|
|
47
|
+
/>
|
|
48
|
+
|
|
49
|
+
{/* Title */}
|
|
50
|
+
<Text style={[styles.title, titleStyle]}>{title}</Text>
|
|
51
|
+
|
|
52
|
+
{/* Subtitle */}
|
|
53
|
+
{subtitle && (
|
|
54
|
+
<Text style={[styles.subtitle, subtitleStyle]}>{subtitle}</Text>
|
|
55
|
+
)}
|
|
56
|
+
|
|
57
|
+
{/* Action Button */}
|
|
58
|
+
{showAction && onAction && (
|
|
59
|
+
<TouchableOpacity
|
|
60
|
+
style={[styles.actionButton, actionButtonStyle]}
|
|
61
|
+
onPress={onAction}
|
|
62
|
+
>
|
|
63
|
+
<Text style={[styles.actionText, actionTextStyle]}>{actionText}</Text>
|
|
64
|
+
</TouchableOpacity>
|
|
65
|
+
)}
|
|
66
|
+
</View>
|
|
67
|
+
);
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
const createStyles = (colors: any, typography: any) => StyleSheet.create({
|
|
71
|
+
container: {
|
|
72
|
+
alignItems: 'center',
|
|
73
|
+
justifyContent: 'center',
|
|
74
|
+
padding: 32,
|
|
75
|
+
minHeight: 200,
|
|
76
|
+
},
|
|
77
|
+
icon: {
|
|
78
|
+
marginBottom: 16,
|
|
79
|
+
opacity: 0.6,
|
|
80
|
+
},
|
|
81
|
+
title: {
|
|
82
|
+
...typography.styles.h3,
|
|
83
|
+
color: colors.text,
|
|
84
|
+
textAlign: 'center',
|
|
85
|
+
marginBottom: 8,
|
|
86
|
+
},
|
|
87
|
+
subtitle: {
|
|
88
|
+
...typography.styles.bodyMedium,
|
|
89
|
+
color: colors.textLight,
|
|
90
|
+
textAlign: 'center',
|
|
91
|
+
lineHeight: 20,
|
|
92
|
+
marginBottom: 24,
|
|
93
|
+
},
|
|
94
|
+
actionButton: {
|
|
95
|
+
backgroundColor: colors.primary,
|
|
96
|
+
paddingHorizontal: 24,
|
|
97
|
+
paddingVertical: 12,
|
|
98
|
+
borderRadius: 25,
|
|
99
|
+
minWidth: 120,
|
|
100
|
+
alignItems: 'center',
|
|
101
|
+
},
|
|
102
|
+
actionText: {
|
|
103
|
+
...typography.styles.bodyMedium,
|
|
104
|
+
color: colors.background,
|
|
105
|
+
fontWeight: typography.fontWeight.semiBold,
|
|
106
|
+
},
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
export default EmptyState;
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { View, Text, StyleSheet, TouchableOpacity } from 'react-native';
|
|
3
|
+
import Icon from 'react-native-vector-icons/Ionicons';
|
|
4
|
+
import { useColors, useTypography } from '../theme/ThemeContext';
|
|
5
|
+
|
|
6
|
+
export interface ErrorDisplayProps {
|
|
7
|
+
title?: string;
|
|
8
|
+
message: string;
|
|
9
|
+
onRetry?: () => void;
|
|
10
|
+
retryText?: string;
|
|
11
|
+
showIcon?: boolean;
|
|
12
|
+
iconName?: string;
|
|
13
|
+
containerStyle?: object;
|
|
14
|
+
titleStyle?: object;
|
|
15
|
+
messageStyle?: object;
|
|
16
|
+
retryButtonStyle?: object;
|
|
17
|
+
retryTextStyle?: object;
|
|
18
|
+
variant?: 'error' | 'warning' | 'info';
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const ErrorDisplay: React.FC<ErrorDisplayProps> = ({
|
|
22
|
+
title = 'Something went wrong',
|
|
23
|
+
message,
|
|
24
|
+
onRetry,
|
|
25
|
+
retryText = 'Try Again',
|
|
26
|
+
showIcon = true,
|
|
27
|
+
iconName,
|
|
28
|
+
containerStyle,
|
|
29
|
+
titleStyle,
|
|
30
|
+
messageStyle,
|
|
31
|
+
retryButtonStyle,
|
|
32
|
+
retryTextStyle,
|
|
33
|
+
variant = 'error',
|
|
34
|
+
}) => {
|
|
35
|
+
const colors = useColors();
|
|
36
|
+
const typography = useTypography();
|
|
37
|
+
const styles = createStyles(colors, typography, variant);
|
|
38
|
+
|
|
39
|
+
const getIconName = () => {
|
|
40
|
+
if (iconName) return iconName;
|
|
41
|
+
switch (variant) {
|
|
42
|
+
case 'error':
|
|
43
|
+
return 'alert-circle';
|
|
44
|
+
case 'warning':
|
|
45
|
+
return 'warning';
|
|
46
|
+
case 'info':
|
|
47
|
+
return 'information-circle';
|
|
48
|
+
default:
|
|
49
|
+
return 'alert-circle';
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
const getIconColor = () => {
|
|
54
|
+
switch (variant) {
|
|
55
|
+
case 'error':
|
|
56
|
+
return colors.error;
|
|
57
|
+
case 'warning':
|
|
58
|
+
return colors.warning;
|
|
59
|
+
case 'info':
|
|
60
|
+
return colors.info;
|
|
61
|
+
default:
|
|
62
|
+
return colors.error;
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
return (
|
|
67
|
+
<View style={[styles.container, containerStyle]}>
|
|
68
|
+
{/* Icon */}
|
|
69
|
+
{showIcon && (
|
|
70
|
+
<Icon
|
|
71
|
+
name={getIconName()}
|
|
72
|
+
size={48}
|
|
73
|
+
color={getIconColor()}
|
|
74
|
+
style={styles.icon}
|
|
75
|
+
/>
|
|
76
|
+
)}
|
|
77
|
+
|
|
78
|
+
{/* Title */}
|
|
79
|
+
<Text style={[styles.title, titleStyle]}>{title}</Text>
|
|
80
|
+
|
|
81
|
+
{/* Message */}
|
|
82
|
+
<Text style={[styles.message, messageStyle]}>{message}</Text>
|
|
83
|
+
|
|
84
|
+
{/* Retry Button */}
|
|
85
|
+
{onRetry && (
|
|
86
|
+
<TouchableOpacity
|
|
87
|
+
style={[styles.retryButton, retryButtonStyle]}
|
|
88
|
+
onPress={onRetry}
|
|
89
|
+
>
|
|
90
|
+
<Text style={[styles.retryText, retryTextStyle]}>{retryText}</Text>
|
|
91
|
+
</TouchableOpacity>
|
|
92
|
+
)}
|
|
93
|
+
</View>
|
|
94
|
+
);
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
const createStyles = (colors: any, typography: any, variant: string) => StyleSheet.create({
|
|
98
|
+
container: {
|
|
99
|
+
alignItems: 'center',
|
|
100
|
+
justifyContent: 'center',
|
|
101
|
+
padding: 24,
|
|
102
|
+
minHeight: 200,
|
|
103
|
+
},
|
|
104
|
+
icon: {
|
|
105
|
+
marginBottom: 16,
|
|
106
|
+
},
|
|
107
|
+
title: {
|
|
108
|
+
...typography.styles.h3,
|
|
109
|
+
color: colors.text,
|
|
110
|
+
textAlign: 'center',
|
|
111
|
+
marginBottom: 8,
|
|
112
|
+
},
|
|
113
|
+
message: {
|
|
114
|
+
...typography.styles.bodyMedium,
|
|
115
|
+
color: colors.textLight,
|
|
116
|
+
textAlign: 'center',
|
|
117
|
+
lineHeight: 20,
|
|
118
|
+
marginBottom: 24,
|
|
119
|
+
},
|
|
120
|
+
retryButton: {
|
|
121
|
+
backgroundColor: colors.primary,
|
|
122
|
+
paddingHorizontal: 24,
|
|
123
|
+
paddingVertical: 12,
|
|
124
|
+
borderRadius: 25,
|
|
125
|
+
minWidth: 120,
|
|
126
|
+
alignItems: 'center',
|
|
127
|
+
},
|
|
128
|
+
retryText: {
|
|
129
|
+
...typography.styles.bodyMedium,
|
|
130
|
+
color: colors.background,
|
|
131
|
+
fontWeight: typography.fontWeight.semiBold,
|
|
132
|
+
},
|
|
133
|
+
});
|
|
134
|
+
|
|
135
|
+
export default ErrorDisplay;
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { View, Text, TouchableOpacity, StyleSheet, Image } from 'react-native';
|
|
3
|
+
import Icon from 'react-native-vector-icons/Ionicons';
|
|
4
|
+
import { base64Images } from '../constants/strings/base64Images';
|
|
5
|
+
import { useColors, useTypography } from '../theme/ThemeContext';
|
|
6
|
+
import { getBorderColor } from '../theme';
|
|
7
|
+
|
|
8
|
+
interface FAQItemProps {
|
|
9
|
+
question: string;
|
|
10
|
+
answer: string;
|
|
11
|
+
isExpanded: boolean;
|
|
12
|
+
onToggle: () => void;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const FAQItem: React.FC<FAQItemProps> = ({
|
|
16
|
+
question,
|
|
17
|
+
answer,
|
|
18
|
+
isExpanded,
|
|
19
|
+
onToggle,
|
|
20
|
+
}) => {
|
|
21
|
+
const colors = useColors();
|
|
22
|
+
const typography = useTypography();
|
|
23
|
+
const styles = createStyles(colors, typography);
|
|
24
|
+
|
|
25
|
+
return (
|
|
26
|
+
<View style={styles.container}>
|
|
27
|
+
<View style={styles.headerRow}>
|
|
28
|
+
<View style={{ flex: 1 }}>
|
|
29
|
+
<Text style={styles.question}>{question}</Text>
|
|
30
|
+
</View>
|
|
31
|
+
<TouchableOpacity
|
|
32
|
+
style={styles.toggleButton}
|
|
33
|
+
onPress={onToggle}
|
|
34
|
+
hitSlop={{ top: 8, bottom: 8, left: 8, right: 8 }}
|
|
35
|
+
>
|
|
36
|
+
<View style={styles.toggleCircle}>
|
|
37
|
+
<Image
|
|
38
|
+
source={{ uri: isExpanded ? base64Images.minus : base64Images.plus }}
|
|
39
|
+
style={{ width: 16, height: 16, tintColor: colors.success }}
|
|
40
|
+
resizeMode="contain"
|
|
41
|
+
/>
|
|
42
|
+
</View>
|
|
43
|
+
</TouchableOpacity>
|
|
44
|
+
</View>
|
|
45
|
+
{isExpanded && <Text style={styles.answer}>{answer}</Text>}
|
|
46
|
+
</View>
|
|
47
|
+
);
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
const createStyles = (colors: any, typography: any) => StyleSheet.create({
|
|
51
|
+
container: {
|
|
52
|
+
borderBottomWidth: 1,
|
|
53
|
+
borderBottomColor: getBorderColor({ colors } as any, 0.2),
|
|
54
|
+
paddingVertical: 16,
|
|
55
|
+
},
|
|
56
|
+
headerRow: {
|
|
57
|
+
flexDirection: 'row',
|
|
58
|
+
justifyContent: 'space-between',
|
|
59
|
+
alignItems: 'center',
|
|
60
|
+
},
|
|
61
|
+
question: {
|
|
62
|
+
...typography.styles.bodyMedium,
|
|
63
|
+
flex: 1,
|
|
64
|
+
marginRight: 8,
|
|
65
|
+
color: colors.text,
|
|
66
|
+
lineHeight: 20,
|
|
67
|
+
},
|
|
68
|
+
answer: {
|
|
69
|
+
...typography.styles.bodySmall,
|
|
70
|
+
color: colors.textLight,
|
|
71
|
+
marginTop: 8,
|
|
72
|
+
lineHeight: 20,
|
|
73
|
+
},
|
|
74
|
+
toggleButton: {
|
|
75
|
+
marginLeft: 12,
|
|
76
|
+
alignSelf: 'center',
|
|
77
|
+
},
|
|
78
|
+
toggleCircle: {
|
|
79
|
+
width: 20,
|
|
80
|
+
height: 20,
|
|
81
|
+
// borderRadius: 14,
|
|
82
|
+
// backgroundColor: colors.background,
|
|
83
|
+
// borderWidth: 1.5,
|
|
84
|
+
borderColor: colors.success,
|
|
85
|
+
alignItems: 'center',
|
|
86
|
+
justifyContent: 'center',
|
|
87
|
+
},
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
export default FAQItem;
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import {
|
|
3
|
+
View,
|
|
4
|
+
Text,
|
|
5
|
+
StyleSheet,
|
|
6
|
+
TouchableOpacity,
|
|
7
|
+
Platform,
|
|
8
|
+
} from 'react-native';
|
|
9
|
+
import { useColors, useTypography, useSpacing, useShadows, useTheme } from '../theme/ThemeContext';
|
|
10
|
+
import { getBorderColor } from '../theme';
|
|
11
|
+
import type { ColorScheme, ThemeName } from '../theme';
|
|
12
|
+
|
|
13
|
+
interface FDCardProps {
|
|
14
|
+
id: string;
|
|
15
|
+
name: string;
|
|
16
|
+
accountNumber: string;
|
|
17
|
+
roi: string;
|
|
18
|
+
tenure: string;
|
|
19
|
+
amount: number;
|
|
20
|
+
maturityDate: string;
|
|
21
|
+
status: 'active' | 'matured' | 'pending';
|
|
22
|
+
creditRating: string;
|
|
23
|
+
onPress?: (id: string) => void;
|
|
24
|
+
customStyles?: {
|
|
25
|
+
container?: object;
|
|
26
|
+
name?: object;
|
|
27
|
+
amount?: object;
|
|
28
|
+
statusBadge?: object;
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
const FDCard: React.FC<FDCardProps> = ({
|
|
33
|
+
id,
|
|
34
|
+
name,
|
|
35
|
+
accountNumber,
|
|
36
|
+
roi,
|
|
37
|
+
tenure,
|
|
38
|
+
amount,
|
|
39
|
+
maturityDate,
|
|
40
|
+
status,
|
|
41
|
+
creditRating,
|
|
42
|
+
onPress,
|
|
43
|
+
customStyles = {},
|
|
44
|
+
}) => {
|
|
45
|
+
const colors = useColors();
|
|
46
|
+
const typography = useTypography();
|
|
47
|
+
const spacing = useSpacing();
|
|
48
|
+
const shadows = useShadows();
|
|
49
|
+
const { themeName } = useTheme();
|
|
50
|
+
|
|
51
|
+
const styles = createStyles(colors, typography, spacing, shadows, themeName);
|
|
52
|
+
|
|
53
|
+
const getStatusColor = (status: string) => {
|
|
54
|
+
switch (status) {
|
|
55
|
+
case 'active':
|
|
56
|
+
return colors.success;
|
|
57
|
+
case 'matured':
|
|
58
|
+
return colors.tabSelected;
|
|
59
|
+
case 'pending':
|
|
60
|
+
return colors.warning;
|
|
61
|
+
default:
|
|
62
|
+
return colors.textSecondary;
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
const formatCurrency = (amount: number) => {
|
|
67
|
+
return amount.toLocaleString('en-IN');
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
return (
|
|
71
|
+
<TouchableOpacity
|
|
72
|
+
style={[styles.fdCard, customStyles.container]}
|
|
73
|
+
onPress={() => onPress?.(id)}
|
|
74
|
+
activeOpacity={0.8}
|
|
75
|
+
>
|
|
76
|
+
<View style={styles.fdCardHeader}>
|
|
77
|
+
<Text style={[styles.fdName, customStyles.name]}>{name}</Text>
|
|
78
|
+
</View>
|
|
79
|
+
|
|
80
|
+
<View style={styles.fdDetailsRow}>
|
|
81
|
+
<View style={styles.fdDetailItem}>
|
|
82
|
+
<Text style={styles.fdDetailLabel}>ROI</Text>
|
|
83
|
+
<Text style={[styles.fdDetailValue, styles.roiText]}>{roi}</Text>
|
|
84
|
+
</View>
|
|
85
|
+
<View style={styles.fdDetailItem}>
|
|
86
|
+
<Text style={[styles.fdDetailLabel, { textAlign: 'right' }]}>Tenure</Text>
|
|
87
|
+
<Text style={[styles.fdDetailValue, { textAlign: 'right' }]}>{tenure}</Text>
|
|
88
|
+
</View>
|
|
89
|
+
</View>
|
|
90
|
+
|
|
91
|
+
<View style={styles.fdDetailsRowLast}>
|
|
92
|
+
<View style={styles.fdDetailItem}>
|
|
93
|
+
<Text style={styles.fdDetailLabel}>Credit Rating</Text>
|
|
94
|
+
<Text style={styles.fdDetailValue}>{creditRating}</Text>
|
|
95
|
+
</View>
|
|
96
|
+
<View style={[styles.fdDetailItem]}>
|
|
97
|
+
<Text style={[styles.fdDetailLabel, { textAlign: 'right' }]}>Min. Deposit</Text>
|
|
98
|
+
<Text style={[styles.fdDetailValue, { textAlign: 'right' }]}>₹ 5000</Text>
|
|
99
|
+
</View>
|
|
100
|
+
</View>
|
|
101
|
+
</TouchableOpacity>
|
|
102
|
+
);
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
const createStyles = (colors: ColorScheme, typography: any, spacing: any, shadows: any, themeName: ThemeName) => StyleSheet.create({
|
|
106
|
+
fdCard: {
|
|
107
|
+
backgroundColor: colors.surface,
|
|
108
|
+
borderRadius: 4,
|
|
109
|
+
paddingVertical: Platform.OS === 'ios' ? spacing.md + 2 : spacing.md,
|
|
110
|
+
paddingHorizontal: spacing.md,
|
|
111
|
+
marginBottom: spacing.lg,
|
|
112
|
+
borderWidth: themeName === 'dark' ? 1 : 0.5,
|
|
113
|
+
borderColor: themeName === 'dark' ? colors.border : getBorderColor({ colors } as any, 0.36),
|
|
114
|
+
shadowColor: '#000000',
|
|
115
|
+
shadowOffset: {
|
|
116
|
+
width: 0,
|
|
117
|
+
height: 2,
|
|
118
|
+
},
|
|
119
|
+
shadowOpacity: 0.1,
|
|
120
|
+
shadowRadius: 4,
|
|
121
|
+
elevation: 3,
|
|
122
|
+
},
|
|
123
|
+
fdCardHeader: {
|
|
124
|
+
flexDirection: 'row',
|
|
125
|
+
justifyContent: 'space-between',
|
|
126
|
+
alignItems: 'center',
|
|
127
|
+
marginBottom: spacing.sm,
|
|
128
|
+
},
|
|
129
|
+
fdName: {
|
|
130
|
+
...typography.styles.text14Medium,
|
|
131
|
+
color: colors.text,
|
|
132
|
+
flex: 1,
|
|
133
|
+
lineHeight: (typography.styles.text14Medium.lineHeight ?? typography.styles.text14Medium.fontSize ?? 14) + 2,
|
|
134
|
+
},
|
|
135
|
+
fdDetailsRow: {
|
|
136
|
+
flexDirection: 'row',
|
|
137
|
+
justifyContent: 'space-between',
|
|
138
|
+
marginBottom: spacing.sm,
|
|
139
|
+
},
|
|
140
|
+
fdDetailsRowLast: {
|
|
141
|
+
flexDirection: 'row',
|
|
142
|
+
justifyContent: 'space-between',
|
|
143
|
+
},
|
|
144
|
+
fdDetailItem: {
|
|
145
|
+
flex: 1,
|
|
146
|
+
},
|
|
147
|
+
fdDetailLabel: {
|
|
148
|
+
...typography.styles.text11Regular,
|
|
149
|
+
color: colors.textSecondary,
|
|
150
|
+
marginBottom: spacing.xs,
|
|
151
|
+
lineHeight: (typography.styles.text12Medium.lineHeight ?? typography.styles.text12Medium.fontSize ?? 12) + 3,
|
|
152
|
+
|
|
153
|
+
},
|
|
154
|
+
fdDetailValue: {
|
|
155
|
+
...typography.styles.text14Medium,
|
|
156
|
+
color: colors.text,
|
|
157
|
+
lineHeight: (typography.styles.text12Medium.lineHeight ?? typography.styles.text12Medium.fontSize ?? 12) + 3,
|
|
158
|
+
|
|
159
|
+
},
|
|
160
|
+
roiText: {
|
|
161
|
+
color: colors.success,
|
|
162
|
+
},
|
|
163
|
+
});
|
|
164
|
+
|
|
165
|
+
export default FDCard;
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import { View, Text, StyleSheet, TouchableOpacity } from 'react-native';
|
|
3
|
+
import { useColors, useTypography, useTheme } from '../theme/ThemeContext';
|
|
4
|
+
|
|
5
|
+
export interface FormDropdownProps {
|
|
6
|
+
label: string;
|
|
7
|
+
value: string;
|
|
8
|
+
options: string[];
|
|
9
|
+
onSelect: (value: string) => void;
|
|
10
|
+
placeholder?: string;
|
|
11
|
+
editable?: boolean;
|
|
12
|
+
required?: boolean;
|
|
13
|
+
error?: string;
|
|
14
|
+
containerStyle?: object;
|
|
15
|
+
dropdownStyle?: object;
|
|
16
|
+
labelStyle?: object;
|
|
17
|
+
optionStyle?: object;
|
|
18
|
+
testID?: string;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const FormDropdown: React.FC<FormDropdownProps> = ({
|
|
22
|
+
label,
|
|
23
|
+
value,
|
|
24
|
+
options,
|
|
25
|
+
onSelect,
|
|
26
|
+
placeholder,
|
|
27
|
+
editable = true,
|
|
28
|
+
required = false,
|
|
29
|
+
error,
|
|
30
|
+
containerStyle,
|
|
31
|
+
dropdownStyle,
|
|
32
|
+
labelStyle,
|
|
33
|
+
optionStyle,
|
|
34
|
+
testID,
|
|
35
|
+
}) => {
|
|
36
|
+
const colors = useColors();
|
|
37
|
+
const typography = useTypography();
|
|
38
|
+
const { themeName } = useTheme();
|
|
39
|
+
const styles = createStyles(colors, typography, themeName);
|
|
40
|
+
|
|
41
|
+
const [isOpen, setIsOpen] = useState(false);
|
|
42
|
+
|
|
43
|
+
const handleToggle = () => {
|
|
44
|
+
if (editable) {
|
|
45
|
+
setIsOpen(prev => !prev);
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
const handleSelect = (option: string) => {
|
|
50
|
+
onSelect(option);
|
|
51
|
+
setIsOpen(false);
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
const getDisplayValue = () => {
|
|
55
|
+
if (value) return value;
|
|
56
|
+
return placeholder || `Select ${label}`;
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
return (
|
|
60
|
+
<View style={[styles.container, containerStyle]}>
|
|
61
|
+
{/* Label */}
|
|
62
|
+
<Text style={[styles.label, labelStyle]}>
|
|
63
|
+
{label}
|
|
64
|
+
{required && <Text style={styles.requiredIndicator}> *</Text>}
|
|
65
|
+
</Text>
|
|
66
|
+
|
|
67
|
+
{/* Dropdown */}
|
|
68
|
+
<TouchableOpacity
|
|
69
|
+
style={[
|
|
70
|
+
styles.dropdown,
|
|
71
|
+
!editable && styles.disabledDropdown,
|
|
72
|
+
error ? styles.errorDropdown : null, // fix
|
|
73
|
+
dropdownStyle,
|
|
74
|
+
]}
|
|
75
|
+
onPress={handleToggle}
|
|
76
|
+
disabled={!editable}
|
|
77
|
+
testID={testID}
|
|
78
|
+
>
|
|
79
|
+
<Text
|
|
80
|
+
style={[
|
|
81
|
+
styles.dropdownText,
|
|
82
|
+
!value && styles.placeholderText,
|
|
83
|
+
!editable && styles.disabledText,
|
|
84
|
+
]}
|
|
85
|
+
>
|
|
86
|
+
{getDisplayValue()}
|
|
87
|
+
</Text>
|
|
88
|
+
<Text style={[styles.arrow, !editable && styles.disabledText]}>
|
|
89
|
+
{isOpen ? '▲' : '▼'}
|
|
90
|
+
</Text>
|
|
91
|
+
</TouchableOpacity>
|
|
92
|
+
|
|
93
|
+
{/* Error Message */}
|
|
94
|
+
{error && <Text style={styles.errorText}>{error}</Text>}
|
|
95
|
+
|
|
96
|
+
{/* Options List */}
|
|
97
|
+
{isOpen && editable && (
|
|
98
|
+
<View style={styles.optionsContainer}>
|
|
99
|
+
{options.map((option, index) => (
|
|
100
|
+
<TouchableOpacity
|
|
101
|
+
key={index}
|
|
102
|
+
style={[
|
|
103
|
+
styles.option,
|
|
104
|
+
option === value && styles.selectedOption,
|
|
105
|
+
optionStyle,
|
|
106
|
+
]}
|
|
107
|
+
onPress={() => handleSelect(option)}
|
|
108
|
+
>
|
|
109
|
+
<Text
|
|
110
|
+
style={[
|
|
111
|
+
styles.optionText,
|
|
112
|
+
option === value && styles.selectedOptionText,
|
|
113
|
+
]}
|
|
114
|
+
>
|
|
115
|
+
{option}
|
|
116
|
+
</Text>
|
|
117
|
+
</TouchableOpacity>
|
|
118
|
+
))}
|
|
119
|
+
</View>
|
|
120
|
+
)}
|
|
121
|
+
</View>
|
|
122
|
+
);
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
const createStyles = (colors: any, typography: any, themeName: string) => StyleSheet.create({
|
|
126
|
+
container: {
|
|
127
|
+
marginBottom: 20,
|
|
128
|
+
},
|
|
129
|
+
label: {
|
|
130
|
+
...typography.styles.bodySmall,
|
|
131
|
+
color: colors.textLight,
|
|
132
|
+
marginBottom: 8,
|
|
133
|
+
},
|
|
134
|
+
requiredIndicator: {
|
|
135
|
+
color: colors.error,
|
|
136
|
+
},
|
|
137
|
+
dropdown: {
|
|
138
|
+
flexDirection: 'row',
|
|
139
|
+
alignItems: 'center',
|
|
140
|
+
justifyContent: 'space-between',
|
|
141
|
+
backgroundColor: colors.surface,
|
|
142
|
+
borderRadius: 25,
|
|
143
|
+
paddingHorizontal: 16,
|
|
144
|
+
paddingVertical: 15,
|
|
145
|
+
borderWidth: 1,
|
|
146
|
+
borderColor: colors.border,
|
|
147
|
+
minHeight: 50,
|
|
148
|
+
},
|
|
149
|
+
disabledDropdown: {
|
|
150
|
+
backgroundColor: '#f5f5f5',
|
|
151
|
+
borderColor: colors.border,
|
|
152
|
+
},
|
|
153
|
+
errorDropdown: {
|
|
154
|
+
borderColor: colors.error,
|
|
155
|
+
},
|
|
156
|
+
dropdownText: {
|
|
157
|
+
...typography.styles.bodyMedium,
|
|
158
|
+
color: colors.text,
|
|
159
|
+
flex: 1,
|
|
160
|
+
},
|
|
161
|
+
placeholderText: {
|
|
162
|
+
color: themeName === 'dark' ? colors.placeholderColor : colors.textLight,
|
|
163
|
+
},
|
|
164
|
+
disabledText: {
|
|
165
|
+
color: colors.textLight,
|
|
166
|
+
},
|
|
167
|
+
arrow: {
|
|
168
|
+
...typography.styles.bodySmall,
|
|
169
|
+
color: colors.textLight,
|
|
170
|
+
marginLeft: 8,
|
|
171
|
+
},
|
|
172
|
+
errorText: {
|
|
173
|
+
...typography.styles.bodySmall,
|
|
174
|
+
color: colors.error,
|
|
175
|
+
marginTop: 4,
|
|
176
|
+
},
|
|
177
|
+
optionsContainer: {
|
|
178
|
+
position: 'absolute',
|
|
179
|
+
top: '100%',
|
|
180
|
+
left: 0,
|
|
181
|
+
right: 0,
|
|
182
|
+
backgroundColor: colors.surface,
|
|
183
|
+
borderRadius: 8,
|
|
184
|
+
borderWidth: 1,
|
|
185
|
+
borderColor: colors.border,
|
|
186
|
+
marginTop: 4,
|
|
187
|
+
maxHeight: 200,
|
|
188
|
+
zIndex: 1000,
|
|
189
|
+
elevation: 5,
|
|
190
|
+
shadowColor: '#000',
|
|
191
|
+
shadowOffset: { width: 0, height: 2 },
|
|
192
|
+
shadowOpacity: 0.1,
|
|
193
|
+
shadowRadius: 4,
|
|
194
|
+
},
|
|
195
|
+
option: {
|
|
196
|
+
paddingHorizontal: 16,
|
|
197
|
+
paddingVertical: 12,
|
|
198
|
+
borderBottomWidth: 1,
|
|
199
|
+
borderBottomColor: colors.border + '20',
|
|
200
|
+
},
|
|
201
|
+
selectedOption: {
|
|
202
|
+
backgroundColor: colors.primary + '10',
|
|
203
|
+
},
|
|
204
|
+
optionText: {
|
|
205
|
+
...typography.styles.bodyMedium,
|
|
206
|
+
color: colors.text,
|
|
207
|
+
},
|
|
208
|
+
selectedOptionText: {
|
|
209
|
+
color: colors.primary,
|
|
210
|
+
fontWeight: typography.fontWeight.semiBold,
|
|
211
|
+
},
|
|
212
|
+
});
|
|
213
|
+
|
|
214
|
+
export default FormDropdown;
|