@vvedantb/native-ui 0.17.2 → 0.18.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/dist/AlertDialog.jsx +123 -0
- package/dist/AmbientBackground.jsx +73 -0
- package/dist/ArtifactList.jsx +59 -0
- package/dist/Avatar.jsx +285 -0
- package/dist/Badge.jsx +154 -0
- package/dist/BottomSheetContainer.jsx +208 -0
- package/dist/BulkActionBar.jsx +717 -0
- package/dist/Button.jsx +344 -0
- package/dist/CaptureButton.jsx +104 -0
- package/dist/Card.jsx +371 -0
- package/dist/Checkbox.jsx +177 -0
- package/dist/Chip.jsx +79 -0
- package/dist/ColorSwatches.jsx +159 -0
- package/dist/ConfirmDialog.jsx +157 -0
- package/dist/DateTimeField.jsx +204 -0
- package/dist/Dialog.jsx +614 -0
- package/dist/DividedList.jsx +120 -0
- package/dist/DropdownMenu.jsx +849 -0
- package/dist/EmptyState.jsx +434 -0
- package/dist/ExpoWebRoot.jsx +134 -0
- package/dist/FloatingFAB.jsx +95 -0
- package/dist/FloatingSurface.jsx +226 -0
- package/dist/FloatingTabBar.jsx +403 -0
- package/dist/HeaderIconButton.jsx +53 -0
- package/dist/IconButton.jsx +157 -0
- package/dist/Input.jsx +96 -0
- package/dist/Label.jsx +96 -0
- package/dist/LabeledSwitchRow.jsx +170 -0
- package/dist/LiquidGlass.jsx +2 -0
- package/dist/ListRow.jsx +281 -0
- package/dist/LoadingState.jsx +205 -0
- package/dist/PageIndicator.jsx +128 -0
- package/dist/PageTitle.jsx +205 -0
- package/dist/Pager.jsx +105 -0
- package/dist/PasswordInput.jsx +120 -0
- package/dist/PillTabs.jsx +300 -0
- package/dist/PinnedBotTile.jsx +212 -0
- package/dist/Progress.jsx +147 -0
- package/dist/SafeAreaContainer.jsx +38 -0
- package/dist/ScreenContainer.jsx +117 -0
- package/dist/SearchInput.jsx +150 -0
- package/dist/SectionLabel.jsx +128 -0
- package/dist/Select.jsx +223 -0
- package/dist/Separator.jsx +95 -0
- package/dist/Sheet.jsx +343 -0
- package/dist/SheetRow.jsx +198 -0
- package/dist/Skeleton.jsx +311 -0
- package/dist/Spinner.jsx +195 -0
- package/dist/StackPageHeader.jsx +160 -0
- package/dist/StatGrid.jsx +74 -0
- package/dist/StatusDot.jsx +129 -0
- package/dist/SurfaceRow.jsx +143 -0
- package/dist/SwipeableRow.jsx +50 -0
- package/dist/Switch.jsx +130 -0
- package/dist/Tabs.jsx +385 -0
- package/dist/Textarea.jsx +103 -0
- package/dist/ThemeToggle.jsx +78 -0
- package/dist/Toast.jsx +396 -0
- package/dist/ai/activity-step-detail.jsx +179 -0
- package/dist/ai/activity-step-label.js +816 -0
- package/dist/ai/activity-step-types.js +14 -0
- package/dist/ai/activity-step.jsx +98 -0
- package/dist/ai/activity-tasks-utils.js +172 -0
- package/dist/ai/activity-timeline.js +47 -0
- package/dist/ai/attachments.jsx +258 -0
- package/dist/ai/card-button.jsx +188 -0
- package/dist/ai/chain-of-thought.jsx +459 -0
- package/dist/ai/chat-jump-rail.jsx +57 -0
- package/dist/ai/chat-text.js +44 -0
- package/dist/ai/chat-thread.jsx +135 -0
- package/dist/ai/choice-question.jsx +925 -0
- package/dist/ai/code-block.jsx +574 -0
- package/dist/ai/collapsible.jsx +275 -0
- package/dist/ai/conversation.jsx +723 -0
- package/dist/ai/file-chip.jsx +198 -0
- package/dist/ai/icon-button.jsx +179 -0
- package/dist/ai/index.js +37 -0
- package/dist/ai/message-action-sheet.jsx +408 -0
- package/dist/ai/message-quote.jsx +241 -0
- package/dist/ai/message.jsx +739 -0
- package/dist/ai/prompt-input-menu.jsx +365 -0
- package/dist/ai/prompt-input.jsx +626 -0
- package/dist/ai/reasoning.jsx +446 -0
- package/dist/ai/reply-quote-chip.jsx +278 -0
- package/dist/ai/response-text.jsx +130 -0
- package/dist/ai/shimmer.jsx +149 -0
- package/dist/ai/sources.jsx +260 -0
- package/dist/ai/subagent-cards.jsx +645 -0
- package/dist/ai/suggestion.jsx +186 -0
- package/dist/ai/tool-approval-card.jsx +359 -0
- package/dist/ai/trace.jsx +728 -0
- package/dist/ai/unified-diff.jsx +280 -0
- package/dist/ai/use-streaming-disclosure.js +70 -0
- package/dist/auth/AuthProviders.jsx +27 -0
- package/dist/auth/AuthScreen.jsx +292 -0
- package/dist/auth/GoogleSignInButton.jsx +188 -0
- package/dist/auth/SecondFactorScreen.jsx +133 -0
- package/dist/auth/SignInScreen.jsx +482 -0
- package/dist/auth/authErrors.js +131 -0
- package/dist/auth/index.js +11 -0
- package/dist/auth/totp.js +378 -0
- package/dist/blur.js +36 -0
- package/dist/brand/AppIcons.jsx +118 -0
- package/dist/brand/AppMark.jsx +128 -0
- package/dist/brand/AppWordmark.jsx +138 -0
- package/dist/brand/GoogleMark.jsx +71 -0
- package/dist/brand/ProviderIcon.jsx +192 -0
- package/dist/brand/familyApps.js +33 -0
- package/dist/brand/index.js +11 -0
- package/dist/brand/svg.js +252 -0
- package/dist/brand/vProAppBenefits.js +19 -0
- package/dist/cn.js +5 -0
- package/dist/colors.js +15 -0
- package/dist/configureTheme.js +72 -0
- package/dist/controlStyles.js +520 -0
- package/dist/definiteSize.js +12 -0
- package/dist/dialogLayout.js +18 -0
- package/dist/entries/ai.js +4 -0
- package/dist/entries/ambient.js +3 -0
- package/dist/entries/auth.js +5 -0
- package/dist/entries/bottom-sheet.js +2 -0
- package/dist/entries/brand.js +2 -0
- package/dist/entries/button.js +2 -0
- package/dist/entries/date-time.js +3 -0
- package/dist/entries/expo-router.js +4 -0
- package/dist/entries/expo-web-root.js +3 -0
- package/dist/entries/floating.js +7 -0
- package/dist/entries/gesture-handler.js +4 -0
- package/dist/entries/keyboard-controller.js +4 -0
- package/dist/entries/layout.js +16 -0
- package/dist/entries/markdown.js +4 -0
- package/dist/entries/marketing.js +3 -0
- package/dist/entries/page-title.js +7 -0
- package/dist/entries/password-input.js +3 -0
- package/dist/entries/primitives.js +57 -0
- package/dist/entries/search-input.js +3 -0
- package/dist/entries/tab-bar.js +4 -0
- package/dist/entries/theme.js +7 -0
- package/dist/entries/toast.js +5 -0
- package/dist/entries/video.js +3 -0
- package/dist/entries/webview.js +4 -0
- package/dist/examples/AiChatGallery.jsx +509 -0
- package/dist/examples/ParityGallery.jsx +1307 -0
- package/dist/floating.js +62 -0
- package/dist/glassBlur.jsx +145 -0
- package/dist/gradient.js +17 -0
- package/dist/haptics.js +44 -0
- package/dist/highlight.js +382 -0
- package/dist/index.js +85 -0
- package/dist/initials.js +4 -0
- package/dist/loadingGrid.js +81 -0
- package/dist/markdown/Markdown.jsx +515 -0
- package/dist/markdown/MarkdownTable.jsx +443 -0
- package/dist/markdown/tableText.js +68 -0
- package/dist/marketing/PricingModal.jsx +608 -0
- package/dist/marketing/UpgradeToProCard.jsx +164 -0
- package/dist/marketing/pricing.js +34 -0
- package/dist/media/ImageGallery.jsx +580 -0
- package/dist/media/MediaCard.jsx +162 -0
- package/dist/media/imageGrid.js +54 -0
- package/dist/motion.js +33 -0
- package/dist/pagerSwipe.js +104 -0
- package/dist/palette.js +104 -0
- package/dist/primitives/button.jsx +127 -0
- package/dist/primitives/card.jsx +249 -0
- package/dist/primitives/icon.jsx +37 -0
- package/dist/primitives/input.jsx +56 -0
- package/dist/primitives/keyboard-controller.jsx +207 -0
- package/dist/primitives/keyboard-parts.jsx +75 -0
- package/dist/primitives/native-only-animated-view.jsx +68 -0
- package/dist/primitives/overlay.jsx +391 -0
- package/dist/primitives/pager-gesture.jsx +131 -0
- package/dist/primitives/select-host.jsx +103 -0
- package/dist/primitives/select.jsx +555 -0
- package/dist/primitives/sheet-drag.jsx +420 -0
- package/dist/primitives/sheet-gesture.jsx +219 -0
- package/dist/primitives/swipe-row-gesture.jsx +341 -0
- package/dist/primitives/switch.jsx +105 -0
- package/dist/primitives/text.jsx +145 -0
- package/dist/primitives/toast-drag-gesture.jsx +94 -0
- package/dist/primitives/use-controllable-state.js +40 -0
- package/dist/primitives/web-click-guard.js +69 -0
- package/dist/push.js +166 -0
- package/dist/relativeTime.js +70 -0
- package/dist/router/RouterStackPageHeader.jsx +53 -0
- package/dist/selectA11y.js +32 -0
- package/dist/settings/MoreFromProjectV.jsx +168 -0
- package/dist/settings/SettingsEmptyState.jsx +102 -0
- package/dist/settings/SettingsField.jsx +49 -0
- package/dist/settings/SettingsSection.jsx +101 -0
- package/dist/settings/SettingsStack.jsx +17 -0
- package/dist/settings/SettingsToggleRow.jsx +163 -0
- package/dist/settings/projectVMobileApps.js +126 -0
- package/dist/settings/relaxedSizeStyle.js +11 -0
- package/dist/sheetDrag.js +76 -0
- package/dist/svgA11y.js +46 -0
- package/dist/swipeRow.js +161 -0
- package/dist/tabBarRoutes.js +41 -0
- package/dist/tabIndicator.js +139 -0
- package/dist/tailwind-preset.cjs +255 -0
- package/dist/tailwind-preset.d.cts +55 -0
- package/dist/theme.jsx +62 -0
- package/dist/toastChrome.js +110 -0
- package/dist/toastDrag.js +51 -0
- package/dist/toastStore.js +54 -0
- package/dist/tokens.js +70 -0
- package/dist/typography.js +40 -0
- package/dist/useReduceMotion.js +32 -0
- package/dist/useReduceTransparency.js +27 -0
- package/dist/useScheme.js +15 -0
- package/dist/video/InlineVideo.jsx +115 -0
- package/dist/webview/HtmlView.jsx +169 -0
- package/dist/webview/HtmlView.web.jsx +63 -0
- package/dist/webview/htmlView.js +43 -0
- package/package.json +70 -33
- package/src/DropdownMenu.tsx +28 -16
- package/src/FloatingTabBar.tsx +78 -41
- package/src/ai/conversation.tsx +12 -8
- package/src/glassBlur.tsx +47 -22
- package/src/primitives/swipe-row-gesture.tsx +11 -2
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
import { c as _c } from "react/compiler-runtime";
|
|
2
|
+
import { useEffect, useState } from "react";
|
|
3
|
+
import { Platform } from "react-native";
|
|
4
|
+
import { useSSO } from "@clerk/clerk-expo";
|
|
5
|
+
import * as AuthSession from "expo-auth-session";
|
|
6
|
+
import * as WebBrowser from "expo-web-browser";
|
|
7
|
+
import { useRouter } from "expo-router";
|
|
8
|
+
import { GoogleMark } from "../brand/GoogleMark";
|
|
9
|
+
import { Button } from "../Button";
|
|
10
|
+
import { toast } from "../toastStore";
|
|
11
|
+
import { authErrorMessage } from "./authErrors";
|
|
12
|
+
|
|
13
|
+
// Completes the Google browser session when the app reopens on the redirect.
|
|
14
|
+
WebBrowser.maybeCompleteAuthSession();
|
|
15
|
+
export const GOOGLE_ERROR_MESSAGE = "Could not continue with Google";
|
|
16
|
+
/** Warms the Android custom tab while the screen is up, as the Expo guide suggests. */
|
|
17
|
+
export function useWarmUpBrowser() {
|
|
18
|
+
const $ = _c(1);
|
|
19
|
+
let t0;
|
|
20
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
21
|
+
t0 = [];
|
|
22
|
+
$[0] = t0;
|
|
23
|
+
} else {
|
|
24
|
+
t0 = $[0];
|
|
25
|
+
}
|
|
26
|
+
useEffect(_temp4, t0);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/** Starts the Google flow, sets the session and navigates. Returns `[start, busy]`. */
|
|
30
|
+
function _temp4() {
|
|
31
|
+
if (Platform.OS !== "android") {
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
WebBrowser.warmUpAsync().catch(_temp);
|
|
35
|
+
return _temp3;
|
|
36
|
+
}
|
|
37
|
+
function _temp3() {
|
|
38
|
+
WebBrowser.coolDownAsync().catch(_temp2);
|
|
39
|
+
}
|
|
40
|
+
function _temp2() {}
|
|
41
|
+
function _temp() {}
|
|
42
|
+
export function useGoogleSignIn({
|
|
43
|
+
scheme,
|
|
44
|
+
redirectPath = "sso-callback",
|
|
45
|
+
afterAuthHref = "/",
|
|
46
|
+
replaceOptions,
|
|
47
|
+
onSuccess,
|
|
48
|
+
onError
|
|
49
|
+
}) {
|
|
50
|
+
const {
|
|
51
|
+
startSSOFlow
|
|
52
|
+
} = useSSO();
|
|
53
|
+
const router = useRouter();
|
|
54
|
+
const [busy, setBusy] = useState(false);
|
|
55
|
+
const start = async () => {
|
|
56
|
+
if (busy) return;
|
|
57
|
+
setBusy(true);
|
|
58
|
+
try {
|
|
59
|
+
const {
|
|
60
|
+
createdSessionId,
|
|
61
|
+
setActive
|
|
62
|
+
} = await startSSOFlow({
|
|
63
|
+
strategy: "oauth_google",
|
|
64
|
+
redirectUrl: AuthSession.makeRedirectUri({
|
|
65
|
+
scheme,
|
|
66
|
+
path: redirectPath
|
|
67
|
+
})
|
|
68
|
+
});
|
|
69
|
+
// No session: the user closed the browser, or more steps are needed.
|
|
70
|
+
if (createdSessionId && setActive) {
|
|
71
|
+
await setActive({
|
|
72
|
+
session: createdSessionId
|
|
73
|
+
});
|
|
74
|
+
if (onSuccess) onSuccess();else router.replace(afterAuthHref, replaceOptions);
|
|
75
|
+
}
|
|
76
|
+
} catch (error) {
|
|
77
|
+
const message = authErrorMessage(error, GOOGLE_ERROR_MESSAGE);
|
|
78
|
+
if (onError) onError(message);else toast.error(message);
|
|
79
|
+
} finally {
|
|
80
|
+
setBusy(false);
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
return [start, busy];
|
|
84
|
+
}
|
|
85
|
+
/** An outline button with the Google mark that runs `useGoogleSignIn`. */
|
|
86
|
+
export function GoogleSignInButton(t0) {
|
|
87
|
+
const $ = _c(28);
|
|
88
|
+
let afterAuthHref;
|
|
89
|
+
let onError;
|
|
90
|
+
let onSuccess;
|
|
91
|
+
let props;
|
|
92
|
+
let redirectPath;
|
|
93
|
+
let replaceOptions;
|
|
94
|
+
let scheme;
|
|
95
|
+
let t1;
|
|
96
|
+
let t2;
|
|
97
|
+
let t3;
|
|
98
|
+
if ($[0] !== t0) {
|
|
99
|
+
({
|
|
100
|
+
scheme,
|
|
101
|
+
redirectPath,
|
|
102
|
+
afterAuthHref,
|
|
103
|
+
replaceOptions,
|
|
104
|
+
onSuccess,
|
|
105
|
+
onError,
|
|
106
|
+
label: t1,
|
|
107
|
+
testID: t2,
|
|
108
|
+
variant: t3,
|
|
109
|
+
...props
|
|
110
|
+
} = t0);
|
|
111
|
+
$[0] = t0;
|
|
112
|
+
$[1] = afterAuthHref;
|
|
113
|
+
$[2] = onError;
|
|
114
|
+
$[3] = onSuccess;
|
|
115
|
+
$[4] = props;
|
|
116
|
+
$[5] = redirectPath;
|
|
117
|
+
$[6] = replaceOptions;
|
|
118
|
+
$[7] = scheme;
|
|
119
|
+
$[8] = t1;
|
|
120
|
+
$[9] = t2;
|
|
121
|
+
$[10] = t3;
|
|
122
|
+
} else {
|
|
123
|
+
afterAuthHref = $[1];
|
|
124
|
+
onError = $[2];
|
|
125
|
+
onSuccess = $[3];
|
|
126
|
+
props = $[4];
|
|
127
|
+
redirectPath = $[5];
|
|
128
|
+
replaceOptions = $[6];
|
|
129
|
+
scheme = $[7];
|
|
130
|
+
t1 = $[8];
|
|
131
|
+
t2 = $[9];
|
|
132
|
+
t3 = $[10];
|
|
133
|
+
}
|
|
134
|
+
const label = t1 === undefined ? "Continue with Google" : t1;
|
|
135
|
+
const testID = t2 === undefined ? "google-sign-in" : t2;
|
|
136
|
+
const variant = t3 === undefined ? "outline" : t3;
|
|
137
|
+
useWarmUpBrowser();
|
|
138
|
+
let t4;
|
|
139
|
+
if ($[11] !== afterAuthHref || $[12] !== onError || $[13] !== onSuccess || $[14] !== redirectPath || $[15] !== replaceOptions || $[16] !== scheme) {
|
|
140
|
+
t4 = {
|
|
141
|
+
scheme,
|
|
142
|
+
redirectPath,
|
|
143
|
+
afterAuthHref,
|
|
144
|
+
replaceOptions,
|
|
145
|
+
onSuccess,
|
|
146
|
+
onError
|
|
147
|
+
};
|
|
148
|
+
$[11] = afterAuthHref;
|
|
149
|
+
$[12] = onError;
|
|
150
|
+
$[13] = onSuccess;
|
|
151
|
+
$[14] = redirectPath;
|
|
152
|
+
$[15] = replaceOptions;
|
|
153
|
+
$[16] = scheme;
|
|
154
|
+
$[17] = t4;
|
|
155
|
+
} else {
|
|
156
|
+
t4 = $[17];
|
|
157
|
+
}
|
|
158
|
+
const [start, busy] = useGoogleSignIn(t4);
|
|
159
|
+
let t5;
|
|
160
|
+
if ($[18] === Symbol.for("react.memo_cache_sentinel")) {
|
|
161
|
+
t5 = <GoogleMark />;
|
|
162
|
+
$[18] = t5;
|
|
163
|
+
} else {
|
|
164
|
+
t5 = $[18];
|
|
165
|
+
}
|
|
166
|
+
let t6;
|
|
167
|
+
if ($[19] !== start) {
|
|
168
|
+
t6 = () => void start();
|
|
169
|
+
$[19] = start;
|
|
170
|
+
$[20] = t6;
|
|
171
|
+
} else {
|
|
172
|
+
t6 = $[20];
|
|
173
|
+
}
|
|
174
|
+
let t7;
|
|
175
|
+
if ($[21] !== busy || $[22] !== label || $[23] !== props || $[24] !== t6 || $[25] !== testID || $[26] !== variant) {
|
|
176
|
+
t7 = <Button {...props} testID={testID} variant={variant} leftIcon={t5} loading={busy} onPress={t6}>{label}</Button>;
|
|
177
|
+
$[21] = busy;
|
|
178
|
+
$[22] = label;
|
|
179
|
+
$[23] = props;
|
|
180
|
+
$[24] = t6;
|
|
181
|
+
$[25] = testID;
|
|
182
|
+
$[26] = variant;
|
|
183
|
+
$[27] = t7;
|
|
184
|
+
} else {
|
|
185
|
+
t7 = $[27];
|
|
186
|
+
}
|
|
187
|
+
return t7;
|
|
188
|
+
}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import { c as _c } from "react/compiler-runtime";
|
|
2
|
+
// Clerk-free: a one-time code step. The caller owns the verification call and
|
|
3
|
+
// its errors (`useSecondFactor` does both for Clerk).
|
|
4
|
+
import { useState } from "react";
|
|
5
|
+
import { Button } from "../Button";
|
|
6
|
+
import { Input } from "../Input";
|
|
7
|
+
import { AuthScreen, FieldError } from "./AuthScreen";
|
|
8
|
+
/** A one-time code step: digits only, a Verify button, an inline error and a back link. */
|
|
9
|
+
export function SecondFactorScreen(t0) {
|
|
10
|
+
const $ = _c(40);
|
|
11
|
+
const {
|
|
12
|
+
title,
|
|
13
|
+
description,
|
|
14
|
+
codeLength: t1,
|
|
15
|
+
onSubmit,
|
|
16
|
+
error,
|
|
17
|
+
loading: t2,
|
|
18
|
+
onBack,
|
|
19
|
+
backLabel: t3,
|
|
20
|
+
header,
|
|
21
|
+
testIDPrefix: t4,
|
|
22
|
+
footer,
|
|
23
|
+
digitsOnly: t5,
|
|
24
|
+
placeholder
|
|
25
|
+
} = t0;
|
|
26
|
+
const codeLength = t1 === undefined ? 6 : t1;
|
|
27
|
+
const loading = t2 === undefined ? false : t2;
|
|
28
|
+
const backLabel = t3 === undefined ? "Back" : t3;
|
|
29
|
+
const testIDPrefix = t4 === undefined ? "second-factor" : t4;
|
|
30
|
+
const digitsOnly = t5 === undefined ? true : t5;
|
|
31
|
+
const [code, setCode] = useState("");
|
|
32
|
+
const ready = code.length === codeLength && !loading;
|
|
33
|
+
let t6;
|
|
34
|
+
if ($[0] !== code || $[1] !== onSubmit || $[2] !== ready) {
|
|
35
|
+
t6 = () => {
|
|
36
|
+
if (ready) {
|
|
37
|
+
onSubmit(code);
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
$[0] = code;
|
|
41
|
+
$[1] = onSubmit;
|
|
42
|
+
$[2] = ready;
|
|
43
|
+
$[3] = t6;
|
|
44
|
+
} else {
|
|
45
|
+
t6 = $[3];
|
|
46
|
+
}
|
|
47
|
+
const submit = t6;
|
|
48
|
+
const t7 = `${testIDPrefix}-screen`;
|
|
49
|
+
const t8 = `${testIDPrefix}-code`;
|
|
50
|
+
let t9;
|
|
51
|
+
if ($[4] !== codeLength || $[5] !== digitsOnly || $[6] !== placeholder) {
|
|
52
|
+
t9 = digitsOnly ? "0".repeat(codeLength) : placeholder ?? "Code";
|
|
53
|
+
$[4] = codeLength;
|
|
54
|
+
$[5] = digitsOnly;
|
|
55
|
+
$[6] = placeholder;
|
|
56
|
+
$[7] = t9;
|
|
57
|
+
} else {
|
|
58
|
+
t9 = $[7];
|
|
59
|
+
}
|
|
60
|
+
const t10 = digitsOnly ? "number-pad" : "default";
|
|
61
|
+
let t11;
|
|
62
|
+
if ($[8] !== digitsOnly) {
|
|
63
|
+
t11 = text => setCode(digitsOnly ? text.replace(/\D/g, "") : text.trim());
|
|
64
|
+
$[8] = digitsOnly;
|
|
65
|
+
$[9] = t11;
|
|
66
|
+
} else {
|
|
67
|
+
t11 = $[9];
|
|
68
|
+
}
|
|
69
|
+
let t12;
|
|
70
|
+
if ($[10] !== code || $[11] !== codeLength || $[12] !== submit || $[13] !== t10 || $[14] !== t11 || $[15] !== t8 || $[16] !== t9) {
|
|
71
|
+
t12 = <Input testID={t8} accessibilityLabel="Verification code" value={code} placeholder={t9} keyboardType={t10} autoCapitalize="none" autoCorrect={false} autoComplete="one-time-code" textContentType="oneTimeCode" maxLength={codeLength} autoFocus={true} returnKeyType="go" onChangeText={t11} onSubmitEditing={submit} />;
|
|
72
|
+
$[10] = code;
|
|
73
|
+
$[11] = codeLength;
|
|
74
|
+
$[12] = submit;
|
|
75
|
+
$[13] = t10;
|
|
76
|
+
$[14] = t11;
|
|
77
|
+
$[15] = t8;
|
|
78
|
+
$[16] = t9;
|
|
79
|
+
$[17] = t12;
|
|
80
|
+
} else {
|
|
81
|
+
t12 = $[17];
|
|
82
|
+
}
|
|
83
|
+
const t13 = `${testIDPrefix}-error`;
|
|
84
|
+
let t14;
|
|
85
|
+
if ($[18] !== error || $[19] !== t13) {
|
|
86
|
+
t14 = <FieldError testID={t13} message={error} />;
|
|
87
|
+
$[18] = error;
|
|
88
|
+
$[19] = t13;
|
|
89
|
+
$[20] = t14;
|
|
90
|
+
} else {
|
|
91
|
+
t14 = $[20];
|
|
92
|
+
}
|
|
93
|
+
const t15 = `${testIDPrefix}-verify`;
|
|
94
|
+
const t16 = !ready;
|
|
95
|
+
let t17;
|
|
96
|
+
if ($[21] !== loading || $[22] !== submit || $[23] !== t15 || $[24] !== t16) {
|
|
97
|
+
t17 = <Button testID={t15} loading={loading} disabled={t16} onPress={submit}>Verify</Button>;
|
|
98
|
+
$[21] = loading;
|
|
99
|
+
$[22] = submit;
|
|
100
|
+
$[23] = t15;
|
|
101
|
+
$[24] = t16;
|
|
102
|
+
$[25] = t17;
|
|
103
|
+
} else {
|
|
104
|
+
t17 = $[25];
|
|
105
|
+
}
|
|
106
|
+
let t18;
|
|
107
|
+
if ($[26] !== backLabel || $[27] !== onBack || $[28] !== testIDPrefix) {
|
|
108
|
+
t18 = onBack ? <Button testID={`${testIDPrefix}-back`} variant="ghost" onPress={onBack}>{backLabel}</Button> : null;
|
|
109
|
+
$[26] = backLabel;
|
|
110
|
+
$[27] = onBack;
|
|
111
|
+
$[28] = testIDPrefix;
|
|
112
|
+
$[29] = t18;
|
|
113
|
+
} else {
|
|
114
|
+
t18 = $[29];
|
|
115
|
+
}
|
|
116
|
+
let t19;
|
|
117
|
+
if ($[30] !== description || $[31] !== footer || $[32] !== header || $[33] !== t12 || $[34] !== t14 || $[35] !== t17 || $[36] !== t18 || $[37] !== t7 || $[38] !== title) {
|
|
118
|
+
t19 = <AuthScreen testID={t7} title={title} subtitle={description} header={header} footer={footer}>{t12}{t14}{t17}{t18}</AuthScreen>;
|
|
119
|
+
$[30] = description;
|
|
120
|
+
$[31] = footer;
|
|
121
|
+
$[32] = header;
|
|
122
|
+
$[33] = t12;
|
|
123
|
+
$[34] = t14;
|
|
124
|
+
$[35] = t17;
|
|
125
|
+
$[36] = t18;
|
|
126
|
+
$[37] = t7;
|
|
127
|
+
$[38] = title;
|
|
128
|
+
$[39] = t19;
|
|
129
|
+
} else {
|
|
130
|
+
t19 = $[39];
|
|
131
|
+
}
|
|
132
|
+
return t19;
|
|
133
|
+
}
|