@graphcommerce/next-ui 3.8.1 → 3.10.2
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.
|
@@ -180,7 +180,7 @@ const useStyles = makeStyles(
|
|
|
180
180
|
},
|
|
181
181
|
},
|
|
182
182
|
backButton: {
|
|
183
|
-
background: theme.palette.background.
|
|
183
|
+
background: theme.palette.background.paper,
|
|
184
184
|
color: theme.palette.text.primary,
|
|
185
185
|
'&:hover': {
|
|
186
186
|
background: theme.palette.background.highlight,
|
|
@@ -8,7 +8,7 @@ import ShellBase, { PageLayoutBaseProps } from './ShellBase'
|
|
|
8
8
|
const useStyles = makeStyles(
|
|
9
9
|
(theme: Theme) => ({
|
|
10
10
|
root: {
|
|
11
|
-
background:
|
|
11
|
+
background: theme.palette.background.default,
|
|
12
12
|
minHeight: '100vh',
|
|
13
13
|
display: 'grid',
|
|
14
14
|
gridTemplateRows: `auto 1fr auto`,
|
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.10.0](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/next-ui@3.9.0...@graphcommerce/next-ui@3.10.0) (2021-10-27)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **nextjs:** upgraded to nextjs 12 ([9331bc8](https://github.com/ho-nl/m2-pwa/commit/9331bc801f6419522115cc47d291d49d608d5a90))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
# [3.9.0](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/next-ui@3.8.1...@graphcommerce/next-ui@3.9.0) (2021-10-25)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Features
|
|
21
|
+
|
|
22
|
+
* prepare for yarn 3 usage (not actually migrated because vercel doesn't support yarn 3) ([41734be](https://github.com/ho-nl/m2-pwa/commit/41734beaa016bf4c3487b3fbd5a402d8024e173f))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
6
28
|
# [3.8.0](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/next-ui@3.7.1...@graphcommerce/next-ui@3.8.0) (2021-10-21)
|
|
7
29
|
|
|
8
30
|
|
package/index.ts
CHANGED
|
@@ -153,8 +153,6 @@ export { default as ToggleButton } from './ToggleButton'
|
|
|
153
153
|
export type { ToggleButtonProps } from './ToggleButton'
|
|
154
154
|
export { default as ToggleButtonGroup } from './ToggleButtonGroup'
|
|
155
155
|
export type { ToggleButtonPropsBase } from './ToggleButtonGroup'
|
|
156
|
-
export * from './useIntersectionObserver'
|
|
157
|
-
export { default as useIntersectionObserver } from './useIntersectionObserver'
|
|
158
156
|
export * from './UspList'
|
|
159
157
|
export { default as UspList } from './UspList'
|
|
160
158
|
export * from './UspList/UspListItem'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphcommerce/next-ui",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.10.2",
|
|
4
4
|
"author": "",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"scripts": {
|
|
@@ -10,12 +10,12 @@
|
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@apollo/client": "^3.4.16",
|
|
13
|
-
"@graphcommerce/framer-next-pages": "^2.
|
|
14
|
-
"@graphcommerce/framer-scroller": "^0.
|
|
15
|
-
"@graphcommerce/framer-sheet": "^2.105.
|
|
16
|
-
"@graphcommerce/framer-utils": "^2.103.
|
|
17
|
-
"@graphcommerce/graphql": "^2.
|
|
18
|
-
"@graphcommerce/image": "^2.
|
|
13
|
+
"@graphcommerce/framer-next-pages": "^2.107.1",
|
|
14
|
+
"@graphcommerce/framer-scroller": "^0.4.1",
|
|
15
|
+
"@graphcommerce/framer-sheet": "^2.105.13",
|
|
16
|
+
"@graphcommerce/framer-utils": "^2.103.12",
|
|
17
|
+
"@graphcommerce/graphql": "^2.105.1",
|
|
18
|
+
"@graphcommerce/image": "^2.105.1",
|
|
19
19
|
"@graphql-typed-document-node/core": "^3.1.0",
|
|
20
20
|
"@material-ui/core": "^4.12.3",
|
|
21
21
|
"@material-ui/lab": "^4.0.0-alpha.60",
|
|
@@ -23,8 +23,7 @@
|
|
|
23
23
|
"clsx": "^1.1.1",
|
|
24
24
|
"framer-motion": "^4.1.17",
|
|
25
25
|
"graphql": "^15.6.1",
|
|
26
|
-
"next": "^
|
|
27
|
-
"node-fetch": "^3.0.0",
|
|
26
|
+
"next": "^12.0.1",
|
|
28
27
|
"react": "^17.0.2",
|
|
29
28
|
"react-dom": "^17.0.2",
|
|
30
29
|
"react-focus-lock": "^2.5.2",
|
|
@@ -35,11 +34,11 @@
|
|
|
35
34
|
},
|
|
36
35
|
"devDependencies": {
|
|
37
36
|
"@graphcommerce/browserslist-config-pwa": "^3.0.2",
|
|
38
|
-
"@graphcommerce/eslint-config-pwa": "^3.1.
|
|
37
|
+
"@graphcommerce/eslint-config-pwa": "^3.1.2",
|
|
39
38
|
"@graphcommerce/prettier-config-pwa": "^3.0.3",
|
|
40
39
|
"@graphcommerce/typescript-config-pwa": "^3.1.1",
|
|
41
|
-
"@playwright/test": "^1.
|
|
42
|
-
"@types/react-is": "^17.0.
|
|
40
|
+
"@playwright/test": "^1.16.2",
|
|
41
|
+
"@types/react-is": "^17.0.3",
|
|
43
42
|
"graphql-tag": "2.12.5",
|
|
44
43
|
"typescript": "^4.4.4"
|
|
45
44
|
},
|
|
@@ -54,5 +53,5 @@
|
|
|
54
53
|
"project": "./tsconfig.json"
|
|
55
54
|
}
|
|
56
55
|
},
|
|
57
|
-
"gitHead": "
|
|
56
|
+
"gitHead": "7f5e13261ccb398f5a7e6bac70d3f4d5f757fa5f"
|
|
58
57
|
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { useState, RefObject, useEffect } from 'react'
|
|
2
|
-
|
|
3
|
-
export type UseIntersectionObserverOptions = {
|
|
4
|
-
ref: RefObject<Element> | null
|
|
5
|
-
rootRef?: RefObject<Element> | null
|
|
6
|
-
} & Pick<IntersectionObserverInit, 'rootMargin' | 'threshold'>
|
|
7
|
-
|
|
8
|
-
export default function useIntersectionObserver({
|
|
9
|
-
ref,
|
|
10
|
-
rootRef,
|
|
11
|
-
rootMargin,
|
|
12
|
-
threshold,
|
|
13
|
-
}: UseIntersectionObserverOptions) {
|
|
14
|
-
const [entry, setEntry] = useState<IntersectionObserverEntry | undefined>()
|
|
15
|
-
|
|
16
|
-
const tresholdJson = JSON.stringify(threshold)
|
|
17
|
-
useEffect(() => {
|
|
18
|
-
if (typeof window === 'undefined' || !ref?.current) return () => {}
|
|
19
|
-
|
|
20
|
-
const observer = new IntersectionObserver((entries) => setEntry(entries[entries.length - 1]), {
|
|
21
|
-
root: rootRef?.current,
|
|
22
|
-
rootMargin,
|
|
23
|
-
threshold: JSON.parse(tresholdJson) as IntersectionObserverInit['threshold'],
|
|
24
|
-
})
|
|
25
|
-
|
|
26
|
-
observer.observe(ref.current)
|
|
27
|
-
return () => observer.disconnect()
|
|
28
|
-
}, [ref, rootMargin, rootRef, tresholdJson])
|
|
29
|
-
|
|
30
|
-
return entry
|
|
31
|
-
}
|