@graphcommerce/magento-customer 10.0.0-canary.67 → 10.0.0-canary.68
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/CHANGELOG.md +8 -0
- package/components/AccountAddress/AccountAddress.tsx +4 -4
- package/components/AccountAddresses/AccountAddresses.tsx +6 -2
- package/components/AccountDeleteForm/AccountDeleteForm.tsx +14 -4
- package/components/AccountMenu/AccountMenu.tsx +2 -2
- package/components/AccountMenuItem/AccountMenuItem.tsx +19 -16
- package/components/CancelOrder/CancelOrderForm.tsx +12 -19
- package/components/ConfirmCustomer/ConfirmCustomerForm.tsx +1 -5
- package/components/CreditMemo/CreditMemoCard.tsx +6 -6
- package/components/CreditMemo/CreditMemoDetails.tsx +12 -12
- package/components/CreditMemo/CreditMemoItems.tsx +5 -4
- package/components/CreditMemo/CreditMemoTotals.tsx +7 -8
- package/components/EditAddressForm/EditAddressForm.tsx +0 -2
- package/components/ForgotPasswordForm/ForgotPasswordForm.tsx +0 -2
- package/components/Invoice/InvoiceCard.tsx +6 -6
- package/components/Invoice/InvoiceDetails.tsx +12 -12
- package/components/Invoice/InvoiceItems.tsx +5 -4
- package/components/Invoice/InvoiceTotals.tsx +7 -8
- package/components/NoOrdersFound/NoOrdersFound.tsx +2 -5
- package/components/Order/OrderCard/OrderCard.tsx +6 -7
- package/components/Order/OrderDetails/OrderDetails.tsx +9 -12
- package/components/Order/OrderItems/OrderItems.tsx +5 -4
- package/components/Order/OrderStateLabel/OrderStateLabelInline.tsx +12 -13
- package/components/Order/OrderTotals/OrderTotals.tsx +7 -8
- package/components/Shipment/ShipmentCard.tsx +6 -6
- package/components/Shipment/ShipmentDetails.tsx +12 -12
- package/components/Shipment/ShipmentItems.tsx +5 -4
- package/components/SignInForm/SignInForm.tsx +0 -2
- package/components/SignInForm/SignInFormInline.tsx +8 -5
- package/components/SignUpForm/SignUpForm.tsx +2 -2
- package/components/SignUpForm/SignUpFormInline.tsx +3 -1
- package/components/TrackingLink/TrackingLink.tsx +5 -5
- package/package.json +16 -16
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 10.0.0-canary.68
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- [#2557](https://github.com/graphcommerce-org/graphcommerce/pull/2557) [`ceaadd8`](https://github.com/graphcommerce-org/graphcommerce/commit/ceaadd87f0648982a068a3b07b1fa149c9127f49) - ## Material UI v5 → v7 Migration
|
|
8
|
+
|
|
9
|
+
This release upgrades Material UI from v5 to v7 with full CSS variables support. ([@paales](https://github.com/paales))
|
|
10
|
+
|
|
3
11
|
## 10.0.0-canary.67
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { extendableComponent } from '@graphcommerce/next-ui'
|
|
1
|
+
import { extendableComponent, sxx } from '@graphcommerce/next-ui'
|
|
2
2
|
import { Trans } from '@lingui/react/macro'
|
|
3
3
|
import type { SxProps, Theme } from '@mui/material'
|
|
4
4
|
import { Box, Link } from '@mui/material'
|
|
@@ -22,7 +22,7 @@ export function AccountAddress(props: AccountAddressProps) {
|
|
|
22
22
|
return (
|
|
23
23
|
<Box
|
|
24
24
|
className={classes.root}
|
|
25
|
-
sx={
|
|
25
|
+
sx={sxx(
|
|
26
26
|
(theme) => ({
|
|
27
27
|
display: 'flex',
|
|
28
28
|
justifyContent: 'space-between',
|
|
@@ -30,8 +30,8 @@ export function AccountAddress(props: AccountAddressProps) {
|
|
|
30
30
|
paddingBottom: theme.spacings.md,
|
|
31
31
|
typography: 'body2',
|
|
32
32
|
}),
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
sx,
|
|
34
|
+
)}
|
|
35
35
|
>
|
|
36
36
|
<Box className={classes.address} sx={{ '& > span': { display: 'block' } }}>
|
|
37
37
|
<AddressMultiLine id={id} {...addressProps} />
|
|
@@ -35,7 +35,9 @@ export function AccountAddresses(props: AccountAddressesProps) {
|
|
|
35
35
|
>
|
|
36
36
|
<Box
|
|
37
37
|
className={classes.addresses}
|
|
38
|
-
sx={(theme) => ({
|
|
38
|
+
sx={(theme) => ({
|
|
39
|
+
'& > div': { borderBottom: `1px solid ${theme.vars.palette.divider}` },
|
|
40
|
+
})}
|
|
39
41
|
>
|
|
40
42
|
<Skeleton height={128} />
|
|
41
43
|
<Skeleton height={128} />
|
|
@@ -77,7 +79,9 @@ export function AccountAddresses(props: AccountAddressesProps) {
|
|
|
77
79
|
<SectionContainer labelLeft={<Trans>Shipping addresses</Trans>}>
|
|
78
80
|
<Box
|
|
79
81
|
className={classes.addresses}
|
|
80
|
-
sx={(theme) => ({
|
|
82
|
+
sx={(theme) => ({
|
|
83
|
+
'& > div': { borderBottom: `1px solid ${theme.vars.palette.divider}` },
|
|
84
|
+
})}
|
|
81
85
|
>
|
|
82
86
|
{addresses.map((address) => (
|
|
83
87
|
<AccountAddress key={address.id} {...address} />
|
|
@@ -2,8 +2,8 @@ import { CheckboxElement, EmailElement } from '@graphcommerce/ecommerce-ui'
|
|
|
2
2
|
import { useApolloClient, useMutation } from '@graphcommerce/graphql'
|
|
3
3
|
import { Button, FormActions, FormRow } from '@graphcommerce/next-ui'
|
|
4
4
|
import { useForm } from '@graphcommerce/react-hook-form'
|
|
5
|
-
import { Trans } from '@lingui/react/macro'
|
|
6
5
|
import { t } from '@lingui/core/macro'
|
|
6
|
+
import { Trans } from '@lingui/react/macro'
|
|
7
7
|
import { Box, Typography } from '@mui/material'
|
|
8
8
|
import { useRouter } from 'next/router'
|
|
9
9
|
import { CustomerDocument, CustomerTokenDocument, useCustomerQuery } from '../../hooks'
|
|
@@ -50,10 +50,20 @@ export function AccountDeleteForm() {
|
|
|
50
50
|
{!called || error || loading ? (
|
|
51
51
|
<WaitForCustomer waitFor={dashboard}>
|
|
52
52
|
<Box component='form' onSubmit={submitHandler} noValidate>
|
|
53
|
-
<Typography
|
|
53
|
+
<Typography
|
|
54
|
+
variant='h6'
|
|
55
|
+
sx={{
|
|
56
|
+
textAlign: 'center',
|
|
57
|
+
}}
|
|
58
|
+
>
|
|
54
59
|
<Trans>Are you sure you want to delete your account?</Trans>
|
|
55
60
|
</Typography>
|
|
56
|
-
<Typography
|
|
61
|
+
<Typography
|
|
62
|
+
variant='body1'
|
|
63
|
+
sx={{
|
|
64
|
+
textAlign: 'center',
|
|
65
|
+
}}
|
|
66
|
+
>
|
|
57
67
|
<Trans>
|
|
58
68
|
Doing so will remove all your data including order history and saved shipping /
|
|
59
69
|
billing addresses.
|
|
@@ -91,7 +101,7 @@ export function AccountDeleteForm() {
|
|
|
91
101
|
</WaitForCustomer>
|
|
92
102
|
) : (
|
|
93
103
|
<>
|
|
94
|
-
<Typography variant='h6' textAlign
|
|
104
|
+
<Typography variant='h6' sx={{ textAlign: 'center' }}>
|
|
95
105
|
<Trans>Account deletion successful</Trans>
|
|
96
106
|
</Typography>
|
|
97
107
|
<FormActions>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { extendableComponent } from '@graphcommerce/next-ui'
|
|
1
|
+
import { extendableComponent, sxx } from '@graphcommerce/next-ui'
|
|
2
2
|
import type { SxProps, Theme } from '@mui/material'
|
|
3
3
|
import { List } from '@mui/material'
|
|
4
4
|
import React from 'react'
|
|
@@ -14,7 +14,7 @@ export function AccountMenu(props: AccountMenuProps) {
|
|
|
14
14
|
<List
|
|
15
15
|
classes={classes}
|
|
16
16
|
disablePadding
|
|
17
|
-
sx={
|
|
17
|
+
sx={sxx((theme) => ({ marginBottom: theme.spacings.lg }), sx)}
|
|
18
18
|
>
|
|
19
19
|
{children}
|
|
20
20
|
</List>
|
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
iconChevronRight,
|
|
7
7
|
IconSvg,
|
|
8
8
|
responsiveVal,
|
|
9
|
+
sxx,
|
|
9
10
|
} from '@graphcommerce/next-ui'
|
|
10
11
|
import type { SxProps, Theme } from '@mui/material'
|
|
11
12
|
import { ListItem, ListItemIcon, ListItemText } from '@mui/material'
|
|
@@ -44,30 +45,29 @@ export function AccountMenuItem(props: AccountMenuItemProps) {
|
|
|
44
45
|
href={href}
|
|
45
46
|
disabled={disabled}
|
|
46
47
|
className={classes.root}
|
|
47
|
-
sx={
|
|
48
|
+
sx={sxx(
|
|
48
49
|
(theme) => ({
|
|
49
50
|
width: '100%',
|
|
50
51
|
height: responsiveVal(88, 104),
|
|
51
52
|
padding: 0,
|
|
52
53
|
borderRadius: 0,
|
|
53
|
-
background: theme.palette.background.paper,
|
|
54
|
+
background: theme.vars.palette.background.paper,
|
|
54
55
|
'&:hover': {
|
|
55
|
-
background: theme.palette.background.default,
|
|
56
|
+
background: theme.vars.palette.background.default,
|
|
56
57
|
},
|
|
57
58
|
'&:disabled': {
|
|
58
|
-
background: theme.palette.background.default,
|
|
59
|
+
background: theme.vars.palette.background.default,
|
|
59
60
|
},
|
|
60
61
|
'&:focus': {
|
|
61
62
|
// fix: disableElevation does not work when button is focused
|
|
62
63
|
boxShadow: 'none',
|
|
63
64
|
},
|
|
64
|
-
|
|
65
65
|
'&:not(.noBorderBottom)': {
|
|
66
|
-
borderBottom: `1px solid ${theme.palette.divider}`,
|
|
66
|
+
borderBottom: `1px solid ${theme.vars.palette.divider}`,
|
|
67
67
|
},
|
|
68
68
|
}),
|
|
69
|
-
|
|
70
|
-
|
|
69
|
+
sx,
|
|
70
|
+
)}
|
|
71
71
|
{...buttonProps}
|
|
72
72
|
>
|
|
73
73
|
<ListItem disableGutters>
|
|
@@ -80,16 +80,19 @@ export function AccountMenuItem(props: AccountMenuItemProps) {
|
|
|
80
80
|
<IconSvg src={iconSrc} size='large' />
|
|
81
81
|
</ListItemIcon>
|
|
82
82
|
<ListItemText
|
|
83
|
-
primaryTypographyProps={{ sx: { typography: 'subtitle1' } }}
|
|
84
|
-
secondaryTypographyProps={{
|
|
85
|
-
sx: {
|
|
86
|
-
whiteSpace: 'nowrap',
|
|
87
|
-
overflow: 'hidden',
|
|
88
|
-
textOverflow: 'elipsis',
|
|
89
|
-
},
|
|
90
|
-
}}
|
|
91
83
|
primary={title}
|
|
92
84
|
secondary={subtitle}
|
|
85
|
+
slotProps={{
|
|
86
|
+
primary: { sx: { typography: 'subtitle1' } },
|
|
87
|
+
|
|
88
|
+
secondary: {
|
|
89
|
+
sx: {
|
|
90
|
+
whiteSpace: 'nowrap',
|
|
91
|
+
overflow: 'hidden',
|
|
92
|
+
textOverflow: 'elipsis',
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
|
+
}}
|
|
93
96
|
/>
|
|
94
97
|
{endIcon ?? <IconSvg src={iconChevronRight} />}
|
|
95
98
|
</ListItem>
|
|
@@ -8,6 +8,7 @@ import {
|
|
|
8
8
|
FormRow,
|
|
9
9
|
iconChevronDown,
|
|
10
10
|
IconSvg,
|
|
11
|
+
sxx,
|
|
11
12
|
} from '@graphcommerce/next-ui'
|
|
12
13
|
import { useFormGqlMutation } from '@graphcommerce/react-hook-form'
|
|
13
14
|
import { Trans } from '@lingui/react/macro'
|
|
@@ -52,10 +53,9 @@ export function CancelOrderForm(props: CancelOrderFormProps) {
|
|
|
52
53
|
<Trans>Order has successfully been canceled</Trans>
|
|
53
54
|
</Alert>
|
|
54
55
|
)
|
|
55
|
-
|
|
56
56
|
return (
|
|
57
57
|
<Accordion
|
|
58
|
-
sx={
|
|
58
|
+
sx={sxx(
|
|
59
59
|
(theme) => ({
|
|
60
60
|
mb: theme.spacings.xxl,
|
|
61
61
|
...breakpointVal(
|
|
@@ -69,22 +69,20 @@ export function CancelOrderForm(props: CancelOrderFormProps) {
|
|
|
69
69
|
mb: theme.spacings.xxl,
|
|
70
70
|
},
|
|
71
71
|
}),
|
|
72
|
-
|
|
73
|
-
|
|
72
|
+
sx,
|
|
73
|
+
)}
|
|
74
74
|
{...rest}
|
|
75
75
|
>
|
|
76
76
|
<AccordionSummary
|
|
77
77
|
expandIcon={<IconSvg src={iconChevronDown} />}
|
|
78
|
-
sx={
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
}),
|
|
87
|
-
]}
|
|
78
|
+
sx={(theme) => ({
|
|
79
|
+
px: theme.spacings.xs,
|
|
80
|
+
'& .MuiAccordionSummary-content': {
|
|
81
|
+
alignItems: 'center',
|
|
82
|
+
columnGap: 2,
|
|
83
|
+
justifyContent: 'space-between',
|
|
84
|
+
},
|
|
85
|
+
})}
|
|
88
86
|
>
|
|
89
87
|
<Trans>Cancel order</Trans>
|
|
90
88
|
</AccordionSummary>
|
|
@@ -103,7 +101,6 @@ export function CancelOrderForm(props: CancelOrderFormProps) {
|
|
|
103
101
|
}))}
|
|
104
102
|
/>
|
|
105
103
|
</FormRow>
|
|
106
|
-
|
|
107
104
|
<CheckboxElement
|
|
108
105
|
required
|
|
109
106
|
control={control}
|
|
@@ -113,19 +110,15 @@ export function CancelOrderForm(props: CancelOrderFormProps) {
|
|
|
113
110
|
<Trans>I understand that my order will be canceled and this can not be undone.</Trans>
|
|
114
111
|
}
|
|
115
112
|
/>
|
|
116
|
-
|
|
117
113
|
{submittedWithoutErrors && (
|
|
118
114
|
<Alert>
|
|
119
115
|
<Trans>Order has successfully been canceled</Trans>
|
|
120
116
|
</Alert>
|
|
121
117
|
)}
|
|
122
|
-
|
|
123
118
|
{cancelOrderData?.cancelOrder?.error && (
|
|
124
119
|
<Alert severity='error'>{cancelOrderData?.cancelOrder?.error}</Alert>
|
|
125
120
|
)}
|
|
126
|
-
|
|
127
121
|
<ApolloErrorSnackbar error={error} />
|
|
128
|
-
|
|
129
122
|
<FormRow
|
|
130
123
|
sx={(theme) => ({
|
|
131
124
|
justifyContent: 'center',
|
|
@@ -37,7 +37,6 @@ export function ConfirmCustomerForm() {
|
|
|
37
37
|
<LayoutTitle icon={iconPerson}>
|
|
38
38
|
<Trans>Account confirmation</Trans>
|
|
39
39
|
</LayoutTitle>
|
|
40
|
-
|
|
41
40
|
{!key && (
|
|
42
41
|
<Alert severity='error' sx={(theme) => ({ my: theme.spacings.xxs })}>
|
|
43
42
|
<Trans>You can only confirm you account by clicking on the link in your email.</Trans>
|
|
@@ -45,10 +44,9 @@ export function ConfirmCustomerForm() {
|
|
|
45
44
|
)}
|
|
46
45
|
{key && (
|
|
47
46
|
<>
|
|
48
|
-
<Typography variant='h6' textAlign
|
|
47
|
+
<Typography variant='h6' sx={{ textAlign: 'center' }}>
|
|
49
48
|
<Trans>Fill in your email to confirm registration</Trans>
|
|
50
49
|
</Typography>
|
|
51
|
-
|
|
52
50
|
<FormRow>
|
|
53
51
|
<EmailElement
|
|
54
52
|
variant='outlined'
|
|
@@ -59,7 +57,6 @@ export function ConfirmCustomerForm() {
|
|
|
59
57
|
disabled={isSubmitSuccessful}
|
|
60
58
|
/>
|
|
61
59
|
</FormRow>
|
|
62
|
-
|
|
63
60
|
<FormRow sx={{ justifyItems: 'center' }}>
|
|
64
61
|
<Button
|
|
65
62
|
type='submit'
|
|
@@ -72,7 +69,6 @@ export function ConfirmCustomerForm() {
|
|
|
72
69
|
<Trans>Confirm registration</Trans>
|
|
73
70
|
</Button>
|
|
74
71
|
</FormRow>
|
|
75
|
-
|
|
76
72
|
<ApolloCustomerErrorAlert
|
|
77
73
|
sx={(theme) => ({ my: theme.spacings.xxs })}
|
|
78
74
|
error={error}
|
|
@@ -2,7 +2,7 @@ import { Money } from '@graphcommerce/magento-store'
|
|
|
2
2
|
import { breakpointVal, iconChevronRight, IconSvg, NextLink, sxx } from '@graphcommerce/next-ui'
|
|
3
3
|
import { Trans } from '@lingui/react/macro'
|
|
4
4
|
import type { SxProps, Theme } from '@mui/material'
|
|
5
|
-
import { Box
|
|
5
|
+
import { Box } from '@mui/material'
|
|
6
6
|
import type { CreditMemoCardFragment } from './CreditMemoCard.gql'
|
|
7
7
|
|
|
8
8
|
export type CreditMemoCardProps = {
|
|
@@ -26,10 +26,10 @@ export function CreditMemoCard(props: CreditMemoCardProps) {
|
|
|
26
26
|
px: theme.spacings.xxs,
|
|
27
27
|
py: theme.spacings.xxs,
|
|
28
28
|
gap: theme.spacings.sm,
|
|
29
|
-
background:
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
29
|
+
background: theme.vars.palette.background.default,
|
|
30
|
+
...theme.applyStyles('dark', {
|
|
31
|
+
background: theme.lighten(theme.vars.palette.background.default, 0.15),
|
|
32
|
+
}),
|
|
33
33
|
...breakpointVal(
|
|
34
34
|
'borderRadius',
|
|
35
35
|
theme.shape.borderRadius * 2,
|
|
@@ -37,7 +37,7 @@ export function CreditMemoCard(props: CreditMemoCardProps) {
|
|
|
37
37
|
theme.breakpoints.values,
|
|
38
38
|
),
|
|
39
39
|
'&:hover': {
|
|
40
|
-
backgroundColor: theme.palette.action.hover,
|
|
40
|
+
backgroundColor: theme.vars.palette.action.hover,
|
|
41
41
|
},
|
|
42
42
|
display: 'grid',
|
|
43
43
|
gridTemplate: `
|
|
@@ -3,10 +3,11 @@ import {
|
|
|
3
3
|
DateTimeFormat,
|
|
4
4
|
extendableComponent,
|
|
5
5
|
SectionContainer,
|
|
6
|
+
sxx,
|
|
6
7
|
} from '@graphcommerce/next-ui'
|
|
7
8
|
import { Trans } from '@lingui/react/macro'
|
|
8
9
|
import type { SxProps, Theme } from '@mui/material'
|
|
9
|
-
import { Box,
|
|
10
|
+
import { Box, Typography } from '@mui/material'
|
|
10
11
|
import type { CreditMemoFragment } from './CreditMemo.gql'
|
|
11
12
|
|
|
12
13
|
export type CreditMemoDetailsProps = {
|
|
@@ -30,14 +31,11 @@ export function CreditMemoDetails(props: CreditMemoDetailsProps) {
|
|
|
30
31
|
return (
|
|
31
32
|
<SectionContainer
|
|
32
33
|
labelLeft={<Trans>Credit Memo details</Trans>}
|
|
33
|
-
sx={
|
|
34
|
+
sx={sxx(
|
|
34
35
|
(theme) => ({
|
|
35
36
|
padding: theme.spacings.sm,
|
|
36
37
|
marginBottom: theme.spacings.md,
|
|
37
|
-
background:
|
|
38
|
-
theme.palette.mode === 'light'
|
|
39
|
-
? theme.palette.background.default
|
|
40
|
-
: lighten(theme.palette.background.default, 0.15),
|
|
38
|
+
background: theme.lighten(theme.vars.palette.background.default, 0.15),
|
|
41
39
|
...breakpointVal(
|
|
42
40
|
'borderRadius',
|
|
43
41
|
theme.shape.borderRadius * 2,
|
|
@@ -48,13 +46,16 @@ export function CreditMemoDetails(props: CreditMemoDetailsProps) {
|
|
|
48
46
|
mt: 0,
|
|
49
47
|
mb: theme.spacings.xs,
|
|
50
48
|
},
|
|
49
|
+
...theme.applyStyles('light', {
|
|
50
|
+
background: theme.vars.palette.background.default,
|
|
51
|
+
}),
|
|
51
52
|
}),
|
|
52
|
-
|
|
53
|
-
|
|
53
|
+
sx,
|
|
54
|
+
)}
|
|
54
55
|
>
|
|
55
56
|
<Box
|
|
56
57
|
className={classes.creditMemoDetailContainer}
|
|
57
|
-
sx={
|
|
58
|
+
sx={sxx(
|
|
58
59
|
(theme) => ({
|
|
59
60
|
gridColumnGap: theme.spacings.xxl,
|
|
60
61
|
gridRowGap: theme.spacings.md,
|
|
@@ -64,8 +65,8 @@ export function CreditMemoDetails(props: CreditMemoDetailsProps) {
|
|
|
64
65
|
marginTop: theme.spacings.xxs,
|
|
65
66
|
},
|
|
66
67
|
}),
|
|
67
|
-
|
|
68
|
-
|
|
68
|
+
sx,
|
|
69
|
+
)}
|
|
69
70
|
>
|
|
70
71
|
<Box className={classes.creditMemoDetailRow}>
|
|
71
72
|
<SectionContainer
|
|
@@ -77,7 +78,6 @@ export function CreditMemoDetails(props: CreditMemoDetailsProps) {
|
|
|
77
78
|
<Typography>{number}</Typography>
|
|
78
79
|
</SectionContainer>
|
|
79
80
|
</Box>
|
|
80
|
-
|
|
81
81
|
<Box className={classes.creditMemoDetailRow}>
|
|
82
82
|
{/* <SectionContainer
|
|
83
83
|
variantLeft='h5'
|
|
@@ -4,6 +4,7 @@ import {
|
|
|
4
4
|
extendableComponent,
|
|
5
5
|
nonNullable,
|
|
6
6
|
SectionContainer,
|
|
7
|
+
sxx,
|
|
7
8
|
} from '@graphcommerce/next-ui'
|
|
8
9
|
import { Trans } from '@lingui/react/macro'
|
|
9
10
|
import type { SxProps, Theme } from '@mui/material'
|
|
@@ -31,11 +32,11 @@ export function CreditMemoItems(props: CreditMemoItemsProps) {
|
|
|
31
32
|
return (
|
|
32
33
|
<Box
|
|
33
34
|
className={classes.root}
|
|
34
|
-
sx={
|
|
35
|
+
sx={sxx(
|
|
35
36
|
(theme) => ({
|
|
36
37
|
my: theme.spacings.md,
|
|
37
38
|
padding: `${theme.spacings.sm} ${theme.spacings.sm}`,
|
|
38
|
-
border: `1px ${theme.palette.divider} solid`,
|
|
39
|
+
border: `1px ${theme.vars.palette.divider} solid`,
|
|
39
40
|
...breakpointVal(
|
|
40
41
|
'borderRadius',
|
|
41
42
|
theme.shape.borderRadius * 2,
|
|
@@ -43,8 +44,8 @@ export function CreditMemoItems(props: CreditMemoItemsProps) {
|
|
|
43
44
|
theme.breakpoints.values,
|
|
44
45
|
),
|
|
45
46
|
}),
|
|
46
|
-
|
|
47
|
-
|
|
47
|
+
sx,
|
|
48
|
+
)}
|
|
48
49
|
>
|
|
49
50
|
<SectionContainer
|
|
50
51
|
sx={{ '& .SectionHeader-root': { mt: 0 } }}
|
|
@@ -2,7 +2,7 @@ import { Money } from '@graphcommerce/magento-store'
|
|
|
2
2
|
import { breakpointVal, extendableComponent, sxx } from '@graphcommerce/next-ui'
|
|
3
3
|
import { Trans } from '@lingui/react/macro'
|
|
4
4
|
import type { SxProps, Theme } from '@mui/material'
|
|
5
|
-
import { Box, Divider,
|
|
5
|
+
import { Box, Divider, Typography } from '@mui/material'
|
|
6
6
|
import type { CreditMemoFragment } from './CreditMemo.gql'
|
|
7
7
|
|
|
8
8
|
export type CreditMemoTotalsProps = {
|
|
@@ -32,10 +32,10 @@ export function CreditMemoTotals(props: CreditMemoTotalsProps) {
|
|
|
32
32
|
theme.shape.borderRadius * 5,
|
|
33
33
|
theme.breakpoints.values,
|
|
34
34
|
),
|
|
35
|
-
background:
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
35
|
+
background: theme.vars.palette.background.default,
|
|
36
|
+
...theme.applyStyles('dark', {
|
|
37
|
+
background: theme.lighten(theme.vars.palette.background.default, 0.15),
|
|
38
|
+
}),
|
|
39
39
|
padding: `${theme.spacings.xs} ${theme.spacings.sm}`,
|
|
40
40
|
}),
|
|
41
41
|
sx,
|
|
@@ -86,13 +86,12 @@ export function CreditMemoTotals(props: CreditMemoTotalsProps) {
|
|
|
86
86
|
)}
|
|
87
87
|
|
|
88
88
|
<Divider sx={(theme) => ({ my: theme.spacings.xxs })} />
|
|
89
|
-
|
|
90
89
|
<Box
|
|
91
90
|
className={classes.totalsRow}
|
|
92
91
|
sx={(theme) => ({
|
|
93
92
|
display: 'flex',
|
|
94
93
|
justifyContent: 'space-between',
|
|
95
|
-
color: theme.palette.primary.main,
|
|
94
|
+
color: theme.vars.palette.primary.main,
|
|
96
95
|
})}
|
|
97
96
|
>
|
|
98
97
|
<Typography>
|
|
@@ -108,7 +107,7 @@ export function CreditMemoTotals(props: CreditMemoTotalsProps) {
|
|
|
108
107
|
sx={(theme) => ({
|
|
109
108
|
display: 'flex',
|
|
110
109
|
justifyContent: 'space-between',
|
|
111
|
-
color: theme.palette.text.disabled,
|
|
110
|
+
color: theme.vars.palette.text.disabled,
|
|
112
111
|
})}
|
|
113
112
|
>
|
|
114
113
|
<Typography>
|
|
@@ -99,7 +99,6 @@ export function EditAddressForm(props: EditAddressFormProps) {
|
|
|
99
99
|
showValid
|
|
100
100
|
/>
|
|
101
101
|
</FormRow>
|
|
102
|
-
|
|
103
102
|
{billingAddressReadonly && address?.default_billing ? (
|
|
104
103
|
<Trans>
|
|
105
104
|
You can not change this address as it is your billing address. Not correct? Please
|
|
@@ -119,7 +118,6 @@ export function EditAddressForm(props: EditAddressFormProps) {
|
|
|
119
118
|
</FormActions>
|
|
120
119
|
)}
|
|
121
120
|
</Form>
|
|
122
|
-
|
|
123
121
|
<ApolloErrorSnackbar error={error} />
|
|
124
122
|
</>
|
|
125
123
|
)
|
|
@@ -2,7 +2,7 @@ import { Money } from '@graphcommerce/magento-store'
|
|
|
2
2
|
import { breakpointVal, iconChevronRight, IconSvg, NextLink, sxx } from '@graphcommerce/next-ui'
|
|
3
3
|
import { Trans } from '@lingui/react/macro'
|
|
4
4
|
import type { SxProps, Theme } from '@mui/material'
|
|
5
|
-
import { Box
|
|
5
|
+
import { Box } from '@mui/material'
|
|
6
6
|
import type { InvoiceCardFragment } from './InvoiceCard.gql'
|
|
7
7
|
|
|
8
8
|
export type InvoiceCardProps = {
|
|
@@ -26,10 +26,10 @@ export function InvoiceCard(props: InvoiceCardProps) {
|
|
|
26
26
|
px: theme.spacings.xxs,
|
|
27
27
|
py: theme.spacings.xxs,
|
|
28
28
|
gap: theme.spacings.sm,
|
|
29
|
-
background:
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
29
|
+
background: theme.vars.palette.background.default,
|
|
30
|
+
...theme.applyStyles('dark', {
|
|
31
|
+
background: theme.lighten(theme.vars.palette.background.default, 0.15),
|
|
32
|
+
}),
|
|
33
33
|
...breakpointVal(
|
|
34
34
|
'borderRadius',
|
|
35
35
|
theme.shape.borderRadius * 2,
|
|
@@ -37,7 +37,7 @@ export function InvoiceCard(props: InvoiceCardProps) {
|
|
|
37
37
|
theme.breakpoints.values,
|
|
38
38
|
),
|
|
39
39
|
'&:hover': {
|
|
40
|
-
backgroundColor: theme.palette.action.hover,
|
|
40
|
+
backgroundColor: theme.vars.palette.action.hover,
|
|
41
41
|
},
|
|
42
42
|
display: 'grid',
|
|
43
43
|
gridTemplate: `
|
|
@@ -3,10 +3,11 @@ import {
|
|
|
3
3
|
DateTimeFormat,
|
|
4
4
|
extendableComponent,
|
|
5
5
|
SectionContainer,
|
|
6
|
+
sxx,
|
|
6
7
|
} from '@graphcommerce/next-ui'
|
|
7
8
|
import { Trans } from '@lingui/react/macro'
|
|
8
9
|
import type { SxProps, Theme } from '@mui/material'
|
|
9
|
-
import { Box,
|
|
10
|
+
import { Box, Typography } from '@mui/material'
|
|
10
11
|
import type { InvoiceFragment } from './Invoice.gql'
|
|
11
12
|
|
|
12
13
|
export type InvoiceDetailsProps = {
|
|
@@ -30,14 +31,11 @@ export function InvoiceDetails(props: InvoiceDetailsProps) {
|
|
|
30
31
|
return (
|
|
31
32
|
<SectionContainer
|
|
32
33
|
labelLeft={<Trans>Invoice details</Trans>}
|
|
33
|
-
sx={
|
|
34
|
+
sx={sxx(
|
|
34
35
|
(theme) => ({
|
|
35
36
|
padding: theme.spacings.sm,
|
|
36
37
|
marginBottom: theme.spacings.md,
|
|
37
|
-
background:
|
|
38
|
-
theme.palette.mode === 'light'
|
|
39
|
-
? theme.palette.background.default
|
|
40
|
-
: lighten(theme.palette.background.default, 0.15),
|
|
38
|
+
background: theme.lighten(theme.vars.palette.background.default, 0.15),
|
|
41
39
|
...breakpointVal(
|
|
42
40
|
'borderRadius',
|
|
43
41
|
theme.shape.borderRadius * 2,
|
|
@@ -48,13 +46,16 @@ export function InvoiceDetails(props: InvoiceDetailsProps) {
|
|
|
48
46
|
mt: 0,
|
|
49
47
|
mb: theme.spacings.xs,
|
|
50
48
|
},
|
|
49
|
+
...theme.applyStyles('light', {
|
|
50
|
+
background: theme.vars.palette.background.default,
|
|
51
|
+
}),
|
|
51
52
|
}),
|
|
52
|
-
|
|
53
|
-
|
|
53
|
+
sx,
|
|
54
|
+
)}
|
|
54
55
|
>
|
|
55
56
|
<Box
|
|
56
57
|
className={classes.invoiceDetailContainer}
|
|
57
|
-
sx={
|
|
58
|
+
sx={sxx(
|
|
58
59
|
(theme) => ({
|
|
59
60
|
gridColumnGap: theme.spacings.xxl,
|
|
60
61
|
gridRowGap: theme.spacings.md,
|
|
@@ -64,8 +65,8 @@ export function InvoiceDetails(props: InvoiceDetailsProps) {
|
|
|
64
65
|
marginTop: theme.spacings.xxs,
|
|
65
66
|
},
|
|
66
67
|
}),
|
|
67
|
-
|
|
68
|
-
|
|
68
|
+
sx,
|
|
69
|
+
)}
|
|
69
70
|
>
|
|
70
71
|
<Box className={classes.invoiceDetailRow}>
|
|
71
72
|
<SectionContainer
|
|
@@ -77,7 +78,6 @@ export function InvoiceDetails(props: InvoiceDetailsProps) {
|
|
|
77
78
|
<Typography>{number}</Typography>
|
|
78
79
|
</SectionContainer>
|
|
79
80
|
</Box>
|
|
80
|
-
|
|
81
81
|
<Box className={classes.invoiceDetailRow}>
|
|
82
82
|
{/* <SectionContainer
|
|
83
83
|
variantLeft='h5'
|
|
@@ -4,6 +4,7 @@ import {
|
|
|
4
4
|
extendableComponent,
|
|
5
5
|
nonNullable,
|
|
6
6
|
SectionContainer,
|
|
7
|
+
sxx,
|
|
7
8
|
} from '@graphcommerce/next-ui'
|
|
8
9
|
import { Trans } from '@lingui/react/macro'
|
|
9
10
|
import type { SxProps, Theme } from '@mui/material'
|
|
@@ -31,11 +32,11 @@ export function InvoiceItems(props: InvoiceItemsProps) {
|
|
|
31
32
|
return (
|
|
32
33
|
<Box
|
|
33
34
|
className={classes.root}
|
|
34
|
-
sx={
|
|
35
|
+
sx={sxx(
|
|
35
36
|
(theme) => ({
|
|
36
37
|
my: theme.spacings.md,
|
|
37
38
|
padding: `${theme.spacings.sm} ${theme.spacings.sm}`,
|
|
38
|
-
border: `1px ${theme.palette.divider} solid`,
|
|
39
|
+
border: `1px ${theme.vars.palette.divider} solid`,
|
|
39
40
|
...breakpointVal(
|
|
40
41
|
'borderRadius',
|
|
41
42
|
theme.shape.borderRadius * 2,
|
|
@@ -43,8 +44,8 @@ export function InvoiceItems(props: InvoiceItemsProps) {
|
|
|
43
44
|
theme.breakpoints.values,
|
|
44
45
|
),
|
|
45
46
|
}),
|
|
46
|
-
|
|
47
|
-
|
|
47
|
+
sx,
|
|
48
|
+
)}
|
|
48
49
|
>
|
|
49
50
|
<SectionContainer
|
|
50
51
|
sx={{ '& .SectionHeader-root': { mt: 0 } }}
|
|
@@ -2,7 +2,7 @@ import { Money } from '@graphcommerce/magento-store'
|
|
|
2
2
|
import { breakpointVal, extendableComponent, sxx } from '@graphcommerce/next-ui'
|
|
3
3
|
import { Trans } from '@lingui/react/macro'
|
|
4
4
|
import type { SxProps, Theme } from '@mui/material'
|
|
5
|
-
import { Box, Divider,
|
|
5
|
+
import { Box, Divider, Typography } from '@mui/material'
|
|
6
6
|
import type { InvoiceFragment } from './Invoice.gql'
|
|
7
7
|
|
|
8
8
|
export type InvoiceTotalsProps = {
|
|
@@ -32,10 +32,10 @@ export function InvoiceTotals(props: InvoiceTotalsProps) {
|
|
|
32
32
|
theme.shape.borderRadius * 5,
|
|
33
33
|
theme.breakpoints.values,
|
|
34
34
|
),
|
|
35
|
-
background:
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
35
|
+
background: theme.vars.palette.background.default,
|
|
36
|
+
...theme.applyStyles('dark', {
|
|
37
|
+
background: theme.lighten(theme.vars.palette.background.default, 0.15),
|
|
38
|
+
}),
|
|
39
39
|
padding: `${theme.spacings.xs} ${theme.spacings.sm}`,
|
|
40
40
|
}),
|
|
41
41
|
sx,
|
|
@@ -74,13 +74,12 @@ export function InvoiceTotals(props: InvoiceTotalsProps) {
|
|
|
74
74
|
)}
|
|
75
75
|
|
|
76
76
|
<Divider sx={(theme) => ({ my: theme.spacings.xxs })} />
|
|
77
|
-
|
|
78
77
|
<Box
|
|
79
78
|
className={classes.totalsRow}
|
|
80
79
|
sx={(theme) => ({
|
|
81
80
|
display: 'flex',
|
|
82
81
|
justifyContent: 'space-between',
|
|
83
|
-
color: theme.palette.primary.main,
|
|
82
|
+
color: theme.vars.palette.primary.main,
|
|
84
83
|
})}
|
|
85
84
|
>
|
|
86
85
|
<Typography>
|
|
@@ -96,7 +95,7 @@ export function InvoiceTotals(props: InvoiceTotalsProps) {
|
|
|
96
95
|
sx={(theme) => ({
|
|
97
96
|
display: 'flex',
|
|
98
97
|
justifyContent: 'space-between',
|
|
99
|
-
color: theme.palette.text.disabled,
|
|
98
|
+
color: theme.vars.palette.text.disabled,
|
|
100
99
|
})}
|
|
101
100
|
>
|
|
102
101
|
<Typography>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { extendableComponent, iconBox, IconHeader } from '@graphcommerce/next-ui'
|
|
1
|
+
import { extendableComponent, iconBox, IconHeader, sxx } from '@graphcommerce/next-ui'
|
|
2
2
|
import { Trans } from '@lingui/react/macro'
|
|
3
3
|
import type { SxProps, Theme } from '@mui/material'
|
|
4
4
|
import { Box } from '@mui/material'
|
|
@@ -11,10 +11,7 @@ export type NoOrdersFoundProps = { sx?: SxProps<Theme> }
|
|
|
11
11
|
export function NoOrdersFound(props: NoOrdersFoundProps) {
|
|
12
12
|
const { sx = [] } = props
|
|
13
13
|
return (
|
|
14
|
-
<Box
|
|
15
|
-
className={classes.root}
|
|
16
|
-
sx={[(theme) => ({ marginTop: theme.spacings.sm }), ...(Array.isArray(sx) ? sx : [sx])]}
|
|
17
|
-
>
|
|
14
|
+
<Box className={classes.root} sx={sxx((theme) => ({ marginTop: theme.spacings.sm }), sx)}>
|
|
18
15
|
<IconHeader src={iconBox} size='small'>
|
|
19
16
|
<Trans>No orders found</Trans>
|
|
20
17
|
</IconHeader>
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
} from '@graphcommerce/next-ui'
|
|
13
13
|
import { Trans } from '@lingui/react/macro'
|
|
14
14
|
import type { SxProps, Theme } from '@mui/material'
|
|
15
|
-
import { Avatar, Box,
|
|
15
|
+
import { Avatar, Box, Paper, Skeleton } from '@mui/material'
|
|
16
16
|
import { OrderStateLabel } from '../OrderStateLabel/OrderStateLabel'
|
|
17
17
|
import type { OrderCardFragment } from './OrderCard.gql'
|
|
18
18
|
|
|
@@ -55,7 +55,6 @@ export function OrderCard(props: OrderCardProps) {
|
|
|
55
55
|
</Box>
|
|
56
56
|
)
|
|
57
57
|
}
|
|
58
|
-
|
|
59
58
|
return (
|
|
60
59
|
<Box
|
|
61
60
|
component={NextLink}
|
|
@@ -69,10 +68,10 @@ export function OrderCard(props: OrderCardProps) {
|
|
|
69
68
|
py: theme.spacings.xxs,
|
|
70
69
|
gap: theme.spacings.sm,
|
|
71
70
|
alignItems: 'flex-start',
|
|
72
|
-
background:
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
71
|
+
background: theme.vars.palette.background.default,
|
|
72
|
+
...theme.applyStyles('dark', {
|
|
73
|
+
background: theme.lighten(theme.vars.palette.background.default, 0.15),
|
|
74
|
+
}),
|
|
76
75
|
...breakpointVal(
|
|
77
76
|
'borderRadius',
|
|
78
77
|
theme.shape.borderRadius * 2,
|
|
@@ -80,7 +79,7 @@ export function OrderCard(props: OrderCardProps) {
|
|
|
80
79
|
theme.breakpoints.values,
|
|
81
80
|
),
|
|
82
81
|
'&:hover': {
|
|
83
|
-
backgroundColor: theme.palette.action.hover,
|
|
82
|
+
backgroundColor: theme.vars.palette.action.hover,
|
|
84
83
|
},
|
|
85
84
|
}),
|
|
86
85
|
sx,
|
|
@@ -3,10 +3,11 @@ import {
|
|
|
3
3
|
DateTimeFormat,
|
|
4
4
|
extendableComponent,
|
|
5
5
|
SectionContainer,
|
|
6
|
+
sxx,
|
|
6
7
|
} from '@graphcommerce/next-ui'
|
|
7
8
|
import { Trans } from '@lingui/react/macro'
|
|
8
9
|
import type { SxProps, Theme } from '@mui/material'
|
|
9
|
-
import { Box,
|
|
10
|
+
import { Box, Typography } from '@mui/material'
|
|
10
11
|
import { AddressMultiLine } from '../../AddressMultiLine/AddressMultiLine'
|
|
11
12
|
import { TrackingLink } from '../../TrackingLink/TrackingLink'
|
|
12
13
|
import type { OrderDetailsFragment } from './OrderDetails.gql'
|
|
@@ -41,7 +42,7 @@ export function OrderDetails(props: OrderDetailsProps) {
|
|
|
41
42
|
|
|
42
43
|
return (
|
|
43
44
|
<Box
|
|
44
|
-
sx={
|
|
45
|
+
sx={sxx(
|
|
45
46
|
(theme) => ({
|
|
46
47
|
margin: `${theme.spacings.sm} 0`,
|
|
47
48
|
'& > div:last-of-type': {
|
|
@@ -60,8 +61,8 @@ export function OrderDetails(props: OrderDetailsProps) {
|
|
|
60
61
|
),
|
|
61
62
|
},
|
|
62
63
|
}),
|
|
63
|
-
|
|
64
|
-
|
|
64
|
+
sx,
|
|
65
|
+
)}
|
|
65
66
|
>
|
|
66
67
|
<Box
|
|
67
68
|
className={classes.orderDetailContainer}
|
|
@@ -78,10 +79,7 @@ export function OrderDetails(props: OrderDetailsProps) {
|
|
|
78
79
|
theme.shape.borderRadius * 3,
|
|
79
80
|
theme.breakpoints.values,
|
|
80
81
|
),
|
|
81
|
-
background:
|
|
82
|
-
theme.palette.mode === 'light'
|
|
83
|
-
? theme.palette.background.default
|
|
84
|
-
: lighten(theme.palette.background.default, 0.15),
|
|
82
|
+
background: theme.lighten(theme.vars.palette.background.default, 0.15),
|
|
85
83
|
padding: theme.spacings.sm,
|
|
86
84
|
gridColumnGap: theme.spacings.xxl,
|
|
87
85
|
gridRowGap: theme.spacings.sm,
|
|
@@ -90,6 +88,9 @@ export function OrderDetails(props: OrderDetailsProps) {
|
|
|
90
88
|
gridTemplateColumns: '1fr 1fr',
|
|
91
89
|
marginTop: theme.spacings.xxs,
|
|
92
90
|
},
|
|
91
|
+
...theme.applyStyles('light', {
|
|
92
|
+
background: theme.vars.palette.background.default,
|
|
93
|
+
}),
|
|
93
94
|
})}
|
|
94
95
|
>
|
|
95
96
|
<Box className={classes.orderDetailRow}>
|
|
@@ -102,7 +103,6 @@ export function OrderDetails(props: OrderDetailsProps) {
|
|
|
102
103
|
<Typography>{number}</Typography>
|
|
103
104
|
</SectionContainer>
|
|
104
105
|
</Box>
|
|
105
|
-
|
|
106
106
|
<Box className={classes.orderDetailRow}>
|
|
107
107
|
<SectionContainer
|
|
108
108
|
variantLeft='h5'
|
|
@@ -113,7 +113,6 @@ export function OrderDetails(props: OrderDetailsProps) {
|
|
|
113
113
|
<DateTimeFormat date={order_date} />
|
|
114
114
|
</SectionContainer>
|
|
115
115
|
</Box>
|
|
116
|
-
|
|
117
116
|
{shipping_method && (
|
|
118
117
|
<Box className={classes.orderDetailRow}>
|
|
119
118
|
<SectionContainer
|
|
@@ -123,7 +122,6 @@ export function OrderDetails(props: OrderDetailsProps) {
|
|
|
123
122
|
sx={{ '& .SectionHeader-root': { marginTop: 0, paddingBottom: '4px' } }}
|
|
124
123
|
>
|
|
125
124
|
<Typography>{shipping_method ?? ''}</Typography>
|
|
126
|
-
|
|
127
125
|
{shipments && shipments.length > 0 && (
|
|
128
126
|
<>
|
|
129
127
|
{shipments?.[0]?.tracking && shipments?.[0]?.tracking?.[0]?.title}
|
|
@@ -174,7 +172,6 @@ export function OrderDetails(props: OrderDetailsProps) {
|
|
|
174
172
|
</SectionContainer>
|
|
175
173
|
</Box>
|
|
176
174
|
)}
|
|
177
|
-
|
|
178
175
|
<Box className={classes.orderDetailRow}>
|
|
179
176
|
<SectionContainer
|
|
180
177
|
variantLeft='h5'
|
|
@@ -4,6 +4,7 @@ import {
|
|
|
4
4
|
extendableComponent,
|
|
5
5
|
nonNullable,
|
|
6
6
|
SectionContainer,
|
|
7
|
+
sxx,
|
|
7
8
|
} from '@graphcommerce/next-ui'
|
|
8
9
|
import { Trans } from '@lingui/react/macro'
|
|
9
10
|
import type { SxProps, Theme } from '@mui/material'
|
|
@@ -33,11 +34,11 @@ export function OrderItems(props: OrderItemsProps) {
|
|
|
33
34
|
return (
|
|
34
35
|
<Box
|
|
35
36
|
className={classes.root}
|
|
36
|
-
sx={
|
|
37
|
+
sx={sxx(
|
|
37
38
|
(theme) => ({
|
|
38
39
|
my: theme.spacings.md,
|
|
39
40
|
padding: `${theme.spacings.sm} ${theme.spacings.sm}`,
|
|
40
|
-
border: `1px ${theme.palette.divider} solid`,
|
|
41
|
+
border: `1px ${theme.vars.palette.divider} solid`,
|
|
41
42
|
...breakpointVal(
|
|
42
43
|
'borderRadius',
|
|
43
44
|
theme.shape.borderRadius * 2,
|
|
@@ -45,8 +46,8 @@ export function OrderItems(props: OrderItemsProps) {
|
|
|
45
46
|
theme.breakpoints.values,
|
|
46
47
|
),
|
|
47
48
|
}),
|
|
48
|
-
|
|
49
|
-
|
|
49
|
+
sx,
|
|
50
|
+
)}
|
|
50
51
|
>
|
|
51
52
|
<SectionContainer
|
|
52
53
|
sx={{ '& .SectionHeader-root': { mt: 0 } }}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { sxx } from '@graphcommerce/next-ui'
|
|
2
2
|
import type { OrderStateLabelProps } from './OrderStateLabel'
|
|
3
3
|
import { OrderStateLabel } from './OrderStateLabel'
|
|
4
4
|
|
|
@@ -12,33 +12,32 @@ export function OrderStateLabelInline(props: OrderStateLabelInlineProps) {
|
|
|
12
12
|
<OrderStateLabel
|
|
13
13
|
{...props}
|
|
14
14
|
short
|
|
15
|
-
sx={
|
|
15
|
+
sx={sxx(
|
|
16
16
|
(theme) => ({
|
|
17
17
|
fontStyle: 'normal',
|
|
18
18
|
display: 'inline-block',
|
|
19
19
|
padding: '0 6px',
|
|
20
20
|
borderRadius: '3px',
|
|
21
21
|
fontWeight: 'normal',
|
|
22
|
-
background: alpha(theme.palette.secondary.main, 0.125),
|
|
23
|
-
|
|
22
|
+
background: theme.alpha(theme.vars.palette.secondary.main, 0.125),
|
|
24
23
|
'&.orderStatePending': {
|
|
25
|
-
color: theme.palette.text.disabled,
|
|
24
|
+
color: theme.vars.palette.text.disabled,
|
|
26
25
|
},
|
|
27
26
|
'&.orderStateProcessing': {
|
|
28
|
-
color: theme.palette.info.main,
|
|
29
|
-
background: alpha(theme.palette.info.main, 0.125),
|
|
27
|
+
color: theme.vars.palette.info.main,
|
|
28
|
+
background: theme.alpha(theme.vars.palette.info.main, 0.125),
|
|
30
29
|
},
|
|
31
30
|
'&.orderStateComplete': {
|
|
32
|
-
color: theme.palette.success.main,
|
|
33
|
-
background: alpha(theme.palette.success.main, 0.125),
|
|
31
|
+
color: theme.vars.palette.success.main,
|
|
32
|
+
background: theme.alpha(theme.vars.palette.success.main, 0.125),
|
|
34
33
|
},
|
|
35
34
|
'&.orderStateClosed': {
|
|
36
|
-
color: theme.palette.text.disabled,
|
|
37
|
-
background: alpha(theme.palette.text.disabled, 0.125),
|
|
35
|
+
color: theme.vars.palette.text.disabled,
|
|
36
|
+
background: theme.alpha(theme.vars.palette.text.disabled, 0.125),
|
|
38
37
|
},
|
|
39
38
|
}),
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
sx,
|
|
40
|
+
)}
|
|
42
41
|
/>
|
|
43
42
|
)
|
|
44
43
|
}
|
|
@@ -2,7 +2,7 @@ import { Money } from '@graphcommerce/magento-store'
|
|
|
2
2
|
import { breakpointVal, extendableComponent, sxx } from '@graphcommerce/next-ui'
|
|
3
3
|
import { Trans } from '@lingui/react/macro'
|
|
4
4
|
import type { SxProps, Theme } from '@mui/material'
|
|
5
|
-
import { Box, Divider,
|
|
5
|
+
import { Box, Divider, Typography } from '@mui/material'
|
|
6
6
|
import type { OrderTotalsFragment } from './OrderTotals.gql'
|
|
7
7
|
|
|
8
8
|
export type OrderTotalsProps = {
|
|
@@ -33,10 +33,10 @@ export function OrderTotals(props: OrderTotalsProps) {
|
|
|
33
33
|
theme.shape.borderRadius * 5,
|
|
34
34
|
theme.breakpoints.values,
|
|
35
35
|
),
|
|
36
|
-
background:
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
36
|
+
background: theme.vars.palette.background.default,
|
|
37
|
+
...theme.applyStyles('dark', {
|
|
38
|
+
background: theme.lighten(theme.vars.palette.background.default, 0.15),
|
|
39
|
+
}),
|
|
40
40
|
padding: `${theme.spacings.xs} ${theme.spacings.sm}`,
|
|
41
41
|
}),
|
|
42
42
|
sx,
|
|
@@ -79,13 +79,12 @@ export function OrderTotals(props: OrderTotalsProps) {
|
|
|
79
79
|
{additionalSubtotals}
|
|
80
80
|
|
|
81
81
|
<Divider sx={(theme) => ({ my: theme.spacings.xxs })} />
|
|
82
|
-
|
|
83
82
|
<Box
|
|
84
83
|
className={classes.totalsRow}
|
|
85
84
|
sx={(theme) => ({
|
|
86
85
|
display: 'flex',
|
|
87
86
|
justifyContent: 'space-between',
|
|
88
|
-
color: theme.palette.primary.main,
|
|
87
|
+
color: theme.vars.palette.primary.main,
|
|
89
88
|
})}
|
|
90
89
|
>
|
|
91
90
|
<Typography>
|
|
@@ -103,7 +102,7 @@ export function OrderTotals(props: OrderTotalsProps) {
|
|
|
103
102
|
sx={(theme) => ({
|
|
104
103
|
display: 'flex',
|
|
105
104
|
justifyContent: 'space-between',
|
|
106
|
-
color: theme.palette.text.disabled,
|
|
105
|
+
color: theme.vars.palette.text.disabled,
|
|
107
106
|
})}
|
|
108
107
|
>
|
|
109
108
|
<Typography>
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
} from '@graphcommerce/next-ui'
|
|
10
10
|
import { Trans } from '@lingui/react/macro'
|
|
11
11
|
import type { SxProps, Theme } from '@mui/material'
|
|
12
|
-
import { Box
|
|
12
|
+
import { Box } from '@mui/material'
|
|
13
13
|
import { TrackingLink } from '../TrackingLink/TrackingLink'
|
|
14
14
|
import type { ShipmentCardFragment } from './ShipmentCard.gql'
|
|
15
15
|
|
|
@@ -34,10 +34,10 @@ export function ShipmentCard(props: ShipmentCardProps) {
|
|
|
34
34
|
px: theme.spacings.xxs,
|
|
35
35
|
py: theme.spacings.xxs,
|
|
36
36
|
gap: theme.spacings.sm,
|
|
37
|
-
background:
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
37
|
+
background: theme.vars.palette.background.default,
|
|
38
|
+
...theme.applyStyles('dark', {
|
|
39
|
+
background: theme.lighten(theme.vars.palette.background.default, 0.15),
|
|
40
|
+
}),
|
|
41
41
|
...breakpointVal(
|
|
42
42
|
'borderRadius',
|
|
43
43
|
theme.shape.borderRadius * 2,
|
|
@@ -45,7 +45,7 @@ export function ShipmentCard(props: ShipmentCardProps) {
|
|
|
45
45
|
theme.breakpoints.values,
|
|
46
46
|
),
|
|
47
47
|
// '&:hover': {
|
|
48
|
-
// backgroundColor: theme.palette.action.hover,
|
|
48
|
+
// backgroundColor: theme.vars.palette.action.hover,
|
|
49
49
|
// },
|
|
50
50
|
display: 'grid',
|
|
51
51
|
gridTemplate: `
|
|
@@ -4,10 +4,11 @@ import {
|
|
|
4
4
|
extendableComponent,
|
|
5
5
|
filterNonNullableKeys,
|
|
6
6
|
SectionContainer,
|
|
7
|
+
sxx,
|
|
7
8
|
} from '@graphcommerce/next-ui'
|
|
8
9
|
import { Trans } from '@lingui/react/macro'
|
|
9
10
|
import type { SxProps, Theme } from '@mui/material'
|
|
10
|
-
import { Box,
|
|
11
|
+
import { Box, Typography } from '@mui/material'
|
|
11
12
|
import { TrackingLink } from '../TrackingLink/TrackingLink'
|
|
12
13
|
import type { ShipmentFragment } from './Shipment.gql'
|
|
13
14
|
|
|
@@ -32,14 +33,11 @@ export function ShipmentDetails(props: ShipmentDetailsProps) {
|
|
|
32
33
|
return (
|
|
33
34
|
<SectionContainer
|
|
34
35
|
labelLeft={<Trans>Shipment details</Trans>}
|
|
35
|
-
sx={
|
|
36
|
+
sx={sxx(
|
|
36
37
|
(theme) => ({
|
|
37
38
|
padding: theme.spacings.sm,
|
|
38
39
|
marginBottom: theme.spacings.md,
|
|
39
|
-
background:
|
|
40
|
-
theme.palette.mode === 'light'
|
|
41
|
-
? theme.palette.background.default
|
|
42
|
-
: lighten(theme.palette.background.default, 0.15),
|
|
40
|
+
background: theme.lighten(theme.vars.palette.background.default, 0.15),
|
|
43
41
|
...breakpointVal(
|
|
44
42
|
'borderRadius',
|
|
45
43
|
theme.shape.borderRadius * 2,
|
|
@@ -50,13 +48,16 @@ export function ShipmentDetails(props: ShipmentDetailsProps) {
|
|
|
50
48
|
mt: 0,
|
|
51
49
|
mb: theme.spacings.xs,
|
|
52
50
|
},
|
|
51
|
+
...theme.applyStyles('light', {
|
|
52
|
+
background: theme.vars.palette.background.default,
|
|
53
|
+
}),
|
|
53
54
|
}),
|
|
54
|
-
|
|
55
|
-
|
|
55
|
+
sx,
|
|
56
|
+
)}
|
|
56
57
|
>
|
|
57
58
|
<Box
|
|
58
59
|
className={classes.shipmentDetailContainer}
|
|
59
|
-
sx={
|
|
60
|
+
sx={sxx(
|
|
60
61
|
(theme) => ({
|
|
61
62
|
gridColumnGap: theme.spacings.xxl,
|
|
62
63
|
gridRowGap: theme.spacings.md,
|
|
@@ -66,8 +67,8 @@ export function ShipmentDetails(props: ShipmentDetailsProps) {
|
|
|
66
67
|
marginTop: theme.spacings.xxs,
|
|
67
68
|
},
|
|
68
69
|
}),
|
|
69
|
-
|
|
70
|
-
|
|
70
|
+
sx,
|
|
71
|
+
)}
|
|
71
72
|
>
|
|
72
73
|
<Box className={classes.shipmentDetailRow}>
|
|
73
74
|
<SectionContainer
|
|
@@ -79,7 +80,6 @@ export function ShipmentDetails(props: ShipmentDetailsProps) {
|
|
|
79
80
|
<Typography>{number}</Typography>
|
|
80
81
|
</SectionContainer>
|
|
81
82
|
</Box>
|
|
82
|
-
|
|
83
83
|
{tracking && tracking.length > 0 && (
|
|
84
84
|
<Box className={classes.shipmentDetailRow}>
|
|
85
85
|
<SectionContainer
|
|
@@ -4,6 +4,7 @@ import {
|
|
|
4
4
|
extendableComponent,
|
|
5
5
|
nonNullable,
|
|
6
6
|
SectionContainer,
|
|
7
|
+
sxx,
|
|
7
8
|
} from '@graphcommerce/next-ui'
|
|
8
9
|
import { Trans } from '@lingui/react/macro'
|
|
9
10
|
import type { SxProps, Theme } from '@mui/material'
|
|
@@ -31,11 +32,11 @@ export function ShipmentItems(props: ShipmentItemsProps) {
|
|
|
31
32
|
return (
|
|
32
33
|
<Box
|
|
33
34
|
className={classes.root}
|
|
34
|
-
sx={
|
|
35
|
+
sx={sxx(
|
|
35
36
|
(theme) => ({
|
|
36
37
|
my: theme.spacings.md,
|
|
37
38
|
padding: `${theme.spacings.sm} ${theme.spacings.sm}`,
|
|
38
|
-
border: `1px ${theme.palette.divider} solid`,
|
|
39
|
+
border: `1px ${theme.vars.palette.divider} solid`,
|
|
39
40
|
...breakpointVal(
|
|
40
41
|
'borderRadius',
|
|
41
42
|
theme.shape.borderRadius * 2,
|
|
@@ -43,8 +44,8 @@ export function ShipmentItems(props: ShipmentItemsProps) {
|
|
|
43
44
|
theme.breakpoints.values,
|
|
44
45
|
),
|
|
45
46
|
}),
|
|
46
|
-
|
|
47
|
-
|
|
47
|
+
sx,
|
|
48
|
+
)}
|
|
48
49
|
>
|
|
49
50
|
<SectionContainer
|
|
50
51
|
sx={{ '& .SectionHeader-root': { mt: 0 } }}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PasswordElement } from '@graphcommerce/ecommerce-ui'
|
|
2
|
-
import { Button, extendableComponent } from '@graphcommerce/next-ui'
|
|
2
|
+
import { Button, extendableComponent, sxx } from '@graphcommerce/next-ui'
|
|
3
3
|
import { Trans } from '@lingui/react/macro'
|
|
4
4
|
import type { SxProps, Theme } from '@mui/material'
|
|
5
5
|
import { Box, Link } from '@mui/material'
|
|
@@ -27,7 +27,7 @@ export function SignInFormInline(props: InlineSignInFormProps) {
|
|
|
27
27
|
onSubmit={submitHandler}
|
|
28
28
|
noValidate
|
|
29
29
|
className={classes.form}
|
|
30
|
-
sx={
|
|
30
|
+
sx={sxx(
|
|
31
31
|
(theme) => ({
|
|
32
32
|
display: 'grid',
|
|
33
33
|
alignItems: 'center',
|
|
@@ -38,8 +38,8 @@ export function SignInFormInline(props: InlineSignInFormProps) {
|
|
|
38
38
|
gridTemplateColumns: '5fr 1fr',
|
|
39
39
|
},
|
|
40
40
|
}),
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
sx,
|
|
42
|
+
)}
|
|
43
43
|
>
|
|
44
44
|
<PasswordElement
|
|
45
45
|
control={control}
|
|
@@ -64,7 +64,10 @@ export function SignInFormInline(props: InlineSignInFormProps) {
|
|
|
64
64
|
loading={formState.isSubmitting}
|
|
65
65
|
color='secondary'
|
|
66
66
|
variant='pill'
|
|
67
|
-
sx={
|
|
67
|
+
sx={(theme) => ({
|
|
68
|
+
alignSelf: 'start',
|
|
69
|
+
marginTop: `calc(${theme.spacings.xxs} * .33)`,
|
|
70
|
+
})}
|
|
68
71
|
>
|
|
69
72
|
<Trans>Sign in</Trans>
|
|
70
73
|
</Button>
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { FormPersist, PasswordRepeatElement, SwitchElement } from '@graphcommerce/ecommerce-ui'
|
|
2
2
|
import { useQuery } from '@graphcommerce/graphql'
|
|
3
3
|
import { AttributesFormAutoLayout, StoreConfigDocument } from '@graphcommerce/magento-store'
|
|
4
|
-
import { Button, FormActions, FormRow } from '@graphcommerce/next-ui'
|
|
5
4
|
import { magentoVersion } from '@graphcommerce/next-config/config'
|
|
5
|
+
import { Button, FormActions, FormRow } from '@graphcommerce/next-ui'
|
|
6
6
|
import type { UseFormClearErrors, UseFormSetError } from '@graphcommerce/react-hook-form'
|
|
7
|
-
import { Trans } from '@lingui/react/macro'
|
|
8
7
|
import { t } from '@lingui/core/macro'
|
|
8
|
+
import { Trans } from '@lingui/react/macro'
|
|
9
9
|
import { Alert } from '@mui/material'
|
|
10
10
|
import { useSignInForm } from '../../hooks/useSignInForm'
|
|
11
11
|
import { ApolloCustomerErrorSnackbar } from '../ApolloCustomerError/ApolloCustomerErrorSnackbar'
|
|
@@ -68,7 +68,9 @@ export function SignUpFormInline(props: SignUpFormInlineProps) {
|
|
|
68
68
|
) {
|
|
69
69
|
return (
|
|
70
70
|
<Alert>
|
|
71
|
-
<Trans>
|
|
71
|
+
<Trans>
|
|
72
|
+
Registration successful. Please check your inbox to confirm your email address ({email})
|
|
73
|
+
</Trans>
|
|
72
74
|
</Alert>
|
|
73
75
|
)
|
|
74
76
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { iconLocation, IconSvg } from '@graphcommerce/next-ui'
|
|
1
|
+
import { iconLocation, IconSvg, sxx } from '@graphcommerce/next-ui'
|
|
2
2
|
import { Trans } from '@lingui/react/macro'
|
|
3
3
|
import type { SxProps, Theme } from '@mui/material'
|
|
4
4
|
import { Box, Link, Typography } from '@mui/material'
|
|
@@ -14,14 +14,14 @@ export function TrackingLink(props: TrackingLinkProps) {
|
|
|
14
14
|
return (
|
|
15
15
|
<Box
|
|
16
16
|
className='TrackingLink-root'
|
|
17
|
-
sx={
|
|
17
|
+
sx={sxx(
|
|
18
18
|
(theme) => ({
|
|
19
19
|
display: 'flex',
|
|
20
20
|
alignItems: 'center',
|
|
21
|
-
color: theme.palette.primary.main,
|
|
21
|
+
color: theme.vars.palette.primary.main,
|
|
22
22
|
}),
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
sx,
|
|
24
|
+
)}
|
|
25
25
|
>
|
|
26
26
|
{number && validUrl && (
|
|
27
27
|
<Link
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@graphcommerce/magento-customer",
|
|
3
3
|
"homepage": "https://www.graphcommerce.org/",
|
|
4
4
|
"repository": "github:graphcommerce-org/graphcommerce",
|
|
5
|
-
"version": "10.0.0-canary.
|
|
5
|
+
"version": "10.0.0-canary.68",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"prettier": "@graphcommerce/prettier-config-pwa",
|
|
8
8
|
"eslintConfig": {
|
|
@@ -21,24 +21,24 @@
|
|
|
21
21
|
"./plugins/magentoCustomerPrivateQueryContext": "./plugins/magentoCustomerPrivateQueryContext.ts"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
24
|
-
"@graphcommerce/ecommerce-ui": "^10.0.0-canary.
|
|
25
|
-
"@graphcommerce/eslint-config-pwa": "^10.0.0-canary.
|
|
26
|
-
"@graphcommerce/framer-next-pages": "^10.0.0-canary.
|
|
27
|
-
"@graphcommerce/framer-utils": "^10.0.0-canary.
|
|
28
|
-
"@graphcommerce/graphql": "^10.0.0-canary.
|
|
29
|
-
"@graphcommerce/graphql-mesh": "^10.0.0-canary.
|
|
30
|
-
"@graphcommerce/image": "^10.0.0-canary.
|
|
31
|
-
"@graphcommerce/magento-graphql": "^10.0.0-canary.
|
|
32
|
-
"@graphcommerce/magento-store": "^10.0.0-canary.
|
|
33
|
-
"@graphcommerce/next-config": "^10.0.0-canary.
|
|
34
|
-
"@graphcommerce/next-ui": "^10.0.0-canary.
|
|
35
|
-
"@graphcommerce/prettier-config-pwa": "^10.0.0-canary.
|
|
36
|
-
"@graphcommerce/react-hook-form": "^10.0.0-canary.
|
|
37
|
-
"@graphcommerce/typescript-config-pwa": "^10.0.0-canary.
|
|
24
|
+
"@graphcommerce/ecommerce-ui": "^10.0.0-canary.68",
|
|
25
|
+
"@graphcommerce/eslint-config-pwa": "^10.0.0-canary.68",
|
|
26
|
+
"@graphcommerce/framer-next-pages": "^10.0.0-canary.68",
|
|
27
|
+
"@graphcommerce/framer-utils": "^10.0.0-canary.68",
|
|
28
|
+
"@graphcommerce/graphql": "^10.0.0-canary.68",
|
|
29
|
+
"@graphcommerce/graphql-mesh": "^10.0.0-canary.68",
|
|
30
|
+
"@graphcommerce/image": "^10.0.0-canary.68",
|
|
31
|
+
"@graphcommerce/magento-graphql": "^10.0.0-canary.68",
|
|
32
|
+
"@graphcommerce/magento-store": "^10.0.0-canary.68",
|
|
33
|
+
"@graphcommerce/next-config": "^10.0.0-canary.68",
|
|
34
|
+
"@graphcommerce/next-ui": "^10.0.0-canary.68",
|
|
35
|
+
"@graphcommerce/prettier-config-pwa": "^10.0.0-canary.68",
|
|
36
|
+
"@graphcommerce/react-hook-form": "^10.0.0-canary.68",
|
|
37
|
+
"@graphcommerce/typescript-config-pwa": "^10.0.0-canary.68",
|
|
38
38
|
"@lingui/core": "^5",
|
|
39
39
|
"@lingui/macro": "^5",
|
|
40
40
|
"@lingui/react": "^5",
|
|
41
|
-
"@mui/material": "^
|
|
41
|
+
"@mui/material": "^7.0.0",
|
|
42
42
|
"framer-motion": "^11.0.0",
|
|
43
43
|
"graphql": "^16.0.0",
|
|
44
44
|
"next": "*",
|