@graphcommerce/next-ui 3.25.1 → 4.0.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/AnimatedRow/index.tsx +6 -3
- package/ApolloError/ApolloErrorAlert.tsx +20 -21
- package/ApolloError/ApolloErrorFullPage.tsx +3 -4
- package/ApolloError/ApolloErrorSnackbar.tsx +3 -3
- package/Blog/BlogAuthor/index.tsx +42 -48
- package/Blog/BlogContent/index.tsx +6 -23
- package/Blog/BlogHeader/index.tsx +26 -23
- package/Blog/BlogList/index.tsx +7 -25
- package/Blog/BlogListItem/index.tsx +63 -52
- package/Blog/BlogTags/BlogTag.tsx +27 -0
- package/Blog/BlogTags/index.tsx +7 -32
- package/Blog/BlogTitle/index.tsx +7 -21
- package/Button/Button.tsx +5 -0
- package/Button/LinkOrButton.tsx +80 -0
- package/Button/index.tsx +2 -177
- package/CHANGELOG.md +497 -636
- package/ChipMenu/index.tsx +71 -77
- package/ContainerWithHeader/index.tsx +33 -30
- package/FlagAvatar/index.tsx +2 -12
- package/Footer/Footer.tsx +105 -88
- package/Footer/index.ts +0 -1
- package/Form/Form.tsx +35 -0
- package/Form/FormActions.tsx +9 -14
- package/Form/FormDivider.tsx +8 -13
- package/Form/FormHeader.tsx +5 -26
- package/Form/FormRow.tsx +8 -13
- package/Form/InputCheckmark.tsx +9 -22
- package/FramerScroller/SidebarGallery.tsx +340 -0
- package/FramerScroller/SidebarSlider.tsx +107 -0
- package/FramerScroller/index.ts +2 -0
- package/FullPageMessage/index.tsx +52 -48
- package/Highlight/index.tsx +1 -1
- package/IconHeader/index.tsx +63 -58
- package/JsonLd/index.tsx +3 -2
- package/Layout/components/LayoutHeader.tsx +75 -82
- package/Layout/components/LayoutHeaderBack.tsx +21 -12
- package/Layout/components/LayoutHeaderClose.tsx +9 -22
- package/Layout/components/LayoutHeaderContent.tsx +190 -154
- package/Layout/components/LayoutHeadertypes.ts +1 -1
- package/Layout/components/LayoutTitle.tsx +60 -55
- package/LayoutDefault/components/LayoutDefault.tsx +96 -85
- package/LayoutOverlay/components/LayoutOverlay.tsx +2 -8
- package/LayoutOverlay/components/LayoutOverlayBase.tsx +233 -239
- package/LayoutOverlay/test/LayoutOverlayDemo.tsx +1 -1
- package/LayoutParts/DesktopHeaderBadge.tsx +28 -0
- package/LayoutParts/DesktopNavActions.tsx +15 -0
- package/LayoutParts/DesktopNavBar.tsx +113 -0
- package/LayoutParts/DesktopNavBarItem.tsx +44 -0
- package/{AppShell → LayoutParts}/GlobalHead.tsx +1 -2
- package/LayoutParts/Logo.tsx +77 -0
- package/LayoutParts/MenuFab.tsx +131 -0
- package/LayoutParts/MenuFabItem.tsx +25 -0
- package/LayoutParts/MenuFabSecondaryItem.tsx +37 -0
- package/{AppShell/PlaceholderFab/index.tsx → LayoutParts/PlaceholderFab.tsx} +1 -1
- package/LayoutParts/StickyBelowHeader.tsx +25 -0
- package/LayoutParts/index.ts +12 -0
- package/{AppShell → LayoutParts}/useFabAnimation.ts +0 -0
- package/Page/CssAndFramerMotionProvider.tsx +21 -0
- package/Page/index.ts +2 -0
- package/Page/types.ts +2 -8
- package/PageLoadIndicator/index.tsx +25 -30
- package/PageMeta/index.tsx +1 -1
- package/Pagination/index.tsx +37 -54
- package/RenderType/index.tsx +1 -1
- package/Row/ButtonLinkList/ButtonLinkList.tsx +35 -37
- package/Row/ButtonLinkList/ButtonLinkListItem.tsx +16 -33
- package/Row/ColumnOne/index.tsx +5 -10
- package/Row/ColumnOneBoxed/index.tsx +18 -19
- package/Row/ColumnOneCentered/index.tsx +3 -4
- package/Row/ColumnThree/index.tsx +62 -57
- package/Row/ColumnTwo/index.tsx +37 -35
- package/Row/ColumnTwoSpread/index.tsx +28 -37
- package/Row/ColumnTwoWithTop/index.tsx +37 -43
- package/Row/ContentLinks/index.tsx +24 -25
- package/Row/HeroBanner/index.tsx +98 -82
- package/Row/IconBlocks/IconBlock/index.tsx +45 -37
- package/Row/IconBlocks/index.tsx +29 -44
- package/Row/ImageText/index.tsx +71 -67
- package/Row/ImageTextBoxed/index.tsx +66 -65
- package/Row/ParagraphWithSidebarSlide/index.tsx +80 -76
- package/Row/Quote/index.tsx +3 -3
- package/Row/SpecialBanner/index.tsx +97 -97
- package/Row/index.tsx +4 -9
- package/SectionContainer/index.tsx +32 -31
- package/SectionHeader/index.tsx +41 -43
- package/Separator/index.tsx +19 -18
- package/Snackbar/MessageSnackbar.tsx +1 -2
- package/Snackbar/MessageSnackbarImpl.tsx +68 -115
- package/StarRatingField/index.tsx +24 -25
- package/Stepper/Stepper.tsx +34 -32
- package/Styles/EmotionProvider.tsx +14 -0
- package/Styles/breakpointVal.tsx +16 -10
- package/Styles/extendableComponent.ts +70 -0
- package/Styles/index.tsx +9 -2
- package/Styles/withEmotionCache.tsx +36 -0
- package/Styles/withTheme.tsx +15 -24
- package/SvgIcon/SvgIcon.tsx +60 -0
- package/TextInputNumber/index.tsx +49 -50
- package/Theme/MuiButton.ts +128 -0
- package/Theme/MuiSlider.ts +28 -0
- package/Theme/MuiSnackbar.ts +31 -0
- package/Theme/{types.ts → createTheme.ts} +8 -2
- package/Theme/index.ts +4 -0
- package/Theme/themeDefaults.ts +51 -0
- package/TimeAgo/index.tsx +1 -1
- package/ToggleButton/index.tsx +43 -49
- package/ToggleButtonGroup/index.tsx +39 -39
- package/UspList/UspListItem.tsx +56 -46
- package/UspList/index.tsx +29 -26
- package/docs/building-components.mdx +3 -0
- package/docs/components/ComponentBasic.tsx +26 -0
- package/docs/components/ComponentChild.tsx +48 -0
- package/docs/components/ComponentChildVariant.tsx +54 -0
- package/docs/components/ComponentChildVariantExtendable.tsx +62 -0
- package/docs/components/ComponentStylable.tsx +32 -0
- package/docs/pages/building-components.tsx +62 -0
- package/index.ts +27 -81
- package/package.json +25 -27
- package/types.d.ts +1 -1
- package/AppShell/AppShellSticky/index.tsx +0 -38
- package/AppShell/DesktopNavActions.tsx +0 -32
- package/AppShell/DesktopNavBar.tsx +0 -158
- package/AppShell/Logo.tsx +0 -46
- package/AppShell/Menu.tsx +0 -7
- package/AppShell/MenuFab.tsx +0 -162
- package/AppShell/MenuFabSecondaryItem.tsx +0 -32
- package/AppShell/index.ts +0 -15
- package/AspectRatioContainer/index.tsx +0 -27
- package/Footer/SocialIcon.tsx +0 -23
- package/Form/index.tsx +0 -67
- package/FramerScroller/components/SidebarGallery.tsx +0 -317
- package/FramerScroller/components/SidebarSlider.tsx +0 -97
- package/Page/App.tsx +0 -17
- package/Page/Document.tsx +0 -24
- package/StyledBadge/index.tsx +0 -20
- package/Styles/classesPicker.ts +0 -41
- package/SvgImage/SvgImageSimple.tsx +0 -100
- package/SvgImage/index.tsx +0 -74
package/Row/ImageText/index.tsx
CHANGED
|
@@ -1,79 +1,83 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Box, SxProps, Theme } from '@mui/material'
|
|
2
2
|
import React from 'react'
|
|
3
|
-
import Row from '..'
|
|
4
|
-
import {
|
|
3
|
+
import { Row } from '..'
|
|
4
|
+
import { extendableComponent } from '../../Styles'
|
|
5
5
|
import { responsiveVal } from '../../Styles/responsiveVal'
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
(theme: Theme) => ({
|
|
9
|
-
wrapper: {
|
|
10
|
-
display: 'grid',
|
|
11
|
-
background:
|
|
12
|
-
theme.palette.type === 'light'
|
|
13
|
-
? theme.palette.background.image
|
|
14
|
-
: theme.palette.background.paper,
|
|
15
|
-
justifyItems: 'center',
|
|
16
|
-
columnGap: theme.spacings.lg,
|
|
17
|
-
paddingTop: theme.spacings.lg,
|
|
18
|
-
paddingBottom: theme.spacings.lg,
|
|
19
|
-
[theme.breakpoints.up('md')]: {
|
|
20
|
-
paddingTop: 0,
|
|
21
|
-
paddingBottom: 0,
|
|
22
|
-
background: 'none',
|
|
23
|
-
gridTemplateColumns: '1fr 1fr',
|
|
24
|
-
},
|
|
25
|
-
borderRadius: responsiveVal(theme.shape.borderRadius * 2, theme.shape.borderRadius * 3),
|
|
26
|
-
},
|
|
27
|
-
asset: {
|
|
28
|
-
height: '100%',
|
|
29
|
-
width: '100%',
|
|
30
|
-
'& img': {
|
|
31
|
-
height: '100%',
|
|
32
|
-
width: '100%',
|
|
33
|
-
objectFit: 'cover',
|
|
34
|
-
borderRadius: responsiveVal(theme.shape.borderRadius * 2, theme.shape.borderRadius * 3),
|
|
35
|
-
},
|
|
36
|
-
},
|
|
37
|
-
copy: {
|
|
38
|
-
marginTop: theme.spacings.lg,
|
|
39
|
-
color: theme.palette.text.primary,
|
|
40
|
-
maxWidth: '80%',
|
|
41
|
-
display: 'grid',
|
|
42
|
-
alignContent: 'center',
|
|
43
|
-
[theme.breakpoints.up('md')]: {
|
|
44
|
-
maxWidth: '70%',
|
|
45
|
-
marginTop: 0,
|
|
46
|
-
},
|
|
47
|
-
'& > *': {
|
|
48
|
-
maxWidth: 'max-content',
|
|
49
|
-
},
|
|
50
|
-
},
|
|
51
|
-
url: {
|
|
52
|
-
...theme.typography.body2,
|
|
53
|
-
[theme.breakpoints.up('md')]: {
|
|
54
|
-
...theme.typography.h4,
|
|
55
|
-
},
|
|
56
|
-
color: theme.palette.text.primary,
|
|
57
|
-
},
|
|
58
|
-
}),
|
|
59
|
-
{ name: 'ImageText' },
|
|
60
|
-
)
|
|
61
|
-
|
|
62
|
-
export type ImageTextProps = UseStyles<typeof useStyles> & {
|
|
7
|
+
export type ImageTextProps = {
|
|
63
8
|
item?: React.ReactNode
|
|
64
9
|
children: React.ReactNode
|
|
10
|
+
sx?: SxProps<Theme>
|
|
65
11
|
}
|
|
66
12
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
13
|
+
const name = 'ImageText' as const
|
|
14
|
+
const parts = ['root', 'wrapper', 'asset', 'copy'] as const
|
|
15
|
+
const { classes } = extendableComponent(name, parts)
|
|
16
|
+
|
|
17
|
+
export function ImageText(props: ImageTextProps) {
|
|
18
|
+
const { item, children, sx } = props
|
|
70
19
|
|
|
71
20
|
return (
|
|
72
|
-
<Row maxWidth={false}>
|
|
73
|
-
<
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
21
|
+
<Row maxWidth={false} className={classes.root} sx={sx}>
|
|
22
|
+
<Box
|
|
23
|
+
className={classes.wrapper}
|
|
24
|
+
sx={(theme) => ({
|
|
25
|
+
display: 'grid',
|
|
26
|
+
background:
|
|
27
|
+
theme.palette.mode === 'light'
|
|
28
|
+
? theme.palette.background.image
|
|
29
|
+
: theme.palette.background.paper,
|
|
30
|
+
justifyItems: 'center',
|
|
31
|
+
columnGap: theme.spacings.lg,
|
|
32
|
+
paddingTop: theme.spacings.lg,
|
|
33
|
+
paddingBottom: theme.spacings.lg,
|
|
34
|
+
[theme.breakpoints.up('md')]: {
|
|
35
|
+
paddingTop: 0,
|
|
36
|
+
paddingBottom: 0,
|
|
37
|
+
background: 'none',
|
|
38
|
+
gridTemplateColumns: '1fr 1fr',
|
|
39
|
+
},
|
|
40
|
+
borderRadius: responsiveVal(theme.shape.borderRadius * 2, theme.shape.borderRadius * 3),
|
|
41
|
+
})}
|
|
42
|
+
>
|
|
43
|
+
<Box
|
|
44
|
+
className={classes.asset}
|
|
45
|
+
sx={(theme) => ({
|
|
46
|
+
height: '100%',
|
|
47
|
+
width: '100%',
|
|
48
|
+
'& img': {
|
|
49
|
+
height: '100%',
|
|
50
|
+
width: '100%',
|
|
51
|
+
objectFit: 'cover',
|
|
52
|
+
borderRadius: responsiveVal(
|
|
53
|
+
theme.shape.borderRadius * 2,
|
|
54
|
+
theme.shape.borderRadius * 3,
|
|
55
|
+
),
|
|
56
|
+
},
|
|
57
|
+
})}
|
|
58
|
+
>
|
|
59
|
+
{item}
|
|
60
|
+
</Box>
|
|
61
|
+
<Box
|
|
62
|
+
className={classes.copy}
|
|
63
|
+
sx={(theme) => ({
|
|
64
|
+
marginTop: theme.spacings.lg,
|
|
65
|
+
color: theme.palette.text.primary,
|
|
66
|
+
maxWidth: '80%',
|
|
67
|
+
display: 'grid',
|
|
68
|
+
alignContent: 'center',
|
|
69
|
+
[theme.breakpoints.up('md')]: {
|
|
70
|
+
maxWidth: '70%',
|
|
71
|
+
marginTop: 0,
|
|
72
|
+
},
|
|
73
|
+
'& > *': {
|
|
74
|
+
maxWidth: 'max-content',
|
|
75
|
+
},
|
|
76
|
+
})}
|
|
77
|
+
>
|
|
78
|
+
{children}
|
|
79
|
+
</Box>
|
|
80
|
+
</Box>
|
|
77
81
|
</Row>
|
|
78
82
|
)
|
|
79
83
|
}
|
|
@@ -1,77 +1,78 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Box, SxProps, Theme } from '@mui/material'
|
|
2
2
|
import React from 'react'
|
|
3
|
-
import Row from '..'
|
|
4
|
-
import {
|
|
3
|
+
import { Row } from '..'
|
|
4
|
+
import { extendableComponent } from '../../Styles'
|
|
5
5
|
import { responsiveVal } from '../../Styles/responsiveVal'
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
(theme: Theme) => ({
|
|
9
|
-
wrapper: {
|
|
10
|
-
display: 'grid',
|
|
11
|
-
border: `1px solid ${theme.palette.divider}`,
|
|
12
|
-
justifyItems: 'center',
|
|
13
|
-
columnGap: `${theme.spacings.lg}`,
|
|
14
|
-
padding: 0,
|
|
15
|
-
[theme.breakpoints.up('md')]: {
|
|
16
|
-
background: 'none',
|
|
17
|
-
gridTemplateColumns: '1fr auto',
|
|
18
|
-
columnGap: `${theme.spacings.lg}`,
|
|
19
|
-
},
|
|
20
|
-
borderRadius: responsiveVal(theme.shape.borderRadius * 2, theme.shape.borderRadius * 3),
|
|
21
|
-
overflow: 'hidden',
|
|
22
|
-
},
|
|
23
|
-
asset: {
|
|
24
|
-
height: '100%',
|
|
25
|
-
width: '100%',
|
|
26
|
-
[theme.breakpoints.up('md')]: {
|
|
27
|
-
height: '100%',
|
|
28
|
-
width: responsiveVal(100, 600),
|
|
29
|
-
},
|
|
30
|
-
'& img': {
|
|
31
|
-
height: '100% !important',
|
|
32
|
-
width: '100% !important',
|
|
33
|
-
objectFit: `cover`,
|
|
34
|
-
},
|
|
35
|
-
},
|
|
36
|
-
copy: {
|
|
37
|
-
padding: `${theme.spacings.lg} 0`,
|
|
38
|
-
color: theme.palette.text.primary,
|
|
39
|
-
maxWidth: '80%',
|
|
40
|
-
display: 'grid',
|
|
41
|
-
alignContent: 'center',
|
|
42
|
-
[theme.breakpoints.up('md')]: {
|
|
43
|
-
maxWidth: '70%',
|
|
44
|
-
},
|
|
45
|
-
'& > *': {
|
|
46
|
-
maxWidth: 'max-content',
|
|
47
|
-
},
|
|
48
|
-
},
|
|
49
|
-
url: {
|
|
50
|
-
...theme.typography.body2,
|
|
51
|
-
[theme.breakpoints.up('md')]: {
|
|
52
|
-
...theme.typography.h4,
|
|
53
|
-
},
|
|
54
|
-
color: theme.palette.text.primary,
|
|
55
|
-
},
|
|
56
|
-
}),
|
|
57
|
-
{ name: 'ImageTextBoxed' },
|
|
58
|
-
)
|
|
59
|
-
|
|
60
|
-
export type ImageTextBoxedProps = UseStyles<typeof useStyles> & {
|
|
7
|
+
export type ImageTextBoxedProps = {
|
|
61
8
|
children: React.ReactNode
|
|
62
9
|
item?: React.ReactNode
|
|
10
|
+
sx?: SxProps<Theme>
|
|
63
11
|
}
|
|
64
12
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
13
|
+
const name = 'ImageTextBoxed' as const
|
|
14
|
+
const parts = ['root', 'wrapper', 'asset', 'copy'] as const
|
|
15
|
+
const { classes } = extendableComponent(name, parts)
|
|
16
|
+
|
|
17
|
+
export function ImageTextBoxed(props: ImageTextBoxedProps) {
|
|
18
|
+
const { children, item, sx = [] } = props
|
|
68
19
|
|
|
69
20
|
return (
|
|
70
|
-
<Row>
|
|
71
|
-
<
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
21
|
+
<Row className={classes.root} sx={sx}>
|
|
22
|
+
<Box
|
|
23
|
+
className={classes.wrapper}
|
|
24
|
+
sx={(theme) => ({
|
|
25
|
+
display: 'grid',
|
|
26
|
+
border: `1px solid ${theme.palette.divider}`,
|
|
27
|
+
justifyItems: 'center',
|
|
28
|
+
columnGap: `${theme.spacings.lg}`,
|
|
29
|
+
padding: 0,
|
|
30
|
+
[theme.breakpoints.up('md')]: {
|
|
31
|
+
background: 'none',
|
|
32
|
+
gridTemplateColumns: '1fr auto',
|
|
33
|
+
columnGap: `${theme.spacings.lg}`,
|
|
34
|
+
},
|
|
35
|
+
borderRadius: responsiveVal(theme.shape.borderRadius * 2, theme.shape.borderRadius * 3),
|
|
36
|
+
overflow: 'hidden',
|
|
37
|
+
})}
|
|
38
|
+
>
|
|
39
|
+
<Box
|
|
40
|
+
className={classes.copy}
|
|
41
|
+
sx={(theme) => ({
|
|
42
|
+
padding: `${theme.spacings.lg} 0`,
|
|
43
|
+
color: theme.palette.text.primary,
|
|
44
|
+
maxWidth: '80%',
|
|
45
|
+
display: 'grid',
|
|
46
|
+
alignContent: 'center',
|
|
47
|
+
[theme.breakpoints.up('md')]: {
|
|
48
|
+
maxWidth: '70%',
|
|
49
|
+
},
|
|
50
|
+
'& > *': {
|
|
51
|
+
maxWidth: 'max-content',
|
|
52
|
+
},
|
|
53
|
+
})}
|
|
54
|
+
>
|
|
55
|
+
{children}
|
|
56
|
+
</Box>
|
|
57
|
+
<Box
|
|
58
|
+
className={classes.asset}
|
|
59
|
+
sx={(theme) => ({
|
|
60
|
+
height: '100%',
|
|
61
|
+
width: '100%',
|
|
62
|
+
[theme.breakpoints.up('md')]: {
|
|
63
|
+
height: '100%',
|
|
64
|
+
width: responsiveVal(100, 600),
|
|
65
|
+
},
|
|
66
|
+
'& img': {
|
|
67
|
+
height: '100% !important',
|
|
68
|
+
width: '100% !important',
|
|
69
|
+
objectFit: `cover`,
|
|
70
|
+
},
|
|
71
|
+
})}
|
|
72
|
+
>
|
|
73
|
+
{item}
|
|
74
|
+
</Box>
|
|
75
|
+
</Box>
|
|
75
76
|
</Row>
|
|
76
77
|
)
|
|
77
78
|
}
|
|
@@ -1,87 +1,91 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import Row from '..'
|
|
3
|
-
import {
|
|
1
|
+
import { Box, ContainerProps } from '@mui/material'
|
|
2
|
+
import { Row } from '..'
|
|
3
|
+
import { extendableComponent } from '../../Styles'
|
|
4
4
|
import { responsiveVal } from '../../Styles/responsiveVal'
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
gridTemplateColumns: '1fr 1fr',
|
|
12
|
-
gap: `${theme.spacings.md}`,
|
|
13
|
-
[theme.breakpoints.up('md')]: {
|
|
14
|
-
gridTemplateColumns: '8fr 3fr',
|
|
15
|
-
},
|
|
16
|
-
},
|
|
17
|
-
backstory: {
|
|
18
|
-
position: 'relative',
|
|
19
|
-
'& img': {
|
|
20
|
-
position: 'absolute',
|
|
21
|
-
top: '0',
|
|
22
|
-
zIndex: 0,
|
|
23
|
-
width: '100%',
|
|
24
|
-
height: '100% !important',
|
|
25
|
-
objectFit: 'cover',
|
|
26
|
-
filter: 'brightness(80%)',
|
|
27
|
-
[theme.breakpoints.up('md')]: {
|
|
28
|
-
filter: 'brightness(100%)',
|
|
29
|
-
height: '100%',
|
|
30
|
-
},
|
|
31
|
-
borderRadius: responsiveVal(theme.shape.borderRadius * 2, theme.shape.borderRadius * 3),
|
|
32
|
-
},
|
|
33
|
-
},
|
|
34
|
-
copy: {
|
|
35
|
-
color: theme.palette.secondary.contrastText,
|
|
36
|
-
display: 'grid',
|
|
37
|
-
zIndex: 1,
|
|
38
|
-
justifyItems: 'start',
|
|
39
|
-
alignContent: 'end',
|
|
40
|
-
position: 'relative',
|
|
41
|
-
padding: `${theme.spacings.md}`,
|
|
42
|
-
'& > *': {
|
|
43
|
-
zIndex: 1,
|
|
44
|
-
maxWidth: 'max-content',
|
|
45
|
-
},
|
|
46
|
-
[theme.breakpoints.up('md')]: {
|
|
47
|
-
background: 'none',
|
|
48
|
-
width: '60%',
|
|
49
|
-
minHeight: '130vh',
|
|
50
|
-
},
|
|
51
|
-
[theme.breakpoints.up('lg')]: {
|
|
52
|
-
padding: `${theme.spacings.lg} ${theme.spacings.lg}`,
|
|
53
|
-
width: '50%',
|
|
54
|
-
},
|
|
55
|
-
},
|
|
56
|
-
slidingItems: {
|
|
57
|
-
'& > *': {
|
|
58
|
-
height: 'auto !important',
|
|
59
|
-
},
|
|
60
|
-
},
|
|
61
|
-
}),
|
|
62
|
-
{ name: 'ParagraphWithSidebarSlide' },
|
|
63
|
-
)
|
|
6
|
+
export type ParagraphWithSidebarSlideProps = ContainerProps & {
|
|
7
|
+
slidingItems: React.ReactNode
|
|
8
|
+
background: React.ReactNode
|
|
9
|
+
children: React.ReactNode
|
|
10
|
+
}
|
|
64
11
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
background: React.ReactNode
|
|
69
|
-
children: React.ReactNode
|
|
70
|
-
}
|
|
12
|
+
const name = 'ParagraphWithSidebarSlide' as const
|
|
13
|
+
const parts = ['root', 'wrapper', 'backstory', 'copy', 'slidingItems'] as const
|
|
14
|
+
const { classes } = extendableComponent(name, parts)
|
|
71
15
|
|
|
72
|
-
export
|
|
16
|
+
export function ParagraphWithSidebarSlide(props: ParagraphWithSidebarSlideProps) {
|
|
73
17
|
const { background, slidingItems, children, ...containerProps } = props
|
|
74
|
-
const classes = useStyles(props)
|
|
75
18
|
|
|
76
19
|
return (
|
|
77
|
-
<Row maxWidth={false} {...containerProps}>
|
|
78
|
-
<
|
|
79
|
-
|
|
80
|
-
|
|
20
|
+
<Row maxWidth={false} {...containerProps} className={classes.root}>
|
|
21
|
+
<Box
|
|
22
|
+
className={classes.wrapper}
|
|
23
|
+
sx={(theme) => ({
|
|
24
|
+
overflow: 'hidden',
|
|
25
|
+
display: 'grid',
|
|
26
|
+
gridTemplateColumns: '1fr 1fr',
|
|
27
|
+
gap: `${theme.spacings.md}`,
|
|
28
|
+
[theme.breakpoints.up('md')]: {
|
|
29
|
+
gridTemplateColumns: '8fr 3fr',
|
|
30
|
+
},
|
|
31
|
+
})}
|
|
32
|
+
>
|
|
33
|
+
<Box
|
|
34
|
+
className={classes.backstory}
|
|
35
|
+
sx={(theme) => ({
|
|
36
|
+
position: 'relative',
|
|
37
|
+
'& img': {
|
|
38
|
+
position: 'absolute',
|
|
39
|
+
top: '0',
|
|
40
|
+
zIndex: 0,
|
|
41
|
+
width: '100%',
|
|
42
|
+
height: '100% !important',
|
|
43
|
+
objectFit: 'cover',
|
|
44
|
+
filter: 'brightness(80%)',
|
|
45
|
+
[theme.breakpoints.up('md')]: {
|
|
46
|
+
filter: 'brightness(100%)',
|
|
47
|
+
height: '100%',
|
|
48
|
+
},
|
|
49
|
+
borderRadius: responsiveVal(
|
|
50
|
+
theme.shape.borderRadius * 2,
|
|
51
|
+
theme.shape.borderRadius * 3,
|
|
52
|
+
),
|
|
53
|
+
},
|
|
54
|
+
})}
|
|
55
|
+
>
|
|
56
|
+
<Box
|
|
57
|
+
className={classes.copy}
|
|
58
|
+
sx={(theme) => ({
|
|
59
|
+
color: theme.palette.secondary.contrastText,
|
|
60
|
+
display: 'grid',
|
|
61
|
+
zIndex: 1,
|
|
62
|
+
justifyItems: 'start',
|
|
63
|
+
alignContent: 'end',
|
|
64
|
+
position: 'relative',
|
|
65
|
+
padding: `${theme.spacings.md}`,
|
|
66
|
+
'& > *': {
|
|
67
|
+
zIndex: 1,
|
|
68
|
+
maxWidth: 'max-content',
|
|
69
|
+
},
|
|
70
|
+
[theme.breakpoints.up('md')]: {
|
|
71
|
+
background: 'none',
|
|
72
|
+
width: '60%',
|
|
73
|
+
minHeight: '130vh',
|
|
74
|
+
},
|
|
75
|
+
[theme.breakpoints.up('lg')]: {
|
|
76
|
+
padding: `${theme.spacings.lg} ${theme.spacings.lg}`,
|
|
77
|
+
width: '50%',
|
|
78
|
+
},
|
|
79
|
+
})}
|
|
80
|
+
>
|
|
81
|
+
{children}
|
|
82
|
+
</Box>
|
|
81
83
|
{background}
|
|
82
|
-
</
|
|
83
|
-
<
|
|
84
|
-
|
|
84
|
+
</Box>
|
|
85
|
+
<Box className={classes.slidingItems} sx={{ '& > *': { height: 'auto !important' } }}>
|
|
86
|
+
{slidingItems}
|
|
87
|
+
</Box>
|
|
88
|
+
</Box>
|
|
85
89
|
</Row>
|
|
86
90
|
)
|
|
87
91
|
}
|
package/Row/Quote/index.tsx
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { ContainerProps } from '@material
|
|
1
|
+
import { ContainerProps } from '@mui/material'
|
|
2
2
|
import React from 'react'
|
|
3
|
-
import Row from '..'
|
|
3
|
+
import { Row } from '..'
|
|
4
4
|
|
|
5
5
|
export type QuoteProps = {
|
|
6
6
|
children: React.ReactElement
|
|
7
7
|
} & ContainerProps
|
|
8
8
|
|
|
9
|
-
export
|
|
9
|
+
export function Quote(props: QuoteProps) {
|
|
10
10
|
const { children, ...containerProps } = props
|
|
11
11
|
|
|
12
12
|
return <Row {...containerProps}>{children}</Row>
|
|
@@ -1,111 +1,111 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import Row from '..'
|
|
3
|
-
import {
|
|
1
|
+
import { Box, ContainerProps, Typography } from '@mui/material'
|
|
2
|
+
import { Row } from '..'
|
|
3
|
+
import { extendableComponent } from '../../Styles'
|
|
4
4
|
import { responsiveVal } from '../../Styles/responsiveVal'
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
justifyItems: 'center',
|
|
13
|
-
columnGap: `${theme.spacings.lg}`,
|
|
14
|
-
paddingTop: theme.spacings.lg,
|
|
15
|
-
paddingBottom: theme.spacings.lg,
|
|
16
|
-
justifySelf: 'start',
|
|
17
|
-
borderRadius: responsiveVal(theme.shape.borderRadius * 2, theme.shape.borderRadius * 3),
|
|
18
|
-
[theme.breakpoints.up('md')]: {
|
|
19
|
-
padding: 0,
|
|
20
|
-
background: 'none',
|
|
21
|
-
justifySelf: 'center',
|
|
22
|
-
gridTemplateColumns: '1fr 1fr',
|
|
23
|
-
columnGap: `${theme.spacings.lg}`,
|
|
24
|
-
},
|
|
25
|
-
},
|
|
26
|
-
asset: {
|
|
27
|
-
width: responsiveVal(200, 900),
|
|
28
|
-
height: 'auto',
|
|
29
|
-
marginBottom: theme.spacings.md,
|
|
30
|
-
'& img': {
|
|
31
|
-
width: responsiveVal(200, 900),
|
|
32
|
-
height: 'auto',
|
|
33
|
-
objectFit: 'cover',
|
|
34
|
-
borderRadius: responsiveVal(theme.shape.borderRadius * 2, theme.shape.borderRadius * 3),
|
|
35
|
-
},
|
|
36
|
-
[theme.breakpoints.up('lg')]: {
|
|
37
|
-
width: responsiveVal(250, 900),
|
|
38
|
-
height: 'auto',
|
|
39
|
-
'& img': {
|
|
40
|
-
width: responsiveVal(250, 900),
|
|
41
|
-
height: 'auto',
|
|
42
|
-
objectFit: 'cover',
|
|
43
|
-
},
|
|
44
|
-
},
|
|
45
|
-
[theme.breakpoints.between('md', 'lg')]: {
|
|
46
|
-
width: '100%',
|
|
47
|
-
'& img': {
|
|
48
|
-
width: '100%',
|
|
49
|
-
},
|
|
50
|
-
},
|
|
51
|
-
},
|
|
52
|
-
copy: {
|
|
53
|
-
color: theme.palette.text.primary,
|
|
54
|
-
maxWidth: '70%',
|
|
55
|
-
display: 'grid',
|
|
56
|
-
alignContent: 'center',
|
|
57
|
-
justifyContent: 'center',
|
|
58
|
-
'& > *': {
|
|
59
|
-
maxWidth: 'max-content',
|
|
60
|
-
},
|
|
61
|
-
},
|
|
62
|
-
topic: {
|
|
63
|
-
...theme.typography.overline,
|
|
64
|
-
},
|
|
65
|
-
links: {
|
|
66
|
-
...theme.typography.body2,
|
|
67
|
-
[theme.breakpoints.up('md')]: {
|
|
68
|
-
...theme.typography.h4,
|
|
69
|
-
},
|
|
70
|
-
'& > *': {
|
|
71
|
-
color: theme.palette.text.primary,
|
|
72
|
-
},
|
|
73
|
-
},
|
|
74
|
-
textContainer: {
|
|
75
|
-
maxWidth: '70%',
|
|
76
|
-
[theme.breakpoints.up('md')]: {
|
|
77
|
-
maxWidth: '100%',
|
|
78
|
-
},
|
|
79
|
-
},
|
|
80
|
-
}),
|
|
81
|
-
{ name: 'SpecialBanner' },
|
|
82
|
-
)
|
|
6
|
+
export type SpecialBannerProps = ContainerProps & {
|
|
7
|
+
asset?: React.ReactNode
|
|
8
|
+
pageLinks?: React.ReactNode
|
|
9
|
+
topic: React.ReactNode
|
|
10
|
+
children: React.ReactNode
|
|
11
|
+
}
|
|
83
12
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
pageLinks?: React.ReactNode
|
|
88
|
-
topic: React.ReactNode
|
|
89
|
-
children: React.ReactNode
|
|
90
|
-
}
|
|
13
|
+
const name = 'SpecialBanner' as const
|
|
14
|
+
const parts = ['root', 'wrapper', 'copy', 'asset', 'topic', 'links', 'textContainer'] as const
|
|
15
|
+
const { classes } = extendableComponent(name, parts)
|
|
91
16
|
|
|
92
|
-
export
|
|
17
|
+
export function SpecialBanner(props: SpecialBannerProps) {
|
|
93
18
|
const { asset, topic, pageLinks, children, ...containerProps } = props
|
|
94
|
-
const { root, ...classes } = useStyles(props)
|
|
95
19
|
|
|
96
20
|
return (
|
|
97
|
-
<Row maxWidth={false} {...containerProps}
|
|
98
|
-
<Row
|
|
99
|
-
|
|
100
|
-
|
|
21
|
+
<Row maxWidth={false} {...containerProps} className={classes.root}>
|
|
22
|
+
<Row
|
|
23
|
+
maxWidth={false}
|
|
24
|
+
className={classes.wrapper}
|
|
25
|
+
disableGutters
|
|
26
|
+
sx={(theme) => ({
|
|
27
|
+
display: 'grid',
|
|
28
|
+
background: theme.palette.background.paper,
|
|
29
|
+
justifyItems: 'center',
|
|
30
|
+
columnGap: `${theme.spacings.lg}`,
|
|
31
|
+
paddingTop: theme.spacings.lg,
|
|
32
|
+
paddingBottom: theme.spacings.lg,
|
|
33
|
+
justifySelf: 'start',
|
|
34
|
+
borderRadius: responsiveVal(theme.shape.borderRadius * 2, theme.shape.borderRadius * 3),
|
|
35
|
+
[theme.breakpoints.up('md')]: {
|
|
36
|
+
padding: 0,
|
|
37
|
+
background: 'none',
|
|
38
|
+
justifySelf: 'center',
|
|
39
|
+
gridTemplateColumns: '1fr 1fr',
|
|
40
|
+
columnGap: `${theme.spacings.lg}`,
|
|
41
|
+
},
|
|
42
|
+
})}
|
|
43
|
+
>
|
|
44
|
+
<Box
|
|
45
|
+
className={classes.asset}
|
|
46
|
+
sx={(theme) => ({
|
|
47
|
+
width: responsiveVal(200, 900),
|
|
48
|
+
height: 'auto',
|
|
49
|
+
marginBottom: theme.spacings.md,
|
|
50
|
+
'& img': {
|
|
51
|
+
width: responsiveVal(200, 900),
|
|
52
|
+
height: 'auto',
|
|
53
|
+
objectFit: 'cover',
|
|
54
|
+
borderRadius: responsiveVal(
|
|
55
|
+
theme.shape.borderRadius * 2,
|
|
56
|
+
theme.shape.borderRadius * 3,
|
|
57
|
+
),
|
|
58
|
+
},
|
|
59
|
+
[theme.breakpoints.up('lg')]: {
|
|
60
|
+
width: responsiveVal(250, 900),
|
|
61
|
+
height: 'auto',
|
|
62
|
+
'& img': {
|
|
63
|
+
width: responsiveVal(250, 900),
|
|
64
|
+
height: 'auto',
|
|
65
|
+
objectFit: 'cover',
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
[theme.breakpoints.between('md', 'xl')]: {
|
|
69
|
+
width: '100%',
|
|
70
|
+
'& img': {
|
|
71
|
+
width: '100%',
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
})}
|
|
75
|
+
>
|
|
76
|
+
{asset}
|
|
77
|
+
</Box>
|
|
78
|
+
<Box
|
|
79
|
+
className={classes.copy}
|
|
80
|
+
sx={(theme) => ({
|
|
81
|
+
color: theme.palette.text.primary,
|
|
82
|
+
maxWidth: '70%',
|
|
83
|
+
display: 'grid',
|
|
84
|
+
alignContent: 'center',
|
|
85
|
+
justifyContent: 'center',
|
|
86
|
+
'& > *': {
|
|
87
|
+
maxWidth: 'max-content',
|
|
88
|
+
},
|
|
89
|
+
})}
|
|
90
|
+
>
|
|
101
91
|
{topic && (
|
|
102
|
-
<Typography variant='
|
|
92
|
+
<Typography variant='overline' className={classes.topic}>
|
|
103
93
|
{topic}
|
|
104
94
|
</Typography>
|
|
105
95
|
)}
|
|
106
|
-
<
|
|
107
|
-
|
|
108
|
-
|
|
96
|
+
<Box
|
|
97
|
+
className={classes.textContainer}
|
|
98
|
+
sx={(theme) => ({
|
|
99
|
+
maxWidth: '70%',
|
|
100
|
+
[theme.breakpoints.up('md')]: { maxWidth: '100%' },
|
|
101
|
+
})}
|
|
102
|
+
>
|
|
103
|
+
{children}
|
|
104
|
+
</Box>
|
|
105
|
+
<Box className={classes.links} sx={{ typography: { xs: 'body2', md: 'h4' } }}>
|
|
106
|
+
{pageLinks}
|
|
107
|
+
</Box>
|
|
108
|
+
</Box>
|
|
109
109
|
</Row>
|
|
110
110
|
</Row>
|
|
111
111
|
)
|