@blocklet/payment-react 1.18.7 → 1.18.8
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/es/checkout/donate.d.ts +1 -0
- package/es/checkout/donate.js +188 -89
- package/es/components/livemode.js +1 -1
- package/es/components/table.js +1 -1
- package/es/libs/util.d.ts +1 -0
- package/es/libs/util.js +10 -1
- package/es/payment/amount.js +1 -1
- package/es/payment/form/index.js +1 -1
- package/es/payment/form/stripe/form.js +1 -1
- package/es/payment/product-card.js +2 -2
- package/es/payment/product-item.js +1 -1
- package/es/payment/product-skeleton.js +2 -2
- package/es/payment/skeleton/donation.js +1 -1
- package/es/payment/skeleton/overview.js +1 -1
- package/es/payment/skeleton/payment.js +1 -1
- package/es/payment/summary.js +1 -1
- package/es/theme/index.js +3 -2
- package/es/theme/typography.js +8 -8
- package/lib/checkout/donate.d.ts +1 -0
- package/lib/checkout/donate.js +193 -129
- package/lib/components/livemode.js +1 -1
- package/lib/components/table.js +1 -1
- package/lib/libs/util.d.ts +1 -0
- package/lib/libs/util.js +7 -0
- package/lib/payment/amount.js +1 -1
- package/lib/payment/form/index.js +2 -2
- package/lib/payment/form/stripe/form.js +1 -1
- package/lib/payment/product-card.js +2 -2
- package/lib/payment/product-item.js +1 -1
- package/lib/payment/product-skeleton.js +2 -2
- package/lib/payment/skeleton/donation.js +1 -1
- package/lib/payment/skeleton/overview.js +1 -1
- package/lib/payment/skeleton/payment.js +1 -1
- package/lib/payment/summary.js +1 -1
- package/lib/theme/index.js +3 -2
- package/lib/theme/typography.js +8 -8
- package/package.json +8 -8
- package/src/checkout/donate.tsx +176 -112
- package/src/components/livemode.tsx +1 -1
- package/src/components/table.tsx +1 -1
- package/src/libs/util.ts +11 -1
- package/src/payment/amount.tsx +1 -1
- package/src/payment/form/index.tsx +1 -1
- package/src/payment/form/stripe/form.tsx +1 -1
- package/src/payment/product-card.tsx +2 -2
- package/src/payment/product-item.tsx +1 -1
- package/src/payment/product-skeleton.tsx +2 -2
- package/src/payment/skeleton/donation.tsx +1 -1
- package/src/payment/skeleton/overview.tsx +1 -1
- package/src/payment/skeleton/payment.tsx +1 -1
- package/src/payment/summary.tsx +1 -1
- package/src/theme/index.tsx +2 -1
- package/src/theme/typography.ts +8 -8
package/es/checkout/donate.d.ts
CHANGED
package/es/checkout/donate.js
CHANGED
|
@@ -7,14 +7,9 @@ import {
|
|
|
7
7
|
Box,
|
|
8
8
|
Button,
|
|
9
9
|
CircularProgress,
|
|
10
|
-
Hidden,
|
|
11
10
|
IconButton,
|
|
12
11
|
Popover,
|
|
13
12
|
Stack,
|
|
14
|
-
Table,
|
|
15
|
-
TableBody,
|
|
16
|
-
TableCell,
|
|
17
|
-
TableRow,
|
|
18
13
|
Typography,
|
|
19
14
|
Tooltip
|
|
20
15
|
} from "@mui/material";
|
|
@@ -23,13 +18,13 @@ import omit from "lodash/omit";
|
|
|
23
18
|
import uniqBy from "lodash/unionBy";
|
|
24
19
|
import { useEffect, useRef, useState } from "react";
|
|
25
20
|
import { Settings } from "@mui/icons-material";
|
|
26
|
-
import TxLink from "../components/blockchain/tx.js";
|
|
27
21
|
import api from "../libs/api.js";
|
|
28
22
|
import {
|
|
29
23
|
formatAmount,
|
|
30
24
|
formatBNStr,
|
|
31
|
-
formatDateTime,
|
|
32
25
|
getCustomerAvatar,
|
|
26
|
+
getTxLink,
|
|
27
|
+
getUserProfileLink,
|
|
33
28
|
lazyLoad,
|
|
34
29
|
openDonationSettings
|
|
35
30
|
} from "../libs/util.js";
|
|
@@ -65,98 +60,190 @@ const fetchSupporters = (target, livemode = true) => {
|
|
|
65
60
|
const emojiFont = {
|
|
66
61
|
fontFamily: 'Avenir, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"'
|
|
67
62
|
};
|
|
68
|
-
function
|
|
69
|
-
const {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
return /* @__PURE__ */ jsxs(
|
|
73
|
-
Box,
|
|
63
|
+
function DonateDetails({ supporters = [], currency, method }) {
|
|
64
|
+
const { locale } = useLocaleContext();
|
|
65
|
+
return /* @__PURE__ */ jsx(
|
|
66
|
+
Stack,
|
|
74
67
|
{
|
|
75
|
-
display: "flex",
|
|
76
|
-
flexDirection: "column",
|
|
77
|
-
alignItems: "center",
|
|
78
68
|
sx: {
|
|
79
|
-
"
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
69
|
+
width: "100%",
|
|
70
|
+
minWidth: "256px",
|
|
71
|
+
maxWidth: "calc(100vw - 32px)",
|
|
72
|
+
maxHeight: "300px",
|
|
73
|
+
overflowX: "hidden",
|
|
74
|
+
overflowY: "auto",
|
|
75
|
+
margin: "0 auto"
|
|
83
76
|
},
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
alt: x.customer?.name,
|
|
99
|
-
src: getCustomerAvatar(x.customer?.did, x?.updated_at ? new Date(x.updated_at).toISOString() : "", 48),
|
|
100
|
-
variant: "circular",
|
|
101
|
-
sx: { width: 32, height: 32 }
|
|
77
|
+
children: supporters.map((x) => /* @__PURE__ */ jsxs(
|
|
78
|
+
Box,
|
|
79
|
+
{
|
|
80
|
+
sx: {
|
|
81
|
+
padding: "6px",
|
|
82
|
+
"&:hover": {
|
|
83
|
+
backgroundColor: "var(--backgrounds-bg-highlight, #eff6ff)",
|
|
84
|
+
transition: "background-color 200ms linear",
|
|
85
|
+
cursor: "pointer"
|
|
86
|
+
},
|
|
87
|
+
borderBottom: "1px solid var(--stroke-border-base, #EFF1F5)",
|
|
88
|
+
display: "flex",
|
|
89
|
+
justifyContent: "space-between",
|
|
90
|
+
alignItems: "center"
|
|
102
91
|
},
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
92
|
+
onClick: () => {
|
|
93
|
+
const { link, text } = getTxLink(method, x.payment_details);
|
|
94
|
+
if (link && text) {
|
|
95
|
+
window.open(link, "_blank");
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
children: [
|
|
99
|
+
/* @__PURE__ */ jsxs(
|
|
100
|
+
Stack,
|
|
101
|
+
{
|
|
102
|
+
direction: "row",
|
|
103
|
+
alignItems: "center",
|
|
104
|
+
spacing: 0.5,
|
|
105
|
+
sx: {
|
|
106
|
+
flex: 3,
|
|
107
|
+
overflow: "hidden"
|
|
108
|
+
},
|
|
109
|
+
children: [
|
|
110
|
+
/* @__PURE__ */ jsx(
|
|
111
|
+
Avatar,
|
|
112
|
+
{
|
|
113
|
+
src: getCustomerAvatar(x.customer?.did, x?.updated_at ? new Date(x.updated_at).toISOString() : "", 20),
|
|
114
|
+
alt: x.customer?.name,
|
|
115
|
+
variant: "circular",
|
|
116
|
+
sx: { width: 20, height: 20 },
|
|
117
|
+
onClick: (e) => {
|
|
118
|
+
e.stopPropagation();
|
|
119
|
+
if (x.customer?.did) {
|
|
120
|
+
window.open(getUserProfileLink(x.customer?.did, locale), "_blank");
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
x.id
|
|
125
|
+
),
|
|
126
|
+
/* @__PURE__ */ jsx(
|
|
127
|
+
Typography,
|
|
128
|
+
{
|
|
129
|
+
sx: {
|
|
130
|
+
ml: "8px !important",
|
|
131
|
+
fontSize: "0.875rem",
|
|
132
|
+
fontWeight: "500",
|
|
133
|
+
overflow: "hidden",
|
|
134
|
+
whiteSpace: "nowrap",
|
|
135
|
+
textOverflow: "ellipsis"
|
|
136
|
+
},
|
|
137
|
+
onClick: (e) => {
|
|
138
|
+
e.stopPropagation();
|
|
139
|
+
if (x.customer?.did) {
|
|
140
|
+
window.open(getUserProfileLink(x.customer?.did, locale), "_blank");
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
children: x.customer?.name
|
|
144
|
+
}
|
|
145
|
+
)
|
|
146
|
+
]
|
|
147
|
+
}
|
|
148
|
+
),
|
|
149
|
+
/* @__PURE__ */ jsxs(Stack, { direction: "row", alignItems: "center", justifyContent: "flex-end", spacing: 0.5, sx: { flex: 1 }, children: [
|
|
150
|
+
/* @__PURE__ */ jsx(
|
|
151
|
+
Avatar,
|
|
152
|
+
{
|
|
153
|
+
src: currency?.logo,
|
|
154
|
+
alt: currency?.symbol,
|
|
155
|
+
variant: "circular",
|
|
156
|
+
sx: { width: 16, height: 16 }
|
|
157
|
+
},
|
|
158
|
+
x.id
|
|
159
|
+
),
|
|
160
|
+
/* @__PURE__ */ jsx(Typography, { sx: { color: "text.secondary" }, children: formatBNStr(x.amount_total, currency.decimal) }),
|
|
161
|
+
/* @__PURE__ */ jsx(Typography, { sx: { color: "text.secondary" }, children: currency.symbol })
|
|
162
|
+
] })
|
|
163
|
+
]
|
|
164
|
+
},
|
|
165
|
+
x.id
|
|
166
|
+
))
|
|
106
167
|
}
|
|
107
168
|
);
|
|
108
169
|
}
|
|
109
|
-
function
|
|
110
|
-
|
|
170
|
+
function SupporterAvatar({
|
|
171
|
+
supporters = [],
|
|
172
|
+
totalAmount = "0",
|
|
173
|
+
currency,
|
|
174
|
+
method,
|
|
175
|
+
showDonateDetails = false
|
|
176
|
+
}) {
|
|
177
|
+
const [open, setOpen] = useState(false);
|
|
111
178
|
const customers = uniqBy(supporters, "customer_did");
|
|
112
179
|
const customersNum = customers.length;
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
}) }),
|
|
119
|
-
/* @__PURE__ */ jsx(Table, { size: "small", sx: { width: "100%", overflow: "hidden" }, children: /* @__PURE__ */ jsx(TableBody, { children: supporters.map((x) => /* @__PURE__ */ jsxs(
|
|
120
|
-
TableRow,
|
|
180
|
+
if (customersNum === 0)
|
|
181
|
+
return null;
|
|
182
|
+
return /* @__PURE__ */ jsxs(Stack, { flexDirection: "row", justifyContent: "center", alignItems: "center", children: [
|
|
183
|
+
/* @__PURE__ */ jsx(AvatarGroup, { max: 5, children: customers.slice(0, 5).map((supporter) => /* @__PURE__ */ jsx(
|
|
184
|
+
Avatar,
|
|
121
185
|
{
|
|
186
|
+
src: getCustomerAvatar(
|
|
187
|
+
supporter.customer?.did,
|
|
188
|
+
supporter?.updated_at ? new Date(supporter.updated_at).toISOString() : "",
|
|
189
|
+
24
|
|
190
|
+
),
|
|
191
|
+
alt: supporter.customer?.name,
|
|
122
192
|
sx: {
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
193
|
+
width: "24px",
|
|
194
|
+
height: "24px"
|
|
195
|
+
}
|
|
196
|
+
},
|
|
197
|
+
supporter.customer?.id
|
|
198
|
+
)) }),
|
|
199
|
+
/* @__PURE__ */ jsx(
|
|
200
|
+
Box,
|
|
201
|
+
{
|
|
202
|
+
sx: {
|
|
203
|
+
fontSize: "14px",
|
|
204
|
+
color: "text.secondary",
|
|
205
|
+
pl: 1.5,
|
|
206
|
+
pr: 1,
|
|
207
|
+
ml: -1,
|
|
208
|
+
borderRadius: "8px",
|
|
209
|
+
backgroundColor: "#f4f4f5",
|
|
210
|
+
height: "24px",
|
|
211
|
+
...showDonateDetails ? {
|
|
212
|
+
cursor: "pointer",
|
|
213
|
+
"&:hover": {
|
|
214
|
+
backgroundColor: "#e5e7eb"
|
|
215
|
+
}
|
|
216
|
+
} : {}
|
|
217
|
+
},
|
|
218
|
+
onClick: () => showDonateDetails && setOpen(true),
|
|
219
|
+
children: `${customersNum} supporter${customersNum > 1 ? "s" : ""} (${formatAmount(totalAmount || "0", currency?.decimal)} ${currency.symbol})`
|
|
220
|
+
}
|
|
221
|
+
),
|
|
222
|
+
/* @__PURE__ */ jsx(
|
|
223
|
+
Dialog,
|
|
224
|
+
{
|
|
225
|
+
open,
|
|
226
|
+
onClose: () => setOpen(false),
|
|
227
|
+
sx: {
|
|
228
|
+
".MuiDialogContent-root": {
|
|
229
|
+
width: "450px",
|
|
230
|
+
padding: "8px"
|
|
130
231
|
}
|
|
131
232
|
},
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
x.id
|
|
147
|
-
),
|
|
148
|
-
/* @__PURE__ */ jsx(Hidden, { smDown: true, children: /* @__PURE__ */ jsx(Typography, { children: x.customer?.name }) })
|
|
149
|
-
] }) }),
|
|
150
|
-
/* @__PURE__ */ jsx(TableCell, { align: "right", children: /* @__PURE__ */ jsxs(Stack, { direction: "row", alignItems: "center", justifyContent: "flex-end", spacing: 0.5, children: [
|
|
151
|
-
/* @__PURE__ */ jsx(Typography, { fontWeight: 500, component: "strong", children: formatBNStr(x.amount_total, currency.decimal) }),
|
|
152
|
-
/* @__PURE__ */ jsx(Typography, { component: "span", children: currency.symbol })
|
|
153
|
-
] }) }),
|
|
154
|
-
/* @__PURE__ */ jsx(Hidden, { smDown: true, children: /* @__PURE__ */ jsx(TableCell, { align: "right", children: /* @__PURE__ */ jsx(Typography, { children: formatDateTime(x.created_at) }) }) }),
|
|
155
|
-
/* @__PURE__ */ jsx(TableCell, { align: "right", children: /* @__PURE__ */ jsx(TxLink, { method, details: x.payment_details, mode: "customer", align: "right" }) })
|
|
156
|
-
]
|
|
157
|
-
},
|
|
158
|
-
x.id
|
|
159
|
-
)) }) })
|
|
233
|
+
title: `${customersNum} supporter${customersNum > 1 ? "s" : ""}`,
|
|
234
|
+
children: /* @__PURE__ */ jsx(DonateDetails, { supporters, currency, method, totalAmount })
|
|
235
|
+
}
|
|
236
|
+
)
|
|
237
|
+
] });
|
|
238
|
+
}
|
|
239
|
+
function SupporterTable({ supporters = [], totalAmount = "0", currency, method }) {
|
|
240
|
+
const customers = uniqBy(supporters, "customer_did");
|
|
241
|
+
const customersNum = customers.length;
|
|
242
|
+
if (customersNum === 0)
|
|
243
|
+
return null;
|
|
244
|
+
return /* @__PURE__ */ jsxs(Box, { display: "flex", flexDirection: "column", alignItems: "center", gap: { xs: 0.5, sm: 1 }, children: [
|
|
245
|
+
/* @__PURE__ */ jsx(SupporterAvatar, { supporters, totalAmount, currency, method }),
|
|
246
|
+
/* @__PURE__ */ jsx(DonateDetails, { supporters, totalAmount, currency, method })
|
|
160
247
|
] });
|
|
161
248
|
}
|
|
162
249
|
function SupporterSimple({ supporters = [], totalAmount = "0", currency, method }) {
|
|
@@ -404,16 +491,28 @@ function CheckoutDonateInner({
|
|
|
404
491
|
{
|
|
405
492
|
size: donateSettings.appearance?.button?.size || "medium",
|
|
406
493
|
color: donateSettings.appearance?.button?.color || "primary",
|
|
407
|
-
variant: donateSettings.appearance?.button?.variant || "
|
|
494
|
+
variant: donateSettings.appearance?.button?.variant || "outlined",
|
|
495
|
+
sx: {
|
|
496
|
+
...!donateSettings.appearance?.button?.variant ? {
|
|
497
|
+
color: "var(--foregrounds-fg-base, #010714)",
|
|
498
|
+
borderColor: "var(--stroke-button-secondary-border, #E5E7EB)",
|
|
499
|
+
"&:hover": {
|
|
500
|
+
backgroundColor: "var(--buttons-button-neutral-hover, #F3F4F6)",
|
|
501
|
+
borderColor: "var(--stroke-button-secondary-border, #E5E7EB)"
|
|
502
|
+
}
|
|
503
|
+
} : {},
|
|
504
|
+
// @ts-ignore
|
|
505
|
+
...donateSettings.appearance?.button?.sx || {}
|
|
506
|
+
},
|
|
408
507
|
...donateSettings.appearance?.button,
|
|
409
508
|
onClick: () => startDonate(),
|
|
410
509
|
children: /* @__PURE__ */ jsxs(Stack, { direction: "row", alignItems: "center", spacing: 0.5, children: [
|
|
411
|
-
donateSettings.appearance.button.icon,
|
|
510
|
+
donateSettings.appearance.button.icon && /* @__PURE__ */ jsx(Typography, { sx: { mr: 0.5, display: "inline-flex", alignItems: "center" }, children: donateSettings.appearance.button.icon }),
|
|
412
511
|
typeof donateSettings.appearance.button.text === "string" ? /* @__PURE__ */ jsx(Typography, { children: donateSettings.appearance.button.text }) : donateSettings.appearance.button.text
|
|
413
512
|
] })
|
|
414
513
|
}
|
|
415
514
|
),
|
|
416
|
-
supporters.data && donateSettings.appearance.history.variant === "avatar" && /* @__PURE__ */ jsx(SupporterAvatar, { ...supporters.data }),
|
|
515
|
+
supporters.data && donateSettings.appearance.history.variant === "avatar" && /* @__PURE__ */ jsx(SupporterAvatar, { ...supporters.data, showDonateDetails: true }),
|
|
417
516
|
supporters.data && donateSettings.appearance.history.variant === "table" && /* @__PURE__ */ jsx(SupporterTable, { ...supporters.data })
|
|
418
517
|
]
|
|
419
518
|
}
|
package/es/components/table.js
CHANGED
package/es/libs/util.d.ts
CHANGED
|
@@ -113,3 +113,4 @@ export declare function getInvoiceDescriptionAndReason(invoice: TInvoiceExpanded
|
|
|
113
113
|
};
|
|
114
114
|
export declare function getPaymentKitComponent(): any;
|
|
115
115
|
export declare function openDonationSettings(openInNewTab?: boolean): void;
|
|
116
|
+
export declare function getUserProfileLink(userDid: string, locale?: string): string;
|
package/es/libs/util.js
CHANGED
|
@@ -4,7 +4,7 @@ import trimEnd from "lodash/trimEnd";
|
|
|
4
4
|
import numbro from "numbro";
|
|
5
5
|
import stringWidth from "string-width";
|
|
6
6
|
import { defaultCountries } from "react-international-phone";
|
|
7
|
-
import { joinURL } from "ufo";
|
|
7
|
+
import { joinURL, withQuery } from "ufo";
|
|
8
8
|
import { t } from "../locales/index.js";
|
|
9
9
|
import dayjs from "./dayjs.js";
|
|
10
10
|
export const PAYMENT_KIT_DID = "z2qaCNvKMv5GjouKdcDWexv6WqtHbpNPQDnAk";
|
|
@@ -924,3 +924,12 @@ export function openDonationSettings(openInNewTab = false) {
|
|
|
924
924
|
window.open(`${window.location.origin}${mountPoint}/integrations/donations`, openInNewTab ? "_blank" : "_self");
|
|
925
925
|
}
|
|
926
926
|
}
|
|
927
|
+
export function getUserProfileLink(userDid, locale = "en") {
|
|
928
|
+
return joinURL(
|
|
929
|
+
window.location.origin,
|
|
930
|
+
withQuery(".well-known/service/user", {
|
|
931
|
+
locale,
|
|
932
|
+
did: userDid
|
|
933
|
+
})
|
|
934
|
+
);
|
|
935
|
+
}
|
package/es/payment/amount.js
CHANGED
package/es/payment/form/index.js
CHANGED
|
@@ -497,7 +497,7 @@ export default function PaymentForm({
|
|
|
497
497
|
children: state.submitting || state.paying ? t("payment.checkout.processing") : buttonText
|
|
498
498
|
}
|
|
499
499
|
) }),
|
|
500
|
-
["subscription", "setup"].includes(checkoutSession.mode) && /* @__PURE__ */ jsx(Typography, { sx: { mt: 2.5, color: "text.lighter", fontSize: "0.
|
|
500
|
+
["subscription", "setup"].includes(checkoutSession.mode) && /* @__PURE__ */ jsx(Typography, { sx: { mt: 2.5, color: "text.lighter", fontSize: "0.7875rem", lineHeight: "0.9625rem" }, children: t("payment.checkout.confirm", { payee }) })
|
|
501
501
|
] }) }),
|
|
502
502
|
state.customerLimited && /* @__PURE__ */ jsx(
|
|
503
503
|
ConfirmDialog,
|
|
@@ -102,7 +102,7 @@ function StripeCheckoutForm({
|
|
|
102
102
|
LoadingButton,
|
|
103
103
|
{
|
|
104
104
|
fullWidth: true,
|
|
105
|
-
sx: { mt: 2, mb: 1, borderRadius: 0, fontSize: "
|
|
105
|
+
sx: { mt: 2, mb: 1, borderRadius: 0, fontSize: "0.875rem" },
|
|
106
106
|
type: "submit",
|
|
107
107
|
disabled: state.confirming || !state.loaded,
|
|
108
108
|
loading: state.confirming,
|
|
@@ -34,12 +34,12 @@ export default function ProductCard({ size, variant, name, logo, description, ex
|
|
|
34
34
|
{
|
|
35
35
|
variant: "body1",
|
|
36
36
|
title: description,
|
|
37
|
-
sx: { fontSize: "0.
|
|
37
|
+
sx: { fontSize: "0.74375rem", mb: 0.5, lineHeight: 1.2, textAlign: "left" },
|
|
38
38
|
color: "text.lighter",
|
|
39
39
|
children: description
|
|
40
40
|
}
|
|
41
41
|
),
|
|
42
|
-
extra && /* @__PURE__ */ jsx(Box, { sx: { fontSize: "0.
|
|
42
|
+
extra && /* @__PURE__ */ jsx(Box, { sx: { fontSize: "0.74375rem" }, color: "text.lighter", children: extra })
|
|
43
43
|
]
|
|
44
44
|
}
|
|
45
45
|
)
|
|
@@ -65,7 +65,7 @@ export default function ProductItem({
|
|
|
65
65
|
),
|
|
66
66
|
/* @__PURE__ */ jsxs(Stack, { direction: "column", alignItems: "flex-end", flex: 1, children: [
|
|
67
67
|
/* @__PURE__ */ jsx(Typography, { sx: { color: "text.primary", fontWeight: 500, whiteSpace: "nowrap" }, gutterBottom: true, children: primaryText }),
|
|
68
|
-
pricing.secondary && /* @__PURE__ */ jsx(Typography, { sx: { fontSize: "0.
|
|
68
|
+
pricing.secondary && /* @__PURE__ */ jsx(Typography, { sx: { fontSize: "0.74375rem", color: "text.lighter" }, children: pricing.secondary })
|
|
69
69
|
] })
|
|
70
70
|
]
|
|
71
71
|
}
|
|
@@ -21,12 +21,12 @@ export default function ProductSkeleton({ count }) {
|
|
|
21
21
|
},
|
|
22
22
|
children: [
|
|
23
23
|
/* @__PURE__ */ jsx(Typography, { component: "div", variant: "h4", sx: { width: "50%" }, children: /* @__PURE__ */ jsx(Skeleton, {}) }),
|
|
24
|
-
/* @__PURE__ */ jsx(Skeleton, { variant: "text", sx: { fontSize: "
|
|
24
|
+
/* @__PURE__ */ jsx(Skeleton, { variant: "text", sx: { fontSize: "0.875rem", width: "60%" } }),
|
|
25
25
|
/* @__PURE__ */ jsx(Typography, { component: "div", variant: "h3", sx: { width: "60%" }, children: /* @__PURE__ */ jsx(Skeleton, {}) }),
|
|
26
26
|
/* @__PURE__ */ jsx(Typography, { component: "div", variant: "h3", sx: { width: "100%" }, children: /* @__PURE__ */ jsx(Skeleton, {}) }),
|
|
27
27
|
Array.from({ length: count }).map((_, i) => (
|
|
28
28
|
// eslint-disable-next-line react/no-array-index-key
|
|
29
|
-
/* @__PURE__ */ jsx(Skeleton, { variant: "text", sx: { fontSize: "
|
|
29
|
+
/* @__PURE__ */ jsx(Skeleton, { variant: "text", sx: { fontSize: "0.875rem", width: "60%" } }, i)
|
|
30
30
|
))
|
|
31
31
|
]
|
|
32
32
|
}
|
|
@@ -2,7 +2,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { Box, Divider, Fade, Skeleton, Stack } from "@mui/material";
|
|
3
3
|
export default function DonationSkeleton() {
|
|
4
4
|
return /* @__PURE__ */ jsx(Fade, { in: true, children: /* @__PURE__ */ jsxs(Stack, { direction: "column", children: [
|
|
5
|
-
/* @__PURE__ */ jsx(Skeleton, { variant: "text", sx: { fontSize: "
|
|
5
|
+
/* @__PURE__ */ jsx(Skeleton, { variant: "text", sx: { fontSize: "1.75rem", width: "40%" } }),
|
|
6
6
|
/* @__PURE__ */ jsx(Skeleton, { sx: { mt: 2 }, variant: "rounded", height: 40 }),
|
|
7
7
|
/* @__PURE__ */ jsx(
|
|
8
8
|
Divider,
|
|
@@ -2,7 +2,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { Fade, Skeleton, Stack, Typography } from "@mui/material";
|
|
3
3
|
export default function OverviewSkeleton() {
|
|
4
4
|
return /* @__PURE__ */ jsx(Fade, { in: true, children: /* @__PURE__ */ jsxs(Stack, { direction: "column", children: [
|
|
5
|
-
/* @__PURE__ */ jsx(Stack, { direction: "row", alignItems: "center", spacing: 2, children: /* @__PURE__ */ jsx(Skeleton, { variant: "text", sx: { fontSize: "
|
|
5
|
+
/* @__PURE__ */ jsx(Stack, { direction: "row", alignItems: "center", spacing: 2, children: /* @__PURE__ */ jsx(Skeleton, { variant: "text", sx: { fontSize: "1.75rem", width: "40%" } }) }),
|
|
6
6
|
/* @__PURE__ */ jsx(Skeleton, { sx: { mt: 2 }, variant: "rounded", height: 100 }),
|
|
7
7
|
/* @__PURE__ */ jsx(Typography, { mt: 2, component: "div", variant: "h4", children: /* @__PURE__ */ jsx(Skeleton, {}) }),
|
|
8
8
|
/* @__PURE__ */ jsx(Typography, { component: "div", variant: "h2", children: /* @__PURE__ */ jsx(Skeleton, {}) })
|
|
@@ -2,7 +2,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { Box, Fade, Skeleton, Stack, Typography } from "@mui/material";
|
|
3
3
|
export default function PaymentSkeleton() {
|
|
4
4
|
return /* @__PURE__ */ jsx(Fade, { in: true, children: /* @__PURE__ */ jsxs(Stack, { direction: "column", children: [
|
|
5
|
-
/* @__PURE__ */ jsx(Skeleton, { variant: "text", sx: { fontSize: "
|
|
5
|
+
/* @__PURE__ */ jsx(Skeleton, { variant: "text", sx: { fontSize: "1.75rem", width: "40%" } }),
|
|
6
6
|
/* @__PURE__ */ jsx(Skeleton, { sx: { mt: 2 }, variant: "rounded", height: 68 }),
|
|
7
7
|
/* @__PURE__ */ jsxs(Box, { mt: 1, children: [
|
|
8
8
|
/* @__PURE__ */ jsx(Typography, { component: "div", variant: "h4", mb: -1, children: /* @__PURE__ */ jsx(Skeleton, {}) }),
|
package/es/payment/summary.js
CHANGED
|
@@ -309,7 +309,7 @@ export default function PaymentSummary({
|
|
|
309
309
|
Typography,
|
|
310
310
|
{
|
|
311
311
|
component: "div",
|
|
312
|
-
sx: { fontSize: "0.
|
|
312
|
+
sx: { fontSize: "0.7875rem", color: "text.lighter", textAlign: "right", margin: "-2px 0 8px" },
|
|
313
313
|
children: headlines.then
|
|
314
314
|
}
|
|
315
315
|
)
|
package/es/theme/index.js
CHANGED
|
@@ -50,7 +50,7 @@ export function PaymentThemeProvider({
|
|
|
50
50
|
},
|
|
51
51
|
styleOverrides: {
|
|
52
52
|
root: {
|
|
53
|
-
fontSize: "
|
|
53
|
+
fontSize: "0.875rem",
|
|
54
54
|
fontWeight: 500,
|
|
55
55
|
textTransform: "none",
|
|
56
56
|
boxShadow: "none"
|
|
@@ -98,7 +98,8 @@ export function PaymentThemeProvider({
|
|
|
98
98
|
MuiTab: {
|
|
99
99
|
styleOverrides: {
|
|
100
100
|
root: {
|
|
101
|
-
textTransform: "none"
|
|
101
|
+
textTransform: "none",
|
|
102
|
+
fontSize: "0.875rem"
|
|
102
103
|
}
|
|
103
104
|
}
|
|
104
105
|
},
|
package/es/theme/typography.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export const typography = {
|
|
2
2
|
h1: {
|
|
3
|
-
fontSize: "1.
|
|
3
|
+
fontSize: "1.5rem",
|
|
4
4
|
lineHeight: 1.2,
|
|
5
5
|
fontWeight: 800,
|
|
6
6
|
letterSpacing: "-.025em"
|
|
@@ -12,38 +12,38 @@ export const typography = {
|
|
|
12
12
|
letterSpacing: "-.025em"
|
|
13
13
|
},
|
|
14
14
|
h3: {
|
|
15
|
-
fontSize: "1.
|
|
15
|
+
fontSize: "1.09375rem",
|
|
16
16
|
lineHeight: 1.4,
|
|
17
17
|
fontWeight: 600,
|
|
18
18
|
letterSpacing: "-.025em"
|
|
19
19
|
},
|
|
20
20
|
h4: {
|
|
21
|
-
fontSize: "1.
|
|
21
|
+
fontSize: "1.09375rem",
|
|
22
22
|
lineHeight: 1.5,
|
|
23
23
|
fontWeight: 600
|
|
24
24
|
},
|
|
25
25
|
h5: {
|
|
26
|
-
fontSize: "
|
|
26
|
+
fontSize: "0.875rem",
|
|
27
27
|
lineHeight: 1.75,
|
|
28
28
|
fontWeight: 400
|
|
29
29
|
},
|
|
30
30
|
h6: {
|
|
31
|
-
fontSize: "
|
|
31
|
+
fontSize: "0.875rem",
|
|
32
32
|
lineHeight: 1.75,
|
|
33
33
|
fontWeight: 400
|
|
34
34
|
},
|
|
35
35
|
subtitle1: {
|
|
36
|
-
fontSize: "
|
|
36
|
+
fontSize: "0.875rem",
|
|
37
37
|
lineHeight: 1.75,
|
|
38
38
|
fontWeight: 400
|
|
39
39
|
},
|
|
40
40
|
subtitle2: {
|
|
41
|
-
fontSize: "
|
|
41
|
+
fontSize: "0.875rem",
|
|
42
42
|
lineHeight: 1.75,
|
|
43
43
|
fontWeight: 400
|
|
44
44
|
},
|
|
45
45
|
body1: {
|
|
46
|
-
fontSize: "
|
|
46
|
+
fontSize: "0.875rem",
|
|
47
47
|
lineHeight: 1.75
|
|
48
48
|
},
|
|
49
49
|
fontWeightLight: 300,
|