@coinbase/cdp-react 0.0.28 → 0.0.29

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.
@@ -1 +1 @@
1
- .AmountInput-module__amount-input___24NlC{box-sizing:border-box;color:var(--cdp-web-colors-page-text-default);font-family:var(--cdp-web-font-family-sans);font-size:var(--cdp-web-font-size-base);line-height:1.2;display:flex;align-items:center;justify-content:flex-start;gap:.25rem;overflow:hidden;position:relative;width:100%}.AmountInput-module__input___Af-R1{appearance:textfield;background-color:transparent;color:var(--cdp-web-colors-page-text-default);border:0;font-size:1em;font-family:var(--cdp-web-font-family-sans);font-weight:600;margin:0;outline:0;padding:0;width:1em}.AmountInput-module__input___Af-R1::placeholder{color:var(--cdp-web-colors-page-text-muted)}.AmountInput-module__amount-unit___48d60{font-size:3.75em;font-weight:600;display:flex;align-items:center;justify-content:flex-start}.AmountInput-module__amount-unit___48d60.AmountInput-module__visible___qmvT0{cursor:text;transform-origin:left center}.AmountInput-module__hidden___cO0sQ{visibility:hidden;position:absolute;pointer-events:none}.AmountInput-module__unit___-zmGz{color:var(--cdp-web-colors-page-text-muted);text-transform:uppercase}
1
+ .AmountInput-module__amount-input___24NlC{box-sizing:border-box;color:var(--cdp-web-colors-page-text-default);font-family:var(--cdp-web-font-family-sans);font-size:var(--cdp-web-font-size-base);line-height:1.2;display:flex;align-items:center;justify-content:flex-start;gap:.25rem;overflow:hidden;position:relative;width:100%}.AmountInput-module__input___Af-R1{appearance:textfield;background-color:transparent;color:var(--cdp-web-colors-page-text-default);border:0;font-size:1em;font-family:var(--cdp-web-font-family-sans);font-weight:500;margin:0;outline:0;padding:0;width:1em}.AmountInput-module__input___Af-R1::placeholder{color:var(--cdp-web-colors-page-text-muted)}.AmountInput-module__amount-unit___48d60{font-size:3.75em;font-weight:500;display:flex;align-items:center;justify-content:flex-start}.AmountInput-module__amount-unit___48d60.AmountInput-module__visible___qmvT0{cursor:text;transform-origin:left center}.AmountInput-module__hidden___cO0sQ{visibility:hidden;position:absolute;pointer-events:none}.AmountInput-module__unit___-zmGz{color:var(--cdp-web-colors-page-text-muted)}
@@ -1 +1 @@
1
- .Button-module__btn___Wj6Dr{--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;border-radius:9999em}.Button-module__link-primary___6Zgkh,.Button-module__link-secondary___S0Qdo{padding:0 .25em}.Button-module__primary___WGT--{background-color:var(--cdp-web-colors-cta-primary-bg-default);color:var(--cdp-web-colors-cta-primary-text-default)}.Button-module__primary___WGT--:hover{background-color:var(--cdp-web-colors-cta-primary-bg-hover);color:var(--cdp-web-colors-cta-primary-text-hover)}.Button-module__primary___WGT--:focus{outline:none}.Button-module__primary___WGT--: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___Fx0LJ{background-color:var(--cdp-web-colors-cta-secondary-bg-default);color:var(--cdp-web-colors-cta-secondary-text-default)}.Button-module__secondary___Fx0LJ:hover{background-color:var(--cdp-web-colors-cta-secondary-bg-hover);color:var(--cdp-web-colors-cta-secondary-text-hover)}.Button-module__secondary___Fx0LJ:focus{outline:none}.Button-module__secondary___Fx0LJ: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___6Zgkh,.Button-module__transparent-primary___iwWv5{background-color:transparent;color:var(--cdp-web-colors-link-primary-text-default)}.Button-module__link-primary___6Zgkh:hover,.Button-module__transparent-primary___iwWv5:hover{color:var(--cdp-web-colors-link-primary-text-hover)}.Button-module__link-primary___6Zgkh:focus,.Button-module__transparent-primary___iwWv5:focus{outline:none}.Button-module__link-primary___6Zgkh:focus-visible,.Button-module__transparent-primary___iwWv5:focus-visible{--cdp-web-button-ring-color: var(--cdp-web-colors-link-primary-text-default);outline:none}.Button-module__link-secondary___S0Qdo,.Button-module__transparent-secondary___GfRXu{background-color:transparent;color:var(--cdp-web-colors-link-secondary-text-default)}.Button-module__link-secondary___S0Qdo:hover,.Button-module__transparent-secondary___GfRXu:hover{color:var(--cdp-web-colors-link-secondary-text-hover)}.Button-module__link-secondary___S0Qdo:focus,.Button-module__transparent-secondary___GfRXu:focus{outline:none}.Button-module__link-secondary___S0Qdo:focus-visible,.Button-module__transparent-secondary___GfRXu:focus-visible{--cdp-web-button-ring-color: var(--cdp-web-colors-link-secondary-text-default);outline:none}.Button-module__control-btn___9Gkoz{--cdp-web-button-ring-inset-color: var(--cdp-web-colors-input-border-default);--cdp-web-button-ring-inset-width: 1px;background-color:var(--cdp-web-colors-input-bg-default);border-radius:.5em;color:var(--cdp-web-colors-input-text-default);font-weight:400}.Button-module__control-btn___9Gkoz:focus{outline:none}.Button-module__control-btn___9Gkoz:focus-visible{--cdp-web-button-ring-inset-color: var(--cdp-web-colors-input-border-focus);--cdp-web-button-ring-inset-width: 2px;outline:none}
1
+ .Button-module__btn___Wj6Dr{--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;border-radius:9999em}.Button-module__link-primary___6Zgkh,.Button-module__link-secondary___S0Qdo{padding:0 .25em}.Button-module__primary___WGT--{background-color:var(--cdp-web-colors-cta-primary-bg-default);color:var(--cdp-web-colors-cta-primary-text-default)}.Button-module__primary___WGT--:hover{background-color:var(--cdp-web-colors-cta-primary-bg-hover);color:var(--cdp-web-colors-cta-primary-text-hover)}.Button-module__primary___WGT--:focus{outline:none}.Button-module__primary___WGT--: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___Fx0LJ{background-color:var(--cdp-web-colors-cta-secondary-bg-default);color:var(--cdp-web-colors-cta-secondary-text-default)}.Button-module__secondary___Fx0LJ:hover{background-color:var(--cdp-web-colors-cta-secondary-bg-hover);color:var(--cdp-web-colors-cta-secondary-text-hover)}.Button-module__secondary___Fx0LJ:focus{outline:none}.Button-module__secondary___Fx0LJ: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___6Zgkh,.Button-module__transparent-primary___iwWv5{background-color:transparent;color:var(--cdp-web-colors-link-primary-text-default)}.Button-module__link-primary___6Zgkh:hover,.Button-module__transparent-primary___iwWv5:hover{color:var(--cdp-web-colors-link-primary-text-hover)}.Button-module__link-primary___6Zgkh:focus,.Button-module__transparent-primary___iwWv5:focus{outline:none}.Button-module__link-primary___6Zgkh:focus-visible,.Button-module__transparent-primary___iwWv5:focus-visible{--cdp-web-button-ring-color: var(--cdp-web-colors-link-primary-text-default);outline:none}.Button-module__link-secondary___S0Qdo,.Button-module__transparent-secondary___GfRXu{background-color:transparent;color:var(--cdp-web-colors-link-secondary-text-default)}.Button-module__link-secondary___S0Qdo:hover,.Button-module__transparent-secondary___GfRXu:hover{color:var(--cdp-web-colors-link-secondary-text-hover)}.Button-module__link-secondary___S0Qdo:focus,.Button-module__transparent-secondary___GfRXu:focus{outline:none}.Button-module__link-secondary___S0Qdo:focus-visible,.Button-module__transparent-secondary___GfRXu:focus-visible{--cdp-web-button-ring-color: var(--cdp-web-colors-link-secondary-text-default);outline:none}.Button-module__control-btn___9Gkoz{--cdp-web-button-ring-inset-color: var(--cdp-web-colors-select-trigger-border-default);--cdp-web-button-ring-inset-width: 1px;background-color:var(--cdp-web-colors-select-trigger-bg-default);border-radius:.5em;color:var(--cdp-web-colors-select-trigger-text-default);font-weight:400}.Button-module__control-btn___9Gkoz:focus{outline:none}.Button-module__control-btn___9Gkoz:focus-visible{--cdp-web-button-ring-inset-color: var(--cdp-web-colors-input-border-focus);--cdp-web-button-ring-inset-width: 2px;outline:none}
@@ -1,68 +1,64 @@
1
1
  import { jsx as r, jsxs as H } from "react/jsx-runtime";
2
- import { useRef as f, useState as p, useCallback as a, useEffect as h, useMemo as J } from "react";
2
+ import { useRef as c, useState as h, useCallback as s, useEffect as y, useMemo as J } from "react";
3
3
  import { Button as Y } from "../ui/Button/index.js";
4
4
  import { SwitchFadeTransition as Q } from "../ui/SwitchFadeTransition/index.js";
5
5
  import { useTimer as X } from "../../hooks/useTimer.js";
6
6
  import { formatFiat as w } from "../../utils/formatFiat.js";
7
7
  import { openPopup as Z } from "../../utils/openPopup.js";
8
- import { FundAmountInput as O } from "./components/FundAmountInput.js";
9
- import { FundErrorScreen as tt } from "./components/FundErrorScreen.js";
10
- import { FundPaymentMethods as et } from "./components/FundPaymentMethods.js";
11
- import { FundPresetAmountInputs as rt } from "./components/FundPresetAmountInputs.js";
12
- import { FundTransactionStatus as nt } from "./components/FundTransactionStatus.js";
13
- import { useFundContext as ot } from "./FundProvider.js";
8
+ import { FundAmountInput as tt } from "./components/FundAmountInput.js";
9
+ import { FundErrorScreen as et } from "./components/FundErrorScreen.js";
10
+ import { FundPaymentMethods as rt } from "./components/FundPaymentMethods.js";
11
+ import { FundPresetAmountInputs as nt } from "./components/FundPresetAmountInputs.js";
12
+ import { FundTransactionStatus as ot } from "./components/FundTransactionStatus.js";
13
+ import { useFundContext as st } from "./FundProvider.js";
14
14
  import { usePopupMonitor as it } from "./hooks/usePopupMonitor.js";
15
- import '../../assets/FundForm.css';const at = "FundForm-module__view___5V1qO", st = "FundForm-module__form___TIzVJ", B = {
15
+ import '../../assets/FundForm.css';const at = "FundForm-module__view___5V1qO", ut = "FundForm-module__form___TIzVJ", B = {
16
16
  view: at,
17
- form: st
18
- }, mt = ["form", "error", "transaction-status"], _t = ({
19
- className: E = "",
20
- children: y,
21
- onPopupClose: A,
22
- onPopupOpen: M,
17
+ form: ut
18
+ }, mt = ["form", "error", "transaction-status"], Ft = ({
19
+ className: T = "",
20
+ children: A,
21
+ onPopupClose: N,
22
+ onPopupOpen: S,
23
23
  onSubmit: I,
24
24
  openIn: V,
25
25
  submitLabel: D,
26
- unmountOnTransactionError: s = !1,
27
- unmountOnTransactionSuccess: m = !1,
28
- unmount: u,
29
- ...T
26
+ unmountOnTransactionError: d = !1,
27
+ unmountOnTransactionSuccess: p = !1,
28
+ unmount: a,
29
+ ...$
30
30
  }) => {
31
- const { state: t, dispatch: N, fetchBuyUrl: P } = ot(), g = f(t.fiatAmount === void 0 ? NaN : t.fiatAmount), [$, S] = p(!1), [k, _] = p(!1), F = f(null), [j, K] = p(null), v = f(null), C = f(null), o = f(null), {
32
- timeRemaining: d,
33
- start: R,
34
- reset: U
35
- } = X(), n = a((e) => {
36
- C.current !== e && (C.current = e, v.current?.transition.toggle(e));
37
- }, []), l = a(() => {
38
- u && (o.current === "transactionSuccess" && m || o.current === "error" && s) ? u() : n("form"), o.current = null, N({
31
+ const { state: t, dispatch: M, fetchBuyUrl: P } = st(), g = c(t.fiatAmount === void 0 ? NaN : t.fiatAmount), [k, _] = h(!1), [j, F] = h(!1), E = c(null), [K, L] = h(null), b = c(null), U = c(null), u = c(null), l = s(
32
+ (e) => (e === "transactionSuccess" || e === "transactionSubmitted") && p || e === "error" && d,
33
+ [p, d]
34
+ ), {
35
+ timeRemaining: f,
36
+ start: v,
37
+ reset: C
38
+ } = X(), n = s((e) => {
39
+ U.current !== e && (U.current = e, b.current?.transition.toggle(e));
40
+ }, []), m = s(() => {
41
+ a && l(u.current) ? a() : n("form"), u.current = null, M({
39
42
  type: "SET_TRANSACTION_STATUS",
40
43
  payload: { transactionStatus: { statusName: "init", statusData: null } }
41
44
  });
42
- }, [n, N, u, m, s]), L = a(() => {
43
- u && (o.current === "transactionSuccess" && m || o.current === "error" && s) ? R(3) : o.current === null && l(), A?.();
44
- }, [
45
- R,
46
- A,
47
- l,
48
- u,
49
- m,
50
- s
51
- ]);
52
- h(() => {
53
- d !== null && d <= 0 && (l(), U());
54
- }, [d, l, U]), h(() => {
55
- (t.transactionStatus.statusName === "transactionSuccess" || t.transactionStatus.statusName === "error") && (o.current = t.transactionStatus.statusName);
56
- }, [t.transactionStatus.statusName]), h(() => {
45
+ }, [n, M, a, l]), O = s(() => {
46
+ a && l(u.current) ? v(3) : u.current === null && m(), N?.();
47
+ }, [v, N, m, a, l]);
48
+ y(() => {
49
+ f !== null && f <= 0 && (m(), C());
50
+ }, [f, m, C]), y(() => {
51
+ (t.transactionStatus.statusName === "transactionSubmitted" || t.transactionStatus.statusName === "transactionSuccess" || t.transactionStatus.statusName === "error") && (u.current = t.transactionStatus.statusName);
52
+ }, [t.transactionStatus.statusName]), y(() => {
57
53
  t.paymentMethodsError?.message && n("error");
58
54
  }, [t.paymentMethodsError?.message, n]);
59
- const { startPopupMonitor: b } = it(L), W = a(
55
+ const { startPopupMonitor: R } = it(O), W = s(
60
56
  (e) => {
61
- e && (n("transaction-status"), b(e), M?.(e));
57
+ e && (n("transaction-status"), R(e), S?.(e));
62
58
  },
63
- [M, b, n]
64
- ), q = a(() => {
65
- (t.fiatAmount === void 0 || isNaN(t.fiatAmount)) && isNaN(g.current) || t.fiatAmount === g.current || S(!0);
59
+ [S, R, n]
60
+ ), q = s(() => {
61
+ (t.fiatAmount === void 0 || isNaN(t.fiatAmount)) && isNaN(g.current) || t.fiatAmount === g.current || _(!0);
66
62
  }, [t.fiatAmount]), x = J(() => {
67
63
  if (t.fiatAmount === void 0 || isNaN(t.fiatAmount))
68
64
  return "Enter an amount";
@@ -77,7 +73,7 @@ import '../../assets/FundForm.css';const at = "FundForm-module__view___5V1qO", s
77
73
  t.locale,
78
74
  t.selectedPaymentMethod?.minAmount,
79
75
  t.selectedPaymentMethod?.maxAmount
80
- ]), z = a(async () => {
76
+ ]), z = s(async () => {
81
77
  if (!(t.fiatAmount === void 0 || isNaN(t.fiatAmount) || !t.selectedPaymentMethod?.id))
82
78
  return P(
83
79
  {
@@ -85,7 +81,7 @@ import '../../assets/FundForm.css';const at = "FundForm-module__view___5V1qO", s
85
81
  paymentAmount: t.fiatAmount
86
82
  },
87
83
  (e) => {
88
- K({
84
+ L({
89
85
  code: e?.code || "UNKNOWN_BUY_URL_ERROR",
90
86
  message: e?.debugMessage || "Something went wrong fetching the buy url"
91
87
  }), n("error");
@@ -93,17 +89,17 @@ import '../../assets/FundForm.css';const at = "FundForm-module__view___5V1qO", s
93
89
  );
94
90
  }, [t.fiatAmount, t.selectedPaymentMethod?.id, P, n]), G = async (e) => {
95
91
  if (e.preventDefault(), x) {
96
- S(!0), F.current?.focus();
92
+ _(!0), E.current?.focus();
97
93
  return;
98
94
  }
99
- I?.(e), _(!0);
100
- const c = await z();
101
- if (_(!1), c)
95
+ I?.(e), F(!0);
96
+ const i = await z();
97
+ if (F(!1), i)
102
98
  if (V === "tab")
103
- window.open(c, "_blank");
99
+ window.open(i, "_blank");
104
100
  else {
105
- const i = Z({ url: c, width: 460, height: 720 });
106
- W(i);
101
+ const o = Z({ url: i, width: 460, height: 720 });
102
+ W(o);
107
103
  }
108
104
  };
109
105
  return /* @__PURE__ */ r(
@@ -113,44 +109,44 @@ import '../../assets/FundForm.css';const at = "FundForm-module__view___5V1qO", s
113
109
  timeout: 250,
114
110
  items: mt,
115
111
  initialEntered: !0,
116
- transitionRef: v,
117
- children: ({ itemKey: e, ...c }) => {
118
- let i = null;
119
- return e === "form" && (i = /* @__PURE__ */ H("form", { className: `${B.form} ${E}`, onSubmit: G, ...T, children: [
112
+ transitionRef: b,
113
+ children: ({ itemKey: e, ...i }) => {
114
+ let o = null;
115
+ return e === "form" && (o = /* @__PURE__ */ H("form", { className: `${B.form} ${T}`, onSubmit: G, ...$, children: [
120
116
  /* @__PURE__ */ r("div", { children: /* @__PURE__ */ r(
121
- O,
117
+ tt,
122
118
  {
123
- ref: F,
124
- error: $ ? x : void 0,
119
+ ref: E,
120
+ error: k ? x : void 0,
125
121
  onBlur: q
126
122
  }
127
123
  ) }),
124
+ /* @__PURE__ */ r(nt, {}),
128
125
  /* @__PURE__ */ r(rt, {}),
129
- /* @__PURE__ */ r(et, {}),
130
126
  /* @__PURE__ */ r(
131
127
  Y,
132
128
  {
133
129
  variant: "primary",
134
130
  type: "submit",
135
- isPending: k,
131
+ isPending: j,
136
132
  pendingLabel: "Getting purchase link",
137
133
  children: D || "Deposit"
138
134
  }
139
135
  )
140
- ] })), e === "error" && (i = /* @__PURE__ */ r(tt, { error: t.paymentMethodsError || j })), e === "transaction-status" && (i = /* @__PURE__ */ r(
141
- nt,
136
+ ] })), e === "error" && (o = /* @__PURE__ */ r(et, { error: t.paymentMethodsError || K })), e === "transaction-status" && (o = /* @__PURE__ */ r(
137
+ ot,
142
138
  {
143
- unmountOnSuccess: m,
144
- unmountOnError: s,
145
- reset: l,
146
- timeRemaining: d
139
+ unmountOnSuccess: p,
140
+ unmountOnError: d,
141
+ reset: m,
142
+ timeRemaining: f
147
143
  }
148
- )), /* @__PURE__ */ r("div", { ...c, className: B.view, children: y ? y({ view: e, Content: i }) : i });
144
+ )), /* @__PURE__ */ r("div", { ...i, className: B.view, children: A ? A({ view: e, Content: o }) : o });
149
145
  }
150
146
  }
151
147
  );
152
148
  };
153
149
  export {
154
- _t as FundForm,
150
+ Ft as FundForm,
155
151
  mt as VIEWS
156
152
  };
@@ -1,106 +1,125 @@
1
- import { jsx as s, jsxs as r, Fragment as i } from "react/jsx-runtime";
2
- import { useRef as d, useCallback as h, useEffect as S, useMemo as g } from "react";
3
- import { Button as l } from "../../ui/Button/index.js";
4
- import { LoadingSpinner as T } from "../../ui/LoadingSpinner/index.js";
5
- import { SwitchFadeTransition as N } from "../../ui/SwitchFadeTransition/index.js";
1
+ import { jsx as t, jsxs as c, Fragment as i } from "react/jsx-runtime";
2
+ import { useRef as l, useCallback as _, useEffect as S, useMemo as g } from "react";
3
+ import { Button as o } from "../../ui/Button/index.js";
4
+ import { LoadingSpinner as N } from "../../ui/LoadingSpinner/index.js";
5
+ import { SwitchFadeTransition as T } from "../../ui/SwitchFadeTransition/index.js";
6
6
  import { IconCheck as f } from "../../../icons/IconCheck.js";
7
- import { IconXMark as F } from "../../../icons/IconXMark.js";
7
+ import { IconCurrencies as $ } from "../../../icons/IconCurrencies.js";
8
+ import { IconXMark as w } from "../../../icons/IconXMark.js";
8
9
  import { useFundContext as m } from "../FundProvider.js";
9
- import '../../../assets/FundTransactionStatus.css';const y = "FundTransactionStatus-module__graphic___cam38", $ = "FundTransactionStatus-module__status___2zKJu", k = "FundTransactionStatus-module__pad___-9rGO", w = "FundTransactionStatus-module__spinner___94rMk", C = "FundTransactionStatus-module__icon___0hBQO", b = "FundTransactionStatus-module__subhead___0sHIM", M = "FundTransactionStatus-module__description___W7kK2", v = "FundTransactionStatus-module__ring___1vnCu", t = {
10
+ import '../../../assets/FundTransactionStatus.css';const y = "FundTransactionStatus-module__graphic___cam38", b = "FundTransactionStatus-module__status___2zKJu", C = "FundTransactionStatus-module__pad___-9rGO", F = "FundTransactionStatus-module__spinner___94rMk", k = "FundTransactionStatus-module__icon___0hBQO", v = "FundTransactionStatus-module__subhead___0sHIM", M = "FundTransactionStatus-module__description___W7kK2", W = "FundTransactionStatus-module__ring___1vnCu", s = {
10
11
  graphic: y,
11
- status: $,
12
- pad: k,
13
- spinner: w,
14
- icon: C,
12
+ status: b,
13
+ pad: C,
14
+ spinner: F,
15
+ icon: k,
15
16
  "icon-success": "FundTransactionStatus-module__icon-success___893VG",
16
17
  "icon-error": "FundTransactionStatus-module__icon-error___-aQvD",
17
- subhead: b,
18
+ subhead: v,
18
19
  description: M,
19
- ring: v,
20
+ ring: W,
20
21
  "ring-success": "FundTransactionStatus-module__ring-success___Bxudq",
21
22
  "ring-error": "FundTransactionStatus-module__ring-error___WmTaE"
22
- }, W = ["waiting", "transactionSuccess", "error"], q = (a) => {
23
- const { state: n } = m(), e = d(null), o = d(null), u = h((c) => {
24
- o.current !== c && (o.current = c, e.current?.transition.toggle(c));
23
+ }, P = ["waiting", "transactionSubmitted", "transactionSuccess", "error"], D = (n) => {
24
+ const { state: a } = m(), r = l(null), u = l(null), d = _((e) => {
25
+ u.current !== e && (u.current = e, r.current?.transition.toggle(e));
25
26
  }, []);
26
27
  return S(() => {
27
- (n.transactionStatus.statusName === "transactionSuccess" || n.transactionStatus.statusName === "error") && u(n.transactionStatus.statusName);
28
- }, [n.transactionStatus.statusName, u]), /* @__PURE__ */ s(
29
- N,
28
+ (a.transactionStatus.statusName === "transactionSubmitted" || a.transactionStatus.statusName === "transactionSuccess" || a.transactionStatus.statusName === "error") && d(a.transactionStatus.statusName);
29
+ }, [a.transactionStatus.statusName, d]), /* @__PURE__ */ t(
30
+ T,
30
31
  {
31
32
  animateHeight: !1,
32
33
  timeout: 250,
33
- items: W,
34
+ items: P,
34
35
  initialEntered: !0,
35
- transitionRef: e,
36
- children: ({ itemKey: c, ..._ }) => {
37
- const p = E[c];
38
- return /* @__PURE__ */ s("div", { ..._, className: t.status, children: /* @__PURE__ */ s(p, { ...a }) });
36
+ transitionRef: r,
37
+ children: ({ itemKey: e, ...p }) => {
38
+ const h = E[e];
39
+ return /* @__PURE__ */ t("div", { ...p, className: s.status, children: /* @__PURE__ */ t(h, { ...n }) });
39
40
  }
40
41
  }
41
42
  );
42
43
  }, x = () => {
43
- const { state: a } = m(), n = g(
44
- () => a.paymentMethods?.find((e) => e.id === a.selectedPaymentMethod?.id),
45
- [a.paymentMethods, a.selectedPaymentMethod?.id]
44
+ const { state: n } = m(), a = g(
45
+ () => n.paymentMethods?.find((r) => r.id === n.selectedPaymentMethod?.id),
46
+ [n.paymentMethods, n.selectedPaymentMethod?.id]
46
47
  );
47
- return /* @__PURE__ */ r(i, { children: [
48
- /* @__PURE__ */ r("div", { className: t.graphic, children: [
49
- /* @__PURE__ */ s(
50
- T,
48
+ return /* @__PURE__ */ c(i, { children: [
49
+ /* @__PURE__ */ c("div", { className: s.graphic, children: [
50
+ /* @__PURE__ */ t(
51
+ N,
51
52
  {
52
53
  strokeWidth: "5%",
53
54
  staticStroke: !0,
54
55
  staticStrokeColor: "var(--cdp-web-colors-line-default)",
55
- className: t.spinner
56
+ className: s.spinner
56
57
  }
57
58
  ),
58
- n && /* @__PURE__ */ s("span", { className: t.icon, children: n.icon })
59
+ a && /* @__PURE__ */ t("span", { className: s.icon, children: a.icon })
59
60
  ] }),
60
- /* @__PURE__ */ s("p", { className: t.subhead, children: "Waiting" }),
61
- /* @__PURE__ */ r("p", { className: t.description, children: [
62
- "Deposit ",
63
- a.cryptoAmount,
64
- " ",
65
- a.cryptoCurrency,
66
- n ? ` via ${n.name}` : ""
61
+ /* @__PURE__ */ t("p", { className: s.subhead, children: "Waiting" }),
62
+ /* @__PURE__ */ c("p", { className: s.description, children: [
63
+ "Purchase ",
64
+ n.cryptoCurrency.toUpperCase(),
65
+ " with ",
66
+ n.fiatCurrency.toUpperCase(),
67
+ a ? ` via ${a.name}` : ""
67
68
  ] })
68
69
  ] });
69
- }, P = ({
70
- reset: a,
71
- timeRemaining: n,
72
- unmountOnSuccess: e
73
- }) => /* @__PURE__ */ r(i, { children: [
74
- /* @__PURE__ */ r("div", { className: `${t.graphic} ${t.pad}`, children: [
75
- /* @__PURE__ */ s("span", { className: `${t.ring} ${t["ring-success"]}` }),
76
- /* @__PURE__ */ s("span", { className: `${t.icon} ${t["icon-success"]}`, children: /* @__PURE__ */ s(f, {}) })
70
+ }, G = ({
71
+ reset: n,
72
+ timeRemaining: a,
73
+ unmountOnSuccess: r
74
+ }) => /* @__PURE__ */ c(i, { children: [
75
+ /* @__PURE__ */ c("div", { className: `${s.graphic} ${s.pad}`, children: [
76
+ /* @__PURE__ */ t("span", { className: `${s.ring} ${s["ring-success"]}` }),
77
+ /* @__PURE__ */ t("span", { className: `${s.icon} ${s["icon-success"]}`, children: /* @__PURE__ */ t($, {}) })
77
78
  ] }),
78
- /* @__PURE__ */ s("p", { className: t.subhead, children: "Success" }),
79
- e && /* @__PURE__ */ r("p", { className: t.description, children: [
79
+ /* @__PURE__ */ t("p", { className: s.subhead, children: "Your funds are on the way" }),
80
+ r && /* @__PURE__ */ c("p", { className: s.description, children: [
80
81
  "This window will automatically close",
81
82
  " ",
82
- n === null ? "soon" : `in ${n}`
83
+ a === null ? "soon" : `in ${a}`
83
84
  ] }),
84
- !e && /* @__PURE__ */ s("p", { className: t.description, children: "Your transaction was successful." }),
85
- !e && a !== void 0 && /* @__PURE__ */ s(l, { fullWidth: !0, onClick: a, children: "Go back" })
86
- ] }), B = ({ reset: a, timeRemaining: n, unmountOnError: e }) => /* @__PURE__ */ r(i, { children: [
87
- /* @__PURE__ */ r("div", { className: `${t.graphic} ${t.pad}`, children: [
88
- /* @__PURE__ */ s("span", { className: `${t.ring} ${t["ring-error"]}` }),
89
- /* @__PURE__ */ s("span", { className: `${t.icon} ${t["icon-error"]}`, children: /* @__PURE__ */ s(F, {}) })
85
+ !r && /* @__PURE__ */ t("p", { className: s.description, children: "Your transaction was submitted." }),
86
+ !r && n !== void 0 && /* @__PURE__ */ t(o, { fullWidth: !0, onClick: n, children: "Go back" })
87
+ ] }), I = ({
88
+ reset: n,
89
+ timeRemaining: a,
90
+ unmountOnSuccess: r
91
+ }) => /* @__PURE__ */ c(i, { children: [
92
+ /* @__PURE__ */ c("div", { className: `${s.graphic} ${s.pad}`, children: [
93
+ /* @__PURE__ */ t("span", { className: `${s.ring} ${s["ring-success"]}` }),
94
+ /* @__PURE__ */ t("span", { className: `${s.icon} ${s["icon-success"]}`, children: /* @__PURE__ */ t(f, {}) })
90
95
  ] }),
91
- /* @__PURE__ */ s("p", { className: t.subhead, children: "Payment failed" }),
92
- e && /* @__PURE__ */ r("p", { className: t.description, children: [
96
+ /* @__PURE__ */ t("p", { className: s.subhead, children: "Success" }),
97
+ r && /* @__PURE__ */ c("p", { className: s.description, children: [
93
98
  "This window will automatically close",
94
99
  " ",
95
- n === null ? "soon" : `in ${n}`
100
+ a === null ? "soon" : `in ${a}`
96
101
  ] }),
97
- !e && /* @__PURE__ */ s("p", { className: t.description, children: "Something went wrong. Please try again." }),
98
- !e && a !== void 0 && /* @__PURE__ */ s(l, { fullWidth: !0, onClick: a, children: "Try again" })
102
+ !r && /* @__PURE__ */ t("p", { className: s.description, children: "Your transaction was successful." }),
103
+ !r && n !== void 0 && /* @__PURE__ */ t(o, { fullWidth: !0, onClick: n, children: "Go back" })
104
+ ] }), B = ({ reset: n, timeRemaining: a, unmountOnError: r }) => /* @__PURE__ */ c(i, { children: [
105
+ /* @__PURE__ */ c("div", { className: `${s.graphic} ${s.pad}`, children: [
106
+ /* @__PURE__ */ t("span", { className: `${s.ring} ${s["ring-error"]}` }),
107
+ /* @__PURE__ */ t("span", { className: `${s.icon} ${s["icon-error"]}`, children: /* @__PURE__ */ t(w, {}) })
108
+ ] }),
109
+ /* @__PURE__ */ t("p", { className: s.subhead, children: "Payment failed" }),
110
+ r && /* @__PURE__ */ c("p", { className: s.description, children: [
111
+ "This window will automatically close",
112
+ " ",
113
+ a === null ? "soon" : `in ${a}`
114
+ ] }),
115
+ !r && /* @__PURE__ */ t("p", { className: s.description, children: "Something went wrong. Please try again." }),
116
+ !r && n !== void 0 && /* @__PURE__ */ t(o, { fullWidth: !0, onClick: n, children: "Try again" })
99
117
  ] }), E = {
100
118
  waiting: x,
101
- transactionSuccess: P,
119
+ transactionSubmitted: G,
120
+ transactionSuccess: I,
102
121
  error: B
103
122
  };
104
123
  export {
105
- q as FundTransactionStatus
124
+ D as FundTransactionStatus
106
125
  };
@@ -1,37 +1,37 @@
1
- import { useCallback as f, useMemo as y } from "react";
2
- const R = ({
3
- country: a,
4
- cryptoCurrency: n,
1
+ import { useCallback as y, useMemo as _ } from "react";
2
+ const N = ({
3
+ country: t,
4
+ cryptoCurrency: a,
5
5
  destinationAddress: o,
6
- fetchBuyQuote: s,
7
- fiatCurrency: t,
6
+ fetchBuyQuote: c,
7
+ fiatCurrency: n,
8
8
  network: u,
9
- onError: c,
10
- subdivision: d
9
+ onError: s,
10
+ subdivision: p
11
11
  }) => {
12
- const l = f(
13
- async ({ paymentMethod: m, paymentAmount: p }, U) => {
14
- if (isNaN(p) || !o || !m)
12
+ const U = y(
13
+ async ({ paymentMethod: d, paymentAmount: i }, l) => {
14
+ if (isNaN(i) || !o || !d)
15
15
  return "";
16
16
  try {
17
- const e = (await s({
18
- purchaseCurrency: n,
19
- purchaseNetwork: u,
20
- paymentCurrency: t,
21
- paymentAmount: p.toFixed(),
22
- paymentMethod: m.replace("_GUEST", ""),
17
+ const e = (await c({
18
+ purchaseCurrency: a.toUpperCase(),
19
+ purchaseNetwork: u.toLowerCase(),
20
+ paymentCurrency: n.toUpperCase(),
21
+ paymentAmount: i.toFixed(),
22
+ paymentMethod: d.replace("_GUEST", ""),
23
23
  // remove "_GUEST" from the payment method since it is not valid in the Buy Quote API
24
- country: a,
25
- subdivision: d,
24
+ country: t.toUpperCase(),
25
+ subdivision: p?.toUpperCase(),
26
26
  destinationAddress: o
27
27
  })).onrampUrl;
28
28
  if (!e) {
29
- const _ = {
29
+ const m = {
30
30
  errorType: "handled_error",
31
31
  code: "NO_ONRAMP_URL",
32
32
  debugMessage: "No payment methods found for the selected country and currency. See docs for more information: https://docs.cdp.coinbase.com/onramp/docs/api-configurations"
33
33
  };
34
- return U?.(_), c?.(_), "";
34
+ return l?.(m), s?.(m), "";
35
35
  }
36
36
  return e;
37
37
  } catch (r) {
@@ -44,22 +44,22 @@ const R = ({
44
44
  errorType: "unknown_error",
45
45
  code: "UNKNOWN_BUY_URL_ERROR",
46
46
  debugMessage: JSON.stringify(r)
47
- }, U?.(e), c?.(e), "";
47
+ }, l?.(e), s?.(e), "";
48
48
  }
49
49
  },
50
50
  [
51
+ t,
51
52
  a,
52
- n,
53
53
  o,
54
- s,
55
- t,
56
- u,
57
54
  c,
58
- d
55
+ n,
56
+ u,
57
+ s,
58
+ p
59
59
  ]
60
60
  );
61
- return y(() => ({ fetchBuyUrl: l }), [l]);
61
+ return _(() => ({ fetchBuyUrl: U }), [U]);
62
62
  };
63
63
  export {
64
- R as useBuyUrl
64
+ N as useBuyUrl
65
65
  };
@@ -1,53 +1,58 @@
1
- import { useCallback as n, useEffect as u } from "react";
2
- import { useFundContext as c } from "../FundProvider.js";
3
- import { setupOnrampEventListeners as i } from "../utils/setupOnrampEventListeners.js";
4
- const e = (t) => ({
1
+ import { useCallback as n, useEffect as o } from "react";
2
+ import { useFundContext as i } from "../FundProvider.js";
3
+ import { setupOnrampEventListeners as c } from "../utils/setupOnrampEventListeners.js";
4
+ const s = (t) => ({
5
5
  type: "SET_TRANSACTION_STATUS",
6
6
  payload: {
7
7
  transactionStatus: t
8
8
  }
9
9
  }), S = () => {
10
- const { dispatch: t } = c(), a = n(
11
- (s) => {
12
- s.eventName === "transition_view" ? t(
13
- e({
10
+ const { dispatch: t } = i(), a = n(
11
+ (e) => {
12
+ e.eventName === "transition_view" ? e.pageRoute.endsWith("/order-submitted") ? t(
13
+ s({
14
+ statusName: "transactionSubmitted",
15
+ statusData: null
16
+ })
17
+ ) : t(
18
+ s({
14
19
  statusName: "transactionPending",
15
20
  statusData: null
16
21
  })
17
- ) : s.eventName === "error" && t(
18
- e({
22
+ ) : e.eventName === "error" && t(
23
+ s({
19
24
  statusName: "error",
20
- statusData: s.error
25
+ statusData: e.error
21
26
  })
22
27
  );
23
28
  },
24
29
  [t]
25
30
  ), r = n(
26
- (s) => {
31
+ (e) => {
27
32
  t(
28
- e({
33
+ s({
29
34
  statusName: "transactionSuccess",
30
- statusData: s || null
35
+ statusData: e || null
31
36
  })
32
37
  );
33
38
  },
34
39
  [t]
35
- ), o = n(() => {
40
+ ), u = n(() => {
36
41
  t(
37
- e({
42
+ s({
38
43
  statusName: "exit",
39
44
  statusData: null
40
45
  })
41
46
  );
42
47
  }, [t]);
43
- u(() => {
44
- const s = i({
48
+ o(() => {
49
+ const e = c({
45
50
  onEvent: a,
46
- onExit: o,
51
+ onExit: u,
47
52
  onSuccess: r
48
53
  });
49
54
  return () => {
50
- s();
55
+ e();
51
56
  };
52
57
  }, []);
53
58
  };
@@ -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, M = (n) => [
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(", "), b = ({ limits: n }) => {
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: M(n),
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
- (a) => a.id === e.id.replace("_GUEST", "")
36
+ (i) => i.id === e.id.replace("_GUEST", "")
37
37
  );
38
38
  return {
39
39
  ...e,
40
- description: "Up to $500/week. No sign up required.",
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
- }), N = (n, o, e) => {
45
- const t = o.toUpperCase(), a = e.toUpperCase(), i = n.paymentCurrencies.find(
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 (!i)
48
+ if (!a)
49
49
  return [];
50
- const d = b(i);
50
+ const d = M(a);
51
51
  let m = [];
52
- return a === "US" && t === "USD" && (m = l(i)), [d, ...m];
52
+ return i === "US" && t === "USD" && (m = l(a)), [d, ...m];
53
53
  };
54
54
  export {
55
- M as buildCoinbasePaymentMethodDescription,
56
- N as buildPaymentMethods
55
+ b as buildCoinbasePaymentMethodDescription,
56
+ f as buildPaymentMethods
57
57
  };
@@ -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, useCallback as j, useEffect as f } from "react";
3
- import { useAmountInput as q } from "./useAmountInput.js";
4
- import { useInputScale as z } 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", M = "AmountInput-module__unit___-zmGz", n = {
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: M
12
- }, O = g(
11
+ unit: O
12
+ }, P = g(
13
13
  ({
14
- amount: h,
15
- className: I = "",
16
- unit: t,
17
- decimalPlaces: p = 2,
18
- locale: A,
19
- max: R,
20
- min: v,
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: C,
24
- placeholder: r = "0",
25
- ...$
26
- }, e) => {
27
- const o = u(null), l = u(null), c = u(null), m = u(null), d = u(null), { handleBlur: b, handleChange: x, handleBeforeInput: B, handlePaste: k, inputValue: i } = q(
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: h,
30
- decimalPlaces: p,
31
- locale: A,
32
- max: R,
33
- min: v,
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: C
36
+ onPaste: $
37
37
  }
38
- ), { updateScale: _ } = z({
39
- containerRef: l,
40
- measureRef: c,
41
- valueRef: m,
38
+ ), { updateScale: f } = M({
39
+ containerRef: i,
40
+ measureRef: m,
41
+ valueRef: d,
42
42
  inputRef: o,
43
- scaleWrapperRef: d
44
- }), S = j(() => {
45
- l.current?.querySelector("input[type='text']")?.focus();
43
+ scaleWrapperRef: _
44
+ }), U = q(() => {
45
+ i.current?.querySelector("input[type='text']")?.focus();
46
46
  }, []);
47
- return f(() => {
48
- _();
49
- }, [i, t, p, _]), f(() => {
50
- e && (typeof e == "function" ? e(o.current) : e.current = o.current);
51
- }, [e]), /* @__PURE__ */ s("span", { ref: l, className: n["amount-input"], children: [
52
- /* @__PURE__ */ s("span", { ref: d, className: `${n["amount-unit"]} ${n.visible}`, children: [
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} ${I}`,
56
+ className: `${n.input} ${A}`,
57
57
  inputMode: "decimal",
58
- onBlur: b,
59
- onChange: x,
60
- onBeforeInput: B,
61
- onPaste: k,
62
- placeholder: r,
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: i,
66
- ...$
65
+ value: l,
66
+ ...b
67
67
  }
68
68
  ),
69
- t && /* @__PURE__ */ a("span", { className: n.unit, onClick: S, children: t })
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: c,
74
+ ref: m,
75
75
  "aria-hidden": "true",
76
76
  className: `${n["amount-unit"]} ${n.hidden}`,
77
77
  children: [
78
- /* @__PURE__ */ s("span", { ref: m, children: [
79
- i || r,
78
+ /* @__PURE__ */ s("span", { ref: d, children: [
79
+ l || c,
80
80
  " "
81
81
  ] }),
82
- t && /* @__PURE__ */ a("span", { children: t })
82
+ e && /* @__PURE__ */ a("span", { children: e })
83
83
  ]
84
84
  }
85
85
  )
86
86
  ] });
87
87
  }
88
88
  );
89
- O.displayName = "AmountInput";
89
+ P.displayName = "AmountInput";
90
90
  export {
91
- O as AmountInput
91
+ P as AmountInput
92
92
  };
@@ -0,0 +1,2 @@
1
+ import { SVGProps } from 'react';
2
+ export declare const IconCurrencies: (props: Omit<SVGProps<SVGSVGElement>, "viewBox">) => import("react/jsx-runtime").JSX.Element;
@@ -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
+ };
@@ -168,7 +168,7 @@ export declare const theme: Flattened<{
168
168
  };
169
169
  readonly border: {
170
170
  readonly default: {
171
- readonly value: "{colors.line.heavy}";
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.heavy}";
212
+ readonly value: "{colors.line.default}";
213
213
  };
214
214
  readonly focus: {
215
215
  readonly value: "{colors.line.primary}";
@@ -253,7 +253,7 @@ export declare const colorsComponents: {
253
253
  };
254
254
  readonly border: {
255
255
  readonly default: {
256
- readonly value: "{colors.line.heavy}";
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.heavy}";
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.heavy}";
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.heavy}";
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.heavy}";
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.heavy}";
912
+ readonly value: "{colors.line.default}";
913
913
  };
914
914
  readonly focus: {
915
915
  readonly value: "{colors.line.primary}";
@@ -153,7 +153,7 @@ const e = {
153
153
  default: { value: "{colors.bg.default}" }
154
154
  },
155
155
  border: {
156
- default: { value: "{colors.line.heavy}" },
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.heavy}" },
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}" }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coinbase/cdp-react",
3
- "version": "0.0.28",
3
+ "version": "0.0.29",
4
4
  "type": "module",
5
5
  "dependencies": {
6
6
  "@internationalized/number": "3.6.4",
@@ -14,8 +14,8 @@
14
14
  },
15
15
  "peerDependencies": {
16
16
  "react": ">=18.2.0",
17
- "@coinbase/cdp-core": "^0.0.28",
18
- "@coinbase/cdp-hooks": "^0.0.28"
17
+ "@coinbase/cdp-core": "^0.0.29",
18
+ "@coinbase/cdp-hooks": "^0.0.29"
19
19
  },
20
20
  "devDependencies": {
21
21
  "@size-limit/preset-big-lib": "^11.2.0",
@@ -45,8 +45,8 @@
45
45
  "vite": "^7.0.4",
46
46
  "vite-plugin-dts": "^4.5.4",
47
47
  "vite-plugin-lib-inject-css": "^2.2.2",
48
- "@coinbase/cdp-core": "^0.0.28",
49
- "@coinbase/cdp-hooks": "^0.0.28"
48
+ "@coinbase/cdp-core": "^0.0.29",
49
+ "@coinbase/cdp-hooks": "^0.0.29"
50
50
  },
51
51
  "size-limit": [
52
52
  {