@coinbase/cdp-react 0.0.58 → 0.0.61
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 +10 -8
- package/dist/assets/Banner.css +1 -0
- package/dist/assets/CopyAddress.css +1 -0
- package/dist/assets/ExportWallet.css +1 -0
- package/dist/assets/ExportWalletModal.css +1 -0
- package/dist/assets/IframeButton.css +1 -0
- package/dist/assets/Input.css +1 -1
- package/dist/assets/LinkAuth.css +1 -0
- package/dist/assets/LinkAuthFlow.css +1 -0
- package/dist/assets/LinkAuthFlowBackButton.css +1 -0
- package/dist/assets/LinkAuthItem.css +1 -0
- package/dist/assets/LinkAuthItems.css +1 -0
- package/dist/assets/LinkAuthModal.css +1 -0
- package/dist/assets/LinkAuthTitle.css +1 -0
- package/dist/assets/SwitchSlideTransition.css +1 -1
- package/dist/chunks/LinkAuthFlow.CxSnHF2p.js +111 -0
- package/dist/components/CDPReactProvider/index.js +71 -55
- package/dist/components/CopyAddress/index.d.ts +8 -0
- package/dist/components/CopyAddress/index.js +61 -0
- package/dist/components/CopyEvmKeyButton/index.d.ts +13 -0
- package/dist/components/CopyEvmKeyButton/index.js +61 -0
- package/dist/components/CopySolanaKeyButton/index.d.ts +13 -0
- package/dist/components/CopySolanaKeyButton/index.js +61 -0
- package/dist/components/ExportWallet/index.d.ts +21 -0
- package/dist/components/ExportWallet/index.js +110 -0
- package/dist/components/ExportWalletModal/index.d.ts +18 -0
- package/dist/components/ExportWalletModal/index.js +96 -0
- package/dist/components/LinkAuth/LinkAuthFlow.d.ts +13 -0
- package/dist/components/LinkAuth/LinkAuthFlow.js +19 -0
- package/dist/components/LinkAuth/LinkAuthFlowBackButton.d.ts +9 -0
- package/dist/components/LinkAuth/LinkAuthFlowBackButton.js +40 -0
- package/dist/components/LinkAuth/LinkAuthFlowProvider.d.ts +33 -0
- package/dist/components/LinkAuth/LinkAuthFlowProvider.js +9 -0
- package/dist/components/LinkAuth/LinkAuthItem.d.ts +13 -0
- package/dist/components/LinkAuth/LinkAuthItem.js +48 -0
- package/dist/components/LinkAuth/LinkAuthItems.d.ts +9 -0
- package/dist/components/LinkAuth/LinkAuthItems.js +47 -0
- package/dist/components/LinkAuth/LinkAuthProvider.d.ts +12 -0
- package/dist/components/LinkAuth/LinkAuthProvider.js +108 -0
- package/dist/components/LinkAuth/LinkAuthTitle.d.ts +6 -0
- package/dist/components/LinkAuth/LinkAuthTitle.js +19 -0
- package/dist/components/LinkAuth/index.d.ts +17 -0
- package/dist/components/LinkAuth/index.js +93 -0
- package/dist/components/LinkAuth/types.d.ts +32 -0
- package/dist/components/LinkAuth/types.js +5 -0
- package/dist/components/LinkAuth/utils.d.ts +4 -0
- package/dist/components/LinkAuth/utils.js +7 -0
- package/dist/components/LinkAuthModal/index.d.ts +21 -0
- package/dist/components/LinkAuthModal/index.js +69 -0
- package/dist/components/OAuthStatusModal/index.d.ts +7 -1
- package/dist/components/OAuthStatusModal/index.js +115 -93
- package/dist/components/SignIn/SignInAuthMethodButtons.js +36 -34
- package/dist/components/SignIn/SignInForm.d.ts +2 -1
- package/dist/components/SignIn/SignInForm.js +19 -18
- package/dist/components/SignIn/SignInProvider.d.ts +2 -1
- package/dist/components/SignIn/SignInProvider.js +22 -17
- package/dist/components/SignIn/flows/SignInWithEmail.d.ts +1 -1
- package/dist/components/SignIn/flows/SignInWithEmail.js +66 -61
- package/dist/components/SignIn/flows/SignInWithSms.d.ts +1 -1
- package/dist/components/SignIn/flows/SignInWithSms.js +90 -2987
- package/dist/components/SignIn/hooks/useSignInWithOAuth.d.ts +0 -1
- package/dist/components/SignIn/hooks/useSignInWithOAuth.js +19 -20
- package/dist/components/SignIn/index.d.ts +3 -1
- package/dist/components/SignIn/index.js +16 -11
- package/dist/components/SignIn/types.d.ts +2 -0
- package/dist/components/SignIn/useSignInReducer.js +1 -0
- package/dist/components/SignInModal/index.d.ts +3 -1
- package/dist/components/SignInModal/index.js +72 -65
- package/dist/components/forms/Label/index.d.ts +2 -2
- package/dist/components/forms/PhoneNumberInput/index.js +24 -22
- package/dist/components/ui/Banner/index.d.ts +7 -0
- package/dist/components/ui/Banner/index.js +27 -0
- package/dist/components/ui/IframeButton/index.d.ts +11 -0
- package/dist/components/ui/IframeButton/index.js +50 -0
- package/dist/components/ui/Modal/index.js +22 -22
- package/dist/components/ui/SwitchTransition/index.d.ts +3 -1
- package/dist/components/ui/SwitchTransition/index.js +1 -1
- package/dist/hooks/useKeyExportPostMessage.d.ts +38 -0
- package/dist/hooks/useKeyExportPostMessage.js +83 -0
- package/dist/hooks/useTransitionMap.d.ts +50 -0
- package/dist/hooks/useTransitionMap.js +92 -0
- package/dist/icons/IconCopy.d.ts +2 -0
- package/dist/icons/IconCopy.js +10 -0
- package/dist/icons/index.d.ts +1 -0
- package/dist/icons/index.js +20 -18
- package/dist/index.d.ts +2 -2
- package/dist/index.js +122 -107
- package/dist/theme/theme.d.ts +33 -4
- package/dist/theme/tokens.d.ts +99 -12
- package/dist/theme/tokens.js +29 -12
- package/dist/types/secureIframe.d.ts +30 -0
- package/dist/types/secureIframe.js +13 -0
- package/dist/utils/childrenHasComponent.d.ts +1 -1
- package/dist/utils/formatPhoneNumber.d.ts +1 -0
- package/dist/utils/formatPhoneNumber.js +2910 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +8 -6
- package/dist/utils/sendIframeMessage.d.ts +1 -0
- package/dist/utils/sendIframeMessage.js +13 -0
- package/dist/utils/transition.d.ts +30 -0
- package/dist/utils/transition.js +43 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +8 -9
- package/dist/assets/ManageAuth.css +0 -1
- package/dist/assets/ManageAuthItem.css +0 -1
- package/dist/assets/ManageAuthModal.css +0 -1
- package/dist/components/ManageAuth/ManageAuthItem.d.ts +0 -9
- package/dist/components/ManageAuth/ManageAuthItem.js +0 -77
- package/dist/components/ManageAuth/ManageAuthProvider.d.ts +0 -8
- package/dist/components/ManageAuth/ManageAuthProvider.js +0 -64
- package/dist/components/ManageAuth/index.d.ts +0 -9
- package/dist/components/ManageAuth/index.js +0 -51
- package/dist/components/ManageAuth/types.d.ts +0 -13
- package/dist/components/ManageAuth/types.js +0 -1
- package/dist/components/ManageAuthModal/index.d.ts +0 -20
- package/dist/components/ManageAuthModal/index.js +0 -53
package/dist/theme/theme.d.ts
CHANGED
|
@@ -2,6 +2,9 @@ import { borderRadiusSemantic, borderRadiusComponents, colorsSemantic, colorsCom
|
|
|
2
2
|
import { Flattened } from './utils';
|
|
3
3
|
export declare const theme: Flattened<{
|
|
4
4
|
borderRadius: {
|
|
5
|
+
readonly banner: {
|
|
6
|
+
readonly value: "{borderRadius.lg}";
|
|
7
|
+
};
|
|
5
8
|
readonly cta: {
|
|
6
9
|
readonly value: "{borderRadius.full}";
|
|
7
10
|
};
|
|
@@ -204,6 +207,9 @@ export declare const theme: Flattened<{
|
|
|
204
207
|
readonly default: {
|
|
205
208
|
readonly value: "{colors.bg.default}";
|
|
206
209
|
};
|
|
210
|
+
readonly readonly: {
|
|
211
|
+
readonly value: "{colors.bg.alternate}";
|
|
212
|
+
};
|
|
207
213
|
};
|
|
208
214
|
readonly border: {
|
|
209
215
|
readonly default: {
|
|
@@ -233,6 +239,9 @@ export declare const theme: Flattened<{
|
|
|
233
239
|
readonly default: {
|
|
234
240
|
readonly value: "{colors.fg.default}";
|
|
235
241
|
};
|
|
242
|
+
readonly readonly: {
|
|
243
|
+
readonly value: "{colors.fg.muted}";
|
|
244
|
+
};
|
|
236
245
|
};
|
|
237
246
|
readonly errorText: {
|
|
238
247
|
readonly default: {
|
|
@@ -403,11 +412,25 @@ export declare const theme: Flattened<{
|
|
|
403
412
|
readonly secondary: {
|
|
404
413
|
readonly value: "#eef0f3";
|
|
405
414
|
};
|
|
415
|
+
readonly positiveWash: {
|
|
416
|
+
readonly value: "{colors.fg.positive}";
|
|
417
|
+
readonly modify: {
|
|
418
|
+
readonly type: "color-mix";
|
|
419
|
+
readonly value: readonly [readonly ["{colors.bg.default}", "92%"]];
|
|
420
|
+
};
|
|
421
|
+
};
|
|
406
422
|
readonly negativeWash: {
|
|
407
423
|
readonly value: "{colors.fg.negative}";
|
|
408
424
|
readonly modify: {
|
|
409
425
|
readonly type: "color-mix";
|
|
410
|
-
readonly value: readonly [readonly ["{colors.bg.default}", "
|
|
426
|
+
readonly value: readonly [readonly ["{colors.bg.default}", "92%"]];
|
|
427
|
+
};
|
|
428
|
+
};
|
|
429
|
+
readonly warningWash: {
|
|
430
|
+
readonly value: "{colors.fg.warning}";
|
|
431
|
+
readonly modify: {
|
|
432
|
+
readonly type: "color-mix";
|
|
433
|
+
readonly value: readonly [readonly ["{colors.bg.default}", "92%"]];
|
|
411
434
|
};
|
|
412
435
|
};
|
|
413
436
|
};
|
|
@@ -427,9 +450,6 @@ export declare const theme: Flattened<{
|
|
|
427
450
|
readonly onSecondary: {
|
|
428
451
|
readonly value: "#0a0b0d";
|
|
429
452
|
};
|
|
430
|
-
readonly onNegativeWash: {
|
|
431
|
-
readonly value: "{colors.fg.default}";
|
|
432
|
-
};
|
|
433
453
|
readonly positive: {
|
|
434
454
|
readonly value: "#098551";
|
|
435
455
|
};
|
|
@@ -439,6 +459,15 @@ export declare const theme: Flattened<{
|
|
|
439
459
|
readonly warning: {
|
|
440
460
|
readonly value: "#ed702f";
|
|
441
461
|
};
|
|
462
|
+
readonly onPositiveWash: {
|
|
463
|
+
readonly value: "{colors.fg.default}";
|
|
464
|
+
};
|
|
465
|
+
readonly onNegativeWash: {
|
|
466
|
+
readonly value: "{colors.fg.default}";
|
|
467
|
+
};
|
|
468
|
+
readonly onWarningWash: {
|
|
469
|
+
readonly value: "{colors.fg.default}";
|
|
470
|
+
};
|
|
442
471
|
};
|
|
443
472
|
readonly line: {
|
|
444
473
|
readonly default: {
|
package/dist/theme/tokens.d.ts
CHANGED
|
@@ -44,11 +44,25 @@ export declare const colorsSemantic: {
|
|
|
44
44
|
readonly secondary: {
|
|
45
45
|
readonly value: "#eef0f3";
|
|
46
46
|
};
|
|
47
|
+
readonly positiveWash: {
|
|
48
|
+
readonly value: "{colors.fg.positive}";
|
|
49
|
+
readonly modify: {
|
|
50
|
+
readonly type: "color-mix";
|
|
51
|
+
readonly value: readonly [readonly ["{colors.bg.default}", "92%"]];
|
|
52
|
+
};
|
|
53
|
+
};
|
|
47
54
|
readonly negativeWash: {
|
|
48
55
|
readonly value: "{colors.fg.negative}";
|
|
49
56
|
readonly modify: {
|
|
50
57
|
readonly type: "color-mix";
|
|
51
|
-
readonly value: readonly [readonly ["{colors.bg.default}", "
|
|
58
|
+
readonly value: readonly [readonly ["{colors.bg.default}", "92%"]];
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
readonly warningWash: {
|
|
62
|
+
readonly value: "{colors.fg.warning}";
|
|
63
|
+
readonly modify: {
|
|
64
|
+
readonly type: "color-mix";
|
|
65
|
+
readonly value: readonly [readonly ["{colors.bg.default}", "92%"]];
|
|
52
66
|
};
|
|
53
67
|
};
|
|
54
68
|
};
|
|
@@ -68,9 +82,6 @@ export declare const colorsSemantic: {
|
|
|
68
82
|
readonly onSecondary: {
|
|
69
83
|
readonly value: "#0a0b0d";
|
|
70
84
|
};
|
|
71
|
-
readonly onNegativeWash: {
|
|
72
|
-
readonly value: "{colors.fg.default}";
|
|
73
|
-
};
|
|
74
85
|
readonly positive: {
|
|
75
86
|
readonly value: "#098551";
|
|
76
87
|
};
|
|
@@ -80,6 +91,15 @@ export declare const colorsSemantic: {
|
|
|
80
91
|
readonly warning: {
|
|
81
92
|
readonly value: "#ed702f";
|
|
82
93
|
};
|
|
94
|
+
readonly onPositiveWash: {
|
|
95
|
+
readonly value: "{colors.fg.default}";
|
|
96
|
+
};
|
|
97
|
+
readonly onNegativeWash: {
|
|
98
|
+
readonly value: "{colors.fg.default}";
|
|
99
|
+
};
|
|
100
|
+
readonly onWarningWash: {
|
|
101
|
+
readonly value: "{colors.fg.default}";
|
|
102
|
+
};
|
|
83
103
|
};
|
|
84
104
|
readonly line: {
|
|
85
105
|
readonly default: {
|
|
@@ -239,6 +259,9 @@ export declare const colorsComponents: {
|
|
|
239
259
|
readonly default: {
|
|
240
260
|
readonly value: "{colors.bg.default}";
|
|
241
261
|
};
|
|
262
|
+
readonly readonly: {
|
|
263
|
+
readonly value: "{colors.bg.alternate}";
|
|
264
|
+
};
|
|
242
265
|
};
|
|
243
266
|
readonly border: {
|
|
244
267
|
readonly default: {
|
|
@@ -268,6 +291,9 @@ export declare const colorsComponents: {
|
|
|
268
291
|
readonly default: {
|
|
269
292
|
readonly value: "{colors.fg.default}";
|
|
270
293
|
};
|
|
294
|
+
readonly readonly: {
|
|
295
|
+
readonly value: "{colors.fg.muted}";
|
|
296
|
+
};
|
|
271
297
|
};
|
|
272
298
|
readonly errorText: {
|
|
273
299
|
readonly default: {
|
|
@@ -549,6 +575,9 @@ export declare const colors: {
|
|
|
549
575
|
readonly default: {
|
|
550
576
|
readonly value: "{colors.bg.default}";
|
|
551
577
|
};
|
|
578
|
+
readonly readonly: {
|
|
579
|
+
readonly value: "{colors.bg.alternate}";
|
|
580
|
+
};
|
|
552
581
|
};
|
|
553
582
|
readonly border: {
|
|
554
583
|
readonly default: {
|
|
@@ -578,6 +607,9 @@ export declare const colors: {
|
|
|
578
607
|
readonly default: {
|
|
579
608
|
readonly value: "{colors.fg.default}";
|
|
580
609
|
};
|
|
610
|
+
readonly readonly: {
|
|
611
|
+
readonly value: "{colors.fg.muted}";
|
|
612
|
+
};
|
|
581
613
|
};
|
|
582
614
|
readonly errorText: {
|
|
583
615
|
readonly default: {
|
|
@@ -748,11 +780,25 @@ export declare const colors: {
|
|
|
748
780
|
readonly secondary: {
|
|
749
781
|
readonly value: "#eef0f3";
|
|
750
782
|
};
|
|
783
|
+
readonly positiveWash: {
|
|
784
|
+
readonly value: "{colors.fg.positive}";
|
|
785
|
+
readonly modify: {
|
|
786
|
+
readonly type: "color-mix";
|
|
787
|
+
readonly value: readonly [readonly ["{colors.bg.default}", "92%"]];
|
|
788
|
+
};
|
|
789
|
+
};
|
|
751
790
|
readonly negativeWash: {
|
|
752
791
|
readonly value: "{colors.fg.negative}";
|
|
753
792
|
readonly modify: {
|
|
754
793
|
readonly type: "color-mix";
|
|
755
|
-
readonly value: readonly [readonly ["{colors.bg.default}", "
|
|
794
|
+
readonly value: readonly [readonly ["{colors.bg.default}", "92%"]];
|
|
795
|
+
};
|
|
796
|
+
};
|
|
797
|
+
readonly warningWash: {
|
|
798
|
+
readonly value: "{colors.fg.warning}";
|
|
799
|
+
readonly modify: {
|
|
800
|
+
readonly type: "color-mix";
|
|
801
|
+
readonly value: readonly [readonly ["{colors.bg.default}", "92%"]];
|
|
756
802
|
};
|
|
757
803
|
};
|
|
758
804
|
};
|
|
@@ -772,9 +818,6 @@ export declare const colors: {
|
|
|
772
818
|
readonly onSecondary: {
|
|
773
819
|
readonly value: "#0a0b0d";
|
|
774
820
|
};
|
|
775
|
-
readonly onNegativeWash: {
|
|
776
|
-
readonly value: "{colors.fg.default}";
|
|
777
|
-
};
|
|
778
821
|
readonly positive: {
|
|
779
822
|
readonly value: "#098551";
|
|
780
823
|
};
|
|
@@ -784,6 +827,15 @@ export declare const colors: {
|
|
|
784
827
|
readonly warning: {
|
|
785
828
|
readonly value: "#ed702f";
|
|
786
829
|
};
|
|
830
|
+
readonly onPositiveWash: {
|
|
831
|
+
readonly value: "{colors.fg.default}";
|
|
832
|
+
};
|
|
833
|
+
readonly onNegativeWash: {
|
|
834
|
+
readonly value: "{colors.fg.default}";
|
|
835
|
+
};
|
|
836
|
+
readonly onWarningWash: {
|
|
837
|
+
readonly value: "{colors.fg.default}";
|
|
838
|
+
};
|
|
787
839
|
};
|
|
788
840
|
readonly line: {
|
|
789
841
|
readonly default: {
|
|
@@ -929,6 +981,9 @@ export declare const borderRadiusSemantic: {
|
|
|
929
981
|
};
|
|
930
982
|
};
|
|
931
983
|
export declare const borderRadiusComponents: {
|
|
984
|
+
readonly banner: {
|
|
985
|
+
readonly value: "{borderRadius.lg}";
|
|
986
|
+
};
|
|
932
987
|
readonly cta: {
|
|
933
988
|
readonly value: "{borderRadius.full}";
|
|
934
989
|
};
|
|
@@ -951,6 +1006,9 @@ export declare const borderRadiusComponents: {
|
|
|
951
1006
|
};
|
|
952
1007
|
};
|
|
953
1008
|
export declare const borderRadius: {
|
|
1009
|
+
readonly banner: {
|
|
1010
|
+
readonly value: "{borderRadius.lg}";
|
|
1011
|
+
};
|
|
954
1012
|
readonly cta: {
|
|
955
1013
|
readonly value: "{borderRadius.full}";
|
|
956
1014
|
};
|
|
@@ -1015,6 +1073,9 @@ export declare const borderRadius: {
|
|
|
1015
1073
|
};
|
|
1016
1074
|
export declare const tokens: {
|
|
1017
1075
|
borderRadius: {
|
|
1076
|
+
readonly banner: {
|
|
1077
|
+
readonly value: "{borderRadius.lg}";
|
|
1078
|
+
};
|
|
1018
1079
|
readonly cta: {
|
|
1019
1080
|
readonly value: "{borderRadius.full}";
|
|
1020
1081
|
};
|
|
@@ -1217,6 +1278,9 @@ export declare const tokens: {
|
|
|
1217
1278
|
readonly default: {
|
|
1218
1279
|
readonly value: "{colors.bg.default}";
|
|
1219
1280
|
};
|
|
1281
|
+
readonly readonly: {
|
|
1282
|
+
readonly value: "{colors.bg.alternate}";
|
|
1283
|
+
};
|
|
1220
1284
|
};
|
|
1221
1285
|
readonly border: {
|
|
1222
1286
|
readonly default: {
|
|
@@ -1246,6 +1310,9 @@ export declare const tokens: {
|
|
|
1246
1310
|
readonly default: {
|
|
1247
1311
|
readonly value: "{colors.fg.default}";
|
|
1248
1312
|
};
|
|
1313
|
+
readonly readonly: {
|
|
1314
|
+
readonly value: "{colors.fg.muted}";
|
|
1315
|
+
};
|
|
1249
1316
|
};
|
|
1250
1317
|
readonly errorText: {
|
|
1251
1318
|
readonly default: {
|
|
@@ -1416,11 +1483,25 @@ export declare const tokens: {
|
|
|
1416
1483
|
readonly secondary: {
|
|
1417
1484
|
readonly value: "#eef0f3";
|
|
1418
1485
|
};
|
|
1486
|
+
readonly positiveWash: {
|
|
1487
|
+
readonly value: "{colors.fg.positive}";
|
|
1488
|
+
readonly modify: {
|
|
1489
|
+
readonly type: "color-mix";
|
|
1490
|
+
readonly value: readonly [readonly ["{colors.bg.default}", "92%"]];
|
|
1491
|
+
};
|
|
1492
|
+
};
|
|
1419
1493
|
readonly negativeWash: {
|
|
1420
1494
|
readonly value: "{colors.fg.negative}";
|
|
1421
1495
|
readonly modify: {
|
|
1422
1496
|
readonly type: "color-mix";
|
|
1423
|
-
readonly value: readonly [readonly ["{colors.bg.default}", "
|
|
1497
|
+
readonly value: readonly [readonly ["{colors.bg.default}", "92%"]];
|
|
1498
|
+
};
|
|
1499
|
+
};
|
|
1500
|
+
readonly warningWash: {
|
|
1501
|
+
readonly value: "{colors.fg.warning}";
|
|
1502
|
+
readonly modify: {
|
|
1503
|
+
readonly type: "color-mix";
|
|
1504
|
+
readonly value: readonly [readonly ["{colors.bg.default}", "92%"]];
|
|
1424
1505
|
};
|
|
1425
1506
|
};
|
|
1426
1507
|
};
|
|
@@ -1440,9 +1521,6 @@ export declare const tokens: {
|
|
|
1440
1521
|
readonly onSecondary: {
|
|
1441
1522
|
readonly value: "#0a0b0d";
|
|
1442
1523
|
};
|
|
1443
|
-
readonly onNegativeWash: {
|
|
1444
|
-
readonly value: "{colors.fg.default}";
|
|
1445
|
-
};
|
|
1446
1524
|
readonly positive: {
|
|
1447
1525
|
readonly value: "#098551";
|
|
1448
1526
|
};
|
|
@@ -1452,6 +1530,15 @@ export declare const tokens: {
|
|
|
1452
1530
|
readonly warning: {
|
|
1453
1531
|
readonly value: "#ed702f";
|
|
1454
1532
|
};
|
|
1533
|
+
readonly onPositiveWash: {
|
|
1534
|
+
readonly value: "{colors.fg.default}";
|
|
1535
|
+
};
|
|
1536
|
+
readonly onNegativeWash: {
|
|
1537
|
+
readonly value: "{colors.fg.default}";
|
|
1538
|
+
};
|
|
1539
|
+
readonly onWarningWash: {
|
|
1540
|
+
readonly value: "{colors.fg.default}";
|
|
1541
|
+
};
|
|
1455
1542
|
};
|
|
1456
1543
|
readonly line: {
|
|
1457
1544
|
readonly default: {
|
package/dist/theme/tokens.js
CHANGED
|
@@ -31,9 +31,17 @@ const e = {
|
|
|
31
31
|
// primary color background
|
|
32
32
|
secondary: { value: e.gray100 },
|
|
33
33
|
// secondary color background
|
|
34
|
+
positiveWash: {
|
|
35
|
+
value: "{colors.fg.positive}",
|
|
36
|
+
modify: { type: "color-mix", value: [["{colors.bg.default}", "92%"]] }
|
|
37
|
+
},
|
|
34
38
|
negativeWash: {
|
|
35
39
|
value: "{colors.fg.negative}",
|
|
36
|
-
modify: { type: "color-mix", value: [["{colors.bg.default}", "
|
|
40
|
+
modify: { type: "color-mix", value: [["{colors.bg.default}", "92%"]] }
|
|
41
|
+
},
|
|
42
|
+
warningWash: {
|
|
43
|
+
value: "{colors.fg.warning}",
|
|
44
|
+
modify: { type: "color-mix", value: [["{colors.bg.default}", "92%"]] }
|
|
37
45
|
}
|
|
38
46
|
},
|
|
39
47
|
fg: {
|
|
@@ -47,14 +55,18 @@ const e = {
|
|
|
47
55
|
// text on primary color
|
|
48
56
|
onSecondary: { value: e.black },
|
|
49
57
|
// text on secondary color
|
|
50
|
-
onNegativeWash: { value: "{colors.fg.default}" },
|
|
51
|
-
// text on negative wash color
|
|
52
58
|
positive: { value: e.green500 },
|
|
53
59
|
// positive color text
|
|
54
60
|
negative: { value: e.red500 },
|
|
55
61
|
// negative color text
|
|
56
|
-
warning: { value: e.amber500 }
|
|
62
|
+
warning: { value: e.amber500 },
|
|
57
63
|
// warning color text
|
|
64
|
+
onPositiveWash: { value: "{colors.fg.default}" },
|
|
65
|
+
// text on positive wash color
|
|
66
|
+
onNegativeWash: { value: "{colors.fg.default}" },
|
|
67
|
+
// text on negative wash color
|
|
68
|
+
onWarningWash: { value: "{colors.fg.default}" }
|
|
69
|
+
// text on warning wash color
|
|
58
70
|
},
|
|
59
71
|
line: {
|
|
60
72
|
default: { value: e.gray200 },
|
|
@@ -153,7 +165,8 @@ const e = {
|
|
|
153
165
|
},
|
|
154
166
|
input: {
|
|
155
167
|
bg: {
|
|
156
|
-
default: { value: "{colors.bg.default}" }
|
|
168
|
+
default: { value: "{colors.bg.default}" },
|
|
169
|
+
readonly: { value: "{colors.bg.alternate}" }
|
|
157
170
|
},
|
|
158
171
|
border: {
|
|
159
172
|
default: { value: "{colors.line.heavy}" },
|
|
@@ -168,7 +181,8 @@ const e = {
|
|
|
168
181
|
default: { value: "{colors.fg.muted}" }
|
|
169
182
|
},
|
|
170
183
|
text: {
|
|
171
|
-
default: { value: "{colors.fg.default}" }
|
|
184
|
+
default: { value: "{colors.fg.default}" },
|
|
185
|
+
readonly: { value: "{colors.fg.muted}" }
|
|
172
186
|
},
|
|
173
187
|
errorText: {
|
|
174
188
|
default: { value: "{colors.fg.negative}" }
|
|
@@ -327,7 +341,10 @@ const e = {
|
|
|
327
341
|
full: {
|
|
328
342
|
value: 99999
|
|
329
343
|
}
|
|
330
|
-
},
|
|
344
|
+
}, i = {
|
|
345
|
+
banner: {
|
|
346
|
+
value: "{borderRadius.lg}"
|
|
347
|
+
},
|
|
331
348
|
cta: {
|
|
332
349
|
value: "{borderRadius.full}"
|
|
333
350
|
},
|
|
@@ -348,17 +365,17 @@ const e = {
|
|
|
348
365
|
value: "{borderRadius.sm}"
|
|
349
366
|
}
|
|
350
367
|
}
|
|
351
|
-
},
|
|
368
|
+
}, c = {
|
|
352
369
|
...s,
|
|
353
|
-
...
|
|
370
|
+
...i
|
|
354
371
|
}, f = {
|
|
355
|
-
borderRadius:
|
|
372
|
+
borderRadius: c,
|
|
356
373
|
colors: r,
|
|
357
374
|
font: u
|
|
358
375
|
};
|
|
359
376
|
export {
|
|
360
|
-
|
|
361
|
-
|
|
377
|
+
c as borderRadius,
|
|
378
|
+
i as borderRadiusComponents,
|
|
362
379
|
s as borderRadiusSemantic,
|
|
363
380
|
r as colors,
|
|
364
381
|
e as colorsBase,
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { AuthManager } from '@coinbase/cdp-core';
|
|
2
|
+
import { Theme } from '../theme';
|
|
3
|
+
export type SecureIframeAuthState = Parameters<AuthManager["setAuthState"]>[0];
|
|
4
|
+
export declare const SECURE_IFRAME_EVENT_TYPE_PREFIX = "CDP_WEB_SECURE_IFRAME_";
|
|
5
|
+
export declare const SECURE_IFRAME_EVENT_TYPE: {
|
|
6
|
+
readonly INIT: "CDP_WEB_SECURE_IFRAME_INIT";
|
|
7
|
+
readonly LISTENING: "CDP_WEB_SECURE_IFRAME_LISTENING";
|
|
8
|
+
readonly STATUS: "CDP_WEB_SECURE_IFRAME_STATUS";
|
|
9
|
+
};
|
|
10
|
+
export type SecureIframeEventType = typeof SECURE_IFRAME_EVENT_TYPE;
|
|
11
|
+
export type SecureIframeInitMessage = {
|
|
12
|
+
type: SecureIframeEventType["INIT"];
|
|
13
|
+
payload: {
|
|
14
|
+
authState: SecureIframeAuthState;
|
|
15
|
+
theme: Theme;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
export type SecureIframeIncomingMessage = SecureIframeInitMessage;
|
|
19
|
+
export type SecureIframeListeningMessage = {
|
|
20
|
+
type: SecureIframeEventType["LISTENING"];
|
|
21
|
+
};
|
|
22
|
+
export type SecureIframeStatus = "ready" | "success" | "error";
|
|
23
|
+
export type SecureIframeStatusMessage = {
|
|
24
|
+
type: SecureIframeEventType["STATUS"];
|
|
25
|
+
payload: {
|
|
26
|
+
status: SecureIframeStatus;
|
|
27
|
+
message?: string;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
export type SecureIframeOutgoingMessage = SecureIframeListeningMessage | SecureIframeStatusMessage;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import "@coinbase/cdp-core";
|
|
2
|
+
import "../theme/cssVariables.js";
|
|
3
|
+
import "../theme/theme.js";
|
|
4
|
+
import "../theme/tokens.js";
|
|
5
|
+
const E = "CDP_WEB_SECURE_IFRAME_", N = {
|
|
6
|
+
INIT: `${E}INIT`,
|
|
7
|
+
LISTENING: `${E}LISTENING`,
|
|
8
|
+
STATUS: `${E}STATUS`
|
|
9
|
+
};
|
|
10
|
+
export {
|
|
11
|
+
N as SECURE_IFRAME_EVENT_TYPE,
|
|
12
|
+
E as SECURE_IFRAME_EVENT_TYPE_PREFIX
|
|
13
|
+
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { JSXElementConstructor, ReactNode } from 'react';
|
|
2
|
-
export declare const childrenHasComponent: <T = unknown>(children: ReactNode | ReactNode[], component: string | JSXElementConstructor<T>, depth?: number) =>
|
|
2
|
+
export declare const childrenHasComponent: <T = unknown>(children: ReactNode | ReactNode[], component: string | JSXElementConstructor<T>, depth?: number) => boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const formatPhoneNumber: (phoneNumber: string) => string;
|