@magento/venia-ui 9.7.0 → 10.0.0-beta.1
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/i18n/en_US.json +23 -2
- package/lib/RootComponents/Category/NoProductsFound/noProductsFound.js +1 -1
- package/lib/RootComponents/Category/__tests__/__snapshots__/categoryContent.shimmer.spec.js.snap +6 -0
- package/lib/components/AccountChip/__tests__/__snapshots__/accountChip.spec.js.snap +3 -0
- package/lib/components/AccountChip/accountChip.js +14 -1
- package/lib/components/AccountInformationPage/__tests__/__snapshots__/editForm.spec.js.snap +15 -0
- package/lib/components/AddressBookPage/__tests__/__snapshots__/addEditDialog.spec.js.snap +28 -0
- package/lib/components/App/__tests__/app.spec.js +3 -1
- package/lib/components/App/app.js +1 -1
- package/lib/components/CartPage/GiftCards/__tests__/__snapshots__/giftCards.spec.js.snap +2 -0
- package/lib/components/CartPage/PriceAdjustments/CouponCode/__tests__/__snapshots__/couponCode.spec.js.snap +9 -3
- package/lib/components/CartPage/PriceAdjustments/ShippingMethods/__tests__/__snapshots__/shippingForm.spec.js.snap +15 -0
- package/lib/components/CartPage/PriceSummary/__tests__/__snapshots__/priceSummary.spec.js.snap +0 -2
- package/lib/components/CartPage/PriceSummary/priceSummary.js +2 -0
- package/lib/components/CartPage/ProductListing/EditModal/__tests__/__snapshots__/productForm.spec.js.snap +4 -0
- package/lib/components/CartPage/ProductListing/__tests__/__snapshots__/product.spec.js.snap +6 -0
- package/lib/components/CartPage/ProductListing/__tests__/__snapshots__/quantity.spec.js.snap +1 -0
- package/lib/components/CategoryTree/categoryBranch.js +1 -1
- package/lib/components/CategoryTree/categoryLeaf.js +1 -1
- package/lib/components/CategoryTree/categoryTree.js +1 -1
- package/lib/components/Checkout/__tests__/__snapshots__/addressForm.spec.js.snap +16 -0
- package/lib/components/Checkout/__tests__/__snapshots__/paymentsForm.spec.js.snap +7 -0
- package/lib/components/Checkout/section.module.css +0 -1
- package/lib/components/CheckoutPage/ItemsReview/__tests__/__snapshots__/itemsReview.spec.js.snap +3 -0
- package/lib/components/CheckoutPage/OrderConfirmationPage/__tests__/__snapshots__/createAccount.spec.js.snap +20 -0
- package/lib/components/CheckoutPage/OrderConfirmationPage/createAccount.js +16 -0
- package/lib/components/CheckoutPage/ShippingInformation/AddressForm/__tests__/__snapshots__/customerForm.spec.js.snap +46 -0
- package/lib/components/CheckoutPage/ShippingInformation/AddressForm/__tests__/__snapshots__/guestForm.spec.js.snap +68 -0
- package/lib/components/CheckoutPage/ShippingInformation/AddressForm/customerForm.js +36 -0
- package/lib/components/CheckoutPage/ShippingInformation/AddressForm/guestForm.js +36 -0
- package/lib/components/CheckoutPage/__tests__/__snapshots__/checkoutPage.spec.js.snap +1 -1
- package/lib/components/CheckoutPage/checkoutPage.js +4 -0
- package/lib/components/Country/__tests__/__snapshots__/country.spec.js.snap +2 -0
- package/lib/components/CreateAccount/__tests__/__snapshots__/createAccount.spec.js.snap +36 -10
- package/lib/components/CreateAccount/createAccount.js +18 -0
- package/lib/components/Field/fieldIcons.js +3 -1
- package/lib/components/FilterModalOpenButton/filterModalOpenButton.js +12 -2
- package/lib/components/ForgotPassword/ForgotPasswordForm/__tests__/__snapshots__/forgotPasswordForm.spec.js.snap +2 -0
- package/lib/components/Gallery/__tests__/__snapshots__/gallery.spec.js.snap +2 -0
- package/lib/components/Gallery/__tests__/__snapshots__/item.spec.js.snap +3 -0
- package/lib/components/Gallery/item.js +1 -0
- package/lib/components/Header/__tests__/__snapshots__/accountTrigger.spec.js.snap +1 -1
- package/lib/components/Header/accountTrigger.js +12 -5
- package/lib/components/Image/placeholderImage.js +1 -0
- package/lib/components/LegacyMiniCart/__tests__/__snapshots__/kebab.spec.js.snap +2 -0
- package/lib/components/LegacyMiniCart/__tests__/__snapshots__/miniCart.spec.js.snap +3 -0
- package/lib/components/LegacyMiniCart/kebab.js +14 -0
- package/lib/components/Link/__tests__/link.spec.js +8 -6
- package/lib/components/Link/link.js +1 -1
- package/lib/components/MiniCart/ProductList/__tests__/__snapshots__/item.spec.js.snap +8 -0
- package/lib/components/MiniCart/ProductList/item.js +11 -0
- package/lib/components/MyAccount/ResetPassword/__tests__/__snapshots__/resetPassword.spec.js.snap +16 -4
- package/lib/components/Newsletter/__tests__/__snapshots__/newsletter.spec.js.snap +2 -0
- package/lib/components/OrderHistoryPage/OrderDetails/__tests__/__snapshots__/item.spec.js.snap +1 -0
- package/lib/components/OrderHistoryPage/__tests__/__snapshots__/orderHistoryPage.spec.js.snap +13 -0
- package/lib/components/OrderHistoryPage/__tests__/__snapshots__/orderRow.spec.js.snap +4 -0
- package/lib/components/OrderHistoryPage/__tests__/__snapshots__/resetButton.spec.js.snap +3 -0
- package/lib/components/OrderHistoryPage/collapsedImageGallery.js +3 -3
- package/lib/components/OrderHistoryPage/orderHistoryPage.js +1 -0
- package/lib/components/OrderHistoryPage/orderRow.js +1 -0
- package/lib/components/OrderHistoryPage/resetButton.js +13 -2
- package/lib/components/PageLoadingIndicator/__tests__/pageLoadingIndicator.spec.js +1 -1
- package/lib/components/PageLoadingIndicator/pageLoadingIndicator.js +1 -1
- package/lib/components/Password/__tests__/__snapshots__/password.spec.js.snap +13 -3
- package/lib/components/Password/password.js +24 -2
- package/lib/components/ProductImageCarousel/__tests__/__snapshots__/carousel.spec.js.snap +18 -16
- package/lib/components/ProductImageCarousel/__tests__/__snapshots__/thumbnail.spec.js.snap +12 -12
- package/lib/components/ProductImageCarousel/__tests__/thumbnail.spec.js +2 -2
- package/lib/components/ProductImageCarousel/thumbnail.js +4 -5
- package/lib/components/ProductImageCarousel/thumbnail.module.css +0 -1
- package/lib/components/ProductOptions/__tests__/__snapshots__/swatch.spec.js.snap +6 -0
- package/lib/components/ProductOptions/__tests__/__snapshots__/swatchList.spec.js.snap +1 -0
- package/lib/components/ProductOptions/__tests__/swatch.spec.js +2 -1
- package/lib/components/ProductOptions/option.js +1 -0
- package/lib/components/ProductOptions/swatch.js +5 -2
- package/lib/components/ProductOptions/swatchList.js +5 -2
- package/lib/components/ProductSort/__tests__/__snapshots__/productSort.spec.js.snap +1 -0
- package/lib/components/ProductSort/productSort.js +17 -0
- package/lib/components/QuantityStepper/quantityStepper.module.css +0 -2
- package/lib/components/Region/__tests__/__snapshots__/region.spec.js.snap +3 -0
- package/lib/components/SearchBar/__tests__/__snapshots__/searchField.spec.js.snap +1 -0
- package/lib/components/SearchBar/__tests__/__snapshots__/suggestedProduct.spec.js.snap +1 -0
- package/lib/components/SearchBar/searchBar.js +6 -1
- package/lib/components/SearchBar/searchField.js +4 -2
- package/lib/components/SearchPage/__tests__/__snapshots__/searchPage.spec.js.snap +28 -28
- package/lib/components/SearchPage/searchPage.js +6 -4
- package/lib/components/SignIn/__tests__/__snapshots__/signIn.spec.js.snap +12 -0
- package/lib/components/SignIn/signIn.js +10 -0
- package/lib/components/Trigger/__tests__/__snapshots__/trigger.spec.js.snap +8 -2
- package/lib/components/Trigger/trigger.js +30 -5
- package/lib/components/Wishlist/WishlistDialog/CreateWishlistForm/__tests__/__snapshots__/createWishlistForm.spec.js.snap +2 -0
- package/lib/components/WishlistPage/__tests__/__snapshots__/createWishlist.ee.spec.js.snap +1 -0
- package/lib/components/WishlistPage/__tests__/__snapshots__/wishlistEditFavoritesListDialog.spec.js.snap +4 -0
- package/lib/components/WishlistPage/__tests__/__snapshots__/wishlistItem.spec.js.snap +2 -0
- package/lib/index.module.css +7 -9
- package/package.json +2 -2
|
@@ -54,6 +54,7 @@ exports[`displays an error message if there is a sign in error 1`] = `
|
|
|
54
54
|
className="input"
|
|
55
55
|
>
|
|
56
56
|
<input
|
|
57
|
+
aria-label="Email Required"
|
|
57
58
|
autoComplete="email"
|
|
58
59
|
className="input"
|
|
59
60
|
id="email"
|
|
@@ -67,6 +68,7 @@ exports[`displays an error message if there is a sign in error 1`] = `
|
|
|
67
68
|
className="before"
|
|
68
69
|
/>
|
|
69
70
|
<span
|
|
71
|
+
aria-hidden="false"
|
|
70
72
|
className="after"
|
|
71
73
|
/>
|
|
72
74
|
</span>
|
|
@@ -96,6 +98,7 @@ exports[`displays an error message if there is a sign in error 1`] = `
|
|
|
96
98
|
className="input"
|
|
97
99
|
>
|
|
98
100
|
<input
|
|
101
|
+
aria-label="Password Required"
|
|
99
102
|
autoComplete="current-password"
|
|
100
103
|
className="input"
|
|
101
104
|
id="Password"
|
|
@@ -110,6 +113,7 @@ exports[`displays an error message if there is a sign in error 1`] = `
|
|
|
110
113
|
className="before"
|
|
111
114
|
/>
|
|
112
115
|
<span
|
|
116
|
+
aria-hidden="false"
|
|
113
117
|
className="after"
|
|
114
118
|
>
|
|
115
119
|
<i />
|
|
@@ -182,6 +186,7 @@ exports[`renders correctly 1`] = `
|
|
|
182
186
|
className="input"
|
|
183
187
|
>
|
|
184
188
|
<input
|
|
189
|
+
aria-label="Email Required"
|
|
185
190
|
autoComplete="email"
|
|
186
191
|
className="input"
|
|
187
192
|
id="email"
|
|
@@ -195,6 +200,7 @@ exports[`renders correctly 1`] = `
|
|
|
195
200
|
className="before"
|
|
196
201
|
/>
|
|
197
202
|
<span
|
|
203
|
+
aria-hidden="false"
|
|
198
204
|
className="after"
|
|
199
205
|
/>
|
|
200
206
|
</span>
|
|
@@ -224,6 +230,7 @@ exports[`renders correctly 1`] = `
|
|
|
224
230
|
className="input"
|
|
225
231
|
>
|
|
226
232
|
<input
|
|
233
|
+
aria-label="Password Required"
|
|
227
234
|
autoComplete="current-password"
|
|
228
235
|
className="input"
|
|
229
236
|
id="Password"
|
|
@@ -238,6 +245,7 @@ exports[`renders correctly 1`] = `
|
|
|
238
245
|
className="before"
|
|
239
246
|
/>
|
|
240
247
|
<span
|
|
248
|
+
aria-hidden="false"
|
|
241
249
|
className="after"
|
|
242
250
|
>
|
|
243
251
|
<i />
|
|
@@ -310,6 +318,7 @@ exports[`renders prefilled form with initial values 1`] = `
|
|
|
310
318
|
className="input"
|
|
311
319
|
>
|
|
312
320
|
<input
|
|
321
|
+
aria-label="Email Required"
|
|
313
322
|
autoComplete="email"
|
|
314
323
|
className="input"
|
|
315
324
|
id="email"
|
|
@@ -323,6 +332,7 @@ exports[`renders prefilled form with initial values 1`] = `
|
|
|
323
332
|
className="before"
|
|
324
333
|
/>
|
|
325
334
|
<span
|
|
335
|
+
aria-hidden="false"
|
|
326
336
|
className="after"
|
|
327
337
|
/>
|
|
328
338
|
</span>
|
|
@@ -352,6 +362,7 @@ exports[`renders prefilled form with initial values 1`] = `
|
|
|
352
362
|
className="input"
|
|
353
363
|
>
|
|
354
364
|
<input
|
|
365
|
+
aria-label="Password Required"
|
|
355
366
|
autoComplete="current-password"
|
|
356
367
|
className="input"
|
|
357
368
|
id="Password"
|
|
@@ -366,6 +377,7 @@ exports[`renders prefilled form with initial values 1`] = `
|
|
|
366
377
|
className="before"
|
|
367
378
|
/>
|
|
368
379
|
<span
|
|
380
|
+
aria-hidden="false"
|
|
369
381
|
className="after"
|
|
370
382
|
>
|
|
371
383
|
<i />
|
|
@@ -36,6 +36,7 @@ const SignIn = props => {
|
|
|
36
36
|
const {
|
|
37
37
|
errors,
|
|
38
38
|
handleCreateAccount,
|
|
39
|
+
handleEnterKeyPress,
|
|
39
40
|
handleForgotPassword,
|
|
40
41
|
handleSubmit,
|
|
41
42
|
isBusy,
|
|
@@ -77,6 +78,10 @@ const SignIn = props => {
|
|
|
77
78
|
field="email"
|
|
78
79
|
validate={isRequired}
|
|
79
80
|
data-cy="email"
|
|
81
|
+
aria-label={formatMessage({
|
|
82
|
+
id: 'global.emailRequired',
|
|
83
|
+
defaultMessage: 'Email Required'
|
|
84
|
+
})}
|
|
80
85
|
/>
|
|
81
86
|
</Field>
|
|
82
87
|
<Password
|
|
@@ -91,6 +96,10 @@ const SignIn = props => {
|
|
|
91
96
|
autoComplete="current-password"
|
|
92
97
|
isToggleButtonHidden={false}
|
|
93
98
|
data-cy="password"
|
|
99
|
+
aria-label={formatMessage({
|
|
100
|
+
id: 'global.passwordRequired',
|
|
101
|
+
defaultMessage: 'Password Required'
|
|
102
|
+
})}
|
|
94
103
|
/>
|
|
95
104
|
<div className={classes.forgotPasswordButtonContainer}>
|
|
96
105
|
<LinkButton
|
|
@@ -123,6 +132,7 @@ const SignIn = props => {
|
|
|
123
132
|
type="button"
|
|
124
133
|
onClick={handleCreateAccount}
|
|
125
134
|
data-cy="CreateAccount-initiateButton"
|
|
135
|
+
onKeyDown={handleEnterKeyPress}
|
|
126
136
|
>
|
|
127
137
|
<FormattedMessage
|
|
128
138
|
id={'signIn.createAccountText'}
|
|
@@ -2,7 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
exports[`renders children when supplied 1`] = `
|
|
4
4
|
<button
|
|
5
|
-
|
|
5
|
+
aria-hidden="false"
|
|
6
|
+
aria-label="Close"
|
|
7
|
+
onClick={[Function]}
|
|
8
|
+
onKeyDown={[Function]}
|
|
6
9
|
type="button"
|
|
7
10
|
>
|
|
8
11
|
Unit test child element
|
|
@@ -11,7 +14,10 @@ exports[`renders children when supplied 1`] = `
|
|
|
11
14
|
|
|
12
15
|
exports[`renders the correct tree 1`] = `
|
|
13
16
|
<button
|
|
14
|
-
|
|
17
|
+
aria-hidden="false"
|
|
18
|
+
aria-label="Close"
|
|
19
|
+
onClick={[Function]}
|
|
20
|
+
onKeyDown={[Function]}
|
|
15
21
|
type="button"
|
|
16
22
|
/>
|
|
17
23
|
`;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { useIntl } from 'react-intl';
|
|
2
3
|
import { func, node, shape, string } from 'prop-types';
|
|
3
|
-
|
|
4
4
|
import { useStyle } from '../../classify';
|
|
5
5
|
import defaultClasses from './trigger.module.css';
|
|
6
6
|
|
|
@@ -16,21 +16,46 @@ import defaultClasses from './trigger.module.css';
|
|
|
16
16
|
*/
|
|
17
17
|
const Trigger = props => {
|
|
18
18
|
const {
|
|
19
|
+
addLabel,
|
|
19
20
|
action,
|
|
20
21
|
children,
|
|
21
|
-
ariaLabel,
|
|
22
22
|
classes: propClasses,
|
|
23
23
|
...restProps
|
|
24
24
|
} = props;
|
|
25
|
-
|
|
26
25
|
const classes = useStyle(defaultClasses, propClasses);
|
|
27
26
|
|
|
27
|
+
const { formatMessage } = useIntl();
|
|
28
|
+
const arialabelClear = formatMessage({
|
|
29
|
+
id: 'global.clearText',
|
|
30
|
+
defaultMessage: 'Clear Text'
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
const arialabelClose = formatMessage({
|
|
34
|
+
id: 'global.close',
|
|
35
|
+
defaultMessage: 'Close'
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
let resultedLabel = addLabel ? arialabelClear : arialabelClose;
|
|
39
|
+
|
|
40
|
+
const handleKeypress = () => {
|
|
41
|
+
action();
|
|
42
|
+
resultedLabel = '';
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
const changeAction = e => {
|
|
46
|
+
if (e.keyCode === 13) {
|
|
47
|
+
action();
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
|
|
28
51
|
return (
|
|
29
52
|
<button
|
|
30
53
|
className={classes.root}
|
|
31
54
|
type="button"
|
|
32
|
-
onClick={
|
|
33
|
-
|
|
55
|
+
onClick={handleKeypress}
|
|
56
|
+
onKeyDown={changeAction}
|
|
57
|
+
aria-hidden="false"
|
|
58
|
+
aria-label={resultedLabel}
|
|
34
59
|
{...restProps}
|
|
35
60
|
>
|
|
36
61
|
{children}
|
|
@@ -42,6 +42,7 @@ exports[`disables save if isSaveDisabled is true 1`] = `
|
|
|
42
42
|
className="before"
|
|
43
43
|
/>
|
|
44
44
|
<span
|
|
45
|
+
aria-hidden="false"
|
|
45
46
|
className="after"
|
|
46
47
|
/>
|
|
47
48
|
</span>
|
|
@@ -145,6 +146,7 @@ exports[`renders the correct tree 1`] = `
|
|
|
145
146
|
className="before"
|
|
146
147
|
/>
|
|
147
148
|
<span
|
|
149
|
+
aria-hidden="false"
|
|
148
150
|
className="after"
|
|
149
151
|
/>
|
|
150
152
|
</span>
|
|
@@ -71,6 +71,7 @@ exports[`renders correctly when closed 1`] = `
|
|
|
71
71
|
className="before"
|
|
72
72
|
/>
|
|
73
73
|
<span
|
|
74
|
+
aria-hidden="false"
|
|
74
75
|
className="after"
|
|
75
76
|
/>
|
|
76
77
|
</span>
|
|
@@ -155,6 +156,7 @@ exports[`renders correctly when edit is in progress 1`] = `
|
|
|
155
156
|
className="before"
|
|
156
157
|
/>
|
|
157
158
|
<span
|
|
159
|
+
aria-hidden="false"
|
|
158
160
|
className="after"
|
|
159
161
|
/>
|
|
160
162
|
</span>
|
|
@@ -239,6 +241,7 @@ exports[`renders correctly when opened 1`] = `
|
|
|
239
241
|
className="before"
|
|
240
242
|
/>
|
|
241
243
|
<span
|
|
244
|
+
aria-hidden="false"
|
|
242
245
|
className="after"
|
|
243
246
|
/>
|
|
244
247
|
</span>
|
|
@@ -327,6 +330,7 @@ exports[`renders correctly with error 1`] = `
|
|
|
327
330
|
className="before"
|
|
328
331
|
/>
|
|
329
332
|
<span
|
|
333
|
+
aria-hidden="false"
|
|
330
334
|
className="after"
|
|
331
335
|
/>
|
|
332
336
|
</span>
|
|
@@ -17,6 +17,7 @@ exports[`it renders a configurable wishlist item 1`] = `
|
|
|
17
17
|
>
|
|
18
18
|
<img
|
|
19
19
|
alt="Shoggoth Shirt"
|
|
20
|
+
aria-hidden="true"
|
|
20
21
|
className="image placeholder"
|
|
21
22
|
loading="eager"
|
|
22
23
|
src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHdpZHRoPSc0JyBoZWlnaHQ9JzUnPjxyZWN0IHdpZHRoPSc0JyBoZWlnaHQ9JzUnIHN0eWxlPSdmaWxsOiBub25lJyAvPjwvc3ZnPg=="
|
|
@@ -133,6 +134,7 @@ exports[`it renders a simple wishlist item 1`] = `
|
|
|
133
134
|
>
|
|
134
135
|
<img
|
|
135
136
|
alt="Shoggoth Shirt"
|
|
137
|
+
aria-hidden="true"
|
|
136
138
|
className="image placeholder"
|
|
137
139
|
loading="eager"
|
|
138
140
|
src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHdpZHRoPSc0JyBoZWlnaHQ9JzUnPjxyZWN0IHdpZHRoPSc0JyBoZWlnaHQ9JzUnIHN0eWxlPSdmaWxsOiBub25lJyAvPjwvc3ZnPg=="
|
package/lib/index.module.css
CHANGED
|
@@ -18,15 +18,13 @@
|
|
|
18
18
|
-webkit-font-smoothing: antialiased;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
* }
|
|
29
|
-
*/
|
|
21
|
+
:global(html[data-scroll-lock='true']),
|
|
22
|
+
:global(html[data-scroll-lock='true'] body) {
|
|
23
|
+
height: 100%;
|
|
24
|
+
overflow: hidden;
|
|
25
|
+
position: fixed;
|
|
26
|
+
width: 100%;
|
|
27
|
+
}
|
|
30
28
|
|
|
31
29
|
/* TODO @TW: cannot compose */
|
|
32
30
|
:global(body),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@magento/venia-ui",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "10.0.0-beta.1",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
"peerDependencies": {
|
|
81
81
|
"@apollo/client": "~3.5.0",
|
|
82
82
|
"@magento/babel-preset-peregrine": "~1.2.2",
|
|
83
|
-
"@magento/peregrine": "
|
|
83
|
+
"@magento/peregrine": "13.0.0-beta.1",
|
|
84
84
|
"@magento/pwa-buildpack": "~11.4.1",
|
|
85
85
|
"apollo-cache-persist": "~0.1.1",
|
|
86
86
|
"braintree-web-drop-in": "~1.33.3",
|