@graphcommerce/magento-cart-coupon 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.
@@ -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
- ...(Array.isArray(sx) ? sx : [sx]),
36
- ]}
35
+ sx,
36
+ )}
37
37
  >
38
38
  <TextFieldElement
39
39
  variant='outlined'
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
  ## 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
- ...(Array.isArray(sx) ? sx : [sx]),
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
- Boolean(coupon) && {
72
- '&:hover:not(.Mui-disabled)': {
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.67",
5
+ "version": "10.0.0-canary.68",
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.67",
19
- "@graphcommerce/eslint-config-pwa": "^10.0.0-canary.67",
20
- "@graphcommerce/graphql": "^10.0.0-canary.67",
21
- "@graphcommerce/image": "^10.0.0-canary.67",
22
- "@graphcommerce/magento-cart": "^10.0.0-canary.67",
23
- "@graphcommerce/magento-store": "^10.0.0-canary.67",
24
- "@graphcommerce/next-ui": "^10.0.0-canary.67",
25
- "@graphcommerce/prettier-config-pwa": "^10.0.0-canary.67",
26
- "@graphcommerce/react-hook-form": "^10.0.0-canary.67",
27
- "@graphcommerce/typescript-config-pwa": "^10.0.0-canary.67",
18
+ "@graphcommerce/ecommerce-ui": "^10.0.0-canary.68",
19
+ "@graphcommerce/eslint-config-pwa": "^10.0.0-canary.68",
20
+ "@graphcommerce/graphql": "^10.0.0-canary.68",
21
+ "@graphcommerce/image": "^10.0.0-canary.68",
22
+ "@graphcommerce/magento-cart": "^10.0.0-canary.68",
23
+ "@graphcommerce/magento-store": "^10.0.0-canary.68",
24
+ "@graphcommerce/next-ui": "^10.0.0-canary.68",
25
+ "@graphcommerce/prettier-config-pwa": "^10.0.0-canary.68",
26
+ "@graphcommerce/react-hook-form": "^10.0.0-canary.68",
27
+ "@graphcommerce/typescript-config-pwa": "^10.0.0-canary.68",
28
28
  "@lingui/core": "^5",
29
29
  "@lingui/macro": "^5",
30
30
  "@lingui/react": "^5",
31
- "@mui/material": "^5.10.16",
31
+ "@mui/material": "^7.0.0",
32
32
  "framer-motion": "^11.0.0",
33
33
  "next": "*",
34
34
  "react": "^19.2.0",