@blocklet/payment-react 1.18.36 → 1.18.38

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 (66) hide show
  1. package/es/checkout/donate.js +11 -12
  2. package/es/components/blockchain/tx.js +1 -1
  3. package/es/components/country-select.js +5 -4
  4. package/es/components/over-due-invoice-payment.js +7 -5
  5. package/es/components/pricing-table.js +8 -7
  6. package/es/components/table.js +9 -7
  7. package/es/history/invoice/list.js +1 -1
  8. package/es/payment/donation-form.js +4 -5
  9. package/es/payment/form/address.js +2 -2
  10. package/es/payment/form/currency.js +6 -17
  11. package/es/payment/form/index.js +1 -1
  12. package/es/payment/form/phone.js +2 -2
  13. package/es/payment/index.js +18 -17
  14. package/es/payment/product-item.js +6 -6
  15. package/es/payment/product-skeleton.js +2 -1
  16. package/es/payment/success.js +3 -4
  17. package/es/theme/index.css +37 -0
  18. package/es/theme/index.d.ts +4 -3
  19. package/es/theme/index.js +264 -240
  20. package/es/theme/types.d.ts +76 -0
  21. package/es/theme/types.js +2 -0
  22. package/es/theme/typography.js +1 -5
  23. package/lib/checkout/donate.js +11 -12
  24. package/lib/components/blockchain/tx.js +3 -1
  25. package/lib/components/country-select.js +7 -4
  26. package/lib/components/over-due-invoice-payment.js +6 -4
  27. package/lib/components/pricing-table.js +10 -7
  28. package/lib/components/table.js +23 -7
  29. package/lib/history/invoice/list.js +1 -1
  30. package/lib/payment/donation-form.js +9 -5
  31. package/lib/payment/form/address.js +2 -2
  32. package/lib/payment/form/currency.js +14 -17
  33. package/lib/payment/form/index.js +1 -1
  34. package/lib/payment/form/phone.js +2 -2
  35. package/lib/payment/index.js +41 -17
  36. package/lib/payment/product-item.js +6 -6
  37. package/lib/payment/product-skeleton.js +2 -1
  38. package/lib/payment/success.js +3 -4
  39. package/lib/theme/index.css +37 -0
  40. package/lib/theme/index.d.ts +4 -3
  41. package/lib/theme/index.js +257 -232
  42. package/lib/theme/types.d.ts +76 -0
  43. package/lib/theme/types.js +4 -0
  44. package/lib/theme/typography.js +1 -5
  45. package/package.json +9 -8
  46. package/src/checkout/donate.tsx +11 -12
  47. package/src/components/blockchain/tx.tsx +1 -1
  48. package/src/components/country-select.tsx +5 -4
  49. package/src/components/over-due-invoice-payment.tsx +7 -5
  50. package/src/components/pricing-table.tsx +11 -9
  51. package/src/components/table.tsx +9 -7
  52. package/src/history/invoice/list.tsx +1 -1
  53. package/src/payment/donation-form.tsx +4 -5
  54. package/src/payment/form/address.tsx +2 -2
  55. package/src/payment/form/currency.tsx +6 -17
  56. package/src/payment/form/index.tsx +1 -1
  57. package/src/payment/form/phone.tsx +2 -2
  58. package/src/payment/index.tsx +18 -25
  59. package/src/payment/product-item.tsx +6 -6
  60. package/src/payment/product-skeleton.tsx +2 -1
  61. package/src/payment/success.tsx +3 -4
  62. package/src/theme/index.css +37 -0
  63. package/src/theme/index.tsx +263 -237
  64. package/src/theme/types.ts +78 -0
  65. package/src/theme/typography.ts +0 -5
  66. 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
+ }
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+
3
+ require("@blocklet/theme");
4
+ require("@mui/material/styles");
@@ -51,9 +51,5 @@ const typography = exports.typography = {
51
51
  body1: {
52
52
  fontSize: "0.875rem",
53
53
  lineHeight: 1.75
54
- },
55
- fontWeightLight: 300,
56
- fontWeightRegular: 400,
57
- fontWeightMedium: 500,
58
- fontWeightBold: 700
54
+ }
59
55
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blocklet/payment-react",
3
- "version": "1.18.36",
3
+ "version": "1.18.38",
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.13",
58
- "@arcblock/ux": "^2.13.13",
59
- "@arcblock/ws": "^1.20.2",
60
- "@blocklet/ui-react": "^2.13.13",
57
+ "@arcblock/did-connect": "^2.13.18",
58
+ "@arcblock/ux": "^2.13.18",
59
+ "@arcblock/ws": "^1.20.4",
60
+ "@blocklet/theme": "^2.13.18",
61
+ "@blocklet/ui-react": "^2.13.18",
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.2",
66
+ "@ocap/util": "^1.20.4",
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.36",
97
+ "@blocklet/payment-types": "1.18.38",
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": "98872e06bac0c437b53a6648ce4487e9f6d2336b"
128
+ "gitHead": "c273fb068cea55d95017c8b9672f30d5d6c60167"
128
129
  }
@@ -165,11 +165,12 @@ export function DonateDetails({ supporters = [], currency, method }: DonateHisto
165
165
  sx={{
166
166
  padding: '6px',
167
167
  '&:hover': {
168
- backgroundColor: 'var(--backgrounds-bg-highlight, #eff6ff)',
168
+ backgroundColor: (theme) => theme.palette.grey[100],
169
169
  transition: 'background-color 200ms linear',
170
170
  cursor: 'pointer',
171
171
  },
172
- borderBottom: '1px solid var(--stroke-border-base, #EFF1F5)',
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: '#f4f4f5',
294
+ backgroundColor: 'grey.100',
294
295
  height: '24px',
295
296
  ...(showDonateDetails
296
297
  ? {
297
298
  cursor: 'pointer',
298
299
  '&:hover': {
299
- backgroundColor: '#e5e7eb',
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: 'rgba(255, 255, 255, 0.7)',
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: 'var(--foregrounds-fg-base, #010714)',
627
- borderColor: 'var(--stroke-button-secondary-border, #E5E7EB)',
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 var(--stroke-border-base, #EFF1F5)',
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="text.link">
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: 'rgba(0, 0, 0, 0.04)',
256
+ backgroundColor: 'primary.lighter',
257
257
  },
258
258
  '&:hover': {
259
- backgroundColor: 'var(--backgrounds-bg-highlight, #eff6ff)',
259
+ backgroundColor: 'grey.100',
260
260
  },
261
261
  ...(isFocused
262
262
  ? {
263
- backgroundColor: 'var(--backgrounds-bg-highlight, #eff6ff)',
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: 'var(--foregrounds-fg-interactive, 0086FF)' }}>
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: 'var(--foregrounds-fg-interactive, 0086FF)' }}>
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 var(--foregrounds-fg-border, #E0E0E0)',
539
+ borderBottom: '1px solid',
540
+ borderColor: 'grey.200',
539
541
  '&:hover': {
540
- background: 'var(--backgrounds-bg-highlight, #eff6ff)',
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: '#f1f3f5',
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: x === state.interval ? '#fff !important' : '#f1f3f5 !important',
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 #e5e7eb',
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' : '#eee',
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' : '#ddd',
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%',
@@ -79,19 +79,21 @@ const Wrapped = styled(Datatable)`
79
79
  overflow: hidden;
80
80
  }
81
81
  table.MuiTable-root {
82
- outline: 1px solid var(--stroke-border-base, #eff1f5);
83
- border-radius: var(--radius-m, 8px);
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 var(--stroke-border-base, #eff1f5);
88
- border-radius: var(--radius-m, 8px);
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: var(--backgrounds-bg-subtle, #f9fafb);
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: var(--backgrounds-bg-highlight, #eff6ff);
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: var(--backgrounds-bg-subtle, #f9fafb);
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: 'var(--foregrounds-fg-interactive, #0086FF) !important' }}
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 var(--stroke-border-base, #EFF1F5)' }}
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
- background: '#fff',
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: var(--backgrounds-bg-base);
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: var(--foregrounds-fg-base, #010714);
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
- '&.Mui-focused .MuiOutlinedInput-notchedOutline': {
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 var(--stroke-border-interactive, #0086ff);
60
+ border: 1px solid;
61
+ border-color: ${({ theme }) => theme.palette.secondary.main};
61
62
  padding: 4px 8px;
62
63
  cursor: pointer;
63
- background: var(--backgrounds-bg-field, #f9fafb);
64
+ background: ${({ theme }) => theme.palette.grey[50]};
64
65
  }
65
66
 
66
67
  .cko-payment-card-unselect {
67
- border: 1px solid #ddd;
68
+ border: 1px solid;
69
+ border-color: ${({ theme }) => theme.palette.grey[100]};
68
70
  padding: 4px 8px;
69
71
  cursor: pointer;
70
- background: var(--backgrounds-bg-field, #f9fafb);
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: 'var(--foregrounds-fg-on-color, #fff)' }} />
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
- '&.Mui-focused .MuiOutlinedInput-notchedOutline': {
93
- borderColor: 'transparent',
92
+ '&.MuiOutlinedInput-notchedOutline': {
93
+ borderColor: 'transparent !important',
94
94
  },
95
95
  }}
96
96
  showDialCode
@@ -281,7 +281,7 @@ function PaymentInner({
281
281
  action={action}
282
282
  />
283
283
  {mode === 'standalone' && !isMobile && (
284
- <CheckoutFooter className="cko-footer" sx={{ color: 'var(--foregrounds-fg-muted, #98A3B1)' }} />
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 var(--stroke-border-base, #EFF1F5)' }}
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
- background: '#fff',
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
- background: '#fff',
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: var(--backgrounds-bg-base);
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: var(--foregrounds-fg-base, #010714);
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: var(--radius-l, 12px);
643
- border: 1px solid var(--stroke-border-base, #eff1f5);
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: var(--backgrounds-bg-subtle, #f9fafb);
647
- border-top-left-radius: var(--radius-l, 12px);
648
- border-top-right-radius: var(--radius-l, 12px);
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: var(--backgrounds-bg-component, #f1f3f5);
654
- border-bottom-left-radius: var(--radius-l, 12px);
655
- border-bottom-right-radius: var(--radius-l, 12px);
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 var(--stroke-border-base, #eff1f5);
674
+ border-top: 1px solid;
675
+ border-color: ${({ theme }) => theme.palette.grey[100]};
683
676
  &:before {
684
677
  display: none;
685
678
  }