@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.
Files changed (53) hide show
  1. package/es/checkout/donate.d.ts +1 -0
  2. package/es/checkout/donate.js +188 -89
  3. package/es/components/livemode.js +1 -1
  4. package/es/components/table.js +1 -1
  5. package/es/libs/util.d.ts +1 -0
  6. package/es/libs/util.js +10 -1
  7. package/es/payment/amount.js +1 -1
  8. package/es/payment/form/index.js +1 -1
  9. package/es/payment/form/stripe/form.js +1 -1
  10. package/es/payment/product-card.js +2 -2
  11. package/es/payment/product-item.js +1 -1
  12. package/es/payment/product-skeleton.js +2 -2
  13. package/es/payment/skeleton/donation.js +1 -1
  14. package/es/payment/skeleton/overview.js +1 -1
  15. package/es/payment/skeleton/payment.js +1 -1
  16. package/es/payment/summary.js +1 -1
  17. package/es/theme/index.js +3 -2
  18. package/es/theme/typography.js +8 -8
  19. package/lib/checkout/donate.d.ts +1 -0
  20. package/lib/checkout/donate.js +193 -129
  21. package/lib/components/livemode.js +1 -1
  22. package/lib/components/table.js +1 -1
  23. package/lib/libs/util.d.ts +1 -0
  24. package/lib/libs/util.js +7 -0
  25. package/lib/payment/amount.js +1 -1
  26. package/lib/payment/form/index.js +2 -2
  27. package/lib/payment/form/stripe/form.js +1 -1
  28. package/lib/payment/product-card.js +2 -2
  29. package/lib/payment/product-item.js +1 -1
  30. package/lib/payment/product-skeleton.js +2 -2
  31. package/lib/payment/skeleton/donation.js +1 -1
  32. package/lib/payment/skeleton/overview.js +1 -1
  33. package/lib/payment/skeleton/payment.js +1 -1
  34. package/lib/payment/summary.js +1 -1
  35. package/lib/theme/index.js +3 -2
  36. package/lib/theme/typography.js +8 -8
  37. package/package.json +8 -8
  38. package/src/checkout/donate.tsx +176 -112
  39. package/src/components/livemode.tsx +1 -1
  40. package/src/components/table.tsx +1 -1
  41. package/src/libs/util.ts +11 -1
  42. package/src/payment/amount.tsx +1 -1
  43. package/src/payment/form/index.tsx +1 -1
  44. package/src/payment/form/stripe/form.tsx +1 -1
  45. package/src/payment/product-card.tsx +2 -2
  46. package/src/payment/product-item.tsx +1 -1
  47. package/src/payment/product-skeleton.tsx +2 -2
  48. package/src/payment/skeleton/donation.tsx +1 -1
  49. package/src/payment/skeleton/overview.tsx +1 -1
  50. package/src/payment/skeleton/payment.tsx +1 -1
  51. package/src/payment/summary.tsx +1 -1
  52. package/src/theme/index.tsx +2 -1
  53. package/src/theme/typography.ts +8 -8
@@ -1,3 +1,4 @@
1
+ /* eslint-disable react/no-unused-prop-types */
1
2
  /* eslint-disable react/require-default-props */
2
3
  /* eslint-disable @typescript-eslint/indent */
3
4
  import Dialog from '@arcblock/ux/lib/Dialog';
@@ -18,14 +19,9 @@ import {
18
19
  Box,
19
20
  Button,
20
21
  CircularProgress,
21
- Hidden,
22
22
  IconButton,
23
23
  Popover,
24
24
  Stack,
25
- Table,
26
- TableBody,
27
- TableCell,
28
- TableRow,
29
25
  Typography,
30
26
  Tooltip,
31
27
  type ButtonProps as MUIButtonProps,
@@ -36,13 +32,13 @@ import uniqBy from 'lodash/unionBy';
36
32
  import { useEffect, useRef, useState } from 'react';
37
33
  import { Settings } from '@mui/icons-material';
38
34
 
39
- import TxLink from '../components/blockchain/tx';
40
35
  import api from '../libs/api';
41
36
  import {
42
37
  formatAmount,
43
38
  formatBNStr,
44
- formatDateTime,
45
39
  getCustomerAvatar,
40
+ getTxLink,
41
+ getUserProfileLink,
46
42
  lazyLoad,
47
43
  openDonationSettings,
48
44
  } from '../libs/util';
@@ -58,7 +54,7 @@ export type DonateHistory = {
58
54
  supporters: TCheckoutSessionExpanded[];
59
55
  currency: TPaymentCurrency;
60
56
  method: TPaymentMethod;
61
- // total?: number;
57
+ total?: number;
62
58
  totalAmount: string;
63
59
  };
64
60
 
@@ -149,124 +145,174 @@ const emojiFont = {
149
145
  'Avenir, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',
150
146
  };
151
147
 
148
+ function DonateDetails({ supporters = [], currency, method }: DonateHistory) {
149
+ const { locale } = useLocaleContext();
150
+ return (
151
+ <Stack
152
+ sx={{
153
+ width: '100%',
154
+ minWidth: '256px',
155
+ maxWidth: 'calc(100vw - 32px)',
156
+ maxHeight: '300px',
157
+ overflowX: 'hidden',
158
+ overflowY: 'auto',
159
+ margin: '0 auto',
160
+ }}>
161
+ {supporters.map((x) => (
162
+ <Box
163
+ key={x.id}
164
+ sx={{
165
+ padding: '6px',
166
+ '&:hover': {
167
+ backgroundColor: 'var(--backgrounds-bg-highlight, #eff6ff)',
168
+ transition: 'background-color 200ms linear',
169
+ cursor: 'pointer',
170
+ },
171
+ borderBottom: '1px solid var(--stroke-border-base, #EFF1F5)',
172
+ display: 'flex',
173
+ justifyContent: 'space-between',
174
+ alignItems: 'center',
175
+ }}
176
+ onClick={() => {
177
+ const { link, text } = getTxLink(method, x.payment_details as PaymentDetails);
178
+ if (link && text) {
179
+ window.open(link, '_blank');
180
+ }
181
+ }}>
182
+ <Stack
183
+ direction="row"
184
+ alignItems="center"
185
+ spacing={0.5}
186
+ sx={{
187
+ flex: 3,
188
+ overflow: 'hidden',
189
+ }}>
190
+ <Avatar
191
+ key={x.id}
192
+ src={getCustomerAvatar(x.customer?.did, x?.updated_at ? new Date(x.updated_at).toISOString() : '', 20)}
193
+ alt={x.customer?.name}
194
+ variant="circular"
195
+ sx={{ width: 20, height: 20 }}
196
+ onClick={(e) => {
197
+ e.stopPropagation();
198
+ if (x.customer?.did) {
199
+ window.open(getUserProfileLink(x.customer?.did, locale), '_blank');
200
+ }
201
+ }}
202
+ />
203
+ <Typography
204
+ sx={{
205
+ ml: '8px !important',
206
+ fontSize: '0.875rem',
207
+ fontWeight: '500',
208
+ overflow: 'hidden',
209
+ whiteSpace: 'nowrap',
210
+ textOverflow: 'ellipsis',
211
+ }}
212
+ onClick={(e) => {
213
+ e.stopPropagation();
214
+ if (x.customer?.did) {
215
+ window.open(getUserProfileLink(x.customer?.did, locale), '_blank');
216
+ }
217
+ }}>
218
+ {x.customer?.name}
219
+ </Typography>
220
+ </Stack>
221
+ <Stack direction="row" alignItems="center" justifyContent="flex-end" spacing={0.5} sx={{ flex: 1 }}>
222
+ <Avatar
223
+ key={x.id}
224
+ src={currency?.logo}
225
+ alt={currency?.symbol}
226
+ variant="circular"
227
+ sx={{ width: 16, height: 16 }}
228
+ />
229
+ <Typography sx={{ color: 'text.secondary' }}>{formatBNStr(x.amount_total, currency.decimal)}</Typography>
230
+ <Typography sx={{ color: 'text.secondary' }}>{currency.symbol}</Typography>
231
+ </Stack>
232
+ </Box>
233
+ ))}
234
+ </Stack>
235
+ );
236
+ }
237
+
152
238
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
153
- function SupporterAvatar({ supporters = [], totalAmount = '0', currency, method }: DonateHistory) {
154
- const { t } = useLocaleContext();
239
+ function SupporterAvatar({
240
+ supporters = [],
241
+ totalAmount = '0',
242
+ currency,
243
+ method,
244
+ showDonateDetails = false,
245
+ }: DonateHistory & { showDonateDetails?: boolean }) {
246
+ const [open, setOpen] = useState(false);
155
247
  const customers = uniqBy(supporters, 'customer_did');
156
248
  const customersNum = customers.length;
249
+ if (customersNum === 0) return null;
157
250
  return (
158
- <Box
159
- display="flex"
160
- flexDirection="column"
161
- alignItems="center"
162
- sx={{
163
- '.MuiAvatar-root': {
164
- width: '32px',
165
- height: '32px',
166
- },
167
- }}
168
- gap={{
169
- xs: 0.5,
170
- sm: 1,
171
- }}>
172
- <Typography component="p" color="text.secondary">
173
- {customersNum === 0 ? (
174
- <span style={emojiFont}>{t('payment.checkout.donation.empty')}</span>
175
- ) : (
176
- t('payment.checkout.donation.summary', {
177
- total: customersNum,
178
- symbol: currency.symbol,
179
- totalAmount: formatAmount(totalAmount || '0', currency.decimal),
180
- })
181
- )}
182
- </Typography>
183
- <AvatarGroup total={customersNum} max={20}>
184
- {customers.map((x) => (
251
+ <Stack flexDirection="row" justifyContent="center" alignItems="center">
252
+ <AvatarGroup max={5}>
253
+ {customers.slice(0, 5).map((supporter) => (
185
254
  <Avatar
186
- key={x.id}
187
- title={x.customer?.name}
188
- alt={x.customer?.name}
189
- src={getCustomerAvatar(x.customer?.did, x?.updated_at ? new Date(x.updated_at).toISOString() : '', 48)}
190
- variant="circular"
191
- sx={{ width: 32, height: 32 }}
255
+ src={getCustomerAvatar(
256
+ supporter.customer?.did,
257
+ supporter?.updated_at ? new Date(supporter.updated_at).toISOString() : '',
258
+ 24
259
+ )}
260
+ alt={supporter.customer?.name}
261
+ key={supporter.customer?.id}
262
+ sx={{
263
+ width: '24px',
264
+ height: '24px',
265
+ }}
192
266
  />
193
267
  ))}
194
268
  </AvatarGroup>
195
- </Box>
269
+ <Box
270
+ sx={{
271
+ fontSize: '14px',
272
+ color: 'text.secondary',
273
+ pl: 1.5,
274
+ pr: 1,
275
+ ml: -1,
276
+ borderRadius: '8px',
277
+ backgroundColor: '#f4f4f5',
278
+ height: '24px',
279
+ ...(showDonateDetails
280
+ ? {
281
+ cursor: 'pointer',
282
+ '&:hover': {
283
+ backgroundColor: '#e5e7eb',
284
+ },
285
+ }
286
+ : {}),
287
+ }}
288
+ onClick={() => showDonateDetails && setOpen(true)}>
289
+ {`${customersNum} supporter${customersNum > 1 ? 's' : ''} (${formatAmount(totalAmount || '0', currency?.decimal)} ${currency.symbol})`}
290
+ </Box>
291
+ <Dialog
292
+ open={open}
293
+ onClose={() => setOpen(false)}
294
+ sx={{
295
+ '.MuiDialogContent-root': {
296
+ width: '450px',
297
+ padding: '8px',
298
+ },
299
+ }}
300
+ title={`${customersNum} supporter${customersNum > 1 ? 's' : ''}`}>
301
+ <DonateDetails supporters={supporters} currency={currency} method={method} totalAmount={totalAmount} />
302
+ </Dialog>
303
+ </Stack>
196
304
  );
197
305
  }
198
306
 
199
307
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
200
308
  function SupporterTable({ supporters = [], totalAmount = '0', currency, method }: DonateHistory) {
201
- const { t } = useLocaleContext();
202
309
  const customers = uniqBy(supporters, 'customer_did');
203
310
  const customersNum = customers.length;
311
+ if (customersNum === 0) return null;
204
312
  return (
205
313
  <Box display="flex" flexDirection="column" alignItems="center" gap={{ xs: 0.5, sm: 1 }}>
206
- <Typography component="p" color="text.secondary">
207
- {customersNum === 0 ? (
208
- <span style={emojiFont}>{t('payment.checkout.donation.empty')}</span>
209
- ) : (
210
- t('payment.checkout.donation.summary', {
211
- total: customersNum,
212
- symbol: currency.symbol,
213
- totalAmount: formatAmount(totalAmount || '0', currency.decimal),
214
- })
215
- )}
216
- </Typography>
217
- <Table size="small" sx={{ width: '100%', overflow: 'hidden' }}>
218
- <TableBody>
219
- {supporters.map((x) => (
220
- <TableRow
221
- key={x.id}
222
- sx={{
223
- '> td': {
224
- padding: '8px 16px 8px 0',
225
- borderTop: '1px solid #e0e0e0',
226
- borderBottom: '1px solid #e0e0e0',
227
- },
228
- '> td:last-of-type': {
229
- paddingRight: '0',
230
- },
231
- }}>
232
- <TableCell>
233
- <Stack direction="row" alignItems="center" spacing={0.5}>
234
- <Avatar
235
- key={x.id}
236
- src={getCustomerAvatar(
237
- x.customer?.did,
238
- x?.updated_at ? new Date(x.updated_at).toISOString() : '',
239
- 48
240
- )}
241
- alt={x.customer?.name}
242
- variant="circular"
243
- sx={{ width: 24, height: 24 }}
244
- />
245
- <Hidden smDown>
246
- <Typography>{x.customer?.name}</Typography>
247
- </Hidden>
248
- </Stack>
249
- </TableCell>
250
- <TableCell align="right">
251
- <Stack direction="row" alignItems="center" justifyContent="flex-end" spacing={0.5}>
252
- <Typography fontWeight={500} component="strong">
253
- {formatBNStr(x.amount_total, currency.decimal)}
254
- </Typography>
255
- <Typography component="span">{currency.symbol}</Typography>
256
- </Stack>
257
- </TableCell>
258
- <Hidden smDown>
259
- <TableCell align="right">
260
- <Typography>{formatDateTime(x.created_at)}</Typography>
261
- </TableCell>
262
- </Hidden>
263
- <TableCell align="right">
264
- <TxLink method={method} details={x.payment_details as PaymentDetails} mode="customer" align="right" />
265
- </TableCell>
266
- </TableRow>
267
- ))}
268
- </TableBody>
269
- </Table>
314
+ <SupporterAvatar supporters={supporters} totalAmount={totalAmount} currency={currency} method={method} />
315
+ <DonateDetails supporters={supporters} totalAmount={totalAmount} currency={currency} method={method} />
270
316
  </Box>
271
317
  );
272
318
  }
@@ -539,11 +585,29 @@ function CheckoutDonateInner({
539
585
  <Button
540
586
  size={(donateSettings.appearance?.button?.size || 'medium') as any}
541
587
  color={(donateSettings.appearance?.button?.color || 'primary') as any}
542
- variant={(donateSettings.appearance?.button?.variant || 'contained') as any}
588
+ variant={(donateSettings.appearance?.button?.variant || 'outlined') as any}
589
+ sx={{
590
+ ...(!donateSettings.appearance?.button?.variant
591
+ ? {
592
+ color: 'var(--foregrounds-fg-base, #010714)',
593
+ borderColor: 'var(--stroke-button-secondary-border, #E5E7EB)',
594
+ '&:hover': {
595
+ backgroundColor: 'var(--buttons-button-neutral-hover, #F3F4F6)',
596
+ borderColor: 'var(--stroke-button-secondary-border, #E5E7EB)',
597
+ },
598
+ }
599
+ : {}),
600
+ // @ts-ignore
601
+ ...(donateSettings.appearance?.button?.sx || {}),
602
+ }}
543
603
  {...donateSettings.appearance?.button}
544
604
  onClick={() => startDonate()}>
545
605
  <Stack direction="row" alignItems="center" spacing={0.5}>
546
- {donateSettings.appearance.button.icon}
606
+ {donateSettings.appearance.button.icon && (
607
+ <Typography sx={{ mr: 0.5, display: 'inline-flex', alignItems: 'center' }}>
608
+ {donateSettings.appearance.button.icon}
609
+ </Typography>
610
+ )}
547
611
  {typeof donateSettings.appearance.button.text === 'string' ? (
548
612
  <Typography>{donateSettings.appearance.button.text}</Typography>
549
613
  ) : (
@@ -552,7 +616,7 @@ function CheckoutDonateInner({
552
616
  </Stack>
553
617
  </Button>
554
618
  {supporters.data && donateSettings.appearance.history.variant === 'avatar' && (
555
- <SupporterAvatar {...(supporters.data as DonateHistory)} />
619
+ <SupporterAvatar {...(supporters.data as DonateHistory)} showDonateDetails />
556
620
  )}
557
621
  {supporters.data && donateSettings.appearance.history.variant === 'table' && (
558
622
  <SupporterTable {...(supporters.data as DonateHistory)} />
@@ -19,7 +19,7 @@ export default function Livemode({ color, backgroundColor, sx }: Props) {
19
19
  height: 18,
20
20
  lineHeight: 1.2,
21
21
  textTransform: 'uppercase',
22
- fontSize: '0.8rem',
22
+ fontSize: '0.7rem',
23
23
  fontWeight: 'bold',
24
24
  borderRadius: '4px',
25
25
  backgroundColor,
@@ -71,7 +71,7 @@ const Wrapped = styled(Datatable)`
71
71
  ${(props: any) =>
72
72
  props?.hasRowLink
73
73
  ? `.MuiTableCell-root {
74
- font-size: 1rem !important;
74
+ font-size: 0.875rem !important;
75
75
  }`
76
76
  : ''}
77
77
  .MuiPaper-root {
package/src/libs/util.ts CHANGED
@@ -22,7 +22,7 @@ import numbro from 'numbro';
22
22
  // eslint-disable-next-line import/no-extraneous-dependencies
23
23
  import stringWidth from 'string-width';
24
24
  import { defaultCountries } from 'react-international-phone';
25
- import { joinURL } from 'ufo';
25
+ import { joinURL, withQuery } from 'ufo';
26
26
 
27
27
  import { t } from '../locales';
28
28
  import dayjs from './dayjs';
@@ -1184,3 +1184,13 @@ export function openDonationSettings(openInNewTab: boolean = false) {
1184
1184
  window.open(`${window.location.origin}${mountPoint}/integrations/donations`, openInNewTab ? '_blank' : '_self');
1185
1185
  }
1186
1186
  }
1187
+
1188
+ export function getUserProfileLink(userDid: string, locale = 'en') {
1189
+ return joinURL(
1190
+ window.location.origin,
1191
+ withQuery('.well-known/service/user', {
1192
+ locale,
1193
+ did: userDid,
1194
+ })
1195
+ );
1196
+ }
@@ -10,7 +10,7 @@ export default function PaymentAmount({ amount, sx }: Props) {
10
10
  sx={{
11
11
  my: 0.5,
12
12
  fontWeight: 600,
13
- fontSize: '2.5rem',
13
+ fontSize: '2.1875rem',
14
14
  letterSpacing: '-0.03rem',
15
15
  fontVariantNumeric: 'tabular-nums',
16
16
  ...sx,
@@ -575,7 +575,7 @@ export default function PaymentForm({
575
575
  </Box>
576
576
 
577
577
  {['subscription', 'setup'].includes(checkoutSession.mode) && (
578
- <Typography sx={{ mt: 2.5, color: 'text.lighter', fontSize: '0.9rem', lineHeight: '1.1rem' }}>
578
+ <Typography sx={{ mt: 2.5, color: 'text.lighter', fontSize: '0.7875rem', lineHeight: '0.9625rem' }}>
579
579
  {t('payment.checkout.confirm', { payee })}
580
580
  </Typography>
581
581
  )}
@@ -125,7 +125,7 @@ function StripeCheckoutForm({
125
125
  {stripe && elements && state.loaded && (
126
126
  <LoadingButton
127
127
  fullWidth
128
- sx={{ mt: 2, mb: 1, borderRadius: 0, fontSize: '1.1rem' }}
128
+ sx={{ mt: 2, mb: 1, borderRadius: 0, fontSize: '0.875rem' }}
129
129
  type="submit"
130
130
  disabled={state.confirming || !state.loaded}
131
131
  loading={state.confirming}
@@ -41,13 +41,13 @@ export default function ProductCard({ size, variant, name, logo, description, ex
41
41
  <Typography
42
42
  variant="body1"
43
43
  title={description}
44
- sx={{ fontSize: '0.85rem', mb: 0.5, lineHeight: 1.2, textAlign: 'left' }}
44
+ sx={{ fontSize: '0.74375rem', mb: 0.5, lineHeight: 1.2, textAlign: 'left' }}
45
45
  color="text.lighter">
46
46
  {description}
47
47
  </Typography>
48
48
  )}
49
49
  {extra && (
50
- <Box sx={{ fontSize: '0.85rem' }} color="text.lighter">
50
+ <Box sx={{ fontSize: '0.74375rem' }} color="text.lighter">
51
51
  {extra}
52
52
  </Box>
53
53
  )}
@@ -86,7 +86,7 @@ export default function ProductItem({
86
86
  {primaryText}
87
87
  </Typography>
88
88
  {pricing.secondary && (
89
- <Typography sx={{ fontSize: '0.85rem', color: 'text.lighter' }}>{pricing.secondary}</Typography>
89
+ <Typography sx={{ fontSize: '0.74375rem', color: 'text.lighter' }}>{pricing.secondary}</Typography>
90
90
  )}
91
91
  </Stack>
92
92
  </Stack>
@@ -22,7 +22,7 @@ export default function ProductSkeleton({ count }: { count: number }) {
22
22
  <Typography component="div" variant="h4" sx={{ width: '50%' }}>
23
23
  <Skeleton />
24
24
  </Typography>
25
- <Skeleton variant="text" sx={{ fontSize: '1rem', width: '60%' }} />
25
+ <Skeleton variant="text" sx={{ fontSize: '0.875rem', width: '60%' }} />
26
26
  <Typography component="div" variant="h3" sx={{ width: '60%' }}>
27
27
  <Skeleton />
28
28
  </Typography>
@@ -31,7 +31,7 @@ export default function ProductSkeleton({ count }: { count: number }) {
31
31
  </Typography>
32
32
  {Array.from({ length: count }).map((_, i) => (
33
33
  // eslint-disable-next-line react/no-array-index-key
34
- <Skeleton key={i} variant="text" sx={{ fontSize: '1rem', width: '60%' }} />
34
+ <Skeleton key={i} variant="text" sx={{ fontSize: '0.875rem', width: '60%' }} />
35
35
  ))}
36
36
  </Stack>
37
37
  </Fade>
@@ -4,7 +4,7 @@ export default function DonationSkeleton() {
4
4
  return (
5
5
  <Fade in>
6
6
  <Stack direction="column">
7
- <Skeleton variant="text" sx={{ fontSize: '2rem', width: '40%' }} />
7
+ <Skeleton variant="text" sx={{ fontSize: '1.75rem', width: '40%' }} />
8
8
  <Skeleton sx={{ mt: 2 }} variant="rounded" height={40} />
9
9
  <Divider
10
10
  sx={{
@@ -5,7 +5,7 @@ export default function OverviewSkeleton() {
5
5
  <Fade in>
6
6
  <Stack direction="column">
7
7
  <Stack direction="row" alignItems="center" spacing={2}>
8
- <Skeleton variant="text" sx={{ fontSize: '2rem', width: '40%' }} />
8
+ <Skeleton variant="text" sx={{ fontSize: '1.75rem', width: '40%' }} />
9
9
  </Stack>
10
10
  <Skeleton sx={{ mt: 2 }} variant="rounded" height={100} />
11
11
  <Typography mt={2} component="div" variant="h4">
@@ -4,7 +4,7 @@ export default function PaymentSkeleton() {
4
4
  return (
5
5
  <Fade in>
6
6
  <Stack direction="column">
7
- <Skeleton variant="text" sx={{ fontSize: '2rem', width: '40%' }} />
7
+ <Skeleton variant="text" sx={{ fontSize: '1.75rem', width: '40%' }} />
8
8
  <Skeleton sx={{ mt: 2 }} variant="rounded" height={68} />
9
9
  <Box mt={1}>
10
10
  <Typography component="div" variant="h4" mb={-1}>
@@ -366,7 +366,7 @@ export default function PaymentSummary({
366
366
  {headlines.then && headlines.showThen && (
367
367
  <Typography
368
368
  component="div"
369
- sx={{ fontSize: '0.9rem', color: 'text.lighter', textAlign: 'right', margin: '-2px 0 8px' }}>
369
+ sx={{ fontSize: '0.7875rem', color: 'text.lighter', textAlign: 'right', margin: '-2px 0 8px' }}>
370
370
  {headlines.then}
371
371
  </Typography>
372
372
  )}
@@ -60,7 +60,7 @@ export function PaymentThemeProvider({
60
60
  },
61
61
  styleOverrides: {
62
62
  root: {
63
- fontSize: '1rem',
63
+ fontSize: '0.875rem',
64
64
  fontWeight: 500,
65
65
  textTransform: 'none',
66
66
  boxShadow: 'none',
@@ -109,6 +109,7 @@ export function PaymentThemeProvider({
109
109
  styleOverrides: {
110
110
  root: {
111
111
  textTransform: 'none',
112
+ fontSize: '0.875rem',
112
113
  },
113
114
  },
114
115
  },
@@ -2,7 +2,7 @@ import type { TypographyOptions } from '@mui/material/styles/createTypography';
2
2
 
3
3
  export const typography: TypographyOptions = {
4
4
  h1: {
5
- fontSize: '1.875rem',
5
+ fontSize: '1.5rem',
6
6
  lineHeight: 1.2,
7
7
  fontWeight: 800,
8
8
  letterSpacing: '-.025em',
@@ -14,38 +14,38 @@ export const typography: TypographyOptions = {
14
14
  letterSpacing: '-.025em',
15
15
  },
16
16
  h3: {
17
- fontSize: '1.25rem',
17
+ fontSize: '1.09375rem',
18
18
  lineHeight: 1.4,
19
19
  fontWeight: 600,
20
20
  letterSpacing: '-.025em',
21
21
  },
22
22
  h4: {
23
- fontSize: '1.125rem',
23
+ fontSize: '1.09375rem',
24
24
  lineHeight: 1.5,
25
25
  fontWeight: 600,
26
26
  },
27
27
  h5: {
28
- fontSize: '1rem',
28
+ fontSize: '0.875rem',
29
29
  lineHeight: 1.75,
30
30
  fontWeight: 400,
31
31
  },
32
32
  h6: {
33
- fontSize: '1rem',
33
+ fontSize: '0.875rem',
34
34
  lineHeight: 1.75,
35
35
  fontWeight: 400,
36
36
  },
37
37
  subtitle1: {
38
- fontSize: '1rem',
38
+ fontSize: '0.875rem',
39
39
  lineHeight: 1.75,
40
40
  fontWeight: 400,
41
41
  },
42
42
  subtitle2: {
43
- fontSize: '1rem',
43
+ fontSize: '0.875rem',
44
44
  lineHeight: 1.75,
45
45
  fontWeight: 400,
46
46
  },
47
47
  body1: {
48
- fontSize: '1rem',
48
+ fontSize: '0.875rem',
49
49
  lineHeight: 1.75,
50
50
  },
51
51