mainstack-payments 1.0.59 → 1.0.61
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/build/{CashAppPayment-c9ed0457.js → CashAppPayment-c4eea24f.js} +17 -17
- package/build/{CryptoPayments-a6d29c50.js → CryptoPayments-5d0b4553.js} +17 -17
- package/build/index-ca81f713.js +12265 -0
- package/build/mainstack-payments.js +17 -22
- package/build/payments-b08e5e1b.js +421 -0
- package/build/src/hooks/useSmoothScroll.d.ts +4 -0
- package/build/ui-60eebff0.js +16314 -0
- package/package.json +2 -3
- package/build/index-dde5862f.js +0 -29045
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsxs as c, jsx as a } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import { customSnackbar as
|
|
4
|
-
import {
|
|
5
|
-
import "react
|
|
6
|
-
import "
|
|
7
|
-
const F = (i) => /* @__PURE__ */ c(
|
|
2
|
+
import { u as b, a as A, v, C as E } from "./index-ca81f713.js";
|
|
3
|
+
import { customSnackbar as H, SnackbarType as j, ExpandMoreIcon as k } from "mainstack-design-system";
|
|
4
|
+
import { u as z } from "./payments-b08e5e1b.js";
|
|
5
|
+
import { memo as B, useState as M, useCallback as x } from "react";
|
|
6
|
+
import { j as $, F as P, T } from "./ui-60eebff0.js";
|
|
7
|
+
const F = (i) => /* @__PURE__ */ c($, { viewBox: "0 0 32 32", ...i, fill: "none", children: [
|
|
8
8
|
/* @__PURE__ */ c("g", { clipPath: "url(#clip0_3703_1664)", children: [
|
|
9
9
|
/* @__PURE__ */ a(
|
|
10
10
|
"path",
|
|
@@ -24,7 +24,7 @@ const F = (i) => /* @__PURE__ */ c(b, { viewBox: "0 0 32 32", ...i, fill: "none"
|
|
|
24
24
|
)
|
|
25
25
|
] }),
|
|
26
26
|
/* @__PURE__ */ a("defs", { children: /* @__PURE__ */ a("clipPath", { id: "clip0_3703_1664", children: /* @__PURE__ */ a("rect", { width: "32", height: "32", rx: "16", fill: "white" }) }) })
|
|
27
|
-
] }), V =
|
|
27
|
+
] }), V = B(
|
|
28
28
|
({
|
|
29
29
|
Request: i,
|
|
30
30
|
metadata: d,
|
|
@@ -33,9 +33,9 @@ const F = (i) => /* @__PURE__ */ c(b, { viewBox: "0 0 32 32", ...i, fill: "none"
|
|
|
33
33
|
redirectUrl: o,
|
|
34
34
|
checkForErrors: h
|
|
35
35
|
}) => {
|
|
36
|
-
const m =
|
|
36
|
+
const m = z(), { mutate: r, isLoading: L } = b(i), { mutate: f, isLoading: _ } = A(i), [I, C] = M(!1), u = L || _ || I, g = x(async () => {
|
|
37
37
|
var w;
|
|
38
|
-
const n =
|
|
38
|
+
const n = v(), y = {
|
|
39
39
|
...d,
|
|
40
40
|
reference: n
|
|
41
41
|
};
|
|
@@ -91,9 +91,9 @@ const F = (i) => /* @__PURE__ */ c(b, { viewBox: "0 0 32 32", ...i, fill: "none"
|
|
|
91
91
|
);
|
|
92
92
|
}
|
|
93
93
|
} catch (t) {
|
|
94
|
-
C(!1), console.error(t),
|
|
94
|
+
C(!1), console.error(t), H(
|
|
95
95
|
((w = t == null ? void 0 : t.raw) == null ? void 0 : w.message) ?? (t == null ? void 0 : t.message) ?? t ?? "We couldn't complete your payment",
|
|
96
|
-
|
|
96
|
+
j.error
|
|
97
97
|
);
|
|
98
98
|
}
|
|
99
99
|
}, [
|
|
@@ -105,20 +105,20 @@ const F = (i) => /* @__PURE__ */ c(b, { viewBox: "0 0 32 32", ...i, fill: "none"
|
|
|
105
105
|
d,
|
|
106
106
|
o,
|
|
107
107
|
C
|
|
108
|
-
]), S =
|
|
108
|
+
]), S = x(async () => {
|
|
109
109
|
await h() || g();
|
|
110
110
|
}, [h, g]);
|
|
111
111
|
return /* @__PURE__ */ a(
|
|
112
|
-
|
|
112
|
+
E,
|
|
113
113
|
{
|
|
114
114
|
onClick: S,
|
|
115
115
|
disabled: u,
|
|
116
116
|
isLoading: u,
|
|
117
|
-
children: /* @__PURE__ */ c(
|
|
118
|
-
/* @__PURE__ */ c(
|
|
117
|
+
children: /* @__PURE__ */ c(P, { justifyContent: "space-between", w: "full", alignItems: "center", children: [
|
|
118
|
+
/* @__PURE__ */ c(P, { alignItems: "center", gap: "12px", children: [
|
|
119
119
|
/* @__PURE__ */ a(F, { boxSize: "32px" }),
|
|
120
120
|
/* @__PURE__ */ a(
|
|
121
|
-
|
|
121
|
+
T,
|
|
122
122
|
{
|
|
123
123
|
color: "#111215",
|
|
124
124
|
fontFamily: "Bricolage Grotesque",
|
|
@@ -130,7 +130,7 @@ const F = (i) => /* @__PURE__ */ c(b, { viewBox: "0 0 32 32", ...i, fill: "none"
|
|
|
130
130
|
}
|
|
131
131
|
)
|
|
132
132
|
] }),
|
|
133
|
-
/* @__PURE__ */ a(
|
|
133
|
+
/* @__PURE__ */ a(k, { transform: "rotate(-90deg)", boxSize: "24px" })
|
|
134
134
|
] })
|
|
135
135
|
}
|
|
136
136
|
);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsxs as c, jsx as n } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import { ExpandMoreIcon as j, customSnackbar as
|
|
4
|
-
import {
|
|
5
|
-
import "react
|
|
6
|
-
import "
|
|
7
|
-
const F = (s) => /* @__PURE__ */ c(
|
|
2
|
+
import { u as I, a as S, C as b, v as E } from "./index-ca81f713.js";
|
|
3
|
+
import { ExpandMoreIcon as j, customSnackbar as z, SnackbarType as M } from "mainstack-design-system";
|
|
4
|
+
import { u as $ } from "./payments-b08e5e1b.js";
|
|
5
|
+
import { useState as k } from "react";
|
|
6
|
+
import { j as v, F as h, T as B } from "./ui-60eebff0.js";
|
|
7
|
+
const F = (s) => /* @__PURE__ */ c(v, { viewBox: "0 0 32 32", ...s, fill: "none", children: [
|
|
8
8
|
/* @__PURE__ */ n("g", { clipPath: "url(#clip0_2605_970)", children: /* @__PURE__ */ n(
|
|
9
9
|
"path",
|
|
10
10
|
{
|
|
@@ -21,9 +21,9 @@ const F = (s) => /* @__PURE__ */ c(_, { viewBox: "0 0 32 32", ...s, fill: "none"
|
|
|
21
21
|
redirectUrl: o,
|
|
22
22
|
checkForErrors: g
|
|
23
23
|
}) => {
|
|
24
|
-
const m =
|
|
25
|
-
var
|
|
26
|
-
const a =
|
|
24
|
+
const m = $(), { mutate: u, isLoading: L } = I(s), { mutate: w, isLoading: x } = S(s), [P, p] = k(!1), d = L || x || P, _ = async () => {
|
|
25
|
+
var y;
|
|
26
|
+
const a = E(), f = {
|
|
27
27
|
...C,
|
|
28
28
|
reference: a
|
|
29
29
|
};
|
|
@@ -33,7 +33,7 @@ const F = (s) => /* @__PURE__ */ c(_, { viewBox: "0 0 32 32", ...s, fill: "none"
|
|
|
33
33
|
amount: r,
|
|
34
34
|
reference: a,
|
|
35
35
|
currency: l,
|
|
36
|
-
metadata:
|
|
36
|
+
metadata: f,
|
|
37
37
|
is_crypto_payment: !0
|
|
38
38
|
},
|
|
39
39
|
{
|
|
@@ -49,7 +49,7 @@ const F = (s) => /* @__PURE__ */ c(_, { viewBox: "0 0 32 32", ...s, fill: "none"
|
|
|
49
49
|
{
|
|
50
50
|
amount: r,
|
|
51
51
|
currency: l,
|
|
52
|
-
metadata:
|
|
52
|
+
metadata: f,
|
|
53
53
|
is_crypto_payment: !0
|
|
54
54
|
},
|
|
55
55
|
{
|
|
@@ -77,17 +77,17 @@ const F = (s) => /* @__PURE__ */ c(_, { viewBox: "0 0 32 32", ...s, fill: "none"
|
|
|
77
77
|
throw new Error(t.message ?? "Couldn't load wallet integration");
|
|
78
78
|
}
|
|
79
79
|
} catch (e) {
|
|
80
|
-
p(!1), console.error(e),
|
|
81
|
-
((
|
|
82
|
-
|
|
80
|
+
p(!1), console.error(e), z(
|
|
81
|
+
((y = e == null ? void 0 : e.raw) == null ? void 0 : y.message) ?? (e == null ? void 0 : e.message) ?? e ?? "We couldn't complete your payment",
|
|
82
|
+
M.error
|
|
83
83
|
);
|
|
84
84
|
}
|
|
85
85
|
};
|
|
86
86
|
return /* @__PURE__ */ n(
|
|
87
|
-
|
|
87
|
+
b,
|
|
88
88
|
{
|
|
89
89
|
onClick: async () => {
|
|
90
|
-
await g() ||
|
|
90
|
+
await g() || _();
|
|
91
91
|
},
|
|
92
92
|
disabled: d,
|
|
93
93
|
isLoading: d,
|
|
@@ -95,7 +95,7 @@ const F = (s) => /* @__PURE__ */ c(_, { viewBox: "0 0 32 32", ...s, fill: "none"
|
|
|
95
95
|
/* @__PURE__ */ c(h, { alignItems: "center", gap: "12px", children: [
|
|
96
96
|
/* @__PURE__ */ n(F, { boxSize: "32px" }),
|
|
97
97
|
/* @__PURE__ */ n(
|
|
98
|
-
|
|
98
|
+
B,
|
|
99
99
|
{
|
|
100
100
|
color: "#111215",
|
|
101
101
|
fontFamily: "Bricolage Grotesque",
|