@umituz/react-native-settings 4.21.19 → 4.21.21
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 +1 -1
- package/src/domains/about/presentation/components/AboutContent.tsx +3 -4
- package/src/domains/about/presentation/components/AboutHeader.tsx +7 -14
- package/src/domains/about/presentation/components/AboutSection.tsx +2 -2
- package/src/domains/about/presentation/components/AboutSettingItem.tsx +16 -16
- package/src/domains/appearance/presentation/components/AppearanceSection.tsx +2 -2
- package/src/domains/appearance/presentation/screens/AppearanceScreen.tsx +3 -4
- package/src/domains/faqs/presentation/components/FAQEmptyState.tsx +2 -2
- package/src/domains/gamification/components/AchievementCard.tsx +26 -19
- package/src/domains/gamification/components/AchievementItem.tsx +27 -25
- package/src/domains/gamification/components/AchievementToast.tsx +16 -12
- package/src/domains/gamification/components/GamificationScreen/AchievementsList.tsx +6 -5
- package/src/domains/gamification/components/GamificationScreen/Header.tsx +4 -3
- package/src/domains/gamification/components/GamificationScreen/StatsGrid.tsx +4 -3
- package/src/domains/gamification/components/GamificationScreen/index.tsx +38 -28
- package/src/domains/gamification/components/LevelProgress.tsx +25 -18
- package/src/domains/gamification/components/PointsBadge.tsx +13 -9
- package/src/domains/gamification/components/StatsCard.tsx +20 -14
- package/src/domains/gamification/components/StreakDisplay.tsx +28 -22
- package/src/domains/legal/presentation/components/LegalSection.tsx +2 -2
- package/src/domains/notifications/presentation/components/NotificationsSection.tsx +2 -4
- package/src/domains/notifications/presentation/screens/NotificationSettingsScreen.tsx +3 -4
- package/src/domains/rating/presentation/components/StarRating.tsx +2 -2
- package/src/domains/video-tutorials/presentation/components/VideoTutorialCard.tsx +35 -127
- package/src/domains/video-tutorials/presentation/screens/VideoTutorialsScreen.tsx +88 -153
- package/src/presentation/components/SettingsItemCard.tsx +3 -22
- package/src/presentation/navigation/SettingsStackNavigator.tsx +112 -100
- package/src/presentation/screens/SettingsScreen.tsx +2 -2
- package/src/presentation/screens/components/GamificationSettingsItem.tsx +3 -3
- package/src/presentation/screens/components/SettingsHeader.tsx +2 -3
- package/src/presentation/screens/components/SubscriptionSettingsItem.tsx +2 -2
- package/src/presentation/screens/components/WalletSettingsItem.tsx +2 -2
- package/src/presentation/screens/components/sections/FeatureSettingsSection.tsx +2 -2
- package/src/presentation/screens/components/sections/ProfileSectionLoader.tsx +2 -2
- package/src/presentation/screens/components/sections/SupportSettingsSection.tsx +2 -2
- package/src/presentation/screens/types/SettingsConfig.ts +2 -2
- package/src/presentation/screens/types/UserFeatureConfig.ts +2 -2
- package/src/presentation/screens/types/index.ts +2 -0
- package/src/presentation/screens/utils/normalizeConfig.ts +2 -2
|
@@ -1,11 +1,12 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
/**
|
|
2
3
|
* GamificationScreen Component
|
|
3
4
|
* Full gamification screen - all text via props
|
|
4
5
|
* Generic for 100+ apps - NO hardcoded strings
|
|
5
6
|
*/
|
|
6
7
|
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
8
|
+
import { View, ScrollView, StyleSheet } from "react-native";
|
|
9
|
+
import { useAppDesignTokens, AtomicText } from "@umituz/react-native-design-system";
|
|
9
10
|
import { LevelProgress } from "../LevelProgress";
|
|
10
11
|
import { StreakDisplay } from "../StreakDisplay";
|
|
11
12
|
import { Header } from "./Header";
|
|
@@ -30,15 +31,24 @@ export const GamificationScreen: React.FC<GamificationScreenProps> = ({
|
|
|
30
31
|
headerStyle,
|
|
31
32
|
titleStyle,
|
|
32
33
|
sectionTitleStyle,
|
|
33
|
-
accentColor
|
|
34
|
-
backgroundColor
|
|
35
|
-
cardBackgroundColor
|
|
36
|
-
textColor
|
|
37
|
-
subtextColor
|
|
34
|
+
accentColor,
|
|
35
|
+
backgroundColor,
|
|
36
|
+
cardBackgroundColor,
|
|
37
|
+
textColor,
|
|
38
|
+
subtextColor,
|
|
38
39
|
headerComponent,
|
|
39
40
|
}) => {
|
|
41
|
+
const tokens = useAppDesignTokens();
|
|
42
|
+
|
|
43
|
+
// Use tokens for fallbacks
|
|
44
|
+
const finalAccentColor = accentColor || tokens.colors.primary;
|
|
45
|
+
const finalBackgroundColor = backgroundColor || tokens.colors.backgroundPrimary;
|
|
46
|
+
const finalCardBackgroundColor = cardBackgroundColor || tokens.colors.surface;
|
|
47
|
+
const finalTextColor = textColor || tokens.colors.textPrimary;
|
|
48
|
+
const finalSubtextColor = subtextColor || tokens.colors.textSecondary;
|
|
49
|
+
|
|
40
50
|
return (
|
|
41
|
-
<View style={[styles.container, { backgroundColor }, containerStyle]}>
|
|
51
|
+
<View style={[styles.container, { backgroundColor: finalBackgroundColor }, containerStyle]}>
|
|
42
52
|
{headerComponent}
|
|
43
53
|
|
|
44
54
|
<ScrollView
|
|
@@ -51,34 +61,34 @@ export const GamificationScreen: React.FC<GamificationScreenProps> = ({
|
|
|
51
61
|
title={title}
|
|
52
62
|
headerStyle={headerStyle}
|
|
53
63
|
titleStyle={titleStyle}
|
|
54
|
-
textColor={
|
|
64
|
+
textColor={finalTextColor}
|
|
55
65
|
/>
|
|
56
66
|
|
|
57
67
|
{/* Level Progress */}
|
|
58
68
|
<View style={styles.section}>
|
|
59
69
|
<LevelProgress
|
|
60
70
|
{...levelProps}
|
|
61
|
-
primaryColor={
|
|
62
|
-
backgroundColor={
|
|
63
|
-
textColor={
|
|
64
|
-
subtextColor={
|
|
71
|
+
primaryColor={finalAccentColor}
|
|
72
|
+
backgroundColor={finalCardBackgroundColor}
|
|
73
|
+
textColor={finalTextColor}
|
|
74
|
+
subtextColor={finalSubtextColor}
|
|
65
75
|
/>
|
|
66
76
|
</View>
|
|
67
77
|
|
|
68
78
|
{/* Streak (if provided) */}
|
|
69
79
|
{streakProps && (
|
|
70
80
|
<View style={styles.section}>
|
|
71
|
-
<
|
|
72
|
-
style={[styles.sectionTitle, { color:
|
|
81
|
+
<AtomicText
|
|
82
|
+
style={[styles.sectionTitle, { color: finalTextColor }, sectionTitleStyle]}
|
|
73
83
|
>
|
|
74
84
|
{streakTitle}
|
|
75
|
-
</
|
|
85
|
+
</AtomicText>
|
|
76
86
|
<StreakDisplay
|
|
77
87
|
{...streakProps}
|
|
78
|
-
primaryColor={
|
|
79
|
-
backgroundColor={
|
|
80
|
-
textColor={
|
|
81
|
-
subtextColor={
|
|
88
|
+
primaryColor={finalAccentColor}
|
|
89
|
+
backgroundColor={finalCardBackgroundColor}
|
|
90
|
+
textColor={finalTextColor}
|
|
91
|
+
subtextColor={finalSubtextColor}
|
|
82
92
|
/>
|
|
83
93
|
</View>
|
|
84
94
|
)}
|
|
@@ -87,10 +97,10 @@ export const GamificationScreen: React.FC<GamificationScreenProps> = ({
|
|
|
87
97
|
<StatsGrid
|
|
88
98
|
statsTitle={statsTitle}
|
|
89
99
|
stats={stats}
|
|
90
|
-
accentColor={
|
|
91
|
-
cardBackgroundColor={
|
|
92
|
-
textColor={
|
|
93
|
-
subtextColor={
|
|
100
|
+
accentColor={finalAccentColor}
|
|
101
|
+
cardBackgroundColor={finalCardBackgroundColor}
|
|
102
|
+
textColor={finalTextColor}
|
|
103
|
+
subtextColor={finalSubtextColor}
|
|
94
104
|
sectionTitleStyle={sectionTitleStyle}
|
|
95
105
|
/>
|
|
96
106
|
|
|
@@ -99,10 +109,10 @@ export const GamificationScreen: React.FC<GamificationScreenProps> = ({
|
|
|
99
109
|
achievementsTitle={achievementsTitle}
|
|
100
110
|
achievements={achievements}
|
|
101
111
|
emptyAchievementsText={emptyAchievementsText}
|
|
102
|
-
accentColor={
|
|
103
|
-
cardBackgroundColor={
|
|
104
|
-
textColor={
|
|
105
|
-
subtextColor={
|
|
112
|
+
accentColor={finalAccentColor}
|
|
113
|
+
cardBackgroundColor={finalCardBackgroundColor}
|
|
114
|
+
textColor={finalTextColor}
|
|
115
|
+
subtextColor={finalSubtextColor}
|
|
106
116
|
sectionTitleStyle={sectionTitleStyle}
|
|
107
117
|
/>
|
|
108
118
|
</ScrollView>
|
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import React from "react";
|
|
7
|
-
import { View,
|
|
7
|
+
import { View, StyleSheet, type ViewStyle, type TextStyle } from "react-native";
|
|
8
|
+
import { useAppDesignTokens, AtomicText, withAlpha } from "@umituz/react-native-design-system";
|
|
8
9
|
|
|
9
10
|
export interface LevelProgressProps {
|
|
10
11
|
level: number;
|
|
@@ -13,7 +14,6 @@ export interface LevelProgressProps {
|
|
|
13
14
|
pointsToNext: number;
|
|
14
15
|
progress: number;
|
|
15
16
|
showPoints?: boolean;
|
|
16
|
-
// Customization
|
|
17
17
|
containerStyle?: ViewStyle;
|
|
18
18
|
titleStyle?: TextStyle;
|
|
19
19
|
subtitleStyle?: TextStyle;
|
|
@@ -21,7 +21,6 @@ export interface LevelProgressProps {
|
|
|
21
21
|
progressFillStyle?: ViewStyle;
|
|
22
22
|
badgeStyle?: ViewStyle;
|
|
23
23
|
badgeTextStyle?: TextStyle;
|
|
24
|
-
// Colors (design system integration)
|
|
25
24
|
primaryColor?: string;
|
|
26
25
|
secondaryColor?: string;
|
|
27
26
|
backgroundColor?: string;
|
|
@@ -43,38 +42,46 @@ export const LevelProgress: React.FC<LevelProgressProps> = ({
|
|
|
43
42
|
progressFillStyle,
|
|
44
43
|
badgeStyle,
|
|
45
44
|
badgeTextStyle,
|
|
46
|
-
primaryColor
|
|
47
|
-
secondaryColor
|
|
48
|
-
backgroundColor
|
|
49
|
-
textColor
|
|
50
|
-
subtextColor
|
|
45
|
+
primaryColor,
|
|
46
|
+
secondaryColor,
|
|
47
|
+
backgroundColor,
|
|
48
|
+
textColor,
|
|
49
|
+
subtextColor,
|
|
51
50
|
}) => {
|
|
51
|
+
const tokens = useAppDesignTokens();
|
|
52
|
+
|
|
53
|
+
const finalPrimaryColor = primaryColor || tokens.colors.primary;
|
|
54
|
+
const finalSecondaryColor = secondaryColor || tokens.colors.surfaceSecondary;
|
|
55
|
+
const finalBackgroundColor = backgroundColor || tokens.colors.surface;
|
|
56
|
+
const finalTextColor = textColor || tokens.colors.textPrimary;
|
|
57
|
+
const finalSubtextColor = subtextColor || tokens.colors.textSecondary;
|
|
58
|
+
|
|
52
59
|
return (
|
|
53
|
-
<View style={[styles.container, { backgroundColor }, containerStyle]}>
|
|
60
|
+
<View style={[styles.container, { backgroundColor: finalBackgroundColor }, containerStyle]}>
|
|
54
61
|
<View style={styles.header}>
|
|
55
62
|
<View style={styles.titleSection}>
|
|
56
|
-
<
|
|
63
|
+
<AtomicText style={[styles.levelTitle, { color: finalTextColor }, titleStyle]}>
|
|
57
64
|
{levelTitle}
|
|
58
|
-
</
|
|
65
|
+
</AtomicText>
|
|
59
66
|
{showPoints && (
|
|
60
|
-
<
|
|
67
|
+
<AtomicText style={[styles.subtitle, { color: finalSubtextColor }, subtitleStyle]}>
|
|
61
68
|
{points} / {points + pointsToNext}
|
|
62
|
-
</
|
|
69
|
+
</AtomicText>
|
|
63
70
|
)}
|
|
64
71
|
</View>
|
|
65
72
|
|
|
66
|
-
<View style={[styles.badge, { backgroundColor:
|
|
67
|
-
<
|
|
73
|
+
<View style={[styles.badge, { backgroundColor: withAlpha(finalPrimaryColor, 0.2), borderColor: withAlpha(finalPrimaryColor, 0.4) }, badgeStyle]}>
|
|
74
|
+
<AtomicText style={[styles.badgeText, { color: finalPrimaryColor }, badgeTextStyle]}>
|
|
68
75
|
{level}
|
|
69
|
-
</
|
|
76
|
+
</AtomicText>
|
|
70
77
|
</View>
|
|
71
78
|
</View>
|
|
72
79
|
|
|
73
|
-
<View style={[styles.progressBar, { backgroundColor:
|
|
80
|
+
<View style={[styles.progressBar, { backgroundColor: finalSecondaryColor }, progressBarStyle]}>
|
|
74
81
|
<View
|
|
75
82
|
style={[
|
|
76
83
|
styles.progressFill,
|
|
77
|
-
{ width: `${Math.min(100, progress)}%`, backgroundColor:
|
|
84
|
+
{ width: `${Math.min(100, progress)}%`, backgroundColor: finalPrimaryColor },
|
|
78
85
|
progressFillStyle,
|
|
79
86
|
]}
|
|
80
87
|
/>
|
|
@@ -4,15 +4,14 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import React from "react";
|
|
7
|
-
import { View,
|
|
7
|
+
import { View, StyleSheet, type ViewStyle, type TextStyle } from "react-native";
|
|
8
|
+
import { useAppDesignTokens, AtomicText, withAlpha } from "@umituz/react-native-design-system";
|
|
8
9
|
|
|
9
10
|
export interface PointsBadgeProps {
|
|
10
11
|
points: number;
|
|
11
12
|
icon?: React.ReactNode;
|
|
12
|
-
// Customization
|
|
13
13
|
containerStyle?: ViewStyle;
|
|
14
14
|
textStyle?: TextStyle;
|
|
15
|
-
// Colors
|
|
16
15
|
backgroundColor?: string;
|
|
17
16
|
textColor?: string;
|
|
18
17
|
borderColor?: string;
|
|
@@ -23,22 +22,27 @@ export const PointsBadge: React.FC<PointsBadgeProps> = ({
|
|
|
23
22
|
icon,
|
|
24
23
|
containerStyle,
|
|
25
24
|
textStyle,
|
|
26
|
-
backgroundColor
|
|
27
|
-
textColor
|
|
28
|
-
borderColor
|
|
25
|
+
backgroundColor,
|
|
26
|
+
textColor,
|
|
27
|
+
borderColor,
|
|
29
28
|
}) => {
|
|
29
|
+
const tokens = useAppDesignTokens();
|
|
30
|
+
const finalTextColor = textColor || tokens.colors.primary;
|
|
31
|
+
const finalBackgroundColor = backgroundColor || withAlpha(finalTextColor, 0.1);
|
|
32
|
+
const finalBorderColor = borderColor || withAlpha(finalTextColor, 0.2);
|
|
33
|
+
|
|
30
34
|
return (
|
|
31
35
|
<View
|
|
32
36
|
style={[
|
|
33
37
|
styles.container,
|
|
34
|
-
{ backgroundColor, borderColor },
|
|
38
|
+
{ backgroundColor: finalBackgroundColor, borderColor: finalBorderColor },
|
|
35
39
|
containerStyle,
|
|
36
40
|
]}
|
|
37
41
|
>
|
|
38
42
|
{icon}
|
|
39
|
-
<
|
|
43
|
+
<AtomicText style={[styles.text, { color: finalTextColor }, textStyle]}>
|
|
40
44
|
{points}
|
|
41
|
-
</
|
|
45
|
+
</AtomicText>
|
|
42
46
|
</View>
|
|
43
47
|
);
|
|
44
48
|
};
|
|
@@ -4,18 +4,17 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import React from "react";
|
|
7
|
-
import { View,
|
|
7
|
+
import { View, StyleSheet, type ViewStyle, type TextStyle } from "react-native";
|
|
8
|
+
import { useAppDesignTokens, AtomicText, withAlpha } from "@umituz/react-native-design-system";
|
|
8
9
|
|
|
9
10
|
export interface StatsCardProps {
|
|
10
11
|
value: number;
|
|
11
12
|
label: string;
|
|
12
13
|
icon: React.ReactNode;
|
|
13
14
|
suffix?: string;
|
|
14
|
-
// Customization
|
|
15
15
|
containerStyle?: ViewStyle;
|
|
16
16
|
valueStyle?: TextStyle;
|
|
17
17
|
labelStyle?: TextStyle;
|
|
18
|
-
// Colors
|
|
19
18
|
accentColor?: string;
|
|
20
19
|
backgroundColor?: string;
|
|
21
20
|
textColor?: string;
|
|
@@ -30,27 +29,34 @@ export const StatsCard: React.FC<StatsCardProps> = ({
|
|
|
30
29
|
containerStyle,
|
|
31
30
|
valueStyle,
|
|
32
31
|
labelStyle,
|
|
33
|
-
accentColor
|
|
34
|
-
backgroundColor
|
|
35
|
-
textColor
|
|
36
|
-
subtextColor
|
|
32
|
+
accentColor,
|
|
33
|
+
backgroundColor,
|
|
34
|
+
textColor,
|
|
35
|
+
subtextColor,
|
|
37
36
|
}) => {
|
|
37
|
+
const tokens = useAppDesignTokens();
|
|
38
|
+
|
|
39
|
+
const finalAccentColor = accentColor || tokens.colors.primary;
|
|
40
|
+
const finalBackgroundColor = backgroundColor || tokens.colors.surface;
|
|
41
|
+
const finalTextColor = textColor || tokens.colors.textPrimary;
|
|
42
|
+
const finalSubtextColor = subtextColor || tokens.colors.textSecondary;
|
|
43
|
+
|
|
38
44
|
return (
|
|
39
|
-
<View style={[styles.container, { backgroundColor }, containerStyle]}>
|
|
40
|
-
<View style={[styles.iconContainer, { backgroundColor:
|
|
45
|
+
<View style={[styles.container, { backgroundColor: finalBackgroundColor }, containerStyle]}>
|
|
46
|
+
<View style={[styles.iconContainer, { backgroundColor: withAlpha(finalAccentColor, 0.15) }]}>
|
|
41
47
|
{icon}
|
|
42
48
|
</View>
|
|
43
49
|
<View style={styles.valueRow}>
|
|
44
|
-
<
|
|
50
|
+
<AtomicText style={[styles.value, { color: finalTextColor }, valueStyle]}>
|
|
45
51
|
{value}
|
|
46
|
-
</
|
|
52
|
+
</AtomicText>
|
|
47
53
|
{suffix && (
|
|
48
|
-
<
|
|
54
|
+
<AtomicText style={[styles.suffix, { color: finalSubtextColor }]}>{suffix}</AtomicText>
|
|
49
55
|
)}
|
|
50
56
|
</View>
|
|
51
|
-
<
|
|
57
|
+
<AtomicText style={[styles.label, { color: finalSubtextColor }, labelStyle]}>
|
|
52
58
|
{label}
|
|
53
|
-
</
|
|
59
|
+
</AtomicText>
|
|
54
60
|
</View>
|
|
55
61
|
);
|
|
56
62
|
};
|
|
@@ -4,20 +4,19 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import React from "react";
|
|
7
|
-
import { View,
|
|
7
|
+
import { View, StyleSheet, type ViewStyle, type TextStyle } from "react-native";
|
|
8
|
+
import { useAppDesignTokens, AtomicText, withAlpha } from "@umituz/react-native-design-system";
|
|
8
9
|
|
|
9
10
|
export interface StreakDisplayProps {
|
|
10
11
|
current: number;
|
|
11
12
|
longest: number;
|
|
12
|
-
currentLabel: string;
|
|
13
|
-
bestLabel: string;
|
|
14
|
-
daysLabel: string;
|
|
13
|
+
currentLabel: string;
|
|
14
|
+
bestLabel: string;
|
|
15
|
+
daysLabel: string;
|
|
15
16
|
icon?: React.ReactNode;
|
|
16
|
-
// Customization
|
|
17
17
|
containerStyle?: ViewStyle;
|
|
18
18
|
numberStyle?: TextStyle;
|
|
19
19
|
labelStyle?: TextStyle;
|
|
20
|
-
// Colors
|
|
21
20
|
primaryColor?: string;
|
|
22
21
|
backgroundColor?: string;
|
|
23
22
|
textColor?: string;
|
|
@@ -34,35 +33,42 @@ export const StreakDisplay: React.FC<StreakDisplayProps> = ({
|
|
|
34
33
|
containerStyle,
|
|
35
34
|
numberStyle,
|
|
36
35
|
labelStyle,
|
|
37
|
-
primaryColor
|
|
38
|
-
backgroundColor
|
|
39
|
-
textColor
|
|
40
|
-
subtextColor
|
|
36
|
+
primaryColor,
|
|
37
|
+
backgroundColor,
|
|
38
|
+
textColor,
|
|
39
|
+
subtextColor,
|
|
41
40
|
}) => {
|
|
41
|
+
const tokens = useAppDesignTokens();
|
|
42
|
+
|
|
43
|
+
const finalPrimaryColor = primaryColor || tokens.colors.primary;
|
|
44
|
+
const finalBackgroundColor = backgroundColor || tokens.colors.surface;
|
|
45
|
+
const finalTextColor = textColor || tokens.colors.textPrimary;
|
|
46
|
+
const finalSubtextColor = subtextColor || tokens.colors.textSecondary;
|
|
47
|
+
|
|
42
48
|
return (
|
|
43
|
-
<View style={[styles.container, { backgroundColor }, containerStyle]}>
|
|
49
|
+
<View style={[styles.container, { backgroundColor: finalBackgroundColor }, containerStyle]}>
|
|
44
50
|
<View style={styles.mainStreak}>
|
|
45
51
|
{icon && <View style={styles.iconContainer}>{icon}</View>}
|
|
46
52
|
<View style={styles.streakInfo}>
|
|
47
|
-
<
|
|
53
|
+
<AtomicText style={[styles.number, { color: finalPrimaryColor }, numberStyle]}>
|
|
48
54
|
{current}
|
|
49
|
-
</
|
|
50
|
-
<
|
|
55
|
+
</AtomicText>
|
|
56
|
+
<AtomicText style={[styles.label, { color: finalSubtextColor }, labelStyle]}>
|
|
51
57
|
{daysLabel}
|
|
52
|
-
</
|
|
58
|
+
</AtomicText>
|
|
53
59
|
</View>
|
|
54
|
-
<
|
|
60
|
+
<AtomicText style={[styles.currentLabel, { color: finalTextColor }]}>
|
|
55
61
|
{currentLabel}
|
|
56
|
-
</
|
|
62
|
+
</AtomicText>
|
|
57
63
|
</View>
|
|
58
64
|
|
|
59
|
-
<View style={[styles.bestStreak, { backgroundColor:
|
|
60
|
-
<
|
|
65
|
+
<View style={[styles.bestStreak, { backgroundColor: withAlpha(finalPrimaryColor, 0.2) }]}>
|
|
66
|
+
<AtomicText style={[styles.bestLabel, { color: finalSubtextColor }]}>
|
|
61
67
|
{bestLabel}
|
|
62
|
-
</
|
|
63
|
-
<
|
|
68
|
+
</AtomicText>
|
|
69
|
+
<AtomicText style={[styles.bestNumber, { color: finalPrimaryColor }]}>
|
|
64
70
|
{longest}
|
|
65
|
-
</
|
|
71
|
+
</AtomicText>
|
|
66
72
|
</View>
|
|
67
73
|
</View>
|
|
68
74
|
);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ViewStyle } from 'react-native';
|
|
3
|
-
import {
|
|
3
|
+
import { useAppNavigation } from '@umituz/react-native-design-system';
|
|
4
4
|
import { LegalConfig } from '../../domain/entities/LegalConfig';
|
|
5
5
|
import { SettingsItemCard } from '../../../../presentation/components/SettingsItemCard';
|
|
6
6
|
|
|
@@ -21,7 +21,7 @@ export const LegalSection: React.FC<LegalSectionProps> = ({
|
|
|
21
21
|
description: propsDescription,
|
|
22
22
|
sectionTitle: propsSectionTitle,
|
|
23
23
|
}) => {
|
|
24
|
-
const navigation =
|
|
24
|
+
const navigation = useAppNavigation();
|
|
25
25
|
|
|
26
26
|
const route = config?.route || config?.defaultRoute || 'Legal';
|
|
27
27
|
const title = propsTitle || config?.title;
|
|
@@ -6,11 +6,9 @@
|
|
|
6
6
|
import React, { useCallback, useMemo } from 'react';
|
|
7
7
|
import type { StyleProp, ViewStyle } from 'react-native';
|
|
8
8
|
import { View, TouchableOpacity, StyleSheet } from 'react-native';
|
|
9
|
-
import { AtomicText, AtomicIcon } from '@umituz/react-native-design-system';
|
|
9
|
+
import { AtomicText, AtomicIcon, useAppNavigation } from '@umituz/react-native-design-system';
|
|
10
10
|
import { useAppDesignTokens } from '@umituz/react-native-design-system';
|
|
11
11
|
// @ts-ignore - Optional peer dependency
|
|
12
|
-
import { useNavigation } from '@react-navigation/native';
|
|
13
|
-
// @ts-ignore - Optional peer dependency
|
|
14
12
|
import { useLocalization } from '@umituz/react-native-localization';
|
|
15
13
|
|
|
16
14
|
export interface NotificationsSectionConfig {
|
|
@@ -29,7 +27,7 @@ export const NotificationsSection: React.FC<NotificationsSectionProps> = ({
|
|
|
29
27
|
config,
|
|
30
28
|
containerStyle,
|
|
31
29
|
}) => {
|
|
32
|
-
const navigation =
|
|
30
|
+
const navigation = useAppNavigation();
|
|
33
31
|
const { t } = useLocalization();
|
|
34
32
|
const tokens = useAppDesignTokens();
|
|
35
33
|
const styles = useMemo(() => createStyles(tokens), [tokens]);
|
|
@@ -5,14 +5,13 @@
|
|
|
5
5
|
|
|
6
6
|
import React from 'react';
|
|
7
7
|
import { View } from 'react-native';
|
|
8
|
-
// @ts-ignore - Optional peer dependency
|
|
9
|
-
import { useNavigation } from '@react-navigation/native';
|
|
10
8
|
import {
|
|
11
9
|
AtomicCard,
|
|
12
10
|
ScreenLayout,
|
|
13
11
|
AtomicSpinner,
|
|
14
12
|
NavigationHeader,
|
|
15
|
-
useAppDesignTokens
|
|
13
|
+
useAppDesignTokens,
|
|
14
|
+
useAppNavigation
|
|
16
15
|
} from '@umituz/react-native-design-system';
|
|
17
16
|
import { useLocalization } from '@umituz/react-native-localization';
|
|
18
17
|
import { QuietHoursCard } from '../../quietHours/presentation/components/QuietHoursCard';
|
|
@@ -38,7 +37,7 @@ export const NotificationSettingsScreen: React.FC<NotificationSettingsScreenProp
|
|
|
38
37
|
quietHoursTranslations,
|
|
39
38
|
onHapticFeedback,
|
|
40
39
|
}) => {
|
|
41
|
-
const navigation =
|
|
40
|
+
const navigation = useAppNavigation();
|
|
42
41
|
const tokens = useAppDesignTokens();
|
|
43
42
|
const { t } = useLocalization();
|
|
44
43
|
const styles = createStyles(tokens);
|
|
@@ -27,8 +27,8 @@ export const StarRating: React.FC<StarRatingProps> = ({
|
|
|
27
27
|
const styles = getStyles(tokens);
|
|
28
28
|
const [internalRating, setInternalRating] = useState(rating);
|
|
29
29
|
|
|
30
|
-
const filledColor = activeColor || tokens.colors.warning
|
|
31
|
-
const emptyColor = inactiveColor || tokens.colors.
|
|
30
|
+
const filledColor = activeColor || tokens.colors.warning;
|
|
31
|
+
const emptyColor = inactiveColor || tokens.colors.borderLight;
|
|
32
32
|
|
|
33
33
|
// Scale the size
|
|
34
34
|
const responsiveSize = size;
|