@salesforce/retail-react-app 1.0.0 → 1.1.0-dev.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/CHANGELOG.md +1 -0
- package/app/components/_app/index.jsx +6 -2
- package/app/components/_app-config/index.jsx +1 -1
- package/app/components/_app-config/index.test.js +3 -1
- package/app/components/_error/index.jsx +9 -1
- package/app/components/action-card/index.jsx +1 -1
- package/app/components/address-display/index.jsx +1 -1
- package/app/components/basic-tile/index.jsx +7 -1
- package/app/components/breadcrumb/index.jsx +1 -1
- package/app/components/confirmation-modal/index.jsx +1 -1
- package/app/components/confirmation-modal/index.test.js +1 -1
- package/app/components/drawer-menu/index.jsx +1 -1
- package/app/components/dynamic-image/index.jsx +1 -1
- package/app/components/field/index.jsx +1 -1
- package/app/components/footer/index.jsx +2 -2
- package/app/components/forms/address-fields.jsx +6 -1
- package/app/components/forms/credit-card-fields.jsx +9 -1
- package/app/components/forms/form-action-buttons.jsx +1 -1
- package/app/components/forms/login-fields.jsx +1 -1
- package/app/components/forms/password-requirements.jsx +1 -1
- package/app/components/forms/post-checkout-registration-fields.jsx +1 -1
- package/app/components/forms/profile-fields.jsx +1 -1
- package/app/components/forms/promo-code-fields.jsx +1 -1
- package/app/components/forms/registration-fields.jsx +1 -1
- package/app/components/forms/reset-password-fields.jsx +1 -1
- package/app/components/forms/update-password-fields.jsx +6 -1
- package/app/components/header/index.jsx +1 -1
- package/app/components/header/index.test.js +4 -2
- package/app/components/hero/index.jsx +7 -1
- package/app/components/icons/index.jsx +1 -1
- package/app/components/image-gallery/index.jsx +1 -1
- package/app/components/item-variant/item-attributes.jsx +1 -1
- package/app/components/item-variant/item-image.jsx +1 -1
- package/app/components/item-variant/item-price.jsx +1 -1
- package/app/components/link/index.jsx +1 -1
- package/app/components/links-list/index.jsx +8 -1
- package/app/components/links-list/index.test.js +4 -1
- package/app/components/list-menu/index.jsx +1 -1
- package/app/components/loading-spinner/index.jsx +1 -1
- package/app/components/locale-selector/index.jsx +1 -1
- package/app/components/login/index.jsx +7 -1
- package/app/components/nested-accordion/index.jsx +1 -1
- package/app/components/offline-banner/index.jsx +1 -1
- package/app/components/offline-boundary/index.jsx +1 -1
- package/app/components/order-summary/index.jsx +9 -1
- package/app/components/page-action-placeholder/index.jsx +1 -1
- package/app/components/pagination/index.jsx +1 -1
- package/app/components/product-item/index.jsx +1 -1
- package/app/components/product-scroller/index.jsx +8 -1
- package/app/components/product-tile/index.jsx +1 -1
- package/app/components/product-view/index.jsx +17 -4
- package/app/components/product-view/index.test.js +26 -1
- package/app/components/product-view-modal/index.jsx +7 -1
- package/app/components/product-view-modal/index.test.js +1 -1
- package/app/components/promo-code/index.jsx +1 -1
- package/app/components/promo-popover/index.jsx +1 -1
- package/app/components/quantity-picker/index.jsx +6 -1
- package/app/components/radio-card/index.jsx +1 -1
- package/app/components/recommended-products/index.jsx +1 -1
- package/app/components/register/index.jsx +7 -1
- package/app/components/reset-password/index.jsx +1 -1
- package/app/components/responsive/index.jsx +1 -1
- package/app/components/search/index.jsx +1 -1
- package/app/components/search/partials/recent-searches.jsx +1 -1
- package/app/components/search/partials/search-suggestions.jsx +1 -1
- package/app/components/search/partials/suggestions.jsx +1 -1
- package/app/components/section/index.jsx +7 -1
- package/app/components/shared/theme/index.jsx +10 -0
- package/app/components/shared/ui/Accordion/index.jsx +8 -0
- package/app/components/shared/ui/AccordionButton/index.jsx +8 -0
- package/app/components/shared/ui/AccordionIcon/index.jsx +8 -0
- package/app/components/shared/ui/AccordionItem/index.jsx +8 -0
- package/app/components/shared/ui/AccordionPanel/index.jsx +8 -0
- package/app/components/shared/ui/Alert/index.jsx +8 -0
- package/app/components/shared/ui/AlertDialog/index.jsx +8 -0
- package/app/components/shared/ui/AlertDialogBody/index.jsx +8 -0
- package/app/components/shared/ui/AlertDialogContent/index.jsx +8 -0
- package/app/components/shared/ui/AlertDialogFooter/index.jsx +8 -0
- package/app/components/shared/ui/AlertDialogHeader/index.jsx +8 -0
- package/app/components/shared/ui/AlertDialogOverlay/index.jsx +8 -0
- package/app/components/shared/ui/AlertIcon/index.jsx +8 -0
- package/app/components/shared/ui/AlertTitle/index.jsx +8 -0
- package/app/components/shared/ui/AspectRatio/index.jsx +8 -0
- package/app/components/shared/ui/Badge/index.jsx +8 -0
- package/app/components/shared/ui/Box/index.jsx +8 -0
- package/app/components/shared/ui/Breadcrumb/index.jsx +8 -0
- package/app/components/shared/ui/BreadcrumbItem/index.jsx +8 -0
- package/app/components/shared/ui/BreadcrumbLink/index.jsx +8 -0
- package/app/components/shared/ui/Button/index.jsx +8 -0
- package/app/components/shared/ui/ButtonGroup/index.jsx +8 -0
- package/app/components/shared/ui/Center/index.jsx +8 -0
- package/app/components/shared/ui/ChakraProvider/index.jsx +8 -0
- package/app/components/shared/ui/Checkbox/index.jsx +8 -0
- package/app/components/shared/ui/CloseButton/index.jsx +8 -0
- package/app/components/shared/ui/Container/index.jsx +8 -0
- package/app/components/shared/ui/Divider/index.jsx +8 -0
- package/app/components/shared/ui/Drawer/index.jsx +8 -0
- package/app/components/shared/ui/DrawerBody/index.jsx +8 -0
- package/app/components/shared/ui/DrawerCloseButton/index.jsx +8 -0
- package/app/components/shared/ui/DrawerContent/index.jsx +8 -0
- package/app/components/shared/ui/DrawerFooter/index.jsx +8 -0
- package/app/components/shared/ui/DrawerHeader/index.jsx +8 -0
- package/app/components/shared/ui/DrawerOverlay/index.jsx +8 -0
- package/app/components/shared/ui/Fade/index.jsx +8 -0
- package/app/components/shared/ui/Flex/index.jsx +8 -0
- package/app/components/shared/ui/FormControl/index.jsx +8 -0
- package/app/components/shared/ui/FormErrorMessage/index.jsx +8 -0
- package/app/components/shared/ui/FormLabel/index.jsx +8 -0
- package/app/components/shared/ui/Grid/index.jsx +8 -0
- package/app/components/shared/ui/GridItem/index.jsx +8 -0
- package/app/components/shared/ui/HStack/index.jsx +8 -0
- package/app/components/shared/ui/Heading/index.jsx +8 -0
- package/app/components/shared/ui/Icon/index.jsx +8 -0
- package/app/components/shared/ui/IconButton/index.jsx +8 -0
- package/app/components/shared/ui/Image/index.jsx +8 -0
- package/app/components/shared/ui/Img/index.jsx +8 -0
- package/app/components/shared/ui/Input/index.jsx +8 -0
- package/app/components/shared/ui/InputGroup/index.jsx +8 -0
- package/app/components/shared/ui/InputLeftElement/index.jsx +8 -0
- package/app/components/shared/ui/InputRightElement/index.jsx +8 -0
- package/app/components/shared/ui/Link/index.jsx +8 -0
- package/app/components/shared/ui/List/index.jsx +8 -0
- package/app/components/shared/ui/ListItem/index.jsx +8 -0
- package/app/components/shared/ui/Modal/index.jsx +8 -0
- package/app/components/shared/ui/ModalBody/index.jsx +8 -0
- package/app/components/shared/ui/ModalCloseButton/index.jsx +8 -0
- package/app/components/shared/ui/ModalContent/index.jsx +8 -0
- package/app/components/shared/ui/ModalFooter/index.jsx +8 -0
- package/app/components/shared/ui/ModalHeader/index.jsx +8 -0
- package/app/components/shared/ui/ModalOverlay/index.jsx +8 -0
- package/app/components/shared/ui/Popover/index.jsx +8 -0
- package/app/components/shared/ui/PopoverArrow/index.jsx +8 -0
- package/app/components/shared/ui/PopoverBody/index.jsx +8 -0
- package/app/components/shared/ui/PopoverCloseButton/index.jsx +8 -0
- package/app/components/shared/ui/PopoverContent/index.jsx +8 -0
- package/app/components/shared/ui/PopoverFooter/index.jsx +8 -0
- package/app/components/shared/ui/PopoverHeader/index.jsx +8 -0
- package/app/components/shared/ui/PopoverTrigger/index.jsx +8 -0
- package/app/components/shared/ui/Portal/index.jsx +8 -0
- package/app/components/shared/ui/Radio/index.jsx +8 -0
- package/app/components/shared/ui/RadioGroup/index.jsx +8 -0
- package/app/components/shared/ui/Select/index.jsx +8 -0
- package/app/components/shared/ui/SimpleGrid/index.jsx +8 -0
- package/app/components/shared/ui/Skeleton/index.jsx +8 -0
- package/app/components/shared/ui/Spacer/index.jsx +8 -0
- package/app/components/shared/ui/Spinner/index.jsx +8 -0
- package/app/components/shared/ui/Stack/index.jsx +8 -0
- package/app/components/shared/ui/StackDivider/index.jsx +8 -0
- package/app/components/shared/ui/StylesProvider/index.jsx +8 -0
- package/app/components/shared/ui/Text/index.jsx +8 -0
- package/app/components/shared/ui/Tooltip/index.jsx +8 -0
- package/app/components/shared/ui/VStack/index.jsx +8 -0
- package/app/components/shared/ui/Wrap/index.jsx +8 -0
- package/app/components/shared/ui/WrapItem/index.jsx +8 -0
- package/app/components/shared/ui/createStylesContext/index.jsx +8 -0
- package/app/components/shared/ui/extendTheme/index.jsx +8 -0
- package/app/components/shared/ui/index.jsx +107 -0
- package/app/components/shared/ui/useBreakpoint/index.jsx +8 -0
- package/app/components/shared/ui/useBreakpointValue/index.jsx +8 -0
- package/app/components/shared/ui/useDisclosure/index.jsx +8 -0
- package/app/components/shared/ui/useMediaQuery/index.jsx +8 -0
- package/app/components/shared/ui/useMultiStyleConfig/index.jsx +8 -0
- package/app/components/shared/ui/useNumberInput/index.jsx +8 -0
- package/app/components/shared/ui/useRadio/index.jsx +8 -0
- package/app/components/shared/ui/useRadioGroup/index.jsx +8 -0
- package/app/components/shared/ui/useStyleConfig/index.jsx +8 -0
- package/app/components/shared/ui/useStyles/index.jsx +8 -0
- package/app/components/shared/ui/useTheme/index.jsx +8 -0
- package/app/components/shared/ui/useToast/index.jsx +8 -0
- package/app/components/shared/util/SkipNavContent/index.jsx +8 -0
- package/app/components/shared/util/SkipNavLink/index.jsx +8 -0
- package/app/components/shared/util/index.jsx +9 -0
- package/app/components/social-icons/index.jsx +1 -1
- package/app/components/swatch-group/index.jsx +6 -1
- package/app/components/swatch-group/index.test.js +1 -1
- package/app/components/swatch-group/swatch.jsx +6 -1
- package/app/components/toggle-card/index.jsx +7 -1
- package/app/components/with-registration/index.test.js +1 -1
- package/app/hooks/use-add-to-cart-modal.js +1 -1
- package/app/hooks/use-auth-modal.js +1 -1
- package/app/hooks/use-current-basket.js +3 -6
- package/app/hooks/use-toast.js +1 -1
- package/app/hooks/use-toast.test.js +1 -1
- package/app/page-designer/README.md +2 -2
- package/app/page-designer/assets/image-tile/index.jsx +1 -1
- package/app/page-designer/assets/image-with-text/index.jsx +6 -1
- package/app/page-designer/layouts/carousel/index.jsx +1 -1
- package/app/page-designer/layouts/mobileGrid1r1c/index.jsx +1 -1
- package/app/page-designer/layouts/mobileGrid2r1c/index.jsx +1 -1
- package/app/page-designer/layouts/mobileGrid2r2c/index.jsx +1 -1
- package/app/page-designer/layouts/mobileGrid2r3c/index.jsx +1 -1
- package/app/page-designer/layouts/mobileGrid3r1c/index.jsx +1 -1
- package/app/page-designer/layouts/mobileGrid3r2c/index.jsx +1 -1
- package/app/pages/account/addresses.jsx +1 -1
- package/app/pages/account/index.jsx +1 -1
- package/app/pages/account/order-detail.jsx +1 -1
- package/app/pages/account/order-history.jsx +1 -1
- package/app/pages/account/profile.jsx +1 -1
- package/app/pages/account/wishlist/index.jsx +1 -1
- package/app/pages/account/wishlist/partials/wishlist-primary-action.jsx +1 -1
- package/app/pages/account/wishlist/partials/wishlist-secondary-button-group.jsx +5 -1
- package/app/pages/cart/index.jsx +9 -1
- package/app/pages/cart/partials/cart-cta.jsx +1 -1
- package/app/pages/cart/partials/cart-secondary-button-group.jsx +1 -1
- package/app/pages/cart/partials/cart-skeleton.jsx +1 -1
- package/app/pages/cart/partials/cart-title.jsx +1 -1
- package/app/pages/cart/partials/empty-cart.jsx +7 -1
- package/app/pages/checkout/confirmation.jsx +1 -1
- package/app/pages/checkout/index.jsx +10 -1
- package/app/pages/checkout/index.test.js +10 -0
- package/app/pages/checkout/partials/cc-radio-group.jsx +9 -1
- package/app/pages/checkout/partials/checkout-footer.jsx +1 -1
- package/app/pages/checkout/partials/checkout-header.jsx +7 -1
- package/app/pages/checkout/partials/checkout-skeleton.jsx +8 -1
- package/app/pages/checkout/partials/contact-info.jsx +8 -2
- package/app/pages/checkout/partials/payment-form.jsx +9 -1
- package/app/pages/checkout/partials/payment.jsx +10 -1
- package/app/pages/checkout/partials/shipping-address-selection.jsx +8 -1
- package/app/pages/checkout/partials/shipping-options.jsx +10 -1
- package/app/pages/home/index.jsx +1 -1
- package/app/pages/login/index.jsx +1 -1
- package/app/pages/page-not-found/index.jsx +8 -1
- package/app/pages/product-detail/index.jsx +8 -1
- package/app/pages/product-detail/index.mock.js +14 -0
- package/app/pages/product-detail/index.test.js +69 -6
- package/app/pages/product-detail/partials/information-accordion.jsx +1 -1
- package/app/pages/product-list/index.jsx +1 -1
- package/app/pages/product-list/partials/checkbox-refinements.jsx +1 -1
- package/app/pages/product-list/partials/color-refinements.jsx +9 -1
- package/app/pages/product-list/partials/empty-results.jsx +7 -1
- package/app/pages/product-list/partials/link-refinements.jsx +1 -1
- package/app/pages/product-list/partials/page-header.jsx +1 -1
- package/app/pages/product-list/partials/radio-refinements.jsx +7 -1
- package/app/pages/product-list/partials/refinements.jsx +1 -1
- package/app/pages/product-list/partials/selected-refinements.jsx +1 -1
- package/app/pages/product-list/partials/size-refinements.jsx +6 -1
- package/app/pages/registration/index.jsx +1 -1
- package/app/pages/reset-password/index.jsx +7 -1
- package/app/routes.jsx +1 -1
- package/app/ssr.js +9 -8
- package/app/theme/components/project/_app.js +1 -1
- package/app/theme/index.js +1 -1
- package/app/utils/responsive-image.js +1 -1
- package/app/utils/test-utils.js +1 -1
- package/config/default.js +1 -1
- package/config/mocks/default.js +1 -1
- package/jest-setup.js +3 -2
- package/jsconfig.json +1 -1
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -22,7 +22,11 @@ import {
|
|
|
22
22
|
} from '@salesforce/commerce-sdk-react'
|
|
23
23
|
import * as queryKeyHelpers from '@salesforce/commerce-sdk-react/hooks/ShopperProducts/queryKeyHelpers'
|
|
24
24
|
// Chakra
|
|
25
|
-
import {
|
|
25
|
+
import {
|
|
26
|
+
Box,
|
|
27
|
+
useDisclosure,
|
|
28
|
+
useStyleConfig
|
|
29
|
+
} from '@salesforce/retail-react-app/app/components/shared/ui'
|
|
26
30
|
import {SkipNavLink, SkipNavContent} from '@chakra-ui/skip-nav'
|
|
27
31
|
|
|
28
32
|
// Contexts
|
|
@@ -71,7 +75,7 @@ import Seo from '@salesforce/retail-react-app/app/components/seo'
|
|
|
71
75
|
|
|
72
76
|
const onClient = typeof window !== 'undefined'
|
|
73
77
|
|
|
74
|
-
/*
|
|
78
|
+
/*
|
|
75
79
|
The categories tree can be really large! For performance reasons,
|
|
76
80
|
we only load the level 0 categories on server side, and load the rest
|
|
77
81
|
on client side to reduce SSR page size.
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import React from 'react'
|
|
8
8
|
import PropTypes from 'prop-types'
|
|
9
|
-
import {ChakraProvider} from '@
|
|
9
|
+
import {ChakraProvider} from '@salesforce/retail-react-app/app/components/shared/ui'
|
|
10
10
|
|
|
11
11
|
// Removes focus for non-keyboard interactions for the whole application
|
|
12
12
|
import 'focus-visible/dist/focus-visible'
|
|
@@ -17,8 +17,10 @@ import {rest} from 'msw'
|
|
|
17
17
|
import {registerUserToken} from '@salesforce/retail-react-app/app/utils/test-utils'
|
|
18
18
|
|
|
19
19
|
describe('AppConfig', () => {
|
|
20
|
+
let originalFetch
|
|
20
21
|
beforeAll(() => {
|
|
21
22
|
jest.spyOn(window.localStorage, 'setItem')
|
|
23
|
+
originalFetch = global.fetch
|
|
22
24
|
global.fetch = jest.fn().mockImplementation(() => mockConfig.mockFetchOCAPISessions)
|
|
23
25
|
})
|
|
24
26
|
|
|
@@ -45,7 +47,7 @@ describe('AppConfig', () => {
|
|
|
45
47
|
afterAll(() => {
|
|
46
48
|
window.localStorage.setItem.mockRestore()
|
|
47
49
|
global.fetch.mockClear()
|
|
48
|
-
|
|
50
|
+
global.fetch = originalFetch
|
|
49
51
|
})
|
|
50
52
|
|
|
51
53
|
test('renders', async () => {
|
|
@@ -7,7 +7,15 @@
|
|
|
7
7
|
import React from 'react'
|
|
8
8
|
import PropTypes from 'prop-types'
|
|
9
9
|
import {Helmet} from 'react-helmet'
|
|
10
|
-
import {
|
|
10
|
+
import {
|
|
11
|
+
Box,
|
|
12
|
+
Button,
|
|
13
|
+
Flex,
|
|
14
|
+
Heading,
|
|
15
|
+
IconButton,
|
|
16
|
+
Stack,
|
|
17
|
+
Text
|
|
18
|
+
} from '@salesforce/retail-react-app/app/components/shared/ui'
|
|
11
19
|
|
|
12
20
|
import {BrandLogo, FileIcon} from '@salesforce/retail-react-app/app/components/icons'
|
|
13
21
|
import {useHistory} from 'react-router-dom'
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import React, {useState} from 'react'
|
|
8
8
|
import PropTypes from 'prop-types'
|
|
9
|
-
import {Stack, Box, Button} from '@
|
|
9
|
+
import {Stack, Box, Button} from '@salesforce/retail-react-app/app/components/shared/ui'
|
|
10
10
|
import {FormattedMessage} from 'react-intl'
|
|
11
11
|
import LoadingSpinner from '@salesforce/retail-react-app/app/components/loading-spinner'
|
|
12
12
|
|
|
@@ -7,7 +7,13 @@
|
|
|
7
7
|
|
|
8
8
|
import React from 'react'
|
|
9
9
|
import PropTypes from 'prop-types'
|
|
10
|
-
import {
|
|
10
|
+
import {
|
|
11
|
+
Box,
|
|
12
|
+
Img,
|
|
13
|
+
Text,
|
|
14
|
+
AspectRatio,
|
|
15
|
+
useTheme
|
|
16
|
+
} from '@salesforce/retail-react-app/app/components/shared/ui'
|
|
11
17
|
import {Link} from 'react-router-dom'
|
|
12
18
|
|
|
13
19
|
import {ChevronRightIcon} from '@salesforce/retail-react-app/app/components/icons'
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
BreadcrumbLink as ChakraBreadcrumbLink,
|
|
18
18
|
// Hooks
|
|
19
19
|
useStyleConfig
|
|
20
|
-
} from '@
|
|
20
|
+
} from '@salesforce/retail-react-app/app/components/shared/ui'
|
|
21
21
|
|
|
22
22
|
// Icons
|
|
23
23
|
import {ChevronRightIcon} from '@salesforce/retail-react-app/app/components/icons'
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
AlertDialogContent,
|
|
16
16
|
AlertDialogOverlay,
|
|
17
17
|
Text
|
|
18
|
-
} from '@
|
|
18
|
+
} from '@salesforce/retail-react-app/app/components/shared/ui'
|
|
19
19
|
|
|
20
20
|
import PropTypes from 'prop-types'
|
|
21
21
|
import {CONFIRMATION_DIALOG_DEFAULT_CONFIG} from '@salesforce/retail-react-app/app/pages/account/constant'
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import React from 'react'
|
|
8
8
|
import ConfirmationModal from '@salesforce/retail-react-app/app/components/confirmation-modal/index'
|
|
9
|
-
import {Box, useDisclosure} from '@
|
|
9
|
+
import {Box, useDisclosure} from '@salesforce/retail-react-app/app/components/shared/ui'
|
|
10
10
|
import {renderWithProviders} from '@salesforce/retail-react-app/app/utils/test-utils'
|
|
11
11
|
import userEvent from '@testing-library/user-event'
|
|
12
12
|
import {screen} from '@testing-library/react'
|
|
@@ -39,7 +39,7 @@ import {
|
|
|
39
39
|
// Hooks
|
|
40
40
|
useBreakpointValue,
|
|
41
41
|
useMultiStyleConfig
|
|
42
|
-
} from '@
|
|
42
|
+
} from '@salesforce/retail-react-app/app/components/shared/ui'
|
|
43
43
|
import {AuthHelpers, useAuthHelper, useCustomerType} from '@salesforce/commerce-sdk-react'
|
|
44
44
|
import Link from '@salesforce/retail-react-app/app/components/link'
|
|
45
45
|
// Icons
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import React, {useMemo} from 'react'
|
|
8
8
|
import PropTypes from 'prop-types'
|
|
9
|
-
import {Img, Box, useTheme} from '@
|
|
9
|
+
import {Img, Box, useTheme} from '@salesforce/retail-react-app/app/components/shared/ui'
|
|
10
10
|
import {getResponsiveImageAttributes} from '@salesforce/retail-react-app/app/utils/responsive-image'
|
|
11
11
|
|
|
12
12
|
/**
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
InputRightElement,
|
|
18
18
|
Select,
|
|
19
19
|
Checkbox
|
|
20
|
-
} from '@
|
|
20
|
+
} from '@salesforce/retail-react-app/app/components/shared/ui'
|
|
21
21
|
import {VisibilityIcon, VisibilityOffIcon} from '@salesforce/retail-react-app/app/components/icons'
|
|
22
22
|
|
|
23
23
|
const Field = ({
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
createStylesContext,
|
|
21
21
|
Button,
|
|
22
22
|
FormControl
|
|
23
|
-
} from '@
|
|
23
|
+
} from '@salesforce/retail-react-app/app/components/shared/ui'
|
|
24
24
|
import {useIntl} from 'react-intl'
|
|
25
25
|
|
|
26
26
|
import LinksList from '@salesforce/retail-react-app/app/components/links-list'
|
|
@@ -211,7 +211,7 @@ const Subscribe = ({...otherProps}) => {
|
|
|
211
211
|
|
|
212
212
|
<Box>
|
|
213
213
|
<InputGroup>
|
|
214
|
-
{/* Had to swap the following InputRightElement and Input
|
|
214
|
+
{/* Had to swap the following InputRightElement and Input
|
|
215
215
|
to avoid the hydration error due to mismatched html between server and client side.
|
|
216
216
|
This is a workaround for Lastpass plugin that automatically injects its icon for input fields.
|
|
217
217
|
*/}
|
|
@@ -6,7 +6,12 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import React from 'react'
|
|
8
8
|
import PropTypes from 'prop-types'
|
|
9
|
-
import {
|
|
9
|
+
import {
|
|
10
|
+
Grid,
|
|
11
|
+
GridItem,
|
|
12
|
+
SimpleGrid,
|
|
13
|
+
Stack
|
|
14
|
+
} from '@salesforce/retail-react-app/app/components/shared/ui'
|
|
10
15
|
import useAddressFields from '@salesforce/retail-react-app/app/components/forms/useAddressFields'
|
|
11
16
|
import Field from '@salesforce/retail-react-app/app/components/field'
|
|
12
17
|
import {useCurrentCustomer} from '@salesforce/retail-react-app/app/hooks/use-current-customer'
|
|
@@ -8,7 +8,15 @@ import React from 'react'
|
|
|
8
8
|
import PropTypes from 'prop-types'
|
|
9
9
|
import ccValidator from 'card-validator'
|
|
10
10
|
import {useIntl} from 'react-intl'
|
|
11
|
-
import {
|
|
11
|
+
import {
|
|
12
|
+
Box,
|
|
13
|
+
Flex,
|
|
14
|
+
FormLabel,
|
|
15
|
+
InputRightElement,
|
|
16
|
+
SimpleGrid,
|
|
17
|
+
Stack,
|
|
18
|
+
Tooltip
|
|
19
|
+
} from '@salesforce/retail-react-app/app/components/shared/ui'
|
|
12
20
|
import {
|
|
13
21
|
formatCreditCardNumber,
|
|
14
22
|
getCreditCardIcon
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
import React from 'react'
|
|
8
8
|
import PropTypes from 'prop-types'
|
|
9
9
|
import {FormattedMessage} from 'react-intl'
|
|
10
|
-
import {Button, Stack} from '@
|
|
10
|
+
import {Button, Stack} from '@salesforce/retail-react-app/app/components/shared/ui'
|
|
11
11
|
import {MESSAGE_PROPTYPE} from '@salesforce/retail-react-app/app/utils/locale.js'
|
|
12
12
|
|
|
13
13
|
/**
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import React from 'react'
|
|
8
8
|
import PropTypes from 'prop-types'
|
|
9
|
-
import {Stack} from '@
|
|
9
|
+
import {Stack} from '@salesforce/retail-react-app/app/components/shared/ui'
|
|
10
10
|
import useLoginFields from '@salesforce/retail-react-app/app/components/forms/useLoginFields'
|
|
11
11
|
import Field from '@salesforce/retail-react-app/app/components/field'
|
|
12
12
|
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
import React from 'react'
|
|
8
8
|
import PropTypes from 'prop-types'
|
|
9
9
|
import {FormattedMessage} from 'react-intl'
|
|
10
|
-
import {Flex, Text, Stack} from '@
|
|
10
|
+
import {Flex, Text, Stack} from '@salesforce/retail-react-app/app/components/shared/ui'
|
|
11
11
|
import {CheckCircleIcon} from '@salesforce/retail-react-app/app/components/icons'
|
|
12
12
|
import {validatePassword} from '@salesforce/retail-react-app/app/utils/password-utils'
|
|
13
13
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import React from 'react'
|
|
8
8
|
import PropTypes from 'prop-types'
|
|
9
|
-
import {Stack, Box} from '@
|
|
9
|
+
import {Stack, Box} from '@salesforce/retail-react-app/app/components/shared/ui'
|
|
10
10
|
import useRegistrationFields from '@salesforce/retail-react-app/app/components/forms/useRegistrationFields'
|
|
11
11
|
import PasswordRequirements from '@salesforce/retail-react-app/app/components/forms/password-requirements'
|
|
12
12
|
import Field from '@salesforce/retail-react-app/app/components/field'
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import React from 'react'
|
|
8
8
|
import PropTypes from 'prop-types'
|
|
9
|
-
import {SimpleGrid, Stack} from '@
|
|
9
|
+
import {SimpleGrid, Stack} from '@salesforce/retail-react-app/app/components/shared/ui'
|
|
10
10
|
import useProfileFields from '@salesforce/retail-react-app/app/components/forms/useProfileFields'
|
|
11
11
|
import Field from '@salesforce/retail-react-app/app/components/field'
|
|
12
12
|
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
import React from 'react'
|
|
8
8
|
import PropTypes from 'prop-types'
|
|
9
9
|
import {FormattedMessage} from 'react-intl'
|
|
10
|
-
import {Box, Button} from '@
|
|
10
|
+
import {Box, Button} from '@salesforce/retail-react-app/app/components/shared/ui'
|
|
11
11
|
import usePromoCodeFields from '@salesforce/retail-react-app/app/components/forms/usePromoCodeFields'
|
|
12
12
|
import Field from '@salesforce/retail-react-app/app/components/field'
|
|
13
13
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import React from 'react'
|
|
8
8
|
import PropTypes from 'prop-types'
|
|
9
|
-
import {Stack} from '@
|
|
9
|
+
import {Stack} from '@salesforce/retail-react-app/app/components/shared/ui'
|
|
10
10
|
import useRegistrationFields from '@salesforce/retail-react-app/app/components/forms/useRegistrationFields'
|
|
11
11
|
import Field from '@salesforce/retail-react-app/app/components/field'
|
|
12
12
|
import PasswordRequirements from '@salesforce/retail-react-app/app/components/forms/password-requirements'
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import React from 'react'
|
|
8
8
|
import PropTypes from 'prop-types'
|
|
9
|
-
import {Box} from '@
|
|
9
|
+
import {Box} from '@salesforce/retail-react-app/app/components/shared/ui'
|
|
10
10
|
import useResetPasswordFields from '@salesforce/retail-react-app/app/components/forms/useResetPasswordFields'
|
|
11
11
|
import Field from '@salesforce/retail-react-app/app/components/field'
|
|
12
12
|
|
|
@@ -7,7 +7,12 @@
|
|
|
7
7
|
import React from 'react'
|
|
8
8
|
import PropTypes from 'prop-types'
|
|
9
9
|
import {FormattedMessage} from 'react-intl'
|
|
10
|
-
import {
|
|
10
|
+
import {
|
|
11
|
+
Box,
|
|
12
|
+
Button,
|
|
13
|
+
Stack,
|
|
14
|
+
StackDivider
|
|
15
|
+
} from '@salesforce/retail-react-app/app/components/shared/ui'
|
|
11
16
|
import useUpdatePasswordFields from '@salesforce/retail-react-app/app/components/forms/useUpdatePasswordFields'
|
|
12
17
|
import Field from '@salesforce/retail-react-app/app/components/field'
|
|
13
18
|
import PasswordRequirements from '@salesforce/retail-react-app/app/components/forms/password-requirements'
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
Divider,
|
|
27
27
|
useDisclosure,
|
|
28
28
|
useMediaQuery
|
|
29
|
-
} from '@
|
|
29
|
+
} from '@salesforce/retail-react-app/app/components/shared/ui'
|
|
30
30
|
import {AuthHelpers, useAuthHelper, useCustomerType} from '@salesforce/commerce-sdk-react'
|
|
31
31
|
|
|
32
32
|
import {useCurrentBasket} from '@salesforce/retail-react-app/app/hooks/use-current-basket'
|
|
@@ -20,8 +20,10 @@ import {
|
|
|
20
20
|
mockedRegisteredCustomer
|
|
21
21
|
} from '@salesforce/retail-react-app/app/mocks/mock-data'
|
|
22
22
|
|
|
23
|
-
jest.mock('@
|
|
24
|
-
const originalModule = jest.requireActual(
|
|
23
|
+
jest.mock('@salesforce/retail-react-app/app/components/shared/ui', () => {
|
|
24
|
+
const originalModule = jest.requireActual(
|
|
25
|
+
'@salesforce/retail-react-app/app/components/shared/ui'
|
|
26
|
+
)
|
|
25
27
|
return {
|
|
26
28
|
...originalModule,
|
|
27
29
|
useMediaQuery: jest.fn().mockReturnValue([true])
|
|
@@ -7,7 +7,13 @@
|
|
|
7
7
|
|
|
8
8
|
import React from 'react'
|
|
9
9
|
import PropTypes from 'prop-types'
|
|
10
|
-
import {
|
|
10
|
+
import {
|
|
11
|
+
Box,
|
|
12
|
+
Flex,
|
|
13
|
+
Heading,
|
|
14
|
+
Stack,
|
|
15
|
+
Image
|
|
16
|
+
} from '@salesforce/retail-react-app/app/components/shared/ui'
|
|
11
17
|
|
|
12
18
|
const Hero = ({title, img, actions, ...props}) => {
|
|
13
19
|
const {src, alt} = img
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
6
6
|
*/
|
|
7
7
|
import React, {forwardRef} from 'react'
|
|
8
|
-
import {Icon, useTheme} from '@
|
|
8
|
+
import {Icon, useTheme} from '@salesforce/retail-react-app/app/components/shared/ui'
|
|
9
9
|
|
|
10
10
|
// Our own SVG imports. These will be extracted to a single sprite sheet by the
|
|
11
11
|
// svg-sprite-loader webpack plugin at build time and injected in the <body> tag
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
ListItem,
|
|
22
22
|
List,
|
|
23
23
|
useMultiStyleConfig
|
|
24
|
-
} from '@
|
|
24
|
+
} from '@salesforce/retail-react-app/app/components/shared/ui'
|
|
25
25
|
import {findImageGroupBy} from '@salesforce/retail-react-app/app/utils/image-groups-utils'
|
|
26
26
|
import DynamicImage from '@salesforce/retail-react-app/app/components/dynamic-image'
|
|
27
27
|
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
import React from 'react'
|
|
9
9
|
import PropTypes from 'prop-types'
|
|
10
10
|
import {FormattedMessage, FormattedNumber} from 'react-intl'
|
|
11
|
-
import {Flex, Stack, Text} from '@
|
|
11
|
+
import {Flex, Stack, Text} from '@salesforce/retail-react-app/app/components/shared/ui'
|
|
12
12
|
import {useItemVariant} from '@salesforce/retail-react-app/app/components/item-variant'
|
|
13
13
|
import PromoPopover from '@salesforce/retail-react-app/app/components/promo-popover'
|
|
14
14
|
import {useCurrency} from '@salesforce/retail-react-app/app/hooks'
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import React from 'react'
|
|
8
8
|
import PropTypes from 'prop-types'
|
|
9
|
-
import {AspectRatio, Box, Badge, Image} from '@
|
|
9
|
+
import {AspectRatio, Box, Badge, Image} from '@salesforce/retail-react-app/app/components/shared/ui'
|
|
10
10
|
import {useItemVariant} from '.'
|
|
11
11
|
import {FormattedMessage} from 'react-intl'
|
|
12
12
|
import {findImageGroupBy} from '@salesforce/retail-react-app/app/utils/image-groups-utils'
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
import React from 'react'
|
|
8
8
|
import PropTypes from 'prop-types'
|
|
9
9
|
import {FormattedMessage, FormattedNumber, useIntl} from 'react-intl'
|
|
10
|
-
import {Stack, Text} from '@
|
|
10
|
+
import {Stack, Text} from '@salesforce/retail-react-app/app/components/shared/ui'
|
|
11
11
|
import {useItemVariant} from '.'
|
|
12
12
|
import {HideOnDesktop, HideOnMobile} from '@salesforce/retail-react-app/app/components/responsive'
|
|
13
13
|
import {useCurrency} from '@salesforce/retail-react-app/app/hooks'
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import React from 'react'
|
|
8
8
|
import PropTypes from 'prop-types'
|
|
9
|
-
import {Link as ChakraLink} from '@
|
|
9
|
+
import {Link as ChakraLink} from '@salesforce/retail-react-app/app/components/shared/ui'
|
|
10
10
|
import {Link as SPALink, NavLink as NavSPALink} from 'react-router-dom'
|
|
11
11
|
import useMultiSite from '@salesforce/retail-react-app/app/hooks/use-multi-site'
|
|
12
12
|
|
|
@@ -6,7 +6,14 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import React from 'react'
|
|
8
8
|
import PropTypes from 'prop-types'
|
|
9
|
-
import {
|
|
9
|
+
import {
|
|
10
|
+
Box,
|
|
11
|
+
List,
|
|
12
|
+
ListItem,
|
|
13
|
+
Heading,
|
|
14
|
+
HStack,
|
|
15
|
+
useMultiStyleConfig
|
|
16
|
+
} from '@salesforce/retail-react-app/app/components/shared/ui'
|
|
10
17
|
import Link from '@salesforce/retail-react-app/app/components/link'
|
|
11
18
|
|
|
12
19
|
const LinksList = ({
|
|
@@ -6,7 +6,10 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import React from 'react'
|
|
8
8
|
import PropTypes from 'prop-types'
|
|
9
|
-
import {
|
|
9
|
+
import {
|
|
10
|
+
StylesProvider,
|
|
11
|
+
useMultiStyleConfig
|
|
12
|
+
} from '@salesforce/retail-react-app/app/components/shared/ui'
|
|
10
13
|
import {screen} from '@testing-library/react'
|
|
11
14
|
|
|
12
15
|
import {renderWithProviders} from '@salesforce/retail-react-app/app/utils/test-utils'
|
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
// Hooks
|
|
32
32
|
useTheme,
|
|
33
33
|
useDisclosure
|
|
34
|
-
} from '@
|
|
34
|
+
} from '@salesforce/retail-react-app/app/components/shared/ui'
|
|
35
35
|
import Link from '@salesforce/retail-react-app/app/components/link'
|
|
36
36
|
// Others
|
|
37
37
|
import {categoryUrlBuilder} from '@salesforce/retail-react-app/app/utils/url'
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
6
6
|
*/
|
|
7
7
|
import React from 'react'
|
|
8
|
-
import {Box, Spinner} from '@
|
|
8
|
+
import {Box, Spinner} from '@salesforce/retail-react-app/app/components/shared/ui'
|
|
9
9
|
import PropTypes from 'prop-types'
|
|
10
10
|
|
|
11
11
|
const LoadingSpinner = ({wrapperStyles = {}, spinnerStyles = {}}) => {
|
|
@@ -8,7 +8,13 @@
|
|
|
8
8
|
import React, {Fragment} from 'react'
|
|
9
9
|
import PropTypes from 'prop-types'
|
|
10
10
|
import {FormattedMessage} from 'react-intl'
|
|
11
|
-
import {
|
|
11
|
+
import {
|
|
12
|
+
Alert,
|
|
13
|
+
Box,
|
|
14
|
+
Button,
|
|
15
|
+
Stack,
|
|
16
|
+
Text
|
|
17
|
+
} from '@salesforce/retail-react-app/app/components/shared/ui'
|
|
12
18
|
import {AlertIcon, BrandLogo} from '@salesforce/retail-react-app/app/components/icons'
|
|
13
19
|
import LoginFields from '@salesforce/retail-react-app/app/components/forms/login-fields'
|
|
14
20
|
import {noop} from '@salesforce/retail-react-app/app/utils/utils'
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
|
|
19
19
|
// Hooks
|
|
20
20
|
useStyleConfig
|
|
21
|
-
} from '@
|
|
21
|
+
} from '@salesforce/retail-react-app/app/components/shared/ui'
|
|
22
22
|
import Link from '@salesforce/retail-react-app/app/components/link'
|
|
23
23
|
// Icons
|
|
24
24
|
import {ChevronDownIcon, ChevronRightIcon} from '@salesforce/retail-react-app/app/components/icons'
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
import React from 'react'
|
|
8
8
|
import PropTypes from 'prop-types'
|
|
9
9
|
import {withRouter} from 'react-router-dom'
|
|
10
|
-
import {Button} from '@
|
|
10
|
+
import {Button} from '@salesforce/retail-react-app/app/components/shared/ui'
|
|
11
11
|
import {AlertIcon} from '@salesforce/retail-react-app/app/components/icons'
|
|
12
12
|
|
|
13
13
|
// import Button from '@salesforce/pwa-kit-react-sdk/components/button'
|
|
@@ -7,7 +7,15 @@
|
|
|
7
7
|
import React, {useState} from 'react'
|
|
8
8
|
import PropTypes from 'prop-types'
|
|
9
9
|
import {FormattedMessage, FormattedNumber} from 'react-intl'
|
|
10
|
-
import {
|
|
10
|
+
import {
|
|
11
|
+
Box,
|
|
12
|
+
Flex,
|
|
13
|
+
Button,
|
|
14
|
+
Stack,
|
|
15
|
+
Text,
|
|
16
|
+
Heading,
|
|
17
|
+
Divider
|
|
18
|
+
} from '@salesforce/retail-react-app/app/components/shared/ui'
|
|
11
19
|
import {
|
|
12
20
|
BasketIcon,
|
|
13
21
|
ChevronDownIcon,
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
import React from 'react'
|
|
9
9
|
import PropTypes from 'prop-types'
|
|
10
|
-
import {Box, Button, Stack, Text} from '@
|
|
10
|
+
import {Box, Button, Stack, Text} from '@salesforce/retail-react-app/app/components/shared/ui'
|
|
11
11
|
import {PlusIcon} from '@salesforce/retail-react-app/app/components/icons'
|
|
12
12
|
|
|
13
13
|
const PageActionPlaceHolder = ({heading, text, icon, buttonText, buttonProps, onButtonClick}) => {
|
|
@@ -9,7 +9,7 @@ import PropTypes from 'prop-types'
|
|
|
9
9
|
import {FormattedMessage} from 'react-intl'
|
|
10
10
|
|
|
11
11
|
// Chakra Components
|
|
12
|
-
import {Box, Fade, Flex, Stack, Text} from '@
|
|
12
|
+
import {Box, Fade, Flex, Stack, Text} from '@salesforce/retail-react-app/app/components/shared/ui'
|
|
13
13
|
|
|
14
14
|
// Project Components
|
|
15
15
|
import {HideOnDesktop, HideOnMobile} from '@salesforce/retail-react-app/app/components/responsive'
|
|
@@ -6,7 +6,14 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import React, {forwardRef, useRef} from 'react'
|
|
8
8
|
import PropTypes from 'prop-types'
|
|
9
|
-
import {
|
|
9
|
+
import {
|
|
10
|
+
AspectRatio,
|
|
11
|
+
Box,
|
|
12
|
+
Heading,
|
|
13
|
+
IconButton,
|
|
14
|
+
Skeleton,
|
|
15
|
+
Stack
|
|
16
|
+
} from '@salesforce/retail-react-app/app/components/shared/ui'
|
|
10
17
|
import ProductTile from '@salesforce/retail-react-app/app/components/product-tile'
|
|
11
18
|
import {ChevronLeftIcon, ChevronRightIcon} from '@salesforce/retail-react-app/app/components/icons'
|
|
12
19
|
|