@graphcommerce/next-ui 9.0.0-canary.98 → 9.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/ActionCard/ActionCard.tsx +219 -203
- package/ActionCard/ActionCardAccordion.tsx +4 -2
- package/ActionCard/ActionCardLayout.tsx +3 -2
- package/ActionCard/ActionCardList.tsx +6 -5
- package/Blog/BlogAuthor/BlogAuthor.tsx +5 -4
- package/Blog/BlogContent/BlogContent.tsx +3 -2
- package/Blog/BlogHeader/BlogHeader.tsx +4 -3
- package/Blog/BlogList/BlogList.tsx +3 -3
- package/Blog/BlogListItem/BlogListItem.tsx +6 -5
- package/Blog/BlogTags/BlogTag.tsx +3 -2
- package/Blog/BlogTags/BlogTags.tsx +1 -1
- package/Breadcrumbs/Breadcrumbs.tsx +25 -19
- package/Breadcrumbs/BreadcrumbsList.tsx +3 -2
- package/Breadcrumbs/jsonLdBreadcrumb.tsx +1 -1
- package/Breadcrumbs/types.ts +1 -2
- package/Button/Button.tsx +2 -1
- package/Button/LinkOrButton.tsx +4 -2
- package/CHANGELOG.md +294 -1342
- package/ChipMenu/ChipMenu.tsx +3 -2
- package/Config.graphqls +28 -10
- package/Container/Container.tsx +90 -0
- package/ContainerWithHeader/ContainerWithHeader.tsx +2 -1
- package/Document/DocumentBodyEnd.tsx +1 -1
- package/Document/DocumentBodyStart.tsx +1 -1
- package/Document/DocumentHeadEnd.tsx +1 -1
- package/Document/DocumentHeadStart.tsx +1 -1
- package/Fab/Fab.tsx +15 -17
- package/FlagAvatar/FlagAvatar.tsx +2 -1
- package/Footer/Footer.tsx +14 -10
- package/Form/Form.tsx +2 -1
- package/Form/FormHeader.tsx +1 -1
- package/Form/FormRow.tsx +1 -1
- package/Form/InputCheckmark.tsx +2 -1
- package/FramerScroller/ItemScroller.tsx +5 -8
- package/FramerScroller/SidebarGallery.tsx +23 -30
- package/FramerScroller/SidebarSlider.tsx +8 -7
- package/FullPageMessage/FullPageMessage.tsx +2 -1
- package/IconHeader/IconHeader.tsx +5 -3
- package/IconSvg/IconSvg.tsx +8 -7
- package/Intl/DateTimeFormat/DateFormat.tsx +6 -4
- package/Intl/DateTimeFormat/DateTimeFormat.tsx +10 -14
- package/Intl/DateTimeFormat/TimeFormat.tsx +6 -4
- package/Intl/DateTimeFormat/index.ts +1 -0
- package/Intl/DateTimeFormat/useIntlDateTimeFormat.ts +13 -0
- package/Intl/DisplayNames/DisplayNames.tsx +5 -13
- package/Intl/DisplayNames/index.ts +1 -0
- package/Intl/DisplayNames/useIntlDisplayNames.ts +12 -0
- package/Intl/{ListFormat.tsx → ListFormat/ListFormat.tsx} +8 -13
- package/Intl/ListFormat/index.ts +2 -0
- package/Intl/ListFormat/useIntlListFormat.ts +15 -0
- package/Intl/NumberFormat/CurrencyFormat.tsx +4 -2
- package/Intl/NumberFormat/NumberFormat.tsx +15 -17
- package/Intl/NumberFormat/PercentFormat.tsx +6 -2
- package/Intl/NumberFormat/UnitFormat.tsx +5 -5
- package/Intl/NumberFormat/index.ts +1 -0
- package/Intl/NumberFormat/useIntlNumberFormat.ts +17 -0
- package/Intl/RelativeTimeFormat/RelativeTimeFormat.tsx +6 -13
- package/Intl/RelativeTimeFormat/RelativeToTimeFormat.tsx +4 -2
- package/Intl/RelativeTimeFormat/index.ts +1 -0
- package/Intl/RelativeTimeFormat/useIntlRelativeTimeFormat.ts +15 -0
- package/Intl/useIntlLocalesArgument.ts +16 -0
- package/Layout/components/LayoutHeader.tsx +7 -4
- package/Layout/components/LayoutHeaderBack.tsx +6 -4
- package/Layout/components/LayoutHeaderClose.tsx +1 -1
- package/Layout/components/LayoutHeaderContent.tsx +11 -12
- package/Layout/components/LayoutProvider.tsx +1 -1
- package/Layout/components/LayoutTitle.tsx +5 -3
- package/Layout/context/layoutContext.tsx +1 -1
- package/Layout/types.ts +1 -1
- package/LayoutDefault/components/LayoutDefault.tsx +12 -10
- package/LayoutOverlay/components/LayoutOverlay.tsx +3 -2
- package/LayoutOverlay/components/LayoutOverlayHeader.tsx +2 -1
- package/LayoutOverlay/test/LayoutOverlayDemo.tsx +4 -1
- package/LayoutParts/DesktopHeaderBadge.tsx +2 -1
- package/LayoutParts/DesktopNavBar.tsx +26 -22
- package/LayoutParts/DesktopNavBarItem.tsx +11 -7
- package/LayoutParts/Logo.tsx +5 -5
- package/LayoutParts/MenuFab.tsx +7 -13
- package/LayoutParts/MenuFabItem.tsx +6 -1
- package/LayoutParts/MenuFabSecondaryItem.tsx +11 -7
- package/LayoutParts/MobileTopRight.tsx +24 -0
- package/LayoutParts/PlaceholderFab.tsx +2 -1
- package/LayoutParts/StickyBelowHeader.tsx +2 -1
- package/LayoutParts/index.ts +1 -0
- package/LazyHydrate/LazyHydrate.tsx +18 -21
- package/MediaQuery/MediaQuery.tsx +111 -0
- package/MediaQuery/index.ts +1 -0
- package/Navigation/components/NavigationFab.tsx +3 -2
- package/Navigation/components/NavigationItem.tsx +3 -3
- package/Navigation/components/NavigationList.tsx +4 -3
- package/Navigation/components/NavigationOverlay.tsx +18 -11
- package/Navigation/components/NavigationProvider.tsx +9 -8
- package/Navigation/components/NavigationTitle.tsx +5 -5
- package/Navigation/hooks/useNavigation.ts +4 -2
- package/Overlay/components/Overlay.tsx +3 -2
- package/Overlay/components/OverlayBase.tsx +71 -30
- package/Overlay/components/OverlayContainer.tsx +2 -2
- package/Overlay/components/OverlayHeader.tsx +7 -4
- package/Overlay/components/OverlaySsr.tsx +2 -1
- package/Overlay/components/OverlayStickyBottom.tsx +2 -1
- package/Overlay/utils/variantsToScrollSnapType.ts +2 -2
- package/OverlayOrPopperChip/OverlayOrPopperChip.tsx +5 -12
- package/OverlayOrPopperChip/OverlayOrPopperPanel.tsx +3 -3
- package/OverlayOrPopperChip/OverlayPanel.tsx +13 -7
- package/OverlayOrPopperChip/OverlayPanelActions.tsx +2 -2
- package/OverlayOrPopperChip/PopperPanel.tsx +3 -2
- package/OverlayOrPopperChip/PopperPanelActions.tsx +2 -2
- package/OverlayOrPopperChip/types.ts +2 -2
- package/OverlayOrPopperChip/useHandleClickNotDrag.ts +3 -1
- package/Page/CssAndFramerMotionProvider.tsx +2 -1
- package/Page/types.ts +5 -5
- package/PageLoadIndicator/PageLoadIndicator.tsx +3 -2
- package/PageMeta/PageMeta.tsx +3 -2
- package/PageMeta/canonicalize.ts +7 -3
- package/Pagination/Pagination.tsx +4 -2
- package/Pagination/PaginationExtended.tsx +2 -9
- package/RenderType/RenderType.tsx +6 -0
- package/Row/ButtonLinkList/ButtonLinkList.tsx +4 -7
- package/Row/ButtonLinkList/ButtonLinkListItem.tsx +2 -1
- package/Row/ColumnOne/variant/VariantMessage.tsx +2 -4
- package/Row/ColumnOneBoxed/ColumnOneBoxed.tsx +4 -2
- package/Row/ColumnOneCentered/ColumnOneCentered.tsx +4 -2
- package/Row/ColumnThree/ColumnThree.tsx +6 -5
- package/Row/ColumnTwo/ColumnTwo.tsx +8 -7
- package/Row/ColumnTwoSpread/ColumnTwoSpread.tsx +7 -5
- package/Row/ColumnTwoWithTop/ColumnTwoWithTop.tsx +5 -4
- package/Row/ContentLinks/ContentLinks.tsx +4 -3
- package/Row/HeroBanner/HeroBanner.tsx +3 -2
- package/Row/IconBlocks/IconBlock.tsx +3 -2
- package/Row/IconBlocks/IconBlocks.tsx +3 -2
- package/Row/ImageText/ImageText.tsx +3 -2
- package/Row/ImageTextBoxed/ImageTextBoxed.tsx +4 -3
- package/Row/ParagraphWithSidebarSlide/ParagraphWithSidebarSlide.tsx +3 -2
- package/Row/Quote/Quote.tsx +1 -1
- package/Row/Row.tsx +2 -1
- package/Row/RowLinks/RowLinks.tsx +36 -34
- package/Row/RowLinks/variant/VariantImageLabelSwiper.tsx +6 -2
- package/Row/RowLinks/variant/VariantInline.tsx +6 -2
- package/Row/RowLinks/variant/VariantLogoSwiper.tsx +2 -1
- package/Row/RowLinks/variant/VariantUsps.tsx +2 -1
- package/Row/SpecialBanner/SpecialBanner.tsx +3 -2
- package/SectionContainer/SectionContainer.tsx +3 -2
- package/SectionHeader/SectionHeader.tsx +2 -1
- package/Separator/Separator.tsx +3 -2
- package/Snackbar/DismissibleSnackbar.tsx +1 -1
- package/Snackbar/ErrorSnackbar.tsx +1 -1
- package/Snackbar/MessageSnackbarImpl.tsx +7 -16
- package/StarRatingField/StarRatingField.tsx +3 -2
- package/Stepper/Stepper.tsx +3 -2
- package/Styles/__tests__/spreadVal.test.ts +4 -4
- package/Styles/extendableComponent.ts +4 -3
- package/Styles/withEmotionCache.tsx +2 -2
- package/Styles/withTheme.tsx +4 -1
- package/TextInputNumber/TextInputNumber.tsx +5 -8
- package/Theme/DarkLightModeThemeProvider.tsx +10 -7
- package/Theme/MuiButton.ts +2 -1
- package/Theme/MuiChip.ts +2 -1
- package/Theme/MuiFab.ts +2 -1
- package/Theme/MuiSlider.ts +3 -3
- package/Theme/MuiSnackbar.ts +1 -1
- package/Theme/NextLink.tsx +35 -15
- package/Theme/createTheme.ts +6 -0
- package/Theme/index.ts +1 -0
- package/Theme/themeDefaults.ts +10 -10
- package/Theme/useContainerSizing.ts +20 -0
- package/TimeAgo/TimeAgo.tsx +3 -3
- package/ToggleButton/ToggleButton.tsx +6 -4
- package/ToggleButtonGroup/ToggleButtonGroup.tsx +99 -94
- package/UspList/UspList.tsx +3 -2
- package/UspList/UspListItem.tsx +3 -2
- package/hooks/memoDeep.ts +3 -2
- package/hooks/useDateTimeFormat.ts +3 -1
- package/hooks/useMatchMedia.ts +2 -1
- package/hooks/useMemoDeep.ts +2 -1
- package/hooks/useNumberFormat.ts +3 -1
- package/index.ts +3 -1
- package/package.json +17 -18
- package/utils/cookie.ts +4 -3
- package/utils/robots.ts +1 -1
- package/utils/sitemap.ts +3 -2
- package/utils/sxx.ts +16 -0
- package/AnimatedRow/AnimatedRow.tsx +0 -23
- package/docs/building-components.mdx +0 -3
- package/docs/components/ComponentBasic.tsx +0 -26
- package/docs/components/ComponentChild.tsx +0 -49
- package/docs/components/ComponentChildVariant.tsx +0 -55
- package/docs/components/ComponentChildVariantExtendable.tsx +0 -63
- package/docs/components/ComponentStylable.tsx +0 -32
- package/docs/pages/building-components.tsx +0 -62
package/PageMeta/PageMeta.tsx
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { usePageContext } from '@graphcommerce/framer-next-pages'
|
|
2
|
-
import Head from 'next/head'
|
|
3
2
|
import type {} from '@graphcommerce/next-config'
|
|
4
|
-
import
|
|
3
|
+
import Head from 'next/head'
|
|
4
|
+
import type { Canonical } from './canonicalize'
|
|
5
|
+
import { useCanonical } from './canonicalize'
|
|
5
6
|
|
|
6
7
|
// https://developers.google.com/search/docs/advanced/robots/robots_meta_tag#directives
|
|
7
8
|
export type MetaRobots =
|
package/PageMeta/canonicalize.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import type {} from '@graphcommerce/next-config'
|
|
1
2
|
import { addBasePath } from 'next/dist/client/add-base-path'
|
|
2
3
|
import { addLocale } from 'next/dist/client/add-locale'
|
|
3
4
|
import { getDomainLocale } from 'next/dist/client/get-domain-locale'
|
|
4
5
|
import { resolveHref } from 'next/dist/client/resolve-href'
|
|
5
|
-
import { NextRouter } from 'next/dist/shared/lib/router/router'
|
|
6
|
-
import type {} from '@graphcommerce/next-config'
|
|
6
|
+
import type { NextRouter } from 'next/dist/shared/lib/router/router'
|
|
7
7
|
import { useRouter } from 'next/router'
|
|
8
|
+
import type { LiteralUnion } from 'type-fest'
|
|
8
9
|
import { storefrontConfig } from '../utils/storefrontConfig'
|
|
9
10
|
|
|
10
11
|
type PartialNextRouter = Pick<
|
|
@@ -70,7 +71,10 @@ export function canonicalize(router: PartialNextRouter, incoming?: Canonical) {
|
|
|
70
71
|
return canonical
|
|
71
72
|
}
|
|
72
73
|
|
|
73
|
-
export type Canonical =
|
|
74
|
+
export type Canonical = LiteralUnion<
|
|
75
|
+
`http://${string}` | `https://${string}` | `/${string}`,
|
|
76
|
+
string
|
|
77
|
+
>
|
|
74
78
|
|
|
75
79
|
export function useCanonical(incoming?: Canonical) {
|
|
76
80
|
const router = useRouter()
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { Trans } from '@lingui/react'
|
|
2
|
-
import { PaginationProps,
|
|
3
|
-
import
|
|
2
|
+
import type { PaginationProps, SxProps, Theme } from '@mui/material'
|
|
3
|
+
import { Box, IconButton } from '@mui/material'
|
|
4
|
+
import type { UsePaginationItem } from '@mui/material/usePagination'
|
|
5
|
+
import usePagination from '@mui/material/usePagination'
|
|
4
6
|
import React from 'react'
|
|
5
7
|
import { IconSvg } from '../IconSvg'
|
|
6
8
|
import { extendableComponent } from '../Styles'
|
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
Box,
|
|
4
|
-
SxProps,
|
|
5
|
-
Theme,
|
|
6
|
-
Pagination,
|
|
7
|
-
PaginationItem,
|
|
8
|
-
PaginationRenderItemParams,
|
|
9
|
-
} from '@mui/material'
|
|
1
|
+
import type { PaginationProps, PaginationRenderItemParams, SxProps, Theme } from '@mui/material'
|
|
2
|
+
import { Box, Pagination, PaginationItem } from '@mui/material'
|
|
10
3
|
import { IconSvg } from '../IconSvg'
|
|
11
4
|
import { extendableComponent } from '../Styles'
|
|
12
5
|
import { NextLink } from '../Theme'
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
+
|
|
2
3
|
/** To make renderers customizable we need to be able to provide renders for all types */
|
|
3
4
|
type TypeObject = { __typename: string; [index: string]: unknown }
|
|
4
5
|
|
|
@@ -26,6 +27,8 @@ export type TypeRenderer<
|
|
|
26
27
|
/**
|
|
27
28
|
* A simple array with renderers but with strict typing that validates of the provided Renderer is
|
|
28
29
|
* actually able to render the Type
|
|
30
|
+
*
|
|
31
|
+
* @public
|
|
29
32
|
*/
|
|
30
33
|
export function RenderType<
|
|
31
34
|
T extends TypeObject,
|
|
@@ -39,6 +42,7 @@ export function RenderType<
|
|
|
39
42
|
return <TypeItem {...typeItemProps} __typename={__typename} />
|
|
40
43
|
}
|
|
41
44
|
|
|
45
|
+
/** @public */
|
|
42
46
|
export function findByTypename<T extends TypeObject, Typename extends T['__typename']>(
|
|
43
47
|
type: (T | undefined | null)[] | undefined | null,
|
|
44
48
|
typename: Typename,
|
|
@@ -46,6 +50,7 @@ export function findByTypename<T extends TypeObject, Typename extends T['__typen
|
|
|
46
50
|
return type?.find((item) => item?.__typename === typename) as FilterTypeByTypename<T, Typename>
|
|
47
51
|
}
|
|
48
52
|
|
|
53
|
+
/** @public */
|
|
49
54
|
export function isTypename<T extends TypeObject, Typenames extends T['__typename'][]>(
|
|
50
55
|
type: FilterTypeByTypename<T, T['__typename']>,
|
|
51
56
|
typename: Typenames,
|
|
@@ -53,6 +58,7 @@ export function isTypename<T extends TypeObject, Typenames extends T['__typename
|
|
|
53
58
|
return typename.includes(type.__typename)
|
|
54
59
|
}
|
|
55
60
|
|
|
61
|
+
/** @public */
|
|
56
62
|
export function filterByTypename<T extends TypeObject, Typename extends T['__typename']>(
|
|
57
63
|
type: (T | undefined | null)[] | undefined | null,
|
|
58
64
|
typename: Typename,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { SxProps, Theme } from '@mui/material'
|
|
2
|
+
import { Box, Typography } from '@mui/material'
|
|
2
3
|
import React from 'react'
|
|
3
4
|
import { extendableComponent } from '../../Styles'
|
|
4
5
|
import { responsiveVal } from '../../Styles/responsiveVal'
|
|
@@ -13,7 +14,7 @@ export type ButtonLinkListProps = {
|
|
|
13
14
|
|
|
14
15
|
type OwnerState = { containsBigLinks: boolean }
|
|
15
16
|
|
|
16
|
-
const compName = 'ButtonLinkList'
|
|
17
|
+
const compName = 'ButtonLinkList'
|
|
17
18
|
const parts = ['root', 'links'] as const
|
|
18
19
|
const { withState } = extendableComponent<OwnerState, typeof compName, typeof parts>(
|
|
19
20
|
compName,
|
|
@@ -26,11 +27,7 @@ export function ButtonLinkList(props: ButtonLinkListProps) {
|
|
|
26
27
|
const classes = withState({ containsBigLinks })
|
|
27
28
|
|
|
28
29
|
return (
|
|
29
|
-
<Row
|
|
30
|
-
maxWidth='md'
|
|
31
|
-
className={classes.root}
|
|
32
|
-
sx={[{ maxWidth: 820 }, ...(Array.isArray(sx) ? sx : [sx])]}
|
|
33
|
-
>
|
|
30
|
+
<Row maxWidth='820px' className={classes.root} sx={sx}>
|
|
34
31
|
<Box
|
|
35
32
|
sx={[
|
|
36
33
|
(theme) => ({
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { ListItemButtonProps
|
|
1
|
+
import type { ListItemButtonProps } from '@mui/material'
|
|
2
|
+
import { ListItemButton, ListItemIcon, ListItemText } from '@mui/material'
|
|
2
3
|
import React from 'react'
|
|
3
4
|
import { IconSvg } from '../../IconSvg'
|
|
4
5
|
import { NextLink } from '../../Theme'
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
DismissibleSnackbarProps,
|
|
4
|
-
} from '../../../Snackbar/DismissibleSnackbar'
|
|
1
|
+
import type { DismissibleSnackbarProps } from '../../../Snackbar/DismissibleSnackbar'
|
|
2
|
+
import { DismissibleSnackbar } from '../../../Snackbar/DismissibleSnackbar'
|
|
5
3
|
|
|
6
4
|
export type VariantMessageProps = DismissibleSnackbarProps
|
|
7
5
|
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ContainerProps } from '@mui/material'
|
|
2
|
+
import { Box } from '@mui/material'
|
|
2
3
|
import { extendableComponent } from '../../Styles'
|
|
3
4
|
import { Row } from '../Row'
|
|
4
5
|
|
|
5
|
-
const compName = 'ColumnOneBoxed'
|
|
6
|
+
const compName = 'ColumnOneBoxed'
|
|
6
7
|
const parts = ['root', 'boxed'] as const
|
|
7
8
|
const { classes } = extendableComponent(compName, parts)
|
|
8
9
|
|
|
10
|
+
/** @public */
|
|
9
11
|
export function ColumnOneBoxed(props: ContainerProps) {
|
|
10
12
|
const { children } = props
|
|
11
13
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { ContainerProps
|
|
1
|
+
import type { ContainerProps } from '@mui/material'
|
|
2
|
+
import { styled } from '@mui/material'
|
|
2
3
|
import { ColumnOne } from '../ColumnOne/ColumnOne'
|
|
3
4
|
|
|
4
5
|
const Wrapper = styled('div')(({ theme }) => ({
|
|
@@ -6,10 +7,11 @@ const Wrapper = styled('div')(({ theme }) => ({
|
|
|
6
7
|
marginTop: theme.spacings.lg,
|
|
7
8
|
textAlign: 'center',
|
|
8
9
|
maxWidth: `calc(1050px + calc(${theme.spacings.md} * 2))`,
|
|
9
|
-
margin:
|
|
10
|
+
margin: '0 auto',
|
|
10
11
|
position: 'relative',
|
|
11
12
|
}))
|
|
12
13
|
|
|
14
|
+
/** @public */
|
|
13
15
|
export function ColumnOneCentered(props: ContainerProps) {
|
|
14
16
|
const { children } = props
|
|
15
17
|
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ContainerProps } from '@mui/material'
|
|
2
|
+
import { Box } from '@mui/material'
|
|
2
3
|
import React from 'react'
|
|
3
4
|
import { extendableComponent } from '../../Styles'
|
|
4
5
|
import { Row } from '../Row'
|
|
5
6
|
|
|
6
|
-
const compName = 'ColumnThree'
|
|
7
|
+
const compName = 'ColumnThree'
|
|
7
8
|
const parts = ['root', 'colOne', 'colTwo', 'colThree'] as const
|
|
8
9
|
const { classes } = extendableComponent(compName, parts)
|
|
9
10
|
|
|
@@ -25,7 +26,7 @@ export function ColumnThree(props: ColumnThreeProps) {
|
|
|
25
26
|
display: 'grid',
|
|
26
27
|
gridColumnGap: theme.spacings.md,
|
|
27
28
|
gridRowGap: theme.spacings.lg,
|
|
28
|
-
gridTemplateColumns:
|
|
29
|
+
gridTemplateColumns: '1fr',
|
|
29
30
|
gridTemplateAreas: `
|
|
30
31
|
"one"
|
|
31
32
|
"two"
|
|
@@ -43,14 +44,14 @@ export function ColumnThree(props: ColumnThreeProps) {
|
|
|
43
44
|
},
|
|
44
45
|
},
|
|
45
46
|
[theme.breakpoints.up('sm')]: {
|
|
46
|
-
gridTemplateColumns:
|
|
47
|
+
gridTemplateColumns: '1fr 1fr',
|
|
47
48
|
gridTemplateAreas: `
|
|
48
49
|
"one two"
|
|
49
50
|
"three three"
|
|
50
51
|
`,
|
|
51
52
|
},
|
|
52
53
|
[theme.breakpoints.up('md')]: {
|
|
53
|
-
gridTemplateColumns:
|
|
54
|
+
gridTemplateColumns: '1fr 1fr 1fr',
|
|
54
55
|
gridTemplateAreas: '"one two three"',
|
|
55
56
|
},
|
|
56
57
|
}),
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ContainerProps } from '@mui/material'
|
|
2
|
+
import { Box } from '@mui/material'
|
|
2
3
|
import React from 'react'
|
|
3
4
|
import { extendableComponent } from '../../Styles'
|
|
4
5
|
import { Row } from '../Row'
|
|
@@ -8,7 +9,7 @@ export type ColumnTwoProps = Omit<ContainerProps, 'children'> & {
|
|
|
8
9
|
colTwoContent: React.ReactNode
|
|
9
10
|
}
|
|
10
11
|
|
|
11
|
-
const compName = 'ColumnTwo'
|
|
12
|
+
const compName = 'ColumnTwo'
|
|
12
13
|
const parts = ['root', 'colOne', 'colTwo'] as const
|
|
13
14
|
const { classes } = extendableComponent(compName, parts)
|
|
14
15
|
|
|
@@ -24,12 +25,12 @@ export function ColumnTwo(props: ColumnTwoProps) {
|
|
|
24
25
|
(theme) => ({
|
|
25
26
|
gridColumnGap: theme.spacings.md,
|
|
26
27
|
gridRowGap: theme.spacings.lg,
|
|
27
|
-
display:
|
|
28
|
-
gridTemplateColumns:
|
|
29
|
-
gridTemplateAreas:
|
|
28
|
+
display: 'grid',
|
|
29
|
+
gridTemplateColumns: '1fr',
|
|
30
|
+
gridTemplateAreas: '"one" "two"',
|
|
30
31
|
[theme.breakpoints.up('sm')]: {
|
|
31
|
-
gridTemplateColumns:
|
|
32
|
-
gridTemplateAreas:
|
|
32
|
+
gridTemplateColumns: '1fr 1fr',
|
|
33
|
+
gridTemplateAreas: '"one two"',
|
|
33
34
|
},
|
|
34
35
|
}),
|
|
35
36
|
...(Array.isArray(sx) ? sx : [sx]),
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ColumnTwoProps } from '../ColumnTwo/ColumnTwo'
|
|
2
|
+
import { ColumnTwo } from '../ColumnTwo/ColumnTwo'
|
|
2
3
|
|
|
3
4
|
type StyleProps = { nodeLength: boolean }
|
|
4
5
|
|
|
5
6
|
export type ColumnTwoSpreadProps = StyleProps & ColumnTwoProps
|
|
6
7
|
|
|
8
|
+
/** @public */
|
|
7
9
|
export function ColumnTwoSpread(props: ColumnTwoSpreadProps) {
|
|
8
10
|
const { nodeLength, sx = [], ...colProps } = props
|
|
9
11
|
return (
|
|
@@ -13,8 +15,8 @@ export function ColumnTwoSpread(props: ColumnTwoSpreadProps) {
|
|
|
13
15
|
sx={[
|
|
14
16
|
(theme) => ({
|
|
15
17
|
[theme.breakpoints.up('md')]: {
|
|
16
|
-
gridTemplateColumns:
|
|
17
|
-
gridTemplateAreas: nodeLength ?
|
|
18
|
+
gridTemplateColumns: '1fr 1fr 1fr',
|
|
19
|
+
gridTemplateAreas: nodeLength ? '"one one two"' : '"one two two"',
|
|
18
20
|
'& h2, & h3': {
|
|
19
21
|
'&:empty': {
|
|
20
22
|
display: 'block',
|
|
@@ -22,8 +24,8 @@ export function ColumnTwoSpread(props: ColumnTwoSpreadProps) {
|
|
|
22
24
|
},
|
|
23
25
|
},
|
|
24
26
|
},
|
|
25
|
-
gridTemplateColumns:
|
|
26
|
-
gridTemplateAreas:
|
|
27
|
+
gridTemplateColumns: '1fr',
|
|
28
|
+
gridTemplateAreas: '"one" "two"',
|
|
27
29
|
}),
|
|
28
30
|
...(Array.isArray(sx) ? sx : [sx]),
|
|
29
31
|
]}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ContainerProps } from '@mui/material'
|
|
2
|
+
import { Box } from '@mui/material'
|
|
2
3
|
import React from 'react'
|
|
3
4
|
import { extendableComponent } from '../../Styles'
|
|
4
5
|
import { Row } from '../Row'
|
|
@@ -9,7 +10,7 @@ export type ColumnTwoWithTopProps = ContainerProps & {
|
|
|
9
10
|
right: React.ReactNode
|
|
10
11
|
}
|
|
11
12
|
|
|
12
|
-
const compName = 'ColumnTwoWithTop'
|
|
13
|
+
const compName = 'ColumnTwoWithTop'
|
|
13
14
|
const parts = ['root', 'colOne', 'colTwo'] as const
|
|
14
15
|
const { classes } = extendableComponent(compName, parts)
|
|
15
16
|
|
|
@@ -24,9 +25,9 @@ export function ColumnTwoWithTop(props: ColumnTwoWithTopProps) {
|
|
|
24
25
|
(theme) => ({
|
|
25
26
|
display: 'grid',
|
|
26
27
|
gap: `${theme.spacings.lg} 0`,
|
|
27
|
-
gridTemplateAreas:
|
|
28
|
+
gridTemplateAreas: '"top" "left" "right"',
|
|
28
29
|
[theme.breakpoints.up('md')]: {
|
|
29
|
-
gridTemplateAreas:
|
|
30
|
+
gridTemplateAreas: '"top ." "left right"',
|
|
30
31
|
gridTemplateColumns: '1fr auto',
|
|
31
32
|
gap: `${theme.spacings.sm} ${theme.spacings.xxl}`,
|
|
32
33
|
},
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Scroller, ScrollerProvider } from '@graphcommerce/framer-scroller'
|
|
2
|
-
import {
|
|
2
|
+
import type { SxProps, Theme } from '@mui/material'
|
|
3
|
+
import { Container, Typography } from '@mui/material'
|
|
3
4
|
import React from 'react'
|
|
4
5
|
import { extendableComponent } from '../../Styles'
|
|
5
6
|
|
|
@@ -9,7 +10,7 @@ export type ContentLinksProps = {
|
|
|
9
10
|
sx?: SxProps<Theme>
|
|
10
11
|
}
|
|
11
12
|
|
|
12
|
-
const compName = 'ContentLinks'
|
|
13
|
+
const compName = 'ContentLinks'
|
|
13
14
|
const parts = ['root', 'scroller', 'title'] as const
|
|
14
15
|
const { classes } = extendableComponent(compName, parts)
|
|
15
16
|
|
|
@@ -34,7 +35,7 @@ export function ContentLinks(props: ContentLinksProps) {
|
|
|
34
35
|
sx={(theme) => ({
|
|
35
36
|
justifyContent: 'start',
|
|
36
37
|
gap: `${theme.spacings.md}`,
|
|
37
|
-
gridAutoColumns:
|
|
38
|
+
gridAutoColumns: 'max-content',
|
|
38
39
|
})}
|
|
39
40
|
>
|
|
40
41
|
<Typography variant='subtitle1' component='h2' className={classes.title}>
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { clientSize } from '@graphcommerce/framer-utils'
|
|
2
|
-
import { ContainerProps,
|
|
2
|
+
import type { ContainerProps, SxProps, Theme } from '@mui/material'
|
|
3
|
+
import { Box, styled } from '@mui/material'
|
|
3
4
|
import { m, useTransform } from 'framer-motion'
|
|
4
5
|
import React from 'react'
|
|
5
6
|
import { useScrollY } from '../../Layout/hooks/useScrollY'
|
|
@@ -13,7 +14,7 @@ export type HeroBannerProps = ContainerProps & {
|
|
|
13
14
|
sx?: SxProps<Theme>
|
|
14
15
|
}
|
|
15
16
|
|
|
16
|
-
const compName = 'HeroBanner'
|
|
17
|
+
const compName = 'HeroBanner'
|
|
17
18
|
const parts = ['root', 'wrapper', 'copy', 'asset', 'animated', 'video'] as const
|
|
18
19
|
const { classes } = extendableComponent(compName, parts)
|
|
19
20
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ButtonProps, SxProps, Theme } from '@mui/material'
|
|
2
|
+
import { Box, Button, Typography } from '@mui/material'
|
|
2
3
|
import React from 'react'
|
|
3
4
|
import { extendableComponent } from '../../Styles'
|
|
4
5
|
|
|
@@ -10,7 +11,7 @@ export type IconBlockProps = {
|
|
|
10
11
|
sx?: SxProps<Theme>
|
|
11
12
|
} & ButtonProps
|
|
12
13
|
|
|
13
|
-
const name = 'IconBlock'
|
|
14
|
+
const name = 'IconBlock'
|
|
14
15
|
const parts = ['block', 'link', 'title'] as const
|
|
15
16
|
const { classes } = extendableComponent(name, parts)
|
|
16
17
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { SxProps, Theme } from '@mui/material'
|
|
2
|
+
import { Box } from '@mui/material'
|
|
2
3
|
import React from 'react'
|
|
3
4
|
import { extendableComponent } from '../../Styles'
|
|
4
5
|
import { responsiveVal } from '../../Styles/responsiveVal'
|
|
@@ -10,7 +11,7 @@ export type IconBlocksProps = {
|
|
|
10
11
|
sx?: SxProps<Theme>
|
|
11
12
|
}
|
|
12
13
|
|
|
13
|
-
const compName = 'IconBlocks'
|
|
14
|
+
const compName = 'IconBlocks'
|
|
14
15
|
const parts = ['container', 'title', 'optionsWrapper', 'block', 'wrapper'] as const
|
|
15
16
|
const { classes } = extendableComponent(compName, parts)
|
|
16
17
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { SxProps, Theme } from '@mui/material'
|
|
2
|
+
import { Box } from '@mui/material'
|
|
2
3
|
import React from 'react'
|
|
3
4
|
import { extendableComponent } from '../../Styles'
|
|
4
5
|
import { breakpointVal } from '../../Styles/breakpointVal'
|
|
@@ -10,7 +11,7 @@ export type ImageTextProps = {
|
|
|
10
11
|
sx?: SxProps<Theme>
|
|
11
12
|
}
|
|
12
13
|
|
|
13
|
-
const name = 'ImageText'
|
|
14
|
+
const name = 'ImageText'
|
|
14
15
|
const parts = ['root', 'wrapper', 'asset', 'copy'] as const
|
|
15
16
|
const { classes } = extendableComponent(name, parts)
|
|
16
17
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { SxProps, Theme } from '@mui/material'
|
|
2
|
+
import { Box } from '@mui/material'
|
|
2
3
|
import React from 'react'
|
|
3
4
|
import { extendableComponent } from '../../Styles'
|
|
4
5
|
import { breakpointVal } from '../../Styles/breakpointVal'
|
|
@@ -11,7 +12,7 @@ export type ImageTextBoxedProps = {
|
|
|
11
12
|
sx?: SxProps<Theme>
|
|
12
13
|
}
|
|
13
14
|
|
|
14
|
-
const name = 'ImageTextBoxed'
|
|
15
|
+
const name = 'ImageTextBoxed'
|
|
15
16
|
const parts = ['root', 'wrapper', 'asset', 'copy'] as const
|
|
16
17
|
const { classes } = extendableComponent(name, parts)
|
|
17
18
|
|
|
@@ -72,7 +73,7 @@ export function ImageTextBoxed(props: ImageTextBoxedProps) {
|
|
|
72
73
|
'& img': {
|
|
73
74
|
height: '100% !important',
|
|
74
75
|
width: '100% !important',
|
|
75
|
-
objectFit:
|
|
76
|
+
objectFit: 'cover',
|
|
76
77
|
},
|
|
77
78
|
})}
|
|
78
79
|
>
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ContainerProps } from '@mui/material'
|
|
2
|
+
import { Box } from '@mui/material'
|
|
2
3
|
import { extendableComponent } from '../../Styles'
|
|
3
4
|
import { breakpointVal } from '../../Styles/breakpointVal'
|
|
4
5
|
import { Row } from '../Row'
|
|
@@ -9,7 +10,7 @@ export type ParagraphWithSidebarSlideProps = ContainerProps & {
|
|
|
9
10
|
children: React.ReactNode
|
|
10
11
|
}
|
|
11
12
|
|
|
12
|
-
const name = 'ParagraphWithSidebarSlide'
|
|
13
|
+
const name = 'ParagraphWithSidebarSlide'
|
|
13
14
|
const parts = ['root', 'wrapper', 'backstory', 'copy', 'slidingItems'] as const
|
|
14
15
|
const { classes } = extendableComponent(name, parts)
|
|
15
16
|
|
package/Row/Quote/Quote.tsx
CHANGED
package/Row/Row.tsx
CHANGED
|
@@ -1,15 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
ScrollerProvider,
|
|
6
|
-
} from '@graphcommerce/framer-scroller'
|
|
7
|
-
import { Box, ContainerProps, SxProps, Theme, Typography } from '@mui/material'
|
|
1
|
+
import type { ScrollerButtonProps } from '@graphcommerce/framer-scroller'
|
|
2
|
+
import { Scroller, ScrollerButton, ScrollerProvider } from '@graphcommerce/framer-scroller'
|
|
3
|
+
import type { ContainerProps, SxProps, Theme } from '@mui/material'
|
|
4
|
+
import { Box, Typography } from '@mui/material'
|
|
8
5
|
import React from 'react'
|
|
6
|
+
import { Container, useContainerSpacing } from '../../Container/Container'
|
|
7
|
+
import { iconChevronLeft, iconChevronRight } from '../../icons'
|
|
9
8
|
import { IconSvg } from '../../IconSvg'
|
|
10
9
|
import { extendableComponent } from '../../Styles'
|
|
11
10
|
import { useFabSize } from '../../Theme'
|
|
12
|
-
import { iconChevronLeft, iconChevronRight } from '../../icons'
|
|
13
11
|
import { Row } from '../Row'
|
|
14
12
|
|
|
15
13
|
export type RowLinksProps = {
|
|
@@ -21,7 +19,7 @@ export type RowLinksProps = {
|
|
|
21
19
|
} & Pick<ContainerProps, 'maxWidth'> &
|
|
22
20
|
Pick<ScrollerButtonProps, 'showButtons'>
|
|
23
21
|
|
|
24
|
-
const compName = 'RowLinks'
|
|
22
|
+
const compName = 'RowLinks'
|
|
25
23
|
const parts = [
|
|
26
24
|
'root',
|
|
27
25
|
'scroller',
|
|
@@ -38,37 +36,41 @@ export function RowLinks(props: RowLinksProps) {
|
|
|
38
36
|
const { title, copy, children, sx = [], inlineTitle, showButtons, maxWidth } = props
|
|
39
37
|
|
|
40
38
|
const fabSize = useFabSize('responsive')
|
|
39
|
+
const spacing = useContainerSpacing({ maxWidth })
|
|
41
40
|
|
|
42
41
|
return (
|
|
43
|
-
<
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
42
|
+
<Box className={classes.root} sx={sx}>
|
|
43
|
+
<Container maxWidth={maxWidth}>
|
|
44
|
+
{!inlineTitle && (
|
|
45
|
+
<Typography
|
|
46
|
+
variant='subtitle1'
|
|
47
|
+
component='h2'
|
|
48
|
+
className={classes.title}
|
|
49
|
+
sx={(theme) => ({ mb: theme.spacings.md })}
|
|
50
|
+
>
|
|
51
|
+
{title}
|
|
52
|
+
</Typography>
|
|
53
|
+
)}
|
|
54
|
+
{copy && (
|
|
55
|
+
<Box className={classes.copy} sx={(theme) => ({ my: theme.spacings.md })}>
|
|
56
|
+
{copy}
|
|
57
|
+
</Box>
|
|
58
|
+
)}
|
|
59
|
+
</Container>
|
|
60
|
+
<Box
|
|
61
|
+
className={classes.scrollerWrapper}
|
|
62
|
+
sx={(theme) => ({ position: 'relative', mb: theme.spacings.xxl })}
|
|
63
|
+
>
|
|
64
64
|
<ScrollerProvider scrollSnapAlign='end'>
|
|
65
65
|
<Scroller
|
|
66
66
|
className={classes.scroller}
|
|
67
67
|
hideScrollbar
|
|
68
68
|
sx={(theme) => ({
|
|
69
|
+
px: spacing.padding,
|
|
70
|
+
scrollPaddingInline: spacing.padding,
|
|
69
71
|
justifyContent: 'start',
|
|
70
72
|
gap: `${theme.spacings.md}`,
|
|
71
|
-
gridAutoColumns:
|
|
73
|
+
gridAutoColumns: 'max-content',
|
|
72
74
|
alignItems: 'center',
|
|
73
75
|
'&.smGridDirInline > *': {
|
|
74
76
|
scrollSnapAlign: {
|
|
@@ -92,7 +94,7 @@ export function RowLinks(props: RowLinksProps) {
|
|
|
92
94
|
gridAutoFlow: 'row',
|
|
93
95
|
gap: theme.spacings.xxs,
|
|
94
96
|
position: 'absolute',
|
|
95
|
-
left:
|
|
97
|
+
left: spacing.padding,
|
|
96
98
|
top: `calc(50% - calc(${fabSize} / 2))`,
|
|
97
99
|
})}
|
|
98
100
|
>
|
|
@@ -111,7 +113,7 @@ export function RowLinks(props: RowLinksProps) {
|
|
|
111
113
|
display: 'grid',
|
|
112
114
|
gap: theme.spacings.xxs,
|
|
113
115
|
position: 'absolute',
|
|
114
|
-
right:
|
|
116
|
+
right: spacing.padding,
|
|
115
117
|
top: `calc(50% - calc(${fabSize} / 2))`,
|
|
116
118
|
})}
|
|
117
119
|
>
|
|
@@ -126,6 +128,6 @@ export function RowLinks(props: RowLinksProps) {
|
|
|
126
128
|
</Box>
|
|
127
129
|
</ScrollerProvider>
|
|
128
130
|
</Box>
|
|
129
|
-
</
|
|
131
|
+
</Box>
|
|
130
132
|
)
|
|
131
133
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { RowLinksProps } from '../RowLinks'
|
|
2
|
+
import { RowLinks } from '../RowLinks'
|
|
2
3
|
|
|
3
4
|
export function VariantImageLabelSwiper(props: RowLinksProps) {
|
|
4
5
|
const { sx = [], ...rowLinksProps } = props
|
|
@@ -8,7 +9,10 @@ export function VariantImageLabelSwiper(props: RowLinksProps) {
|
|
|
8
9
|
{...rowLinksProps}
|
|
9
10
|
sx={[
|
|
10
11
|
{
|
|
11
|
-
'& .Scroller-root': {
|
|
12
|
+
// '& .Scroller-root': {
|
|
13
|
+
// alignItems: 'start',
|
|
14
|
+
// },
|
|
15
|
+
'& .Scroller-scroller': {
|
|
12
16
|
alignItems: 'start',
|
|
13
17
|
},
|
|
14
18
|
'& .RowLinks-title': {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { RowLinksProps } from '../RowLinks'
|
|
2
|
+
import { RowLinks } from '../RowLinks'
|
|
2
3
|
|
|
3
4
|
export function VariantInline(props: RowLinksProps) {
|
|
4
5
|
const { sx = [], inlineTitle = true, ...rowLinksProps } = props
|
|
@@ -7,7 +8,10 @@ export function VariantInline(props: RowLinksProps) {
|
|
|
7
8
|
<RowLinks
|
|
8
9
|
inlineTitle={inlineTitle}
|
|
9
10
|
{...rowLinksProps}
|
|
10
|
-
sx={[
|
|
11
|
+
sx={[
|
|
12
|
+
(theme) => ({ '& .RowLinks-scrollerWrapper': { my: theme.spacings.md } }),
|
|
13
|
+
...(Array.isArray(sx) ? sx : [sx]),
|
|
14
|
+
]}
|
|
11
15
|
/>
|
|
12
16
|
)
|
|
13
17
|
}
|