@oxyhq/services 5.7.5 → 5.8.2
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/README.md +76 -76
- package/lib/commonjs/core/index.js +177 -102
- package/lib/commonjs/core/index.js.map +1 -1
- package/lib/commonjs/index.js +69 -28
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/ui/components/Avatar.js +15 -6
- package/lib/commonjs/ui/components/Avatar.js.map +1 -1
- package/lib/commonjs/ui/components/FollowButton.js +100 -12
- package/lib/commonjs/ui/components/FollowButton.js.map +1 -1
- package/lib/commonjs/ui/components/GroupedItem.js +58 -13
- package/lib/commonjs/ui/components/GroupedItem.js.map +1 -1
- package/lib/commonjs/ui/components/GroupedSection.js +7 -1
- package/lib/commonjs/ui/components/GroupedSection.js.map +1 -1
- package/lib/commonjs/ui/components/Header.js +356 -0
- package/lib/commonjs/ui/components/Header.js.map +1 -0
- package/lib/commonjs/ui/components/OxyProvider.js +28 -7
- package/lib/commonjs/ui/components/OxyProvider.js.map +1 -1
- package/lib/commonjs/ui/components/index.js +7 -0
- package/lib/commonjs/ui/components/index.js.map +1 -1
- package/lib/commonjs/ui/components/internal/GroupedPillButtons.js +1 -1
- package/lib/commonjs/ui/components/internal/GroupedPillButtons.js.map +1 -1
- package/lib/commonjs/ui/components/internal/TextField.js +606 -546
- package/lib/commonjs/ui/components/internal/TextField.js.map +1 -1
- package/lib/commonjs/ui/components/internal/TextField.md +436 -0
- package/lib/commonjs/ui/context/OxyContext.js +181 -199
- package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
- package/lib/commonjs/ui/hooks/index.js +6 -0
- package/lib/commonjs/ui/hooks/index.js.map +1 -1
- package/lib/commonjs/ui/hooks/useFollow.js +59 -2
- package/lib/commonjs/ui/hooks/useFollow.js.map +1 -1
- package/lib/commonjs/ui/hooks/useSessionSocket.js +5 -2
- package/lib/commonjs/ui/hooks/useSessionSocket.js.map +1 -1
- package/lib/commonjs/ui/navigation/OxyRouter.js +11 -1
- package/lib/commonjs/ui/navigation/OxyRouter.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountCenterScreen.js +6 -6
- package/lib/commonjs/ui/screens/AccountCenterScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountManagementDemo.js +3 -3
- package/lib/commonjs/ui/screens/AccountManagementDemo.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountOverviewScreen.js +241 -598
- package/lib/commonjs/ui/screens/AccountOverviewScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountSettingsScreen.js +1160 -406
- package/lib/commonjs/ui/screens/AccountSettingsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountSwitcherScreen.js +135 -237
- package/lib/commonjs/ui/screens/AccountSwitcherScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AppInfoScreen.js +246 -463
- package/lib/commonjs/ui/screens/AppInfoScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FeedbackScreen.js +3 -3
- package/lib/commonjs/ui/screens/FeedbackScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PaymentGatewayScreen.js +808 -650
- package/lib/commonjs/ui/screens/PaymentGatewayScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ProfileScreen.js +214 -37
- package/lib/commonjs/ui/screens/ProfileScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/RecoverAccountScreen.js +51 -72
- package/lib/commonjs/ui/screens/RecoverAccountScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/SessionManagementScreen.js +11 -29
- package/lib/commonjs/ui/screens/SessionManagementScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/SignInScreen.js +30 -303
- package/lib/commonjs/ui/screens/SignInScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/SignUpScreen.js +4 -4
- package/lib/commonjs/ui/screens/SignUpScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/UserLinksScreen.js +90 -0
- package/lib/commonjs/ui/screens/UserLinksScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/internal/SignInPasswordStep.js +19 -31
- package/lib/commonjs/ui/screens/internal/SignInPasswordStep.js.map +1 -1
- package/lib/commonjs/ui/screens/internal/SignInUsernameStep.js +7 -10
- package/lib/commonjs/ui/screens/internal/SignInUsernameStep.js.map +1 -1
- package/lib/commonjs/ui/screens/internal/SignUpIdentityStep.js +11 -5
- package/lib/commonjs/ui/screens/internal/SignUpIdentityStep.js.map +1 -1
- package/lib/commonjs/ui/screens/internal/SignUpSecurityStep.js +11 -4
- package/lib/commonjs/ui/screens/internal/SignUpSecurityStep.js.map +1 -1
- package/lib/commonjs/ui/screens/karma/KarmaAboutScreen.js +9 -6
- package/lib/commonjs/ui/screens/karma/KarmaAboutScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/karma/KarmaCenterScreen.js +3 -30
- package/lib/commonjs/ui/screens/karma/KarmaCenterScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/karma/KarmaFAQScreen.js +37 -46
- package/lib/commonjs/ui/screens/karma/KarmaFAQScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/karma/KarmaLeaderboardScreen.js +9 -12
- package/lib/commonjs/ui/screens/karma/KarmaLeaderboardScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/karma/KarmaRewardsScreen.js +9 -12
- package/lib/commonjs/ui/screens/karma/KarmaRewardsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/karma/KarmaRulesScreen.js +9 -12
- package/lib/commonjs/ui/screens/karma/KarmaRulesScreen.js.map +1 -1
- package/lib/commonjs/ui/stores/authStore.js +36 -6
- package/lib/commonjs/ui/stores/authStore.js.map +1 -1
- package/lib/commonjs/ui/stores/followStore.js +106 -1
- package/lib/commonjs/ui/stores/followStore.js.map +1 -1
- package/lib/commonjs/ui/styles/authStyles.js +337 -0
- package/lib/commonjs/ui/styles/authStyles.js.map +1 -0
- package/lib/commonjs/ui/styles/index.js +11 -0
- package/lib/commonjs/ui/styles/index.js.map +1 -1
- package/lib/module/core/index.js +177 -41
- package/lib/module/core/index.js.map +1 -1
- package/lib/module/index.js +24 -4
- package/lib/module/index.js.map +1 -1
- package/lib/module/ui/components/Avatar.js +15 -6
- package/lib/module/ui/components/Avatar.js.map +1 -1
- package/lib/module/ui/components/FollowButton.js +101 -13
- package/lib/module/ui/components/FollowButton.js.map +1 -1
- package/lib/module/ui/components/GroupedItem.js +59 -14
- package/lib/module/ui/components/GroupedItem.js.map +1 -1
- package/lib/module/ui/components/GroupedSection.js +7 -1
- package/lib/module/ui/components/GroupedSection.js.map +1 -1
- package/lib/module/ui/components/Header.js +351 -0
- package/lib/module/ui/components/Header.js.map +1 -0
- package/lib/module/ui/components/OxyProvider.js +30 -9
- package/lib/module/ui/components/OxyProvider.js.map +1 -1
- package/lib/module/ui/components/index.js +1 -0
- package/lib/module/ui/components/index.js.map +1 -1
- package/lib/module/ui/components/internal/GroupedPillButtons.js +1 -1
- package/lib/module/ui/components/internal/GroupedPillButtons.js.map +1 -1
- package/lib/module/ui/components/internal/TextField.js +607 -547
- package/lib/module/ui/components/internal/TextField.js.map +1 -1
- package/lib/module/ui/components/internal/TextField.md +436 -0
- package/lib/module/ui/context/OxyContext.js +180 -198
- package/lib/module/ui/context/OxyContext.js.map +1 -1
- package/lib/module/ui/hooks/index.js +1 -1
- package/lib/module/ui/hooks/index.js.map +1 -1
- package/lib/module/ui/hooks/useFollow.js +57 -1
- package/lib/module/ui/hooks/useFollow.js.map +1 -1
- package/lib/module/ui/hooks/useSessionSocket.js +5 -2
- package/lib/module/ui/hooks/useSessionSocket.js.map +1 -1
- package/lib/module/ui/navigation/OxyRouter.js +11 -1
- package/lib/module/ui/navigation/OxyRouter.js.map +1 -1
- package/lib/module/ui/screens/AccountCenterScreen.js +6 -6
- package/lib/module/ui/screens/AccountCenterScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountManagementDemo.js +3 -3
- package/lib/module/ui/screens/AccountManagementDemo.js.map +1 -1
- package/lib/module/ui/screens/AccountOverviewScreen.js +242 -597
- package/lib/module/ui/screens/AccountOverviewScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountSettingsScreen.js +1161 -407
- package/lib/module/ui/screens/AccountSettingsScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountSwitcherScreen.js +135 -237
- package/lib/module/ui/screens/AccountSwitcherScreen.js.map +1 -1
- package/lib/module/ui/screens/AppInfoScreen.js +248 -465
- package/lib/module/ui/screens/AppInfoScreen.js.map +1 -1
- package/lib/module/ui/screens/FeedbackScreen.js +3 -3
- package/lib/module/ui/screens/FeedbackScreen.js.map +1 -1
- package/lib/module/ui/screens/PaymentGatewayScreen.js +809 -651
- package/lib/module/ui/screens/PaymentGatewayScreen.js.map +1 -1
- package/lib/module/ui/screens/ProfileScreen.js +214 -37
- package/lib/module/ui/screens/ProfileScreen.js.map +1 -1
- package/lib/module/ui/screens/RecoverAccountScreen.js +53 -74
- package/lib/module/ui/screens/RecoverAccountScreen.js.map +1 -1
- package/lib/module/ui/screens/SessionManagementScreen.js +11 -29
- package/lib/module/ui/screens/SessionManagementScreen.js.map +1 -1
- package/lib/module/ui/screens/SignInScreen.js +32 -305
- package/lib/module/ui/screens/SignInScreen.js.map +1 -1
- package/lib/module/ui/screens/SignUpScreen.js +5 -5
- package/lib/module/ui/screens/SignUpScreen.js.map +1 -1
- package/lib/module/ui/screens/UserLinksScreen.js +85 -0
- package/lib/module/ui/screens/UserLinksScreen.js.map +1 -0
- package/lib/module/ui/screens/internal/SignInPasswordStep.js +19 -31
- package/lib/module/ui/screens/internal/SignInPasswordStep.js.map +1 -1
- package/lib/module/ui/screens/internal/SignInUsernameStep.js +7 -10
- package/lib/module/ui/screens/internal/SignInUsernameStep.js.map +1 -1
- package/lib/module/ui/screens/internal/SignUpIdentityStep.js +11 -5
- package/lib/module/ui/screens/internal/SignUpIdentityStep.js.map +1 -1
- package/lib/module/ui/screens/internal/SignUpSecurityStep.js +11 -4
- package/lib/module/ui/screens/internal/SignUpSecurityStep.js.map +1 -1
- package/lib/module/ui/screens/karma/KarmaAboutScreen.js +9 -6
- package/lib/module/ui/screens/karma/KarmaAboutScreen.js.map +1 -1
- package/lib/module/ui/screens/karma/KarmaCenterScreen.js +3 -30
- package/lib/module/ui/screens/karma/KarmaCenterScreen.js.map +1 -1
- package/lib/module/ui/screens/karma/KarmaFAQScreen.js +37 -46
- package/lib/module/ui/screens/karma/KarmaFAQScreen.js.map +1 -1
- package/lib/module/ui/screens/karma/KarmaLeaderboardScreen.js +9 -12
- package/lib/module/ui/screens/karma/KarmaLeaderboardScreen.js.map +1 -1
- package/lib/module/ui/screens/karma/KarmaRewardsScreen.js +9 -12
- package/lib/module/ui/screens/karma/KarmaRewardsScreen.js.map +1 -1
- package/lib/module/ui/screens/karma/KarmaRulesScreen.js +9 -12
- package/lib/module/ui/screens/karma/KarmaRulesScreen.js.map +1 -1
- package/lib/module/ui/stores/authStore.js +36 -6
- package/lib/module/ui/stores/authStore.js.map +1 -1
- package/lib/module/ui/stores/followStore.js +106 -1
- package/lib/module/ui/stores/followStore.js.map +1 -1
- package/lib/module/ui/styles/authStyles.js +332 -0
- package/lib/module/ui/styles/authStyles.js.map +1 -0
- package/lib/module/ui/styles/index.js +1 -0
- package/lib/module/ui/styles/index.js.map +1 -1
- package/lib/typescript/core/index.d.ts +68 -24
- package/lib/typescript/core/index.d.ts.map +1 -1
- package/lib/typescript/index.d.ts +13 -3
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/ui/components/Avatar.d.ts.map +1 -1
- package/lib/typescript/ui/components/FollowButton.d.ts +1 -0
- package/lib/typescript/ui/components/FollowButton.d.ts.map +1 -1
- package/lib/typescript/ui/components/GroupedItem.d.ts +6 -0
- package/lib/typescript/ui/components/GroupedItem.d.ts.map +1 -1
- package/lib/typescript/ui/components/GroupedSection.d.ts +6 -0
- package/lib/typescript/ui/components/GroupedSection.d.ts.map +1 -1
- package/lib/typescript/ui/components/Header.d.ts +24 -0
- package/lib/typescript/ui/components/Header.d.ts.map +1 -0
- package/lib/typescript/ui/components/OxyProvider.d.ts.map +1 -1
- package/lib/typescript/ui/components/index.d.ts +1 -0
- package/lib/typescript/ui/components/index.d.ts.map +1 -1
- package/lib/typescript/ui/components/internal/TextField.d.ts +31 -16
- package/lib/typescript/ui/components/internal/TextField.d.ts.map +1 -1
- package/lib/typescript/ui/context/OxyContext.d.ts +5 -2
- package/lib/typescript/ui/context/OxyContext.d.ts.map +1 -1
- package/lib/typescript/ui/hooks/index.d.ts +1 -1
- package/lib/typescript/ui/hooks/index.d.ts.map +1 -1
- package/lib/typescript/ui/hooks/useFollow.d.ts +20 -0
- package/lib/typescript/ui/hooks/useFollow.d.ts.map +1 -1
- package/lib/typescript/ui/hooks/useSessionSocket.d.ts.map +1 -1
- package/lib/typescript/ui/navigation/OxyRouter.d.ts.map +1 -1
- package/lib/typescript/ui/navigation/types.d.ts +9 -2
- package/lib/typescript/ui/navigation/types.d.ts.map +1 -1
- package/lib/typescript/ui/screens/AccountOverviewScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/AccountSettingsScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/AccountSwitcherScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/AppInfoScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/PaymentGatewayScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/ProfileScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/RecoverAccountScreen.d.ts +5 -1
- package/lib/typescript/ui/screens/RecoverAccountScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/SessionManagementScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/SignInScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/UserLinksScreen.d.ts +15 -0
- package/lib/typescript/ui/screens/UserLinksScreen.d.ts.map +1 -0
- package/lib/typescript/ui/screens/internal/SignInPasswordStep.d.ts +1 -1
- package/lib/typescript/ui/screens/internal/SignInPasswordStep.d.ts.map +1 -1
- package/lib/typescript/ui/screens/internal/SignInUsernameStep.d.ts +0 -1
- package/lib/typescript/ui/screens/internal/SignInUsernameStep.d.ts.map +1 -1
- package/lib/typescript/ui/screens/internal/SignUpIdentityStep.d.ts.map +1 -1
- package/lib/typescript/ui/screens/internal/SignUpSecurityStep.d.ts.map +1 -1
- package/lib/typescript/ui/screens/karma/KarmaAboutScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/karma/KarmaCenterScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/karma/KarmaFAQScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/karma/KarmaLeaderboardScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/karma/KarmaRewardsScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/karma/KarmaRulesScreen.d.ts.map +1 -1
- package/lib/typescript/ui/stores/authStore.d.ts +3 -1
- package/lib/typescript/ui/stores/authStore.d.ts.map +1 -1
- package/lib/typescript/ui/stores/followStore.d.ts +10 -0
- package/lib/typescript/ui/stores/followStore.d.ts.map +1 -1
- package/lib/typescript/ui/styles/authStyles.d.ts +326 -0
- package/lib/typescript/ui/styles/authStyles.d.ts.map +1 -0
- package/lib/typescript/ui/styles/index.d.ts +1 -0
- package/lib/typescript/ui/styles/index.d.ts.map +1 -1
- package/package.json +1 -4
- package/src/core/index.ts +195 -41
- package/src/index.ts +64 -4
- package/src/ui/components/Avatar.tsx +11 -5
- package/src/ui/components/FollowButton.tsx +95 -11
- package/src/ui/components/GroupedItem.tsx +57 -9
- package/src/ui/components/GroupedSection.tsx +12 -0
- package/src/ui/components/Header.tsx +405 -0
- package/src/ui/components/OxyProvider.tsx +37 -15
- package/src/ui/components/index.ts +1 -0
- package/src/ui/components/internal/GroupedPillButtons.tsx +1 -1
- package/src/ui/components/internal/TextField.md +436 -0
- package/src/ui/components/internal/TextField.tsx +720 -620
- package/src/ui/context/OxyContext.tsx +211 -195
- package/src/ui/hooks/index.ts +1 -1
- package/src/ui/hooks/useFollow.ts +63 -0
- package/src/ui/hooks/useSessionSocket.ts +5 -2
- package/src/ui/navigation/OxyRouter.tsx +11 -1
- package/src/ui/navigation/types.ts +10 -2
- package/src/ui/screens/AccountCenterScreen.tsx +5 -5
- package/src/ui/screens/AccountManagementDemo.tsx +9 -9
- package/src/ui/screens/AccountOverviewScreen.tsx +265 -414
- package/src/ui/screens/AccountSettingsScreen.tsx +1173 -403
- package/src/ui/screens/AccountSwitcherScreen.tsx +158 -202
- package/src/ui/screens/AppInfoScreen.tsx +270 -497
- package/src/ui/screens/FeedbackScreen.tsx +3 -3
- package/src/ui/screens/PaymentGatewayScreen.tsx +668 -365
- package/src/ui/screens/ProfileScreen.tsx +196 -33
- package/src/ui/screens/RecoverAccountScreen.tsx +46 -74
- package/src/ui/screens/SessionManagementScreen.tsx +14 -22
- package/src/ui/screens/SignInScreen.tsx +27 -294
- package/src/ui/screens/SignUpScreen.tsx +5 -5
- package/src/ui/screens/UserLinksScreen.tsx +96 -0
- package/src/ui/screens/internal/SignInPasswordStep.tsx +11 -22
- package/src/ui/screens/internal/SignInUsernameStep.tsx +3 -10
- package/src/ui/screens/internal/SignUpIdentityStep.tsx +2 -5
- package/src/ui/screens/internal/SignUpSecurityStep.tsx +3 -4
- package/src/ui/screens/karma/KarmaAboutScreen.tsx +9 -2
- package/src/ui/screens/karma/KarmaCenterScreen.tsx +1 -20
- package/src/ui/screens/karma/KarmaFAQScreen.tsx +40 -24
- package/src/ui/screens/karma/KarmaLeaderboardScreen.tsx +9 -3
- package/src/ui/screens/karma/KarmaRewardsScreen.tsx +9 -3
- package/src/ui/screens/karma/KarmaRulesScreen.tsx +9 -3
- package/src/ui/stores/authStore.ts +34 -7
- package/src/ui/stores/followStore.ts +102 -1
- package/src/ui/styles/authStyles.ts +352 -0
- package/src/ui/styles/index.ts +1 -0
- package/lib/commonjs/core/auth-manager.js +0 -440
- package/lib/commonjs/core/auth-manager.js.map +0 -1
- package/lib/commonjs/core/use-auth.js +0 -244
- package/lib/commonjs/core/use-auth.js.map +0 -1
- package/lib/module/core/auth-manager.js +0 -432
- package/lib/module/core/auth-manager.js.map +0 -1
- package/lib/module/core/use-auth.js +0 -235
- package/lib/module/core/use-auth.js.map +0 -1
- package/lib/typescript/core/auth-manager.d.ts +0 -136
- package/lib/typescript/core/auth-manager.d.ts.map +0 -1
- package/lib/typescript/core/use-auth.d.ts +0 -79
- package/lib/typescript/core/use-auth.d.ts.map +0 -1
- package/src/__tests__/middleware.test.ts +0 -105
- package/src/__tests__/setup.ts +0 -10
- package/src/__tests__/zero-config-auth.test.ts +0 -607
- package/src/core/auth-manager.ts +0 -500
- package/src/core/use-auth.tsx +0 -245
|
@@ -6,12 +6,18 @@ interface GroupedSectionItem {
|
|
|
6
6
|
id: string;
|
|
7
7
|
icon?: string;
|
|
8
8
|
iconColor?: string;
|
|
9
|
+
image?: string;
|
|
10
|
+
imageSize?: number;
|
|
9
11
|
title: string;
|
|
10
12
|
subtitle?: string;
|
|
11
13
|
onPress?: () => void;
|
|
12
14
|
showChevron?: boolean;
|
|
13
15
|
disabled?: boolean;
|
|
16
|
+
selected?: boolean;
|
|
14
17
|
customContent?: React.ReactNode;
|
|
18
|
+
customIcon?: React.ReactNode;
|
|
19
|
+
multiRow?: boolean;
|
|
20
|
+
customContentBelow?: React.ReactNode;
|
|
15
21
|
}
|
|
16
22
|
|
|
17
23
|
interface GroupedSectionProps {
|
|
@@ -27,6 +33,8 @@ const GroupedSection: React.FC<GroupedSectionProps> = ({ items, theme }) => {
|
|
|
27
33
|
key={item.id}
|
|
28
34
|
icon={item.icon}
|
|
29
35
|
iconColor={item.iconColor}
|
|
36
|
+
image={item.image}
|
|
37
|
+
imageSize={item.imageSize}
|
|
30
38
|
title={item.title}
|
|
31
39
|
subtitle={item.subtitle}
|
|
32
40
|
theme={theme}
|
|
@@ -35,7 +43,11 @@ const GroupedSection: React.FC<GroupedSectionProps> = ({ items, theme }) => {
|
|
|
35
43
|
isLast={index === items.length - 1}
|
|
36
44
|
showChevron={item.showChevron}
|
|
37
45
|
disabled={item.disabled}
|
|
46
|
+
selected={item.selected}
|
|
38
47
|
customContent={item.customContent}
|
|
48
|
+
customIcon={item.customIcon}
|
|
49
|
+
multiRow={item.multiRow}
|
|
50
|
+
customContentBelow={item.customContentBelow}
|
|
39
51
|
/>
|
|
40
52
|
))}
|
|
41
53
|
</View>
|
|
@@ -0,0 +1,405 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import {
|
|
3
|
+
View,
|
|
4
|
+
Text,
|
|
5
|
+
TouchableOpacity,
|
|
6
|
+
StyleSheet,
|
|
7
|
+
Platform,
|
|
8
|
+
Animated,
|
|
9
|
+
} from 'react-native';
|
|
10
|
+
import { Ionicons } from '@expo/vector-icons';
|
|
11
|
+
import OxyIcon from './icon/OxyIcon';
|
|
12
|
+
import { fontFamilies } from '../styles/fonts';
|
|
13
|
+
|
|
14
|
+
export interface HeaderProps {
|
|
15
|
+
title: string;
|
|
16
|
+
subtitle?: string;
|
|
17
|
+
onBack?: () => void;
|
|
18
|
+
onClose?: () => void;
|
|
19
|
+
rightAction?: {
|
|
20
|
+
icon?: string;
|
|
21
|
+
onPress: () => void;
|
|
22
|
+
loading?: boolean;
|
|
23
|
+
disabled?: boolean;
|
|
24
|
+
text?: string;
|
|
25
|
+
};
|
|
26
|
+
theme: 'light' | 'dark';
|
|
27
|
+
showBackButton?: boolean;
|
|
28
|
+
showCloseButton?: boolean;
|
|
29
|
+
variant?: 'default' | 'large' | 'minimal' | 'gradient';
|
|
30
|
+
elevation?: 'none' | 'subtle' | 'prominent';
|
|
31
|
+
subtitleVariant?: 'default' | 'small' | 'large' | 'muted';
|
|
32
|
+
titleAlignment?: 'left' | 'center' | 'right';
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
const Header: React.FC<HeaderProps> = ({
|
|
36
|
+
title,
|
|
37
|
+
subtitle,
|
|
38
|
+
onBack,
|
|
39
|
+
onClose,
|
|
40
|
+
rightAction,
|
|
41
|
+
theme,
|
|
42
|
+
showBackButton = true,
|
|
43
|
+
showCloseButton = false,
|
|
44
|
+
variant = 'default',
|
|
45
|
+
elevation = 'subtle',
|
|
46
|
+
subtitleVariant = 'default',
|
|
47
|
+
titleAlignment = 'left',
|
|
48
|
+
}) => {
|
|
49
|
+
const isDarkTheme = theme === 'dark';
|
|
50
|
+
|
|
51
|
+
// Modern color palette
|
|
52
|
+
const colors = {
|
|
53
|
+
background: isDarkTheme ? '#1C1C1E' : '#FFFFFF',
|
|
54
|
+
surface: isDarkTheme ? '#2C2C2E' : '#F8F9FA',
|
|
55
|
+
primary: '#007AFF',
|
|
56
|
+
secondary: isDarkTheme ? '#8E8E93' : '#6C757D',
|
|
57
|
+
text: {
|
|
58
|
+
primary: isDarkTheme ? '#FFFFFF' : '#1A1A1A',
|
|
59
|
+
secondary: isDarkTheme ? '#8E8E93' : '#6C757D',
|
|
60
|
+
tertiary: isDarkTheme ? '#636366' : '#ADB5BD',
|
|
61
|
+
},
|
|
62
|
+
border: isDarkTheme ? '#38383A' : '#E9ECEF',
|
|
63
|
+
accent: '#5856D6',
|
|
64
|
+
success: '#34C759',
|
|
65
|
+
warning: '#FF9500',
|
|
66
|
+
error: '#FF3B30',
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
const renderBackButton = () => {
|
|
70
|
+
if (!showBackButton || !onBack) return null;
|
|
71
|
+
|
|
72
|
+
return (
|
|
73
|
+
<TouchableOpacity
|
|
74
|
+
style={[
|
|
75
|
+
styles.backButton,
|
|
76
|
+
{ backgroundColor: colors.surface }
|
|
77
|
+
]}
|
|
78
|
+
onPress={onBack}
|
|
79
|
+
activeOpacity={0.7}
|
|
80
|
+
>
|
|
81
|
+
<OxyIcon name="chevron-back" size={18} color={colors.primary} />
|
|
82
|
+
</TouchableOpacity>
|
|
83
|
+
);
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
const renderCloseButton = () => {
|
|
87
|
+
if (!showCloseButton || !onClose) return null;
|
|
88
|
+
|
|
89
|
+
return (
|
|
90
|
+
<TouchableOpacity
|
|
91
|
+
style={[
|
|
92
|
+
styles.closeButton,
|
|
93
|
+
{ backgroundColor: colors.surface }
|
|
94
|
+
]}
|
|
95
|
+
onPress={onClose}
|
|
96
|
+
activeOpacity={0.7}
|
|
97
|
+
>
|
|
98
|
+
<Ionicons name="close" size={18} color={colors.text.primary} />
|
|
99
|
+
</TouchableOpacity>
|
|
100
|
+
);
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
const renderRightAction = () => {
|
|
104
|
+
if (!rightAction) return null;
|
|
105
|
+
|
|
106
|
+
const isTextAction = rightAction.text;
|
|
107
|
+
|
|
108
|
+
return (
|
|
109
|
+
<TouchableOpacity
|
|
110
|
+
style={[
|
|
111
|
+
styles.rightActionButton,
|
|
112
|
+
isTextAction ? styles.textActionButton : styles.iconActionButton,
|
|
113
|
+
{
|
|
114
|
+
backgroundColor: isTextAction ? colors.primary : colors.surface,
|
|
115
|
+
opacity: rightAction.disabled ? 0.5 : 1
|
|
116
|
+
}
|
|
117
|
+
]}
|
|
118
|
+
onPress={rightAction.onPress}
|
|
119
|
+
disabled={rightAction.disabled || rightAction.loading}
|
|
120
|
+
activeOpacity={0.7}
|
|
121
|
+
>
|
|
122
|
+
{rightAction.loading ? (
|
|
123
|
+
<View style={styles.loadingContainer}>
|
|
124
|
+
<View style={[styles.loadingDot, { backgroundColor: isTextAction ? '#FFFFFF' : colors.primary }]} />
|
|
125
|
+
<View style={[styles.loadingDot, { backgroundColor: isTextAction ? '#FFFFFF' : colors.primary }]} />
|
|
126
|
+
<View style={[styles.loadingDot, { backgroundColor: isTextAction ? '#FFFFFF' : colors.primary }]} />
|
|
127
|
+
</View>
|
|
128
|
+
) : isTextAction ? (
|
|
129
|
+
<Text style={[styles.actionText, { color: '#FFFFFF' }]}>
|
|
130
|
+
{rightAction.text}
|
|
131
|
+
</Text>
|
|
132
|
+
) : (
|
|
133
|
+
<Ionicons name={rightAction.icon as any} size={18} color={colors.primary} />
|
|
134
|
+
)}
|
|
135
|
+
</TouchableOpacity>
|
|
136
|
+
);
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
const renderTitle = () => {
|
|
140
|
+
const titleStyle = variant === 'large' ? styles.titleLarge :
|
|
141
|
+
variant === 'minimal' ? styles.titleMinimal :
|
|
142
|
+
styles.titleDefault;
|
|
143
|
+
|
|
144
|
+
const subtitleStyle = variant === 'large' ? styles.subtitleLarge :
|
|
145
|
+
variant === 'minimal' ? styles.subtitleMinimal :
|
|
146
|
+
subtitleVariant === 'small' ? styles.subtitleSmall :
|
|
147
|
+
subtitleVariant === 'large' ? styles.subtitleLarge :
|
|
148
|
+
subtitleVariant === 'muted' ? styles.subtitleMuted :
|
|
149
|
+
styles.subtitleDefault;
|
|
150
|
+
|
|
151
|
+
const getTitleAlignment = () => {
|
|
152
|
+
switch (titleAlignment) {
|
|
153
|
+
case 'center':
|
|
154
|
+
return styles.titleContainerCenter;
|
|
155
|
+
case 'right':
|
|
156
|
+
return styles.titleContainerRight;
|
|
157
|
+
default:
|
|
158
|
+
return styles.titleContainerLeft;
|
|
159
|
+
}
|
|
160
|
+
};
|
|
161
|
+
|
|
162
|
+
return (
|
|
163
|
+
<View style={[
|
|
164
|
+
styles.titleContainer,
|
|
165
|
+
getTitleAlignment(),
|
|
166
|
+
variant === 'minimal' && styles.titleContainerMinimal
|
|
167
|
+
]}>
|
|
168
|
+
<Text style={[titleStyle, { color: colors.text.primary }]}>
|
|
169
|
+
{title}
|
|
170
|
+
</Text>
|
|
171
|
+
{subtitle && (
|
|
172
|
+
<Text style={[subtitleStyle, { color: colors.text.secondary }]}>
|
|
173
|
+
{subtitle}
|
|
174
|
+
</Text>
|
|
175
|
+
)}
|
|
176
|
+
</View>
|
|
177
|
+
);
|
|
178
|
+
};
|
|
179
|
+
|
|
180
|
+
const getElevationStyle = () => {
|
|
181
|
+
switch (elevation) {
|
|
182
|
+
case 'none':
|
|
183
|
+
return {};
|
|
184
|
+
case 'subtle':
|
|
185
|
+
return Platform.select({
|
|
186
|
+
web: {
|
|
187
|
+
boxShadow: isDarkTheme
|
|
188
|
+
? '0 1px 3px rgba(0,0,0,0.3)'
|
|
189
|
+
: '0 1px 3px rgba(0,0,0,0.1)',
|
|
190
|
+
},
|
|
191
|
+
default: {
|
|
192
|
+
shadowColor: '#000000',
|
|
193
|
+
shadowOffset: { width: 0, height: 1 },
|
|
194
|
+
shadowOpacity: isDarkTheme ? 0.3 : 0.1,
|
|
195
|
+
shadowRadius: 3,
|
|
196
|
+
elevation: 2,
|
|
197
|
+
},
|
|
198
|
+
});
|
|
199
|
+
case 'prominent':
|
|
200
|
+
return Platform.select({
|
|
201
|
+
web: {
|
|
202
|
+
boxShadow: isDarkTheme
|
|
203
|
+
? '0 4px 12px rgba(0,0,0,0.4)'
|
|
204
|
+
: '0 4px 12px rgba(0,0,0,0.15)',
|
|
205
|
+
},
|
|
206
|
+
default: {
|
|
207
|
+
shadowColor: '#000000',
|
|
208
|
+
shadowOffset: { width: 0, height: 4 },
|
|
209
|
+
shadowOpacity: isDarkTheme ? 0.4 : 0.15,
|
|
210
|
+
shadowRadius: 12,
|
|
211
|
+
elevation: 8,
|
|
212
|
+
},
|
|
213
|
+
});
|
|
214
|
+
default:
|
|
215
|
+
return {};
|
|
216
|
+
}
|
|
217
|
+
};
|
|
218
|
+
|
|
219
|
+
const getBackgroundStyle = () => {
|
|
220
|
+
if (variant === 'gradient') {
|
|
221
|
+
return {
|
|
222
|
+
backgroundColor: isDarkTheme ? '#1C1C1E' : '#FFFFFF',
|
|
223
|
+
// Add gradient overlay effect
|
|
224
|
+
borderBottomWidth: 1,
|
|
225
|
+
borderBottomColor: colors.border,
|
|
226
|
+
};
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
return {
|
|
230
|
+
backgroundColor: colors.background,
|
|
231
|
+
borderBottomWidth: elevation === 'none' ? 0 : 1,
|
|
232
|
+
borderBottomColor: colors.border,
|
|
233
|
+
};
|
|
234
|
+
};
|
|
235
|
+
|
|
236
|
+
return (
|
|
237
|
+
<View style={[
|
|
238
|
+
styles.container,
|
|
239
|
+
getBackgroundStyle(),
|
|
240
|
+
getElevationStyle(),
|
|
241
|
+
]}>
|
|
242
|
+
<View style={[
|
|
243
|
+
styles.content,
|
|
244
|
+
variant === 'minimal' && styles.contentMinimal
|
|
245
|
+
]}>
|
|
246
|
+
{renderBackButton()}
|
|
247
|
+
{renderTitle()}
|
|
248
|
+
{renderRightAction()}
|
|
249
|
+
{renderCloseButton()}
|
|
250
|
+
</View>
|
|
251
|
+
</View>
|
|
252
|
+
);
|
|
253
|
+
};
|
|
254
|
+
|
|
255
|
+
const styles = StyleSheet.create({
|
|
256
|
+
container: {
|
|
257
|
+
paddingTop: Platform.OS === 'ios' ? 50 : 16,
|
|
258
|
+
paddingBottom: 12,
|
|
259
|
+
position: 'absolute',
|
|
260
|
+
top: 0,
|
|
261
|
+
left: 0,
|
|
262
|
+
right: 0,
|
|
263
|
+
zIndex: 1000,
|
|
264
|
+
...Platform.select({
|
|
265
|
+
web: {
|
|
266
|
+
position: 'sticky' as any,
|
|
267
|
+
},
|
|
268
|
+
default: {},
|
|
269
|
+
}),
|
|
270
|
+
},
|
|
271
|
+
content: {
|
|
272
|
+
flexDirection: 'row',
|
|
273
|
+
alignItems: 'center',
|
|
274
|
+
paddingHorizontal: 16,
|
|
275
|
+
position: 'relative',
|
|
276
|
+
minHeight: 40,
|
|
277
|
+
},
|
|
278
|
+
contentMinimal: {
|
|
279
|
+
paddingHorizontal: 12,
|
|
280
|
+
minHeight: 36,
|
|
281
|
+
},
|
|
282
|
+
backButton: {
|
|
283
|
+
width: 32,
|
|
284
|
+
height: 32,
|
|
285
|
+
borderRadius: 16,
|
|
286
|
+
alignItems: 'center',
|
|
287
|
+
justifyContent: 'center',
|
|
288
|
+
marginRight: 10,
|
|
289
|
+
},
|
|
290
|
+
closeButton: {
|
|
291
|
+
width: 32,
|
|
292
|
+
height: 32,
|
|
293
|
+
borderRadius: 16,
|
|
294
|
+
alignItems: 'center',
|
|
295
|
+
justifyContent: 'center',
|
|
296
|
+
marginLeft: 10,
|
|
297
|
+
},
|
|
298
|
+
titleContainer: {
|
|
299
|
+
flex: 1,
|
|
300
|
+
alignItems: 'flex-start',
|
|
301
|
+
justifyContent: 'center',
|
|
302
|
+
},
|
|
303
|
+
titleContainerLeft: {
|
|
304
|
+
alignItems: 'flex-start',
|
|
305
|
+
},
|
|
306
|
+
titleContainerCenter: {
|
|
307
|
+
alignItems: 'center',
|
|
308
|
+
},
|
|
309
|
+
titleContainerRight: {
|
|
310
|
+
alignItems: 'flex-end',
|
|
311
|
+
},
|
|
312
|
+
titleContainerMinimal: {
|
|
313
|
+
alignItems: 'center',
|
|
314
|
+
marginHorizontal: 16,
|
|
315
|
+
},
|
|
316
|
+
titleDefault: {
|
|
317
|
+
fontSize: 18,
|
|
318
|
+
fontWeight: '700',
|
|
319
|
+
fontFamily: fontFamilies.phuduBold,
|
|
320
|
+
letterSpacing: -0.5,
|
|
321
|
+
lineHeight: 22,
|
|
322
|
+
},
|
|
323
|
+
titleLarge: {
|
|
324
|
+
fontSize: 28,
|
|
325
|
+
fontWeight: '800',
|
|
326
|
+
fontFamily: fontFamilies.phuduExtraBold,
|
|
327
|
+
letterSpacing: -1,
|
|
328
|
+
lineHeight: 34,
|
|
329
|
+
marginBottom: 3,
|
|
330
|
+
},
|
|
331
|
+
titleMinimal: {
|
|
332
|
+
fontSize: 16,
|
|
333
|
+
fontWeight: '600',
|
|
334
|
+
fontFamily: fontFamilies.phuduSemiBold,
|
|
335
|
+
letterSpacing: -0.3,
|
|
336
|
+
lineHeight: 20,
|
|
337
|
+
},
|
|
338
|
+
subtitleDefault: {
|
|
339
|
+
fontSize: 14,
|
|
340
|
+
fontWeight: '400',
|
|
341
|
+
lineHeight: 17,
|
|
342
|
+
marginTop: 1,
|
|
343
|
+
},
|
|
344
|
+
subtitleLarge: {
|
|
345
|
+
fontSize: 16,
|
|
346
|
+
fontWeight: '400',
|
|
347
|
+
lineHeight: 19,
|
|
348
|
+
marginTop: 3,
|
|
349
|
+
},
|
|
350
|
+
subtitleMinimal: {
|
|
351
|
+
fontSize: 13,
|
|
352
|
+
fontWeight: '400',
|
|
353
|
+
lineHeight: 15,
|
|
354
|
+
marginTop: 1,
|
|
355
|
+
},
|
|
356
|
+
subtitleSmall: {
|
|
357
|
+
fontSize: 12,
|
|
358
|
+
fontWeight: '400',
|
|
359
|
+
lineHeight: 14,
|
|
360
|
+
marginTop: 0,
|
|
361
|
+
},
|
|
362
|
+
subtitleMuted: {
|
|
363
|
+
fontSize: 14,
|
|
364
|
+
fontWeight: '400',
|
|
365
|
+
lineHeight: 17,
|
|
366
|
+
marginTop: 1,
|
|
367
|
+
opacity: 0.7,
|
|
368
|
+
},
|
|
369
|
+
rightActionButton: {
|
|
370
|
+
alignItems: 'center',
|
|
371
|
+
justifyContent: 'center',
|
|
372
|
+
marginLeft: 10,
|
|
373
|
+
},
|
|
374
|
+
iconActionButton: {
|
|
375
|
+
width: 32,
|
|
376
|
+
height: 32,
|
|
377
|
+
borderRadius: 16,
|
|
378
|
+
},
|
|
379
|
+
textActionButton: {
|
|
380
|
+
paddingHorizontal: 14,
|
|
381
|
+
paddingVertical: 6,
|
|
382
|
+
borderRadius: 18,
|
|
383
|
+
minWidth: 56,
|
|
384
|
+
},
|
|
385
|
+
actionText: {
|
|
386
|
+
fontSize: 14,
|
|
387
|
+
fontWeight: '600',
|
|
388
|
+
fontFamily: fontFamilies.phuduSemiBold,
|
|
389
|
+
letterSpacing: -0.2,
|
|
390
|
+
},
|
|
391
|
+
loadingContainer: {
|
|
392
|
+
flexDirection: 'row',
|
|
393
|
+
alignItems: 'center',
|
|
394
|
+
justifyContent: 'center',
|
|
395
|
+
gap: 2,
|
|
396
|
+
},
|
|
397
|
+
loadingDot: {
|
|
398
|
+
width: 4,
|
|
399
|
+
height: 4,
|
|
400
|
+
borderRadius: 2,
|
|
401
|
+
opacity: 0.6,
|
|
402
|
+
},
|
|
403
|
+
});
|
|
404
|
+
|
|
405
|
+
export default Header;
|
|
@@ -30,6 +30,7 @@ const OxyProvider: React.FC<OxyProviderProps> = (props) => {
|
|
|
30
30
|
onAuthStateChange,
|
|
31
31
|
storageKeyPrefix,
|
|
32
32
|
showInternalToaster = true,
|
|
33
|
+
baseURL, // Add support for baseURL
|
|
33
34
|
...bottomSheetProps
|
|
34
35
|
} = props;
|
|
35
36
|
|
|
@@ -41,6 +42,7 @@ const OxyProvider: React.FC<OxyProviderProps> = (props) => {
|
|
|
41
42
|
return (
|
|
42
43
|
<OxyContextProvider
|
|
43
44
|
oxyServices={oxyServices}
|
|
45
|
+
baseURL={baseURL}
|
|
44
46
|
storageKeyPrefix={storageKeyPrefix}
|
|
45
47
|
onAuthStateChange={onAuthStateChange}
|
|
46
48
|
>
|
|
@@ -53,6 +55,7 @@ const OxyProvider: React.FC<OxyProviderProps> = (props) => {
|
|
|
53
55
|
return (
|
|
54
56
|
<OxyContextProvider
|
|
55
57
|
oxyServices={oxyServices}
|
|
58
|
+
baseURL={baseURL}
|
|
56
59
|
storageKeyPrefix={storageKeyPrefix}
|
|
57
60
|
onAuthStateChange={onAuthStateChange}
|
|
58
61
|
bottomSheetRef={internalBottomSheetRef}
|
|
@@ -85,7 +88,7 @@ const OxyProvider: React.FC<OxyProviderProps> = (props) => {
|
|
|
85
88
|
* and reimplemented using BottomSheetModal for better Android compatibility
|
|
86
89
|
*/
|
|
87
90
|
const OxyBottomSheet: React.FC<OxyProviderProps> = ({
|
|
88
|
-
oxyServices,
|
|
91
|
+
oxyServices: providedOxyServices,
|
|
89
92
|
initialScreen = 'SignIn',
|
|
90
93
|
onClose,
|
|
91
94
|
onAuthenticated,
|
|
@@ -95,6 +98,13 @@ const OxyBottomSheet: React.FC<OxyProviderProps> = ({
|
|
|
95
98
|
autoPresent = false,
|
|
96
99
|
showInternalToaster = true,
|
|
97
100
|
}) => {
|
|
101
|
+
// Helper function to determine if native driver should be used
|
|
102
|
+
const shouldUseNativeDriver = () => {
|
|
103
|
+
return Platform.OS === 'ios';
|
|
104
|
+
};
|
|
105
|
+
// Get oxyServices from context if not provided as prop
|
|
106
|
+
const contextOxy = useOxy();
|
|
107
|
+
const oxyServices = providedOxyServices || contextOxy?.oxyServices;
|
|
98
108
|
// Use the internal ref (which is passed as a prop from OxyProvider)
|
|
99
109
|
const modalRef = useRef<BottomSheetModalRef>(null);
|
|
100
110
|
const navigationRef = useRef<((screen: string, props?: Record<string, any>) => void) | null>(null);
|
|
@@ -116,13 +126,17 @@ const OxyBottomSheet: React.FC<OxyProviderProps> = ({
|
|
|
116
126
|
};
|
|
117
127
|
}
|
|
118
128
|
});
|
|
129
|
+
|
|
119
130
|
// Add a method to navigate between screens
|
|
120
131
|
// @ts-ignore
|
|
121
132
|
bottomSheetRef.current._navigateToScreen = (screenName: string, props?: Record<string, any>) => {
|
|
133
|
+
console.log('_navigateToScreen called with:', screenName, props);
|
|
122
134
|
if (navigationRef.current) {
|
|
135
|
+
console.log('Using navigationRef.current');
|
|
123
136
|
navigationRef.current(screenName, props);
|
|
124
137
|
return;
|
|
125
138
|
}
|
|
139
|
+
console.log('navigationRef.current not available, using event system');
|
|
126
140
|
if (typeof document !== 'undefined') {
|
|
127
141
|
const event = new CustomEvent('oxy:navigate', { detail: { screen: screenName, props } });
|
|
128
142
|
document.dispatchEvent(event);
|
|
@@ -130,6 +144,8 @@ const OxyBottomSheet: React.FC<OxyProviderProps> = ({
|
|
|
130
144
|
(globalThis as any).oxyNavigateEvent = { screen: screenName, props };
|
|
131
145
|
}
|
|
132
146
|
};
|
|
147
|
+
|
|
148
|
+
console.log('Bottom sheet ref methods exposed:', Object.keys(bottomSheetRef.current));
|
|
133
149
|
}
|
|
134
150
|
}, [bottomSheetRef, modalRef]);
|
|
135
151
|
// Keyboard handling (unchanged)
|
|
@@ -168,13 +184,13 @@ const OxyBottomSheet: React.FC<OxyProviderProps> = ({
|
|
|
168
184
|
Animated.timing(fadeAnim, {
|
|
169
185
|
toValue: 1,
|
|
170
186
|
duration: 300,
|
|
171
|
-
useNativeDriver:
|
|
187
|
+
useNativeDriver: shouldUseNativeDriver(),
|
|
172
188
|
}),
|
|
173
189
|
Animated.spring(slideAnim, {
|
|
174
190
|
toValue: 0,
|
|
175
191
|
friction: 8,
|
|
176
192
|
tension: 40,
|
|
177
|
-
useNativeDriver:
|
|
193
|
+
useNativeDriver: shouldUseNativeDriver(),
|
|
178
194
|
}),
|
|
179
195
|
]).start();
|
|
180
196
|
};
|
|
@@ -186,13 +202,13 @@ const OxyBottomSheet: React.FC<OxyProviderProps> = ({
|
|
|
186
202
|
Animated.timing(fadeAnim, {
|
|
187
203
|
toValue: 1,
|
|
188
204
|
duration: 300,
|
|
189
|
-
useNativeDriver:
|
|
205
|
+
useNativeDriver: shouldUseNativeDriver(),
|
|
190
206
|
}),
|
|
191
207
|
Animated.spring(slideAnim, {
|
|
192
208
|
toValue: 0,
|
|
193
209
|
friction: 8,
|
|
194
210
|
tension: 40,
|
|
195
|
-
useNativeDriver:
|
|
211
|
+
useNativeDriver: shouldUseNativeDriver(),
|
|
196
212
|
}),
|
|
197
213
|
]).start();
|
|
198
214
|
}, 100);
|
|
@@ -204,7 +220,7 @@ const OxyBottomSheet: React.FC<OxyProviderProps> = ({
|
|
|
204
220
|
Animated.timing(fadeAnim, {
|
|
205
221
|
toValue: 0,
|
|
206
222
|
duration: Platform.OS === 'android' ? 100 : 200,
|
|
207
|
-
useNativeDriver:
|
|
223
|
+
useNativeDriver: shouldUseNativeDriver(),
|
|
208
224
|
}).start(() => {
|
|
209
225
|
modalRef.current?.dismiss();
|
|
210
226
|
if (onClose) {
|
|
@@ -304,15 +320,21 @@ const OxyBottomSheet: React.FC<OxyProviderProps> = ({
|
|
|
304
320
|
{ opacity: fadeAnim, transform: [{ translateY: slideAnim }] }
|
|
305
321
|
]}
|
|
306
322
|
>
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
323
|
+
{oxyServices ? (
|
|
324
|
+
<OxyRouter
|
|
325
|
+
oxyServices={oxyServices}
|
|
326
|
+
initialScreen={initialScreen}
|
|
327
|
+
onClose={handleClose}
|
|
328
|
+
onAuthenticated={handleAuthenticated}
|
|
329
|
+
theme={theme}
|
|
330
|
+
navigationRef={navigationRef}
|
|
331
|
+
containerWidth={800} // static, since dynamic sizing is used
|
|
332
|
+
/>
|
|
333
|
+
) : (
|
|
334
|
+
<View style={styles.errorContainer}>
|
|
335
|
+
<Text>OxyServices not available</Text>
|
|
336
|
+
</View>
|
|
337
|
+
)}
|
|
316
338
|
</Animated.View>
|
|
317
339
|
</View>
|
|
318
340
|
</BottomSheetScrollView>
|
|
@@ -5,6 +5,7 @@ export { default as SectionTitle } from './SectionTitle';
|
|
|
5
5
|
export { default as GroupedItem } from './GroupedItem';
|
|
6
6
|
export { default as GroupedSection } from './GroupedSection';
|
|
7
7
|
export { default as QuickActions } from './QuickActions';
|
|
8
|
+
export { default as Header } from './Header';
|
|
8
9
|
|
|
9
10
|
// Re-export existing components
|
|
10
11
|
export { default as Avatar } from './Avatar';
|
|
@@ -247,7 +247,7 @@ const GroupedPillButtons: React.FC<GroupedPillButtonsProps> = ({
|
|
|
247
247
|
const styles = StyleSheet.create({
|
|
248
248
|
container: {
|
|
249
249
|
flexDirection: 'row',
|
|
250
|
-
justifyContent: '
|
|
250
|
+
justifyContent: 'flex-end',
|
|
251
251
|
marginTop: 16,
|
|
252
252
|
marginBottom: 8,
|
|
253
253
|
width: '100%',
|