@graphcommerce/magento-cart 3.8.19 → 3.8.23

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
@@ -3,6 +3,28 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [3.8.23](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/magento-cart@3.8.22...@graphcommerce/magento-cart@3.8.23) (2021-12-21)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * make sure the cart renders the correct currency ([cc43c8a](https://github.com/ho-nl/m2-pwa/commit/cc43c8acdce339a2f9c99fd7f7e79d6277c8603f))
12
+
13
+
14
+
15
+
16
+
17
+ ## [3.8.22](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/magento-cart@3.8.21...@graphcommerce/magento-cart@3.8.22) (2021-12-21)
18
+
19
+
20
+ ### Bug Fixes
21
+
22
+ * menuFab, cartFab shadows, darkTheme color and opacity bug ([6c7afa7](https://github.com/ho-nl/m2-pwa/commit/6c7afa7d3b584b455476aa26d95041c4cf6c1d0c))
23
+
24
+
25
+
26
+
27
+
6
28
  ## [3.8.17](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/magento-cart@3.8.16...@graphcommerce/magento-cart@3.8.17) (2021-12-20)
7
29
 
8
30
 
@@ -8,7 +8,7 @@ import {
8
8
  UseStyles,
9
9
  } from '@graphcommerce/next-ui'
10
10
  import { t } from '@lingui/macro'
11
- import { Fab, FabProps, makeStyles, NoSsr, Theme, useMediaQuery, useTheme } from '@material-ui/core'
11
+ import { darken, Fab, FabProps, makeStyles, NoSsr, Theme } from '@material-ui/core'
12
12
  import { m } from 'framer-motion'
13
13
  import PageLink from 'next/link'
14
14
  import React from 'react'
@@ -19,15 +19,22 @@ import { CartTotalQuantityFragment } from './CartTotalQuantity.gql'
19
19
  const useStyles = makeStyles(
20
20
  (theme: Theme) => ({
21
21
  fab: {
22
+ color:
23
+ theme.palette.type === 'light'
24
+ ? theme.palette.text.primary
25
+ : darken(theme.palette.text.primary, 1),
22
26
  boxShadow: 'none',
23
- [theme.breakpoints.down('sm')]: {
24
- background: theme.palette.background.paper,
25
- width: responsiveVal(42, 56),
26
- height: responsiveVal(42, 56),
27
+ '&:hover, &:focus': {
28
+ boxShadow: 'none',
27
29
  },
30
+ width: responsiveVal(42, 56),
31
+ height: responsiveVal(42, 56),
28
32
  },
29
33
  fabWrapper: {
30
34
  position: 'relative',
35
+ [theme.breakpoints.down('sm')]: {
36
+ backgroundColor: '#fff !important',
37
+ },
31
38
  },
32
39
  shadow: {
33
40
  pointerEvents: 'none',
@@ -37,6 +44,9 @@ const useStyles = makeStyles(
37
44
  width: '100%',
38
45
  boxShadow: theme.shadows[6],
39
46
  top: 0,
47
+ [theme.breakpoints.down('sm')]: {
48
+ opacity: '1 !important',
49
+ },
40
50
  },
41
51
  }),
42
52
  {
@@ -55,19 +65,10 @@ function CartFabContent(props: CartFabContentProps) {
55
65
  const { total_quantity, icon, ...fabProps } = props
56
66
  const cartIcon = icon ?? <SvgImageSimple src={iconShoppingBag} loading='eager' size='large' />
57
67
  const { opacity, backgroundColor } = useFixedFabAnimation()
58
- const theme = useTheme()
59
- const isMobile = useMediaQuery(theme.breakpoints.down('sm'))
60
68
  const classes = useStyles(props)
61
69
 
62
70
  return (
63
- <m.div
64
- style={{
65
- backgroundColor: isMobile ? undefined : backgroundColor,
66
- width: 'inherit',
67
- borderRadius: 'inherit',
68
- }}
69
- className={classes.fabWrapper}
70
- >
71
+ <m.div className={classes.fabWrapper} style={{ backgroundColor, borderRadius: 'inherit' }}>
71
72
  <PageLink href='/cart' passHref>
72
73
  <Fab
73
74
  aria-label={t`Cart`}
@@ -85,12 +86,7 @@ function CartFabContent(props: CartFabContentProps) {
85
86
  )}
86
87
  </Fab>
87
88
  </PageLink>
88
- <m.div
89
- className={classes.shadow}
90
- style={{
91
- opacity: isMobile ? undefined : opacity,
92
- }}
93
- />
89
+ <m.div className={classes.shadow} style={{ opacity }} />
94
90
  </m.div>
95
91
  )
96
92
  }
@@ -128,7 +128,7 @@ export default function CartTotals(props: CartTotalsProps) {
128
128
  >
129
129
  <div>{discount?.label}</div>
130
130
  <div className={classes.money}>
131
- {discount?.amount && <Money {...discount} value={value} />}
131
+ {discount?.amount && <Money {...discount.amount} value={value} />}
132
132
  </div>
133
133
  </AnimatedRow>
134
134
  )
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@graphcommerce/magento-cart",
3
- "version": "3.8.19",
3
+ "version": "3.8.23",
4
4
  "sideEffects": false,
5
5
  "prettier": "@graphcommerce/prettier-config-pwa",
6
6
  "browserslist": [
@@ -21,14 +21,14 @@
21
21
  },
22
22
  "dependencies": {
23
23
  "@apollo/client": "^3.5.6",
24
- "@graphcommerce/framer-next-pages": "^2.108.7",
25
- "@graphcommerce/framer-scroller": "^1.1.15",
26
- "@graphcommerce/graphql": "^2.105.11",
27
- "@graphcommerce/image": "^2.105.10",
28
- "@graphcommerce/magento-customer": "^3.6.22",
29
- "@graphcommerce/magento-graphql": "^2.104.11",
30
- "@graphcommerce/magento-store": "^3.3.22",
31
- "@graphcommerce/next-ui": "^3.21.5",
24
+ "@graphcommerce/framer-next-pages": "^2.108.9",
25
+ "@graphcommerce/framer-scroller": "^1.1.19",
26
+ "@graphcommerce/graphql": "^2.105.12",
27
+ "@graphcommerce/image": "^2.105.11",
28
+ "@graphcommerce/magento-customer": "^3.6.26",
29
+ "@graphcommerce/magento-graphql": "^2.104.12",
30
+ "@graphcommerce/magento-store": "^3.3.26",
31
+ "@graphcommerce/next-ui": "^3.21.9",
32
32
  "@graphcommerce/react-hook-form": "^2.104.6",
33
33
  "@lingui/macro": "^3.13.0",
34
34
  "@material-ui/core": "^4.12.3",
@@ -39,5 +39,5 @@
39
39
  "react": "^17.0.2",
40
40
  "react-dom": "^17.0.2"
41
41
  },
42
- "gitHead": "ecbde6cbcb36e0e2429b6d777972c12c47822385"
42
+ "gitHead": "fbca834579f81b45ee062e85146535eb6d7ab079"
43
43
  }