@umituz/react-native-settings 1.11.1 → 1.11.4

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": "1.11.1",
3
+ "version": "1.11.4",
4
4
  "description": "Settings management for React Native apps - user preferences, theme, language, notifications",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./src/index.ts",
@@ -30,12 +30,16 @@
30
30
  "react-native": ">=0.74.0",
31
31
  "zustand": "^5.0.2",
32
32
  "lucide-react-native": "^0.468.0",
33
+ "@react-navigation/native": "^6.1.18",
34
+ "react-native-safe-area-context": "~5.6.0",
33
35
  "@umituz/react-native-storage": "latest",
34
36
  "@umituz/react-native-design-system": "latest",
37
+ "@umituz/react-native-design-system-atoms": "latest",
38
+ "@umituz/react-native-design-system-organisms": "latest",
35
39
  "@umituz/react-native-design-system-theme": "latest",
36
40
  "@umituz/react-native-localization": "latest",
37
41
  "@umituz/react-native-appearance": "latest",
38
- "expo-linear-gradient": "~14.0.0"
42
+ "expo-linear-gradient": "^15.0.7"
39
43
  },
40
44
  "devDependencies": {
41
45
  "@types/react": "^18.2.45",
@@ -1,11 +1,11 @@
1
1
  /**
2
2
  * Setting Item Component
3
3
  * Single Responsibility: Render a single settings item
4
- * Modern design with Lucide icons and switch support
4
+ * Material Design 3 style with hover effects and modern spacing
5
5
  */
6
6
 
7
7
  import React from "react";
8
- import { View, Text, TouchableOpacity, StyleSheet, Switch } from "react-native";
8
+ import { View, Text, Pressable, StyleSheet, Switch } from "react-native";
9
9
  import { ChevronRight, type LucideIcon } from "lucide-react-native";
10
10
  import { useAppDesignTokens } from "@umituz/react-native-design-system-theme";
11
11
 
@@ -56,14 +56,17 @@ export const SettingItem: React.FC<SettingItemProps> = ({
56
56
 
57
57
  return (
58
58
  <>
59
- <TouchableOpacity
60
- style={[
59
+ <Pressable
60
+ style={({ pressed }) => [
61
61
  styles.container,
62
- { backgroundColor: colors.backgroundPrimary },
62
+ {
63
+ backgroundColor: pressed && !disabled && !showSwitch
64
+ ? `${colors.primary}08`
65
+ : 'transparent',
66
+ },
63
67
  ]}
64
68
  onPress={onPress}
65
69
  disabled={showSwitch || disabled}
66
- activeOpacity={disabled ? 1 : 0.7}
67
70
  testID={testID}
68
71
  >
69
72
  <View style={styles.content}>
@@ -77,7 +80,7 @@ export const SettingItem: React.FC<SettingItemProps> = ({
77
80
  },
78
81
  ]}
79
82
  >
80
- <Icon size={20} color={iconColor || colors.primary} />
83
+ <Icon size={24} color={iconColor || colors.primary} />
81
84
  </View>
82
85
  <View style={styles.textContainer}>
83
86
  <Text
@@ -97,7 +100,7 @@ export const SettingItem: React.FC<SettingItemProps> = ({
97
100
  {value && !showSwitch && (
98
101
  <Text
99
102
  style={[styles.value, { color: colors.textSecondary }]}
100
- numberOfLines={1}
103
+ numberOfLines={2}
101
104
  >
102
105
  {value}
103
106
  </Text>
@@ -115,12 +118,13 @@ export const SettingItem: React.FC<SettingItemProps> = ({
115
118
  true: colors.primary,
116
119
  }}
117
120
  thumbColor="#FFFFFF"
121
+ ios_backgroundColor={`${colors.textSecondary}30`}
118
122
  />
119
123
  ) : (
120
- <ChevronRight size={18} color={colors.textSecondary} />
124
+ <ChevronRight size={20} color={colors.textSecondary} />
121
125
  )}
122
126
  </View>
123
- </TouchableOpacity>
127
+ </Pressable>
124
128
 
125
129
  {!isLast && (
126
130
  <View
@@ -139,9 +143,9 @@ const styles = StyleSheet.create({
139
143
  flexDirection: "row",
140
144
  alignItems: "center",
141
145
  justifyContent: "space-between",
142
- paddingHorizontal: 20,
143
- paddingVertical: 18,
144
- minHeight: 64,
146
+ paddingHorizontal: 16,
147
+ paddingVertical: 16,
148
+ minHeight: 72,
145
149
  },
146
150
  content: {
147
151
  flexDirection: "row",
@@ -149,8 +153,8 @@ const styles = StyleSheet.create({
149
153
  flex: 1,
150
154
  },
151
155
  iconContainer: {
152
- width: 44,
153
- height: 44,
156
+ width: 48,
157
+ height: 48,
154
158
  borderRadius: 12,
155
159
  justifyContent: "center",
156
160
  alignItems: "center",
@@ -163,11 +167,13 @@ const styles = StyleSheet.create({
163
167
  title: {
164
168
  fontSize: 16,
165
169
  fontWeight: "500",
170
+ lineHeight: 20,
166
171
  },
167
172
  value: {
168
- fontSize: 12,
173
+ fontSize: 14,
169
174
  fontWeight: "400",
170
- marginTop: 2,
175
+ marginTop: 4,
176
+ lineHeight: 18,
171
177
  },
172
178
  rightContainer: {
173
179
  flexDirection: "row",
@@ -20,19 +20,13 @@ export const SettingsSection: React.FC<SettingsSectionProps> = ({
20
20
  }) => {
21
21
  const tokens = useAppDesignTokens();
22
22
  const colors = tokens.colors;
23
- const spacing = tokens.spacing;
24
23
 
25
24
  return (
26
- <View style={styles.container}>
27
- <Text style={[styles.title, { color: colors.textSecondary }]}>
25
+ <View style={[styles.container, { backgroundColor: colors.surface }]}>
26
+ <Text style={[styles.title, { color: colors.textPrimary }]}>
28
27
  {title}
29
28
  </Text>
30
- <View
31
- style={[
32
- styles.content,
33
- { backgroundColor: `${colors.textSecondary}10` },
34
- ]}
35
- >
29
+ <View style={styles.content}>
36
30
  {children}
37
31
  </View>
38
32
  </View>
@@ -41,22 +35,19 @@ export const SettingsSection: React.FC<SettingsSectionProps> = ({
41
35
 
42
36
  const styles = StyleSheet.create({
43
37
  container: {
44
- marginTop: 0,
45
- marginBottom: 32,
38
+ marginBottom: 16,
39
+ borderRadius: 12,
40
+ overflow: "hidden",
46
41
  },
47
42
  title: {
48
- fontSize: 11,
49
- fontWeight: "700",
50
- textTransform: "uppercase",
51
- letterSpacing: 1.2,
43
+ fontSize: 18,
44
+ fontWeight: "600",
52
45
  paddingHorizontal: 16,
53
- paddingBottom: 12,
54
- marginBottom: 0,
46
+ paddingTop: 16,
47
+ paddingBottom: 8,
55
48
  },
56
49
  content: {
57
- borderRadius: 16,
58
- marginHorizontal: 16,
59
- overflow: "hidden",
50
+ borderRadius: 0,
60
51
  },
61
52
  });
62
53
 
@@ -8,24 +8,3 @@ import React from "react";
8
8
  import { AppearanceScreen } from "@umituz/react-native-appearance";
9
9
 
10
10
  export { AppearanceScreen };
11
-
12
- const getStyles = (tokens: DesignTokens) =>
13
- StyleSheet.create({
14
- header: {
15
- paddingHorizontal: tokens.spacing.lg,
16
- paddingTop: tokens.spacing.lg,
17
- paddingBottom: tokens.spacing.md,
18
- },
19
- headerSubtitle: {
20
- marginTop: tokens.spacing.xs,
21
- },
22
- sectionHeader: {
23
- paddingHorizontal: tokens.spacing.lg,
24
- paddingTop: tokens.spacing.lg,
25
- paddingBottom: tokens.spacing.md,
26
- textTransform: "uppercase",
27
- letterSpacing: 1,
28
- fontWeight: "600",
29
- fontSize: 12,
30
- },
31
- });