@umituz/react-native-settings 4.17.13 → 4.17.15

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.17.13",
3
+ "version": "4.17.15",
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",
@@ -76,5 +76,8 @@
76
76
  "src",
77
77
  "README.md",
78
78
  "LICENSE"
79
- ]
80
- }
79
+ ],
80
+ "dependencies": {
81
+ "@umituz/react-native-design-system": "^2.2.0"
82
+ }
83
+ }
@@ -9,7 +9,7 @@
9
9
 
10
10
  import React from "react";
11
11
  import { Alert } from "react-native";
12
- import { useAppDesignTokens } from "@umituz/react-native-design-system";
12
+ import { useResponsiveDesignTokens } 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 = useAppDesignTokens();
49
+ const tokens = useResponsiveDesignTokens();
50
50
 
51
51
  // Merge custom texts with defaults
52
52
  const t = { ...DEFAULT_TEXTS, ...texts };
@@ -6,7 +6,7 @@
6
6
 
7
7
  import React from "react";
8
8
  import { View, Text, Pressable, StyleSheet, Switch } from "react-native";
9
- import { AtomicIcon, useAppDesignTokens } from "@umituz/react-native-design-system";
9
+ import { AtomicIcon, useResponsiveDesignTokens } from "@umituz/react-native-design-system";
10
10
 
11
11
  export interface SettingItemProps {
12
12
  /** Icon name (Ionicons) */
@@ -58,7 +58,7 @@ export const SettingItem: React.FC<SettingItemProps> = ({
58
58
  switchThumbColor,
59
59
  switchTrackColors,
60
60
  }) => {
61
- const tokens = useAppDesignTokens();
61
+ const tokens = useResponsiveDesignTokens();
62
62
  const colors = tokens.colors;
63
63
 
64
64
  return (
@@ -5,7 +5,7 @@
5
5
 
6
6
  import React, { Component, ReactNode } from 'react';
7
7
  import { View, StyleSheet } from 'react-native';
8
- import { useAppDesignTokens } from '@umituz/react-native-design-system';
8
+ import { useResponsiveDesignTokens } 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 = useAppDesignTokens();
70
+ const tokens = useResponsiveDesignTokens();
71
71
  const { t } = useLocalization();
72
72
 
73
73
  const title = __DEV__ && error?.message
@@ -5,7 +5,7 @@
5
5
 
6
6
  import React from "react";
7
7
  import { View, Text, StyleSheet } from "react-native";
8
- import { useAppDesignTokens } from "@umituz/react-native-design-system";
8
+ import { useResponsiveDesignTokens } from "@umituz/react-native-design-system";
9
9
 
10
10
  export interface SettingsFooterProps {
11
11
  /** Custom version text (optional) - should include version number from app config */
@@ -21,7 +21,7 @@ export const SettingsFooter: React.FC<SettingsFooterProps> = ({
21
21
  appVersion,
22
22
  versionLabel = "Version",
23
23
  }) => {
24
- const tokens = useAppDesignTokens();
24
+ const tokens = useResponsiveDesignTokens();
25
25
  const colors = tokens.colors;
26
26
 
27
27
  // If versionText is provided, use it directly
@@ -5,7 +5,7 @@
5
5
 
6
6
  import React from "react";
7
7
  import { View, Text, StyleSheet } from "react-native";
8
- import { useAppDesignTokens } from "@umituz/react-native-design-system";
8
+ import { useResponsiveDesignTokens } from "@umituz/react-native-design-system";
9
9
 
10
10
  export interface SettingsSectionProps {
11
11
  /** Section title */
@@ -18,7 +18,7 @@ export const SettingsSection: React.FC<SettingsSectionProps> = ({
18
18
  title,
19
19
  children,
20
20
  }) => {
21
- const tokens = useAppDesignTokens();
21
+ const tokens = useResponsiveDesignTokens();
22
22
  const colors = tokens.colors;
23
23
 
24
24
  return (
@@ -7,7 +7,7 @@
7
7
 
8
8
  import React from "react";
9
9
  import { createStackNavigator } from "@react-navigation/stack";
10
- import { useAppDesignTokens } from "@umituz/react-native-design-system";
10
+ import { useResponsiveDesignTokens } 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 } from "../screens/types";
@@ -76,7 +76,7 @@ export const SettingsStackNavigator: React.FC<SettingsStackNavigatorProps> = ({
76
76
  additionalScreens = [],
77
77
  devSettings,
78
78
  }) => {
79
- const tokens = useAppDesignTokens();
79
+ const tokens = useResponsiveDesignTokens();
80
80
 
81
81
  const screenOptions = {
82
82
  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
- useAppDesignTokens,
11
+ useResponsiveDesignTokens,
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 = useAppDesignTokens();
71
+ const tokens = useResponsiveDesignTokens();
72
72
 
73
73
  const isDark = themeMode === "dark";
74
74
  const colors = tokens.colors;
@@ -6,7 +6,7 @@
6
6
  import React, { useMemo } from "react";
7
7
  import { View, ScrollView, StyleSheet } from "react-native";
8
8
  import { useSafeAreaInsets } from "react-native-safe-area-context";
9
- import { useAppDesignTokens } from "@umituz/react-native-design-system";
9
+ import { useResponsiveDesignTokens } from "@umituz/react-native-design-system";
10
10
  import { useLocalization } from "@umituz/react-native-localization";
11
11
  import { SettingsFooter } from "../../components/SettingsFooter";
12
12
  import { ProfileSection } from "@umituz/react-native-auth";
@@ -107,7 +107,7 @@ export const SettingsContent: React.FC<SettingsContentProps> = ({
107
107
  showCloseButton = false,
108
108
  devSettings,
109
109
  }) => {
110
- const tokens = useAppDesignTokens();
110
+ const tokens = useResponsiveDesignTokens();
111
111
  const insets = useSafeAreaInsets();
112
112
  const { t } = useLocalization();
113
113
 
@@ -174,12 +174,8 @@ export const SettingsContent: React.FC<SettingsContentProps> = ({
174
174
  <AppearanceSection
175
175
  config={{
176
176
  ...normalizedConfig.appearance.config,
177
- title:
178
- normalizedConfig.appearance.config?.title ||
179
- t("settings.appearance.title"),
180
- description:
181
- normalizedConfig.appearance.config?.description ||
182
- t("settings.appearance.description"),
177
+ title: t("settings.appearance.title"),
178
+ description: t("settings.appearance.description"),
183
179
  }}
184
180
  sectionTitle={t("settings.appearance.title")}
185
181
  />
@@ -202,12 +198,8 @@ export const SettingsContent: React.FC<SettingsContentProps> = ({
202
198
  <NotificationsSection
203
199
  config={{
204
200
  ...normalizedConfig.notifications.config,
205
- title:
206
- normalizedConfig.notifications.config?.title ||
207
- t("settings.notifications.title"),
208
- description:
209
- normalizedConfig.notifications.config?.description ||
210
- t("settings.notifications.description"),
201
+ title: t("settings.notifications.title"),
202
+ description: t("settings.notifications.description"),
211
203
  }}
212
204
  />
213
205
  )}
@@ -216,12 +208,8 @@ export const SettingsContent: React.FC<SettingsContentProps> = ({
216
208
  <AboutSection
217
209
  config={{
218
210
  ...normalizedConfig.about.config,
219
- title:
220
- normalizedConfig.about.config?.title ||
221
- t("settings.about.title"),
222
- description:
223
- normalizedConfig.about.config?.description ||
224
- t("settings.about.description"),
211
+ title: t("settings.about.title"),
212
+ description: t("settings.about.description"),
225
213
  }}
226
214
  sectionTitle={t("settings.about.title")}
227
215
  />
@@ -231,12 +219,8 @@ export const SettingsContent: React.FC<SettingsContentProps> = ({
231
219
  <LegalSection
232
220
  config={{
233
221
  ...normalizedConfig.legal.config,
234
- title:
235
- normalizedConfig.legal.config?.title ||
236
- t("settings.legal.title"),
237
- description:
238
- normalizedConfig.legal.config?.description ||
239
- t("settings.legal.description"),
222
+ title: t("settings.legal.title"),
223
+ description: t("settings.legal.description"),
240
224
  }}
241
225
  sectionTitle={t("settings.legal.title")}
242
226
  />
@@ -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 { useAppDesignTokens } from "@umituz/react-native-design-system";
10
+ import { useResponsiveDesignTokens } 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 = useAppDesignTokens();
23
+ const tokens = useResponsiveDesignTokens();
24
24
  const insets = useSafeAreaInsets();
25
25
 
26
26
  const handleClose = () => {