@graphcommerce/next-ui 4.18.0 → 4.21.0
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.
|
@@ -4,7 +4,7 @@ import { ReactHTML } from 'react'
|
|
|
4
4
|
|
|
5
5
|
export type AnimatedRowProps = Omit<
|
|
6
6
|
ReactHTML['div'] & HTMLMotionProps<'div'>,
|
|
7
|
-
'
|
|
7
|
+
'initial' | 'animate' | 'exit' | 'transition'
|
|
8
8
|
> & { sx?: SxProps<Theme> }
|
|
9
9
|
|
|
10
10
|
const StyledDiv = styled(m.div)({})
|
|
@@ -13,8 +13,7 @@ export function AnimatedRow(props: AnimatedRowProps) {
|
|
|
13
13
|
return (
|
|
14
14
|
<StyledDiv
|
|
15
15
|
{...props}
|
|
16
|
-
|
|
17
|
-
initial={{ opacity: 0, height: 0 }}
|
|
16
|
+
initial={{ opacity: 0, height: 'auto' }}
|
|
18
17
|
animate={{ opacity: 1, height: 'auto' }}
|
|
19
18
|
exit={{ opacity: 0, height: 0 }}
|
|
20
19
|
transition={{ type: 'tween' }}
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,43 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 4.21.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#1597](https://github.com/graphcommerce-org/graphcommerce/pull/1597) [`1f7ee6f6c`](https://github.com/graphcommerce-org/graphcommerce/commit/1f7ee6f6cfb28544439ed36e10929ac530d1b2b7) Thanks [@ErwinOtten](https://github.com/ErwinOtten)! - Fix safari nav bug
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [[`707dbc73d`](https://github.com/graphcommerce-org/graphcommerce/commit/707dbc73d181204d88fdbbd2e09340e25b2b5f7b), [`5c5645e6e`](https://github.com/graphcommerce-org/graphcommerce/commit/5c5645e6eaf5314c063f05547707fcd4b34a8717)]:
|
|
12
|
+
- @graphcommerce/framer-utils@3.1.5
|
|
13
|
+
- @graphcommerce/framer-scroller@2.1.32
|
|
14
|
+
- @graphcommerce/framer-next-pages@3.2.5
|
|
15
|
+
- @graphcommerce/image@3.1.8
|
|
16
|
+
|
|
17
|
+
## 4.20.0
|
|
18
|
+
|
|
19
|
+
### Minor Changes
|
|
20
|
+
|
|
21
|
+
- [#1592](https://github.com/graphcommerce-org/graphcommerce/pull/1592) [`43822fd61`](https://github.com/graphcommerce-org/graphcommerce/commit/43822fd61c949215b8ddce9fb37d09f29b638426) Thanks [@ErwinOtten](https://github.com/ErwinOtten)! - Animation fixes
|
|
22
|
+
|
|
23
|
+
* [#1596](https://github.com/graphcommerce-org/graphcommerce/pull/1596) [`3a619b70d`](https://github.com/graphcommerce-org/graphcommerce/commit/3a619b70d082804b8de46a8e8232f9431479a8b7) Thanks [@paales](https://github.com/paales)! - Create products sitemap
|
|
24
|
+
|
|
25
|
+
### Patch Changes
|
|
26
|
+
|
|
27
|
+
- Updated dependencies []:
|
|
28
|
+
- @graphcommerce/framer-scroller@2.1.31
|
|
29
|
+
|
|
30
|
+
## 4.19.0
|
|
31
|
+
|
|
32
|
+
### Minor Changes
|
|
33
|
+
|
|
34
|
+
- [#1576](https://github.com/graphcommerce-org/graphcommerce/pull/1576) [`b6d3a3c13`](https://github.com/graphcommerce-org/graphcommerce/commit/b6d3a3c13ea63ef0f691f497507f07c0e094de5b) Thanks [@ErwinOtten](https://github.com/ErwinOtten)! - Create products sitemap
|
|
35
|
+
|
|
36
|
+
### Patch Changes
|
|
37
|
+
|
|
38
|
+
- Updated dependencies []:
|
|
39
|
+
- @graphcommerce/framer-scroller@2.1.30
|
|
40
|
+
|
|
3
41
|
## 4.18.0
|
|
4
42
|
|
|
5
43
|
### Minor Changes
|
package/Form/Form.tsx
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { darken, lighten, styled,
|
|
1
|
+
import { darken, lighten, styled, Theme } from '@mui/material'
|
|
2
2
|
import { responsiveVal } from '../Styles/responsiveVal'
|
|
3
|
+
import { sx } from '../Theme/themeDefaults'
|
|
3
4
|
|
|
4
5
|
type FormStyleProps = {
|
|
5
6
|
contained?: boolean
|
|
@@ -7,7 +8,7 @@ type FormStyleProps = {
|
|
|
7
8
|
}
|
|
8
9
|
|
|
9
10
|
const styles = ({ theme, contained = false, background }: { theme: Theme } & FormStyleProps) =>
|
|
10
|
-
|
|
11
|
+
sx([
|
|
11
12
|
{
|
|
12
13
|
display: 'grid',
|
|
13
14
|
alignItems: 'center',
|
|
@@ -117,6 +117,7 @@ export function NavigationOverlay(props: NavigationOverlayProps) {
|
|
|
117
117
|
onLayoutAnimationComplete: () => {
|
|
118
118
|
animating.current = false
|
|
119
119
|
},
|
|
120
|
+
layout: true,
|
|
120
121
|
}}
|
|
121
122
|
sx={{
|
|
122
123
|
zIndex: 'drawer',
|
|
@@ -195,7 +196,7 @@ export function NavigationOverlay(props: NavigationOverlayProps) {
|
|
|
195
196
|
? selected.length >= 1
|
|
196
197
|
? `calc(${itemWidthMd} + 1px)`
|
|
197
198
|
: itemWidthMd
|
|
198
|
-
: '
|
|
199
|
+
: 'stretch',
|
|
199
200
|
},
|
|
200
201
|
[theme.breakpoints.down('md')]: {
|
|
201
202
|
width:
|
|
@@ -151,10 +151,15 @@ export function OverlayBase(incommingProps: LayoutOverlayBaseProps) {
|
|
|
151
151
|
if (!scroller) return () => {}
|
|
152
152
|
|
|
153
153
|
const resize = () => {
|
|
154
|
-
if (positions.open.visible.get()
|
|
154
|
+
if (positions.open.visible.get() === 1) {
|
|
155
|
+
scroller.scrollLeft = positions.open.x.get()
|
|
156
|
+
scroller.scrollTop = positions.open.y.get()
|
|
157
|
+
}
|
|
155
158
|
|
|
156
|
-
|
|
157
|
-
|
|
159
|
+
if (positions.open.visible.get() === 0) {
|
|
160
|
+
scroller.scrollLeft = positions.closed.x.get()
|
|
161
|
+
scroller.scrollTop = positions.closed.y.get()
|
|
162
|
+
}
|
|
158
163
|
}
|
|
159
164
|
|
|
160
165
|
window.addEventListener('resize', resize)
|
|
@@ -370,7 +375,6 @@ export function OverlayBase(incommingProps: LayoutOverlayBaseProps) {
|
|
|
370
375
|
>
|
|
371
376
|
<MotionDiv
|
|
372
377
|
{...overlayPaneProps}
|
|
373
|
-
layout
|
|
374
378
|
className={classes.overlayPane}
|
|
375
379
|
sx={(theme) => ({
|
|
376
380
|
pointerEvents: 'all',
|
package/PageMeta/PageMeta.tsx
CHANGED
|
@@ -2,7 +2,7 @@ import { usePageContext } from '@graphcommerce/framer-next-pages'
|
|
|
2
2
|
import { addBasePath } from 'next/dist/client/add-base-path'
|
|
3
3
|
import { addLocale } from 'next/dist/client/add-locale'
|
|
4
4
|
import { getDomainLocale } from 'next/dist/client/get-domain-locale'
|
|
5
|
-
import { resolveHref } from 'next/dist/shared/lib/router/router'
|
|
5
|
+
import { NextRouter, resolveHref } from 'next/dist/shared/lib/router/router'
|
|
6
6
|
import Head from 'next/head'
|
|
7
7
|
import { useRouter } from 'next/router'
|
|
8
8
|
|
|
@@ -29,8 +29,11 @@ export type PageMetaProps = {
|
|
|
29
29
|
metaRobots?: MetaRobotsAll | MetaRobots[]
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
type PartialNextRouter = Pick<
|
|
33
|
+
NextRouter,
|
|
34
|
+
'pathname' | 'locale' | 'locales' | 'isLocaleDomain' | 'domainLocales' | 'defaultLocale'
|
|
35
|
+
>
|
|
36
|
+
export function canonicalize(router: PartialNextRouter, incomming?: Canonical) {
|
|
34
37
|
let canonical = incomming
|
|
35
38
|
|
|
36
39
|
if (!canonical) return canonical
|
|
@@ -51,17 +54,16 @@ export function useCanonical(incomming?: Canonical) {
|
|
|
51
54
|
}
|
|
52
55
|
}
|
|
53
56
|
|
|
54
|
-
let [href, as] = resolveHref(router, canonical, true)
|
|
57
|
+
let [href, as] = resolveHref(router as NextRouter, canonical, true)
|
|
55
58
|
|
|
56
59
|
const curLocale = router.locale
|
|
57
60
|
|
|
58
|
-
// Copied from here https://github.com/vercel/next.js/blob/
|
|
61
|
+
// Copied from here https://github.com/vercel/next.js/blob/213c42f446874d29d07fa2cca6e6b11fc9c3b711/packages/next/client/link.tsx#L512
|
|
59
62
|
const localeDomain =
|
|
60
|
-
router &&
|
|
61
63
|
router.isLocaleDomain &&
|
|
62
|
-
getDomainLocale(as, curLocale, router && router.locales, router
|
|
64
|
+
getDomainLocale(as, curLocale, router && router.locales, router.domainLocales)
|
|
63
65
|
|
|
64
|
-
href = localeDomain || addBasePath(addLocale(as, curLocale, router
|
|
66
|
+
href = localeDomain || addBasePath(addLocale(as, curLocale, router.defaultLocale))
|
|
65
67
|
|
|
66
68
|
let siteUrl = process.env.NEXT_PUBLIC_SITE_URL
|
|
67
69
|
if (siteUrl && siteUrl.endsWith('/')) {
|
|
@@ -83,6 +85,11 @@ export function useCanonical(incomming?: Canonical) {
|
|
|
83
85
|
return canonical
|
|
84
86
|
}
|
|
85
87
|
|
|
88
|
+
export function useCanonical(incomming?: Canonical) {
|
|
89
|
+
const router = useRouter()
|
|
90
|
+
return canonicalize(router, incomming)
|
|
91
|
+
}
|
|
92
|
+
|
|
86
93
|
export function PageMeta(props: PageMetaProps) {
|
|
87
94
|
const { active } = usePageContext()
|
|
88
95
|
const { title, canonical: canonicalBare, metaDescription, metaRobots = ['all'] } = props
|
package/Theme/MuiChip.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { ComponentsVariants, darken
|
|
1
|
+
import { ComponentsVariants, darken } from '@mui/material'
|
|
2
2
|
import { responsiveVal } from '../Styles'
|
|
3
|
+
import { sx } from './themeDefaults'
|
|
3
4
|
|
|
4
5
|
declare module '@mui/material/Chip/Chip' {
|
|
5
6
|
interface ChipPropsSizeOverrides {
|
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": "4.
|
|
5
|
+
"version": "4.21.0",
|
|
6
6
|
"author": "",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"sideEffects": false,
|
|
@@ -19,10 +19,10 @@
|
|
|
19
19
|
"@emotion/react": "^11.9.3",
|
|
20
20
|
"@emotion/server": "^11.4.0",
|
|
21
21
|
"@emotion/styled": "^11.9.3",
|
|
22
|
-
"@graphcommerce/framer-next-pages": "3.2.
|
|
23
|
-
"@graphcommerce/framer-scroller": "2.1.
|
|
24
|
-
"@graphcommerce/framer-utils": "3.1.
|
|
25
|
-
"@graphcommerce/image": "3.1.
|
|
22
|
+
"@graphcommerce/framer-next-pages": "3.2.5",
|
|
23
|
+
"@graphcommerce/framer-scroller": "2.1.32",
|
|
24
|
+
"@graphcommerce/framer-utils": "3.1.5",
|
|
25
|
+
"@graphcommerce/image": "3.1.8",
|
|
26
26
|
"cookie": "^0.5.0",
|
|
27
27
|
"react-is": "^18.2.0",
|
|
28
28
|
"schema-dts": "^1.1.0"
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"react-dom": "^18.0.0"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@graphcommerce/eslint-config-pwa": "^4.1.
|
|
41
|
+
"@graphcommerce/eslint-config-pwa": "^4.1.10",
|
|
42
42
|
"@graphcommerce/prettier-config-pwa": "^4.0.6",
|
|
43
43
|
"@graphcommerce/typescript-config-pwa": "^4.0.4",
|
|
44
44
|
"@playwright/test": "^1.21.1",
|