@graphcommerce/next-ui 3.20.7 → 3.21.1
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/ApolloError/ApolloErrorSnackbar.tsx +35 -0
- package/ApolloError/index.ts +6 -0
- package/AppShell/GlobalHead.tsx +1 -3
- package/AppShell/MenuFab.tsx +1 -1
- package/AppShell/MenuFabSecondaryItem.tsx +1 -1
- package/AppShell/{index.tsx → index.ts} +2 -4
- package/AppShell/{useFabAnimation.tsx → useFabAnimation.ts} +1 -1
- package/AppShell/{useFixedFabAnimation.tsx → useFixedFabAnimation.ts} +1 -1
- package/CHANGELOG.md +51 -0
- package/Form/index.tsx +2 -2
- package/FramerScroller/components/SidebarGallery.tsx +1 -2
- package/LayoutOverlay/components/LayoutOverlay.tsx +2 -2
- package/LayoutOverlay/components/LayoutOverlayBase.tsx +18 -16
- package/Row/ButtonLinkList/{index.tsx → ButtonLinkList.tsx} +4 -4
- package/{ButtonLink/index.tsx → Row/ButtonLinkList/ButtonLinkListItem.tsx} +10 -9
- package/Row/ButtonLinkList/index.ts +2 -0
- package/Snackbar/MessageSnackbarImpl.tsx +3 -1
- package/index.ts +2 -7
- package/package.json +11 -11
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { ApolloError } from '@apollo/client'
|
|
2
|
+
import { Trans } from '@lingui/macro'
|
|
3
|
+
import Button from '../Button'
|
|
4
|
+
import MessageSnackbar from '../Snackbar/MessageSnackbar'
|
|
5
|
+
import { MessageSnackbarImplProps } from '../Snackbar/MessageSnackbarImpl'
|
|
6
|
+
|
|
7
|
+
export type ApolloErrorSnackbarProps = {
|
|
8
|
+
error?: ApolloError
|
|
9
|
+
} & Pick<MessageSnackbarImplProps, 'action' | 'onClose'>
|
|
10
|
+
|
|
11
|
+
export default function ApolloErrorSnackbar(props: ApolloErrorSnackbarProps) {
|
|
12
|
+
const { error, action, ...passedProps } = props
|
|
13
|
+
|
|
14
|
+
if (!error) return null
|
|
15
|
+
return (
|
|
16
|
+
<MessageSnackbar
|
|
17
|
+
variant='pill'
|
|
18
|
+
severity='error'
|
|
19
|
+
{...passedProps}
|
|
20
|
+
open={!!error}
|
|
21
|
+
action={
|
|
22
|
+
action ?? (
|
|
23
|
+
<Button size='medium' variant='pill' color='secondary'>
|
|
24
|
+
<Trans>Ok</Trans>
|
|
25
|
+
</Button>
|
|
26
|
+
)
|
|
27
|
+
}
|
|
28
|
+
>
|
|
29
|
+
<>
|
|
30
|
+
{error.graphQLErrors.map((e) => e.message)}
|
|
31
|
+
{error.networkError && <>Network Error: {error.networkError.message}</>}
|
|
32
|
+
</>
|
|
33
|
+
</MessageSnackbar>
|
|
34
|
+
)
|
|
35
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export * from './ApolloErrorAlert'
|
|
2
|
+
export { default as ApolloErrorAlert } from './ApolloErrorAlert'
|
|
3
|
+
export * from './ApolloErrorFullPage'
|
|
4
|
+
export { default as ApolloErrorFullPage } from './ApolloErrorFullPage'
|
|
5
|
+
export * from './ApolloErrorSnackbar'
|
|
6
|
+
export { default as ApolloErrorSnackbar } from './ApolloErrorSnackbar'
|
package/AppShell/GlobalHead.tsx
CHANGED
|
@@ -4,7 +4,7 @@ import React from 'react'
|
|
|
4
4
|
|
|
5
5
|
export type GlobalHeadProps = { name: string }
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
export function GlobalHead(props: GlobalHeadProps) {
|
|
8
8
|
const { name } = props
|
|
9
9
|
const theme = useTheme()
|
|
10
10
|
|
|
@@ -32,5 +32,3 @@ const GlobalHead = (props: { name: string }) => {
|
|
|
32
32
|
</Head>
|
|
33
33
|
)
|
|
34
34
|
}
|
|
35
|
-
|
|
36
|
-
export default GlobalHead
|
package/AppShell/MenuFab.tsx
CHANGED
|
@@ -17,7 +17,7 @@ import { responsiveVal } from '../Styles/responsiveVal'
|
|
|
17
17
|
import SvgImageSimple from '../SvgImage/SvgImageSimple'
|
|
18
18
|
import { iconMenu, iconClose } from '../icons'
|
|
19
19
|
import { MenuProps } from './Menu'
|
|
20
|
-
import useFabAnimation from './useFabAnimation'
|
|
20
|
+
import { useFabAnimation } from './useFabAnimation'
|
|
21
21
|
|
|
22
22
|
const useStyles = makeStyles(
|
|
23
23
|
(theme: Theme) => ({
|
|
@@ -17,7 +17,7 @@ export type FabMenuSecondaryItemProps = {
|
|
|
17
17
|
icon: React.ReactNode
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
export
|
|
20
|
+
export function MenuFabSecondaryItem(props: FabMenuSecondaryItemProps) {
|
|
21
21
|
const { href, children, icon } = props
|
|
22
22
|
const classes = useStyles()
|
|
23
23
|
|
|
@@ -11,9 +11,7 @@ export * from './Menu'
|
|
|
11
11
|
export * from './MenuFab'
|
|
12
12
|
export { default as MenuFab } from './MenuFab'
|
|
13
13
|
export * from './MenuFabSecondaryItem'
|
|
14
|
-
export { default as MenuFabSecondaryItem } from './MenuFabSecondaryItem'
|
|
15
14
|
export * from './PlaceholderFab'
|
|
16
15
|
export * from './GlobalHead'
|
|
17
|
-
export
|
|
18
|
-
export
|
|
19
|
-
export { default as useFixedFabAnimation } from './useFixedFabAnimation'
|
|
16
|
+
export * from './useFabAnimation'
|
|
17
|
+
export * from './useFixedFabAnimation'
|
|
@@ -2,7 +2,7 @@ import { useMediaQuery, useTheme } from '@material-ui/core'
|
|
|
2
2
|
import { useMotionTemplate, useTransform } from 'framer-motion'
|
|
3
3
|
import { useScrollY } from '../Layout/hooks/useScrollY'
|
|
4
4
|
|
|
5
|
-
export
|
|
5
|
+
export function useFabAnimation() {
|
|
6
6
|
const theme = useTheme()
|
|
7
7
|
const isMobile = useMediaQuery(theme.breakpoints.down('sm'))
|
|
8
8
|
const scrollY = useScrollY()
|
|
@@ -2,7 +2,7 @@ import { alpha, useTheme } from '@material-ui/core'
|
|
|
2
2
|
import { useMotionTemplate, useTransform } from 'framer-motion'
|
|
3
3
|
import { useScrollY } from '../Layout/hooks/useScrollY'
|
|
4
4
|
|
|
5
|
-
export
|
|
5
|
+
export function useFixedFabAnimation() {
|
|
6
6
|
const theme = useTheme()
|
|
7
7
|
const scrollY = useScrollY()
|
|
8
8
|
const opacity = useTransform(scrollY, [50, 60], [0, 1])
|
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,57 @@
|
|
|
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.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
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* darkMode fixes ([7d33d45](https://github.com/ho-nl/m2-pwa/commit/7d33d452ec801632565839b2fdfef0bc4959c14a))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
# [3.21.0](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/next-ui@3.20.9...@graphcommerce/next-ui@3.21.0) (2021-12-17)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
* Form contained should be less spacious ([7d9557e](https://github.com/ho-nl/m2-pwa/commit/7d9557e9a75622a3dc40a3c7aab86da152d2e399))
|
|
23
|
+
* make sure the snackbar message is formatted correctly ([b9e1e26](https://github.com/ho-nl/m2-pwa/commit/b9e1e2623ec2aff6b623603aa38fe8d71ff59e1c))
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
### Features
|
|
27
|
+
|
|
28
|
+
* added ApolloErrorSnackbar ([96bc92e](https://github.com/ho-nl/m2-pwa/commit/96bc92e24bac735b28f5f32e1154f715ddf8cd6c))
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
## [3.20.9](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/next-ui@3.20.8...@graphcommerce/next-ui@3.20.9) (2021-12-16)
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
### Bug Fixes
|
|
38
|
+
|
|
39
|
+
* simplify ButtonLinkList and made more flexible ([e01cc82](https://github.com/ho-nl/m2-pwa/commit/e01cc825b87abf81d1cb8f9dc976f674b9e8e6d3))
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
## [3.20.8](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/next-ui@3.20.7...@graphcommerce/next-ui@3.20.8) (2021-12-15)
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
### Bug Fixes
|
|
49
|
+
|
|
50
|
+
* could not scroll to the bottom of a left/right sheet ([b84c86e](https://github.com/ho-nl/m2-pwa/commit/b84c86efa090657fc4cd480547f576bf6d9e0709))
|
|
51
|
+
* scroller should not snap to off-axis while dragging and direction isn't set to both ([9118bfc](https://github.com/ho-nl/m2-pwa/commit/9118bfcb1eb9ade5f144167e47e0c26724ce832f))
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
|
|
6
57
|
## [3.20.7](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/next-ui@3.20.6...@graphcommerce/next-ui@3.20.7) (2021-12-13)
|
|
7
58
|
|
|
8
59
|
|
package/Form/index.tsx
CHANGED
|
@@ -18,10 +18,10 @@ const useStyles = makeStyles(
|
|
|
18
18
|
background:
|
|
19
19
|
theme.palette.type === 'light'
|
|
20
20
|
? darken(theme.palette.background.default, 0.03)
|
|
21
|
-
: lighten(theme.palette.background.default, 0.
|
|
21
|
+
: lighten(theme.palette.background.default, 0.1),
|
|
22
22
|
},
|
|
23
23
|
contained: {
|
|
24
|
-
padding: theme.spacings.sm
|
|
24
|
+
padding: `${theme.spacings.xxs} ${theme.spacings.sm}`,
|
|
25
25
|
// paddingTop: theme.spacings.md,
|
|
26
26
|
overflow: 'hidden',
|
|
27
27
|
borderRadius: responsiveVal(theme.shape.borderRadius * 3, theme.shape.borderRadius * 4),
|
|
@@ -11,12 +11,11 @@ import {
|
|
|
11
11
|
} from '@graphcommerce/framer-scroller'
|
|
12
12
|
import { clientSize, useMotionValueValue } from '@graphcommerce/framer-utils'
|
|
13
13
|
import { Fab, makeStyles, Theme, useTheme, alpha } from '@material-ui/core'
|
|
14
|
-
import clsx from 'clsx'
|
|
15
14
|
import { m, useDomEvent, useMotionValue } from 'framer-motion'
|
|
16
15
|
import React, { useEffect, useRef } from 'react'
|
|
17
|
-
import { classesPicker } from '../..'
|
|
18
16
|
import Row from '../../Row'
|
|
19
17
|
import { UseStyles } from '../../Styles'
|
|
18
|
+
import { classesPicker } from '../../Styles/classesPicker'
|
|
20
19
|
import { responsiveVal } from '../../Styles/responsiveVal'
|
|
21
20
|
import SvgImageSimple from '../../SvgImage/SvgImageSimple'
|
|
22
21
|
import { iconChevronLeft, iconChevronRight, iconFullscreen, iconFullscreenExit } from '../../icons'
|
|
@@ -11,9 +11,9 @@ export function LayoutOverlay(props: LayoutOverlayProps) {
|
|
|
11
11
|
const { children, variantSm = 'bottom', variantMd = 'right', classes } = props
|
|
12
12
|
|
|
13
13
|
const scrollSnapTypeSm: ScrollSnapType =
|
|
14
|
-
variantSm === 'left' || variantSm === 'right' ? '
|
|
14
|
+
variantSm === 'left' || variantSm === 'right' ? 'inline mandatory' : 'block proximity'
|
|
15
15
|
const scrollSnapTypeMd: ScrollSnapType =
|
|
16
|
-
variantMd === 'left' || variantMd === 'right' ? '
|
|
16
|
+
variantMd === 'left' || variantMd === 'right' ? 'inline mandatory' : 'block proximity'
|
|
17
17
|
|
|
18
18
|
return (
|
|
19
19
|
<ScrollerProvider scrollSnapTypeSm={scrollSnapTypeSm} scrollSnapTypeMd={scrollSnapTypeMd}>
|
|
@@ -28,43 +28,43 @@ const useStyles = makeStyles(
|
|
|
28
28
|
},
|
|
29
29
|
[theme.breakpoints.down('sm')]: {
|
|
30
30
|
width: '100vw',
|
|
31
|
-
borderRadius: theme.shape.borderRadius * 3,
|
|
32
31
|
},
|
|
33
32
|
[theme.breakpoints.up('md')]: {
|
|
34
33
|
width: '100vw',
|
|
35
|
-
borderRadius: theme.shape.borderRadius * 4,
|
|
36
34
|
},
|
|
37
35
|
},
|
|
38
36
|
rootVariantSmLeft: {
|
|
39
37
|
[theme.breakpoints.down('sm')]: {
|
|
40
38
|
gridTemplate: `"overlay beforeOverlay"`,
|
|
41
|
-
|
|
42
|
-
|
|
39
|
+
borderTopRightRadius: theme.shape.borderRadius * 3,
|
|
40
|
+
borderBottomRightRadius: theme.shape.borderRadius * 3,
|
|
43
41
|
},
|
|
44
42
|
},
|
|
45
43
|
rootVariantMdLeft: {
|
|
46
44
|
[theme.breakpoints.up('md')]: {
|
|
47
45
|
gridTemplate: `"overlay beforeOverlay"`,
|
|
48
|
-
|
|
49
|
-
|
|
46
|
+
borderTopRightRadius: theme.shape.borderRadius * 4,
|
|
47
|
+
borderBottomRightRadius: theme.shape.borderRadius * 4,
|
|
50
48
|
},
|
|
51
49
|
},
|
|
52
50
|
rootVariantSmRight: {
|
|
53
51
|
[theme.breakpoints.down('sm')]: {
|
|
54
52
|
gridTemplate: `"beforeOverlay overlay"`,
|
|
55
|
-
|
|
56
|
-
|
|
53
|
+
borderTopLeftRadius: theme.shape.borderRadius * 3,
|
|
54
|
+
borderBottomLeftRadius: theme.shape.borderRadius * 3,
|
|
57
55
|
},
|
|
58
56
|
},
|
|
59
57
|
rootVariantMdRight: {
|
|
60
58
|
[theme.breakpoints.up('md')]: {
|
|
61
59
|
gridTemplate: `"beforeOverlay overlay"`,
|
|
62
|
-
|
|
63
|
-
|
|
60
|
+
borderTopLeftRadius: theme.shape.borderRadius * 4,
|
|
61
|
+
borderBottomLeftRadius: theme.shape.borderRadius * 4,
|
|
64
62
|
},
|
|
65
63
|
},
|
|
66
64
|
rootVariantSmBottom: {
|
|
67
65
|
[theme.breakpoints.down('sm')]: {
|
|
66
|
+
borderTopLeftRadius: theme.shape.borderRadius * 3,
|
|
67
|
+
borderTopRightRadius: theme.shape.borderRadius * 3,
|
|
68
68
|
gridTemplate: `"beforeOverlay" "overlay"`,
|
|
69
69
|
height: '100vh',
|
|
70
70
|
'@supports (-webkit-touch-callout: none)': {
|
|
@@ -73,6 +73,8 @@ const useStyles = makeStyles(
|
|
|
73
73
|
},
|
|
74
74
|
},
|
|
75
75
|
rootVariantMdBottom: {
|
|
76
|
+
borderTopLeftRadius: theme.shape.borderRadius * 4,
|
|
77
|
+
borderTopRightRadius: theme.shape.borderRadius * 4,
|
|
76
78
|
[theme.breakpoints.up('md')]: {
|
|
77
79
|
gridTemplate: `"beforeOverlay" "overlay"`,
|
|
78
80
|
height: '100vh',
|
|
@@ -81,7 +83,6 @@ const useStyles = makeStyles(
|
|
|
81
83
|
beforeOverlay: {
|
|
82
84
|
gridArea: 'beforeOverlay',
|
|
83
85
|
scrollSnapAlign: 'start',
|
|
84
|
-
scrollSnapStop: 'always',
|
|
85
86
|
display: 'grid',
|
|
86
87
|
alignContent: 'end',
|
|
87
88
|
},
|
|
@@ -134,7 +135,6 @@ const useStyles = makeStyles(
|
|
|
134
135
|
[theme.breakpoints.down('sm')]: {
|
|
135
136
|
marginTop: `calc(${theme.appShell.headerHeightSm} * 0.5 * -1)`,
|
|
136
137
|
paddingTop: `calc(${theme.appShell.headerHeightSm} * 0.5)`,
|
|
137
|
-
scrollSnapStop: 'always',
|
|
138
138
|
display: 'grid',
|
|
139
139
|
},
|
|
140
140
|
},
|
|
@@ -142,8 +142,6 @@ const useStyles = makeStyles(
|
|
|
142
142
|
[theme.breakpoints.up('md')]: {
|
|
143
143
|
marginTop: `calc(${theme.appShell.headerHeightMd} + (${theme.appShell.appBarHeightMd} - ${theme.appShell.appBarInnerHeightMd}) * 0.5)`,
|
|
144
144
|
paddingTop: `calc(${theme.appShell.headerHeightMd} + (${theme.appShell.appBarHeightMd} - ${theme.appShell.appBarInnerHeightMd}) * -0.5)`,
|
|
145
|
-
scrollSnapAlign: 'start',
|
|
146
|
-
scrollSnapStop: 'always',
|
|
147
145
|
display: 'grid',
|
|
148
146
|
},
|
|
149
147
|
},
|
|
@@ -152,17 +150,20 @@ const useStyles = makeStyles(
|
|
|
152
150
|
backgroundColor: theme.palette.background.paper,
|
|
153
151
|
boxShadow: theme.shadows[24],
|
|
154
152
|
minWidth: 'min(800px, 90vw)',
|
|
153
|
+
scrollSnapAlign: 'end',
|
|
155
154
|
},
|
|
156
155
|
overlayPaneVariantSmBottom: {
|
|
157
156
|
[theme.breakpoints.down('sm')]: {
|
|
158
157
|
width: '100vw',
|
|
159
|
-
|
|
158
|
+
borderTopLeftRadius: theme.shape.borderRadius * 3,
|
|
159
|
+
borderTopRightRadius: theme.shape.borderRadius * 3,
|
|
160
160
|
},
|
|
161
161
|
},
|
|
162
162
|
overlayPaneVariantMdBottom: {
|
|
163
163
|
[theme.breakpoints.up('md')]: {
|
|
164
164
|
width: '100vw',
|
|
165
|
-
|
|
165
|
+
borderTopLeftRadius: theme.shape.borderRadius * 3,
|
|
166
|
+
borderTopRightRadius: theme.shape.borderRadius * 3,
|
|
166
167
|
},
|
|
167
168
|
},
|
|
168
169
|
overlayPaneVariantSmLeft: {
|
|
@@ -290,6 +291,7 @@ export function LayoutOverlayBase(props: LayoutOverlayBaseProps) {
|
|
|
290
291
|
// The scroller context shouldn't be changing, but at the moment it is.
|
|
291
292
|
}, [positions, scrollerRef])
|
|
292
293
|
|
|
294
|
+
// When the overlay is closed by navigating away, we're closing the overlay.
|
|
293
295
|
useEffect(() => {
|
|
294
296
|
if (isPresent) return
|
|
295
297
|
|
|
@@ -32,20 +32,20 @@ const useStyles = makeStyles(
|
|
|
32
32
|
|
|
33
33
|
type ButtonLinkListPropsBase = {
|
|
34
34
|
title: string
|
|
35
|
-
|
|
35
|
+
children: React.ReactNode
|
|
36
36
|
containsBigLinks: boolean
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
export type ButtonLinkListProps = UseStyles<typeof useStyles> & ButtonLinkListPropsBase
|
|
40
40
|
|
|
41
|
-
export
|
|
42
|
-
const { title,
|
|
41
|
+
export function ButtonLinkList(props: ButtonLinkListProps) {
|
|
42
|
+
const { title, children } = props
|
|
43
43
|
const classes = useStyles(props)
|
|
44
44
|
|
|
45
45
|
return (
|
|
46
46
|
<Row maxWidth='md' className={classes.container}>
|
|
47
47
|
<SectionContainer labelLeft={title}>
|
|
48
|
-
<div className={classes.links}>{
|
|
48
|
+
<div className={classes.links}>{children}</div>
|
|
49
49
|
</SectionContainer>
|
|
50
50
|
</Row>
|
|
51
51
|
)
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { makeStyles, Theme } from '@material-ui/core'
|
|
2
|
+
import clsx from 'clsx'
|
|
2
3
|
import PageLink from 'next/link'
|
|
3
4
|
import React from 'react'
|
|
4
|
-
import Button, { ButtonProps } from '
|
|
5
|
-
import { UseStyles } from '
|
|
6
|
-
import SvgImageSimple from '
|
|
7
|
-
import { iconChevronRight } from '
|
|
5
|
+
import Button, { ButtonProps } from '../../Button'
|
|
6
|
+
import { UseStyles } from '../../Styles'
|
|
7
|
+
import SvgImageSimple from '../../SvgImage/SvgImageSimple'
|
|
8
|
+
import { iconChevronRight } from '../../icons'
|
|
8
9
|
|
|
9
10
|
const useStyles = makeStyles((theme: Theme) => ({
|
|
10
11
|
buttonLink: {
|
|
@@ -24,20 +25,20 @@ const useStyles = makeStyles((theme: Theme) => ({
|
|
|
24
25
|
}))
|
|
25
26
|
|
|
26
27
|
export type ButtonLinkProps = {
|
|
27
|
-
|
|
28
|
+
children: React.ReactNode
|
|
28
29
|
url: string
|
|
29
30
|
endIcon?: React.ReactNode
|
|
30
31
|
} & ButtonProps &
|
|
31
32
|
UseStyles<typeof useStyles>
|
|
32
33
|
|
|
33
|
-
export
|
|
34
|
-
const {
|
|
34
|
+
export function ButtonLinkListItem(props: ButtonLinkProps) {
|
|
35
|
+
const { children, url, endIcon, className, ...buttonProps } = props
|
|
35
36
|
const classes = useStyles(props)
|
|
36
37
|
|
|
37
38
|
return (
|
|
38
39
|
<PageLink href={url} passHref>
|
|
39
|
-
<Button {...buttonProps} className={classes.buttonLink}>
|
|
40
|
-
<span>{
|
|
40
|
+
<Button {...buttonProps} className={clsx(classes.buttonLink, className)}>
|
|
41
|
+
<span>{children}</span>
|
|
41
42
|
{endIcon ?? <SvgImageSimple src={iconChevronRight} />}
|
|
42
43
|
</Button>
|
|
43
44
|
</PageLink>
|
|
@@ -51,10 +51,12 @@ const useStyles = makeStyles(
|
|
|
51
51
|
gap: theme.spacings.xs,
|
|
52
52
|
gridTemplate: `
|
|
53
53
|
"children close"
|
|
54
|
-
"action
|
|
54
|
+
"action action"
|
|
55
55
|
`,
|
|
56
|
+
gridTemplateColumns: '1fr auto',
|
|
56
57
|
[theme.breakpoints.up('md')]: {
|
|
57
58
|
gridTemplate: `"children action close"`,
|
|
59
|
+
gridTemplateColumns: 'auto auto auto',
|
|
58
60
|
},
|
|
59
61
|
},
|
|
60
62
|
children: {
|
package/index.ts
CHANGED
|
@@ -6,10 +6,7 @@ export * from './Footer'
|
|
|
6
6
|
|
|
7
7
|
export * from './AnimatedRow'
|
|
8
8
|
export { default as AnimatedRow } from './AnimatedRow'
|
|
9
|
-
export * from './ApolloError
|
|
10
|
-
export { default as ApolloErrorAlert } from './ApolloError/ApolloErrorAlert'
|
|
11
|
-
export * from './ApolloError/ApolloErrorFullPage'
|
|
12
|
-
export { default as ApolloErrorFullPage } from './ApolloError/ApolloErrorFullPage'
|
|
9
|
+
export * from './ApolloError'
|
|
13
10
|
export * from './AspectRatioContainer'
|
|
14
11
|
export { default as AspectRationContainer } from './AspectRatioContainer'
|
|
15
12
|
export * from './Blog/BlogContent'
|
|
@@ -27,8 +24,7 @@ export * from './Blog/BlogListItem'
|
|
|
27
24
|
export { default as BlogListItem } from './Blog/BlogListItem'
|
|
28
25
|
export * from './Button'
|
|
29
26
|
export { default as Button } from './Button'
|
|
30
|
-
|
|
31
|
-
export { default as ButtonLink } from './ButtonLink'
|
|
27
|
+
|
|
32
28
|
export * from './ChipMenu'
|
|
33
29
|
export { default as ChipMenu } from './ChipMenu'
|
|
34
30
|
export * from './ContainerWithHeader'
|
|
@@ -66,7 +62,6 @@ export * from './RenderType'
|
|
|
66
62
|
export { default as RenderType } from './RenderType'
|
|
67
63
|
export { default as Row } from './Row'
|
|
68
64
|
export * from './Row/ButtonLinkList'
|
|
69
|
-
export { default as ButtonLinkList } from './Row/ButtonLinkList'
|
|
70
65
|
export { default as ColumnOne } from './Row/ColumnOne'
|
|
71
66
|
export { default as ColumnOneBoxed } from './Row/ColumnOneBoxed'
|
|
72
67
|
export { default as ColumnOneCentered } from './Row/ColumnOneCentered'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphcommerce/next-ui",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.21.1",
|
|
4
4
|
"author": "",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"scripts": {
|
|
@@ -10,22 +10,22 @@
|
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@apollo/client": "^3.5.6",
|
|
13
|
-
"@graphcommerce/framer-next-pages": "^2.108.
|
|
14
|
-
"@graphcommerce/framer-scroller": "^1.1.
|
|
15
|
-
"@graphcommerce/framer-utils": "^2.103.
|
|
16
|
-
"@graphcommerce/graphql": "^2.105.
|
|
17
|
-
"@graphcommerce/image": "^2.105.
|
|
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",
|
|
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.
|
|
23
|
+
"framer-motion": "^5.5.1",
|
|
24
24
|
"graphql": "^16.1.0",
|
|
25
25
|
"next": "^12.0.7",
|
|
26
26
|
"react": "^17.0.2",
|
|
27
27
|
"react-dom": "^17.0.2",
|
|
28
|
-
"react-focus-lock": "^2.7.
|
|
28
|
+
"react-focus-lock": "^2.7.1",
|
|
29
29
|
"react-is": "^17.0.2",
|
|
30
30
|
"react-schemaorg": "^2.0.0",
|
|
31
31
|
"schema-dts": "^1.0.0",
|
|
@@ -33,13 +33,13 @@
|
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@graphcommerce/browserslist-config-pwa": "^3.0.2",
|
|
36
|
-
"@graphcommerce/eslint-config-pwa": "^3.1.
|
|
36
|
+
"@graphcommerce/eslint-config-pwa": "^3.1.8",
|
|
37
37
|
"@graphcommerce/prettier-config-pwa": "^3.0.4",
|
|
38
38
|
"@graphcommerce/typescript-config-pwa": "^3.1.1",
|
|
39
39
|
"@playwright/test": "^1.17.1",
|
|
40
40
|
"@types/react-is": "^17.0.3",
|
|
41
41
|
"graphql-tag": "2.12.6",
|
|
42
|
-
"typescript": "^4.5.
|
|
42
|
+
"typescript": "^4.5.4"
|
|
43
43
|
},
|
|
44
44
|
"sideEffects": false,
|
|
45
45
|
"prettier": "@graphcommerce/prettier-config-pwa",
|
|
@@ -52,5 +52,5 @@
|
|
|
52
52
|
"project": "./tsconfig.json"
|
|
53
53
|
}
|
|
54
54
|
},
|
|
55
|
-
"gitHead": "
|
|
55
|
+
"gitHead": "6cab980582a62a8eee8d5f9bd77583cabc32c6f8"
|
|
56
56
|
}
|