@coinbase/cdp-react 0.0.3 → 0.0.4
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.
|
@@ -2,10 +2,9 @@ import { jsxs as i, jsx as t } from "react/jsx-runtime";
|
|
|
2
2
|
import { useSignInWithEmail as N, useVerifyEmailOTP as M } from "@coinbase/cdp-hooks";
|
|
3
3
|
import { Form as I, FormSubmit as P } from "@radix-ui/react-form";
|
|
4
4
|
import { useRef as R, useState as U, useEffect as A } from "react";
|
|
5
|
-
import { Button as b } from "../Button/index.js";
|
|
6
5
|
import { Field as x } from "../Field/index.js";
|
|
7
6
|
import { OTP as F } from "../OTP/index.js";
|
|
8
|
-
import { ServerError as
|
|
7
|
+
import { ServerError as b } from "../ServerError/index.js";
|
|
9
8
|
import { IconCoinbaseWordmark as B } from "../../icons/IconCoinbaseWordmark.js";
|
|
10
9
|
import { IconLock as V } from "../../icons/IconLock.js";
|
|
11
10
|
import { isApiError as T } from "../../utils/isApiError.js";
|
|
@@ -13,6 +12,7 @@ import { isEmailInvalid as k } from "../../utils/isEmailInvalid.js";
|
|
|
13
12
|
import { s as a } from "../../chunks/SignIn.module.Dl3CqKQ_.js";
|
|
14
13
|
import { useSignInContext as S } from "./SignInProvider.js";
|
|
15
14
|
import { withValidityState as W } from "../Input/index.js";
|
|
15
|
+
import { Button as C } from "../Button/index.js";
|
|
16
16
|
import { LoadingSpinner as D } from "../LoadingSpinner/index.js";
|
|
17
17
|
import { VisuallyHidden as $ } from "../VisuallyHidden/index.js";
|
|
18
18
|
const j = ({ submit: f }) => {
|
|
@@ -45,8 +45,8 @@ const j = ({ submit: f }) => {
|
|
|
45
45
|
})
|
|
46
46
|
}
|
|
47
47
|
),
|
|
48
|
-
n.error && /* @__PURE__ */ t(
|
|
49
|
-
/* @__PURE__ */ t(P, { asChild: !0, children: /* @__PURE__ */ t(
|
|
48
|
+
n.error && /* @__PURE__ */ t(b, { error: n.error, className: a.serverError }),
|
|
49
|
+
/* @__PURE__ */ t(P, { asChild: !0, children: /* @__PURE__ */ t(C, { type: "submit", isPending: n.isPending, children: "Continue with email" }) })
|
|
50
50
|
]
|
|
51
51
|
}
|
|
52
52
|
);
|
|
@@ -85,11 +85,11 @@ const j = ({ submit: f }) => {
|
|
|
85
85
|
/* @__PURE__ */ i("div", { className: a.formFooter, children: [
|
|
86
86
|
(e.isPending && !e.canResetOTP || e.error) && /* @__PURE__ */ i("div", { className: a.serverStateWrapper, children: [
|
|
87
87
|
e.isPending && !e.canResetOTP && /* @__PURE__ */ t(D, { className: a.loadingSpinner }),
|
|
88
|
-
e.error && /* @__PURE__ */ t(
|
|
88
|
+
e.error && /* @__PURE__ */ t(b, { error: e.error, className: a.serverError })
|
|
89
89
|
] }),
|
|
90
90
|
/* @__PURE__ */ i("div", { children: [
|
|
91
91
|
e.canResetOTP && /* @__PURE__ */ t(P, { asChild: !0, children: /* @__PURE__ */ t(
|
|
92
|
-
|
|
92
|
+
C,
|
|
93
93
|
{
|
|
94
94
|
type: "button",
|
|
95
95
|
onClick: E,
|
|
@@ -2,13 +2,13 @@ import { jsxs as o, jsx as n } from "react/jsx-runtime";
|
|
|
2
2
|
import { Dialog as g, DialogTrigger as c, DialogPortal as m, DialogOverlay as _, DialogContent as d, DialogClose as I, DialogTitle as p, DialogDescription as u } from "@radix-ui/react-dialog";
|
|
3
3
|
import "react";
|
|
4
4
|
import { IconXMark as h } from "../../icons/IconXMark.js";
|
|
5
|
-
import { Button as r } from "../Button/index.js";
|
|
6
5
|
import { SignIn as S } from "../SignIn/index.js";
|
|
7
6
|
import { useTheme as D } from "../ThemeProvider/index.js";
|
|
8
7
|
import { SignInImage as M } from "../SignIn/SignInImage.js";
|
|
9
8
|
import { SignInTitle as f } from "../SignIn/SignInTitle.js";
|
|
10
9
|
import { SignInDescription as v } from "../SignIn/SignInDescription.js";
|
|
11
10
|
import { SignInForm as N } from "../SignIn/SignInForm.js";
|
|
11
|
+
import { Button as r } from "../Button/index.js";
|
|
12
12
|
import '../../assets/SignInModal.css';const y = "SignInModal-module__trigger___IcJ8x", T = "SignInModal-module__modal___PErrT", C = "SignInModal-module__signIn___hQuJk", x = "SignInModal-module__signInForm___6-UdI", B = "SignInModal-module__signInTitle___AF-XA", F = "SignInModal-module__signInDescription___SZjXu", W = "SignInModal-module__signInImage___hMBda", j = "SignInModal-module__closeWrapper___cx8Zq", X = "SignInModal-module__closeButton___yf-ZW", Z = "SignInModal-module__overlay___-0rmi", b = "SignInModal-module__spacer___x-lRH", i = {
|
|
13
13
|
trigger: y,
|
|
14
14
|
modal: T,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as s } from "react/jsx-runtime";
|
|
2
2
|
import { useSignOut as r } from "@coinbase/cdp-hooks";
|
|
3
3
|
import "react";
|
|
4
|
-
import { Button as m } from "../Button/index.js";
|
|
5
4
|
import "../../theme/theme.js";
|
|
5
|
+
import { Button as m } from "../Button/index.js";
|
|
6
6
|
import '../../assets/SignOutButton.css';const g = "SignOutButton-module__signOutButton___WNhmy", c = {
|
|
7
7
|
signOutButton: g
|
|
8
8
|
}, l = ({ children: t, variant: n = "primary", onSuccess: o }) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coinbase/cdp-react",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@radix-ui/react-dialog": "^1.1.14",
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
},
|
|
10
10
|
"peerDependencies": {
|
|
11
11
|
"react": ">=18.2.0",
|
|
12
|
-
"@coinbase/cdp-
|
|
13
|
-
"@coinbase/cdp-
|
|
12
|
+
"@coinbase/cdp-core": "^0.0.4",
|
|
13
|
+
"@coinbase/cdp-hooks": "^0.0.4"
|
|
14
14
|
},
|
|
15
15
|
"devDependencies": {
|
|
16
16
|
"@size-limit/preset-big-lib": "^11.2.0",
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
"vite": "^7.0.4",
|
|
35
35
|
"vite-plugin-dts": "^4.5.4",
|
|
36
36
|
"vite-plugin-lib-inject-css": "^2.2.2",
|
|
37
|
-
"@coinbase/cdp-core": "^0.0.
|
|
38
|
-
"@coinbase/cdp-hooks": "^0.0.
|
|
37
|
+
"@coinbase/cdp-core": "^0.0.4",
|
|
38
|
+
"@coinbase/cdp-hooks": "^0.0.4"
|
|
39
39
|
},
|
|
40
40
|
"size-limit": [
|
|
41
41
|
{
|