@oxyhq/services 16.0.0 → 17.0.0
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/lib/commonjs/index.js +21 -51
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/ui/client.js +0 -14
- package/lib/commonjs/ui/client.js.map +1 -1
- package/lib/commonjs/ui/components/OxyAccountDialog.js +764 -0
- package/lib/commonjs/ui/components/OxyAccountDialog.js.map +1 -0
- package/lib/commonjs/ui/components/OxyProvider.js +11 -6
- package/lib/commonjs/ui/components/OxyProvider.js.map +1 -1
- package/lib/commonjs/ui/components/OxySignInButton.js +10 -21
- package/lib/commonjs/ui/components/OxySignInButton.js.map +1 -1
- package/lib/commonjs/ui/components/ProfileButton.js +25 -112
- package/lib/commonjs/ui/components/ProfileButton.js.map +1 -1
- package/lib/commonjs/ui/components/RequireOxyAuth.js +299 -0
- package/lib/commonjs/ui/components/RequireOxyAuth.js.map +1 -0
- package/lib/commonjs/ui/context/OxyContext.js +106 -2
- package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
- package/lib/commonjs/ui/hooks/mutations/useAccountMutations.js +1 -1
- package/lib/commonjs/ui/hooks/useAuth.js +19 -30
- package/lib/commonjs/ui/hooks/useAuth.js.map +1 -1
- package/lib/commonjs/ui/hooks/useSwitchableAccounts.js +37 -267
- package/lib/commonjs/ui/hooks/useSwitchableAccounts.js.map +1 -1
- package/lib/commonjs/ui/index.js +5 -40
- package/lib/commonjs/ui/index.js.map +1 -1
- package/lib/commonjs/ui/navigation/accountDialogManager.js +91 -0
- package/lib/commonjs/ui/navigation/accountDialogManager.js.map +1 -0
- package/lib/commonjs/ui/navigation/routes.js +0 -2
- package/lib/commonjs/ui/navigation/routes.js.map +1 -1
- package/lib/commonjs/ui/screens/ManageAccountScreen.js +4 -3
- package/lib/commonjs/ui/screens/ManageAccountScreen.js.map +1 -1
- package/lib/commonjs/ui/session/createSessionClient.js +10 -2
- package/lib/commonjs/ui/session/createSessionClient.js.map +1 -1
- package/lib/module/index.js +18 -15
- package/lib/module/index.js.map +1 -1
- package/lib/module/ui/client.js +1 -2
- package/lib/module/ui/client.js.map +1 -1
- package/lib/module/ui/components/OxyAccountDialog.js +761 -0
- package/lib/module/ui/components/OxyAccountDialog.js.map +1 -0
- package/lib/module/ui/components/OxyProvider.js +11 -6
- package/lib/module/ui/components/OxyProvider.js.map +1 -1
- package/lib/module/ui/components/OxySignInButton.js +10 -21
- package/lib/module/ui/components/OxySignInButton.js.map +1 -1
- package/lib/module/ui/components/ProfileButton.js +26 -112
- package/lib/module/ui/components/ProfileButton.js.map +1 -1
- package/lib/module/ui/components/RequireOxyAuth.js +294 -0
- package/lib/module/ui/components/RequireOxyAuth.js.map +1 -0
- package/lib/module/ui/context/OxyContext.js +107 -3
- package/lib/module/ui/context/OxyContext.js.map +1 -1
- package/lib/module/ui/hooks/mutations/useAccountMutations.js +1 -1
- package/lib/module/ui/hooks/useAuth.js +19 -30
- package/lib/module/ui/hooks/useAuth.js.map +1 -1
- package/lib/module/ui/hooks/useSwitchableAccounts.js +38 -267
- package/lib/module/ui/hooks/useSwitchableAccounts.js.map +1 -1
- package/lib/module/ui/index.js +1 -5
- package/lib/module/ui/index.js.map +1 -1
- package/lib/module/ui/navigation/accountDialogManager.js +81 -0
- package/lib/module/ui/navigation/accountDialogManager.js.map +1 -0
- package/lib/module/ui/navigation/routes.js +0 -2
- package/lib/module/ui/navigation/routes.js.map +1 -1
- package/lib/module/ui/screens/ManageAccountScreen.js +4 -3
- package/lib/module/ui/screens/ManageAccountScreen.js.map +1 -1
- package/lib/module/ui/session/createSessionClient.js +10 -2
- package/lib/module/ui/session/createSessionClient.js.map +1 -1
- package/lib/typescript/commonjs/index.d.ts +4 -11
- package/lib/typescript/commonjs/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/client.d.ts +0 -4
- package/lib/typescript/commonjs/ui/client.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/OxyAccountDialog.d.ts +35 -0
- package/lib/typescript/commonjs/ui/components/OxyAccountDialog.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/OxyProvider.d.ts +2 -2
- package/lib/typescript/commonjs/ui/components/OxyProvider.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/OxySignInButton.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/ProfileButton.d.ts +11 -23
- package/lib/typescript/commonjs/ui/components/ProfileButton.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/RequireOxyAuth.d.ts +55 -0
- package/lib/typescript/commonjs/ui/components/RequireOxyAuth.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/context/OxyContext.d.ts +13 -1
- package/lib/typescript/commonjs/ui/context/OxyContext.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/mutations/useAccountMutations.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useAuth.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useSwitchableAccounts.d.ts +13 -152
- package/lib/typescript/commonjs/ui/hooks/useSwitchableAccounts.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/index.d.ts +2 -5
- package/lib/typescript/commonjs/ui/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/navigation/accountDialogManager.d.ts +49 -0
- package/lib/typescript/commonjs/ui/navigation/accountDialogManager.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/navigation/routes.d.ts +1 -1
- package/lib/typescript/commonjs/ui/navigation/routes.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/ManageAccountScreen.d.ts +1 -1
- package/lib/typescript/commonjs/ui/screens/ManageAccountScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/session/createSessionClient.d.ts +9 -2
- package/lib/typescript/commonjs/ui/session/createSessionClient.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/types/navigation.d.ts +9 -0
- package/lib/typescript/commonjs/ui/types/navigation.d.ts.map +1 -1
- package/lib/typescript/module/index.d.ts +4 -11
- package/lib/typescript/module/index.d.ts.map +1 -1
- package/lib/typescript/module/ui/client.d.ts +0 -4
- package/lib/typescript/module/ui/client.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/OxyAccountDialog.d.ts +35 -0
- package/lib/typescript/module/ui/components/OxyAccountDialog.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/OxyProvider.d.ts +2 -2
- package/lib/typescript/module/ui/components/OxyProvider.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/OxySignInButton.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/ProfileButton.d.ts +11 -23
- package/lib/typescript/module/ui/components/ProfileButton.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/RequireOxyAuth.d.ts +55 -0
- package/lib/typescript/module/ui/components/RequireOxyAuth.d.ts.map +1 -0
- package/lib/typescript/module/ui/context/OxyContext.d.ts +13 -1
- package/lib/typescript/module/ui/context/OxyContext.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/mutations/useAccountMutations.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useAuth.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useSwitchableAccounts.d.ts +13 -152
- package/lib/typescript/module/ui/hooks/useSwitchableAccounts.d.ts.map +1 -1
- package/lib/typescript/module/ui/index.d.ts +2 -5
- package/lib/typescript/module/ui/index.d.ts.map +1 -1
- package/lib/typescript/module/ui/navigation/accountDialogManager.d.ts +49 -0
- package/lib/typescript/module/ui/navigation/accountDialogManager.d.ts.map +1 -0
- package/lib/typescript/module/ui/navigation/routes.d.ts +1 -1
- package/lib/typescript/module/ui/navigation/routes.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/ManageAccountScreen.d.ts +1 -1
- package/lib/typescript/module/ui/screens/ManageAccountScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/session/createSessionClient.d.ts +9 -2
- package/lib/typescript/module/ui/session/createSessionClient.d.ts.map +1 -1
- package/lib/typescript/module/ui/types/navigation.d.ts +9 -0
- package/lib/typescript/module/ui/types/navigation.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/index.ts +21 -26
- package/src/ui/client.ts +0 -4
- package/src/ui/components/OxyAccountDialog.tsx +760 -0
- package/src/ui/components/OxyProvider.tsx +12 -6
- package/src/ui/components/OxySignInButton.tsx +10 -21
- package/src/ui/components/ProfileButton.tsx +23 -126
- package/src/ui/components/RequireOxyAuth.tsx +266 -0
- package/src/ui/context/OxyContext.tsx +146 -7
- package/src/ui/hooks/mutations/useAccountMutations.ts +1 -1
- package/src/ui/hooks/useAuth.ts +19 -31
- package/src/ui/hooks/useSwitchableAccounts.ts +42 -376
- package/src/ui/index.ts +2 -5
- package/src/ui/navigation/accountDialogManager.ts +84 -0
- package/src/ui/navigation/routes.ts +0 -4
- package/src/ui/screens/ManageAccountScreen.tsx +3 -2
- package/src/ui/session/createSessionClient.ts +9 -1
- package/src/ui/types/navigation.ts +9 -0
- package/lib/commonjs/ui/components/AccountMenu.js +0 -598
- package/lib/commonjs/ui/components/AccountMenu.js.map +0 -1
- package/lib/commonjs/ui/components/AccountMenuButton.js +0 -135
- package/lib/commonjs/ui/components/AccountMenuButton.js.map +0 -1
- package/lib/commonjs/ui/components/AccountSwitcher.js +0 -780
- package/lib/commonjs/ui/components/AccountSwitcher.js.map +0 -1
- package/lib/commonjs/ui/components/AnotherDeviceQR.js +0 -116
- package/lib/commonjs/ui/components/AnotherDeviceQR.js.map +0 -1
- package/lib/commonjs/ui/components/ProfileMenu.js +0 -518
- package/lib/commonjs/ui/components/ProfileMenu.js.map +0 -1
- package/lib/commonjs/ui/components/SignInAccountChooser.js +0 -189
- package/lib/commonjs/ui/components/SignInAccountChooser.js.map +0 -1
- package/lib/commonjs/ui/components/SignInModal.js +0 -600
- package/lib/commonjs/ui/components/SignInModal.js.map +0 -1
- package/lib/commonjs/ui/hooks/useOxyAuthSession.js +0 -501
- package/lib/commonjs/ui/hooks/useOxyAuthSession.js.map +0 -1
- package/lib/commonjs/ui/hooks/usePasswordSignIn.js +0 -170
- package/lib/commonjs/ui/hooks/usePasswordSignIn.js.map +0 -1
- package/lib/commonjs/ui/screens/AccountSwitcherScreen.js +0 -51
- package/lib/commonjs/ui/screens/AccountSwitcherScreen.js.map +0 -1
- package/lib/commonjs/ui/screens/OxyAuthScreen.js +0 -312
- package/lib/commonjs/ui/screens/OxyAuthScreen.js.map +0 -1
- package/lib/commonjs/utils/deviceFlowSignIn.js +0 -109
- package/lib/commonjs/utils/deviceFlowSignIn.js.map +0 -1
- package/lib/module/ui/components/AccountMenu.js +0 -593
- package/lib/module/ui/components/AccountMenu.js.map +0 -1
- package/lib/module/ui/components/AccountMenuButton.js +0 -130
- package/lib/module/ui/components/AccountMenuButton.js.map +0 -1
- package/lib/module/ui/components/AccountSwitcher.js +0 -774
- package/lib/module/ui/components/AccountSwitcher.js.map +0 -1
- package/lib/module/ui/components/AnotherDeviceQR.js +0 -110
- package/lib/module/ui/components/AnotherDeviceQR.js.map +0 -1
- package/lib/module/ui/components/ProfileMenu.js +0 -514
- package/lib/module/ui/components/ProfileMenu.js.map +0 -1
- package/lib/module/ui/components/SignInAccountChooser.js +0 -183
- package/lib/module/ui/components/SignInAccountChooser.js.map +0 -1
- package/lib/module/ui/components/SignInModal.js +0 -591
- package/lib/module/ui/components/SignInModal.js.map +0 -1
- package/lib/module/ui/hooks/useOxyAuthSession.js +0 -495
- package/lib/module/ui/hooks/useOxyAuthSession.js.map +0 -1
- package/lib/module/ui/hooks/usePasswordSignIn.js +0 -165
- package/lib/module/ui/hooks/usePasswordSignIn.js.map +0 -1
- package/lib/module/ui/screens/AccountSwitcherScreen.js +0 -48
- package/lib/module/ui/screens/AccountSwitcherScreen.js.map +0 -1
- package/lib/module/ui/screens/OxyAuthScreen.js +0 -306
- package/lib/module/ui/screens/OxyAuthScreen.js.map +0 -1
- package/lib/module/utils/deviceFlowSignIn.js +0 -106
- package/lib/module/utils/deviceFlowSignIn.js.map +0 -1
- package/lib/typescript/commonjs/ui/components/AccountMenu.d.ts +0 -47
- package/lib/typescript/commonjs/ui/components/AccountMenu.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/AccountMenuButton.d.ts +0 -26
- package/lib/typescript/commonjs/ui/components/AccountMenuButton.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/AccountSwitcher.d.ts +0 -46
- package/lib/typescript/commonjs/ui/components/AccountSwitcher.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/AnotherDeviceQR.d.ts +0 -34
- package/lib/typescript/commonjs/ui/components/AnotherDeviceQR.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/ProfileMenu.d.ts +0 -49
- package/lib/typescript/commonjs/ui/components/ProfileMenu.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/SignInAccountChooser.d.ts +0 -29
- package/lib/typescript/commonjs/ui/components/SignInAccountChooser.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/SignInModal.d.ts +0 -28
- package/lib/typescript/commonjs/ui/components/SignInModal.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/hooks/useOxyAuthSession.d.ts +0 -105
- package/lib/typescript/commonjs/ui/hooks/useOxyAuthSession.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/hooks/usePasswordSignIn.d.ts +0 -31
- package/lib/typescript/commonjs/ui/hooks/usePasswordSignIn.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/screens/AccountSwitcherScreen.d.ts +0 -11
- package/lib/typescript/commonjs/ui/screens/AccountSwitcherScreen.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/screens/OxyAuthScreen.d.ts +0 -22
- package/lib/typescript/commonjs/ui/screens/OxyAuthScreen.d.ts.map +0 -1
- package/lib/typescript/commonjs/utils/deviceFlowSignIn.d.ts +0 -97
- package/lib/typescript/commonjs/utils/deviceFlowSignIn.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/AccountMenu.d.ts +0 -47
- package/lib/typescript/module/ui/components/AccountMenu.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/AccountMenuButton.d.ts +0 -26
- package/lib/typescript/module/ui/components/AccountMenuButton.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/AccountSwitcher.d.ts +0 -46
- package/lib/typescript/module/ui/components/AccountSwitcher.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/AnotherDeviceQR.d.ts +0 -34
- package/lib/typescript/module/ui/components/AnotherDeviceQR.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/ProfileMenu.d.ts +0 -49
- package/lib/typescript/module/ui/components/ProfileMenu.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/SignInAccountChooser.d.ts +0 -29
- package/lib/typescript/module/ui/components/SignInAccountChooser.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/SignInModal.d.ts +0 -28
- package/lib/typescript/module/ui/components/SignInModal.d.ts.map +0 -1
- package/lib/typescript/module/ui/hooks/useOxyAuthSession.d.ts +0 -105
- package/lib/typescript/module/ui/hooks/useOxyAuthSession.d.ts.map +0 -1
- package/lib/typescript/module/ui/hooks/usePasswordSignIn.d.ts +0 -31
- package/lib/typescript/module/ui/hooks/usePasswordSignIn.d.ts.map +0 -1
- package/lib/typescript/module/ui/screens/AccountSwitcherScreen.d.ts +0 -11
- package/lib/typescript/module/ui/screens/AccountSwitcherScreen.d.ts.map +0 -1
- package/lib/typescript/module/ui/screens/OxyAuthScreen.d.ts +0 -22
- package/lib/typescript/module/ui/screens/OxyAuthScreen.d.ts.map +0 -1
- package/lib/typescript/module/utils/deviceFlowSignIn.d.ts +0 -97
- package/lib/typescript/module/utils/deviceFlowSignIn.d.ts.map +0 -1
- package/src/ui/components/AccountMenu.tsx +0 -645
- package/src/ui/components/AccountMenuButton.tsx +0 -126
- package/src/ui/components/AccountSwitcher.tsx +0 -751
- package/src/ui/components/AnotherDeviceQR.tsx +0 -119
- package/src/ui/components/ProfileMenu.tsx +0 -564
- package/src/ui/components/SignInAccountChooser.tsx +0 -162
- package/src/ui/components/SignInModal.tsx +0 -530
- package/src/ui/hooks/useOxyAuthSession.ts +0 -635
- package/src/ui/hooks/usePasswordSignIn.ts +0 -207
- package/src/ui/screens/AccountSwitcherScreen.tsx +0 -43
- package/src/ui/screens/OxyAuthScreen.tsx +0 -324
- package/src/utils/__tests__/deviceFlowSignIn.test.ts +0 -231
- package/src/utils/deviceFlowSignIn.ts +0 -152
|
@@ -1,183 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
import { View, Text, TouchableOpacity, StyleSheet, ActivityIndicator } from 'react-native';
|
|
4
|
-
import { Ionicons } from '@expo/vector-icons';
|
|
5
|
-
import { useTheme } from '@oxyhq/bloom/theme';
|
|
6
|
-
import Avatar from "./Avatar.js";
|
|
7
|
-
import { useI18n } from "../hooks/useI18n.js";
|
|
8
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
|
-
/**
|
|
10
|
-
* Google-style account chooser (React Native). Lists every account the user can
|
|
11
|
-
* continue as — device sign-ins + linked graph accounts, from
|
|
12
|
-
* {@link SwitchableAccount} — plus a "Use another account" affordance. Rendered
|
|
13
|
-
* as the FRONT screen of the sign-in surfaces (`SignInModal` web,
|
|
14
|
-
* `OxyAuthScreen` native) whenever accounts exist; selecting a row funnels into
|
|
15
|
-
* the SAME `switchToAccount` path the account switcher uses. When no accounts
|
|
16
|
-
* exist the surfaces skip this and show the sign-in options directly.
|
|
17
|
-
*
|
|
18
|
-
* Presentational + chrome-agnostic (no modal/sheet wrapper, no data fetching) so
|
|
19
|
-
* both containers reuse it and it is unit-testable in isolation.
|
|
20
|
-
*/
|
|
21
|
-
export const SignInAccountChooser = ({
|
|
22
|
-
accounts,
|
|
23
|
-
onSelectAccount,
|
|
24
|
-
onUseAnother,
|
|
25
|
-
pendingAccountId,
|
|
26
|
-
disabled
|
|
27
|
-
}) => {
|
|
28
|
-
const {
|
|
29
|
-
colors
|
|
30
|
-
} = useTheme();
|
|
31
|
-
const {
|
|
32
|
-
t
|
|
33
|
-
} = useI18n();
|
|
34
|
-
return /*#__PURE__*/_jsxs(View, {
|
|
35
|
-
style: styles.container,
|
|
36
|
-
children: [accounts.map(account => {
|
|
37
|
-
const isPending = pendingAccountId === account.accountId;
|
|
38
|
-
const secondary = account.email;
|
|
39
|
-
return /*#__PURE__*/_jsxs(TouchableOpacity, {
|
|
40
|
-
accessibilityRole: "button",
|
|
41
|
-
accessibilityLabel: t('signin.chooser.continueAs', {
|
|
42
|
-
name: account.displayName
|
|
43
|
-
}),
|
|
44
|
-
accessibilityState: {
|
|
45
|
-
selected: account.isCurrent,
|
|
46
|
-
disabled: Boolean(disabled)
|
|
47
|
-
},
|
|
48
|
-
onPress: () => onSelectAccount(account),
|
|
49
|
-
disabled: disabled,
|
|
50
|
-
activeOpacity: 0.7,
|
|
51
|
-
style: [styles.row, {
|
|
52
|
-
borderColor: colors.border
|
|
53
|
-
}, account.isCurrent && {
|
|
54
|
-
backgroundColor: colors.primarySubtle,
|
|
55
|
-
borderColor: colors.primarySubtle
|
|
56
|
-
}, disabled && !isPending && styles.rowDisabled],
|
|
57
|
-
children: [/*#__PURE__*/_jsx(Avatar, {
|
|
58
|
-
uri: account.avatarUrl,
|
|
59
|
-
name: account.displayName,
|
|
60
|
-
size: 44
|
|
61
|
-
}), /*#__PURE__*/_jsxs(View, {
|
|
62
|
-
style: styles.info,
|
|
63
|
-
children: [/*#__PURE__*/_jsx(Text, {
|
|
64
|
-
style: [styles.name, {
|
|
65
|
-
color: colors.text
|
|
66
|
-
}],
|
|
67
|
-
numberOfLines: 1,
|
|
68
|
-
children: account.displayName
|
|
69
|
-
}), secondary ? /*#__PURE__*/_jsx(Text, {
|
|
70
|
-
style: [styles.secondary, {
|
|
71
|
-
color: colors.textSecondary
|
|
72
|
-
}],
|
|
73
|
-
numberOfLines: 1,
|
|
74
|
-
children: secondary
|
|
75
|
-
}) : null]
|
|
76
|
-
}), isPending ? /*#__PURE__*/_jsx(ActivityIndicator, {
|
|
77
|
-
size: "small",
|
|
78
|
-
color: colors.primary
|
|
79
|
-
}) : account.isCurrent ? /*#__PURE__*/_jsxs(View, {
|
|
80
|
-
style: [styles.currentPill, {
|
|
81
|
-
backgroundColor: colors.card
|
|
82
|
-
}],
|
|
83
|
-
children: [/*#__PURE__*/_jsx(Ionicons, {
|
|
84
|
-
name: "checkmark",
|
|
85
|
-
size: 14,
|
|
86
|
-
color: colors.primary
|
|
87
|
-
}), /*#__PURE__*/_jsx(Text, {
|
|
88
|
-
style: [styles.currentPillText, {
|
|
89
|
-
color: colors.primary
|
|
90
|
-
}],
|
|
91
|
-
children: t('signin.chooser.signedIn')
|
|
92
|
-
})]
|
|
93
|
-
}) : /*#__PURE__*/_jsx(Ionicons, {
|
|
94
|
-
name: "chevron-forward",
|
|
95
|
-
size: 20,
|
|
96
|
-
color: colors.textSecondary
|
|
97
|
-
})]
|
|
98
|
-
}, account.accountId);
|
|
99
|
-
}), /*#__PURE__*/_jsxs(TouchableOpacity, {
|
|
100
|
-
accessibilityRole: "button",
|
|
101
|
-
accessibilityLabel: t('signin.chooser.useAnother'),
|
|
102
|
-
onPress: onUseAnother,
|
|
103
|
-
disabled: disabled,
|
|
104
|
-
activeOpacity: 0.7,
|
|
105
|
-
style: [styles.row, {
|
|
106
|
-
borderColor: colors.border
|
|
107
|
-
}, disabled && styles.rowDisabled],
|
|
108
|
-
children: [/*#__PURE__*/_jsx(View, {
|
|
109
|
-
style: [styles.addIcon, {
|
|
110
|
-
backgroundColor: colors.backgroundSecondary
|
|
111
|
-
}],
|
|
112
|
-
children: /*#__PURE__*/_jsx(Ionicons, {
|
|
113
|
-
name: "person-add-outline",
|
|
114
|
-
size: 20,
|
|
115
|
-
color: colors.textSecondary
|
|
116
|
-
})
|
|
117
|
-
}), /*#__PURE__*/_jsx(View, {
|
|
118
|
-
style: styles.info,
|
|
119
|
-
children: /*#__PURE__*/_jsx(Text, {
|
|
120
|
-
style: [styles.name, {
|
|
121
|
-
color: colors.text
|
|
122
|
-
}],
|
|
123
|
-
children: t('signin.chooser.useAnother')
|
|
124
|
-
})
|
|
125
|
-
}), /*#__PURE__*/_jsx(Ionicons, {
|
|
126
|
-
name: "chevron-forward",
|
|
127
|
-
size: 20,
|
|
128
|
-
color: colors.textSecondary
|
|
129
|
-
})]
|
|
130
|
-
})]
|
|
131
|
-
});
|
|
132
|
-
};
|
|
133
|
-
const styles = StyleSheet.create({
|
|
134
|
-
container: {
|
|
135
|
-
width: '100%',
|
|
136
|
-
gap: 8
|
|
137
|
-
},
|
|
138
|
-
row: {
|
|
139
|
-
flexDirection: 'row',
|
|
140
|
-
alignItems: 'center',
|
|
141
|
-
gap: 12,
|
|
142
|
-
borderWidth: 1,
|
|
143
|
-
borderRadius: 14,
|
|
144
|
-
paddingHorizontal: 14,
|
|
145
|
-
paddingVertical: 12
|
|
146
|
-
},
|
|
147
|
-
rowDisabled: {
|
|
148
|
-
opacity: 0.5
|
|
149
|
-
},
|
|
150
|
-
info: {
|
|
151
|
-
flex: 1,
|
|
152
|
-
minWidth: 0
|
|
153
|
-
},
|
|
154
|
-
name: {
|
|
155
|
-
fontSize: 15,
|
|
156
|
-
fontWeight: '600'
|
|
157
|
-
},
|
|
158
|
-
secondary: {
|
|
159
|
-
fontSize: 13,
|
|
160
|
-
marginTop: 2
|
|
161
|
-
},
|
|
162
|
-
currentPill: {
|
|
163
|
-
flexDirection: 'row',
|
|
164
|
-
alignItems: 'center',
|
|
165
|
-
gap: 3,
|
|
166
|
-
paddingHorizontal: 8,
|
|
167
|
-
paddingVertical: 3,
|
|
168
|
-
borderRadius: 999
|
|
169
|
-
},
|
|
170
|
-
currentPillText: {
|
|
171
|
-
fontSize: 12,
|
|
172
|
-
fontWeight: '600'
|
|
173
|
-
},
|
|
174
|
-
addIcon: {
|
|
175
|
-
width: 44,
|
|
176
|
-
height: 44,
|
|
177
|
-
borderRadius: 22,
|
|
178
|
-
alignItems: 'center',
|
|
179
|
-
justifyContent: 'center'
|
|
180
|
-
}
|
|
181
|
-
});
|
|
182
|
-
export default SignInAccountChooser;
|
|
183
|
-
//# sourceMappingURL=SignInAccountChooser.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["View","Text","TouchableOpacity","StyleSheet","ActivityIndicator","Ionicons","useTheme","Avatar","useI18n","jsx","_jsx","jsxs","_jsxs","SignInAccountChooser","accounts","onSelectAccount","onUseAnother","pendingAccountId","disabled","colors","t","style","styles","container","children","map","account","isPending","accountId","secondary","email","accessibilityRole","accessibilityLabel","name","displayName","accessibilityState","selected","isCurrent","Boolean","onPress","activeOpacity","row","borderColor","border","backgroundColor","primarySubtle","rowDisabled","uri","avatarUrl","size","info","color","text","numberOfLines","textSecondary","primary","currentPill","card","currentPillText","addIcon","backgroundSecondary","create","width","gap","flexDirection","alignItems","borderWidth","borderRadius","paddingHorizontal","paddingVertical","opacity","flex","minWidth","fontSize","fontWeight","marginTop","height","justifyContent"],"sourceRoot":"../../../../src","sources":["ui/components/SignInAccountChooser.tsx"],"mappings":";;AACA,SAASA,IAAI,EAAEC,IAAI,EAAEC,gBAAgB,EAAEC,UAAU,EAAEC,iBAAiB,QAAQ,cAAc;AAC1F,SAASC,QAAQ,QAAQ,oBAAoB;AAC7C,SAASC,QAAQ,QAAQ,oBAAoB;AAC7C,OAAOC,MAAM,MAAM,aAAU;AAC7B,SAASC,OAAO,QAAQ,qBAAkB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAgB3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,oBAAyD,GAAGA,CAAC;EACtEC,QAAQ;EACRC,eAAe;EACfC,YAAY;EACZC,gBAAgB;EAChBC;AACJ,CAAC,KAAK;EACF,MAAM;IAAEC;EAAO,CAAC,GAAGb,QAAQ,CAAC,CAAC;EAC7B,MAAM;IAAEc;EAAE,CAAC,GAAGZ,OAAO,CAAC,CAAC;EAEvB,oBAC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