@graphcommerce/next-ui 3.12.0 → 3.12.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/AppShell/AppShellHeader/index.tsx +7 -3
- package/AppShell/MenuFab.tsx +7 -3
- package/Button/index.tsx +15 -9
- package/CHANGELOG.md +34 -0
- package/Row/IconBlocks/IconBlock/index.tsx +1 -1
- package/Row/SpecialBanner/index.tsx +1 -1
- package/Snackbar/MessageSnackbarImpl.tsx +2 -5
- package/package.json +4 -4
|
@@ -113,10 +113,13 @@ const useStyles = makeStyles(
|
|
|
113
113
|
sheetHeaderActionRight: {
|
|
114
114
|
justifySelf: 'flex-end',
|
|
115
115
|
'& > .Mui-disabled': {
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
116
|
+
// color: `${theme.palette.primary.contrastText} !important`,
|
|
117
|
+
[theme.breakpoints.up('sm')]: {
|
|
118
|
+
opacity: 0.25,
|
|
119
119
|
color: `${theme.palette.secondary.contrastText} !important`,
|
|
120
|
+
'& svg': {
|
|
121
|
+
stroke: `${theme.palette.secondary.contrastText} !important`,
|
|
122
|
+
},
|
|
120
123
|
},
|
|
121
124
|
},
|
|
122
125
|
},
|
|
@@ -339,6 +342,7 @@ export default function AppShellHeader(props: AppShellHeaderProps) {
|
|
|
339
342
|
<Button
|
|
340
343
|
onClick={historyOnClick}
|
|
341
344
|
variant='pill-link'
|
|
345
|
+
size='small'
|
|
342
346
|
className={classes.backButton}
|
|
343
347
|
startIcon={backIcon}
|
|
344
348
|
>
|
package/AppShell/MenuFab.tsx
CHANGED
|
@@ -67,10 +67,14 @@ const useStyles = makeStyles(
|
|
|
67
67
|
)
|
|
68
68
|
|
|
69
69
|
export type MenuFabProps = MenuProps &
|
|
70
|
-
UseStyles<typeof useStyles> & {
|
|
70
|
+
UseStyles<typeof useStyles> & {
|
|
71
|
+
children?: React.ReactNode
|
|
72
|
+
search?: React.ReactNode
|
|
73
|
+
menuIcon?: React.ReactNode
|
|
74
|
+
}
|
|
71
75
|
|
|
72
76
|
export default function MenuFab(props: MenuFabProps) {
|
|
73
|
-
const { menu, children, search } = props
|
|
77
|
+
const { menu, children, search, menuIcon } = props
|
|
74
78
|
const classes = useStyles(props)
|
|
75
79
|
const router = useRouter()
|
|
76
80
|
const [openEl, setOpenEl] = React.useState<null | HTMLElement>(null)
|
|
@@ -88,7 +92,7 @@ export default function MenuFab(props: MenuFabProps) {
|
|
|
88
92
|
onClick={(event) => setOpenEl(event.currentTarget)}
|
|
89
93
|
className={classes.menuFab}
|
|
90
94
|
>
|
|
91
|
-
<SvgImageSimple src={iconMenu} inverted />
|
|
95
|
+
{menuIcon ?? <SvgImageSimple src={iconMenu} inverted />}
|
|
92
96
|
</Fab>
|
|
93
97
|
|
|
94
98
|
<Menu
|
package/Button/index.tsx
CHANGED
|
@@ -3,9 +3,11 @@ import {
|
|
|
3
3
|
ButtonClassKey as MuiButtonClassKey,
|
|
4
4
|
Theme,
|
|
5
5
|
makeStyles,
|
|
6
|
+
lighten,
|
|
6
7
|
} from '@material-ui/core'
|
|
7
8
|
import clsx from 'clsx'
|
|
8
9
|
import React from 'react'
|
|
10
|
+
import { responsiveVal } from '..'
|
|
9
11
|
|
|
10
12
|
type BaseButtonProps = Omit<Parameters<typeof MuiButton>['0'], 'variant' | 'classes'> & {
|
|
11
13
|
variant?: 'text' | 'outlined' | 'contained' | 'pill' | 'pill-link'
|
|
@@ -56,18 +58,22 @@ const useStyles = makeStyles<
|
|
|
56
58
|
borderRadius: '99em',
|
|
57
59
|
},
|
|
58
60
|
pillLink: {
|
|
59
|
-
[theme.breakpoints.up('
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
padding:
|
|
61
|
+
[theme.breakpoints.up('sm')]: {
|
|
62
|
+
// manually match MuiButton and containedPrimary styles
|
|
63
|
+
textTransform: 'none',
|
|
64
|
+
...theme.typography.body2,
|
|
65
|
+
fontWeight: 400,
|
|
66
|
+
padding: `${responsiveVal(8, 10)} ${responsiveVal(12, 22)}`,
|
|
67
|
+
backgroundColor: theme.palette.secondary.main,
|
|
68
|
+
color: theme.palette.primary.contrastText,
|
|
69
|
+
borderRadius: '99em',
|
|
70
|
+
boxShadow: theme.shadows[1],
|
|
71
|
+
'& svg': {
|
|
72
|
+
stroke: theme.palette.primary.contrastText,
|
|
73
|
+
},
|
|
65
74
|
'&:hover': {
|
|
66
75
|
background: theme.palette.secondary.dark,
|
|
67
76
|
},
|
|
68
|
-
'& svg': {
|
|
69
|
-
stroke: theme.palette.secondary.contrastText,
|
|
70
|
-
},
|
|
71
77
|
},
|
|
72
78
|
},
|
|
73
79
|
pillPrimary: {
|
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,40 @@
|
|
|
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.12.3](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/next-ui@3.12.2...@graphcommerce/next-ui@3.12.3) (2021-11-02)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **MenuFab:** make icon customizable ([375bafd](https://github.com/ho-nl/m2-pwa/commit/375bafd901b3c53405e02d681ea0dca3af190e35))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## [3.12.2](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/next-ui@3.12.1...@graphcommerce/next-ui@3.12.2) (2021-11-02)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
* **message-snackbar:** children alignment ([02051df](https://github.com/ho-nl/m2-pwa/commit/02051df0f09945218117c6ba2c761e4dca3872a3))
|
|
23
|
+
* **message-snackbar:** children alignment ([9b9ac09](https://github.com/ho-nl/m2-pwa/commit/9b9ac094e10ec3e57155014366f39a22f07a7f52))
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
## [3.12.1](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/next-ui@3.12.0...@graphcommerce/next-ui@3.12.1) (2021-11-02)
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
### Bug Fixes
|
|
33
|
+
|
|
34
|
+
* RemoveCoupon Button and fix pill-link style to match buttons ([6838812](https://github.com/ho-nl/m2-pwa/commit/68388123773fb4f79a3e4b1beb7ecca601d7748e))
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
6
40
|
# [3.12.0](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/next-ui@3.11.5...@graphcommerce/next-ui@3.12.0) (2021-11-02)
|
|
7
41
|
|
|
8
42
|
|
|
@@ -86,7 +86,7 @@ export type SpecialBannerProps = UseStyles<typeof useStyles> &
|
|
|
86
86
|
|
|
87
87
|
export default function SpecialBanner(props: SpecialBannerProps) {
|
|
88
88
|
const { asset, topic, pageLinks, children, ...containerProps } = props
|
|
89
|
-
const classes = useStyles()
|
|
89
|
+
const classes = useStyles(props)
|
|
90
90
|
|
|
91
91
|
return (
|
|
92
92
|
<Row maxWidth={false} {...containerProps}>
|
|
@@ -58,14 +58,11 @@ const useStyles = makeStyles(
|
|
|
58
58
|
},
|
|
59
59
|
},
|
|
60
60
|
children: {
|
|
61
|
+
display: 'flex',
|
|
62
|
+
columnGap: 10,
|
|
61
63
|
gridArea: 'children',
|
|
62
64
|
...theme.typography.subtitle1,
|
|
63
65
|
fontWeight: 400,
|
|
64
|
-
display: 'grid',
|
|
65
|
-
alignItems: 'center',
|
|
66
|
-
justifyContent: 'start',
|
|
67
|
-
gridAutoFlow: 'column',
|
|
68
|
-
gap: 10,
|
|
69
66
|
},
|
|
70
67
|
actionButton: {
|
|
71
68
|
gridArea: 'action',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphcommerce/next-ui",
|
|
3
|
-
"version": "3.12.
|
|
3
|
+
"version": "3.12.4",
|
|
4
4
|
"author": "",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"scripts": {
|
|
@@ -11,10 +11,10 @@
|
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@apollo/client": "^3.4.16",
|
|
13
13
|
"@graphcommerce/framer-next-pages": "^2.107.3",
|
|
14
|
-
"@graphcommerce/framer-scroller": "^0.
|
|
14
|
+
"@graphcommerce/framer-scroller": "^1.0.1",
|
|
15
15
|
"@graphcommerce/framer-sheet": "^2.105.15",
|
|
16
16
|
"@graphcommerce/framer-utils": "^2.103.13",
|
|
17
|
-
"@graphcommerce/graphql": "^2.105.
|
|
17
|
+
"@graphcommerce/graphql": "^2.105.3",
|
|
18
18
|
"@graphcommerce/image": "^2.105.2",
|
|
19
19
|
"@graphql-typed-document-node/core": "^3.1.0",
|
|
20
20
|
"@material-ui/core": "^4.12.3",
|
|
@@ -53,5 +53,5 @@
|
|
|
53
53
|
"project": "./tsconfig.json"
|
|
54
54
|
}
|
|
55
55
|
},
|
|
56
|
-
"gitHead": "
|
|
56
|
+
"gitHead": "7aca802dd74632aa2f474eae2d93bd563490fd90"
|
|
57
57
|
}
|