@graphcommerce/next-ui 3.17.1 → 3.18.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/CHANGELOG.md CHANGED
@@ -3,6 +3,23 @@
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.0](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/next-ui@3.17.1...@graphcommerce/next-ui@3.18.0) (2021-11-22)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * remove styles ([335c8cb](https://github.com/ho-nl/m2-pwa/commit/335c8cb663bdd4c1670cdb3ea88c8a9a42bcf745))
12
+ * revert to SvgImageSimple ([b247c6b](https://github.com/ho-nl/m2-pwa/commit/b247c6b96979bc313e597a8ffe1275b73f38bd6a))
13
+
14
+
15
+ ### Features
16
+
17
+ * use Rating component ([ec54f45](https://github.com/ho-nl/m2-pwa/commit/ec54f4522adb2d330bbdecc2ce032f86f13fb7a6))
18
+
19
+
20
+
21
+
22
+
6
23
  ## [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)
7
24
 
8
25
 
@@ -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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@graphcommerce/next-ui",
3
- "version": "3.17.1",
3
+ "version": "3.18.0",
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": "e8578cc336e58d896531179f5fcb6973e8a983ce"
56
+ "gitHead": "033692947ca401d23791b3fcb9d65dc8c4e32bbc"
57
57
  }