@graphcommerce/magento-customer 10.0.0-canary.66 → 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 +14 -0
- package/components/AccountAddress/AccountAddress.tsx +10 -5
- 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 +21 -13
- 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/components/UpdateDefaultAddressForm/UpdateDefaultAddressForm.tsx +4 -0
- package/graphql/Config.graphqls +9 -0
- package/hooks/index.ts +2 -1
- package/hooks/useBillingAddressPermission.tsx +8 -0
- package/package.json +16 -15
- package/utils/billingAddressPermission.tsx +10 -0
- package/utils/index.ts +1 -0
|
@@ -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
|