@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,5 +1,5 @@
1
1
  import type { BoxProps, ButtonProps, SxProps, Theme } from '@mui/material'
2
- import { alpha, Box, ButtonBase, lighten } from '@mui/material'
2
+ import { Box, ButtonBase } from '@mui/material'
3
3
  import React from 'react'
4
4
  import { extendableComponent, responsiveVal } from '../Styles'
5
5
  import { breakpointVal } from '../Styles/breakpointVal'
@@ -169,22 +169,31 @@ export function ActionCard<C extends React.ElementType = typeof Box>(props: Acti
169
169
  '&.variantDefault': {
170
170
  position: 'relative',
171
171
  '&.selected': {
172
- backgroundColor:
173
- theme.palette.mode === 'light'
174
- ? alpha(theme.palette[color].main, theme.palette.action.hoverOpacity)
175
- : lighten(theme.palette.background.default, theme.palette.action.hoverOpacity),
172
+ backgroundColor: theme.alpha(
173
+ theme.vars.palette[color].main,
174
+ theme.vars.palette.action.hoverOpacity,
175
+ ),
176
+ ...theme.applyStyles('dark', {
177
+ backgroundColor: theme.lighten(
178
+ theme.vars.palette.background.default,
179
+ theme.vars.palette.action.hoverOpacity,
180
+ ),
181
+ }),
176
182
  },
177
183
  '&.error': {
178
- backgroundColor: alpha(theme.palette.error.main, theme.palette.action.hoverOpacity),
184
+ backgroundColor: theme.alpha(
185
+ theme.vars.palette.error.main,
186
+ theme.vars.palette.action.hoverOpacity,
187
+ ),
179
188
  },
180
189
  '&:focus': {
181
190
  outline: 'none',
182
- boxShadow: `0 0 0 4px ${alpha(theme.palette[color].main, theme.palette.action.focusOpacity)}`,
191
+ boxShadow: `0 0 0 4px ${theme.alpha(theme.vars.palette[color].main, theme.vars.palette.action.focusOpacity)}`,
183
192
  },
184
193
  },
185
194
  '&.variantOutlined': {
186
- backgroundColor: theme.palette.background.paper,
187
- boxShadow: `inset 0 0 0 1px ${theme.palette.divider}`,
195
+ backgroundColor: theme.vars.palette.background.paper,
196
+ boxShadow: `inset 0 0 0 1px ${theme.vars.palette.divider}`,
188
197
  // '&:not(:last-of-type)': {
189
198
  // marginBottom: '-2px',
190
199
  // },
@@ -221,23 +230,23 @@ export function ActionCard<C extends React.ElementType = typeof Box>(props: Acti
221
230
  },
222
231
  '&.selected': {
223
232
  borderColor: 'transparent',
224
- boxShadow: `inset 0 0 0 2px ${theme.palette[color].main}`,
233
+ boxShadow: `inset 0 0 0 2px ${theme.vars.palette[color].main}`,
225
234
  },
226
235
  '&.selected:focus, &.error:focus': {
227
236
  borderColor: 'transparent',
228
- boxShadow: `inset 0 0 0 2px ${theme.palette[color].main}, 0 0 0 4px ${alpha(
229
- theme.palette[color].main,
230
- theme.palette.action.hoverOpacity,
237
+ boxShadow: `inset 0 0 0 2px ${theme.vars.palette[color].main}, 0 0 0 4px ${theme.alpha(
238
+ theme.vars.palette[color].main,
239
+ theme.vars.palette.action.hoverOpacity,
231
240
  )}`,
232
241
  },
233
242
  '&:focus': {
234
- boxShadow: `inset 0 0 0 1px ${theme.palette.divider},0 0 0 4px ${alpha(
235
- theme.palette[color].main,
236
- theme.palette.action.hoverOpacity,
243
+ boxShadow: `inset 0 0 0 1px ${theme.vars.palette.divider},0 0 0 4px ${theme.alpha(
244
+ theme.vars.palette[color].main,
245
+ theme.vars.palette.action.hoverOpacity,
237
246
  )}`,
238
247
  },
239
248
  '&.error': {
240
- boxShadow: `inset 0 0 0 2px ${theme.palette.error.main}`,
249
+ boxShadow: `inset 0 0 0 2px ${theme.vars.palette.error.main}`,
241
250
  },
242
251
  },
243
252
  '&.selected': {
@@ -247,9 +256,9 @@ export function ActionCard<C extends React.ElementType = typeof Box>(props: Acti
247
256
  zIndex: 2,
248
257
  },
249
258
  '&.disabled': {
250
- background: theme.palette.action.disabledBackground,
251
- opacity: theme.palette.action.disabledOpacity,
252
- color: theme.palette.action.disabled,
259
+ background: theme.vars.palette.action.disabledBackground,
260
+ opacity: theme.vars.palette.action.disabledOpacity,
261
+ color: theme.vars.palette.action.disabled,
253
262
  },
254
263
  }),
255
264
  sx,
@@ -353,7 +362,7 @@ export function ActionCard<C extends React.ElementType = typeof Box>(props: Acti
353
362
  <Box
354
363
  className={classes.action}
355
364
  sx={sxx(
356
- (theme) => ({ marginBottom: '5px', color: theme.palette[color].main }),
365
+ (theme) => ({ marginBottom: '5px', color: theme.vars.palette[color].main }),
357
366
  slotProps.action?.sx,
358
367
  )}
359
368
  {...slotProps.action}
@@ -32,8 +32,8 @@ export function ActionCardAccordion(props: ActionCardAccordionProps) {
32
32
  '&.Mui-expanded': { my: 0 },
33
33
  '::before': { display: 'none' },
34
34
  border: 'none',
35
- borderBottom: `1px solid ${theme.palette.divider}`,
36
- '&:not(.Mui-expanded)': { borderBottom: `1px solid ${theme.palette.divider}` },
35
+ borderBottom: `1px solid ${theme.vars.palette.divider}`,
36
+ '&:not(.Mui-expanded)': { borderBottom: `1px solid ${theme.vars.palette.divider}` },
37
37
  }),
38
38
  sx,
39
39
  )}
@@ -1,3 +1,4 @@
1
+ import { sxx } from '@graphcommerce/next-ui'
1
2
  import type { BoxProps } from '@mui/material'
2
3
  import { Box } from '@mui/material'
3
4
  import React from 'react'
@@ -28,7 +29,7 @@ export const ActionCardLayout = React.forwardRef<HTMLDivElement, ActionCardLayou
28
29
  ref={ref}
29
30
  {...boxProps}
30
31
  className={`${classes.root} ${className}`}
31
- sx={[
32
+ sx={sxx(
32
33
  (theme) => ({
33
34
  '&.layoutStack': {
34
35
  display: 'grid',
@@ -51,8 +52,8 @@ export const ActionCardLayout = React.forwardRef<HTMLDivElement, ActionCardLayou
51
52
  gap: theme.spacings.xxs,
52
53
  },
53
54
  }),
54
- ...(Array.isArray(sx) ? sx : [sx]),
55
- ]}
55
+ sx,
56
+ )}
56
57
  />
57
58
  )
58
59
  },
@@ -1,3 +1,4 @@
1
+ import { sxx } from '@graphcommerce/next-ui'
1
2
  import { Trans } from '@lingui/react/macro'
2
3
  import type { SxProps, Theme } from '@mui/material'
3
4
  import { Alert } from '@mui/material'
@@ -160,7 +161,6 @@ export const ActionCardList = React.forwardRef<HTMLDivElement, ActionCardListPro
160
161
  })
161
162
  })}
162
163
  </ActionCardLayout>
163
-
164
164
  {childActionCards.length > showMoreAfter && (
165
165
  <Button
166
166
  sx={{ width: 'fit-content' }}
@@ -170,15 +170,22 @@ export const ActionCardList = React.forwardRef<HTMLDivElement, ActionCardListPro
170
170
  >
171
171
  {!show ? <Trans>More options</Trans> : <Trans>Less options</Trans>}{' '}
172
172
  <IconSvg
173
- sx={{
174
- transform: show ? 'rotate(180deg)' : 'rotate(0deg)',
175
- transition: 'transform 0.3s ease-in-out',
176
- }}
173
+ sx={sxx(
174
+ {
175
+ transition: 'transform 0.3s ease-in-out',
176
+ },
177
+ show
178
+ ? {
179
+ transform: 'rotate(180deg)',
180
+ }
181
+ : {
182
+ transform: 'rotate(0deg)',
183
+ },
184
+ )}
177
185
  src={iconChevronDown}
178
186
  />
179
187
  </Button>
180
188
  )}
181
-
182
189
  {error && errorMessage && (
183
190
  <Alert
184
191
  severity='error'
@@ -1,3 +1,4 @@
1
+ import { sxx } from '@graphcommerce/next-ui'
1
2
  import type { SxProps, Theme } from '@mui/material'
2
3
  import { Avatar, Box, Chip } from '@mui/material'
3
4
  import { DateFormat } from '../../Intl/DateTimeFormat'
@@ -14,16 +15,17 @@ export function BlogAuthor(props: BlogAuthorProps) {
14
15
 
15
16
  return (
16
17
  <Box
17
- maxWidth='md'
18
- sx={[
18
+ sx={sxx(
19
19
  {
20
+ maxWidth: 'md',
21
+ },
22
+ (theme) => ({
20
23
  display: 'flex',
21
24
  justifyContent: 'left',
22
25
  margin: '0 auto',
23
- marginBottom: (theme) => theme.spacings.md,
24
- },
25
- ...(Array.isArray(sx) ? sx : [sx]),
26
- ]}
26
+ marginBottom: theme.spacings.md,
27
+ }),
28
+ )}
27
29
  >
28
30
  <Chip
29
31
  sx={{
@@ -46,7 +48,7 @@ export function BlogAuthor(props: BlogAuthorProps) {
46
48
  <Box slot='Author' sx={{ lineHeight: 1.4 }}>
47
49
  {author}
48
50
  </Box>
49
- <Box sx={(theme) => ({ lineHeight: 1.4, color: theme.palette.text.disabled })}>
51
+ <Box sx={(theme) => ({ lineHeight: 1.4, color: theme.vars.palette.text.disabled })}>
50
52
  <DateFormat dateStyle='long' date={date} />
51
53
  </Box>
52
54
  </section>
@@ -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
 
@@ -11,14 +12,16 @@ export function BlogContent(props: BlogContentProps) {
11
12
 
12
13
  return (
13
14
  <Box
14
- maxWidth='md'
15
- sx={[
15
+ sx={sxx(
16
+ {
17
+ maxWidth: 'md',
18
+ },
16
19
  (theme) => ({
17
20
  margin: '0 auto',
18
21
  marginBottom: theme.spacings.sm,
19
22
  }),
20
- ...(Array.isArray(sx) ? sx : [sx]),
21
- ]}
23
+ sx,
24
+ )}
22
25
  >
23
26
  {children}
24
27
  </Box>
@@ -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,8 +20,10 @@ export function BlogHeader(props: BlogHeaderProps) {
19
20
  return (
20
21
  <Box
21
22
  className={classes.header}
22
- maxWidth='md'
23
- sx={[
23
+ sx={sxx(
24
+ {
25
+ maxWidth: 'md',
26
+ },
24
27
  (theme) => ({
25
28
  margin: '0 auto',
26
29
  marginBottom: theme.spacings.md,
@@ -34,8 +37,8 @@ export function BlogHeader(props: BlogHeaderProps) {
34
37
  ),
35
38
  },
36
39
  }),
37
- ...(Array.isArray(sx) ? sx : [sx]),
38
- ]}
40
+ sx,
41
+ )}
39
42
  >
40
43
  {asset}
41
44
  </Box>
@@ -1,3 +1,4 @@
1
+ import { sxx } from '@graphcommerce/next-ui'
1
2
  import type { ContainerProps } from '@mui/material'
2
3
  import { Row } from '../../Row/Row'
3
4
 
@@ -8,14 +9,14 @@ export function BlogItemGrid(props: BlogItemGridProps) {
8
9
 
9
10
  return (
10
11
  <Row
11
- sx={[
12
+ sx={sxx(
12
13
  (theme) => ({
13
14
  display: 'grid',
14
15
  gap: theme.spacings.md,
15
16
  gridTemplateColumns: { xs: 'repeat(2, 1fr)', md: 'repeat(3, 1fr)', lg: 'repeat(4, 1fr)' },
16
17
  }),
17
- ...(Array.isArray(sx) ? sx : [sx]),
18
- ]}
18
+ sx,
19
+ )}
19
20
  {...containerProps}
20
21
  />
21
22
  )
@@ -1,3 +1,4 @@
1
+ import { sxx } from '@graphcommerce/next-ui'
1
2
  import type { SxProps, Theme } from '@mui/material'
2
3
  import { Box, Link, Typography } from '@mui/material'
3
4
  import React from 'react'
@@ -23,17 +24,17 @@ export function BlogListItem(props: BlogListItemProps) {
23
24
  return (
24
25
  <Box
25
26
  className={classes.item}
26
- sx={[
27
+ sx={sxx(
27
28
  (theme) => ({
28
29
  display: 'grid',
29
30
  gridTemplateRows: 'auto auto auto',
30
31
  alignContent: 'start',
31
- color: theme.palette.text.primary,
32
+ color: theme.vars.palette.text.primary,
32
33
  gap: theme.spacings.xxs,
33
34
  marginBottom: theme.spacings.sm,
34
35
  }),
35
- ...(Array.isArray(sx) ? sx : [sx]),
36
- ]}
36
+ sx,
37
+ )}
37
38
  >
38
39
  <Link href={`/${url}`} color='inherit' underline='hover'>
39
40
  <Box
@@ -63,7 +64,7 @@ export function BlogListItem(props: BlogListItemProps) {
63
64
  sx={(theme) => ({
64
65
  display: 'inline-block',
65
66
  textDecoration: 'none',
66
- color: theme.palette.text.secondary,
67
+ color: theme.vars.palette.text.secondary,
67
68
  })}
68
69
  >
69
70
  <DateFormat dateStyle='long' date={date} />
@@ -1,3 +1,4 @@
1
+ import { sxx } from '@graphcommerce/next-ui'
1
2
  import type { SxProps, Theme } from '@mui/material'
2
3
  import { Chip } from '@mui/material'
3
4
  import { NextLink } from '../../Theme'
@@ -22,10 +23,7 @@ export function BlogTag(props: BlogTagsProps) {
22
23
  href={`/${url}`}
23
24
  component={NextLink}
24
25
  label={title}
25
- sx={[
26
- { marginRight: 3, borderRadius: 2, cursor: 'pointer' },
27
- ...(Array.isArray(sx) ? sx : [sx]),
28
- ]}
26
+ sx={sxx({ marginRight: 3, borderRadius: 2, cursor: 'pointer' }, sx)}
29
27
  />
30
28
  )
31
29
  }
@@ -1,3 +1,4 @@
1
+ import { sxx } from '@graphcommerce/next-ui'
1
2
  import { Box } from '@mui/material'
2
3
  import React from 'react'
3
4
  import { LayoutTitle } from '../../Layout'
@@ -8,12 +9,7 @@ export function BlogTitle(props: BlogTitleProps) {
8
9
  const { sx = [], children } = props
9
10
 
10
11
  return (
11
- <Box
12
- sx={[
13
- (theme) => ({ maxWidth: theme.breakpoints.values.md, margin: '0 auto' }),
14
- ...(Array.isArray(sx) ? sx : [sx]),
15
- ]}
16
- >
12
+ <Box sx={sxx((theme) => ({ maxWidth: theme.breakpoints.values.md, margin: '0 auto' }), sx)}>
17
13
  <LayoutTitle variant='h1'>{children}</LayoutTitle>
18
14
  </Box>
19
15
  )
@@ -1,3 +1,4 @@
1
+ import { sxx } from '@graphcommerce/next-ui'
1
2
  import { t } from '@lingui/core/macro'
2
3
  import { Trans } from '@lingui/react/macro'
3
4
  import type {
@@ -85,8 +86,7 @@ export function Breadcrumbs(props: BreadcrumbsProps) {
85
86
  aria-label={t`Breadcrumbs`}
86
87
  maxItems={maxItems}
87
88
  color='inherit'
88
- sx={[
89
- {},
89
+ sx={sxx(
90
90
  !maxItems && {
91
91
  '& .MuiBreadcrumbs-ol': {
92
92
  flexWrap: 'nowrap',
@@ -106,30 +106,32 @@ export function Breadcrumbs(props: BreadcrumbsProps) {
106
106
  '& .MuiBreadcrumbs-separator': {
107
107
  '&:nth-of-type(2)': {
108
108
  display: {
109
- xs: !showButtonMobile && 'none',
110
- md: !showButtonDesktop && 'none',
109
+ xs: showButtonMobile ? undefined : 'none',
110
+ md: showButtonDesktop ? undefined : 'none',
111
111
  },
112
112
  },
113
113
  },
114
-
115
- [theme.breakpoints.down('md')]: showButtonMobile && {
116
- '& .MuiBreadcrumbs-li, & .MuiBreadcrumbs-separator': {
117
- display: 'none',
118
- [`&:nth-last-of-type(-n+${effectiveBreadcrumbsAmountMobile * 2})`]: {
119
- display: 'flex',
114
+ },
115
+ !maxItems &&
116
+ showButtonMobile && {
117
+ [theme.breakpoints.down('md')]: {
118
+ '& .MuiBreadcrumbs-li, & .MuiBreadcrumbs-separator': {
119
+ display: 'none',
120
+ [`&:nth-last-of-type(-n+${effectiveBreadcrumbsAmountMobile * 2})`]: {
121
+ display: 'flex',
122
+ },
120
123
  },
121
124
  },
122
125
  },
123
-
124
- [theme.breakpoints.up('md')]: showButtonDesktop && {
125
- '& .MuiBreadcrumbs-li, & .MuiBreadcrumbs-separator': {
126
- display: 'none',
127
- [`&:nth-last-of-type(-n+${breadcrumbsAmountDesktop * 2})`]: {
128
- display: 'flex',
126
+ !maxItems &&
127
+ showButtonDesktop && {
128
+ [theme.breakpoints.up('md')]: {
129
+ '& .MuiBreadcrumbs-li, & .MuiBreadcrumbs-separator': {
130
+ display: 'none',
131
+ [`&:nth-last-of-type(-n+${breadcrumbsAmountDesktop * 2})`]: { display: 'flex' },
129
132
  },
130
133
  },
131
134
  },
132
- },
133
135
  // Hide the last item and its separator on mobile
134
136
  hideLastOnMobile && {
135
137
  [theme.breakpoints.down('md')]: {
@@ -141,8 +143,8 @@ export function Breadcrumbs(props: BreadcrumbsProps) {
141
143
  },
142
144
  },
143
145
  },
144
- ...(Array.isArray(sx) ? sx : [sx]),
145
- ]}
146
+ sx,
147
+ )}
146
148
  >
147
149
  {!maxItems && (
148
150
  <ClickAwayListener
@@ -180,15 +182,8 @@ export function Breadcrumbs(props: BreadcrumbsProps) {
180
182
  </Box>
181
183
  </ClickAwayListener>
182
184
  )}
183
-
184
185
  {disableHome ? null : (
185
- <Link
186
- href='/'
187
- color='inherit'
188
- underline='hover'
189
- {...linkProps}
190
- sx={[...(Array.isArray(itemSx) ? itemSx : [itemSx])]}
191
- >
186
+ <Link href='/' color='inherit' underline='hover' {...linkProps} sx={sxx(itemSx)}>
192
187
  <Trans>Home</Trans>
193
188
  </Link>
194
189
  )}
@@ -199,22 +194,13 @@ export function Breadcrumbs(props: BreadcrumbsProps) {
199
194
  underline='hover'
200
195
  {...breadcrumb}
201
196
  {...linkProps}
202
- sx={[
203
- ...(Array.isArray(breadcrumb.sx) ? breadcrumb.sx : [breadcrumb.sx]),
204
- ...(Array.isArray(itemSx) ? itemSx : [itemSx]),
205
- ]}
197
+ sx={sxx(breadcrumb.sx, itemSx)}
206
198
  >
207
199
  {breadcrumb.name}
208
200
  </Link>
209
201
  ))}
210
-
211
202
  {last && (
212
- <Typography
213
- component='span'
214
- noWrap
215
- color='inherit'
216
- sx={[{ fontWeight: '600' }, ...(Array.isArray(itemSx) ? itemSx : [itemSx])]}
217
- >
203
+ <Typography component='span' noWrap color='inherit' sx={sxx({ fontWeight: '600' }, itemSx)}>
218
204
  {last.name}
219
205
  </Typography>
220
206
  )}
@@ -1,5 +1,5 @@
1
1
  import { Trans } from '@lingui/react/macro'
2
- import { alpha, Box, Link, useTheme } from '@mui/material'
2
+ import { Box, Link, useTheme } from '@mui/material'
3
3
  import type { KeyboardEvent } from 'react'
4
4
  import { useEffect, useRef } from 'react'
5
5
  import type { BreadcrumbsType } from './types'
@@ -34,7 +34,7 @@ export function BreadcrumbsList(props: PopperBreadcrumbsListProps) {
34
34
  ref={listRef}
35
35
  onKeyDown={handleKeyDown}
36
36
  tabIndex={-1}
37
- sx={{
37
+ sx={(theme) => ({
38
38
  backgroundColor: 'background.paper',
39
39
  borderRadius: 3,
40
40
  boxShadow: 12,
@@ -56,7 +56,7 @@ export function BreadcrumbsList(props: PopperBreadcrumbsListProps) {
56
56
  },
57
57
  },
58
58
  },
59
- }}
59
+ })}
60
60
  >
61
61
  <Link
62
62
  href='/'
@@ -66,13 +66,13 @@ export function BreadcrumbsList(props: PopperBreadcrumbsListProps) {
66
66
  noWrap
67
67
  onClick={onClose}
68
68
  tabIndex={0}
69
- sx={{
69
+ sx={(theme) => ({
70
70
  flex: 1,
71
71
  padding: `calc(${theme.spacings.xxs} / 2) ${theme.spacings.xs}`,
72
72
  '&:hover': {
73
- backgroundColor: alpha(theme.palette.action.hover, 0.025),
73
+ backgroundColor: theme.alpha(theme.vars.palette.action.hover, 0.025),
74
74
  },
75
- }}
75
+ })}
76
76
  >
77
77
  <Trans>Home</Trans>
78
78
  </Link>
@@ -86,13 +86,13 @@ export function BreadcrumbsList(props: PopperBreadcrumbsListProps) {
86
86
  noWrap
87
87
  onClick={onClose}
88
88
  tabIndex={0}
89
- sx={{
89
+ sx={(theme) => ({
90
90
  flex: 1,
91
91
  padding: `calc(${theme.spacings.xxs} / 2) ${theme.spacings.xs}`,
92
92
  '&:hover': {
93
- backgroundColor: alpha(theme.palette.action.hover, 0.025),
93
+ backgroundColor: theme.alpha(theme.vars.palette.action.hover, 0.025),
94
94
  },
95
- }}
95
+ })}
96
96
  >
97
97
  {breadcrumb.name}
98
98
  </Link>
package/Button/Button.tsx CHANGED
@@ -1,10 +1,10 @@
1
1
  /* eslint-disable react/forbid-foreign-prop-types */
2
- import type { LoadingButtonProps, LoadingButtonTypeMap } from '@mui/lab'
3
- import { LoadingButton as Button } from '@mui/lab'
2
+ import type { ButtonTypeMap, ButtonProps as MuiButtonProps } from '@mui/material'
3
+ import { Button } from '@mui/material'
4
4
 
5
5
  export type ButtonProps<
6
- D extends React.ElementType = LoadingButtonTypeMap['defaultComponent'],
6
+ D extends React.ElementType = ButtonTypeMap['defaultComponent'],
7
7
  P = object,
8
- > = LoadingButtonProps<D, P>
8
+ > = MuiButtonProps<D, P>
9
9
 
10
10
  export { Button }
@@ -1,3 +1,4 @@
1
+ import { sxx } from '@graphcommerce/next-ui'
1
2
  import type { Breakpoint, LinkProps } from '@mui/material'
2
3
  import { Link, useForkRef } from '@mui/material'
3
4
  import React, { useRef } from 'react'
@@ -60,15 +61,15 @@ export const LinkOrButton = React.forwardRef<
60
61
  color={color}
61
62
  loading={loading}
62
63
  disabled={disabled}
63
- sx={[
64
+ sx={sxx(
64
65
  {
65
66
  display: {
66
67
  xs: 'none',
67
68
  [breakpoint]: 'inline-flex',
68
69
  },
69
70
  },
70
- ...(Array.isArray(buttonSx) ? buttonSx : [buttonSx]),
71
- ]}
71
+ buttonSx,
72
+ )}
72
73
  >
73
74
  {children}
74
75
  </Button>
@@ -81,18 +82,18 @@ export const LinkOrButton = React.forwardRef<
81
82
  {...link}
82
83
  color={loading || disabled ? 'action.disabled' : color}
83
84
  aria-disabled={loading || disabled}
84
- sx={[
85
+ sx={sxx(
85
86
  {
86
87
  display: { xs: 'inline-flex', [breakpoint]: 'none' },
87
88
  alignItems: 'center',
88
89
  },
89
90
  !!disabled &&
90
91
  ((theme) => ({
91
- opacity: theme.palette.action.disabledOpacity,
92
+ opacity: theme.vars.palette.action.disabledOpacity,
92
93
  pointerEvents: 'none',
93
94
  })),
94
- ...(Array.isArray(linkSx) ? linkSx : [linkSx]),
95
- ]}
95
+ linkSx,
96
+ )}
96
97
  >
97
98
  {startIcon}
98
99
  <span>{children}</span>
package/CHANGELOG.md CHANGED
@@ -1,5 +1,31 @@
1
1
  # Change Log
2
2
 
3
+ ## 10.0.0-canary.72
4
+
5
+ ## 10.0.0-canary.71
6
+
7
+ ## 10.0.0-canary.70
8
+
9
+ ### Major Changes
10
+
11
+ - [#2565](https://github.com/graphcommerce-org/graphcommerce/pull/2565) [`c96dfcd`](https://github.com/graphcommerce-org/graphcommerce/commit/c96dfcdca981baca387c270ad9e2b9515cdd00cc) - Updated to Apollo Client 4 ([@paales](https://github.com/paales))
12
+
13
+ ## 10.0.0-canary.69
14
+
15
+ ### Patch Changes
16
+
17
+ - [#2567](https://github.com/graphcommerce-org/graphcommerce/pull/2567) [`a0ba773`](https://github.com/graphcommerce-org/graphcommerce/commit/a0ba773171bb76c7a998deb5bbacd974e5a3764d) - Fix LayoutOverlayHeader2 text overflowing beyond overlay size constraints ([@paales](https://github.com/paales))
18
+
19
+ - [#2567](https://github.com/graphcommerce-org/graphcommerce/pull/2567) [`4908a45`](https://github.com/graphcommerce-org/graphcommerce/commit/4908a457cac15c429d83d6b9274a8be9c8277ef6) - Allow setting OverlayContainer props, such as event listeners ([@paales](https://github.com/paales))
20
+
21
+ ## 10.0.0-canary.68
22
+
23
+ ### Major Changes
24
+
25
+ - [#2557](https://github.com/graphcommerce-org/graphcommerce/pull/2557) [`ceaadd8`](https://github.com/graphcommerce-org/graphcommerce/commit/ceaadd87f0648982a068a3b07b1fa149c9127f49) - ## Material UI v5 → v7 Migration
26
+
27
+ This release upgrades Material UI from v5 to v7 with full CSS variables support. ([@paales](https://github.com/paales))
28
+
3
29
  ## 10.0.0-canary.67
4
30
 
5
31
  ## 10.0.0-canary.66