@magento/venia-ui 9.6.0-beta.1 → 9.7.0-alpha.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/Accordion/__tests__/__snapshots__/accordion.spec.js.snap +2 -0
- package/lib/components/Accordion/section.js +1 -0
- package/lib/components/AddToCartDialog/__tests__/__snapshots__/addToCartDialog.spec.js.snap +11 -0
- package/lib/components/AddToCartDialog/__tests__/addToCartDialog.spec.js +1 -0
- package/lib/components/AddToCartDialog/addToCartDialog.js +4 -1
- package/lib/components/CartPage/PriceAdjustments/__tests__/__snapshots__/priceAdjustments.spec.js.snap +2 -0
- package/lib/components/CartPage/ProductListing/EditModal/__tests__/__snapshots__/productForm.spec.js.snap +22 -0
- package/lib/components/CartPage/ProductListing/EditModal/__tests__/productForm.spec.js +1 -0
- package/lib/components/CartPage/ProductListing/EditModal/productForm.js +2 -0
- package/lib/components/CartPage/ProductListing/__tests__/__snapshots__/product.spec.js.snap +3 -0
- package/lib/components/CategoryTree/categoryBranch.js +3 -3
- package/lib/components/CategoryTree/categoryLeaf.js +3 -3
- package/lib/components/CategoryTree/categoryTree.js +4 -4
- package/lib/components/CheckoutPage/PaymentInformation/paymentMethods.js +2 -0
- package/lib/components/CheckoutPage/PaymentInformation/paymentMethods.module.css +1 -3
- package/lib/components/FilterSidebar/filterSidebar.js +0 -1
- package/lib/components/Gallery/__tests__/__snapshots__/gallery.spec.js.snap +0 -6
- package/lib/components/Gallery/__tests__/__snapshots__/item.spec.js.snap +0 -2
- package/lib/components/Gallery/gallery.js +1 -6
- package/lib/components/Gallery/item.js +3 -9
- package/lib/components/Header/__tests__/__snapshots__/accountTrigger.spec.js.snap +1 -0
- package/lib/components/Header/accountTrigger.js +1 -0
- package/lib/components/LegacyMiniCart/__tests__/__snapshots__/kebab.spec.js.snap +2 -0
- package/lib/components/LegacyMiniCart/kebab.js +2 -1
- package/lib/components/LegacyMiniCart/kebab.module.css +0 -1
- package/lib/components/Logo/logo.js +1 -0
- package/lib/components/MegaMenu/__tests__/__snapshots__/MegaMenu.spec.js.snap +3 -0
- package/lib/components/MegaMenu/__tests__/__snapshots__/MegaMenuItem.spec.js.snap +2 -0
- package/lib/components/MegaMenu/megaMenuItem.js +4 -0
- package/lib/components/Navigation/navigation.js +2 -2
- package/lib/components/Pagination/navButton.module.css +5 -0
- package/lib/components/Pagination/tile.module.css +0 -1
- package/lib/components/ProductFullDetail/__tests__/__snapshots__/productFullDetail.spec.js.snap +576 -298
- package/lib/components/ProductFullDetail/__tests__/productFullDetail.spec.js +16 -0
- package/lib/components/ProductFullDetail/productFullDetail.js +37 -20
- package/lib/components/ProductFullDetail/productFullDetail.module.css +3 -0
- package/lib/components/ProductOptions/__tests__/__snapshots__/swatch.spec.js.snap +51 -0
- package/lib/components/ProductOptions/__tests__/__snapshots__/tile.spec.js.snap +28 -0
- package/lib/components/ProductOptions/__tests__/swatch.spec.js +52 -0
- package/lib/components/ProductOptions/__tests__/tile.spec.js +48 -0
- package/lib/components/ProductOptions/option.js +5 -1
- package/lib/components/ProductOptions/options.js +12 -2
- package/lib/components/ProductOptions/swatch.js +27 -5
- package/lib/components/ProductOptions/swatch.module.css +17 -0
- package/lib/components/ProductOptions/swatchList.js +25 -4
- package/lib/components/ProductOptions/tile.js +24 -5
- package/lib/components/ProductOptions/tile.module.css +20 -0
- package/lib/components/ProductOptions/tileList.js +25 -2
- package/lib/components/ProductSort/__tests__/__snapshots__/productSort.spec.js.snap +0 -1
- package/lib/components/ProductSort/productSort.js +0 -1
- package/lib/components/SearchPage/__tests__/__snapshots__/searchPage.spec.js.snap +28 -9
- package/lib/components/SearchPage/searchPage.js +6 -6
- package/lib/components/SortedByContainer/sortedByContainer.js +1 -1
- package/package.json +2 -2
package/i18n/en_US.json
CHANGED
|
@@ -360,6 +360,7 @@
|
|
|
360
360
|
"productFullDetail.productDescription": "Product Description",
|
|
361
361
|
"productFullDetail.details": "Details",
|
|
362
362
|
"productFullDetail.unavailableProduct": "This product is currently unavailable for purchase.",
|
|
363
|
+
"productFullDetail.outOfStockProduct": "This item is currently out of stock",
|
|
363
364
|
"productImageCarousel.previousButtonAriaLabel": "Previous Image",
|
|
364
365
|
"productImageCarousel.nextButtonAriaLabel": "Next Image",
|
|
365
366
|
"productList.each": " ea.",
|
|
@@ -8,6 +8,7 @@ exports[`it renders a closed Section correctly 1`] = `
|
|
|
8
8
|
className="root"
|
|
9
9
|
>
|
|
10
10
|
<button
|
|
11
|
+
aria-expanded={false}
|
|
11
12
|
className="title_container"
|
|
12
13
|
onClick={[Function]}
|
|
13
14
|
type="button"
|
|
@@ -59,6 +60,7 @@ exports[`it renders an open Section correctly 1`] = `
|
|
|
59
60
|
className="root"
|
|
60
61
|
>
|
|
61
62
|
<button
|
|
63
|
+
aria-expanded={true}
|
|
62
64
|
className="title_container"
|
|
63
65
|
onClick={[Function]}
|
|
64
66
|
type="button"
|
|
@@ -22,6 +22,7 @@ const AddToCartDialog = props => {
|
|
|
22
22
|
configurableOptionProps,
|
|
23
23
|
formErrors,
|
|
24
24
|
handleOnClose,
|
|
25
|
+
outOfStockVariants,
|
|
25
26
|
imageProps,
|
|
26
27
|
isFetchingProductDetail,
|
|
27
28
|
priceProps
|
|
@@ -60,6 +61,7 @@ const AddToCartDialog = props => {
|
|
|
60
61
|
root: undefined,
|
|
61
62
|
title: classes.optionTitle
|
|
62
63
|
}}
|
|
64
|
+
outOfStockVariants={outOfStockVariants}
|
|
63
65
|
/>
|
|
64
66
|
<Button {...buttonProps}>
|
|
65
67
|
<FormattedMessage
|
|
@@ -83,7 +85,8 @@ const AddToCartDialog = props => {
|
|
|
83
85
|
configurableOptionProps,
|
|
84
86
|
imageComponent,
|
|
85
87
|
item,
|
|
86
|
-
priceComponent
|
|
88
|
+
priceComponent,
|
|
89
|
+
outOfStockVariants
|
|
87
90
|
]);
|
|
88
91
|
|
|
89
92
|
const titleElement = isFetchingProductDetail ? (
|
|
@@ -5,6 +5,7 @@ exports[`it renders Venia price adjustments 1`] = `
|
|
|
5
5
|
<div>
|
|
6
6
|
<div>
|
|
7
7
|
<button
|
|
8
|
+
aria-expanded={false}
|
|
8
9
|
onClick={[Function]}
|
|
9
10
|
type="button"
|
|
10
11
|
>
|
|
@@ -37,6 +38,7 @@ exports[`it renders Venia price adjustments 1`] = `
|
|
|
37
38
|
</div>
|
|
38
39
|
<div>
|
|
39
40
|
<button
|
|
41
|
+
aria-expanded={false}
|
|
40
42
|
onClick={[Function]}
|
|
41
43
|
type="button"
|
|
42
44
|
>
|
|
@@ -176,6 +176,17 @@ https://master-7rqtwti-mfwmkrjfqvbjk.us-4.magentosite.cloud/media/catalog/produc
|
|
|
176
176
|
"option4",
|
|
177
177
|
]
|
|
178
178
|
}
|
|
179
|
+
outOfStockVariants={
|
|
180
|
+
Array [
|
|
181
|
+
Array [
|
|
182
|
+
55,
|
|
183
|
+
56,
|
|
184
|
+
],
|
|
185
|
+
Array [
|
|
186
|
+
31,
|
|
187
|
+
],
|
|
188
|
+
]
|
|
189
|
+
}
|
|
179
190
|
selectedValues={
|
|
180
191
|
Array [
|
|
181
192
|
"option1",
|
|
@@ -533,6 +544,17 @@ https://master-7rqtwti-mfwmkrjfqvbjk.us-4.magentosite.cloud/media/catalog/produc
|
|
|
533
544
|
"option4",
|
|
534
545
|
]
|
|
535
546
|
}
|
|
547
|
+
outOfStockVariants={
|
|
548
|
+
Array [
|
|
549
|
+
Array [
|
|
550
|
+
55,
|
|
551
|
+
56,
|
|
552
|
+
],
|
|
553
|
+
Array [
|
|
554
|
+
31,
|
|
555
|
+
],
|
|
556
|
+
]
|
|
557
|
+
}
|
|
536
558
|
selectedValues={
|
|
537
559
|
Array [
|
|
538
560
|
"option1",
|
|
@@ -31,6 +31,7 @@ const ProductForm = props => {
|
|
|
31
31
|
errors,
|
|
32
32
|
handleOptionSelection,
|
|
33
33
|
handleSubmit,
|
|
34
|
+
outOfStockVariants,
|
|
34
35
|
isLoading,
|
|
35
36
|
isSaving,
|
|
36
37
|
isDialogOpen,
|
|
@@ -103,6 +104,7 @@ const ProductForm = props => {
|
|
|
103
104
|
onSelectionChange={handleOptionSelection}
|
|
104
105
|
options={configItem.configurable_options}
|
|
105
106
|
selectedValues={cartItem.configurable_options}
|
|
107
|
+
outOfStockVariants={outOfStockVariants}
|
|
106
108
|
/>
|
|
107
109
|
<h3 className={classes.quantityLabel}>
|
|
108
110
|
<FormattedMessage
|
|
@@ -223,6 +223,7 @@ exports[`renders configurable product with options 1`] = `
|
|
|
223
223
|
className="root"
|
|
224
224
|
>
|
|
225
225
|
<button
|
|
226
|
+
aria-expanded={false}
|
|
226
227
|
className="kebab"
|
|
227
228
|
onClick={[Function]}
|
|
228
229
|
>
|
|
@@ -583,6 +584,7 @@ exports[`renders out of stock product 1`] = `
|
|
|
583
584
|
className="root"
|
|
584
585
|
>
|
|
585
586
|
<button
|
|
587
|
+
aria-expanded={false}
|
|
586
588
|
className="kebab"
|
|
587
589
|
onClick={[Function]}
|
|
588
590
|
>
|
|
@@ -896,6 +898,7 @@ exports[`renders simple product correctly 1`] = `
|
|
|
896
898
|
className="root"
|
|
897
899
|
>
|
|
898
900
|
<button
|
|
901
|
+
aria-expanded={false}
|
|
899
902
|
className="kebab"
|
|
900
903
|
onClick={[Function]}
|
|
901
904
|
>
|
|
@@ -6,7 +6,7 @@ import { useStyle } from '../../classify';
|
|
|
6
6
|
import defaultClasses from './categoryBranch.module.css';
|
|
7
7
|
|
|
8
8
|
const Branch = props => {
|
|
9
|
-
const { category, setCategoryId,
|
|
9
|
+
const { category, setCategoryId, tabIndex } = props;
|
|
10
10
|
const { name } = category;
|
|
11
11
|
const classes = useStyle(defaultClasses, props.classes);
|
|
12
12
|
|
|
@@ -20,7 +20,7 @@ const Branch = props => {
|
|
|
20
20
|
return (
|
|
21
21
|
<li className={classes.root}>
|
|
22
22
|
<button
|
|
23
|
-
|
|
23
|
+
tabIndex={tabIndex}
|
|
24
24
|
className={classes.target}
|
|
25
25
|
data-cy="CategoryTree-Branch-target"
|
|
26
26
|
type="button"
|
|
@@ -46,5 +46,5 @@ Branch.propTypes = {
|
|
|
46
46
|
text: string
|
|
47
47
|
}),
|
|
48
48
|
setCategoryId: func.isRequired,
|
|
49
|
-
|
|
49
|
+
tabIndex: func.isRequired
|
|
50
50
|
};
|
|
@@ -9,7 +9,7 @@ import { useStyle } from '../../classify';
|
|
|
9
9
|
import defaultClasses from './categoryLeaf.module.css';
|
|
10
10
|
|
|
11
11
|
const Leaf = props => {
|
|
12
|
-
const { category, onNavigate, categoryUrlSuffix,
|
|
12
|
+
const { category, onNavigate, categoryUrlSuffix, tabIndex } = props;
|
|
13
13
|
const { name, url_path, children } = category;
|
|
14
14
|
const classes = useStyle(defaultClasses, props.classes);
|
|
15
15
|
const { handleClick } = useCategoryLeaf({ onNavigate });
|
|
@@ -35,7 +35,7 @@ const Leaf = props => {
|
|
|
35
35
|
data-cy="CategoryTree-Leaf-target"
|
|
36
36
|
to={destination}
|
|
37
37
|
onClick={handleClick}
|
|
38
|
-
tabIndex={
|
|
38
|
+
tabIndex={tabIndex}
|
|
39
39
|
>
|
|
40
40
|
<span className={classes.text}>{leafLabel}</span>
|
|
41
41
|
</Link>
|
|
@@ -56,6 +56,6 @@ Leaf.propTypes = {
|
|
|
56
56
|
text: string
|
|
57
57
|
}),
|
|
58
58
|
onNavigate: func.isRequired,
|
|
59
|
-
|
|
59
|
+
tabIndex: func.isRequired,
|
|
60
60
|
categoryUrlSuffix: string
|
|
61
61
|
};
|
|
@@ -13,7 +13,7 @@ const Tree = props => {
|
|
|
13
13
|
onNavigate,
|
|
14
14
|
setCategoryId,
|
|
15
15
|
updateCategories,
|
|
16
|
-
|
|
16
|
+
tabIndex
|
|
17
17
|
} = props;
|
|
18
18
|
|
|
19
19
|
const talonProps = useCategoryTree({
|
|
@@ -35,14 +35,14 @@ const Tree = props => {
|
|
|
35
35
|
category={category}
|
|
36
36
|
onNavigate={onNavigate}
|
|
37
37
|
categoryUrlSuffix={categoryUrlSuffix}
|
|
38
|
-
|
|
38
|
+
tabIndex={tabIndex}
|
|
39
39
|
/>
|
|
40
40
|
) : (
|
|
41
41
|
<Branch
|
|
42
42
|
key={id}
|
|
43
43
|
category={category}
|
|
44
44
|
setCategoryId={setCategoryId}
|
|
45
|
-
|
|
45
|
+
tabIndex={tabIndex}
|
|
46
46
|
/>
|
|
47
47
|
);
|
|
48
48
|
})
|
|
@@ -66,5 +66,5 @@ Tree.propTypes = {
|
|
|
66
66
|
onNavigate: func.isRequired,
|
|
67
67
|
setCategoryId: func.isRequired,
|
|
68
68
|
updateCategories: func.isRequired,
|
|
69
|
-
|
|
69
|
+
tabIndex: func.isRequired
|
|
70
70
|
};
|
|
@@ -28,6 +28,7 @@ const PaymentMethods = props => {
|
|
|
28
28
|
const {
|
|
29
29
|
availablePaymentMethods,
|
|
30
30
|
currentSelectedPaymentMethod,
|
|
31
|
+
handlePaymentMethodSelection,
|
|
31
32
|
initialSelectedMethod,
|
|
32
33
|
isLoading
|
|
33
34
|
} = talonProps;
|
|
@@ -65,6 +66,7 @@ const PaymentMethods = props => {
|
|
|
65
66
|
label: classes.radio_label
|
|
66
67
|
}}
|
|
67
68
|
checked={isSelected}
|
|
69
|
+
onChange={handlePaymentMethodSelection}
|
|
68
70
|
/>
|
|
69
71
|
{renderedComponent}
|
|
70
72
|
</div>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
.root {
|
|
2
2
|
composes: grid from global;
|
|
3
3
|
composes: p-md from global;
|
|
4
|
-
composes: pb-
|
|
4
|
+
composes: pb-s from global;
|
|
5
5
|
}
|
|
6
6
|
|
|
7
7
|
.radio_group {
|
|
@@ -14,8 +14,6 @@
|
|
|
14
14
|
composes: border-subtle from global;
|
|
15
15
|
composes: pb-xs from global;
|
|
16
16
|
composes: pt-xs from global;
|
|
17
|
-
|
|
18
|
-
composes: last_pt-0 from global;
|
|
19
17
|
}
|
|
20
18
|
|
|
21
19
|
/* TODO @TW: cannot compose */
|
|
@@ -3,15 +3,12 @@
|
|
|
3
3
|
exports[`renders if \`items\` is an array of objects 1`] = `
|
|
4
4
|
<div
|
|
5
5
|
aria-busy="false"
|
|
6
|
-
aria-live="polite"
|
|
7
6
|
className="root"
|
|
8
7
|
>
|
|
9
8
|
<div
|
|
10
9
|
className="items"
|
|
11
10
|
>
|
|
12
11
|
<div
|
|
13
|
-
aria-busy="false"
|
|
14
|
-
aria-live="polite"
|
|
15
12
|
className="root"
|
|
16
13
|
>
|
|
17
14
|
<div
|
|
@@ -106,8 +103,6 @@ exports[`renders if \`items\` is an array of objects 1`] = `
|
|
|
106
103
|
</div>
|
|
107
104
|
</div>
|
|
108
105
|
<div
|
|
109
|
-
aria-busy="false"
|
|
110
|
-
aria-live="polite"
|
|
111
106
|
className="root"
|
|
112
107
|
>
|
|
113
108
|
<div
|
|
@@ -208,7 +203,6 @@ exports[`renders if \`items\` is an array of objects 1`] = `
|
|
|
208
203
|
exports[`renders if \`items\` is an empty array 1`] = `
|
|
209
204
|
<div
|
|
210
205
|
aria-busy="false"
|
|
211
|
-
aria-live="polite"
|
|
212
206
|
className="root"
|
|
213
207
|
>
|
|
214
208
|
<div
|
|
@@ -37,12 +37,7 @@ const Gallery = props => {
|
|
|
37
37
|
);
|
|
38
38
|
|
|
39
39
|
return (
|
|
40
|
-
<div
|
|
41
|
-
data-cy="Gallery-root"
|
|
42
|
-
className={classes.root}
|
|
43
|
-
aria-live="polite"
|
|
44
|
-
aria-busy="false"
|
|
45
|
-
>
|
|
40
|
+
<div data-cy="Gallery-root" className={classes.root} aria-busy="false">
|
|
46
41
|
<div className={classes.items}>{galleryItems}</div>
|
|
47
42
|
</div>
|
|
48
43
|
);
|
|
@@ -14,7 +14,7 @@ import GalleryItemShimmer from './item.shimmer';
|
|
|
14
14
|
import defaultClasses from './item.module.css';
|
|
15
15
|
import WishlistGalleryButton from '../Wishlist/AddToListButton';
|
|
16
16
|
|
|
17
|
-
import
|
|
17
|
+
import AddToCartButton from './addToCartButton';
|
|
18
18
|
// eslint-disable-next-line no-unused-vars
|
|
19
19
|
import Rating from '../Rating';
|
|
20
20
|
|
|
@@ -58,7 +58,7 @@ const GalleryItem = props => {
|
|
|
58
58
|
) : null;
|
|
59
59
|
|
|
60
60
|
const addButton = isSupportedProductType ? (
|
|
61
|
-
<
|
|
61
|
+
<AddToCartButton item={item} urlSuffix={productUrlSuffix} />
|
|
62
62
|
) : (
|
|
63
63
|
<div className={classes.unavailableContainer}>
|
|
64
64
|
<Info />
|
|
@@ -83,13 +83,7 @@ const GalleryItem = props => {
|
|
|
83
83
|
// ) : null;
|
|
84
84
|
|
|
85
85
|
return (
|
|
86
|
-
<div
|
|
87
|
-
data-cy="GalleryItem-root"
|
|
88
|
-
className={classes.root}
|
|
89
|
-
aria-live="polite"
|
|
90
|
-
aria-busy="false"
|
|
91
|
-
ref={itemRef}
|
|
92
|
-
>
|
|
86
|
+
<div data-cy="GalleryItem-root" className={classes.root} ref={itemRef}>
|
|
93
87
|
<Link
|
|
94
88
|
onClick={handleLinkClick}
|
|
95
89
|
to={productLink}
|
|
@@ -36,6 +36,7 @@ const AccountTrigger = props => {
|
|
|
36
36
|
<Fragment>
|
|
37
37
|
<div className={rootClassName} ref={accountMenuTriggerRef}>
|
|
38
38
|
<button
|
|
39
|
+
aria-expanded={accountMenuIsOpen}
|
|
39
40
|
aria-label={formatMessage({
|
|
40
41
|
id: 'accountTrigger.ariaLabel',
|
|
41
42
|
defaultMessage: 'Toggle My Account Menu'
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
exports[`it renders children passed to it 1`] = `
|
|
4
4
|
<div>
|
|
5
5
|
<button
|
|
6
|
+
aria-expanded={false}
|
|
6
7
|
onClick={[Function]}
|
|
7
8
|
>
|
|
8
9
|
<Icon
|
|
@@ -31,6 +32,7 @@ exports[`it renders children passed to it 1`] = `
|
|
|
31
32
|
exports[`it renders correctly without children 1`] = `
|
|
32
33
|
<div>
|
|
33
34
|
<button
|
|
35
|
+
aria-expanded={false}
|
|
34
36
|
onClick={[Function]}
|
|
35
37
|
>
|
|
36
38
|
<Icon
|
|
@@ -17,6 +17,7 @@ const Kebab = props => {
|
|
|
17
17
|
return (
|
|
18
18
|
<div className={classes.root}>
|
|
19
19
|
<button
|
|
20
|
+
aria-expanded={isOpen}
|
|
20
21
|
className={classes.kebab}
|
|
21
22
|
data-cy="Kebab-button"
|
|
22
23
|
onClick={handleKebabClick}
|
|
@@ -24,7 +25,7 @@ const Kebab = props => {
|
|
|
24
25
|
>
|
|
25
26
|
<Icon src={MoreVerticalIcon} />
|
|
26
27
|
</button>
|
|
27
|
-
<ul aria-hidden=
|
|
28
|
+
<ul aria-hidden={isOpen ? 'false' : 'true'} className={toggleClass}>
|
|
28
29
|
{children}
|
|
29
30
|
</ul>
|
|
30
31
|
</div>
|
|
@@ -14,6 +14,7 @@ exports[`#MegaMenu renders menu if in viewport 1`] = `
|
|
|
14
14
|
>
|
|
15
15
|
<div
|
|
16
16
|
className="megaMenuItem"
|
|
17
|
+
onFocus={[Function]}
|
|
17
18
|
onMouseEnter={[Function]}
|
|
18
19
|
onMouseLeave={[Function]}
|
|
19
20
|
onTouchStart={[Function]}
|
|
@@ -79,6 +80,7 @@ exports[`#MegaMenu renders menu if in viewport 1`] = `
|
|
|
79
80
|
</div>
|
|
80
81
|
<div
|
|
81
82
|
className="megaMenuItem"
|
|
83
|
+
onFocus={[Function]}
|
|
82
84
|
onMouseEnter={[Function]}
|
|
83
85
|
onMouseLeave={[Function]}
|
|
84
86
|
onTouchStart={[Function]}
|
|
@@ -94,6 +96,7 @@ exports[`#MegaMenu renders menu if in viewport 1`] = `
|
|
|
94
96
|
</div>
|
|
95
97
|
<div
|
|
96
98
|
className="megaMenuItem"
|
|
99
|
+
onFocus={[Function]}
|
|
97
100
|
onMouseEnter={[Function]}
|
|
98
101
|
onMouseLeave={[Function]}
|
|
99
102
|
onTouchStart={[Function]}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
exports[`Mega menu item renders correctly it does not render submenu when item does not have children 1`] = `
|
|
4
4
|
<div
|
|
5
5
|
className="megaMenuItem"
|
|
6
|
+
onFocus={[Function]}
|
|
6
7
|
onMouseEnter={[Function]}
|
|
7
8
|
onMouseLeave={[Function]}
|
|
8
9
|
onTouchStart={[Function]}
|
|
@@ -37,6 +38,7 @@ exports[`Mega menu item renders correctly it does not render submenu when item d
|
|
|
37
38
|
exports[`Mega menu item renders correctly it renders correctly 1`] = `
|
|
38
39
|
<div
|
|
39
40
|
className="megaMenuItem"
|
|
41
|
+
onFocus={[Function]}
|
|
40
42
|
onMouseEnter={[Function]}
|
|
41
43
|
onMouseLeave={[Function]}
|
|
42
44
|
onTouchStart={[Function]}
|
|
@@ -99,6 +99,10 @@ const MegaMenuItem = props => {
|
|
|
99
99
|
handleSubMenuFocus();
|
|
100
100
|
handleMenuItemFocus();
|
|
101
101
|
}}
|
|
102
|
+
onFocus={() => {
|
|
103
|
+
handleSubMenuFocus();
|
|
104
|
+
handleMenuItemFocus();
|
|
105
|
+
}}
|
|
102
106
|
onTouchStart={() => {
|
|
103
107
|
handleSubMenuFocus();
|
|
104
108
|
handleMenuItemFocus();
|
|
@@ -36,7 +36,7 @@ const Navigation = props => {
|
|
|
36
36
|
const rootClassName = isOpen ? classes.root_open : classes.root;
|
|
37
37
|
const modalClassName = hasModal ? classes.modal_open : classes.modal;
|
|
38
38
|
const bodyClassName = hasModal ? classes.body_masked : classes.body;
|
|
39
|
-
const
|
|
39
|
+
const tabIndex = isOpen ? '0' : '-1';
|
|
40
40
|
|
|
41
41
|
// Lazy load the auth modal because it may not be needed.
|
|
42
42
|
const authModal = hasModal ? (
|
|
@@ -72,7 +72,7 @@ const Navigation = props => {
|
|
|
72
72
|
onNavigate={handleClose}
|
|
73
73
|
setCategoryId={setCategoryId}
|
|
74
74
|
updateCategories={catalogActions.updateCategories}
|
|
75
|
-
|
|
75
|
+
tabIndex={tabIndex}
|
|
76
76
|
/>
|
|
77
77
|
</div>
|
|
78
78
|
<div className={classes.footer}>
|