@magento/venia-ui 9.5.0-alpha.2 → 9.6.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 +1 -0
- package/lib/components/AccountInformationPage/__tests__/__snapshots__/editForm.spec.js.snap +3 -0
- package/lib/components/CartPage/ProductListing/__tests__/__snapshots__/product.spec.js.snap +59 -4
- package/lib/components/CategoryTree/categoryBranch.js +4 -2
- package/lib/components/CategoryTree/categoryLeaf.js +3 -1
- package/lib/components/CategoryTree/categoryTree.js +11 -2
- package/lib/components/CheckoutPage/OrderConfirmationPage/__tests__/__snapshots__/createAccount.spec.js.snap +2 -0
- package/lib/components/CheckoutPage/ShippingInformation/AddressForm/__tests__/__snapshots__/guestForm.spec.js.snap +40 -4
- package/lib/components/CheckoutPage/ShippingInformation/AddressForm/guestForm.js +40 -1
- package/lib/components/CreateAccount/__tests__/__snapshots__/createAccount.spec.js.snap +32 -16
- package/lib/components/CreateAccount/createAccount.js +7 -0
- package/lib/components/HomePage/homePage.module.css +0 -1
- package/lib/components/LegacyMiniCart/__tests__/__snapshots__/kebab.spec.js.snap +6 -2
- package/lib/components/LegacyMiniCart/__tests__/__snapshots__/section.spec.js.snap +64 -4
- package/lib/components/LegacyMiniCart/kebab.js +3 -1
- package/lib/components/LegacyMiniCart/kebab.module.css +2 -1
- package/lib/components/LegacyMiniCart/section.js +11 -2
- package/lib/components/MyAccount/ResetPassword/__tests__/__snapshots__/resetPassword.spec.js.snap +6 -2
- package/lib/components/Navigation/__tests__/navigation.spec.js +11 -0
- package/lib/components/Navigation/navigation.js +39 -30
- package/lib/components/Password/__tests__/__snapshots__/password.spec.js.snap +9 -3
- package/lib/components/Password/password.js +1 -1
- package/lib/components/SearchBar/autocomplete.js +6 -2
- package/lib/components/SearchBar/searchField.js +1 -0
- package/lib/components/SignIn/__tests__/__snapshots__/signIn.spec.js.snap +9 -3
- package/lib/components/SignIn/signIn.js +3 -0
- package/lib/tokens.module.css +1 -1
- package/package.json +4 -4
|
@@ -13,7 +13,9 @@ exports[`renders the correct tree 1`] = `
|
|
|
13
13
|
/>
|
|
14
14
|
</h2>
|
|
15
15
|
<div>
|
|
16
|
-
<label
|
|
16
|
+
<label
|
|
17
|
+
htmlFor="firstName"
|
|
18
|
+
>
|
|
17
19
|
First Name
|
|
18
20
|
</label>
|
|
19
21
|
<span
|
|
@@ -27,7 +29,7 @@ exports[`renders the correct tree 1`] = `
|
|
|
27
29
|
<span>
|
|
28
30
|
<input
|
|
29
31
|
autoComplete="given-name"
|
|
30
|
-
id="
|
|
32
|
+
id="firstName"
|
|
31
33
|
name="customer.firstname"
|
|
32
34
|
onBlur={[Function]}
|
|
33
35
|
onChange={[Function]}
|
|
@@ -40,7 +42,9 @@ exports[`renders the correct tree 1`] = `
|
|
|
40
42
|
<p />
|
|
41
43
|
</div>
|
|
42
44
|
<div>
|
|
43
|
-
<label
|
|
45
|
+
<label
|
|
46
|
+
htmlFor="lastName"
|
|
47
|
+
>
|
|
44
48
|
Last Name
|
|
45
49
|
</label>
|
|
46
50
|
<span
|
|
@@ -54,7 +58,7 @@ exports[`renders the correct tree 1`] = `
|
|
|
54
58
|
<span>
|
|
55
59
|
<input
|
|
56
60
|
autoComplete="family-name"
|
|
57
|
-
id="
|
|
61
|
+
id="lastName"
|
|
58
62
|
name="customer.lastname"
|
|
59
63
|
onBlur={[Function]}
|
|
60
64
|
onChange={[Function]}
|
|
@@ -67,7 +71,9 @@ exports[`renders the correct tree 1`] = `
|
|
|
67
71
|
<p />
|
|
68
72
|
</div>
|
|
69
73
|
<div>
|
|
70
|
-
<label
|
|
74
|
+
<label
|
|
75
|
+
htmlFor="Email"
|
|
76
|
+
>
|
|
71
77
|
Email
|
|
72
78
|
</label>
|
|
73
79
|
<span
|
|
@@ -81,7 +87,7 @@ exports[`renders the correct tree 1`] = `
|
|
|
81
87
|
<span>
|
|
82
88
|
<input
|
|
83
89
|
autoComplete="email"
|
|
84
|
-
id="
|
|
90
|
+
id="Email"
|
|
85
91
|
name="customer.email"
|
|
86
92
|
onBlur={[Function]}
|
|
87
93
|
onChange={[Function]}
|
|
@@ -94,7 +100,9 @@ exports[`renders the correct tree 1`] = `
|
|
|
94
100
|
<p />
|
|
95
101
|
</div>
|
|
96
102
|
<div>
|
|
97
|
-
<label
|
|
103
|
+
<label
|
|
104
|
+
htmlFor="Password"
|
|
105
|
+
>
|
|
98
106
|
Password
|
|
99
107
|
</label>
|
|
100
108
|
<span
|
|
@@ -108,7 +116,7 @@ exports[`renders the correct tree 1`] = `
|
|
|
108
116
|
<span>
|
|
109
117
|
<input
|
|
110
118
|
autoComplete="new-password"
|
|
111
|
-
id="
|
|
119
|
+
id="Password"
|
|
112
120
|
name="password"
|
|
113
121
|
onBlur={[Function]}
|
|
114
122
|
onChange={[Function]}
|
|
@@ -243,7 +251,9 @@ exports[`should not render cancel button if isCancelButtonHidden is true 1`] = `
|
|
|
243
251
|
/>
|
|
244
252
|
</h2>
|
|
245
253
|
<div>
|
|
246
|
-
<label
|
|
254
|
+
<label
|
|
255
|
+
htmlFor="firstName"
|
|
256
|
+
>
|
|
247
257
|
First Name
|
|
248
258
|
</label>
|
|
249
259
|
<span
|
|
@@ -257,7 +267,7 @@ exports[`should not render cancel button if isCancelButtonHidden is true 1`] = `
|
|
|
257
267
|
<span>
|
|
258
268
|
<input
|
|
259
269
|
autoComplete="given-name"
|
|
260
|
-
id="
|
|
270
|
+
id="firstName"
|
|
261
271
|
name="customer.firstname"
|
|
262
272
|
onBlur={[Function]}
|
|
263
273
|
onChange={[Function]}
|
|
@@ -270,7 +280,9 @@ exports[`should not render cancel button if isCancelButtonHidden is true 1`] = `
|
|
|
270
280
|
<p />
|
|
271
281
|
</div>
|
|
272
282
|
<div>
|
|
273
|
-
<label
|
|
283
|
+
<label
|
|
284
|
+
htmlFor="lastName"
|
|
285
|
+
>
|
|
274
286
|
Last Name
|
|
275
287
|
</label>
|
|
276
288
|
<span
|
|
@@ -284,7 +296,7 @@ exports[`should not render cancel button if isCancelButtonHidden is true 1`] = `
|
|
|
284
296
|
<span>
|
|
285
297
|
<input
|
|
286
298
|
autoComplete="family-name"
|
|
287
|
-
id="
|
|
299
|
+
id="lastName"
|
|
288
300
|
name="customer.lastname"
|
|
289
301
|
onBlur={[Function]}
|
|
290
302
|
onChange={[Function]}
|
|
@@ -297,7 +309,9 @@ exports[`should not render cancel button if isCancelButtonHidden is true 1`] = `
|
|
|
297
309
|
<p />
|
|
298
310
|
</div>
|
|
299
311
|
<div>
|
|
300
|
-
<label
|
|
312
|
+
<label
|
|
313
|
+
htmlFor="Email"
|
|
314
|
+
>
|
|
301
315
|
Email
|
|
302
316
|
</label>
|
|
303
317
|
<span
|
|
@@ -311,7 +325,7 @@ exports[`should not render cancel button if isCancelButtonHidden is true 1`] = `
|
|
|
311
325
|
<span>
|
|
312
326
|
<input
|
|
313
327
|
autoComplete="email"
|
|
314
|
-
id="
|
|
328
|
+
id="Email"
|
|
315
329
|
name="customer.email"
|
|
316
330
|
onBlur={[Function]}
|
|
317
331
|
onChange={[Function]}
|
|
@@ -324,7 +338,9 @@ exports[`should not render cancel button if isCancelButtonHidden is true 1`] = `
|
|
|
324
338
|
<p />
|
|
325
339
|
</div>
|
|
326
340
|
<div>
|
|
327
|
-
<label
|
|
341
|
+
<label
|
|
342
|
+
htmlFor="Password"
|
|
343
|
+
>
|
|
328
344
|
Password
|
|
329
345
|
</label>
|
|
330
346
|
<span
|
|
@@ -338,7 +354,7 @@ exports[`should not render cancel button if isCancelButtonHidden is true 1`] = `
|
|
|
338
354
|
<span>
|
|
339
355
|
<input
|
|
340
356
|
autoComplete="new-password"
|
|
341
|
-
id="
|
|
357
|
+
id="Password"
|
|
342
358
|
name="password"
|
|
343
359
|
onBlur={[Function]}
|
|
344
360
|
onChange={[Function]}
|
|
@@ -84,12 +84,14 @@ const CreateAccount = props => {
|
|
|
84
84
|
</h2>
|
|
85
85
|
<FormError errors={Array.from(errors.values())} />
|
|
86
86
|
<Field
|
|
87
|
+
id="firstName"
|
|
87
88
|
label={formatMessage({
|
|
88
89
|
id: 'createAccount.firstNameText',
|
|
89
90
|
defaultMessage: 'First Name'
|
|
90
91
|
})}
|
|
91
92
|
>
|
|
92
93
|
<TextInput
|
|
94
|
+
id="firstName"
|
|
93
95
|
field="customer.firstname"
|
|
94
96
|
autoComplete="given-name"
|
|
95
97
|
validate={isRequired}
|
|
@@ -100,12 +102,14 @@ const CreateAccount = props => {
|
|
|
100
102
|
/>
|
|
101
103
|
</Field>
|
|
102
104
|
<Field
|
|
105
|
+
id="lastName"
|
|
103
106
|
label={formatMessage({
|
|
104
107
|
id: 'createAccount.lastNameText',
|
|
105
108
|
defaultMessage: 'Last Name'
|
|
106
109
|
})}
|
|
107
110
|
>
|
|
108
111
|
<TextInput
|
|
112
|
+
id="lastName"
|
|
109
113
|
field="customer.lastname"
|
|
110
114
|
autoComplete="family-name"
|
|
111
115
|
validate={isRequired}
|
|
@@ -116,12 +120,14 @@ const CreateAccount = props => {
|
|
|
116
120
|
/>
|
|
117
121
|
</Field>
|
|
118
122
|
<Field
|
|
123
|
+
id="Email"
|
|
119
124
|
label={formatMessage({
|
|
120
125
|
id: 'createAccount.emailText',
|
|
121
126
|
defaultMessage: 'Email'
|
|
122
127
|
})}
|
|
123
128
|
>
|
|
124
129
|
<TextInput
|
|
130
|
+
id="Email"
|
|
125
131
|
field="customer.email"
|
|
126
132
|
autoComplete="email"
|
|
127
133
|
validate={isRequired}
|
|
@@ -132,6 +138,7 @@ const CreateAccount = props => {
|
|
|
132
138
|
/>
|
|
133
139
|
</Field>
|
|
134
140
|
<Password
|
|
141
|
+
id="Password"
|
|
135
142
|
autoComplete="new-password"
|
|
136
143
|
fieldName="password"
|
|
137
144
|
isToggleButtonHidden={false}
|
|
@@ -18,7 +18,9 @@ exports[`it renders children passed to it 1`] = `
|
|
|
18
18
|
}
|
|
19
19
|
/>
|
|
20
20
|
</button>
|
|
21
|
-
<ul
|
|
21
|
+
<ul
|
|
22
|
+
aria-hidden="true"
|
|
23
|
+
>
|
|
22
24
|
<span />
|
|
23
25
|
<p />
|
|
24
26
|
<div />
|
|
@@ -44,6 +46,8 @@ exports[`it renders correctly without children 1`] = `
|
|
|
44
46
|
}
|
|
45
47
|
/>
|
|
46
48
|
</button>
|
|
47
|
-
<ul
|
|
49
|
+
<ul
|
|
50
|
+
aria-hidden="true"
|
|
51
|
+
/>
|
|
48
52
|
</div>
|
|
49
53
|
`;
|
|
@@ -2,7 +2,22 @@
|
|
|
2
2
|
|
|
3
3
|
exports[`it does not render an icon when not passed one 1`] = `
|
|
4
4
|
<li>
|
|
5
|
-
<button
|
|
5
|
+
<button
|
|
6
|
+
aria-label="Unit Test Text"
|
|
7
|
+
onClick={[Function]}
|
|
8
|
+
onDragStart={[Function]}
|
|
9
|
+
onKeyDown={[Function]}
|
|
10
|
+
onKeyUp={[Function]}
|
|
11
|
+
onMouseDown={[Function]}
|
|
12
|
+
onMouseEnter={[Function]}
|
|
13
|
+
onMouseLeave={[Function]}
|
|
14
|
+
onMouseUp={[Function]}
|
|
15
|
+
onTouchCancel={[Function]}
|
|
16
|
+
onTouchEnd={[Function]}
|
|
17
|
+
onTouchMove={[Function]}
|
|
18
|
+
onTouchStart={[Function]}
|
|
19
|
+
type="button"
|
|
20
|
+
>
|
|
6
21
|
<Icon
|
|
7
22
|
classes={
|
|
8
23
|
Object {
|
|
@@ -20,7 +35,22 @@ exports[`it does not render an icon when not passed one 1`] = `
|
|
|
20
35
|
|
|
21
36
|
exports[`it does not render an icon when passed an invalid one 1`] = `
|
|
22
37
|
<li>
|
|
23
|
-
<button
|
|
38
|
+
<button
|
|
39
|
+
aria-label="Unit Test Text"
|
|
40
|
+
onClick={[Function]}
|
|
41
|
+
onDragStart={[Function]}
|
|
42
|
+
onKeyDown={[Function]}
|
|
43
|
+
onKeyUp={[Function]}
|
|
44
|
+
onMouseDown={[Function]}
|
|
45
|
+
onMouseEnter={[Function]}
|
|
46
|
+
onMouseLeave={[Function]}
|
|
47
|
+
onMouseUp={[Function]}
|
|
48
|
+
onTouchCancel={[Function]}
|
|
49
|
+
onTouchEnd={[Function]}
|
|
50
|
+
onTouchMove={[Function]}
|
|
51
|
+
onTouchStart={[Function]}
|
|
52
|
+
type="button"
|
|
53
|
+
>
|
|
24
54
|
<Icon
|
|
25
55
|
classes={
|
|
26
56
|
Object {
|
|
@@ -38,7 +68,22 @@ exports[`it does not render an icon when passed an invalid one 1`] = `
|
|
|
38
68
|
|
|
39
69
|
exports[`it fills the icon when isFilled is true 1`] = `
|
|
40
70
|
<li>
|
|
41
|
-
<button
|
|
71
|
+
<button
|
|
72
|
+
aria-label="Unit Test Text"
|
|
73
|
+
onClick={[Function]}
|
|
74
|
+
onDragStart={[Function]}
|
|
75
|
+
onKeyDown={[Function]}
|
|
76
|
+
onKeyUp={[Function]}
|
|
77
|
+
onMouseDown={[Function]}
|
|
78
|
+
onMouseEnter={[Function]}
|
|
79
|
+
onMouseLeave={[Function]}
|
|
80
|
+
onMouseUp={[Function]}
|
|
81
|
+
onTouchCancel={[Function]}
|
|
82
|
+
onTouchEnd={[Function]}
|
|
83
|
+
onTouchMove={[Function]}
|
|
84
|
+
onTouchStart={[Function]}
|
|
85
|
+
type="button"
|
|
86
|
+
>
|
|
42
87
|
<Icon
|
|
43
88
|
classes={
|
|
44
89
|
Object {
|
|
@@ -66,7 +111,22 @@ exports[`it fills the icon when isFilled is true 1`] = `
|
|
|
66
111
|
|
|
67
112
|
exports[`it renders an icon when passed a valid one 1`] = `
|
|
68
113
|
<li>
|
|
69
|
-
<button
|
|
114
|
+
<button
|
|
115
|
+
aria-label="Unit Test Text"
|
|
116
|
+
onClick={[Function]}
|
|
117
|
+
onDragStart={[Function]}
|
|
118
|
+
onKeyDown={[Function]}
|
|
119
|
+
onKeyUp={[Function]}
|
|
120
|
+
onMouseDown={[Function]}
|
|
121
|
+
onMouseEnter={[Function]}
|
|
122
|
+
onMouseLeave={[Function]}
|
|
123
|
+
onMouseUp={[Function]}
|
|
124
|
+
onTouchCancel={[Function]}
|
|
125
|
+
onTouchEnd={[Function]}
|
|
126
|
+
onTouchMove={[Function]}
|
|
127
|
+
onTouchStart={[Function]}
|
|
128
|
+
type="button"
|
|
129
|
+
>
|
|
70
130
|
<Icon
|
|
71
131
|
classes={
|
|
72
132
|
Object {
|
|
@@ -20,11 +20,12 @@
|
|
|
20
20
|
transition: 256ms ease-out;
|
|
21
21
|
transform: scale(0);
|
|
22
22
|
transform-origin: 100% 0;
|
|
23
|
+
display: none !important;
|
|
23
24
|
}
|
|
24
25
|
|
|
25
26
|
.dropdown_active {
|
|
26
27
|
composes: dropdown;
|
|
27
|
-
|
|
28
|
+
display: block !important;
|
|
28
29
|
composes: absolute from global;
|
|
29
30
|
transform: scale(1);
|
|
30
31
|
transition: 250ms var(--venia-global-anim-bounce);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { useRef } from 'react';
|
|
2
2
|
import { bool, func, oneOf, shape, string } from 'prop-types';
|
|
3
3
|
import {
|
|
4
4
|
Edit2 as Edit2Icon,
|
|
@@ -10,6 +10,7 @@ import { useStyle } from '../../classify';
|
|
|
10
10
|
import Icon from '../Icon';
|
|
11
11
|
|
|
12
12
|
import defaultClasses from './section.module.css';
|
|
13
|
+
import { useButton } from 'react-aria';
|
|
13
14
|
|
|
14
15
|
const icons = new Map()
|
|
15
16
|
.set('Heart', HeartIcon)
|
|
@@ -30,6 +31,13 @@ const Section = props => {
|
|
|
30
31
|
const iconClasses = { root: classes.icon };
|
|
31
32
|
const iconSrc = icons.get(icon);
|
|
32
33
|
|
|
34
|
+
const buttonRef = useRef();
|
|
35
|
+
|
|
36
|
+
const { buttonProps: buttonAriaProps } = useButton(
|
|
37
|
+
{ type: 'button', onPress: onClick, 'aria-label': text },
|
|
38
|
+
buttonRef
|
|
39
|
+
);
|
|
40
|
+
|
|
33
41
|
if (isFilled) {
|
|
34
42
|
iconClasses.root = classes.icon_filled;
|
|
35
43
|
}
|
|
@@ -37,8 +45,9 @@ const Section = props => {
|
|
|
37
45
|
return (
|
|
38
46
|
<li className={classes.menuItem} {...restProps}>
|
|
39
47
|
<button
|
|
48
|
+
ref={buttonRef}
|
|
40
49
|
className={classes.button}
|
|
41
|
-
|
|
50
|
+
{...buttonAriaProps}
|
|
42
51
|
data-cy="LegacyMiniCart-Section-button"
|
|
43
52
|
>
|
|
44
53
|
<Icon classes={iconClasses} size={16} src={iconSrc} />
|
package/lib/components/MyAccount/ResetPassword/__tests__/__snapshots__/resetPassword.spec.js.snap
CHANGED
|
@@ -76,7 +76,9 @@ exports[`should render formErrors 1`] = `
|
|
|
76
76
|
<p />
|
|
77
77
|
</div>
|
|
78
78
|
<div>
|
|
79
|
-
<label
|
|
79
|
+
<label
|
|
80
|
+
htmlFor="Password"
|
|
81
|
+
>
|
|
80
82
|
New Password
|
|
81
83
|
</label>
|
|
82
84
|
<span
|
|
@@ -225,7 +227,9 @@ exports[`should render properly 1`] = `
|
|
|
225
227
|
<p />
|
|
226
228
|
</div>
|
|
227
229
|
<div>
|
|
228
|
-
<label
|
|
230
|
+
<label
|
|
231
|
+
htmlFor="Password"
|
|
232
|
+
>
|
|
229
233
|
New Password
|
|
230
234
|
</label>
|
|
231
235
|
<span
|
|
@@ -21,6 +21,17 @@ jest.mock('../../Header/currencySwitcher', () => () => 'CurrencySwitcher');
|
|
|
21
21
|
|
|
22
22
|
jest.mock('@magento/peregrine/lib/talons/Navigation/useNavigation');
|
|
23
23
|
|
|
24
|
+
jest.mock('react-aria', () => ({
|
|
25
|
+
FocusScope: jest.fn(({ children }) => {
|
|
26
|
+
return children;
|
|
27
|
+
})
|
|
28
|
+
}));
|
|
29
|
+
|
|
30
|
+
jest.mock('../../Portal', () => ({
|
|
31
|
+
Portal: jest.fn(({ children }) => {
|
|
32
|
+
return children;
|
|
33
|
+
})
|
|
34
|
+
}));
|
|
24
35
|
/*
|
|
25
36
|
* Tests.
|
|
26
37
|
*/
|
|
@@ -10,7 +10,8 @@ import StoreSwitcher from '../Header/storeSwitcher';
|
|
|
10
10
|
import LoadingIndicator from '../LoadingIndicator';
|
|
11
11
|
import NavHeader from './navHeader';
|
|
12
12
|
import defaultClasses from './navigation.module.css';
|
|
13
|
-
|
|
13
|
+
import { FocusScope } from 'react-aria';
|
|
14
|
+
import { Portal } from '../Portal';
|
|
14
15
|
const AuthModal = React.lazy(() => import('../AuthModal'));
|
|
15
16
|
|
|
16
17
|
const Navigation = props => {
|
|
@@ -35,6 +36,7 @@ const Navigation = props => {
|
|
|
35
36
|
const rootClassName = isOpen ? classes.root_open : classes.root;
|
|
36
37
|
const modalClassName = hasModal ? classes.modal_open : classes.modal;
|
|
37
38
|
const bodyClassName = hasModal ? classes.body_masked : classes.body;
|
|
39
|
+
const tabindex = isOpen ? '0' : '-1';
|
|
38
40
|
|
|
39
41
|
// Lazy load the auth modal because it may not be needed.
|
|
40
42
|
const authModal = hasModal ? (
|
|
@@ -52,35 +54,42 @@ const Navigation = props => {
|
|
|
52
54
|
) : null;
|
|
53
55
|
|
|
54
56
|
return (
|
|
55
|
-
<
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
57
|
+
<Portal>
|
|
58
|
+
{/* eslint-disable-next-line jsx-a11y/no-autofocus */}
|
|
59
|
+
<FocusScope contain={isOpen} restoreFocus autoFocus>
|
|
60
|
+
{/* eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions */}
|
|
61
|
+
<aside className={rootClassName}>
|
|
62
|
+
<header className={classes.header}>
|
|
63
|
+
<NavHeader
|
|
64
|
+
isTopLevel={isTopLevel}
|
|
65
|
+
onBack={handleBack}
|
|
66
|
+
view={view}
|
|
67
|
+
/>
|
|
68
|
+
</header>
|
|
69
|
+
<div className={bodyClassName}>
|
|
70
|
+
<CategoryTree
|
|
71
|
+
categoryId={categoryId}
|
|
72
|
+
onNavigate={handleClose}
|
|
73
|
+
setCategoryId={setCategoryId}
|
|
74
|
+
updateCategories={catalogActions.updateCategories}
|
|
75
|
+
tabindex={tabindex}
|
|
76
|
+
/>
|
|
77
|
+
</div>
|
|
78
|
+
<div className={classes.footer}>
|
|
79
|
+
<div className={classes.switchers}>
|
|
80
|
+
<StoreSwitcher />
|
|
81
|
+
<CurrencySwitcher />
|
|
82
|
+
</div>
|
|
83
|
+
<AuthBar
|
|
84
|
+
disabled={hasModal}
|
|
85
|
+
showMyAccount={showMyAccount}
|
|
86
|
+
showSignIn={showSignIn}
|
|
87
|
+
/>
|
|
88
|
+
</div>
|
|
89
|
+
<div className={modalClassName}>{authModal}</div>
|
|
90
|
+
</aside>
|
|
91
|
+
</FocusScope>
|
|
92
|
+
</Portal>
|
|
84
93
|
);
|
|
85
94
|
};
|
|
86
95
|
|
|
@@ -7,7 +7,9 @@ exports[`should render properly 1`] = `
|
|
|
7
7
|
onSubmit={[Function]}
|
|
8
8
|
>
|
|
9
9
|
<div>
|
|
10
|
-
<label
|
|
10
|
+
<label
|
|
11
|
+
htmlFor="Password"
|
|
12
|
+
>
|
|
11
13
|
Password
|
|
12
14
|
</label>
|
|
13
15
|
<span
|
|
@@ -44,7 +46,9 @@ exports[`should render show button if visible is false 1`] = `
|
|
|
44
46
|
onSubmit={[Function]}
|
|
45
47
|
>
|
|
46
48
|
<div>
|
|
47
|
-
<label
|
|
49
|
+
<label
|
|
50
|
+
htmlFor="Password"
|
|
51
|
+
>
|
|
48
52
|
Password
|
|
49
53
|
</label>
|
|
50
54
|
<span
|
|
@@ -121,7 +125,9 @@ exports[`should render toggle button if isToggleButtonHidden is false 1`] = `
|
|
|
121
125
|
onSubmit={[Function]}
|
|
122
126
|
>
|
|
123
127
|
<div>
|
|
124
|
-
<label
|
|
128
|
+
<label
|
|
129
|
+
htmlFor="Password"
|
|
130
|
+
>
|
|
125
131
|
Password
|
|
126
132
|
</label>
|
|
127
133
|
<span
|
|
@@ -40,7 +40,7 @@ const Password = props => {
|
|
|
40
40
|
const fieldType = visible ? 'text' : 'password';
|
|
41
41
|
|
|
42
42
|
return (
|
|
43
|
-
<Field label={label} classes={{ root: classes.root }}>
|
|
43
|
+
<Field id="Password" label={label} classes={{ root: classes.root }}>
|
|
44
44
|
<TextInput
|
|
45
45
|
after={!isToggleButtonHidden && passwordButton}
|
|
46
46
|
autoComplete={autoComplete}
|
|
@@ -137,9 +137,13 @@ const Autocomplete = props => {
|
|
|
137
137
|
|
|
138
138
|
return (
|
|
139
139
|
<div data-cy="Autocomplete-root" className={rootClassName}>
|
|
140
|
-
<
|
|
140
|
+
<label
|
|
141
|
+
id="search_query"
|
|
142
|
+
data-cy="Autocomplete-message"
|
|
143
|
+
className={classes.message}
|
|
144
|
+
>
|
|
141
145
|
{message}
|
|
142
|
-
</
|
|
146
|
+
</label>
|
|
143
147
|
<div className={classes.suggestions}>
|
|
144
148
|
<Suggestions
|
|
145
149
|
displayResult={displayResult}
|
|
@@ -37,6 +37,7 @@ exports[`displays an error message if there is a sign in error 1`] = `
|
|
|
37
37
|
>
|
|
38
38
|
<label
|
|
39
39
|
className="label"
|
|
40
|
+
htmlFor="email"
|
|
40
41
|
>
|
|
41
42
|
Email address
|
|
42
43
|
</label>
|
|
@@ -78,6 +79,7 @@ exports[`displays an error message if there is a sign in error 1`] = `
|
|
|
78
79
|
>
|
|
79
80
|
<label
|
|
80
81
|
className="label"
|
|
82
|
+
htmlFor="Password"
|
|
81
83
|
>
|
|
82
84
|
Password
|
|
83
85
|
</label>
|
|
@@ -96,7 +98,7 @@ exports[`displays an error message if there is a sign in error 1`] = `
|
|
|
96
98
|
<input
|
|
97
99
|
autoComplete="current-password"
|
|
98
100
|
className="input"
|
|
99
|
-
id="
|
|
101
|
+
id="Password"
|
|
100
102
|
name="password"
|
|
101
103
|
onBlur={[Function]}
|
|
102
104
|
onChange={[Function]}
|
|
@@ -163,6 +165,7 @@ exports[`renders correctly 1`] = `
|
|
|
163
165
|
>
|
|
164
166
|
<label
|
|
165
167
|
className="label"
|
|
168
|
+
htmlFor="email"
|
|
166
169
|
>
|
|
167
170
|
Email address
|
|
168
171
|
</label>
|
|
@@ -204,6 +207,7 @@ exports[`renders correctly 1`] = `
|
|
|
204
207
|
>
|
|
205
208
|
<label
|
|
206
209
|
className="label"
|
|
210
|
+
htmlFor="Password"
|
|
207
211
|
>
|
|
208
212
|
Password
|
|
209
213
|
</label>
|
|
@@ -222,7 +226,7 @@ exports[`renders correctly 1`] = `
|
|
|
222
226
|
<input
|
|
223
227
|
autoComplete="current-password"
|
|
224
228
|
className="input"
|
|
225
|
-
id="
|
|
229
|
+
id="Password"
|
|
226
230
|
name="password"
|
|
227
231
|
onBlur={[Function]}
|
|
228
232
|
onChange={[Function]}
|
|
@@ -289,6 +293,7 @@ exports[`renders prefilled form with initial values 1`] = `
|
|
|
289
293
|
>
|
|
290
294
|
<label
|
|
291
295
|
className="label"
|
|
296
|
+
htmlFor="email"
|
|
292
297
|
>
|
|
293
298
|
Email address
|
|
294
299
|
</label>
|
|
@@ -330,6 +335,7 @@ exports[`renders prefilled form with initial values 1`] = `
|
|
|
330
335
|
>
|
|
331
336
|
<label
|
|
332
337
|
className="label"
|
|
338
|
+
htmlFor="Password"
|
|
333
339
|
>
|
|
334
340
|
Password
|
|
335
341
|
</label>
|
|
@@ -348,7 +354,7 @@ exports[`renders prefilled form with initial values 1`] = `
|
|
|
348
354
|
<input
|
|
349
355
|
autoComplete="current-password"
|
|
350
356
|
className="input"
|
|
351
|
-
id="
|
|
357
|
+
id="Password"
|
|
352
358
|
name="password"
|
|
353
359
|
onBlur={[Function]}
|
|
354
360
|
onChange={[Function]}
|