@graphcommerce/next-ui 3.18.1 → 3.18.2
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 +1 -1
- package/AppShell/MenuFab.tsx +0 -1
- package/AppShell/useFixedFabAnimation.tsx +3 -4
- package/Button/index.tsx +1 -1
- package/CHANGELOG.md +11 -0
- package/Snackbar/MessageSnackbarImpl.tsx +1 -0
- package/ToggleButton/index.tsx +3 -5
- package/package.json +2 -2
package/AppShell/MenuFab.tsx
CHANGED
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import { alpha, useTheme } from '@material-ui/core'
|
|
2
|
-
import { useMotionTemplate, useTransform, useViewportScroll } from 'framer-motion'
|
|
2
|
+
import { useMotionTemplate, useMotionValue, useTransform, useViewportScroll } from 'framer-motion'
|
|
3
3
|
|
|
4
4
|
export default function useFixedFabAnimation() {
|
|
5
5
|
const theme = useTheme()
|
|
6
6
|
const { scrollY } = useViewportScroll()
|
|
7
|
-
const opacity = useTransform(scrollY, [50, 60], [0,
|
|
7
|
+
const opacity = useTransform(scrollY, [50, 60], [0, 1])
|
|
8
8
|
const opacity1 = useTransform(
|
|
9
9
|
scrollY,
|
|
10
10
|
[0, 10],
|
|
11
11
|
[alpha(theme.palette.background.paper, 0), alpha(theme.palette.background.paper, 1)],
|
|
12
12
|
)
|
|
13
|
-
const boxShadow = useMotionTemplate`0 2px 10px 0 rgba(0, 0, 0, ${opacity})`
|
|
14
13
|
const backgroundColor = useMotionTemplate`${opacity1}`
|
|
15
|
-
return {
|
|
14
|
+
return { backgroundColor, opacity }
|
|
16
15
|
}
|
package/Button/index.tsx
CHANGED
|
@@ -67,7 +67,7 @@ const useStyles = makeStyles<
|
|
|
67
67
|
backgroundColor: theme.palette.secondary.main,
|
|
68
68
|
color: theme.palette.primary.contrastText,
|
|
69
69
|
borderRadius: '99em',
|
|
70
|
-
boxShadow: theme.shadows[
|
|
70
|
+
boxShadow: theme.shadows[6],
|
|
71
71
|
'&:hover': {
|
|
72
72
|
background: theme.palette.secondary.dark,
|
|
73
73
|
},
|
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
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.18.2](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/next-ui@3.18.1...@graphcommerce/next-ui@3.18.2) (2021-11-27)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* shadow snackbar with elevation ([8d7d011](https://github.com/ho-nl/m2-pwa/commit/8d7d0119357325f5c838def4ae8dc4ae19a43a6f))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
## [3.18.1](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/next-ui@3.18.0...@graphcommerce/next-ui@3.18.1) (2021-11-22)
|
|
7
18
|
|
|
8
19
|
|
package/ToggleButton/index.tsx
CHANGED
|
@@ -12,14 +12,12 @@ export const useStyles = makeStyles(
|
|
|
12
12
|
(theme: Theme) => ({
|
|
13
13
|
/* Styles applied to the root element. */
|
|
14
14
|
root: {
|
|
15
|
-
border: '2px solid transparent',
|
|
16
15
|
backgroundColor:
|
|
17
16
|
theme.palette.type === 'light'
|
|
18
17
|
? theme.palette.background.default
|
|
19
18
|
: lighten(theme.palette.background.default, theme.palette.action.hoverOpacity),
|
|
20
19
|
borderRadius: 4,
|
|
21
|
-
|
|
22
|
-
boxShadow: `0px 0px 2px ${theme.palette.grey[400]}`,
|
|
20
|
+
border: `1px solid ${theme.palette.divider}`,
|
|
23
21
|
'&$disabled': {
|
|
24
22
|
borderWidth: 2,
|
|
25
23
|
},
|
|
@@ -28,8 +26,8 @@ export const useStyles = makeStyles(
|
|
|
28
26
|
},
|
|
29
27
|
disabled: {},
|
|
30
28
|
selected: ({ color = 'default' }: StyleProps) => ({
|
|
31
|
-
border: `
|
|
32
|
-
boxShadow: `
|
|
29
|
+
border: `1px solid ${theme.palette[color]?.main ?? theme.palette.primary.main}`,
|
|
30
|
+
boxShadow: `inset 0 0 0 1px ${theme.palette[color]?.main ?? theme.palette.primary.main}`,
|
|
33
31
|
}),
|
|
34
32
|
/* Styles applied to the `label` wrapper element. */
|
|
35
33
|
label: {},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphcommerce/next-ui",
|
|
3
|
-
"version": "3.18.
|
|
3
|
+
"version": "3.18.2",
|
|
4
4
|
"author": "",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"scripts": {
|
|
@@ -53,5 +53,5 @@
|
|
|
53
53
|
"project": "./tsconfig.json"
|
|
54
54
|
}
|
|
55
55
|
},
|
|
56
|
-
"gitHead": "
|
|
56
|
+
"gitHead": "4d36627aeb43cba320c249b9a876384627064f18"
|
|
57
57
|
}
|