@graphcommerce/next-ui 3.15.0 → 3.17.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 +12 -26
- package/AppShell/Footer/index.tsx +2 -1
- package/AppShell/FullPageShellBase.tsx +1 -1
- package/AppShell/SheetShellBase/index.tsx +8 -4
- package/AppShell/SheetShellBase/useSheetStyles.ts +10 -3
- package/AppShell/useFixedFabAnimation.tsx +11 -8
- package/Blog/BlogListItem/index.tsx +1 -1
- package/Button/index.tsx +1 -4
- package/CHANGELOG.md +69 -0
- package/ChipMenu/index.tsx +4 -5
- package/FramerScroller/components/SidebarGallery.tsx +0 -1
- package/FullPageMessage/index.tsx +1 -5
- package/Pagination/index.tsx +17 -5
- package/Row/HeroBanner/index.tsx +11 -9
- package/Row/IconBlocks/IconBlock/index.tsx +13 -6
- package/Row/SpecialBanner/index.tsx +2 -1
- package/SvgImage/SvgImageSimple.tsx +3 -2
- package/TextInputNumber/index.tsx +1 -1
- package/ToggleButton/index.tsx +5 -2
- package/package.json +10 -10
|
@@ -1,10 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
useHistoryLink,
|
|
3
|
-
usePageContext,
|
|
4
|
-
usePageRouter,
|
|
5
|
-
usePrevUp,
|
|
6
|
-
useUp,
|
|
7
|
-
} from '@graphcommerce/framer-next-pages'
|
|
1
|
+
import { usePageContext, usePageRouter, usePrevUp, useUp } from '@graphcommerce/framer-next-pages'
|
|
8
2
|
import { Fab, makeStyles, Theme } from '@material-ui/core'
|
|
9
3
|
import clsx from 'clsx'
|
|
10
4
|
import { m, MotionValue, useMotionValue, useTransform } from 'framer-motion'
|
|
@@ -192,9 +186,6 @@ const useStyles = makeStyles(
|
|
|
192
186
|
'&:hover': {
|
|
193
187
|
background: theme.palette.background.paper,
|
|
194
188
|
},
|
|
195
|
-
'& svg': {
|
|
196
|
-
stroke: theme.palette.text.primary,
|
|
197
|
-
},
|
|
198
189
|
},
|
|
199
190
|
sheetShellActionsFullPage: {
|
|
200
191
|
'& * > a, & * > button': {
|
|
@@ -250,10 +241,6 @@ export default function AppShellHeader(props: AppShellHeaderProps) {
|
|
|
250
241
|
const titleOffset = useMotionValue<number>(100)
|
|
251
242
|
const titleHeight = useMotionValue<number>(100)
|
|
252
243
|
|
|
253
|
-
const { href: historyHref, onClick: historyOnClick } = useHistoryLink({
|
|
254
|
-
href: up?.href ?? '',
|
|
255
|
-
})
|
|
256
|
-
|
|
257
244
|
const setOffset = useCallback(
|
|
258
245
|
(offsetTop: number, offsetParent: Element | null, clientHeight: number) => {
|
|
259
246
|
titleHeight.set(clientHeight)
|
|
@@ -339,19 +326,18 @@ export default function AppShellHeader(props: AppShellHeaderProps) {
|
|
|
339
326
|
|
|
340
327
|
const canClickBack = backSteps > 0 && router.asPath !== prevUp?.href
|
|
341
328
|
let back = canClickBack && (
|
|
342
|
-
<
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
</Button>
|
|
353
|
-
</PageLink>
|
|
329
|
+
<Button
|
|
330
|
+
onClick={() => router.back()}
|
|
331
|
+
variant='pill-link'
|
|
332
|
+
size='small'
|
|
333
|
+
className={classes.backButton}
|
|
334
|
+
startIcon={backIcon}
|
|
335
|
+
aria-label='Back'
|
|
336
|
+
>
|
|
337
|
+
{up?.href === router.asPath ? up?.title : 'Back'}
|
|
338
|
+
</Button>
|
|
354
339
|
)
|
|
340
|
+
|
|
355
341
|
if (!canClickBack && up?.href) {
|
|
356
342
|
back = (
|
|
357
343
|
<PageLink href={up?.href} passHref>
|
|
@@ -17,6 +17,7 @@ const useStyles = makeStyles(
|
|
|
17
17
|
alignItems: 'center',
|
|
18
18
|
[theme.breakpoints.down('xs')]: {
|
|
19
19
|
paddingTop: theme.spacings.lg,
|
|
20
|
+
paddingBottom: theme.spacings.lg,
|
|
20
21
|
justifyItems: 'center',
|
|
21
22
|
gridTemplateAreas: `
|
|
22
23
|
'switcher switcher'
|
|
@@ -45,7 +46,7 @@ const useStyles = makeStyles(
|
|
|
45
46
|
[theme.breakpoints.down('xs')]: {
|
|
46
47
|
gridAutoFlow: 'row',
|
|
47
48
|
textAlign: 'center',
|
|
48
|
-
gap:
|
|
49
|
+
gap: 4,
|
|
49
50
|
},
|
|
50
51
|
},
|
|
51
52
|
support: {
|
|
@@ -8,11 +8,11 @@ import ShellBase, { PageLayoutBaseProps } from './ShellBase'
|
|
|
8
8
|
const useStyles = makeStyles(
|
|
9
9
|
(theme: Theme) => ({
|
|
10
10
|
root: {
|
|
11
|
-
background: theme.palette.background.default,
|
|
12
11
|
minHeight: '100vh',
|
|
13
12
|
display: 'grid',
|
|
14
13
|
gridTemplateRows: `auto 1fr auto`,
|
|
15
14
|
gridTemplateColumns: '100%',
|
|
15
|
+
background: theme.palette.background.default,
|
|
16
16
|
},
|
|
17
17
|
hideFabsOnVirtualKeyboardOpen: {
|
|
18
18
|
[theme.breakpoints.down('sm')]: {
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
import { makeStyles, StyleRules, Theme } from '@material-ui/core'
|
|
13
13
|
import { useDomEvent } from 'framer-motion'
|
|
14
14
|
import { useRouter } from 'next/router'
|
|
15
|
-
import React, { useRef } from 'react'
|
|
15
|
+
import React, { useEffect, useRef, useState } from 'react'
|
|
16
16
|
import responsiveVal from '../../Styles/responsiveVal'
|
|
17
17
|
import AppShellProvider from '../AppShellProvider'
|
|
18
18
|
import ShellBase, { PageLayoutBaseProps } from '../ShellBase'
|
|
@@ -63,11 +63,15 @@ function SheetShellBase(props: SheetShellBaseProps) {
|
|
|
63
63
|
const { depth, closeSteps, active, direction } = usePageContext()
|
|
64
64
|
const open = depth < 0 || router.asPath === pageRouter.asPath
|
|
65
65
|
const initialLocale = useRef(router.locale)
|
|
66
|
+
const [isNavigating, setIsNavigating] = useState<boolean>(false)
|
|
66
67
|
|
|
67
68
|
function handleClose() {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
69
|
+
if (!isNavigating) {
|
|
70
|
+
setIsNavigating(true)
|
|
71
|
+
return initialLocale.current !== router.locale
|
|
72
|
+
? pageRouter.push('/')
|
|
73
|
+
: pageRouter.go(closeSteps * -1)
|
|
74
|
+
}
|
|
71
75
|
}
|
|
72
76
|
|
|
73
77
|
function handleSnap(snapPoint: SnapPoint) {
|
|
@@ -4,8 +4,15 @@ import { ClassNameMap } from '@material-ui/styles'
|
|
|
4
4
|
|
|
5
5
|
type UseSheetStylesReturn = (props?: Record<string, unknown>) => ClassNameMap<ClassKeys>
|
|
6
6
|
|
|
7
|
-
const useSheetStyles = makeStyles<Theme, never, ClassKeys>(
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
const useSheetStyles = makeStyles<Theme, never, ClassKeys>(
|
|
8
|
+
(theme: Theme) => ({
|
|
9
|
+
...(styles as StyleRules<ClassKeys>),
|
|
10
|
+
content: {
|
|
11
|
+
...styles.content,
|
|
12
|
+
backgroundColor: theme.palette.background.default,
|
|
13
|
+
},
|
|
14
|
+
}),
|
|
15
|
+
{ name: 'Sheet' },
|
|
16
|
+
) as UseSheetStylesReturn
|
|
10
17
|
|
|
11
18
|
export default useSheetStyles
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useMediaQuery, useTheme } from '@material-ui/core'
|
|
1
|
+
import { alpha, useMediaQuery, useTheme } from '@material-ui/core'
|
|
2
2
|
import { useMotionTemplate, useTransform, useViewportScroll } from 'framer-motion'
|
|
3
3
|
|
|
4
4
|
export default function useFixedFabAnimation() {
|
|
@@ -6,11 +6,14 @@ export default function useFixedFabAnimation() {
|
|
|
6
6
|
const isMobile = useMediaQuery(theme.breakpoints.down('sm'))
|
|
7
7
|
const { scrollY } = useViewportScroll()
|
|
8
8
|
const scrollTo = isMobile ? 0 : 60
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
9
|
+
const scrollToBg = isMobile ? 0 : 10
|
|
10
|
+
const opacity = useTransform(scrollY, [50, scrollTo], [0, 0.08])
|
|
11
|
+
const opacity1 = useTransform(
|
|
12
|
+
scrollY,
|
|
13
|
+
[0, scrollToBg],
|
|
14
|
+
[alpha(theme.palette.background.paper, 0), alpha(theme.palette.background.paper, 1)],
|
|
15
|
+
)
|
|
16
|
+
const boxShadow = useMotionTemplate`0 2px 10px 0 rgba(0, 0, 0, ${opacity})`
|
|
17
|
+
const backgroundColor = useMotionTemplate`${opacity1}`
|
|
18
|
+
return { boxShadow, backgroundColor, opacity }
|
|
16
19
|
}
|
package/Button/index.tsx
CHANGED
|
@@ -63,14 +63,11 @@ const useStyles = makeStyles<
|
|
|
63
63
|
textTransform: 'none',
|
|
64
64
|
...theme.typography.body2,
|
|
65
65
|
fontWeight: 400,
|
|
66
|
-
padding: `${responsiveVal(8, 10)} ${responsiveVal(
|
|
66
|
+
padding: `${responsiveVal(8, 10)} ${responsiveVal(16, 20)}`,
|
|
67
67
|
backgroundColor: theme.palette.secondary.main,
|
|
68
68
|
color: theme.palette.primary.contrastText,
|
|
69
69
|
borderRadius: '99em',
|
|
70
70
|
boxShadow: theme.shadows[1],
|
|
71
|
-
'& svg': {
|
|
72
|
-
stroke: theme.palette.primary.contrastText,
|
|
73
|
-
},
|
|
74
71
|
'&:hover': {
|
|
75
72
|
background: theme.palette.secondary.dark,
|
|
76
73
|
},
|
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,75 @@
|
|
|
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.17.0](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/next-ui@3.16.0...@graphcommerce/next-ui@3.17.0) (2021-11-12)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* added tons of translations ([9bb0ac7](https://github.com/ho-nl/m2-pwa/commit/9bb0ac709b58df6ea6141e92e4923a5ca9ae2963))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
# [3.16.0](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/next-ui@3.15.2...@graphcommerce/next-ui@3.16.0) (2021-11-12)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
* Accessibility: Tap targets are sized appropriately ([55177f0](https://github.com/ho-nl/m2-pwa/commit/55177f03e79a29a879022ed34439e6c7aebbd80e))
|
|
23
|
+
* behaviour for CartFab animation including darkTheme support ([6152ef3](https://github.com/ho-nl/m2-pwa/commit/6152ef32d093e42c58ee79d4d713c5b8c2870746))
|
|
24
|
+
* clean up themeProvider ([6868e71](https://github.com/ho-nl/m2-pwa/commit/6868e71b59a637be8229a2ab49791dd324e02bb9))
|
|
25
|
+
* darkTheme ([b08f522](https://github.com/ho-nl/m2-pwa/commit/b08f52255c91dcba5498481ba5e9f0fa0b6c5013))
|
|
26
|
+
* darkTheme proof background color for sheet ([2af3b4a](https://github.com/ho-nl/m2-pwa/commit/2af3b4a6b7115400c5bbed36a21cd48852bea122))
|
|
27
|
+
* design ([a8e2888](https://github.com/ho-nl/m2-pwa/commit/a8e288856011ca7d8fdcb75d7c672629a8f8bcf4))
|
|
28
|
+
* design ([2dd5f41](https://github.com/ho-nl/m2-pwa/commit/2dd5f415010d19549158d837f0f98497d350fc2d))
|
|
29
|
+
* fab animation should be background paper ([b538f96](https://github.com/ho-nl/m2-pwa/commit/b538f963b6c45a3973b11abe8de7823f2864326b))
|
|
30
|
+
* hex for darktheme paper value, so calculations can be made ([c93bb22](https://github.com/ho-nl/m2-pwa/commit/c93bb22ba287c85ad5c27fd5f13d82dbb9a7d16f))
|
|
31
|
+
* icon style ([6b9fea9](https://github.com/ho-nl/m2-pwa/commit/6b9fea9112206bb38b419e8257ad1b2b3fad74b6))
|
|
32
|
+
* pagination color not primary ([c4e6d4f](https://github.com/ho-nl/m2-pwa/commit/c4e6d4f35d2df7a93fe045bde6c015fbcc5e5089))
|
|
33
|
+
* perfectly spaced video ([f1481ed](https://github.com/ho-nl/m2-pwa/commit/f1481edaf08564315a8c6f50fa1a500bbdc58fc5))
|
|
34
|
+
* prevent video casting on android ([a8baf94](https://github.com/ho-nl/m2-pwa/commit/a8baf949283c854283fe32befae4a60b119e02e0))
|
|
35
|
+
* remove unused wrapping div ([6ced7b9](https://github.com/ho-nl/m2-pwa/commit/6ced7b912229303a9d708db1d2621f50f431c73f))
|
|
36
|
+
* replace value with headerInnerHeight ([656fedc](https://github.com/ho-nl/m2-pwa/commit/656fedc573bbdd941c34e05e4dcd9a6af49fe987))
|
|
37
|
+
* replace value with headerInnerHeight ([d961720](https://github.com/ho-nl/m2-pwa/commit/d9617200d375a9db98f7f1c3b47a5927764dae71))
|
|
38
|
+
* revert background changes ([7661670](https://github.com/ho-nl/m2-pwa/commit/76616703968099039d79a4ca6001b942684adda5))
|
|
39
|
+
* set sheet backgroundColor to background.default ([5d3f971](https://github.com/ho-nl/m2-pwa/commit/5d3f9719b446ee9440ac8834679ef5ba14be53d4))
|
|
40
|
+
* text color iconBlock and styling ([0f2b0a8](https://github.com/ho-nl/m2-pwa/commit/0f2b0a896b11eafb79ea045c44f0115649a2040e))
|
|
41
|
+
* use alpha to set rgba value of theme variable ([aebee87](https://github.com/ho-nl/m2-pwa/commit/aebee87b32eb769c6454ad9ced10d5612c4d1af8))
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
### Features
|
|
45
|
+
|
|
46
|
+
* provide all (different type of) overlays with the default background color ([111fe71](https://github.com/ho-nl/m2-pwa/commit/111fe718fbfddbeef452829e08b574ca46d51345))
|
|
47
|
+
* remove svg stroke definitions, set all to currentColor ([189814f](https://github.com/ho-nl/m2-pwa/commit/189814f822d111c8adc6be1fff65c9a4a4c50c65))
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
## [3.15.2](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/next-ui@3.15.1...@graphcommerce/next-ui@3.15.2) (2021-11-12)
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
### Bug Fixes
|
|
57
|
+
|
|
58
|
+
* **sheet-shell-base:** prevent sheet backdrop from navigating back multiple times ([5ca2f7e](https://github.com/ho-nl/m2-pwa/commit/5ca2f7e0d3404501a6b5763daf1d442c8080f8cb))
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
## [3.15.1](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/next-ui@3.15.0...@graphcommerce/next-ui@3.15.1) (2021-11-11)
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
### Bug Fixes
|
|
68
|
+
|
|
69
|
+
* better handling to go back from product page ([ff8e72b](https://github.com/ho-nl/m2-pwa/commit/ff8e72beef81b9fb0d20cbfbd50c282f0144aed7))
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
|
|
6
75
|
# [3.15.0](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/next-ui@3.14.8...@graphcommerce/next-ui@3.15.0) (2021-11-11)
|
|
7
76
|
|
|
8
77
|
|
package/ChipMenu/index.tsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Chip, ChipProps, makeStyles, Menu, Theme } from '@material-ui/core'
|
|
1
|
+
import { Chip, ChipProps, lighten, makeStyles, Menu, Theme } from '@material-ui/core'
|
|
2
2
|
import clsx from 'clsx'
|
|
3
3
|
import React, { PropsWithChildren, useState } from 'react'
|
|
4
4
|
import SectionHeader from '../SectionHeader'
|
|
@@ -8,7 +8,9 @@ import { iconChevronDown, iconChevronUp, iconCancelAlt } from '../icons'
|
|
|
8
8
|
|
|
9
9
|
export const useChipMenuStyles = makeStyles(
|
|
10
10
|
(theme: Theme) => ({
|
|
11
|
-
chip: {
|
|
11
|
+
chip: {
|
|
12
|
+
background: `${theme.palette.background.default} !important`,
|
|
13
|
+
},
|
|
12
14
|
chipSelected: {
|
|
13
15
|
borderColor: theme.palette.text.primary,
|
|
14
16
|
color: theme.palette.text.primary,
|
|
@@ -19,9 +21,6 @@ export const useChipMenuStyles = makeStyles(
|
|
|
19
21
|
'&:focus': {
|
|
20
22
|
background: `${theme.palette.background.paper} !important`,
|
|
21
23
|
},
|
|
22
|
-
'& svg': {
|
|
23
|
-
stroke: theme.palette.text.primary,
|
|
24
|
-
},
|
|
25
24
|
},
|
|
26
25
|
menuPaper: {
|
|
27
26
|
minWidth: responsiveVal(200, 560),
|
|
@@ -23,16 +23,12 @@ const useStyles = makeStyles(
|
|
|
23
23
|
textAlign: 'center',
|
|
24
24
|
marginTop: theme.spacings.sm,
|
|
25
25
|
},
|
|
26
|
-
|
|
27
26
|
button: {
|
|
28
27
|
marginTop: theme.spacings.sm,
|
|
29
28
|
},
|
|
30
29
|
altButton: {
|
|
31
30
|
marginTop: 6,
|
|
32
31
|
},
|
|
33
|
-
icon: {
|
|
34
|
-
height: responsiveVal(120, 180),
|
|
35
|
-
},
|
|
36
32
|
}),
|
|
37
33
|
{ name: 'FullPageMessage' },
|
|
38
34
|
)
|
|
@@ -53,7 +49,7 @@ export default function FullPageMessage(props: FullPageMessageProps) {
|
|
|
53
49
|
return (
|
|
54
50
|
<div className={clsx(classes.root, disableMargin || classes.rootMargin)}>
|
|
55
51
|
<Container maxWidth='md' className={classes.innerContainer}>
|
|
56
|
-
<div
|
|
52
|
+
<div>{icon}</div>
|
|
57
53
|
|
|
58
54
|
<div className={classes.subject}>
|
|
59
55
|
<Typography variant='h3' gutterBottom>
|
package/Pagination/index.tsx
CHANGED
|
@@ -17,9 +17,6 @@ const useStyles = makeStyles((theme: Theme) => ({
|
|
|
17
17
|
gap: 6,
|
|
18
18
|
'& .Mui-disabled': {
|
|
19
19
|
background: 'none',
|
|
20
|
-
'& svg': {
|
|
21
|
-
stroke: theme.palette.text.disabled,
|
|
22
|
-
},
|
|
23
20
|
},
|
|
24
21
|
},
|
|
25
22
|
pagination: {
|
|
@@ -38,6 +35,9 @@ const useStyles = makeStyles((theme: Theme) => ({
|
|
|
38
35
|
boxShadow: 'none',
|
|
39
36
|
},
|
|
40
37
|
},
|
|
38
|
+
fab: {
|
|
39
|
+
color: theme.palette.text.primary,
|
|
40
|
+
},
|
|
41
41
|
}))
|
|
42
42
|
|
|
43
43
|
export type PagePaginationProps = {
|
|
@@ -66,13 +66,25 @@ export default function Pagination(props: PagePaginationProps) {
|
|
|
66
66
|
const nextBtnProps = items[items.length - 1]
|
|
67
67
|
|
|
68
68
|
const chevronLeft = (
|
|
69
|
-
<Fab
|
|
69
|
+
<Fab
|
|
70
|
+
size='medium'
|
|
71
|
+
disabled={page === 1}
|
|
72
|
+
color='inherit'
|
|
73
|
+
aria-label='Previous page'
|
|
74
|
+
className={classes.fab}
|
|
75
|
+
>
|
|
70
76
|
<SvgImageSimple src={iconChevronLeft} />
|
|
71
77
|
</Fab>
|
|
72
78
|
)
|
|
73
79
|
|
|
74
80
|
const chevronRight = (
|
|
75
|
-
<Fab
|
|
81
|
+
<Fab
|
|
82
|
+
size='medium'
|
|
83
|
+
disabled={page === count}
|
|
84
|
+
color='inherit'
|
|
85
|
+
aria-label='Next page'
|
|
86
|
+
className={classes.fab}
|
|
87
|
+
>
|
|
76
88
|
<SvgImageSimple src={iconChevronRight} />
|
|
77
89
|
</Fab>
|
|
78
90
|
)
|
package/Row/HeroBanner/index.tsx
CHANGED
|
@@ -22,13 +22,19 @@ const useStyles = makeStyles(
|
|
|
22
22
|
justifyItems: 'center',
|
|
23
23
|
alignContent: 'center',
|
|
24
24
|
padding: `${theme.spacings.lg} ${theme.spacings.md}`,
|
|
25
|
-
minHeight:
|
|
25
|
+
minHeight: `calc(100vh - ${theme.page.headerInnerHeight.sm})`,
|
|
26
26
|
'& > *': {
|
|
27
27
|
zIndex: 1,
|
|
28
28
|
maxWidth: 'max-content',
|
|
29
29
|
},
|
|
30
|
+
[theme.breakpoints.down('sm')]: {
|
|
31
|
+
['@supports (-webkit-touch-callout: none)']: {
|
|
32
|
+
minHeight: '-webkit-fill-available',
|
|
33
|
+
},
|
|
34
|
+
},
|
|
30
35
|
[theme.breakpoints.up('md')]: {
|
|
31
36
|
width: '70%',
|
|
37
|
+
minHeight: `calc(100vh - ${theme.page.headerInnerHeight.md})`,
|
|
32
38
|
},
|
|
33
39
|
[theme.breakpoints.up('lg')]: {
|
|
34
40
|
padding: `${theme.spacings.lg} ${theme.spacings.lg}`,
|
|
@@ -44,6 +50,7 @@ const useStyles = makeStyles(
|
|
|
44
50
|
display: 'grid',
|
|
45
51
|
justifyItems: 'center',
|
|
46
52
|
overflow: 'hidden',
|
|
53
|
+
paddingBottom: theme.spacings.md,
|
|
47
54
|
'& video': {
|
|
48
55
|
objectFit: 'cover',
|
|
49
56
|
width: '100%',
|
|
@@ -83,14 +90,9 @@ export default function HeroBanner(props: HeroBannerProps) {
|
|
|
83
90
|
{pageLinks}
|
|
84
91
|
</div>
|
|
85
92
|
<div className={classes.asset}>
|
|
86
|
-
<m.
|
|
87
|
-
src={videoSrc}
|
|
88
|
-
|
|
89
|
-
muted
|
|
90
|
-
loop
|
|
91
|
-
playsInline
|
|
92
|
-
style={{ width: actionsAnimWidth }}
|
|
93
|
-
/>
|
|
93
|
+
<m.div style={{ width: actionsAnimWidth }}>
|
|
94
|
+
<video src={videoSrc} autoPlay muted loop playsInline disableRemotePlayback />
|
|
95
|
+
</m.div>
|
|
94
96
|
</div>
|
|
95
97
|
</div>
|
|
96
98
|
</Row>
|
|
@@ -6,19 +6,24 @@ import { UseStyles } from '../../../Styles'
|
|
|
6
6
|
const useStyles = makeStyles(
|
|
7
7
|
(theme: Theme) => ({
|
|
8
8
|
block: {
|
|
9
|
-
display: 'grid',
|
|
10
|
-
gridAutoFlow: 'row',
|
|
11
|
-
justifyItems: 'center',
|
|
12
|
-
gap: `${theme.spacings.xs}`,
|
|
13
9
|
border: `1px solid ${theme.palette.divider}`,
|
|
14
10
|
padding: `${theme.spacings.sm}`,
|
|
15
11
|
borderRadius: '6px',
|
|
16
12
|
textAlign: 'center',
|
|
17
|
-
color: theme.palette.primary
|
|
13
|
+
color: theme.palette.text.primary,
|
|
14
|
+
'& > * > *': {
|
|
15
|
+
display: 'grid',
|
|
16
|
+
gridAutoFlow: 'row',
|
|
17
|
+
justifyItems: 'center',
|
|
18
|
+
gap: `${theme.spacings.xxs}`,
|
|
19
|
+
},
|
|
18
20
|
},
|
|
19
21
|
link: {
|
|
20
22
|
textDecoration: 'none',
|
|
21
23
|
},
|
|
24
|
+
title: {
|
|
25
|
+
fontWeight: theme.typography.fontWeightBold,
|
|
26
|
+
},
|
|
22
27
|
}),
|
|
23
28
|
{ name: 'IconBlock' },
|
|
24
29
|
)
|
|
@@ -37,7 +42,9 @@ const IconBlock = React.forwardRef<HTMLAnchorElement, IconBlockProps>((props, re
|
|
|
37
42
|
const content = (
|
|
38
43
|
<>
|
|
39
44
|
{icon}
|
|
40
|
-
<Typography variant='
|
|
45
|
+
<Typography variant='subtitle1' className={classes.title}>
|
|
46
|
+
{title}
|
|
47
|
+
</Typography>
|
|
41
48
|
{children}
|
|
42
49
|
</>
|
|
43
50
|
)
|
|
@@ -7,7 +7,7 @@ const useStyles = makeStyles(
|
|
|
7
7
|
(theme: Theme) => ({
|
|
8
8
|
wrapper: {
|
|
9
9
|
display: 'grid',
|
|
10
|
-
background:
|
|
10
|
+
background: theme.palette.background.paper,
|
|
11
11
|
justifyItems: 'center',
|
|
12
12
|
columnGap: `${theme.spacings.lg}`,
|
|
13
13
|
padding: `${theme.spacings.lg} 0`,
|
|
@@ -23,6 +23,7 @@ const useStyles = makeStyles(
|
|
|
23
23
|
asset: {
|
|
24
24
|
width: responsiveVal(200, 900),
|
|
25
25
|
height: 'auto',
|
|
26
|
+
marginBottom: theme.spacings.md,
|
|
26
27
|
'& img': {
|
|
27
28
|
width: responsiveVal(200, 900),
|
|
28
29
|
height: 'auto',
|
|
@@ -16,13 +16,14 @@ const useStyles = makeStyles(
|
|
|
16
16
|
strokeLinecap: 'square',
|
|
17
17
|
strokeLinejoin: 'miter',
|
|
18
18
|
fill: 'none',
|
|
19
|
+
stroke: 'currentColor',
|
|
19
20
|
},
|
|
20
21
|
sizeInherit: {
|
|
21
22
|
fontSize: 'inherit',
|
|
22
23
|
},
|
|
23
24
|
sizeSmall: {
|
|
24
|
-
width: responsiveVal(
|
|
25
|
-
height: responsiveVal(
|
|
25
|
+
width: responsiveVal(12, 16),
|
|
26
|
+
height: responsiveVal(12, 16),
|
|
26
27
|
strokeWidth: 2.3,
|
|
27
28
|
},
|
|
28
29
|
sizeLarge: {
|
package/ToggleButton/index.tsx
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// @inheritedComponent ButtonBase
|
|
2
2
|
|
|
3
|
-
import { capitalize, makeStyles, Theme } from '@material-ui/core'
|
|
3
|
+
import { capitalize, lighten, makeStyles, Theme } from '@material-ui/core'
|
|
4
4
|
import clsx from 'clsx'
|
|
5
5
|
import React, { FormEvent } from 'react'
|
|
6
6
|
import Button, { ButtonProps } from '../Button'
|
|
@@ -13,7 +13,10 @@ export const useStyles = makeStyles(
|
|
|
13
13
|
/* Styles applied to the root element. */
|
|
14
14
|
root: {
|
|
15
15
|
border: '2px solid transparent',
|
|
16
|
-
backgroundColor:
|
|
16
|
+
backgroundColor:
|
|
17
|
+
theme.palette.type === 'light'
|
|
18
|
+
? theme.palette.background.default
|
|
19
|
+
: lighten(theme.palette.background.default, theme.palette.action.hoverOpacity),
|
|
17
20
|
borderRadius: 4,
|
|
18
21
|
// boxShadow: theme.shadows['1'],
|
|
19
22
|
boxShadow: `0px 0px 2px ${theme.palette.grey[400]}`,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphcommerce/next-ui",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.17.0",
|
|
4
4
|
"author": "",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"scripts": {
|
|
@@ -10,13 +10,13 @@
|
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@apollo/client": "^3.4.16",
|
|
13
|
-
"@graphcommerce/framer-next-pages": "^2.107.
|
|
14
|
-
"@graphcommerce/framer-scroller": "^1.0.
|
|
15
|
-
"@graphcommerce/framer-sheet": "^2.106.
|
|
16
|
-
"@graphcommerce/framer-utils": "^2.103.
|
|
17
|
-
"@graphcommerce/graphql": "^2.105.
|
|
18
|
-
"@graphcommerce/image": "^2.105.
|
|
19
|
-
"@
|
|
13
|
+
"@graphcommerce/framer-next-pages": "^2.107.5",
|
|
14
|
+
"@graphcommerce/framer-scroller": "^1.0.4",
|
|
15
|
+
"@graphcommerce/framer-sheet": "^2.106.2",
|
|
16
|
+
"@graphcommerce/framer-utils": "^2.103.15",
|
|
17
|
+
"@graphcommerce/graphql": "^2.105.5",
|
|
18
|
+
"@graphcommerce/image": "^2.105.4",
|
|
19
|
+
"@lingui/macro": "^3.12.1",
|
|
20
20
|
"@material-ui/core": "^4.12.3",
|
|
21
21
|
"@material-ui/lab": "^4.0.0-alpha.60",
|
|
22
22
|
"@material-ui/styles": "^4.11.4",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@graphcommerce/browserslist-config-pwa": "^3.0.2",
|
|
37
|
-
"@graphcommerce/eslint-config-pwa": "^3.1.
|
|
37
|
+
"@graphcommerce/eslint-config-pwa": "^3.1.5",
|
|
38
38
|
"@graphcommerce/prettier-config-pwa": "^3.0.4",
|
|
39
39
|
"@graphcommerce/typescript-config-pwa": "^3.1.1",
|
|
40
40
|
"@playwright/test": "^1.16.2",
|
|
@@ -53,5 +53,5 @@
|
|
|
53
53
|
"project": "./tsconfig.json"
|
|
54
54
|
}
|
|
55
55
|
},
|
|
56
|
-
"gitHead": "
|
|
56
|
+
"gitHead": "6a39908a131938d9c3365cc937b92c1f1f8b33c6"
|
|
57
57
|
}
|