@coinbase/cdp-react 0.0.17 → 0.0.19
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/assets/Button.css +1 -1
- package/dist/assets/EmailForm.css +1 -0
- package/dist/assets/Error.css +1 -1
- package/dist/assets/Field.css +1 -1
- package/dist/assets/FlowEmailOTP.css +1 -0
- package/dist/assets/FlowPhoneNumberOTP.css +1 -0
- package/dist/assets/Input.css +1 -1
- package/dist/assets/Label.css +1 -0
- package/dist/assets/OTP.css +1 -1
- package/dist/assets/OTPForm.css +1 -0
- package/dist/assets/PhoneNumberForm.css +1 -0
- package/dist/assets/PhoneNumberInput.css +1 -0
- package/dist/assets/SignIn.css +1 -1
- package/dist/assets/SignInAuthMethodButtons.css +1 -0
- package/dist/assets/SignInBackButton.css +1 -0
- package/dist/assets/SignInCredentials.css +1 -0
- package/dist/assets/SignInDescription.css +1 -1
- package/dist/assets/SignInFooter.css +1 -0
- package/dist/assets/SignInForm.css +1 -1
- package/dist/assets/SignInImage.css +1 -1
- package/dist/assets/SignInModal.css +1 -1
- package/dist/assets/SignInTitle.css +1 -1
- package/dist/assets/SuccessMessage.css +1 -0
- package/dist/assets/SwitchFadeTransition.css +1 -0
- package/dist/assets/SwitchSlideTransition.css +1 -0
- package/dist/assets/SwitchTransition.css +1 -0
- package/dist/assets/ThemeProvider.css +1 -1
- package/dist/chunks/index.BzllgVaP.js +12 -0
- package/dist/components/AuthButton/index.js +2 -2
- package/dist/components/Button/index.d.ts +2 -1
- package/dist/components/Button/index.js +47 -22
- package/dist/components/CDPReactProvider/index.d.ts +3 -0
- package/dist/components/CDPReactProvider/index.js +20 -13
- package/dist/components/EmailForm/index.d.ts +11 -0
- package/dist/components/EmailForm/index.js +56 -0
- package/dist/components/Error/index.d.ts +2 -2
- package/dist/components/Error/index.js +11 -11
- package/dist/components/Field/index.d.ts +2 -1
- package/dist/components/Field/index.js +20 -18
- package/dist/components/FlowEmailOTP/index.d.ts +18 -0
- package/dist/components/FlowEmailOTP/index.js +70 -0
- package/dist/components/FlowPhoneNumberOTP/index.d.ts +18 -0
- package/dist/components/FlowPhoneNumberOTP/index.js +75 -0
- package/dist/components/Label/index.d.ts +7 -0
- package/dist/components/Label/index.js +13 -0
- package/dist/components/OTP/index.d.ts +3 -0
- package/dist/components/OTP/index.js +48 -33
- package/dist/components/OTPForm/index.d.ts +16 -0
- package/dist/components/OTPForm/index.js +76 -0
- package/dist/components/PhoneNumberForm/index.d.ts +14 -0
- package/dist/components/PhoneNumberForm/index.js +68 -0
- package/dist/components/PhoneNumberInput/PhoneNumberMetadata.d.ts +2 -0
- package/dist/components/PhoneNumberInput/PhoneNumberMetadata.js +5 -0
- package/dist/components/PhoneNumberInput/index.d.ts +10 -0
- package/dist/components/PhoneNumberInput/index.js +76 -0
- package/dist/components/PhoneNumberInput/maskOverride.d.ts +8 -0
- package/dist/components/PhoneNumberInput/maskOverride.js +61 -0
- package/dist/components/PhoneNumberInput/usePhoneNumberFormatter.d.ts +7 -0
- package/dist/components/PhoneNumberInput/usePhoneNumberFormatter.js +52 -0
- package/dist/components/SendTransactionButton/index.js +1 -1
- package/dist/components/ServerError/index.js +4 -4
- package/dist/components/SignIn/SignInAuthMethodButtons.d.ts +13 -0
- package/dist/components/SignIn/SignInAuthMethodButtons.js +57 -0
- package/dist/components/SignIn/SignInBackButton.d.ts +9 -0
- package/dist/components/SignIn/SignInBackButton.js +38 -0
- package/dist/components/SignIn/SignInCredentials.d.ts +2 -0
- package/dist/components/SignIn/SignInCredentials.js +8 -0
- package/dist/components/SignIn/SignInDescription.d.ts +4 -3
- package/dist/components/SignIn/SignInDescription.js +16 -23
- package/dist/components/SignIn/SignInFooter.d.ts +2 -0
- package/dist/components/SignIn/SignInFooter.js +18 -0
- package/dist/components/SignIn/SignInForm.d.ts +12 -4
- package/dist/components/SignIn/SignInForm.js +25 -196
- package/dist/components/SignIn/SignInImage.d.ts +2 -2
- package/dist/components/SignIn/SignInImage.js +11 -14
- package/dist/components/SignIn/SignInProvider.d.ts +1 -1
- package/dist/components/SignIn/SignInProvider.js +24 -16
- package/dist/components/SignIn/SignInTitle.d.ts +4 -3
- package/dist/components/SignIn/SignInTitle.js +18 -13
- package/dist/components/SignIn/flows/SignInWithEmail.d.ts +5 -0
- package/dist/components/SignIn/flows/SignInWithEmail.js +71 -0
- package/dist/components/SignIn/flows/SignInWithSms.d.ts +5 -0
- package/dist/components/SignIn/flows/SignInWithSms.js +2994 -0
- package/dist/components/SignIn/hooks/useEmailForm.d.ts +13 -0
- package/dist/components/SignIn/hooks/useEmailForm.js +42 -0
- package/dist/components/SignIn/hooks/useOTPForm.d.ts +16 -0
- package/dist/components/SignIn/hooks/useOTPForm.js +59 -0
- package/dist/components/SignIn/hooks/usePhoneNumberForm.d.ts +13 -0
- package/dist/components/SignIn/hooks/usePhoneNumberForm.js +42 -0
- package/dist/components/SignIn/index.d.ts +5 -2
- package/dist/components/SignIn/index.js +42 -24
- package/dist/components/SignIn/types.d.ts +106 -0
- package/dist/components/SignIn/types.js +3 -0
- package/dist/components/SignIn/useSignInReducer.d.ts +1 -57
- package/dist/components/SignIn/useSignInReducer.js +62 -20
- package/dist/components/SignInModal/index.d.ts +2 -2
- package/dist/components/SignInModal/index.js +62 -43
- package/dist/components/SignOutButton/index.js +1 -1
- package/dist/components/SuccessMessage/index.d.ts +7 -0
- package/dist/components/SuccessMessage/index.js +16 -0
- package/dist/components/SwitchFadeTransition/index.d.ts +5 -0
- package/dist/components/SwitchFadeTransition/index.js +24 -0
- package/dist/components/SwitchSlideTransition/index.d.ts +7 -0
- package/dist/components/SwitchSlideTransition/index.js +27 -0
- package/dist/components/SwitchTransition/index.d.ts +25 -0
- package/dist/components/SwitchTransition/index.js +155 -0
- package/dist/data/countries.d.ts +12 -0
- package/dist/data/countries.js +25 -0
- package/dist/data/countryNames.d.ts +1 -0
- package/dist/data/countryNames.js +6 -0
- package/dist/hooks/usePhoneNumberValidators.d.ts +14 -0
- package/dist/hooks/usePhoneNumberValidators.js +36 -0
- package/dist/hooks/useTimer.d.ts +5 -0
- package/dist/hooks/useTimer.js +24 -0
- package/dist/icons/IconArrowLeft.d.ts +2 -0
- package/dist/icons/IconArrowLeft.js +14 -0
- package/dist/icons/IconCheckCircle.js +2 -3
- package/dist/icons/IconCoinbaseWordmark.js +5 -5
- package/dist/icons/IconEnvelope.d.ts +2 -0
- package/dist/icons/IconEnvelope.js +7 -0
- package/dist/icons/IconExclamationCircle.js +3 -4
- package/dist/icons/IconPhone.d.ts +2 -0
- package/dist/icons/IconPhone.js +7 -0
- package/dist/icons/IconXMark.js +6 -5
- package/dist/icons/index.d.ts +3 -0
- package/dist/icons/index.js +14 -8
- package/dist/index.js +66 -53
- package/dist/theme/theme.d.ts +11 -2
- package/dist/theme/tokens.d.ts +30 -6
- package/dist/theme/tokens.js +7 -3
- package/dist/utils/parseValuesFromPhoneNumber.d.ts +6 -0
- package/dist/utils/parseValuesFromPhoneNumber.js +16 -0
- package/dist/utils/validatePhoneNumber.d.ts +1 -0
- package/dist/utils/validatePhoneNumber.js +1 -0
- package/package.json +11 -7
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import { SvgIcon as L } from "./SvgIcon.js";
|
|
4
|
+
const e = (r) => /* @__PURE__ */ o(L, { width: "20", height: "20", viewBox: "1 1 20 18", fill: "currentColor", ...r, children: /* @__PURE__ */ o("path", { d: "M1.1491 -0.00488281H8.45971L9.66658 6.37031L4.99795 10.1828C6.38698 12.6261 8.42293 14.6527 10.8728 16.0291L14.6205 11.4246L20.9883 12.6341V19.8006L19.7231 19.9414L19.7044 19.9428C19.2823 19.9737 18.8499 19.9951 18.4114 19.9951C8.78359 19.9951 0.988281 12.1853 0.988281 2.55472C0.988281 2.00318 1.00905 1.45404 1.06228 0.899562L1.1491 -0.00488281ZM12.7308 16.9147C14.4886 17.6119 16.4051 17.9951 18.4114 17.9951C18.6019 17.9951 18.794 17.9904 18.9883 17.982V14.2899L15.4189 13.612L12.7308 16.9147ZM4.10333 8.33119L7.48023 5.57357L6.8028 1.99512H2.99675C2.99096 2.17961 2.98828 2.36593 2.98828 2.55472C2.98828 4.59716 3.38415 6.54689 4.10333 8.33119Z" }) });
|
|
5
|
+
export {
|
|
6
|
+
e as IconPhone
|
|
7
|
+
};
|
package/dist/icons/IconXMark.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
|
-
import { SvgIcon as
|
|
4
|
-
const n = (
|
|
3
|
+
import { SvgIcon as e } from "./SvgIcon.js";
|
|
4
|
+
const n = (r) => /* @__PURE__ */ o(e, { width: "24", height: "24", viewBox: "0 0 24 24", fill: "currentColor", ...r, children: /* @__PURE__ */ o(
|
|
5
5
|
"path",
|
|
6
6
|
{
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
fillRule: "evenodd",
|
|
8
|
+
d: "M5.47 5.47a.75.75 0 0 1 1.06 0L12 10.94l5.47-5.47a.75.75 0 1 1 1.06 1.06L13.06 12l5.47 5.47a.75.75 0 1 1-1.06 1.06L12 13.06l-5.47 5.47a.75.75 0 0 1-1.06-1.06L10.94 12 5.47 6.53a.75.75 0 0 1 0-1.06Z",
|
|
9
|
+
clipRule: "evenodd"
|
|
9
10
|
}
|
|
10
11
|
) });
|
|
11
12
|
export {
|
package/dist/icons/index.d.ts
CHANGED
package/dist/icons/index.js
CHANGED
|
@@ -1,10 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { IconArrowLeft as e } from "./IconArrowLeft.js";
|
|
2
|
+
import { IconCheckCircle as n } from "./IconCheckCircle.js";
|
|
3
|
+
import { IconEnvelope as f } from "./IconEnvelope.js";
|
|
4
|
+
import { IconExclamationCircle as p } from "./IconExclamationCircle.js";
|
|
5
|
+
import { IconLock as I } from "./IconLock.js";
|
|
6
|
+
import { IconPhone as a } from "./IconPhone.js";
|
|
7
|
+
import { IconXMark as k } from "./IconXMark.js";
|
|
5
8
|
export {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
9
|
+
e as IconArrowLeft,
|
|
10
|
+
n as IconCheckCircle,
|
|
11
|
+
f as IconEnvelope,
|
|
12
|
+
p as IconExclamationCircle,
|
|
13
|
+
I as IconLock,
|
|
14
|
+
a as IconPhone,
|
|
15
|
+
k as IconXMark
|
|
10
16
|
};
|
package/dist/index.js
CHANGED
|
@@ -1,58 +1,71 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { AuthButton as
|
|
3
|
-
import { SendTransactionButton as
|
|
4
|
-
import { SignIn as
|
|
5
|
-
import { useSignInReducer as
|
|
6
|
-
import { SignOutButton as
|
|
7
|
-
import { SignInModal as
|
|
8
|
-
import { ThemeProvider as
|
|
9
|
-
import { cssVariables as
|
|
10
|
-
import { theme as
|
|
11
|
-
import { colors as E, colorsBase as
|
|
12
|
-
import { flattenTokensObject as
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
1
|
+
import { AUTH_METHODS as e, CDPReactProvider as t, useAppConfig as n } from "./components/CDPReactProvider/index.js";
|
|
2
|
+
import { AuthButton as p } from "./components/AuthButton/index.js";
|
|
3
|
+
import { SendTransactionButton as x } from "./components/SendTransactionButton/index.js";
|
|
4
|
+
import { SignIn as s } from "./components/SignIn/index.js";
|
|
5
|
+
import { useSignInReducer as I } from "./components/SignIn/useSignInReducer.js";
|
|
6
|
+
import { SignOutButton as g } from "./components/SignOutButton/index.js";
|
|
7
|
+
import { SignInModal as S } from "./components/SignInModal/index.js";
|
|
8
|
+
import { ThemeProvider as h, useTheme as C } from "./components/ThemeProvider/index.js";
|
|
9
|
+
import { cssVariables as d } from "./theme/cssVariables.js";
|
|
10
|
+
import { theme as B } from "./theme/theme.js";
|
|
11
|
+
import { colors as E, colorsBase as M, colorsComponents as v, colorsSemantic as P, font as b, tokens as D } from "./theme/tokens.js";
|
|
12
|
+
import { flattenTokensObject as O, themeToCssVariables as w } from "./theme/utils.js";
|
|
13
|
+
import { IconArrowLeft as L } from "./icons/IconArrowLeft.js";
|
|
14
|
+
import { IconCheckCircle as U } from "./icons/IconCheckCircle.js";
|
|
15
|
+
import { IconEnvelope as j } from "./icons/IconEnvelope.js";
|
|
16
|
+
import { IconExclamationCircle as _ } from "./icons/IconExclamationCircle.js";
|
|
17
|
+
import { IconLock as y } from "./icons/IconLock.js";
|
|
18
|
+
import { IconPhone as G } from "./icons/IconPhone.js";
|
|
19
|
+
import { IconXMark as K } from "./icons/IconXMark.js";
|
|
20
|
+
import { getMessageFromUnknownError as Q } from "./utils/getMessageFromUnknownError.js";
|
|
21
|
+
import { isApiError as Y } from "./utils/isApiError.js";
|
|
22
|
+
import { isEmailInvalid as $ } from "./utils/isEmailInvalid.js";
|
|
23
|
+
import { SignInAuthMethodButtons as ro } from "./components/SignIn/SignInAuthMethodButtons.js";
|
|
24
|
+
import { SignInBackButton as to } from "./components/SignIn/SignInBackButton.js";
|
|
25
|
+
import { SignInDescription as mo } from "./components/SignIn/SignInDescription.js";
|
|
26
|
+
import { SignInFooter as fo } from "./components/SignIn/SignInFooter.js";
|
|
27
|
+
import { SignInForm as io } from "./components/SignIn/SignInForm.js";
|
|
28
|
+
import { SignInImage as co } from "./components/SignIn/SignInImage.js";
|
|
29
|
+
import { SignInTitle as ao } from "./components/SignIn/SignInTitle.js";
|
|
30
|
+
import { useSignInContext as lo } from "./components/SignIn/SignInProvider.js";
|
|
25
31
|
export {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
U as
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
32
|
+
e as AUTH_METHODS,
|
|
33
|
+
p as AuthButton,
|
|
34
|
+
t as CDPReactProvider,
|
|
35
|
+
L as IconArrowLeft,
|
|
36
|
+
U as IconCheckCircle,
|
|
37
|
+
j as IconEnvelope,
|
|
38
|
+
_ as IconExclamationCircle,
|
|
39
|
+
y as IconLock,
|
|
40
|
+
G as IconPhone,
|
|
41
|
+
K as IconXMark,
|
|
42
|
+
x as SendTransactionButton,
|
|
43
|
+
s as SignIn,
|
|
44
|
+
ro as SignInAuthMethodButtons,
|
|
45
|
+
to as SignInBackButton,
|
|
46
|
+
mo as SignInDescription,
|
|
47
|
+
fo as SignInFooter,
|
|
48
|
+
io as SignInForm,
|
|
49
|
+
co as SignInImage,
|
|
50
|
+
S as SignInModal,
|
|
51
|
+
ao as SignInTitle,
|
|
52
|
+
g as SignOutButton,
|
|
53
|
+
h as ThemeProvider,
|
|
41
54
|
E as colors,
|
|
42
|
-
|
|
55
|
+
M as colorsBase,
|
|
43
56
|
v as colorsComponents,
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
+
P as colorsSemantic,
|
|
58
|
+
d as cssVariables,
|
|
59
|
+
O as flattenTokensObject,
|
|
60
|
+
b as font,
|
|
61
|
+
Q as getMessageFromUnknownError,
|
|
62
|
+
Y as isApiError,
|
|
63
|
+
$ as isEmailInvalid,
|
|
64
|
+
B as theme,
|
|
65
|
+
w as themeToCssVariables,
|
|
66
|
+
D as tokens,
|
|
67
|
+
n as useAppConfig,
|
|
68
|
+
lo as useSignInContext,
|
|
69
|
+
I as useSignInReducer,
|
|
57
70
|
C as useTheme
|
|
58
71
|
};
|
package/dist/theme/theme.d.ts
CHANGED
|
@@ -124,6 +124,9 @@ export declare const theme: Flattened<{
|
|
|
124
124
|
readonly error: {
|
|
125
125
|
readonly value: "{colors.line.negative}";
|
|
126
126
|
};
|
|
127
|
+
readonly success: {
|
|
128
|
+
readonly value: "{colors.line.positive}";
|
|
129
|
+
};
|
|
127
130
|
};
|
|
128
131
|
readonly label: {
|
|
129
132
|
readonly default: {
|
|
@@ -145,6 +148,11 @@ export declare const theme: Flattened<{
|
|
|
145
148
|
readonly value: "{colors.fg.negative}";
|
|
146
149
|
};
|
|
147
150
|
};
|
|
151
|
+
readonly successText: {
|
|
152
|
+
readonly default: {
|
|
153
|
+
readonly value: "{colors.fg.positive}";
|
|
154
|
+
};
|
|
155
|
+
};
|
|
148
156
|
};
|
|
149
157
|
readonly bg: {
|
|
150
158
|
readonly default: {
|
|
@@ -191,7 +199,7 @@ export declare const theme: Flattened<{
|
|
|
191
199
|
readonly value: "#0a0b0d";
|
|
192
200
|
};
|
|
193
201
|
readonly positive: {
|
|
194
|
-
readonly value: "#
|
|
202
|
+
readonly value: "#098551";
|
|
195
203
|
};
|
|
196
204
|
readonly negative: {
|
|
197
205
|
readonly value: "#cf202f";
|
|
@@ -218,7 +226,7 @@ export declare const theme: Flattened<{
|
|
|
218
226
|
font: {
|
|
219
227
|
readonly family: {
|
|
220
228
|
readonly sans: {
|
|
221
|
-
readonly value: "-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\"";
|
|
229
|
+
readonly value: "\"Inter\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\"";
|
|
222
230
|
};
|
|
223
231
|
};
|
|
224
232
|
readonly size: {
|
|
@@ -240,3 +248,4 @@ export type FontTokens = Flattened<{
|
|
|
240
248
|
export type ColorTokens = SemanticColors | ComponentColors;
|
|
241
249
|
export type Theme = ColorTokens & FontTokens;
|
|
242
250
|
export type ButtonVariant = "primary" | "secondary" | "linkPrimary" | "linkSecondary" | "transparentPrimary" | "transparentSecondary";
|
|
251
|
+
export type ButtonSize = "lg" | "md" | "sm";
|
package/dist/theme/tokens.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ export declare const colorsBase: {
|
|
|
10
10
|
readonly gray700: "#5b616e";
|
|
11
11
|
readonly gray900: "#1a1d21";
|
|
12
12
|
readonly red500: "#cf202f";
|
|
13
|
-
readonly green500: "#
|
|
13
|
+
readonly green500: "#098551";
|
|
14
14
|
};
|
|
15
15
|
export declare const colorsSemantic: {
|
|
16
16
|
readonly bg: {
|
|
@@ -58,7 +58,7 @@ export declare const colorsSemantic: {
|
|
|
58
58
|
readonly value: "#0a0b0d";
|
|
59
59
|
};
|
|
60
60
|
readonly positive: {
|
|
61
|
-
readonly value: "#
|
|
61
|
+
readonly value: "#098551";
|
|
62
62
|
};
|
|
63
63
|
readonly negative: {
|
|
64
64
|
readonly value: "#cf202f";
|
|
@@ -205,6 +205,9 @@ export declare const colorsComponents: {
|
|
|
205
205
|
readonly error: {
|
|
206
206
|
readonly value: "{colors.line.negative}";
|
|
207
207
|
};
|
|
208
|
+
readonly success: {
|
|
209
|
+
readonly value: "{colors.line.positive}";
|
|
210
|
+
};
|
|
208
211
|
};
|
|
209
212
|
readonly label: {
|
|
210
213
|
readonly default: {
|
|
@@ -226,6 +229,11 @@ export declare const colorsComponents: {
|
|
|
226
229
|
readonly value: "{colors.fg.negative}";
|
|
227
230
|
};
|
|
228
231
|
};
|
|
232
|
+
readonly successText: {
|
|
233
|
+
readonly default: {
|
|
234
|
+
readonly value: "{colors.fg.positive}";
|
|
235
|
+
};
|
|
236
|
+
};
|
|
229
237
|
};
|
|
230
238
|
};
|
|
231
239
|
export declare const colors: {
|
|
@@ -351,6 +359,9 @@ export declare const colors: {
|
|
|
351
359
|
readonly error: {
|
|
352
360
|
readonly value: "{colors.line.negative}";
|
|
353
361
|
};
|
|
362
|
+
readonly success: {
|
|
363
|
+
readonly value: "{colors.line.positive}";
|
|
364
|
+
};
|
|
354
365
|
};
|
|
355
366
|
readonly label: {
|
|
356
367
|
readonly default: {
|
|
@@ -372,6 +383,11 @@ export declare const colors: {
|
|
|
372
383
|
readonly value: "{colors.fg.negative}";
|
|
373
384
|
};
|
|
374
385
|
};
|
|
386
|
+
readonly successText: {
|
|
387
|
+
readonly default: {
|
|
388
|
+
readonly value: "{colors.fg.positive}";
|
|
389
|
+
};
|
|
390
|
+
};
|
|
375
391
|
};
|
|
376
392
|
readonly bg: {
|
|
377
393
|
readonly default: {
|
|
@@ -418,7 +434,7 @@ export declare const colors: {
|
|
|
418
434
|
readonly value: "#0a0b0d";
|
|
419
435
|
};
|
|
420
436
|
readonly positive: {
|
|
421
|
-
readonly value: "#
|
|
437
|
+
readonly value: "#098551";
|
|
422
438
|
};
|
|
423
439
|
readonly negative: {
|
|
424
440
|
readonly value: "#cf202f";
|
|
@@ -445,7 +461,7 @@ export declare const colors: {
|
|
|
445
461
|
export declare const font: {
|
|
446
462
|
readonly family: {
|
|
447
463
|
readonly sans: {
|
|
448
|
-
readonly value: "-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\"";
|
|
464
|
+
readonly value: "\"Inter\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\"";
|
|
449
465
|
};
|
|
450
466
|
};
|
|
451
467
|
readonly size: {
|
|
@@ -578,6 +594,9 @@ export declare const tokens: {
|
|
|
578
594
|
readonly error: {
|
|
579
595
|
readonly value: "{colors.line.negative}";
|
|
580
596
|
};
|
|
597
|
+
readonly success: {
|
|
598
|
+
readonly value: "{colors.line.positive}";
|
|
599
|
+
};
|
|
581
600
|
};
|
|
582
601
|
readonly label: {
|
|
583
602
|
readonly default: {
|
|
@@ -599,6 +618,11 @@ export declare const tokens: {
|
|
|
599
618
|
readonly value: "{colors.fg.negative}";
|
|
600
619
|
};
|
|
601
620
|
};
|
|
621
|
+
readonly successText: {
|
|
622
|
+
readonly default: {
|
|
623
|
+
readonly value: "{colors.fg.positive}";
|
|
624
|
+
};
|
|
625
|
+
};
|
|
602
626
|
};
|
|
603
627
|
readonly bg: {
|
|
604
628
|
readonly default: {
|
|
@@ -645,7 +669,7 @@ export declare const tokens: {
|
|
|
645
669
|
readonly value: "#0a0b0d";
|
|
646
670
|
};
|
|
647
671
|
readonly positive: {
|
|
648
|
-
readonly value: "#
|
|
672
|
+
readonly value: "#098551";
|
|
649
673
|
};
|
|
650
674
|
readonly negative: {
|
|
651
675
|
readonly value: "#cf202f";
|
|
@@ -672,7 +696,7 @@ export declare const tokens: {
|
|
|
672
696
|
font: {
|
|
673
697
|
readonly family: {
|
|
674
698
|
readonly sans: {
|
|
675
|
-
readonly value: "-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\"";
|
|
699
|
+
readonly value: "\"Inter\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\"";
|
|
676
700
|
};
|
|
677
701
|
};
|
|
678
702
|
readonly size: {
|
package/dist/theme/tokens.js
CHANGED
|
@@ -13,7 +13,7 @@ const e = {
|
|
|
13
13
|
gray900: "#1a1d21",
|
|
14
14
|
// contextual
|
|
15
15
|
red500: "#cf202f",
|
|
16
|
-
green500: "#
|
|
16
|
+
green500: "#098551"
|
|
17
17
|
}, a = {
|
|
18
18
|
bg: {
|
|
19
19
|
default: { value: e.white },
|
|
@@ -122,7 +122,8 @@ const e = {
|
|
|
122
122
|
border: {
|
|
123
123
|
default: { value: "{colors.line.heavy}" },
|
|
124
124
|
focus: { value: "{colors.line.primary}" },
|
|
125
|
-
error: { value: "{colors.line.negative}" }
|
|
125
|
+
error: { value: "{colors.line.negative}" },
|
|
126
|
+
success: { value: "{colors.line.positive}" }
|
|
126
127
|
},
|
|
127
128
|
label: {
|
|
128
129
|
default: { value: "{colors.fg.default}" }
|
|
@@ -135,6 +136,9 @@ const e = {
|
|
|
135
136
|
},
|
|
136
137
|
errorText: {
|
|
137
138
|
default: { value: "{colors.fg.negative}" }
|
|
139
|
+
},
|
|
140
|
+
successText: {
|
|
141
|
+
default: { value: "{colors.fg.positive}" }
|
|
138
142
|
}
|
|
139
143
|
}
|
|
140
144
|
}, o = {
|
|
@@ -143,7 +147,7 @@ const e = {
|
|
|
143
147
|
}, r = {
|
|
144
148
|
family: {
|
|
145
149
|
sans: {
|
|
146
|
-
value: '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"'
|
|
150
|
+
value: '"Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"'
|
|
147
151
|
}
|
|
148
152
|
},
|
|
149
153
|
size: {
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { parsePhoneNumberWithError as n } from "libphonenumber-js";
|
|
2
|
+
const a = (r, o) => {
|
|
3
|
+
const e = {
|
|
4
|
+
value: r,
|
|
5
|
+
e164: ""
|
|
6
|
+
};
|
|
7
|
+
try {
|
|
8
|
+
const t = n(r, o);
|
|
9
|
+
e.e164 = t.number;
|
|
10
|
+
} catch {
|
|
11
|
+
}
|
|
12
|
+
return e;
|
|
13
|
+
};
|
|
14
|
+
export {
|
|
15
|
+
a as parseValuesFromPhoneNumber
|
|
16
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
package/package.json
CHANGED
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coinbase/cdp-react",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.19",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@radix-ui/react-dialog": "^1.1.14",
|
|
7
7
|
"@radix-ui/react-form": "^0.1.7",
|
|
8
|
-
"@radix-ui/react-one-time-password-field": "^0.1.7"
|
|
8
|
+
"@radix-ui/react-one-time-password-field": "^0.1.7",
|
|
9
|
+
"react-transition-state": "2.3.0",
|
|
10
|
+
"libphonenumber-js": "^1.12.10"
|
|
9
11
|
},
|
|
10
12
|
"peerDependencies": {
|
|
11
13
|
"react": ">=18.2.0",
|
|
12
|
-
"@coinbase/cdp-core": "^0.0.
|
|
13
|
-
"@coinbase/cdp-hooks": "^0.0.
|
|
14
|
+
"@coinbase/cdp-core": "^0.0.19",
|
|
15
|
+
"@coinbase/cdp-hooks": "^0.0.19"
|
|
14
16
|
},
|
|
15
17
|
"devDependencies": {
|
|
16
18
|
"@size-limit/preset-big-lib": "^11.2.0",
|
|
@@ -31,6 +33,7 @@
|
|
|
31
33
|
"glob": "^11.0.3",
|
|
32
34
|
"react": "^19.1.0",
|
|
33
35
|
"react-dom": "^19.1.0",
|
|
36
|
+
"rollup-plugin-visualizer": "^6.0.3",
|
|
34
37
|
"size-limit": "^11.2.0",
|
|
35
38
|
"stylelint": "^16.22.0",
|
|
36
39
|
"stylelint-config-standard": "^38.0.0",
|
|
@@ -38,8 +41,8 @@
|
|
|
38
41
|
"vite": "^7.0.4",
|
|
39
42
|
"vite-plugin-dts": "^4.5.4",
|
|
40
43
|
"vite-plugin-lib-inject-css": "^2.2.2",
|
|
41
|
-
"@coinbase/cdp-core": "^0.0.
|
|
42
|
-
"@coinbase/cdp-hooks": "^0.0.
|
|
44
|
+
"@coinbase/cdp-core": "^0.0.19",
|
|
45
|
+
"@coinbase/cdp-hooks": "^0.0.19"
|
|
43
46
|
},
|
|
44
47
|
"size-limit": [
|
|
45
48
|
{
|
|
@@ -47,7 +50,7 @@
|
|
|
47
50
|
"path": "./dist/index.js",
|
|
48
51
|
"import": "*",
|
|
49
52
|
"running": false,
|
|
50
|
-
"limit": "
|
|
53
|
+
"limit": "70 KB"
|
|
51
54
|
},
|
|
52
55
|
{
|
|
53
56
|
"name": "single-component",
|
|
@@ -105,6 +108,7 @@
|
|
|
105
108
|
"scripts": {
|
|
106
109
|
"build": "pnpm run check:types && vite build",
|
|
107
110
|
"build:watch": "vite build --watch",
|
|
111
|
+
"analyze": "vite build --config vite-analyze.config.ts",
|
|
108
112
|
"check:types": "tsc --noEmit",
|
|
109
113
|
"clean": "rm -rf dist",
|
|
110
114
|
"clean:all": "pnpm clean && rm -rf node_modules",
|