@blocklet/payment-react 1.18.37 → 1.18.39
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.js +11 -12
- package/es/components/blockchain/tx.js +1 -1
- package/es/components/country-select.js +5 -4
- package/es/components/over-due-invoice-payment.js +7 -5
- package/es/components/pricing-table.js +8 -7
- package/es/components/table.js +9 -7
- package/es/history/invoice/list.js +1 -1
- package/es/payment/donation-form.js +4 -5
- package/es/payment/form/address.js +2 -2
- package/es/payment/form/currency.js +6 -17
- package/es/payment/form/index.js +1 -1
- package/es/payment/form/phone.js +2 -2
- package/es/payment/index.js +18 -17
- package/es/payment/product-item.js +6 -6
- package/es/payment/product-skeleton.js +2 -1
- package/es/payment/success.js +3 -4
- package/es/theme/index.css +37 -0
- package/es/theme/index.d.ts +4 -3
- package/es/theme/index.js +264 -240
- package/es/theme/types.d.ts +76 -0
- package/es/theme/types.js +2 -0
- package/es/theme/typography.js +1 -5
- package/lib/checkout/donate.js +11 -12
- package/lib/components/blockchain/tx.js +3 -1
- package/lib/components/country-select.js +7 -4
- package/lib/components/over-due-invoice-payment.js +6 -4
- package/lib/components/pricing-table.js +10 -7
- package/lib/components/table.js +23 -7
- package/lib/history/invoice/list.js +1 -1
- package/lib/payment/donation-form.js +9 -5
- package/lib/payment/form/address.js +2 -2
- package/lib/payment/form/currency.js +14 -17
- package/lib/payment/form/index.js +1 -1
- package/lib/payment/form/phone.js +2 -2
- package/lib/payment/index.js +41 -17
- package/lib/payment/product-item.js +6 -6
- package/lib/payment/product-skeleton.js +2 -1
- package/lib/payment/success.js +3 -4
- package/lib/theme/index.css +37 -0
- package/lib/theme/index.d.ts +4 -3
- package/lib/theme/index.js +257 -232
- package/lib/theme/types.d.ts +76 -0
- package/lib/theme/types.js +4 -0
- package/lib/theme/typography.js +1 -5
- package/package.json +9 -8
- package/src/checkout/donate.tsx +11 -12
- package/src/components/blockchain/tx.tsx +1 -1
- package/src/components/country-select.tsx +5 -4
- package/src/components/over-due-invoice-payment.tsx +7 -5
- package/src/components/pricing-table.tsx +11 -9
- package/src/components/table.tsx +9 -7
- package/src/history/invoice/list.tsx +1 -1
- package/src/payment/donation-form.tsx +4 -5
- package/src/payment/form/address.tsx +2 -2
- package/src/payment/form/currency.tsx +6 -17
- package/src/payment/form/index.tsx +1 -1
- package/src/payment/form/phone.tsx +2 -2
- package/src/payment/index.tsx +18 -25
- package/src/payment/product-item.tsx +6 -6
- package/src/payment/product-skeleton.tsx +2 -1
- package/src/payment/success.tsx +3 -4
- package/src/theme/index.css +37 -0
- package/src/theme/index.tsx +263 -237
- package/src/theme/types.ts +78 -0
- package/src/theme/typography.ts +0 -5
- package/src/types/index.ts +1 -0
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import '@blocklet/theme';
|
|
2
|
+
import '@mui/material/styles';
|
|
3
|
+
declare module '@mui/material/styles' {
|
|
4
|
+
interface Palette {
|
|
5
|
+
chip: {
|
|
6
|
+
success: {
|
|
7
|
+
text: string;
|
|
8
|
+
background: string;
|
|
9
|
+
border: string;
|
|
10
|
+
};
|
|
11
|
+
default: {
|
|
12
|
+
text: string;
|
|
13
|
+
background: string;
|
|
14
|
+
border: string;
|
|
15
|
+
};
|
|
16
|
+
secondary: {
|
|
17
|
+
text: string;
|
|
18
|
+
background: string;
|
|
19
|
+
border: string;
|
|
20
|
+
};
|
|
21
|
+
error: {
|
|
22
|
+
text: string;
|
|
23
|
+
background: string;
|
|
24
|
+
border: string;
|
|
25
|
+
};
|
|
26
|
+
warning: {
|
|
27
|
+
text: string;
|
|
28
|
+
background: string;
|
|
29
|
+
border: string;
|
|
30
|
+
};
|
|
31
|
+
info: {
|
|
32
|
+
text: string;
|
|
33
|
+
background: string;
|
|
34
|
+
border: string;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
interface PaletteOptions {
|
|
39
|
+
chip?: {
|
|
40
|
+
success?: {
|
|
41
|
+
text?: string;
|
|
42
|
+
background?: string;
|
|
43
|
+
border?: string;
|
|
44
|
+
};
|
|
45
|
+
default?: {
|
|
46
|
+
text?: string;
|
|
47
|
+
background?: string;
|
|
48
|
+
border?: string;
|
|
49
|
+
};
|
|
50
|
+
secondary?: {
|
|
51
|
+
text?: string;
|
|
52
|
+
background?: string;
|
|
53
|
+
border?: string;
|
|
54
|
+
};
|
|
55
|
+
error?: {
|
|
56
|
+
text?: string;
|
|
57
|
+
background?: string;
|
|
58
|
+
border?: string;
|
|
59
|
+
};
|
|
60
|
+
warning?: {
|
|
61
|
+
text?: string;
|
|
62
|
+
background?: string;
|
|
63
|
+
border?: string;
|
|
64
|
+
};
|
|
65
|
+
info?: {
|
|
66
|
+
text?: string;
|
|
67
|
+
background?: string;
|
|
68
|
+
border?: string;
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
interface TypeText {
|
|
73
|
+
lighter?: string;
|
|
74
|
+
link?: string;
|
|
75
|
+
}
|
|
76
|
+
}
|
package/lib/theme/typography.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blocklet/payment-react",
|
|
3
|
-
"version": "1.18.
|
|
3
|
+
"version": "1.18.39",
|
|
4
4
|
"description": "Reusable react components for payment kit v2",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -54,15 +54,16 @@
|
|
|
54
54
|
}
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"@arcblock/did-connect": "^2.13.
|
|
58
|
-
"@arcblock/ux": "^2.13.
|
|
59
|
-
"@arcblock/ws": "^1.20.
|
|
60
|
-
"@blocklet/
|
|
57
|
+
"@arcblock/did-connect": "^2.13.23",
|
|
58
|
+
"@arcblock/ux": "^2.13.23",
|
|
59
|
+
"@arcblock/ws": "^1.20.6",
|
|
60
|
+
"@blocklet/theme": "^2.13.23",
|
|
61
|
+
"@blocklet/ui-react": "^2.13.23",
|
|
61
62
|
"@mui/icons-material": "^5.16.6",
|
|
62
63
|
"@mui/lab": "^5.0.0-alpha.173",
|
|
63
64
|
"@mui/material": "^5.16.6",
|
|
64
65
|
"@mui/system": "^5.16.6",
|
|
65
|
-
"@ocap/util": "^1.20.
|
|
66
|
+
"@ocap/util": "^1.20.6",
|
|
66
67
|
"@stripe/react-stripe-js": "^2.7.3",
|
|
67
68
|
"@stripe/stripe-js": "^2.4.0",
|
|
68
69
|
"@vitejs/plugin-legacy": "^5.4.1",
|
|
@@ -93,7 +94,7 @@
|
|
|
93
94
|
"@babel/core": "^7.25.2",
|
|
94
95
|
"@babel/preset-env": "^7.25.2",
|
|
95
96
|
"@babel/preset-react": "^7.24.7",
|
|
96
|
-
"@blocklet/payment-types": "1.18.
|
|
97
|
+
"@blocklet/payment-types": "1.18.39",
|
|
97
98
|
"@storybook/addon-essentials": "^7.6.20",
|
|
98
99
|
"@storybook/addon-interactions": "^7.6.20",
|
|
99
100
|
"@storybook/addon-links": "^7.6.20",
|
|
@@ -124,5 +125,5 @@
|
|
|
124
125
|
"vite-plugin-babel": "^1.2.0",
|
|
125
126
|
"vite-plugin-node-polyfills": "^0.21.0"
|
|
126
127
|
},
|
|
127
|
-
"gitHead": "
|
|
128
|
+
"gitHead": "9e9a5c18fc160094505e902e995f5a5a052d544f"
|
|
128
129
|
}
|
package/src/checkout/donate.tsx
CHANGED
|
@@ -165,11 +165,12 @@ export function DonateDetails({ supporters = [], currency, method }: DonateHisto
|
|
|
165
165
|
sx={{
|
|
166
166
|
padding: '6px',
|
|
167
167
|
'&:hover': {
|
|
168
|
-
backgroundColor:
|
|
168
|
+
backgroundColor: (theme) => theme.palette.grey[100],
|
|
169
169
|
transition: 'background-color 200ms linear',
|
|
170
170
|
cursor: 'pointer',
|
|
171
171
|
},
|
|
172
|
-
borderBottom: '1px solid
|
|
172
|
+
borderBottom: '1px solid',
|
|
173
|
+
borderColor: 'grey.100',
|
|
173
174
|
display: 'flex',
|
|
174
175
|
justifyContent: 'space-between',
|
|
175
176
|
alignItems: 'center',
|
|
@@ -290,13 +291,13 @@ function SupporterAvatar({
|
|
|
290
291
|
pr: 1,
|
|
291
292
|
ml: -1,
|
|
292
293
|
borderRadius: '8px',
|
|
293
|
-
backgroundColor: '
|
|
294
|
+
backgroundColor: 'grey.100',
|
|
294
295
|
height: '24px',
|
|
295
296
|
...(showDonateDetails
|
|
296
297
|
? {
|
|
297
298
|
cursor: 'pointer',
|
|
298
299
|
'&:hover': {
|
|
299
|
-
backgroundColor: '
|
|
300
|
+
backgroundColor: 'grey.200',
|
|
300
301
|
},
|
|
301
302
|
}
|
|
302
303
|
: {}),
|
|
@@ -587,7 +588,8 @@ function CheckoutDonateInner({
|
|
|
587
588
|
display: 'flex',
|
|
588
589
|
justifyContent: 'center',
|
|
589
590
|
alignItems: 'center',
|
|
590
|
-
backgroundColor: '
|
|
591
|
+
backgroundColor: 'background.paper',
|
|
592
|
+
opacity: 0.8,
|
|
591
593
|
}}>
|
|
592
594
|
<CircularProgress />
|
|
593
595
|
</div>
|
|
@@ -623,12 +625,8 @@ function CheckoutDonateInner({
|
|
|
623
625
|
sx={{
|
|
624
626
|
...(!donateSettings.appearance?.button?.variant
|
|
625
627
|
? {
|
|
626
|
-
color: '
|
|
627
|
-
borderColor: '
|
|
628
|
-
'&:hover': {
|
|
629
|
-
backgroundColor: 'var(--buttons-button-neutral-hover, #F3F4F6)',
|
|
630
|
-
borderColor: 'var(--stroke-button-secondary-border, #E5E7EB)',
|
|
631
|
-
},
|
|
628
|
+
color: 'primary.main',
|
|
629
|
+
borderColor: 'grey.200',
|
|
632
630
|
}
|
|
633
631
|
: {}),
|
|
634
632
|
// @ts-ignore
|
|
@@ -750,7 +748,8 @@ function CheckoutDonateInner({
|
|
|
750
748
|
sx={{
|
|
751
749
|
'.MuiDialogContent-root': {
|
|
752
750
|
padding: '16px 24px',
|
|
753
|
-
borderTop: '1px solid
|
|
751
|
+
borderTop: '1px solid',
|
|
752
|
+
borderColor: 'grey.100',
|
|
754
753
|
width: '100%',
|
|
755
754
|
},
|
|
756
755
|
'.ux-dialog_header': {
|
|
@@ -38,7 +38,7 @@ export default function TxLink(props: {
|
|
|
38
38
|
justifyContent={props.align === 'left' ? 'flex-start' : 'flex-end'}
|
|
39
39
|
sx={{ color: 'text.link' }}
|
|
40
40
|
spacing={1}>
|
|
41
|
-
<Typography component="span" color
|
|
41
|
+
<Typography component="span" sx={{ color: 'text.link' }}>
|
|
42
42
|
{text.length > 40 ? [text.slice(0, 6), text.slice(-6)].join('...') : text}
|
|
43
43
|
</Typography>
|
|
44
44
|
<OpenInNewOutlined fontSize="small" />
|
|
@@ -253,14 +253,14 @@ const CountrySelect = forwardRef<HTMLDivElement, CountrySelectProps>(
|
|
|
253
253
|
display: 'flex',
|
|
254
254
|
alignItems: 'center',
|
|
255
255
|
'&.Mui-selected': {
|
|
256
|
-
backgroundColor: '
|
|
256
|
+
backgroundColor: 'primary.lighter',
|
|
257
257
|
},
|
|
258
258
|
'&:hover': {
|
|
259
|
-
backgroundColor: '
|
|
259
|
+
backgroundColor: 'grey.100',
|
|
260
260
|
},
|
|
261
261
|
...(isFocused
|
|
262
262
|
? {
|
|
263
|
-
backgroundColor: '
|
|
263
|
+
backgroundColor: 'grey.100',
|
|
264
264
|
outline: 'none',
|
|
265
265
|
}
|
|
266
266
|
: {}),
|
|
@@ -405,6 +405,7 @@ const CountrySelect = forwardRef<HTMLDivElement, CountrySelectProps>(
|
|
|
405
405
|
position: 'absolute',
|
|
406
406
|
bottom: 0,
|
|
407
407
|
m: 0,
|
|
408
|
+
p: 0,
|
|
408
409
|
borderBottomLeftRadius: 0,
|
|
409
410
|
borderBottomRightRadius: 0,
|
|
410
411
|
width: '100%',
|
|
@@ -416,7 +417,7 @@ const CountrySelect = forwardRef<HTMLDivElement, CountrySelectProps>(
|
|
|
416
417
|
✕
|
|
417
418
|
</IconButton>
|
|
418
419
|
</Box>
|
|
419
|
-
<DialogContent sx={{ p: 0 }}>{countryListContent}</DialogContent>
|
|
420
|
+
<DialogContent sx={{ '&.MuiDialogContent-root': { p: 0 } }}>{countryListContent}</DialogContent>
|
|
420
421
|
</Dialog>
|
|
421
422
|
</Box>
|
|
422
423
|
);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/indent */
|
|
2
2
|
import { useEffect, useMemo, useRef, useState } from 'react';
|
|
3
|
-
import { Button, Typography, Stack, Alert, SxProps } from '@mui/material';
|
|
3
|
+
import { Button, Typography, Stack, Alert, SxProps, useTheme } from '@mui/material';
|
|
4
4
|
import { useLocaleContext } from '@arcblock/ux/lib/Locale/context';
|
|
5
5
|
import Toast from '@arcblock/ux/lib/Toast';
|
|
6
6
|
import { joinURL } from 'ufo';
|
|
@@ -104,6 +104,7 @@ function OverdueInvoicePayment({
|
|
|
104
104
|
authToken,
|
|
105
105
|
}: Props) {
|
|
106
106
|
const { t, locale } = useLocaleContext();
|
|
107
|
+
const theme = useTheme();
|
|
107
108
|
const { connect, session } = usePaymentContext();
|
|
108
109
|
const [selectCurrencyId, setSelectCurrencyId] = useState('');
|
|
109
110
|
const [payLoading, setPayLoading] = useState(false);
|
|
@@ -487,7 +488,7 @@ function OverdueInvoicePayment({
|
|
|
487
488
|
target="_blank"
|
|
488
489
|
onClick={handleViewDetailClick}
|
|
489
490
|
rel="noreferrer"
|
|
490
|
-
style={{ color:
|
|
491
|
+
style={{ color: theme.palette.text.link }}>
|
|
491
492
|
{getDetailLinkText()}
|
|
492
493
|
</a>
|
|
493
494
|
</>
|
|
@@ -516,7 +517,7 @@ function OverdueInvoicePayment({
|
|
|
516
517
|
target="_blank"
|
|
517
518
|
rel="noreferrer"
|
|
518
519
|
onClick={handleViewDetailClick}
|
|
519
|
-
style={{ color:
|
|
520
|
+
style={{ color: theme.palette.text.link }}>
|
|
520
521
|
{getDetailLinkText()}
|
|
521
522
|
</a>
|
|
522
523
|
</>
|
|
@@ -535,9 +536,10 @@ function OverdueInvoicePayment({
|
|
|
535
536
|
sx={{
|
|
536
537
|
py: 1,
|
|
537
538
|
px: 0.5,
|
|
538
|
-
borderBottom: '1px solid
|
|
539
|
+
borderBottom: '1px solid',
|
|
540
|
+
borderColor: 'grey.200',
|
|
539
541
|
'&:hover': {
|
|
540
|
-
|
|
542
|
+
backgroundColor: () => theme.palette.grey[100],
|
|
541
543
|
},
|
|
542
544
|
mt: 0,
|
|
543
545
|
}}>
|
|
@@ -264,7 +264,7 @@ export default function PricingTable({ table, alignItems, interval, mode, onSele
|
|
|
264
264
|
borderRadius: '36px',
|
|
265
265
|
height: '40px',
|
|
266
266
|
boxSizing: 'border-box',
|
|
267
|
-
backgroundColor: '
|
|
267
|
+
backgroundColor: 'grey.100',
|
|
268
268
|
border: 0,
|
|
269
269
|
}}
|
|
270
270
|
onChange={(_, value) => {
|
|
@@ -282,11 +282,15 @@ export default function PricingTable({ table, alignItems, interval, mode, onSele
|
|
|
282
282
|
textTransform: 'capitalize',
|
|
283
283
|
padding: '5px 12px',
|
|
284
284
|
fontSize: '13px',
|
|
285
|
-
backgroundColor:
|
|
285
|
+
backgroundColor: ({ palette }) =>
|
|
286
|
+
x === state.interval
|
|
287
|
+
? `${palette.background.default} !important`
|
|
288
|
+
: `${palette.grey[100]} !important`,
|
|
286
289
|
border: '0px',
|
|
287
290
|
'&.Mui-selected': {
|
|
288
291
|
borderRadius: '9999px !important',
|
|
289
|
-
border: '1px solid
|
|
292
|
+
border: '1px solid',
|
|
293
|
+
borderColor: 'divider',
|
|
290
294
|
},
|
|
291
295
|
}}>
|
|
292
296
|
{formatRecurring(recurring[x] as PriceRecurring, true, '', locale)}
|
|
@@ -346,15 +350,13 @@ export default function PricingTable({ table, alignItems, interval, mode, onSele
|
|
|
346
350
|
cursor: 'pointer',
|
|
347
351
|
borderWidth: '1px',
|
|
348
352
|
borderStyle: 'solid',
|
|
349
|
-
borderColor: mode === 'select' && x.is_selected ? 'primary.main' : '
|
|
353
|
+
borderColor: mode === 'select' && x.is_selected ? 'primary.main' : 'grey.100',
|
|
350
354
|
borderRadius: 2,
|
|
351
355
|
transition: 'border-color 0.3s ease 0s, box-shadow 0.3s ease 0s',
|
|
352
|
-
boxShadow:
|
|
353
|
-
'0px 0px 0px 1px rgba(3, 7, 18, 0.08), 0px 1px 2px -1px rgba(3, 7, 18, 0.08), 0px 2px 4px rgba(3, 7, 18, 0.04)',
|
|
356
|
+
boxShadow: 2,
|
|
354
357
|
'&:hover': {
|
|
355
|
-
borderColor: mode === 'select' && x.is_selected ? 'primary.main' : '
|
|
356
|
-
boxShadow:
|
|
357
|
-
'0px 0px 0px 1px var(--shadows-card-hover-1, rgba(2, 7, 19, 0.08)),0px 1px 2px -1px var(--shadows-card-hover-2, rgba(2, 7, 19, 0.08)),0px 2px 8px 0px var(--shadows-card-hover-3, rgba(2, 7, 19, 0.10))',
|
|
358
|
+
borderColor: mode === 'select' && x.is_selected ? 'primary.main' : 'grey.200',
|
|
359
|
+
boxShadow: 2,
|
|
358
360
|
},
|
|
359
361
|
width: {
|
|
360
362
|
xs: '100%',
|
package/src/components/table.tsx
CHANGED
|
@@ -79,19 +79,21 @@ const Wrapped = styled(Datatable)`
|
|
|
79
79
|
overflow: hidden;
|
|
80
80
|
}
|
|
81
81
|
table.MuiTable-root {
|
|
82
|
-
outline: 1px solid
|
|
83
|
-
|
|
82
|
+
outline: 1px solid;
|
|
83
|
+
outline-color: ${({ theme }) => theme.palette.grey[100]};
|
|
84
|
+
border-radius: ${({ theme }) => `${2 * theme.shape.borderRadius}px`};
|
|
84
85
|
overflow: hidden;
|
|
85
86
|
}
|
|
86
87
|
[class*='MUIDataTable-responsiveBase'] {
|
|
87
|
-
outline: 1px solid
|
|
88
|
-
|
|
88
|
+
outline: 1px solid;
|
|
89
|
+
outline-color: ${({ theme }) => theme.palette.grey[100]};
|
|
90
|
+
border-radius: ${({ theme }) => `${2 * theme.shape.borderRadius}px`};
|
|
89
91
|
}
|
|
90
92
|
|
|
91
93
|
th.MuiTableCell-head {
|
|
92
94
|
padding: 8px 16px 8px 16px;
|
|
93
95
|
text-transform: inherit;
|
|
94
|
-
background:
|
|
96
|
+
background: ${({ theme }) => theme.palette.grey[50]};
|
|
95
97
|
border-bottom: none;
|
|
96
98
|
&:first-of-type {
|
|
97
99
|
border-top-left-radius: 8px;
|
|
@@ -103,7 +105,7 @@ const Wrapped = styled(Datatable)`
|
|
|
103
105
|
}
|
|
104
106
|
|
|
105
107
|
tr.MuiTableRow-root:not(.MuiTableRow-footer):hover {
|
|
106
|
-
background:
|
|
108
|
+
background: ${({ theme }) => theme.palette.grey[100]};
|
|
107
109
|
}
|
|
108
110
|
tr.MuiTableRow-root:last-of-type td:first-of-type {
|
|
109
111
|
border-bottom-left-radius: 8px;
|
|
@@ -114,7 +116,7 @@ const Wrapped = styled(Datatable)`
|
|
|
114
116
|
}
|
|
115
117
|
|
|
116
118
|
tr.MuiTableRow-root:nth-of-type(even) {
|
|
117
|
-
background:
|
|
119
|
+
background: ${({ theme }) => theme.palette.grey[50]};
|
|
118
120
|
}
|
|
119
121
|
td.MuiTableCell-root {
|
|
120
122
|
border-bottom: none;
|
|
@@ -316,7 +316,7 @@ const InvoiceTable = React.memo((props: Props & { onPay: (invoiceId: string) =>
|
|
|
316
316
|
variant="text"
|
|
317
317
|
size="small"
|
|
318
318
|
onClick={(e) => handleLinkClick(e, invoice)}
|
|
319
|
-
sx={{ color: '
|
|
319
|
+
sx={{ color: 'text.link' }}
|
|
320
320
|
rel="noreferrer">
|
|
321
321
|
{t('payment.customer.invoice.pay')}
|
|
322
322
|
</Button>
|
|
@@ -555,7 +555,7 @@ export default function DonationForm({
|
|
|
555
555
|
theme={undefined}
|
|
556
556
|
hideNavMenu={undefined}
|
|
557
557
|
maxWidth={false}
|
|
558
|
-
sx={{ borderBottom: '1px solid
|
|
558
|
+
sx={{ borderBottom: '1px solid', borderColor: 'grey.100' }}
|
|
559
559
|
/>
|
|
560
560
|
) : null}
|
|
561
561
|
<Root
|
|
@@ -574,11 +574,10 @@ export default function DonationForm({
|
|
|
574
574
|
left: 0,
|
|
575
575
|
right: 0,
|
|
576
576
|
zIndex: 999,
|
|
577
|
-
|
|
577
|
+
backgroundColor: 'background.paper',
|
|
578
578
|
padding: '10px',
|
|
579
579
|
textAlign: 'center',
|
|
580
580
|
button: {
|
|
581
|
-
color: '#fff',
|
|
582
581
|
maxWidth: 542,
|
|
583
582
|
},
|
|
584
583
|
},
|
|
@@ -631,7 +630,7 @@ export const Root: React.FC<RootProps> = styled(Box)<RootProps>`
|
|
|
631
630
|
position: relative;
|
|
632
631
|
flex-direction: column;
|
|
633
632
|
display: ${(props) => (props.mode.endsWith('-minimal') ? 'none' : 'flex')};
|
|
634
|
-
background:
|
|
633
|
+
background: ${({ theme }) => theme.palette.background.default};
|
|
635
634
|
min-height: 'auto';
|
|
636
635
|
}
|
|
637
636
|
|
|
@@ -643,7 +642,7 @@ export const Root: React.FC<RootProps> = styled(Box)<RootProps>`
|
|
|
643
642
|
|
|
644
643
|
.cko-payment-form {
|
|
645
644
|
.MuiFormLabel-root {
|
|
646
|
-
color:
|
|
645
|
+
color: ${({ theme }) => theme.palette.grey.A700};
|
|
647
646
|
font-weight: 500;
|
|
648
647
|
margin-top: 12px;
|
|
649
648
|
margin-bottom: 4px;
|
|
@@ -134,8 +134,8 @@ export default function AddressForm({ mode, stripe, sx = {}, fieldValidation, er
|
|
|
134
134
|
<CountrySelect
|
|
135
135
|
{...field}
|
|
136
136
|
sx={{
|
|
137
|
-
'
|
|
138
|
-
borderColor: 'transparent',
|
|
137
|
+
'.MuiOutlinedInput-notchedOutline': {
|
|
138
|
+
borderColor: 'transparent !important',
|
|
139
139
|
},
|
|
140
140
|
}}
|
|
141
141
|
/>
|
|
@@ -57,29 +57,18 @@ export default function CurrencySelector({ value, currencies, onChange }: Props)
|
|
|
57
57
|
const Root = styled<any>('section')`
|
|
58
58
|
.cko-payment-card {
|
|
59
59
|
position: relative;
|
|
60
|
-
border: 1px solid
|
|
60
|
+
border: 1px solid;
|
|
61
|
+
border-color: ${({ theme }) => theme.palette.secondary.main};
|
|
61
62
|
padding: 4px 8px;
|
|
62
63
|
cursor: pointer;
|
|
63
|
-
background:
|
|
64
|
+
background: ${({ theme }) => theme.palette.grey[50]};
|
|
64
65
|
}
|
|
65
66
|
|
|
66
67
|
.cko-payment-card-unselect {
|
|
67
|
-
border: 1px solid
|
|
68
|
+
border: 1px solid;
|
|
69
|
+
border-color: ${({ theme }) => theme.palette.grey[100]};
|
|
68
70
|
padding: 4px 8px;
|
|
69
71
|
cursor: pointer;
|
|
70
|
-
background:
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
.cko-payment-card::after {
|
|
74
|
-
content: '';
|
|
75
|
-
width: 6px;
|
|
76
|
-
height: 10px;
|
|
77
|
-
position: absolute;
|
|
78
|
-
right: 3px;
|
|
79
|
-
bottom: 3px;
|
|
80
|
-
border: 1px solid #fff;
|
|
81
|
-
border-top-color: transparent;
|
|
82
|
-
border-left-color: transparent;
|
|
83
|
-
transform: rotate(35deg);
|
|
72
|
+
background: ${({ theme }) => theme.palette.grey[50]};
|
|
84
73
|
}
|
|
85
74
|
`;
|
|
@@ -667,7 +667,7 @@ export default function PaymentForm({
|
|
|
667
667
|
fullWidth
|
|
668
668
|
disabled={state.stripePaying || !quantityInventoryStatus || !payable}>
|
|
669
669
|
{(state.submitting || state.paying) && (
|
|
670
|
-
<CircularProgress size={16} sx={{ mr: 0.5, color: '
|
|
670
|
+
<CircularProgress size={16} sx={{ mr: 0.5, color: 'primary.contrastText' }} />
|
|
671
671
|
)}
|
|
672
672
|
{state.submitting || state.paying ? t('payment.checkout.processing') : buttonText}
|
|
673
673
|
</Button>
|
|
@@ -89,8 +89,8 @@ export default function PhoneInput({ ...props }) {
|
|
|
89
89
|
onChange={onCountryChange}
|
|
90
90
|
name={countryFieldName}
|
|
91
91
|
sx={{
|
|
92
|
-
'&.
|
|
93
|
-
borderColor: 'transparent',
|
|
92
|
+
'&.MuiOutlinedInput-notchedOutline': {
|
|
93
|
+
borderColor: 'transparent !important',
|
|
94
94
|
},
|
|
95
95
|
}}
|
|
96
96
|
showDialCode
|
package/src/payment/index.tsx
CHANGED
|
@@ -281,7 +281,7 @@ function PaymentInner({
|
|
|
281
281
|
action={action}
|
|
282
282
|
/>
|
|
283
283
|
{mode === 'standalone' && !isMobile && (
|
|
284
|
-
<CheckoutFooter className="cko-footer" sx={{ color: '
|
|
284
|
+
<CheckoutFooter className="cko-footer" sx={{ color: 'text.lighter' }} />
|
|
285
285
|
)}
|
|
286
286
|
</Stack>
|
|
287
287
|
</Fade>
|
|
@@ -326,9 +326,7 @@ function PaymentInner({
|
|
|
326
326
|
/>
|
|
327
327
|
)}
|
|
328
328
|
</Stack>
|
|
329
|
-
{mode === 'standalone' && isMobile &&
|
|
330
|
-
<CheckoutFooter className="cko-footer" sx={{ color: 'var(--foregrounds-fg-muted, #98A3B1)' }} />
|
|
331
|
-
)}
|
|
329
|
+
{mode === 'standalone' && isMobile && <CheckoutFooter className="cko-footer" sx={{ color: 'text.lighter' }} />}
|
|
332
330
|
</Stack>
|
|
333
331
|
</FormProvider>
|
|
334
332
|
);
|
|
@@ -390,17 +388,11 @@ export default function Payment({
|
|
|
390
388
|
<Box className="cko-product">
|
|
391
389
|
<OverviewSkeleton />
|
|
392
390
|
</Box>
|
|
393
|
-
{/* {mode === 'standalone' && !isMobile && (
|
|
394
|
-
<CheckoutFooter className="cko-footer" sx={{ color: 'var(--foregrounds-fg-muted, #98A3B1)' }} />
|
|
395
|
-
)} */}
|
|
396
391
|
</Stack>
|
|
397
392
|
)}
|
|
398
393
|
<Stack className="base-card cko-payment">
|
|
399
394
|
<PaymentSkeleton />
|
|
400
395
|
</Stack>
|
|
401
|
-
{/* {mode === 'standalone' && isMobile && (
|
|
402
|
-
<CheckoutFooter className="cko-footer" sx={{ color: 'var(--foregrounds-fg-muted, #98A3B1)' }} />
|
|
403
|
-
)} */}
|
|
404
396
|
</Stack>
|
|
405
397
|
);
|
|
406
398
|
}
|
|
@@ -458,7 +450,7 @@ export default function Payment({
|
|
|
458
450
|
theme={undefined}
|
|
459
451
|
hideNavMenu={undefined}
|
|
460
452
|
maxWidth={false}
|
|
461
|
-
sx={{ borderBottom: '1px solid
|
|
453
|
+
sx={{ borderBottom: '1px solid', borderColor: 'grey.100' }}
|
|
462
454
|
/>
|
|
463
455
|
) : null}
|
|
464
456
|
<Root
|
|
@@ -477,11 +469,10 @@ export default function Payment({
|
|
|
477
469
|
left: 0,
|
|
478
470
|
right: 0,
|
|
479
471
|
zIndex: 999,
|
|
480
|
-
|
|
472
|
+
backgroundColor: 'background.paper',
|
|
481
473
|
padding: '10px',
|
|
482
474
|
textAlign: 'center',
|
|
483
475
|
button: {
|
|
484
|
-
color: '#fff',
|
|
485
476
|
maxWidth: 542,
|
|
486
477
|
},
|
|
487
478
|
},
|
|
@@ -491,7 +482,7 @@ export default function Payment({
|
|
|
491
482
|
left: 0,
|
|
492
483
|
right: 0,
|
|
493
484
|
zIndex: 999,
|
|
494
|
-
|
|
485
|
+
backgroundColor: 'background.paper',
|
|
495
486
|
marginBottom: 0,
|
|
496
487
|
},
|
|
497
488
|
'.cko-payment': {
|
|
@@ -549,7 +540,7 @@ export const Root: React.FC<RootProps> = styled(Box)<RootProps>`
|
|
|
549
540
|
position: relative;
|
|
550
541
|
flex-direction: column;
|
|
551
542
|
display: ${(props) => (props.mode.endsWith('-minimal') ? 'none' : 'flex')};
|
|
552
|
-
background:
|
|
543
|
+
background: ${({ theme }) => theme.palette.background.default};
|
|
553
544
|
min-height: 'auto';
|
|
554
545
|
}
|
|
555
546
|
.cko-header {
|
|
@@ -603,7 +594,7 @@ export const Root: React.FC<RootProps> = styled(Box)<RootProps>`
|
|
|
603
594
|
|
|
604
595
|
.cko-payment-form {
|
|
605
596
|
.MuiFormLabel-root {
|
|
606
|
-
color:
|
|
597
|
+
color: ${({ theme }) => theme.palette.grey.A700};
|
|
607
598
|
font-weight: 500;
|
|
608
599
|
margin-top: 12px;
|
|
609
600
|
margin-bottom: 4px;
|
|
@@ -639,20 +630,21 @@ export const Root: React.FC<RootProps> = styled(Box)<RootProps>`
|
|
|
639
630
|
}
|
|
640
631
|
|
|
641
632
|
.product-item {
|
|
642
|
-
border-radius:
|
|
643
|
-
border: 1px solid
|
|
633
|
+
border-radius: ${({ theme }) => `${2 * theme.shape.borderRadius}px`};
|
|
634
|
+
border: 1px solid;
|
|
635
|
+
border-color: ${({ theme }) => theme.palette.grey[100]};
|
|
644
636
|
.product-item-content {
|
|
645
637
|
padding: 16px;
|
|
646
|
-
background:
|
|
647
|
-
border-top-left-radius:
|
|
648
|
-
border-top-right-radius:
|
|
638
|
+
background: ${({ theme }) => theme.palette.grey[50]};
|
|
639
|
+
border-top-left-radius: ${({ theme }) => `${2 * theme.shape.borderRadius}px`};
|
|
640
|
+
border-top-right-radius: ${({ theme }) => `${2 * theme.shape.borderRadius}px`};
|
|
649
641
|
}
|
|
650
642
|
.product-item-upsell {
|
|
651
643
|
margin-top: 0;
|
|
652
644
|
padding: 16px;
|
|
653
|
-
background:
|
|
654
|
-
border-bottom-left-radius:
|
|
655
|
-
border-bottom-right-radius:
|
|
645
|
+
background: ${({ theme }) => theme.palette.grey[100]};
|
|
646
|
+
border-bottom-left-radius: ${({ theme }) => `${2 * theme.shape.borderRadius}px`};
|
|
647
|
+
border-bottom-right-radius: ${({ theme }) => `${2 * theme.shape.borderRadius}px`};
|
|
656
648
|
}
|
|
657
649
|
}
|
|
658
650
|
|
|
@@ -679,7 +671,8 @@ export const Root: React.FC<RootProps> = styled(Box)<RootProps>`
|
|
|
679
671
|
width: 100%;
|
|
680
672
|
height: fit-content;
|
|
681
673
|
flex: none;
|
|
682
|
-
border-top: 1px solid
|
|
674
|
+
border-top: 1px solid;
|
|
675
|
+
border-color: ${({ theme }) => theme.palette.grey[100]};
|
|
683
676
|
&:before {
|
|
684
677
|
display: none;
|
|
685
678
|
}
|