@coinbase/cdp-react 0.0.28 → 0.0.30
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 +2 -0
- package/dist/assets/AmountInput.css +1 -1
- package/dist/assets/Button.css +1 -1
- package/dist/components/Fund/FundForm.js +68 -72
- package/dist/components/Fund/components/FundTransactionStatus.js +83 -64
- package/dist/components/Fund/hooks/useBuyUrl.js +29 -29
- package/dist/components/Fund/hooks/useSetupOnrampEventListeners.js +25 -20
- package/dist/components/Fund/index.d.ts +1 -1
- package/dist/components/Fund/index.js +23 -23
- package/dist/components/Fund/types.d.ts +4 -0
- package/dist/components/Fund/utils/buildPaymentMethods.js +12 -12
- package/dist/components/FundModal/index.d.ts +2 -2
- package/dist/components/FundModal/index.js +14 -14
- package/dist/components/forms/AmountInput/index.js +52 -52
- package/dist/icons/IconCurrencies.d.ts +2 -0
- package/dist/icons/IconCurrencies.js +11 -0
- package/dist/index.js +63 -63
- package/dist/theme/theme.d.ts +2 -2
- package/dist/theme/tokens.d.ts +6 -6
- package/dist/theme/tokens.js +2 -2
- package/package.json +5 -5
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import { jsx as t, jsxs as m, Fragment as
|
|
2
|
-
import { useId as
|
|
3
|
-
import { useAppConfig as
|
|
4
|
-
import { CoinbaseFooter as
|
|
5
|
-
import { FundForm as
|
|
6
|
-
import { FundProvider as
|
|
7
|
-
import { FundTitle as
|
|
8
|
-
import { useSetupOnrampEventListeners as
|
|
1
|
+
import { jsx as t, jsxs as m, Fragment as f } from "react/jsx-runtime";
|
|
2
|
+
import { useId as p } from "react";
|
|
3
|
+
import { useAppConfig as F } from "../CDPReactProvider/index.js";
|
|
4
|
+
import { CoinbaseFooter as c } from "../ui/CoinbaseFooter/index.js";
|
|
5
|
+
import { FundForm as a } from "./FundForm.js";
|
|
6
|
+
import { FundProvider as l, useFundContext as C } from "./FundProvider.js";
|
|
7
|
+
import { FundTitle as _ } from "./FundTitle.js";
|
|
8
|
+
import { useSetupOnrampEventListeners as b } from "./hooks/useSetupOnrampEventListeners.js";
|
|
9
9
|
import '../../assets/Fund.css';const x = "Fund-module__fund___6j-Og", g = {
|
|
10
10
|
fund: x
|
|
11
|
-
},
|
|
12
|
-
children:
|
|
13
|
-
openIn:
|
|
14
|
-
submitLabel:
|
|
11
|
+
}, L = ({ className: o = "", children: r, openIn: e, submitLabel: s, title: u, ...n }) => /* @__PURE__ */ t(l, { ...n, children: /* @__PURE__ */ t("div", { className: `${g.fund} ${o}`, children: /* @__PURE__ */ t(h, { openIn: e, submitLabel: s, title: u, children: r }) }) }), h = ({
|
|
12
|
+
children: o,
|
|
13
|
+
openIn: r,
|
|
14
|
+
submitLabel: e,
|
|
15
15
|
title: s
|
|
16
16
|
}) => {
|
|
17
|
-
const { state: u } =
|
|
18
|
-
return
|
|
19
|
-
/* @__PURE__ */ t(
|
|
20
|
-
|
|
21
|
-
|
|
17
|
+
const { state: u } = C(), n = p(), { showCoinbaseFooter: i } = F();
|
|
18
|
+
return b(), o ? typeof o == "function" ? o(u) : o : /* @__PURE__ */ t(a, { "aria-labelledby": n, openIn: r, submitLabel: e, children: ({ Content: d }) => /* @__PURE__ */ m(f, { children: [
|
|
19
|
+
/* @__PURE__ */ t(_, { id: n, children: s }),
|
|
20
|
+
d,
|
|
21
|
+
i && /* @__PURE__ */ t(j, {})
|
|
22
22
|
] }) });
|
|
23
|
-
}, j = (
|
|
23
|
+
}, j = (o) => /* @__PURE__ */ t(c, { ...o });
|
|
24
24
|
export {
|
|
25
|
-
|
|
26
|
-
j as
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
25
|
+
L as Fund,
|
|
26
|
+
j as FundFooter,
|
|
27
|
+
a as FundForm,
|
|
28
|
+
_ as FundTitle,
|
|
29
|
+
C as useFundContext
|
|
30
30
|
};
|
|
@@ -59,6 +59,9 @@ export type FundLifecycleStatus = {
|
|
|
59
59
|
} | {
|
|
60
60
|
statusName: "error";
|
|
61
61
|
statusData: OnrampError;
|
|
62
|
+
} | {
|
|
63
|
+
statusName: "transactionSubmitted";
|
|
64
|
+
statusData: null;
|
|
62
65
|
} | {
|
|
63
66
|
statusName: "transactionSuccess";
|
|
64
67
|
statusData: OnrampSuccessEventData | null;
|
|
@@ -66,6 +69,7 @@ export type FundLifecycleStatus = {
|
|
|
66
69
|
statusName: "transactionPending";
|
|
67
70
|
statusData: null;
|
|
68
71
|
};
|
|
72
|
+
export type FundTxResolution = Extract<FundLifecycleStatus["statusName"], "transactionSubmitted" | "transactionSuccess" | "error"> | null;
|
|
69
73
|
export type FundLifecycleEvents = {
|
|
70
74
|
onError?: (e: OnrampError | undefined) => void;
|
|
71
75
|
onStatus?: (lifecycleStatus: FundLifecycleStatus) => void;
|
|
@@ -2,20 +2,20 @@ import { jsx as r } from "react/jsx-runtime";
|
|
|
2
2
|
import { IconAppleLogo as u } from "../../../icons/IconAppleLogo.js";
|
|
3
3
|
import { IconCoinbaseMark as A } from "../../../icons/IconCoinbaseMark.js";
|
|
4
4
|
import { IconCreditCard as C } from "../../../icons/IconCreditCard.js";
|
|
5
|
-
const s = 2, c = 500,
|
|
5
|
+
const s = 2, c = 500, b = (n) => [
|
|
6
6
|
// Check API-provided methods
|
|
7
7
|
n.some((e) => e.id === "ACH_BANK_ACCOUNT") && "ACH",
|
|
8
8
|
n.some((e) => e.id === "CARD") && "debit",
|
|
9
9
|
n.some((e) => e.id === "FIAT_WALLET") && "cash",
|
|
10
10
|
// Always include these methods
|
|
11
11
|
"crypto balance"
|
|
12
|
-
].filter(Boolean).join(", "),
|
|
12
|
+
].filter(Boolean).join(", "), M = ({ limits: n }) => {
|
|
13
13
|
const o = n.flatMap((t) => t.min ? [Number(t.min)] : []), e = n.flatMap((t) => t.max ? [Number(t.max)] : []);
|
|
14
14
|
return {
|
|
15
15
|
id: n[0].id,
|
|
16
16
|
// use the first limit id as the coinbase payment method id to avoid passing in an invalid option
|
|
17
17
|
name: "Coinbase",
|
|
18
|
-
description:
|
|
18
|
+
description: b(n),
|
|
19
19
|
icon: /* @__PURE__ */ r(A, {}),
|
|
20
20
|
minAmount: o.length > 0 ? Math.min(...o) : s,
|
|
21
21
|
maxAmount: e.length > 0 ? Math.max(...e) : c
|
|
@@ -33,25 +33,25 @@ const s = 2, c = 500, M = (n) => [
|
|
|
33
33
|
}
|
|
34
34
|
].map((e) => {
|
|
35
35
|
const t = n.limits.find(
|
|
36
|
-
(
|
|
36
|
+
(i) => i.id === e.id.replace("_GUEST", "")
|
|
37
37
|
);
|
|
38
38
|
return {
|
|
39
39
|
...e,
|
|
40
|
-
description:
|
|
40
|
+
description: `Up to $500/week. No sign up required.${e.id === "APPLE_PAY_GUEST" ? " Debit only." : ""}`,
|
|
41
41
|
minAmount: Number(t?.min) || s,
|
|
42
42
|
maxAmount: Number(t?.max) || c
|
|
43
43
|
};
|
|
44
|
-
}),
|
|
45
|
-
const t = o.toUpperCase(),
|
|
44
|
+
}), f = (n, o, e) => {
|
|
45
|
+
const t = o.toUpperCase(), i = e.toUpperCase(), a = n.paymentCurrencies.find(
|
|
46
46
|
(p) => p.id.toUpperCase() === t
|
|
47
47
|
);
|
|
48
|
-
if (!
|
|
48
|
+
if (!a)
|
|
49
49
|
return [];
|
|
50
|
-
const d =
|
|
50
|
+
const d = M(a);
|
|
51
51
|
let m = [];
|
|
52
|
-
return
|
|
52
|
+
return i === "US" && t === "USD" && (m = l(a)), [d, ...m];
|
|
53
53
|
};
|
|
54
54
|
export {
|
|
55
|
-
|
|
56
|
-
|
|
55
|
+
b as buildCoinbasePaymentMethodDescription,
|
|
56
|
+
f as buildPaymentMethods
|
|
57
57
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { FundProps } from '../Fund';
|
|
3
3
|
interface FundModalProps extends FundProps {
|
|
4
4
|
children?: ReactNode;
|
|
5
5
|
open?: boolean;
|
|
6
6
|
setIsOpen?: (value: boolean) => void;
|
|
7
7
|
}
|
|
8
8
|
declare const FundModal: ({ children, open, setIsOpen, openIn, submitLabel, title, ...fundProps }: FundModalProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
export { FundModal
|
|
9
|
+
export { FundModal, type FundModalProps };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsxs as t, jsx as o, Fragment as x } from "react/jsx-runtime";
|
|
2
|
-
import { useId as O, useState as v, useCallback as
|
|
2
|
+
import { useId as O, useState as v, useCallback as p } from "react";
|
|
3
3
|
import { useAppConfig as T } from "../CDPReactProvider/index.js";
|
|
4
|
-
import {
|
|
5
|
-
import { Button as
|
|
4
|
+
import { Fund as j, FundFooter as I } from "../Fund/index.js";
|
|
5
|
+
import { Button as F } from "../ui/Button/index.js";
|
|
6
6
|
import { Modal as $, ModalTrigger as z, ModalContent as A, ModalTitle as S, ModalClose as k } from "../ui/Modal/index.js";
|
|
7
7
|
import { VisuallyHidden as M } from "../ui/VisuallyHidden/index.js";
|
|
8
8
|
import { IconXMark as U } from "../../icons/IconXMark.js";
|
|
@@ -20,7 +20,7 @@ import '../../assets/FundModal.css';const W = "FundModal-module__trigger___2IuXj
|
|
|
20
20
|
title: q,
|
|
21
21
|
content: B
|
|
22
22
|
}, Y = ({
|
|
23
|
-
children:
|
|
23
|
+
children: g,
|
|
24
24
|
open: i,
|
|
25
25
|
setIsOpen: c,
|
|
26
26
|
openIn: u,
|
|
@@ -28,14 +28,14 @@ import '../../assets/FundModal.css';const W = "FundModal-module__trigger___2IuXj
|
|
|
28
28
|
title: d,
|
|
29
29
|
...m
|
|
30
30
|
}) => {
|
|
31
|
-
const { showCoinbaseFooter: f } = T(),
|
|
32
|
-
(e) =>
|
|
33
|
-
[
|
|
34
|
-
), N =
|
|
31
|
+
const { showCoinbaseFooter: f } = T(), r = O(), l = i !== void 0, [C, h] = v(!1), b = l ? i : C, s = p(
|
|
32
|
+
(e) => l ? c?.(e) : h(e),
|
|
33
|
+
[l, c, h]
|
|
34
|
+
), N = p(() => {
|
|
35
35
|
s(!1);
|
|
36
36
|
}, [s]);
|
|
37
|
-
return /* @__PURE__ */ t($, { open:
|
|
38
|
-
/* @__PURE__ */ o(z, { asChild: !0, children:
|
|
37
|
+
return /* @__PURE__ */ t($, { open: b, onOpenChange: s, children: [
|
|
38
|
+
/* @__PURE__ */ o(z, { asChild: !0, children: g || /* @__PURE__ */ t(F, { variant: "primary", className: n.trigger, children: [
|
|
39
39
|
"Deposit ",
|
|
40
40
|
m.cryptoCurrency.toUpperCase()
|
|
41
41
|
] }) }),
|
|
@@ -52,7 +52,7 @@ import '../../assets/FundModal.css';const W = "FundModal-module__trigger___2IuXj
|
|
|
52
52
|
/* @__PURE__ */ o(
|
|
53
53
|
V,
|
|
54
54
|
{
|
|
55
|
-
"aria-labelledby":
|
|
55
|
+
"aria-labelledby": r,
|
|
56
56
|
openIn: u,
|
|
57
57
|
unmountOnTransactionSuccess: !0,
|
|
58
58
|
unmount: N,
|
|
@@ -63,9 +63,9 @@ import '../../assets/FundModal.css';const W = "FundModal-module__trigger___2IuXj
|
|
|
63
63
|
className: `${n["fund-inner"]} ${e === "transaction-status" ? n["tx-status"] : ""}`,
|
|
64
64
|
children: [
|
|
65
65
|
/* @__PURE__ */ t("div", { className: n["title-buttons"], children: [
|
|
66
|
-
e === "error" ? /* @__PURE__ */ o(M, { children: /* @__PURE__ */ o(a, { id:
|
|
66
|
+
e === "error" ? /* @__PURE__ */ o(M, { children: /* @__PURE__ */ o(a, { id: r, children: d }) }) : /* @__PURE__ */ o(a, { className: n.title, id: r, children: d }),
|
|
67
67
|
/* @__PURE__ */ o(k, { asChild: !0, children: /* @__PURE__ */ o(
|
|
68
|
-
|
|
68
|
+
F,
|
|
69
69
|
{
|
|
70
70
|
className: n["close-button"],
|
|
71
71
|
"aria-label": "Close",
|
|
@@ -88,5 +88,5 @@ import '../../assets/FundModal.css';const W = "FundModal-module__trigger___2IuXj
|
|
|
88
88
|
] });
|
|
89
89
|
};
|
|
90
90
|
export {
|
|
91
|
-
Y as
|
|
91
|
+
Y as FundModal
|
|
92
92
|
};
|
|
@@ -1,92 +1,92 @@
|
|
|
1
1
|
import { jsxs as s, jsx as a } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as g, useRef as u,
|
|
3
|
-
import { useAmountInput as
|
|
4
|
-
import { useInputScale as
|
|
5
|
-
import '../../../assets/AmountInput.css';const w = "AmountInput-module__input___Af-R1", E = "AmountInput-module__visible___qmvT0", G = "AmountInput-module__hidden___cO0sQ",
|
|
2
|
+
import { forwardRef as g, useRef as u, useMemo as j, useCallback as q, useEffect as h } from "react";
|
|
3
|
+
import { useAmountInput as z } from "./useAmountInput.js";
|
|
4
|
+
import { useInputScale as M } from "./useInputScale.js";
|
|
5
|
+
import '../../../assets/AmountInput.css';const w = "AmountInput-module__input___Af-R1", E = "AmountInput-module__visible___qmvT0", G = "AmountInput-module__hidden___cO0sQ", O = "AmountInput-module__unit___-zmGz", n = {
|
|
6
6
|
"amount-input": "AmountInput-module__amount-input___24NlC",
|
|
7
7
|
input: w,
|
|
8
8
|
"amount-unit": "AmountInput-module__amount-unit___48d60",
|
|
9
9
|
visible: E,
|
|
10
10
|
hidden: G,
|
|
11
|
-
unit:
|
|
12
|
-
},
|
|
11
|
+
unit: O
|
|
12
|
+
}, P = g(
|
|
13
13
|
({
|
|
14
|
-
amount:
|
|
15
|
-
className:
|
|
16
|
-
unit:
|
|
17
|
-
decimalPlaces:
|
|
18
|
-
locale:
|
|
19
|
-
max:
|
|
20
|
-
min:
|
|
14
|
+
amount: I,
|
|
15
|
+
className: A = "",
|
|
16
|
+
unit: p,
|
|
17
|
+
decimalPlaces: r = 2,
|
|
18
|
+
locale: R,
|
|
19
|
+
max: v,
|
|
20
|
+
min: C,
|
|
21
21
|
setAmount: N,
|
|
22
22
|
onBlur: y,
|
|
23
|
-
onPaste:
|
|
24
|
-
placeholder:
|
|
25
|
-
|
|
26
|
-
},
|
|
27
|
-
const o = u(null),
|
|
23
|
+
onPaste: $,
|
|
24
|
+
placeholder: c = "0",
|
|
25
|
+
...b
|
|
26
|
+
}, t) => {
|
|
27
|
+
const o = u(null), i = u(null), m = u(null), d = u(null), _ = u(null), e = j(() => p?.toUpperCase(), [p]), { handleBlur: x, handleChange: B, handleBeforeInput: k, handlePaste: S, inputValue: l } = z(
|
|
28
28
|
{
|
|
29
|
-
amount:
|
|
30
|
-
decimalPlaces:
|
|
31
|
-
locale:
|
|
32
|
-
max:
|
|
33
|
-
min:
|
|
29
|
+
amount: I,
|
|
30
|
+
decimalPlaces: r,
|
|
31
|
+
locale: R,
|
|
32
|
+
max: v,
|
|
33
|
+
min: C,
|
|
34
34
|
setAmount: N,
|
|
35
35
|
onBlur: y,
|
|
36
|
-
onPaste:
|
|
36
|
+
onPaste: $
|
|
37
37
|
}
|
|
38
|
-
), { updateScale:
|
|
39
|
-
containerRef:
|
|
40
|
-
measureRef:
|
|
41
|
-
valueRef:
|
|
38
|
+
), { updateScale: f } = M({
|
|
39
|
+
containerRef: i,
|
|
40
|
+
measureRef: m,
|
|
41
|
+
valueRef: d,
|
|
42
42
|
inputRef: o,
|
|
43
|
-
scaleWrapperRef:
|
|
44
|
-
}),
|
|
45
|
-
|
|
43
|
+
scaleWrapperRef: _
|
|
44
|
+
}), U = q(() => {
|
|
45
|
+
i.current?.querySelector("input[type='text']")?.focus();
|
|
46
46
|
}, []);
|
|
47
|
-
return
|
|
48
|
-
|
|
49
|
-
}, [
|
|
50
|
-
|
|
51
|
-
}, [
|
|
52
|
-
/* @__PURE__ */ s("span", { ref:
|
|
47
|
+
return h(() => {
|
|
48
|
+
f();
|
|
49
|
+
}, [l, e, r, f]), h(() => {
|
|
50
|
+
t && (typeof t == "function" ? t(o.current) : t.current = o.current);
|
|
51
|
+
}, [t]), /* @__PURE__ */ s("span", { ref: i, className: n["amount-input"], children: [
|
|
52
|
+
/* @__PURE__ */ s("span", { ref: _, className: `${n["amount-unit"]} ${n.visible}`, children: [
|
|
53
53
|
/* @__PURE__ */ a(
|
|
54
54
|
"input",
|
|
55
55
|
{
|
|
56
|
-
className: `${n.input} ${
|
|
56
|
+
className: `${n.input} ${A}`,
|
|
57
57
|
inputMode: "decimal",
|
|
58
|
-
onBlur:
|
|
59
|
-
onChange:
|
|
60
|
-
onBeforeInput:
|
|
61
|
-
onPaste:
|
|
62
|
-
placeholder:
|
|
58
|
+
onBlur: x,
|
|
59
|
+
onChange: B,
|
|
60
|
+
onBeforeInput: k,
|
|
61
|
+
onPaste: S,
|
|
62
|
+
placeholder: c,
|
|
63
63
|
ref: o,
|
|
64
64
|
type: "text",
|
|
65
|
-
value:
|
|
66
|
-
|
|
65
|
+
value: l,
|
|
66
|
+
...b
|
|
67
67
|
}
|
|
68
68
|
),
|
|
69
|
-
|
|
69
|
+
e && /* @__PURE__ */ a("span", { className: n.unit, onClick: U, children: e })
|
|
70
70
|
] }),
|
|
71
71
|
/* @__PURE__ */ s(
|
|
72
72
|
"span",
|
|
73
73
|
{
|
|
74
|
-
ref:
|
|
74
|
+
ref: m,
|
|
75
75
|
"aria-hidden": "true",
|
|
76
76
|
className: `${n["amount-unit"]} ${n.hidden}`,
|
|
77
77
|
children: [
|
|
78
|
-
/* @__PURE__ */ s("span", { ref:
|
|
79
|
-
|
|
78
|
+
/* @__PURE__ */ s("span", { ref: d, children: [
|
|
79
|
+
l || c,
|
|
80
80
|
" "
|
|
81
81
|
] }),
|
|
82
|
-
|
|
82
|
+
e && /* @__PURE__ */ a("span", { children: e })
|
|
83
83
|
]
|
|
84
84
|
}
|
|
85
85
|
)
|
|
86
86
|
] });
|
|
87
87
|
}
|
|
88
88
|
);
|
|
89
|
-
|
|
89
|
+
P.displayName = "AmountInput";
|
|
90
90
|
export {
|
|
91
|
-
|
|
91
|
+
P as AmountInput
|
|
92
92
|
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsxs as o, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import { SvgIcon as t } from "./SvgIcon.js";
|
|
4
|
+
const h = (C) => /* @__PURE__ */ o(t, { width: "25", height: "24", viewBox: "0 0 25 24", fill: "currentColor", ...C, children: [
|
|
5
|
+
/* @__PURE__ */ r("path", { d: "M10.4523 10.6689L9.48873 8.35229L8.52518 10.6689L6.02417 10.8694L7.92968 12.5017L7.34752 14.9423L9.48873 13.6344L11.63 14.9423L11.0478 12.5017L12.9533 10.8694L10.4523 10.6689Z" }),
|
|
6
|
+
/* @__PURE__ */ r("path", { d: "M9.48877 20.4951C14.1832 20.4951 17.9888 16.6895 17.9888 11.9951C17.9888 7.3007 14.1832 3.49512 9.48877 3.49512C4.79435 3.49512 0.98877 7.3007 0.98877 11.9951C0.98877 16.6895 4.79435 20.4951 9.48877 20.4951ZM9.48877 18.4951C5.89892 18.4951 2.98877 15.585 2.98877 11.9951C2.98877 8.40527 5.89892 5.49512 9.48877 5.49512C13.0786 5.49512 15.9888 8.40527 15.9888 11.9951C15.9888 15.585 13.0786 18.4951 9.48877 18.4951Z" }),
|
|
7
|
+
/* @__PURE__ */ r("path", { d: "M18.9888 20.1215C22.4631 19.0539 24.9888 15.8194 24.9888 11.9951C24.9888 8.17069 22.4631 4.93622 18.9888 3.86865V5.99322C21.3377 6.97278 22.9888 9.2911 22.9888 11.9951C22.9888 14.699 21.3377 17.0173 18.9888 17.9969V20.1215Z" })
|
|
8
|
+
] });
|
|
9
|
+
export {
|
|
10
|
+
h as IconCurrencies
|
|
11
|
+
};
|
package/dist/index.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { AUTH_METHODS as e, CDPReactProvider as t, useAppConfig as n } from "./components/CDPReactProvider/index.js";
|
|
2
2
|
import { AuthButton as p } from "./components/AuthButton/index.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { SendTransactionButton as
|
|
6
|
-
import { SignIn as
|
|
7
|
-
import { useSignInReducer as
|
|
8
|
-
import { SignOutButton as
|
|
3
|
+
import { Fund as x, FundFooter as i } from "./components/Fund/index.js";
|
|
4
|
+
import { FundModal as s } from "./components/FundModal/index.js";
|
|
5
|
+
import { SendTransactionButton as I } from "./components/SendTransactionButton/index.js";
|
|
6
|
+
import { SignIn as l } from "./components/SignIn/index.js";
|
|
7
|
+
import { useSignInReducer as S } from "./components/SignIn/useSignInReducer.js";
|
|
8
|
+
import { SignOutButton as h } from "./components/SignOutButton/index.js";
|
|
9
9
|
import { SignInModal as C } from "./components/SignInModal/index.js";
|
|
10
|
-
import { ThemeProvider as
|
|
11
|
-
import { cssVariables as
|
|
12
|
-
import { theme as
|
|
13
|
-
import { colors as
|
|
14
|
-
import { flattenTokensObject as
|
|
15
|
-
import { IconArrowLeft as
|
|
16
|
-
import { IconArrowsUpDown as
|
|
10
|
+
import { ThemeProvider as k, useTheme as A } from "./components/ThemeProvider/index.js";
|
|
11
|
+
import { cssVariables as E } from "./theme/cssVariables.js";
|
|
12
|
+
import { theme as v } from "./theme/theme.js";
|
|
13
|
+
import { colors as D, colorsBase as P, colorsComponents as b, colorsSemantic as O, font as U, tokens as V } from "./theme/tokens.js";
|
|
14
|
+
import { flattenTokensObject as L, themeToCssVariables as R } from "./theme/utils.js";
|
|
15
|
+
import { IconArrowLeft as N } from "./icons/IconArrowLeft.js";
|
|
16
|
+
import { IconArrowsUpDown as _ } from "./icons/IconArrowsUpDown.js";
|
|
17
17
|
import { IconCheck as y } from "./icons/IconCheck.js";
|
|
18
18
|
import { IconCheckCircle as G } from "./icons/IconCheckCircle.js";
|
|
19
19
|
import { IconChevronDown as K } from "./icons/IconChevronDown.js";
|
|
@@ -23,28 +23,33 @@ import { IconExclamationTriangle as oo } from "./icons/IconExclamationTriangle.j
|
|
|
23
23
|
import { IconLock as eo } from "./icons/IconLock.js";
|
|
24
24
|
import { IconPhone as no } from "./icons/IconPhone.js";
|
|
25
25
|
import { IconXMark as po } from "./icons/IconXMark.js";
|
|
26
|
-
import { clamp as
|
|
27
|
-
import { getMessageFromUnknownError as
|
|
28
|
-
import { isApiError as
|
|
29
|
-
import { isEmailInvalid as
|
|
26
|
+
import { clamp as xo } from "./utils/clamp.js";
|
|
27
|
+
import { getMessageFromUnknownError as co } from "./utils/getMessageFromUnknownError.js";
|
|
28
|
+
import { isApiError as ao } from "./utils/isApiError.js";
|
|
29
|
+
import { isEmailInvalid as uo } from "./utils/isEmailInvalid.js";
|
|
30
30
|
import { parseValuesFromPhoneNumber as go } from "./utils/parseValuesFromPhoneNumber.js";
|
|
31
|
-
import { FundForm as
|
|
31
|
+
import { FundForm as ho } from "./components/Fund/FundForm.js";
|
|
32
32
|
import { FundTitle as Co } from "./components/Fund/FundTitle.js";
|
|
33
|
-
import { useFundContext as
|
|
34
|
-
import { SignInAuthMethodButtons as
|
|
35
|
-
import { SignInBackButton as
|
|
36
|
-
import { SignInDescription as
|
|
37
|
-
import { SignInFooter as
|
|
38
|
-
import { SignInForm as
|
|
39
|
-
import { SignInImage as
|
|
40
|
-
import { SignInTitle as
|
|
41
|
-
import { useSignInContext as
|
|
33
|
+
import { useFundContext as ko } from "./components/Fund/FundProvider.js";
|
|
34
|
+
import { SignInAuthMethodButtons as Bo } from "./components/SignIn/SignInAuthMethodButtons.js";
|
|
35
|
+
import { SignInBackButton as Mo } from "./components/SignIn/SignInBackButton.js";
|
|
36
|
+
import { SignInDescription as wo } from "./components/SignIn/SignInDescription.js";
|
|
37
|
+
import { SignInFooter as Po } from "./components/SignIn/SignInFooter.js";
|
|
38
|
+
import { SignInForm as Oo } from "./components/SignIn/SignInForm.js";
|
|
39
|
+
import { SignInImage as Vo } from "./components/SignIn/SignInImage.js";
|
|
40
|
+
import { SignInTitle as Lo } from "./components/SignIn/SignInTitle.js";
|
|
41
|
+
import { useSignInContext as jo } from "./components/SignIn/SignInProvider.js";
|
|
42
42
|
export {
|
|
43
43
|
e as AUTH_METHODS,
|
|
44
44
|
p as AuthButton,
|
|
45
45
|
t as CDPReactProvider,
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
x as Fund,
|
|
47
|
+
i as FundFooter,
|
|
48
|
+
ho as FundForm,
|
|
49
|
+
s as FundModal,
|
|
50
|
+
Co as FundTitle,
|
|
51
|
+
N as IconArrowLeft,
|
|
52
|
+
_ as IconArrowsUpDown,
|
|
48
53
|
y as IconCheck,
|
|
49
54
|
G as IconCheckCircle,
|
|
50
55
|
K as IconChevronDown,
|
|
@@ -54,41 +59,36 @@ export {
|
|
|
54
59
|
eo as IconLock,
|
|
55
60
|
no as IconPhone,
|
|
56
61
|
po as IconXMark,
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
62
|
+
I as SendTransactionButton,
|
|
63
|
+
l as SignIn,
|
|
64
|
+
Bo as SignInAuthMethodButtons,
|
|
65
|
+
Mo as SignInBackButton,
|
|
66
|
+
wo as SignInDescription,
|
|
67
|
+
Po as SignInFooter,
|
|
68
|
+
Oo as SignInForm,
|
|
69
|
+
Vo as SignInImage,
|
|
65
70
|
C as SignInModal,
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
71
|
+
Lo as SignInTitle,
|
|
72
|
+
h as SignOutButton,
|
|
73
|
+
k as ThemeProvider,
|
|
74
|
+
xo as clamp,
|
|
75
|
+
D as colors,
|
|
76
|
+
P as colorsBase,
|
|
77
|
+
b as colorsComponents,
|
|
78
|
+
O as colorsSemantic,
|
|
79
|
+
E as cssVariables,
|
|
80
|
+
L as flattenTokensObject,
|
|
81
|
+
U as font,
|
|
82
|
+
co as getMessageFromUnknownError,
|
|
83
|
+
ao as isApiError,
|
|
84
|
+
uo as isEmailInvalid,
|
|
80
85
|
go as parseValuesFromPhoneNumber,
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
f as unstable_Fund,
|
|
85
|
-
s as unstable_FundFooter,
|
|
86
|
-
So as unstable_FundForm,
|
|
87
|
-
i as unstable_FundModal,
|
|
88
|
-
Co as unstable_FundTitle,
|
|
89
|
-
bo as unstable_useFundContext,
|
|
86
|
+
v as theme,
|
|
87
|
+
R as themeToCssVariables,
|
|
88
|
+
V as tokens,
|
|
90
89
|
n as useAppConfig,
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
90
|
+
ko as useFundContext,
|
|
91
|
+
jo as useSignInContext,
|
|
92
|
+
S as useSignInReducer,
|
|
93
|
+
A as useTheme
|
|
94
94
|
};
|
package/dist/theme/theme.d.ts
CHANGED
|
@@ -168,7 +168,7 @@ export declare const theme: Flattened<{
|
|
|
168
168
|
};
|
|
169
169
|
readonly border: {
|
|
170
170
|
readonly default: {
|
|
171
|
-
readonly value: "{colors.line.
|
|
171
|
+
readonly value: "{colors.line.default}";
|
|
172
172
|
};
|
|
173
173
|
readonly focus: {
|
|
174
174
|
readonly value: "{colors.line.primary}";
|
|
@@ -209,7 +209,7 @@ export declare const theme: Flattened<{
|
|
|
209
209
|
};
|
|
210
210
|
readonly border: {
|
|
211
211
|
readonly default: {
|
|
212
|
-
readonly value: "{colors.line.
|
|
212
|
+
readonly value: "{colors.line.default}";
|
|
213
213
|
};
|
|
214
214
|
readonly focus: {
|
|
215
215
|
readonly value: "{colors.line.primary}";
|
package/dist/theme/tokens.d.ts
CHANGED
|
@@ -253,7 +253,7 @@ export declare const colorsComponents: {
|
|
|
253
253
|
};
|
|
254
254
|
readonly border: {
|
|
255
255
|
readonly default: {
|
|
256
|
-
readonly value: "{colors.line.
|
|
256
|
+
readonly value: "{colors.line.default}";
|
|
257
257
|
};
|
|
258
258
|
readonly focus: {
|
|
259
259
|
readonly value: "{colors.line.primary}";
|
|
@@ -294,7 +294,7 @@ export declare const colorsComponents: {
|
|
|
294
294
|
};
|
|
295
295
|
readonly border: {
|
|
296
296
|
readonly default: {
|
|
297
|
-
readonly value: "{colors.line.
|
|
297
|
+
readonly value: "{colors.line.default}";
|
|
298
298
|
};
|
|
299
299
|
readonly focus: {
|
|
300
300
|
readonly value: "{colors.line.primary}";
|
|
@@ -517,7 +517,7 @@ export declare const colors: {
|
|
|
517
517
|
};
|
|
518
518
|
readonly border: {
|
|
519
519
|
readonly default: {
|
|
520
|
-
readonly value: "{colors.line.
|
|
520
|
+
readonly value: "{colors.line.default}";
|
|
521
521
|
};
|
|
522
522
|
readonly focus: {
|
|
523
523
|
readonly value: "{colors.line.primary}";
|
|
@@ -558,7 +558,7 @@ export declare const colors: {
|
|
|
558
558
|
};
|
|
559
559
|
readonly border: {
|
|
560
560
|
readonly default: {
|
|
561
|
-
readonly value: "{colors.line.
|
|
561
|
+
readonly value: "{colors.line.default}";
|
|
562
562
|
};
|
|
563
563
|
readonly focus: {
|
|
564
564
|
readonly value: "{colors.line.primary}";
|
|
@@ -868,7 +868,7 @@ export declare const tokens: {
|
|
|
868
868
|
};
|
|
869
869
|
readonly border: {
|
|
870
870
|
readonly default: {
|
|
871
|
-
readonly value: "{colors.line.
|
|
871
|
+
readonly value: "{colors.line.default}";
|
|
872
872
|
};
|
|
873
873
|
readonly focus: {
|
|
874
874
|
readonly value: "{colors.line.primary}";
|
|
@@ -909,7 +909,7 @@ export declare const tokens: {
|
|
|
909
909
|
};
|
|
910
910
|
readonly border: {
|
|
911
911
|
readonly default: {
|
|
912
|
-
readonly value: "{colors.line.
|
|
912
|
+
readonly value: "{colors.line.default}";
|
|
913
913
|
};
|
|
914
914
|
readonly focus: {
|
|
915
915
|
readonly value: "{colors.line.primary}";
|
package/dist/theme/tokens.js
CHANGED
|
@@ -153,7 +153,7 @@ const e = {
|
|
|
153
153
|
default: { value: "{colors.bg.default}" }
|
|
154
154
|
},
|
|
155
155
|
border: {
|
|
156
|
-
default: { value: "{colors.line.
|
|
156
|
+
default: { value: "{colors.line.default}" },
|
|
157
157
|
focus: { value: "{colors.line.primary}" },
|
|
158
158
|
error: { value: "{colors.line.negative}" },
|
|
159
159
|
success: { value: "{colors.line.positive}" }
|
|
@@ -176,7 +176,7 @@ const e = {
|
|
|
176
176
|
default: { value: "{colors.bg.default}" }
|
|
177
177
|
},
|
|
178
178
|
border: {
|
|
179
|
-
default: { value: "{colors.line.
|
|
179
|
+
default: { value: "{colors.line.default}" },
|
|
180
180
|
focus: { value: "{colors.line.primary}" },
|
|
181
181
|
error: { value: "{colors.line.negative}" },
|
|
182
182
|
success: { value: "{colors.line.positive}" }
|