@coinbase/cdp-react 0.0.12 → 0.0.14
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/Error.css +1 -1
- package/dist/assets/Input.css +1 -1
- package/dist/assets/SignInForm.css +1 -1
- package/dist/assets/SignInModal.css +1 -1
- package/dist/components/Button/index.js +23 -17
- package/dist/components/CDPReactProvider/index.d.ts +1 -0
- package/dist/components/CDPReactProvider/index.js +23 -11
- package/dist/components/OTP/index.js +17 -10
- package/dist/components/SignIn/SignInForm.js +75 -69
- package/dist/components/SignInModal/index.js +13 -14
- package/dist/icons/IconCoinbaseWordmark.js +5 -5
- package/dist/theme/theme.d.ts +1 -1
- package/package.json +5 -5
package/dist/assets/Button.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.Button-module__btn___Fx11X{--cdp-web-button-ring-color: transparent;--cdp-web-button-ring-width: 2px;--cdp-web-button-ring-inset-color: transparent;--cdp-web-button-ring-inset-width: 2px;box-sizing:border-box;box-shadow:inset 0 0 0 var(--cdp-web-button-ring-inset-width) var(--cdp-web-button-ring-inset-color),0 0 0 var(--cdp-web-button-ring-width) var(--cdp-web-button-ring-color);display:inline-flex;align-items:center;justify-content:center;gap:.5em;padding:1em;border-radius:9999em;border:0;background-color:transparent;color:var(--cdp-web-colors-page-text-default);font-size:1em;font-weight:500;line-height:1.5;text-decoration:none;cursor:pointer;transition:all .15s ease-in-out;-webkit-user-select:none;user-select:none}.Button-module__primary___s1sM6{background-color:var(--cdp-web-colors-cta-primary-bg-default);color:var(--cdp-web-colors-cta-primary-text-default)}.Button-module__primary___s1sM6:hover{background-color:var(--cdp-web-colors-cta-primary-bg-hover);color:var(--cdp-web-colors-cta-primary-text-hover)}.Button-module__primary___s1sM6:focus{outline:none}.Button-module__primary___s1sM6:focus-visible{--cdp-web-button-ring-color: var(--cdp-web-colors-cta-primary-border-focus);--cdp-web-button-ring-inset-color: var(--cdp-web-colors-page-bg-default);outline:none}.Button-module__secondary___R0waJ{background-color:var(--cdp-web-colors-cta-secondary-bg-default);color:var(--cdp-web-colors-cta-secondary-text-default)}.Button-module__secondary___R0waJ:hover{background-color:var(--cdp-web-colors-cta-secondary-bg-hover);color:var(--cdp-web-colors-cta-secondary-text-hover)}.Button-module__secondary___R0waJ:focus{outline:none}.Button-module__secondary___R0waJ:focus-visible{--cdp-web-button-ring-color: var(--cdp-web-colors-cta-secondary-border-focus);--cdp-web-button-ring-inset-color: var(--cdp-web-colors-page-bg-default);outline:none}.Button-module__transparent-primary___Ah0yM{background-color:transparent;color:var(--cdp-web-colors-link-primary-text-default)}.Button-module__transparent-primary___Ah0yM:hover{color:var(--cdp-web-colors-link-primary-text-hover)}.Button-module__transparent-primary___Ah0yM:focus{outline:none}.Button-module__transparent-primary___Ah0yM:focus-visible{--cdp-web-button-ring-color: var(--cdp-web-colors-link-primary-text-default);outline:none}.Button-module__transparent-secondary___kk5sZ{background-color:transparent;color:var(--cdp-web-colors-link-secondary-text-default)}.Button-module__transparent-secondary___kk5sZ:hover{color:var(--cdp-web-colors-link-secondary-text-hover)}.Button-module__transparent-secondary___kk5sZ:focus{outline:none}.Button-module__transparent-secondary___kk5sZ:focus-visible{--cdp-web-button-ring-color: var(--cdp-web-colors-link-secondary-text-default);outline:none}
|
|
1
|
+
.Button-module__btn___Fx11X{--cdp-web-button-ring-color: transparent;--cdp-web-button-ring-width: 2px;--cdp-web-button-ring-inset-color: transparent;--cdp-web-button-ring-inset-width: 2px;box-sizing:border-box;box-shadow:inset 0 0 0 var(--cdp-web-button-ring-inset-width) var(--cdp-web-button-ring-inset-color),0 0 0 var(--cdp-web-button-ring-width) var(--cdp-web-button-ring-color);display:inline-flex;align-items:center;justify-content:center;gap:.5em;padding:1em;border-radius:9999em;border:0;background-color:transparent;color:var(--cdp-web-colors-page-text-default);font-size:1em;font-weight:500;line-height:1.5;text-decoration:none;cursor:pointer;transition:all .15s ease-in-out;-webkit-user-select:none;user-select:none}.Button-module__link-primary___wROmv,.Button-module__link-secondary___5VErP{padding:0 .25em}.Button-module__primary___s1sM6{background-color:var(--cdp-web-colors-cta-primary-bg-default);color:var(--cdp-web-colors-cta-primary-text-default)}.Button-module__primary___s1sM6:hover{background-color:var(--cdp-web-colors-cta-primary-bg-hover);color:var(--cdp-web-colors-cta-primary-text-hover)}.Button-module__primary___s1sM6:focus{outline:none}.Button-module__primary___s1sM6:focus-visible{--cdp-web-button-ring-color: var(--cdp-web-colors-cta-primary-border-focus);--cdp-web-button-ring-inset-color: var(--cdp-web-colors-page-bg-default);outline:none}.Button-module__secondary___R0waJ{background-color:var(--cdp-web-colors-cta-secondary-bg-default);color:var(--cdp-web-colors-cta-secondary-text-default)}.Button-module__secondary___R0waJ:hover{background-color:var(--cdp-web-colors-cta-secondary-bg-hover);color:var(--cdp-web-colors-cta-secondary-text-hover)}.Button-module__secondary___R0waJ:focus{outline:none}.Button-module__secondary___R0waJ:focus-visible{--cdp-web-button-ring-color: var(--cdp-web-colors-cta-secondary-border-focus);--cdp-web-button-ring-inset-color: var(--cdp-web-colors-page-bg-default);outline:none}.Button-module__link-primary___wROmv,.Button-module__transparent-primary___Ah0yM{background-color:transparent;color:var(--cdp-web-colors-link-primary-text-default)}.Button-module__link-primary___wROmv:hover,.Button-module__transparent-primary___Ah0yM:hover{color:var(--cdp-web-colors-link-primary-text-hover)}.Button-module__link-primary___wROmv:focus,.Button-module__transparent-primary___Ah0yM:focus{outline:none}.Button-module__link-primary___wROmv:focus-visible,.Button-module__transparent-primary___Ah0yM:focus-visible{--cdp-web-button-ring-color: var(--cdp-web-colors-link-primary-text-default);outline:none}.Button-module__link-secondary___5VErP,.Button-module__transparent-secondary___kk5sZ{background-color:transparent;color:var(--cdp-web-colors-link-secondary-text-default)}.Button-module__link-secondary___5VErP:hover,.Button-module__transparent-secondary___kk5sZ:hover{color:var(--cdp-web-colors-link-secondary-text-hover)}.Button-module__link-secondary___5VErP:focus,.Button-module__transparent-secondary___kk5sZ:focus{outline:none}.Button-module__link-secondary___5VErP:focus-visible,.Button-module__transparent-secondary___kk5sZ:focus-visible{--cdp-web-button-ring-color: var(--cdp-web-colors-link-secondary-text-default);outline:none}
|
package/dist/assets/Error.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.Error-module__error___mRFLG{color:var(--cdp-web-colors-fg-negative);
|
|
1
|
+
.Error-module__error___mRFLG{color:var(--cdp-web-colors-fg-negative);line-height:1.25em;display:flex;align-items:center;gap:.25em;margin:0}.Error-module__error___mRFLG span{font-size:.875em}.Error-module__icon___web4F{width:1em;height:1em;flex-grow:0;flex-shrink:0}
|
package/dist/assets/Input.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.Input-module__input___WjT81{--cdp-web-input-ring-width: 1px;--cdp-web-input-ring-color: var(--cdp-web-colors-input-border-default);box-sizing:border-box;font-size:1em;padding
|
|
1
|
+
.Input-module__input___WjT81{--cdp-web-input-ring-width: 1px;--cdp-web-input-ring-color: var(--cdp-web-colors-input-border-default);box-sizing:border-box;font-size:1em;line-height:1.5;padding:1em .75em;border-radius:.5em;border:0;background-color:var(--cdp-web-colors-input-bg-default);box-shadow:0 0 0 var(--cdp-web-input-ring-width) var(--cdp-web-input-ring-color) inset;color:var(--cdp-web-colors-input-text-default);transition:all .15s ease-in-out;width:100%}.Input-module__input___WjT81::placeholder{color:var(--cdp-web-colors-input-placeholder-default)}.Input-module__input___WjT81:focus-visible{outline:none;--cdp-web-input-ring-color: var(--cdp-web-colors-input-border-focus);--cdp-web-input-ring-width: 2px}.Input-module__input___WjT81[aria-invalid=true]{--cdp-web-input-ring-color: var(--cdp-web-colors-input-border-error)}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.SignInForm-module__form___8Mc3V{display:flex;flex-direction:column;gap:1em}.SignInForm-module__form-footer___PqM2J{display:flex;flex-flow:column nowrap;align-items:stretch;justify-content:center;
|
|
1
|
+
.SignInForm-module__form-wrapper___SlQkZ{display:flex;flex-direction:column}.SignInForm-module__form___8Mc3V{display:flex;flex-direction:column;gap:1em;padding-bottom:2em}.SignInForm-module__form-footer___PqM2J{display:flex;flex-flow:column nowrap;align-items:stretch;justify-content:center;min-height:1.5em;padding-top:1.5em}.SignInForm-module__server-state-wrapper___QVsXy{margin-top:-1.5em;min-height:1.5em;position:relative;top:-.25em}.SignInForm-module__loading-spinner___W6gZo{color:var(--cdp-web-colors-link-primary-text-default);display:block;margin:0 auto}.SignInForm-module__server-error___dD9VE{justify-content:center}.SignInForm-module__resend-wrapper___ODSQA{display:flex;align-items:center;justify-content:center;text-align:center;min-height:1.5em}.SignInForm-module__reset-timer___Ms2YZ{color:var(--cdp-web-colors-page-text-muted);font-weight:500;line-height:1em;min-height:1em;display:flex;align-items:center;justify-content:center}.SignInForm-module__reset-timer___Ms2YZ p{font-size:.875em;line-height:1;margin:0}.SignInForm-module__footer___6Lo9w{color:var(--cdp-web-colors-page-text-muted);display:flex;align-items:center;justify-content:center;gap:.5em;line-height:1;padding:1em 2em 1.5em}.SignInForm-module__coinbase-icon___vGv7u{height:1em;width:auto}.SignInForm-module__footer___6Lo9w p{display:flex;align-items:center;font-size:.75em;gap:.25em;margin:0}.SignInForm-module__hr___fOcy4{border:0;border-top:1px solid var(--cdp-web-colors-page-border-default);width:100%}.SignInForm-module__icon___qkJnq{height:auto;width:.75em}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.SignInModal-module__trigger___IcJ8x{padding-left:2em;padding-right:2em}.SignInModal-module__modal___PErrT{--shadow-md: 0 4px 6px -1px rgb(0 0 0 / 10%), 0 2px 4px -2px rgb(0 0 0 / 10%);box-sizing:border-box;box-shadow:var(--shadow-md);width:100%;max-width:
|
|
1
|
+
.SignInModal-module__trigger___IcJ8x{padding-left:2em;padding-right:2em}.SignInModal-module__modal___PErrT{--shadow-md: 0 4px 6px -1px rgb(0 0 0 / 10%), 0 2px 4px -2px rgb(0 0 0 / 10%);box-sizing:border-box;box-shadow:var(--shadow-md);width:100%;max-width:29.375em;background:var(--cdp-web-colors-page-bg-default);border-radius:.5em;outline:1px solid var(--cdp-web-colors-page-border-default);position:relative}.SignInModal-module__modal___PErrT[data-state=open]{animation:SignInModal-module__slide-in___eayZg .2s ease-out,SignInModal-module__fade-in___YW32x .2s ease-out}.SignInModal-module__modal___PErrT[data-state=closed]{animation:SignInModal-module__slide-out___fY2xG .2s ease-in,SignInModal-module__fade-out___WE6g4 .2s ease-in}.SignInModal-module__sign-in___n05-5{height:100%;padding:2em 0 0}.SignInModal-module__sign-in-image___DGg7B,.SignInModal-module__sign-in-title___cju2s,.SignInModal-module__sign-in-description___-Oi9q,.SignInModal-module__sign-in-form___Jzx1->form,.SignInModal-module__sign-in-form___Jzx1->div{padding-left:2em;padding-right:2em}.SignInModal-module__sign-in-form___Jzx1-,.SignInModal-module__sign-in-form___Jzx1- form{flex-grow:1}.SignInModal-module__sign-in-title___cju2s,.SignInModal-module__sign-in-description___-Oi9q{text-align:center}.SignInModal-module__sign-in-image___DGg7B{display:flex;justify-content:center;align-items:center;flex-grow:1;margin:2em 0}.SignInModal-module__close-button___k1I5Q{position:absolute;top:1.5em;right:1.5em;width:3em}.SignInModal-module__close-button___k1I5Q svg{height:1em;width:1em}.SignInModal-module__overlay___-0rmi{background:var(--cdp-web-colors-bg-overlay);box-sizing:border-box;-webkit-backdrop-filter:blur(.5em);backdrop-filter:blur(.5em);display:grid;grid-template-rows:auto 1fr;inset:0;overflow-y:auto;place-items:end center;position:fixed;z-index:1000}.SignInModal-module__overlay___-0rmi[data-state=open]{animation:SignInModal-module__fade-in___YW32x .2s ease-out}.SignInModal-module__overlay___-0rmi[data-state=closed]{animation:SignInModal-module__fade-out___WE6g4 .2s ease-in}.SignInModal-module__spacer___x-lRH{height:1em}@keyframes SignInModal-module__fade-in___YW32x{0%{opacity:0}to{opacity:1}}@keyframes SignInModal-module__fade-out___WE6g4{0%{opacity:1}to{opacity:0}}@keyframes SignInModal-module__slide-in___eayZg{0%{transform:translateY(100%)}to{transform:translateY(0)}}@keyframes SignInModal-module__slide-out___fY2xG{0%{transform:translateY(0)}to{transform:translateY(100%)}}@media (min-width: 400px){.SignInModal-module__overlay___-0rmi{padding:.5rem}}@media (min-width: 470px){.SignInModal-module__overlay___-0rmi{place-items:center;padding:1rem;grid-template-rows:1fr}.SignInModal-module__modal___PErrT{height:auto}.SignInModal-module__spacer___x-lRH{display:none}.SignInModal-module__sign-in___n05-5{padding-top:2.5em}.SignInModal-module__sign-in-image___DGg7B,.SignInModal-module__sign-in-title___cju2s,.SignInModal-module__sign-in-description___-Oi9q,.SignInModal-module__sign-in-form___Jzx1->form,.SignInModal-module__sign-in-form___Jzx1->div{padding-left:2.5em;padding-right:2.5em}.SignInModal-module__sign-in-image___DGg7B{align-self:flex-start;margin:0}.SignInModal-module__sign-in-image___DGg7B:empty{display:none}.SignInModal-module__sign-in-title___cju2s,.SignInModal-module__sign-in-description___-Oi9q{text-align:left}@keyframes SignInModal-module__slide-in___eayZg{0%{transform:translateY(10%)}to{transform:translateY(0)}}@keyframes SignInModal-module__slide-out___fY2xG{0%{transform:translateY(0)}to{transform:translateY(10%)}}}
|
|
@@ -1,29 +1,35 @@
|
|
|
1
|
-
import { jsx as n, jsxs as
|
|
2
|
-
import { forwardRef as c, useMemo as
|
|
1
|
+
import { jsx as n, jsxs as d, Fragment as y } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as c, useMemo as p } from "react";
|
|
3
3
|
import "../../theme/theme.js";
|
|
4
4
|
import { LoadingSpinner as u } from "../LoadingSpinner/index.js";
|
|
5
5
|
import { VisuallyHidden as l } from "../VisuallyHidden/index.js";
|
|
6
|
-
import '../../assets/Button.css';const
|
|
7
|
-
btn:
|
|
6
|
+
import '../../assets/Button.css';const k = "Button-module__btn___Fx11X", B = "Button-module__primary___s1sM6", f = "Button-module__secondary___R0waJ", r = {
|
|
7
|
+
btn: k,
|
|
8
|
+
"link-primary": "Button-module__link-primary___wROmv",
|
|
9
|
+
"link-secondary": "Button-module__link-secondary___5VErP",
|
|
8
10
|
primary: B,
|
|
9
|
-
secondary:
|
|
11
|
+
secondary: f,
|
|
10
12
|
"transparent-primary": "Button-module__transparent-primary___Ah0yM",
|
|
11
13
|
"transparent-secondary": "Button-module__transparent-secondary___kk5sZ"
|
|
12
|
-
},
|
|
14
|
+
}, h = c(
|
|
13
15
|
({
|
|
14
|
-
children:
|
|
16
|
+
children: t,
|
|
15
17
|
className: e = "",
|
|
16
18
|
isPending: o,
|
|
17
19
|
pendingLabel: s = "Loading...",
|
|
18
|
-
variant:
|
|
19
|
-
...
|
|
20
|
-
},
|
|
21
|
-
const
|
|
22
|
-
switch (
|
|
20
|
+
variant: a = "primary",
|
|
21
|
+
...i
|
|
22
|
+
}, m) => {
|
|
23
|
+
const _ = p(() => {
|
|
24
|
+
switch (a) {
|
|
23
25
|
case "primary":
|
|
24
26
|
return r.primary;
|
|
25
27
|
case "secondary":
|
|
26
28
|
return r.secondary;
|
|
29
|
+
case "linkPrimary":
|
|
30
|
+
return r["link-primary"];
|
|
31
|
+
case "linkSecondary":
|
|
32
|
+
return r["link-secondary"];
|
|
27
33
|
case "transparentPrimary":
|
|
28
34
|
return r["transparent-primary"];
|
|
29
35
|
case "transparentSecondary":
|
|
@@ -31,14 +37,14 @@ import '../../assets/Button.css';const f = "Button-module__btn___Fx11X", B = "Bu
|
|
|
31
37
|
default:
|
|
32
38
|
return r.primary;
|
|
33
39
|
}
|
|
34
|
-
}, [
|
|
35
|
-
return /* @__PURE__ */ n("button", { className: `${r.btn} ${
|
|
40
|
+
}, [a]);
|
|
41
|
+
return /* @__PURE__ */ n("button", { className: `${r.btn} ${_} ${e}`, ref: m, ...i, children: o ? /* @__PURE__ */ d(y, { children: [
|
|
36
42
|
/* @__PURE__ */ n(u, { "aria-hidden": "true" }),
|
|
37
43
|
/* @__PURE__ */ n(l, { children: s })
|
|
38
|
-
] }) :
|
|
44
|
+
] }) : t });
|
|
39
45
|
}
|
|
40
46
|
);
|
|
41
|
-
|
|
47
|
+
h.displayName = "Button";
|
|
42
48
|
export {
|
|
43
|
-
|
|
49
|
+
h as Button
|
|
44
50
|
};
|
|
@@ -1,20 +1,32 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { CDPContext as
|
|
3
|
-
import { createContext as d, useContext as i, useMemo as
|
|
4
|
-
import { ThemeProvider as
|
|
5
|
-
const
|
|
6
|
-
const n = /* @__PURE__ */ t(
|
|
7
|
-
return i(
|
|
8
|
-
}, p = d(void 0), f =
|
|
9
|
-
|
|
2
|
+
import { CDPContext as c, CDPHooksProvider as C } from "@coinbase/cdp-hooks";
|
|
3
|
+
import { createContext as d, useContext as i, useMemo as u } from "react";
|
|
4
|
+
import { ThemeProvider as m } from "../ThemeProvider/index.js";
|
|
5
|
+
const g = ({ children: o, config: e, theme: r, app: s }) => {
|
|
6
|
+
const n = /* @__PURE__ */ t(x, { app: s, children: /* @__PURE__ */ t(m, { theme: r, children: o }) });
|
|
7
|
+
return i(c) ? n : /* @__PURE__ */ t(C, { config: e, children: n });
|
|
8
|
+
}, p = d(void 0), f = {
|
|
9
|
+
name: "",
|
|
10
|
+
logoUrl: "",
|
|
11
|
+
showCoinbaseFooter: !0
|
|
12
|
+
}, x = ({ children: o, app: e }) => {
|
|
13
|
+
const r = u(
|
|
14
|
+
() => ({
|
|
15
|
+
app: {
|
|
16
|
+
...f,
|
|
17
|
+
...e
|
|
18
|
+
}
|
|
19
|
+
}),
|
|
20
|
+
[e]
|
|
21
|
+
);
|
|
10
22
|
return /* @__PURE__ */ t(p.Provider, { value: r, children: o });
|
|
11
|
-
},
|
|
23
|
+
}, A = () => {
|
|
12
24
|
const o = i(p);
|
|
13
25
|
if (!o)
|
|
14
26
|
throw new Error("useAppConfig must be used within an AppConfigProvider");
|
|
15
27
|
return o.app;
|
|
16
28
|
};
|
|
17
29
|
export {
|
|
18
|
-
|
|
19
|
-
|
|
30
|
+
g as CDPReactProvider,
|
|
31
|
+
A as useAppConfig
|
|
20
32
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as d, jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import { OneTimePasswordField as _, OneTimePasswordFieldInput as f, OneTimePasswordFieldHiddenInput as P } from "@radix-ui/react-one-time-password-field";
|
|
3
3
|
import { forwardRef as O, useId as T, useRef as h, useEffect as y } from "react";
|
|
4
4
|
import { Input as I } from "../Input/index.js";
|
|
@@ -9,18 +9,18 @@ import '../../assets/OTP.css';const w = "OTP-module__otp___EUcSo", N = "OTP-modu
|
|
|
9
9
|
"input-container": "OTP-module__input-container___-yRBL",
|
|
10
10
|
input: N
|
|
11
11
|
}, R = O(
|
|
12
|
-
({ error: i, passwordLength: s = 6, className:
|
|
13
|
-
const u = T(),
|
|
14
|
-
e ?
|
|
12
|
+
({ error: i, passwordLength: s = 6, className: l = "", ...c }, n) => {
|
|
13
|
+
const u = T(), a = h(/* @__PURE__ */ new Map()), p = (e, t) => {
|
|
14
|
+
e ? a.current.set(t, e) : a.current.delete(t);
|
|
15
15
|
};
|
|
16
16
|
return y(() => {
|
|
17
|
-
const e = Array.from(
|
|
18
|
-
typeof
|
|
19
|
-
}, [s,
|
|
20
|
-
/* @__PURE__ */
|
|
17
|
+
const e = Array.from(a.current.values());
|
|
18
|
+
typeof n == "function" ? n(e) : n && (n.current = e);
|
|
19
|
+
}, [s, n]), /* @__PURE__ */ d("div", { className: `${r.otp} ${l}`, children: [
|
|
20
|
+
/* @__PURE__ */ d(
|
|
21
21
|
_,
|
|
22
22
|
{
|
|
23
|
-
...
|
|
23
|
+
...c,
|
|
24
24
|
className: r["group-container"],
|
|
25
25
|
"aria-invalid": !!i,
|
|
26
26
|
"aria-describedby": i ? u : void 0,
|
|
@@ -28,7 +28,14 @@ import '../../assets/OTP.css';const w = "OTP-module__otp___EUcSo", N = "OTP-modu
|
|
|
28
28
|
"--cdp-web-otp-input-width": `${Math.floor(100 / s)}%`
|
|
29
29
|
},
|
|
30
30
|
children: [
|
|
31
|
-
Array.from({ length: s }, (e,
|
|
31
|
+
Array.from({ length: s }, (e, t) => /* @__PURE__ */ o("div", { className: r["input-container"], children: /* @__PURE__ */ o(f, { asChild: !0, children: /* @__PURE__ */ o(
|
|
32
|
+
I,
|
|
33
|
+
{
|
|
34
|
+
name: `${c.name || "otp"}-${t}`,
|
|
35
|
+
ref: (m) => p(m, t),
|
|
36
|
+
className: r.input
|
|
37
|
+
}
|
|
38
|
+
) }) }, t)),
|
|
32
39
|
/* @__PURE__ */ o(P, {})
|
|
33
40
|
]
|
|
34
41
|
}
|
|
@@ -1,76 +1,80 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useSignInWithEmail as
|
|
1
|
+
import { jsxs as s, jsx as o, Fragment as A } from "react/jsx-runtime";
|
|
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
|
-
import { useState as v, useEffect as y, useRef as
|
|
4
|
+
import { useState as v, useEffect as y, useRef as B } from "react";
|
|
5
5
|
import { Button as C } from "../Button/index.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { OTP as
|
|
6
|
+
import { useAppConfig as k } from "../CDPReactProvider/index.js";
|
|
7
|
+
import { Field as x } from "../Field/index.js";
|
|
8
|
+
import { withValidityState as q } from "../Input/index.js";
|
|
9
|
+
import { OTP as D } from "../OTP/index.js";
|
|
10
10
|
import { ServerError as O } from "../ServerError/index.js";
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import { IconLock as W } from "../../icons/IconLock.js";
|
|
11
|
+
import { IconCoinbaseWordmark as W } from "../../icons/IconCoinbaseWordmark.js";
|
|
12
|
+
import { IconLock as Q } from "../../icons/IconLock.js";
|
|
14
13
|
import { isApiError as T } from "../../utils/isApiError.js";
|
|
15
|
-
import { isEmailInvalid as
|
|
14
|
+
import { isEmailInvalid as Z } from "../../utils/isEmailInvalid.js";
|
|
16
15
|
import { useSignInContext as E } from "./SignInProvider.js";
|
|
17
|
-
import
|
|
18
|
-
|
|
16
|
+
import { LoadingSpinner as $ } from "../LoadingSpinner/index.js";
|
|
17
|
+
import { VisuallyHidden as j } from "../VisuallyHidden/index.js";
|
|
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
|
+
"form-wrapper": "SignInForm-module__form-wrapper___SlQkZ",
|
|
20
|
+
form: J,
|
|
19
21
|
"form-footer": "SignInForm-module__form-footer___PqM2J",
|
|
20
22
|
"server-state-wrapper": "SignInForm-module__server-state-wrapper___QVsXy",
|
|
21
23
|
"loading-spinner": "SignInForm-module__loading-spinner___W6gZo",
|
|
22
24
|
"server-error": "SignInForm-module__server-error___dD9VE",
|
|
25
|
+
"resend-wrapper": "SignInForm-module__resend-wrapper___ODSQA",
|
|
23
26
|
"reset-timer": "SignInForm-module__reset-timer___Ms2YZ",
|
|
24
|
-
footer:
|
|
27
|
+
footer: G,
|
|
25
28
|
"coinbase-icon": "SignInForm-module__coinbase-icon___vGv7u",
|
|
26
|
-
hr:
|
|
27
|
-
icon:
|
|
28
|
-
},
|
|
29
|
-
const { state:
|
|
30
|
-
return /* @__PURE__ */
|
|
29
|
+
hr: H,
|
|
30
|
+
icon: X
|
|
31
|
+
}, Y = ({ submit: _ }) => {
|
|
32
|
+
const { state: i, dispatch: d } = E(), e = () => d({ type: "CLEAR_ERROR" }), u = (p) => (p.preventDefault(), _(i.email));
|
|
33
|
+
return /* @__PURE__ */ s(
|
|
31
34
|
P,
|
|
32
35
|
{
|
|
33
36
|
className: n.form,
|
|
34
37
|
onClearServerErrors: e,
|
|
35
|
-
onSubmit:
|
|
38
|
+
onSubmit: u,
|
|
36
39
|
children: [
|
|
37
40
|
/* @__PURE__ */ o(
|
|
38
|
-
|
|
41
|
+
x,
|
|
39
42
|
{
|
|
40
43
|
label: "Email address",
|
|
41
44
|
name: "email",
|
|
42
45
|
validators: [
|
|
43
46
|
["valueMissing", "Email is required"],
|
|
44
47
|
["typeMismatch", "Use a valid email address"],
|
|
45
|
-
[
|
|
48
|
+
[Z, "Use a valid email address"]
|
|
46
49
|
],
|
|
47
|
-
children:
|
|
50
|
+
children: q({
|
|
51
|
+
autoComplete: "email",
|
|
48
52
|
type: "email",
|
|
49
53
|
placeholder: "name@example.com",
|
|
50
54
|
required: !0,
|
|
51
|
-
value:
|
|
55
|
+
value: i.email,
|
|
52
56
|
onChange: (p) => {
|
|
53
57
|
d({ type: "SET_EMAIL", payload: { email: p.target.value } });
|
|
54
58
|
}
|
|
55
59
|
})
|
|
56
60
|
}
|
|
57
61
|
),
|
|
58
|
-
|
|
59
|
-
/* @__PURE__ */ o(R, { asChild: !0, children: /* @__PURE__ */ o(C, { type: "submit", isPending:
|
|
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" }) })
|
|
60
64
|
]
|
|
61
65
|
}
|
|
62
66
|
);
|
|
63
|
-
},
|
|
64
|
-
reset:
|
|
65
|
-
resetCountdown:
|
|
67
|
+
}, z = ({
|
|
68
|
+
reset: _,
|
|
69
|
+
resetCountdown: i,
|
|
66
70
|
submit: d
|
|
67
71
|
}) => {
|
|
68
|
-
const { state: e, dispatch:
|
|
69
|
-
|
|
72
|
+
const { state: e, dispatch: u } = E(), p = () => u({ type: "CLEAR_ERROR" }), l = B([]), f = (c) => (c.preventDefault(), d(e.otp)), S = () => {
|
|
73
|
+
_(), l.current[0]?.focus();
|
|
70
74
|
};
|
|
71
75
|
return y(() => {
|
|
72
76
|
e.step === "otp" && l.current[0]?.focus();
|
|
73
|
-
}, [e.step]), /* @__PURE__ */
|
|
77
|
+
}, [e.step]), /* @__PURE__ */ s(
|
|
74
78
|
P,
|
|
75
79
|
{
|
|
76
80
|
className: `${n.form}`,
|
|
@@ -78,7 +82,7 @@ import '../../assets/SignInForm.css';const j = "SignInForm-module__form___8Mc3V"
|
|
|
78
82
|
onSubmit: f,
|
|
79
83
|
children: [
|
|
80
84
|
/* @__PURE__ */ o(
|
|
81
|
-
|
|
85
|
+
D,
|
|
82
86
|
{
|
|
83
87
|
ref: l,
|
|
84
88
|
name: "otp",
|
|
@@ -87,37 +91,37 @@ import '../../assets/SignInForm.css';const j = "SignInForm-module__form___8Mc3V"
|
|
|
87
91
|
value: e.otp,
|
|
88
92
|
onChange: (c) => c.preventDefault(),
|
|
89
93
|
onValueChange: (c) => {
|
|
90
|
-
|
|
94
|
+
u({ type: "SET_OTP", payload: { otp: c } });
|
|
91
95
|
},
|
|
92
96
|
autoSubmit: !0
|
|
93
97
|
}
|
|
94
98
|
),
|
|
95
|
-
/* @__PURE__ */
|
|
96
|
-
(e.isPending && !e.canResetOTP || e.error) && /* @__PURE__ */
|
|
97
|
-
e.isPending && !e.canResetOTP && /* @__PURE__ */ o(
|
|
99
|
+
/* @__PURE__ */ s("div", { className: n["form-footer"], children: [
|
|
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"] }),
|
|
98
102
|
e.error && /* @__PURE__ */ o(O, { error: e.error, className: n["server-error"] })
|
|
99
103
|
] }),
|
|
100
|
-
/* @__PURE__ */
|
|
104
|
+
/* @__PURE__ */ s("div", { className: n["resend-wrapper"], children: [
|
|
101
105
|
e.canResetOTP && /* @__PURE__ */ o(R, { asChild: !0, children: /* @__PURE__ */ o(
|
|
102
106
|
C,
|
|
103
107
|
{
|
|
104
108
|
type: "button",
|
|
105
|
-
onClick:
|
|
109
|
+
onClick: S,
|
|
106
110
|
isPending: e.isPending,
|
|
107
|
-
variant: "
|
|
111
|
+
variant: "linkPrimary",
|
|
108
112
|
children: "Resend code"
|
|
109
113
|
}
|
|
110
114
|
) }),
|
|
111
|
-
!e.canResetOTP && /* @__PURE__ */ o("div", { className: n["reset-timer"], children: /* @__PURE__ */
|
|
115
|
+
!e.canResetOTP && /* @__PURE__ */ o("div", { className: n["reset-timer"], children: /* @__PURE__ */ s("p", { children: [
|
|
112
116
|
"Resend code in ",
|
|
113
|
-
/* @__PURE__ */
|
|
114
|
-
|
|
117
|
+
/* @__PURE__ */ s("span", { "aria-hidden": "true", children: [
|
|
118
|
+
i,
|
|
115
119
|
"s"
|
|
116
120
|
] }),
|
|
117
|
-
/* @__PURE__ */
|
|
118
|
-
|
|
121
|
+
/* @__PURE__ */ s(j, { children: [
|
|
122
|
+
i,
|
|
119
123
|
" ",
|
|
120
|
-
|
|
124
|
+
i === 1 ? "second" : "seconds"
|
|
121
125
|
] })
|
|
122
126
|
] }) })
|
|
123
127
|
] })
|
|
@@ -125,20 +129,20 @@ import '../../assets/SignInForm.css';const j = "SignInForm-module__form___8Mc3V"
|
|
|
125
129
|
]
|
|
126
130
|
}
|
|
127
131
|
);
|
|
128
|
-
},
|
|
129
|
-
as:
|
|
130
|
-
className:
|
|
132
|
+
}, Se = ({
|
|
133
|
+
as: _ = "div",
|
|
134
|
+
className: i = "",
|
|
131
135
|
onSuccess: d,
|
|
132
136
|
...e
|
|
133
137
|
}) => {
|
|
134
|
-
const l = "An error occurred while signing in. Please try again.", [f,
|
|
135
|
-
|
|
138
|
+
const l = "An error occurred while signing in. Please try again.", [f, S] = v(0), [c, h] = v(!1), w = U(), b = V(), { state: a, dispatch: m } = E(), { showCoinbaseFooter: F } = k(), L = (t) => {
|
|
139
|
+
S(t), h(!0);
|
|
136
140
|
};
|
|
137
141
|
y(() => {
|
|
138
142
|
if (!c)
|
|
139
143
|
return;
|
|
140
144
|
const t = setInterval(() => {
|
|
141
|
-
|
|
145
|
+
S((r) => r > 1 ? r - 1 : (h(!1), 0));
|
|
142
146
|
}, 1e3);
|
|
143
147
|
return () => clearInterval(t);
|
|
144
148
|
}, [c]), y(() => {
|
|
@@ -148,16 +152,16 @@ import '../../assets/SignInForm.css';const j = "SignInForm-module__form___8Mc3V"
|
|
|
148
152
|
if (!a.isPending) {
|
|
149
153
|
m({ type: "SUBMIT_EMAIL", payload: { email: t } });
|
|
150
154
|
try {
|
|
151
|
-
const { flowId: r } = await
|
|
155
|
+
const { flowId: r } = await w({
|
|
152
156
|
email: t
|
|
153
157
|
});
|
|
154
|
-
m({ type: "SUBMIT_EMAIL_SUCCESS", payload: { flowId: r } }),
|
|
158
|
+
m({ type: "SUBMIT_EMAIL_SUCCESS", payload: { flowId: r } }), L(60);
|
|
155
159
|
} catch (r) {
|
|
156
160
|
const g = T(r) ? r : r instanceof Error && r.message || l;
|
|
157
161
|
m({ type: "SUBMIT_EMAIL_FAILURE", payload: { error: g } }), console.error(r);
|
|
158
162
|
}
|
|
159
163
|
}
|
|
160
|
-
},
|
|
164
|
+
}, M = async (t) => {
|
|
161
165
|
if (!a.isPending) {
|
|
162
166
|
if (t.length !== 6) {
|
|
163
167
|
m({ type: "SET_OTP", payload: { otp: t } });
|
|
@@ -165,7 +169,7 @@ import '../../assets/SignInForm.css';const j = "SignInForm-module__form___8Mc3V"
|
|
|
165
169
|
}
|
|
166
170
|
m({ type: "SUBMIT_OTP", payload: { otp: t } });
|
|
167
171
|
try {
|
|
168
|
-
await
|
|
172
|
+
await b({
|
|
169
173
|
flowId: a.flowId,
|
|
170
174
|
otp: t
|
|
171
175
|
}), m({ type: "SUBMIT_OTP_SUCCESS", payload: { otp: t } }), d?.();
|
|
@@ -174,23 +178,25 @@ import '../../assets/SignInForm.css';const j = "SignInForm-module__form___8Mc3V"
|
|
|
174
178
|
m({ type: "SUBMIT_OTP_FAILURE", payload: { error: g } }), console.error(r);
|
|
175
179
|
}
|
|
176
180
|
}
|
|
177
|
-
},
|
|
178
|
-
m({ type: "RESET_OTP" }),
|
|
181
|
+
}, N = () => {
|
|
182
|
+
m({ type: "RESET_OTP" }), h(!1), I(a.email);
|
|
179
183
|
};
|
|
180
|
-
return /* @__PURE__ */
|
|
181
|
-
a.step === "email" && /* @__PURE__ */ o(
|
|
182
|
-
a.step === "otp" && /* @__PURE__ */ o(
|
|
183
|
-
/* @__PURE__ */
|
|
184
|
-
|
|
185
|
-
/* @__PURE__ */
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
184
|
+
return /* @__PURE__ */ s(_, { className: `${n["form-wrapper"]} ${i}`, ...e, children: [
|
|
185
|
+
a.step === "email" && /* @__PURE__ */ o(Y, { submit: I }),
|
|
186
|
+
a.step === "otp" && /* @__PURE__ */ o(z, { submit: M, reset: N, resetCountdown: f }),
|
|
187
|
+
F && /* @__PURE__ */ s(A, { children: [
|
|
188
|
+
/* @__PURE__ */ o("hr", { className: n.hr }),
|
|
189
|
+
/* @__PURE__ */ s("div", { className: n.footer, children: [
|
|
190
|
+
/* @__PURE__ */ o(Q, { className: n.icon }),
|
|
191
|
+
/* @__PURE__ */ s("p", { children: [
|
|
192
|
+
"Secured by",
|
|
193
|
+
" ",
|
|
194
|
+
/* @__PURE__ */ o(W, { className: n["coinbase-icon"], "aria-label": "Coinbase" })
|
|
195
|
+
] })
|
|
190
196
|
] })
|
|
191
197
|
] })
|
|
192
198
|
] });
|
|
193
199
|
};
|
|
194
200
|
export {
|
|
195
|
-
|
|
201
|
+
Se as SignInForm
|
|
196
202
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs as o, jsx as i } from "react/jsx-runtime";
|
|
2
|
-
import { Dialog as
|
|
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
5
|
import { Button as r } from "../Button/index.js";
|
|
@@ -13,22 +13,21 @@ import '../../assets/SignInModal.css';const y = "SignInModal-module__trigger___I
|
|
|
13
13
|
trigger: y,
|
|
14
14
|
modal: C,
|
|
15
15
|
"sign-in": "SignInModal-module__sign-in___n05-5",
|
|
16
|
-
"sign-in-
|
|
16
|
+
"sign-in-image": "SignInModal-module__sign-in-image___DGg7B",
|
|
17
17
|
"sign-in-title": "SignInModal-module__sign-in-title___cju2s",
|
|
18
18
|
"sign-in-description": "SignInModal-module__sign-in-description___-Oi9q",
|
|
19
|
-
"sign-in-
|
|
20
|
-
"close-wrapper": "SignInModal-module__close-wrapper___zuxDu",
|
|
19
|
+
"sign-in-form": "SignInModal-module__sign-in-form___Jzx1-",
|
|
21
20
|
"close-button": "SignInModal-module__close-button___k1I5Q",
|
|
22
21
|
overlay: x,
|
|
23
22
|
spacer: b
|
|
24
|
-
},
|
|
25
|
-
const { cssVariables:
|
|
26
|
-
return /* @__PURE__ */ o(
|
|
27
|
-
/* @__PURE__ */ i(
|
|
28
|
-
/* @__PURE__ */ i(_, { children: /* @__PURE__ */ o(d, { className: n.overlay, style:
|
|
23
|
+
}, G = ({ children: l, open: a, setIsOpen: s, onSuccess: e }) => {
|
|
24
|
+
const { cssVariables: t } = f();
|
|
25
|
+
return /* @__PURE__ */ o(g, { open: a, onOpenChange: s, children: [
|
|
26
|
+
/* @__PURE__ */ i(m, { asChild: !0, children: l || /* @__PURE__ */ i(r, { variant: "primary", className: n.trigger, children: "Sign In" }) }),
|
|
27
|
+
/* @__PURE__ */ i(_, { children: /* @__PURE__ */ o(d, { className: n.overlay, style: t, children: [
|
|
29
28
|
/* @__PURE__ */ i("div", { className: n.spacer }),
|
|
30
29
|
/* @__PURE__ */ i(c, { className: n.modal, children: /* @__PURE__ */ o(S, { onSuccess: e, className: n["sign-in"], children: [
|
|
31
|
-
/* @__PURE__ */ i(
|
|
30
|
+
/* @__PURE__ */ i(p, { asChild: !0, children: /* @__PURE__ */ i(
|
|
32
31
|
r,
|
|
33
32
|
{
|
|
34
33
|
"aria-label": "Close",
|
|
@@ -36,15 +35,15 @@ import '../../assets/SignInModal.css';const y = "SignInModal-module__trigger___I
|
|
|
36
35
|
className: `${n["close-button"]}`,
|
|
37
36
|
children: /* @__PURE__ */ i(h, {})
|
|
38
37
|
}
|
|
39
|
-
) })
|
|
38
|
+
) }),
|
|
40
39
|
/* @__PURE__ */ i("div", { className: n["sign-in-image"], children: /* @__PURE__ */ i(M, {}) }),
|
|
41
|
-
/* @__PURE__ */ i("div", { className: n["sign-in-title"], children: /* @__PURE__ */ i(
|
|
42
|
-
/* @__PURE__ */ i(
|
|
40
|
+
/* @__PURE__ */ i("div", { className: n["sign-in-title"], children: /* @__PURE__ */ i(I, { asChild: !0, children: /* @__PURE__ */ i(D, {}) }) }),
|
|
41
|
+
/* @__PURE__ */ i(u, { asChild: !0, children: /* @__PURE__ */ i(v, { className: n["sign-in-description"] }) }),
|
|
43
42
|
/* @__PURE__ */ i(N, { className: n["sign-in-form"], onSuccess: e })
|
|
44
43
|
] }) })
|
|
45
44
|
] }) })
|
|
46
45
|
] });
|
|
47
46
|
};
|
|
48
47
|
export {
|
|
49
|
-
|
|
48
|
+
G as SignInModal
|
|
50
49
|
};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as H, jsx as C } from "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
|
-
import { SvgIcon as
|
|
4
|
-
const
|
|
3
|
+
import { SvgIcon as r } from "./SvgIcon.js";
|
|
4
|
+
const V = (i) => /* @__PURE__ */ H(r, { width: "67", height: "13", viewBox: "0 0 67 13", fill: "none", ...i, children: [
|
|
5
5
|
/* @__PURE__ */ C("g", { clipPath: "url(#clip0_7507_87)", children: /* @__PURE__ */ C(
|
|
6
6
|
"path",
|
|
7
7
|
{
|
|
8
8
|
d: "M13.5224 3.8526C11.0884 3.8526 9.18662 5.70351 9.18662 8.18134C9.18662 10.6592 11.0404 12.4942 13.5224 12.4942C16.0044 12.4942 17.8903 10.6275 17.8903 8.1655C17.8903 5.71935 16.0366 3.8526 13.5224 3.8526ZM13.5388 10.7085C12.1527 10.7085 11.1371 9.63014 11.1371 8.18195C11.1371 6.71731 12.1363 5.63954 13.5224 5.63954C14.9248 5.63954 15.9399 6.73376 15.9399 8.18195C15.9399 9.63014 14.9248 10.7085 13.5388 10.7085ZM18.4219 5.7358H19.631V12.334H21.565V4.01344H18.4219V5.7358ZM4.31932 5.63893C5.33499 5.63893 6.14083 6.26646 6.44675 7.19983H8.4939C8.12291 5.20453 6.47899 3.8526 4.33574 3.8526C1.90179 3.8526 0 5.70351 0 8.18195C0 10.6604 1.85375 12.4948 4.33574 12.4948C6.43094 12.4948 8.10709 11.1429 8.47809 9.13116H6.44675C6.15665 10.0645 5.3508 10.7085 4.33514 10.7085C2.93266 10.7085 1.94984 9.63014 1.94984 8.18195C1.95045 6.71731 2.91746 5.63893 4.31932 5.63893ZM55.1696 7.37713L53.7513 7.16815C53.0744 7.07189 52.5909 6.84647 52.5909 6.3152C52.5909 5.7358 53.2198 5.44641 54.0736 5.44641C55.0084 5.44641 55.6051 5.84851 55.734 6.50833H57.6035C57.3937 4.83472 56.1044 3.85321 54.1223 3.85321C52.0752 3.85321 50.7213 4.8993 50.7213 6.37978C50.7213 7.79568 51.6081 8.61695 53.3967 8.87406L54.815 9.08303C55.5084 9.17929 55.8952 9.45346 55.8952 9.96828C55.8952 10.6281 55.2182 10.9016 54.2835 10.9016C53.1389 10.9016 52.4942 10.435 52.3975 9.72701H50.4957C50.6733 11.3525 51.9462 12.4948 54.2671 12.4948C56.3787 12.4948 57.7805 11.5292 57.7805 9.8714C57.7805 8.39092 56.7655 7.61839 55.1696 7.37713ZM20.598 0.585792C19.8888 0.585792 19.3567 1.10061 19.3567 1.80856C19.3567 2.51651 19.8882 3.03133 20.598 3.03133C21.3071 3.03133 21.8393 2.51651 21.8393 1.80856C21.8393 1.10061 21.3071 0.585792 20.598 0.585792ZM48.9807 6.86231C48.9807 5.06014 47.8848 3.85321 45.5639 3.85321C43.372 3.85321 42.1472 4.96388 41.9051 6.66978H43.8233C43.92 6.00996 44.4358 5.46286 45.5317 5.46286C46.5151 5.46286 46.9986 5.89725 46.9986 6.42852C46.9986 7.12063 46.1119 7.29731 45.016 7.41003C43.5332 7.57087 41.6959 8.08569 41.6959 10.017C41.6959 11.5139 42.8083 12.479 44.5811 12.479C45.9672 12.479 46.8375 11.8996 47.2729 10.9821C47.3374 11.8027 47.9498 12.334 48.8043 12.334H49.9325V10.6123H48.9813V6.86231H48.9807ZM47.0789 8.95448C47.0789 10.0651 46.1119 10.8858 44.9351 10.8858C44.2095 10.8858 43.5971 10.58 43.5971 9.93659C43.5971 9.11593 44.5805 8.89051 45.483 8.79425C46.3534 8.71383 46.8369 8.52069 47.0789 8.15027V8.95448ZM36.8122 3.8526C35.732 3.8526 34.8295 4.30345 34.1848 5.05953V0.505371H32.2508V12.334H34.1526V11.2398C34.7973 12.0282 35.7162 12.4948 36.8122 12.4948C39.133 12.4948 40.89 10.6604 40.89 8.18195C40.89 5.70351 39.1008 3.8526 36.8122 3.8526ZM36.5221 10.7085C35.136 10.7085 34.1203 9.63014 34.1203 8.18195C34.1203 6.73376 35.1518 5.63954 36.5379 5.63954C37.9403 5.63954 38.9232 6.71792 38.9232 8.18195C38.9232 9.63014 37.9081 10.7085 36.5221 10.7085ZM27.6249 3.8526C26.3678 3.8526 25.5456 4.36742 25.062 5.09182V4.01344H23.1438V12.3334H25.0779V7.81152C25.0779 6.54001 25.8837 5.63893 27.0764 5.63893C28.1887 5.63893 28.8814 6.4273 28.8814 7.57026V12.334H30.8155V7.42587C30.8161 5.33308 29.7366 3.8526 27.6249 3.8526ZM67 7.90839C67 5.52683 65.2594 3.85321 62.9221 3.85321C60.4401 3.85321 58.6186 5.71996 58.6186 8.18195C58.6186 10.7731 60.5691 12.4948 62.9544 12.4948C64.9693 12.4948 66.5487 11.3038 66.9513 9.6143H64.9364C64.6463 10.3545 63.9372 10.7731 62.986 10.7731C61.7447 10.7731 60.8099 10.0006 60.6007 8.64863H66.9994V7.90839H67ZM60.7138 7.26441C61.0203 6.10562 61.8906 5.54267 62.8899 5.54267C63.9858 5.54267 64.8239 6.1702 65.0173 7.26441H60.7138Z",
|
|
9
|
-
fill: "
|
|
9
|
+
fill: "#0050ff"
|
|
10
10
|
}
|
|
11
11
|
) }),
|
|
12
12
|
/* @__PURE__ */ C("defs", { children: /* @__PURE__ */ C("clipPath", { id: "clip0_7507_87", children: /* @__PURE__ */ C("rect", { width: "67", height: "11.9895", fill: "white", transform: "translate(0 0.505371)" }) }) })
|
|
13
13
|
] });
|
|
14
14
|
export {
|
|
15
|
-
|
|
15
|
+
V as IconCoinbaseWordmark
|
|
16
16
|
};
|
package/dist/theme/theme.d.ts
CHANGED
|
@@ -239,4 +239,4 @@ export type FontTokens = Flattened<{
|
|
|
239
239
|
}>;
|
|
240
240
|
export type ColorTokens = SemanticColors | ComponentColors;
|
|
241
241
|
export type Theme = ColorTokens & FontTokens;
|
|
242
|
-
export type ButtonVariant = "primary" | "secondary" | "transparentPrimary" | "transparentSecondary";
|
|
242
|
+
export type ButtonVariant = "primary" | "secondary" | "linkPrimary" | "linkSecondary" | "transparentPrimary" | "transparentSecondary";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coinbase/cdp-react",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.14",
|
|
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.
|
|
13
|
-
"@coinbase/cdp-hooks": "^0.0.
|
|
12
|
+
"@coinbase/cdp-core": "^0.0.14",
|
|
13
|
+
"@coinbase/cdp-hooks": "^0.0.14"
|
|
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.
|
|
42
|
-
"@coinbase/cdp-hooks": "^0.0.
|
|
41
|
+
"@coinbase/cdp-core": "^0.0.14",
|
|
42
|
+
"@coinbase/cdp-hooks": "^0.0.14"
|
|
43
43
|
},
|
|
44
44
|
"size-limit": [
|
|
45
45
|
{
|