@oxyhq/services 6.9.45 → 6.9.46

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 (255) hide show
  1. package/lib/commonjs/ui/components/OxyProvider.js +6 -5
  2. package/lib/commonjs/ui/components/OxyProvider.js.map +1 -1
  3. package/lib/commonjs/ui/components/SignInModal.js +271 -102
  4. package/lib/commonjs/ui/components/SignInModal.js.map +1 -1
  5. package/lib/commonjs/ui/components/fileManagement/FileViewer.js +24 -15
  6. package/lib/commonjs/ui/components/fileManagement/FileViewer.js.map +1 -1
  7. package/lib/commonjs/ui/components/index.js +0 -35
  8. package/lib/commonjs/ui/components/index.js.map +1 -1
  9. package/lib/commonjs/ui/components/payment/PaymentDetailsStep.js +26 -13
  10. package/lib/commonjs/ui/components/payment/PaymentDetailsStep.js.map +1 -1
  11. package/lib/commonjs/ui/components/payment/PaymentMethodStep.js +50 -28
  12. package/lib/commonjs/ui/components/payment/PaymentMethodStep.js.map +1 -1
  13. package/lib/commonjs/ui/components/payment/PaymentReviewStep.js +83 -48
  14. package/lib/commonjs/ui/components/payment/PaymentReviewStep.js.map +1 -1
  15. package/lib/commonjs/ui/components/payment/PaymentSuccessStep.js +11 -10
  16. package/lib/commonjs/ui/components/payment/PaymentSuccessStep.js.map +1 -1
  17. package/lib/commonjs/ui/components/payment/PaymentSummaryStep.js +38 -23
  18. package/lib/commonjs/ui/components/payment/PaymentSummaryStep.js.map +1 -1
  19. package/lib/commonjs/ui/context/hooks/useAuthOperations.js +4 -3
  20. package/lib/commonjs/ui/context/hooks/useAuthOperations.js.map +1 -1
  21. package/lib/commonjs/ui/screens/AccountCenterScreen.js +1 -3
  22. package/lib/commonjs/ui/screens/AccountCenterScreen.js.map +1 -1
  23. package/lib/commonjs/ui/screens/AccountOverviewScreen.js +47 -63
  24. package/lib/commonjs/ui/screens/AccountOverviewScreen.js.map +1 -1
  25. package/lib/commonjs/ui/screens/AccountSettingsScreen.js +90 -68
  26. package/lib/commonjs/ui/screens/AccountSettingsScreen.js.map +1 -1
  27. package/lib/commonjs/ui/screens/AccountSwitcherScreen.js +72 -63
  28. package/lib/commonjs/ui/screens/AccountSwitcherScreen.js.map +1 -1
  29. package/lib/commonjs/ui/screens/AccountVerificationScreen.js +5 -5
  30. package/lib/commonjs/ui/screens/AccountVerificationScreen.js.map +1 -1
  31. package/lib/commonjs/ui/screens/FeedbackScreen.js +57 -51
  32. package/lib/commonjs/ui/screens/FeedbackScreen.js.map +1 -1
  33. package/lib/commonjs/ui/screens/FileManagementScreen.js +25 -36
  34. package/lib/commonjs/ui/screens/FileManagementScreen.js.map +1 -1
  35. package/lib/commonjs/ui/screens/HistoryViewScreen.js +31 -31
  36. package/lib/commonjs/ui/screens/HistoryViewScreen.js.map +1 -1
  37. package/lib/commonjs/ui/screens/LanguageSelectorScreen.js +15 -8
  38. package/lib/commonjs/ui/screens/LanguageSelectorScreen.js.map +1 -1
  39. package/lib/commonjs/ui/screens/LegalDocumentsScreen.js +60 -54
  40. package/lib/commonjs/ui/screens/LegalDocumentsScreen.js.map +1 -1
  41. package/lib/commonjs/ui/screens/PaymentGatewayScreen.js +12 -9
  42. package/lib/commonjs/ui/screens/PaymentGatewayScreen.js.map +1 -1
  43. package/lib/commonjs/ui/screens/PrivacySettingsScreen.js +159 -190
  44. package/lib/commonjs/ui/screens/PrivacySettingsScreen.js.map +1 -1
  45. package/lib/commonjs/ui/screens/SavesCollectionsScreen.js +20 -22
  46. package/lib/commonjs/ui/screens/SavesCollectionsScreen.js.map +1 -1
  47. package/lib/commonjs/ui/screens/SearchSettingsScreen.js +16 -17
  48. package/lib/commonjs/ui/screens/SearchSettingsScreen.js.map +1 -1
  49. package/lib/commonjs/ui/screens/SessionManagementScreen.js +26 -4
  50. package/lib/commonjs/ui/screens/SessionManagementScreen.js.map +1 -1
  51. package/lib/commonjs/ui/screens/UserLinksScreen.js +13 -29
  52. package/lib/commonjs/ui/screens/UserLinksScreen.js.map +1 -1
  53. package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js +110 -52
  54. package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js.map +1 -1
  55. package/lib/commonjs/ui/screens/karma/KarmaFAQScreen.js +3 -5
  56. package/lib/commonjs/ui/screens/karma/KarmaFAQScreen.js.map +1 -1
  57. package/lib/module/ui/components/OxyProvider.js +6 -5
  58. package/lib/module/ui/components/OxyProvider.js.map +1 -1
  59. package/lib/module/ui/components/SignInModal.js +271 -100
  60. package/lib/module/ui/components/SignInModal.js.map +1 -1
  61. package/lib/module/ui/components/fileManagement/FileViewer.js +24 -15
  62. package/lib/module/ui/components/fileManagement/FileViewer.js.map +1 -1
  63. package/lib/module/ui/components/index.js +0 -5
  64. package/lib/module/ui/components/index.js.map +1 -1
  65. package/lib/module/ui/components/payment/PaymentDetailsStep.js +26 -13
  66. package/lib/module/ui/components/payment/PaymentDetailsStep.js.map +1 -1
  67. package/lib/module/ui/components/payment/PaymentMethodStep.js +49 -26
  68. package/lib/module/ui/components/payment/PaymentMethodStep.js.map +1 -1
  69. package/lib/module/ui/components/payment/PaymentReviewStep.js +84 -48
  70. package/lib/module/ui/components/payment/PaymentReviewStep.js.map +1 -1
  71. package/lib/module/ui/components/payment/PaymentSuccessStep.js +11 -9
  72. package/lib/module/ui/components/payment/PaymentSuccessStep.js.map +1 -1
  73. package/lib/module/ui/components/payment/PaymentSummaryStep.js +38 -22
  74. package/lib/module/ui/components/payment/PaymentSummaryStep.js.map +1 -1
  75. package/lib/module/ui/context/hooks/useAuthOperations.js +4 -3
  76. package/lib/module/ui/context/hooks/useAuthOperations.js.map +1 -1
  77. package/lib/module/ui/screens/AccountCenterScreen.js +1 -3
  78. package/lib/module/ui/screens/AccountCenterScreen.js.map +1 -1
  79. package/lib/module/ui/screens/AccountOverviewScreen.js +46 -62
  80. package/lib/module/ui/screens/AccountOverviewScreen.js.map +1 -1
  81. package/lib/module/ui/screens/AccountSettingsScreen.js +90 -68
  82. package/lib/module/ui/screens/AccountSettingsScreen.js.map +1 -1
  83. package/lib/module/ui/screens/AccountSwitcherScreen.js +73 -64
  84. package/lib/module/ui/screens/AccountSwitcherScreen.js.map +1 -1
  85. package/lib/module/ui/screens/AccountVerificationScreen.js +6 -6
  86. package/lib/module/ui/screens/AccountVerificationScreen.js.map +1 -1
  87. package/lib/module/ui/screens/FeedbackScreen.js +48 -42
  88. package/lib/module/ui/screens/FeedbackScreen.js.map +1 -1
  89. package/lib/module/ui/screens/FileManagementScreen.js +25 -36
  90. package/lib/module/ui/screens/FileManagementScreen.js.map +1 -1
  91. package/lib/module/ui/screens/HistoryViewScreen.js +32 -32
  92. package/lib/module/ui/screens/HistoryViewScreen.js.map +1 -1
  93. package/lib/module/ui/screens/LanguageSelectorScreen.js +16 -9
  94. package/lib/module/ui/screens/LanguageSelectorScreen.js.map +1 -1
  95. package/lib/module/ui/screens/LegalDocumentsScreen.js +61 -55
  96. package/lib/module/ui/screens/LegalDocumentsScreen.js.map +1 -1
  97. package/lib/module/ui/screens/PaymentGatewayScreen.js +12 -9
  98. package/lib/module/ui/screens/PaymentGatewayScreen.js.map +1 -1
  99. package/lib/module/ui/screens/PrivacySettingsScreen.js +161 -192
  100. package/lib/module/ui/screens/PrivacySettingsScreen.js.map +1 -1
  101. package/lib/module/ui/screens/SavesCollectionsScreen.js +21 -23
  102. package/lib/module/ui/screens/SavesCollectionsScreen.js.map +1 -1
  103. package/lib/module/ui/screens/SearchSettingsScreen.js +17 -18
  104. package/lib/module/ui/screens/SearchSettingsScreen.js.map +1 -1
  105. package/lib/module/ui/screens/SessionManagementScreen.js +27 -5
  106. package/lib/module/ui/screens/SessionManagementScreen.js.map +1 -1
  107. package/lib/module/ui/screens/UserLinksScreen.js +15 -31
  108. package/lib/module/ui/screens/UserLinksScreen.js.map +1 -1
  109. package/lib/module/ui/screens/WelcomeNewUserScreen.js +110 -52
  110. package/lib/module/ui/screens/WelcomeNewUserScreen.js.map +1 -1
  111. package/lib/module/ui/screens/karma/KarmaFAQScreen.js +4 -6
  112. package/lib/module/ui/screens/karma/KarmaFAQScreen.js.map +1 -1
  113. package/lib/typescript/commonjs/ui/components/OxyProvider.d.ts.map +1 -1
  114. package/lib/typescript/commonjs/ui/components/SignInModal.d.ts.map +1 -1
  115. package/lib/typescript/commonjs/ui/components/fileManagement/FileViewer.d.ts.map +1 -1
  116. package/lib/typescript/commonjs/ui/components/index.d.ts +0 -5
  117. package/lib/typescript/commonjs/ui/components/index.d.ts.map +1 -1
  118. package/lib/typescript/commonjs/ui/components/payment/PaymentDetailsStep.d.ts.map +1 -1
  119. package/lib/typescript/commonjs/ui/components/payment/PaymentMethodStep.d.ts.map +1 -1
  120. package/lib/typescript/commonjs/ui/components/payment/PaymentReviewStep.d.ts.map +1 -1
  121. package/lib/typescript/commonjs/ui/components/payment/PaymentSuccessStep.d.ts.map +1 -1
  122. package/lib/typescript/commonjs/ui/components/payment/PaymentSummaryStep.d.ts.map +1 -1
  123. package/lib/typescript/commonjs/ui/context/hooks/useAuthOperations.d.ts.map +1 -1
  124. package/lib/typescript/commonjs/ui/navigation/bottomSheetManager.d.ts +1 -1
  125. package/lib/typescript/commonjs/ui/navigation/bottomSheetManager.d.ts.map +1 -1
  126. package/lib/typescript/commonjs/ui/screens/AccountCenterScreen.d.ts.map +1 -1
  127. package/lib/typescript/commonjs/ui/screens/AccountOverviewScreen.d.ts.map +1 -1
  128. package/lib/typescript/commonjs/ui/screens/AccountSettingsScreen.d.ts.map +1 -1
  129. package/lib/typescript/commonjs/ui/screens/AccountSwitcherScreen.d.ts.map +1 -1
  130. package/lib/typescript/commonjs/ui/screens/AccountVerificationScreen.d.ts.map +1 -1
  131. package/lib/typescript/commonjs/ui/screens/FeedbackScreen.d.ts.map +1 -1
  132. package/lib/typescript/commonjs/ui/screens/FileManagementScreen.d.ts.map +1 -1
  133. package/lib/typescript/commonjs/ui/screens/HistoryViewScreen.d.ts.map +1 -1
  134. package/lib/typescript/commonjs/ui/screens/LanguageSelectorScreen.d.ts.map +1 -1
  135. package/lib/typescript/commonjs/ui/screens/LegalDocumentsScreen.d.ts.map +1 -1
  136. package/lib/typescript/commonjs/ui/screens/PaymentGatewayScreen.d.ts.map +1 -1
  137. package/lib/typescript/commonjs/ui/screens/PrivacySettingsScreen.d.ts.map +1 -1
  138. package/lib/typescript/commonjs/ui/screens/SearchSettingsScreen.d.ts.map +1 -1
  139. package/lib/typescript/commonjs/ui/screens/SessionManagementScreen.d.ts.map +1 -1
  140. package/lib/typescript/commonjs/ui/screens/UserLinksScreen.d.ts.map +1 -1
  141. package/lib/typescript/commonjs/ui/screens/WelcomeNewUserScreen.d.ts.map +1 -1
  142. package/lib/typescript/commonjs/ui/screens/karma/KarmaFAQScreen.d.ts.map +1 -1
  143. package/lib/typescript/module/ui/components/OxyProvider.d.ts.map +1 -1
  144. package/lib/typescript/module/ui/components/SignInModal.d.ts.map +1 -1
  145. package/lib/typescript/module/ui/components/fileManagement/FileViewer.d.ts.map +1 -1
  146. package/lib/typescript/module/ui/components/index.d.ts +0 -5
  147. package/lib/typescript/module/ui/components/index.d.ts.map +1 -1
  148. package/lib/typescript/module/ui/components/payment/PaymentDetailsStep.d.ts.map +1 -1
  149. package/lib/typescript/module/ui/components/payment/PaymentMethodStep.d.ts.map +1 -1
  150. package/lib/typescript/module/ui/components/payment/PaymentReviewStep.d.ts.map +1 -1
  151. package/lib/typescript/module/ui/components/payment/PaymentSuccessStep.d.ts.map +1 -1
  152. package/lib/typescript/module/ui/components/payment/PaymentSummaryStep.d.ts.map +1 -1
  153. package/lib/typescript/module/ui/context/hooks/useAuthOperations.d.ts.map +1 -1
  154. package/lib/typescript/module/ui/navigation/bottomSheetManager.d.ts +1 -1
  155. package/lib/typescript/module/ui/navigation/bottomSheetManager.d.ts.map +1 -1
  156. package/lib/typescript/module/ui/screens/AccountCenterScreen.d.ts.map +1 -1
  157. package/lib/typescript/module/ui/screens/AccountOverviewScreen.d.ts.map +1 -1
  158. package/lib/typescript/module/ui/screens/AccountSettingsScreen.d.ts.map +1 -1
  159. package/lib/typescript/module/ui/screens/AccountSwitcherScreen.d.ts.map +1 -1
  160. package/lib/typescript/module/ui/screens/AccountVerificationScreen.d.ts.map +1 -1
  161. package/lib/typescript/module/ui/screens/FeedbackScreen.d.ts.map +1 -1
  162. package/lib/typescript/module/ui/screens/FileManagementScreen.d.ts.map +1 -1
  163. package/lib/typescript/module/ui/screens/HistoryViewScreen.d.ts.map +1 -1
  164. package/lib/typescript/module/ui/screens/LanguageSelectorScreen.d.ts.map +1 -1
  165. package/lib/typescript/module/ui/screens/LegalDocumentsScreen.d.ts.map +1 -1
  166. package/lib/typescript/module/ui/screens/PaymentGatewayScreen.d.ts.map +1 -1
  167. package/lib/typescript/module/ui/screens/PrivacySettingsScreen.d.ts.map +1 -1
  168. package/lib/typescript/module/ui/screens/SearchSettingsScreen.d.ts.map +1 -1
  169. package/lib/typescript/module/ui/screens/SessionManagementScreen.d.ts.map +1 -1
  170. package/lib/typescript/module/ui/screens/UserLinksScreen.d.ts.map +1 -1
  171. package/lib/typescript/module/ui/screens/WelcomeNewUserScreen.d.ts.map +1 -1
  172. package/lib/typescript/module/ui/screens/karma/KarmaFAQScreen.d.ts.map +1 -1
  173. package/package.json +2 -2
  174. package/src/ui/components/OxyProvider.tsx +6 -5
  175. package/src/ui/components/SignInModal.tsx +186 -42
  176. package/src/ui/components/fileManagement/FileViewer.tsx +25 -15
  177. package/src/ui/components/index.ts +0 -5
  178. package/src/ui/components/payment/PaymentDetailsStep.tsx +16 -19
  179. package/src/ui/components/payment/PaymentMethodStep.tsx +33 -35
  180. package/src/ui/components/payment/PaymentReviewStep.tsx +63 -67
  181. package/src/ui/components/payment/PaymentSuccessStep.tsx +4 -12
  182. package/src/ui/components/payment/PaymentSummaryStep.tsx +26 -33
  183. package/src/ui/context/hooks/useAuthOperations.ts +4 -3
  184. package/src/ui/screens/AccountCenterScreen.tsx +2 -3
  185. package/src/ui/screens/AccountOverviewScreen.tsx +44 -65
  186. package/src/ui/screens/AccountSettingsScreen.tsx +121 -149
  187. package/src/ui/screens/AccountSwitcherScreen.tsx +94 -115
  188. package/src/ui/screens/AccountVerificationScreen.tsx +10 -9
  189. package/src/ui/screens/FeedbackScreen.tsx +50 -38
  190. package/src/ui/screens/FileManagementScreen.tsx +26 -34
  191. package/src/ui/screens/HistoryViewScreen.tsx +29 -10
  192. package/src/ui/screens/LanguageSelectorScreen.tsx +19 -7
  193. package/src/ui/screens/LegalDocumentsScreen.tsx +46 -63
  194. package/src/ui/screens/PaymentGatewayScreen.tsx +11 -12
  195. package/src/ui/screens/PrivacySettingsScreen.tsx +81 -193
  196. package/src/ui/screens/SavesCollectionsScreen.tsx +23 -23
  197. package/src/ui/screens/SearchSettingsScreen.tsx +11 -19
  198. package/src/ui/screens/SessionManagementScreen.tsx +29 -3
  199. package/src/ui/screens/UserLinksScreen.tsx +15 -32
  200. package/src/ui/screens/WelcomeNewUserScreen.tsx +46 -20
  201. package/src/ui/screens/karma/KarmaFAQScreen.tsx +4 -6
  202. package/lib/commonjs/ui/components/GroupedItem.js +0 -138
  203. package/lib/commonjs/ui/components/GroupedItem.js.map +0 -1
  204. package/lib/commonjs/ui/components/GroupedSection.js +0 -41
  205. package/lib/commonjs/ui/components/GroupedSection.js.map +0 -1
  206. package/lib/commonjs/ui/components/Section.js +0 -39
  207. package/lib/commonjs/ui/components/Section.js.map +0 -1
  208. package/lib/commonjs/ui/components/SectionTitle.js +0 -29
  209. package/lib/commonjs/ui/components/SectionTitle.js.map +0 -1
  210. package/lib/commonjs/ui/components/SettingRow.js +0 -96
  211. package/lib/commonjs/ui/components/SettingRow.js.map +0 -1
  212. package/lib/commonjs/ui/components/internal/GroupedPillButtons.js +0 -208
  213. package/lib/commonjs/ui/components/internal/GroupedPillButtons.js.map +0 -1
  214. package/lib/module/ui/components/GroupedItem.js +0 -135
  215. package/lib/module/ui/components/GroupedItem.js.map +0 -1
  216. package/lib/module/ui/components/GroupedSection.js +0 -37
  217. package/lib/module/ui/components/GroupedSection.js.map +0 -1
  218. package/lib/module/ui/components/Section.js +0 -34
  219. package/lib/module/ui/components/Section.js.map +0 -1
  220. package/lib/module/ui/components/SectionTitle.js +0 -25
  221. package/lib/module/ui/components/SectionTitle.js.map +0 -1
  222. package/lib/module/ui/components/SettingRow.js +0 -91
  223. package/lib/module/ui/components/SettingRow.js.map +0 -1
  224. package/lib/module/ui/components/internal/GroupedPillButtons.js +0 -204
  225. package/lib/module/ui/components/internal/GroupedPillButtons.js.map +0 -1
  226. package/lib/typescript/commonjs/ui/components/GroupedItem.d.ts +0 -24
  227. package/lib/typescript/commonjs/ui/components/GroupedItem.d.ts.map +0 -1
  228. package/lib/typescript/commonjs/ui/components/GroupedSection.d.ts +0 -30
  229. package/lib/typescript/commonjs/ui/components/GroupedSection.d.ts.map +0 -1
  230. package/lib/typescript/commonjs/ui/components/Section.d.ts +0 -12
  231. package/lib/typescript/commonjs/ui/components/Section.d.ts.map +0 -1
  232. package/lib/typescript/commonjs/ui/components/SectionTitle.d.ts +0 -10
  233. package/lib/typescript/commonjs/ui/components/SectionTitle.d.ts.map +0 -1
  234. package/lib/typescript/commonjs/ui/components/SettingRow.d.ts +0 -20
  235. package/lib/typescript/commonjs/ui/components/SettingRow.d.ts.map +0 -1
  236. package/lib/typescript/commonjs/ui/components/internal/GroupedPillButtons.d.ts +0 -24
  237. package/lib/typescript/commonjs/ui/components/internal/GroupedPillButtons.d.ts.map +0 -1
  238. package/lib/typescript/module/ui/components/GroupedItem.d.ts +0 -24
  239. package/lib/typescript/module/ui/components/GroupedItem.d.ts.map +0 -1
  240. package/lib/typescript/module/ui/components/GroupedSection.d.ts +0 -30
  241. package/lib/typescript/module/ui/components/GroupedSection.d.ts.map +0 -1
  242. package/lib/typescript/module/ui/components/Section.d.ts +0 -12
  243. package/lib/typescript/module/ui/components/Section.d.ts.map +0 -1
  244. package/lib/typescript/module/ui/components/SectionTitle.d.ts +0 -10
  245. package/lib/typescript/module/ui/components/SectionTitle.d.ts.map +0 -1
  246. package/lib/typescript/module/ui/components/SettingRow.d.ts +0 -20
  247. package/lib/typescript/module/ui/components/SettingRow.d.ts.map +0 -1
  248. package/lib/typescript/module/ui/components/internal/GroupedPillButtons.d.ts +0 -24
  249. package/lib/typescript/module/ui/components/internal/GroupedPillButtons.d.ts.map +0 -1
  250. package/src/ui/components/GroupedItem.tsx +0 -161
  251. package/src/ui/components/GroupedSection.tsx +0 -60
  252. package/src/ui/components/Section.tsx +0 -42
  253. package/src/ui/components/SectionTitle.tsx +0 -27
  254. package/src/ui/components/SettingRow.tsx +0 -105
  255. package/src/ui/components/internal/GroupedPillButtons.tsx +0 -253
@@ -1,161 +0,0 @@
1
- import type React from 'react';
2
- import { memo, useMemo } from 'react';
3
- import { View, Text, TouchableOpacity, StyleSheet } from 'react-native';
4
- import { Ionicons } from '@expo/vector-icons';
5
- import { MaterialCommunityIcons } from '@expo/vector-icons';
6
- import { useTheme } from '@oxyhq/bloom/theme';
7
- import { darkenColor } from '../utils/colorUtils';
8
-
9
-
10
- interface GroupedItemProps {
11
- icon?: string;
12
- iconColor?: string;
13
- title: string;
14
- subtitle?: string;
15
- onPress?: () => void;
16
- isFirst?: boolean;
17
- isLast?: boolean;
18
- showChevron?: boolean;
19
- disabled?: boolean;
20
- customContent?: React.ReactNode;
21
- customIcon?: React.ReactNode;
22
- /** Accessibility label (defaults to title) */
23
- accessibilityLabel?: string;
24
- /** Accessibility hint for what happens on press */
25
- accessibilityHint?: string;
26
- }
27
-
28
- const GroupedItemComponent = ({
29
- icon,
30
- iconColor,
31
- title,
32
- subtitle,
33
- onPress,
34
- isFirst = false,
35
- isLast = false,
36
- showChevron = false,
37
- disabled = false,
38
- customContent,
39
- customIcon,
40
- accessibilityLabel,
41
- accessibilityHint,
42
- }: GroupedItemProps) => {
43
- const { colors } = useTheme();
44
- // Use fallback color when iconColor is not provided
45
- const finalIconColor = iconColor || colors.icon;
46
-
47
- const itemStyles = useMemo(
48
- () => [
49
- styles.groupedItem,
50
- isFirst && styles.firstGroupedItem,
51
- isLast && styles.lastGroupedItem,
52
- ],
53
- [isFirst, isLast],
54
- );
55
-
56
- const content = (
57
- <View style={styles.groupedItemContent}>
58
- {customIcon ? (
59
- <View style={styles.actionIcon}>{customIcon}</View>
60
- ) : icon ? (
61
- <View style={[styles.iconContainer, { backgroundColor: finalIconColor }]}>
62
- <MaterialCommunityIcons name={icon} size={22} color={darkenColor(finalIconColor)} />
63
- </View>
64
- ) : null}
65
- <View style={styles.actionTextContainer}>
66
- <Text className="text-foreground" style={styles.actionButtonText}>{title}</Text>
67
- {subtitle && (
68
- <Text className="text-muted-foreground" style={styles.actionButtonSubtext}>
69
- {subtitle}
70
- </Text>
71
- )}
72
- </View>
73
- {customContent}
74
- {showChevron && (
75
- <Ionicons name="chevron-forward" size={20} color={colors.icon} />
76
- )}
77
- </View>
78
- );
79
-
80
- if (onPress && !disabled) {
81
- return (
82
- <TouchableOpacity
83
- className="bg-card"
84
- style={itemStyles}
85
- onPress={onPress}
86
- activeOpacity={0.7}
87
- accessibilityRole="button"
88
- accessibilityLabel={accessibilityLabel || title}
89
- accessibilityHint={accessibilityHint || subtitle}
90
- accessibilityState={{ disabled }}
91
- >
92
- {content}
93
- </TouchableOpacity>
94
- );
95
- }
96
-
97
- return (
98
- <View
99
- className="bg-card"
100
- style={itemStyles}
101
- accessibilityRole="text"
102
- accessibilityLabel={accessibilityLabel || title}
103
- >
104
- {content}
105
- </View>
106
- );
107
- };
108
-
109
- GroupedItemComponent.displayName = 'GroupedItem';
110
-
111
- export const GroupedItem = memo(GroupedItemComponent);
112
-
113
- const styles = StyleSheet.create({
114
- groupedItem: {
115
- flexDirection: 'row',
116
- alignItems: 'center',
117
- justifyContent: 'space-between',
118
- overflow: 'hidden',
119
- width: '100%',
120
- },
121
- firstGroupedItem: {
122
- borderTopLeftRadius: 18,
123
- borderTopRightRadius: 18,
124
- },
125
- lastGroupedItem: {
126
- borderBottomLeftRadius: 18,
127
- borderBottomRightRadius: 18,
128
- },
129
- groupedItemContent: {
130
- flexDirection: 'row',
131
- alignItems: 'center',
132
- paddingVertical: 8,
133
- paddingHorizontal: 10,
134
- width: '100%',
135
- gap: 10,
136
- },
137
- actionIcon: {
138
- // marginRight handled by gap
139
- },
140
- iconContainer: {
141
- width: 36,
142
- height: 36,
143
- borderRadius: 18,
144
- alignItems: 'center',
145
- justifyContent: 'center',
146
- // marginRight handled by gap
147
- },
148
- actionTextContainer: {
149
- flex: 1,
150
- },
151
- actionButtonText: {
152
- fontSize: 14,
153
- fontWeight: '400',
154
- },
155
- actionButtonSubtext: {
156
- fontSize: 12,
157
- marginTop: 2,
158
- },
159
- });
160
-
161
- export default GroupedItem;
@@ -1,60 +0,0 @@
1
- import type React from 'react';
2
- import { memo } from 'react';
3
- import { View } from 'react-native';
4
- import { GroupedItem } from './GroupedItem';
5
- import { Ionicons } from '@expo/vector-icons';
6
-
7
- interface GroupedSectionItem {
8
- id: string;
9
- icon?: string;
10
- iconColor?: string;
11
- title: string;
12
- subtitle?: string;
13
- onPress?: () => void;
14
- onLongPress?: () => void;
15
- showChevron?: boolean;
16
- disabled?: boolean;
17
- selected?: boolean;
18
- customContent?: React.ReactNode;
19
- customIcon?: React.ReactNode;
20
- multiRow?: boolean;
21
- dense?: boolean;
22
- customContentBelow?: React.ReactNode;
23
- theme?: string;
24
- /** Allow additional properties for extensibility */
25
- [key: string]: unknown;
26
- }
27
-
28
- interface GroupedSectionProps {
29
- items: GroupedSectionItem[];
30
- }
31
-
32
- const GroupedSectionComponent = ({ items }: GroupedSectionProps) => {
33
- return (
34
- <View style={{ width: '100%' }}>
35
- {items.map((item, index) => (
36
- <View key={`${item.id}-${index}`} style={{ marginBottom: index < items.length - 1 ? 4 : 0 }}>
37
- <GroupedItem
38
- icon={item.icon}
39
- iconColor={item.iconColor}
40
- title={item.title}
41
- subtitle={item.subtitle}
42
- onPress={item.onPress}
43
- isFirst={index === 0}
44
- isLast={index === items.length - 1}
45
- showChevron={item.showChevron}
46
- disabled={item.disabled}
47
- customContent={item.customContent}
48
- customIcon={item.customIcon}
49
- />
50
- </View>
51
- ))}
52
- </View>
53
- );
54
- };
55
-
56
- GroupedSectionComponent.displayName = 'GroupedSection';
57
-
58
- export const GroupedSection = memo(GroupedSectionComponent);
59
-
60
- export default GroupedSection;
@@ -1,42 +0,0 @@
1
- import type React from 'react';
2
- import { View, StyleSheet, type StyleProp, type ViewStyle } from 'react-native';
3
- import SectionTitle from './SectionTitle';
4
- import { useColorScheme } from '../hooks/useColorScheme';
5
- import { normalizeColorScheme } from '../utils/themeUtils';
6
-
7
- interface SectionProps {
8
- title?: string;
9
- theme?: 'light' | 'dark';
10
- children: React.ReactNode;
11
- isFirst?: boolean;
12
- style?: StyleProp<ViewStyle>;
13
- }
14
-
15
- const Section: React.FC<SectionProps> = ({
16
- title,
17
- theme,
18
- children,
19
- isFirst = false,
20
- style
21
- }) => {
22
- const colorScheme = normalizeColorScheme(useColorScheme(), theme);
23
-
24
- return (
25
- <View style={[styles.section, isFirst && styles.firstSection, style]}>
26
- {title && <SectionTitle title={title} theme={colorScheme} />}
27
- {children}
28
- </View>
29
- );
30
- };
31
-
32
- const styles = StyleSheet.create({
33
- section: {
34
- marginBottom: 10,
35
- gap: 12,
36
- },
37
- firstSection: {
38
- marginTop: 8,
39
- },
40
- });
41
-
42
- export default Section;
@@ -1,27 +0,0 @@
1
- import type React from 'react';
2
- import { Text, StyleSheet, type StyleProp, type TextStyle } from 'react-native';
3
- import { fontFamilies } from '../styles/fonts';
4
-
5
- interface SectionTitleProps {
6
- title: string;
7
- theme?: 'light' | 'dark';
8
- style?: StyleProp<TextStyle>;
9
- }
10
-
11
- const SectionTitle: React.FC<SectionTitleProps> = ({ title, theme, style }) => {
12
- return (
13
- <Text className="text-foreground" style={[styles.sectionTitle, style]}>
14
- {title}
15
- </Text>
16
- );
17
- };
18
-
19
- const styles = StyleSheet.create({
20
- sectionTitle: {
21
- fontSize: 16,
22
- fontWeight: '600',
23
- fontFamily: fontFamilies.interSemiBold,
24
- },
25
- });
26
-
27
- export default SectionTitle;
@@ -1,105 +0,0 @@
1
- import React from 'react';
2
- import { View, Text, Switch, StyleSheet } from 'react-native';
3
- import { useTheme } from '@oxyhq/bloom/theme';
4
-
5
- export interface SettingRowProps {
6
- title: string;
7
- description?: string;
8
- value: boolean;
9
- onValueChange: (value: boolean) => void;
10
- disabled?: boolean;
11
- textColor?: string;
12
- mutedTextColor?: string;
13
- borderColor?: string;
14
- /** Active color for the switch track */
15
- activeColor?: string;
16
- /** Inactive color for the switch track */
17
- inactiveColor?: string;
18
- /** Accessibility label for the switch */
19
- accessibilityLabel?: string;
20
- }
21
-
22
- /**
23
- * Reusable setting row component with switch
24
- * Extracted from PrivacySettingsScreen for reuse across settings screens
25
- */
26
- const SettingRow: React.FC<SettingRowProps> = ({
27
- title,
28
- description,
29
- value,
30
- onValueChange,
31
- disabled = false,
32
- textColor,
33
- mutedTextColor,
34
- borderColor,
35
- activeColor,
36
- inactiveColor,
37
- accessibilityLabel,
38
- }) => {
39
- const theme = useTheme();
40
-
41
- const resolvedActiveColor = activeColor ?? theme.colors.primary;
42
- const resolvedInactiveColor = inactiveColor ?? theme.colors.textTertiary;
43
- const thumbOn = theme.colors.background;
44
- const thumbOff = theme.colors.backgroundSecondary;
45
-
46
- return (
47
- <View
48
- style={[styles.settingRow, borderColor ? { borderBottomColor: borderColor } : undefined]}
49
- accessibilityRole="none"
50
- >
51
- <View style={styles.settingInfo}>
52
- <Text
53
- style={[styles.settingTitle, textColor ? { color: textColor } : undefined]}
54
- accessibilityRole="text"
55
- >
56
- {title}
57
- </Text>
58
- {description && (
59
- <Text
60
- style={[styles.settingDescription, mutedTextColor ? { color: mutedTextColor } : undefined]}
61
- accessibilityRole="text"
62
- >
63
- {description}
64
- </Text>
65
- )}
66
- </View>
67
- <Switch
68
- value={value}
69
- onValueChange={onValueChange}
70
- disabled={disabled}
71
- trackColor={{ false: resolvedInactiveColor, true: resolvedActiveColor }}
72
- thumbColor={value ? thumbOn : thumbOff}
73
- accessibilityRole="switch"
74
- accessibilityLabel={accessibilityLabel || title}
75
- accessibilityState={{ checked: value, disabled }}
76
- accessibilityHint={description}
77
- />
78
- </View>
79
- );
80
- };
81
-
82
- const styles = StyleSheet.create({
83
- settingRow: {
84
- flexDirection: 'row',
85
- justifyContent: 'space-between',
86
- alignItems: 'center',
87
- paddingVertical: 16,
88
- borderBottomWidth: 1,
89
- },
90
- settingInfo: {
91
- flex: 1,
92
- marginRight: 16,
93
- },
94
- settingTitle: {
95
- fontSize: 16,
96
- fontWeight: '500',
97
- marginBottom: 4,
98
- },
99
- settingDescription: {
100
- fontSize: 14,
101
- opacity: 0.7,
102
- },
103
- });
104
-
105
- export default React.memo(SettingRow);
@@ -1,253 +0,0 @@
1
- import type React from 'react';
2
- import { View, TouchableOpacity, Text, ActivityIndicator, StyleSheet, Platform } from 'react-native';
3
- import { Ionicons } from '@expo/vector-icons';
4
- import { useTheme } from '@oxyhq/bloom/theme';
5
-
6
- type IoniconsName = React.ComponentProps<typeof Ionicons>['name'];
7
-
8
- interface ButtonConfig {
9
- text: string;
10
- onPress: () => void;
11
- icon?: string;
12
- variant?: 'primary' | 'secondary' | 'transparent';
13
- disabled?: boolean;
14
- loading?: boolean;
15
- testID?: string;
16
- }
17
-
18
- interface GroupedPillButtonColors {
19
- primary: string;
20
- secondary?: string;
21
- border: string;
22
- text: string;
23
- }
24
-
25
- interface GroupedPillButtonsProps {
26
- buttons: ButtonConfig[];
27
- colors: GroupedPillButtonColors;
28
- gap?: number;
29
- }
30
-
31
- const GroupedPillButtons: React.FC<GroupedPillButtonsProps> = ({
32
- buttons,
33
- colors,
34
- gap = 8,
35
- }) => {
36
- const theme = useTheme();
37
-
38
- const getButtonStyle = (button: ButtonConfig, index: number, totalButtons: number) => {
39
- const baseStyle = {
40
- flexDirection: 'row' as const,
41
- alignItems: 'center' as const,
42
- paddingVertical: 6,
43
- paddingHorizontal: 12,
44
- gap: 6,
45
- minWidth: 70,
46
- borderWidth: 1,
47
- flexShrink: 0,
48
- };
49
-
50
- // Determine border radius based on position
51
- let borderRadius = {
52
- borderTopLeftRadius: 35,
53
- borderBottomLeftRadius: 35,
54
- borderTopRightRadius: 35,
55
- borderBottomRightRadius: 35,
56
- };
57
-
58
- if (totalButtons > 1) {
59
- if (index === 0) {
60
- // First button
61
- borderRadius = {
62
- borderTopLeftRadius: 35,
63
- borderBottomLeftRadius: 35,
64
- borderTopRightRadius: 12,
65
- borderBottomRightRadius: 12,
66
- };
67
- } else if (index === totalButtons - 1) {
68
- // Last button
69
- borderRadius = {
70
- borderTopLeftRadius: 12,
71
- borderBottomLeftRadius: 12,
72
- borderTopRightRadius: 35,
73
- borderBottomRightRadius: 35,
74
- };
75
- } else {
76
- // Middle button (if 3 buttons)
77
- borderRadius = {
78
- borderTopLeftRadius: 12,
79
- borderBottomLeftRadius: 12,
80
- borderTopRightRadius: 12,
81
- borderBottomRightRadius: 12,
82
- };
83
- }
84
- }
85
-
86
- // Determine colors based on variant
87
- let backgroundColor = 'transparent';
88
- let borderColor = colors.border;
89
- const isDisabled = button.disabled || button.loading;
90
-
91
- switch (button.variant) {
92
- case 'primary':
93
- backgroundColor = isDisabled ? theme.colors.borderLight : colors.primary;
94
- borderColor = isDisabled ? theme.colors.borderLight : colors.primary;
95
- break;
96
- case 'secondary':
97
- backgroundColor = isDisabled ? theme.colors.borderLight : (colors.secondary || colors.primary);
98
- borderColor = isDisabled ? theme.colors.borderLight : (colors.secondary || colors.primary);
99
- break;
100
- default:
101
- backgroundColor = 'transparent';
102
- borderColor = isDisabled ? theme.colors.borderLight : colors.border;
103
- break;
104
- }
105
-
106
- return {
107
- ...baseStyle,
108
- ...borderRadius,
109
- backgroundColor,
110
- borderColor,
111
- opacity: isDisabled ? 0.6 : 1,
112
- };
113
- };
114
-
115
- const getTextStyle = (button: ButtonConfig, colors: GroupedPillButtonColors) => {
116
- const baseTextStyle = {
117
- fontSize: 15,
118
- fontWeight: '600' as const,
119
- // Avoid stretching that can cause wraps on native
120
- flexShrink: 1,
121
- };
122
-
123
- const isDisabled = button.disabled || button.loading;
124
- let textColor = colors.text;
125
-
126
- switch (button.variant) {
127
- case 'primary':
128
- case 'secondary':
129
- textColor = isDisabled ? theme.colors.textTertiary : '#FFFFFF';
130
- break;
131
- default:
132
- textColor = isDisabled ? theme.colors.textTertiary : colors.text;
133
- break;
134
- }
135
-
136
- return {
137
- ...baseTextStyle,
138
- color: textColor,
139
- ...(Platform.OS === 'web' ? { whiteSpace: 'nowrap' as const } : null),
140
- };
141
- };
142
-
143
- const getIconColor = (button: ButtonConfig, colors: GroupedPillButtonColors) => {
144
- const isDisabled = button.disabled || button.loading;
145
-
146
- switch (button.variant) {
147
- case 'primary':
148
- case 'secondary':
149
- return isDisabled ? theme.colors.textTertiary : '#FFFFFF';
150
- default:
151
- return isDisabled ? theme.colors.textTertiary : colors.text;
152
- }
153
- };
154
-
155
- const isBackButton = (button: ButtonConfig) => {
156
- const text = typeof button.text === 'string' ? button.text.toLowerCase() : '';
157
- return text.includes('back') ||
158
- button.icon === 'arrow-back' ||
159
- button.icon === 'chevron-back';
160
- };
161
-
162
- const renderButtonContent = (button: ButtonConfig, colors: GroupedPillButtonColors, index: number) => {
163
- const iconColor = getIconColor(button, colors);
164
- const isBack = isBackButton(button);
165
- const isFirstButton = index === 0;
166
- const isSingleButton = buttons.length === 1;
167
-
168
- if (button.loading) {
169
- return (
170
- <ActivityIndicator
171
- color={iconColor}
172
- size="small"
173
- />
174
- );
175
- }
176
-
177
- // Auto-detect icon placement based on button order and type
178
- if (isSingleButton) {
179
- // Single button: icon on right
180
- return (
181
- <>
182
- <Text style={getTextStyle(button, colors)} numberOfLines={1} ellipsizeMode="tail">
183
- {button.text}
184
- </Text>
185
- {button.icon && (
186
- <Ionicons
187
- name={button.icon as IoniconsName}
188
- size={16}
189
- color={iconColor}
190
- />
191
- )}
192
- </>
193
- );
194
- }if (isFirstButton || isBack) {
195
- // First button or back button: icon on left, text on right
196
- return (
197
- <>
198
- {button.icon && (
199
- <Ionicons
200
- name={button.icon as IoniconsName}
201
- size={16}
202
- color={iconColor}
203
- />
204
- )}
205
- <Text style={getTextStyle(button, colors)} numberOfLines={1} ellipsizeMode="tail">
206
- {button.text}
207
- </Text>
208
- </>
209
- );
210
- }
211
- // Second button or forward/action button: text on left, icon on right
212
- return (
213
- <>
214
- <Text style={getTextStyle(button, colors)} numberOfLines={1} ellipsizeMode="tail">
215
- {button.text}
216
- </Text>
217
- {button.icon && (
218
- <Ionicons
219
- name={button.icon as IoniconsName}
220
- size={16}
221
- color={iconColor}
222
- />
223
- )}
224
- </>
225
- );
226
- };
227
-
228
- return (
229
- <View style={[styles.container, { gap }]}>
230
- {buttons.map((button, index) => (
231
- <TouchableOpacity
232
- key={index}
233
- style={getButtonStyle(button, index, buttons.length)}
234
- onPress={button.onPress}
235
- disabled={button.disabled || button.loading}
236
- testID={button.testID}
237
- >
238
- {renderButtonContent(button, colors, index)}
239
- </TouchableOpacity>
240
- ))}
241
- </View>
242
- );
243
- };
244
-
245
- const styles = StyleSheet.create({
246
- container: {
247
- flexDirection: 'row',
248
- justifyContent: 'flex-end',
249
- width: '100%',
250
- },
251
- });
252
-
253
- export default GroupedPillButtons;