@magento/venia-ui 9.1.0 → 9.2.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 +22 -7
- package/lib/RootComponents/CMS/__tests__/cms.spec.js +50 -20
- package/lib/RootComponents/CMS/cms.js +39 -43
- package/lib/RootComponents/CMS/cms.module.css +17 -14
- package/lib/RootComponents/Category/NoProductsFound/noProductsFound.js +1 -1
- package/lib/RootComponents/Category/__tests__/__snapshots__/category.spec.js.snap +2 -2
- package/lib/RootComponents/Category/__tests__/__snapshots__/categoryContent.spec.js.snap +60 -0
- package/lib/RootComponents/Category/__tests__/category.spec.js +1 -1
- package/lib/RootComponents/Category/__tests__/categoryContent.spec.js +8 -0
- package/lib/RootComponents/Category/category.gql.js +2 -1
- package/lib/RootComponents/Category/category.js +6 -6
- package/lib/RootComponents/Category/categoryContent.js +11 -4
- package/lib/components/Accordion/section.js +6 -2
- package/lib/components/AccountChip/accountChip.gql.js +1 -1
- package/lib/components/AccountInformationPage/accountInformationPage.gql.js +5 -7
- package/lib/components/AccountInformationPage/accountInformationPage.js +5 -1
- package/lib/components/AccountInformationPage/editForm.js +22 -4
- package/lib/components/AccountMenu/accountMenu.js +1 -1
- package/lib/components/AccountMenu/accountMenuItems.js +2 -1
- package/lib/components/AddressBookPage/__tests__/__snapshots__/addressCard.spec.js.snap +5 -0
- package/lib/components/AddressBookPage/addEditDialog.js +36 -10
- package/lib/components/AddressBookPage/addressBookPage.js +5 -2
- package/lib/components/AddressBookPage/addressCard.js +17 -4
- package/lib/components/App/app.js +5 -1
- package/lib/components/App/localeProvider.js +2 -1
- package/lib/components/Breadcrumbs/breadcrumbs.js +3 -3
- package/lib/components/Breadcrumbs/breadcrumbs.module.css +10 -3
- package/lib/components/CartPage/GiftCards/giftCard.js +1 -0
- package/lib/components/CartPage/GiftCards/giftCards.js +2 -0
- package/lib/components/CartPage/PriceAdjustments/CouponCode/couponCode.js +3 -0
- package/lib/components/CartPage/PriceAdjustments/GiftOptions/giftOptions.js +3 -0
- package/lib/components/CartPage/PriceAdjustments/ShippingMethods/shippingForm.js +10 -2
- package/lib/components/CartPage/PriceAdjustments/ShippingMethods/shippingMethods.js +2 -1
- package/lib/components/CartPage/PriceAdjustments/ShippingMethods/shippingRadio.js +1 -1
- package/lib/components/CartPage/PriceAdjustments/ShippingMethods/shippingRadios.js +1 -1
- package/lib/components/CartPage/PriceAdjustments/giftCardSection.ee.js +1 -0
- package/lib/components/CartPage/PriceAdjustments/priceAdjustments.js +4 -1
- package/lib/components/CartPage/PriceSummary/discountSummary.js +8 -2
- package/lib/components/CartPage/PriceSummary/giftCardSummary.ee.js +4 -1
- package/lib/components/CartPage/PriceSummary/priceSummary.js +10 -3
- package/lib/components/CartPage/PriceSummary/shippingSummary.js +6 -1
- package/lib/components/CartPage/PriceSummary/taxSummary.js +1 -1
- package/lib/components/CartPage/ProductListing/EditModal/__tests__/__snapshots__/productDetail.spec.js.snap +3 -3
- package/lib/components/CartPage/ProductListing/EditModal/__tests__/__snapshots__/productForm.spec.js.snap +2 -2
- package/lib/components/CartPage/ProductListing/EditModal/productDetail.js +1 -1
- package/lib/components/CartPage/ProductListing/__tests__/__snapshots__/errorMessage.spec.js.snap +11 -0
- package/lib/components/CartPage/ProductListing/__tests__/errorMessage.spec.js +20 -0
- package/lib/components/CartPage/ProductListing/__tests__/product.spec.js +1 -0
- package/lib/components/CartPage/ProductListing/errorMessage.js +31 -0
- package/lib/components/CartPage/ProductListing/errorMessage.module.css +9 -0
- package/lib/components/CartPage/ProductListing/product.js +14 -7
- package/lib/components/CartPage/ProductListing/productListing.js +6 -1
- package/lib/components/CartPage/ProductListing/productListing.module.css +6 -0
- package/lib/components/CartPage/ProductListing/quantity.js +3 -0
- package/lib/components/CartPage/cartPage.js +1 -1
- package/lib/components/CategoryList/__tests__/categoryList.spec.js +2 -0
- package/lib/components/CategoryList/categoryList.js +4 -2
- package/lib/components/CategoryList/categoryList.module.css +2 -0
- package/lib/components/CategoryList/categoryTile.js +2 -0
- package/lib/components/CategoryList/categoryTile.module.css +2 -0
- package/lib/components/CategoryList/index.js +2 -0
- package/lib/components/CategoryTree/categoryBranch.js +2 -1
- package/lib/components/CategoryTree/categoryLeaf.js +1 -0
- package/lib/components/CategoryTree/categoryTree.js +3 -3
- package/lib/components/Checkbox/checkbox.module.css +11 -3
- package/lib/components/Checkout/addressForm.js +2 -3
- package/lib/components/CheckoutPage/GuestSignIn/guestSignIn.js +6 -2
- package/lib/components/CheckoutPage/ItemsReview/__fixtures__/cartItems.js +12 -12
- package/lib/components/CheckoutPage/ItemsReview/__tests__/__snapshots__/item.spec.js.snap +2 -2
- package/lib/components/CheckoutPage/ItemsReview/__tests__/__snapshots__/itemsReview.spec.js.snap +3 -3
- package/lib/components/CheckoutPage/ItemsReview/item.js +1 -1
- package/lib/components/CheckoutPage/ItemsReview/itemsReview.js +4 -1
- package/lib/components/CheckoutPage/OrderConfirmationPage/__tests__/__snapshots__/orderConfirmationPage.spec.js.snap +1 -1
- package/lib/components/CheckoutPage/OrderConfirmationPage/createAccount.js +6 -0
- package/lib/components/CheckoutPage/OrderConfirmationPage/orderConfirmationPage.js +10 -4
- package/lib/components/CheckoutPage/OrderSummary/orderSummary.js +1 -1
- package/lib/components/CheckoutPage/PaymentInformation/braintreeSummary.js +2 -1
- package/lib/components/CheckoutPage/PaymentInformation/creditCard.js +11 -1
- package/lib/components/CheckoutPage/PaymentInformation/editCard.js +1 -1
- package/lib/components/CheckoutPage/PaymentInformation/editModal.js +1 -1
- package/lib/components/CheckoutPage/PaymentInformation/paymentInformation.js +1 -1
- package/lib/components/CheckoutPage/ShippingInformation/AddressForm/__tests__/__snapshots__/guestForm.spec.js.snap +8 -0
- package/lib/components/CheckoutPage/ShippingInformation/AddressForm/__tests__/guestForm.spec.js +56 -1
- package/lib/components/CheckoutPage/ShippingInformation/AddressForm/customerForm.js +27 -4
- package/lib/components/CheckoutPage/ShippingInformation/AddressForm/guestForm.js +96 -9
- package/lib/components/CheckoutPage/ShippingInformation/card.js +1 -1
- package/lib/components/CheckoutPage/ShippingInformation/shippingInformation.js +14 -3
- package/lib/components/CheckoutPage/ShippingMethod/completedView.js +1 -0
- package/lib/components/CheckoutPage/ShippingMethod/shippingMethod.js +2 -1
- package/lib/components/CheckoutPage/ShippingMethod/updateModal.js +1 -0
- package/lib/components/CheckoutPage/__tests__/__snapshots__/checkoutPage.spec.js.snap +32 -0
- package/lib/components/CheckoutPage/__tests__/checkoutPage.spec.js +2 -0
- package/lib/components/CheckoutPage/checkoutPage.js +26 -4
- package/lib/components/ContactPage/__tests__/__snapshots__/contactLink.spec.js.snap +11 -0
- package/lib/components/ContactPage/__tests__/__snapshots__/contactPage.shimmer.spec.js.snap +113 -0
- package/lib/components/ContactPage/__tests__/__snapshots__/contactPage.spec.js.snap +312 -0
- package/lib/components/ContactPage/__tests__/contactLink.spec.js +58 -0
- package/lib/components/ContactPage/__tests__/contactPage.shimmer.spec.js +20 -0
- package/lib/components/ContactPage/__tests__/contactPage.spec.js +159 -0
- package/lib/components/ContactPage/contactLink.js +21 -0
- package/lib/components/ContactPage/contactPage.js +270 -0
- package/lib/components/ContactPage/contactPage.module.css +81 -0
- package/lib/components/ContactPage/contactPage.shimmer.js +104 -0
- package/lib/components/ContactPage/contactPage.shimmer.module.css +27 -0
- package/lib/components/ContactPage/index.js +2 -0
- package/lib/components/CreateAccount/createAccount.js +5 -0
- package/lib/components/Dialog/dialog.js +18 -4
- package/lib/components/ErrorMessage/errorMessage.js +7 -2
- package/lib/components/ErrorView/errorView.js +4 -2
- package/lib/components/Field/field.module.css +10 -6
- package/lib/components/FilterModal/CurrentFilters/currentFilter.js +7 -3
- package/lib/components/FilterModal/FilterList/__tests__/filterItem.spec.js +34 -5
- package/lib/components/FilterModal/FilterList/filterDefault.js +3 -2
- package/lib/components/FilterModal/FilterList/filterItem.js +27 -7
- package/lib/components/FilterModal/FilterList/filterList.js +6 -1
- package/lib/components/FilterModal/filterBlock.js +9 -4
- package/lib/components/FilterModal/filterFooter.js +1 -0
- package/lib/components/FilterModal/filterModal.js +6 -1
- package/lib/components/FilterModalOpenButton/filterModalOpenButton.js +1 -0
- package/lib/components/FilterSidebar/filterSidebar.js +6 -1
- package/lib/components/Footer/__tests__/__snapshots__/footer.spec.js.snap +14 -0
- package/lib/components/Footer/__tests__/footer.spec.js +9 -1
- package/lib/components/Footer/footer.js +14 -7
- package/lib/components/Footer/sampleData.js +8 -3
- package/lib/components/ForgotPassword/ForgotPasswordForm/forgotPasswordForm.js +3 -0
- package/lib/components/ForgotPassword/FormSubmissionSuccessful/formSubmissionSuccessful.js +4 -2
- package/lib/components/ForgotPassword/forgotPassword.gql.js +0 -1
- package/lib/components/FormError/formError.js +10 -4
- package/lib/components/Gallery/__tests__/__snapshots__/addToCartButton.spec.js.snap +0 -3
- package/lib/components/Gallery/__tests__/__snapshots__/item.spec.js.snap +1 -0
- package/lib/components/Gallery/addToCartButton.js +24 -20
- package/lib/components/Gallery/item.js +15 -4
- package/lib/components/Gallery/item.module.css +1 -0
- package/lib/components/Head/index.js +2 -1
- package/lib/components/Header/__tests__/header.spec.js +1 -1
- package/lib/components/Header/accountTrigger.js +1 -0
- package/lib/components/Header/cartTrigger.js +4 -1
- package/lib/components/Header/header.js +1 -1
- package/lib/components/Header/navTrigger.js +1 -0
- package/lib/components/Header/searchTrigger.js +1 -0
- package/lib/components/LegacyMiniCart/cartOptions.gql.js +4 -3
- package/lib/components/LegacyMiniCart/editFormFragment.gql.js +7 -3
- package/lib/components/LegacyMiniCart/kebab.js +1 -0
- package/lib/components/LegacyMiniCart/productOptions.js +6 -1
- package/lib/components/LegacyMiniCart/section.js +15 -5
- package/lib/components/Link/link.js +6 -4
- package/lib/components/Mask/mask.js +3 -3
- package/lib/components/MegaMenu/__tests__/MegaMenuItem.spec.js +1 -0
- package/lib/components/MegaMenu/__tests__/__snapshots__/MegaMenu.spec.js.snap +9 -0
- package/lib/components/MegaMenu/__tests__/__snapshots__/MegaMenuItem.spec.js.snap +6 -0
- package/lib/components/MegaMenu/__tests__/__snapshots__/Submenu.spec.js.snap +2 -0
- package/lib/components/MegaMenu/megaMenu.js +6 -2
- package/lib/components/MegaMenu/megaMenuItem.js +27 -6
- package/lib/components/MegaMenu/megaMenuItem.module.css +0 -5
- package/lib/components/MegaMenu/submenu.js +5 -3
- package/lib/components/MegaMenu/submenuColumn.js +15 -4
- package/lib/components/MiniCart/ProductList/__tests__/__snapshots__/item.spec.js.snap +4 -4
- package/lib/components/MiniCart/ProductList/__tests__/__snapshots__/productList.spec.js.snap +1 -1
- package/lib/components/MiniCart/ProductList/__tests__/productList.spec.js +1 -1
- package/lib/components/MiniCart/ProductList/item.js +5 -2
- package/lib/components/MiniCart/ProductList/productList.js +6 -2
- package/lib/components/MiniCart/__tests__/__snapshots__/miniCart.spec.js.snap +1 -1
- package/lib/components/MiniCart/miniCart.gql.js +3 -2
- package/lib/components/MiniCart/miniCart.js +9 -4
- package/lib/components/MyAccount/ResetPassword/resetPassword.gql.js +1 -1
- package/lib/components/Newsletter/__tests__/__snapshots__/newsletter.shimmer.spec.js.snap +40 -0
- package/lib/components/Newsletter/__tests__/__snapshots__/newsletter.spec.js.snap +14 -8
- package/lib/components/Newsletter/__tests__/newsletter.shimmer.spec.js +10 -0
- package/lib/components/Newsletter/__tests__/newsletter.spec.js +25 -2
- package/lib/components/Newsletter/newsletter.js +27 -6
- package/lib/components/Newsletter/newsletter.shimmer.js +46 -0
- package/lib/components/Newsletter/newsletter.shimmer.module.css +11 -0
- package/lib/components/OrderHistoryPage/OrderDetails/__tests__/__snapshots__/item.spec.js.snap +1 -1
- package/lib/components/OrderHistoryPage/OrderDetails/__tests__/__snapshots__/shippingMethod.spec.js.snap +3 -0
- package/lib/components/OrderHistoryPage/OrderDetails/billingInformation.js +4 -1
- package/lib/components/OrderHistoryPage/OrderDetails/item.js +1 -1
- package/lib/components/OrderHistoryPage/OrderDetails/items.js +1 -1
- package/lib/components/OrderHistoryPage/OrderDetails/paymentMethod.js +1 -1
- package/lib/components/OrderHistoryPage/OrderDetails/shippingInformation.js +4 -1
- package/lib/components/OrderHistoryPage/OrderDetails/shippingMethod.js +5 -1
- package/lib/components/OrderHistoryPage/orderHistoryPage.js +8 -1
- package/lib/components/Pagination/pagination.js +1 -1
- package/lib/components/Pagination/tile.js +5 -1
- package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/Boolean/__tests__/__snapshots__/boolean.spec.js.snap +20 -0
- package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/Boolean/__tests__/boolean.spec.js +52 -0
- package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/Boolean/boolean.js +74 -0
- package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/Boolean/boolean.module.css +9 -0
- package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/Boolean/index.js +1 -0
- package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/Date/__tests__/__snapshots__/date.spec.js.snap +25 -0
- package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/Date/__tests__/date.spec.js +52 -0
- package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/Date/date.js +82 -0
- package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/Date/date.module.css +9 -0
- package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/Date/index.js +1 -0
- package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/DateTime/__tests__/__snapshots__/dateTime.spec.js.snap +29 -0
- package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/DateTime/__tests__/dateTime.spec.js +53 -0
- package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/DateTime/dateTime.js +85 -0
- package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/DateTime/dateTime.module.css +9 -0
- package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/DateTime/index.js +1 -0
- package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/Multiselect/__tests__/__snapshots__/multiSelect.spec.js.snap +36 -0
- package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/Multiselect/__tests__/multiSelect.spec.js +88 -0
- package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/Multiselect/index.js +1 -0
- package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/Multiselect/multiselect.js +99 -0
- package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/Multiselect/multiselect.module.css +13 -0
- package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/Price/__tests__/__snapshots__/price.spec.js.snap +23 -0
- package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/Price/__tests__/price.spec.js +52 -0
- package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/Price/index.js +1 -0
- package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/Price/price.js +74 -0
- package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/Price/price.module.css +9 -0
- package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/Select/__tests__/__snapshots__/select.spec.js.snap +36 -0
- package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/Select/__tests__/select.spec.js +88 -0
- package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/Select/index.js +1 -0
- package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/Select/select.js +99 -0
- package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/Select/select.module.css +13 -0
- package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/Text/__tests__/__snapshots__/text.spec.js.snap +33 -0
- package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/Text/__tests__/text.spec.js +74 -0
- package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/Text/index.js +1 -0
- package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/Text/text.js +88 -0
- package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/Text/text.module.css +13 -0
- package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/Textarea/__tests__/__snapshots__/textarea.spec.js.snap +33 -0
- package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/Textarea/__tests__/textarea.spec.js +74 -0
- package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/Textarea/index.js +1 -0
- package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/Textarea/textarea.js +88 -0
- package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/Textarea/textarea.module.css +13 -0
- package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/__tests__/__snapshots__/attributeType.spec.js.snap +101 -0
- package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/__tests__/attributeType.spec.js +173 -0
- package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/attributeType.js +61 -0
- package/lib/components/ProductFullDetail/CustomAttributes/AttributeType/index.js +1 -0
- package/lib/components/ProductFullDetail/CustomAttributes/__tests__/__snapshots__/customAttributes.spec.js.snap +55 -0
- package/lib/components/ProductFullDetail/CustomAttributes/__tests__/customAttributes.spec.js +77 -0
- package/lib/components/ProductFullDetail/CustomAttributes/customAttributes.js +68 -0
- package/lib/components/ProductFullDetail/CustomAttributes/customAttributes.module.css +14 -0
- package/lib/components/ProductFullDetail/CustomAttributes/index.js +1 -0
- package/lib/components/ProductFullDetail/__tests__/__snapshots__/productFullDetail.spec.js.snap +39 -0
- package/lib/components/ProductFullDetail/__tests__/productFullDetail.spec.js +3 -1
- package/lib/components/ProductFullDetail/productFullDetail.js +18 -3
- package/lib/components/ProductOptions/__tests__/__snapshots__/option.spec.js.snap +1 -1
- package/lib/components/ProductOptions/__tests__/__snapshots__/options.spec.js.snap +2 -2
- package/lib/components/ProductOptions/__tests__/__snapshots__/swatch.spec.js.snap +44 -2
- package/lib/components/ProductOptions/__tests__/__snapshots__/swatchList.spec.js.snap +22 -1
- package/lib/components/ProductOptions/__tests__/swatch.spec.js +0 -2
- package/lib/components/ProductOptions/option.js +2 -2
- package/lib/components/ProductOptions/swatch.js +7 -5
- package/lib/components/ProductOptions/swatch.module.css +11 -0
- package/lib/components/ProductOptions/tile.js +1 -0
- package/lib/components/ProductSort/__tests__/__snapshots__/sortItem.spec.js.snap +14 -0
- package/lib/components/ProductSort/__tests__/sortItem.spec.js +61 -0
- package/lib/components/ProductSort/productSort.js +84 -40
- package/lib/components/ProductSort/sortItem.js +26 -11
- package/lib/components/RadioGroup/radio.module.css +13 -5
- package/lib/components/RadioGroup/radioGroup.js +2 -1
- package/lib/components/Rating/__tests__/__snapshots__/rating.spec.js.snap +27 -0
- package/lib/components/Rating/__tests__/rating.spec.js +13 -0
- package/lib/components/Rating/index.js +1 -0
- package/lib/components/Rating/rating.js +30 -0
- package/lib/components/Rating/rating.module.css +21 -0
- package/lib/components/RichContent/richContent.module.css +52 -59
- package/lib/components/SearchBar/autocomplete.js +3 -0
- package/lib/components/SearchBar/searchBar.js +1 -1
- package/lib/components/SearchBar/searchField.js +1 -0
- package/lib/components/SearchBar/suggestedCategory.js +1 -1
- package/lib/components/SearchBar/suggestedProduct.js +6 -1
- package/lib/components/SearchPage/__tests__/__snapshots__/searchPage.spec.js.snap +41 -1
- package/lib/components/SearchPage/__tests__/searchPage.spec.js +8 -0
- package/lib/components/SearchPage/searchPage.js +12 -6
- package/lib/components/Shimmer/shimmer.js +11 -2
- package/lib/components/Shimmer/shimmer.module.css +4 -8
- package/lib/components/SignIn/__tests__/__snapshots__/signIn.spec.js.snap +126 -0
- package/lib/components/SignIn/__tests__/signIn.spec.js +11 -0
- package/lib/components/SignIn/signIn.gql.js +8 -4
- package/lib/components/SignIn/signIn.js +24 -4
- package/lib/components/TextArea/textArea.module.css +9 -0
- package/lib/components/TextInput/textInput.module.css +4 -0
- package/lib/components/ToastContainer/toast.js +23 -3
- package/lib/components/ToastContainer/toast.module.css +3 -0
- package/lib/components/Trigger/trigger.js +9 -2
- package/lib/components/Wishlist/AddToListButton/addToListButton.ee.js +1 -0
- package/lib/components/Wishlist/WishlistDialog/CreateWishlistForm/createWishlistForm.js +2 -0
- package/lib/components/Wishlist/WishlistDialog/WishlistLineItem/wishlistLineItem.js +1 -0
- package/lib/components/Wishlist/WishlistDialog/wishlistDialog.js +1 -0
- package/lib/components/WishlistPage/__tests__/__snapshots__/wishlistPage.spec.js.snap +5 -5
- package/lib/components/WishlistPage/createWishlist.ee.js +2 -0
- package/lib/components/WishlistPage/wishlist.js +8 -3
- package/lib/components/WishlistPage/wishlistItem.js +17 -4
- package/lib/components/WishlistPage/wishlistPage.js +5 -3
- package/lib/defaultRoutes.json +6 -0
- package/lib/targets/__tests__/venia-ui-targets.spec.js +2 -0
- package/lib/util/__tests__/shrinkGETQuery.spec.js +1 -1
- package/lib/util/apolloCache.js +2 -2
- package/lib/util/formValidators.js +10 -8
- package/lib/util/toCamelCase.js +3 -0
- package/package.json +17 -14
- package/upward.yml +19 -40
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
import React, { Fragment, useEffect } from 'react';
|
|
2
|
+
import { FormattedMessage, useIntl } from 'react-intl';
|
|
3
|
+
import { shape, string } from 'prop-types';
|
|
4
|
+
import { Form } from 'informed';
|
|
5
|
+
|
|
6
|
+
import { useToasts } from '@magento/peregrine';
|
|
7
|
+
import { useContactPage } from '@magento/peregrine/lib/talons/ContactPage';
|
|
8
|
+
|
|
9
|
+
import { useStyle } from '../../classify';
|
|
10
|
+
import { isRequired } from '../../util/formValidators';
|
|
11
|
+
|
|
12
|
+
import Button from '../Button';
|
|
13
|
+
import CmsBlock from '../CmsBlock/block';
|
|
14
|
+
import { Meta, StoreTitle } from '../Head';
|
|
15
|
+
import FormError from '../FormError';
|
|
16
|
+
import Field from '../Field';
|
|
17
|
+
import TextInput from '../TextInput';
|
|
18
|
+
import TextArea from '../TextArea';
|
|
19
|
+
import LoadingIndicator from '../LoadingIndicator';
|
|
20
|
+
import ErrorView from '../ErrorView';
|
|
21
|
+
import ContactPageShimmer from './contactPage.shimmer';
|
|
22
|
+
import defaultClasses from './contactPage.module.css';
|
|
23
|
+
|
|
24
|
+
const BANNER_IDENTIFIER = 'contact-us-banner';
|
|
25
|
+
const SIDEBAR_IDENTIFIER = 'contact-us-sidebar';
|
|
26
|
+
const NOT_FOUND_MESSAGE =
|
|
27
|
+
"Looks like the page you were hoping to find doesn't exist. Sorry about that.";
|
|
28
|
+
|
|
29
|
+
const ContactPage = props => {
|
|
30
|
+
const { classes: propClasses } = props;
|
|
31
|
+
const classes = useStyle(defaultClasses, propClasses);
|
|
32
|
+
const { formatMessage } = useIntl();
|
|
33
|
+
const talonProps = useContactPage({
|
|
34
|
+
cmsBlockIdentifiers: [BANNER_IDENTIFIER, SIDEBAR_IDENTIFIER]
|
|
35
|
+
});
|
|
36
|
+
const [, { addToast }] = useToasts();
|
|
37
|
+
|
|
38
|
+
const {
|
|
39
|
+
isEnabled,
|
|
40
|
+
cmsBlocks,
|
|
41
|
+
errors,
|
|
42
|
+
handleSubmit,
|
|
43
|
+
isBusy,
|
|
44
|
+
isLoading,
|
|
45
|
+
setFormApi,
|
|
46
|
+
response
|
|
47
|
+
} = talonProps;
|
|
48
|
+
|
|
49
|
+
useEffect(() => {
|
|
50
|
+
if (response && response.status) {
|
|
51
|
+
addToast({
|
|
52
|
+
type: 'success',
|
|
53
|
+
message: formatMessage({
|
|
54
|
+
id: 'contactPage.submitMessage',
|
|
55
|
+
defaultMessage: 'Your message has been sent.'
|
|
56
|
+
}),
|
|
57
|
+
timeout: 5000
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
}, [addToast, formatMessage, response]);
|
|
61
|
+
|
|
62
|
+
if (!isLoading && !isEnabled) {
|
|
63
|
+
return (
|
|
64
|
+
<Fragment>
|
|
65
|
+
<StoreTitle>
|
|
66
|
+
{formatMessage({
|
|
67
|
+
id: 'contactPage.title',
|
|
68
|
+
defaultMessage: 'Contact Us'
|
|
69
|
+
})}
|
|
70
|
+
</StoreTitle>
|
|
71
|
+
<ErrorView
|
|
72
|
+
message={formatMessage({
|
|
73
|
+
id: 'magentoRoute.routeError',
|
|
74
|
+
defaultMessage: NOT_FOUND_MESSAGE
|
|
75
|
+
})}
|
|
76
|
+
/>
|
|
77
|
+
</Fragment>
|
|
78
|
+
);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
if (isLoading) {
|
|
82
|
+
return <ContactPageShimmer />;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
const maybeLoadingIndicator = isBusy ? (
|
|
86
|
+
<div className={classes.loadingContainer}>
|
|
87
|
+
<LoadingIndicator>
|
|
88
|
+
<FormattedMessage
|
|
89
|
+
id={'contactPage.loadingText'}
|
|
90
|
+
defaultMessage={'Sending'}
|
|
91
|
+
/>
|
|
92
|
+
</LoadingIndicator>
|
|
93
|
+
</div>
|
|
94
|
+
) : null;
|
|
95
|
+
|
|
96
|
+
const contactUsBannerContent = cmsBlocks.find(
|
|
97
|
+
item => item.identifier === BANNER_IDENTIFIER
|
|
98
|
+
)?.content;
|
|
99
|
+
|
|
100
|
+
const contactUsBanner = contactUsBannerContent ? (
|
|
101
|
+
<div className={classes.banner}>
|
|
102
|
+
<CmsBlock content={contactUsBannerContent} />
|
|
103
|
+
</div>
|
|
104
|
+
) : null;
|
|
105
|
+
|
|
106
|
+
const contactUsSidebarContent = cmsBlocks.find(
|
|
107
|
+
item => item.identifier === SIDEBAR_IDENTIFIER
|
|
108
|
+
)?.content;
|
|
109
|
+
|
|
110
|
+
const contactUsSidebar = contactUsSidebarContent ? (
|
|
111
|
+
<div className={classes.sideContent}>
|
|
112
|
+
<CmsBlock content={contactUsSidebarContent} />
|
|
113
|
+
</div>
|
|
114
|
+
) : null;
|
|
115
|
+
|
|
116
|
+
const pageTitle = formatMessage({
|
|
117
|
+
id: 'contactPage.title',
|
|
118
|
+
defaultMessage: 'Contact Us'
|
|
119
|
+
});
|
|
120
|
+
|
|
121
|
+
const metaDescription = formatMessage({
|
|
122
|
+
id: 'contactPage.metaDescription',
|
|
123
|
+
defaultMessage: 'Contact Us'
|
|
124
|
+
});
|
|
125
|
+
|
|
126
|
+
return (
|
|
127
|
+
<Fragment>
|
|
128
|
+
<StoreTitle>{pageTitle}</StoreTitle>
|
|
129
|
+
<Meta name="title" content={pageTitle} />
|
|
130
|
+
<Meta name="description" content={metaDescription} />
|
|
131
|
+
<article className={classes.root} data-cy="ContactPage-root">
|
|
132
|
+
{contactUsBanner}
|
|
133
|
+
<div className={classes.content}>
|
|
134
|
+
<div
|
|
135
|
+
className={classes.formContainer}
|
|
136
|
+
data-cy="ContactPage-formContainer"
|
|
137
|
+
>
|
|
138
|
+
{maybeLoadingIndicator}
|
|
139
|
+
<h1 className={classes.title}>
|
|
140
|
+
<FormattedMessage
|
|
141
|
+
id={'contactPage.titleText'}
|
|
142
|
+
defaultMessage={'Contact Us'}
|
|
143
|
+
/>
|
|
144
|
+
</h1>
|
|
145
|
+
|
|
146
|
+
<p className={classes.subtitle}>
|
|
147
|
+
<FormattedMessage
|
|
148
|
+
id={'contactPage.infoText'}
|
|
149
|
+
defaultMessage={`Drop us a line and we'll get back to you as soon as possible.`}
|
|
150
|
+
/>
|
|
151
|
+
</p>
|
|
152
|
+
<FormError
|
|
153
|
+
allowErrorMessages
|
|
154
|
+
errors={Array.from(errors.values())}
|
|
155
|
+
/>
|
|
156
|
+
<Form
|
|
157
|
+
getApi={setFormApi}
|
|
158
|
+
className={classes.form}
|
|
159
|
+
onSubmit={handleSubmit}
|
|
160
|
+
>
|
|
161
|
+
<Field
|
|
162
|
+
id="contact-name"
|
|
163
|
+
label={formatMessage({
|
|
164
|
+
id: 'global.name',
|
|
165
|
+
defaultMessage: 'Name'
|
|
166
|
+
})}
|
|
167
|
+
>
|
|
168
|
+
<TextInput
|
|
169
|
+
autoComplete="name"
|
|
170
|
+
field="name"
|
|
171
|
+
id="contact-name"
|
|
172
|
+
validate={isRequired}
|
|
173
|
+
data-cy="name"
|
|
174
|
+
/>
|
|
175
|
+
</Field>
|
|
176
|
+
<Field
|
|
177
|
+
id="contact-email"
|
|
178
|
+
label={formatMessage({
|
|
179
|
+
id: 'global.email',
|
|
180
|
+
defaultMessage: 'Email'
|
|
181
|
+
})}
|
|
182
|
+
>
|
|
183
|
+
<TextInput
|
|
184
|
+
autoComplete="email"
|
|
185
|
+
field="email"
|
|
186
|
+
id="contact-email"
|
|
187
|
+
validate={isRequired}
|
|
188
|
+
placeholder={formatMessage({
|
|
189
|
+
id: 'global.emailPlaceholder',
|
|
190
|
+
defaultMessage: 'abc@xyz.com'
|
|
191
|
+
})}
|
|
192
|
+
data-cy="email"
|
|
193
|
+
/>
|
|
194
|
+
</Field>
|
|
195
|
+
<Field
|
|
196
|
+
id="contact-telephone"
|
|
197
|
+
label={formatMessage({
|
|
198
|
+
id: 'contactPage.telephone',
|
|
199
|
+
defaultMessage: 'Phone Number'
|
|
200
|
+
})}
|
|
201
|
+
optional={true}
|
|
202
|
+
>
|
|
203
|
+
<TextInput
|
|
204
|
+
autoComplete="tel"
|
|
205
|
+
field="telephone"
|
|
206
|
+
id="contact-telephone"
|
|
207
|
+
placeholder={formatMessage({
|
|
208
|
+
id: 'contactPage.telephonePlaceholder',
|
|
209
|
+
defaultMessage: '(222)-222-2222'
|
|
210
|
+
})}
|
|
211
|
+
data-cy="telephone"
|
|
212
|
+
/>
|
|
213
|
+
</Field>
|
|
214
|
+
<Field
|
|
215
|
+
id="contact-comment"
|
|
216
|
+
label={formatMessage({
|
|
217
|
+
id: 'contactPage.comment',
|
|
218
|
+
defaultMessage: 'Message'
|
|
219
|
+
})}
|
|
220
|
+
>
|
|
221
|
+
<TextArea
|
|
222
|
+
autoComplete="comment"
|
|
223
|
+
field="comment"
|
|
224
|
+
id="contact-comment"
|
|
225
|
+
validate={isRequired}
|
|
226
|
+
placeholder={formatMessage({
|
|
227
|
+
id: 'contactPage.commentPlaceholder',
|
|
228
|
+
defaultMessage: `Tell us what's on your mind`
|
|
229
|
+
})}
|
|
230
|
+
data-cy="comment"
|
|
231
|
+
/>
|
|
232
|
+
</Field>
|
|
233
|
+
<div className={classes.buttonsContainer}>
|
|
234
|
+
<Button
|
|
235
|
+
priority="high"
|
|
236
|
+
type="submit"
|
|
237
|
+
disabled={isBusy}
|
|
238
|
+
data-cy="submit"
|
|
239
|
+
>
|
|
240
|
+
<FormattedMessage
|
|
241
|
+
id={'contactPage.submit'}
|
|
242
|
+
defaultMessage={'Send'}
|
|
243
|
+
/>
|
|
244
|
+
</Button>
|
|
245
|
+
</div>
|
|
246
|
+
</Form>
|
|
247
|
+
</div>
|
|
248
|
+
{contactUsSidebar}
|
|
249
|
+
</div>
|
|
250
|
+
</article>
|
|
251
|
+
</Fragment>
|
|
252
|
+
);
|
|
253
|
+
};
|
|
254
|
+
|
|
255
|
+
ContactPage.propTypes = {
|
|
256
|
+
classes: shape({
|
|
257
|
+
loadingContainer: string,
|
|
258
|
+
banner: string,
|
|
259
|
+
sideContent: string,
|
|
260
|
+
root: string,
|
|
261
|
+
content: string,
|
|
262
|
+
formContainer: string,
|
|
263
|
+
title: string,
|
|
264
|
+
subtitle: string,
|
|
265
|
+
form: string,
|
|
266
|
+
buttonsContainer: string
|
|
267
|
+
})
|
|
268
|
+
};
|
|
269
|
+
|
|
270
|
+
export default ContactPage;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
.root {
|
|
2
|
+
composes: px-4 from global;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.banner {
|
|
6
|
+
composes: mb-8 from global;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.title {
|
|
10
|
+
composes: mb-2 from global;
|
|
11
|
+
composes: mt-4 from global;
|
|
12
|
+
composes: text-center from global;
|
|
13
|
+
composes: text-3xl from global;
|
|
14
|
+
|
|
15
|
+
/* Medium */
|
|
16
|
+
composes: md_text-left from global;
|
|
17
|
+
composes: md_text-5xl from global;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.subtitle {
|
|
21
|
+
composes: mb-4 from global;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.content {
|
|
25
|
+
/* Medium */
|
|
26
|
+
composes: md_flex from global;
|
|
27
|
+
composes: md_justify-center from global;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.formContainer,
|
|
31
|
+
.sideContent {
|
|
32
|
+
/* Medium */
|
|
33
|
+
composes: md_w-1/2 from global;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.sideContent {
|
|
37
|
+
composes: border-gray-300 from global;
|
|
38
|
+
composes: border-solid from global;
|
|
39
|
+
composes: border-t from global;
|
|
40
|
+
composes: mt-6 from global;
|
|
41
|
+
composes: pt-10 from global;
|
|
42
|
+
|
|
43
|
+
/* Medium */
|
|
44
|
+
composes: md_border-none from global;
|
|
45
|
+
composes: md_mt-0 from global;
|
|
46
|
+
composes: md_pt-4 from global;
|
|
47
|
+
composes: md_pl-12 from global;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.form {
|
|
51
|
+
composes: gap-y-4 from global;
|
|
52
|
+
composes: grid from global;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.formErrors {
|
|
56
|
+
border-color: rgb(var(--venia-global-color-error));
|
|
57
|
+
border-style: solid;
|
|
58
|
+
border-width: 0 0 0 5px;
|
|
59
|
+
padding: 1rem 0 1rem 1rem;
|
|
60
|
+
display: grid;
|
|
61
|
+
grid-column: 1 / span 1;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.loadingContainer {
|
|
65
|
+
position: absolute;
|
|
66
|
+
top: 0;
|
|
67
|
+
left: 0;
|
|
68
|
+
width: 100%;
|
|
69
|
+
height: 100%;
|
|
70
|
+
z-index: 1;
|
|
71
|
+
background: rgba(252, 252, 252, 0.75);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.buttonsContainer {
|
|
75
|
+
composes: px-0 from global;
|
|
76
|
+
composes: py-4 from global;
|
|
77
|
+
composes: text-center from global;
|
|
78
|
+
|
|
79
|
+
/* Medium */
|
|
80
|
+
composes: md_text-left from global;
|
|
81
|
+
}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { shape, string } from 'prop-types';
|
|
3
|
+
import { useStyle } from '../../classify';
|
|
4
|
+
import Shimmer from '../Shimmer';
|
|
5
|
+
import defaultClasses from './contactPage.module.css';
|
|
6
|
+
import shimmerClasses from './contactPage.shimmer.module.css';
|
|
7
|
+
|
|
8
|
+
const ContactPageShimmer = props => {
|
|
9
|
+
const { classes: propClasses } = props;
|
|
10
|
+
const classes = useStyle(defaultClasses, shimmerClasses, propClasses);
|
|
11
|
+
|
|
12
|
+
return (
|
|
13
|
+
<article className={classes.root} data-cy="ContactPage-root">
|
|
14
|
+
<div className={classes.banner}>
|
|
15
|
+
<Shimmer classes={{ root_rectangle: classes.shimmerBanner }} />
|
|
16
|
+
</div>
|
|
17
|
+
<div className={classes.content}>
|
|
18
|
+
<div className={classes.formContainer}>
|
|
19
|
+
<div className={classes.title}>
|
|
20
|
+
<Shimmer classes={{ root_rectangle: classes.shimmer }}>
|
|
21
|
+
|
|
22
|
+
</Shimmer>
|
|
23
|
+
</div>
|
|
24
|
+
|
|
25
|
+
<div className={classes.subtitle}>
|
|
26
|
+
<Shimmer classes={{ root_rectangle: classes.shimmer }}>
|
|
27
|
+
|
|
28
|
+
</Shimmer>
|
|
29
|
+
</div>
|
|
30
|
+
<div className={classes.form}>
|
|
31
|
+
<div key="name">
|
|
32
|
+
<Shimmer
|
|
33
|
+
classes={{
|
|
34
|
+
root_rectangle: classes.shimmerLabel
|
|
35
|
+
}}
|
|
36
|
+
>
|
|
37
|
+
|
|
38
|
+
</Shimmer>
|
|
39
|
+
<Shimmer type="textInput" />
|
|
40
|
+
</div>
|
|
41
|
+
<div key="email">
|
|
42
|
+
<Shimmer
|
|
43
|
+
classes={{
|
|
44
|
+
root_rectangle: classes.shimmerLabel
|
|
45
|
+
}}
|
|
46
|
+
>
|
|
47
|
+
|
|
48
|
+
</Shimmer>
|
|
49
|
+
<Shimmer type="textInput" />
|
|
50
|
+
</div>
|
|
51
|
+
<div key="telephone">
|
|
52
|
+
<Shimmer
|
|
53
|
+
classes={{
|
|
54
|
+
root_rectangle: classes.shimmerLabel
|
|
55
|
+
}}
|
|
56
|
+
>
|
|
57
|
+
|
|
58
|
+
</Shimmer>
|
|
59
|
+
<Shimmer type="textInput" />
|
|
60
|
+
</div>
|
|
61
|
+
<div key="comment">
|
|
62
|
+
<Shimmer
|
|
63
|
+
classes={{
|
|
64
|
+
root_rectangle: classes.shimmerLabel
|
|
65
|
+
}}
|
|
66
|
+
>
|
|
67
|
+
|
|
68
|
+
</Shimmer>
|
|
69
|
+
<Shimmer type="textArea" />
|
|
70
|
+
</div>
|
|
71
|
+
<div className={classes.buttonsContainer}>
|
|
72
|
+
<Shimmer type="button" />
|
|
73
|
+
</div>
|
|
74
|
+
</div>
|
|
75
|
+
</div>
|
|
76
|
+
<div className={classes.sideContent}>
|
|
77
|
+
<Shimmer
|
|
78
|
+
classes={{ root_rectangle: classes.shimmerSideContent }}
|
|
79
|
+
/>
|
|
80
|
+
</div>
|
|
81
|
+
</div>
|
|
82
|
+
</article>
|
|
83
|
+
);
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
ContactPageShimmer.propTypes = {
|
|
87
|
+
classes: shape({
|
|
88
|
+
root: string,
|
|
89
|
+
banner: string,
|
|
90
|
+
content: string,
|
|
91
|
+
formContainer: string,
|
|
92
|
+
title: string,
|
|
93
|
+
subtitle: string,
|
|
94
|
+
form: string,
|
|
95
|
+
buttonsContainer: string,
|
|
96
|
+
sideContent: string,
|
|
97
|
+
shimmer: string,
|
|
98
|
+
shimmerBanner: string,
|
|
99
|
+
shimmerLabel: string,
|
|
100
|
+
shimmerSideContent: string
|
|
101
|
+
})
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
export default ContactPageShimmer;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
.shimmer {
|
|
2
|
+
composes: root_rectangle from '../Shimmer/shimmer.module.css';
|
|
3
|
+
display: block;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.shimmerBanner {
|
|
7
|
+
composes: shimmer;
|
|
8
|
+
width: 100%;
|
|
9
|
+
height: 510px;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.shimmerLabel {
|
|
13
|
+
composes: label from '../Field/field.module.css';
|
|
14
|
+
composes: shimmer;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.shimmerSideContent {
|
|
18
|
+
composes: shimmer;
|
|
19
|
+
width: 100%;
|
|
20
|
+
height: 500px;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
@media only screen and (min-width: 769px) {
|
|
24
|
+
.shimmerBanner {
|
|
25
|
+
height: 300px;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -57,6 +57,7 @@ const CreateAccount = props => {
|
|
|
57
57
|
disabled={isDisabled}
|
|
58
58
|
type="submit"
|
|
59
59
|
priority="high"
|
|
60
|
+
data-cy="CreateAccount-submitButton"
|
|
60
61
|
>
|
|
61
62
|
<FormattedMessage
|
|
62
63
|
id={'createAccount.createAccountText'}
|
|
@@ -91,6 +92,7 @@ const CreateAccount = props => {
|
|
|
91
92
|
validateOnBlur
|
|
92
93
|
mask={value => value && value.trim()}
|
|
93
94
|
maskOnBlur={true}
|
|
95
|
+
data-cy="customer-firstname"
|
|
94
96
|
/>
|
|
95
97
|
</Field>
|
|
96
98
|
<Field
|
|
@@ -106,6 +108,7 @@ const CreateAccount = props => {
|
|
|
106
108
|
validateOnBlur
|
|
107
109
|
mask={value => value && value.trim()}
|
|
108
110
|
maskOnBlur={true}
|
|
111
|
+
data-cy="customer-lastname"
|
|
109
112
|
/>
|
|
110
113
|
</Field>
|
|
111
114
|
<Field
|
|
@@ -121,6 +124,7 @@ const CreateAccount = props => {
|
|
|
121
124
|
validateOnBlur
|
|
122
125
|
mask={value => value && value.trim()}
|
|
123
126
|
maskOnBlur={true}
|
|
127
|
+
data-cy="customer-email"
|
|
124
128
|
/>
|
|
125
129
|
</Field>
|
|
126
130
|
<Password
|
|
@@ -139,6 +143,7 @@ const CreateAccount = props => {
|
|
|
139
143
|
validateOnBlur
|
|
140
144
|
mask={value => value && value.trim()}
|
|
141
145
|
maskOnBlur={true}
|
|
146
|
+
data-cy="password"
|
|
142
147
|
/>
|
|
143
148
|
<div className={classes.subscribe}>
|
|
144
149
|
<Checkbox
|
|
@@ -87,6 +87,7 @@ const Dialog = props => {
|
|
|
87
87
|
const maybeButtons = shouldShowButtons ? (
|
|
88
88
|
<div className={classes.buttons}>
|
|
89
89
|
<Button
|
|
90
|
+
data-cy="Dialog-cancelButton"
|
|
90
91
|
classes={cancelButtonClasses}
|
|
91
92
|
disabled={shouldDisableAllButtons}
|
|
92
93
|
onClick={onCancel}
|
|
@@ -99,6 +100,7 @@ const Dialog = props => {
|
|
|
99
100
|
/>
|
|
100
101
|
</Button>
|
|
101
102
|
<Button
|
|
103
|
+
data-cy="Dialog-confirmButton"
|
|
102
104
|
classes={confirmButtonClasses}
|
|
103
105
|
disabled={confirmButtonDisabled}
|
|
104
106
|
priority="high"
|
|
@@ -114,7 +116,12 @@ const Dialog = props => {
|
|
|
114
116
|
|
|
115
117
|
const maybeForm =
|
|
116
118
|
isOpen || !shouldUnmountOnHide ? (
|
|
117
|
-
<Form
|
|
119
|
+
<Form
|
|
120
|
+
className={classes.form}
|
|
121
|
+
{...formProps}
|
|
122
|
+
onSubmit={onConfirm}
|
|
123
|
+
data-cy="Dialog-form"
|
|
124
|
+
>
|
|
118
125
|
{/* The Mask. */}
|
|
119
126
|
<button
|
|
120
127
|
className={classes.mask}
|
|
@@ -123,9 +130,14 @@ const Dialog = props => {
|
|
|
123
130
|
type="reset"
|
|
124
131
|
/>
|
|
125
132
|
{/* The Dialog. */}
|
|
126
|
-
<div className={classes.dialog}>
|
|
133
|
+
<div className={classes.dialog} data-cy={title}>
|
|
127
134
|
<div className={classes.header}>
|
|
128
|
-
<span
|
|
135
|
+
<span
|
|
136
|
+
className={classes.headerText}
|
|
137
|
+
data-cy="Dialog-headerText"
|
|
138
|
+
>
|
|
139
|
+
{title}
|
|
140
|
+
</span>
|
|
129
141
|
{maybeCloseXButton}
|
|
130
142
|
</div>
|
|
131
143
|
<div className={classes.body}>
|
|
@@ -138,7 +150,9 @@ const Dialog = props => {
|
|
|
138
150
|
|
|
139
151
|
return (
|
|
140
152
|
<Portal>
|
|
141
|
-
<aside className={rootClass}>
|
|
153
|
+
<aside className={rootClass} data-cy="Dialog-root">
|
|
154
|
+
{maybeForm}
|
|
155
|
+
</aside>
|
|
142
156
|
</Portal>
|
|
143
157
|
);
|
|
144
158
|
};
|
|
@@ -10,8 +10,13 @@ const ErrorMessage = React.forwardRef((props, ref) => {
|
|
|
10
10
|
const classes = useStyle(defaultClasses, props.classes);
|
|
11
11
|
|
|
12
12
|
return (
|
|
13
|
-
<div className={classes.root} ref={ref}>
|
|
14
|
-
<span
|
|
13
|
+
<div className={classes.root} ref={ref} data-cy="ErrorMessage-root">
|
|
14
|
+
<span
|
|
15
|
+
className={classes.errorMessage}
|
|
16
|
+
data-cy="ErrorMessage-errorMessage"
|
|
17
|
+
>
|
|
18
|
+
{children}
|
|
19
|
+
</span>
|
|
15
20
|
</div>
|
|
16
21
|
);
|
|
17
22
|
});
|
|
@@ -53,10 +53,12 @@ const ErrorView = props => {
|
|
|
53
53
|
};
|
|
54
54
|
|
|
55
55
|
return (
|
|
56
|
-
<div className={classes.root} style={style}>
|
|
56
|
+
<div className={classes.root} style={style} data-cy="ErrorView-root">
|
|
57
57
|
<div className={classes.content}>
|
|
58
58
|
<p className={classes.header}>{header}</p>
|
|
59
|
-
<p className={classes.message}
|
|
59
|
+
<p className={classes.message} data-cy="ErrorView-message">
|
|
60
|
+
{message}
|
|
61
|
+
</p>
|
|
60
62
|
<div className={classes.actionsContainer}>
|
|
61
63
|
<Button priority="high" type="button" onClick={handleClick}>
|
|
62
64
|
{buttonPrompt}
|
|
@@ -15,19 +15,23 @@
|
|
|
15
15
|
min-height: 2.125rem;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
.
|
|
19
|
-
background: white;
|
|
20
|
-
border: 2px solid rgb(var(--venia-global-color-gray-600));
|
|
18
|
+
.input_base {
|
|
21
19
|
border-radius: 6px;
|
|
22
|
-
color: rgb(var(--venia-global-color-text));
|
|
23
|
-
display: inline-flex;
|
|
24
|
-
flex: 0 0 100%;
|
|
25
20
|
font-size: 1rem;
|
|
26
21
|
height: 2.5rem;
|
|
27
22
|
margin: 0;
|
|
28
23
|
max-width: 100%;
|
|
29
24
|
padding: calc(0.375rem - 1px) calc(0.625rem - 1px);
|
|
30
25
|
width: 100%;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.input {
|
|
29
|
+
composes: input_base;
|
|
30
|
+
background: white;
|
|
31
|
+
border: 2px solid rgb(var(--venia-global-color-gray-600));
|
|
32
|
+
color: rgb(var(--venia-global-color-text));
|
|
33
|
+
display: inline-flex;
|
|
34
|
+
flex: 0 0 100%;
|
|
31
35
|
-webkit-appearance: none;
|
|
32
36
|
}
|
|
33
37
|
|
|
@@ -23,7 +23,7 @@ const CurrentFilter = props => {
|
|
|
23
23
|
const ariaLabel = formatMessage(
|
|
24
24
|
{
|
|
25
25
|
id: 'filterModal.action.clearFilterItem.ariaLabel',
|
|
26
|
-
defaultMessage: 'Clear filter'
|
|
26
|
+
defaultMessage: 'Clear filter "{name}"'
|
|
27
27
|
},
|
|
28
28
|
{
|
|
29
29
|
name: item.title
|
|
@@ -31,8 +31,12 @@ const CurrentFilter = props => {
|
|
|
31
31
|
);
|
|
32
32
|
|
|
33
33
|
return (
|
|
34
|
-
<span className={classes.root}>
|
|
35
|
-
<Trigger
|
|
34
|
+
<span className={classes.root} data-cy="CurrentFilter-root">
|
|
35
|
+
<Trigger
|
|
36
|
+
action={handleClick}
|
|
37
|
+
ariaLabel={ariaLabel}
|
|
38
|
+
data-cy="CurrentFilter-trigger"
|
|
39
|
+
>
|
|
36
40
|
<Icon size={20} src={Remove} />
|
|
37
41
|
</Trigger>
|
|
38
42
|
<span className={classes.text}>{item.title}</span>
|