@graphcommerce/magento-cart-coupon 2.107.0 → 2.107.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/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
+ ## [2.107.1](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/magento-cart-coupon@2.107.0...@graphcommerce/magento-cart-coupon@2.107.1) (2021-11-02)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * RemoveCoupon Button and fix pill-link style to match buttons ([6838812](https://github.com/ho-nl/m2-pwa/commit/68388123773fb4f79a3e4b1beb7ecca601d7748e))
12
+
13
+
14
+
15
+
16
+
6
17
  # [2.107.0](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/magento-cart-coupon@2.106.8...@graphcommerce/magento-cart-coupon@2.107.0) (2021-11-02)
7
18
 
8
19
 
@@ -1,6 +1,6 @@
1
1
  import { useFormGqlMutationCart, ApolloCartErrorAlert } from '@graphcommerce/magento-cart'
2
- import { UseStyles, iconClose, SvgImageSimple } from '@graphcommerce/next-ui'
3
- import { IconButton, makeStyles, Theme } from '@material-ui/core'
2
+ import { UseStyles, SvgImageSimple, iconCancelAlt, Button } from '@graphcommerce/next-ui'
3
+ import { lighten, IconButton, makeStyles, Theme } from '@material-ui/core'
4
4
  import React from 'react'
5
5
  import { CouponFragment } from '../Api/Coupon.gql'
6
6
  import { RemoveCouponFormDocument } from './RemoveCouponForm.gql'
@@ -8,24 +8,29 @@ import { RemoveCouponFormDocument } from './RemoveCouponForm.gql'
8
8
  const useStyles = makeStyles(
9
9
  (theme: Theme) => ({
10
10
  inlineCoupon: {
11
- background: `${theme.palette.secondary.main}12`,
12
- margin: `-1px 0 -2px`,
13
- padding: `4px ${theme.spacings.xxs} 4px ${theme.spacings.xxs}`,
14
- color: theme.palette.secondary.main,
15
- borderRadius: 4,
16
- ...theme.typography.body2,
17
11
  fontWeight: 600,
18
- display: 'flex',
19
- alignItems: 'center',
20
- '& .MuiIconButton-root': {
21
- width: 14,
22
- height: 14,
23
- marginLeft: 4,
24
- color: theme.palette.grey[400],
25
- '& .MuiSvgIcon-root': {
26
- padding: 2,
27
- },
12
+ background: lighten(theme.palette.secondary.light, theme.palette.action.hoverOpacity),
13
+ '& svg': {
14
+ stroke: 'transparent',
15
+ fill: theme.palette.secondary.main,
28
16
  },
17
+ // margin: `-1px 0 -2px`,
18
+ // padding: `4px ${theme.spacings.xxs} 4px ${theme.spacings.xxs}`,
19
+ // color: theme.palette.secondary.main,
20
+ // borderRadius: 4,
21
+ // ...theme.typography.body2,
22
+ // fontWeight: 600,
23
+ // display: 'flex',
24
+ // alignItems: 'center',
25
+ // '& .MuiIconButton-root': {
26
+ // width: 14,
27
+ // height: 14,
28
+ // marginLeft: 4,
29
+ // color: theme.palette.grey[400],
30
+ // '& .MuiSvgIcon-root': {
31
+ // padding: 2,
32
+ // },
33
+ // },
29
34
  },
30
35
  }),
31
36
  { name: 'RemoveCouponForm' },
@@ -42,12 +47,16 @@ export default function RemoveCouponForm(props: CartCouponProps) {
42
47
  const submitHandler = handleSubmit(() => {})
43
48
 
44
49
  return (
45
- <form className={classes.inlineCoupon} onSubmit={submitHandler} noValidate>
46
- {applied_coupons?.[0]?.code}
47
- <IconButton type='submit'>
48
- <SvgImageSimple src={iconClose} size='small' muted />
49
- </IconButton>
50
-
50
+ <form onSubmit={submitHandler} noValidate>
51
+ <Button
52
+ type='submit'
53
+ variant='text'
54
+ color='secondary'
55
+ className={classes.inlineCoupon}
56
+ endIcon={<SvgImageSimple src={iconCancelAlt} />}
57
+ >
58
+ {applied_coupons?.[0]?.code}
59
+ </Button>
51
60
  <ApolloCartErrorAlert error={error} />
52
61
  </form>
53
62
  )
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@graphcommerce/magento-cart-coupon",
3
- "version": "2.107.0",
3
+ "version": "2.107.4",
4
4
  "sideEffects": false,
5
5
  "prettier": "@graphcommerce/prettier-config-pwa",
6
6
  "browserslist": [
@@ -21,12 +21,12 @@
21
21
  },
22
22
  "dependencies": {
23
23
  "@apollo/client": "^3.4.16",
24
- "@graphcommerce/graphql": "^2.105.2",
24
+ "@graphcommerce/graphql": "^2.105.3",
25
25
  "@graphcommerce/image": "^2.105.2",
26
- "@graphcommerce/magento-cart": "^3.5.0",
27
- "@graphcommerce/magento-store": "^3.2.0",
28
- "@graphcommerce/next-ui": "^3.12.0",
29
- "@graphcommerce/react-hook-form": "^2.102.14",
26
+ "@graphcommerce/magento-cart": "^3.5.4",
27
+ "@graphcommerce/magento-store": "^3.2.4",
28
+ "@graphcommerce/next-ui": "^3.12.4",
29
+ "@graphcommerce/react-hook-form": "^2.103.0",
30
30
  "@graphql-typed-document-node/core": "^3.1.0",
31
31
  "@material-ui/core": "^4.12.3",
32
32
  "@material-ui/lab": "^4.0.0-alpha.60",
@@ -36,5 +36,5 @@
36
36
  "react": "^17.0.2",
37
37
  "react-dom": "^17.0.2"
38
38
  },
39
- "gitHead": "b37db76e3e0dfc34a2b25068be5e6c7afcca6bfa"
39
+ "gitHead": "7aca802dd74632aa2f474eae2d93bd563490fd90"
40
40
  }