@graphcommerce/next-ui 3.3.1 → 3.5.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/AppShell/DesktopNavBar.tsx +14 -5
- package/AppShell/FixedFab.tsx +0 -1
- package/Blog/BlogAuthor/index.tsx +0 -1
- package/CHANGELOG.md +33 -0
- package/RenderType/index.tsx +4 -4
- package/Row/SpecialBanner/index.tsx +1 -1
- package/package.json +13 -13
|
@@ -81,10 +81,15 @@ const useStyles = makeStyles(
|
|
|
81
81
|
{ name: 'DesktopNavBar' },
|
|
82
82
|
)
|
|
83
83
|
|
|
84
|
-
export type MenuTabsProps = MenuProps &
|
|
84
|
+
export type MenuTabsProps = MenuProps &
|
|
85
|
+
UseStyles<typeof useStyles> & {
|
|
86
|
+
LinkProps?: MuiLinkProps
|
|
87
|
+
iconScrollerBtnLeft?: React.ReactNode
|
|
88
|
+
iconScrollerBtnRight?: React.ReactNode
|
|
89
|
+
}
|
|
85
90
|
|
|
86
91
|
export default function DesktopNavBar(props: MenuTabsProps) {
|
|
87
|
-
const { menu, LinkProps } = props
|
|
92
|
+
const { menu, LinkProps, iconScrollerBtnLeft, iconScrollerBtnRight } = props
|
|
88
93
|
const classes = useStyles(props)
|
|
89
94
|
const router = useRouter()
|
|
90
95
|
|
|
@@ -94,7 +99,11 @@ export default function DesktopNavBar(props: MenuTabsProps) {
|
|
|
94
99
|
<Scroller className={classes.scroller} hideScrollbar>
|
|
95
100
|
{menu.map(({ href, children, ...linkProps }) => (
|
|
96
101
|
<PageLink key={href.toString()} href={href} {...linkProps} passHref>
|
|
97
|
-
<Link
|
|
102
|
+
<Link
|
|
103
|
+
variant='h6'
|
|
104
|
+
{...LinkProps}
|
|
105
|
+
className={clsx(classes.link, LinkProps?.className)}
|
|
106
|
+
>
|
|
98
107
|
{children}
|
|
99
108
|
<div
|
|
100
109
|
className={clsx(
|
|
@@ -113,7 +122,7 @@ export default function DesktopNavBar(props: MenuTabsProps) {
|
|
|
113
122
|
size='small'
|
|
114
123
|
classes={{ root: clsx(classes.prevNextBtn, classes.prevBtn) }}
|
|
115
124
|
>
|
|
116
|
-
<SvgImageSimple src={iconChevronLeft} />
|
|
125
|
+
{iconScrollerBtnLeft ?? <SvgImageSimple src={iconChevronLeft} />}
|
|
117
126
|
</ScrollerButton>
|
|
118
127
|
</m.div>
|
|
119
128
|
|
|
@@ -123,7 +132,7 @@ export default function DesktopNavBar(props: MenuTabsProps) {
|
|
|
123
132
|
size='small'
|
|
124
133
|
classes={{ root: clsx(classes.prevNextBtn, classes.nextBtn) }}
|
|
125
134
|
>
|
|
126
|
-
<SvgImageSimple src={iconChevronRight} />
|
|
135
|
+
{iconScrollerBtnRight ?? <SvgImageSimple src={iconChevronRight} />}
|
|
127
136
|
</ScrollerButton>
|
|
128
137
|
</m.div>
|
|
129
138
|
</div>
|
package/AppShell/FixedFab.tsx
CHANGED
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,39 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [3.5.0](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/next-ui@3.4.0...@graphcommerce/next-ui@3.5.0) (2021-10-18)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **graphcms:** combined multiple models to bypass model creation limit ([fd6dc14](https://github.com/ho-nl/m2-pwa/commit/fd6dc140cb60c5733dab2e0a43b5df2059e0c739))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
# [3.4.0](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/next-ui@3.3.3...@graphcommerce/next-ui@3.4.0) (2021-10-15)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Features
|
|
21
|
+
|
|
22
|
+
* **DesktopNavBar:** allow custom scroller button icons ([401f457](https://github.com/ho-nl/m2-pwa/commit/401f4572ce67dbe52008dca8e1d4473e2fcbf5cf))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
## [3.3.3](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/next-ui@3.3.2...@graphcommerce/next-ui@3.3.3) (2021-10-13)
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
### Bug Fixes
|
|
32
|
+
|
|
33
|
+
* regression in header ([4738fb7](https://github.com/ho-nl/m2-pwa/commit/4738fb7e13fb3be187f58b474219497783525d72))
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
6
39
|
# [3.3.0](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/next-ui@3.2.3...@graphcommerce/next-ui@3.3.0) (2021-10-13)
|
|
7
40
|
|
|
8
41
|
|
package/RenderType/index.tsx
CHANGED
|
@@ -13,14 +13,14 @@ type TypeRenderMethod<P> = (props: P) => React.ReactElement | null
|
|
|
13
13
|
type TypeRenderMap<
|
|
14
14
|
T extends TypeObject,
|
|
15
15
|
TypeNames extends string,
|
|
16
|
-
TAdd extends Record<string, unknown
|
|
16
|
+
TAdd extends Record<string, unknown>,
|
|
17
17
|
> = {
|
|
18
18
|
[K in TypeNames]: TypeRenderMethod<FilterTypeByTypename<T, K> & TAdd>
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
export type TypeRenderer<
|
|
22
22
|
T extends TypeObject,
|
|
23
|
-
TAdd extends Record<string, unknown> = Record<string, unknown
|
|
23
|
+
TAdd extends Record<string, unknown> = Record<string, unknown>,
|
|
24
24
|
> = TypeRenderMap<T, T['__typename'], TAdd>
|
|
25
25
|
|
|
26
26
|
/**
|
|
@@ -29,12 +29,12 @@ export type TypeRenderer<
|
|
|
29
29
|
*/
|
|
30
30
|
export default function RenderType<
|
|
31
31
|
T extends TypeObject,
|
|
32
|
-
A extends Record<string, unknown> = Record<string, unknown
|
|
32
|
+
A extends Record<string, unknown> = Record<string, unknown>,
|
|
33
33
|
>(props: { renderer: TypeRenderer<T, A> } & FilterTypeByTypename<T, T['__typename']> & A) {
|
|
34
34
|
const { renderer, __typename, ...typeItemProps } = props
|
|
35
35
|
const TypeItem: TypeRenderMethod<typeof typeItemProps> = renderer[__typename]
|
|
36
36
|
? renderer[__typename]
|
|
37
|
-
: () => <>{__typename}</>
|
|
37
|
+
: () => <>{process.env.NODE_ENV !== 'production' ? __typename : ''}</>
|
|
38
38
|
|
|
39
39
|
return <TypeItem {...typeItemProps} __typename={__typename} />
|
|
40
40
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphcommerce/next-ui",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.5.0",
|
|
4
4
|
"author": "",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"scripts": {
|
|
@@ -10,19 +10,19 @@
|
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@apollo/client": "^3.4.16",
|
|
13
|
-
"@graphcommerce/framer-next-pages": "^2.106.
|
|
14
|
-
"@graphcommerce/framer-scroller": "^0.2.
|
|
15
|
-
"@graphcommerce/framer-sheet": "^2.105.
|
|
16
|
-
"@graphcommerce/framer-utils": "^2.103.
|
|
17
|
-
"@graphcommerce/graphql": "^2.103.
|
|
18
|
-
"@graphcommerce/image": "^2.104.
|
|
13
|
+
"@graphcommerce/framer-next-pages": "^2.106.9",
|
|
14
|
+
"@graphcommerce/framer-scroller": "^0.2.11",
|
|
15
|
+
"@graphcommerce/framer-sheet": "^2.105.9",
|
|
16
|
+
"@graphcommerce/framer-utils": "^2.103.8",
|
|
17
|
+
"@graphcommerce/graphql": "^2.103.7",
|
|
18
|
+
"@graphcommerce/image": "^2.104.10",
|
|
19
19
|
"@graphql-typed-document-node/core": "^3.1.0",
|
|
20
20
|
"@material-ui/core": "^4.12.3",
|
|
21
21
|
"@material-ui/lab": "^4.0.0-alpha.60",
|
|
22
22
|
"@material-ui/styles": "^4.11.4",
|
|
23
23
|
"clsx": "^1.1.1",
|
|
24
24
|
"framer-motion": "^4.1.17",
|
|
25
|
-
"graphql": "^15.6.
|
|
25
|
+
"graphql": "^15.6.1",
|
|
26
26
|
"next": "^11.1.2",
|
|
27
27
|
"node-fetch": "^3.0.0",
|
|
28
28
|
"react": "^17.0.2",
|
|
@@ -31,18 +31,18 @@
|
|
|
31
31
|
"react-is": "^17.0.2",
|
|
32
32
|
"react-schemaorg": "^2.0.0",
|
|
33
33
|
"schema-dts": "^1.0.0",
|
|
34
|
-
"type-fest": "^2.
|
|
34
|
+
"type-fest": "^2.5.0"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@graphcommerce/browserslist-config-pwa": "^3.0.2",
|
|
38
|
-
"@graphcommerce/eslint-config-pwa": "^3.0.
|
|
38
|
+
"@graphcommerce/eslint-config-pwa": "^3.0.7",
|
|
39
39
|
"@graphcommerce/prettier-config-pwa": "^3.0.3",
|
|
40
40
|
"@graphcommerce/typescript-config-pwa": "^3.1.1",
|
|
41
|
-
"@playwright/test": "^1.15.
|
|
41
|
+
"@playwright/test": "^1.15.2",
|
|
42
42
|
"@types/react-dom": "^17.0.9",
|
|
43
43
|
"@types/react-is": "^17.0.2",
|
|
44
44
|
"graphql-tag": "2.12.5",
|
|
45
|
-
"typescript": "^4.4.
|
|
45
|
+
"typescript": "^4.4.4"
|
|
46
46
|
},
|
|
47
47
|
"sideEffects": false,
|
|
48
48
|
"prettier": "@graphcommerce/prettier-config-pwa",
|
|
@@ -55,5 +55,5 @@
|
|
|
55
55
|
"project": "./tsconfig.json"
|
|
56
56
|
}
|
|
57
57
|
},
|
|
58
|
-
"gitHead": "
|
|
58
|
+
"gitHead": "08f4dbe739a38ece2c47aa1e94c10f8397da27fa"
|
|
59
59
|
}
|