@coinbase/cdp-react 0.0.14 → 0.0.15

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,19 +2,19 @@ import { jsxs as s, jsx as o, Fragment as A } from "react/jsx-runtime";
2
2
  import { useSignInWithEmail as U, useVerifyEmailOTP as V } from "@coinbase/cdp-hooks";
3
3
  import { Form as P, FormSubmit as R } from "@radix-ui/react-form";
4
4
  import { useState as v, useEffect as y, useRef as B } from "react";
5
- import { Button as C } from "../Button/index.js";
6
5
  import { useAppConfig as k } from "../CDPReactProvider/index.js";
7
6
  import { Field as x } from "../Field/index.js";
8
7
  import { withValidityState as q } from "../Input/index.js";
9
- import { OTP as D } from "../OTP/index.js";
10
- import { ServerError as O } from "../ServerError/index.js";
11
- import { IconCoinbaseWordmark as W } from "../../icons/IconCoinbaseWordmark.js";
12
- import { IconLock as Q } from "../../icons/IconLock.js";
8
+ import { LoadingSpinner as D } from "../LoadingSpinner/index.js";
9
+ import { OTP as W } from "../OTP/index.js";
10
+ import { ServerError as C } from "../ServerError/index.js";
11
+ import { VisuallyHidden as Q } from "../VisuallyHidden/index.js";
12
+ import { IconCoinbaseWordmark as Z } from "../../icons/IconCoinbaseWordmark.js";
13
+ import { IconLock as $ } from "../../icons/IconLock.js";
13
14
  import { isApiError as T } from "../../utils/isApiError.js";
14
- import { isEmailInvalid as Z } from "../../utils/isEmailInvalid.js";
15
+ import { isEmailInvalid as j } from "../../utils/isEmailInvalid.js";
15
16
  import { useSignInContext as E } from "./SignInProvider.js";
16
- import { LoadingSpinner as $ } from "../LoadingSpinner/index.js";
17
- import { VisuallyHidden as j } from "../VisuallyHidden/index.js";
17
+ import { Button as O } from "../Button/index.js";
18
18
  import '../../assets/SignInForm.css';const J = "SignInForm-module__form___8Mc3V", G = "SignInForm-module__footer___6Lo9w", H = "SignInForm-module__hr___fOcy4", X = "SignInForm-module__icon___qkJnq", n = {
19
19
  "form-wrapper": "SignInForm-module__form-wrapper___SlQkZ",
20
20
  form: J,
@@ -45,7 +45,7 @@ import '../../assets/SignInForm.css';const J = "SignInForm-module__form___8Mc3V"
45
45
  validators: [
46
46
  ["valueMissing", "Email is required"],
47
47
  ["typeMismatch", "Use a valid email address"],
48
- [Z, "Use a valid email address"]
48
+ [j, "Use a valid email address"]
49
49
  ],
50
50
  children: q({
51
51
  autoComplete: "email",
@@ -59,8 +59,8 @@ import '../../assets/SignInForm.css';const J = "SignInForm-module__form___8Mc3V"
59
59
  })
60
60
  }
61
61
  ),
62
- i.error && /* @__PURE__ */ o(O, { error: i.error, className: n["server-error"] }),
63
- /* @__PURE__ */ o(R, { asChild: !0, children: /* @__PURE__ */ o(C, { type: "submit", isPending: i.isPending, children: "Continue with email" }) })
62
+ i.error && /* @__PURE__ */ o(C, { error: i.error, className: n["server-error"] }),
63
+ /* @__PURE__ */ o(R, { asChild: !0, children: /* @__PURE__ */ o(O, { type: "submit", isPending: i.isPending, children: "Continue with email" }) })
64
64
  ]
65
65
  }
66
66
  );
@@ -82,7 +82,7 @@ import '../../assets/SignInForm.css';const J = "SignInForm-module__form___8Mc3V"
82
82
  onSubmit: f,
83
83
  children: [
84
84
  /* @__PURE__ */ o(
85
- D,
85
+ W,
86
86
  {
87
87
  ref: l,
88
88
  name: "otp",
@@ -98,12 +98,12 @@ import '../../assets/SignInForm.css';const J = "SignInForm-module__form___8Mc3V"
98
98
  ),
99
99
  /* @__PURE__ */ s("div", { className: n["form-footer"], children: [
100
100
  (e.isPending && !e.canResetOTP || e.error) && /* @__PURE__ */ s("div", { className: n["server-state-wrapper"], children: [
101
- e.isPending && !e.canResetOTP && /* @__PURE__ */ o($, { className: n["loading-spinner"] }),
102
- e.error && /* @__PURE__ */ o(O, { error: e.error, className: n["server-error"] })
101
+ e.isPending && !e.canResetOTP && /* @__PURE__ */ o(D, { className: n["loading-spinner"] }),
102
+ e.error && /* @__PURE__ */ o(C, { error: e.error, className: n["server-error"] })
103
103
  ] }),
104
104
  /* @__PURE__ */ s("div", { className: n["resend-wrapper"], children: [
105
105
  e.canResetOTP && /* @__PURE__ */ o(R, { asChild: !0, children: /* @__PURE__ */ o(
106
- C,
106
+ O,
107
107
  {
108
108
  type: "button",
109
109
  onClick: S,
@@ -118,7 +118,7 @@ import '../../assets/SignInForm.css';const J = "SignInForm-module__form___8Mc3V"
118
118
  i,
119
119
  "s"
120
120
  ] }),
121
- /* @__PURE__ */ s(j, { children: [
121
+ /* @__PURE__ */ s(Q, { children: [
122
122
  i,
123
123
  " ",
124
124
  i === 1 ? "second" : "seconds"
@@ -187,11 +187,11 @@ import '../../assets/SignInForm.css';const J = "SignInForm-module__form___8Mc3V"
187
187
  F && /* @__PURE__ */ s(A, { children: [
188
188
  /* @__PURE__ */ o("hr", { className: n.hr }),
189
189
  /* @__PURE__ */ s("div", { className: n.footer, children: [
190
- /* @__PURE__ */ o(Q, { className: n.icon }),
190
+ /* @__PURE__ */ o($, { className: n.icon }),
191
191
  /* @__PURE__ */ s("p", { children: [
192
192
  "Secured by",
193
193
  " ",
194
- /* @__PURE__ */ o(W, { className: n["coinbase-icon"], "aria-label": "Coinbase" })
194
+ /* @__PURE__ */ o(Z, { className: n["coinbase-icon"], "aria-label": "Coinbase" })
195
195
  ] })
196
196
  ] })
197
197
  ] })
@@ -2,13 +2,13 @@ import { jsxs as o, jsx as i } from "react/jsx-runtime";
2
2
  import { Dialog as g, DialogTrigger as m, DialogPortal as _, DialogOverlay as d, DialogContent as c, DialogClose as p, DialogTitle as I, 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 f } from "../ThemeProvider/index.js";
8
7
  import { SignInImage as M } from "../SignIn/SignInImage.js";
9
8
  import { SignInTitle as D } 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", C = "SignInModal-module__modal___PErrT", x = "SignInModal-module__overlay___-0rmi", b = "SignInModal-module__spacer___x-lRH", n = {
13
13
  trigger: y,
14
14
  modal: C,
@@ -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 e = {
7
7
  "sign-out-button": "SignOutButton-module__sign-out-button___qiybe"
8
8
  }, O = ({ children: t, variant: o = "primary", onSuccess: n }) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coinbase/cdp-react",
3
- "version": "0.0.14",
3
+ "version": "0.0.15",
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-core": "^0.0.14",
13
- "@coinbase/cdp-hooks": "^0.0.14"
12
+ "@coinbase/cdp-core": "^0.0.15",
13
+ "@coinbase/cdp-hooks": "^0.0.15"
14
14
  },
15
15
  "devDependencies": {
16
16
  "@size-limit/preset-big-lib": "^11.2.0",
@@ -38,8 +38,8 @@
38
38
  "vite": "^7.0.4",
39
39
  "vite-plugin-dts": "^4.5.4",
40
40
  "vite-plugin-lib-inject-css": "^2.2.2",
41
- "@coinbase/cdp-core": "^0.0.14",
42
- "@coinbase/cdp-hooks": "^0.0.14"
41
+ "@coinbase/cdp-core": "^0.0.15",
42
+ "@coinbase/cdp-hooks": "^0.0.15"
43
43
  },
44
44
  "size-limit": [
45
45
  {