@graphcommerce/magento-cart-coupon 10.0.0-canary.67 → 10.0.0-canary.72
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TextFieldElement } from '@graphcommerce/ecommerce-ui'
|
|
2
2
|
import { ApolloCartErrorAlert, useFormGqlMutationCart } from '@graphcommerce/magento-cart'
|
|
3
|
-
import { Button, extendableComponent, responsiveVal } from '@graphcommerce/next-ui'
|
|
3
|
+
import { Button, extendableComponent, responsiveVal, sxx } from '@graphcommerce/next-ui'
|
|
4
4
|
import { Trans } from '@lingui/react/macro'
|
|
5
5
|
// eslint-disable-next-line @typescript-eslint/no-restricted-imports
|
|
6
6
|
import type { SxProps, Theme } from '@mui/material'
|
|
@@ -25,15 +25,15 @@ export function ApplyCouponForm(props: ApplyCouponFormProps) {
|
|
|
25
25
|
onSubmit={submitHandler}
|
|
26
26
|
noValidate
|
|
27
27
|
className={classes.couponForm}
|
|
28
|
-
sx={
|
|
28
|
+
sx={sxx(
|
|
29
29
|
(theme) => ({
|
|
30
30
|
display: 'grid',
|
|
31
31
|
alignItems: 'center',
|
|
32
32
|
gridTemplateColumns: `1fr minmax(min-content, ${responsiveVal(70, 140)})`,
|
|
33
33
|
gridColumnGap: theme.spacings.sm,
|
|
34
34
|
}),
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
sx,
|
|
36
|
+
)}
|
|
37
37
|
>
|
|
38
38
|
<TextFieldElement
|
|
39
39
|
variant='outlined'
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 10.0.0-canary.72
|
|
4
|
+
|
|
5
|
+
## 10.0.0-canary.71
|
|
6
|
+
|
|
7
|
+
## 10.0.0-canary.70
|
|
8
|
+
|
|
9
|
+
## 10.0.0-canary.69
|
|
10
|
+
|
|
11
|
+
## 10.0.0-canary.68
|
|
12
|
+
|
|
13
|
+
### Major Changes
|
|
14
|
+
|
|
15
|
+
- [#2557](https://github.com/graphcommerce-org/graphcommerce/pull/2557) [`ceaadd8`](https://github.com/graphcommerce-org/graphcommerce/commit/ceaadd87f0648982a068a3b07b1fa149c9127f49) - ## Material UI v5 → v7 Migration
|
|
16
|
+
|
|
17
|
+
This release upgrades Material UI from v5 to v7 with full CSS variables support. ([@paales](https://github.com/paales))
|
|
18
|
+
|
|
3
19
|
## 10.0.0-canary.67
|
|
4
20
|
|
|
5
21
|
## 10.0.0-canary.66
|
|
@@ -4,6 +4,7 @@ import {
|
|
|
4
4
|
extendableComponent,
|
|
5
5
|
iconChevronDown,
|
|
6
6
|
IconSvg,
|
|
7
|
+
sxx,
|
|
7
8
|
} from '@graphcommerce/next-ui'
|
|
8
9
|
import { Trans } from '@lingui/react/macro'
|
|
9
10
|
import type { AccordionProps, SxProps, Theme } from '@mui/material'
|
|
@@ -41,7 +42,7 @@ export function CouponAccordion(props: CouponAccordionProps) {
|
|
|
41
42
|
onChange={handleChange}
|
|
42
43
|
expanded={!coupon && open}
|
|
43
44
|
variant='outlined'
|
|
44
|
-
sx={
|
|
45
|
+
sx={sxx(
|
|
45
46
|
(theme) => ({
|
|
46
47
|
...breakpointVal(
|
|
47
48
|
'borderRadius',
|
|
@@ -51,15 +52,16 @@ export function CouponAccordion(props: CouponAccordionProps) {
|
|
|
51
52
|
),
|
|
52
53
|
'::before': { display: 'none' },
|
|
53
54
|
}),
|
|
54
|
-
|
|
55
|
-
|
|
55
|
+
sx,
|
|
56
|
+
)}
|
|
56
57
|
{...rest}
|
|
57
58
|
>
|
|
58
59
|
<AccordionSummary
|
|
59
60
|
onClick={(e) => e.preventDefault()}
|
|
60
61
|
expandIcon={<IconSvg src={iconChevronDown} style={{ opacity: coupon ? 0 : 1 }} />}
|
|
61
|
-
sx={
|
|
62
|
+
sx={sxx(
|
|
62
63
|
(theme) => ({
|
|
64
|
+
typography: 'body1',
|
|
63
65
|
px: theme.spacings.xs,
|
|
64
66
|
'& .MuiAccordionSummary-content': {
|
|
65
67
|
alignItems: 'center',
|
|
@@ -68,19 +70,15 @@ export function CouponAccordion(props: CouponAccordionProps) {
|
|
|
68
70
|
justifyContent: 'space-between',
|
|
69
71
|
},
|
|
70
72
|
}),
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
cursor: 'default',
|
|
74
|
-
},
|
|
75
|
-
},
|
|
76
|
-
]}
|
|
73
|
+
coupon && { '&:hover:not(.Mui-disabled)': { cursor: 'default' } },
|
|
74
|
+
)}
|
|
77
75
|
>
|
|
78
76
|
<Box sx={{ flex: 1 }}>
|
|
79
77
|
<Trans>Discount code</Trans>
|
|
80
78
|
</Box>
|
|
81
79
|
<RemoveCouponForm {...data.cart} sx={{ flex: 0 }} />
|
|
82
80
|
</AccordionSummary>
|
|
83
|
-
<AccordionDetails sx={(theme) => ({ px: theme.spacings.xs })}>
|
|
81
|
+
<AccordionDetails sx={(theme) => ({ px: theme.spacings.xs, typography: 'body1' })}>
|
|
84
82
|
<ApplyCouponForm />
|
|
85
83
|
</AccordionDetails>
|
|
86
84
|
</Accordion>
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@graphcommerce/magento-cart-coupon",
|
|
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.72",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"prettier": "@graphcommerce/prettier-config-pwa",
|
|
8
8
|
"eslintConfig": {
|
|
@@ -15,20 +15,20 @@
|
|
|
15
15
|
".": "./index.ts"
|
|
16
16
|
},
|
|
17
17
|
"peerDependencies": {
|
|
18
|
-
"@graphcommerce/ecommerce-ui": "^10.0.0-canary.
|
|
19
|
-
"@graphcommerce/eslint-config-pwa": "^10.0.0-canary.
|
|
20
|
-
"@graphcommerce/graphql": "^10.0.0-canary.
|
|
21
|
-
"@graphcommerce/image": "^10.0.0-canary.
|
|
22
|
-
"@graphcommerce/magento-cart": "^10.0.0-canary.
|
|
23
|
-
"@graphcommerce/magento-store": "^10.0.0-canary.
|
|
24
|
-
"@graphcommerce/next-ui": "^10.0.0-canary.
|
|
25
|
-
"@graphcommerce/prettier-config-pwa": "^10.0.0-canary.
|
|
26
|
-
"@graphcommerce/react-hook-form": "^10.0.0-canary.
|
|
27
|
-
"@graphcommerce/typescript-config-pwa": "^10.0.0-canary.
|
|
18
|
+
"@graphcommerce/ecommerce-ui": "^10.0.0-canary.72",
|
|
19
|
+
"@graphcommerce/eslint-config-pwa": "^10.0.0-canary.72",
|
|
20
|
+
"@graphcommerce/graphql": "^10.0.0-canary.72",
|
|
21
|
+
"@graphcommerce/image": "^10.0.0-canary.72",
|
|
22
|
+
"@graphcommerce/magento-cart": "^10.0.0-canary.72",
|
|
23
|
+
"@graphcommerce/magento-store": "^10.0.0-canary.72",
|
|
24
|
+
"@graphcommerce/next-ui": "^10.0.0-canary.72",
|
|
25
|
+
"@graphcommerce/prettier-config-pwa": "^10.0.0-canary.72",
|
|
26
|
+
"@graphcommerce/react-hook-form": "^10.0.0-canary.72",
|
|
27
|
+
"@graphcommerce/typescript-config-pwa": "^10.0.0-canary.72",
|
|
28
28
|
"@lingui/core": "^5",
|
|
29
29
|
"@lingui/macro": "^5",
|
|
30
30
|
"@lingui/react": "^5",
|
|
31
|
-
"@mui/material": "^
|
|
31
|
+
"@mui/material": "^7.0.0",
|
|
32
32
|
"framer-motion": "^11.0.0",
|
|
33
33
|
"next": "*",
|
|
34
34
|
"react": "^19.2.0",
|