@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
package/Theme/MuiFab.ts CHANGED
@@ -9,7 +9,7 @@ type FabSizes = {
9
9
  }
10
10
 
11
11
  /** Expose the component to be exendable in your theme.components */
12
- declare module '@mui/material/styles/components' {
12
+ declare module '@mui/material/styles' {
13
13
  interface Components {
14
14
  /**
15
15
  * @todo We would rather use MuiFab to override these fields, but I can't get it to work,
@@ -44,7 +44,7 @@ export const useFabSize = (size: FabSize) => {
44
44
  return fabSize(size, theme)
45
45
  }
46
46
 
47
- declare module '@mui/material/Fab/Fab' {
47
+ declare module '@mui/material/Fab' {
48
48
  interface FabPropsSizeOverrides {
49
49
  responsive: true
50
50
  responsiveSmall: true
@@ -96,10 +96,10 @@ export const MuiFabSizes: FabVariants = sizes.map((size) => ({
96
96
  // style: ({ theme }) => ({
97
97
  // boxShadow: 'none',
98
98
  // '&:hover, &:focus': {
99
- // background: theme.palette.text.primary,
99
+ // background: theme.vars.palette.text.primary,
100
100
  // },
101
- // background: theme.palette.text.primary,
102
- // color: theme.palette.background.paper,
101
+ // background: theme.vars.palette.text.primary,
102
+ // color: theme.vars.palette.background.paper,
103
103
  // }),
104
104
  // },
105
105
  // ]
@@ -1,6 +1,6 @@
1
1
  import type { ComponentsVariants, Theme } from '@mui/material'
2
2
 
3
- declare module '@mui/material/Slider/Slider' {
3
+ declare module '@mui/material/Slider' {
4
4
  interface SliderPropsSizeOverrides {
5
5
  large: true
6
6
  }
@@ -13,22 +13,22 @@ export const MuiSlider: SliderVariants = [
13
13
  props: {},
14
14
  style: ({ theme }) => ({
15
15
  '& .MuiSlider-rail': {
16
- color: theme.palette.text.disabled,
16
+ color: theme.vars.palette.text.disabled,
17
17
  },
18
18
  '& .MuiSlider-thumb': {
19
- background: theme.palette.background.default,
19
+ background: theme.vars.palette.background.default,
20
20
  boxShadow: theme.shadows[6],
21
21
  },
22
22
  '& .MuiSlider-valueLabel': {
23
23
  top: 0,
24
24
  backgroundColor: 'unset',
25
- color: theme.palette.text.primary,
25
+ color: theme.vars.palette.text.primary,
26
26
  '&:before': {
27
27
  display: 'none',
28
28
  },
29
29
  '& *': {
30
30
  background: 'transparent',
31
- color: theme.palette.text.primary,
31
+ color: theme.vars.palette.text.primary,
32
32
  },
33
33
  },
34
34
  }),
@@ -2,13 +2,11 @@ import type { Breakpoint } from '@mui/material'
2
2
 
3
3
  export {}
4
4
 
5
- declare module '@mui/material/styles/createPalette' {
5
+ declare module '@mui/material/styles' {
6
6
  interface TypeBackground {
7
7
  image: string
8
8
  }
9
- }
10
9
 
11
- declare module '@mui/material/styles/createTheme' {
12
10
  interface ThemeOptions {
13
11
  spacings: {
14
12
  xxs: string
@@ -1,6 +1,6 @@
1
1
  import type { Components, Theme, ThemeOptions } from '@mui/material'
2
2
  import { createTheme as createMuiTheme } from '@mui/material'
3
- import type { Shadows } from '@mui/material/styles/shadows'
3
+ import type { Shadows } from '@mui/material/styles'
4
4
  import { spreadVal } from '../Styles/spreadVal'
5
5
  import { breakpoints } from './breakpoints'
6
6
 
@@ -1,6 +1,7 @@
1
1
  /* eslint-disable @typescript-eslint/no-explicit-any */
2
+ import { sxx } from '@graphcommerce/next-ui'
2
3
  import type { ButtonProps } from '@mui/material'
3
- import { alpha, Button } from '@mui/material'
4
+ import { Button } from '@mui/material'
4
5
  import type { FormEvent } from 'react'
5
6
  import React from 'react'
6
7
  import { extendableComponent } from '../Styles'
@@ -60,23 +61,21 @@ export const ToggleButton = React.forwardRef<any, ToggleButtonProps>((props, ref
60
61
  size={size}
61
62
  {...other}
62
63
  classes={classes}
63
- sx={[
64
+ sx={sxx(
64
65
  (theme) => ({
65
66
  border: 1,
66
67
  borderColor: 'divider',
67
68
  bgcolor: 'background.paper',
68
-
69
69
  '&.disabled': {
70
70
  borderWidth: 2,
71
71
  },
72
-
73
72
  '&.selected': {
74
- border: `1px solid ${theme.palette[color]?.main ?? theme.palette.primary.main}`,
73
+ border: `1px solid ${theme.vars.palette[color]?.main ?? theme.vars.palette.primary.main}`,
75
74
  boxShadow: `inset 0 0 0 1px ${
76
- theme.palette[color]?.main ?? theme.palette.primary.main
77
- },0 0 0 4px ${alpha(
78
- theme.palette.primary.main,
79
- theme.palette.action.hoverOpacity,
75
+ theme.vars.palette[color]?.main ?? theme.vars.palette.primary.main
76
+ },0 0 0 4px ${theme.alpha(
77
+ theme.vars.palette.primary.main,
78
+ theme.vars.palette.action.hoverOpacity,
80
79
  )} !important`,
81
80
  },
82
81
  ':not(&.sizeSmall)': {
@@ -98,8 +97,8 @@ export const ToggleButton = React.forwardRef<any, ToggleButtonProps>((props, ref
98
97
  padding: '8px 12px',
99
98
  },
100
99
  }),
101
- ...(Array.isArray(sx) ? sx : [sx]),
102
- ]}
100
+ sx,
101
+ )}
103
102
  >
104
103
  {children}
105
104
  </Button>
@@ -1,4 +1,5 @@
1
1
  /* eslint-disable @typescript-eslint/ban-ts-comment */
2
+ import { sxx } from '@graphcommerce/next-ui'
2
3
  import type { ToggleButtonGroupProps as ToggleButtonGroupPropsBase } from '@mui/material'
3
4
  import { Box } from '@mui/material'
4
5
  import React from 'react'
@@ -68,7 +69,7 @@ export const ToggleButtonGroup = React.forwardRef<HTMLDivElement, ToggleButtonGr
68
69
  <Box
69
70
  role='group'
70
71
  className={`${classes.root} ${className ?? ''}`}
71
- sx={[
72
+ sx={sxx(
72
73
  (theme) => ({
73
74
  rowGap: theme.spacings.xxs,
74
75
  columnGap: theme.spacings.xs,
@@ -90,8 +91,8 @@ export const ToggleButtonGroup = React.forwardRef<HTMLDivElement, ToggleButtonGr
90
91
  gridTemplateColumns: 'repeat(2, 1fr)',
91
92
  },
92
93
  }),
93
- ...(Array.isArray(sx) ? sx : [sx]),
94
- ]}
94
+ sx,
95
+ )}
95
96
  ref={ref}
96
97
  {...other}
97
98
  >
@@ -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 { extendableComponent } from '../Styles'
@@ -20,7 +21,7 @@ export function UspList(props: UspListProps) {
20
21
  <Box
21
22
  component='ul'
22
23
  className={classes.root}
23
- sx={[
24
+ sx={sxx(
24
25
  (theme) => ({
25
26
  listStyleType: 'none',
26
27
  padding: 0,
@@ -32,8 +33,8 @@ export function UspList(props: UspListProps) {
32
33
  rowGap: '3px',
33
34
  },
34
35
  }),
35
- ...(Array.isArray(sx) ? sx : [sx]),
36
- ]}
36
+ sx,
37
+ )}
37
38
  >
38
39
  {children}
39
40
  </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 { extendableComponent } from '../Styles'
@@ -22,7 +23,7 @@ export function UspListItem(props: UspListItemProps) {
22
23
  <Box
23
24
  component='li'
24
25
  className={classes.root}
25
- sx={[
26
+ sx={sxx(
26
27
  (theme) => ({
27
28
  display: 'grid',
28
29
  gridAutoFlow: 'column',
@@ -37,8 +38,8 @@ export function UspListItem(props: UspListItemProps) {
37
38
  gap: theme.spacings.xxs,
38
39
  },
39
40
  }),
40
- ...(Array.isArray(sx) ? sx : [sx]),
41
- ]}
41
+ sx,
42
+ )}
42
43
  >
43
44
  <Box
44
45
  className={classes.icon}
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@graphcommerce/next-ui",
3
3
  "homepage": "https://www.graphcommerce.org/",
4
4
  "repository": "github:graphcommerce-org/graphcommerce",
5
- "version": "10.0.0-canary.67",
5
+ "version": "10.0.0-canary.72",
6
6
  "sideEffects": false,
7
7
  "prettier": "@graphcommerce/prettier-config-pwa",
8
8
  "eslintConfig": {
@@ -30,7 +30,7 @@
30
30
  "./RenderType/filterNonNullableKeys": "./RenderType/filterNonNullableKeys.ts"
31
31
  },
32
32
  "dependencies": {
33
- "cookie": "^1.0.2",
33
+ "cookie": "^1.1.1",
34
34
  "react-is": "^19.2.0"
35
35
  },
36
36
  "devDependencies": {
@@ -38,22 +38,22 @@
38
38
  "typescript": "5.9.3"
39
39
  },
40
40
  "peerDependencies": {
41
- "@emotion/cache": "^11",
42
- "@emotion/react": "^11",
43
- "@emotion/server": "^11",
44
- "@emotion/styled": "^11",
45
- "@graphcommerce/eslint-config-pwa": "^10.0.0-canary.67",
46
- "@graphcommerce/framer-next-pages": "^10.0.0-canary.67",
47
- "@graphcommerce/framer-scroller": "^10.0.0-canary.67",
48
- "@graphcommerce/framer-utils": "^10.0.0-canary.67",
49
- "@graphcommerce/image": "^10.0.0-canary.67",
50
- "@graphcommerce/prettier-config-pwa": "^10.0.0-canary.67",
51
- "@graphcommerce/typescript-config-pwa": "^10.0.0-canary.67",
41
+ "@emotion/cache": "^11.14.0",
42
+ "@emotion/react": "^11.14.0",
43
+ "@emotion/server": "^11.11.0",
44
+ "@emotion/styled": "^11.14.1",
45
+ "@graphcommerce/eslint-config-pwa": "^10.0.0-canary.72",
46
+ "@graphcommerce/framer-next-pages": "^10.0.0-canary.72",
47
+ "@graphcommerce/framer-scroller": "^10.0.0-canary.72",
48
+ "@graphcommerce/framer-utils": "^10.0.0-canary.72",
49
+ "@graphcommerce/image": "^10.0.0-canary.72",
50
+ "@graphcommerce/prettier-config-pwa": "^10.0.0-canary.72",
51
+ "@graphcommerce/typescript-config-pwa": "^10.0.0-canary.72",
52
52
  "@lingui/core": "^5",
53
53
  "@lingui/macro": "^5",
54
54
  "@lingui/react": "^5",
55
- "@mui/lab": "^5.0.0-alpha.68",
56
- "@mui/material": "^5.10.16",
55
+ "@mui/lab": "7.0.1-beta.20",
56
+ "@mui/material": "^7.0.0",
57
57
  "framer-motion": "^11.0.0",
58
58
  "next": "*",
59
59
  "next-sitemap": "4.2.3",
package/types.ts CHANGED
@@ -5,3 +5,4 @@
5
5
  import './Theme/createTheme'
6
6
  // eslint-disable-next-line react/no-typos
7
7
  import 'react'
8
+ import type {} from '@mui/material/themeCssVarsAugmentation'
package/utils/sxx.ts CHANGED
@@ -10,7 +10,7 @@ import type { SxProps, Theme } from '@mui/material'
10
10
  * ```
11
11
  */
12
12
  export const sxx = (
13
- ...sxPropsArray: (SxProps<Theme> | undefined | null | false)[]
13
+ ...sxPropsArray: (SxProps<Theme> | undefined | null | false | ``)[]
14
14
  ): SxProps<Theme> =>
15
15
  sxPropsArray
16
16
  .filter((v) => !!v)