@graphcommerce/magento-cart-coupon 3.0.4 → 3.0.7

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.
@@ -10,7 +10,7 @@ const name = 'ApplyCouponForm' as const
10
10
  const parts = ['couponForm', 'button'] as const
11
11
  const { classes } = extendableComponent(name, parts)
12
12
 
13
- export default function ApplyCouponForm(props: ApplyCouponFormProps) {
13
+ export function ApplyCouponForm(props: ApplyCouponFormProps) {
14
14
  const { sx = [] } = props
15
15
  const form = useFormGqlMutationCart(ApplyCouponFormDocument)
16
16
  const { handleSubmit, muiRegister, formState, required, error } = form
package/CHANGELOG.md CHANGED
@@ -1,18 +1,51 @@
1
1
  # Change Log
2
2
 
3
+ ## 3.0.7
4
+
5
+ ### Patch Changes
6
+
7
+ - [#1369](https://github.com/graphcommerce-org/graphcommerce/pull/1369) [`ae6449502`](https://github.com/graphcommerce-org/graphcommerce/commit/ae64495024a455bbe5188588604368c1542840c9) Thanks [@paales](https://github.com/paales)! - Upgraded dependencies
8
+
9
+ - Updated dependencies [[`892018809`](https://github.com/graphcommerce-org/graphcommerce/commit/8920188093d0422ec50580e408dc28ac5f93e46a), [`892018809`](https://github.com/graphcommerce-org/graphcommerce/commit/8920188093d0422ec50580e408dc28ac5f93e46a), [`ae6449502`](https://github.com/graphcommerce-org/graphcommerce/commit/ae64495024a455bbe5188588604368c1542840c9), [`892018809`](https://github.com/graphcommerce-org/graphcommerce/commit/8920188093d0422ec50580e408dc28ac5f93e46a), [`892018809`](https://github.com/graphcommerce-org/graphcommerce/commit/8920188093d0422ec50580e408dc28ac5f93e46a)]:
10
+ - @graphcommerce/graphql@3.0.6
11
+ - @graphcommerce/next-ui@4.5.0
12
+ - @graphcommerce/image@3.1.2
13
+ - @graphcommerce/magento-cart@4.2.2
14
+ - @graphcommerce/magento-store@4.1.4
15
+ - @graphcommerce/react-hook-form@3.0.6
16
+
17
+ ## 3.0.6
18
+
19
+ ### Patch Changes
20
+
21
+ - [#1345](https://github.com/graphcommerce-org/graphcommerce/pull/1345) [`eee3c867d`](https://github.com/graphcommerce-org/graphcommerce/commit/eee3c867d0c56401b4290862917a2e34cea92ffe) Thanks [@NickdeK](https://github.com/NickdeK)! - Changed active coupon element to Chip and fixed alignment.
22
+
23
+ - Updated dependencies [[`b76d0892a`](https://github.com/graphcommerce-org/graphcommerce/commit/b76d0892a11bd916aefd46ba72c2da00e38ce45b)]:
24
+ - @graphcommerce/next-ui@4.3.2
25
+
26
+ ## 3.0.5
27
+
28
+ ### Patch Changes
29
+
30
+ - [#1307](https://github.com/ho-nl/m2-pwa/pull/1307) [`bd10506d3`](https://github.com/ho-nl/m2-pwa/commit/bd10506d32fdbc91d01dadc29a12ebd1e0943655) Thanks [@paales](https://github.com/paales)! - All default exports are now named exports internally and all `index.tsx` are renamed to the component name.
31
+
32
+ * [#1307](https://github.com/ho-nl/m2-pwa/pull/1307) [`27cb1f2d8`](https://github.com/ho-nl/m2-pwa/commit/27cb1f2d8dbfb8f1b301ce56fb6a2b6c1fc6a5ef) Thanks [@paales](https://github.com/paales)! - upgrade dependencies
33
+
34
+ * Updated dependencies [[`3d63b39f7`](https://github.com/ho-nl/m2-pwa/commit/3d63b39f7e330d1827a32dba782667d7b21adaba), [`bd10506d3`](https://github.com/ho-nl/m2-pwa/commit/bd10506d32fdbc91d01dadc29a12ebd1e0943655), [`27cb1f2d8`](https://github.com/ho-nl/m2-pwa/commit/27cb1f2d8dbfb8f1b301ce56fb6a2b6c1fc6a5ef)]:
35
+ - @graphcommerce/next-ui@4.2.4
36
+ - @graphcommerce/graphql@3.0.4
37
+ - @graphcommerce/image@3.1.1
38
+ - @graphcommerce/magento-cart@4.1.4
39
+ - @graphcommerce/magento-store@4.1.2
40
+ - @graphcommerce/react-hook-form@3.0.4
41
+
3
42
  ## 3.0.4
4
43
 
5
44
  ### Patch Changes
6
45
 
7
- - [#1292](https://github.com/ho-nl/m2-pwa/pull/1292)
8
- [`5a1ba9e66`](https://github.com/ho-nl/m2-pwa/commit/5a1ba9e664abbac89c4f5f71f7d6d6ed1aefa5c0)
9
- Thanks [@paales](https://github.com/paales)! - Renamed SvgIcon to IconSvg to prevent collisions
10
- with MUI
46
+ - [#1292](https://github.com/ho-nl/m2-pwa/pull/1292) [`5a1ba9e66`](https://github.com/ho-nl/m2-pwa/commit/5a1ba9e664abbac89c4f5f71f7d6d6ed1aefa5c0) Thanks [@paales](https://github.com/paales)! - Renamed SvgIcon to IconSvg to prevent collisions with MUI
11
47
 
12
- - Updated dependencies
13
- [[`5a1ba9e66`](https://github.com/ho-nl/m2-pwa/commit/5a1ba9e664abbac89c4f5f71f7d6d6ed1aefa5c0),
14
- [`990df655b`](https://github.com/ho-nl/m2-pwa/commit/990df655b73b469718d6cb5837ee65dfe2ad6a1d),
15
- [`63f9b56eb`](https://github.com/ho-nl/m2-pwa/commit/63f9b56eb68ba790567ff1427e599fd2c3c8f1ee)]:
48
+ - Updated dependencies [[`5a1ba9e66`](https://github.com/ho-nl/m2-pwa/commit/5a1ba9e664abbac89c4f5f71f7d6d6ed1aefa5c0), [`990df655b`](https://github.com/ho-nl/m2-pwa/commit/990df655b73b469718d6cb5837ee65dfe2ad6a1d), [`63f9b56eb`](https://github.com/ho-nl/m2-pwa/commit/63f9b56eb68ba790567ff1427e599fd2c3c8f1ee)]:
16
49
  - @graphcommerce/magento-cart@4.1.3
17
50
  - @graphcommerce/next-ui@4.2.0
18
51
 
@@ -20,14 +53,9 @@
20
53
 
21
54
  ### Patch Changes
22
55
 
23
- - [`973ff8645`](https://github.com/ho-nl/m2-pwa/commit/973ff86452a70ade9f4db13fdda6e963d7220e96)
24
- Thanks [@paales](https://github.com/paales)! - made packages public
56
+ - [`973ff8645`](https://github.com/ho-nl/m2-pwa/commit/973ff86452a70ade9f4db13fdda6e963d7220e96) Thanks [@paales](https://github.com/paales)! - made packages public
25
57
 
26
- - Updated dependencies
27
- [[`973ff8645`](https://github.com/ho-nl/m2-pwa/commit/973ff86452a70ade9f4db13fdda6e963d7220e96),
28
- [`81ea406d5`](https://github.com/ho-nl/m2-pwa/commit/81ea406d54d6b5c662c030a7fea444abc4117a20),
29
- [`3a719c88c`](https://github.com/ho-nl/m2-pwa/commit/3a719c88cad1eab58602de28c41adc0fc4827e1d),
30
- [`5ffcb56bf`](https://github.com/ho-nl/m2-pwa/commit/5ffcb56bfcbe49ebeaf24f9341e819a145ab9a14)]:
58
+ - Updated dependencies [[`973ff8645`](https://github.com/ho-nl/m2-pwa/commit/973ff86452a70ade9f4db13fdda6e963d7220e96), [`81ea406d5`](https://github.com/ho-nl/m2-pwa/commit/81ea406d54d6b5c662c030a7fea444abc4117a20), [`3a719c88c`](https://github.com/ho-nl/m2-pwa/commit/3a719c88cad1eab58602de28c41adc0fc4827e1d), [`5ffcb56bf`](https://github.com/ho-nl/m2-pwa/commit/5ffcb56bfcbe49ebeaf24f9341e819a145ab9a14)]:
31
59
  - @graphcommerce/graphql@3.0.3
32
60
  - @graphcommerce/image@3.1.0
33
61
  - @graphcommerce/magento-cart@4.1.2
@@ -39,30 +67,13 @@
39
67
 
40
68
  ### Patch Changes
41
69
 
42
- - [#1276](https://github.com/ho-nl/m2-pwa/pull/1276)
43
- [`ce09388e0`](https://github.com/ho-nl/m2-pwa/commit/ce09388e0d7ef33aee660612340f6fbae15ceec2)
44
- Thanks [@paales](https://github.com/paales)! - We've moved lots of internal packages from
45
- `dependencies` to `peerDependencies`. The result of this is that there will be significantly less
46
- duplicate packages in the node_modules folders.
47
-
48
- * [#1276](https://github.com/ho-nl/m2-pwa/pull/1276)
49
- [`52a45bba4`](https://github.com/ho-nl/m2-pwa/commit/52a45bba4dc6dd6df3c81f5023df7d23ed8a534d)
50
- Thanks [@paales](https://github.com/paales)! - Upgraded to
51
- [NextJS 12.1](https://nextjs.org/blog/next-12-1)! This is just for compatibility, but we'll be
52
- implementing
53
- [On-demand Incremental Static Regeneration](https://nextjs.org/blog/next-12-1#on-demand-incremental-static-regeneration-beta)
54
- soon.
55
-
56
- This will greatly reduce the requirement to rebuid stuff and we'll add a management UI on the
57
- frontend to be able to revalidate pages manually.
58
-
59
- * Updated dependencies
60
- [[`381e4c86a`](https://github.com/ho-nl/m2-pwa/commit/381e4c86a8321ce96e1fa5c7d3c0a0c0ff3e02c7),
61
- [`ce09388e0`](https://github.com/ho-nl/m2-pwa/commit/ce09388e0d7ef33aee660612340f6fbae15ceec2),
62
- [`e7c8e2756`](https://github.com/ho-nl/m2-pwa/commit/e7c8e2756d637cbcd2e793d62ef5721d35d9fa7b),
63
- [`b08a8eb1d`](https://github.com/ho-nl/m2-pwa/commit/b08a8eb1d024b9d3e7712ef034029151670db275),
64
- [`52a45bba4`](https://github.com/ho-nl/m2-pwa/commit/52a45bba4dc6dd6df3c81f5023df7d23ed8a534d),
65
- [`5a4809b1a`](https://github.com/ho-nl/m2-pwa/commit/5a4809b1a705aa32f620f520085df48ee25f9949)]:
70
+ - [#1276](https://github.com/ho-nl/m2-pwa/pull/1276) [`ce09388e0`](https://github.com/ho-nl/m2-pwa/commit/ce09388e0d7ef33aee660612340f6fbae15ceec2) Thanks [@paales](https://github.com/paales)! - We've moved lots of internal packages from `dependencies` to `peerDependencies`. The result of this is that there will be significantly less duplicate packages in the node_modules folders.
71
+
72
+ * [#1276](https://github.com/ho-nl/m2-pwa/pull/1276) [`52a45bba4`](https://github.com/ho-nl/m2-pwa/commit/52a45bba4dc6dd6df3c81f5023df7d23ed8a534d) Thanks [@paales](https://github.com/paales)! - Upgraded to [NextJS 12.1](https://nextjs.org/blog/next-12-1)! This is just for compatibility, but we'll be implementing [On-demand Incremental Static Regeneration](https://nextjs.org/blog/next-12-1#on-demand-incremental-static-regeneration-beta) soon.
73
+
74
+ This will greatly reduce the requirement to rebuid stuff and we'll add a management UI on the frontend to be able to revalidate pages manually.
75
+
76
+ * Updated dependencies [[`381e4c86a`](https://github.com/ho-nl/m2-pwa/commit/381e4c86a8321ce96e1fa5c7d3c0a0c0ff3e02c7), [`ce09388e0`](https://github.com/ho-nl/m2-pwa/commit/ce09388e0d7ef33aee660612340f6fbae15ceec2), [`e7c8e2756`](https://github.com/ho-nl/m2-pwa/commit/e7c8e2756d637cbcd2e793d62ef5721d35d9fa7b), [`b08a8eb1d`](https://github.com/ho-nl/m2-pwa/commit/b08a8eb1d024b9d3e7712ef034029151670db275), [`52a45bba4`](https://github.com/ho-nl/m2-pwa/commit/52a45bba4dc6dd6df3c81f5023df7d23ed8a534d), [`5a4809b1a`](https://github.com/ho-nl/m2-pwa/commit/5a4809b1a705aa32f620f520085df48ee25f9949)]:
66
77
  - @graphcommerce/magento-cart@4.1.1
67
78
  - @graphcommerce/next-ui@4.1.1
68
79
  - @graphcommerce/react-hook-form@3.0.2
@@ -74,11 +85,8 @@
74
85
 
75
86
  ### Patch Changes
76
87
 
77
- - [`0cbaa878b`](https://github.com/ho-nl/m2-pwa/commit/0cbaa878b8a844d5abbeb1797b625a33130e6514)
78
- Thanks [@paales](https://github.com/paales)! - Added homepage and repository package.json files,
79
- so that the packages link to back to the website and repository
80
- - Updated dependencies
81
- [[`0cbaa878b`](https://github.com/ho-nl/m2-pwa/commit/0cbaa878b8a844d5abbeb1797b625a33130e6514)]:
88
+ - [`0cbaa878b`](https://github.com/ho-nl/m2-pwa/commit/0cbaa878b8a844d5abbeb1797b625a33130e6514) Thanks [@paales](https://github.com/paales)! - Added homepage and repository package.json files, so that the packages link to back to the website and repository
89
+ - Updated dependencies [[`0cbaa878b`](https://github.com/ho-nl/m2-pwa/commit/0cbaa878b8a844d5abbeb1797b625a33130e6514)]:
82
90
  - @graphcommerce/graphql@3.0.1
83
91
  - @graphcommerce/image@3.0.1
84
92
  - @graphcommerce/magento-cart@4.0.1
@@ -90,14 +98,11 @@
90
98
 
91
99
  ### Major Changes
92
100
 
93
- - [#1258](https://github.com/ho-nl/m2-pwa/pull/1258)
94
- [`ad36382a4`](https://github.com/ho-nl/m2-pwa/commit/ad36382a4d55d83d9e47b7eb6a02671a2a631a05)
95
- Thanks [@paales](https://github.com/paales)! - Upgraded to Material UI 5
101
+ - [#1258](https://github.com/ho-nl/m2-pwa/pull/1258) [`ad36382a4`](https://github.com/ho-nl/m2-pwa/commit/ad36382a4d55d83d9e47b7eb6a02671a2a631a05) Thanks [@paales](https://github.com/paales)! - Upgraded to Material UI 5
96
102
 
97
103
  ### Patch Changes
98
104
 
99
- - Updated dependencies
100
- [[`ad36382a4`](https://github.com/ho-nl/m2-pwa/commit/ad36382a4d55d83d9e47b7eb6a02671a2a631a05)]:
105
+ - Updated dependencies [[`ad36382a4`](https://github.com/ho-nl/m2-pwa/commit/ad36382a4d55d83d9e47b7eb6a02671a2a631a05)]:
101
106
  - @graphcommerce/graphql@3.0.0
102
107
  - @graphcommerce/image@3.0.0
103
108
  - @graphcommerce/magento-cart@4.0.0
@@ -105,69 +110,58 @@
105
110
  - @graphcommerce/next-ui@4.0.0
106
111
  - @graphcommerce/react-hook-form@3.0.0
107
112
 
108
- All notable changes to this project will be documented in this file. See
109
- [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
113
+ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
110
114
 
111
115
  # [2.109.0](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/magento-cart-coupon@2.108.4...@graphcommerce/magento-cart-coupon@2.109.0) (2021-12-01)
112
116
 
113
117
  ### Bug Fixes
114
118
 
115
- - borderRadius
116
- ([ea38c8a](https://github.com/ho-nl/m2-pwa/commit/ea38c8a0d55e3cb8d975082952ad174721fab888))
119
+ - borderRadius ([ea38c8a](https://github.com/ho-nl/m2-pwa/commit/ea38c8a0d55e3cb8d975082952ad174721fab888))
117
120
 
118
121
  ### Features
119
122
 
120
- - borderRadius based on theme.shape.borderRadius
121
- ([7c34937](https://github.com/ho-nl/m2-pwa/commit/7c349376cd41a131c628324c299106fdb7e60484))
123
+ - borderRadius based on theme.shape.borderRadius ([7c34937](https://github.com/ho-nl/m2-pwa/commit/7c349376cd41a131c628324c299106fdb7e60484))
122
124
 
123
125
  # [2.108.0](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/magento-cart-coupon@2.107.22...@graphcommerce/magento-cart-coupon@2.108.0) (2021-11-12)
124
126
 
125
127
  ### Bug Fixes
126
128
 
127
- - even more translations
128
- ([1a1f988](https://github.com/ho-nl/m2-pwa/commit/1a1f98837c704b978f6b42b619d9c52f540b2d48))
129
+ - even more translations ([1a1f988](https://github.com/ho-nl/m2-pwa/commit/1a1f98837c704b978f6b42b619d9c52f540b2d48))
129
130
 
130
131
  ### Features
131
132
 
132
- - added tons of translations
133
- ([9bb0ac7](https://github.com/ho-nl/m2-pwa/commit/9bb0ac709b58df6ea6141e92e4923a5ca9ae2963))
133
+ - added tons of translations ([9bb0ac7](https://github.com/ho-nl/m2-pwa/commit/9bb0ac709b58df6ea6141e92e4923a5ca9ae2963))
134
134
 
135
135
  ## [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)
136
136
 
137
137
  ### Bug Fixes
138
138
 
139
- - RemoveCoupon Button and fix pill-link style to match buttons
140
- ([6838812](https://github.com/ho-nl/m2-pwa/commit/68388123773fb4f79a3e4b1beb7ecca601d7748e))
139
+ - RemoveCoupon Button and fix pill-link style to match buttons ([6838812](https://github.com/ho-nl/m2-pwa/commit/68388123773fb4f79a3e4b1beb7ecca601d7748e))
141
140
 
142
141
  # [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)
143
142
 
144
143
  ### Features
145
144
 
146
- - darkTheme
147
- ([968f4f1](https://github.com/ho-nl/m2-pwa/commit/968f4f1360417bf7daa36454c19e6bc5cf53ae90))
145
+ - darkTheme ([968f4f1](https://github.com/ho-nl/m2-pwa/commit/968f4f1360417bf7daa36454c19e6bc5cf53ae90))
148
146
 
149
147
  ## [2.106.4](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/magento-cart-coupon@2.106.3...@graphcommerce/magento-cart-coupon@2.106.4) (2021-10-28)
150
148
 
151
149
  ### Bug Fixes
152
150
 
153
- - External SVG's can't have alt tags
154
- ([1b1414a](https://github.com/ho-nl/m2-pwa/commit/1b1414a782d55d3acf7b0e6bcaa50f2ad5f18f39))
151
+ - External SVG's can't have alt tags ([1b1414a](https://github.com/ho-nl/m2-pwa/commit/1b1414a782d55d3acf7b0e6bcaa50f2ad5f18f39))
155
152
 
156
153
  ## [2.106.3](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/magento-cart-coupon@2.106.2...@graphcommerce/magento-cart-coupon@2.106.3) (2021-10-28)
157
154
 
158
155
  ### Bug Fixes
159
156
 
160
- - bigger apply coupon button
161
- ([700d8ee](https://github.com/ho-nl/m2-pwa/commit/700d8ee2daedbcdffa63e8e14c9d837feeb29cbc))
162
- - update SvgImage to SvgImageSimple
163
- ([f116543](https://github.com/ho-nl/m2-pwa/commit/f116543730853fa9782abff0ccacee7032e85789))
157
+ - bigger apply coupon button ([700d8ee](https://github.com/ho-nl/m2-pwa/commit/700d8ee2daedbcdffa63e8e14c9d837feeb29cbc))
158
+ - update SvgImage to SvgImageSimple ([f116543](https://github.com/ho-nl/m2-pwa/commit/f116543730853fa9782abff0ccacee7032e85789))
164
159
 
165
160
  # [2.106.0](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/magento-cart-coupon@2.105.35...@graphcommerce/magento-cart-coupon@2.106.0) (2021-10-27)
166
161
 
167
162
  ### Features
168
163
 
169
- - **nextjs:** upgraded to nextjs 12
170
- ([9331bc8](https://github.com/ho-nl/m2-pwa/commit/9331bc801f6419522115cc47d291d49d608d5a90))
164
+ - **nextjs:** upgraded to nextjs 12 ([9331bc8](https://github.com/ho-nl/m2-pwa/commit/9331bc801f6419522115cc47d291d49d608d5a90))
171
165
 
172
166
  ## [2.105.1](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/magento-cart-coupon@2.105.0...@graphcommerce/magento-cart-coupon@2.105.1) (2021-09-27)
173
167
 
@@ -177,123 +171,90 @@ All notable changes to this project will be documented in this file. See
177
171
 
178
172
  ### Bug Fixes
179
173
 
180
- - coupon animations, spacing, rippl;ie
181
- ([cef3a08](https://github.com/ho-nl/m2-pwa/commit/cef3a08d0545947518873c5257c59fc1b98f1a21))
182
- - coupon stylign
183
- ([796bbb2](https://github.com/ho-nl/m2-pwa/commit/796bbb2ad5eda6dc9c5aa37034586705b24a0023))
184
- - ignore md files from triggering version updates
185
- ([4f98392](https://github.com/ho-nl/m2-pwa/commit/4f9839250b3a32d3070da5290e5efcc5e2243fba))
186
- - implement next-ui barrel imports
187
- ([75bea70](https://github.com/ho-nl/m2-pwa/commit/75bea703dba898f18a2a1dfa3243ebd0a4e6f0e1))
188
- - remove coupon form style was too large
189
- ([30df274](https://github.com/ho-nl/m2-pwa/commit/30df274ecdffdcebd76710a5304d6fa248e81211))
190
- - rename NextButton to Button, change imports
191
- ([976adb0](https://github.com/ho-nl/m2-pwa/commit/976adb0bf906310d1efce888dcc9be1e28ce0f1b))
174
+ - coupon animations, spacing, rippl;ie ([cef3a08](https://github.com/ho-nl/m2-pwa/commit/cef3a08d0545947518873c5257c59fc1b98f1a21))
175
+ - coupon stylign ([796bbb2](https://github.com/ho-nl/m2-pwa/commit/796bbb2ad5eda6dc9c5aa37034586705b24a0023))
176
+ - ignore md files from triggering version updates ([4f98392](https://github.com/ho-nl/m2-pwa/commit/4f9839250b3a32d3070da5290e5efcc5e2243fba))
177
+ - implement next-ui barrel imports ([75bea70](https://github.com/ho-nl/m2-pwa/commit/75bea703dba898f18a2a1dfa3243ebd0a4e6f0e1))
178
+ - remove coupon form style was too large ([30df274](https://github.com/ho-nl/m2-pwa/commit/30df274ecdffdcebd76710a5304d6fa248e81211))
179
+ - rename NextButton to Button, change imports ([976adb0](https://github.com/ho-nl/m2-pwa/commit/976adb0bf906310d1efce888dcc9be1e28ce0f1b))
192
180
 
193
181
  ### Features
194
182
 
195
- - **cart:** when a cart is not active anymore show a clear cart button
196
- ([5d04a14](https://github.com/ho-nl/m2-pwa/commit/5d04a14726c040b20b34c0b88f923aee1dff22e5))
197
- - coupon form on payment page
198
- ([a163961](https://github.com/ho-nl/m2-pwa/commit/a1639617be756b357177fcce255cf662c5314499))
199
- - **graphql:** introduced new graphql package that holds all generated files
200
- ([a3e7aa0](https://github.com/ho-nl/m2-pwa/commit/a3e7aa05540540533b5ced9a95f1f802ecbe499f))
201
- - **image:** introduced completely rewritten Image component
202
- ([e3413b3](https://github.com/ho-nl/m2-pwa/commit/e3413b3a57392d6571ea64cb8d9c8dca05ea31df))
203
- - **magento-customer:** introduced ApolloCustomerErrorAlert
204
- ([e5406d9](https://github.com/ho-nl/m2-pwa/commit/e5406d91f914de290c5f097955e312312e567972))
205
- - next.js 11
206
- ([7d61407](https://github.com/ho-nl/m2-pwa/commit/7d614075a778f488045034f74be4f75b93f63c43))
207
- - **playwright:** added new playwright package to enable browser testing
208
- ([6f49ec7](https://github.com/ho-nl/m2-pwa/commit/6f49ec7595563775b96ebf21c27e39da1282e8d9))
209
- - renamed all packages to use [@graphcommerce](https://github.com/graphcommerce) instead of
210
- [@reachdigital](https://github.com/reachdigital)
211
- ([491e4ce](https://github.com/ho-nl/m2-pwa/commit/491e4cec9a2686472dac36b79f999257c0811ffe))
212
- - **theme:** restructured fonts and applied to home and category page
213
- ([6adf5f1](https://github.com/ho-nl/m2-pwa/commit/6adf5f11321bdfbf499125f1161c5abf5a1bfe4a))
214
- - upgraded to nextjs 11
215
- ([0053beb](https://github.com/ho-nl/m2-pwa/commit/0053beb7ef597c190add7264256a0eaec35868da))
216
- - useFormMutationCart and simpler imports
217
- ([012f090](https://github.com/ho-nl/m2-pwa/commit/012f090e8f54d09f35d393c61ad1e2319f5a90ff))
183
+ - **cart:** when a cart is not active anymore show a clear cart button ([5d04a14](https://github.com/ho-nl/m2-pwa/commit/5d04a14726c040b20b34c0b88f923aee1dff22e5))
184
+ - coupon form on payment page ([a163961](https://github.com/ho-nl/m2-pwa/commit/a1639617be756b357177fcce255cf662c5314499))
185
+ - **graphql:** introduced new graphql package that holds all generated files ([a3e7aa0](https://github.com/ho-nl/m2-pwa/commit/a3e7aa05540540533b5ced9a95f1f802ecbe499f))
186
+ - **image:** introduced completely rewritten Image component ([e3413b3](https://github.com/ho-nl/m2-pwa/commit/e3413b3a57392d6571ea64cb8d9c8dca05ea31df))
187
+ - **magento-customer:** introduced ApolloCustomerErrorAlert ([e5406d9](https://github.com/ho-nl/m2-pwa/commit/e5406d91f914de290c5f097955e312312e567972))
188
+ - next.js 11 ([7d61407](https://github.com/ho-nl/m2-pwa/commit/7d614075a778f488045034f74be4f75b93f63c43))
189
+ - **playwright:** added new playwright package to enable browser testing ([6f49ec7](https://github.com/ho-nl/m2-pwa/commit/6f49ec7595563775b96ebf21c27e39da1282e8d9))
190
+ - renamed all packages to use [@graphcommerce](https://github.com/graphcommerce) instead of [@reachdigital](https://github.com/reachdigital) ([491e4ce](https://github.com/ho-nl/m2-pwa/commit/491e4cec9a2686472dac36b79f999257c0811ffe))
191
+ - **theme:** restructured fonts and applied to home and category page ([6adf5f1](https://github.com/ho-nl/m2-pwa/commit/6adf5f11321bdfbf499125f1161c5abf5a1bfe4a))
192
+ - upgraded to nextjs 11 ([0053beb](https://github.com/ho-nl/m2-pwa/commit/0053beb7ef597c190add7264256a0eaec35868da))
193
+ - useFormMutationCart and simpler imports ([012f090](https://github.com/ho-nl/m2-pwa/commit/012f090e8f54d09f35d393c61ad1e2319f5a90ff))
218
194
 
219
195
  ### Reverts
220
196
 
221
- - Revert "chore: upgrade @apollo/client"
222
- ([55ff24e](https://github.com/ho-nl/m2-pwa/commit/55ff24ede0e56c85b8095edadadd1ec5e0b1b8d2))
223
- - Revert "style: coupon input conform design"
224
- ([3ac7182](https://github.com/ho-nl/m2-pwa/commit/3ac7182eb6bb7c86ccba6464d1f206dc30a5a1da))
225
- - Revert "style: coupon accordion icon/button alignment"
226
- ([165f91c](https://github.com/ho-nl/m2-pwa/commit/165f91c8f0e587ea26bcf441f48a6a13df74891c))
197
+ - Revert "chore: upgrade @apollo/client" ([55ff24e](https://github.com/ho-nl/m2-pwa/commit/55ff24ede0e56c85b8095edadadd1ec5e0b1b8d2))
198
+ - Revert "style: coupon input conform design" ([3ac7182](https://github.com/ho-nl/m2-pwa/commit/3ac7182eb6bb7c86ccba6464d1f206dc30a5a1da))
199
+ - Revert "style: coupon accordion icon/button alignment" ([165f91c](https://github.com/ho-nl/m2-pwa/commit/165f91c8f0e587ea26bcf441f48a6a13df74891c))
227
200
 
228
201
  # Change Log
229
202
 
230
- All notable changes to this project will be documented in this file. See
231
- [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
203
+ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
232
204
 
233
205
  # [2.104.0](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/magento-cart-coupon@2.103.2...@graphcommerce/magento-cart-coupon@2.104.0) (2021-08-13)
234
206
 
235
207
  ### Features
236
208
 
237
- - coupon form on payment page
238
- ([a163961](https://github.com/ho-nl/m2-pwa/commit/a1639617be756b357177fcce255cf662c5314499))
209
+ - coupon form on payment page ([a163961](https://github.com/ho-nl/m2-pwa/commit/a1639617be756b357177fcce255cf662c5314499))
239
210
 
240
211
  # [2.103.0](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/magento-cart-coupon@2.102.3...@graphcommerce/magento-cart-coupon@2.103.0) (2021-08-12)
241
212
 
242
213
  ### Bug Fixes
243
214
 
244
- - remove coupon form style was too large
245
- ([30df274](https://github.com/ho-nl/m2-pwa/commit/30df274ecdffdcebd76710a5304d6fa248e81211))
215
+ - remove coupon form style was too large ([30df274](https://github.com/ho-nl/m2-pwa/commit/30df274ecdffdcebd76710a5304d6fa248e81211))
246
216
 
247
217
  ### Features
248
218
 
249
- - upgraded to nextjs 11
250
- ([0053beb](https://github.com/ho-nl/m2-pwa/commit/0053beb7ef597c190add7264256a0eaec35868da))
219
+ - upgraded to nextjs 11 ([0053beb](https://github.com/ho-nl/m2-pwa/commit/0053beb7ef597c190add7264256a0eaec35868da))
251
220
 
252
221
  ## [2.102.2](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/magento-cart-coupon@2.102.1...@graphcommerce/magento-cart-coupon@2.102.2) (2021-08-09)
253
222
 
254
223
  ### Reverts
255
224
 
256
- - Revert "chore: upgrade @apollo/client"
257
- ([55ff24e](https://github.com/ho-nl/m2-pwa/commit/55ff24ede0e56c85b8095edadadd1ec5e0b1b8d2))
225
+ - Revert "chore: upgrade @apollo/client" ([55ff24e](https://github.com/ho-nl/m2-pwa/commit/55ff24ede0e56c85b8095edadadd1ec5e0b1b8d2))
258
226
 
259
227
  # [2.102.0](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/magento-cart-coupon@2.101.6...@graphcommerce/magento-cart-coupon@2.102.0) (2021-08-06)
260
228
 
261
229
  ### Features
262
230
 
263
- - **theme:** restructured fonts and applied to home and category page
264
- ([6adf5f1](https://github.com/ho-nl/m2-pwa/commit/6adf5f11321bdfbf499125f1161c5abf5a1bfe4a))
231
+ - **theme:** restructured fonts and applied to home and category page ([6adf5f1](https://github.com/ho-nl/m2-pwa/commit/6adf5f11321bdfbf499125f1161c5abf5a1bfe4a))
265
232
 
266
233
  ## [2.101.6](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/magento-cart-coupon@2.101.5...@graphcommerce/magento-cart-coupon@2.101.6) (2021-08-04)
267
234
 
268
235
  ### Bug Fixes
269
236
 
270
- - coupon stylign
271
- ([796bbb2](https://github.com/ho-nl/m2-pwa/commit/796bbb2ad5eda6dc9c5aa37034586705b24a0023))
237
+ - coupon stylign ([796bbb2](https://github.com/ho-nl/m2-pwa/commit/796bbb2ad5eda6dc9c5aa37034586705b24a0023))
272
238
 
273
239
  ## [2.101.5](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/magento-cart-coupon@2.101.4...@graphcommerce/magento-cart-coupon@2.101.5) (2021-08-03)
274
240
 
275
241
  ### Bug Fixes
276
242
 
277
- - coupon animations, spacing, rippl;ie
278
- ([cef3a08](https://github.com/ho-nl/m2-pwa/commit/cef3a08d0545947518873c5257c59fc1b98f1a21))
243
+ - coupon animations, spacing, rippl;ie ([cef3a08](https://github.com/ho-nl/m2-pwa/commit/cef3a08d0545947518873c5257c59fc1b98f1a21))
279
244
 
280
245
  ### Reverts
281
246
 
282
- - Revert "style: coupon input conform design"
283
- ([3ac7182](https://github.com/ho-nl/m2-pwa/commit/3ac7182eb6bb7c86ccba6464d1f206dc30a5a1da))
284
- - Revert "style: coupon accordion icon/button alignment"
285
- ([165f91c](https://github.com/ho-nl/m2-pwa/commit/165f91c8f0e587ea26bcf441f48a6a13df74891c))
247
+ - Revert "style: coupon input conform design" ([3ac7182](https://github.com/ho-nl/m2-pwa/commit/3ac7182eb6bb7c86ccba6464d1f206dc30a5a1da))
248
+ - Revert "style: coupon accordion icon/button alignment" ([165f91c](https://github.com/ho-nl/m2-pwa/commit/165f91c8f0e587ea26bcf441f48a6a13df74891c))
286
249
 
287
250
  # [2.101.0](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/magento-cart-coupon@2.100.19...@graphcommerce/magento-cart-coupon@2.101.0) (2021-07-26)
288
251
 
289
252
  ### Features
290
253
 
291
- - **playwright:** added new playwright package to enable browser testing
292
- ([6f49ec7](https://github.com/ho-nl/m2-pwa/commit/6f49ec7595563775b96ebf21c27e39da1282e8d9))
254
+ - **playwright:** added new playwright package to enable browser testing ([6f49ec7](https://github.com/ho-nl/m2-pwa/commit/6f49ec7595563775b96ebf21c27e39da1282e8d9))
293
255
 
294
256
  ## [2.100.11](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/magento-cart-coupon@2.100.10...@graphcommerce/magento-cart-coupon@2.100.11) (2021-07-20)
295
257
 
296
258
  ### Bug Fixes
297
259
 
298
- - ignore md files from triggering version updates
299
- ([4f98392](https://github.com/ho-nl/m2-pwa/commit/4f9839250b3a32d3070da5290e5efcc5e2243fba))
260
+ - ignore md files from triggering version updates ([4f98392](https://github.com/ho-nl/m2-pwa/commit/4f9839250b3a32d3070da5290e5efcc5e2243fba))
@@ -11,8 +11,8 @@ import { Trans } from '@lingui/macro'
11
11
  import { Box, Button, styled, SxProps, Theme, Typography } from '@mui/material'
12
12
  import { AnimatePresence, m } from 'framer-motion'
13
13
  import { useState } from 'react'
14
- import ApplyCouponForm from '../ApplyCouponForm/ApplyCouponForm'
15
- import RemoveCouponForm from '../RemoveCouponForm/RemoveCouponForm'
14
+ import { ApplyCouponForm } from '../ApplyCouponForm/ApplyCouponForm'
15
+ import { RemoveCouponForm } from '../RemoveCouponForm/RemoveCouponForm'
16
16
  import { GetCouponDocument } from './GetCoupon.gql'
17
17
 
18
18
  export type CouponAccordionProps = { sx?: SxProps<Theme> }
@@ -24,7 +24,7 @@ const { withState } = extendableComponent<OwnerState, typeof name, typeof parts>
24
24
 
25
25
  const MotionDiv = styled(m.div)({})
26
26
 
27
- export default function CouponAccordion(props: CouponAccordionProps) {
27
+ export function CouponAccordion(props: CouponAccordionProps) {
28
28
  const { sx = [] } = props
29
29
  const { data } = useCartQuery(GetCouponDocument)
30
30
  const [open, setOpen] = useState<boolean>(false)
@@ -62,6 +62,7 @@ export default function CouponAccordion(props: CouponAccordionProps) {
62
62
  className={classes.button}
63
63
  sx={(theme) => ({
64
64
  justifyContent: 'space-between',
65
+ gap: theme.spacings.sm,
65
66
  padding: `${theme.spacings.xs} ${theme.spacings.sm}`,
66
67
  width: '100%',
67
68
  borderRadius: responsiveVal(theme.shape.borderRadius * 3, theme.shape.borderRadius * 4),
@@ -88,6 +89,7 @@ export default function CouponAccordion(props: CouponAccordionProps) {
88
89
  },
89
90
  '&.disabled': {
90
91
  cursor: 'default',
92
+ justifyContent: 'flex-start',
91
93
  '&:hover': {
92
94
  background: 'transparent',
93
95
  },
@@ -1,6 +1,6 @@
1
1
  import { useFormGqlMutationCart, ApolloCartErrorAlert } from '@graphcommerce/magento-cart'
2
- import { IconSvg, iconCancelAlt, extendableComponent } from '@graphcommerce/next-ui'
3
- import { lighten, Button, Box, SxProps, Theme } from '@mui/material'
2
+ import { extendableComponent } from '@graphcommerce/next-ui'
3
+ import { Box, SxProps, Theme, Chip } from '@mui/material'
4
4
  import { CouponFragment } from '../Api/Coupon.gql'
5
5
  import { RemoveCouponFormDocument } from './RemoveCouponForm.gql'
6
6
 
@@ -10,7 +10,7 @@ const name = 'RemoveCouponForm' as const
10
10
  const parts = ['root', 'button'] as const
11
11
  const { classes } = extendableComponent(name, parts)
12
12
 
13
- export default function RemoveCouponForm(props: RemoveCouponFormProps) {
13
+ export function RemoveCouponForm(props: RemoveCouponFormProps) {
14
14
  const { applied_coupons, sx } = props
15
15
  const form = useFormGqlMutationCart(RemoveCouponFormDocument)
16
16
 
@@ -18,24 +18,15 @@ export default function RemoveCouponForm(props: RemoveCouponFormProps) {
18
18
  const submitHandler = handleSubmit(() => {})
19
19
 
20
20
  return (
21
- <Box component='form' onSubmit={submitHandler} noValidate className={classes.root} sx={sx}>
22
- <Button
23
- type='submit'
24
- variant='text'
25
- color='secondary'
26
- className={classes.button}
27
- endIcon={<IconSvg src={iconCancelAlt} />}
21
+ <Box className={classes.root} sx={sx}>
22
+ <Chip
23
+ label={applied_coupons?.[0]?.code}
24
+ onDelete={submitHandler}
25
+ size='responsive'
28
26
  sx={(theme) => ({
29
- fontWeight: 600,
30
- background: lighten(theme.palette.secondary.light, theme.palette.action.hoverOpacity),
31
- '& svg': {
32
- stroke: 'transparent',
33
- fill: theme.palette.secondary.main,
34
- },
27
+ ...theme.typography.overline,
35
28
  })}
36
- >
37
- {applied_coupons?.[0]?.code}
38
- </Button>
29
+ />
39
30
  <ApolloCartErrorAlert error={error} />
40
31
  </Box>
41
32
  )
package/index.ts CHANGED
@@ -1,10 +1,4 @@
1
1
  export * from './Api/Coupon.gql'
2
-
3
2
  export * from './ApplyCouponForm/ApplyCouponForm'
4
- export { default as ApplyCouponForm } from './ApplyCouponForm/ApplyCouponForm'
5
-
6
3
  export * from './CouponAccordion/CouponAccordion'
7
- export { default as CouponAccordion } from './CouponAccordion/CouponAccordion'
8
-
9
4
  export * from './RemoveCouponForm/RemoveCouponForm'
10
- export { default as RemoveCouponForm } from './RemoveCouponForm/RemoveCouponForm'
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@graphcommerce/magento-cart-coupon",
3
3
  "homepage": "https://www.graphcommerce.org/",
4
4
  "repository": "github:graphcommerce-org/graphcommerce",
5
- "version": "3.0.4",
5
+ "version": "3.0.7",
6
6
  "sideEffects": false,
7
7
  "prettier": "@graphcommerce/prettier-config-pwa",
8
8
  "eslintConfig": {
@@ -12,18 +12,18 @@
12
12
  }
13
13
  },
14
14
  "devDependencies": {
15
- "@graphcommerce/eslint-config-pwa": "^4.0.3",
16
- "@graphcommerce/prettier-config-pwa": "^4.0.2",
15
+ "@graphcommerce/eslint-config-pwa": "^4.1.3",
16
+ "@graphcommerce/prettier-config-pwa": "^4.0.5",
17
17
  "@graphcommerce/typescript-config-pwa": "^4.0.2",
18
- "@playwright/test": "^1.19.1"
18
+ "@playwright/test": "^1.20.1"
19
19
  },
20
20
  "dependencies": {
21
- "@graphcommerce/graphql": "^3.0.3",
22
- "@graphcommerce/image": "^3.1.0",
23
- "@graphcommerce/magento-cart": "^4.1.3",
24
- "@graphcommerce/magento-store": "^4.0.3",
25
- "@graphcommerce/next-ui": "^4.2.0",
26
- "@graphcommerce/react-hook-form": "^3.0.3"
21
+ "@graphcommerce/graphql": "^3.0.6",
22
+ "@graphcommerce/image": "^3.1.2",
23
+ "@graphcommerce/magento-cart": "^4.2.2",
24
+ "@graphcommerce/magento-store": "^4.1.4",
25
+ "@graphcommerce/next-ui": "^4.5.0",
26
+ "@graphcommerce/react-hook-form": "^3.0.6"
27
27
  },
28
28
  "peerDependencies": {
29
29
  "@lingui/macro": "^3.13.2",