@umituz/react-native-settings 4.16.22 → 4.17.1

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,13 +1,12 @@
1
1
  {
2
2
  "name": "@umituz/react-native-settings",
3
- "version": "4.16.22",
3
+ "version": "4.17.1",
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",
7
7
  "scripts": {
8
- "typecheck": "echo 'TypeScript validation passed'",
9
- "lint": "echo 'Lint passed'",
10
- "version:patch": "npm version patch -m 'chore: release v%s'",
8
+ "typecheck": "tsc --noEmit",
9
+ "lint": "tsc --noEmit",
11
10
  "version:minor": "npm version minor -m 'chore: release v%s'",
12
11
  "version:major": "npm version major -m 'chore: release v%s'"
13
12
  },
@@ -74,4 +73,4 @@
74
73
  "README.md",
75
74
  "LICENSE"
76
75
  ]
77
- }
76
+ }
@@ -45,7 +45,7 @@ export const CloudSyncSetting: React.FC<CloudSyncSettingProps> = ({
45
45
 
46
46
  return (
47
47
  <SettingItem
48
- icon="cloud-outline"
48
+ icon="cloud"
49
49
  title={title || "cloud_sync"}
50
50
  value={displayDescription}
51
51
  onPress={onPress}
@@ -101,7 +101,7 @@ export const DevSettingsSection: React.FC<DevSettingsProps> = ({
101
101
  <SettingsSection title={t.sectionTitle}>
102
102
  {customDevComponents.map((component) => component)}
103
103
  <SettingItem
104
- icon="trash-outline"
104
+ icon="trash-2"
105
105
  title={t.clearTitle}
106
106
  value={t.clearDescription}
107
107
  onPress={handleClearData}
@@ -6,10 +6,13 @@
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 {
10
+ AtomicIcon,
11
+ useAppDesignTokens,
12
+ } from "@umituz/react-native-design-system";
10
13
 
11
14
  export interface SettingItemProps {
12
- /** Icon name (Ionicons) */
15
+ /** Icon name for AtomicIcon */
13
16
  icon: string;
14
17
  /** Main title text */
15
18
  title: string;
@@ -60,6 +63,7 @@ export const SettingItem: React.FC<SettingItemProps> = ({
60
63
  }) => {
61
64
  const tokens = useAppDesignTokens();
62
65
  const colors = tokens.colors;
66
+ const spacing = tokens.spacing;
63
67
 
64
68
  return (
65
69
  <>
@@ -89,7 +93,7 @@ export const SettingItem: React.FC<SettingItemProps> = ({
89
93
  >
90
94
  <AtomicIcon
91
95
  name={icon}
92
- customSize={24}
96
+ size={24}
93
97
  customColor={iconColor || colors.primary}
94
98
  />
95
99
  </View>
@@ -128,13 +132,13 @@ export const SettingItem: React.FC<SettingItemProps> = ({
128
132
  false: `${colors.textSecondary}30`,
129
133
  true: colors.primary,
130
134
  }}
131
- thumbColor={switchThumbColor || "#FFFFFF"}
135
+ thumbColor={switchThumbColor || colors.onPrimary || "#FFFFFF"}
132
136
  ios_backgroundColor={`${colors.textSecondary}30`}
133
137
  />
134
138
  ) : (
135
139
  <AtomicIcon
136
- name="chevron-forward-outline"
137
- customSize={20}
140
+ name="chevron-right"
141
+ size={20}
138
142
  customColor={colors.textSecondary}
139
143
  />
140
144
  )}
@@ -7,7 +7,6 @@ import React, { Component, ReactNode } from 'react';
7
7
  import { View, StyleSheet } from 'react-native';
8
8
  import { useAppDesignTokens } from '@umituz/react-native-design-system';
9
9
  import { AtomicText, AtomicIcon } from '@umituz/react-native-design-system';
10
- import { useLocalization } from '@umituz/react-native-localization';
11
10
 
12
11
  interface Props {
13
12
  children: ReactNode;
@@ -64,19 +63,15 @@ interface ErrorBoundaryFallbackProps {
64
63
 
65
64
  const ErrorBoundaryFallback: React.FC<ErrorBoundaryFallbackProps> = ({
66
65
  error,
67
- fallbackTitle,
68
- fallbackMessage
66
+ fallbackTitle = "error_boundary.title",
67
+ fallbackMessage = "error_boundary.message"
69
68
  }) => {
70
69
  const tokens = useAppDesignTokens();
71
- const { t } = useLocalization();
72
-
73
- const title = __DEV__ && error?.message
74
- ? t("error_boundary.dev_title")
75
- : (fallbackTitle || t("error_boundary.title"));
76
70
 
71
+ const title = __DEV__ && error?.message ? "error_boundary.dev_title" : fallbackTitle;
77
72
  const message = __DEV__ && error?.message
78
- ? `${t("error_boundary.dev_message")}: ${error.message}`
79
- : (fallbackMessage || t("error_boundary.message"));
73
+ ? `error_boundary.dev_message: ${error.message}`
74
+ : fallbackMessage;
80
75
 
81
76
  return (
82
77
  <View style={[styles.container, { backgroundColor: tokens.colors.backgroundPrimary }]}>
@@ -36,7 +36,7 @@ export const StorageClearSetting: React.FC<StorageClearSettingProps> = ({
36
36
 
37
37
  return (
38
38
  <SettingItem
39
- icon="trash-outline"
39
+ icon="trash-2"
40
40
  title={defaultTitle}
41
41
  value={defaultDescription}
42
42
  onPress={onPress}