@graphcommerce/next-ui 3.21.1 → 3.21.5

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.
@@ -10,7 +10,7 @@ export default function AnimatedRow(props: AnimatedRowProps) {
10
10
  return (
11
11
  <m.div
12
12
  {...props}
13
- layout
13
+ layout='size'
14
14
  initial={{ opacity: 0, height: 0 }}
15
15
  animate={{ opacity: 1, height: 'auto' }}
16
16
  exit={{ opacity: 0, height: 0 }}
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.21.5](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/next-ui@3.21.4...@graphcommerce/next-ui@3.21.5) (2021-12-20)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * animations would run on background page, make sure animations are not running when page is not active ([2fcf4b8](https://github.com/ho-nl/m2-pwa/commit/2fcf4b8a853108147477e3a67c7ea202abb2842f))
12
+
13
+
14
+
15
+
16
+
17
+ ## [3.21.4](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/next-ui@3.21.3...@graphcommerce/next-ui@3.21.4) (2021-12-20)
18
+
19
+
20
+ ### Bug Fixes
21
+
22
+ * **framer-scroller:** remove jank from scroller when opening ([c618bf2](https://github.com/ho-nl/m2-pwa/commit/c618bf290bd580fe5eb45663c44843dd751e00ed))
23
+
24
+
25
+
26
+
27
+
6
28
  ## [3.21.1](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/next-ui@3.21.0...@graphcommerce/next-ui@3.21.1) (2021-12-17)
7
29
 
8
30
 
@@ -80,12 +80,12 @@ export default function SidebarSlider(props: SidebarSliderProps) {
80
80
  {children}
81
81
  </Scroller>
82
82
  <div className={classes.centerLeft}>
83
- <ScrollerButton layout direction='left' className={classes.sliderButtons}>
83
+ <ScrollerButton direction='left' className={classes.sliderButtons}>
84
84
  <SvgImageSimple src={iconChevronLeft} />
85
85
  </ScrollerButton>
86
86
  </div>
87
87
  <div className={classes.centerRight}>
88
- <ScrollerButton layout direction='right' className={classes.sliderButtons}>
88
+ <ScrollerButton direction='right' className={classes.sliderButtons}>
89
89
  <SvgImageSimple src={iconChevronRight} />
90
90
  </ScrollerButton>
91
91
  </div>
@@ -1,4 +1,4 @@
1
- import { usePageRouter, useScrollOffset } from '@graphcommerce/framer-next-pages'
1
+ import { useScrollOffset } from '@graphcommerce/framer-next-pages'
2
2
  import { makeStyles, Theme } from '@material-ui/core'
3
3
  import clsx from 'clsx'
4
4
  import { useTransform, useViewportScroll } from 'framer-motion'
@@ -2,14 +2,7 @@ import { usePageContext, usePageRouter, useScrollOffset } from '@graphcommerce/f
2
2
  import { Scroller, useScrollerContext, useScrollTo } from '@graphcommerce/framer-scroller'
3
3
  import { useElementScroll, useIsomorphicLayoutEffect } from '@graphcommerce/framer-utils'
4
4
  import { makeStyles, Theme, ClickAwayListener } from '@material-ui/core'
5
- import {
6
- m,
7
- MotionValue,
8
- useDomEvent,
9
- useMotionValue,
10
- usePresence,
11
- useTransform,
12
- } from 'framer-motion'
5
+ import { m, useDomEvent, useMotionValue, usePresence, useTransform } from 'framer-motion'
13
6
  import React, { useCallback, useEffect, useRef } from 'react'
14
7
  import LayoutProvider from '../../Layout/components/LayoutProvider'
15
8
  import { UseStyles } from '../../Styles'
@@ -215,6 +208,7 @@ const useStyles = makeStyles(
215
208
  left: 0,
216
209
  backgroundColor: 'rgba(0, 0, 0, 0.5)',
217
210
  WebkitTapHighlightColor: 'transparent',
211
+ willChange: 'opacity',
218
212
  },
219
213
  }),
220
214
  { name: 'Overlay' },
@@ -334,7 +328,7 @@ export function LayoutOverlayBase(props: LayoutOverlayBaseProps) {
334
328
  // Create the exact position for the LayoutProvider which offsets the top of the overlay
335
329
  const offsetPageY = useScrollOffset().y
336
330
  const scrollWithoffset = useTransform(
337
- [scroll.y, positions.open.y, offsetY] as MotionValue<number | string>[],
331
+ [scroll.y, positions.open.y, offsetY],
338
332
  ([y, openY, offsetYv]: number[]) => Math.max(0, y - openY - offsetYv + offsetPageY),
339
333
  )
340
334
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@graphcommerce/next-ui",
3
- "version": "3.21.1",
3
+ "version": "3.21.5",
4
4
  "author": "",
5
5
  "license": "MIT",
6
6
  "scripts": {
@@ -10,18 +10,18 @@
10
10
  },
11
11
  "dependencies": {
12
12
  "@apollo/client": "^3.5.6",
13
- "@graphcommerce/framer-next-pages": "^2.108.4",
14
- "@graphcommerce/framer-scroller": "^1.1.11",
15
- "@graphcommerce/framer-utils": "^2.103.19",
16
- "@graphcommerce/graphql": "^2.105.9",
17
- "@graphcommerce/image": "^2.105.8",
13
+ "@graphcommerce/framer-next-pages": "^2.108.7",
14
+ "@graphcommerce/framer-scroller": "^1.1.15",
15
+ "@graphcommerce/framer-utils": "^2.103.20",
16
+ "@graphcommerce/graphql": "^2.105.11",
17
+ "@graphcommerce/image": "^2.105.10",
18
18
  "@lingui/macro": "^3.13.0",
19
19
  "@material-ui/core": "^4.12.3",
20
20
  "@material-ui/lab": "^4.0.0-alpha.60",
21
21
  "@material-ui/styles": "^4.11.4",
22
22
  "clsx": "^1.1.1",
23
- "framer-motion": "^5.5.1",
24
- "graphql": "^16.1.0",
23
+ "framer-motion": "^5.5.5",
24
+ "graphql": "^16.2.0",
25
25
  "next": "^12.0.7",
26
26
  "react": "^17.0.2",
27
27
  "react-dom": "^17.0.2",
@@ -32,10 +32,10 @@
32
32
  "type-fest": "^2.8.0"
33
33
  },
34
34
  "devDependencies": {
35
- "@graphcommerce/browserslist-config-pwa": "^3.0.2",
36
- "@graphcommerce/eslint-config-pwa": "^3.1.8",
37
- "@graphcommerce/prettier-config-pwa": "^3.0.4",
38
- "@graphcommerce/typescript-config-pwa": "^3.1.1",
35
+ "@graphcommerce/browserslist-config-pwa": "^3.0.3",
36
+ "@graphcommerce/eslint-config-pwa": "^3.1.9",
37
+ "@graphcommerce/prettier-config-pwa": "^3.0.5",
38
+ "@graphcommerce/typescript-config-pwa": "^3.1.2",
39
39
  "@playwright/test": "^1.17.1",
40
40
  "@types/react-is": "^17.0.3",
41
41
  "graphql-tag": "2.12.6",
@@ -52,5 +52,5 @@
52
52
  "project": "./tsconfig.json"
53
53
  }
54
54
  },
55
- "gitHead": "6cab980582a62a8eee8d5f9bd77583cabc32c6f8"
55
+ "gitHead": "ecbde6cbcb36e0e2429b6d777972c12c47822385"
56
56
  }