@graphcommerce/next-ui 4.16.0 → 4.19.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.
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,38 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 4.19.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#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
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies []:
|
|
12
|
+
- @graphcommerce/framer-scroller@2.1.30
|
|
13
|
+
|
|
14
|
+
## 4.18.0
|
|
15
|
+
|
|
16
|
+
### Minor Changes
|
|
17
|
+
|
|
18
|
+
- [#1587](https://github.com/graphcommerce-org/graphcommerce/pull/1587) [`6ce2cbaf2`](https://github.com/graphcommerce-org/graphcommerce/commit/6ce2cbaf2cf27e21b753f7cb71e7e74826294de6) Thanks [@paales](https://github.com/paales)! - Navigation fixes
|
|
19
|
+
|
|
20
|
+
### Patch Changes
|
|
21
|
+
|
|
22
|
+
- Updated dependencies []:
|
|
23
|
+
- @graphcommerce/framer-scroller@2.1.29
|
|
24
|
+
|
|
25
|
+
## 4.17.0
|
|
26
|
+
|
|
27
|
+
### Minor Changes
|
|
28
|
+
|
|
29
|
+
- [#1583](https://github.com/graphcommerce-org/graphcommerce/pull/1583) [`b6ce5548c`](https://github.com/graphcommerce-org/graphcommerce/commit/b6ce5548c66a8ca62d3aee29467045f7f07f30c8) Thanks [@ErwinOtten](https://github.com/ErwinOtten)! - Navigation fixes
|
|
30
|
+
|
|
31
|
+
### Patch Changes
|
|
32
|
+
|
|
33
|
+
- Updated dependencies []:
|
|
34
|
+
- @graphcommerce/framer-scroller@2.1.28
|
|
35
|
+
|
|
3
36
|
## 4.16.0
|
|
4
37
|
|
|
5
38
|
### 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',
|
|
@@ -102,7 +102,7 @@ export function NavigationItem(props: NavigationItemProps) {
|
|
|
102
102
|
select(itemPath)
|
|
103
103
|
}
|
|
104
104
|
}}
|
|
105
|
-
|
|
105
|
+
onMouseMove={
|
|
106
106
|
itemPath.length > 1 && mouseEvent === 'hover'
|
|
107
107
|
? (e) => {
|
|
108
108
|
if (isDesktop && animating.current === false && !isSelected) {
|
|
@@ -3,7 +3,7 @@ import { i18n } from '@lingui/core'
|
|
|
3
3
|
import { Trans } from '@lingui/react'
|
|
4
4
|
import { Box, Fab, SxProps, Theme, useEventCallback, useMediaQuery } from '@mui/material'
|
|
5
5
|
import { m } from 'framer-motion'
|
|
6
|
-
import { useState } from 'react'
|
|
6
|
+
import { useEffect, useState } from 'react'
|
|
7
7
|
import { IconSvg, useIconSvgSize } from '../../IconSvg'
|
|
8
8
|
import { LayoutHeaderContent } from '../../Layout/components/LayoutHeaderContent'
|
|
9
9
|
import { LayoutTitle } from '../../Layout/components/LayoutTitle'
|
|
@@ -93,6 +93,10 @@ export function NavigationOverlay(props: NavigationOverlayProps) {
|
|
|
93
93
|
else select([])
|
|
94
94
|
})
|
|
95
95
|
|
|
96
|
+
useEffect(() => {
|
|
97
|
+
animating.current = false
|
|
98
|
+
}, [active, animating])
|
|
99
|
+
|
|
96
100
|
const showBack = selected.length > 0
|
|
97
101
|
|
|
98
102
|
return (
|
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.19.0",
|
|
6
6
|
"author": "",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"sideEffects": false,
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"@emotion/server": "^11.4.0",
|
|
21
21
|
"@emotion/styled": "^11.9.3",
|
|
22
22
|
"@graphcommerce/framer-next-pages": "3.2.4",
|
|
23
|
-
"@graphcommerce/framer-scroller": "2.1.
|
|
23
|
+
"@graphcommerce/framer-scroller": "2.1.30",
|
|
24
24
|
"@graphcommerce/framer-utils": "3.1.4",
|
|
25
25
|
"@graphcommerce/image": "3.1.7",
|
|
26
26
|
"cookie": "^0.5.0",
|