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.
@@ -1,10 +1,10 @@
1
1
  import { jsxs as c, jsx as a } from "react/jsx-runtime";
2
- import { I as b, u as A, a as v, b as E, v as H, C as k, F as x, T as z } from "./index-dde5862f.js";
3
- import { customSnackbar as B, SnackbarType as M, ExpandMoreIcon as $ } from "mainstack-design-system";
4
- import { memo as j, useState as T, useCallback as P } from "react";
5
- import "react-dom";
6
- import "axios";
7
- const F = (i) => /* @__PURE__ */ c(b, { viewBox: "0 0 32 32", ...i, fill: "none", children: [
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 = j(
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 = A(), { mutate: r, isLoading: I } = v(i), { mutate: f, isLoading: L } = E(i), [_, C] = T(!1), u = I || L || _, g = P(async () => {
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 = H(), y = {
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), B(
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
- M.error
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 = P(async () => {
108
+ ]), S = x(async () => {
109
109
  await h() || g();
110
110
  }, [h, g]);
111
111
  return /* @__PURE__ */ a(
112
- k,
112
+ E,
113
113
  {
114
114
  onClick: S,
115
115
  disabled: u,
116
116
  isLoading: u,
117
- children: /* @__PURE__ */ c(x, { justifyContent: "space-between", w: "full", alignItems: "center", children: [
118
- /* @__PURE__ */ c(x, { alignItems: "center", gap: "12px", children: [
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
- z,
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($, { transform: "rotate(-90deg)", boxSize: "24px" })
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 { I as _, u as S, a as b, b as E, C as z, F as h, T as M, v as $ } from "./index-dde5862f.js";
3
- import { ExpandMoreIcon as j, customSnackbar as k, SnackbarType as v } from "mainstack-design-system";
4
- import { useState as B } from "react";
5
- import "react-dom";
6
- import "axios";
7
- const F = (s) => /* @__PURE__ */ c(_, { viewBox: "0 0 32 32", ...s, fill: "none", children: [
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 = S(), { mutate: u, isLoading: L } = b(s), { mutate: w, isLoading: x } = E(s), [P, p] = B(!1), d = L || x || P, I = async () => {
25
- var f;
26
- const a = $(), y = {
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: y,
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: y,
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), k(
81
- ((f = e == null ? void 0 : e.raw) == null ? void 0 : f.message) ?? (e == null ? void 0 : e.message) ?? e ?? "We couldn't complete your payment",
82
- v.error
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
- z,
87
+ b,
88
88
  {
89
89
  onClick: async () => {
90
- await g() || I();
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
- M,
98
+ B,
99
99
  {
100
100
  color: "#111215",
101
101
  fontFamily: "Bricolage Grotesque",