@magento/venia-ui 9.4.0-alpha.1 → 9.5.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 +2 -0
- package/lib/RootComponents/CMS/__tests__/cms.spec.js +4 -0
- package/lib/RootComponents/Category/__tests__/__snapshots__/categoryContent.spec.js.snap +9 -0
- package/lib/RootComponents/Category/category.js +19 -1
- package/lib/RootComponents/Category/categoryContent.js +1 -1
- package/lib/components/AccountInformationPage/__tests__/__snapshots__/accountInformationPage.spec.js.snap +1 -0
- package/lib/components/AccountInformationPage/accountInformationPage.js +1 -0
- package/lib/components/AddressBookPage/__tests__/__snapshots__/addressBookPage.spec.js.snap +3 -0
- package/lib/components/AddressBookPage/addressBookPage.js +5 -1
- package/lib/components/AddressBookPage/addressBookPage.module.css +3 -0
- package/lib/components/CartPage/__tests__/__snapshots__/cartPage.spec.js.snap +2 -0
- package/lib/components/CartPage/cartPage.js +5 -1
- package/lib/components/CheckoutPage/AddressBook/__tests__/__snapshots__/addressBook.spec.js.snap +2 -0
- package/lib/components/CheckoutPage/AddressBook/addressBook.js +1 -1
- package/lib/components/CheckoutPage/GuestSignIn/__tests__/__snapshots__/guestSignIn.spec.js.snap +3 -0
- package/lib/components/CheckoutPage/GuestSignIn/guestSignIn.js +1 -1
- package/lib/components/CheckoutPage/ItemsReview/itemsReview.js +1 -1
- package/lib/components/CheckoutPage/OrderSummary/__tests__/__snapshots__/orderSummary.spec.js.snap +1 -0
- package/lib/components/CheckoutPage/OrderSummary/orderSummary.js +1 -1
- package/lib/components/CheckoutPage/PaymentInformation/brainTreeDropIn.js +7 -2
- package/lib/components/CheckoutPage/__tests__/__snapshots__/checkoutPage.spec.js.snap +1 -0
- package/lib/components/CheckoutPage/checkoutPage.js +1 -0
- package/lib/components/CreateAccount/__tests__/createAccount.spec.js +4 -0
- package/lib/components/Footer/__tests__/__snapshots__/footer.spec.js.snap +1 -0
- package/lib/components/Footer/footer.js +8 -2
- package/lib/components/Gallery/__tests__/gallery.spec.js +3 -0
- package/lib/components/Gallery/__tests__/item.spec.js +3 -0
- package/lib/components/Gallery/item.js +16 -4
- package/lib/components/Header/__tests__/__snapshots__/cartTrigger.spec.js.snap +6 -0
- package/lib/components/Header/__tests__/__snapshots__/currencySwitcher.spec.js.snap +16 -2
- package/lib/components/Header/__tests__/__snapshots__/storeSwitcher.spec.js.snap +17 -0
- package/lib/components/Header/cartTrigger.js +2 -0
- package/lib/components/Header/currencySwitcher.js +8 -2
- package/lib/components/Header/header.js +5 -0
- package/lib/components/Header/storeSwitcher.js +9 -4
- package/lib/components/Logo/logo.js +0 -1
- package/lib/components/MiniCart/miniCart.js +1 -0
- package/lib/components/MyAccount/ResetPassword/__tests__/__snapshots__/resetPassword.spec.js.snap +12 -4
- package/lib/components/MyAccount/ResetPassword/resetPassword.js +1 -1
- package/lib/components/OrderHistoryPage/__tests__/__snapshots__/orderHistoryPage.spec.js.snap +5 -0
- package/lib/components/OrderHistoryPage/orderHistoryPage.js +3 -1
- package/lib/components/PageLoadingIndicator/__tests__/__snapshots__/pageLoadingIndicator.spec.js.snap +21 -0
- package/lib/components/PageLoadingIndicator/__tests__/pageLoadingIndicator.spec.js +4 -4
- package/lib/components/PageLoadingIndicator/pageLoadingIndicator.js +6 -2
- package/lib/components/PageLoadingIndicator/pageLoadingIndicator.module.css +6 -1
- package/lib/components/ProductFullDetail/__tests__/__snapshots__/productFullDetail.spec.js.snap +104 -91
- package/lib/components/ProductFullDetail/productFullDetail.js +4 -3
- package/lib/components/ProductFullDetail/productFullDetail.module.css +8 -5
- package/lib/components/SavedPaymentsPage/__tests__/__snapshots__/savedPaymentsPage.spec.js.snap +2 -0
- package/lib/components/SavedPaymentsPage/savedPaymentsPage.js +3 -1
- package/lib/components/SearchBar/__tests__/autocomplete.spec.js +25 -10
- package/lib/components/SearchBar/__tests__/suggestedProduct.spec.js +3 -0
- package/lib/components/SearchBar/autocomplete.js +4 -0
- package/lib/components/SearchBar/suggestedProduct.js +29 -16
- package/lib/components/SearchPage/__tests__/__snapshots__/searchPage.spec.js.snap +22 -0
- package/lib/components/SearchPage/searchPage.js +11 -3
- package/lib/components/SignIn/__tests__/signIn.spec.js +4 -0
- package/lib/components/SortedByContainer/sortedByContainer.module.css +0 -2
- package/lib/components/StoreCodeRoute/__tests__/storeCodeRoute.spec.js +2 -2
- package/lib/components/StoreCodeRoute/storeCodeRoute.js +3 -3
- package/lib/components/WishlistPage/__tests__/__snapshots__/wishlistPage.spec.js.snap +5 -0
- package/lib/components/WishlistPage/wishlistPage.js +5 -1
- package/lib/index.module.css +14 -0
- package/lib/targets/__tests__/venia-ui-targets.spec.js +2 -2
- package/lib/tokens.module.css +1 -1
- package/package.json +6 -6
|
@@ -21,6 +21,8 @@ exports[`Search Page Component error view does not render when data is present 1
|
|
|
21
21
|
id="searchPage.searchTermEmpty"
|
|
22
22
|
/>
|
|
23
23
|
<span
|
|
24
|
+
aria-busy="true"
|
|
25
|
+
aria-live="polite"
|
|
24
26
|
className="totalPages"
|
|
25
27
|
>
|
|
26
28
|
0 items
|
|
@@ -90,6 +92,7 @@ exports[`Search Page Component error view renders when data is not present and n
|
|
|
90
92
|
/>
|
|
91
93
|
</div>
|
|
92
94
|
<div
|
|
95
|
+
aria-live="polite"
|
|
93
96
|
className="noResult"
|
|
94
97
|
>
|
|
95
98
|
<mock-FormattedMessage
|
|
@@ -133,6 +136,8 @@ exports[`Search Page Component filter button/modal does not render if there are
|
|
|
133
136
|
id="searchPage.searchTermEmpty"
|
|
134
137
|
/>
|
|
135
138
|
<span
|
|
139
|
+
aria-busy="true"
|
|
140
|
+
aria-live="polite"
|
|
136
141
|
className="totalPages"
|
|
137
142
|
>
|
|
138
143
|
0 items
|
|
@@ -210,6 +215,8 @@ exports[`Search Page Component filter button/modal renders when there are filter
|
|
|
210
215
|
id="searchPage.searchTermEmpty"
|
|
211
216
|
/>
|
|
212
217
|
<span
|
|
218
|
+
aria-busy="true"
|
|
219
|
+
aria-live="polite"
|
|
213
220
|
className="totalPages"
|
|
214
221
|
>
|
|
215
222
|
0 items
|
|
@@ -443,6 +450,7 @@ exports[`Search Page Component search results does not render if data returned h
|
|
|
443
450
|
<SortedByContainerShimmer />
|
|
444
451
|
</div>
|
|
445
452
|
<div
|
|
453
|
+
aria-live="polite"
|
|
446
454
|
className="noResult"
|
|
447
455
|
>
|
|
448
456
|
<mock-FormattedMessage
|
|
@@ -486,6 +494,8 @@ exports[`Search Page Component search results heading renders a generic message
|
|
|
486
494
|
id="searchPage.searchTermEmpty"
|
|
487
495
|
/>
|
|
488
496
|
<span
|
|
497
|
+
aria-busy="true"
|
|
498
|
+
aria-live="polite"
|
|
489
499
|
className="totalPages"
|
|
490
500
|
>
|
|
491
501
|
1 items
|
|
@@ -594,6 +604,8 @@ exports[`Search Page Component search results heading renders a specific message
|
|
|
594
604
|
}
|
|
595
605
|
/>
|
|
596
606
|
<span
|
|
607
|
+
aria-busy="true"
|
|
608
|
+
aria-live="polite"
|
|
597
609
|
className="totalPages"
|
|
598
610
|
>
|
|
599
611
|
1 items
|
|
@@ -764,6 +776,8 @@ exports[`Search Page Component sort button/container does not render if total co
|
|
|
764
776
|
id="searchPage.searchTermEmpty"
|
|
765
777
|
/>
|
|
766
778
|
<span
|
|
779
|
+
aria-busy="true"
|
|
780
|
+
aria-live="polite"
|
|
767
781
|
className="totalPages"
|
|
768
782
|
>
|
|
769
783
|
0 items
|
|
@@ -774,6 +788,7 @@ exports[`Search Page Component sort button/container does not render if total co
|
|
|
774
788
|
/>
|
|
775
789
|
</div>
|
|
776
790
|
<div
|
|
791
|
+
aria-live="polite"
|
|
777
792
|
className="noResult"
|
|
778
793
|
>
|
|
779
794
|
<mock-FormattedMessage
|
|
@@ -817,6 +832,8 @@ exports[`Search Page Component sort button/container renders when total count >
|
|
|
817
832
|
id="searchPage.searchTermEmpty"
|
|
818
833
|
/>
|
|
819
834
|
<span
|
|
835
|
+
aria-busy="true"
|
|
836
|
+
aria-live="polite"
|
|
820
837
|
className="totalPages"
|
|
821
838
|
>
|
|
822
839
|
1 items
|
|
@@ -918,6 +935,8 @@ exports[`Search Page Component total count renders 0 items if data.products.tota
|
|
|
918
935
|
id="searchPage.searchTermEmpty"
|
|
919
936
|
/>
|
|
920
937
|
<span
|
|
938
|
+
aria-busy="true"
|
|
939
|
+
aria-live="polite"
|
|
921
940
|
className="totalPages"
|
|
922
941
|
>
|
|
923
942
|
0 items
|
|
@@ -928,6 +947,7 @@ exports[`Search Page Component total count renders 0 items if data.products.tota
|
|
|
928
947
|
/>
|
|
929
948
|
</div>
|
|
930
949
|
<div
|
|
950
|
+
aria-live="polite"
|
|
931
951
|
className="noResult"
|
|
932
952
|
>
|
|
933
953
|
<mock-FormattedMessage
|
|
@@ -971,6 +991,8 @@ exports[`Search Page Component total count renders results from data 1`] = `
|
|
|
971
991
|
id="searchPage.searchTermEmpty"
|
|
972
992
|
/>
|
|
973
993
|
<span
|
|
994
|
+
aria-busy="true"
|
|
995
|
+
aria-live="polite"
|
|
974
996
|
className="totalPages"
|
|
975
997
|
>
|
|
976
998
|
1 items
|
|
@@ -55,7 +55,7 @@ const SearchPage = props => {
|
|
|
55
55
|
|
|
56
56
|
if (!data && error) {
|
|
57
57
|
return (
|
|
58
|
-
<div className={classes.noResult}>
|
|
58
|
+
<div aria-live="polite" className={classes.noResult}>
|
|
59
59
|
<FormattedMessage
|
|
60
60
|
id={'searchPage.noResult'}
|
|
61
61
|
defaultMessage={
|
|
@@ -72,7 +72,11 @@ const SearchPage = props => {
|
|
|
72
72
|
|
|
73
73
|
if (data.products.items.length === 0) {
|
|
74
74
|
return (
|
|
75
|
-
<div
|
|
75
|
+
<div
|
|
76
|
+
aria-live="polite"
|
|
77
|
+
className={classes.noResult}
|
|
78
|
+
data-cy="SearchPage-noResult"
|
|
79
|
+
>
|
|
76
80
|
<FormattedMessage
|
|
77
81
|
id={'searchPage.noResultImportant'}
|
|
78
82
|
defaultMessage={'No results found!'}
|
|
@@ -169,7 +173,11 @@ const SearchPage = props => {
|
|
|
169
173
|
|
|
170
174
|
const itemCountHeading =
|
|
171
175
|
data && !loading ? (
|
|
172
|
-
<span
|
|
176
|
+
<span
|
|
177
|
+
aria-live="polite"
|
|
178
|
+
aria-busy="true"
|
|
179
|
+
className={classes.totalPages}
|
|
180
|
+
>
|
|
173
181
|
{formatMessage(
|
|
174
182
|
{
|
|
175
183
|
id: 'searchPage.totalPages',
|
|
@@ -63,6 +63,10 @@ jest.mock('@magento/peregrine/lib/hooks/useAwaitQuery', () => {
|
|
|
63
63
|
return { useAwaitQuery };
|
|
64
64
|
});
|
|
65
65
|
|
|
66
|
+
jest.mock('@magento/peregrine/lib/context/eventing', () => ({
|
|
67
|
+
useEventingContext: jest.fn().mockReturnValue([{}, { dispatch: jest.fn() }])
|
|
68
|
+
}));
|
|
69
|
+
|
|
66
70
|
const props = {
|
|
67
71
|
setDefaultUsername: jest.fn(),
|
|
68
72
|
showCreateAccount: jest.fn(),
|
|
@@ -18,7 +18,7 @@ beforeEach(() => {
|
|
|
18
18
|
global.AVAILABLE_STORE_VIEWS = [
|
|
19
19
|
{
|
|
20
20
|
base_currency_code: 'USD',
|
|
21
|
-
|
|
21
|
+
store_code: 'default',
|
|
22
22
|
default_display_currency_code: 'USD',
|
|
23
23
|
id: 1,
|
|
24
24
|
locale: 'en_US',
|
|
@@ -27,7 +27,7 @@ beforeEach(() => {
|
|
|
27
27
|
},
|
|
28
28
|
{
|
|
29
29
|
base_currency_code: 'EUR',
|
|
30
|
-
|
|
30
|
+
store_code: 'french',
|
|
31
31
|
default_display_currency_code: 'EUR',
|
|
32
32
|
id: 2,
|
|
33
33
|
locale: 'fr_FR',
|
|
@@ -17,9 +17,9 @@ const StoreCodeRoute = () => {
|
|
|
17
17
|
const storeSecureBaseMediaUrl = useMemo(() => ({}), []);
|
|
18
18
|
|
|
19
19
|
AVAILABLE_STORE_VIEWS.forEach(store => {
|
|
20
|
-
storeCodes.push(store.
|
|
21
|
-
storeCurrencies[store.
|
|
22
|
-
storeSecureBaseMediaUrl[store.
|
|
20
|
+
storeCodes.push(store.store_code);
|
|
21
|
+
storeCurrencies[store.store_code] = store.default_display_currency_code;
|
|
22
|
+
storeSecureBaseMediaUrl[store.store_code] = store.secure_base_media_url;
|
|
23
23
|
});
|
|
24
24
|
|
|
25
25
|
// Sort by length (longest first) to avoid false hits ie "en" matching just
|
|
@@ -5,6 +5,7 @@ exports[`empty single wishlist 1`] = `
|
|
|
5
5
|
className="root"
|
|
6
6
|
>
|
|
7
7
|
<h1
|
|
8
|
+
aria-live="polite"
|
|
8
9
|
className="heading"
|
|
9
10
|
>
|
|
10
11
|
<mock-FormattedMessage
|
|
@@ -29,6 +30,7 @@ exports[`renders a single wishlist without visibility toggle 1`] = `
|
|
|
29
30
|
className="root"
|
|
30
31
|
>
|
|
31
32
|
<h1
|
|
33
|
+
aria-live="polite"
|
|
32
34
|
className="heading"
|
|
33
35
|
>
|
|
34
36
|
<mock-FormattedMessage
|
|
@@ -61,6 +63,7 @@ exports[`renders disabled feature error 1`] = `
|
|
|
61
63
|
className="root"
|
|
62
64
|
>
|
|
63
65
|
<h1
|
|
66
|
+
aria-live="polite"
|
|
64
67
|
className="heading"
|
|
65
68
|
>
|
|
66
69
|
<mock-FormattedMessage
|
|
@@ -91,6 +94,7 @@ exports[`renders general fetch error 1`] = `
|
|
|
91
94
|
className="root"
|
|
92
95
|
>
|
|
93
96
|
<h1
|
|
97
|
+
aria-live="polite"
|
|
94
98
|
className="heading"
|
|
95
99
|
>
|
|
96
100
|
<mock-FormattedMessage
|
|
@@ -203,6 +207,7 @@ exports[`renders wishlist data 1`] = `
|
|
|
203
207
|
className="root"
|
|
204
208
|
>
|
|
205
209
|
<h1
|
|
210
|
+
aria-live="polite"
|
|
206
211
|
className="heading"
|
|
207
212
|
>
|
|
208
213
|
<mock-FormattedMessage
|
|
@@ -81,7 +81,11 @@ const WishlistPage = props => {
|
|
|
81
81
|
|
|
82
82
|
return (
|
|
83
83
|
<div className={classes.root} data-cy="Wishlist-root">
|
|
84
|
-
<h1
|
|
84
|
+
<h1
|
|
85
|
+
aria-live="polite"
|
|
86
|
+
className={classes.heading}
|
|
87
|
+
data-cy="WishlistPage-heading"
|
|
88
|
+
>
|
|
85
89
|
<FormattedMessage
|
|
86
90
|
values={{ count: wishlists.length }}
|
|
87
91
|
id={'wishlistPage.headingText'}
|
package/lib/index.module.css
CHANGED
|
@@ -123,3 +123,17 @@
|
|
|
123
123
|
cursor: default;
|
|
124
124
|
touch-action: none;
|
|
125
125
|
}
|
|
126
|
+
|
|
127
|
+
:global(.braintree-sheet__content--form
|
|
128
|
+
.braintree-form__field-group
|
|
129
|
+
.braintree-form__field
|
|
130
|
+
.braintree-form__hosted-field
|
|
131
|
+
input.braintree-form__raw-input) {
|
|
132
|
+
color: #8f8f8f !important;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
:global(.braintree-sheet__content--form
|
|
136
|
+
.braintree-form__field-group
|
|
137
|
+
.braintree-form__descriptor) {
|
|
138
|
+
color: #757575 !important;
|
|
139
|
+
}
|
|
@@ -67,7 +67,7 @@ test('uses RichContentRenderers to inject a default strategy into RichContent',
|
|
|
67
67
|
AVAILABLE_STORE_VIEWS: `[
|
|
68
68
|
{
|
|
69
69
|
base_currency_code: 'USD',
|
|
70
|
-
|
|
70
|
+
store_code: 'default',
|
|
71
71
|
default_display_currency_code: 'USD',
|
|
72
72
|
id: 1,
|
|
73
73
|
locale: 'en_US',
|
|
@@ -75,7 +75,7 @@ test('uses RichContentRenderers to inject a default strategy into RichContent',
|
|
|
75
75
|
},
|
|
76
76
|
{
|
|
77
77
|
base_currency_code: 'EUR',
|
|
78
|
-
|
|
78
|
+
store_code: 'french',
|
|
79
79
|
default_display_currency_code: 'EUR',
|
|
80
80
|
id: 2,
|
|
81
81
|
locale: 'fr_FR',
|
package/lib/tokens.module.css
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
/* color */
|
|
10
10
|
--venia-global-color-blue-100: 194 200 255;
|
|
11
|
-
--venia-global-color-blue-400:
|
|
11
|
+
--venia-global-color-blue-400: 71 139 255;
|
|
12
12
|
/* --venia-global-color-blue-500: 51 109 255; */
|
|
13
13
|
/* --venia-global-color-blue-600: 41 84 255; */
|
|
14
14
|
--venia-global-color-blue-700: 31 57 255;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@magento/venia-ui",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.5.0-alpha.1",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"uuid": "~8.3.2"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
|
-
"@apollo/client": "~3.
|
|
54
|
+
"@apollo/client": "~3.5.0",
|
|
55
55
|
"@babel/cli": "~7.2.3",
|
|
56
56
|
"@babel/core": "~7.15.0",
|
|
57
57
|
"@babel/plugin-proposal-class-properties": "~7.14.5",
|
|
@@ -78,10 +78,10 @@
|
|
|
78
78
|
"redux": "~4.0.1"
|
|
79
79
|
},
|
|
80
80
|
"peerDependencies": {
|
|
81
|
-
"@apollo/client": "~3.
|
|
82
|
-
"@magento/babel-preset-peregrine": "1.2.1
|
|
83
|
-
"@magento/peregrine": "12.
|
|
84
|
-
"@magento/pwa-buildpack": "11.
|
|
81
|
+
"@apollo/client": "~3.5.0",
|
|
82
|
+
"@magento/babel-preset-peregrine": "~1.2.1",
|
|
83
|
+
"@magento/peregrine": "12.5.0-alpha.1",
|
|
84
|
+
"@magento/pwa-buildpack": "11.4.0-alpha.1",
|
|
85
85
|
"apollo-cache-persist": "~0.1.1",
|
|
86
86
|
"braintree-web-drop-in": "~1.16.0",
|
|
87
87
|
"graphql": "~15.5.0",
|