@graphcommerce/next-ui 3.1.7 → 3.2.3
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/DesktopNavBar.tsx +47 -11
- package/AppShell/MenuFab.tsx +5 -0
- package/Button/index.tsx +1 -1
- package/CHANGELOG.md +58 -0
- package/ChipMenu/index.tsx +9 -2
- package/FramerScroller/components/SidebarGallery.tsx +59 -24
- package/FramerScroller/components/SidebarSlider.tsx +2 -3
- package/icons/icon_fullscreen.svg +1 -0
- package/icons/icon_fullscreen_exit.svg +1 -0
- package/icons/index.tsx +2 -2
- package/package.json +7 -7
- package/icons/icon_collapse_vertical.svg +0 -11
- package/icons/icon_expand_vertical.svg +0 -11
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Scroller, ScrollerButton, ScrollerProvider } from '@graphcommerce/framer-scroller'
|
|
2
2
|
import { Link, makeStyles, Theme } from '@material-ui/core'
|
|
3
3
|
import clsx from 'clsx'
|
|
4
|
+
import { m } from 'framer-motion'
|
|
4
5
|
import PageLink from 'next/link'
|
|
5
6
|
import { useRouter } from 'next/router'
|
|
6
7
|
import React from 'react'
|
|
@@ -25,20 +26,33 @@ const useStyles = makeStyles(
|
|
|
25
26
|
padding: '0 40px',
|
|
26
27
|
minHeight: 40,
|
|
27
28
|
},
|
|
28
|
-
|
|
29
|
-
pointerEvents: 'all',
|
|
29
|
+
prevNextBtnWrapper: {
|
|
30
30
|
position: 'absolute',
|
|
31
|
-
|
|
32
|
-
top: 5,
|
|
33
|
-
[theme.breakpoints.down('sm')]: { display: 'none' },
|
|
34
|
-
boxShadow: 'none',
|
|
31
|
+
top: 0,
|
|
35
32
|
},
|
|
36
|
-
|
|
33
|
+
left: {
|
|
37
34
|
left: 0,
|
|
38
35
|
},
|
|
39
|
-
|
|
36
|
+
right: {
|
|
40
37
|
right: 0,
|
|
41
38
|
},
|
|
39
|
+
prevNextBtn: {
|
|
40
|
+
pointerEvents: 'all',
|
|
41
|
+
background: theme.palette.background.default,
|
|
42
|
+
boxShadow: 'none',
|
|
43
|
+
height: 48,
|
|
44
|
+
[theme.breakpoints.down('sm')]: {
|
|
45
|
+
display: 'none',
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
prevBtn: {
|
|
49
|
+
borderTopLeftRadius: 0,
|
|
50
|
+
borderBottomLeftRadius: 0,
|
|
51
|
+
},
|
|
52
|
+
nextBtn: {
|
|
53
|
+
borderTopRightRadius: 0,
|
|
54
|
+
borderBottomRightRadius: 0,
|
|
55
|
+
},
|
|
42
56
|
link: {
|
|
43
57
|
whiteSpace: 'nowrap',
|
|
44
58
|
color: 'black',
|
|
@@ -89,22 +103,44 @@ export default function DesktopNavBar(props: MenuTabsProps) {
|
|
|
89
103
|
</Link>
|
|
90
104
|
</PageLink>
|
|
91
105
|
))}
|
|
106
|
+
</Scroller>
|
|
107
|
+
|
|
108
|
+
<m.div className={clsx(classes.prevNextBtnWrapper, classes.left)}>
|
|
92
109
|
<ScrollerButton
|
|
93
110
|
direction='left'
|
|
94
111
|
size='small'
|
|
95
|
-
|
|
112
|
+
classes={{ root: clsx(classes.prevNextBtn, classes.prevBtn) }}
|
|
96
113
|
>
|
|
97
114
|
<SvgImageSimple src={iconChevronLeft} />
|
|
98
115
|
</ScrollerButton>
|
|
116
|
+
</m.div>
|
|
117
|
+
|
|
118
|
+
<m.div className={clsx(classes.prevNextBtnWrapper, classes.right)}>
|
|
99
119
|
<ScrollerButton
|
|
100
120
|
direction='right'
|
|
101
121
|
size='small'
|
|
102
|
-
|
|
122
|
+
classes={{ root: clsx(classes.prevNextBtn, classes.nextBtn) }}
|
|
103
123
|
>
|
|
104
124
|
<SvgImageSimple src={iconChevronRight} />
|
|
105
125
|
</ScrollerButton>
|
|
106
|
-
</
|
|
126
|
+
</m.div>
|
|
107
127
|
</div>
|
|
128
|
+
|
|
129
|
+
{/* <ScrollerButton
|
|
130
|
+
direction='left'
|
|
131
|
+
size='small'
|
|
132
|
+
className={clsx(classes.prevNext, classes.prev)}
|
|
133
|
+
>
|
|
134
|
+
<SvgImageSimple src={iconChevronLeft} />
|
|
135
|
+
</ScrollerButton>
|
|
136
|
+
|
|
137
|
+
<ScrollerButton
|
|
138
|
+
direction='right'
|
|
139
|
+
size='small'
|
|
140
|
+
className={clsx(classes.prevNext, classes.next)}
|
|
141
|
+
>
|
|
142
|
+
<SvgImageSimple src={iconChevronRight} />
|
|
143
|
+
</ScrollerButton> */}
|
|
108
144
|
</ScrollerProvider>
|
|
109
145
|
)
|
|
110
146
|
}
|
package/AppShell/MenuFab.tsx
CHANGED
|
@@ -91,6 +91,11 @@ export default function MenuFab(props: MenuFabProps) {
|
|
|
91
91
|
onClose={() => setOpenEl(null)}
|
|
92
92
|
classes={{ paper: classes.menu }}
|
|
93
93
|
disableScrollLock
|
|
94
|
+
transitionDuration={{
|
|
95
|
+
appear: 175,
|
|
96
|
+
enter: 175,
|
|
97
|
+
exit: 175,
|
|
98
|
+
}}
|
|
94
99
|
>
|
|
95
100
|
{search && (
|
|
96
101
|
<List>
|
package/Button/index.tsx
CHANGED
|
@@ -56,7 +56,7 @@ const useStyles = makeStyles<
|
|
|
56
56
|
[theme.breakpoints.up('md')]: {
|
|
57
57
|
background: theme.palette.secondary.main,
|
|
58
58
|
color: theme.palette.secondary.contrastText,
|
|
59
|
-
boxShadow: theme.shadows[
|
|
59
|
+
boxShadow: theme.shadows[6],
|
|
60
60
|
borderRadius: 25,
|
|
61
61
|
padding: '6px 16px',
|
|
62
62
|
fontWeight: theme.typography.fontWeightBold,
|
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,64 @@
|
|
|
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.2.3](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/next-ui@3.2.2...@graphcommerce/next-ui@3.2.3) (2021-10-11)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **desktop-nav-bar:** prev/next button alignment in menu ([c7fabf0](https://github.com/ho-nl/m2-pwa/commit/c7fabf0474100aaf40a7526858fa2b01566b3250))
|
|
12
|
+
* **section-heeader-filter-items:** remove large paddings ([18f4d77](https://github.com/ho-nl/m2-pwa/commit/18f4d77e4eb1b029bf2e5656b753e2f18fde90ab))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
## [3.2.2](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/next-ui@3.2.1...@graphcommerce/next-ui@3.2.2) (2021-10-11)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
### Bug Fixes
|
|
22
|
+
|
|
23
|
+
* **menu-fab:** animation duration ([5b9ece2](https://github.com/ho-nl/m2-pwa/commit/5b9ece293fb7e12663386f9f9cbc99bc4e22aaa9))
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
## [3.2.1](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/next-ui@3.2.0...@graphcommerce/next-ui@3.2.1) (2021-10-11)
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
### Bug Fixes
|
|
33
|
+
|
|
34
|
+
* **framer-scroller:** dots should have a background ([8f2e1a1](https://github.com/ho-nl/m2-pwa/commit/8f2e1a1ffc9de3369938fe2f9e9f25f592739d8d))
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
# [3.2.0](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/next-ui@3.1.7...@graphcommerce/next-ui@3.2.0) (2021-10-09)
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
### Bug Fixes
|
|
44
|
+
|
|
45
|
+
* **framer-scroller:** pan snap does not work on mobile ([660f242](https://github.com/ho-nl/m2-pwa/commit/660f242a38558669fa896a74e14cafdd85069d57))
|
|
46
|
+
* **framer-slider:** route changes ([4cadbea](https://github.com/ho-nl/m2-pwa/commit/4cadbea3e494326377e74e2fa9370ab80f8d8c35))
|
|
47
|
+
* make sure the gallery never gets higher than 100% ([1eae8c7](https://github.com/ho-nl/m2-pwa/commit/1eae8c7cfb2a9e67f03f1e4e4db5c95213d2dbe0))
|
|
48
|
+
* poistioning on mobile ([bec497f](https://github.com/ho-nl/m2-pwa/commit/bec497fca426346b80b453a3871b9c66521a2161))
|
|
49
|
+
* **sidebar-gallery:** differentiate drag from click ([acd408e](https://github.com/ho-nl/m2-pwa/commit/acd408e400f8285e2b3a9105b4694d5fd839dd99))
|
|
50
|
+
* **sidebar-gallery:** push gallery to history one time ([2c45b64](https://github.com/ho-nl/m2-pwa/commit/2c45b64e171577f7b584662d56416eeae4a22554))
|
|
51
|
+
* **sidebar-gallery:** route handling ([1c3b8b1](https://github.com/ho-nl/m2-pwa/commit/1c3b8b1687b0bf637da6c88d2d9b30a734b98d11))
|
|
52
|
+
* **sidebar-gallery:** use fullscreen and fullscreen exit icons ([1328d22](https://github.com/ho-nl/m2-pwa/commit/1328d220030f766be2d4046abd87d45175e4fe38))
|
|
53
|
+
* use better URL handling and remove drag temporarily ([0b99387](https://github.com/ho-nl/m2-pwa/commit/0b993876280270320eef5301130c5cc3eb339ea9))
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
### Features
|
|
57
|
+
|
|
58
|
+
* **sidebar-gallery:** toggle with browser back buttons ([a2f804b](https://github.com/ho-nl/m2-pwa/commit/a2f804b0cedb98df8f6a7b197aeeeeda43c6b1ba))
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
|
|
6
64
|
## [3.1.7](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/next-ui@3.1.6...@graphcommerce/next-ui@3.1.7) (2021-10-08)
|
|
7
65
|
|
|
8
66
|
|
package/ChipMenu/index.tsx
CHANGED
|
@@ -55,6 +55,9 @@ export const useChipMenuStyles = makeStyles(
|
|
|
55
55
|
outline: 'none',
|
|
56
56
|
},
|
|
57
57
|
},
|
|
58
|
+
sectionHeaderWrapper: {
|
|
59
|
+
marginTop: 10,
|
|
60
|
+
},
|
|
58
61
|
}),
|
|
59
62
|
{ name: 'ChipMenu' },
|
|
60
63
|
)
|
|
@@ -109,7 +112,6 @@ export default function ChipMenu(props: ChipMenuProps) {
|
|
|
109
112
|
selectedAndMenuHidden && classes.chipSelected,
|
|
110
113
|
)}
|
|
111
114
|
/>
|
|
112
|
-
|
|
113
115
|
<Menu
|
|
114
116
|
anchorEl={openEl}
|
|
115
117
|
open={!!openEl}
|
|
@@ -122,7 +124,12 @@ export default function ChipMenu(props: ChipMenuProps) {
|
|
|
122
124
|
anchorOrigin={{ horizontal: 'left', vertical: 'bottom' }}
|
|
123
125
|
classes={{ paper: classes.menuPaper, list: classes.menuList }}
|
|
124
126
|
>
|
|
125
|
-
<SectionHeader
|
|
127
|
+
<SectionHeader
|
|
128
|
+
labelLeft={label ?? ''}
|
|
129
|
+
labelRight={labelRight ?? ''}
|
|
130
|
+
usePadding
|
|
131
|
+
classes={{ sectionHeaderWrapper: classes.sectionHeaderWrapper }}
|
|
132
|
+
/>
|
|
126
133
|
{children}
|
|
127
134
|
</Menu>
|
|
128
135
|
</>
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { usePrevPageRouter } from '@graphcommerce/framer-next-pages/hooks/usePrevPageRouter'
|
|
1
2
|
import {
|
|
2
3
|
CenterSlide,
|
|
3
4
|
MotionImageAspect,
|
|
@@ -8,24 +9,21 @@ import {
|
|
|
8
9
|
ScrollerProvider,
|
|
9
10
|
} from '@graphcommerce/framer-scroller'
|
|
10
11
|
import { clientSize, useMotionValueValue } from '@graphcommerce/framer-utils'
|
|
11
|
-
import { Fab, makeStyles, Theme, useTheme } from '@material-ui/core'
|
|
12
|
+
import { Fab, makeStyles, Theme, useTheme, alpha } from '@material-ui/core'
|
|
12
13
|
import clsx from 'clsx'
|
|
13
|
-
import { m, useDomEvent } from 'framer-motion'
|
|
14
|
-
import
|
|
14
|
+
import { m, useDomEvent, useMotionValue } from 'framer-motion'
|
|
15
|
+
import { useRouter } from 'next/router'
|
|
16
|
+
import React, { useEffect, useRef } from 'react'
|
|
15
17
|
import { UseStyles } from '../../Styles'
|
|
16
18
|
import responsiveVal from '../../Styles/responsiveVal'
|
|
17
19
|
import SvgImage from '../../SvgImage'
|
|
18
20
|
import SvgImageSimple from '../../SvgImage/SvgImageSimple'
|
|
19
|
-
import {
|
|
20
|
-
iconChevronLeft,
|
|
21
|
-
iconChevronRight,
|
|
22
|
-
iconCollapseVertical,
|
|
23
|
-
iconExpandVertical,
|
|
24
|
-
} from '../../icons'
|
|
21
|
+
import { iconChevronLeft, iconChevronRight, iconFullscreen, iconFullscreenExit } from '../../icons'
|
|
25
22
|
|
|
26
23
|
type StyleProps = {
|
|
27
24
|
aspectRatio: [number, number]
|
|
28
25
|
clientHeight: number
|
|
26
|
+
classes?: Record<string, unknown>
|
|
29
27
|
}
|
|
30
28
|
|
|
31
29
|
const useStyles = makeStyles(
|
|
@@ -42,7 +40,7 @@ const useStyles = makeStyles(
|
|
|
42
40
|
rootZoomed: {
|
|
43
41
|
position: 'relative',
|
|
44
42
|
zIndex: theme.zIndex.modal,
|
|
45
|
-
marginTop:
|
|
43
|
+
marginTop: `calc(${theme.page.headerInnerHeight.sm} * -1)`,
|
|
46
44
|
[theme.breakpoints.up('md')]: {
|
|
47
45
|
marginTop: `calc(${theme.page.headerInnerHeight.md} * -1 - ${theme.spacings.sm})`,
|
|
48
46
|
},
|
|
@@ -79,8 +77,12 @@ const useStyles = makeStyles(
|
|
|
79
77
|
gridAutoFlow: `column`,
|
|
80
78
|
gridTemplateColumns: `repeat(100, 100%)`,
|
|
81
79
|
gridTemplateRows: `100%`,
|
|
80
|
+
cursor: 'zoom-in',
|
|
82
81
|
},
|
|
83
|
-
|
|
82
|
+
scrollerZoomed: ({ clientHeight }: StyleProps) => ({
|
|
83
|
+
height: clientHeight,
|
|
84
|
+
cursor: 'inherit',
|
|
85
|
+
}),
|
|
84
86
|
sidebarWrapper: {
|
|
85
87
|
boxSizing: 'content-box',
|
|
86
88
|
display: 'grid',
|
|
@@ -130,7 +132,7 @@ const useStyles = makeStyles(
|
|
|
130
132
|
},
|
|
131
133
|
},
|
|
132
134
|
toggleIcon: {
|
|
133
|
-
boxShadow: theme.shadows[
|
|
135
|
+
boxShadow: theme.shadows[6],
|
|
134
136
|
},
|
|
135
137
|
topRight: {
|
|
136
138
|
display: 'grid',
|
|
@@ -155,6 +157,9 @@ const useStyles = makeStyles(
|
|
|
155
157
|
right: theme.spacings.sm,
|
|
156
158
|
top: `calc(50% - 28px)`,
|
|
157
159
|
},
|
|
160
|
+
dots: {
|
|
161
|
+
background: alpha(theme.palette.background.highlight, 0.7),
|
|
162
|
+
},
|
|
158
163
|
}),
|
|
159
164
|
{ name: 'SidebarGallery' },
|
|
160
165
|
)
|
|
@@ -163,27 +168,41 @@ export type SidebarGalleryProps = {
|
|
|
163
168
|
sidebar: React.ReactNode
|
|
164
169
|
images: MotionImageAspectProps[]
|
|
165
170
|
aspectRatio?: [number, number]
|
|
171
|
+
routeHash?: string
|
|
166
172
|
} & UseStyles<typeof useStyles>
|
|
167
173
|
|
|
168
174
|
export default function SidebarGallery(props: SidebarGalleryProps) {
|
|
169
|
-
const { sidebar, images, aspectRatio = [1, 1] } = props
|
|
170
|
-
const
|
|
171
|
-
|
|
175
|
+
const { sidebar, images, aspectRatio = [1, 1], routeHash = 'gallery' } = props
|
|
176
|
+
const router = useRouter()
|
|
177
|
+
const prevRoute = usePrevPageRouter()
|
|
172
178
|
const clientHeight = useMotionValueValue(clientSize.y, (y) => y)
|
|
173
|
-
const classes = useStyles({ clientHeight, aspectRatio })
|
|
179
|
+
const classes = useStyles({ clientHeight, aspectRatio, classes: props.classes })
|
|
180
|
+
|
|
181
|
+
const route = `#${routeHash}`
|
|
182
|
+
// We're using the URL to manage the state of the gallery.
|
|
183
|
+
const zoomed = router.asPath.endsWith(route)
|
|
184
|
+
|
|
185
|
+
// cleanup if someone enters the page with #gallery
|
|
186
|
+
useEffect(() => {
|
|
187
|
+
if (!prevRoute?.pathname && zoomed) {
|
|
188
|
+
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
|
189
|
+
router.replace(router.asPath.replace(route, ''))
|
|
190
|
+
}
|
|
191
|
+
}, [prevRoute?.pathname, route, router, zoomed])
|
|
174
192
|
|
|
175
193
|
const toggle = () => {
|
|
176
|
-
setZoomed(!zoomed)
|
|
177
194
|
if (!zoomed) {
|
|
195
|
+
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
|
196
|
+
router.push(route, undefined, { shallow: true })
|
|
178
197
|
document.body.style.overflow = 'hidden'
|
|
179
198
|
window.scrollTo({ top: 0, behavior: 'smooth' })
|
|
199
|
+
} else {
|
|
200
|
+
router.back()
|
|
180
201
|
}
|
|
181
202
|
}
|
|
182
203
|
|
|
183
204
|
const clsxZoom = (key: string) => clsx(classes?.[key], zoomed && classes?.[`${key}Zoomed`])
|
|
184
|
-
|
|
185
205
|
const theme = useTheme()
|
|
186
|
-
|
|
187
206
|
const windowRef = useRef(typeof window !== 'undefined' ? window : null)
|
|
188
207
|
|
|
189
208
|
const handleEscapeKey = (e: KeyboardEvent | Event) => {
|
|
@@ -194,6 +213,16 @@ export default function SidebarGallery(props: SidebarGalleryProps) {
|
|
|
194
213
|
}
|
|
195
214
|
}
|
|
196
215
|
|
|
216
|
+
const dragStart = useMotionValue<number>(0)
|
|
217
|
+
const onMouseDownScroller: React.MouseEventHandler<HTMLDivElement> = (e) => {
|
|
218
|
+
if (dragStart.get() === e.clientX) return
|
|
219
|
+
dragStart.set(e.clientX)
|
|
220
|
+
}
|
|
221
|
+
const onMouseUpScroller: React.MouseEventHandler<HTMLDivElement> = (e) => {
|
|
222
|
+
const currentDragLoc = e.clientX
|
|
223
|
+
if (Math.abs(currentDragLoc - dragStart.get()) < 8) toggle()
|
|
224
|
+
}
|
|
225
|
+
|
|
197
226
|
useDomEvent(windowRef, 'keyup', handleEscapeKey, { passive: true })
|
|
198
227
|
|
|
199
228
|
return (
|
|
@@ -206,7 +235,12 @@ export default function SidebarGallery(props: SidebarGalleryProps) {
|
|
|
206
235
|
if (!zoomed) document.body.style.overflow = ''
|
|
207
236
|
}}
|
|
208
237
|
>
|
|
209
|
-
<Scroller
|
|
238
|
+
<Scroller
|
|
239
|
+
className={clsxZoom('scroller')}
|
|
240
|
+
hideScrollbar
|
|
241
|
+
onMouseDown={onMouseDownScroller}
|
|
242
|
+
onMouseUp={onMouseUpScroller}
|
|
243
|
+
>
|
|
210
244
|
{images.map((image, idx) => (
|
|
211
245
|
<CenterSlide key={typeof image.src === 'string' ? image.src : idx}>
|
|
212
246
|
<MotionImageAspect
|
|
@@ -225,11 +259,11 @@ export default function SidebarGallery(props: SidebarGalleryProps) {
|
|
|
225
259
|
))}
|
|
226
260
|
</Scroller>
|
|
227
261
|
<m.div layout className={classes.topRight}>
|
|
228
|
-
<Fab color='inherit' size='small' className={classes.toggleIcon}
|
|
262
|
+
<Fab color='inherit' size='small' className={classes.toggleIcon} onMouseUp={toggle}>
|
|
229
263
|
{!zoomed ? (
|
|
230
|
-
<SvgImage src={
|
|
264
|
+
<SvgImage src={iconFullscreen} alt='Zoom in' loading='eager' size='small' />
|
|
231
265
|
) : (
|
|
232
|
-
<SvgImage src={
|
|
266
|
+
<SvgImage src={iconFullscreenExit} alt='Zoom out' loading='eager' size='small' />
|
|
233
267
|
)}
|
|
234
268
|
</Fab>
|
|
235
269
|
</m.div>
|
|
@@ -245,9 +279,10 @@ export default function SidebarGallery(props: SidebarGalleryProps) {
|
|
|
245
279
|
</div>
|
|
246
280
|
|
|
247
281
|
<div className={classes.bottomCenter}>
|
|
248
|
-
<ScrollerDots layout />
|
|
282
|
+
<ScrollerDots layout classes={{ dots: classes.dots }} />
|
|
249
283
|
</div>
|
|
250
284
|
</m.div>
|
|
285
|
+
|
|
251
286
|
<div className={clsxZoom('sidebarWrapper')}>
|
|
252
287
|
<m.div layout className={clsxZoom('sidebar')}>
|
|
253
288
|
{sidebar}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { relative } from 'path/posix'
|
|
2
1
|
import {
|
|
3
2
|
Scroller,
|
|
4
3
|
ScrollerButton,
|
|
@@ -8,9 +7,10 @@ import {
|
|
|
8
7
|
import { Theme } from '@material-ui/core'
|
|
9
8
|
import { makeStyles } from '@material-ui/styles'
|
|
10
9
|
import React, { ReactNode } from 'react'
|
|
11
|
-
import { SvgImageSimple, iconChevronLeft, iconChevronRight } from '../..'
|
|
12
10
|
import { UseStyles } from '../../Styles'
|
|
13
11
|
import responsiveVal from '../../Styles/responsiveVal'
|
|
12
|
+
import SvgImageSimple from '../../SvgImage/SvgImageSimple'
|
|
13
|
+
import { iconChevronLeft, iconChevronRight } from '../../icons'
|
|
14
14
|
|
|
15
15
|
const useStyles = makeStyles(
|
|
16
16
|
(theme: Theme) => ({
|
|
@@ -37,7 +37,6 @@ const useStyles = makeStyles(
|
|
|
37
37
|
gridRowGap: theme.spacings.lg,
|
|
38
38
|
alignContent: 'space-around',
|
|
39
39
|
paddingRight: theme.page.horizontal,
|
|
40
|
-
|
|
41
40
|
'& > *': {
|
|
42
41
|
minWidth: responsiveVal(200, 400),
|
|
43
42
|
},
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M5 16h3v3h2v-5H5v2zm3-8H5v2h5V5H8v3zm6 11h2v-3h3v-2h-5v5zm2-11V5h-2v5h5V8h-3z"/></svg>
|
package/icons/index.tsx
CHANGED
|
@@ -12,11 +12,9 @@ export { default as iconChevronRight } from './icon_chevron_right.svg'
|
|
|
12
12
|
export { default as iconChevronUp } from './icon_chevron_up.svg'
|
|
13
13
|
export { default as iconClose } from './icon_close.svg'
|
|
14
14
|
export { default as iconCloseCircle } from './icon_close_circle.svg'
|
|
15
|
-
export { default as iconCollapseVertical } from './icon_collapse_vertical.svg'
|
|
16
15
|
export { default as iconCustomerService } from './icon_customer_service.svg'
|
|
17
16
|
export { default as iconEmail } from './icon_email.svg'
|
|
18
17
|
export { default as iconEmailOutline } from './icon_email_outline.svg'
|
|
19
|
-
export { default as iconExpandVertical } from './icon_expand_vertical.svg'
|
|
20
18
|
export { default as iconHeart } from './icon_heart.svg'
|
|
21
19
|
export { default as iconHome } from './icon_home.svg'
|
|
22
20
|
export { default as iconId } from './icon_id.svg'
|
|
@@ -40,3 +38,5 @@ export { default as iconStar } from './icon_star.svg'
|
|
|
40
38
|
export { default as iconStarFilledMuted } from './icon_star_filled_muted.svg'
|
|
41
39
|
export { default as iconStarYellow } from './icon_star_yellow.svg'
|
|
42
40
|
export { default as iconParty } from './icon_party.svg'
|
|
41
|
+
export { default as iconFullscreenExit } from './icon_fullscreen_exit.svg'
|
|
42
|
+
export { default as iconFullscreen } from './icon_fullscreen.svg'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphcommerce/next-ui",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.2.3",
|
|
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.106.
|
|
14
|
-
"@graphcommerce/framer-scroller": "^0.2.
|
|
15
|
-
"@graphcommerce/framer-sheet": "^2.105.
|
|
16
|
-
"@graphcommerce/framer-utils": "^2.103.
|
|
13
|
+
"@graphcommerce/framer-next-pages": "^2.106.7",
|
|
14
|
+
"@graphcommerce/framer-scroller": "^0.2.9",
|
|
15
|
+
"@graphcommerce/framer-sheet": "^2.105.7",
|
|
16
|
+
"@graphcommerce/framer-utils": "^2.103.6",
|
|
17
17
|
"@graphcommerce/graphql": "^2.103.5",
|
|
18
|
-
"@graphcommerce/image": "^2.104.
|
|
18
|
+
"@graphcommerce/image": "^2.104.8",
|
|
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",
|
|
@@ -55,5 +55,5 @@
|
|
|
55
55
|
"project": "./tsconfig.json"
|
|
56
56
|
}
|
|
57
57
|
},
|
|
58
|
-
"gitHead": "
|
|
58
|
+
"gitHead": "23efb6abb9e5bb287434d07dbba664511b2c5e36"
|
|
59
59
|
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<svg width="32px" height="32px" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
3
|
-
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round">
|
|
4
|
-
<g id="arrow-bar-right" transform="translate(16.000000, 16.000000) scale(-1, 1) translate(-16.000000, -16.000000) translate(8.000000, 8.000000)" stroke="#000000" stroke-width="1.5">
|
|
5
|
-
<line x1="16" y1="8" x2="6" y2="8" id="Path"></line>
|
|
6
|
-
<line x1="16" y1="8" x2="12" y2="12" id="Path"></line>
|
|
7
|
-
<line x1="16" y1="8" x2="12" y2="4" id="Path"></line>
|
|
8
|
-
<line x1="1" y1="0" x2="1" y2="16" id="Path"></line>
|
|
9
|
-
</g>
|
|
10
|
-
</g>
|
|
11
|
-
</svg>
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<svg width="32px" height="32px" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
3
|
-
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round">
|
|
4
|
-
<g id="arrow-bar-right" transform="translate(8.000000, 8.000000)" stroke="#000000" stroke-width="1.5">
|
|
5
|
-
<line x1="16" y1="8" x2="6" y2="8" id="Path"></line>
|
|
6
|
-
<line x1="16" y1="8" x2="12" y2="12" id="Path"></line>
|
|
7
|
-
<line x1="16" y1="8" x2="12" y2="4" id="Path"></line>
|
|
8
|
-
<line x1="1" y1="0" x2="1" y2="16" id="Path"></line>
|
|
9
|
-
</g>
|
|
10
|
-
</g>
|
|
11
|
-
</svg>
|