@graphcommerce/magento-cart 3.8.18 → 3.8.22
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 +11 -0
- package/components/CartFab/CartFab.tsx +17 -21
- package/package.json +10 -10
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.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)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* menuFab, cartFab shadows, darkTheme color and opacity bug ([6c7afa7](https://github.com/ho-nl/m2-pwa/commit/6c7afa7d3b584b455476aa26d95041c4cf6c1d0c))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
## [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
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
|
|
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
|
-
|
|
24
|
-
|
|
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
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphcommerce/magento-cart",
|
|
3
|
-
"version": "3.8.
|
|
3
|
+
"version": "3.8.22",
|
|
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.
|
|
25
|
-
"@graphcommerce/framer-scroller": "^1.1.
|
|
26
|
-
"@graphcommerce/graphql": "^2.105.
|
|
27
|
-
"@graphcommerce/image": "^2.105.
|
|
28
|
-
"@graphcommerce/magento-customer": "^3.6.
|
|
29
|
-
"@graphcommerce/magento-graphql": "^2.104.
|
|
30
|
-
"@graphcommerce/magento-store": "^3.3.
|
|
31
|
-
"@graphcommerce/next-ui": "^3.21.
|
|
24
|
+
"@graphcommerce/framer-next-pages": "^2.108.8",
|
|
25
|
+
"@graphcommerce/framer-scroller": "^1.1.18",
|
|
26
|
+
"@graphcommerce/graphql": "^2.105.12",
|
|
27
|
+
"@graphcommerce/image": "^2.105.11",
|
|
28
|
+
"@graphcommerce/magento-customer": "^3.6.25",
|
|
29
|
+
"@graphcommerce/magento-graphql": "^2.104.12",
|
|
30
|
+
"@graphcommerce/magento-store": "^3.3.25",
|
|
31
|
+
"@graphcommerce/next-ui": "^3.21.8",
|
|
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": "
|
|
42
|
+
"gitHead": "5ad26fe58ae85c8d776e3f571e96832f24811d5d"
|
|
43
43
|
}
|