@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.
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
@@ -81,11 +81,12 @@ export function DonateDetails({ supporters = [], currency, method }) {
81
81
  sx: {
82
82
  padding: "6px",
83
83
  "&:hover": {
84
- backgroundColor: "var(--backgrounds-bg-highlight, #eff6ff)",
84
+ backgroundColor: (theme) => theme.palette.grey[100],
85
85
  transition: "background-color 200ms linear",
86
86
  cursor: "pointer"
87
87
  },
88
- borderBottom: "1px solid var(--stroke-border-base, #EFF1F5)",
88
+ borderBottom: "1px solid",
89
+ borderColor: "grey.100",
89
90
  display: "flex",
90
91
  justifyContent: "space-between",
91
92
  alignItems: "center"
@@ -227,12 +228,12 @@ function SupporterAvatar({
227
228
  pr: 1,
228
229
  ml: -1,
229
230
  borderRadius: "8px",
230
- backgroundColor: "#f4f4f5",
231
+ backgroundColor: "grey.100",
231
232
  height: "24px",
232
233
  ...showDonateDetails ? {
233
234
  cursor: "pointer",
234
235
  "&:hover": {
235
- backgroundColor: "#e5e7eb"
236
+ backgroundColor: "grey.200"
236
237
  }
237
238
  } : {}
238
239
  },
@@ -503,7 +504,8 @@ function CheckoutDonateInner({
503
504
  display: "flex",
504
505
  justifyContent: "center",
505
506
  alignItems: "center",
506
- backgroundColor: "rgba(255, 255, 255, 0.7)"
507
+ backgroundColor: "background.paper",
508
+ opacity: 0.8
507
509
  },
508
510
  children: /* @__PURE__ */ jsx(CircularProgress, {})
509
511
  }
@@ -538,12 +540,8 @@ function CheckoutDonateInner({
538
540
  variant: donateSettings.appearance?.button?.variant || "outlined",
539
541
  sx: {
540
542
  ...!donateSettings.appearance?.button?.variant ? {
541
- color: "var(--foregrounds-fg-base, #010714)",
542
- borderColor: "var(--stroke-button-secondary-border, #E5E7EB)",
543
- "&:hover": {
544
- backgroundColor: "var(--buttons-button-neutral-hover, #F3F4F6)",
545
- borderColor: "var(--stroke-button-secondary-border, #E5E7EB)"
546
- }
543
+ color: "primary.main",
544
+ borderColor: "grey.200"
547
545
  } : {},
548
546
  // @ts-ignore
549
547
  ...donateSettings.appearance?.button?.sx || {}
@@ -642,7 +640,8 @@ function CheckoutDonateInner({
642
640
  sx: {
643
641
  ".MuiDialogContent-root": {
644
642
  padding: "16px 24px",
645
- borderTop: "1px solid var(--stroke-border-base, #EFF1F5)",
643
+ borderTop: "1px solid",
644
+ borderColor: "grey.100",
646
645
  width: "100%"
647
646
  },
648
647
  ".ux-dialog_header": {
@@ -24,7 +24,7 @@ export default function TxLink(props) {
24
24
  sx: { color: "text.link" },
25
25
  spacing: 1,
26
26
  children: [
27
- /* @__PURE__ */ jsx(Typography, { component: "span", color: "text.link", children: text.length > 40 ? [text.slice(0, 6), text.slice(-6)].join("...") : text }),
27
+ /* @__PURE__ */ jsx(Typography, { component: "span", sx: { color: "text.link" }, children: text.length > 40 ? [text.slice(0, 6), text.slice(-6)].join("...") : text }),
28
28
  /* @__PURE__ */ jsx(OpenInNewOutlined, { fontSize: "small" })
29
29
  ]
30
30
  }
@@ -214,13 +214,13 @@ const CountrySelect = forwardRef(
214
214
  display: "flex",
215
215
  alignItems: "center",
216
216
  "&.Mui-selected": {
217
- backgroundColor: "rgba(0, 0, 0, 0.04)"
217
+ backgroundColor: "primary.lighter"
218
218
  },
219
219
  "&:hover": {
220
- backgroundColor: "var(--backgrounds-bg-highlight, #eff6ff)"
220
+ backgroundColor: "grey.100"
221
221
  },
222
222
  ...isFocused ? {
223
- backgroundColor: "var(--backgrounds-bg-highlight, #eff6ff)",
223
+ backgroundColor: "grey.100",
224
224
  outline: "none"
225
225
  } : {}
226
226
  },
@@ -363,6 +363,7 @@ const CountrySelect = forwardRef(
363
363
  position: "absolute",
364
364
  bottom: 0,
365
365
  m: 0,
366
+ p: 0,
366
367
  borderBottomLeftRadius: 0,
367
368
  borderBottomRightRadius: 0,
368
369
  width: "100%"
@@ -373,7 +374,7 @@ const CountrySelect = forwardRef(
373
374
  /* @__PURE__ */ jsx(Typography, { variant: "h6", children: "Select Country" }),
374
375
  /* @__PURE__ */ jsx(IconButton, { edge: "end", onClick: () => setOpen(false), sx: { "-webkit-tap-highlight-color": "transparent" }, children: "\u2715" })
375
376
  ] }),
376
- /* @__PURE__ */ jsx(DialogContent, { sx: { p: 0 }, children: countryListContent })
377
+ /* @__PURE__ */ jsx(DialogContent, { sx: { "&.MuiDialogContent-root": { p: 0 } }, children: countryListContent })
377
378
  ]
378
379
  }
379
380
  )
@@ -1,6 +1,6 @@
1
1
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
2
  import { useEffect, useMemo, useRef, useState } from "react";
3
- import { Button, Typography, Stack, Alert } from "@mui/material";
3
+ import { Button, Typography, Stack, Alert, 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";
@@ -41,6 +41,7 @@ function OverdueInvoicePayment({
41
41
  authToken
42
42
  }) {
43
43
  const { t, locale } = useLocaleContext();
44
+ const theme = useTheme();
44
45
  const { connect, session } = usePaymentContext();
45
46
  const [selectCurrencyId, setSelectCurrencyId] = useState("");
46
47
  const [payLoading, setPayLoading] = useState(false);
@@ -361,7 +362,7 @@ function OverdueInvoicePayment({
361
362
  target: "_blank",
362
363
  onClick: handleViewDetailClick,
363
364
  rel: "noreferrer",
364
- style: { color: "var(--foregrounds-fg-interactive, 0086FF)" },
365
+ style: { color: theme.palette.text.link },
365
366
  children: getDetailLinkText()
366
367
  }
367
368
  )
@@ -385,7 +386,7 @@ function OverdueInvoicePayment({
385
386
  target: "_blank",
386
387
  rel: "noreferrer",
387
388
  onClick: handleViewDetailClick,
388
- style: { color: "var(--foregrounds-fg-interactive, 0086FF)" },
389
+ style: { color: theme.palette.text.link },
389
390
  children: getDetailLinkText()
390
391
  }
391
392
  )
@@ -401,9 +402,10 @@ function OverdueInvoicePayment({
401
402
  sx: {
402
403
  py: 1,
403
404
  px: 0.5,
404
- borderBottom: "1px solid var(--foregrounds-fg-border, #E0E0E0)",
405
+ borderBottom: "1px solid",
406
+ borderColor: "grey.200",
405
407
  "&:hover": {
406
- background: "var(--backgrounds-bg-highlight, #eff6ff)"
408
+ backgroundColor: () => theme.palette.grey[100]
407
409
  },
408
410
  mt: 0
409
411
  },
@@ -231,7 +231,7 @@ export default function PricingTable({ table, alignItems, interval, mode, onSele
231
231
  borderRadius: "36px",
232
232
  height: "40px",
233
233
  boxSizing: "border-box",
234
- backgroundColor: "#f1f3f5",
234
+ backgroundColor: "grey.100",
235
235
  border: 0
236
236
  },
237
237
  onChange: (_, value) => {
@@ -249,11 +249,12 @@ export default function PricingTable({ table, alignItems, interval, mode, onSele
249
249
  textTransform: "capitalize",
250
250
  padding: "5px 12px",
251
251
  fontSize: "13px",
252
- backgroundColor: x === state.interval ? "#fff !important" : "#f1f3f5 !important",
252
+ backgroundColor: ({ palette }) => x === state.interval ? `${palette.background.default} !important` : `${palette.grey[100]} !important`,
253
253
  border: "0px",
254
254
  "&.Mui-selected": {
255
255
  borderRadius: "9999px !important",
256
- border: "1px solid #e5e7eb"
256
+ border: "1px solid",
257
+ borderColor: "divider"
257
258
  }
258
259
  },
259
260
  children: formatRecurring(recurring[x], true, "", locale)
@@ -312,13 +313,13 @@ export default function PricingTable({ table, alignItems, interval, mode, onSele
312
313
  cursor: "pointer",
313
314
  borderWidth: "1px",
314
315
  borderStyle: "solid",
315
- borderColor: mode === "select" && x.is_selected ? "primary.main" : "#eee",
316
+ borderColor: mode === "select" && x.is_selected ? "primary.main" : "grey.100",
316
317
  borderRadius: 2,
317
318
  transition: "border-color 0.3s ease 0s, box-shadow 0.3s ease 0s",
318
- boxShadow: "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)",
319
+ boxShadow: 2,
319
320
  "&:hover": {
320
- borderColor: mode === "select" && x.is_selected ? "primary.main" : "#ddd",
321
- boxShadow: "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))"
321
+ borderColor: mode === "select" && x.is_selected ? "primary.main" : "grey.200",
322
+ boxShadow: 2
322
323
  },
323
324
  width: {
324
325
  xs: "100%",
@@ -59,19 +59,21 @@ const Wrapped = styled(Datatable)`
59
59
  overflow: hidden;
60
60
  }
61
61
  table.MuiTable-root {
62
- outline: 1px solid var(--stroke-border-base, #eff1f5);
63
- border-radius: var(--radius-m, 8px);
62
+ outline: 1px solid;
63
+ outline-color: ${({ theme }) => theme.palette.grey[100]};
64
+ border-radius: ${({ theme }) => `${2 * theme.shape.borderRadius}px`};
64
65
  overflow: hidden;
65
66
  }
66
67
  [class*='MUIDataTable-responsiveBase'] {
67
- outline: 1px solid var(--stroke-border-base, #eff1f5);
68
- border-radius: var(--radius-m, 8px);
68
+ outline: 1px solid;
69
+ outline-color: ${({ theme }) => theme.palette.grey[100]};
70
+ border-radius: ${({ theme }) => `${2 * theme.shape.borderRadius}px`};
69
71
  }
70
72
 
71
73
  th.MuiTableCell-head {
72
74
  padding: 8px 16px 8px 16px;
73
75
  text-transform: inherit;
74
- background: var(--backgrounds-bg-subtle, #f9fafb);
76
+ background: ${({ theme }) => theme.palette.grey[50]};
75
77
  border-bottom: none;
76
78
  &:first-of-type {
77
79
  border-top-left-radius: 8px;
@@ -83,7 +85,7 @@ const Wrapped = styled(Datatable)`
83
85
  }
84
86
 
85
87
  tr.MuiTableRow-root:not(.MuiTableRow-footer):hover {
86
- background: var(--backgrounds-bg-highlight, #eff6ff);
88
+ background: ${({ theme }) => theme.palette.grey[100]};
87
89
  }
88
90
  tr.MuiTableRow-root:last-of-type td:first-of-type {
89
91
  border-bottom-left-radius: 8px;
@@ -94,7 +96,7 @@ const Wrapped = styled(Datatable)`
94
96
  }
95
97
 
96
98
  tr.MuiTableRow-root:nth-of-type(even) {
97
- background: var(--backgrounds-bg-subtle, #f9fafb);
99
+ background: ${({ theme }) => theme.palette.grey[50]};
98
100
  }
99
101
  td.MuiTableCell-root {
100
102
  border-bottom: none;
@@ -241,7 +241,7 @@ const InvoiceTable = React.memo((props) => {
241
241
  variant: "text",
242
242
  size: "small",
243
243
  onClick: (e) => handleLinkClick(e, invoice),
244
- sx: { color: "var(--foregrounds-fg-interactive, #0086FF) !important" },
244
+ sx: { color: "text.link" },
245
245
  rel: "noreferrer",
246
246
  children: t("payment.customer.invoice.pay")
247
247
  }
@@ -521,7 +521,7 @@ export default function DonationForm({
521
521
  theme: void 0,
522
522
  hideNavMenu: void 0,
523
523
  maxWidth: false,
524
- sx: { borderBottom: "1px solid var(--stroke-border-base, #EFF1F5)" }
524
+ sx: { borderBottom: "1px solid", borderColor: "grey.100" }
525
525
  }
526
526
  ) : null,
527
527
  /* @__PURE__ */ jsxs(
@@ -541,11 +541,10 @@ export default function DonationForm({
541
541
  left: 0,
542
542
  right: 0,
543
543
  zIndex: 999,
544
- background: "#fff",
544
+ backgroundColor: "background.paper",
545
545
  padding: "10px",
546
546
  textAlign: "center",
547
547
  button: {
548
- color: "#fff",
549
548
  maxWidth: 542
550
549
  }
551
550
  }
@@ -590,7 +589,7 @@ export const Root = styled(Box)`
590
589
  position: relative;
591
590
  flex-direction: column;
592
591
  display: ${(props) => props.mode.endsWith("-minimal") ? "none" : "flex"};
593
- background: var(--backgrounds-bg-base);
592
+ background: ${({ theme }) => theme.palette.background.default};
594
593
  min-height: 'auto';
595
594
  }
596
595
 
@@ -602,7 +601,7 @@ export const Root = styled(Box)`
602
601
 
603
602
  .cko-payment-form {
604
603
  .MuiFormLabel-root {
605
- color: var(--foregrounds-fg-base, #010714);
604
+ color: ${({ theme }) => theme.palette.grey.A700};
606
605
  font-weight: 500;
607
606
  margin-top: 12px;
608
607
  margin-bottom: 4px;
@@ -128,8 +128,8 @@ export default function AddressForm({ mode, stripe, sx = {}, fieldValidation, er
128
128
  {
129
129
  ...field,
130
130
  sx: {
131
- "&.Mui-focused .MuiOutlinedInput-notchedOutline": {
132
- borderColor: "transparent"
131
+ ".MuiOutlinedInput-notchedOutline": {
132
+ borderColor: "transparent !important"
133
133
  }
134
134
  }
135
135
  }
@@ -55,29 +55,18 @@ export default function CurrencySelector({ value, currencies, onChange }) {
55
55
  const Root = styled("section")`
56
56
  .cko-payment-card {
57
57
  position: relative;
58
- border: 1px solid var(--stroke-border-interactive, #0086ff);
58
+ border: 1px solid;
59
+ border-color: ${({ theme }) => theme.palette.secondary.main};
59
60
  padding: 4px 8px;
60
61
  cursor: pointer;
61
- background: var(--backgrounds-bg-field, #f9fafb);
62
+ background: ${({ theme }) => theme.palette.grey[50]};
62
63
  }
63
64
 
64
65
  .cko-payment-card-unselect {
65
- border: 1px solid #ddd;
66
+ border: 1px solid;
67
+ border-color: ${({ theme }) => theme.palette.grey[100]};
66
68
  padding: 4px 8px;
67
69
  cursor: pointer;
68
- background: var(--backgrounds-bg-field, #f9fafb);
69
- }
70
-
71
- .cko-payment-card::after {
72
- content: '';
73
- width: 6px;
74
- height: 10px;
75
- position: absolute;
76
- right: 3px;
77
- bottom: 3px;
78
- border: 1px solid #fff;
79
- border-top-color: transparent;
80
- border-left-color: transparent;
81
- transform: rotate(35deg);
70
+ background: ${({ theme }) => theme.palette.grey[50]};
82
71
  }
83
72
  `;
@@ -523,7 +523,7 @@ export default function PaymentForm({
523
523
  fullWidth: true,
524
524
  disabled: state.stripePaying || !quantityInventoryStatus || !payable,
525
525
  children: [
526
- (state.submitting || state.paying) && /* @__PURE__ */ jsx(CircularProgress, { size: 16, sx: { mr: 0.5, color: "var(--foregrounds-fg-on-color, #fff)" } }),
526
+ (state.submitting || state.paying) && /* @__PURE__ */ jsx(CircularProgress, { size: 16, sx: { mr: 0.5, color: "primary.contrastText" } }),
527
527
  state.submitting || state.paying ? t("payment.checkout.processing") : buttonText
528
528
  ]
529
529
  }
@@ -79,8 +79,8 @@ export default function PhoneInput({ ...props }) {
79
79
  onChange: onCountryChange,
80
80
  name: countryFieldName,
81
81
  sx: {
82
- "&.Mui-focused .MuiOutlinedInput-notchedOutline": {
83
- borderColor: "transparent"
82
+ "&.MuiOutlinedInput-notchedOutline": {
83
+ borderColor: "transparent !important"
84
84
  }
85
85
  },
86
86
  showDialCode: true
@@ -228,7 +228,7 @@ function PaymentInner({
228
228
  action
229
229
  }
230
230
  ),
231
- mode === "standalone" && !isMobile && /* @__PURE__ */ jsx(CheckoutFooter, { className: "cko-footer", sx: { color: "var(--foregrounds-fg-muted, #98A3B1)" } })
231
+ mode === "standalone" && !isMobile && /* @__PURE__ */ jsx(CheckoutFooter, { className: "cko-footer", sx: { color: "text.lighter" } })
232
232
  ] }) }),
233
233
  /* @__PURE__ */ jsxs(
234
234
  Stack,
@@ -272,7 +272,7 @@ function PaymentInner({
272
272
  ]
273
273
  }
274
274
  ),
275
- mode === "standalone" && isMobile && /* @__PURE__ */ jsx(CheckoutFooter, { className: "cko-footer", sx: { color: "var(--foregrounds-fg-muted, #98A3B1)" } })
275
+ mode === "standalone" && isMobile && /* @__PURE__ */ jsx(CheckoutFooter, { className: "cko-footer", sx: { color: "text.lighter" } })
276
276
  ] }) });
277
277
  }
278
278
  Payment.defaultProps = {
@@ -383,7 +383,7 @@ export default function Payment({
383
383
  theme: void 0,
384
384
  hideNavMenu: void 0,
385
385
  maxWidth: false,
386
- sx: { borderBottom: "1px solid var(--stroke-border-base, #EFF1F5)" }
386
+ sx: { borderBottom: "1px solid", borderColor: "grey.100" }
387
387
  }
388
388
  ) : null,
389
389
  /* @__PURE__ */ jsxs(
@@ -403,11 +403,10 @@ export default function Payment({
403
403
  left: 0,
404
404
  right: 0,
405
405
  zIndex: 999,
406
- background: "#fff",
406
+ backgroundColor: "background.paper",
407
407
  padding: "10px",
408
408
  textAlign: "center",
409
409
  button: {
410
- color: "#fff",
411
410
  maxWidth: 542
412
411
  }
413
412
  },
@@ -417,7 +416,7 @@ export default function Payment({
417
416
  left: 0,
418
417
  right: 0,
419
418
  zIndex: 999,
420
- background: "#fff",
419
+ backgroundColor: "background.paper",
421
420
  marginBottom: 0
422
421
  },
423
422
  ".cko-payment": {
@@ -473,7 +472,7 @@ export const Root = styled(Box)`
473
472
  position: relative;
474
473
  flex-direction: column;
475
474
  display: ${(props) => props.mode.endsWith("-minimal") ? "none" : "flex"};
476
- background: var(--backgrounds-bg-base);
475
+ background: ${({ theme }) => theme.palette.background.default};
477
476
  min-height: 'auto';
478
477
  }
479
478
  .cko-header {
@@ -527,7 +526,7 @@ export const Root = styled(Box)`
527
526
 
528
527
  .cko-payment-form {
529
528
  .MuiFormLabel-root {
530
- color: var(--foregrounds-fg-base, #010714);
529
+ color: ${({ theme }) => theme.palette.grey.A700};
531
530
  font-weight: 500;
532
531
  margin-top: 12px;
533
532
  margin-bottom: 4px;
@@ -563,20 +562,21 @@ export const Root = styled(Box)`
563
562
  }
564
563
 
565
564
  .product-item {
566
- border-radius: var(--radius-l, 12px);
567
- border: 1px solid var(--stroke-border-base, #eff1f5);
565
+ border-radius: ${({ theme }) => `${2 * theme.shape.borderRadius}px`};
566
+ border: 1px solid;
567
+ border-color: ${({ theme }) => theme.palette.grey[100]};
568
568
  .product-item-content {
569
569
  padding: 16px;
570
- background: var(--backgrounds-bg-subtle, #f9fafb);
571
- border-top-left-radius: var(--radius-l, 12px);
572
- border-top-right-radius: var(--radius-l, 12px);
570
+ background: ${({ theme }) => theme.palette.grey[50]};
571
+ border-top-left-radius: ${({ theme }) => `${2 * theme.shape.borderRadius}px`};
572
+ border-top-right-radius: ${({ theme }) => `${2 * theme.shape.borderRadius}px`};
573
573
  }
574
574
  .product-item-upsell {
575
575
  margin-top: 0;
576
576
  padding: 16px;
577
- background: var(--backgrounds-bg-component, #f1f3f5);
578
- border-bottom-left-radius: var(--radius-l, 12px);
579
- border-bottom-right-radius: var(--radius-l, 12px);
577
+ background: ${({ theme }) => theme.palette.grey[100]};
578
+ border-bottom-left-radius: ${({ theme }) => `${2 * theme.shape.borderRadius}px`};
579
+ border-bottom-right-radius: ${({ theme }) => `${2 * theme.shape.borderRadius}px`};
580
580
  }
581
581
  }
582
582
 
@@ -603,7 +603,8 @@ export const Root = styled(Box)`
603
603
  width: 100%;
604
604
  height: fit-content;
605
605
  flex: none;
606
- border-top: 1px solid var(--stroke-border-base, #eff1f5);
606
+ border-top: 1px solid;
607
+ border-color: ${({ theme }) => theme.palette.grey[100]};
607
608
  &:before {
608
609
  display: none;
609
610
  }
@@ -77,9 +77,9 @@ export default function ProductItem({
77
77
  variant: "outlined",
78
78
  sx: {
79
79
  mt: 1,
80
- borderColor: "var(--tags-tag-red-border, #FFC8D3)",
81
- background: "var(--tags-tag-red-bg, #FFE2E6)",
82
- color: "var(--tags-tag-red-text, #E40031)"
80
+ borderColor: "chip.error.border",
81
+ backgroundColor: "chip.error.background",
82
+ color: "chip.error.text"
83
83
  }
84
84
  }
85
85
  ) : null,
@@ -125,9 +125,9 @@ export default function ProductItem({
125
125
  variant: "outlined",
126
126
  sx: {
127
127
  ml: 1,
128
- borderColor: " var(--tags-tag-orange-border, #FFE467)",
129
- background: "var(--tags-tag-orange-bg, #FFF4BC)",
130
- color: "var(--tags-tag-orange-text, #D24000)"
128
+ borderColor: "chip.warning.border",
129
+ backgroundColor: "chip.warning.background",
130
+ color: "chip.warning.text"
131
131
  }
132
132
  }
133
133
  )
@@ -10,7 +10,8 @@ export default function ProductSkeleton({ count }) {
10
10
  spacing: 1,
11
11
  sx: {
12
12
  width: 320,
13
- border: "1px solid #eee",
13
+ border: "1px solid",
14
+ borderColor: "grey.100",
14
15
  borderRadius: 1,
15
16
  transition: "border-color 0.3s ease 0s, box-shadow 0.3s ease 0s",
16
17
  boxShadow: "0 4px 8px rgba(0, 0, 0, 20%)",
@@ -1,7 +1,6 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { useLocaleContext } from "@arcblock/ux/lib/Locale/context";
3
- import { Grow, Link, Stack, Typography, Box, Paper } from "@mui/material";
4
- import { styled } from "@mui/system";
3
+ import { Grow, Link, Stack, Typography, Box, Paper, styled } from "@mui/material";
5
4
  import { joinURL } from "ufo";
6
5
  import { Button } from "@arcblock/ux";
7
6
  import { usePaymentContext } from "../contexts/payment.js";
@@ -142,7 +141,7 @@ const Div = styled("div")`
142
141
  content: '';
143
142
  height: 100px;
144
143
  position: absolute;
145
- background: #ffffff;
144
+ background: ${(props) => props.theme.palette.background.paper};
146
145
  transform: rotate(-45deg);
147
146
  }
148
147
  .check-icon .icon-line {
@@ -186,7 +185,7 @@ const Div = styled("div")`
186
185
  height: 85px;
187
186
  position: absolute;
188
187
  transform: rotate(-45deg);
189
- background-color: #ffffff;
188
+ background-color: ${(props) => props.theme.palette.background.paper};
190
189
  }
191
190
 
192
191
  @keyframes rotate-circle {
@@ -1,20 +1,26 @@
1
1
  :root {
2
2
  /* Light Theme */
3
3
  /* Color */
4
+ /* background.default */
4
5
  --backgrounds-bg-base: #ffffff;
5
6
  --backgrounds-bg-base-hover: #f9fafb;
6
7
  --backgrounds-bg-base-pressed: #f3f4f6;
8
+ /* grey.100 */
7
9
  --backgrounds-bg-component: #f1f3f5;
8
10
  --backgrounds-bg-component-hover: #e5e7eb;
11
+ /* grey.100 */
9
12
  --backgrounds-bg-disabled: #f3f4f6;
13
+ /* grey.50 */
10
14
  --backgrounds-bg-field: #f9fafb;
11
15
  --backgrounds-bg-field-hover: #f3f4f6;
12
16
  --backgrounds-bg-glass: #ffffffb8;
17
+ /* grey.100 */
13
18
  --backgrounds-bg-highlight: #eff6ff;
14
19
  --backgrounds-bg-highlight-hover: #dbeafe;
15
20
  --backgrounds-bg-interactive: #3b82f6;
16
21
  --backgrounds-bg-interactive-hover: #2563eb;
17
22
  --backgrounds-bg-overlay: #03071266;
23
+ /* grey.50 */
18
24
  --backgrounds-bg-subtle: #f9fafb;
19
25
  --backgrounds-bg-subtle-hover: #f3f4f6;
20
26
  --backgrounds-bg-subtle-pressed: #e5e7eb;
@@ -32,15 +38,21 @@
32
38
  --buttons-button-transparent: #ffffff00;
33
39
  --buttons-button-transparent-hover: #f3f4f6;
34
40
  --buttons-button-transparent-pressed: #e5e7eb;
41
+ /* grey.A700 */
35
42
  --foregrounds-fg-base: #030712;
36
43
  --foregrounds-fg-danger: #e11d48;
37
44
  --foregrounds-fg-disabled: #d1d5db;
45
+ /* text.link */
38
46
  --foregrounds-fg-interactive: #3b82f6;
39
47
  --foregrounds-fg-interactive-hover: #2563eb;
48
+ /* text.lighter */
40
49
  --foregrounds-fg-muted: #9ca3af;
50
+ /* primary.contrastText */
41
51
  --foregrounds-fg-on-color: #ffffff;
42
52
  --foregrounds-fg-on-inverted: #ffffff;
43
53
  --foregrounds-fg-subtle: #4b5563;
54
+ /* grey.200 */
55
+ --foregrounds-fg-border: #e0e0e0;
44
56
  --others-spacer: #ffffff00;
45
57
  --shadows-card-hover-1: #03071214;
46
58
  --shadows-card-hover-2: #03071214;
@@ -75,47 +87,72 @@
75
87
  --shadows-switch-handle-7: #03071214;
76
88
  --shadows-tooltip-1: #03071214;
77
89
  --shadows-tooltip-2: #03071214;
90
+ /* grey.100 */
78
91
  --stroke-border-base: #eff1f5;
79
92
  --stroke-border-error: #e11d48;
93
+ /* secondary.main */
80
94
  --stroke-border-interactive: #3b82f6;
81
95
  --stroke-border-loud: #030712;
82
96
  --stroke-border-strong: #d1d5db;
97
+ /* grey.200 */
83
98
  --stroke-sep: #eff1f5;
99
+ /* chip.info.background */
84
100
  --tags-tag-blue-bg: #dbeafe;
85
101
  --tags-tag-blue-bg-hover: #bfdbfe;
102
+ /* chip.info.border */
86
103
  --tags-tag-blue-border: #bfdbfe;
87
104
  --tags-tag-blue-icon: #2563eb;
105
+ /* chip.info.text */
88
106
  --tags-tag-blue-text: #1d4ed8;
107
+ /* chip.success.background */
89
108
  --tags-tag-green-bg: #d1fae5;
90
109
  --tags-tag-green-bg-hover: #a7f3d0;
110
+ /* chip.success.border */
91
111
  --tags-tag-green-border: #a7f3d0;
92
112
  --tags-tag-green-icon: #059669;
113
+ /* chip.success.text */
93
114
  --tags-tag-green-text: #047857;
115
+ /* chip.default.background */
94
116
  --tags-tag-neutral-bg: #f3f4f6;
95
117
  --tags-tag-neutral-bg-hover: #e5e7eb;
118
+ /* chip.default.border */
96
119
  --tags-tag-neutral-border: #e5e7eb;
97
120
  --tags-tag-neutral-icon: #6b7280;
121
+ /* chip.default.text */
98
122
  --tags-tag-neutral-text: #4b5563;
123
+ /* chip.warning.background */
99
124
  --tags-tag-orange-bg: #fef4c7;
100
125
  --tags-tag-orange-bg-hover: #fde68a;
126
+ /* chip.warning.border */
101
127
  --tags-tag-orange-border: #fde68a;
102
128
  --tags-tag-orange-icon: #d97706;
129
+ /* chip.warning.text */
103
130
  --tags-tag-orange-text: #b45309;
131
+ /* chip.secondary.background */
104
132
  --tags-tag-purple-bg: #ede9fe;
105
133
  --tags-tag-purple-bg-hover: #ddd6fe;
134
+ /* chip.secondary.border */
106
135
  --tags-tag-purple-border: #ddd6fe;
107
136
  --tags-tag-purple-icon: #7c3aed;
137
+ /* chip.secondary.text */
108
138
  --tags-tag-purple-text: #6d28d9;
139
+ /* chip.error.background */
109
140
  --tags-tag-red-bg: #ffe4e6;
110
141
  --tags-tag-red-bg-hover: #fecdd3;
142
+ /* chip.error.border */
111
143
  --tags-tag-red-border: #fecdd3;
112
144
  --tags-tag-red-icon: #e11d48;
145
+ /* chip.error.text */
113
146
  --tags-tag-red-text: #be123c;
114
147
  /* Number */
148
+ /* borderRadius: 0.5 */
115
149
  --radius-s: 0.25rem;
150
+ /* borderRadius: 1 */
116
151
  --radius-m: 0.5rem;
152
+ /* borderRadius: 1.5 */
117
153
  --radius-l: 0.75rem;
118
154
  --radius-round: 624.9375rem;
155
+ /* grey.200 */
119
156
  --stroke-button-secondary-border: #e5e7eb;
120
157
  }
121
158
  [data-theme='dark'] {