@graphcommerce/magento-cart-coupon 3.0.3 → 3.0.6

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,17 +1,47 @@
1
1
  # Change Log
2
2
 
3
+ ## 3.0.6
4
+
5
+ ### Patch Changes
6
+
7
+ - [#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.
8
+
9
+ - Updated dependencies [[`b76d0892a`](https://github.com/graphcommerce-org/graphcommerce/commit/b76d0892a11bd916aefd46ba72c2da00e38ce45b)]:
10
+ - @graphcommerce/next-ui@4.3.2
11
+
12
+ ## 3.0.5
13
+
14
+ ### Patch Changes
15
+
16
+ - [#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.
17
+
18
+ * [#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
19
+
20
+ * 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)]:
21
+ - @graphcommerce/next-ui@4.2.4
22
+ - @graphcommerce/graphql@3.0.4
23
+ - @graphcommerce/image@3.1.1
24
+ - @graphcommerce/magento-cart@4.1.4
25
+ - @graphcommerce/magento-store@4.1.2
26
+ - @graphcommerce/react-hook-form@3.0.4
27
+
28
+ ## 3.0.4
29
+
30
+ ### Patch Changes
31
+
32
+ - [#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
33
+
34
+ - 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)]:
35
+ - @graphcommerce/magento-cart@4.1.3
36
+ - @graphcommerce/next-ui@4.2.0
37
+
3
38
  ## 3.0.3
4
39
 
5
40
  ### Patch Changes
6
41
 
7
- - [`973ff8645`](https://github.com/ho-nl/m2-pwa/commit/973ff86452a70ade9f4db13fdda6e963d7220e96)
8
- Thanks [@paales](https://github.com/paales)! - made packages public
42
+ - [`973ff8645`](https://github.com/ho-nl/m2-pwa/commit/973ff86452a70ade9f4db13fdda6e963d7220e96) Thanks [@paales](https://github.com/paales)! - made packages public
9
43
 
10
- - Updated dependencies
11
- [[`973ff8645`](https://github.com/ho-nl/m2-pwa/commit/973ff86452a70ade9f4db13fdda6e963d7220e96),
12
- [`81ea406d5`](https://github.com/ho-nl/m2-pwa/commit/81ea406d54d6b5c662c030a7fea444abc4117a20),
13
- [`3a719c88c`](https://github.com/ho-nl/m2-pwa/commit/3a719c88cad1eab58602de28c41adc0fc4827e1d),
14
- [`5ffcb56bf`](https://github.com/ho-nl/m2-pwa/commit/5ffcb56bfcbe49ebeaf24f9341e819a145ab9a14)]:
44
+ - 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)]:
15
45
  - @graphcommerce/graphql@3.0.3
16
46
  - @graphcommerce/image@3.1.0
17
47
  - @graphcommerce/magento-cart@4.1.2
@@ -23,30 +53,13 @@
23
53
 
24
54
  ### Patch Changes
25
55
 
26
- - [#1276](https://github.com/ho-nl/m2-pwa/pull/1276)
27
- [`ce09388e0`](https://github.com/ho-nl/m2-pwa/commit/ce09388e0d7ef33aee660612340f6fbae15ceec2)
28
- Thanks [@paales](https://github.com/paales)! - We've moved lots of internal packages from
29
- `dependencies` to `peerDependencies`. The result of this is that there will be significantly less
30
- duplicate packages in the node_modules folders.
31
-
32
- * [#1276](https://github.com/ho-nl/m2-pwa/pull/1276)
33
- [`52a45bba4`](https://github.com/ho-nl/m2-pwa/commit/52a45bba4dc6dd6df3c81f5023df7d23ed8a534d)
34
- Thanks [@paales](https://github.com/paales)! - Upgraded to
35
- [NextJS 12.1](https://nextjs.org/blog/next-12-1)! This is just for compatibility, but we'll be
36
- implementing
37
- [On-demand Incremental Static Regeneration](https://nextjs.org/blog/next-12-1#on-demand-incremental-static-regeneration-beta)
38
- soon.
39
-
40
- This will greatly reduce the requirement to rebuid stuff and we'll add a management UI on the
41
- frontend to be able to revalidate pages manually.
42
-
43
- * Updated dependencies
44
- [[`381e4c86a`](https://github.com/ho-nl/m2-pwa/commit/381e4c86a8321ce96e1fa5c7d3c0a0c0ff3e02c7),
45
- [`ce09388e0`](https://github.com/ho-nl/m2-pwa/commit/ce09388e0d7ef33aee660612340f6fbae15ceec2),
46
- [`e7c8e2756`](https://github.com/ho-nl/m2-pwa/commit/e7c8e2756d637cbcd2e793d62ef5721d35d9fa7b),
47
- [`b08a8eb1d`](https://github.com/ho-nl/m2-pwa/commit/b08a8eb1d024b9d3e7712ef034029151670db275),
48
- [`52a45bba4`](https://github.com/ho-nl/m2-pwa/commit/52a45bba4dc6dd6df3c81f5023df7d23ed8a534d),
49
- [`5a4809b1a`](https://github.com/ho-nl/m2-pwa/commit/5a4809b1a705aa32f620f520085df48ee25f9949)]:
56
+ - [#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.
57
+
58
+ * [#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.
59
+
60
+ 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.
61
+
62
+ * 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)]:
50
63
  - @graphcommerce/magento-cart@4.1.1
51
64
  - @graphcommerce/next-ui@4.1.1
52
65
  - @graphcommerce/react-hook-form@3.0.2
@@ -58,11 +71,8 @@
58
71
 
59
72
  ### Patch Changes
60
73
 
61
- - [`0cbaa878b`](https://github.com/ho-nl/m2-pwa/commit/0cbaa878b8a844d5abbeb1797b625a33130e6514)
62
- Thanks [@paales](https://github.com/paales)! - Added homepage and repository package.json files,
63
- so that the packages link to back to the website and repository
64
- - Updated dependencies
65
- [[`0cbaa878b`](https://github.com/ho-nl/m2-pwa/commit/0cbaa878b8a844d5abbeb1797b625a33130e6514)]:
74
+ - [`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
75
+ - Updated dependencies [[`0cbaa878b`](https://github.com/ho-nl/m2-pwa/commit/0cbaa878b8a844d5abbeb1797b625a33130e6514)]:
66
76
  - @graphcommerce/graphql@3.0.1
67
77
  - @graphcommerce/image@3.0.1
68
78
  - @graphcommerce/magento-cart@4.0.1
@@ -74,14 +84,11 @@
74
84
 
75
85
  ### Major Changes
76
86
 
77
- - [#1258](https://github.com/ho-nl/m2-pwa/pull/1258)
78
- [`ad36382a4`](https://github.com/ho-nl/m2-pwa/commit/ad36382a4d55d83d9e47b7eb6a02671a2a631a05)
79
- Thanks [@paales](https://github.com/paales)! - Upgraded to Material UI 5
87
+ - [#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
80
88
 
81
89
  ### Patch Changes
82
90
 
83
- - Updated dependencies
84
- [[`ad36382a4`](https://github.com/ho-nl/m2-pwa/commit/ad36382a4d55d83d9e47b7eb6a02671a2a631a05)]:
91
+ - Updated dependencies [[`ad36382a4`](https://github.com/ho-nl/m2-pwa/commit/ad36382a4d55d83d9e47b7eb6a02671a2a631a05)]:
85
92
  - @graphcommerce/graphql@3.0.0
86
93
  - @graphcommerce/image@3.0.0
87
94
  - @graphcommerce/magento-cart@4.0.0
@@ -89,69 +96,58 @@
89
96
  - @graphcommerce/next-ui@4.0.0
90
97
  - @graphcommerce/react-hook-form@3.0.0
91
98
 
92
- All notable changes to this project will be documented in this file. See
93
- [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
99
+ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
94
100
 
95
101
  # [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)
96
102
 
97
103
  ### Bug Fixes
98
104
 
99
- - borderRadius
100
- ([ea38c8a](https://github.com/ho-nl/m2-pwa/commit/ea38c8a0d55e3cb8d975082952ad174721fab888))
105
+ - borderRadius ([ea38c8a](https://github.com/ho-nl/m2-pwa/commit/ea38c8a0d55e3cb8d975082952ad174721fab888))
101
106
 
102
107
  ### Features
103
108
 
104
- - borderRadius based on theme.shape.borderRadius
105
- ([7c34937](https://github.com/ho-nl/m2-pwa/commit/7c349376cd41a131c628324c299106fdb7e60484))
109
+ - borderRadius based on theme.shape.borderRadius ([7c34937](https://github.com/ho-nl/m2-pwa/commit/7c349376cd41a131c628324c299106fdb7e60484))
106
110
 
107
111
  # [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)
108
112
 
109
113
  ### Bug Fixes
110
114
 
111
- - even more translations
112
- ([1a1f988](https://github.com/ho-nl/m2-pwa/commit/1a1f98837c704b978f6b42b619d9c52f540b2d48))
115
+ - even more translations ([1a1f988](https://github.com/ho-nl/m2-pwa/commit/1a1f98837c704b978f6b42b619d9c52f540b2d48))
113
116
 
114
117
  ### Features
115
118
 
116
- - added tons of translations
117
- ([9bb0ac7](https://github.com/ho-nl/m2-pwa/commit/9bb0ac709b58df6ea6141e92e4923a5ca9ae2963))
119
+ - added tons of translations ([9bb0ac7](https://github.com/ho-nl/m2-pwa/commit/9bb0ac709b58df6ea6141e92e4923a5ca9ae2963))
118
120
 
119
121
  ## [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)
120
122
 
121
123
  ### Bug Fixes
122
124
 
123
- - RemoveCoupon Button and fix pill-link style to match buttons
124
- ([6838812](https://github.com/ho-nl/m2-pwa/commit/68388123773fb4f79a3e4b1beb7ecca601d7748e))
125
+ - RemoveCoupon Button and fix pill-link style to match buttons ([6838812](https://github.com/ho-nl/m2-pwa/commit/68388123773fb4f79a3e4b1beb7ecca601d7748e))
125
126
 
126
127
  # [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)
127
128
 
128
129
  ### Features
129
130
 
130
- - darkTheme
131
- ([968f4f1](https://github.com/ho-nl/m2-pwa/commit/968f4f1360417bf7daa36454c19e6bc5cf53ae90))
131
+ - darkTheme ([968f4f1](https://github.com/ho-nl/m2-pwa/commit/968f4f1360417bf7daa36454c19e6bc5cf53ae90))
132
132
 
133
133
  ## [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)
134
134
 
135
135
  ### Bug Fixes
136
136
 
137
- - External SVG's can't have alt tags
138
- ([1b1414a](https://github.com/ho-nl/m2-pwa/commit/1b1414a782d55d3acf7b0e6bcaa50f2ad5f18f39))
137
+ - External SVG's can't have alt tags ([1b1414a](https://github.com/ho-nl/m2-pwa/commit/1b1414a782d55d3acf7b0e6bcaa50f2ad5f18f39))
139
138
 
140
139
  ## [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)
141
140
 
142
141
  ### Bug Fixes
143
142
 
144
- - bigger apply coupon button
145
- ([700d8ee](https://github.com/ho-nl/m2-pwa/commit/700d8ee2daedbcdffa63e8e14c9d837feeb29cbc))
146
- - update SvgImage to SvgImageSimple
147
- ([f116543](https://github.com/ho-nl/m2-pwa/commit/f116543730853fa9782abff0ccacee7032e85789))
143
+ - bigger apply coupon button ([700d8ee](https://github.com/ho-nl/m2-pwa/commit/700d8ee2daedbcdffa63e8e14c9d837feeb29cbc))
144
+ - update SvgImage to SvgImageSimple ([f116543](https://github.com/ho-nl/m2-pwa/commit/f116543730853fa9782abff0ccacee7032e85789))
148
145
 
149
146
  # [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)
150
147
 
151
148
  ### Features
152
149
 
153
- - **nextjs:** upgraded to nextjs 12
154
- ([9331bc8](https://github.com/ho-nl/m2-pwa/commit/9331bc801f6419522115cc47d291d49d608d5a90))
150
+ - **nextjs:** upgraded to nextjs 12 ([9331bc8](https://github.com/ho-nl/m2-pwa/commit/9331bc801f6419522115cc47d291d49d608d5a90))
155
151
 
156
152
  ## [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)
157
153
 
@@ -161,123 +157,90 @@ All notable changes to this project will be documented in this file. See
161
157
 
162
158
  ### Bug Fixes
163
159
 
164
- - coupon animations, spacing, rippl;ie
165
- ([cef3a08](https://github.com/ho-nl/m2-pwa/commit/cef3a08d0545947518873c5257c59fc1b98f1a21))
166
- - coupon stylign
167
- ([796bbb2](https://github.com/ho-nl/m2-pwa/commit/796bbb2ad5eda6dc9c5aa37034586705b24a0023))
168
- - ignore md files from triggering version updates
169
- ([4f98392](https://github.com/ho-nl/m2-pwa/commit/4f9839250b3a32d3070da5290e5efcc5e2243fba))
170
- - implement next-ui barrel imports
171
- ([75bea70](https://github.com/ho-nl/m2-pwa/commit/75bea703dba898f18a2a1dfa3243ebd0a4e6f0e1))
172
- - remove coupon form style was too large
173
- ([30df274](https://github.com/ho-nl/m2-pwa/commit/30df274ecdffdcebd76710a5304d6fa248e81211))
174
- - rename NextButton to Button, change imports
175
- ([976adb0](https://github.com/ho-nl/m2-pwa/commit/976adb0bf906310d1efce888dcc9be1e28ce0f1b))
160
+ - coupon animations, spacing, rippl;ie ([cef3a08](https://github.com/ho-nl/m2-pwa/commit/cef3a08d0545947518873c5257c59fc1b98f1a21))
161
+ - coupon stylign ([796bbb2](https://github.com/ho-nl/m2-pwa/commit/796bbb2ad5eda6dc9c5aa37034586705b24a0023))
162
+ - ignore md files from triggering version updates ([4f98392](https://github.com/ho-nl/m2-pwa/commit/4f9839250b3a32d3070da5290e5efcc5e2243fba))
163
+ - implement next-ui barrel imports ([75bea70](https://github.com/ho-nl/m2-pwa/commit/75bea703dba898f18a2a1dfa3243ebd0a4e6f0e1))
164
+ - remove coupon form style was too large ([30df274](https://github.com/ho-nl/m2-pwa/commit/30df274ecdffdcebd76710a5304d6fa248e81211))
165
+ - rename NextButton to Button, change imports ([976adb0](https://github.com/ho-nl/m2-pwa/commit/976adb0bf906310d1efce888dcc9be1e28ce0f1b))
176
166
 
177
167
  ### Features
178
168
 
179
- - **cart:** when a cart is not active anymore show a clear cart button
180
- ([5d04a14](https://github.com/ho-nl/m2-pwa/commit/5d04a14726c040b20b34c0b88f923aee1dff22e5))
181
- - coupon form on payment page
182
- ([a163961](https://github.com/ho-nl/m2-pwa/commit/a1639617be756b357177fcce255cf662c5314499))
183
- - **graphql:** introduced new graphql package that holds all generated files
184
- ([a3e7aa0](https://github.com/ho-nl/m2-pwa/commit/a3e7aa05540540533b5ced9a95f1f802ecbe499f))
185
- - **image:** introduced completely rewritten Image component
186
- ([e3413b3](https://github.com/ho-nl/m2-pwa/commit/e3413b3a57392d6571ea64cb8d9c8dca05ea31df))
187
- - **magento-customer:** introduced ApolloCustomerErrorAlert
188
- ([e5406d9](https://github.com/ho-nl/m2-pwa/commit/e5406d91f914de290c5f097955e312312e567972))
189
- - next.js 11
190
- ([7d61407](https://github.com/ho-nl/m2-pwa/commit/7d614075a778f488045034f74be4f75b93f63c43))
191
- - **playwright:** added new playwright package to enable browser testing
192
- ([6f49ec7](https://github.com/ho-nl/m2-pwa/commit/6f49ec7595563775b96ebf21c27e39da1282e8d9))
193
- - renamed all packages to use [@graphcommerce](https://github.com/graphcommerce) instead of
194
- [@reachdigital](https://github.com/reachdigital)
195
- ([491e4ce](https://github.com/ho-nl/m2-pwa/commit/491e4cec9a2686472dac36b79f999257c0811ffe))
196
- - **theme:** restructured fonts and applied to home and category page
197
- ([6adf5f1](https://github.com/ho-nl/m2-pwa/commit/6adf5f11321bdfbf499125f1161c5abf5a1bfe4a))
198
- - upgraded to nextjs 11
199
- ([0053beb](https://github.com/ho-nl/m2-pwa/commit/0053beb7ef597c190add7264256a0eaec35868da))
200
- - useFormMutationCart and simpler imports
201
- ([012f090](https://github.com/ho-nl/m2-pwa/commit/012f090e8f54d09f35d393c61ad1e2319f5a90ff))
169
+ - **cart:** when a cart is not active anymore show a clear cart button ([5d04a14](https://github.com/ho-nl/m2-pwa/commit/5d04a14726c040b20b34c0b88f923aee1dff22e5))
170
+ - coupon form on payment page ([a163961](https://github.com/ho-nl/m2-pwa/commit/a1639617be756b357177fcce255cf662c5314499))
171
+ - **graphql:** introduced new graphql package that holds all generated files ([a3e7aa0](https://github.com/ho-nl/m2-pwa/commit/a3e7aa05540540533b5ced9a95f1f802ecbe499f))
172
+ - **image:** introduced completely rewritten Image component ([e3413b3](https://github.com/ho-nl/m2-pwa/commit/e3413b3a57392d6571ea64cb8d9c8dca05ea31df))
173
+ - **magento-customer:** introduced ApolloCustomerErrorAlert ([e5406d9](https://github.com/ho-nl/m2-pwa/commit/e5406d91f914de290c5f097955e312312e567972))
174
+ - next.js 11 ([7d61407](https://github.com/ho-nl/m2-pwa/commit/7d614075a778f488045034f74be4f75b93f63c43))
175
+ - **playwright:** added new playwright package to enable browser testing ([6f49ec7](https://github.com/ho-nl/m2-pwa/commit/6f49ec7595563775b96ebf21c27e39da1282e8d9))
176
+ - 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))
177
+ - **theme:** restructured fonts and applied to home and category page ([6adf5f1](https://github.com/ho-nl/m2-pwa/commit/6adf5f11321bdfbf499125f1161c5abf5a1bfe4a))
178
+ - upgraded to nextjs 11 ([0053beb](https://github.com/ho-nl/m2-pwa/commit/0053beb7ef597c190add7264256a0eaec35868da))
179
+ - useFormMutationCart and simpler imports ([012f090](https://github.com/ho-nl/m2-pwa/commit/012f090e8f54d09f35d393c61ad1e2319f5a90ff))
202
180
 
203
181
  ### Reverts
204
182
 
205
- - Revert "chore: upgrade @apollo/client"
206
- ([55ff24e](https://github.com/ho-nl/m2-pwa/commit/55ff24ede0e56c85b8095edadadd1ec5e0b1b8d2))
207
- - Revert "style: coupon input conform design"
208
- ([3ac7182](https://github.com/ho-nl/m2-pwa/commit/3ac7182eb6bb7c86ccba6464d1f206dc30a5a1da))
209
- - Revert "style: coupon accordion icon/button alignment"
210
- ([165f91c](https://github.com/ho-nl/m2-pwa/commit/165f91c8f0e587ea26bcf441f48a6a13df74891c))
183
+ - Revert "chore: upgrade @apollo/client" ([55ff24e](https://github.com/ho-nl/m2-pwa/commit/55ff24ede0e56c85b8095edadadd1ec5e0b1b8d2))
184
+ - Revert "style: coupon input conform design" ([3ac7182](https://github.com/ho-nl/m2-pwa/commit/3ac7182eb6bb7c86ccba6464d1f206dc30a5a1da))
185
+ - Revert "style: coupon accordion icon/button alignment" ([165f91c](https://github.com/ho-nl/m2-pwa/commit/165f91c8f0e587ea26bcf441f48a6a13df74891c))
211
186
 
212
187
  # Change Log
213
188
 
214
- All notable changes to this project will be documented in this file. See
215
- [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
189
+ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
216
190
 
217
191
  # [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)
218
192
 
219
193
  ### Features
220
194
 
221
- - coupon form on payment page
222
- ([a163961](https://github.com/ho-nl/m2-pwa/commit/a1639617be756b357177fcce255cf662c5314499))
195
+ - coupon form on payment page ([a163961](https://github.com/ho-nl/m2-pwa/commit/a1639617be756b357177fcce255cf662c5314499))
223
196
 
224
197
  # [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)
225
198
 
226
199
  ### Bug Fixes
227
200
 
228
- - remove coupon form style was too large
229
- ([30df274](https://github.com/ho-nl/m2-pwa/commit/30df274ecdffdcebd76710a5304d6fa248e81211))
201
+ - remove coupon form style was too large ([30df274](https://github.com/ho-nl/m2-pwa/commit/30df274ecdffdcebd76710a5304d6fa248e81211))
230
202
 
231
203
  ### Features
232
204
 
233
- - upgraded to nextjs 11
234
- ([0053beb](https://github.com/ho-nl/m2-pwa/commit/0053beb7ef597c190add7264256a0eaec35868da))
205
+ - upgraded to nextjs 11 ([0053beb](https://github.com/ho-nl/m2-pwa/commit/0053beb7ef597c190add7264256a0eaec35868da))
235
206
 
236
207
  ## [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)
237
208
 
238
209
  ### Reverts
239
210
 
240
- - Revert "chore: upgrade @apollo/client"
241
- ([55ff24e](https://github.com/ho-nl/m2-pwa/commit/55ff24ede0e56c85b8095edadadd1ec5e0b1b8d2))
211
+ - Revert "chore: upgrade @apollo/client" ([55ff24e](https://github.com/ho-nl/m2-pwa/commit/55ff24ede0e56c85b8095edadadd1ec5e0b1b8d2))
242
212
 
243
213
  # [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)
244
214
 
245
215
  ### Features
246
216
 
247
- - **theme:** restructured fonts and applied to home and category page
248
- ([6adf5f1](https://github.com/ho-nl/m2-pwa/commit/6adf5f11321bdfbf499125f1161c5abf5a1bfe4a))
217
+ - **theme:** restructured fonts and applied to home and category page ([6adf5f1](https://github.com/ho-nl/m2-pwa/commit/6adf5f11321bdfbf499125f1161c5abf5a1bfe4a))
249
218
 
250
219
  ## [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)
251
220
 
252
221
  ### Bug Fixes
253
222
 
254
- - coupon stylign
255
- ([796bbb2](https://github.com/ho-nl/m2-pwa/commit/796bbb2ad5eda6dc9c5aa37034586705b24a0023))
223
+ - coupon stylign ([796bbb2](https://github.com/ho-nl/m2-pwa/commit/796bbb2ad5eda6dc9c5aa37034586705b24a0023))
256
224
 
257
225
  ## [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)
258
226
 
259
227
  ### Bug Fixes
260
228
 
261
- - coupon animations, spacing, rippl;ie
262
- ([cef3a08](https://github.com/ho-nl/m2-pwa/commit/cef3a08d0545947518873c5257c59fc1b98f1a21))
229
+ - coupon animations, spacing, rippl;ie ([cef3a08](https://github.com/ho-nl/m2-pwa/commit/cef3a08d0545947518873c5257c59fc1b98f1a21))
263
230
 
264
231
  ### Reverts
265
232
 
266
- - Revert "style: coupon input conform design"
267
- ([3ac7182](https://github.com/ho-nl/m2-pwa/commit/3ac7182eb6bb7c86ccba6464d1f206dc30a5a1da))
268
- - Revert "style: coupon accordion icon/button alignment"
269
- ([165f91c](https://github.com/ho-nl/m2-pwa/commit/165f91c8f0e587ea26bcf441f48a6a13df74891c))
233
+ - Revert "style: coupon input conform design" ([3ac7182](https://github.com/ho-nl/m2-pwa/commit/3ac7182eb6bb7c86ccba6464d1f206dc30a5a1da))
234
+ - Revert "style: coupon accordion icon/button alignment" ([165f91c](https://github.com/ho-nl/m2-pwa/commit/165f91c8f0e587ea26bcf441f48a6a13df74891c))
270
235
 
271
236
  # [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)
272
237
 
273
238
  ### Features
274
239
 
275
- - **playwright:** added new playwright package to enable browser testing
276
- ([6f49ec7](https://github.com/ho-nl/m2-pwa/commit/6f49ec7595563775b96ebf21c27e39da1282e8d9))
240
+ - **playwright:** added new playwright package to enable browser testing ([6f49ec7](https://github.com/ho-nl/m2-pwa/commit/6f49ec7595563775b96ebf21c27e39da1282e8d9))
277
241
 
278
242
  ## [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)
279
243
 
280
244
  ### Bug Fixes
281
245
 
282
- - ignore md files from triggering version updates
283
- ([4f98392](https://github.com/ho-nl/m2-pwa/commit/4f9839250b3a32d3070da5290e5efcc5e2243fba))
246
+ - ignore md files from triggering version updates ([4f98392](https://github.com/ho-nl/m2-pwa/commit/4f9839250b3a32d3070da5290e5efcc5e2243fba))
@@ -4,15 +4,15 @@ import {
4
4
  iconChevronDown,
5
5
  iconChevronUp,
6
6
  responsiveVal,
7
- SvgIcon,
7
+ IconSvg,
8
8
  extendableComponent,
9
9
  } from '@graphcommerce/next-ui'
10
10
  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
  },
@@ -96,10 +98,10 @@ export default function CouponAccordion(props: CouponAccordionProps) {
96
98
  endIcon={
97
99
  <>
98
100
  {!coupon && open && (
99
- <SvgIcon src={iconChevronUp} size='large' sx={{ display: 'inherit' }} />
101
+ <IconSvg src={iconChevronUp} size='large' sx={{ display: 'inherit' }} />
100
102
  )}
101
103
  {!coupon && !open && (
102
- <SvgIcon src={iconChevronDown} size='large' sx={{ display: 'inherit' }} />
104
+ <IconSvg src={iconChevronDown} size='large' sx={{ display: 'inherit' }} />
103
105
  )}
104
106
  </>
105
107
  }
@@ -1,6 +1,6 @@
1
1
  import { useFormGqlMutationCart, ApolloCartErrorAlert } from '@graphcommerce/magento-cart'
2
- import { SvgIcon, 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={<SvgIcon 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.3",
5
+ "version": "3.0.6",
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.0.5",
16
+ "@graphcommerce/prettier-config-pwa": "^4.0.3",
17
17
  "@graphcommerce/typescript-config-pwa": "^4.0.2",
18
- "@playwright/test": "^1.19.1"
18
+ "@playwright/test": "^1.19.2"
19
19
  },
20
20
  "dependencies": {
21
- "@graphcommerce/graphql": "^3.0.3",
22
- "@graphcommerce/image": "^3.1.0",
23
- "@graphcommerce/magento-cart": "^4.1.2",
24
- "@graphcommerce/magento-store": "^4.0.3",
25
- "@graphcommerce/next-ui": "^4.1.2",
26
- "@graphcommerce/react-hook-form": "^3.0.3"
21
+ "@graphcommerce/graphql": "^3.0.4",
22
+ "@graphcommerce/image": "^3.1.1",
23
+ "@graphcommerce/magento-cart": "^4.1.4",
24
+ "@graphcommerce/magento-store": "^4.1.2",
25
+ "@graphcommerce/next-ui": "^4.3.2",
26
+ "@graphcommerce/react-hook-form": "^3.0.4"
27
27
  },
28
28
  "peerDependencies": {
29
29
  "@lingui/macro": "^3.13.2",