@umituz/react-native-settings 2.0.0 → 2.4.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.
Files changed (160) hide show
  1. package/README.md +129 -3
  2. package/lib/__tests__/setup.d.ts +5 -0
  3. package/lib/__tests__/setup.d.ts.map +1 -0
  4. package/lib/__tests__/setup.js +143 -0
  5. package/lib/__tests__/setup.js.map +1 -0
  6. package/lib/domain/repositories/ISettingsRepository.d.ts +51 -0
  7. package/lib/domain/repositories/ISettingsRepository.d.ts.map +1 -0
  8. package/lib/domain/repositories/ISettingsRepository.js +8 -0
  9. package/lib/domain/repositories/ISettingsRepository.js.map +1 -0
  10. package/lib/index.d.ts +35 -0
  11. package/lib/index.d.ts.map +1 -0
  12. package/lib/index.js +32 -0
  13. package/lib/index.js.map +1 -0
  14. package/lib/infrastructure/storage/SettingsStore.d.ts +36 -0
  15. package/lib/infrastructure/storage/SettingsStore.d.ts.map +1 -0
  16. package/lib/infrastructure/storage/SettingsStore.js +144 -0
  17. package/lib/infrastructure/storage/SettingsStore.js.map +1 -0
  18. package/lib/presentation/components/CloudSyncSetting.d.ts +16 -0
  19. package/lib/presentation/components/CloudSyncSetting.d.ts.map +1 -0
  20. package/lib/presentation/components/CloudSyncSetting.js +30 -0
  21. package/lib/presentation/components/CloudSyncSetting.js.map +1 -0
  22. package/lib/presentation/components/DisclaimerCard.d.ts +15 -0
  23. package/lib/presentation/components/DisclaimerCard.d.ts.map +1 -0
  24. package/lib/presentation/components/DisclaimerCard.js +73 -0
  25. package/lib/presentation/components/DisclaimerCard.js.map +1 -0
  26. package/lib/presentation/components/DisclaimerModal.d.ts +13 -0
  27. package/lib/presentation/components/DisclaimerModal.d.ts.map +1 -0
  28. package/lib/presentation/components/DisclaimerModal.js +62 -0
  29. package/lib/presentation/components/DisclaimerModal.js.map +1 -0
  30. package/lib/presentation/components/DisclaimerSetting.d.ts +39 -0
  31. package/lib/presentation/components/DisclaimerSetting.d.ts.map +1 -0
  32. package/lib/presentation/components/DisclaimerSetting.js +59 -0
  33. package/lib/presentation/components/DisclaimerSetting.js.map +1 -0
  34. package/lib/presentation/components/SettingItem.d.ts +45 -0
  35. package/lib/presentation/components/SettingItem.d.ts.map +1 -0
  36. package/lib/presentation/components/SettingItem.js +113 -0
  37. package/lib/presentation/components/SettingItem.js.map +1 -0
  38. package/lib/presentation/components/SettingsErrorBoundary.d.ts +23 -0
  39. package/lib/presentation/components/SettingsErrorBoundary.d.ts.map +1 -0
  40. package/lib/presentation/components/SettingsErrorBoundary.js +73 -0
  41. package/lib/presentation/components/SettingsErrorBoundary.js.map +1 -0
  42. package/lib/presentation/components/SettingsFooter.d.ts +11 -0
  43. package/lib/presentation/components/SettingsFooter.d.ts.map +1 -0
  44. package/lib/presentation/components/SettingsFooter.js +31 -0
  45. package/lib/presentation/components/SettingsFooter.js.map +1 -0
  46. package/lib/presentation/components/SettingsSection.d.ts +13 -0
  47. package/lib/presentation/components/SettingsSection.d.ts.map +1 -0
  48. package/lib/presentation/components/SettingsSection.js +37 -0
  49. package/lib/presentation/components/SettingsSection.js.map +1 -0
  50. package/lib/presentation/components/StorageClearSetting.d.ts +16 -0
  51. package/lib/presentation/components/StorageClearSetting.d.ts.map +1 -0
  52. package/lib/presentation/components/StorageClearSetting.js +21 -0
  53. package/lib/presentation/components/StorageClearSetting.js.map +1 -0
  54. package/lib/presentation/components/UserProfileHeader.d.ts +30 -0
  55. package/lib/presentation/components/UserProfileHeader.d.ts.map +1 -0
  56. package/lib/presentation/components/UserProfileHeader.js +119 -0
  57. package/lib/presentation/components/UserProfileHeader.js.map +1 -0
  58. package/lib/presentation/screens/AppearanceScreen.d.ts +8 -0
  59. package/lib/presentation/screens/AppearanceScreen.d.ts.map +1 -0
  60. package/lib/presentation/screens/AppearanceScreen.js +8 -0
  61. package/lib/presentation/screens/AppearanceScreen.js.map +1 -0
  62. package/lib/presentation/screens/SettingsScreen.d.ts +38 -0
  63. package/lib/presentation/screens/SettingsScreen.d.ts.map +1 -0
  64. package/lib/presentation/screens/SettingsScreen.js +37 -0
  65. package/lib/presentation/screens/SettingsScreen.js.map +1 -0
  66. package/lib/presentation/screens/components/AboutLegalSection.d.ts +15 -0
  67. package/lib/presentation/screens/components/AboutLegalSection.d.ts.map +1 -0
  68. package/lib/presentation/screens/components/AboutLegalSection.js +28 -0
  69. package/lib/presentation/screens/components/AboutLegalSection.js.map +1 -0
  70. package/lib/presentation/screens/components/AppearanceSection.d.ts +12 -0
  71. package/lib/presentation/screens/components/AppearanceSection.d.ts.map +1 -0
  72. package/lib/presentation/screens/components/AppearanceSection.js +21 -0
  73. package/lib/presentation/screens/components/AppearanceSection.js.map +1 -0
  74. package/lib/presentation/screens/components/LanguageSection.d.ts +12 -0
  75. package/lib/presentation/screens/components/LanguageSection.d.ts.map +1 -0
  76. package/lib/presentation/screens/components/LanguageSection.js +26 -0
  77. package/lib/presentation/screens/components/LanguageSection.js.map +1 -0
  78. package/lib/presentation/screens/components/NotificationsSection.d.ts +12 -0
  79. package/lib/presentation/screens/components/NotificationsSection.d.ts.map +1 -0
  80. package/lib/presentation/screens/components/NotificationsSection.js +58 -0
  81. package/lib/presentation/screens/components/NotificationsSection.js.map +1 -0
  82. package/lib/presentation/screens/components/SettingsContent.d.ts +36 -0
  83. package/lib/presentation/screens/components/SettingsContent.d.ts.map +1 -0
  84. package/lib/presentation/screens/components/SettingsContent.js +81 -0
  85. package/lib/presentation/screens/components/SettingsContent.js.map +1 -0
  86. package/lib/presentation/screens/components/SettingsHeader.d.ts +12 -0
  87. package/lib/presentation/screens/components/SettingsHeader.d.ts.map +1 -0
  88. package/lib/presentation/screens/components/SettingsHeader.js +59 -0
  89. package/lib/presentation/screens/components/SettingsHeader.js.map +1 -0
  90. package/lib/presentation/screens/components/index.d.ts +9 -0
  91. package/lib/presentation/screens/components/index.d.ts.map +1 -0
  92. package/lib/presentation/screens/components/index.js +9 -0
  93. package/lib/presentation/screens/components/index.js.map +1 -0
  94. package/lib/presentation/screens/hooks/useFeatureDetection.d.ts +21 -0
  95. package/lib/presentation/screens/hooks/useFeatureDetection.d.ts.map +1 -0
  96. package/lib/presentation/screens/hooks/useFeatureDetection.js +82 -0
  97. package/lib/presentation/screens/hooks/useFeatureDetection.js.map +1 -0
  98. package/lib/presentation/screens/types/CustomSection.d.ts +19 -0
  99. package/lib/presentation/screens/types/CustomSection.d.ts.map +1 -0
  100. package/lib/presentation/screens/types/CustomSection.js +6 -0
  101. package/lib/presentation/screens/types/CustomSection.js.map +1 -0
  102. package/lib/presentation/screens/types/ExtendedConfig.d.ts +68 -0
  103. package/lib/presentation/screens/types/ExtendedConfig.d.ts.map +1 -0
  104. package/lib/presentation/screens/types/ExtendedConfig.js +6 -0
  105. package/lib/presentation/screens/types/ExtendedConfig.js.map +1 -0
  106. package/lib/presentation/screens/types/FeatureConfig.d.ts +95 -0
  107. package/lib/presentation/screens/types/FeatureConfig.d.ts.map +1 -0
  108. package/lib/presentation/screens/types/FeatureConfig.js +6 -0
  109. package/lib/presentation/screens/types/FeatureConfig.js.map +1 -0
  110. package/lib/presentation/screens/types/SettingsConfig.d.ts +97 -0
  111. package/lib/presentation/screens/types/SettingsConfig.d.ts.map +1 -0
  112. package/lib/presentation/screens/types/SettingsConfig.js +6 -0
  113. package/lib/presentation/screens/types/SettingsConfig.js.map +1 -0
  114. package/lib/presentation/screens/types/index.d.ts +10 -0
  115. package/lib/presentation/screens/types/index.d.ts.map +1 -0
  116. package/lib/presentation/screens/types/index.js +6 -0
  117. package/lib/presentation/screens/types/index.js.map +1 -0
  118. package/lib/presentation/screens/utils/normalizeConfig.d.ts +44 -0
  119. package/lib/presentation/screens/utils/normalizeConfig.d.ts.map +1 -0
  120. package/lib/presentation/screens/utils/normalizeConfig.js +38 -0
  121. package/lib/presentation/screens/utils/normalizeConfig.js.map +1 -0
  122. package/package.json +46 -11
  123. package/src/__tests__/integration.test.tsx +371 -0
  124. package/src/__tests__/performance.test.tsx +369 -0
  125. package/src/__tests__/setup.test.tsx +20 -0
  126. package/src/__tests__/setup.ts +157 -0
  127. package/src/index.ts +9 -0
  128. package/src/infrastructure/storage/SettingsStore.ts +90 -45
  129. package/src/infrastructure/storage/__tests__/SettingsStore.test.tsx +302 -0
  130. package/src/presentation/components/CloudSyncSetting.tsx +11 -17
  131. package/src/presentation/components/DisclaimerCard.tsx +115 -0
  132. package/src/presentation/components/DisclaimerModal.tsx +104 -0
  133. package/src/presentation/components/DisclaimerSetting.tsx +77 -159
  134. package/src/presentation/components/SettingItem.tsx +11 -2
  135. package/src/presentation/components/SettingsErrorBoundary.tsx +126 -0
  136. package/src/presentation/components/StorageClearSetting.tsx +13 -8
  137. package/src/presentation/components/UserProfileHeader.tsx +48 -11
  138. package/src/presentation/components/__tests__/CloudSyncSetting.test.tsx +78 -0
  139. package/src/presentation/components/__tests__/DisclaimerCard.test.tsx +208 -0
  140. package/src/presentation/components/__tests__/DisclaimerModal.test.tsx +236 -0
  141. package/src/presentation/components/__tests__/DisclaimerSetting.test.tsx +74 -0
  142. package/src/presentation/components/__tests__/SettingItem.test.tsx +189 -0
  143. package/src/presentation/components/__tests__/SettingsErrorBoundary.test.tsx +186 -0
  144. package/src/presentation/screens/SettingsScreen.tsx +29 -159
  145. package/src/presentation/screens/__tests__/SettingsScreen.test.tsx +322 -0
  146. package/src/presentation/screens/components/AboutLegalSection.tsx +14 -5
  147. package/src/presentation/screens/components/AppearanceSection.tsx +1 -1
  148. package/src/presentation/screens/components/LanguageSection.tsx +2 -1
  149. package/src/presentation/screens/components/NotificationsSection.tsx +19 -14
  150. package/src/presentation/screens/components/SettingsContent.tsx +167 -0
  151. package/src/presentation/screens/components/SettingsHeader.tsx +79 -0
  152. package/src/presentation/screens/hooks/__tests__/useFeatureDetection.test.tsx +261 -0
  153. package/src/presentation/screens/hooks/useFeatureDetection.ts +15 -5
  154. package/src/presentation/screens/types/CustomSection.ts +20 -0
  155. package/src/presentation/screens/types/ExtendedConfig.ts +68 -0
  156. package/src/presentation/screens/types/FeatureConfig.ts +102 -0
  157. package/src/presentation/screens/types/SettingsConfig.ts +116 -0
  158. package/src/presentation/screens/types/index.ts +20 -0
  159. package/src/presentation/screens/utils/normalizeConfig.ts +2 -1
  160. package/src/presentation/screens/types.ts +0 -263
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SettingsStore.js","sourceRoot":"","sources":["../../../src/infrastructure/storage/SettingsStore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AAgBpG,MAAM,uBAAuB,GAAG,cAAc,CAAC;AAE/C,MAAM,sBAAsB,GAAG,IAAI,GAAG,EAAwB,CAAC;AAE/D,MAAM,kBAAkB,GAAG,CAAC,MAAc,EAAgB,EAAE;IAC1D,IAAI,sBAAsB,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC;QACvC,OAAO,sBAAsB,CAAC,GAAG,CAAC,MAAM,CAAE,CAAC;IAC7C,CAAC;IAED,MAAM,QAAQ,GAAG;QACf,MAAM;QACN,KAAK,EAAE,MAAe;QACtB,QAAQ,EAAE,OAAO;QACjB,oBAAoB,EAAE,IAAI;QAC1B,kBAAkB,EAAE,IAAI;QACxB,iBAAiB,EAAE,IAAI;QACvB,YAAY,EAAE,IAAI;QAClB,gBAAgB,EAAE,IAAI;QACtB,WAAW,EAAE,KAAK;QAClB,SAAS,EAAE,IAAI,IAAI,EAAE;KACtB,CAAC;IAEF,sBAAsB,CAAC,GAAG,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;IAC7C,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG,MAAM,CAAgB,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,CAAC,CAAC;IACnE,QAAQ,EAAE,IAAI;IACd,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AAQ;QACR,OAAO;QACP,KAAK;QACL,YAAY;QACZ,cAAc;QACd,aAAa;QACb,UAAU;KACX,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Cloud Sync Setting Component
3
+ * Single Responsibility: Display cloud sync setting item
4
+ */
5
+ import React from "react";
6
+ export interface CloudSyncSettingProps {
7
+ title?: string;
8
+ description?: string;
9
+ isSyncing?: boolean;
10
+ lastSynced?: Date | null;
11
+ onPress?: () => void;
12
+ iconColor?: string;
13
+ titleColor?: string;
14
+ }
15
+ export declare const CloudSyncSetting: React.FC<CloudSyncSettingProps>;
16
+ //# sourceMappingURL=CloudSyncSetting.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CloudSyncSetting.d.ts","sourceRoot":"","sources":["../../../src/presentation/components/CloudSyncSetting.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAsB,MAAM,OAAO,CAAC;AAK3C,MAAM,WAAW,qBAAqB;IACpC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CAqC5D,CAAC"}
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Cloud Sync Setting Component
3
+ * Single Responsibility: Display cloud sync setting item
4
+ */
5
+ import React, { useCallback } from "react";
6
+ import { Cloud } from "lucide-react-native";
7
+ import { SettingItem } from "./SettingItem";
8
+ export const CloudSyncSetting = ({ title, description, isSyncing = false, lastSynced, onPress, iconColor, titleColor, }) => {
9
+ const formatLastSynced = useCallback((date) => {
10
+ if (!date)
11
+ return "never_synced";
12
+ const now = new Date();
13
+ const diff = now.getTime() - date.getTime();
14
+ const minutes = Math.floor(diff / 60000);
15
+ const hours = Math.floor(minutes / 60);
16
+ const days = Math.floor(hours / 24);
17
+ if (minutes < 1)
18
+ return "just_now";
19
+ if (minutes < 60)
20
+ return `${minutes}m_ago`;
21
+ if (hours < 24)
22
+ return `${hours}h_ago`;
23
+ if (days < 7)
24
+ return `${days}d_ago`;
25
+ return date.toLocaleDateString();
26
+ }, []);
27
+ const displayDescription = description || (isSyncing ? "syncing" : lastSynced ? `last_synced_${formatLastSynced(lastSynced)}` : "sync_to_cloud");
28
+ return (<SettingItem icon={Cloud} title={title || "cloud_sync"} value={displayDescription} onPress={onPress} iconColor={iconColor} titleColor={titleColor} disabled={isSyncing}/>);
29
+ };
30
+ //# sourceMappingURL=CloudSyncSetting.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CloudSyncSetting.js","sourceRoot":"","sources":["../../../src/presentation/components/CloudSyncSetting.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAa5C,MAAM,CAAC,MAAM,gBAAgB,GAAoC,CAAC,EAChE,KAAK,EACL,WAAW,EACX,SAAS,GAAG,KAAK,EACjB,UAAU,EACV,OAAO,EACP,SAAS,EACT,UAAU,GACX,EAAE,EAAE;IACH,MAAM,gBAAgB,GAAG,WAAW,CAAC,CAAC,IAA6B,EAAU,EAAE;QAC7E,IAAI,CAAC,IAAI;YAAE,OAAO,cAAc,CAAC;QACjC,MAAM,GAAG,GAAG,IAAI,IAAI,EAAE,CAAC;QACvB,MAAM,IAAI,GAAG,GAAG,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC;QAC5C,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,KAAK,CAAC,CAAC;QACzC,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG,EAAE,CAAC,CAAC;QACvC,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,EAAE,CAAC,CAAC;QAEpC,IAAI,OAAO,GAAG,CAAC;YAAE,OAAO,UAAU,CAAC;QACnC,IAAI,OAAO,GAAG,EAAE;YAAE,OAAO,GAAG,OAAO,OAAO,CAAC;QAC3C,IAAI,KAAK,GAAG,EAAE;YAAE,OAAO,GAAG,KAAK,OAAO,CAAC;QACvC,IAAI,IAAI,GAAG,CAAC;YAAE,OAAO,GAAG,IAAI,OAAO,CAAC;QACpC,OAAO,IAAI,CAAC,kBAAkB,EAAE,CAAC;IACnC,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,MAAM,kBAAkB,GAAG,WAAW,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,eAAe,gBAAgB,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC;IAEjJ,OAAO,CACL,CAAC,WAAW,CACV,IAAI,CAAC,CAAC,KAAK,CAAC,CACZ,KAAK,CAAC,CAAC,KAAK,IAAI,YAAY,CAAC,CAC7B,KAAK,CAAC,CAAC,kBAAkB,CAAC,CAC1B,OAAO,CAAC,CAAC,OAAO,CAAC,CACjB,SAAS,CAAC,CAAC,SAAS,CAAC,CACrB,UAAU,CAAC,CAAC,UAAU,CAAC,CACvB,QAAQ,CAAC,CAAC,SAAS,CAAC,EACpB,CACH,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Disclaimer Card Component
3
+ * Extracted from DisclaimerSetting to follow single responsibility and 200-line rules
4
+ */
5
+ import React from 'react';
6
+ export interface DisclaimerCardProps {
7
+ title: string;
8
+ shortMessage: string;
9
+ iconName: string;
10
+ iconColor: string;
11
+ backgroundColor: string;
12
+ onPress: () => void;
13
+ }
14
+ export declare const DisclaimerCard: React.FC<DisclaimerCardProps>;
15
+ //# sourceMappingURL=DisclaimerCard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DisclaimerCard.d.ts","sourceRoot":"","sources":["../../../src/presentation/components/DisclaimerCard.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAU1B,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,EAAE,MAAM,CAAC;IACxB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAmDxD,CAAC"}
@@ -0,0 +1,73 @@
1
+ /**
2
+ * Disclaimer Card Component
3
+ * Extracted from DisclaimerSetting to follow single responsibility and 200-line rules
4
+ */
5
+ import React from 'react';
6
+ import { View, StyleSheet, TouchableOpacity, } from 'react-native';
7
+ import { useAppDesignTokens, withAlpha } from '@umituz/react-native-design-system-theme';
8
+ import { AtomicText, AtomicIcon } from '@umituz/react-native-design-system-atoms';
9
+ export const DisclaimerCard = ({ title, shortMessage, iconName, iconColor, backgroundColor, onPress, }) => {
10
+ const tokens = useAppDesignTokens();
11
+ const styles = getStyles(tokens);
12
+ return (<TouchableOpacity style={[
13
+ styles.container,
14
+ { backgroundColor },
15
+ ]} onPress={onPress} activeOpacity={0.7} testID="disclaimer-setting">
16
+ {/* Icon and Title Row */}
17
+ <View style={styles.headerRow}>
18
+ <View style={[
19
+ styles.iconContainer,
20
+ {
21
+ backgroundColor: withAlpha(iconColor, 0.2),
22
+ borderColor: withAlpha(iconColor, 0.4),
23
+ borderWidth: 1,
24
+ },
25
+ ]}>
26
+ <AtomicIcon name={iconName} color="warning"/>
27
+ </View>
28
+ <AtomicText type="bodyLarge" color="primary" style={styles.title}>
29
+ {title}
30
+ </AtomicText>
31
+ <AtomicIcon name="ArrowRight" color="secondary" size="sm"/>
32
+ </View>
33
+
34
+ {/* Short Message */}
35
+ <AtomicText type="bodySmall" color="secondary" style={styles.shortMessage}>
36
+ {shortMessage}
37
+ </AtomicText>
38
+ </TouchableOpacity>);
39
+ };
40
+ const getStyles = (tokens) => StyleSheet.create({
41
+ container: {
42
+ paddingHorizontal: tokens.spacing.md,
43
+ paddingVertical: tokens.spacing.md,
44
+ marginHorizontal: tokens.spacing.md,
45
+ marginTop: 8,
46
+ marginBottom: 8,
47
+ borderRadius: 12,
48
+ },
49
+ headerRow: {
50
+ flexDirection: 'row',
51
+ alignItems: 'center',
52
+ marginBottom: 12,
53
+ },
54
+ iconContainer: {
55
+ width: 40,
56
+ height: 40,
57
+ borderRadius: 20,
58
+ alignItems: 'center',
59
+ justifyContent: 'center',
60
+ marginRight: 12,
61
+ },
62
+ title: {
63
+ flex: 1,
64
+ fontWeight: tokens.typography.labelLarge.fontWeight,
65
+ fontSize: tokens.typography.labelLarge.fontSize,
66
+ },
67
+ shortMessage: {
68
+ lineHeight: 18,
69
+ paddingLeft: 52, // Align with title (40px icon + 12px margin)
70
+ fontSize: 13,
71
+ },
72
+ });
73
+ //# sourceMappingURL=DisclaimerCard.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DisclaimerCard.js","sourceRoot":"","sources":["../../../src/presentation/components/DisclaimerCard.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EACL,IAAI,EACJ,UAAU,EACV,gBAAgB,GACjB,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,kBAAkB,EAAE,SAAS,EAAE,MAAM,0CAA0C,CAAC;AACzF,OAAO,EAAE,UAAU,EAAE,UAAU,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A,CAAC,UAAU,CACT,IAAI,CAAC,WAAW,CAChB,KAAK,CAAC,WAAW,CACjB,KAAK,CAAC,CAAC,MAAM,CAAC,YAAY,CAAC,CAE3B;QAAA,CAAC,YAAY,CACf;MAAA,EAAE,UAAU,CACd;IAAA,EAAE,gBAAgB,CAAC,CACpB,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,SAAS,GAAG,CAAC,MAA6C,EAAE,EAAE,CAClE,UAAU,CAAC,MAAM,CAAC;IAChB,SAAS,EAAE;QACT,iBAAiB,EAAE,MAAM,CAAC,OAAO,CAAC,EAAE;QACpC,eAAe,EAAE,MAAM,CAAC,OAAO,CAAC,EAAE;QAClC,gBAAgB,EAAE,MAAM,CAAC,OAAO,CAAC,EAAE;QACnC,SAAS,EAAE,CAAC;QACZ,YAAY,EAAE,CAAC;QACf,YAAY,EAAE,EAAE;KACjB;IAED,SAAS,EAAE;QACT,aAAa,EAAE,KAAK;QACpB,UAAU,EAAE,QAAQ;QACpB,YAAY,EAAE,EAAE;KACjB;IAED,aAAa,EAAE;QACb,KAAK,EAAE,EAAE;QACT,MAAM,EAAE,EAAE;QACV,YAAY,EAAE,EAAE;QAChB,UAAU,EAAE,QAAQ;QACpB,cAAc,EAAE,QAAQ;QACxB,WAAW,EAAE,EAAE;KAChB;IAED,KAAK,EAAE;QACL,IAAI,EAAE,CAAC;QACP,UAAU,EAAE,MAAM,CAAC,UAAU,CAAC,UAAU,CAAC,UAAiB;QAC1D,QAAQ,EAAE,MAAM,CAAC,UAAU,CAAC,UAAU,CAAC,QAAQ;KAChD;IAED,YAAY,EAAE;QACZ,UAAU,EAAE,EAAE;QACd,WAAW,EAAE,EAAE,EAAE,6CAA6C;QAC9D,QAAQ,EAAE,EAAE;KACb;CACF,CAAC,CAAC"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Disclaimer Modal Component
3
+ * Extracted from DisclaimerSetting to follow single responsibility and 200-line rules
4
+ */
5
+ import React from 'react';
6
+ export interface DisclaimerModalProps {
7
+ visible: boolean;
8
+ title: string;
9
+ content: string;
10
+ onClose: () => void;
11
+ }
12
+ export declare const DisclaimerModal: React.FC<DisclaimerModalProps>;
13
+ //# sourceMappingURL=DisclaimerModal.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DisclaimerModal.d.ts","sourceRoot":"","sources":["../../../src/presentation/components/DisclaimerModal.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAW1B,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAmD1D,CAAC"}
@@ -0,0 +1,62 @@
1
+ /**
2
+ * Disclaimer Modal Component
3
+ * Extracted from DisclaimerSetting to follow single responsibility and 200-line rules
4
+ */
5
+ import React from 'react';
6
+ import { View, StyleSheet, TouchableOpacity, ScrollView, } from 'react-native';
7
+ import { useAppDesignTokens } from '@umituz/react-native-design-system-theme';
8
+ import { AtomicText, AtomicIcon } from '@umituz/react-native-design-system-atoms';
9
+ export const DisclaimerModal = ({ visible, title, content, onClose, }) => {
10
+ const tokens = useAppDesignTokens();
11
+ const styles = getStyles(tokens);
12
+ if (!visible)
13
+ return null;
14
+ return (<View style={[
15
+ styles.modalContainer,
16
+ { backgroundColor: tokens.colors.backgroundPrimary },
17
+ ]}>
18
+ {/* Modal Header */}
19
+ <View style={[
20
+ styles.modalHeader,
21
+ { borderBottomColor: tokens.colors.borderLight },
22
+ ]}>
23
+ <AtomicText type="headlineMedium" color="primary">
24
+ {title}
25
+ </AtomicText>
26
+ <TouchableOpacity onPress={onClose} testID="close-disclaimer-modal">
27
+ <AtomicIcon name="X" color="primary" size="md"/>
28
+ </TouchableOpacity>
29
+ </View>
30
+
31
+ {/* Scrollable Content */}
32
+ <ScrollView style={styles.modalContent} contentContainerStyle={styles.modalContentContainer}>
33
+ <AtomicText type="bodyMedium" color="primary" style={styles.modalText}>
34
+ {content}
35
+ </AtomicText>
36
+ </ScrollView>
37
+ </View>);
38
+ };
39
+ const getStyles = (tokens) => StyleSheet.create({
40
+ modalContainer: {
41
+ flex: 1,
42
+ },
43
+ modalHeader: {
44
+ flexDirection: 'row',
45
+ justifyContent: 'space-between',
46
+ alignItems: 'center',
47
+ paddingHorizontal: 20,
48
+ paddingVertical: 16,
49
+ borderBottomWidth: 1,
50
+ },
51
+ modalContent: {
52
+ flex: 1,
53
+ },
54
+ modalContentContainer: {
55
+ padding: 20,
56
+ },
57
+ modalText: {
58
+ lineHeight: 24,
59
+ fontSize: 15,
60
+ },
61
+ });
62
+ //# sourceMappingURL=DisclaimerModal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DisclaimerModal.js","sourceRoot":"","sources":["../../../src/presentation/components/DisclaimerModal.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EACL,IAAI,EACJ,UAAU,EACV,gBAAgB,EAChB,UAAU,GACX,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,kBAAkB,EAAE,MAAM,0CAA0C,CAAC;AAC9E,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,0CAA0C,CAAC;AASlF,MAAM,CAAC,MAAM,eAAe,GAAmC,CAAC,EAC9D,OAAO,EACP,KAAK,EACL,OAAO,EACP,OAAO,GACR,EAAE,EAAE;IACH,MAAM,MAAM,GAAG,kBAAkB,EAAE,CAAC;IACpC,MAAM,MAAM,GAAG,SAAS,CAAC,MAAM,CAAC,CAAC;IAEjC,IAAI,CAAC,OAAO;QAAE,OAAO,IAAI,CAAC;IAE1B,OAAO,CACL,CAAC,IAAI,CACH,KAAK,CAAC,CAAC;YACL,MAAM,CAAC,cAAc;YACrB,EAAE,eA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ACrB,eAAe,EAAE,EAAE;QACnB,iBAAiB,EAAE,CAAC;KACrB;IAED,YAAY,EAAE;QACZ,IAAI,EAAE,CAAC;KACR;IAED,qBAAqB,EAAE;QACrB,OAAO,EAAE,EAAE;KACZ;IAED,SAAS,EAAE;QACT,UAAU,EAAE,EAAE;QACd,QAAQ,EAAE,EAAE;KACb;CACF,CAAC,CAAC"}
@@ -0,0 +1,39 @@
1
+ /**
2
+ * DisclaimerSetting Component
3
+ *
4
+ * Displays customizable disclaimer with important legal notice
5
+ * Used in About screens for apps that require disclaimers
6
+ *
7
+ * Features:
8
+ * - Tappable card that opens full disclaimer modal
9
+ * - Warning icon with background color
10
+ * - Internationalized title and message
11
+ * - Full-screen modal with scrollable content
12
+ * - NO shadows (CLAUDE.md compliance)
13
+ * - Universal across iOS, Android, Web (NO Platform.OS checks)
14
+ *
15
+ * Usage:
16
+ * - Import and use in AboutScreen
17
+ * - Requires translations: settings.disclaimer.title, settings.disclaimer.message, settings.disclaimer.shortMessage
18
+ */
19
+ import React from 'react';
20
+ export interface DisclaimerSettingProps {
21
+ /** Custom title translation key */
22
+ titleKey?: string;
23
+ /** Custom message translation key */
24
+ messageKey?: string;
25
+ /** Custom short message translation key */
26
+ shortMessageKey?: string;
27
+ /** Custom icon name */
28
+ iconName?: string;
29
+ /** Custom icon color */
30
+ iconColor?: string;
31
+ /** Custom background color */
32
+ backgroundColor?: string;
33
+ /** Custom modal title */
34
+ modalTitle?: string;
35
+ /** Custom modal content */
36
+ modalContent?: string;
37
+ }
38
+ export declare const DisclaimerSetting: React.FC<DisclaimerSettingProps>;
39
+ //# sourceMappingURL=DisclaimerSetting.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DisclaimerSetting.d.ts","sourceRoot":"","sources":["../../../src/presentation/components/DisclaimerSetting.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAA2C,MAAM,OAAO,CAAC;AAQhE,MAAM,WAAW,sBAAsB;IACrC,mCAAmC;IACnC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,qCAAqC;IACrC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,2CAA2C;IAC3C,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,uBAAuB;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,wBAAwB;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,8BAA8B;IAC9B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,yBAAyB;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,2BAA2B;IAC3B,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CAkE9D,CAAC"}
@@ -0,0 +1,59 @@
1
+ /**
2
+ * DisclaimerSetting Component
3
+ *
4
+ * Displays customizable disclaimer with important legal notice
5
+ * Used in About screens for apps that require disclaimers
6
+ *
7
+ * Features:
8
+ * - Tappable card that opens full disclaimer modal
9
+ * - Warning icon with background color
10
+ * - Internationalized title and message
11
+ * - Full-screen modal with scrollable content
12
+ * - NO shadows (CLAUDE.md compliance)
13
+ * - Universal across iOS, Android, Web (NO Platform.OS checks)
14
+ *
15
+ * Usage:
16
+ * - Import and use in AboutScreen
17
+ * - Requires translations: settings.disclaimer.title, settings.disclaimer.message, settings.disclaimer.shortMessage
18
+ */
19
+ import React, { useState, useEffect, useCallback } from 'react';
20
+ import { Modal } from 'react-native';
21
+ import { useAppDesignTokens, withAlpha } from '@umituz/react-native-design-system-theme';
22
+ import { useLocalization } from '@umituz/react-native-localization';
23
+ import { DisclaimerCard } from './DisclaimerCard';
24
+ import { DisclaimerModal } from './DisclaimerModal';
25
+ export const DisclaimerSetting = ({ titleKey = "settings.disclaimer.title", messageKey = "settings.disclaimer.message", shortMessageKey = "settings.disclaimer.shortMessage", iconName = "AlertTriangle", iconColor, backgroundColor, modalTitle, modalContent, }) => {
26
+ const { t } = useLocalization();
27
+ const tokens = useAppDesignTokens();
28
+ const [modalVisible, setModalVisible] = useState(false);
29
+ useEffect(() => {
30
+ return () => {
31
+ setModalVisible(false);
32
+ };
33
+ }, []);
34
+ const title = modalTitle || t(titleKey);
35
+ const content = modalContent || t(messageKey);
36
+ const shortMessage = t(shortMessageKey);
37
+ const finalIconColor = iconColor || tokens.colors.warning;
38
+ const finalBackgroundColor = backgroundColor || withAlpha(finalIconColor, 0.1);
39
+ const handleOpenModal = useCallback(() => {
40
+ setModalVisible(true);
41
+ if (__DEV__) {
42
+ console.log('DisclaimerSetting: Modal opened');
43
+ }
44
+ }, []);
45
+ const handleCloseModal = useCallback(() => {
46
+ setModalVisible(false);
47
+ if (__DEV__) {
48
+ console.log('DisclaimerSetting: Modal closed');
49
+ }
50
+ }, []);
51
+ return (<>
52
+ <DisclaimerCard title={title} shortMessage={shortMessage} iconName={iconName} iconColor={finalIconColor} backgroundColor={finalBackgroundColor} onPress={handleOpenModal}/>
53
+
54
+ <Modal visible={modalVisible} animationType="slide" presentationStyle="pageSheet" onRequestClose={handleCloseModal}>
55
+ <DisclaimerModal visible={modalVisible} title={title} content={content} onClose={handleCloseModal}/>
56
+ </Modal>
57
+ </>);
58
+ };
59
+ //# sourceMappingURL=DisclaimerSetting.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DisclaimerSetting.js","sourceRoot":"","sources":["../../../src/presentation/components/DisclaimerSetting.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAChE,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAErC,OAAO,EAAE,kBAAkB,EAAE,SAAS,EAAE,MAAM,0CAA0C,CAAC;AACzF,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,M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AAK,CAAC,CAAC;QACvB,IAAI,OAAO,EAAE,CAAC;YACZ,OAAO,CAAC,GAAG,CAAC,iCAAiC,CAAC,CAAC;QACjD,CAAC;IACH,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,CACL,EACE;MAAA,CAAC,cAAc,CACb,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,YAAY,CAAC,CAAC,YAAY,CAAC,CAC3B,QAAQ,CAAC,CAAC,QAAQ,CAAC,CACnB,SAAS,CAAC,CAAC,cAAc,CAAC,CAC1B,eAAe,CAAC,CAAC,oBAAoB,CAAC,CACtC,OAAO,CAAC,CAAC,eAAe,CAAC,EAG3B;;MAAA,CAAC,KAAK,CACJ,OAAO,CAAC,CAAC,YAAY,CAAC,CACtB,aAAa,CAAC,OAAO,CACrB,iBAAiB,CAAC,WAAW,CAC7B,cAAc,CAAC,CAAC,gBAAgB,CAAC,CAEjC;QAAA,CAAC,eAAe,CACd,OAAO,CAAC,CAAC,YAAY,CAAC,CACtB,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,OAAO,CAAC,CAAC,OAAO,CAAC,CACjB,OAAO,CAAC,CAAC,gBAAgB,CAAC,EAE9B;MAAA,EAAE,KAAK,CACT;IAAA,GAAG,CACJ,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1,45 @@
1
+ /**
2
+ * Setting Item Component
3
+ * Single Responsibility: Render a single settings item
4
+ * Material Design 3 style with hover effects and modern spacing
5
+ */
6
+ import React from "react";
7
+ import { type LucideIcon } from "lucide-react-native";
8
+ export interface SettingItemProps {
9
+ /** Icon component from lucide-react-native */
10
+ icon: LucideIcon | React.ComponentType<{
11
+ size?: number;
12
+ color?: string;
13
+ }>;
14
+ /** Main title text */
15
+ title: string;
16
+ /** Optional description/value text */
17
+ value?: string;
18
+ /** Callback when pressed */
19
+ onPress?: () => void;
20
+ /** Show switch instead of chevron */
21
+ showSwitch?: boolean;
22
+ /** Switch value */
23
+ switchValue?: boolean;
24
+ /** Switch change handler */
25
+ onSwitchChange?: (value: boolean) => void;
26
+ /** Is last item in section (no divider) */
27
+ isLast?: boolean;
28
+ /** Custom icon color */
29
+ iconColor?: string;
30
+ /** Custom title color */
31
+ titleColor?: string;
32
+ /** Test ID for E2E testing */
33
+ testID?: string;
34
+ /** Disable the item */
35
+ disabled?: boolean;
36
+ /** Custom switch thumb color */
37
+ switchThumbColor?: string;
38
+ /** Custom switch track colors */
39
+ switchTrackColors?: {
40
+ false: string;
41
+ true: string;
42
+ };
43
+ }
44
+ export declare const SettingItem: React.FC<SettingItemProps>;
45
+ //# sourceMappingURL=SettingItem.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SettingItem.d.ts","sourceRoot":"","sources":["../../../src/presentation/components/SettingItem.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAgB,KAAK,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAGpE,MAAM,WAAW,gBAAgB;IAC/B,8CAA8C;IAC9C,IAAI,EAAE,UAAU,GAAG,KAAK,CAAC,aAAa,CAAC;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC1E,sBAAsB;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,sCAAsC;IACtC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,4BAA4B;IAC5B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,qCAAqC;IACrC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,mBAAmB;IACnB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,4BAA4B;IAC5B,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IAC1C,2CAA2C;IAC3C,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,wBAAwB;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,yBAAyB;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,8BAA8B;IAC9B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,uBAAuB;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,gCAAgC;IAChC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,iCAAiC;IACjC,iBAAiB,CAAC,EAAE;QAClB,KAAK,EAAE,MAAM,CAAC;QACd,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;CACH;AAED,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAsGlD,CAAC"}
@@ -0,0 +1,113 @@
1
+ /**
2
+ * Setting Item Component
3
+ * Single Responsibility: Render a single settings item
4
+ * Material Design 3 style with hover effects and modern spacing
5
+ */
6
+ import React from "react";
7
+ import { View, Text, Pressable, StyleSheet, Switch } from "react-native";
8
+ import { ChevronRight } from "lucide-react-native";
9
+ import { useAppDesignTokens } from "@umituz/react-native-design-system-theme";
10
+ export const SettingItem = ({ icon: Icon, title, value, onPress, showSwitch = false, switchValue, onSwitchChange, isLast = false, iconColor, titleColor, testID, disabled = false, switchThumbColor, switchTrackColors, }) => {
11
+ const tokens = useAppDesignTokens();
12
+ const colors = tokens.colors;
13
+ const spacing = tokens.spacing;
14
+ return (<>
15
+ <Pressable style={({ pressed }) => [
16
+ styles.container,
17
+ {
18
+ backgroundColor: pressed && !disabled && !showSwitch
19
+ ? `${colors.primary}08`
20
+ : 'transparent',
21
+ },
22
+ ]} onPress={onPress} disabled={showSwitch || disabled} testID={testID}>
23
+ <View style={styles.content}>
24
+ <View style={[
25
+ styles.iconContainer,
26
+ {
27
+ backgroundColor: iconColor
28
+ ? `${iconColor}15`
29
+ : `${colors.primary}15`,
30
+ },
31
+ ]}>
32
+ <Icon size={24} color={iconColor || colors.primary}/>
33
+ </View>
34
+ <View style={styles.textContainer}>
35
+ <Text style={[
36
+ styles.title,
37
+ {
38
+ color: disabled
39
+ ? colors.textSecondary
40
+ : titleColor || colors.textPrimary,
41
+ opacity: disabled ? 0.5 : 1,
42
+ },
43
+ ]} numberOfLines={1}>
44
+ {title}
45
+ </Text>
46
+ {value && !showSwitch && (<Text style={[styles.value, { color: colors.textSecondary }]} numberOfLines={2}>
47
+ {value}
48
+ </Text>)}
49
+ </View>
50
+ </View>
51
+
52
+ <View style={styles.rightContainer}>
53
+ {showSwitch ? (<Switch value={switchValue} onValueChange={onSwitchChange} trackColor={switchTrackColors || {
54
+ false: `${colors.textSecondary}30`,
55
+ true: colors.primary,
56
+ }} thumbColor={switchThumbColor || "#FFFFFF"} ios_backgroundColor={`${colors.textSecondary}30`}/>) : (<ChevronRight size={20} color={colors.textSecondary}/>)}
57
+ </View>
58
+ </Pressable>
59
+
60
+ {!isLast && (<View style={[
61
+ styles.divider,
62
+ { backgroundColor: `${colors.textSecondary}20` },
63
+ ]}/>)}
64
+ </>);
65
+ };
66
+ const styles = StyleSheet.create({
67
+ container: {
68
+ flexDirection: "row",
69
+ alignItems: "center",
70
+ justifyContent: "space-between",
71
+ paddingHorizontal: 16,
72
+ paddingVertical: 16,
73
+ minHeight: 72,
74
+ },
75
+ content: {
76
+ flexDirection: "row",
77
+ alignItems: "center",
78
+ flex: 1,
79
+ },
80
+ iconContainer: {
81
+ width: 48,
82
+ height: 48,
83
+ borderRadius: 12,
84
+ justifyContent: "center",
85
+ alignItems: "center",
86
+ marginRight: 16,
87
+ },
88
+ textContainer: {
89
+ flex: 1,
90
+ minWidth: 0,
91
+ },
92
+ title: {
93
+ fontSize: 16,
94
+ fontWeight: "500",
95
+ lineHeight: 20,
96
+ },
97
+ value: {
98
+ fontSize: 14,
99
+ fontWeight: "400",
100
+ marginTop: 4,
101
+ lineHeight: 18,
102
+ },
103
+ rightContainer: {
104
+ flexDirection: "row",
105
+ alignItems: "center",
106
+ gap: 8,
107
+ },
108
+ divider: {
109
+ height: 1,
110
+ marginLeft: 80,
111
+ },
112
+ });
113
+ //# sourceMappingURL=SettingItem.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SettingItem.js","sourceRoot":"","sources":["../../../src/presentation/components/SettingItem.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACzE,OAAO,EAAE,YAAY,EAAmB,MAAM,qBAAqB,CAAC;AACpE,OAAO,EAAE,kBAAkB,EAAE,MAAM,0CAA0C,CAAC;AAoC9E,MAAM,CAAC,MAAM,WAAW,GAA+B,CAAC,EACtD,IAAI,EAAE,IAAI,EACV,KAAK,EACL,KAAK,EACL,OAAO,EACP,UAAU,GAAG,KAAK,EAClB,WAAW,EACX,cAAc,EACd,MAAM,GAAG,KAAK,EACd,SAAS,EACT,UAAU,EACV,MAAM,EACN,QAAQ,GAAG,KAAK,EAChB,gBAAgB,EAChB,iBAAiB,GAClB,EAAE,EAAE;IACH,MAAM,MAAM,GAAG,kBAAkB,EAAE,CAAC;IACpC,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;IAC7B,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC;IAE/B,OAAO,CACL,EACE;MAAA,CAAC,SAAS,CACR,KAAK,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;YACtB,MAAM,CAAC,SAAS;YAChB;gBACE,eAAe,EAAE,OAAO,IAAI,CAAC,QAAQ,IAAI,CAAC,UAAU;oBAClD,CAAC,CAAC,GAAG,MAAM,CAAC,OAAO,IAAI;oBACvB,CAAC,CAAC,aAAa;aAClB;SACF,CAAC,CACF,OAAO,CAAC,CAAC,OAAO,CAAC,CACjB,QAAQ,CAAC,CAAC,UAAU,IAAI,QAAQ,CAAC,CACjC,MAAM,CAAC,CAAC,MAAM,CAAC,CAEf;QAAA,CAAC,IAAI,CAAC,KAAK,CAAC,C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AAE,EAAE;KAChB;IACD,aAAa,EAAE;QACb,IAAI,EAAE,CAAC;QACP,QAAQ,EAAE,CAAC;KACZ;IACD,KAAK,EAAE;QACL,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,KAAK;QACjB,UAAU,EAAE,EAAE;KACf;IACD,KAAK,EAAE;QACL,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,KAAK;QACjB,SAAS,EAAE,CAAC;QACZ,UAAU,EAAE,EAAE;KACf;IACD,cAAc,EAAE;QACd,aAAa,EAAE,KAAK;QACpB,UAAU,EAAE,QAAQ;QACpB,GAAG,EAAE,CAAC;KACP;IACD,OAAO,EAAE;QACP,MAAM,EAAE,CAAC;QACT,UAAU,EAAE,EAAE;KACf;CACF,CAAC,CAAC"}
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Settings Error Boundary Component
3
+ * Catches and handles errors in settings components
4
+ */
5
+ import React, { Component, ReactNode } from 'react';
6
+ interface Props {
7
+ children: ReactNode;
8
+ fallback?: ReactNode;
9
+ fallbackTitle?: string;
10
+ fallbackMessage?: string;
11
+ }
12
+ interface State {
13
+ hasError: boolean;
14
+ error?: Error;
15
+ }
16
+ export declare class SettingsErrorBoundary extends Component<Props, State> {
17
+ constructor(props: Props);
18
+ static getDerivedStateFromError(error: Error): State;
19
+ componentDidCatch(error: Error, errorInfo: React.ErrorInfo): void;
20
+ render(): string | number | boolean | Iterable<React.ReactNode> | React.JSX.Element | null | undefined;
21
+ }
22
+ export {};
23
+ //# sourceMappingURL=SettingsErrorBoundary.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SettingsErrorBoundary.d.ts","sourceRoot":"","sources":["../../../src/presentation/components/SettingsErrorBoundary.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKpD,UAAU,KAAK;IACb,QAAQ,EAAE,SAAS,CAAC;IACpB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,UAAU,KAAK;IACb,QAAQ,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,KAAK,CAAC;CACf;AAED,qBAAa,qBAAsB,SAAQ,SAAS,CAAC,KAAK,EAAE,KAAK,CAAC;gBACpD,KAAK,EAAE,KAAK;IAKxB,MAAM,CAAC,wBAAwB,CAAC,KAAK,EAAE,KAAK,GAAG,KAAK;IAI3C,iBAAiB,CAAC,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,CAAC,SAAS;IAM1D,MAAM;CAiBhB"}
@@ -0,0 +1,73 @@
1
+ /**
2
+ * Settings Error Boundary Component
3
+ * Catches and handles errors in settings components
4
+ */
5
+ import React, { Component } from 'react';
6
+ import { View, StyleSheet } from 'react-native';
7
+ import { useAppDesignTokens } from '@umituz/react-native-design-system-theme';
8
+ import { AtomicText, AtomicIcon } from '@umituz/react-native-design-system-atoms';
9
+ export class SettingsErrorBoundary extends Component {
10
+ constructor(props) {
11
+ super(props);
12
+ this.state = { hasError: false };
13
+ }
14
+ static getDerivedStateFromError(error) {
15
+ return { hasError: true, error };
16
+ }
17
+ componentDidCatch(error, errorInfo) {
18
+ if (__DEV__) {
19
+ console.error('Settings Error Boundary caught an error:', error, errorInfo);
20
+ }
21
+ }
22
+ render() {
23
+ if (this.state.hasError) {
24
+ if (this.props.fallback) {
25
+ return this.props.fallback;
26
+ }
27
+ return (<ErrorBoundaryFallback error={this.state.error} fallbackTitle={this.props.fallbackTitle} fallbackMessage={this.props.fallbackMessage}/>);
28
+ }
29
+ return this.props.children;
30
+ }
31
+ }
32
+ const ErrorBoundaryFallback = ({ error, fallbackTitle = "error_boundary.title", fallbackMessage = "error_boundary.message" }) => {
33
+ const tokens = useAppDesignTokens();
34
+ const title = __DEV__ && error?.message ? "error_boundary.dev_title" : fallbackTitle;
35
+ const message = __DEV__ && error?.message
36
+ ? `error_boundary.dev_message: ${error.message}`
37
+ : fallbackMessage;
38
+ return (<View style={[styles.container, { backgroundColor: tokens.colors.backgroundPrimary }]}>
39
+ <View style={[styles.content, { backgroundColor: tokens.colors.surface }]}>
40
+ <AtomicIcon name="AlertTriangle" color="warning" size="lg" style={styles.icon}/>
41
+ <AtomicText type="headlineSmall" color="primary" style={styles.title}>
42
+ {title}
43
+ </AtomicText>
44
+ <AtomicText type="bodyMedium" color="secondary" style={styles.message}>
45
+ {message}
46
+ </AtomicText>
47
+ </View>
48
+ </View>);
49
+ };
50
+ const styles = StyleSheet.create({
51
+ container: {
52
+ flex: 1,
53
+ padding: 16,
54
+ justifyContent: 'center',
55
+ },
56
+ content: {
57
+ alignItems: 'center',
58
+ padding: 24,
59
+ borderRadius: 12,
60
+ },
61
+ icon: {
62
+ marginBottom: 16,
63
+ },
64
+ title: {
65
+ marginBottom: 8,
66
+ textAlign: 'center',
67
+ },
68
+ message: {
69
+ textAlign: 'center',
70
+ lineHeight: 20,
71
+ },
72
+ });
73
+ //# sourceMappingURL=SettingsErrorBoundary.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SettingsErrorBoundary.js","sourceRoot":"","sources":["../../../src/presentation/components/SettingsErrorBoundary.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,EAAE,SAAS,EAAa,MAAM,OAAO,CAAC;AACpD,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,0CAA0C,CAAC;AAC9E,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,0CAA0C,CAAC;AAclF,MAAM,OAAO,qBAAsB,SAAQ,SAAuB;IAChE,YAAY,KAAY;QACtB,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,KAAK,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;IACnC,CAAC;I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