@graphcommerce/magento-product 3.6.0 → 3.6.4
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,18 @@
|
|
|
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.6.4](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/magento-product@3.6.3...@graphcommerce/magento-product@3.6.4) (2021-11-27)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* incorrect usage of offsetTop ([94f1616](https://github.com/ho-nl/m2-pwa/commit/94f161638017b64d898a2ab990bf69d31dc38319))
|
|
12
|
+
* shadows ([8f43f33](https://github.com/ho-nl/m2-pwa/commit/8f43f33190e429e8abea8eddc0646ffd670f2ce8))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
6
18
|
# [3.6.0](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/magento-product@3.5.22...@graphcommerce/magento-product@3.6.0) (2021-11-12)
|
|
7
19
|
|
|
8
20
|
|
|
@@ -40,7 +40,7 @@ const useFilterRangeType = makeStyles(
|
|
|
40
40
|
marginLeft: `-${sliderThumbWidth * 0.5}px`,
|
|
41
41
|
marginTop: `-${sliderThumbWidth * 0.5}px`,
|
|
42
42
|
background: theme.palette.background.default,
|
|
43
|
-
boxShadow: theme.shadows[
|
|
43
|
+
boxShadow: theme.shadows[6],
|
|
44
44
|
},
|
|
45
45
|
},
|
|
46
46
|
}),
|
|
@@ -33,6 +33,7 @@ const useStyles = makeStyles(
|
|
|
33
33
|
},
|
|
34
34
|
},
|
|
35
35
|
container: {
|
|
36
|
+
position: 'relative',
|
|
36
37
|
maxWidth: '100%',
|
|
37
38
|
padding: 6,
|
|
38
39
|
paddingLeft: 0,
|
|
@@ -41,6 +42,16 @@ const useStyles = makeStyles(
|
|
|
41
42
|
background: theme.palette.background.default,
|
|
42
43
|
borderRadius: '99em',
|
|
43
44
|
},
|
|
45
|
+
},
|
|
46
|
+
shadow: {
|
|
47
|
+
pointerEvents: 'none',
|
|
48
|
+
zindex: '-1',
|
|
49
|
+
borderRadius: '99em',
|
|
50
|
+
position: 'absolute',
|
|
51
|
+
height: '100%',
|
|
52
|
+
width: '100%',
|
|
53
|
+
top: 0,
|
|
54
|
+
boxShadow: theme.shadows[6],
|
|
44
55
|
[theme.breakpoints.down('sm')]: {
|
|
45
56
|
boxShadow: 'none !important',
|
|
46
57
|
},
|
|
@@ -94,11 +105,12 @@ export default function ProductListFiltersContainer(props: ProductListFiltersCon
|
|
|
94
105
|
useEffect(() => {
|
|
95
106
|
const observer = new ResizeObserver(([entry]) => {
|
|
96
107
|
if (window.scrollY > 100) return
|
|
97
|
-
const offset = wrapperRef.current?.
|
|
108
|
+
const offset = wrapperRef.current?.getBoundingClientRect()?.top ?? 0
|
|
98
109
|
const elemHeigh = entry.contentRect.height
|
|
99
110
|
const nextOffset =
|
|
100
|
-
(
|
|
101
|
-
|
|
111
|
+
(
|
|
112
|
+
wrapperRef.current?.parentElement?.nextElementSibling as HTMLElement | null
|
|
113
|
+
)?.getBoundingClientRect()?.top ?? 0
|
|
102
114
|
const modifier = 5
|
|
103
115
|
|
|
104
116
|
setSpacing((nextOffset - elemHeigh - offset + 20) * modifier)
|
|
@@ -121,10 +133,7 @@ export default function ProductListFiltersContainer(props: ProductListFiltersCon
|
|
|
121
133
|
return scrollY.onChange(onCheckStickyChange)
|
|
122
134
|
}, [isSticky, scrollHalfway, scrollY])
|
|
123
135
|
|
|
124
|
-
const opacity = useTransform(scrollY, [startPosition, startPosition + spacing], [0,
|
|
125
|
-
const boxShadow = useMotionTemplate`
|
|
126
|
-
0 4px 12px 0 rgba(0, 0, 0, ${opacity})
|
|
127
|
-
`
|
|
136
|
+
const opacity = useTransform(scrollY, [startPosition, startPosition + spacing], [0, 1])
|
|
128
137
|
|
|
129
138
|
return (
|
|
130
139
|
<m.div className={classes.wrapper} ref={wrapperRef}>
|
|
@@ -132,17 +141,15 @@ export default function ProductListFiltersContainer(props: ProductListFiltersCon
|
|
|
132
141
|
<ScrollerButton direction='left' className={classes.sliderPrev}>
|
|
133
142
|
<SvgImageSimple src={iconChevronLeft} />
|
|
134
143
|
</ScrollerButton>
|
|
135
|
-
<
|
|
136
|
-
className={clsx(classes.container, isSticky && classes.containerSticky)}
|
|
137
|
-
style={{ boxShadow }}
|
|
138
|
-
>
|
|
144
|
+
<div className={clsx(classes.container, isSticky && classes.containerSticky)}>
|
|
139
145
|
<Scroller
|
|
140
146
|
className={clsx(classes.scroller, isSticky && classes.scrollerSticky)}
|
|
141
147
|
hideScrollbar
|
|
142
148
|
>
|
|
143
149
|
{children}
|
|
144
150
|
</Scroller>
|
|
145
|
-
|
|
151
|
+
<m.div className={classes.shadow} style={{ opacity }}></m.div>
|
|
152
|
+
</div>
|
|
146
153
|
<ScrollerButton direction='right' className={classes.sliderNext}>
|
|
147
154
|
<SvgImageSimple src={iconChevronRight} />
|
|
148
155
|
</ScrollerButton>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphcommerce/magento-product",
|
|
3
|
-
"version": "3.6.
|
|
3
|
+
"version": "3.6.4",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"prettier": "@graphcommerce/prettier-config-pwa",
|
|
6
6
|
"browserslist": [
|
|
@@ -24,9 +24,9 @@
|
|
|
24
24
|
"@graphcommerce/framer-scroller": "^1.0.4",
|
|
25
25
|
"@graphcommerce/graphql": "^2.105.5",
|
|
26
26
|
"@graphcommerce/image": "^2.105.4",
|
|
27
|
-
"@graphcommerce/magento-cart": "^3.7.
|
|
28
|
-
"@graphcommerce/magento-store": "^3.3.
|
|
29
|
-
"@graphcommerce/next-ui": "^3.
|
|
27
|
+
"@graphcommerce/magento-cart": "^3.7.4",
|
|
28
|
+
"@graphcommerce/magento-store": "^3.3.4",
|
|
29
|
+
"@graphcommerce/next-ui": "^3.18.2",
|
|
30
30
|
"@lingui/macro": "^3.12.1",
|
|
31
31
|
"@material-ui/core": "^4.12.3",
|
|
32
32
|
"@material-ui/lab": "^4.0.0-alpha.60",
|
|
@@ -38,5 +38,5 @@
|
|
|
38
38
|
"schema-dts": "^1.0.0",
|
|
39
39
|
"type-fest": "^2.5.1"
|
|
40
40
|
},
|
|
41
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "4d36627aeb43cba320c249b9a876384627064f18"
|
|
42
42
|
}
|