@umituz/react-native-settings 4.21.28 → 4.21.30
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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umituz/react-native-settings",
|
|
3
|
-
"version": "4.21.
|
|
3
|
+
"version": "4.21.30",
|
|
4
4
|
"description": "Complete settings hub for React Native apps - consolidated package with settings, about, legal, appearance, feedback, FAQs, rating, and gamification",
|
|
5
5
|
"main": "./src/index.ts",
|
|
6
6
|
"types": "./src/index.ts",
|
|
@@ -14,7 +14,6 @@ export const SettingsFooter: React.FC<SettingsFooterProps> = ({
|
|
|
14
14
|
versionLabel,
|
|
15
15
|
}) => {
|
|
16
16
|
const tokens = useAppDesignTokens();
|
|
17
|
-
const colors = tokens.colors;
|
|
18
17
|
|
|
19
18
|
const displayText = versionText || (appVersion && versionLabel
|
|
20
19
|
? `${versionLabel} ${appVersion}`
|
|
@@ -24,7 +23,7 @@ export const SettingsFooter: React.FC<SettingsFooterProps> = ({
|
|
|
24
23
|
|
|
25
24
|
return (
|
|
26
25
|
<View style={styles.container}>
|
|
27
|
-
<AtomicText type="labelSmall"
|
|
26
|
+
<AtomicText type="labelSmall" color="textSecondary">
|
|
28
27
|
{displayText}
|
|
29
28
|
</AtomicText>
|
|
30
29
|
</View>
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { View, Pressable, StyleSheet, ViewStyle
|
|
2
|
+
import { View, Pressable, StyleSheet, ViewStyle } from "react-native";
|
|
3
3
|
import {
|
|
4
4
|
useAppDesignTokens,
|
|
5
5
|
AtomicIcon,
|
|
6
6
|
AtomicText,
|
|
7
|
+
AtomicSwitch,
|
|
7
8
|
type IconName,
|
|
8
|
-
withAlpha
|
|
9
|
+
withAlpha,
|
|
9
10
|
} from "@umituz/react-native-design-system";
|
|
10
11
|
|
|
11
12
|
export interface SettingsItemCardProps {
|
|
@@ -52,41 +53,35 @@ export const SettingsItemCard: React.FC<SettingsItemCardProps> = ({
|
|
|
52
53
|
const renderRightElement = () => {
|
|
53
54
|
if (showSwitch) {
|
|
54
55
|
return (
|
|
55
|
-
<
|
|
56
|
-
value={switchValue}
|
|
57
|
-
onValueChange={onSwitchChange}
|
|
58
|
-
trackColor={{
|
|
59
|
-
false: colors.surfaceVariant,
|
|
60
|
-
true: colors.primary,
|
|
61
|
-
}}
|
|
62
|
-
thumbColor={colors.surface}
|
|
63
|
-
ios_backgroundColor={colors.surfaceVariant}
|
|
56
|
+
<AtomicSwitch
|
|
57
|
+
value={!!switchValue}
|
|
58
|
+
onValueChange={onSwitchChange || (() => {})}
|
|
64
59
|
disabled={disabled}
|
|
65
60
|
/>
|
|
66
61
|
);
|
|
67
62
|
}
|
|
68
63
|
if (shouldShowChevron) {
|
|
69
|
-
return <AtomicIcon name={rightIcon} size="sm" color="
|
|
64
|
+
return <AtomicIcon name={rightIcon} size="sm" color="textSecondary" />;
|
|
70
65
|
}
|
|
71
66
|
return null;
|
|
72
67
|
};
|
|
73
68
|
|
|
74
69
|
const renderContent = () => (
|
|
75
70
|
<View style={styles.content}>
|
|
76
|
-
<View style={[styles.iconContainer, { backgroundColor: defaultIconBg, borderRadius: tokens.
|
|
71
|
+
<View style={[styles.iconContainer, { backgroundColor: defaultIconBg, borderRadius: tokens.borders.radius.md }]}>
|
|
77
72
|
<AtomicIcon name={icon} size="lg" customColor={defaultIconColor} />
|
|
78
73
|
</View>
|
|
79
74
|
<View style={styles.textContainer}>
|
|
80
75
|
<AtomicText
|
|
81
76
|
type="bodyLarge"
|
|
82
|
-
color={disabled ? "
|
|
77
|
+
color={disabled ? "onSurfaceVariant" : "onSurface"}
|
|
83
78
|
numberOfLines={1}
|
|
84
79
|
style={{ marginBottom: description ? tokens.spacing.xs : 0, opacity: disabled ? 0.6 : 1 }}
|
|
85
80
|
>
|
|
86
81
|
{title}
|
|
87
82
|
</AtomicText>
|
|
88
83
|
{!!description && (
|
|
89
|
-
<AtomicText type="bodyMedium" color="
|
|
84
|
+
<AtomicText type="bodyMedium" color="textSecondary" numberOfLines={2}>
|
|
90
85
|
{description}
|
|
91
86
|
</AtomicText>
|
|
92
87
|
)}
|
|
@@ -101,7 +96,7 @@ export const SettingsItemCard: React.FC<SettingsItemCardProps> = ({
|
|
|
101
96
|
styles.sectionContainer,
|
|
102
97
|
{
|
|
103
98
|
backgroundColor: colors.surface,
|
|
104
|
-
borderRadius: tokens.
|
|
99
|
+
borderRadius: tokens.borders.radius.lg,
|
|
105
100
|
},
|
|
106
101
|
containerStyle,
|
|
107
102
|
]}
|
|
@@ -12,12 +12,11 @@ export const SettingsSection: React.FC<SettingsSectionProps> = ({
|
|
|
12
12
|
children,
|
|
13
13
|
}) => {
|
|
14
14
|
const tokens = useAppDesignTokens();
|
|
15
|
-
const colors = tokens.colors;
|
|
16
15
|
|
|
17
16
|
return (
|
|
18
|
-
<View style={[styles.container, { backgroundColor: colors.surface }]}>
|
|
17
|
+
<View style={[styles.container, { backgroundColor: tokens.colors.surface }]}>
|
|
19
18
|
<View style={styles.titleContainer}>
|
|
20
|
-
<AtomicText type="titleLarge" color="
|
|
19
|
+
<AtomicText type="titleLarge" color="textPrimary">
|
|
21
20
|
{title}
|
|
22
21
|
</AtomicText>
|
|
23
22
|
</View>
|
|
@@ -31,7 +31,7 @@ export const SettingsHeader: React.FC<SettingsHeaderProps> = ({
|
|
|
31
31
|
|
|
32
32
|
return (
|
|
33
33
|
<View style={[styles.container, { padding: tokens.spacing.lg }]}>
|
|
34
|
-
<AtomicText
|
|
34
|
+
<AtomicText type="headlineLarge">
|
|
35
35
|
{t('settings.title')}
|
|
36
36
|
</AtomicText>
|
|
37
37
|
|
|
@@ -42,7 +42,7 @@ export const SettingsHeader: React.FC<SettingsHeaderProps> = ({
|
|
|
42
42
|
styles.closeButton,
|
|
43
43
|
{
|
|
44
44
|
backgroundColor: pressed ? tokens.colors.surfaceVariant : tokens.colors.surface,
|
|
45
|
-
borderRadius: tokens.
|
|
45
|
+
borderRadius: tokens.borders.radius.full,
|
|
46
46
|
},
|
|
47
47
|
]}
|
|
48
48
|
hitSlop={{ top: 10, bottom: 10, left: 10, right: 10 }}
|