@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.
- package/AnimatedRow/{index.tsx → AnimatedRow.tsx} +0 -0
- package/Blog/BlogAuthor/{index.tsx → BlogAuthor.tsx} +2 -2
- package/Blog/BlogContent/{index.tsx → BlogContent.tsx} +0 -0
- package/Blog/BlogHeader/{index.tsx → BlogHeader.tsx} +0 -0
- package/Blog/BlogList/{index.tsx → BlogList.tsx} +1 -1
- package/Blog/BlogListItem/{index.tsx → BlogListItem.tsx} +0 -0
- package/Blog/BlogTags/BlogTag.tsx +2 -2
- package/Blog/BlogTags/{index.tsx → BlogTags.tsx} +0 -0
- package/Blog/BlogTitle/{index.tsx → BlogTitle.tsx} +0 -0
- package/Button/{index.tsx → index.ts} +0 -0
- package/CHANGELOG.md +727 -1435
- package/ChipMenu/{index.tsx → ChipMenu.tsx} +4 -2
- package/ContainerWithHeader/{index.tsx → ContainerWithHeader.tsx} +1 -1
- package/FlagAvatar/{index.tsx → FlagAvatar.tsx} +0 -0
- package/FramerScroller/SidebarGallery.tsx +1 -1
- package/FramerScroller/SidebarSlider.tsx +1 -1
- package/FullPageMessage/{index.tsx → FullPageMessage.tsx} +0 -0
- package/Highlight/{index.tsx → Highlight.tsx} +0 -0
- package/IconHeader/{index.tsx → IconHeader.tsx} +0 -0
- package/JsonLd/{index.tsx → JsonLd.tsx} +0 -0
- package/Layout/components/LayoutHeader.tsx +3 -3
- package/Layout/components/LayoutHeaderBack.tsx +1 -1
- package/Layout/components/LayoutHeaderClose.tsx +1 -1
- package/Layout/components/LayoutHeaderContent.tsx +1 -1
- package/Layout/components/LayoutProvider.tsx +2 -2
- package/Layout/context/layoutContext.tsx +1 -3
- package/Layout/hooks/useScrollY.tsx +1 -1
- package/LayoutDefault/components/LayoutDefault.tsx +14 -4
- package/LayoutOverlay/components/LayoutOverlayBase.tsx +1 -1
- package/LayoutParts/MenuFab.tsx +1 -0
- package/Page/types.ts +1 -0
- package/PageLoadIndicator/{index.tsx → PageLoadIndicator.tsx} +0 -0
- package/PageMeta/PageMeta.tsx +91 -0
- package/Pagination/{index.tsx → Pagination.tsx} +0 -0
- package/RenderType/{index.tsx → RenderType.tsx} +0 -0
- package/Row/ButtonLinkList/ButtonLinkList.tsx +2 -2
- package/Row/ColumnOne/{index.tsx → ColumnOne.tsx} +0 -0
- package/Row/ColumnOneBoxed/{index.tsx → ColumnOneBoxed.tsx} +1 -1
- package/Row/ColumnOneCentered/{index.tsx → ColumnOneCentered.tsx} +1 -1
- package/Row/ColumnThree/{index.tsx → ColumnThree.tsx} +1 -1
- package/Row/ColumnTwo/{index.tsx → ColumnTwo.tsx} +1 -1
- package/Row/ColumnTwoSpread/{index.tsx → ColumnTwoSpread.tsx} +1 -1
- package/Row/ColumnTwoWithTop/{index.tsx → ColumnTwoWithTop.tsx} +1 -1
- package/Row/ContentLinks/{index.tsx → ContentLinks.tsx} +0 -0
- package/Row/HeroBanner/{index.tsx → HeroBanner.tsx} +1 -1
- package/Row/IconBlocks/{IconBlock/index.tsx → IconBlock.tsx} +1 -1
- package/Row/IconBlocks/{index.tsx → IconBlocks.tsx} +1 -1
- package/Row/ImageText/{index.tsx → ImageText.tsx} +1 -1
- package/Row/ImageTextBoxed/{index.tsx → ImageTextBoxed.tsx} +1 -1
- package/Row/ParagraphWithSidebarSlide/{index.tsx → ParagraphWithSidebarSlide.tsx} +1 -1
- package/Row/Quote/{index.tsx → Quote.tsx} +1 -1
- package/Row/{index.tsx → Row.tsx} +0 -0
- package/Row/SpecialBanner/{index.tsx → SpecialBanner.tsx} +1 -1
- package/Row/index.ts +18 -0
- package/SectionContainer/{index.tsx → SectionContainer.tsx} +1 -1
- package/SectionHeader/{index.tsx → SectionHeader.tsx} +0 -0
- package/Separator/{index.tsx → Separator.tsx} +0 -0
- package/Snackbar/MessageSnackbarImpl.tsx +2 -1
- package/StarRatingField/{index.tsx → StarRatingField.tsx} +0 -0
- package/Styles/{index.tsx → index.ts} +0 -9
- package/Styles/withTheme.tsx +1 -0
- package/TextInputNumber/{index.tsx → TextInputNumber.tsx} +1 -5
- package/Theme/MuiButton.ts +3 -3
- package/Theme/MuiFab.ts +1 -1
- package/Theme/MuiSlider.ts +1 -0
- package/Theme/themeDefaults.ts +1 -1
- package/TimeAgo/{index.tsx → TimeAgo.tsx} +0 -0
- package/ToggleButton/{index.tsx → ToggleButton.tsx} +1 -0
- package/ToggleButtonGroup/{index.tsx → ToggleButtonGroup.tsx} +8 -6
- package/UspList/{index.tsx → UspList.tsx} +0 -0
- package/docs/components/ComponentChild.tsx +1 -0
- package/docs/components/ComponentChildVariant.tsx +1 -0
- package/docs/components/ComponentChildVariantExtendable.tsx +1 -0
- package/icons/{index.tsx → index.ts} +0 -0
- package/index.ts +28 -45
- package/package.json +9 -10
- 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={
|
|
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
|
|
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,
|
|
5
|
-
import LayoutHeaderClose,
|
|
6
|
-
import 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
|
|
25
|
+
export function LayoutHeaderBack(props: BackProps) {
|
|
26
26
|
const router = useRouter()
|
|
27
27
|
const path = router.asPath.split('?')[0]
|
|
28
28
|
const up = useUp()
|
|
@@ -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
|
|
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
|
|
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,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
|
|
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 {
|
|
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
|
|
package/LayoutParts/MenuFab.tsx
CHANGED
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
|
|
|
File without changes
|
|
@@ -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 {
|
|
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,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,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,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
|
|
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
|
|
|
File without changes
|
|
@@ -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'
|
package/Styles/withTheme.tsx
CHANGED
|
@@ -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), [])
|
package/Theme/MuiButton.ts
CHANGED
|
@@ -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:
|
|
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
package/Theme/MuiSlider.ts
CHANGED
package/Theme/themeDefaults.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BreakpointsOptions, experimental_sx, SxProps, Theme
|
|
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
|