@umituz/react-native-settings 4.19.6 → 4.20.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/package.json +24 -22
- package/src/domains/about/presentation/components/AboutContent.tsx +2 -2
- package/src/domains/about/presentation/components/AboutHeader.tsx +2 -2
- package/src/domains/about/presentation/components/AboutSettingItem.tsx +2 -2
- package/src/domains/about/presentation/screens/AboutScreen.tsx +2 -2
- package/src/domains/appearance/presentation/components/ColorPicker.tsx +3 -3
- package/src/domains/appearance/presentation/components/ThemeOption.tsx +3 -3
- package/src/domains/appearance/presentation/screens/AppearanceScreen.tsx +3 -3
- package/src/domains/faqs/presentation/components/FAQCategory.tsx +17 -8
- package/src/domains/faqs/presentation/components/FAQEmptyState.tsx +2 -2
- package/src/domains/faqs/presentation/components/FAQItem.tsx +36 -21
- package/src/domains/faqs/presentation/components/FAQSearchBar.tsx +12 -11
- package/src/domains/faqs/presentation/screens/FAQScreen.tsx +37 -27
- package/src/domains/feedback/presentation/components/FeedbackForm.tsx +2 -2
- package/src/domains/feedback/presentation/components/FeedbackModal.tsx +2 -2
- package/src/domains/legal/presentation/screens/LegalScreen.tsx +2 -2
- package/src/domains/legal/presentation/screens/PrivacyPolicyScreen.tsx +2 -2
- package/src/domains/legal/presentation/screens/TermsOfServiceScreen.tsx +2 -2
- package/src/domains/video-tutorials/infrastructure/services/video-tutorial.service.ts +2 -2
- package/src/presentation/components/DevSettingsSection.tsx +2 -2
- package/src/presentation/components/SettingItem.tsx +2 -2
- package/src/presentation/components/SettingsErrorBoundary.tsx +2 -2
- package/src/presentation/components/SettingsFooter.tsx +2 -2
- package/src/presentation/components/SettingsItemCard.tsx +2 -2
- package/src/presentation/components/SettingsSection.tsx +2 -2
- package/src/presentation/navigation/SettingsStackNavigator.tsx +2 -2
- package/src/presentation/screens/SettingsScreen.tsx +2 -2
- package/src/presentation/screens/components/SettingsContent.tsx +2 -2
- package/src/presentation/screens/components/SettingsHeader.tsx +2 -2
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umituz/react-native-settings",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.20.0",
|
|
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",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"typecheck": "tsc --noEmit",
|
|
9
|
-
"lint": "eslint src
|
|
10
|
-
"lint:fix": "eslint src --
|
|
9
|
+
"lint": "eslint src",
|
|
10
|
+
"lint:fix": "eslint src --fix",
|
|
11
11
|
"version:patch": "npm version patch -m 'chore: release v%s'",
|
|
12
12
|
"version:minor": "npm version minor -m 'chore: release v%s'",
|
|
13
13
|
"version:major": "npm version major -m 'chore: release v%s'"
|
|
@@ -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": "*",
|
|
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": "*",
|
|
50
50
|
"react": ">=19.0.0",
|
|
51
51
|
"react-native": ">=0.81.0",
|
|
52
52
|
"react-native-safe-area-context": ">=4.0.0",
|
|
@@ -58,28 +58,30 @@
|
|
|
58
58
|
"@gorhom/bottom-sheet": "^5.2.8",
|
|
59
59
|
"@react-native-community/datetimepicker": "^8.5.1",
|
|
60
60
|
"@react-navigation/bottom-tabs": "^7.9.0",
|
|
61
|
-
"@react-navigation/native": "^
|
|
62
|
-
"@react-navigation/stack": "^6.
|
|
61
|
+
"@react-navigation/native": "^7.1.26",
|
|
62
|
+
"@react-navigation/stack": "^7.6.13",
|
|
63
63
|
"@sentry/react-native": "^7.8.0",
|
|
64
64
|
"@sentry/types": "^10.32.1",
|
|
65
65
|
"@tanstack/react-query": "^5.0.0",
|
|
66
66
|
"@types/jest": "^29.5.14",
|
|
67
67
|
"@types/react": "~19.1.10",
|
|
68
|
-
"@typescript-eslint/eslint-plugin": "^7.
|
|
69
|
-
"@typescript-eslint/parser": "^7.
|
|
70
|
-
"@umituz/react-native-auth": "
|
|
71
|
-
"@umituz/react-native-design-system": "
|
|
68
|
+
"@typescript-eslint/eslint-plugin": "^7.18.0",
|
|
69
|
+
"@typescript-eslint/parser": "^7.18.0",
|
|
70
|
+
"@umituz/react-native-auth": "^3.2.0",
|
|
71
|
+
"@umituz/react-native-design-system": "^2.5.1",
|
|
72
72
|
"@umituz/react-native-filesystem": "^2.1.7",
|
|
73
73
|
"@umituz/react-native-firebase": "^1.13.28",
|
|
74
74
|
"@umituz/react-native-haptics": "^1.0.3",
|
|
75
|
-
"@umituz/react-native-localization": "
|
|
76
|
-
"@umituz/react-native-notifications": "
|
|
77
|
-
"@umituz/react-native-onboarding": "
|
|
75
|
+
"@umituz/react-native-localization": "*",
|
|
76
|
+
"@umituz/react-native-notifications": "*",
|
|
77
|
+
"@umituz/react-native-onboarding": "*",
|
|
78
78
|
"@umituz/react-native-sentry": "^1.4.2",
|
|
79
|
-
"@umituz/react-native-storage": "
|
|
80
|
-
"@umituz/react-native-tanstack": "
|
|
79
|
+
"@umituz/react-native-storage": "*",
|
|
80
|
+
"@umituz/react-native-tanstack": "*",
|
|
81
81
|
"@umituz/react-native-uuid": "^1.2.2",
|
|
82
82
|
"eslint": "^8.57.0",
|
|
83
|
+
"eslint-plugin-react": "^7.37.5",
|
|
84
|
+
"eslint-plugin-react-native": "^5.0.0",
|
|
83
85
|
"expo-apple-authentication": "^8.0.8",
|
|
84
86
|
"expo-application": "^7.0.8",
|
|
85
87
|
"expo-clipboard": "^8.0.8",
|
|
@@ -8,7 +8,7 @@ import { AboutSettingItem } from './AboutSettingItem';
|
|
|
8
8
|
import { AppInfo } from '../../domain/entities/AppInfo';
|
|
9
9
|
import { AboutConfig } from '../../domain/entities/AppInfo';
|
|
10
10
|
|
|
11
|
-
import {
|
|
11
|
+
import { useAppDesignTokens } from '@umituz/react-native-design-system';
|
|
12
12
|
|
|
13
13
|
export interface AboutContentProps {
|
|
14
14
|
/** App information to display */
|
|
@@ -18,7 +18,7 @@ export interface AboutContentProps {
|
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
const AboutSectionHeader: React.FC<{ title: string }> = ({ title }) => {
|
|
21
|
-
const tokens =
|
|
21
|
+
const tokens = useAppDesignTokens();
|
|
22
22
|
const colors = tokens.colors;
|
|
23
23
|
|
|
24
24
|
return (
|
|
@@ -26,7 +26,7 @@ export interface AboutHeaderProps {
|
|
|
26
26
|
testID?: string;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
import {
|
|
29
|
+
import { useAppDesignTokens } from '@umituz/react-native-design-system';
|
|
30
30
|
|
|
31
31
|
export const AboutHeader: React.FC<AboutHeaderProps> = ({
|
|
32
32
|
appInfo,
|
|
@@ -37,7 +37,7 @@ export const AboutHeader: React.FC<AboutHeaderProps> = ({
|
|
|
37
37
|
versionPrefix = "Version",
|
|
38
38
|
testID,
|
|
39
39
|
}) => {
|
|
40
|
-
const tokens =
|
|
40
|
+
const tokens = useAppDesignTokens();
|
|
41
41
|
const colors = tokens.colors;
|
|
42
42
|
|
|
43
43
|
return (
|
|
@@ -45,7 +45,7 @@ export interface AboutSettingItemProps {
|
|
|
45
45
|
chevronColor?: string;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
import {
|
|
48
|
+
import { useAppDesignTokens } from '@umituz/react-native-design-system';
|
|
49
49
|
|
|
50
50
|
export const AboutSettingItem: React.FC<AboutSettingItemProps> = ({
|
|
51
51
|
icon,
|
|
@@ -63,7 +63,7 @@ export const AboutSettingItem: React.FC<AboutSettingItemProps> = ({
|
|
|
63
63
|
testID,
|
|
64
64
|
chevronColor,
|
|
65
65
|
}) => {
|
|
66
|
-
const tokens =
|
|
66
|
+
const tokens = useAppDesignTokens();
|
|
67
67
|
const colors = tokens.colors;
|
|
68
68
|
|
|
69
69
|
// Memoize container type to prevent unnecessary re-renders
|
|
@@ -38,7 +38,7 @@ export interface AboutScreenProps {
|
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
import { useAboutInfo } from '../hooks/useAboutInfo';
|
|
41
|
-
import {
|
|
41
|
+
import { useAppDesignTokens, AtomicText } from '@umituz/react-native-design-system';
|
|
42
42
|
|
|
43
43
|
export const AboutScreen: React.FC<AboutScreenProps> = ({
|
|
44
44
|
config,
|
|
@@ -51,7 +51,7 @@ export const AboutScreen: React.FC<AboutScreenProps> = ({
|
|
|
51
51
|
footerComponent,
|
|
52
52
|
testID,
|
|
53
53
|
}) => {
|
|
54
|
-
const tokens =
|
|
54
|
+
const tokens = useAppDesignTokens();
|
|
55
55
|
const colors = tokens.colors;
|
|
56
56
|
|
|
57
57
|
const { appInfo, loading, error } = useAboutInfo({
|
|
@@ -10,7 +10,7 @@ import { View, TouchableOpacity, StyleSheet } from "react-native";
|
|
|
10
10
|
import {
|
|
11
11
|
AtomicIcon,
|
|
12
12
|
AtomicText,
|
|
13
|
-
|
|
13
|
+
useAppDesignTokens,
|
|
14
14
|
} from "@umituz/react-native-design-system";
|
|
15
15
|
|
|
16
16
|
interface ColorPickerProps {
|
|
@@ -26,7 +26,7 @@ export const ColorPicker: React.FC<ColorPickerProps> = ({
|
|
|
26
26
|
onValueChange,
|
|
27
27
|
colors,
|
|
28
28
|
}) => {
|
|
29
|
-
const tokens =
|
|
29
|
+
const tokens = useAppDesignTokens();
|
|
30
30
|
|
|
31
31
|
// Memoize styles to prevent unnecessary re-creation
|
|
32
32
|
const styles = useMemo(() => getStyles(tokens), [tokens]);
|
|
@@ -84,7 +84,7 @@ export const ColorPicker: React.FC<ColorPickerProps> = ({
|
|
|
84
84
|
);
|
|
85
85
|
};
|
|
86
86
|
|
|
87
|
-
const getStyles = (tokens: ReturnType<typeof
|
|
87
|
+
const getStyles = (tokens: ReturnType<typeof useAppDesignTokens>) =>
|
|
88
88
|
StyleSheet.create({
|
|
89
89
|
container: {
|
|
90
90
|
marginBottom: 16,
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
import React from "react";
|
|
9
9
|
import { View, TouchableOpacity, StyleSheet } from "react-native";
|
|
10
10
|
import { AtomicText, AtomicIcon } from "@umituz/react-native-design-system";
|
|
11
|
-
import {
|
|
11
|
+
import { useAppDesignTokens } from "@umituz/react-native-design-system";
|
|
12
12
|
import type { ThemeMode } from "../../types";
|
|
13
13
|
|
|
14
14
|
interface ThemeOptionProps {
|
|
@@ -30,7 +30,7 @@ export const ThemeOption: React.FC<ThemeOptionProps> = ({
|
|
|
30
30
|
isSelected,
|
|
31
31
|
onSelect,
|
|
32
32
|
}) => {
|
|
33
|
-
const tokens =
|
|
33
|
+
const tokens = useAppDesignTokens();
|
|
34
34
|
const styles = getStyles(tokens);
|
|
35
35
|
const iconName = mode === "dark" ? "moon-outline" : mode === "light" ? "sunny-outline" : "desktop-outline";
|
|
36
36
|
|
|
@@ -89,7 +89,7 @@ export const ThemeOption: React.FC<ThemeOptionProps> = ({
|
|
|
89
89
|
);
|
|
90
90
|
};
|
|
91
91
|
|
|
92
|
-
const getStyles = (tokens: ReturnType<typeof
|
|
92
|
+
const getStyles = (tokens: ReturnType<typeof useAppDesignTokens>) =>
|
|
93
93
|
StyleSheet.create({
|
|
94
94
|
container: {
|
|
95
95
|
backgroundColor: tokens.colors.surface,
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
import React, { useMemo, useCallback } from "react";
|
|
9
9
|
import { ScrollView, StyleSheet, View } from "react-native";
|
|
10
|
-
import {
|
|
10
|
+
import { useAppDesignTokens } from "@umituz/react-native-design-system";
|
|
11
11
|
import { useAppearance, useAppearanceActions } from "../../hooks";
|
|
12
12
|
import {
|
|
13
13
|
AppearanceHeader,
|
|
@@ -63,7 +63,7 @@ export const AppearanceScreen: React.FC<AppearanceScreenProps> = ({
|
|
|
63
63
|
containerStyle,
|
|
64
64
|
contentContainerStyle,
|
|
65
65
|
}) => {
|
|
66
|
-
const tokens =
|
|
66
|
+
const tokens = useAppDesignTokens();
|
|
67
67
|
const { themeMode } = useAppearance();
|
|
68
68
|
const {
|
|
69
69
|
localCustomColors,
|
|
@@ -211,7 +211,7 @@ export const AppearanceScreen: React.FC<AppearanceScreenProps> = ({
|
|
|
211
211
|
);
|
|
212
212
|
};
|
|
213
213
|
|
|
214
|
-
const getStyles = (tokens: ReturnType<typeof
|
|
214
|
+
const getStyles = (tokens: ReturnType<typeof useAppDesignTokens>) =>
|
|
215
215
|
StyleSheet.create({
|
|
216
216
|
container: {
|
|
217
217
|
flex: 1,
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
import React, { useMemo } from 'react';
|
|
8
8
|
import { View, StyleSheet, ViewStyle } from 'react-native';
|
|
9
|
-
import {
|
|
9
|
+
import { useAppDesignTokens, AtomicText } from '@umituz/react-native-design-system';
|
|
10
10
|
import { FAQCategory as FAQCategoryType } from '../../domain/entities/FAQEntity';
|
|
11
11
|
import { FAQItemComponent, FAQItemStyles } from './FAQItem';
|
|
12
12
|
|
|
@@ -29,18 +29,26 @@ export const FAQCategoryComponent: React.FC<FAQCategoryProps> = ({
|
|
|
29
29
|
onToggleItem,
|
|
30
30
|
styles: customStyles,
|
|
31
31
|
}) => {
|
|
32
|
-
const tokens =
|
|
32
|
+
const tokens = useAppDesignTokens();
|
|
33
33
|
|
|
34
34
|
const styles = useMemo(
|
|
35
35
|
() =>
|
|
36
36
|
StyleSheet.create({
|
|
37
37
|
container: {
|
|
38
|
-
marginBottom: tokens.spacing.
|
|
38
|
+
marginBottom: tokens.spacing.xl,
|
|
39
39
|
},
|
|
40
40
|
titleContainer: {
|
|
41
|
-
marginBottom: tokens.spacing.
|
|
42
|
-
paddingHorizontal: tokens.spacing.
|
|
41
|
+
marginBottom: tokens.spacing.sm,
|
|
42
|
+
paddingHorizontal: tokens.spacing.lg,
|
|
43
|
+
flexDirection: 'row',
|
|
44
|
+
alignItems: 'center',
|
|
43
45
|
},
|
|
46
|
+
titleLine: {
|
|
47
|
+
flex: 1,
|
|
48
|
+
height: 1,
|
|
49
|
+
backgroundColor: tokens.colors.border,
|
|
50
|
+
marginLeft: tokens.spacing.md,
|
|
51
|
+
}
|
|
44
52
|
}),
|
|
45
53
|
[tokens]
|
|
46
54
|
);
|
|
@@ -49,12 +57,13 @@ export const FAQCategoryComponent: React.FC<FAQCategoryProps> = ({
|
|
|
49
57
|
<View style={[styles.container, customStyles?.container]}>
|
|
50
58
|
<View style={styles.titleContainer}>
|
|
51
59
|
<AtomicText
|
|
52
|
-
type="
|
|
53
|
-
color="
|
|
54
|
-
style={customStyles?.titleStyle}
|
|
60
|
+
type="labelLarge"
|
|
61
|
+
color="textSecondary"
|
|
62
|
+
style={[{ textTransform: 'uppercase', letterSpacing: 1, fontWeight: '700' }, customStyles?.titleStyle]}
|
|
55
63
|
>
|
|
56
64
|
{category.title}
|
|
57
65
|
</AtomicText>
|
|
66
|
+
<View style={styles.titleLine} />
|
|
58
67
|
</View>
|
|
59
68
|
{category.items.map((item, index) => (
|
|
60
69
|
<FAQItemComponent
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
import React, { useMemo } from 'react';
|
|
8
8
|
import { View, Text, StyleSheet, ViewStyle, TextStyle } from 'react-native';
|
|
9
|
-
import {
|
|
9
|
+
import { useAppDesignTokens, AtomicText } from '@umituz/react-native-design-system';
|
|
10
10
|
|
|
11
11
|
export interface FAQEmptyStateStyles {
|
|
12
12
|
container?: ViewStyle;
|
|
@@ -28,7 +28,7 @@ export const FAQEmptyState: React.FC<FAQEmptyStateProps> = ({
|
|
|
28
28
|
icon = '❓',
|
|
29
29
|
styles: customStyles,
|
|
30
30
|
}) => {
|
|
31
|
-
const tokens =
|
|
31
|
+
const tokens = useAppDesignTokens();
|
|
32
32
|
|
|
33
33
|
const styles = useMemo(
|
|
34
34
|
() =>
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
import React, { useMemo } from 'react';
|
|
8
8
|
import { View, TouchableOpacity, StyleSheet, ViewStyle } from 'react-native';
|
|
9
|
-
import {
|
|
9
|
+
import { useAppDesignTokens, AtomicText, AtomicIcon } from '@umituz/react-native-design-system';
|
|
10
10
|
import { FAQItem as FAQItemType } from '../../domain/entities/FAQEntity';
|
|
11
11
|
|
|
12
12
|
export interface FAQItemStyles {
|
|
@@ -32,36 +32,49 @@ export const FAQItemComponent: React.FC<FAQItemProps> = ({
|
|
|
32
32
|
onToggle,
|
|
33
33
|
styles: customStyles,
|
|
34
34
|
}) => {
|
|
35
|
-
const tokens =
|
|
35
|
+
const tokens = useAppDesignTokens();
|
|
36
36
|
|
|
37
37
|
const styles = useMemo(
|
|
38
38
|
() =>
|
|
39
39
|
StyleSheet.create({
|
|
40
40
|
container: {
|
|
41
41
|
marginHorizontal: tokens.spacing.md,
|
|
42
|
-
marginBottom: tokens.spacing.
|
|
43
|
-
borderRadius:
|
|
42
|
+
marginBottom: tokens.spacing.sm,
|
|
43
|
+
borderRadius: 20,
|
|
44
44
|
backgroundColor: tokens.colors.surface,
|
|
45
45
|
borderWidth: 1,
|
|
46
|
-
borderColor: tokens.colors.border,
|
|
46
|
+
borderColor: isExpanded ? tokens.colors.primary : tokens.colors.border,
|
|
47
|
+
overflow: 'hidden',
|
|
47
48
|
},
|
|
48
49
|
header: {
|
|
49
|
-
flexDirection: 'row'
|
|
50
|
-
alignItems: 'center'
|
|
51
|
-
padding: tokens.spacing.
|
|
50
|
+
flexDirection: 'row',
|
|
51
|
+
alignItems: 'center',
|
|
52
|
+
padding: tokens.spacing.lg,
|
|
52
53
|
},
|
|
53
54
|
content: {
|
|
54
55
|
flex: 1,
|
|
55
|
-
marginRight: tokens.spacing.
|
|
56
|
+
marginRight: tokens.spacing.md,
|
|
57
|
+
},
|
|
58
|
+
questionText: {
|
|
59
|
+
fontWeight: '700',
|
|
56
60
|
},
|
|
57
61
|
answerContainer: {
|
|
58
|
-
paddingHorizontal: tokens.spacing.
|
|
59
|
-
paddingBottom: tokens.spacing.
|
|
62
|
+
paddingHorizontal: tokens.spacing.lg,
|
|
63
|
+
paddingBottom: tokens.spacing.lg,
|
|
60
64
|
borderTopWidth: 1,
|
|
61
65
|
borderTopColor: tokens.colors.borderLight,
|
|
66
|
+
backgroundColor: tokens.colors.surfaceSecondary || tokens.colors.backgroundSecondary,
|
|
67
|
+
},
|
|
68
|
+
iconContainer: {
|
|
69
|
+
width: 36,
|
|
70
|
+
height: 36,
|
|
71
|
+
borderRadius: 18,
|
|
72
|
+
backgroundColor: isExpanded ? tokens.colors.primary : tokens.colors.surfaceSecondary || tokens.colors.backgroundSecondary,
|
|
73
|
+
alignItems: 'center',
|
|
74
|
+
justifyContent: 'center',
|
|
62
75
|
},
|
|
63
76
|
}),
|
|
64
|
-
[tokens]
|
|
77
|
+
[tokens, isExpanded]
|
|
65
78
|
);
|
|
66
79
|
|
|
67
80
|
return (
|
|
@@ -69,22 +82,24 @@ export const FAQItemComponent: React.FC<FAQItemProps> = ({
|
|
|
69
82
|
<TouchableOpacity
|
|
70
83
|
onPress={onToggle}
|
|
71
84
|
style={[styles.header, customStyles?.header]}
|
|
72
|
-
activeOpacity={0.
|
|
85
|
+
activeOpacity={0.8}
|
|
73
86
|
>
|
|
74
87
|
<View style={[styles.content, customStyles?.content]}>
|
|
75
88
|
<AtomicText
|
|
76
89
|
type="bodyLarge"
|
|
77
|
-
color="textPrimary"
|
|
78
|
-
style={customStyles?.questionStyle}
|
|
79
|
-
numberOfLines={isExpanded ? undefined : 2}
|
|
90
|
+
color={isExpanded ? "primary" : "textPrimary"}
|
|
91
|
+
style={[styles.questionText, customStyles?.questionStyle]}
|
|
80
92
|
>
|
|
81
93
|
{item.question}
|
|
82
94
|
</AtomicText>
|
|
83
95
|
</View>
|
|
84
|
-
<
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
96
|
+
<View style={styles.iconContainer}>
|
|
97
|
+
<AtomicIcon
|
|
98
|
+
name={isExpanded ? 'chevron-up' : 'chevron-down'}
|
|
99
|
+
size={20}
|
|
100
|
+
color={isExpanded ? "onPrimary" : "textSecondary"}
|
|
101
|
+
/>
|
|
102
|
+
</View>
|
|
88
103
|
</TouchableOpacity>
|
|
89
104
|
|
|
90
105
|
{isExpanded && (
|
|
@@ -92,7 +107,7 @@ export const FAQItemComponent: React.FC<FAQItemProps> = ({
|
|
|
92
107
|
<AtomicText
|
|
93
108
|
type="bodyMedium"
|
|
94
109
|
color="textSecondary"
|
|
95
|
-
style={customStyles?.answerStyle}
|
|
110
|
+
style={[{ lineHeight: 22 }, customStyles?.answerStyle]}
|
|
96
111
|
>
|
|
97
112
|
{item.answer}
|
|
98
113
|
</AtomicText>
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
import React, { useMemo } from 'react';
|
|
8
8
|
import { View, TextInput, StyleSheet, ViewStyle, TextStyle } from 'react-native';
|
|
9
|
-
import {
|
|
9
|
+
import { useAppDesignTokens, AtomicIcon } from '@umituz/react-native-design-system';
|
|
10
10
|
|
|
11
11
|
export interface FAQSearchBarStyles {
|
|
12
12
|
container?: ViewStyle;
|
|
@@ -26,26 +26,27 @@ export const FAQSearchBar: React.FC<FAQSearchBarProps> = ({
|
|
|
26
26
|
placeholder,
|
|
27
27
|
styles: customStyles,
|
|
28
28
|
}) => {
|
|
29
|
-
const tokens =
|
|
29
|
+
const tokens = useAppDesignTokens();
|
|
30
30
|
|
|
31
31
|
const styles = useMemo(
|
|
32
32
|
() =>
|
|
33
33
|
StyleSheet.create({
|
|
34
34
|
container: {
|
|
35
|
-
flexDirection: 'row'
|
|
36
|
-
alignItems: 'center'
|
|
37
|
-
backgroundColor: tokens.colors.
|
|
38
|
-
borderRadius:
|
|
39
|
-
paddingHorizontal: tokens.spacing.
|
|
35
|
+
flexDirection: 'row',
|
|
36
|
+
alignItems: 'center',
|
|
37
|
+
backgroundColor: tokens.colors.surfaceSecondary || tokens.colors.backgroundSecondary,
|
|
38
|
+
borderRadius: 16,
|
|
39
|
+
paddingHorizontal: tokens.spacing.md,
|
|
40
40
|
borderWidth: 1,
|
|
41
|
-
borderColor: tokens.colors.
|
|
41
|
+
borderColor: tokens.colors.borderLight,
|
|
42
|
+
height: 48,
|
|
42
43
|
},
|
|
43
44
|
iconContainer: {
|
|
44
|
-
marginRight: tokens.spacing.
|
|
45
|
+
marginRight: tokens.spacing.sm,
|
|
45
46
|
},
|
|
46
47
|
input: {
|
|
47
48
|
flex: 1,
|
|
48
|
-
|
|
49
|
+
height: '100%',
|
|
49
50
|
fontSize: 16,
|
|
50
51
|
color: tokens.colors.textPrimary,
|
|
51
52
|
},
|
|
@@ -56,7 +57,7 @@ export const FAQSearchBar: React.FC<FAQSearchBarProps> = ({
|
|
|
56
57
|
return (
|
|
57
58
|
<View style={[styles.container, customStyles?.container]}>
|
|
58
59
|
<View style={styles.iconContainer}>
|
|
59
|
-
<AtomicIcon name="search" size={18} />
|
|
60
|
+
<AtomicIcon name="search" size={18} color="textSecondary" />
|
|
60
61
|
</View>
|
|
61
62
|
<TextInput
|
|
62
63
|
style={[styles.input, customStyles?.input]}
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import React, { useMemo } from 'react';
|
|
8
|
-
import { View, ScrollView, StyleSheet, ViewStyle, TextStyle } from 'react-native';
|
|
9
|
-
import {
|
|
8
|
+
import { View, ScrollView, StyleSheet, ViewStyle, TextStyle, useWindowDimensions } from 'react-native';
|
|
9
|
+
import { useAppDesignTokens, AtomicText, ScreenLayout, getContentMaxWidth } from '@umituz/react-native-design-system';
|
|
10
10
|
import { FAQCategory } from '../../domain/entities/FAQEntity';
|
|
11
11
|
import { useFAQSearch } from '../hooks/useFAQSearch';
|
|
12
12
|
import { useFAQExpansion } from '../hooks/useFAQExpansion';
|
|
@@ -45,9 +45,10 @@ export const FAQScreen: React.FC<FAQScreenProps> = ({
|
|
|
45
45
|
renderHeader,
|
|
46
46
|
styles: customStyles,
|
|
47
47
|
}) => {
|
|
48
|
-
const tokens =
|
|
49
|
-
const {
|
|
50
|
-
|
|
48
|
+
const tokens = useAppDesignTokens();
|
|
49
|
+
const { width: windowWidth } = useWindowDimensions();
|
|
50
|
+
const contentMaxWidth = useMemo(() => getContentMaxWidth(windowWidth), [windowWidth]);
|
|
51
|
+
const { searchQuery, setSearchQuery, filteredCategories, hasResults } = useFAQSearch(categories);
|
|
51
52
|
const { isExpanded, toggleExpansion } = useFAQExpansion();
|
|
52
53
|
|
|
53
54
|
const styles = useMemo(
|
|
@@ -55,12 +56,9 @@ export const FAQScreen: React.FC<FAQScreenProps> = ({
|
|
|
55
56
|
StyleSheet.create({
|
|
56
57
|
container: {
|
|
57
58
|
flex: 1,
|
|
58
|
-
backgroundColor: tokens.colors.backgroundPrimary,
|
|
59
59
|
},
|
|
60
60
|
header: {
|
|
61
61
|
padding: tokens.spacing.md,
|
|
62
|
-
borderBottomWidth: 1,
|
|
63
|
-
borderBottomColor: tokens.colors.border,
|
|
64
62
|
},
|
|
65
63
|
content: {
|
|
66
64
|
flex: 1,
|
|
@@ -81,12 +79,13 @@ export const FAQScreen: React.FC<FAQScreenProps> = ({
|
|
|
81
79
|
}
|
|
82
80
|
|
|
83
81
|
return (
|
|
84
|
-
<
|
|
85
|
-
style={[styles.content, customStyles?.content]}
|
|
86
|
-
showsVerticalScrollIndicator={false}
|
|
87
|
-
>
|
|
82
|
+
<View style={{ flex: 1 }}>
|
|
88
83
|
<View style={[styles.header, customStyles?.header]}>
|
|
89
|
-
<AtomicText
|
|
84
|
+
<AtomicText
|
|
85
|
+
type="headlineMedium"
|
|
86
|
+
color="textPrimary"
|
|
87
|
+
style={{ marginBottom: tokens.spacing.md, fontWeight: '700' }}
|
|
88
|
+
>
|
|
90
89
|
{headerTitle}
|
|
91
90
|
</AtomicText>
|
|
92
91
|
<FAQSearchBar
|
|
@@ -97,30 +96,41 @@ export const FAQScreen: React.FC<FAQScreenProps> = ({
|
|
|
97
96
|
/>
|
|
98
97
|
</View>
|
|
99
98
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
99
|
+
<ScrollView
|
|
100
|
+
style={[styles.content, customStyles?.content]}
|
|
101
|
+
contentContainerStyle={{ paddingVertical: tokens.spacing.md }}
|
|
102
|
+
showsVerticalScrollIndicator={false}
|
|
103
|
+
>
|
|
104
|
+
{filteredCategories.map((category) => (
|
|
105
|
+
<FAQCategoryComponent
|
|
106
|
+
key={category.id}
|
|
107
|
+
category={category}
|
|
108
|
+
isExpanded={isExpanded}
|
|
109
|
+
onToggleItem={toggleExpansion}
|
|
110
|
+
styles={customStyles?.category}
|
|
111
|
+
/>
|
|
112
|
+
))}
|
|
113
|
+
<View style={{ height: tokens.spacing.xl * 2 }} />
|
|
114
|
+
</ScrollView>
|
|
115
|
+
</View>
|
|
110
116
|
);
|
|
111
117
|
};
|
|
112
118
|
|
|
113
119
|
if (renderHeader) {
|
|
114
120
|
return (
|
|
115
|
-
<View style={
|
|
116
|
-
|
|
117
|
-
|
|
121
|
+
<View style={{ flex: 1, backgroundColor: tokens.colors.backgroundPrimary }}>
|
|
122
|
+
<View style={[styles.container, customStyles?.container]}>
|
|
123
|
+
<View style={{ alignSelf: 'center', width: '100%', maxWidth: contentMaxWidth }}>
|
|
124
|
+
{renderHeader({ onBack: onBack || (() => { }) })}
|
|
125
|
+
</View>
|
|
126
|
+
{renderContent()}
|
|
127
|
+
</View>
|
|
118
128
|
</View>
|
|
119
129
|
);
|
|
120
130
|
}
|
|
121
131
|
|
|
122
132
|
return (
|
|
123
|
-
<ScreenLayout edges={['bottom']} scrollable={false}>
|
|
133
|
+
<ScreenLayout edges={['bottom']} scrollable={false} maxWidth={contentMaxWidth}>
|
|
124
134
|
<View style={[styles.container, customStyles?.container]}>
|
|
125
135
|
{renderContent()}
|
|
126
136
|
</View>
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
import React, { useState } from "react";
|
|
7
7
|
import { View, StyleSheet, TouchableOpacity, ScrollView, TextInput } from "react-native";
|
|
8
|
-
import {
|
|
8
|
+
import { useAppDesignTokens, AtomicText, AtomicButton, AtomicIcon } from "@umituz/react-native-design-system";
|
|
9
9
|
import type { FeedbackType, FeedbackRating } from "../../domain/entities/FeedbackEntity";
|
|
10
10
|
import { useFeedbackForm } from "../hooks/useFeedbackForm";
|
|
11
11
|
|
|
@@ -29,7 +29,7 @@ export const FeedbackForm: React.FC<FeedbackFormProps> = ({
|
|
|
29
29
|
initialType,
|
|
30
30
|
isSubmitting = false,
|
|
31
31
|
}) => {
|
|
32
|
-
const tokens =
|
|
32
|
+
const tokens = useAppDesignTokens();
|
|
33
33
|
const [selectedType, setSelectedType] = useState<FeedbackType>(initialType || texts.feedbackTypes[0].type);
|
|
34
34
|
const [rating, setRating] = useState<FeedbackRating>(5);
|
|
35
35
|
const [description, setDescription] = useState("");
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
import React from "react";
|
|
7
7
|
import { View, StyleSheet, TouchableOpacity, ScrollView, KeyboardAvoidingView, Platform } from "react-native";
|
|
8
8
|
import { SafeAreaView } from "react-native-safe-area-context";
|
|
9
|
-
import {
|
|
9
|
+
import { useAppDesignTokens, AtomicText, AtomicIcon, BaseModal } from "@umituz/react-native-design-system";
|
|
10
10
|
import { FeedbackForm } from "./FeedbackForm";
|
|
11
11
|
import type { FeedbackType, FeedbackRating } from "../../domain/entities/FeedbackEntity";
|
|
12
12
|
|
|
@@ -31,7 +31,7 @@ export const FeedbackModal: React.FC<FeedbackModalProps> = ({
|
|
|
31
31
|
subtitle,
|
|
32
32
|
texts,
|
|
33
33
|
}) => {
|
|
34
|
-
const tokens =
|
|
34
|
+
const tokens = useAppDesignTokens();
|
|
35
35
|
|
|
36
36
|
return (
|
|
37
37
|
<BaseModal visible={visible} onClose={onClose}>
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
import React from "react";
|
|
11
11
|
import { View, StyleSheet } from "react-native";
|
|
12
|
-
import {
|
|
12
|
+
import { useAppDesignTokens, type DesignTokens } from "@umituz/react-native-design-system";
|
|
13
13
|
import { AtomicText } from "@umituz/react-native-design-system";
|
|
14
14
|
import { ScreenLayout } from "@umituz/react-native-design-system";
|
|
15
15
|
import { LegalItem } from "../components/LegalItem";
|
|
@@ -93,7 +93,7 @@ export const LegalScreen: React.FC<LegalScreenProps> = React.memo(({
|
|
|
93
93
|
eulaUrl,
|
|
94
94
|
testID = "legal-screen",
|
|
95
95
|
}) => {
|
|
96
|
-
const tokens =
|
|
96
|
+
const tokens = useAppDesignTokens();
|
|
97
97
|
|
|
98
98
|
// Memoize styles to prevent recreation on every render
|
|
99
99
|
const styles = React.useMemo(() => {
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
import React from "react";
|
|
7
7
|
import { View, ScrollView, StyleSheet } from "react-native";
|
|
8
8
|
import { useSafeAreaInsets } from "react-native-safe-area-context";
|
|
9
|
-
import {
|
|
9
|
+
import { useAppDesignTokens } from "@umituz/react-native-design-system";
|
|
10
10
|
import { AtomicText, AtomicButton } from "@umituz/react-native-design-system";
|
|
11
11
|
import { UrlHandlerService } from "../../domain/services/UrlHandlerService";
|
|
12
12
|
import { ContentValidationService } from "../../domain/services/ContentValidationService";
|
|
@@ -54,7 +54,7 @@ export const PrivacyPolicyScreen: React.FC<PrivacyPolicyScreenProps> = React.mem
|
|
|
54
54
|
onUrlPress,
|
|
55
55
|
testID = "privacy-policy-screen",
|
|
56
56
|
}) => {
|
|
57
|
-
const tokens =
|
|
57
|
+
const tokens = useAppDesignTokens();
|
|
58
58
|
const insets = useSafeAreaInsets();
|
|
59
59
|
|
|
60
60
|
// Validate required props
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
import React from "react";
|
|
7
7
|
import { View, ScrollView, StyleSheet } from "react-native";
|
|
8
8
|
import { useSafeAreaInsets } from "react-native-safe-area-context";
|
|
9
|
-
import {
|
|
9
|
+
import { useAppDesignTokens } from "@umituz/react-native-design-system";
|
|
10
10
|
import { AtomicText, AtomicButton } from "@umituz/react-native-design-system";
|
|
11
11
|
import { UrlHandlerService } from "../../domain/services/UrlHandlerService";
|
|
12
12
|
import { ContentValidationService } from "../../domain/services/ContentValidationService";
|
|
@@ -54,7 +54,7 @@ export const TermsOfServiceScreen: React.FC<TermsOfServiceScreenProps> = React.m
|
|
|
54
54
|
onUrlPress,
|
|
55
55
|
testID = "terms-of-service-screen",
|
|
56
56
|
}) => {
|
|
57
|
-
const tokens =
|
|
57
|
+
const tokens = useAppDesignTokens();
|
|
58
58
|
const insets = useSafeAreaInsets();
|
|
59
59
|
|
|
60
60
|
// Validate required props
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
where,
|
|
12
12
|
limit,
|
|
13
13
|
} from "firebase/firestore";
|
|
14
|
-
import type { Firestore } from "firebase/firestore";
|
|
14
|
+
import type { Firestore, QueryConstraint } from "firebase/firestore";
|
|
15
15
|
import type {
|
|
16
16
|
VideoTutorial,
|
|
17
17
|
VideoTutorialCategory,
|
|
@@ -46,7 +46,7 @@ class VideoTutorialService {
|
|
|
46
46
|
async getAllTutorials(
|
|
47
47
|
filters?: VideoTutorialFilters,
|
|
48
48
|
): Promise<VideoTutorial[]> {
|
|
49
|
-
const constraints = [];
|
|
49
|
+
const constraints: QueryConstraint[] = [];
|
|
50
50
|
|
|
51
51
|
if (filters?.category) {
|
|
52
52
|
constraints.push(where("category", "==", filters.category));
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
import React from "react";
|
|
11
11
|
import { Alert } from "react-native";
|
|
12
|
-
import {
|
|
12
|
+
import { useAppDesignTokens } from "@umituz/react-native-design-system";
|
|
13
13
|
import { storageRepository } from "@umituz/react-native-storage";
|
|
14
14
|
import { SettingsSection } from "./SettingsSection";
|
|
15
15
|
import { SettingItem } from "./SettingItem";
|
|
@@ -46,7 +46,7 @@ export const DevSettingsSection: React.FC<DevSettingsProps> = ({
|
|
|
46
46
|
texts = {},
|
|
47
47
|
customDevComponents = [],
|
|
48
48
|
}) => {
|
|
49
|
-
const tokens =
|
|
49
|
+
const tokens = useAppDesignTokens();
|
|
50
50
|
|
|
51
51
|
// Merge custom texts with defaults
|
|
52
52
|
const t = { ...DEFAULT_TEXTS, ...texts };
|
|
@@ -3,7 +3,7 @@ import { View, StyleSheet, Switch } from "react-native";
|
|
|
3
3
|
import {
|
|
4
4
|
AtomicIcon,
|
|
5
5
|
AtomicText,
|
|
6
|
-
|
|
6
|
+
useAppDesignTokens,
|
|
7
7
|
} from "@umituz/react-native-design-system";
|
|
8
8
|
import { SettingsItemCard } from "./SettingsItemCard";
|
|
9
9
|
|
|
@@ -40,7 +40,7 @@ export const SettingItem: React.FC<SettingItemProps> = ({
|
|
|
40
40
|
testID,
|
|
41
41
|
disabled = false,
|
|
42
42
|
}) => {
|
|
43
|
-
const tokens =
|
|
43
|
+
const tokens = useAppDesignTokens();
|
|
44
44
|
|
|
45
45
|
// For switch items, we need custom rendering
|
|
46
46
|
if (showSwitch) {
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
import React, { Component, ReactNode } from 'react';
|
|
7
7
|
import { View, StyleSheet } from 'react-native';
|
|
8
|
-
import {
|
|
8
|
+
import { useAppDesignTokens } from '@umituz/react-native-design-system';
|
|
9
9
|
import { AtomicText, AtomicIcon } from '@umituz/react-native-design-system';
|
|
10
10
|
import { useLocalization } from '@umituz/react-native-localization';
|
|
11
11
|
|
|
@@ -67,7 +67,7 @@ const ErrorBoundaryFallback: React.FC<ErrorBoundaryFallbackProps> = ({
|
|
|
67
67
|
fallbackTitle,
|
|
68
68
|
fallbackMessage
|
|
69
69
|
}) => {
|
|
70
|
-
const tokens =
|
|
70
|
+
const tokens = useAppDesignTokens();
|
|
71
71
|
const { t } = useLocalization();
|
|
72
72
|
|
|
73
73
|
const title = __DEV__ && error?.message
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { View, StyleSheet } from "react-native";
|
|
3
|
-
import {
|
|
3
|
+
import { useAppDesignTokens, AtomicText } from "@umituz/react-native-design-system";
|
|
4
4
|
|
|
5
5
|
export interface SettingsFooterProps {
|
|
6
6
|
versionText?: string;
|
|
@@ -13,7 +13,7 @@ export const SettingsFooter: React.FC<SettingsFooterProps> = ({
|
|
|
13
13
|
appVersion,
|
|
14
14
|
versionLabel,
|
|
15
15
|
}) => {
|
|
16
|
-
const tokens =
|
|
16
|
+
const tokens = useAppDesignTokens();
|
|
17
17
|
const colors = tokens.colors;
|
|
18
18
|
|
|
19
19
|
const displayText = versionText || (appVersion && versionLabel
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { View, Pressable, StyleSheet, ViewStyle } from "react-native";
|
|
3
3
|
import {
|
|
4
|
-
|
|
4
|
+
useAppDesignTokens,
|
|
5
5
|
AtomicIcon,
|
|
6
6
|
AtomicText,
|
|
7
7
|
type IconName,
|
|
@@ -45,7 +45,7 @@ export const SettingsItemCard: React.FC<SettingsItemCardProps> = ({
|
|
|
45
45
|
iconBgColor,
|
|
46
46
|
iconColor,
|
|
47
47
|
}) => {
|
|
48
|
-
const tokens =
|
|
48
|
+
const tokens = useAppDesignTokens();
|
|
49
49
|
const colors = tokens.colors;
|
|
50
50
|
|
|
51
51
|
const defaultIconBg = iconBgColor || `${colors.primary}15`;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { View, StyleSheet } from "react-native";
|
|
3
|
-
import {
|
|
3
|
+
import { useAppDesignTokens, AtomicText } from "@umituz/react-native-design-system";
|
|
4
4
|
|
|
5
5
|
export interface SettingsSectionProps {
|
|
6
6
|
title: string;
|
|
@@ -11,7 +11,7 @@ export const SettingsSection: React.FC<SettingsSectionProps> = ({
|
|
|
11
11
|
title,
|
|
12
12
|
children,
|
|
13
13
|
}) => {
|
|
14
|
-
const tokens =
|
|
14
|
+
const tokens = useAppDesignTokens();
|
|
15
15
|
const colors = tokens.colors;
|
|
16
16
|
|
|
17
17
|
return (
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
import React from "react";
|
|
9
9
|
import { createStackNavigator } from "@react-navigation/stack";
|
|
10
|
-
import {
|
|
10
|
+
import { useAppDesignTokens } from "@umituz/react-native-design-system";
|
|
11
11
|
import { SettingsScreen } from "../screens/SettingsScreen";
|
|
12
12
|
import { AppearanceScreen } from "../screens/AppearanceScreen";
|
|
13
13
|
import type { SettingsConfig, CustomSettingsSection } from "../screens/types";
|
|
@@ -83,7 +83,7 @@ export const SettingsStackNavigator: React.FC<SettingsStackNavigatorProps> = ({
|
|
|
83
83
|
devSettings,
|
|
84
84
|
customSections = [],
|
|
85
85
|
}) => {
|
|
86
|
-
const tokens =
|
|
86
|
+
const tokens = useAppDesignTokens();
|
|
87
87
|
|
|
88
88
|
const screenOptions = {
|
|
89
89
|
headerStyle: {
|
|
@@ -8,7 +8,7 @@ import { View, StatusBar, StyleSheet } from "react-native";
|
|
|
8
8
|
import { useNavigation } from "@react-navigation/native";
|
|
9
9
|
import {
|
|
10
10
|
useDesignSystemTheme,
|
|
11
|
-
|
|
11
|
+
useAppDesignTokens,
|
|
12
12
|
} from "@umituz/react-native-design-system";
|
|
13
13
|
import { SettingsHeader } from "./components/SettingsHeader";
|
|
14
14
|
import { SettingsContent } from "./components/SettingsContent";
|
|
@@ -68,7 +68,7 @@ export const SettingsScreen: React.FC<SettingsScreenProps> = ({
|
|
|
68
68
|
}) => {
|
|
69
69
|
const navigation = useNavigation();
|
|
70
70
|
const { themeMode } = useDesignSystemTheme();
|
|
71
|
-
const tokens =
|
|
71
|
+
const tokens = useAppDesignTokens();
|
|
72
72
|
|
|
73
73
|
const isDark = themeMode === "dark";
|
|
74
74
|
const colors = tokens.colors;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useMemo } from "react";
|
|
2
2
|
import { View, ScrollView, StyleSheet } from "react-native";
|
|
3
3
|
import { useSafeAreaInsets } from "react-native-safe-area-context";
|
|
4
|
-
import {
|
|
4
|
+
import { useAppDesignTokens } from "@umituz/react-native-design-system";
|
|
5
5
|
import { useLocalization } from "@umituz/react-native-localization";
|
|
6
6
|
import { SettingsFooter } from "../../components/SettingsFooter";
|
|
7
7
|
import { SettingsSection } from "../../components/SettingsSection";
|
|
@@ -53,7 +53,7 @@ export const SettingsContent: React.FC<SettingsContentProps> = ({
|
|
|
53
53
|
showCloseButton = false,
|
|
54
54
|
devSettings,
|
|
55
55
|
}) => {
|
|
56
|
-
const tokens =
|
|
56
|
+
const tokens = useAppDesignTokens();
|
|
57
57
|
const insets = useSafeAreaInsets();
|
|
58
58
|
const { t } = useLocalization();
|
|
59
59
|
|
|
@@ -7,7 +7,7 @@ import React from "react";
|
|
|
7
7
|
import { View, TouchableOpacity, StyleSheet } from "react-native";
|
|
8
8
|
import { useSafeAreaInsets } from "react-native-safe-area-context";
|
|
9
9
|
import { useNavigation } from "@react-navigation/native";
|
|
10
|
-
import {
|
|
10
|
+
import { useAppDesignTokens } from "@umituz/react-native-design-system";
|
|
11
11
|
import { AtomicIcon } from "@umituz/react-native-design-system";
|
|
12
12
|
|
|
13
13
|
interface SettingsHeaderProps {
|
|
@@ -20,7 +20,7 @@ export const SettingsHeader: React.FC<SettingsHeaderProps> = ({
|
|
|
20
20
|
onClose,
|
|
21
21
|
}) => {
|
|
22
22
|
const navigation = useNavigation();
|
|
23
|
-
const tokens =
|
|
23
|
+
const tokens = useAppDesignTokens();
|
|
24
24
|
const insets = useSafeAreaInsets();
|
|
25
25
|
|
|
26
26
|
const handleClose = () => {
|