@graphcommerce/next-ui 5.2.0-canary.8 → 5.2.0-canary.9
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,11 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 5.2.0-canary.9
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`b0b8348b0`](https://github.com/graphcommerce-org/graphcommerce/commit/b0b8348b0d294f98140c2605691d47011add5b01) - Fix ellipsis for long titles on mobile ([@bramvanderholst](https://github.com/bramvanderholst))
|
|
8
|
+
|
|
3
9
|
## 5.2.0-canary.8
|
|
4
10
|
|
|
5
11
|
## 5.2.0-canary.7
|
|
@@ -111,7 +111,7 @@ export function LayoutHeaderContent(props: LayoutHeaderContentProps) {
|
|
|
111
111
|
gridTemplateAreas: `"left center right"`,
|
|
112
112
|
gridTemplateColumns: '1fr auto 1fr',
|
|
113
113
|
alignItems: 'center',
|
|
114
|
-
|
|
114
|
+
gap: theme.page.horizontal,
|
|
115
115
|
|
|
116
116
|
height: theme.appShell.headerHeightSm,
|
|
117
117
|
px: theme.page.horizontal,
|
|
@@ -192,7 +192,12 @@ export function LayoutHeaderContent(props: LayoutHeaderContentProps) {
|
|
|
192
192
|
},
|
|
193
193
|
})}
|
|
194
194
|
>
|
|
195
|
-
<MotionDiv
|
|
195
|
+
<MotionDiv
|
|
196
|
+
sx={{ minWidth: 0 }}
|
|
197
|
+
layout={layout}
|
|
198
|
+
>
|
|
199
|
+
{children}
|
|
200
|
+
</MotionDiv>
|
|
196
201
|
</Box>
|
|
197
202
|
<Box
|
|
198
203
|
className={classes.right}
|
|
@@ -15,6 +15,7 @@ import {
|
|
|
15
15
|
} from '../hooks/useNavigation'
|
|
16
16
|
import type { NavigationList } from './NavigationList'
|
|
17
17
|
import { NextLink } from '../../Theme'
|
|
18
|
+
import { useRouter } from 'next/router'
|
|
18
19
|
|
|
19
20
|
type OwnerState = {
|
|
20
21
|
first?: boolean
|
|
@@ -48,6 +49,8 @@ const NavigationLI = styled('li')({ display: 'contents' })
|
|
|
48
49
|
export const NavigationItem = React.memo<NavigationItemProps>((props) => {
|
|
49
50
|
const { id, parentPath, idx, first, last, NavigationList, mouseEvent } = props
|
|
50
51
|
const { selection, hideRootOnNavigate, closing, animating, serverRenderDepth } = useNavigation()
|
|
52
|
+
const router = useRouter()
|
|
53
|
+
const { locale } = router
|
|
51
54
|
|
|
52
55
|
const row = idx + 1
|
|
53
56
|
|
|
@@ -80,14 +83,14 @@ export const NavigationItem = React.memo<NavigationItemProps>((props) => {
|
|
|
80
83
|
|
|
81
84
|
if (isNavigationButton(props)) {
|
|
82
85
|
const { childItems, name, href } = props
|
|
83
|
-
|
|
86
|
+
const prefix = locale === router.defaultLocale ? '' : `/${locale}`
|
|
84
87
|
const skipChildren = itemPath.length + 1 > serverRenderDepth && !isSelected && !!href
|
|
85
88
|
|
|
86
89
|
return (
|
|
87
90
|
<NavigationLI className={classes.li}>
|
|
88
91
|
<ListItemButton
|
|
89
92
|
component={href ? 'a' : 'div'}
|
|
90
|
-
href={href
|
|
93
|
+
href={href ? prefix + href : undefined}
|
|
91
94
|
className={classes.item}
|
|
92
95
|
role='button'
|
|
93
96
|
sx={[
|
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": "5.2.0-canary.
|
|
5
|
+
"version": "5.2.0-canary.9",
|
|
6
6
|
"author": "",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"sideEffects": false,
|
|
@@ -18,18 +18,18 @@
|
|
|
18
18
|
"@emotion/react": "^11.10.5",
|
|
19
19
|
"@emotion/server": "^11.4.0",
|
|
20
20
|
"@emotion/styled": "^11.10.5",
|
|
21
|
-
"@graphcommerce/framer-next-pages": "5.2.0-canary.
|
|
22
|
-
"@graphcommerce/framer-scroller": "5.2.0-canary.
|
|
23
|
-
"@graphcommerce/framer-utils": "5.2.0-canary.
|
|
24
|
-
"@graphcommerce/image": "5.2.0-canary.
|
|
21
|
+
"@graphcommerce/framer-next-pages": "5.2.0-canary.9",
|
|
22
|
+
"@graphcommerce/framer-scroller": "5.2.0-canary.9",
|
|
23
|
+
"@graphcommerce/framer-utils": "5.2.0-canary.9",
|
|
24
|
+
"@graphcommerce/image": "5.2.0-canary.9",
|
|
25
25
|
"cookie": "^0.5.0",
|
|
26
26
|
"react-is": "^18.2.0",
|
|
27
27
|
"schema-dts": "^1.1.0"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@graphcommerce/eslint-config-pwa": "5.2.0-canary.
|
|
31
|
-
"@graphcommerce/prettier-config-pwa": "5.2.0-canary.
|
|
32
|
-
"@graphcommerce/typescript-config-pwa": "5.2.0-canary.
|
|
30
|
+
"@graphcommerce/eslint-config-pwa": "5.2.0-canary.9",
|
|
31
|
+
"@graphcommerce/prettier-config-pwa": "5.2.0-canary.9",
|
|
32
|
+
"@graphcommerce/typescript-config-pwa": "5.2.0-canary.9",
|
|
33
33
|
"@types/cookie": "^0.5.1",
|
|
34
34
|
"@types/react-is": "^17.0.3",
|
|
35
35
|
"typescript": "4.9.4"
|