@swype-org/react-sdk 0.1.143 → 0.1.148
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/index.cjs +136 -173
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +136 -173
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2247,9 +2247,7 @@ function PoweredByFooter() {
|
|
|
2247
2247
|
fill: "currentColor"
|
|
2248
2248
|
}
|
|
2249
2249
|
) }),
|
|
2250
|
-
/* @__PURE__ */ jsx("span", { children: "Powered by
|
|
2251
|
-
/* @__PURE__ */ jsx("span", { style: dotStyle, children: "\xB7" }),
|
|
2252
|
-
/* @__PURE__ */ jsx("span", { children: "Non-custodial" })
|
|
2250
|
+
/* @__PURE__ */ jsx("span", { children: "Powered by Blink" })
|
|
2253
2251
|
] });
|
|
2254
2252
|
}
|
|
2255
2253
|
var containerStyle3 = (color) => ({
|
|
@@ -2261,7 +2259,6 @@ var containerStyle3 = (color) => ({
|
|
|
2261
2259
|
color,
|
|
2262
2260
|
padding: "12px 0 4px"
|
|
2263
2261
|
});
|
|
2264
|
-
var dotStyle = { opacity: 0.5 };
|
|
2265
2262
|
function PrimaryButton({ children, onClick, disabled, loading, icon }) {
|
|
2266
2263
|
const { tokens } = useSwypeConfig();
|
|
2267
2264
|
const isDisabled = disabled || loading;
|
|
@@ -3044,7 +3041,7 @@ function LoginScreen({
|
|
|
3044
3041
|
ScreenLayout,
|
|
3045
3042
|
{
|
|
3046
3043
|
footer: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3047
|
-
/* @__PURE__ */ jsx(PrimaryButton, { onClick: onSubmit, disabled, loading: sending, children: "
|
|
3044
|
+
/* @__PURE__ */ jsx(PrimaryButton, { onClick: onSubmit, disabled, loading: sending, children: "Next" }),
|
|
3048
3045
|
onSocialLogin && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3049
3046
|
/* @__PURE__ */ jsxs("div", { style: dividerStyle(tokens), children: [
|
|
3050
3047
|
/* @__PURE__ */ jsx("div", { style: dividerLineStyle(tokens.border) }),
|
|
@@ -3062,10 +3059,6 @@ function LoginScreen({
|
|
|
3062
3059
|
provider
|
|
3063
3060
|
)) })
|
|
3064
3061
|
] }),
|
|
3065
|
-
/* @__PURE__ */ jsxs("div", { style: walletSectionStyle, children: [
|
|
3066
|
-
/* @__PURE__ */ jsx("span", { style: walletLabelStyle(tokens.textMuted), children: "Works with" }),
|
|
3067
|
-
/* @__PURE__ */ jsx("div", { style: walletLogosStyle, children: walletIcons.map(({ key, logo }) => /* @__PURE__ */ jsx("img", { src: logo, alt: key, style: walletLogoImgStyle }, key)) })
|
|
3068
|
-
] }),
|
|
3069
3062
|
/* @__PURE__ */ jsx(PoweredByFooter, {})
|
|
3070
3063
|
] }),
|
|
3071
3064
|
children: [
|
|
@@ -3078,8 +3071,7 @@ function LoginScreen({
|
|
|
3078
3071
|
),
|
|
3079
3072
|
/* @__PURE__ */ jsxs("div", { style: contentStyle2, children: [
|
|
3080
3073
|
/* @__PURE__ */ jsx("div", { style: iconBoxStyle(tokens.accent), children: /* @__PURE__ */ jsx("span", { style: iconLetterStyle, children: "S" }) }),
|
|
3081
|
-
/* @__PURE__ */ jsx("h2", { style: headingStyle(tokens.text), children: "
|
|
3082
|
-
/* @__PURE__ */ jsx("p", { style: subtitleStyle(tokens.textSecondary), children: "Protected by Face ID." }),
|
|
3074
|
+
/* @__PURE__ */ jsx("h2", { style: headingStyle(tokens.text), children: "Your Money. Any App. One Tap." }),
|
|
3083
3075
|
error && /* @__PURE__ */ jsx("div", { style: errorStyle(tokens), children: error }),
|
|
3084
3076
|
/* @__PURE__ */ jsx(
|
|
3085
3077
|
"input",
|
|
@@ -3102,11 +3094,6 @@ function LoginScreen({
|
|
|
3102
3094
|
}
|
|
3103
3095
|
);
|
|
3104
3096
|
}
|
|
3105
|
-
var walletIcons = [
|
|
3106
|
-
{ key: "metamask", logo: KNOWN_LOGOS["metamask"] },
|
|
3107
|
-
{ key: "base", logo: KNOWN_LOGOS["base"] },
|
|
3108
|
-
{ key: "trust wallet", logo: KNOWN_LOGOS["trust wallet"] }
|
|
3109
|
-
];
|
|
3110
3097
|
function socialLabel(provider) {
|
|
3111
3098
|
switch (provider) {
|
|
3112
3099
|
case "google":
|
|
@@ -3149,12 +3136,6 @@ var headingStyle = (color) => ({
|
|
|
3149
3136
|
margin: "20px 0 8px",
|
|
3150
3137
|
whiteSpace: "pre-line"
|
|
3151
3138
|
});
|
|
3152
|
-
var subtitleStyle = (color) => ({
|
|
3153
|
-
fontSize: "0.84rem",
|
|
3154
|
-
color,
|
|
3155
|
-
margin: "0 0 24px",
|
|
3156
|
-
lineHeight: 1.5
|
|
3157
|
-
});
|
|
3158
3139
|
var inputStyle2 = (tokens) => ({
|
|
3159
3140
|
width: "100%",
|
|
3160
3141
|
padding: "15px 16px",
|
|
@@ -3209,27 +3190,6 @@ var socialButtonStyle = (tokens) => ({
|
|
|
3209
3190
|
fontFamily: "inherit",
|
|
3210
3191
|
cursor: "pointer"
|
|
3211
3192
|
});
|
|
3212
|
-
var walletSectionStyle = {
|
|
3213
|
-
textAlign: "center",
|
|
3214
|
-
marginBottom: 8,
|
|
3215
|
-
marginTop: 4
|
|
3216
|
-
};
|
|
3217
|
-
var walletLabelStyle = (color) => ({
|
|
3218
|
-
fontSize: "0.78rem",
|
|
3219
|
-
color,
|
|
3220
|
-
display: "block",
|
|
3221
|
-
marginBottom: 10
|
|
3222
|
-
});
|
|
3223
|
-
var walletLogosStyle = {
|
|
3224
|
-
display: "flex",
|
|
3225
|
-
justifyContent: "center",
|
|
3226
|
-
gap: 16
|
|
3227
|
-
};
|
|
3228
|
-
var walletLogoImgStyle = {
|
|
3229
|
-
width: 24,
|
|
3230
|
-
height: 24,
|
|
3231
|
-
objectFit: "contain"
|
|
3232
|
-
};
|
|
3233
3193
|
var avatarStyle = (tokens) => ({
|
|
3234
3194
|
width: 28,
|
|
3235
3195
|
height: 28,
|
|
@@ -3287,40 +3247,38 @@ function OtpVerifyScreen({
|
|
|
3287
3247
|
});
|
|
3288
3248
|
}, 1e3);
|
|
3289
3249
|
}, [cooldown, onResend]);
|
|
3290
|
-
return /* @__PURE__ */ jsxs(
|
|
3291
|
-
|
|
3292
|
-
|
|
3293
|
-
|
|
3294
|
-
"path",
|
|
3295
|
-
{
|
|
3296
|
-
d: "M12 1L3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4z",
|
|
3297
|
-
fill: tokens.accent
|
|
3298
|
-
}
|
|
3299
|
-
) }) }),
|
|
3300
|
-
/* @__PURE__ */ jsx("h2", { style: headingStyle2(tokens.text), children: "Check your email" }),
|
|
3301
|
-
/* @__PURE__ */ jsxs("p", { style: subtitleStyle2(tokens.textSecondary), children: [
|
|
3302
|
-
"We sent a 6-digit code to",
|
|
3303
|
-
"\n",
|
|
3304
|
-
/* @__PURE__ */ jsx("strong", { children: maskedIdentifier })
|
|
3305
|
-
] }),
|
|
3306
|
-
error && /* @__PURE__ */ jsx("div", { style: errorBannerStyle(tokens), children: error }),
|
|
3307
|
-
/* @__PURE__ */ jsx(OtpInput, { value: otpCode, onChange: onOtpChange, disabled: verifying }),
|
|
3308
|
-
/* @__PURE__ */ jsx(
|
|
3309
|
-
"button",
|
|
3310
|
-
{
|
|
3311
|
-
type: "button",
|
|
3312
|
-
onClick: handleResend,
|
|
3313
|
-
disabled: cooldown > 0,
|
|
3314
|
-
style: resendStyle(tokens.textMuted, cooldown > 0),
|
|
3315
|
-
children: cooldown > 0 ? `Resend code in ${cooldown}s` : "Resend code"
|
|
3316
|
-
}
|
|
3317
|
-
),
|
|
3318
|
-
/* @__PURE__ */ jsxs("div", { style: actionStyle, children: [
|
|
3250
|
+
return /* @__PURE__ */ jsxs(
|
|
3251
|
+
ScreenLayout,
|
|
3252
|
+
{
|
|
3253
|
+
footer: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3319
3254
|
/* @__PURE__ */ jsx(PrimaryButton, { onClick: onVerify, disabled, loading: verifying, children: "Verify" }),
|
|
3320
|
-
/* @__PURE__ */ jsx(
|
|
3321
|
-
] })
|
|
3322
|
-
|
|
3323
|
-
|
|
3255
|
+
/* @__PURE__ */ jsx(PoweredByFooter, {})
|
|
3256
|
+
] }),
|
|
3257
|
+
children: [
|
|
3258
|
+
/* @__PURE__ */ jsx(ScreenHeader, { onBack }),
|
|
3259
|
+
/* @__PURE__ */ jsxs("div", { style: contentStyle3, children: [
|
|
3260
|
+
/* @__PURE__ */ jsx("h2", { style: headingStyle2(tokens.text), children: "Confirm it is you" }),
|
|
3261
|
+
/* @__PURE__ */ jsxs("p", { style: subtitleStyle(tokens.textSecondary), children: [
|
|
3262
|
+
"We sent a 6-digit code to",
|
|
3263
|
+
"\n",
|
|
3264
|
+
/* @__PURE__ */ jsx("strong", { children: maskedIdentifier })
|
|
3265
|
+
] }),
|
|
3266
|
+
error && /* @__PURE__ */ jsx("div", { style: errorBannerStyle(tokens), children: error }),
|
|
3267
|
+
/* @__PURE__ */ jsx(OtpInput, { value: otpCode, onChange: onOtpChange, disabled: verifying }),
|
|
3268
|
+
/* @__PURE__ */ jsx(
|
|
3269
|
+
"button",
|
|
3270
|
+
{
|
|
3271
|
+
type: "button",
|
|
3272
|
+
onClick: handleResend,
|
|
3273
|
+
disabled: cooldown > 0,
|
|
3274
|
+
style: resendStyle(tokens.textMuted, cooldown > 0),
|
|
3275
|
+
children: cooldown > 0 ? `Resend code in ${cooldown}s` : "Resend code"
|
|
3276
|
+
}
|
|
3277
|
+
)
|
|
3278
|
+
] })
|
|
3279
|
+
]
|
|
3280
|
+
}
|
|
3281
|
+
);
|
|
3324
3282
|
}
|
|
3325
3283
|
var contentStyle3 = {
|
|
3326
3284
|
textAlign: "center",
|
|
@@ -3336,7 +3294,7 @@ var headingStyle2 = (color) => ({
|
|
|
3336
3294
|
color,
|
|
3337
3295
|
margin: "20px 0 8px"
|
|
3338
3296
|
});
|
|
3339
|
-
var
|
|
3297
|
+
var subtitleStyle = (color) => ({
|
|
3340
3298
|
fontSize: "0.88rem",
|
|
3341
3299
|
color,
|
|
3342
3300
|
margin: "0 0 28px",
|
|
@@ -3366,16 +3324,6 @@ var resendStyle = (color, disabled) => ({
|
|
|
3366
3324
|
padding: 0,
|
|
3367
3325
|
opacity: disabled ? 0.6 : 1
|
|
3368
3326
|
});
|
|
3369
|
-
var actionStyle = {
|
|
3370
|
-
width: "100%",
|
|
3371
|
-
marginTop: 32
|
|
3372
|
-
};
|
|
3373
|
-
var hintStyle = (color) => ({
|
|
3374
|
-
textAlign: "center",
|
|
3375
|
-
fontSize: "0.78rem",
|
|
3376
|
-
color,
|
|
3377
|
-
margin: "12px 0 0"
|
|
3378
|
-
});
|
|
3379
3327
|
function PasskeyScreen({
|
|
3380
3328
|
onCreatePasskey,
|
|
3381
3329
|
onBack,
|
|
@@ -3386,7 +3334,7 @@ function PasskeyScreen({
|
|
|
3386
3334
|
}) {
|
|
3387
3335
|
const { tokens } = useSwypeConfig();
|
|
3388
3336
|
const handleCreate = popupFallback && onCreatePasskeyViaPopup ? onCreatePasskeyViaPopup : onCreatePasskey;
|
|
3389
|
-
const buttonLabel = popupFallback ? "Open passkey window" : "
|
|
3337
|
+
const buttonLabel = popupFallback ? "Open passkey window" : "Verify PassKey";
|
|
3390
3338
|
return /* @__PURE__ */ jsxs(
|
|
3391
3339
|
ScreenLayout,
|
|
3392
3340
|
{
|
|
@@ -3397,16 +3345,8 @@ function PasskeyScreen({
|
|
|
3397
3345
|
children: [
|
|
3398
3346
|
/* @__PURE__ */ jsx(ScreenHeader, { onBack }),
|
|
3399
3347
|
/* @__PURE__ */ jsxs("div", { style: contentStyle4, children: [
|
|
3400
|
-
/* @__PURE__ */ jsx(
|
|
3401
|
-
|
|
3402
|
-
/* @__PURE__ */ jsx("circle", { cx: "9", cy: "10", r: "1", fill: tokens.accent }),
|
|
3403
|
-
/* @__PURE__ */ jsx("circle", { cx: "15", cy: "10", r: "1", fill: tokens.accent }),
|
|
3404
|
-
/* @__PURE__ */ jsx("path", { d: "M9 14c0 1.5 1.34 2.5 3 2.5s3-1 3-2.5", stroke: tokens.accent, strokeWidth: "1.2", strokeLinecap: "round" })
|
|
3405
|
-
] }) }),
|
|
3406
|
-
/* @__PURE__ */ jsx("h2", { style: headingStyle3(tokens.text), children: "Create or verify your passkey" }),
|
|
3407
|
-
/* @__PURE__ */ jsx("p", { style: subtitleStyle3(tokens.textSecondary), children: popupFallback ? "Your browser requires a separate window to continue. Tap the button below to continue." : "Use Face ID to sign in instantly \u2014 no passwords, no codes." }),
|
|
3408
|
-
error && /* @__PURE__ */ jsx("div", { style: errorBannerStyle2(tokens), children: error }),
|
|
3409
|
-
/* @__PURE__ */ jsx(InfoBanner, { children: "Your passkey is stored securely on your device. Swype never sees your biometric data." })
|
|
3348
|
+
/* @__PURE__ */ jsx("h2", { style: headingStyle3(tokens.text), children: "Secure your account with a passkey" }),
|
|
3349
|
+
error && /* @__PURE__ */ jsx("div", { style: errorBannerStyle2(tokens), children: error })
|
|
3410
3350
|
] })
|
|
3411
3351
|
]
|
|
3412
3352
|
}
|
|
@@ -3427,13 +3367,6 @@ var headingStyle3 = (color) => ({
|
|
|
3427
3367
|
color,
|
|
3428
3368
|
margin: "24px 0 8px"
|
|
3429
3369
|
});
|
|
3430
|
-
var subtitleStyle3 = (color) => ({
|
|
3431
|
-
fontSize: "0.9rem",
|
|
3432
|
-
color,
|
|
3433
|
-
margin: "0 0 28px",
|
|
3434
|
-
lineHeight: 1.5,
|
|
3435
|
-
maxWidth: 280
|
|
3436
|
-
});
|
|
3437
3370
|
var errorBannerStyle2 = (tokens) => ({
|
|
3438
3371
|
background: tokens.errorBg,
|
|
3439
3372
|
border: `1px solid ${tokens.error}66`,
|
|
@@ -3502,6 +3435,8 @@ function WalletPickerScreen({
|
|
|
3502
3435
|
}) {
|
|
3503
3436
|
const { tokens } = useSwypeConfig();
|
|
3504
3437
|
const [hoveredId, setHoveredId] = useState(null);
|
|
3438
|
+
const [selectedProviderId, setSelectedProviderId] = useState(null);
|
|
3439
|
+
const [cryptoExpanded, setCryptoExpanded] = useState(false);
|
|
3505
3440
|
const hasPending = pendingConnections != null && pendingConnections.length > 0;
|
|
3506
3441
|
const displayProviders = providers.length > 0 ? providers : [
|
|
3507
3442
|
{ id: "metamask", name: "MetaMask" },
|
|
@@ -3509,6 +3444,7 @@ function WalletPickerScreen({
|
|
|
3509
3444
|
{ id: "ora", name: "Ora" },
|
|
3510
3445
|
{ id: "phantom", name: "Phantom" }
|
|
3511
3446
|
];
|
|
3447
|
+
const selectedProvider = displayProviders.find((p) => p.id === selectedProviderId);
|
|
3512
3448
|
if (loading) {
|
|
3513
3449
|
return /* @__PURE__ */ jsxs(ScreenLayout, { children: [
|
|
3514
3450
|
/* @__PURE__ */ jsx(ScreenHeader, { title: "Set up Swype", onBack }),
|
|
@@ -3519,14 +3455,18 @@ function WalletPickerScreen({
|
|
|
3519
3455
|
ScreenLayout,
|
|
3520
3456
|
{
|
|
3521
3457
|
footer: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3522
|
-
/* @__PURE__ */
|
|
3458
|
+
selectedProvider && /* @__PURE__ */ jsxs(PrimaryButton, { onClick: () => onSelectProvider(selectedProvider.id), children: [
|
|
3459
|
+
"Open ",
|
|
3460
|
+
selectedProvider.name,
|
|
3461
|
+
" to Link"
|
|
3462
|
+
] }),
|
|
3523
3463
|
/* @__PURE__ */ jsx(PoweredByFooter, {})
|
|
3524
3464
|
] }),
|
|
3525
3465
|
children: [
|
|
3526
3466
|
/* @__PURE__ */ jsx(ScreenHeader, { title: "Set up Swype", onBack }),
|
|
3527
3467
|
hasPending && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3528
3468
|
/* @__PURE__ */ jsx("h2", { style: headingStyle4(tokens.text), children: "Continue where you left off" }),
|
|
3529
|
-
/* @__PURE__ */ jsx("p", { style:
|
|
3469
|
+
/* @__PURE__ */ jsx("p", { style: subtitleStyle2(tokens.textSecondary), children: "You have a wallet that still needs setup" }),
|
|
3530
3470
|
/* @__PURE__ */ jsx("div", { style: pendingListStyle, children: pendingConnections.map((acct) => {
|
|
3531
3471
|
const wallet = acct.wallets[0];
|
|
3532
3472
|
const address = wallet ? truncateAddress(wallet.name) : void 0;
|
|
@@ -3565,21 +3505,41 @@ function WalletPickerScreen({
|
|
|
3565
3505
|
}) }),
|
|
3566
3506
|
/* @__PURE__ */ jsx("div", { style: dividerStyle2(tokens.border), children: /* @__PURE__ */ jsx("span", { style: dividerTextStyle(tokens.textMuted), children: "Or connect a new wallet" }) })
|
|
3567
3507
|
] }),
|
|
3568
|
-
!hasPending && /* @__PURE__ */
|
|
3569
|
-
|
|
3570
|
-
|
|
3571
|
-
|
|
3572
|
-
|
|
3508
|
+
!hasPending && /* @__PURE__ */ jsx("h2", { style: headingStyle4(tokens.text), children: "Where is your money?" }),
|
|
3509
|
+
/* @__PURE__ */ jsxs(
|
|
3510
|
+
"button",
|
|
3511
|
+
{
|
|
3512
|
+
type: "button",
|
|
3513
|
+
onClick: () => setCryptoExpanded((v) => !v),
|
|
3514
|
+
style: categoryRowStyle(tokens, cryptoExpanded),
|
|
3515
|
+
children: [
|
|
3516
|
+
/* @__PURE__ */ jsx("span", { style: categoryLabelStyle, children: "Crypto Wallet" }),
|
|
3517
|
+
/* @__PURE__ */ jsx(
|
|
3518
|
+
"svg",
|
|
3519
|
+
{
|
|
3520
|
+
width: "18",
|
|
3521
|
+
height: "18",
|
|
3522
|
+
viewBox: "0 0 24 24",
|
|
3523
|
+
fill: "none",
|
|
3524
|
+
style: { transform: cryptoExpanded ? "rotate(180deg)" : "none", transition: "transform 0.2s ease" },
|
|
3525
|
+
children: /* @__PURE__ */ jsx("path", { d: "M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z", fill: "currentColor" })
|
|
3526
|
+
}
|
|
3527
|
+
)
|
|
3528
|
+
]
|
|
3529
|
+
}
|
|
3530
|
+
),
|
|
3531
|
+
cryptoExpanded && /* @__PURE__ */ jsx("div", { style: gridStyle, children: displayProviders.map((p) => {
|
|
3573
3532
|
const logoSrc = "logoURI" in p && p.logoURI || KNOWN_LOGOS[p.name.toLowerCase()];
|
|
3574
3533
|
const emoji = WALLET_EMOJIS[p.name.toLowerCase()] ?? p.name.charAt(0);
|
|
3534
|
+
const isSelected = selectedProviderId === p.id;
|
|
3575
3535
|
const isHovered = hoveredId === p.id;
|
|
3576
3536
|
return /* @__PURE__ */ jsxs(
|
|
3577
3537
|
"button",
|
|
3578
3538
|
{
|
|
3579
|
-
onClick: () =>
|
|
3539
|
+
onClick: () => setSelectedProviderId(p.id),
|
|
3580
3540
|
onMouseEnter: () => setHoveredId(p.id),
|
|
3581
3541
|
onMouseLeave: () => setHoveredId(null),
|
|
3582
|
-
style: cardStyle(tokens, isHovered),
|
|
3542
|
+
style: cardStyle(tokens, isHovered, isSelected),
|
|
3583
3543
|
children: [
|
|
3584
3544
|
logoSrc ? /* @__PURE__ */ jsx(
|
|
3585
3545
|
"img",
|
|
@@ -3594,7 +3554,11 @@ function WalletPickerScreen({
|
|
|
3594
3554
|
},
|
|
3595
3555
|
p.id
|
|
3596
3556
|
);
|
|
3597
|
-
}) })
|
|
3557
|
+
}) }),
|
|
3558
|
+
/* @__PURE__ */ jsxs("div", { style: categoryRowStyle(tokens, false, true), children: [
|
|
3559
|
+
/* @__PURE__ */ jsx("span", { style: categoryLabelStyle, children: "Bank Account" }),
|
|
3560
|
+
/* @__PURE__ */ jsx("span", { style: comingSoonBadgeStyle(tokens), children: "Coming Soon" })
|
|
3561
|
+
] })
|
|
3598
3562
|
]
|
|
3599
3563
|
}
|
|
3600
3564
|
);
|
|
@@ -3606,7 +3570,7 @@ var headingStyle4 = (color) => ({
|
|
|
3606
3570
|
color,
|
|
3607
3571
|
margin: "8px 0 4px"
|
|
3608
3572
|
});
|
|
3609
|
-
var
|
|
3573
|
+
var subtitleStyle2 = (color) => ({
|
|
3610
3574
|
fontSize: "0.88rem",
|
|
3611
3575
|
color,
|
|
3612
3576
|
margin: "0 0 24px"
|
|
@@ -3614,9 +3578,11 @@ var subtitleStyle4 = (color) => ({
|
|
|
3614
3578
|
var gridStyle = {
|
|
3615
3579
|
display: "grid",
|
|
3616
3580
|
gridTemplateColumns: "1fr 1fr",
|
|
3617
|
-
gap: 12
|
|
3581
|
+
gap: 12,
|
|
3582
|
+
marginBottom: 12
|
|
3618
3583
|
};
|
|
3619
|
-
var
|
|
3584
|
+
var SELECTED_GREEN = "#22c55e";
|
|
3585
|
+
var cardStyle = (tokens, hovered, selected) => ({
|
|
3620
3586
|
display: "flex",
|
|
3621
3587
|
flexDirection: "column",
|
|
3622
3588
|
alignItems: "center",
|
|
@@ -3624,11 +3590,12 @@ var cardStyle = (tokens, hovered) => ({
|
|
|
3624
3590
|
gap: 8,
|
|
3625
3591
|
padding: "20px 12px",
|
|
3626
3592
|
background: hovered ? tokens.bgHover : tokens.bgInput,
|
|
3627
|
-
border: `1.5px solid ${tokens.border}`,
|
|
3593
|
+
border: selected ? `2px solid ${SELECTED_GREEN}` : `1.5px solid ${tokens.border}`,
|
|
3594
|
+
boxShadow: selected ? `0 0 0 2px ${SELECTED_GREEN}44` : "none",
|
|
3628
3595
|
borderRadius: 16,
|
|
3629
3596
|
cursor: "pointer",
|
|
3630
3597
|
fontFamily: "inherit",
|
|
3631
|
-
transition: "background 0.15s ease",
|
|
3598
|
+
transition: "background 0.15s ease, border 0.15s ease, box-shadow 0.15s ease",
|
|
3632
3599
|
outline: "none"
|
|
3633
3600
|
});
|
|
3634
3601
|
var emojiStyle = {
|
|
@@ -3646,11 +3613,36 @@ var nameStyle2 = (color) => ({
|
|
|
3646
3613
|
fontWeight: 600,
|
|
3647
3614
|
color
|
|
3648
3615
|
});
|
|
3649
|
-
var
|
|
3650
|
-
|
|
3651
|
-
|
|
3652
|
-
|
|
3653
|
-
|
|
3616
|
+
var categoryRowStyle = (tokens, expanded, disabled) => ({
|
|
3617
|
+
display: "flex",
|
|
3618
|
+
alignItems: "center",
|
|
3619
|
+
justifyContent: "space-between",
|
|
3620
|
+
width: "100%",
|
|
3621
|
+
padding: "16px 18px",
|
|
3622
|
+
background: tokens.bgInput,
|
|
3623
|
+
border: `1.5px solid ${tokens.border}`,
|
|
3624
|
+
borderRadius: 14,
|
|
3625
|
+
cursor: disabled ? "default" : "pointer",
|
|
3626
|
+
fontFamily: "inherit",
|
|
3627
|
+
fontSize: "0.95rem",
|
|
3628
|
+
fontWeight: 600,
|
|
3629
|
+
color: disabled ? tokens.textMuted : tokens.text,
|
|
3630
|
+
opacity: disabled ? 0.6 : 1,
|
|
3631
|
+
outline: "none",
|
|
3632
|
+
marginBottom: expanded ? 12 : 12,
|
|
3633
|
+
boxSizing: "border-box"
|
|
3634
|
+
});
|
|
3635
|
+
var categoryLabelStyle = {
|
|
3636
|
+
lineHeight: 1
|
|
3637
|
+
};
|
|
3638
|
+
var comingSoonBadgeStyle = (tokens) => ({
|
|
3639
|
+
fontSize: "0.72rem",
|
|
3640
|
+
fontWeight: 600,
|
|
3641
|
+
color: tokens.textMuted,
|
|
3642
|
+
background: `${tokens.border}88`,
|
|
3643
|
+
padding: "3px 10px",
|
|
3644
|
+
borderRadius: 6,
|
|
3645
|
+
whiteSpace: "nowrap"
|
|
3654
3646
|
});
|
|
3655
3647
|
var pendingListStyle = {
|
|
3656
3648
|
display: "flex",
|
|
@@ -3775,15 +3767,14 @@ function SetupScreen({
|
|
|
3775
3767
|
onClick: () => onSetupOneTap(limit),
|
|
3776
3768
|
disabled: loading,
|
|
3777
3769
|
loading,
|
|
3778
|
-
children: "
|
|
3770
|
+
children: "Approve"
|
|
3779
3771
|
}
|
|
3780
3772
|
),
|
|
3781
3773
|
/* @__PURE__ */ jsx(PoweredByFooter, {})
|
|
3782
3774
|
] }),
|
|
3783
3775
|
children: [
|
|
3784
3776
|
/* @__PURE__ */ jsx(ScreenHeader, { title: "Swype Setup", onBack, right: /* @__PURE__ */ jsx(SettingsMenu, { onLogout }) }),
|
|
3785
|
-
/* @__PURE__ */ jsx("h2", { style: headingStyle5(tokens.text), children: "Set
|
|
3786
|
-
/* @__PURE__ */ jsx("p", { style: subtitleStyle5(tokens.textSecondary), children: "Set your limit for instant deposits. Like a contactless card \u2014 you choose the max." }),
|
|
3777
|
+
/* @__PURE__ */ jsx("h2", { style: headingStyle5(tokens.text), children: "Set Spending Limit" }),
|
|
3787
3778
|
error && /* @__PURE__ */ jsx("div", { style: errorBannerStyle3(tokens), children: error }),
|
|
3788
3779
|
/* @__PURE__ */ jsxs("div", { style: balanceRowStyle, children: [
|
|
3789
3780
|
/* @__PURE__ */ jsxs("div", { style: balanceLeftStyle, children: [
|
|
@@ -3853,14 +3844,6 @@ function SetupScreen({
|
|
|
3853
3844
|
]
|
|
3854
3845
|
}
|
|
3855
3846
|
)
|
|
3856
|
-
] }),
|
|
3857
|
-
/* @__PURE__ */ jsx("div", { style: bannerWrapStyle, children: /* @__PURE__ */ jsx(InfoBanner, { children: "Funds stay in your wallet until you deposit. Swype never holds your money." }) }),
|
|
3858
|
-
/* @__PURE__ */ jsxs("button", { type: "button", style: linkStyle(tokens.accent), children: [
|
|
3859
|
-
/* @__PURE__ */ jsxs("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", style: { marginRight: 6 }, children: [
|
|
3860
|
-
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "2" }),
|
|
3861
|
-
/* @__PURE__ */ jsx("path", { d: "M12 16v-4M12 8h.01", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" })
|
|
3862
|
-
] }),
|
|
3863
|
-
"How does this work?"
|
|
3864
3847
|
] })
|
|
3865
3848
|
]
|
|
3866
3849
|
}
|
|
@@ -3873,12 +3856,6 @@ var headingStyle5 = (color) => ({
|
|
|
3873
3856
|
color,
|
|
3874
3857
|
margin: "8px 0 4px"
|
|
3875
3858
|
});
|
|
3876
|
-
var subtitleStyle5 = (color) => ({
|
|
3877
|
-
fontSize: "0.86rem",
|
|
3878
|
-
color,
|
|
3879
|
-
margin: "0 0 24px",
|
|
3880
|
-
lineHeight: 1.5
|
|
3881
|
-
});
|
|
3882
3859
|
var errorBannerStyle3 = (tokens) => ({
|
|
3883
3860
|
background: tokens.errorBg,
|
|
3884
3861
|
border: `1px solid ${tokens.error}66`,
|
|
@@ -3982,20 +3959,6 @@ var limitInputStyle = (color) => ({
|
|
|
3982
3959
|
fontFamily: "inherit",
|
|
3983
3960
|
padding: 0
|
|
3984
3961
|
});
|
|
3985
|
-
var bannerWrapStyle = { marginBottom: 16 };
|
|
3986
|
-
var linkStyle = (color) => ({
|
|
3987
|
-
background: "transparent",
|
|
3988
|
-
border: "none",
|
|
3989
|
-
color,
|
|
3990
|
-
cursor: "pointer",
|
|
3991
|
-
fontFamily: "inherit",
|
|
3992
|
-
fontSize: "0.82rem",
|
|
3993
|
-
fontWeight: 500,
|
|
3994
|
-
display: "flex",
|
|
3995
|
-
alignItems: "center",
|
|
3996
|
-
padding: 0,
|
|
3997
|
-
marginBottom: 16
|
|
3998
|
-
});
|
|
3999
3962
|
function SetupStatusScreen({
|
|
4000
3963
|
complete,
|
|
4001
3964
|
limit,
|
|
@@ -4460,14 +4423,14 @@ function SuccessScreen({
|
|
|
4460
4423
|
amount.toFixed(2),
|
|
4461
4424
|
" deposited"
|
|
4462
4425
|
] }),
|
|
4463
|
-
merchantName && /* @__PURE__ */ jsxs("p", { style:
|
|
4426
|
+
merchantName && /* @__PURE__ */ jsxs("p", { style: subtitleStyle3(tokens.textSecondary), children: [
|
|
4464
4427
|
"to ",
|
|
4465
4428
|
merchantName
|
|
4466
4429
|
] })
|
|
4467
4430
|
] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
4468
4431
|
/* @__PURE__ */ jsx(IconCircle, { variant: "error", size: 64, children: /* @__PURE__ */ jsx("svg", { width: "32", height: "32", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ jsx("path", { d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z", fill: tokens.error }) }) }),
|
|
4469
4432
|
/* @__PURE__ */ jsx("h2", { style: headingStyle7(tokens.text), children: "Transfer failed" }),
|
|
4470
|
-
error && /* @__PURE__ */ jsx("p", { style:
|
|
4433
|
+
error && /* @__PURE__ */ jsx("p", { style: subtitleStyle3(tokens.error), children: error })
|
|
4471
4434
|
] }),
|
|
4472
4435
|
/* @__PURE__ */ jsxs("div", { style: summaryCardStyle(tokens), children: [
|
|
4473
4436
|
sourceName && /* @__PURE__ */ jsxs("div", { style: summaryRowStyle, children: [
|
|
@@ -4513,7 +4476,7 @@ var headingStyle7 = (color) => ({
|
|
|
4513
4476
|
color,
|
|
4514
4477
|
margin: "20px 0 4px"
|
|
4515
4478
|
});
|
|
4516
|
-
var
|
|
4479
|
+
var subtitleStyle3 = (color) => ({
|
|
4517
4480
|
fontSize: "0.9rem",
|
|
4518
4481
|
color,
|
|
4519
4482
|
margin: "0 0 20px"
|
|
@@ -4621,7 +4584,7 @@ function SelectSourceScreen({
|
|
|
4621
4584
|
right: /* @__PURE__ */ jsx(SettingsMenu, { onLogout })
|
|
4622
4585
|
}
|
|
4623
4586
|
),
|
|
4624
|
-
/* @__PURE__ */ jsx("p", { style:
|
|
4587
|
+
/* @__PURE__ */ jsx("p", { style: subtitleStyle4(tokens.textMuted), children: "Choose which chain and token to pay from." }),
|
|
4625
4588
|
/* @__PURE__ */ jsx("label", { style: labelStyle2(tokens.textSecondary), children: "Chain" }),
|
|
4626
4589
|
/* @__PURE__ */ jsx("div", { style: optionListStyle, children: choices.map((chain) => {
|
|
4627
4590
|
const isSelected = chain.chainName === selectedChainName;
|
|
@@ -4678,7 +4641,7 @@ function SelectSourceScreen({
|
|
|
4678
4641
|
}
|
|
4679
4642
|
);
|
|
4680
4643
|
}
|
|
4681
|
-
var
|
|
4644
|
+
var subtitleStyle4 = (color) => ({
|
|
4682
4645
|
fontSize: "0.85rem",
|
|
4683
4646
|
color,
|
|
4684
4647
|
margin: "0 0 20px",
|
|
@@ -4794,7 +4757,7 @@ function AdvancedSourceScreen({
|
|
|
4794
4757
|
}
|
|
4795
4758
|
),
|
|
4796
4759
|
/* @__PURE__ */ jsx("h2", { style: headingStyle8(tokens.text), children: "Set up One-Tap deposits" }),
|
|
4797
|
-
/* @__PURE__ */ jsx("p", { style:
|
|
4760
|
+
/* @__PURE__ */ jsx("p", { style: subtitleStyle5(tokens.textSecondary), children: "Select a token source for your One-Tap deposits." }),
|
|
4798
4761
|
/* @__PURE__ */ jsx("label", { style: labelStyle3(tokens.textSecondary), children: "Select tokens to approve" }),
|
|
4799
4762
|
/* @__PURE__ */ jsx("div", { style: chainListStyle, children: choices.map((chain) => {
|
|
4800
4763
|
const isExpanded = expandedChain === chain.chainName;
|
|
@@ -4864,7 +4827,7 @@ var headingStyle8 = (color) => ({
|
|
|
4864
4827
|
color,
|
|
4865
4828
|
margin: "8px 0 4px"
|
|
4866
4829
|
});
|
|
4867
|
-
var
|
|
4830
|
+
var subtitleStyle5 = (color) => ({
|
|
4868
4831
|
fontSize: "0.86rem",
|
|
4869
4832
|
color,
|
|
4870
4833
|
margin: "0 0 20px",
|
|
@@ -5096,14 +5059,14 @@ function OpenWalletScreen({
|
|
|
5096
5059
|
displayName
|
|
5097
5060
|
] }),
|
|
5098
5061
|
error && onRetryStatus && /* @__PURE__ */ jsx(OutlineButton, { onClick: onRetryStatus, children: "Retry status check" }),
|
|
5099
|
-
/* @__PURE__ */ jsx("p", { style:
|
|
5062
|
+
/* @__PURE__ */ jsx("p", { style: hintStyle(tokens.textMuted), children: loading ? "Preparing authorization..." : error ? "Retry the status check after returning to the browser, or reopen your wallet if needed." : "If your wallet didn't open automatically, tap the button above" })
|
|
5100
5063
|
] }),
|
|
5101
5064
|
children: [
|
|
5102
5065
|
/* @__PURE__ */ jsx(ScreenHeader, { onBack, right: /* @__PURE__ */ jsx(SettingsMenu, { onLogout }) }),
|
|
5103
5066
|
/* @__PURE__ */ jsxs("div", { style: contentStyle8, children: [
|
|
5104
5067
|
logoSrc ? /* @__PURE__ */ jsx("img", { src: logoSrc, alt: displayName, style: logoStyle }) : /* @__PURE__ */ jsx(Spinner, { size: 48 }),
|
|
5105
5068
|
/* @__PURE__ */ jsx("h2", { style: headingStyle10(tokens.text), children: loading ? "Connecting..." : `Open ${displayName}` }),
|
|
5106
|
-
/* @__PURE__ */ jsx("p", { style:
|
|
5069
|
+
/* @__PURE__ */ jsx("p", { style: subtitleStyle6(tokens.textSecondary), children: loading ? "Creating transfer and preparing your wallet link..." : `Continue in ${displayName} to authorize this connection.` }),
|
|
5107
5070
|
!loading && /* @__PURE__ */ jsxs("div", { style: waitingBadgeStyle(tokens), children: [
|
|
5108
5071
|
/* @__PURE__ */ jsx(Spinner, { size: 14 }),
|
|
5109
5072
|
/* @__PURE__ */ jsx("span", { children: "Waiting for authorization..." })
|
|
@@ -5140,7 +5103,7 @@ var headingStyle10 = (color) => ({
|
|
|
5140
5103
|
color,
|
|
5141
5104
|
margin: "20px 0 8px"
|
|
5142
5105
|
});
|
|
5143
|
-
var
|
|
5106
|
+
var subtitleStyle6 = (color) => ({
|
|
5144
5107
|
fontSize: "0.9rem",
|
|
5145
5108
|
color,
|
|
5146
5109
|
margin: "0 0 24px",
|
|
@@ -5158,7 +5121,7 @@ var waitingBadgeStyle = (tokens) => ({
|
|
|
5158
5121
|
color: tokens.textMuted,
|
|
5159
5122
|
fontSize: "0.82rem"
|
|
5160
5123
|
});
|
|
5161
|
-
var
|
|
5124
|
+
var hintStyle = (color) => ({
|
|
5162
5125
|
textAlign: "center",
|
|
5163
5126
|
fontSize: "0.82rem",
|
|
5164
5127
|
color,
|
|
@@ -5180,14 +5143,14 @@ function ConfirmSignScreen({
|
|
|
5180
5143
|
footer: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
5181
5144
|
/* @__PURE__ */ jsx(PrimaryButton, { onClick: onSign, disabled: signing, children: signing ? "Confirming..." : "Confirm payment" }),
|
|
5182
5145
|
error && /* @__PURE__ */ jsx("p", { style: errorStyle2(tokens.textMuted), children: error }),
|
|
5183
|
-
!error && /* @__PURE__ */ jsx("p", { style:
|
|
5146
|
+
!error && /* @__PURE__ */ jsx("p", { style: hintStyle2(tokens.textMuted), children: "You may be prompted for biometric verification" })
|
|
5184
5147
|
] }),
|
|
5185
5148
|
children: [
|
|
5186
5149
|
/* @__PURE__ */ jsx(ScreenHeader, { right: /* @__PURE__ */ jsx(SettingsMenu, { onLogout }) }),
|
|
5187
5150
|
/* @__PURE__ */ jsxs("div", { style: contentStyle9, children: [
|
|
5188
5151
|
logoSrc ? /* @__PURE__ */ jsx("img", { src: logoSrc, alt: displayName, style: logoStyle2 }) : /* @__PURE__ */ jsx(Spinner, { size: 48 }),
|
|
5189
5152
|
/* @__PURE__ */ jsx("h2", { style: headingStyle11(tokens.text), children: "Wallet authorized" }),
|
|
5190
|
-
/* @__PURE__ */ jsxs("p", { style:
|
|
5153
|
+
/* @__PURE__ */ jsxs("p", { style: subtitleStyle7(tokens.textSecondary), children: [
|
|
5191
5154
|
displayName,
|
|
5192
5155
|
" approved the connection. Tap below to confirm your payment."
|
|
5193
5156
|
] }),
|
|
@@ -5222,7 +5185,7 @@ var headingStyle11 = (color) => ({
|
|
|
5222
5185
|
color,
|
|
5223
5186
|
margin: "20px 0 8px"
|
|
5224
5187
|
});
|
|
5225
|
-
var
|
|
5188
|
+
var subtitleStyle7 = (color) => ({
|
|
5226
5189
|
fontSize: "0.9rem",
|
|
5227
5190
|
color,
|
|
5228
5191
|
margin: "0 0 24px",
|
|
@@ -5244,7 +5207,7 @@ var checkmarkStyle = {
|
|
|
5244
5207
|
fontWeight: 700,
|
|
5245
5208
|
fontSize: "0.9rem"
|
|
5246
5209
|
};
|
|
5247
|
-
var
|
|
5210
|
+
var hintStyle2 = (color) => ({
|
|
5248
5211
|
textAlign: "center",
|
|
5249
5212
|
fontSize: "0.82rem",
|
|
5250
5213
|
color,
|
|
@@ -5319,7 +5282,7 @@ function TokenPickerScreen({
|
|
|
5319
5282
|
] }),
|
|
5320
5283
|
children: [
|
|
5321
5284
|
/* @__PURE__ */ jsx(ScreenHeader, { title: "Select Token", onBack }),
|
|
5322
|
-
/* @__PURE__ */ jsx("p", { style:
|
|
5285
|
+
/* @__PURE__ */ jsx("p", { style: subtitleStyle8(themeTokens.textSecondary), children: "Choose a token to deposit with. Tokens that haven't been authorized yet will require a one-time wallet approval." }),
|
|
5323
5286
|
/* @__PURE__ */ jsx("div", { style: chainListStyle2, children: [...chainGroups.entries()].map(([chainName, chainEntries]) => {
|
|
5324
5287
|
const isExpanded = expandedChain === chainName;
|
|
5325
5288
|
const chainTotal = chainEntries.reduce((sum, e) => sum + e.balance, 0);
|
|
@@ -5375,7 +5338,7 @@ function TokenPickerScreen({
|
|
|
5375
5338
|
}
|
|
5376
5339
|
);
|
|
5377
5340
|
}
|
|
5378
|
-
var
|
|
5341
|
+
var subtitleStyle8 = (color) => ({
|
|
5379
5342
|
fontSize: "0.86rem",
|
|
5380
5343
|
color,
|
|
5381
5344
|
margin: "0 0 20px",
|