@graphcommerce/next-ui 3.17.0 → 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.
@@ -131,7 +131,6 @@ const useStyles = makeStyles(
131
131
  sheetHeaderFillMobileOnly: {
132
132
  [theme.breakpoints.up('md')]: {
133
133
  pointerEvents: 'none',
134
- background: 'green',
135
134
  position: 'fixed',
136
135
  },
137
136
  },
@@ -192,7 +191,7 @@ const useStyles = makeStyles(
192
191
  pointerEvents: 'all',
193
192
  },
194
193
  '& * > button': {
195
- boxShadow: theme.shadows[3],
194
+ boxShadow: theme.shadows[6],
196
195
  },
197
196
  [theme.breakpoints.up('md')]: {
198
197
  position: 'fixed',
@@ -36,7 +36,6 @@ const useStyles = makeStyles(
36
36
  },
37
37
  menuFab: {
38
38
  background: theme.palette.text.primary,
39
- boxShadow: theme.shadows[2],
40
39
  width: responsiveVal(42, 56),
41
40
  height: responsiveVal(42, 56),
42
41
  pointerEvents: 'all',
@@ -1,19 +1,15 @@
1
- import { alpha, useMediaQuery, useTheme } from '@material-ui/core'
2
- import { useMotionTemplate, useTransform, useViewportScroll } from 'framer-motion'
1
+ import { alpha, useTheme } from '@material-ui/core'
2
+ import { useMotionTemplate, useMotionValue, useTransform, useViewportScroll } from 'framer-motion'
3
3
 
4
4
  export default function useFixedFabAnimation() {
5
5
  const theme = useTheme()
6
- const isMobile = useMediaQuery(theme.breakpoints.down('sm'))
7
6
  const { scrollY } = useViewportScroll()
8
- const scrollTo = isMobile ? 0 : 60
9
- const scrollToBg = isMobile ? 0 : 10
10
- const opacity = useTransform(scrollY, [50, scrollTo], [0, 0.08])
7
+ const opacity = useTransform(scrollY, [50, 60], [0, 1])
11
8
  const opacity1 = useTransform(
12
9
  scrollY,
13
- [0, scrollToBg],
10
+ [0, 10],
14
11
  [alpha(theme.palette.background.paper, 0), alpha(theme.palette.background.paper, 1)],
15
12
  )
16
- const boxShadow = useMotionTemplate`0 2px 10px 0 rgba(0, 0, 0, ${opacity})`
17
13
  const backgroundColor = useMotionTemplate`${opacity1}`
18
- return { boxShadow, backgroundColor, opacity }
14
+ return { backgroundColor, opacity }
19
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[1],
70
+ boxShadow: theme.shadows[6],
71
71
  '&:hover': {
72
72
  background: theme.palette.secondary.dark,
73
73
  },
package/CHANGELOG.md CHANGED
@@ -3,6 +3,56 @@
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
+
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)
18
+
19
+
20
+ ### Bug Fixes
21
+
22
+ * green app shell header ([a0774e6](https://github.com/ho-nl/m2-pwa/commit/a0774e6da078ea1e96d7d93bccafae5b55a69792))
23
+
24
+
25
+
26
+
27
+
28
+ # [3.18.0](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/next-ui@3.17.1...@graphcommerce/next-ui@3.18.0) (2021-11-22)
29
+
30
+
31
+ ### Bug Fixes
32
+
33
+ * remove styles ([335c8cb](https://github.com/ho-nl/m2-pwa/commit/335c8cb663bdd4c1670cdb3ea88c8a9a42bcf745))
34
+ * revert to SvgImageSimple ([b247c6b](https://github.com/ho-nl/m2-pwa/commit/b247c6b96979bc313e597a8ffe1275b73f38bd6a))
35
+
36
+
37
+ ### Features
38
+
39
+ * use Rating component ([ec54f45](https://github.com/ho-nl/m2-pwa/commit/ec54f4522adb2d330bbdecc2ce032f86f13fb7a6))
40
+
41
+
42
+
43
+
44
+
45
+ ## [3.17.1](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/next-ui@3.17.0...@graphcommerce/next-ui@3.17.1) (2021-11-12)
46
+
47
+
48
+ ### Bug Fixes
49
+
50
+ * disable CartFab animation for mobile ([ea04e67](https://github.com/ho-nl/m2-pwa/commit/ea04e678b7d5ab23e903a59a7f369053d17f9e79))
51
+
52
+
53
+
54
+
55
+
6
56
  # [3.17.0](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/next-ui@3.16.0...@graphcommerce/next-ui@3.17.0) (2021-11-12)
7
57
 
8
58
 
@@ -161,6 +161,7 @@ export default function MessageSnackbarImpl(props: MessageSnackbarImplProps) {
161
161
  onClose={hideSnackbar}
162
162
  >
163
163
  <SnackbarContent
164
+ elevation={12}
164
165
  classes={{
165
166
  root: clsxBonus('root'),
166
167
  message: clsxBonus('message'),
@@ -1,8 +1,8 @@
1
- import { makeStyles, Theme } from '@material-ui/core'
2
1
  import { Rating, RatingProps } from '@material-ui/lab'
3
2
  import React from 'react'
4
3
  import { SvgImageSimple } from '..'
5
4
  import { iconStar } from '../icons'
5
+ import { makeStyles, Theme } from '@material-ui/core'
6
6
 
7
7
  export type StarRatingFieldProps = {
8
8
  id?: string
@@ -14,13 +14,13 @@ const useStyles = makeStyles(
14
14
  (theme: Theme) => ({
15
15
  iconStar: {
16
16
  fill: '#FFDA1C',
17
- stroke: '#FFDA1C',
18
- margin: 3,
17
+ stroke: 'none',
18
+ margin: '0 3px',
19
19
  },
20
20
  iconStarEmpty: {
21
- fill: theme.palette.text.disabled,
22
- stroke: theme.palette.text.disabled,
23
- margin: 3,
21
+ fill: theme.palette.grey[300],
22
+ stroke: 'none',
23
+ margin: '0 3px',
24
24
  },
25
25
  }),
26
26
  {
@@ -37,8 +37,8 @@ export default function StarRatingField(props: StarRatingFieldProps) {
37
37
  name={`star-rating-${id}`}
38
38
  max={5}
39
39
  size='small'
40
- emptyIcon={<SvgImageSimple src={iconStar} className={classes.iconStarEmpty} />}
41
- icon={<SvgImageSimple src={iconStar} className={classes.iconStar} />}
40
+ emptyIcon={<SvgImageSimple src={iconStar} size='large' className={classes.iconStarEmpty} />}
41
+ icon={<SvgImageSimple src={iconStar} size='large' className={classes.iconStar} />}
42
42
  onChange={(event, value) => {
43
43
  onChange(id ?? '', value ?? 0)
44
44
  }}
@@ -21,6 +21,11 @@ const useStyles = makeStyles(
21
21
  sizeInherit: {
22
22
  fontSize: 'inherit',
23
23
  },
24
+ sizeXs: {
25
+ width: responsiveVal(11, 13),
26
+ height: responsiveVal(11, 13),
27
+ strokeWidth: 2.1,
28
+ },
24
29
  sizeSmall: {
25
30
  width: responsiveVal(12, 16),
26
31
  height: responsiveVal(12, 16),
@@ -49,7 +54,7 @@ const useStyles = makeStyles(
49
54
 
50
55
  type SvgImageSimpleProps = Omit<ImageProps, 'fixed'> & {
51
56
  /** The fontSize applied to the icon. Defaults to 24px, but can be configure to inherit font size. */
52
- size?: 'default' | 'inherit' | 'xxl' | 'xl' | 'large' | 'medium' | 'small'
57
+ size?: 'default' | 'inherit' | 'xxl' | 'xl' | 'large' | 'medium' | 'small' | 'xs'
53
58
  fill?: boolean
54
59
  muted?: boolean
55
60
  inverted?: boolean
@@ -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
- // boxShadow: theme.shadows['1'],
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: `2px solid ${theme.palette[color]?.main ?? theme.palette.primary.main}`,
32
- boxShadow: `unset`,
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.17.0",
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": "6a39908a131938d9c3365cc937b92c1f1f8b33c6"
56
+ "gitHead": "4d36627aeb43cba320c249b9a876384627064f18"
57
57
  }