@graphcommerce/magento-cart 3.7.0 → 3.7.1

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,17 @@
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.7.1](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/magento-cart@3.7.0...@graphcommerce/magento-cart@3.7.1) (2021-11-12)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * disable CartFab animation for mobile ([ea04e67](https://github.com/ho-nl/m2-pwa/commit/ea04e678b7d5ab23e903a59a7f369053d17f9e79))
12
+
13
+
14
+
15
+
16
+
6
17
  # [3.7.0](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/magento-cart@3.6.6...@graphcommerce/magento-cart@3.7.0) (2021-11-12)
7
18
 
8
19
 
@@ -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 } from '@material-ui/core'
11
+ import { Fab, FabProps, makeStyles, NoSsr, Theme, useMediaQuery, useTheme } from '@material-ui/core'
12
12
  import { m } from 'framer-motion'
13
13
  import PageLink from 'next/link'
14
14
  import React from 'react'
@@ -20,8 +20,8 @@ const useStyles = makeStyles(
20
20
  (theme: Theme) => ({
21
21
  fab: {
22
22
  boxShadow: 'none',
23
- background: 'none',
24
23
  [theme.breakpoints.down('sm')]: {
24
+ background: theme.palette.background.paper,
25
25
  width: responsiveVal(42, 56),
26
26
  height: responsiveVal(42, 56),
27
27
  },
@@ -43,13 +43,15 @@ function CartFabContent(props: CartFabContentProps) {
43
43
  const { total_quantity, icon, ...fabProps } = props
44
44
  const cartIcon = icon ?? <SvgImageSimple src={iconShoppingBag} loading='eager' size='large' />
45
45
  const { boxShadow, backgroundColor } = useFixedFabAnimation()
46
+ const theme = useTheme()
47
+ const isMobile = useMediaQuery(theme.breakpoints.down('sm'))
46
48
  const classes = useStyles(props)
47
49
 
48
50
  return (
49
51
  <m.div
50
52
  style={{
51
- boxShadow,
52
- backgroundColor,
53
+ boxShadow: isMobile ? undefined : boxShadow,
54
+ backgroundColor: isMobile ? undefined : backgroundColor,
53
55
  width: 'inherit',
54
56
  borderRadius: 'inherit',
55
57
  }}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@graphcommerce/magento-cart",
3
- "version": "3.7.0",
3
+ "version": "3.7.1",
4
4
  "sideEffects": false,
5
5
  "prettier": "@graphcommerce/prettier-config-pwa",
6
6
  "browserslist": [
@@ -25,10 +25,10 @@
25
25
  "@graphcommerce/framer-scroller": "^1.0.4",
26
26
  "@graphcommerce/graphql": "^2.105.5",
27
27
  "@graphcommerce/image": "^2.105.4",
28
- "@graphcommerce/magento-customer": "^3.6.0",
28
+ "@graphcommerce/magento-customer": "^3.6.1",
29
29
  "@graphcommerce/magento-graphql": "^2.104.5",
30
- "@graphcommerce/magento-store": "^3.3.0",
31
- "@graphcommerce/next-ui": "^3.17.0",
30
+ "@graphcommerce/magento-store": "^3.3.1",
31
+ "@graphcommerce/next-ui": "^3.17.1",
32
32
  "@graphcommerce/react-hook-form": "^2.104.0",
33
33
  "@lingui/macro": "^3.12.1",
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": "6a39908a131938d9c3365cc937b92c1f1f8b33c6"
42
+ "gitHead": "e8578cc336e58d896531179f5fcb6973e8a983ce"
43
43
  }