@umituz/react-native-settings 4.20.0 → 4.20.2
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/package.json +21 -21
- package/src/domains/about/presentation/components/AboutContent.tsx +5 -2
- package/src/domains/about/presentation/components/AboutHeader.tsx +5 -4
- package/src/domains/about/presentation/components/AboutSettingItem.tsx +10 -9
- package/src/domains/about/presentation/screens/AboutScreen.tsx +6 -5
- package/src/domains/disclaimer/presentation/components/DisclaimerCard.tsx +2 -2
- package/src/domains/disclaimer/presentation/components/DisclaimerModal.tsx +1 -1
- package/src/domains/disclaimer/presentation/screens/DisclaimerScreen.tsx +1 -1
- package/src/domains/faqs/presentation/components/FAQSearchBar.tsx +2 -2
- package/src/domains/feedback/presentation/components/FeedbackForm.tsx +4 -2
- package/src/domains/feedback/presentation/components/FeedbackModal.tsx +3 -1
- package/src/domains/legal/presentation/screens/PrivacyPolicyScreen.tsx +7 -4
- package/src/domains/legal/presentation/screens/TermsOfServiceScreen.tsx +7 -4
- package/src/domains/rating/presentation/components/StarRating.tsx +7 -2
- package/src/domains/video-tutorials/index.ts +1 -0
- package/src/domains/video-tutorials/presentation/components/VideoTutorialCard.tsx +9 -5
- package/src/domains/video-tutorials/presentation/screens/VideoTutorialsScreen.tsx +5 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umituz/react-native-settings",
|
|
3
|
-
"version": "4.20.
|
|
3
|
+
"version": "4.20.2",
|
|
4
4
|
"description": "Complete settings hub for React Native apps - consolidated package with settings, about, legal, appearance, feedback, FAQs, and rating",
|
|
5
5
|
"main": "./src/index.ts",
|
|
6
6
|
"types": "./src/index.ts",
|
|
@@ -39,14 +39,14 @@
|
|
|
39
39
|
"@react-navigation/native": ">=6.0.0",
|
|
40
40
|
"@react-navigation/stack": ">=6.0.0",
|
|
41
41
|
"@tanstack/react-query": ">=5.0.0",
|
|
42
|
-
"@umituz/react-native-auth": "
|
|
43
|
-
"@umituz/react-native-design-system": "
|
|
44
|
-
"@umituz/react-native-localization": "
|
|
45
|
-
"@umituz/react-native-notifications": "
|
|
46
|
-
"@umituz/react-native-onboarding": "
|
|
47
|
-
"@umituz/react-native-sentry": "
|
|
48
|
-
"@umituz/react-native-storage": "
|
|
49
|
-
"@umituz/react-native-tanstack": "
|
|
42
|
+
"@umituz/react-native-auth": "latest",
|
|
43
|
+
"@umituz/react-native-design-system": "latest",
|
|
44
|
+
"@umituz/react-native-localization": "latest",
|
|
45
|
+
"@umituz/react-native-notifications": "latest",
|
|
46
|
+
"@umituz/react-native-onboarding": "latest",
|
|
47
|
+
"@umituz/react-native-sentry": "latest",
|
|
48
|
+
"@umituz/react-native-storage": "latest",
|
|
49
|
+
"@umituz/react-native-tanstack": "latest",
|
|
50
50
|
"react": ">=19.0.0",
|
|
51
51
|
"react-native": ">=0.81.0",
|
|
52
52
|
"react-native-safe-area-context": ">=4.0.0",
|
|
@@ -67,18 +67,18 @@
|
|
|
67
67
|
"@types/react": "~19.1.10",
|
|
68
68
|
"@typescript-eslint/eslint-plugin": "^7.18.0",
|
|
69
69
|
"@typescript-eslint/parser": "^7.18.0",
|
|
70
|
-
"@umituz/react-native-auth": "
|
|
71
|
-
"@umituz/react-native-design-system": "
|
|
72
|
-
"@umituz/react-native-filesystem": "
|
|
73
|
-
"@umituz/react-native-firebase": "
|
|
74
|
-
"@umituz/react-native-haptics": "
|
|
75
|
-
"@umituz/react-native-localization": "
|
|
76
|
-
"@umituz/react-native-notifications": "
|
|
77
|
-
"@umituz/react-native-onboarding": "
|
|
78
|
-
"@umituz/react-native-sentry": "
|
|
79
|
-
"@umituz/react-native-storage": "
|
|
80
|
-
"@umituz/react-native-tanstack": "
|
|
81
|
-
"@umituz/react-native-uuid": "
|
|
70
|
+
"@umituz/react-native-auth": "latest",
|
|
71
|
+
"@umituz/react-native-design-system": "latest",
|
|
72
|
+
"@umituz/react-native-filesystem": "latest",
|
|
73
|
+
"@umituz/react-native-firebase": "latest",
|
|
74
|
+
"@umituz/react-native-haptics": "latest",
|
|
75
|
+
"@umituz/react-native-localization": "latest",
|
|
76
|
+
"@umituz/react-native-notifications": "latest",
|
|
77
|
+
"@umituz/react-native-onboarding": "latest",
|
|
78
|
+
"@umituz/react-native-sentry": "latest",
|
|
79
|
+
"@umituz/react-native-storage": "latest",
|
|
80
|
+
"@umituz/react-native-tanstack": "latest",
|
|
81
|
+
"@umituz/react-native-uuid": "latest",
|
|
82
82
|
"eslint": "^8.57.0",
|
|
83
83
|
"eslint-plugin-react": "^7.37.5",
|
|
84
84
|
"eslint-plugin-react-native": "^5.0.0",
|
|
@@ -19,6 +19,7 @@ export interface AboutContentProps {
|
|
|
19
19
|
|
|
20
20
|
const AboutSectionHeader: React.FC<{ title: string }> = ({ title }) => {
|
|
21
21
|
const tokens = useAppDesignTokens();
|
|
22
|
+
const styles = getStyles(tokens);
|
|
22
23
|
const colors = tokens.colors;
|
|
23
24
|
|
|
24
25
|
return (
|
|
@@ -30,6 +31,8 @@ export const AboutContent: React.FC<AboutContentProps> = ({
|
|
|
30
31
|
appInfo,
|
|
31
32
|
config,
|
|
32
33
|
}) => {
|
|
34
|
+
const tokens = useAppDesignTokens();
|
|
35
|
+
const styles = getStyles(tokens);
|
|
33
36
|
const hasContactInfo = appInfo.developer || appInfo.contactEmail || appInfo.websiteUrl;
|
|
34
37
|
const hasMoreInfo = appInfo.moreAppsUrl;
|
|
35
38
|
|
|
@@ -86,7 +89,7 @@ export const AboutContent: React.FC<AboutContentProps> = ({
|
|
|
86
89
|
);
|
|
87
90
|
};
|
|
88
91
|
|
|
89
|
-
const
|
|
92
|
+
const getStyles = (tokens: any) => StyleSheet.create({
|
|
90
93
|
content: {
|
|
91
94
|
paddingVertical: 8,
|
|
92
95
|
},
|
|
@@ -94,7 +97,7 @@ const styles = StyleSheet.create({
|
|
|
94
97
|
marginBottom: 24,
|
|
95
98
|
},
|
|
96
99
|
sectionHeader: {
|
|
97
|
-
fontSize:
|
|
100
|
+
fontSize: tokens.typography.labelSmall.responsiveFontSize,
|
|
98
101
|
fontWeight: '600',
|
|
99
102
|
marginBottom: 8,
|
|
100
103
|
paddingHorizontal: 16,
|
|
@@ -38,6 +38,7 @@ export const AboutHeader: React.FC<AboutHeaderProps> = ({
|
|
|
38
38
|
testID,
|
|
39
39
|
}) => {
|
|
40
40
|
const tokens = useAppDesignTokens();
|
|
41
|
+
const styles = getStyles(tokens);
|
|
41
42
|
const colors = tokens.colors;
|
|
42
43
|
|
|
43
44
|
return (
|
|
@@ -55,7 +56,7 @@ export const AboutHeader: React.FC<AboutHeaderProps> = ({
|
|
|
55
56
|
);
|
|
56
57
|
};
|
|
57
58
|
|
|
58
|
-
const
|
|
59
|
+
const getStyles = (tokens: any) => StyleSheet.create({
|
|
59
60
|
header: {
|
|
60
61
|
alignItems: 'center',
|
|
61
62
|
paddingVertical: 24,
|
|
@@ -63,16 +64,16 @@ const styles = StyleSheet.create({
|
|
|
63
64
|
borderBottomWidth: 1,
|
|
64
65
|
},
|
|
65
66
|
appName: {
|
|
66
|
-
fontSize:
|
|
67
|
+
fontSize: tokens.typography.headlineMedium.responsiveFontSize,
|
|
67
68
|
fontWeight: 'bold',
|
|
68
69
|
marginBottom: 4,
|
|
69
70
|
},
|
|
70
71
|
version: {
|
|
71
|
-
fontSize:
|
|
72
|
+
fontSize: tokens.typography.bodyLarge.responsiveFontSize,
|
|
72
73
|
marginBottom: 8,
|
|
73
74
|
},
|
|
74
75
|
description: {
|
|
75
|
-
fontSize:
|
|
76
|
+
fontSize: tokens.typography.bodyMedium.responsiveFontSize,
|
|
76
77
|
textAlign: 'center',
|
|
77
78
|
lineHeight: 20,
|
|
78
79
|
},
|
|
@@ -64,6 +64,7 @@ export const AboutSettingItem: React.FC<AboutSettingItemProps> = ({
|
|
|
64
64
|
chevronColor,
|
|
65
65
|
}) => {
|
|
66
66
|
const tokens = useAppDesignTokens();
|
|
67
|
+
const styles = getStyles(tokens);
|
|
67
68
|
const colors = tokens.colors;
|
|
68
69
|
|
|
69
70
|
// Memoize container type to prevent unnecessary re-renders
|
|
@@ -79,7 +80,7 @@ export const AboutSettingItem: React.FC<AboutSettingItemProps> = ({
|
|
|
79
80
|
disabled && styles.disabled,
|
|
80
81
|
containerStyle
|
|
81
82
|
];
|
|
82
|
-
}, [disabled, containerStyle, colors.surface]);
|
|
83
|
+
}, [disabled, containerStyle, colors.surface, styles]);
|
|
83
84
|
|
|
84
85
|
// Memoize icon container styles
|
|
85
86
|
const iconContainerStyles = useMemo(() => {
|
|
@@ -87,7 +88,7 @@ export const AboutSettingItem: React.FC<AboutSettingItemProps> = ({
|
|
|
87
88
|
styles.iconContainer,
|
|
88
89
|
iconContainerStyle
|
|
89
90
|
];
|
|
90
|
-
}, [iconContainerStyle]);
|
|
91
|
+
}, [iconContainerStyle, styles]);
|
|
91
92
|
|
|
92
93
|
// Memoize chevron styles
|
|
93
94
|
const chevronStyles = useMemo(() => {
|
|
@@ -95,7 +96,7 @@ export const AboutSettingItem: React.FC<AboutSettingItemProps> = ({
|
|
|
95
96
|
styles.chevron,
|
|
96
97
|
{ color: chevronColor || colors.textSecondary }
|
|
97
98
|
];
|
|
98
|
-
}, [chevronColor, colors.textSecondary]);
|
|
99
|
+
}, [chevronColor, colors.textSecondary, styles]);
|
|
99
100
|
|
|
100
101
|
// Memoize press handler to prevent unnecessary re-renders
|
|
101
102
|
const handlePress = useCallback(() => {
|
|
@@ -129,7 +130,7 @@ export const AboutSettingItem: React.FC<AboutSettingItemProps> = ({
|
|
|
129
130
|
)}
|
|
130
131
|
</View>
|
|
131
132
|
);
|
|
132
|
-
}, [title, description, titleStyle, descriptionStyle, colors.textPrimary, colors.textSecondary]);
|
|
133
|
+
}, [title, description, titleStyle, descriptionStyle, colors.textPrimary, colors.textSecondary, styles]);
|
|
133
134
|
|
|
134
135
|
// Memoize value rendering
|
|
135
136
|
const renderValue = useMemo(() => {
|
|
@@ -140,7 +141,7 @@ export const AboutSettingItem: React.FC<AboutSettingItemProps> = ({
|
|
|
140
141
|
return (
|
|
141
142
|
<Text style={[styles.value, { color: colors.textSecondary }, valueStyle]}>{value}</Text>
|
|
142
143
|
);
|
|
143
|
-
}, [value, valueStyle, colors.textSecondary]);
|
|
144
|
+
}, [value, valueStyle, colors.textSecondary, styles]);
|
|
144
145
|
|
|
145
146
|
// Memoize chevron rendering
|
|
146
147
|
const renderChevron = useMemo(() => {
|
|
@@ -168,7 +169,7 @@ export const AboutSettingItem: React.FC<AboutSettingItemProps> = ({
|
|
|
168
169
|
);
|
|
169
170
|
};
|
|
170
171
|
|
|
171
|
-
const
|
|
172
|
+
const getStyles = (tokens: any) => StyleSheet.create({
|
|
172
173
|
container: {
|
|
173
174
|
flexDirection: 'row',
|
|
174
175
|
alignItems: 'center',
|
|
@@ -187,15 +188,15 @@ const styles = StyleSheet.create({
|
|
|
187
188
|
flex: 1,
|
|
188
189
|
},
|
|
189
190
|
title: {
|
|
190
|
-
fontSize:
|
|
191
|
+
fontSize: tokens.typography.bodyLarge.responsiveFontSize,
|
|
191
192
|
fontWeight: '500',
|
|
192
193
|
},
|
|
193
194
|
description: {
|
|
194
|
-
fontSize:
|
|
195
|
+
fontSize: tokens.typography.bodySmall.responsiveFontSize,
|
|
195
196
|
marginTop: 2,
|
|
196
197
|
},
|
|
197
198
|
value: {
|
|
198
|
-
fontSize:
|
|
199
|
+
fontSize: tokens.typography.bodyLarge.responsiveFontSize,
|
|
199
200
|
marginRight: 8,
|
|
200
201
|
flexShrink: 1,
|
|
201
202
|
textAlign: 'right',
|
|
@@ -52,6 +52,7 @@ export const AboutScreen: React.FC<AboutScreenProps> = ({
|
|
|
52
52
|
testID,
|
|
53
53
|
}) => {
|
|
54
54
|
const tokens = useAppDesignTokens();
|
|
55
|
+
const styles = getStyles(tokens);
|
|
55
56
|
const colors = tokens.colors;
|
|
56
57
|
|
|
57
58
|
const { appInfo, loading, error } = useAboutInfo({
|
|
@@ -91,7 +92,7 @@ export const AboutScreen: React.FC<AboutScreenProps> = ({
|
|
|
91
92
|
{footerComponent}
|
|
92
93
|
</View>
|
|
93
94
|
);
|
|
94
|
-
}, [footerComponent, colors.border]);
|
|
95
|
+
}, [footerComponent, colors.border, styles]);
|
|
95
96
|
|
|
96
97
|
// Memoize content rendering
|
|
97
98
|
const renderContent = useCallback(() => {
|
|
@@ -114,7 +115,7 @@ export const AboutScreen: React.FC<AboutScreenProps> = ({
|
|
|
114
115
|
{ backgroundColor: colors.backgroundPrimary },
|
|
115
116
|
containerStyle
|
|
116
117
|
];
|
|
117
|
-
}, [containerStyle, colors.backgroundPrimary]);
|
|
118
|
+
}, [containerStyle, colors.backgroundPrimary, styles]);
|
|
118
119
|
|
|
119
120
|
const texts = config.texts || {};
|
|
120
121
|
|
|
@@ -173,7 +174,7 @@ export const AboutScreen: React.FC<AboutScreenProps> = ({
|
|
|
173
174
|
);
|
|
174
175
|
};
|
|
175
176
|
|
|
176
|
-
const
|
|
177
|
+
const getStyles = (tokens: any) => StyleSheet.create({
|
|
177
178
|
container: {
|
|
178
179
|
flex: 1,
|
|
179
180
|
},
|
|
@@ -184,12 +185,12 @@ const styles = StyleSheet.create({
|
|
|
184
185
|
},
|
|
185
186
|
loadingText: {
|
|
186
187
|
textAlign: 'center',
|
|
187
|
-
fontSize:
|
|
188
|
+
fontSize: tokens.typography.bodyMedium.responsiveFontSize,
|
|
188
189
|
marginTop: 20,
|
|
189
190
|
},
|
|
190
191
|
errorText: {
|
|
191
192
|
textAlign: 'center',
|
|
192
|
-
fontSize:
|
|
193
|
+
fontSize: tokens.typography.bodyMedium.responsiveFontSize,
|
|
193
194
|
marginTop: 20,
|
|
194
195
|
},
|
|
195
196
|
});
|
|
@@ -104,12 +104,12 @@ const getStyles = (tokens: ReturnType<typeof useAppDesignTokens>) =>
|
|
|
104
104
|
title: {
|
|
105
105
|
flex: 1,
|
|
106
106
|
fontWeight: tokens.typography.labelLarge.fontWeight as any,
|
|
107
|
-
fontSize: tokens.typography.labelLarge.
|
|
107
|
+
fontSize: tokens.typography.labelLarge.responsiveFontSize,
|
|
108
108
|
},
|
|
109
109
|
|
|
110
110
|
shortMessage: {
|
|
111
111
|
lineHeight: 18,
|
|
112
112
|
paddingLeft: 52, // Align with title (40px icon + 12px margin)
|
|
113
|
-
fontSize: 13,
|
|
113
|
+
fontSize: 13, // Or tokens.typography.bodySmall.responsiveFontSize
|
|
114
114
|
},
|
|
115
115
|
});
|
|
@@ -47,7 +47,7 @@ export const FAQSearchBar: React.FC<FAQSearchBarProps> = ({
|
|
|
47
47
|
input: {
|
|
48
48
|
flex: 1,
|
|
49
49
|
height: '100%',
|
|
50
|
-
fontSize:
|
|
50
|
+
fontSize: tokens.typography.bodyMedium.responsiveFontSize,
|
|
51
51
|
color: tokens.colors.textPrimary,
|
|
52
52
|
},
|
|
53
53
|
}),
|
|
@@ -57,7 +57,7 @@ export const FAQSearchBar: React.FC<FAQSearchBarProps> = ({
|
|
|
57
57
|
return (
|
|
58
58
|
<View style={[styles.container, customStyles?.container]}>
|
|
59
59
|
<View style={styles.iconContainer}>
|
|
60
|
-
<AtomicIcon name="search" size=
|
|
60
|
+
<AtomicIcon name="search" size="md" color="textSecondary" />
|
|
61
61
|
</View>
|
|
62
62
|
<TextInput
|
|
63
63
|
style={[styles.input, customStyles?.input]}
|
|
@@ -30,6 +30,7 @@ export const FeedbackForm: React.FC<FeedbackFormProps> = ({
|
|
|
30
30
|
isSubmitting = false,
|
|
31
31
|
}) => {
|
|
32
32
|
const tokens = useAppDesignTokens();
|
|
33
|
+
const styles = getStyles(tokens);
|
|
33
34
|
const [selectedType, setSelectedType] = useState<FeedbackType>(initialType || texts.feedbackTypes[0].type);
|
|
34
35
|
const [rating, setRating] = useState<FeedbackRating>(5);
|
|
35
36
|
const [description, setDescription] = useState("");
|
|
@@ -142,7 +143,8 @@ export const FeedbackForm: React.FC<FeedbackFormProps> = ({
|
|
|
142
143
|
);
|
|
143
144
|
};
|
|
144
145
|
|
|
145
|
-
const
|
|
146
|
+
const getStyles = (tokens: ReturnType<typeof useAppDesignTokens>) =>
|
|
147
|
+
StyleSheet.create({
|
|
146
148
|
container: {
|
|
147
149
|
width: "100%",
|
|
148
150
|
},
|
|
@@ -181,7 +183,7 @@ const styles = StyleSheet.create({
|
|
|
181
183
|
borderWidth: 1,
|
|
182
184
|
borderRadius: 8,
|
|
183
185
|
padding: 12,
|
|
184
|
-
fontSize:
|
|
186
|
+
fontSize: tokens.typography.bodyMedium.responsiveFontSize,
|
|
185
187
|
},
|
|
186
188
|
submitButton: {
|
|
187
189
|
width: "100%",
|
|
@@ -32,6 +32,7 @@ export const FeedbackModal: React.FC<FeedbackModalProps> = ({
|
|
|
32
32
|
texts,
|
|
33
33
|
}) => {
|
|
34
34
|
const tokens = useAppDesignTokens();
|
|
35
|
+
const styles = getStyles(tokens);
|
|
35
36
|
|
|
36
37
|
return (
|
|
37
38
|
<BaseModal visible={visible} onClose={onClose}>
|
|
@@ -77,7 +78,8 @@ export const FeedbackModal: React.FC<FeedbackModalProps> = ({
|
|
|
77
78
|
};
|
|
78
79
|
|
|
79
80
|
|
|
80
|
-
const
|
|
81
|
+
const getStyles = (tokens: ReturnType<typeof useAppDesignTokens>) =>
|
|
82
|
+
StyleSheet.create({
|
|
81
83
|
safeArea: {
|
|
82
84
|
flex: 1,
|
|
83
85
|
},
|
|
@@ -71,12 +71,13 @@ export const PrivacyPolicyScreen: React.FC<PrivacyPolicyScreenProps> = React.mem
|
|
|
71
71
|
|
|
72
72
|
// Use cached styles
|
|
73
73
|
const styles = React.useMemo(() => {
|
|
74
|
+
const cacheKey = StyleCacheService.createTokenCacheKey(tokens);
|
|
74
75
|
return StyleCacheService.getCachedStyles(
|
|
75
76
|
'PrivacyPolicyScreen',
|
|
76
|
-
|
|
77
|
-
createPrivacyPolicyStyles
|
|
77
|
+
cacheKey,
|
|
78
|
+
() => createPrivacyPolicyStyles(tokens)
|
|
78
79
|
);
|
|
79
|
-
}, []);
|
|
80
|
+
}, [tokens]);
|
|
80
81
|
|
|
81
82
|
// Memoize URL press handler to prevent child re-renders
|
|
82
83
|
const handleUrlPress = React.useCallback(async () => {
|
|
@@ -170,7 +171,7 @@ export const PrivacyPolicyScreen: React.FC<PrivacyPolicyScreenProps> = React.mem
|
|
|
170
171
|
);
|
|
171
172
|
});
|
|
172
173
|
|
|
173
|
-
const createPrivacyPolicyStyles = () => {
|
|
174
|
+
const createPrivacyPolicyStyles = (tokens: any) => {
|
|
174
175
|
return StyleSheet.create({
|
|
175
176
|
container: {
|
|
176
177
|
flex: 1,
|
|
@@ -187,6 +188,7 @@ const createPrivacyPolicyStyles = () => {
|
|
|
187
188
|
},
|
|
188
189
|
text: {
|
|
189
190
|
lineHeight: 24,
|
|
191
|
+
fontSize: tokens.typography.bodyMedium.responsiveFontSize,
|
|
190
192
|
},
|
|
191
193
|
urlContainer: {
|
|
192
194
|
marginTop: 32,
|
|
@@ -195,6 +197,7 @@ const createPrivacyPolicyStyles = () => {
|
|
|
195
197
|
urlText: {
|
|
196
198
|
marginBottom: 16,
|
|
197
199
|
textAlign: "center",
|
|
200
|
+
fontSize: tokens.typography.bodyMedium.responsiveFontSize,
|
|
198
201
|
},
|
|
199
202
|
urlButton: {
|
|
200
203
|
marginTop: 8,
|
|
@@ -71,12 +71,13 @@ export const TermsOfServiceScreen: React.FC<TermsOfServiceScreenProps> = React.m
|
|
|
71
71
|
|
|
72
72
|
// Use cached styles
|
|
73
73
|
const styles = React.useMemo(() => {
|
|
74
|
+
const cacheKey = StyleCacheService.createTokenCacheKey(tokens);
|
|
74
75
|
return StyleCacheService.getCachedStyles(
|
|
75
76
|
'TermsOfServiceScreen',
|
|
76
|
-
|
|
77
|
-
createTermsOfServiceStyles
|
|
77
|
+
cacheKey,
|
|
78
|
+
() => createTermsOfServiceStyles(tokens)
|
|
78
79
|
);
|
|
79
|
-
}, []);
|
|
80
|
+
}, [tokens]);
|
|
80
81
|
|
|
81
82
|
// Memoize URL press handler to prevent child re-renders
|
|
82
83
|
const handleUrlPress = React.useCallback(async () => {
|
|
@@ -170,7 +171,7 @@ export const TermsOfServiceScreen: React.FC<TermsOfServiceScreenProps> = React.m
|
|
|
170
171
|
);
|
|
171
172
|
});
|
|
172
173
|
|
|
173
|
-
const createTermsOfServiceStyles = () => {
|
|
174
|
+
const createTermsOfServiceStyles = (tokens: any) => {
|
|
174
175
|
return StyleSheet.create({
|
|
175
176
|
container: {
|
|
176
177
|
flex: 1,
|
|
@@ -187,6 +188,7 @@ const createTermsOfServiceStyles = () => {
|
|
|
187
188
|
},
|
|
188
189
|
text: {
|
|
189
190
|
lineHeight: 24,
|
|
191
|
+
fontSize: tokens.typography.bodyMedium.responsiveFontSize,
|
|
190
192
|
},
|
|
191
193
|
urlContainer: {
|
|
192
194
|
marginTop: 32,
|
|
@@ -195,6 +197,7 @@ const createTermsOfServiceStyles = () => {
|
|
|
195
197
|
urlText: {
|
|
196
198
|
marginBottom: 16,
|
|
197
199
|
textAlign: "center",
|
|
200
|
+
fontSize: tokens.typography.bodyMedium.responsiveFontSize,
|
|
198
201
|
},
|
|
199
202
|
urlButton: {
|
|
200
203
|
marginTop: 8,
|
|
@@ -24,10 +24,14 @@ export const StarRating: React.FC<StarRatingProps> = ({
|
|
|
24
24
|
style,
|
|
25
25
|
}) => {
|
|
26
26
|
const tokens = useAppDesignTokens();
|
|
27
|
+
const styles = getStyles(tokens);
|
|
27
28
|
const [internalRating, setInternalRating] = useState(rating);
|
|
28
29
|
|
|
29
30
|
const filledColor = activeColor || tokens.colors.warning || "#FFD700";
|
|
30
31
|
const emptyColor = inactiveColor || tokens.colors.border || "#E0E0E0";
|
|
32
|
+
|
|
33
|
+
// Scale the size
|
|
34
|
+
const responsiveSize = size;
|
|
31
35
|
|
|
32
36
|
const handlePress = (index: number) => {
|
|
33
37
|
if (disabled) return;
|
|
@@ -48,7 +52,7 @@ export const StarRating: React.FC<StarRatingProps> = ({
|
|
|
48
52
|
>
|
|
49
53
|
<AtomicIcon
|
|
50
54
|
name={index < (onRatingChange ? internalRating : rating) ? "star" : "star-outline"}
|
|
51
|
-
customSize={
|
|
55
|
+
customSize={responsiveSize}
|
|
52
56
|
customColor={index < (onRatingChange ? internalRating : rating) ? filledColor : emptyColor}
|
|
53
57
|
/>
|
|
54
58
|
</TouchableOpacity>
|
|
@@ -57,7 +61,8 @@ export const StarRating: React.FC<StarRatingProps> = ({
|
|
|
57
61
|
);
|
|
58
62
|
};
|
|
59
63
|
|
|
60
|
-
const
|
|
64
|
+
const getStyles = (tokens: ReturnType<typeof useAppDesignTokens>) =>
|
|
65
|
+
StyleSheet.create({
|
|
61
66
|
container: {
|
|
62
67
|
flexDirection: "row",
|
|
63
68
|
alignItems: "center",
|
|
@@ -20,6 +20,7 @@ export const VideoTutorialCard: React.FC<VideoTutorialCardProps> = ({
|
|
|
20
20
|
horizontal = false,
|
|
21
21
|
}) => {
|
|
22
22
|
const tokens = useAppDesignTokens();
|
|
23
|
+
const styles = getStyles(tokens);
|
|
23
24
|
|
|
24
25
|
const formatDuration = (seconds: number): string => {
|
|
25
26
|
const minutes = Math.floor(seconds / 60);
|
|
@@ -107,7 +108,8 @@ export const VideoTutorialCard: React.FC<VideoTutorialCardProps> = ({
|
|
|
107
108
|
);
|
|
108
109
|
};
|
|
109
110
|
|
|
110
|
-
const
|
|
111
|
+
const getStyles = (tokens: ReturnType<typeof useAppDesignTokens>) =>
|
|
112
|
+
StyleSheet.create({
|
|
111
113
|
container: {
|
|
112
114
|
borderRadius: 12,
|
|
113
115
|
borderWidth: 1,
|
|
@@ -158,20 +160,20 @@ const styles = StyleSheet.create({
|
|
|
158
160
|
padding: 12,
|
|
159
161
|
},
|
|
160
162
|
title: {
|
|
161
|
-
fontSize:
|
|
163
|
+
fontSize: tokens.typography.titleMedium.responsiveFontSize,
|
|
162
164
|
fontWeight: "600",
|
|
163
165
|
marginBottom: 6,
|
|
164
166
|
},
|
|
165
167
|
horizontalTitle: {
|
|
166
|
-
fontSize:
|
|
168
|
+
fontSize: tokens.typography.bodyLarge.responsiveFontSize,
|
|
167
169
|
},
|
|
168
170
|
description: {
|
|
169
|
-
fontSize:
|
|
171
|
+
fontSize: tokens.typography.bodyMedium.responsiveFontSize,
|
|
170
172
|
lineHeight: 20,
|
|
171
173
|
marginBottom: 8,
|
|
172
174
|
},
|
|
173
175
|
horizontalDescription: {
|
|
174
|
-
fontSize:
|
|
176
|
+
fontSize: tokens.typography.bodySmall.responsiveFontSize,
|
|
175
177
|
lineHeight: 16,
|
|
176
178
|
marginBottom: 6,
|
|
177
179
|
},
|
|
@@ -183,9 +185,11 @@ const styles = StyleSheet.create({
|
|
|
183
185
|
category: {
|
|
184
186
|
fontSize: 12,
|
|
185
187
|
textTransform: "capitalize",
|
|
188
|
+
fontWeight: "500",
|
|
186
189
|
},
|
|
187
190
|
difficulty: {
|
|
188
191
|
fontSize: 12,
|
|
189
192
|
textTransform: "capitalize",
|
|
193
|
+
fontWeight: "500",
|
|
190
194
|
},
|
|
191
195
|
});
|
|
@@ -68,6 +68,7 @@ export const VideoTutorialsScreen: React.FC<VideoTutorialsScreenProps> =
|
|
|
68
68
|
customFeaturedTutorials,
|
|
69
69
|
}) => {
|
|
70
70
|
const tokens = useAppDesignTokens();
|
|
71
|
+
const styles = getStyles(tokens);
|
|
71
72
|
|
|
72
73
|
const featuredQuery = useFeaturedTutorials(maxFeaturedCount);
|
|
73
74
|
const allQuery = useVideoTutorials();
|
|
@@ -169,9 +170,10 @@ export const VideoTutorialsScreen: React.FC<VideoTutorialsScreenProps> =
|
|
|
169
170
|
},
|
|
170
171
|
);
|
|
171
172
|
|
|
172
|
-
const
|
|
173
|
+
const getStyles = (tokens: ReturnType<typeof useAppDesignTokens>) =>
|
|
174
|
+
StyleSheet.create({
|
|
173
175
|
title: {
|
|
174
|
-
fontSize:
|
|
176
|
+
fontSize: tokens.typography.headlineLarge.responsiveFontSize,
|
|
175
177
|
fontWeight: "600",
|
|
176
178
|
marginBottom: 24,
|
|
177
179
|
},
|
|
@@ -179,7 +181,7 @@ const styles = StyleSheet.create({
|
|
|
179
181
|
marginBottom: 24,
|
|
180
182
|
},
|
|
181
183
|
sectionTitle: {
|
|
182
|
-
fontSize:
|
|
184
|
+
fontSize: tokens.typography.titleLarge.responsiveFontSize,
|
|
183
185
|
fontWeight: "500",
|
|
184
186
|
marginBottom: 12,
|
|
185
187
|
},
|