@blocklet/payment-react 1.18.56 → 1.19.0
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 -15
- package/es/checkout/donate.js +301 -189
- package/es/checkout/form.d.ts +1 -15
- package/es/checkout/form.js +5 -13
- package/es/checkout/table.js +3 -3
- package/es/components/blockchain/gas.d.ts +1 -5
- package/es/components/blockchain/gas.js +10 -2
- package/es/components/blockchain/tx.d.ts +1 -8
- package/es/components/blockchain/tx.js +28 -7
- package/es/components/confirm.d.ts +1 -10
- package/es/components/confirm.js +4 -10
- package/es/components/country-select.d.ts +3 -2
- package/es/components/country-select.js +375 -352
- package/es/components/input.d.ts +11 -20
- package/es/components/input.js +46 -43
- package/es/components/lazy-loader.js +1 -2
- package/es/components/link.d.ts +2 -9
- package/es/components/link.js +9 -6
- package/es/components/livemode.d.ts +2 -8
- package/es/components/livemode.js +1 -5
- package/es/components/loading-button.d.ts +6 -1
- package/es/components/loading-button.js +56 -66
- package/es/components/over-due-invoice-payment.d.ts +0 -18
- package/es/components/over-due-invoice-payment.js +138 -95
- package/es/components/payment-beneficiaries.d.ts +2 -7
- package/es/components/payment-beneficiaries.js +86 -40
- package/es/components/pricing-item.d.ts +0 -5
- package/es/components/pricing-item.js +1 -4
- package/es/components/pricing-table.d.ts +2 -10
- package/es/components/pricing-table.js +8 -7
- package/es/components/resume-subscription.d.ts +0 -10
- package/es/components/resume-subscription.js +42 -21
- package/es/components/truncated-text.d.ts +2 -9
- package/es/components/truncated-text.js +0 -5
- package/es/contexts/donate.d.ts +0 -7
- package/es/contexts/donate.js +10 -8
- package/es/contexts/payment.d.ts +1 -4
- package/es/contexts/payment.js +7 -2
- package/es/history/invoice/list.d.ts +2 -18
- package/es/history/invoice/list.js +151 -73
- package/es/history/payment/list.js +115 -38
- package/es/hooks/keyboard.d.ts +1 -1
- package/es/hooks/keyboard.js +2 -4
- package/es/libs/cached-request.js +2 -4
- package/es/libs/phone-validator.js +1 -2
- package/es/libs/util.js +2 -4
- package/es/libs/validator.js +2 -4
- package/es/payment/amount.d.ts +2 -7
- package/es/payment/amount.js +1 -5
- package/es/payment/donation-form.d.ts +2 -10
- package/es/payment/donation-form.js +196 -160
- package/es/payment/error.d.ts +2 -8
- package/es/payment/error.js +40 -20
- package/es/payment/footer.d.ts +2 -3
- package/es/payment/footer.js +19 -6
- package/es/payment/form/addon.js +14 -4
- package/es/payment/form/address.d.ts +2 -9
- package/es/payment/form/address.js +3 -6
- package/es/payment/form/currency.js +45 -25
- package/es/payment/form/index.d.ts +2 -8
- package/es/payment/form/index.js +107 -65
- package/es/payment/form/phone.js +2 -4
- package/es/payment/form/stripe/form.d.ts +2 -8
- package/es/payment/form/stripe/form.js +1 -3
- package/es/payment/header.js +38 -16
- package/es/payment/index.d.ts +2 -9
- package/es/payment/index.js +5 -14
- package/es/payment/product-card.d.ts +2 -11
- package/es/payment/product-card.js +84 -50
- package/es/payment/product-donation.js +175 -114
- package/es/payment/product-item.d.ts +2 -9
- package/es/payment/product-item.js +185 -142
- package/es/payment/product-skeleton.js +2 -2
- package/es/payment/skeleton/donation.js +27 -7
- package/es/payment/skeleton/overview.js +22 -2
- package/es/payment/skeleton/payment.js +33 -5
- package/es/payment/success.d.ts +2 -9
- package/es/payment/success.js +41 -14
- package/es/payment/summary.d.ts +2 -17
- package/es/payment/summary.js +184 -111
- package/es/theme/index.d.ts +0 -5
- package/es/theme/index.js +2 -5
- package/es/theme/typography.d.ts +2 -2
- package/lib/checkout/donate.d.ts +1 -15
- package/lib/checkout/donate.js +75 -54
- package/lib/checkout/form.d.ts +1 -15
- package/lib/checkout/form.js +7 -15
- package/lib/checkout/table.js +4 -4
- package/lib/components/blockchain/gas.d.ts +1 -5
- package/lib/components/blockchain/gas.js +3 -2
- package/lib/components/blockchain/tx.d.ts +1 -8
- package/lib/components/blockchain/tx.js +11 -7
- package/lib/components/confirm.d.ts +1 -10
- package/lib/components/confirm.js +5 -11
- package/lib/components/country-select.d.ts +3 -2
- package/lib/components/country-select.js +23 -22
- package/lib/components/input.d.ts +11 -20
- package/lib/components/input.js +20 -23
- package/lib/components/lazy-loader.js +1 -1
- package/lib/components/link.d.ts +2 -9
- package/lib/components/link.js +3 -8
- package/lib/components/livemode.d.ts +2 -8
- package/lib/components/livemode.js +3 -7
- package/lib/components/loading-button.d.ts +6 -1
- package/lib/components/loading-button.js +9 -17
- package/lib/components/over-due-invoice-payment.d.ts +0 -18
- package/lib/components/over-due-invoice-payment.js +31 -33
- package/lib/components/payment-beneficiaries.d.ts +2 -7
- package/lib/components/payment-beneficiaries.js +12 -11
- package/lib/components/pricing-item.d.ts +0 -5
- package/lib/components/pricing-item.js +2 -5
- package/lib/components/pricing-table.d.ts +2 -10
- package/lib/components/pricing-table.js +5 -11
- package/lib/components/resume-subscription.d.ts +0 -10
- package/lib/components/resume-subscription.js +16 -16
- package/lib/components/table.js +1 -1
- package/lib/components/truncated-text.d.ts +2 -9
- package/lib/components/truncated-text.js +1 -6
- package/lib/contexts/donate.d.ts +0 -7
- package/lib/contexts/donate.js +4 -7
- package/lib/contexts/payment.d.ts +1 -4
- package/lib/contexts/payment.js +4 -7
- package/lib/history/invoice/list.d.ts +2 -18
- package/lib/history/invoice/list.js +49 -37
- package/lib/history/payment/list.js +30 -16
- package/lib/hooks/keyboard.d.ts +1 -1
- package/lib/hooks/mobile.js +1 -1
- package/lib/hooks/subscription.js +1 -1
- package/lib/index.js +2 -2
- package/lib/libs/api.js +1 -1
- package/lib/libs/dayjs.js +1 -1
- package/lib/libs/phone-validator.js +0 -2
- package/lib/libs/theme.js +1 -1
- package/lib/libs/util.js +1 -1
- package/lib/libs/validator.js +1 -1
- package/lib/locales/en.js +1 -1
- package/lib/locales/index.js +1 -1
- package/lib/locales/zh.js +1 -1
- package/lib/payment/amount.d.ts +2 -7
- package/lib/payment/amount.js +2 -6
- package/lib/payment/donation-form.d.ts +2 -10
- package/lib/payment/donation-form.js +33 -38
- package/lib/payment/error.d.ts +2 -8
- package/lib/payment/error.js +11 -13
- package/lib/payment/footer.d.ts +2 -3
- package/lib/payment/footer.js +5 -5
- package/lib/payment/form/addon.js +5 -3
- package/lib/payment/form/address.d.ts +2 -9
- package/lib/payment/form/address.js +5 -8
- package/lib/payment/form/currency.js +3 -3
- package/lib/payment/form/index.d.ts +2 -8
- package/lib/payment/form/index.js +19 -15
- package/lib/payment/form/phone.js +1 -1
- package/lib/payment/form/stripe/form.d.ts +2 -8
- package/lib/payment/form/stripe/form.js +3 -6
- package/lib/payment/header.js +8 -4
- package/lib/payment/index.d.ts +2 -9
- package/lib/payment/index.js +7 -16
- package/lib/payment/product-card.d.ts +2 -11
- package/lib/payment/product-card.js +13 -20
- package/lib/payment/product-donation.js +71 -66
- package/lib/payment/product-item.d.ts +2 -9
- package/lib/payment/product-item.js +24 -25
- package/lib/payment/product-skeleton.js +2 -2
- package/lib/payment/skeleton/donation.js +8 -4
- package/lib/payment/skeleton/overview.js +6 -2
- package/lib/payment/skeleton/payment.js +9 -3
- package/lib/payment/success.d.ts +2 -9
- package/lib/payment/success.js +12 -15
- package/lib/payment/summary.d.ts +2 -17
- package/lib/payment/summary.js +44 -45
- package/lib/theme/index.d.ts +0 -5
- package/lib/theme/index.js +2 -5
- package/lib/theme/typography.d.ts +2 -2
- package/package.json +40 -40
- package/src/checkout/donate.tsx +103 -35
- package/src/checkout/form.tsx +5 -14
- package/src/checkout/table.tsx +3 -3
- package/src/components/blockchain/gas.tsx +5 -3
- package/src/components/blockchain/tx.tsx +22 -8
- package/src/components/confirm.tsx +4 -11
- package/src/components/country-select.tsx +391 -378
- package/src/components/input.tsx +49 -45
- package/src/components/link.tsx +9 -7
- package/src/components/livemode.tsx +2 -6
- package/src/components/loading-button.tsx +63 -76
- package/src/components/over-due-invoice-payment.tsx +43 -28
- package/src/components/payment-beneficiaries.tsx +33 -14
- package/src/components/pricing-item.tsx +1 -4
- package/src/components/pricing-table.tsx +8 -8
- package/src/components/resume-subscription.tsx +20 -14
- package/src/components/table.tsx +2 -2
- package/src/components/truncated-text.tsx +0 -6
- package/src/contexts/donate.tsx +6 -7
- package/src/contexts/payment.tsx +7 -3
- package/src/history/invoice/list.tsx +74 -35
- package/src/history/payment/list.tsx +53 -16
- package/src/hooks/keyboard.ts +1 -1
- package/src/payment/amount.tsx +1 -6
- package/src/payment/donation-form.tsx +47 -29
- package/src/payment/error.tsx +16 -8
- package/src/payment/footer.tsx +11 -3
- package/src/payment/form/addon.tsx +6 -1
- package/src/payment/form/address.tsx +3 -7
- package/src/payment/form/currency.tsx +12 -2
- package/src/payment/form/index.tsx +30 -12
- package/src/payment/form/stripe/form.tsx +1 -5
- package/src/payment/header.tsx +14 -2
- package/src/payment/index.tsx +10 -21
- package/src/payment/product-card.tsx +41 -18
- package/src/payment/product-donation.tsx +85 -47
- package/src/payment/product-item.tsx +46 -24
- package/src/payment/product-skeleton.tsx +3 -2
- package/src/payment/skeleton/donation.tsx +12 -2
- package/src/payment/skeleton/overview.tsx +12 -2
- package/src/payment/skeleton/payment.tsx +16 -3
- package/src/payment/success.tsx +26 -15
- package/src/payment/summary.tsx +74 -42
- package/src/theme/index.tsx +5 -8
- package/src/theme/typography.ts +2 -2
|
@@ -6,8 +6,16 @@ export default function PaymentSkeleton() {
|
|
|
6
6
|
<Stack direction="column">
|
|
7
7
|
<Skeleton variant="text" sx={{ fontSize: '1.75rem', width: '40%' }} />
|
|
8
8
|
<Skeleton sx={{ mt: 2 }} variant="rounded" height={68} />
|
|
9
|
-
<Box
|
|
10
|
-
|
|
9
|
+
<Box
|
|
10
|
+
sx={{
|
|
11
|
+
mt: 1,
|
|
12
|
+
}}>
|
|
13
|
+
<Typography
|
|
14
|
+
component="div"
|
|
15
|
+
variant="h4"
|
|
16
|
+
sx={{
|
|
17
|
+
mb: -1,
|
|
18
|
+
}}>
|
|
11
19
|
<Skeleton />
|
|
12
20
|
</Typography>
|
|
13
21
|
<Typography component="div">
|
|
@@ -15,7 +23,12 @@ export default function PaymentSkeleton() {
|
|
|
15
23
|
</Typography>
|
|
16
24
|
</Box>
|
|
17
25
|
<Box>
|
|
18
|
-
<Typography
|
|
26
|
+
<Typography
|
|
27
|
+
component="div"
|
|
28
|
+
variant="h4"
|
|
29
|
+
sx={{
|
|
30
|
+
mb: -1,
|
|
31
|
+
}}>
|
|
19
32
|
<Skeleton />
|
|
20
33
|
</Typography>
|
|
21
34
|
<Typography component="div">
|
package/src/payment/success.tsx
CHANGED
|
@@ -20,9 +20,9 @@ export default function PaymentSuccess({
|
|
|
20
20
|
message,
|
|
21
21
|
action,
|
|
22
22
|
payee,
|
|
23
|
-
invoiceId,
|
|
24
|
-
subscriptionId,
|
|
25
|
-
subscriptions,
|
|
23
|
+
invoiceId = '',
|
|
24
|
+
subscriptionId = '',
|
|
25
|
+
subscriptions = [],
|
|
26
26
|
}: Props) {
|
|
27
27
|
const { t } = useLocaleContext();
|
|
28
28
|
const { prefix } = usePaymentContext();
|
|
@@ -88,7 +88,11 @@ export default function PaymentSuccess({
|
|
|
88
88
|
}
|
|
89
89
|
} else if (invoiceId) {
|
|
90
90
|
next = (
|
|
91
|
-
<Typography
|
|
91
|
+
<Typography
|
|
92
|
+
sx={{
|
|
93
|
+
textAlign: 'center',
|
|
94
|
+
mt: 2,
|
|
95
|
+
}}>
|
|
92
96
|
<Link href={joinURL(prefix, `/customer/invoice/${invoiceId}`)}>
|
|
93
97
|
{t('payment.checkout.next.invoice', { payee })}
|
|
94
98
|
</Link>
|
|
@@ -100,9 +104,11 @@ export default function PaymentSuccess({
|
|
|
100
104
|
<Grow in>
|
|
101
105
|
<Stack
|
|
102
106
|
direction="column"
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
107
|
+
sx={{
|
|
108
|
+
alignItems: 'center',
|
|
109
|
+
justifyContent: mode === 'standalone' ? 'center' : 'flex-start',
|
|
110
|
+
height: mode === 'standalone' ? 'fit-content' : 300,
|
|
111
|
+
}}>
|
|
106
112
|
<Div>
|
|
107
113
|
<div className="check-icon">
|
|
108
114
|
<span className="icon-line line-tip" />
|
|
@@ -111,10 +117,21 @@ export default function PaymentSuccess({
|
|
|
111
117
|
<div className="icon-fix" />
|
|
112
118
|
</div>
|
|
113
119
|
</Div>
|
|
114
|
-
<Typography
|
|
120
|
+
<Typography
|
|
121
|
+
variant="h5"
|
|
122
|
+
sx={{
|
|
123
|
+
color: 'text.primary',
|
|
124
|
+
mb: 3,
|
|
125
|
+
}}>
|
|
115
126
|
{message}
|
|
116
127
|
</Typography>
|
|
117
|
-
<Typography
|
|
128
|
+
<Typography
|
|
129
|
+
variant="body1"
|
|
130
|
+
sx={{
|
|
131
|
+
color: 'text.secondary',
|
|
132
|
+
textAlign: 'center',
|
|
133
|
+
fontSize: '14px',
|
|
134
|
+
}}>
|
|
118
135
|
{t('payment.checkout.completed.tip', { payee })}
|
|
119
136
|
</Typography>
|
|
120
137
|
{next}
|
|
@@ -123,12 +140,6 @@ export default function PaymentSuccess({
|
|
|
123
140
|
);
|
|
124
141
|
}
|
|
125
142
|
|
|
126
|
-
PaymentSuccess.defaultProps = {
|
|
127
|
-
invoiceId: '',
|
|
128
|
-
subscriptionId: '',
|
|
129
|
-
subscriptions: [],
|
|
130
|
-
};
|
|
131
|
-
|
|
132
143
|
const Div = styled('div')`
|
|
133
144
|
width: 80px;
|
|
134
145
|
height: 115px;
|
package/src/payment/summary.tsx
CHANGED
|
@@ -119,35 +119,21 @@ function getStakingSetup(items: TLineItemExpanded[], currency: TPaymentCurrency,
|
|
|
119
119
|
return '0';
|
|
120
120
|
}
|
|
121
121
|
|
|
122
|
-
PaymentSummary.defaultProps = {
|
|
123
|
-
onUpsell: noop,
|
|
124
|
-
onDownsell: noop,
|
|
125
|
-
onApplyCrossSell: noop,
|
|
126
|
-
onCancelCrossSell: noop,
|
|
127
|
-
onChangeAmount: noop,
|
|
128
|
-
checkoutSessionId: '',
|
|
129
|
-
crossSellBehavior: '',
|
|
130
|
-
showStaking: false,
|
|
131
|
-
donationSettings: null,
|
|
132
|
-
action: '',
|
|
133
|
-
trialEnd: 0,
|
|
134
|
-
};
|
|
135
|
-
|
|
136
122
|
export default function PaymentSummary({
|
|
137
123
|
items,
|
|
138
124
|
currency,
|
|
139
125
|
trialInDays,
|
|
140
126
|
billingThreshold,
|
|
141
|
-
onUpsell,
|
|
142
|
-
onDownsell,
|
|
143
|
-
onApplyCrossSell,
|
|
144
|
-
onCancelCrossSell,
|
|
145
|
-
onChangeAmount,
|
|
146
|
-
checkoutSessionId,
|
|
147
|
-
crossSellBehavior,
|
|
148
|
-
showStaking,
|
|
149
|
-
donationSettings,
|
|
150
|
-
action,
|
|
127
|
+
onUpsell = noop,
|
|
128
|
+
onDownsell = noop,
|
|
129
|
+
onApplyCrossSell = noop,
|
|
130
|
+
onCancelCrossSell = noop,
|
|
131
|
+
onChangeAmount = noop,
|
|
132
|
+
checkoutSessionId = '',
|
|
133
|
+
crossSellBehavior = '',
|
|
134
|
+
showStaking = false,
|
|
135
|
+
donationSettings = undefined,
|
|
136
|
+
action = '',
|
|
151
137
|
trialEnd = 0,
|
|
152
138
|
...rest
|
|
153
139
|
}: Props) {
|
|
@@ -238,7 +224,13 @@ export default function PaymentSummary({
|
|
|
238
224
|
onUpsell={handleUpsell}
|
|
239
225
|
onDownsell={handleDownsell}>
|
|
240
226
|
{x.cross_sell && (
|
|
241
|
-
<Stack
|
|
227
|
+
<Stack
|
|
228
|
+
direction="row"
|
|
229
|
+
sx={{
|
|
230
|
+
alignItems: 'center',
|
|
231
|
+
justifyContent: 'space-between',
|
|
232
|
+
width: 1,
|
|
233
|
+
}}>
|
|
242
234
|
<Typography />
|
|
243
235
|
<LoadingButton
|
|
244
236
|
size="small"
|
|
@@ -258,7 +250,10 @@ export default function PaymentSummary({
|
|
|
258
250
|
</Stack>
|
|
259
251
|
{data && items.some((x) => x.price_id === data.id) === false && (
|
|
260
252
|
<Grow in>
|
|
261
|
-
<Stack
|
|
253
|
+
<Stack
|
|
254
|
+
sx={{
|
|
255
|
+
mt: 1,
|
|
256
|
+
}}>
|
|
262
257
|
<ProductItem
|
|
263
258
|
item={{ quantity: 1, price: data, price_id: data.id, cross_sell: true } as TLineItemExpanded}
|
|
264
259
|
items={items}
|
|
@@ -267,7 +262,13 @@ export default function PaymentSummary({
|
|
|
267
262
|
trialEnd={trialEnd}
|
|
268
263
|
onUpsell={noop}
|
|
269
264
|
onDownsell={noop}>
|
|
270
|
-
<Stack
|
|
265
|
+
<Stack
|
|
266
|
+
direction="row"
|
|
267
|
+
sx={{
|
|
268
|
+
alignItems: 'center',
|
|
269
|
+
justifyContent: 'space-between',
|
|
270
|
+
width: 1,
|
|
271
|
+
}}>
|
|
271
272
|
<Typography>
|
|
272
273
|
{crossSellBehavior === 'required' && (
|
|
273
274
|
<Status label={t('payment.checkout.required')} color="info" variant="outlined" sx={{ mr: 1 }} />
|
|
@@ -293,7 +294,12 @@ export default function PaymentSummary({
|
|
|
293
294
|
return (
|
|
294
295
|
<Fade in>
|
|
295
296
|
<Stack className="cko-product" direction="column" {...rest}>
|
|
296
|
-
<Box
|
|
297
|
+
<Box
|
|
298
|
+
sx={{
|
|
299
|
+
display: 'flex',
|
|
300
|
+
alignItems: 'center',
|
|
301
|
+
mb: 2.5,
|
|
302
|
+
}}>
|
|
297
303
|
<Typography
|
|
298
304
|
title={t('payment.checkout.orderSummary')}
|
|
299
305
|
sx={{
|
|
@@ -312,11 +318,13 @@ export default function PaymentSummary({
|
|
|
312
318
|
{isMobile && !donationSettings ? (
|
|
313
319
|
<>
|
|
314
320
|
<Stack
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
321
|
+
onClick={() => setState({ expanded: !state.expanded })}
|
|
322
|
+
sx={{
|
|
323
|
+
justifyContent: 'space-between',
|
|
324
|
+
flexDirection: 'row',
|
|
325
|
+
alignItems: 'center',
|
|
326
|
+
mb: 1.5,
|
|
327
|
+
}}>
|
|
320
328
|
<Typography>{t('payment.checkout.productListTotal', { total: items.length })}</Typography>
|
|
321
329
|
<ExpandMore expand={state.expanded} aria-expanded={state.expanded} aria-label="show more">
|
|
322
330
|
<ExpandMoreIcon />
|
|
@@ -333,8 +341,19 @@ export default function PaymentSummary({
|
|
|
333
341
|
<Divider sx={{ mt: 2.5, mb: 2.5 }} />
|
|
334
342
|
{staking > 0 && (
|
|
335
343
|
<>
|
|
336
|
-
<Stack
|
|
337
|
-
|
|
344
|
+
<Stack
|
|
345
|
+
direction="row"
|
|
346
|
+
spacing={1}
|
|
347
|
+
sx={{
|
|
348
|
+
justifyContent: 'space-between',
|
|
349
|
+
alignItems: 'center',
|
|
350
|
+
}}>
|
|
351
|
+
<Stack
|
|
352
|
+
direction="row"
|
|
353
|
+
spacing={0.5}
|
|
354
|
+
sx={{
|
|
355
|
+
alignItems: 'center',
|
|
356
|
+
}}>
|
|
338
357
|
<Typography sx={{ color: 'text.secondary' }}>{t('payment.checkout.paymentRequired')}</Typography>
|
|
339
358
|
<Tooltip title={t('payment.checkout.stakingConfirm')} placement="top" sx={{ maxWidth: '150px' }}>
|
|
340
359
|
<HelpOutline fontSize="small" sx={{ color: 'text.lighter' }} />
|
|
@@ -342,8 +361,19 @@ export default function PaymentSummary({
|
|
|
342
361
|
</Stack>
|
|
343
362
|
<Typography>{headlines.amount}</Typography>
|
|
344
363
|
</Stack>
|
|
345
|
-
<Stack
|
|
346
|
-
|
|
364
|
+
<Stack
|
|
365
|
+
direction="row"
|
|
366
|
+
spacing={1}
|
|
367
|
+
sx={{
|
|
368
|
+
justifyContent: 'space-between',
|
|
369
|
+
alignItems: 'center',
|
|
370
|
+
}}>
|
|
371
|
+
<Stack
|
|
372
|
+
direction="row"
|
|
373
|
+
spacing={0.5}
|
|
374
|
+
sx={{
|
|
375
|
+
alignItems: 'center',
|
|
376
|
+
}}>
|
|
347
377
|
<Typography sx={{ color: 'text.secondary' }}>{t('payment.checkout.staking.title')}</Typography>
|
|
348
378
|
<Tooltip title={t('payment.checkout.staking.tooltip')} placement="top" sx={{ maxWidth: '150px' }}>
|
|
349
379
|
<HelpOutline fontSize="small" sx={{ color: 'text.lighter' }} />
|
|
@@ -356,11 +386,13 @@ export default function PaymentSummary({
|
|
|
356
386
|
</>
|
|
357
387
|
)}
|
|
358
388
|
<Stack
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
389
|
+
sx={{
|
|
390
|
+
display: 'flex',
|
|
391
|
+
justifyContent: 'space-between',
|
|
392
|
+
flexDirection: 'row',
|
|
393
|
+
alignItems: 'center',
|
|
394
|
+
width: '100%',
|
|
395
|
+
}}>
|
|
364
396
|
<Box className="base-label">{t('common.total')} </Box>
|
|
365
397
|
<PaymentAmount amount={`${totalAmount} ${currency.symbol}`} sx={{ fontSize: '16px' }} />
|
|
366
398
|
</Stack>
|
package/src/theme/index.tsx
CHANGED
|
@@ -10,10 +10,6 @@ import './types';
|
|
|
10
10
|
import { typography } from './typography';
|
|
11
11
|
import { type PaymentThemeOptions } from '../types';
|
|
12
12
|
|
|
13
|
-
PaymentThemeProvider.defaultProps = {
|
|
14
|
-
theme: {},
|
|
15
|
-
};
|
|
16
|
-
|
|
17
13
|
export function PaymentThemeProvider({
|
|
18
14
|
children,
|
|
19
15
|
theme: customTheme = {},
|
|
@@ -26,6 +22,7 @@ export function PaymentThemeProvider({
|
|
|
26
22
|
const parentTheme = useTheme();
|
|
27
23
|
|
|
28
24
|
const mergeTheme = useMemo(() => {
|
|
25
|
+
// @ts-ignore
|
|
29
26
|
const blockletTheme = parentTheme.themeName === 'ArcBlock' ? parentTheme : createBlockletTheme();
|
|
30
27
|
const { mode } = blockletTheme.palette;
|
|
31
28
|
|
|
@@ -187,7 +184,7 @@ export function PaymentThemeProvider({
|
|
|
187
184
|
styleOverrides: {
|
|
188
185
|
'.base-card': {
|
|
189
186
|
padding: '20px',
|
|
190
|
-
borderRadius: 1.5 * borderRadius, // 12px
|
|
187
|
+
borderRadius: 1.5 * (borderRadius as number), // 12px
|
|
191
188
|
background: palette.background.default,
|
|
192
189
|
border: `1px solid ${palette.divider}`,
|
|
193
190
|
boxShadow: shadows[1],
|
|
@@ -262,7 +259,7 @@ export function PaymentThemeProvider({
|
|
|
262
259
|
MuiChip: {
|
|
263
260
|
styleOverrides: {
|
|
264
261
|
root: {
|
|
265
|
-
borderRadius: `${borderRadius * 2}px`,
|
|
262
|
+
borderRadius: `${(borderRadius as number) * 2}px`,
|
|
266
263
|
border: '1px solid transparent',
|
|
267
264
|
'&.MuiChip-filledSuccess': {
|
|
268
265
|
color: palette.chip.success.text,
|
|
@@ -274,7 +271,7 @@ export function PaymentThemeProvider({
|
|
|
274
271
|
backgroundColor: palette.chip.default.background,
|
|
275
272
|
borderColor: palette.chip.default.border,
|
|
276
273
|
},
|
|
277
|
-
'&.MuiChip-
|
|
274
|
+
'&.MuiChip-filled.MuiChip-colorSecondary': {
|
|
278
275
|
color: palette.chip.secondary.text,
|
|
279
276
|
backgroundColor: palette.chip.secondary.background,
|
|
280
277
|
borderColor: palette.chip.secondary.border,
|
|
@@ -289,7 +286,7 @@ export function PaymentThemeProvider({
|
|
|
289
286
|
backgroundColor: palette.chip.warning.background,
|
|
290
287
|
borderColor: palette.chip.warning.border,
|
|
291
288
|
},
|
|
292
|
-
'&.MuiChip-
|
|
289
|
+
'&.MuiChip-filled.MuiChip-colorPrimary,&.MuiChip-filledInfo': {
|
|
293
290
|
color: palette.chip.info.text,
|
|
294
291
|
backgroundColor: palette.chip.info.background,
|
|
295
292
|
borderColor: palette.chip.info.border,
|
package/src/theme/typography.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { TypographyStyleOptions } from '@mui/material/styles/createTypography';
|
|
2
2
|
|
|
3
|
-
export const typography:
|
|
3
|
+
export const typography: TypographyStyleOptions = {
|
|
4
4
|
h1: {
|
|
5
5
|
fontSize: '1.5rem',
|
|
6
6
|
lineHeight: 1.2,
|