@graphcommerce/next-ui 10.0.0-canary.67 → 10.0.0-canary.72

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.
Files changed (103) hide show
  1. package/ActionCard/ActionCard.tsx +30 -21
  2. package/ActionCard/ActionCardAccordion.tsx +2 -2
  3. package/ActionCard/ActionCardLayout.tsx +4 -3
  4. package/ActionCard/ActionCardList.tsx +13 -6
  5. package/Blog/BlogAuthor/BlogAuthor.tsx +9 -7
  6. package/Blog/BlogContent/BlogContent.tsx +7 -4
  7. package/Blog/BlogHeader/BlogHeader.tsx +7 -4
  8. package/Blog/BlogList/BlogList.tsx +4 -3
  9. package/Blog/BlogListItem/BlogListItem.tsx +6 -5
  10. package/Blog/BlogTags/BlogTag.tsx +2 -4
  11. package/Blog/BlogTitle/BlogTitle.tsx +2 -6
  12. package/Breadcrumbs/Breadcrumbs.tsx +24 -38
  13. package/Breadcrumbs/BreadcrumbsList.tsx +9 -9
  14. package/Button/Button.tsx +4 -4
  15. package/Button/LinkOrButton.tsx +8 -7
  16. package/CHANGELOG.md +26 -0
  17. package/ChipMenu/ChipMenu.tsx +5 -5
  18. package/Container/Container.tsx +4 -4
  19. package/Fab/Fab.tsx +1 -1
  20. package/Footer/Footer.tsx +5 -5
  21. package/Form/Form.tsx +6 -6
  22. package/Form/FormDivider.tsx +1 -1
  23. package/Form/InputCheckmark.tsx +2 -1
  24. package/FramerScroller/SidebarGallery.tsx +43 -34
  25. package/FullPageMessage/FullPageMessage.tsx +13 -4
  26. package/IconHeader/IconHeader.tsx +22 -8
  27. package/IconSvg/IconSvg.tsx +1 -1
  28. package/Layout/components/LayoutHeader.tsx +7 -6
  29. package/Layout/components/LayoutHeaderBack.tsx +0 -2
  30. package/Layout/components/LayoutHeaderContent.tsx +22 -18
  31. package/Layout/components/LayoutTitle.tsx +4 -3
  32. package/LayoutDefault/components/LayoutDefault.tsx +5 -4
  33. package/LayoutOverlay/components/LayoutOverlayHeader.tsx +4 -3
  34. package/LayoutOverlay/components/LayoutOverlayHeader2.tsx +3 -9
  35. package/LayoutParts/DesktopHeaderBadge.tsx +4 -3
  36. package/LayoutParts/DesktopNavBar.tsx +10 -11
  37. package/LayoutParts/DesktopNavBarItem.tsx +22 -16
  38. package/LayoutParts/GlobalHead.tsx +1 -1
  39. package/LayoutParts/Logo.tsx +2 -1
  40. package/LayoutParts/MenuFab.tsx +36 -14
  41. package/LayoutParts/MenuFabItem.tsx +2 -1
  42. package/LayoutParts/MenuFabSecondaryItem.tsx +6 -3
  43. package/LayoutParts/PlaceholderFab.tsx +2 -1
  44. package/LayoutParts/StickyBelowHeader.tsx +4 -3
  45. package/MediaQuery/MediaQuery.tsx +2 -4
  46. package/Navigation/components/NavigationFab.tsx +31 -11
  47. package/Navigation/components/NavigationItem.tsx +14 -10
  48. package/Navigation/components/NavigationOverlay.tsx +39 -20
  49. package/Overlay/components/Overlay.tsx +10 -3
  50. package/Overlay/components/OverlayBase.tsx +21 -23
  51. package/Overlay/components/OverlayContainer.tsx +40 -14
  52. package/Overlay/components/OverlayHeader.tsx +2 -1
  53. package/Overlay/components/OverlayStickyBottom.tsx +2 -5
  54. package/OverlayOrPopperChip/OverlayOrPopperChip.tsx +35 -31
  55. package/OverlayOrPopperChip/OverlayPanel.tsx +4 -5
  56. package/OverlayOrPopperChip/OverlayPanelActions.tsx +2 -1
  57. package/OverlayOrPopperChip/PopperPanelActions.tsx +2 -1
  58. package/Page/types.ts +1 -4
  59. package/Pagination/Pagination.tsx +9 -6
  60. package/Pagination/PaginationExtended.tsx +4 -3
  61. package/RenderType/RenderType.tsx +8 -5
  62. package/Row/ButtonLinkList/ButtonLinkList.tsx +14 -15
  63. package/Row/ButtonLinkList/ButtonLinkListItem.tsx +1 -1
  64. package/Row/ColumnThree/ColumnThree.tsx +4 -3
  65. package/Row/ColumnTwo/ColumnTwo.tsx +16 -5
  66. package/Row/ColumnTwoSpread/ColumnTwoSpread.tsx +15 -4
  67. package/Row/ColumnTwoWithTop/ColumnTwoWithTop.tsx +22 -6
  68. package/Row/ContentLinks/ContentLinks.tsx +4 -3
  69. package/Row/HeroBanner/HeroBanner.tsx +3 -7
  70. package/Row/IconBlocks/IconBlock.tsx +4 -3
  71. package/Row/IconBlocks/IconBlocks.tsx +2 -1
  72. package/Row/ImageText/ImageText.tsx +5 -5
  73. package/Row/ImageTextBoxed/ImageTextBoxed.tsx +2 -2
  74. package/Row/ParagraphWithSidebarSlide/ParagraphWithSidebarSlide.tsx +1 -1
  75. package/Row/RowLinks/variant/VariantImageLabelSwiper.tsx +4 -3
  76. package/Row/RowLinks/variant/VariantInline.tsx +2 -4
  77. package/Row/RowLinks/variant/VariantLogoSwiper.tsx +4 -3
  78. package/Row/RowLinks/variant/VariantUsps.tsx +4 -3
  79. package/Row/SpecialBanner/SpecialBanner.tsx +2 -2
  80. package/SectionContainer/SectionContainer.tsx +6 -5
  81. package/SectionHeader/SectionHeader.tsx +4 -3
  82. package/Separator/Separator.tsx +4 -3
  83. package/SkipLink/SkipLink.tsx +2 -2
  84. package/Snackbar/MessageSnackbarImpl.tsx +22 -10
  85. package/StarRatingField/StarRatingField.tsx +1 -1
  86. package/Stepper/Stepper.tsx +6 -5
  87. package/Styles/withTheme.tsx +11 -9
  88. package/Tabs/TabItem.tsx +4 -5
  89. package/TextInputNumber/TextInputNumber.tsx +76 -50
  90. package/Theme/DarkLightModeThemeProvider.tsx +41 -88
  91. package/Theme/MuiButton.ts +23 -22
  92. package/Theme/MuiChip.ts +12 -13
  93. package/Theme/MuiFab.ts +5 -5
  94. package/Theme/MuiSlider.ts +5 -5
  95. package/Theme/createTheme.ts +1 -3
  96. package/Theme/themeDefaults.ts +1 -1
  97. package/ToggleButton/ToggleButton.tsx +10 -11
  98. package/ToggleButtonGroup/ToggleButtonGroup.tsx +4 -3
  99. package/UspList/UspList.tsx +4 -3
  100. package/UspList/UspListItem.tsx +4 -3
  101. package/package.json +15 -15
  102. package/types.ts +1 -0
  103. package/utils/sxx.ts +1 -1
@@ -1,4 +1,5 @@
1
- import React from 'react'
1
+ import { createElement } from 'react'
2
+ import type React from 'react'
2
3
 
3
4
  /** To make renderers customizable we need to be able to provide renders for all types */
4
5
  type TypeObject = { __typename: string; [index: string]: unknown }
@@ -24,6 +25,10 @@ export type TypeRenderer<
24
25
  TAdd extends Record<string, unknown> = Record<string, unknown>,
25
26
  > = TypeRenderMap<T, T['__typename'], TAdd>
26
27
 
28
+ function FallbackRenderer({ __typename }: { __typename: string }) {
29
+ return <>{process.env.NODE_ENV !== 'production' ? __typename : ''}</>
30
+ }
31
+
27
32
  /**
28
33
  * A simple array with renderers but with strict typing that validates of the provided Renderer is
29
34
  * actually able to render the Type
@@ -35,11 +40,9 @@ export function RenderType<
35
40
  A extends Record<string, unknown> = Record<string, unknown>,
36
41
  >(props: { renderer: TypeRenderer<T, A> } & FilterTypeByTypename<T, T['__typename']> & A) {
37
42
  const { renderer, __typename, ...typeItemProps } = props
38
- const TypeItem: TypeRenderMethod<typeof typeItemProps> = renderer[__typename]
39
- ? renderer[__typename]
40
- : () => <>{process.env.NODE_ENV !== 'production' ? __typename : ''}</>
43
+ const TypeItem: TypeRenderMethod<typeof typeItemProps> = renderer[__typename] ?? FallbackRenderer
41
44
 
42
- return <TypeItem {...typeItemProps} __typename={__typename} />
45
+ return createElement(TypeItem, { ...typeItemProps, __typename })
43
46
  }
44
47
 
45
48
  /** @public */
@@ -1,3 +1,4 @@
1
+ import { sxx } from '@graphcommerce/next-ui'
1
2
  import type { SxProps, Theme } from '@mui/material'
2
3
  import { Box, Typography } from '@mui/material'
3
4
  import React from 'react'
@@ -29,21 +30,19 @@ export function ButtonLinkList(props: ButtonLinkListProps) {
29
30
  return (
30
31
  <Row maxWidth='820px' className={classes.root} sx={sx}>
31
32
  <Box
32
- sx={[
33
- (theme) => ({
34
- position: 'relative',
35
- '&:focus': {
36
- outline: 'none',
37
- },
38
- display: 'flex',
39
- justifyContent: 'space-between',
40
- alignItems: 'center',
41
- marginTop: theme.spacings.sm,
42
- marginBottom: theme.spacings.xxs,
43
- paddingBottom: theme.spacings.xxs,
44
- borderBottom: `1px solid ${theme.palette.divider}`,
45
- }),
46
- ]}
33
+ sx={sxx((theme) => ({
34
+ position: 'relative',
35
+ '&:focus': {
36
+ outline: 'none',
37
+ },
38
+ display: 'flex',
39
+ justifyContent: 'space-between',
40
+ alignItems: 'center',
41
+ marginTop: theme.spacings.sm,
42
+ marginBottom: theme.spacings.xxs,
43
+ paddingBottom: theme.spacings.xxs,
44
+ borderBottom: `1px solid ${theme.vars.palette.divider}`,
45
+ }))}
47
46
  >
48
47
  <Typography variant='overline' color='textSecondary' component={component}>
49
48
  {title}
@@ -24,7 +24,7 @@ export function ButtonLinkListItem(props: ButtonLinkListItemProps) {
24
24
  href={url}
25
25
  sx={(theme) => ({
26
26
  padding: `${theme.spacings.xxs} 0`,
27
- borderBottom: `1px solid ${theme.palette.divider}`,
27
+ borderBottom: `1px solid ${theme.vars.palette.divider}`,
28
28
  justifyContent: 'space-between',
29
29
  })}
30
30
  {...listItemButtonProps}
@@ -1,3 +1,4 @@
1
+ import { sxx } from '@graphcommerce/next-ui'
1
2
  import type { ContainerProps } from '@mui/material'
2
3
  import { Box } from '@mui/material'
3
4
  import React from 'react'
@@ -21,7 +22,7 @@ export function ColumnThree(props: ColumnThreeProps) {
21
22
  <Row
22
23
  className={classes.root}
23
24
  {...containerProps}
24
- sx={[
25
+ sx={sxx(
25
26
  (theme) => ({
26
27
  display: 'grid',
27
28
  gridColumnGap: theme.spacings.md,
@@ -55,8 +56,8 @@ export function ColumnThree(props: ColumnThreeProps) {
55
56
  gridTemplateAreas: '"one two three"',
56
57
  },
57
58
  }),
58
- ...(Array.isArray(sx) ? sx : [sx]),
59
- ]}
59
+ sx,
60
+ )}
60
61
  >
61
62
  <Box className={classes.colOne} sx={{ gridArea: 'one' }}>
62
63
  {colOneContent}
@@ -1,3 +1,4 @@
1
+ import { sxx } from '@graphcommerce/next-ui'
1
2
  import type { ContainerProps } from '@mui/material'
2
3
  import { Box } from '@mui/material'
3
4
  import React from 'react'
@@ -21,7 +22,7 @@ export function ColumnTwo(props: ColumnTwoProps) {
21
22
  maxWidth='lg'
22
23
  {...containerProps}
23
24
  className={classes.root}
24
- sx={[
25
+ sx={sxx(
25
26
  (theme) => ({
26
27
  gridColumnGap: theme.spacings.md,
27
28
  gridRowGap: theme.spacings.lg,
@@ -33,13 +34,23 @@ export function ColumnTwo(props: ColumnTwoProps) {
33
34
  gridTemplateAreas: '"one two"',
34
35
  },
35
36
  }),
36
- ...(Array.isArray(sx) ? sx : [sx]),
37
- ]}
37
+ sx,
38
+ )}
38
39
  >
39
- <Box className={classes.colOne} gridArea='one'>
40
+ <Box
41
+ className={classes.colOne}
42
+ sx={{
43
+ gridArea: 'one',
44
+ }}
45
+ >
40
46
  {colOneContent}
41
47
  </Box>
42
- <Box className={classes.colTwo} gridArea='two'>
48
+ <Box
49
+ className={classes.colTwo}
50
+ sx={{
51
+ gridArea: 'two',
52
+ }}
53
+ >
43
54
  {colTwoContent}
44
55
  </Box>
45
56
  </Row>
@@ -1,3 +1,4 @@
1
+ import { sxx } from '@graphcommerce/next-ui'
1
2
  import type { ColumnTwoProps } from '../ColumnTwo/ColumnTwo'
2
3
  import { ColumnTwo } from '../ColumnTwo/ColumnTwo'
3
4
 
@@ -12,11 +13,10 @@ export function ColumnTwoSpread(props: ColumnTwoSpreadProps) {
12
13
  <ColumnTwo
13
14
  {...colProps}
14
15
  className='ColumnTwoSpread'
15
- sx={[
16
+ sx={sxx(
16
17
  (theme) => ({
17
18
  [theme.breakpoints.up('md')]: {
18
19
  gridTemplateColumns: '1fr 1fr 1fr',
19
- gridTemplateAreas: nodeLength ? '"one one two"' : '"one two two"',
20
20
  '& h2, & h3': {
21
21
  '&:empty': {
22
22
  display: 'block',
@@ -27,8 +27,19 @@ export function ColumnTwoSpread(props: ColumnTwoSpreadProps) {
27
27
  gridTemplateColumns: '1fr',
28
28
  gridTemplateAreas: '"one" "two"',
29
29
  }),
30
- ...(Array.isArray(sx) ? sx : [sx]),
31
- ]}
30
+ nodeLength
31
+ ? (theme) => ({
32
+ [theme.breakpoints.up('md')]: {
33
+ gridTemplateAreas: '"one one two"',
34
+ },
35
+ })
36
+ : (theme) => ({
37
+ [theme.breakpoints.up('md')]: {
38
+ gridTemplateAreas: '"one two two"',
39
+ },
40
+ }),
41
+ sx,
42
+ )}
32
43
  />
33
44
  )
34
45
  }
@@ -1,3 +1,4 @@
1
+ import { sxx } from '@graphcommerce/next-ui'
1
2
  import type { ContainerProps } from '@mui/material'
2
3
  import { Box } from '@mui/material'
3
4
  import React from 'react'
@@ -21,7 +22,7 @@ export function ColumnTwoWithTop(props: ColumnTwoWithTopProps) {
21
22
  <Row
22
23
  maxWidth='lg'
23
24
  className={classes.root}
24
- sx={[
25
+ sx={sxx(
25
26
  (theme) => ({
26
27
  display: 'grid',
27
28
  gap: `${theme.spacings.lg} 0`,
@@ -32,17 +33,32 @@ export function ColumnTwoWithTop(props: ColumnTwoWithTopProps) {
32
33
  gap: `${theme.spacings.sm} ${theme.spacings.xxl}`,
33
34
  },
34
35
  }),
35
- ...(Array.isArray(sx) ? sx : [sx]),
36
- ]}
36
+ sx,
37
+ )}
37
38
  {...containerProps}
38
39
  >
39
- <Box className={classes.colOne} gridArea='top'>
40
+ <Box
41
+ className={classes.colOne}
42
+ sx={{
43
+ gridArea: 'top',
44
+ }}
45
+ >
40
46
  {top}
41
47
  </Box>
42
- <Box className={classes.colOne} gridArea='left'>
48
+ <Box
49
+ className={classes.colOne}
50
+ sx={{
51
+ gridArea: 'left',
52
+ }}
53
+ >
43
54
  {left}
44
55
  </Box>
45
- <Box className={classes.colTwo} gridArea='right'>
56
+ <Box
57
+ className={classes.colTwo}
58
+ sx={{
59
+ gridArea: 'right',
60
+ }}
61
+ >
46
62
  {right}
47
63
  </Box>
48
64
  </Row>
@@ -1,4 +1,5 @@
1
1
  import { Scroller, ScrollerProvider } from '@graphcommerce/framer-scroller'
2
+ import { sxx } from '@graphcommerce/next-ui'
2
3
  import type { SxProps, Theme } from '@mui/material'
3
4
  import { Container, Typography } from '@mui/material'
4
5
  import React from 'react'
@@ -21,12 +22,12 @@ export function ContentLinks(props: ContentLinksProps) {
21
22
  <Container
22
23
  className={classes.root}
23
24
  maxWidth={false}
24
- sx={[
25
+ sx={sxx(
25
26
  (theme) => ({
26
27
  marginBottom: `${theme.spacings.md}`,
27
28
  }),
28
- ...(Array.isArray(sx) ? sx : [sx]),
29
- ]}
29
+ sx,
30
+ )}
30
31
  >
31
32
  <ScrollerProvider scrollSnapAlign='none'>
32
33
  <Scroller
@@ -1,4 +1,5 @@
1
1
  import { clientSize } from '@graphcommerce/framer-utils'
2
+ import { sxx } from '@graphcommerce/next-ui'
2
3
  import type { ContainerProps, SxProps, Theme } from '@mui/material'
3
4
  import { Box, styled } from '@mui/material'
4
5
  import { m, useTransform } from 'framer-motion'
@@ -28,12 +29,7 @@ export function HeroBanner(props: HeroBannerProps) {
28
29
  )
29
30
 
30
31
  return (
31
- <Row
32
- maxWidth={false}
33
- {...containerProps}
34
- className={classes.root}
35
- sx={[{}, ...(Array.isArray(sx) ? sx : [sx])]}
36
- >
32
+ <Row maxWidth={false} {...containerProps} className={classes.root} sx={sx}>
37
33
  <Box
38
34
  className={classes.wrapper}
39
35
  sx={(theme) => ({
@@ -53,7 +49,7 @@ export function HeroBanner(props: HeroBannerProps) {
53
49
  alignContent: 'center',
54
50
  textAlign: 'center',
55
51
  p: theme.spacings.md,
56
- color: theme.palette.secondary.contrastText,
52
+ color: theme.vars.palette.secondary.contrastText,
57
53
  })}
58
54
  >
59
55
  {children}
@@ -1,3 +1,4 @@
1
+ import { sxx } from '@graphcommerce/next-ui'
1
2
  import type { ButtonProps, SxProps, Theme } from '@mui/material'
2
3
  import { Box, Button, Typography } from '@mui/material'
3
4
  import React from 'react'
@@ -27,7 +28,7 @@ export const IconBlock = React.forwardRef<HTMLAnchorElement & HTMLButtonElement,
27
28
  color='primary'
28
29
  className={classes.block}
29
30
  {...buttonProps}
30
- sx={[
31
+ sx={sxx(
31
32
  (theme) => ({
32
33
  padding: `${theme.spacings.sm}`,
33
34
  textAlign: 'center',
@@ -38,8 +39,8 @@ export const IconBlock = React.forwardRef<HTMLAnchorElement & HTMLButtonElement,
38
39
  gap: `${theme.spacings.xxs}`,
39
40
  },
40
41
  }),
41
- ...(Array.isArray(sx) ? sx : [sx]),
42
- ]}
42
+ sx,
43
+ )}
43
44
  >
44
45
  <Box>
45
46
  {icon}
@@ -1,3 +1,4 @@
1
+ import { sxx } from '@graphcommerce/next-ui'
1
2
  import type { SxProps, Theme } from '@mui/material'
2
3
  import { Box } from '@mui/material'
3
4
  import React from 'react'
@@ -19,7 +20,7 @@ export function IconBlocks(props: IconBlocksProps) {
19
20
  const { title, children, sx = [] } = props
20
21
 
21
22
  return (
22
- <Row maxWidth='820px' className={classes.container} sx={[...(Array.isArray(sx) ? sx : [sx])]}>
23
+ <Row maxWidth='md' className={classes.container} sx={sxx({ maxWidth: 820 }, sx)}>
23
24
  <Box className={classes.wrapper} sx={(theme) => ({ paddingTop: `${theme.spacings.lg}` })}>
24
25
  <Box
25
26
  className={classes.title}
@@ -24,10 +24,7 @@ export function ImageText(props: ImageTextProps) {
24
24
  className={classes.wrapper}
25
25
  sx={(theme) => ({
26
26
  display: 'grid',
27
- background:
28
- theme.palette.mode === 'light'
29
- ? theme.palette.background.image
30
- : theme.palette.background.paper,
27
+ background: theme.vars.palette.background.paper,
31
28
  justifyItems: 'center',
32
29
  columnGap: theme.spacings.lg,
33
30
  marginTop: theme.spacings.lg,
@@ -44,6 +41,9 @@ export function ImageText(props: ImageTextProps) {
44
41
  theme.shape.borderRadius * 3,
45
42
  theme.breakpoints.values,
46
43
  ),
44
+ ...theme.applyStyles('light', {
45
+ background: theme.vars.palette.background.image,
46
+ }),
47
47
  })}
48
48
  >
49
49
  <Box
@@ -70,7 +70,7 @@ export function ImageText(props: ImageTextProps) {
70
70
  className={classes.copy}
71
71
  sx={(theme) => ({
72
72
  marginTop: theme.spacings.lg,
73
- color: theme.palette.text.primary,
73
+ color: theme.vars.palette.text.primary,
74
74
  maxWidth: '80%',
75
75
  display: 'grid',
76
76
  alignContent: 'center',
@@ -25,7 +25,7 @@ export function ImageTextBoxed(props: ImageTextBoxedProps) {
25
25
  className={classes.wrapper}
26
26
  sx={(theme) => ({
27
27
  display: 'grid',
28
- border: `1px solid ${theme.palette.divider}`,
28
+ border: `1px solid ${theme.vars.palette.divider}`,
29
29
  justifyItems: 'center',
30
30
  columnGap: `${theme.spacings.lg}`,
31
31
  padding: 0,
@@ -47,7 +47,7 @@ export function ImageTextBoxed(props: ImageTextBoxedProps) {
47
47
  className={classes.copy}
48
48
  sx={(theme) => ({
49
49
  padding: `${theme.spacings.lg} 0`,
50
- color: theme.palette.text.primary,
50
+ color: theme.vars.palette.text.primary,
51
51
  maxWidth: '80%',
52
52
  display: 'grid',
53
53
  alignContent: 'center',
@@ -59,7 +59,7 @@ export function ParagraphWithSidebarSlide(props: ParagraphWithSidebarSlideProps)
59
59
  <Box
60
60
  className={classes.copy}
61
61
  sx={(theme) => ({
62
- color: theme.palette.secondary.contrastText,
62
+ color: theme.vars.palette.secondary.contrastText,
63
63
  display: 'grid',
64
64
  zIndex: 1,
65
65
  justifyItems: 'start',
@@ -1,3 +1,4 @@
1
+ import { sxx } from '@graphcommerce/next-ui'
1
2
  import type { RowLinksProps } from '../RowLinks'
2
3
  import { RowLinks } from '../RowLinks'
3
4
 
@@ -7,7 +8,7 @@ export function VariantImageLabelSwiper(props: RowLinksProps) {
7
8
  return (
8
9
  <RowLinks
9
10
  {...rowLinksProps}
10
- sx={[
11
+ sx={sxx(
11
12
  {
12
13
  // '& .Scroller-root': {
13
14
  // alignItems: 'start',
@@ -20,8 +21,8 @@ export function VariantImageLabelSwiper(props: RowLinksProps) {
20
21
  textTransform: 'uppercase',
21
22
  },
22
23
  },
23
- ...(Array.isArray(sx) ? sx : [sx]),
24
- ]}
24
+ sx,
25
+ )}
25
26
  />
26
27
  )
27
28
  }
@@ -1,3 +1,4 @@
1
+ import { sxx } from '@graphcommerce/next-ui'
1
2
  import type { RowLinksProps } from '../RowLinks'
2
3
  import { RowLinks } from '../RowLinks'
3
4
 
@@ -8,10 +9,7 @@ export function VariantInline(props: RowLinksProps) {
8
9
  <RowLinks
9
10
  inlineTitle={inlineTitle}
10
11
  {...rowLinksProps}
11
- sx={[
12
- (theme) => ({ '& .RowLinks-scrollerWrapper': { my: theme.spacings.md } }),
13
- ...(Array.isArray(sx) ? sx : [sx]),
14
- ]}
12
+ sx={sxx((theme) => ({ '& .RowLinks-scrollerWrapper': { my: theme.spacings.md } }), sx)}
15
13
  />
16
14
  )
17
15
  }
@@ -1,3 +1,4 @@
1
+ import { sxx } from '@graphcommerce/next-ui'
1
2
  import type { RowLinksProps } from '../RowLinks'
2
3
  import { RowLinks } from '../RowLinks'
3
4
 
@@ -7,7 +8,7 @@ export function VariantLogoSwiper(props: RowLinksProps) {
7
8
  return (
8
9
  <RowLinks
9
10
  {...rowLinksProps}
10
- sx={[
11
+ sx={sxx(
11
12
  (theme) => ({
12
13
  '& .RowLinks-title': {
13
14
  display: 'none',
@@ -19,8 +20,8 @@ export function VariantLogoSwiper(props: RowLinksProps) {
19
20
  gap: theme.spacings.xxl,
20
21
  },
21
22
  }),
22
- ...(Array.isArray(sx) ? sx : [sx]),
23
- ]}
23
+ sx,
24
+ )}
24
25
  />
25
26
  )
26
27
  }
@@ -1,3 +1,4 @@
1
+ import { sxx } from '@graphcommerce/next-ui'
1
2
  import type { RowLinksProps } from '../RowLinks'
2
3
  import { RowLinks } from '../RowLinks'
3
4
 
@@ -8,7 +9,7 @@ export function VariantUsps(props: RowLinksProps) {
8
9
  <RowLinks
9
10
  inlineTitle={inlineTitle}
10
11
  {...rowLinksProps}
11
- sx={[
12
+ sx={sxx(
12
13
  (theme) => ({
13
14
  '& .RowLinks-title': {
14
15
  display: 'none',
@@ -20,8 +21,8 @@ export function VariantUsps(props: RowLinksProps) {
20
21
  gap: theme.spacings.lg,
21
22
  },
22
23
  }),
23
- ...(Array.isArray(sx) ? sx : [sx]),
24
- ]}
24
+ sx,
25
+ )}
25
26
  />
26
27
  )
27
28
  }
@@ -27,7 +27,7 @@ export function SpecialBanner(props: SpecialBannerProps) {
27
27
  disableGutters
28
28
  sx={(theme) => ({
29
29
  display: 'grid',
30
- background: theme.palette.background.paper,
30
+ background: theme.vars.palette.background.paper,
31
31
  justifyItems: 'center',
32
32
  columnGap: `${theme.spacings.lg}`,
33
33
  paddingTop: theme.spacings.lg,
@@ -87,7 +87,7 @@ export function SpecialBanner(props: SpecialBannerProps) {
87
87
  <Box
88
88
  className={classes.copy}
89
89
  sx={(theme) => ({
90
- color: theme.palette.text.primary,
90
+ color: theme.vars.palette.text.primary,
91
91
  maxWidth: '70%',
92
92
  display: 'grid',
93
93
  alignContent: 'center',
@@ -1,3 +1,4 @@
1
+ import { sxx } from '@graphcommerce/next-ui'
1
2
  import { Box } from '@mui/material'
2
3
  import type { SectionHeaderProps } from '../SectionHeader/SectionHeader'
3
4
  import { SectionHeader } from '../SectionHeader/SectionHeader'
@@ -18,19 +19,19 @@ export function SectionContainer(props: SectionContainerProps) {
18
19
  return (
19
20
  <Box
20
21
  className={`${classes.root} ${className ?? ''}`}
21
- sx={[
22
+ sx={sxx(
22
23
  (theme) => ({
23
24
  '&.borderBottom': {
24
- borderBottom: `1px solid ${theme.palette.divider}`,
25
+ borderBottom: `1px solid ${theme.vars.palette.divider}`,
25
26
  },
26
27
  }),
27
- ...(Array.isArray(sx) ? sx : [sx]),
28
- ]}
28
+ sx,
29
+ )}
29
30
  >
30
31
  <SectionHeader
31
32
  {...sectionHeaderProps}
32
33
  sx={(theme) => ({
33
- borderBottom: `1px solid ${theme.palette.divider}`,
34
+ borderBottom: `1px solid ${theme.vars.palette.divider}`,
34
35
  paddingBottom: theme.spacings.xxs,
35
36
  marginBottom: theme.spacings.xxs,
36
37
  })}
@@ -1,3 +1,4 @@
1
+ import { sxx } from '@graphcommerce/next-ui'
1
2
  import type { SxProps, Theme, TypographyProps } from '@mui/material'
2
3
  import { Box, Typography } from '@mui/material'
3
4
  import React from 'react'
@@ -32,7 +33,7 @@ export function SectionHeader(props: SectionHeaderProps) {
32
33
  return (
33
34
  <Box
34
35
  className={classes.root}
35
- sx={[
36
+ sx={sxx(
36
37
  (theme) => ({
37
38
  position: 'relative',
38
39
  '&:focus': {
@@ -49,8 +50,8 @@ export function SectionHeader(props: SectionHeaderProps) {
49
50
  paddingLeft: theme.spacings.xxs,
50
51
  paddingRight: theme.spacings.xxs,
51
52
  })),
52
- ...(Array.isArray(sx) ? sx : [sx]),
53
- ]}
53
+ sx,
54
+ )}
54
55
  >
55
56
  <Typography
56
57
  className={classes.left}
@@ -1,3 +1,4 @@
1
+ import { sxx } from '@graphcommerce/next-ui'
1
2
  import type { TypographyProps } from '@mui/material'
2
3
  import { Box, Typography } from '@mui/material'
3
4
  import React from 'react'
@@ -17,13 +18,13 @@ export function Separator(props: DividedLinksProps) {
17
18
  return (
18
19
  <Box
19
20
  className={classes.root}
20
- sx={[
21
+ sx={sxx(
21
22
  (theme) => ({
22
23
  display: 'inline',
23
24
  padding: `0 ${theme.spacings.xxs} 0 ${theme.spacings.xxs}`,
24
25
  }),
25
- ...(Array.isArray(sx) ? sx : [sx]),
26
- ]}
26
+ sx,
27
+ )}
27
28
  >
28
29
  {icon ?? (
29
30
  <Typography component='span' variant='body1' color={color}>
@@ -24,8 +24,8 @@ export function SkipLink() {
24
24
  zIndex: '-1',
25
25
  marginLeft: theme.page.horizontal,
26
26
  padding: theme.spacings.xxs,
27
- backgroundColor: theme.palette.background.paper,
28
- border: theme.palette.text.primary,
27
+ backgroundColor: theme.vars.palette.background.paper,
28
+ border: theme.vars.palette.text.primary,
29
29
  borderRadius: theme.shape.borderRadius,
30
30
  '&:focus': {
31
31
  zIndex: 9999,