@graphcommerce/magento-cart 4.1.2 → 4.1.3

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 CHANGED
@@ -1,5 +1,26 @@
1
1
  # Change Log
2
2
 
3
+ ## 4.1.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [#1292](https://github.com/ho-nl/m2-pwa/pull/1292)
8
+ [`5a1ba9e66`](https://github.com/ho-nl/m2-pwa/commit/5a1ba9e664abbac89c4f5f71f7d6d6ed1aefa5c0)
9
+ Thanks [@paales](https://github.com/paales)! - Renamed SvgIcon to IconSvg to prevent collisions
10
+ with MUI
11
+
12
+ * [#1292](https://github.com/ho-nl/m2-pwa/pull/1292)
13
+ [`63f9b56eb`](https://github.com/ho-nl/m2-pwa/commit/63f9b56eb68ba790567ff1427e599fd2c3c8f1ee)
14
+ Thanks [@paales](https://github.com/paales)! - added responsive size to the Fab component
15
+
16
+ * Updated dependencies
17
+ [[`5a1ba9e66`](https://github.com/ho-nl/m2-pwa/commit/5a1ba9e664abbac89c4f5f71f7d6d6ed1aefa5c0),
18
+ [`990df655b`](https://github.com/ho-nl/m2-pwa/commit/990df655b73b469718d6cb5837ee65dfe2ad6a1d),
19
+ [`63f9b56eb`](https://github.com/ho-nl/m2-pwa/commit/63f9b56eb68ba790567ff1427e599fd2c3c8f1ee)]:
20
+ - @graphcommerce/ecommerce-ui@1.0.2
21
+ - @graphcommerce/magento-customer@4.1.3
22
+ - @graphcommerce/next-ui@4.2.0
23
+
3
24
  ## 4.1.2
4
25
 
5
26
  ### Patch Changes
@@ -1,6 +1,6 @@
1
1
  import { ApolloErrorFullPage, ApolloErrorFullPageProps } from '@graphcommerce/ecommerce-ui'
2
2
  import { graphqlErrorByCategory } from '@graphcommerce/magento-graphql'
3
- import { iconSadFace, SvgIcon } from '@graphcommerce/next-ui'
3
+ import { iconSadFace, IconSvg } from '@graphcommerce/next-ui'
4
4
  import { Button } from '@mui/material'
5
5
  import { useClearCurrentCartId } from '../../hooks/useClearCurrentCartId'
6
6
 
@@ -16,7 +16,7 @@ export function ApolloCartErrorFullPage(props: ApolloCartErrorFullPageProps) {
16
16
  return (
17
17
  <ApolloErrorFullPage
18
18
  error={error}
19
- icon={<SvgIcon src={iconSadFace} size='xxl' />}
19
+ icon={<IconSvg src={iconSadFace} size='xxl' />}
20
20
  button={action}
21
21
  {...passedProps}
22
22
  />
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  extendableComponent,
3
3
  iconShoppingBag,
4
- responsiveVal,
5
4
  DesktopHeaderBadge,
6
- SvgIcon,
5
+ IconSvg,
7
6
  useScrollY,
7
+ useFabSize,
8
8
  } from '@graphcommerce/next-ui'
9
9
  import { t } from '@lingui/macro'
10
10
  import { alpha, Fab, FabProps, NoSsr, styled, useTheme, Box, SxProps, Theme } from '@mui/material'
@@ -43,8 +43,8 @@ function CartFabContent(props: CartFabContentProps) {
43
43
  const paper1 = alpha(theme2.palette.background.paper, 1)
44
44
  const backgroundColor = useTransform(scrollY, [0, 10], [paper0, paper1])
45
45
 
46
- const cartIcon = icon ?? <SvgIcon src={iconShoppingBag} size='large' />
47
- const fabIconSize = responsiveVal(42, 56) // @todo generalize this
46
+ const cartIcon = icon ?? <IconSvg src={iconShoppingBag} size='large' />
47
+ const fabIconSize = useFabSize('responsive')
48
48
 
49
49
  return (
50
50
  <Box
@@ -60,11 +60,9 @@ function CartFabContent(props: CartFabContentProps) {
60
60
  {...fabProps}
61
61
  aria-label={t`Cart`}
62
62
  color='inherit'
63
- size='large'
63
+ size='responsive'
64
64
  style={{ backgroundColor }}
65
65
  sx={(theme) => ({
66
- width: fabIconSize,
67
- height: fabIconSize,
68
66
  [theme.breakpoints.down('md')]: {
69
67
  backgroundColor: `${theme.palette.background.paper} !important`,
70
68
  },
@@ -5,7 +5,7 @@ import {
5
5
  iconChevronRight,
6
6
  responsiveVal,
7
7
  SectionContainer,
8
- SvgIcon,
8
+ IconSvg,
9
9
  extendableComponent,
10
10
  } from '@graphcommerce/next-ui'
11
11
  import { Trans } from '@lingui/macro'
@@ -83,7 +83,7 @@ export default function CartItemSummary(props: OrderSummaryProps) {
83
83
  left: 8,
84
84
  }}
85
85
  >
86
- <SvgIcon src={iconChevronLeft} />
86
+ <IconSvg src={iconChevronLeft} />
87
87
  </ScrollerButton>
88
88
  <Box className={classes.scrollerContainer} sx={{ padding: '1px' }}>
89
89
  <Scroller className={classes.scroller}>
@@ -125,7 +125,7 @@ export default function CartItemSummary(props: OrderSummaryProps) {
125
125
  right: 8,
126
126
  }}
127
127
  >
128
- <SvgIcon src={iconChevronRight} />
128
+ <IconSvg src={iconChevronRight} />
129
129
  </ScrollerButton>
130
130
  </ScrollerProvider>
131
131
  </Box>
@@ -1,5 +1,5 @@
1
1
  import { Money } from '@graphcommerce/magento-store'
2
- import { iconChevronRight, SvgIcon, extendableComponent } from '@graphcommerce/next-ui'
2
+ import { iconChevronRight, IconSvg, extendableComponent } from '@graphcommerce/next-ui'
3
3
  import { Trans } from '@lingui/macro'
4
4
  import { Box, Button, SxProps, Theme } from '@mui/material'
5
5
  import PageLink from 'next/link'
@@ -34,7 +34,7 @@ export default function CartStartCheckout(props: CartStartCheckoutProps) {
34
34
  color='secondary'
35
35
  size='large'
36
36
  className={classes.checkoutButton}
37
- endIcon={<SvgIcon src={iconChevronRight} />}
37
+ endIcon={<IconSvg src={iconChevronRight} />}
38
38
  disabled={!hasTotals}
39
39
  sx={(theme) => ({
40
40
  marginTop: theme.spacings.md,
@@ -1,4 +1,4 @@
1
- import { FullPageMessage, SvgIcon, iconShoppingBag } from '@graphcommerce/next-ui'
1
+ import { FullPageMessage, IconSvg, iconShoppingBag } from '@graphcommerce/next-ui'
2
2
  import { Trans } from '@lingui/macro'
3
3
  import { Button } from '@mui/material'
4
4
  import Link from 'next/link'
@@ -11,7 +11,7 @@ export default function EmptyCart(props: EmptyCartProps) {
11
11
  return (
12
12
  <FullPageMessage
13
13
  title={<Trans>Your cart is empty</Trans>}
14
- icon={<SvgIcon src={iconShoppingBag} size='xxl' />}
14
+ icon={<IconSvg src={iconShoppingBag} size='xxl' />}
15
15
  button={
16
16
  <Link href='/' passHref>
17
17
  <Button variant='pill' color='secondary' size='large'>
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@graphcommerce/magento-cart",
3
3
  "homepage": "https://www.graphcommerce.org/",
4
4
  "repository": "github:graphcommerce-org/graphcommerce",
5
- "version": "4.1.2",
5
+ "version": "4.1.3",
6
6
  "sideEffects": false,
7
7
  "prettier": "@graphcommerce/prettier-config-pwa",
8
8
  "eslintConfig": {
@@ -18,15 +18,15 @@
18
18
  "@playwright/test": "^1.19.1"
19
19
  },
20
20
  "dependencies": {
21
- "@graphcommerce/ecommerce-ui": "^1.0.1",
21
+ "@graphcommerce/ecommerce-ui": "^1.0.2",
22
22
  "@graphcommerce/framer-next-pages": "^3.1.0",
23
23
  "@graphcommerce/framer-scroller": "^2.0.3",
24
24
  "@graphcommerce/graphql": "^3.0.3",
25
25
  "@graphcommerce/image": "^3.1.0",
26
- "@graphcommerce/magento-customer": "^4.1.2",
26
+ "@graphcommerce/magento-customer": "^4.1.3",
27
27
  "@graphcommerce/magento-graphql": "^3.0.3",
28
28
  "@graphcommerce/magento-store": "^4.0.3",
29
- "@graphcommerce/next-ui": "^4.1.2",
29
+ "@graphcommerce/next-ui": "^4.2.0",
30
30
  "@graphcommerce/react-hook-form": "^3.0.3"
31
31
  },
32
32
  "peerDependencies": {