@graphcommerce/next-ui 4.2.1 → 4.2.4

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 (77) hide show
  1. package/AnimatedRow/{index.tsx → AnimatedRow.tsx} +0 -0
  2. package/Blog/BlogAuthor/{index.tsx → BlogAuthor.tsx} +2 -2
  3. package/Blog/BlogContent/{index.tsx → BlogContent.tsx} +0 -0
  4. package/Blog/BlogHeader/{index.tsx → BlogHeader.tsx} +0 -0
  5. package/Blog/BlogList/{index.tsx → BlogList.tsx} +1 -1
  6. package/Blog/BlogListItem/{index.tsx → BlogListItem.tsx} +0 -0
  7. package/Blog/BlogTags/BlogTag.tsx +2 -2
  8. package/Blog/BlogTags/{index.tsx → BlogTags.tsx} +0 -0
  9. package/Blog/BlogTitle/{index.tsx → BlogTitle.tsx} +0 -0
  10. package/Button/{index.tsx → index.ts} +0 -0
  11. package/CHANGELOG.md +727 -1435
  12. package/ChipMenu/{index.tsx → ChipMenu.tsx} +4 -2
  13. package/ContainerWithHeader/{index.tsx → ContainerWithHeader.tsx} +1 -1
  14. package/FlagAvatar/{index.tsx → FlagAvatar.tsx} +0 -0
  15. package/FramerScroller/SidebarGallery.tsx +1 -1
  16. package/FramerScroller/SidebarSlider.tsx +1 -1
  17. package/FullPageMessage/{index.tsx → FullPageMessage.tsx} +0 -0
  18. package/Highlight/{index.tsx → Highlight.tsx} +0 -0
  19. package/IconHeader/{index.tsx → IconHeader.tsx} +0 -0
  20. package/JsonLd/{index.tsx → JsonLd.tsx} +0 -0
  21. package/Layout/components/LayoutHeader.tsx +3 -3
  22. package/Layout/components/LayoutHeaderBack.tsx +1 -1
  23. package/Layout/components/LayoutHeaderClose.tsx +1 -1
  24. package/Layout/components/LayoutHeaderContent.tsx +1 -1
  25. package/Layout/components/LayoutProvider.tsx +2 -2
  26. package/Layout/context/layoutContext.tsx +1 -3
  27. package/Layout/hooks/useScrollY.tsx +1 -1
  28. package/LayoutDefault/components/LayoutDefault.tsx +14 -4
  29. package/LayoutOverlay/components/LayoutOverlayBase.tsx +1 -1
  30. package/LayoutParts/MenuFab.tsx +1 -0
  31. package/Page/types.ts +1 -0
  32. package/PageLoadIndicator/{index.tsx → PageLoadIndicator.tsx} +0 -0
  33. package/PageMeta/PageMeta.tsx +91 -0
  34. package/Pagination/{index.tsx → Pagination.tsx} +0 -0
  35. package/RenderType/{index.tsx → RenderType.tsx} +0 -0
  36. package/Row/ButtonLinkList/ButtonLinkList.tsx +2 -2
  37. package/Row/ColumnOne/{index.tsx → ColumnOne.tsx} +0 -0
  38. package/Row/ColumnOneBoxed/{index.tsx → ColumnOneBoxed.tsx} +1 -1
  39. package/Row/ColumnOneCentered/{index.tsx → ColumnOneCentered.tsx} +1 -1
  40. package/Row/ColumnThree/{index.tsx → ColumnThree.tsx} +1 -1
  41. package/Row/ColumnTwo/{index.tsx → ColumnTwo.tsx} +1 -1
  42. package/Row/ColumnTwoSpread/{index.tsx → ColumnTwoSpread.tsx} +1 -1
  43. package/Row/ColumnTwoWithTop/{index.tsx → ColumnTwoWithTop.tsx} +1 -1
  44. package/Row/ContentLinks/{index.tsx → ContentLinks.tsx} +0 -0
  45. package/Row/HeroBanner/{index.tsx → HeroBanner.tsx} +1 -1
  46. package/Row/IconBlocks/{IconBlock/index.tsx → IconBlock.tsx} +1 -1
  47. package/Row/IconBlocks/{index.tsx → IconBlocks.tsx} +1 -1
  48. package/Row/ImageText/{index.tsx → ImageText.tsx} +1 -1
  49. package/Row/ImageTextBoxed/{index.tsx → ImageTextBoxed.tsx} +1 -1
  50. package/Row/ParagraphWithSidebarSlide/{index.tsx → ParagraphWithSidebarSlide.tsx} +1 -1
  51. package/Row/Quote/{index.tsx → Quote.tsx} +1 -1
  52. package/Row/{index.tsx → Row.tsx} +0 -0
  53. package/Row/SpecialBanner/{index.tsx → SpecialBanner.tsx} +1 -1
  54. package/Row/index.ts +18 -0
  55. package/SectionContainer/{index.tsx → SectionContainer.tsx} +1 -1
  56. package/SectionHeader/{index.tsx → SectionHeader.tsx} +0 -0
  57. package/Separator/{index.tsx → Separator.tsx} +0 -0
  58. package/Snackbar/MessageSnackbarImpl.tsx +2 -1
  59. package/StarRatingField/{index.tsx → StarRatingField.tsx} +0 -0
  60. package/Styles/{index.tsx → index.ts} +0 -9
  61. package/Styles/withTheme.tsx +1 -0
  62. package/TextInputNumber/{index.tsx → TextInputNumber.tsx} +1 -5
  63. package/Theme/MuiButton.ts +3 -3
  64. package/Theme/MuiFab.ts +1 -1
  65. package/Theme/MuiSlider.ts +1 -0
  66. package/Theme/themeDefaults.ts +1 -1
  67. package/TimeAgo/{index.tsx → TimeAgo.tsx} +0 -0
  68. package/ToggleButton/{index.tsx → ToggleButton.tsx} +1 -0
  69. package/ToggleButtonGroup/{index.tsx → ToggleButtonGroup.tsx} +8 -6
  70. package/UspList/{index.tsx → UspList.tsx} +0 -0
  71. package/docs/components/ComponentChild.tsx +1 -0
  72. package/docs/components/ComponentChildVariant.tsx +1 -0
  73. package/docs/components/ComponentChildVariantExtendable.tsx +1 -0
  74. package/icons/{index.tsx → index.ts} +0 -0
  75. package/index.ts +28 -45
  76. package/package.json +9 -10
  77. package/PageMeta/index.tsx +0 -43
@@ -1,7 +1,7 @@
1
1
  import { Chip, ChipProps, Menu, MenuProps, menuClasses, SxProps, Theme } from '@mui/material'
2
2
  import React, { PropsWithChildren, useState } from 'react'
3
3
  import { IconSvg } from '../IconSvg'
4
- import { SectionHeader } from '../SectionHeader'
4
+ import { SectionHeader } from '../SectionHeader/SectionHeader'
5
5
  import { extendableComponent } from '../Styles'
6
6
  import { responsiveVal } from '../Styles/responsiveVal'
7
7
  import { iconChevronDown, iconChevronUp, iconCancelAlt } from '../icons'
@@ -43,7 +43,9 @@ export function ChipMenu(props: ChipMenuProps) {
43
43
  <Chip
44
44
  color='default'
45
45
  clickable
46
- onDelete={onDelete || ((event) => setOpenEl(event.currentTarget.parentElement))}
46
+ onDelete={
47
+ onDelete || ((event: React.MouseEvent) => setOpenEl(event.currentTarget.parentElement))
48
+ }
47
49
  onClick={(event) => {
48
50
  setOpenEl(event.currentTarget)
49
51
  }}
@@ -1,6 +1,6 @@
1
1
  import { Box, SxProps, Theme, Typography } from '@mui/material'
2
2
  import React from 'react'
3
- import { Row } from '../Row'
3
+ import { Row } from '../Row/Row'
4
4
  import { extendableComponent } from '../Styles'
5
5
 
6
6
  const { selectors, classes } = extendableComponent('ContainerWithHeader', [
File without changes
@@ -13,7 +13,7 @@ import { m, useDomEvent, useMotionValue } from 'framer-motion'
13
13
  import { useRouter } from 'next/router'
14
14
  import React, { useEffect, useRef } from 'react'
15
15
  import { IconSvg } from '../IconSvg'
16
- import { Row } from '../Row'
16
+ import { Row } from '../Row/Row'
17
17
  import { extendableComponent } from '../Styles'
18
18
  import { responsiveVal } from '../Styles/responsiveVal'
19
19
  import { iconChevronLeft, iconChevronRight, iconFullscreen, iconFullscreenExit } from '../icons'
@@ -8,7 +8,7 @@ import {
8
8
  import { Box, SxProps, Theme } from '@mui/material'
9
9
  import { ReactNode } from 'react'
10
10
  import { IconSvg } from '../IconSvg'
11
- import { Row } from '../Row'
11
+ import { Row } from '../Row/Row'
12
12
  import { extendableComponent } from '../Styles/extendableComponent'
13
13
  import { responsiveVal } from '../Styles/responsiveVal'
14
14
  import { iconChevronLeft, iconChevronRight } from '../icons'
File without changes
File without changes
File without changes
@@ -1,9 +1,9 @@
1
1
  import { Box, SxProps, Theme } from '@mui/material'
2
2
  import React from 'react'
3
3
  import { extendableComponent } from '../../Styles'
4
- import LayoutHeaderBack, { useShowBack } from './LayoutHeaderBack'
5
- import LayoutHeaderClose, { useShowClose } from './LayoutHeaderClose'
6
- import LayoutHeaderContent, { LayoutHeaderContentProps } from './LayoutHeaderContent'
4
+ import { LayoutHeaderBack, useShowBack } from './LayoutHeaderBack'
5
+ import { LayoutHeaderClose, useShowClose } from './LayoutHeaderClose'
6
+ import { LayoutHeaderContent, LayoutHeaderContentProps } from './LayoutHeaderContent'
7
7
  import { FloatingProps } from './LayoutHeadertypes'
8
8
 
9
9
  export type LayoutHeaderProps = FloatingProps &
@@ -22,7 +22,7 @@ export function useShowBack() {
22
22
  return false
23
23
  }
24
24
 
25
- export default function LayoutHeaderBack(props: BackProps) {
25
+ export function LayoutHeaderBack(props: BackProps) {
26
26
  const router = useRouter()
27
27
  const path = router.asPath.split('?')[0]
28
28
  const up = useUp()
@@ -10,7 +10,7 @@ export function useShowClose() {
10
10
  return !!overlayGroup
11
11
  }
12
12
 
13
- export default function LayoutHeaderClose() {
13
+ export function LayoutHeaderClose() {
14
14
  const { closeSteps } = usePageContext()
15
15
  const onClick = useGo(closeSteps * -1)
16
16
 
@@ -20,7 +20,7 @@ const name = 'LayoutHeaderContent' as const
20
20
  const parts = ['bg', 'content', 'left', 'center', 'right', 'divider'] as const
21
21
  const { withState } = extendableComponent<OwnerState, typeof name, typeof parts>(name, parts)
22
22
 
23
- export default function LayoutHeaderContent(props: LayoutHeaderContentProps) {
23
+ export function LayoutHeaderContent(props: LayoutHeaderContentProps) {
24
24
  const ref = useRef<HTMLDivElement>(null)
25
25
 
26
26
  const {
@@ -1,13 +1,13 @@
1
1
  import { MotionValue } from 'framer-motion'
2
2
  import { useMemo } from 'react'
3
- import layoutContext from '../context/layoutContext'
3
+ import { layoutContext } from '../context/layoutContext'
4
4
 
5
5
  export type LayoutProviderProps = {
6
6
  children: React.ReactNode
7
7
  scroll: MotionValue<number>
8
8
  }
9
9
 
10
- export default function LayoutProvider(props: LayoutProviderProps) {
10
+ export function LayoutProvider(props: LayoutProviderProps) {
11
11
  const { children, scroll } = props
12
12
  return (
13
13
  <layoutContext.Provider value={useMemo(() => ({ scroll }), [scroll])}>
@@ -1,7 +1,5 @@
1
1
  import React from 'react'
2
2
  import { LayoutContext } from '../types'
3
3
 
4
- const layoutContext = React.createContext(undefined as unknown as LayoutContext)
4
+ export const layoutContext = React.createContext(undefined as unknown as LayoutContext)
5
5
  layoutContext.displayName = 'layoutContext'
6
-
7
- export default layoutContext
@@ -1,5 +1,5 @@
1
1
  import { useContext } from 'react'
2
- import layoutContext from '../context/layoutContext'
2
+ import { layoutContext } from '../context/layoutContext'
3
3
 
4
4
  export function useScrollY() {
5
5
  return useContext(layoutContext).scroll
@@ -1,8 +1,8 @@
1
1
  import { useScrollOffset } from '@graphcommerce/framer-next-pages'
2
2
  import { Box, SxProps, Theme } from '@mui/material'
3
3
  import { useTransform, useViewportScroll } from 'framer-motion'
4
- import LayoutProvider from '../../Layout/components/LayoutProvider'
5
- import { extendableComponent, responsiveVal } from '../../Styles'
4
+ import { LayoutProvider } from '../../Layout/components/LayoutProvider'
5
+ import { extendableComponent } from '../../Styles'
6
6
  import { useFabSize } from '../../Theme'
7
7
 
8
8
  export type LayoutDefaultProps = {
@@ -27,7 +27,17 @@ const { withState } = extendableComponent<OwnerState, 'LayoutDefault', typeof pa
27
27
  )
28
28
 
29
29
  export function LayoutDefault(props: LayoutDefaultProps) {
30
- const { children, header, beforeHeader, footer, menuFab, cartFab, noSticky, sx = [] } = props
30
+ const {
31
+ children,
32
+ header,
33
+ beforeHeader,
34
+ footer,
35
+ menuFab,
36
+ cartFab,
37
+ noSticky,
38
+ className,
39
+ sx = [],
40
+ } = props
31
41
 
32
42
  const offset = useScrollOffset().y
33
43
  const scrollWithOffset = useTransform(useViewportScroll().scrollY, (y) => y + offset)
@@ -38,7 +48,7 @@ export function LayoutDefault(props: LayoutDefaultProps) {
38
48
 
39
49
  return (
40
50
  <Box
41
- className={classes.root}
51
+ className={`${classes.root} ${className ?? ''}`}
42
52
  sx={[
43
53
  (theme) => ({
44
54
  minHeight: '100vh',
@@ -4,7 +4,7 @@ import { useElementScroll, useIsomorphicLayoutEffect } from '@graphcommerce/fram
4
4
  import { Box, styled, SxProps, Theme } from '@mui/material'
5
5
  import { m, useDomEvent, useMotionValue, usePresence, useTransform } from 'framer-motion'
6
6
  import React, { useCallback, useEffect, useRef } from 'react'
7
- import LayoutProvider from '../../Layout/components/LayoutProvider'
7
+ import { LayoutProvider } from '../../Layout/components/LayoutProvider'
8
8
  import { extendableComponent } from '../../Styles'
9
9
  import { useOverlayPosition } from '../hooks/useOverlayPosition'
10
10
 
@@ -97,6 +97,7 @@ export function MenuFab(props: MenuFabProps) {
97
97
  open={!!openEl}
98
98
  onClose={() => setOpenEl(null)}
99
99
  disableScrollLock
100
+ disablePortal
100
101
  transitionDuration={{ appear: 175, enter: 175, exit: 175 }}
101
102
  PaperProps={{
102
103
  sx: (theme) => ({
package/Page/types.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import { ParsedUrlQuery } from 'querystring'
2
2
  import { UpPage } from '@graphcommerce/framer-next-pages/types'
3
3
  // todo: remove references to GraphQL
4
+ // eslint-disable-next-line import/no-extraneous-dependencies
4
5
  import { NormalizedCacheObject } from '@graphcommerce/graphql'
5
6
  import { GetStaticProps as GetStaticPropsNext } from 'next'
6
7
 
@@ -0,0 +1,91 @@
1
+ import { usePageContext } from '@graphcommerce/framer-next-pages'
2
+ import {
3
+ resolveHref,
4
+ getDomainLocale,
5
+ addBasePath,
6
+ addLocale,
7
+ } from 'next/dist/shared/lib/router/router'
8
+ import Head from 'next/head'
9
+ import { useRouter } from 'next/router'
10
+
11
+ // https://developers.google.com/search/docs/advanced/robots/robots_meta_tag#directives
12
+ export type MetaRobots =
13
+ | 'noindex'
14
+ | 'nofollow'
15
+ | 'noarchive'
16
+ | 'nosnippet'
17
+ | 'notranslate'
18
+ | 'noimageindex'
19
+ | `unavailable_after:${string}`
20
+ | `max-snippet:${number}`
21
+ | `max-image-preview:${'none' | 'standard' | 'large'}`
22
+ | `max-video-preview:${number}`
23
+ type MetaRobotsAll = ['all' | 'none']
24
+
25
+ type Canonical = `http://${string}` | `https://${string}` | `/${string}` | string
26
+
27
+ export type PageMetaProps = {
28
+ title: string
29
+ canonical?: Canonical
30
+ metaDescription?: string
31
+ metaRobots?: MetaRobotsAll | MetaRobots[]
32
+ }
33
+
34
+ export function useCanonical(incomming?: Canonical) {
35
+ const router = useRouter()
36
+ let canonical = incomming
37
+
38
+ if (!canonical) return canonical
39
+
40
+ if (canonical?.startsWith('/')) {
41
+ if (!process.env.NEXT_PUBLIC_SITE_URL) {
42
+ if (process.env.NODE_ENV !== 'production') {
43
+ throw Error('NEXT_PUBLIC_SITE_URL is not defined in .env')
44
+ }
45
+ }
46
+
47
+ let [href, as] = resolveHref(router, canonical, true)
48
+
49
+ const curLocale = router.locale
50
+
51
+ // Copied from here https://github.com/vercel/next.js/blob/canary/packages/next/client/link.tsx#L313-L327
52
+ const localeDomain =
53
+ router &&
54
+ router.isLocaleDomain &&
55
+ getDomainLocale(as, curLocale, router && router.locales, router && router.domainLocales)
56
+
57
+ href = localeDomain || addBasePath(addLocale(as, curLocale, router && router.defaultLocale))
58
+
59
+ canonical = `${process.env.NEXT_PUBLIC_SITE_URL}${href}`
60
+ }
61
+
62
+ if (canonical && !(canonical ?? 'http').startsWith('http')) {
63
+ if (process.env.NODE_ENV !== 'production') {
64
+ throw new Error(
65
+ `canonical must start with '/', 'http://' or 'https://', '${canonical}' given`,
66
+ )
67
+ }
68
+ canonical = undefined
69
+ }
70
+
71
+ return canonical
72
+ }
73
+
74
+ export function PageMeta(props: PageMetaProps) {
75
+ const { active } = usePageContext()
76
+ const { title, canonical: canonicalBare, metaDescription, metaRobots = ['all'] } = props
77
+
78
+ const canonical = useCanonical(canonicalBare)
79
+
80
+ if (!active) return null
81
+ return (
82
+ <Head>
83
+ <title>{title.trim()}</title>
84
+ {metaDescription && (
85
+ <meta name='description' content={metaDescription.trim()} key='meta-description' />
86
+ )}
87
+ <meta name='robots' content={metaRobots.join(',')} key='meta-robots' />
88
+ {canonical && <link rel='canonical' href={canonical} key='canonical' />}
89
+ </Head>
90
+ )
91
+ }
File without changes
File without changes
@@ -1,9 +1,9 @@
1
1
  import { Box, SxProps, Theme } from '@mui/material'
2
2
  import React from 'react'
3
- import { Row } from '..'
4
- import { SectionContainer } from '../../SectionContainer'
3
+ import { SectionContainer } from '../../SectionContainer/SectionContainer'
5
4
  import { extendableComponent } from '../../Styles'
6
5
  import { responsiveVal } from '../../Styles/responsiveVal'
6
+ import { Row } from '../Row'
7
7
 
8
8
  export type ButtonLinkListProps = {
9
9
  title: string
File without changes
@@ -1,6 +1,6 @@
1
1
  import { Box, ContainerProps } from '@mui/material'
2
- import { Row } from '..'
3
2
  import { extendableComponent } from '../../Styles'
3
+ import { Row } from '../Row'
4
4
 
5
5
  const compName = 'ColumnOneBoxed' as const
6
6
  const parts = ['root', 'boxed'] as const
@@ -1,5 +1,5 @@
1
1
  import { ContainerProps, styled } from '@mui/material'
2
- import { ColumnOne } from '../ColumnOne'
2
+ import { ColumnOne } from '../ColumnOne/ColumnOne'
3
3
 
4
4
  const Wrapper = styled('div')(({ theme }) => ({
5
5
  marginBottom: theme.spacings.lg,
@@ -1,7 +1,7 @@
1
1
  import { Box, ContainerProps } from '@mui/material'
2
2
  import React from 'react'
3
- import { Row } from '..'
4
3
  import { extendableComponent } from '../../Styles'
4
+ import { Row } from '../Row'
5
5
 
6
6
  const compName = 'ColumnThree' as const
7
7
  const parts = ['root', 'colOne', 'colTwo', 'colThree'] as const
@@ -1,7 +1,7 @@
1
1
  import { Box, ContainerProps } from '@mui/material'
2
2
  import React from 'react'
3
- import { Row } from '..'
4
3
  import { extendableComponent } from '../../Styles'
4
+ import { Row } from '../Row'
5
5
 
6
6
  export type ColumnTwoProps = Omit<ContainerProps, 'children'> & {
7
7
  colOneContent: React.ReactNode
@@ -1,4 +1,4 @@
1
- import { ColumnTwo, ColumnTwoProps } from '../ColumnTwo'
1
+ import { ColumnTwo, ColumnTwoProps } from '../ColumnTwo/ColumnTwo'
2
2
 
3
3
  type StyleProps = { nodeLength: boolean }
4
4
 
@@ -1,7 +1,7 @@
1
1
  import { Box, ContainerProps } from '@mui/material'
2
2
  import React from 'react'
3
- import { Row } from '..'
4
3
  import { extendableComponent } from '../../Styles'
4
+ import { Row } from '../Row'
5
5
 
6
6
  export type ColumnTwoWithTopProps = ContainerProps & {
7
7
  top: React.ReactNode
File without changes
@@ -1,10 +1,10 @@
1
1
  import { ContainerProps, useTheme, useMediaQuery, Box, styled } from '@mui/material'
2
2
  import { m, useTransform } from 'framer-motion'
3
3
  import React from 'react'
4
- import { Row } from '..'
5
4
  import { useScrollY } from '../../Layout/hooks/useScrollY'
6
5
  import { extendableComponent } from '../../Styles'
7
6
  import { responsiveVal } from '../../Styles/responsiveVal'
7
+ import { Row } from '../Row'
8
8
 
9
9
  export type HeroBannerProps = ContainerProps & {
10
10
  pageLinks: React.ReactNode
@@ -1,6 +1,6 @@
1
1
  import { Typography, Button, SxProps, Theme, Box } from '@mui/material'
2
2
  import React from 'react'
3
- import { extendableComponent } from '../../../Styles'
3
+ import { extendableComponent } from '../../Styles'
4
4
 
5
5
  export type IconBlockProps = {
6
6
  title: string
@@ -1,8 +1,8 @@
1
1
  import { Box, SxProps, Theme } from '@mui/material'
2
2
  import React from 'react'
3
- import { Row } from '..'
4
3
  import { extendableComponent } from '../../Styles'
5
4
  import { responsiveVal } from '../../Styles/responsiveVal'
5
+ import { Row } from '../Row'
6
6
 
7
7
  export type IconBlocksProps = {
8
8
  title: string
@@ -1,8 +1,8 @@
1
1
  import { Box, SxProps, Theme } from '@mui/material'
2
2
  import React from 'react'
3
- import { Row } from '..'
4
3
  import { extendableComponent } from '../../Styles'
5
4
  import { responsiveVal } from '../../Styles/responsiveVal'
5
+ import { Row } from '../Row'
6
6
 
7
7
  export type ImageTextProps = {
8
8
  item?: React.ReactNode
@@ -1,8 +1,8 @@
1
1
  import { Box, SxProps, Theme } from '@mui/material'
2
2
  import React from 'react'
3
- import { Row } from '..'
4
3
  import { extendableComponent } from '../../Styles'
5
4
  import { responsiveVal } from '../../Styles/responsiveVal'
5
+ import { Row } from '../Row'
6
6
 
7
7
  export type ImageTextBoxedProps = {
8
8
  children: React.ReactNode
@@ -1,7 +1,7 @@
1
1
  import { Box, ContainerProps } from '@mui/material'
2
- import { Row } from '..'
3
2
  import { extendableComponent } from '../../Styles'
4
3
  import { responsiveVal } from '../../Styles/responsiveVal'
4
+ import { Row } from '../Row'
5
5
 
6
6
  export type ParagraphWithSidebarSlideProps = ContainerProps & {
7
7
  slidingItems: React.ReactNode
@@ -1,6 +1,6 @@
1
1
  import { ContainerProps } from '@mui/material'
2
2
  import React from 'react'
3
- import { Row } from '..'
3
+ import { Row } from '../Row'
4
4
 
5
5
  export type QuoteProps = {
6
6
  children: React.ReactElement
File without changes
@@ -1,7 +1,7 @@
1
1
  import { Box, ContainerProps, Typography } from '@mui/material'
2
- import { Row } from '..'
3
2
  import { extendableComponent } from '../../Styles'
4
3
  import { responsiveVal } from '../../Styles/responsiveVal'
4
+ import { Row } from '../Row'
5
5
 
6
6
  export type SpecialBannerProps = ContainerProps & {
7
7
  asset?: React.ReactNode
package/Row/index.ts ADDED
@@ -0,0 +1,18 @@
1
+ export * from './Row'
2
+ export * from './ButtonLinkList'
3
+ export * from './ColumnOne/ColumnOne'
4
+ export * from './ColumnOneBoxed/ColumnOneBoxed'
5
+ export * from './ColumnOneCentered/ColumnOneCentered'
6
+ export * from './ColumnThree/ColumnThree'
7
+ export * from './ColumnTwo/ColumnTwo'
8
+ export * from './ColumnTwoSpread/ColumnTwoSpread'
9
+ export * from './ColumnTwoWithTop/ColumnTwoWithTop'
10
+ export * from './ContentLinks/ContentLinks'
11
+ export * from './HeroBanner/HeroBanner'
12
+ export * from './IconBlocks/IconBlocks'
13
+ export * from './IconBlocks/IconBlock'
14
+ export * from './ImageText/ImageText'
15
+ export * from './ImageTextBoxed/ImageTextBoxed'
16
+ export * from './ParagraphWithSidebarSlide/ParagraphWithSidebarSlide'
17
+ export * from './Quote/Quote'
18
+ export * from './SpecialBanner/SpecialBanner'
@@ -1,5 +1,5 @@
1
1
  import { Box } from '@mui/material'
2
- import { SectionHeader, SectionHeaderProps } from '../SectionHeader'
2
+ import { SectionHeader, SectionHeaderProps } from '../SectionHeader/SectionHeader'
3
3
  import { extendableComponent } from '../Styles'
4
4
 
5
5
  export type SectionContainerProps = SectionHeaderProps &
File without changes
File without changes
@@ -1,4 +1,3 @@
1
- import { Portal } from '@mui/base'
2
1
  import {
3
2
  Fab,
4
3
  Snackbar,
@@ -8,6 +7,7 @@ import {
8
7
  Box,
9
8
  SxProps,
10
9
  Theme,
10
+ Portal,
11
11
  } from '@mui/material'
12
12
  import React, { useEffect, useState } from 'react'
13
13
  import { IconSvg } from '../IconSvg'
@@ -39,6 +39,7 @@ const name = 'MessageSnackbarImpl' as const
39
39
  const parts = ['root', 'content', 'children', 'actionButton', 'close'] as const
40
40
  const { withState } = extendableComponent<OwnerState, typeof name, typeof parts>(name, parts)
41
41
 
42
+ // eslint-disable-next-line import/no-default-export
42
43
  export default function MessageSnackbarImpl(props: MessageSnackbarImplProps) {
43
44
  const [showSnackbar, setShowSnackbar] = useState<boolean>(false)
44
45
 
@@ -1,12 +1,3 @@
1
- /**
2
- * Consider moving to the `sx` prop with `selectors`
3
- *
4
- * @deprecated
5
- */
6
- export type UseStyles<T extends (...args: never[]) => unknown> = {
7
- classes?: Partial<ReturnType<T>['classes']>
8
- }
9
-
10
1
  export * from './breakpointVal'
11
2
  export * from './EmotionProvider'
12
3
  export * from './extendableComponent'
@@ -36,6 +36,7 @@ type WithSx = { sx?: SxProps<Theme> }
36
36
  * ```
37
37
  */
38
38
  export function withTheme<T>(
39
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
39
40
  Component: (value: T & WithSx) => React.ReactElement<any, any> | null,
40
41
  theme: Theme,
41
42
  ): React.FC<T & WithSx> {
@@ -1,7 +1,6 @@
1
1
  import {
2
2
  IconButton,
3
3
  IconButtonProps,
4
- OutlinedTextFieldProps,
5
4
  SxProps,
6
5
  TextField,
7
6
  TextFieldProps,
@@ -25,10 +24,6 @@ export type TextInputNumberProps = Omit<TextFieldProps, 'type'> & {
25
24
  sx?: SxProps<Theme>
26
25
  }
27
26
 
28
- function isOutlined(props: TextFieldProps): props is OutlinedTextFieldProps {
29
- return props.variant === 'outlined'
30
- }
31
-
32
27
  type OwnerState = { size?: 'small' | 'medium' }
33
28
  const name = 'TextInputNumber' as const
34
29
  const parts = ['quantity', 'quantityInput', 'button'] as const
@@ -50,6 +45,7 @@ export function TextInputNumber(props: TextInputNumberProps) {
50
45
  const forkRef = useForkRef<HTMLInputElement>(ref, inputRef as Ref<HTMLInputElement>)
51
46
 
52
47
  const [direction, setDirection] = useState<'up' | 'down' | 'runUp' | 'runDown' | null>(null)
48
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
53
49
  const [disabled, setDisabled] = useState<'min' | 'max' | null>(null)
54
50
 
55
51
  const stop = useCallback(() => setDirection(null), [])
@@ -1,7 +1,7 @@
1
1
  import { ComponentsVariants } from '@mui/material'
2
2
  import { responsiveVal } from '../Styles/responsiveVal'
3
3
 
4
- declare module '@mui/material/Button' {
4
+ declare module '@mui/material/Button/Button' {
5
5
  interface ButtonPropsVariantOverrides {
6
6
  pill: true
7
7
  }
@@ -12,10 +12,10 @@ type ButtonVariants = NonNullable<ComponentsVariants['MuiButton']>
12
12
  export const MuiButtonResponsive: ButtonVariants = [
13
13
  {
14
14
  props: {},
15
- style: ({ theme }) => ({
15
+ style: {
16
16
  textTransform: 'none',
17
17
  fontWeight: 500,
18
- }),
18
+ },
19
19
  },
20
20
  {
21
21
  props: { size: 'small' },
package/Theme/MuiFab.ts CHANGED
@@ -40,7 +40,7 @@ export const useFabSize = (size: FabSize) => {
40
40
  return fabSize(size, theme)
41
41
  }
42
42
 
43
- declare module '@mui/material/Fab' {
43
+ declare module '@mui/material/Fab/Fab' {
44
44
  interface FabPropsSizeOverrides {
45
45
  responsive: true
46
46
  }
@@ -14,6 +14,7 @@ import { Components, Theme } from '@mui/material'
14
14
  // }
15
15
  // }
16
16
 
17
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
17
18
  export const MuiSlider = (theme: Theme): Components['MuiSlider'] => ({
18
19
  // variants: [
19
20
  // {
@@ -1,4 +1,4 @@
1
- import { BreakpointsOptions, experimental_sx, SxProps, Theme, ThemeOptions } from '@mui/material'
1
+ import { BreakpointsOptions, experimental_sx, SxProps, Theme } from '@mui/material'
2
2
  import { Shadows } from '@mui/material/styles/shadows'
3
3
 
4
4
  import { SetRequired } from 'type-fest'
File without changes
@@ -1,3 +1,4 @@
1
+ /* eslint-disable @typescript-eslint/no-explicit-any */
1
2
  import { Button, ButtonProps } from '@mui/material'
2
3
  import React, { FormEvent } from 'react'
3
4
  import { extendableComponent } from '../Styles'