@umituz/react-native-settings 4.20.16 → 4.20.18
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/appearance/presentation/components/ThemeModeSection.tsx +5 -3
- package/src/domains/appearance/presentation/screens/AppearanceScreen.tsx +18 -35
- package/src/domains/appearance/types/index.ts +1 -0
- package/src/domains/feedback/presentation/components/SupportSection.tsx +1 -0
- package/src/presentation/screens/components/sections/SubscriptionSettingsSection.tsx +9 -13
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.18",
|
|
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",
|
|
@@ -15,7 +15,8 @@ export interface ThemeOptionConfig {
|
|
|
15
15
|
title: string;
|
|
16
16
|
subtitle?: string;
|
|
17
17
|
description?: string;
|
|
18
|
-
features
|
|
18
|
+
features?: string[];
|
|
19
|
+
featuresTitle?: string;
|
|
19
20
|
}
|
|
20
21
|
|
|
21
22
|
export interface ThemeModeSectionProps {
|
|
@@ -58,9 +59,10 @@ export const ThemeModeSection: React.FC<ThemeModeSectionProps> = ({
|
|
|
58
59
|
key={theme.mode}
|
|
59
60
|
mode={theme.mode}
|
|
60
61
|
title={theme.title}
|
|
61
|
-
subtitle={theme.subtitle
|
|
62
|
-
description={theme.description
|
|
62
|
+
subtitle={theme.subtitle}
|
|
63
|
+
description={theme.description}
|
|
63
64
|
features={theme.features}
|
|
65
|
+
featuresTitle={theme.featuresTitle}
|
|
64
66
|
isSelected={themeMode === theme.mode}
|
|
65
67
|
onSelect={() => handleThemeSelect(theme.mode)}
|
|
66
68
|
/>
|
|
@@ -64,41 +64,23 @@ export const AppearanceScreen: React.FC<AppearanceScreenProps> = ({
|
|
|
64
64
|
const themeSectionMemo = useMemo(() => {
|
|
65
65
|
if (!showThemeSection) return null;
|
|
66
66
|
|
|
67
|
-
const defaultLightMode: ThemeOptionConfig = {
|
|
68
|
-
mode: "light",
|
|
69
|
-
title: "Light Mode",
|
|
70
|
-
subtitle: "Bright and clean",
|
|
71
|
-
description: "Perfect for daytime use with vibrant colors.",
|
|
72
|
-
features: ["Bright colors", "High contrast", "Easy on eyes during day"],
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
const defaultDarkMode: ThemeOptionConfig = {
|
|
76
|
-
mode: "dark",
|
|
77
|
-
title: "Dark Mode",
|
|
78
|
-
subtitle: "Easy on eyes",
|
|
79
|
-
description: "Ideal for low-light environments.",
|
|
80
|
-
features: ["Reduced eye strain", "Better battery life", "Comfortable at night"],
|
|
81
|
-
};
|
|
82
|
-
|
|
83
67
|
const themes: ThemeOptionConfig[] = [
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
}
|
|
101
|
-
: defaultDarkMode,
|
|
68
|
+
{
|
|
69
|
+
mode: "light",
|
|
70
|
+
title: texts?.lightMode?.title ?? "settings.themeMode.light.title",
|
|
71
|
+
subtitle: texts?.lightMode?.subtitle,
|
|
72
|
+
description: texts?.lightMode?.description,
|
|
73
|
+
features: texts?.lightMode?.features,
|
|
74
|
+
featuresTitle: texts?.featuresSectionTitle,
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
mode: "dark",
|
|
78
|
+
title: texts?.darkMode?.title ?? "settings.themeMode.dark.title",
|
|
79
|
+
subtitle: texts?.darkMode?.subtitle,
|
|
80
|
+
description: texts?.darkMode?.description,
|
|
81
|
+
features: texts?.darkMode?.features,
|
|
82
|
+
featuresTitle: texts?.featuresSectionTitle,
|
|
83
|
+
},
|
|
102
84
|
];
|
|
103
85
|
|
|
104
86
|
return (
|
|
@@ -106,7 +88,7 @@ export const AppearanceScreen: React.FC<AppearanceScreenProps> = ({
|
|
|
106
88
|
tokens={tokens}
|
|
107
89
|
themeMode={themeMode}
|
|
108
90
|
onThemeSelect={handleThemeSelect}
|
|
109
|
-
title={texts?.themeSectionTitle
|
|
91
|
+
title={texts?.themeSectionTitle}
|
|
110
92
|
description={texts?.themeSectionDescription}
|
|
111
93
|
themes={themes}
|
|
112
94
|
/>
|
|
@@ -120,6 +102,7 @@ export const AppearanceScreen: React.FC<AppearanceScreenProps> = ({
|
|
|
120
102
|
texts?.themeSectionDescription,
|
|
121
103
|
texts?.lightMode,
|
|
122
104
|
texts?.darkMode,
|
|
105
|
+
texts?.featuresSectionTitle,
|
|
123
106
|
]);
|
|
124
107
|
|
|
125
108
|
const colorsSectionMemo = useMemo(() => {
|
|
@@ -15,6 +15,7 @@ export interface FeedbackConfig {
|
|
|
15
15
|
description?: string;
|
|
16
16
|
initialType?: FeedbackType;
|
|
17
17
|
onSubmit?: (data: { type: any; rating: number; description: string; title: string }) => Promise<void>;
|
|
18
|
+
onPress?: () => void;
|
|
18
19
|
}
|
|
19
20
|
|
|
20
21
|
export interface RatingConfig {
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import {
|
|
3
|
-
ListItem,
|
|
4
|
-
AtomicBadge,
|
|
5
|
-
} from "@umituz/react-native-design-system";
|
|
6
2
|
import { useLocalization } from "@umituz/react-native-localization";
|
|
7
|
-
import {
|
|
3
|
+
import type { IconName } from "@umituz/react-native-design-system";
|
|
4
|
+
import { SettingsItemCard } from "../../../components/SettingsItemCard";
|
|
8
5
|
import type { SubscriptionConfig } from "../../types";
|
|
9
6
|
|
|
10
7
|
interface SubscriptionSettingsSectionProps {
|
|
@@ -19,13 +16,12 @@ export const SubscriptionSettingsSection: React.FC<SubscriptionSettingsSectionPr
|
|
|
19
16
|
if (!config) return null;
|
|
20
17
|
|
|
21
18
|
return (
|
|
22
|
-
<
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
</SettingsSection>
|
|
19
|
+
<SettingsItemCard
|
|
20
|
+
title={config.title || t("settings.subscription.title")}
|
|
21
|
+
description={config.description || t("settings.subscription.description")}
|
|
22
|
+
icon={(config.icon || "star") as IconName}
|
|
23
|
+
onPress={config.onPress || (() => {})}
|
|
24
|
+
sectionTitle={config.sectionTitle || t("settings.sections.subscription")}
|
|
25
|
+
/>
|
|
30
26
|
);
|
|
31
27
|
};
|