@umituz/react-native-settings 5.3.73 → 5.3.75

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": "5.3.73",
3
+ "version": "5.3.75",
4
4
  "description": "Complete settings hub for React Native apps - consolidated package with settings, localization, about, legal, appearance, feedback, FAQs, rating, and gamification - expo-store-review and expo-device now lazy loaded",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./dist/index.d.ts",
@@ -6,7 +6,7 @@
6
6
  */
7
7
 
8
8
  import React, { useMemo, useCallback } from "react";
9
- import { View, ScrollView } from "react-native";
9
+ import { View, FlatList } from "react-native";
10
10
  import { ScreenLayout } from "@umituz/react-native-design-system/layouts";
11
11
  import { NavigationHeader, useAppNavigation } from "@umituz/react-native-design-system/molecules";
12
12
  import { useAppDesignTokens } from "@umituz/react-native-design-system/theme";
@@ -153,10 +153,31 @@ export const AppearanceScreen: React.FC<AppearanceScreenProps> = ({
153
153
  texts?.previewSectionDescription,
154
154
  ]);
155
155
 
156
- const contentStyle = useMemo(() => ({
157
- paddingHorizontal: tokens.spacing.lg,
158
- paddingBottom: tokens.spacing['2xl'],
159
- }), [tokens.spacing]);
156
+ // Prepare data for FlatList
157
+ const sectionsData = useMemo(() => {
158
+ const items: Array<{ id: string; component: React.ReactNode }> = [];
159
+
160
+ if (headerComponentMemo) {
161
+ items.push({ id: 'header', component: headerComponentMemo });
162
+ }
163
+ if (themeSectionMemo) {
164
+ items.push({ id: 'theme', component: themeSectionMemo });
165
+ }
166
+ if (colorsSectionMemo) {
167
+ items.push({ id: 'colors', component: colorsSectionMemo });
168
+ }
169
+ if (previewSectionMemo) {
170
+ items.push({ id: 'preview', component: previewSectionMemo });
171
+ }
172
+
173
+ return items;
174
+ }, [headerComponentMemo, themeSectionMemo, colorsSectionMemo, previewSectionMemo]);
175
+
176
+ const renderItem = useCallback(({ item }: { item: { id: string; component: React.ReactNode } }) => {
177
+ return <View style={{ paddingHorizontal: tokens.spacing.lg }}>{item.component}</View>;
178
+ }, [tokens.spacing.lg]);
179
+
180
+ const keyExtractor = useCallback((item: { id: string; component: React.ReactNode }) => item.id, []);
160
181
 
161
182
  return (
162
183
  <ScreenLayout
@@ -168,15 +189,15 @@ export const AppearanceScreen: React.FC<AppearanceScreenProps> = ({
168
189
  />
169
190
  }
170
191
  >
171
- <ScrollView
192
+ <FlatList
193
+ data={sectionsData}
194
+ renderItem={renderItem}
195
+ keyExtractor={keyExtractor}
172
196
  showsVerticalScrollIndicator={false}
173
- contentContainerStyle={contentStyle}
174
- >
175
- {headerComponentMemo}
176
- {themeSectionMemo}
177
- {colorsSectionMemo}
178
- {previewSectionMemo}
179
- </ScrollView>
197
+ contentContainerStyle={{
198
+ paddingBottom: tokens.spacing['2xl'],
199
+ }}
200
+ />
180
201
  </ScreenLayout>
181
202
  );
182
203
  };
@@ -31,6 +31,9 @@ interface LanguageItemProps {
31
31
  };
32
32
  }
33
33
 
34
+ // SVG path for checkmark icon (works without external icon library)
35
+ const CHECKMARK_PATH = "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z";
36
+
34
37
  export const LanguageItem: React.FC<LanguageItemProps> = ({
35
38
  item,
36
39
  isSelected,
@@ -113,7 +116,11 @@ export const LanguageItem: React.FC<LanguageItemProps> = ({
113
116
  </View>
114
117
  </View>
115
118
  {isSelected && (
116
- <AtomicIcon name="checkmark-circle" size="md" color="primary" />
119
+ <AtomicIcon
120
+ svgPath={CHECKMARK_PATH}
121
+ customSize={24}
122
+ customColor={tokens.colors.primary}
123
+ />
117
124
  )}
118
125
  </TouchableOpacity>
119
126
  );