@graphcommerce/next-ui 3.0.3 → 3.1.0
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/AppShell/AppShellHeader/index.tsx +1 -1
- package/AppShell/DesktopNavBar.tsx +1 -1
- package/AppShell/SheetShellBase/index.tsx +5 -2
- package/AppShell/SheetShellBase/useSheetStyles.ts +1 -1
- package/AppShell/SheetShellDragIndicator/index.tsx +9 -2
- package/CHANGELOG.md +11 -0
- package/ChipMenu/index.tsx +1 -1
- package/FramerNextPagesSlider/Slide.tsx +1 -1
- package/FramerNextPagesSlider/Slider.tsx +1 -1
- package/FramerScroller/components/SidebarGallery.tsx +19 -7
- package/FramerScroller/components/SidebarSlider.tsx +2 -2
- package/Row/ContentLinks/index.tsx +1 -1
- package/SvgImage/SvgImageSimple.tsx +1 -1
- package/SvgImage/index.tsx +1 -1
- package/package.json +11 -12
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Fab, makeStyles, Theme } from '@material-ui/core'
|
|
2
1
|
import { useHistoryLink, usePageContext, usePageRouter } from '@graphcommerce/framer-next-pages'
|
|
2
|
+
import { Fab, makeStyles, Theme } from '@material-ui/core'
|
|
3
3
|
import clsx from 'clsx'
|
|
4
4
|
import { m, MotionValue, useMotionValue, useTransform } from 'framer-motion'
|
|
5
5
|
import PageLink from 'next/link'
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Link, makeStyles, Theme } from '@material-ui/core'
|
|
2
1
|
import { Scroller, ScrollerButton, ScrollerProvider } from '@graphcommerce/framer-scroller'
|
|
2
|
+
import { Link, makeStyles, Theme } from '@material-ui/core'
|
|
3
3
|
import clsx from 'clsx'
|
|
4
4
|
import PageLink from 'next/link'
|
|
5
5
|
import { useRouter } from 'next/router'
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import { makeStyles, Theme } from '@material-ui/core'
|
|
2
1
|
import { usePageContext, usePageRouter } from '@graphcommerce/framer-next-pages'
|
|
3
2
|
import {
|
|
3
|
+
ClassKeys,
|
|
4
4
|
Sheet,
|
|
5
5
|
SheetBackdrop,
|
|
6
6
|
SheetContainer,
|
|
7
7
|
SheetPanel,
|
|
8
8
|
SheetProps,
|
|
9
9
|
SnapPoint,
|
|
10
|
-
styles,
|
|
10
|
+
styles as sheetStyles,
|
|
11
11
|
} from '@graphcommerce/framer-sheet'
|
|
12
|
+
import { makeStyles, StyleRules, Theme } from '@material-ui/core'
|
|
12
13
|
import { useDomEvent } from 'framer-motion'
|
|
13
14
|
import { useRouter } from 'next/router'
|
|
14
15
|
import React, { useRef } from 'react'
|
|
@@ -23,6 +24,8 @@ export type SheetShellBaseProps = {
|
|
|
23
24
|
} & Pick<SheetProps, 'size' | 'variant'> &
|
|
24
25
|
PageLayoutBaseProps
|
|
25
26
|
|
|
27
|
+
const styles = sheetStyles as StyleRules<ClassKeys>
|
|
28
|
+
|
|
26
29
|
const useStyles = makeStyles(
|
|
27
30
|
(theme: Theme) => ({
|
|
28
31
|
container: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import styles, { ClassKeys } from '@graphcommerce/framer-sheet/styles'
|
|
1
2
|
import { makeStyles, StyleRules, Theme } from '@material-ui/core'
|
|
2
3
|
import { ClassNameMap } from '@material-ui/styles'
|
|
3
|
-
import styles, { ClassKeys } from '@graphcommerce/framer-sheet/styles'
|
|
4
4
|
|
|
5
5
|
type UseSheetStylesReturn = (props?: Record<string, unknown>) => ClassNameMap<ClassKeys>
|
|
6
6
|
|
|
@@ -1,8 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import {
|
|
2
|
+
SheetDragIndicator,
|
|
3
|
+
SheetDragIndicatorProps,
|
|
4
|
+
styles as sheetStyles,
|
|
5
|
+
ClassKeys,
|
|
6
|
+
} from '@graphcommerce/framer-sheet'
|
|
7
|
+
import { makeStyles, StyleRules } from '@material-ui/core'
|
|
3
8
|
import React from 'react'
|
|
4
9
|
import responsiveVal from '../../Styles/responsiveVal'
|
|
5
10
|
|
|
11
|
+
const styles = sheetStyles as StyleRules<ClassKeys>
|
|
12
|
+
|
|
6
13
|
const useStyles = makeStyles(
|
|
7
14
|
() => ({
|
|
8
15
|
indicatorRoot: {
|
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.1.0](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/next-ui@3.0.6...@graphcommerce/next-ui@3.1.0) (2021-10-01)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **sidebar-gallery:** close using esc key ([fd46fe1](https://github.com/ho-nl/m2-pwa/commit/fd46fe1029f436c1e0e04cbcc3b66deca4d1b0b6))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
## [3.0.1](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/next-ui@3.0.0...@graphcommerce/next-ui@3.0.1) (2021-09-27)
|
|
7
18
|
|
|
8
19
|
**Note:** Version bump only for package @graphcommerce/next-ui
|
package/ChipMenu/index.tsx
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Chip, ChipProps, makeStyles, Menu, Theme } from '@material-ui/core'
|
|
2
2
|
import clsx from 'clsx'
|
|
3
3
|
import React, { PropsWithChildren, useState } from 'react'
|
|
4
|
-
import { iconChevronDown, iconChevronUp, iconCloseCircle } from '../icons'
|
|
5
4
|
import SectionHeader from '../SectionHeader'
|
|
6
5
|
import responsiveVal from '../Styles/responsiveVal'
|
|
7
6
|
import SvgImage from '../SvgImage'
|
|
7
|
+
import { iconChevronDown, iconChevronUp, iconCloseCircle } from '../icons'
|
|
8
8
|
|
|
9
9
|
export const useChipMenuStyles = makeStyles(
|
|
10
10
|
(theme: Theme) => ({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { makeStyles } from '@material-ui/core'
|
|
2
1
|
import { usePageContext, usePageRouter } from '@graphcommerce/framer-next-pages'
|
|
3
2
|
import { SPRING_ANIM } from '@graphcommerce/framer-sheet'
|
|
3
|
+
import { makeStyles } from '@material-ui/core'
|
|
4
4
|
import { m, motionValue, useElementScroll } from 'framer-motion'
|
|
5
5
|
import React, { useEffect, useRef } from 'react'
|
|
6
6
|
import { ScrollPositions } from './types'
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { makeStyles } from '@material-ui/styles'
|
|
2
1
|
import { usePageContext, usePageRouter } from '@graphcommerce/framer-next-pages'
|
|
2
|
+
import { makeStyles } from '@material-ui/styles'
|
|
3
3
|
import { AnimatePresence } from 'framer-motion'
|
|
4
4
|
import React, { useRef } from 'react'
|
|
5
5
|
import RouterSlide from './Slide'
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { Fab, makeStyles, Theme, useTheme } from '@material-ui/core'
|
|
2
1
|
import {
|
|
2
|
+
CenterSlide,
|
|
3
|
+
MotionImageAspect,
|
|
4
|
+
MotionImageAspectProps,
|
|
5
|
+
Scroller,
|
|
3
6
|
ScrollerButton,
|
|
4
7
|
ScrollerDots,
|
|
5
8
|
ScrollerProvider,
|
|
6
|
-
Scroller,
|
|
7
|
-
MotionImageAspectProps,
|
|
8
|
-
CenterSlide,
|
|
9
|
-
MotionImageAspect,
|
|
10
9
|
} from '@graphcommerce/framer-scroller'
|
|
11
10
|
import { clientSize, useMotionValueValue } from '@graphcommerce/framer-utils'
|
|
11
|
+
import { Fab, makeStyles, Theme, useTheme } from '@material-ui/core'
|
|
12
12
|
import clsx from 'clsx'
|
|
13
|
-
import { m } from 'framer-motion'
|
|
14
|
-
import React, { useState } from 'react'
|
|
13
|
+
import { m, useDomEvent } from 'framer-motion'
|
|
14
|
+
import React, { useRef, useState } from 'react'
|
|
15
15
|
import { UseStyles } from '../../Styles'
|
|
16
16
|
import responsiveVal from '../../Styles/responsiveVal'
|
|
17
17
|
import SvgImage from '../../SvgImage'
|
|
@@ -183,6 +183,18 @@ export default function SidebarGallery(props: SidebarGalleryProps) {
|
|
|
183
183
|
|
|
184
184
|
const theme = useTheme()
|
|
185
185
|
|
|
186
|
+
const windowRef = useRef(typeof window !== 'undefined' ? window : null)
|
|
187
|
+
|
|
188
|
+
const handleEscapeKey = (e: KeyboardEvent | Event) => {
|
|
189
|
+
if (zoomed) {
|
|
190
|
+
if ((e as KeyboardEvent)?.key === 'Escape') {
|
|
191
|
+
toggle()
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
useDomEvent(windowRef, 'keyup', handleEscapeKey, { passive: true })
|
|
197
|
+
|
|
186
198
|
return (
|
|
187
199
|
<ScrollerProvider scrollSnapAlign='center'>
|
|
188
200
|
<m.div layout className={clsxZoom('root')}>
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { relative } from 'path/posix'
|
|
2
|
-
import { Theme } from '@material-ui/core'
|
|
3
|
-
import { makeStyles } from '@material-ui/styles'
|
|
4
2
|
import {
|
|
5
3
|
Scroller,
|
|
6
4
|
ScrollerButton,
|
|
7
5
|
ScrollerPageCounter,
|
|
8
6
|
ScrollerProvider,
|
|
9
7
|
} from '@graphcommerce/framer-scroller'
|
|
8
|
+
import { Theme } from '@material-ui/core'
|
|
9
|
+
import { makeStyles } from '@material-ui/styles'
|
|
10
10
|
import React, { ReactNode } from 'react'
|
|
11
11
|
import { SvgImageSimple, iconChevronLeft, iconChevronRight } from '../..'
|
|
12
12
|
import { UseStyles } from '../../Styles'
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Container, makeStyles, Theme, Typography } from '@material-ui/core'
|
|
2
1
|
import { Scroller, ScrollerProvider } from '@graphcommerce/framer-scroller'
|
|
2
|
+
import { Container, makeStyles, Theme, Typography } from '@material-ui/core'
|
|
3
3
|
import React from 'react'
|
|
4
4
|
import { UseStyles } from '../../Styles'
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { makeStyles, capitalize, Theme } from '@material-ui/core'
|
|
2
1
|
import { Image, ImageProps } from '@graphcommerce/image'
|
|
2
|
+
import { makeStyles, capitalize, Theme } from '@material-ui/core'
|
|
3
3
|
import clsx from 'clsx'
|
|
4
4
|
import { forwardRef } from 'react'
|
|
5
5
|
import responsiveVal from '../Styles/responsiveVal'
|
package/SvgImage/index.tsx
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphcommerce/next-ui",
|
|
3
|
-
"version": "3.0
|
|
3
|
+
"version": "3.1.0",
|
|
4
4
|
"author": "",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"scripts": {
|
|
@@ -10,12 +10,12 @@
|
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@apollo/client": "^3.3.21",
|
|
13
|
-
"@graphcommerce/framer-next-pages": "^2.106.
|
|
14
|
-
"@graphcommerce/framer-scroller": "^0.2.
|
|
15
|
-
"@graphcommerce/framer-sheet": "^2.105.
|
|
16
|
-
"@graphcommerce/framer-utils": "^2.103.
|
|
17
|
-
"@graphcommerce/graphql": "^2.103.
|
|
18
|
-
"@graphcommerce/image": "^2.104.
|
|
13
|
+
"@graphcommerce/framer-next-pages": "^2.106.5",
|
|
14
|
+
"@graphcommerce/framer-scroller": "^0.2.5",
|
|
15
|
+
"@graphcommerce/framer-sheet": "^2.105.4",
|
|
16
|
+
"@graphcommerce/framer-utils": "^2.103.4",
|
|
17
|
+
"@graphcommerce/graphql": "^2.103.4",
|
|
18
|
+
"@graphcommerce/image": "^2.104.5",
|
|
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",
|
|
@@ -35,12 +35,11 @@
|
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@graphcommerce/browserslist-config-pwa": "^3.0.1",
|
|
38
|
-
"@graphcommerce/eslint-config-pwa": "^3.0.
|
|
38
|
+
"@graphcommerce/eslint-config-pwa": "^3.0.4",
|
|
39
39
|
"@graphcommerce/prettier-config-pwa": "^3.0.2",
|
|
40
|
-
"@graphcommerce/typescript-config-pwa": "^3.0
|
|
40
|
+
"@graphcommerce/typescript-config-pwa": "^3.1.0",
|
|
41
41
|
"@playwright/test": "^1.15.0",
|
|
42
|
-
"@
|
|
43
|
-
"@types/react": "^17.0.24",
|
|
42
|
+
"@types/react": "^17.0.25",
|
|
44
43
|
"@types/react-dom": "^17.0.9",
|
|
45
44
|
"@types/react-is": "^17.0.2",
|
|
46
45
|
"graphql-tag": "2.12.5",
|
|
@@ -57,5 +56,5 @@
|
|
|
57
56
|
"project": "./tsconfig.json"
|
|
58
57
|
}
|
|
59
58
|
},
|
|
60
|
-
"gitHead": "
|
|
59
|
+
"gitHead": "88c9c0b170964ec794f59c97bac253a29a7d58e0"
|
|
61
60
|
}
|