@faststore/core 2.0.121-alpha.0 → 2.0.123-alpha.0
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/.turbo/turbo-build.log +15 -16
- package/CHANGELOG.md +12 -0
- package/package.json +4 -4
- package/src/components/cart/CartSidebar/CartSidebar.tsx +6 -2
- package/src/components/cart/CartSidebar/section.module.scss +21 -0
- package/src/components/cms/GlobalSections.tsx +6 -6
- package/src/components/common/Alert/Alert.tsx +8 -3
- package/src/components/common/Alert/section.module.scss +9 -0
- package/src/components/common/Footer/Footer.tsx +87 -89
- package/src/components/common/Footer/FooterLinks.tsx +4 -6
- package/src/components/common/Footer/section.module.scss +12 -0
- package/src/components/common/RegionBar/RegionBar.tsx +17 -0
- package/src/components/common/RegionBar/index.ts +1 -0
- package/src/components/common/RegionBar/section.module.scss +8 -0
- package/src/components/navigation/Navbar/Navbar.tsx +62 -61
- package/src/components/navigation/Navbar/section.module.scss +26 -0
- package/src/components/navigation/NavbarLinks/NavbarLinks.tsx +0 -1
- package/src/components/navigation/NavbarSlider/NavbarSlider.tsx +11 -7
- package/src/components/navigation/NavbarSlider/section.module.scss +26 -0
- package/src/components/product/ProductGrid/ProductGrid.tsx +2 -4
- package/src/components/region/RegionModal/RegionModal.tsx +6 -1
- package/src/components/region/RegionModal/section.module.scss +13 -0
- package/src/components/search/Filter/Filter.tsx +6 -3
- package/src/components/search/Filter/FilterSlider.tsx +5 -0
- package/src/components/search/Filter/section.module.scss +22 -0
- package/src/components/sections/BannerNewsletter/BannerNewsletter.tsx +5 -3
- package/src/components/sections/BannerNewsletter/section.module.scss +8 -0
- package/src/components/sections/BannerText/BannerText.tsx +4 -2
- package/src/components/sections/BannerText/section.module.scss +8 -0
- package/src/components/sections/Breadcrumb/Breadcrumb.tsx +4 -2
- package/src/components/sections/Breadcrumb/section.module.scss +9 -0
- package/src/components/sections/Hero/Hero.tsx +5 -9
- package/src/components/sections/Hero/section.module.scss +9 -0
- package/src/components/sections/{Incentives → IncentivesHeader}/IncentivesHeader.tsx +3 -2
- package/src/components/sections/IncentivesHeader/index.ts +1 -0
- package/src/components/sections/IncentivesHeader/section.module.scss +8 -0
- package/src/components/sections/Newsletter/Newsletter.tsx +68 -69
- package/src/components/sections/Newsletter/section.module.scss +11 -0
- package/src/components/sections/ProducDetailsContent/ProductDetailsContent.tsx +2 -4
- package/src/components/sections/ProductDetails/ProductDetails.tsx +44 -43
- package/src/components/sections/ProductDetails/section.module.scss +27 -0
- package/src/components/sections/ProductGallery/ProductGallery.tsx +121 -119
- package/src/components/sections/ProductGallery/section.module.scss +28 -0
- package/src/components/sections/ProductShelf/ProductShelf.tsx +8 -4
- package/src/components/sections/ProductShelf/section.module.scss +17 -0
- package/src/components/sections/ProductTiles/ProductTiles.tsx +9 -4
- package/src/components/sections/ProductTiles/section.module.scss +17 -0
- package/src/components/sections/ScrollToTopButton/ScrollToTopButton.tsx +3 -3
- package/src/components/sections/ScrollToTopButton/section.module.scss +11 -0
- package/src/components/skeletons/FilterSkeleton/FilterSkeleton.tsx +1 -2
- package/src/components/skeletons/ProductCardSkeleton/ProductCardSkeleton.tsx +0 -3
- package/src/components/skeletons/ProductShelfSkeleton/ProductShelfSkeleton.tsx +2 -2
- package/src/components/skeletons/ProductTilesSkeleton/ProductTileSkeleton/ProductTileSkeleton.tsx +0 -3
- package/src/components/ui/BannerText/BannerText.tsx +0 -3
- package/src/components/ui/Button/ButtonSignIn/ButtonSignIn.tsx +1 -2
- package/src/components/{sections → ui}/Incentives/Incentives.tsx +0 -3
- package/src/components/ui/Incentives/incentivesMock.ts +27 -0
- package/src/components/ui/Logo/Logo.tsx +1 -10
- package/src/components/ui/Tiles/Tiles.tsx +1 -6
- package/src/pages/[slug]/p.tsx +1 -1
- package/src/pages/_app.tsx +2 -2
- package/src/pages/index.tsx +2 -2
- package/src/styles/global/components.scss +8 -0
- package/src/styles/themes/midnight.scss +1 -1
- package/src/components/common/Footer/Footer.stories.mdx +0 -158
- package/src/components/common/Footer/footer.module.scss +0 -220
- package/src/components/sections/BannerNewsletter/banner-newsletter.module.scss +0 -23
- package/src/components/sections/Incentives/Incentives.stories.mdx +0 -159
- package/src/components/sections/Incentives/IncentivesFooter.tsx +0 -8
- package/src/components/sections/Incentives/incentives.module.scss +0 -122
- package/src/components/sections/Incentives/incentivesMock.ts +0 -55
- package/src/components/sections/Newsletter/Newsletter.stories.mdx +0 -139
- package/src/components/sections/Newsletter/newsletter.module.scss +0 -135
- package/src/components/sections/ProductDetails/product-details.module.scss +0 -185
- package/src/components/sections/ProductGallery/product-gallery.module.scss +0 -184
- package/src/components/sections/ScrollToTopButton/scroll-to-top-button.module.scss +0 -12
- package/src/components/skeletons/FilterSkeleton/FilterSkeleton.stories.mdx +0 -97
- package/src/components/skeletons/FilterSkeleton/filter-skeleton.module.scss +0 -51
- package/src/components/skeletons/ProductCardSkeleton/ProductCardSkeleton.stories.mdx +0 -113
- package/src/components/skeletons/ProductCardSkeleton/product-card-skeleton.module.scss +0 -58
- package/src/components/skeletons/ProductTilesSkeleton/ProductTileSkeleton/product-tile-skeleton.module.scss +0 -81
- package/src/components/ui/BannerText/BannerText.stories.mdx +0 -270
- package/src/components/ui/BannerText/banner-text.module.scss +0 -127
- package/src/components/ui/Button/Button.stories.mdx +0 -643
- package/src/components/ui/Button/button.module.scss +0 -11
- package/src/components/ui/Carousel/Carousel.stories.mdx +0 -201
- package/src/components/ui/Carousel/carousel.module.scss +0 -147
- package/src/components/ui/Logo/logo.module.scss +0 -12
- package/src/components/ui/Tiles/Tiles.stories.mdx +0 -151
- package/src/components/ui/Tiles/tiles.module.scss +0 -58
- /package/src/components/{sections → ui}/Incentives/index.ts +0 -0
package/.turbo/turbo-build.log
CHANGED
|
@@ -36,28 +36,27 @@ info - Generating static pages (7/7)
|
|
|
36
36
|
info - Finalizing page optimization...
|
|
37
37
|
|
|
38
38
|
Route (pages) Size First Load JS
|
|
39
|
-
┌ ● /
|
|
40
|
-
├ └ css/
|
|
39
|
+
┌ ● / 2.85 kB 122 kB
|
|
40
|
+
├ └ css/7a8417de90d11c60.css 7.06 kB
|
|
41
41
|
├ /_app 0 B 77.8 kB
|
|
42
|
-
├ ● /[...slug]
|
|
43
|
-
├ └ css/
|
|
44
|
-
├ ● /[slug]/p
|
|
45
|
-
├ └ css/
|
|
46
|
-
├ ○ /404
|
|
42
|
+
├ ● /[...slug] 9.58 kB 129 kB
|
|
43
|
+
├ └ css/4e0fc649e912b30f.css 6.98 kB
|
|
44
|
+
├ ● /[slug]/p 11.1 kB 131 kB
|
|
45
|
+
├ └ css/4b7b7b64ae6afe67.css 9.14 kB
|
|
46
|
+
├ ○ /404 951 B 110 kB
|
|
47
47
|
├ ● /500 718 B 110 kB
|
|
48
|
-
├ ● /account
|
|
48
|
+
├ ● /account 669 B 110 kB
|
|
49
49
|
├ λ /api/graphql 0 B 77.8 kB
|
|
50
50
|
├ λ /api/preview 0 B 77.8 kB
|
|
51
|
-
├ ● /checkout
|
|
52
|
-
├ ● /login
|
|
53
|
-
└ ● /s
|
|
54
|
-
|
|
55
|
-
+ First Load JS shared by all 100 kB
|
|
51
|
+
├ ● /checkout 657 B 110 kB
|
|
52
|
+
├ ● /login 868 B 110 kB
|
|
53
|
+
└ ● /s 961 B 121 kB
|
|
54
|
+
+ First Load JS shared by all 80.6 kB
|
|
56
55
|
├ chunks/framework-dfd14d7ce6600b03.js 45.3 kB
|
|
57
56
|
├ chunks/main-9746772201fe3ac1.js 23.9 kB
|
|
58
|
-
├ chunks/pages/_app-
|
|
59
|
-
├ chunks/webpack-
|
|
60
|
-
└ css/
|
|
57
|
+
├ chunks/pages/_app-b601536188b9a919.js 6.43 kB
|
|
58
|
+
├ chunks/webpack-426a37879992164d.js 2.24 kB
|
|
59
|
+
└ css/587c27bbda64e700.css 2.8 kB
|
|
61
60
|
|
|
62
61
|
λ (Server) server-side renders at runtime (uses getInitialProps or getServerSideProps)
|
|
63
62
|
○ (Static) automatically rendered as static HTML (uses no initial props)
|
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,18 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [2.0.123-alpha.0](https://github.com/vtex/faststore/compare/v2.0.122-alpha.0...v2.0.123-alpha.0) (2023-05-02)
|
|
7
|
+
|
|
8
|
+
### Documentation
|
|
9
|
+
|
|
10
|
+
- Updates Icons docs + general updates ([#1739](https://github.com/vtex/faststore/issues/1739)) ([44f3521](https://github.com/vtex/faststore/commit/44f35219ba09e157aba0ea47d462f7a2ccc42b50))
|
|
11
|
+
|
|
12
|
+
## [2.0.122-alpha.0](https://github.com/vtex/faststore/compare/v2.0.121-alpha.0...v2.0.122-alpha.0) (2023-04-27)
|
|
13
|
+
|
|
14
|
+
### Bug Fixes
|
|
15
|
+
|
|
16
|
+
- LH Unused CSS + Organizes CMS Sections and components styles. ([#1712](https://github.com/vtex/faststore/issues/1712)) ([0ab1fa8](https://github.com/vtex/faststore/commit/0ab1fa805e41a53f21cbe26dc5143f853b64dc00))
|
|
17
|
+
|
|
6
18
|
## [2.0.121-alpha.0](https://github.com/vtex/faststore/compare/v2.0.120-alpha.0...v2.0.121-alpha.0) (2023-04-27)
|
|
7
19
|
|
|
8
20
|
**Note:** Version bump only for package @faststore/core
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@faststore/core",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.123-alpha.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"browserslist": "supports es6-module and not dead",
|
|
6
6
|
"scripts": {
|
|
@@ -30,10 +30,10 @@
|
|
|
30
30
|
"@envelop/parser-cache": "^2.2.0",
|
|
31
31
|
"@envelop/validation-cache": "^2.2.0",
|
|
32
32
|
"@faststore/api": "^2.0.118-alpha.0",
|
|
33
|
-
"@faststore/components": "^2.0.
|
|
33
|
+
"@faststore/components": "^2.0.123-alpha.0",
|
|
34
34
|
"@faststore/graphql-utils": "^2.0.3-alpha.0",
|
|
35
35
|
"@faststore/sdk": "^2.0.118-alpha.0",
|
|
36
|
-
"@faststore/ui": "^2.0.
|
|
36
|
+
"@faststore/ui": "^2.0.122-alpha.0",
|
|
37
37
|
"@types/react": "^18.0.14",
|
|
38
38
|
"@vtex/client-cms": "^0.2.12",
|
|
39
39
|
"autoprefixer": "^10.4.0",
|
|
@@ -108,5 +108,5 @@
|
|
|
108
108
|
"msw": {
|
|
109
109
|
"workerDirectory": "public"
|
|
110
110
|
},
|
|
111
|
-
"gitHead": "
|
|
111
|
+
"gitHead": "1fa54ca9614dde12ba99a2870273e1797986ee16"
|
|
112
112
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { sendAnalyticsEvent } from '@faststore/sdk'
|
|
2
2
|
import {
|
|
3
|
+
Button as UIButton,
|
|
3
4
|
CartSidebar as UICartSidebar,
|
|
4
|
-
CartSidebarList as UICartSidebarList,
|
|
5
5
|
CartSidebarFooter as UICartSidebarFooter,
|
|
6
|
-
|
|
6
|
+
CartSidebarList as UICartSidebarList,
|
|
7
7
|
} from '@faststore/ui'
|
|
8
8
|
|
|
9
9
|
import type { CurrencyCode, ViewCartEvent } from '@faststore/sdk'
|
|
@@ -18,6 +18,7 @@ import Gift from '../../ui/Gift'
|
|
|
18
18
|
import CartItem from '../CartItem'
|
|
19
19
|
import EmptyCart from '../EmptyCart'
|
|
20
20
|
import OrderSummary from '../OrderSummary'
|
|
21
|
+
import styles from './section.module.scss'
|
|
21
22
|
|
|
22
23
|
function CartSidebar() {
|
|
23
24
|
const { currency } = useSession()
|
|
@@ -55,6 +56,9 @@ function CartSidebar() {
|
|
|
55
56
|
|
|
56
57
|
return (
|
|
57
58
|
<UICartSidebar
|
|
59
|
+
overlayProps={{
|
|
60
|
+
className: `section ${styles.section} section-cart-sidebar`,
|
|
61
|
+
}}
|
|
58
62
|
totalItems={totalItems}
|
|
59
63
|
alertIcon={<Icon name="Truck" />}
|
|
60
64
|
alertText="Free shipping starts at $300"
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/* stylelint-disable no-invalid-position-at-import-rule */
|
|
2
|
+
@import "@faststore/ui/src/styles/base/utilities.scss";
|
|
3
|
+
|
|
4
|
+
.section {
|
|
5
|
+
@import "@faststore/ui/src/components/atoms/Icon/styles.scss";
|
|
6
|
+
@import "@faststore/ui/src/components/atoms/Overlay/styles.scss";
|
|
7
|
+
@import "@faststore/ui/src/components/atoms/Badge/styles.scss";
|
|
8
|
+
@import "@faststore/ui/src/components/atoms/Button/styles.scss";
|
|
9
|
+
@import "@faststore/ui/src/components/atoms/Link/styles.scss";
|
|
10
|
+
@import "@faststore/ui/src/components/atoms/List/styles.scss";
|
|
11
|
+
@import "@faststore/ui/src/components/atoms/Price/styles.scss";
|
|
12
|
+
@import "@faststore/ui/src/components/molecules/Alert/styles.scss";
|
|
13
|
+
@import "@faststore/ui/src/components/molecules/Modal/styles.scss";
|
|
14
|
+
@import "@faststore/ui/src/components/molecules/CartItem/styles.scss";
|
|
15
|
+
@import "@faststore/ui/src/components/molecules/Gift/styles.scss";
|
|
16
|
+
@import "@faststore/ui/src/components/molecules/QuantitySelector/styles.scss";
|
|
17
|
+
@import "@faststore/ui/src/components/molecules/OrderSummary/styles.scss";
|
|
18
|
+
@import "@faststore/ui/src/components/organisms/EmptyState/styles.scss";
|
|
19
|
+
@import "@faststore/ui/src/components/organisms/SlideOver/styles.scss";
|
|
20
|
+
@import "@faststore/ui/src/components/organisms/CartSidebar/styles.scss";
|
|
21
|
+
}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { PropsWithChildren, useMemo } from 'react'
|
|
2
2
|
|
|
3
3
|
import { Locator, Section } from '@vtex/client-cms'
|
|
4
|
-
import { PageContentType, getPage } from 'src/server/cms'
|
|
5
|
-
import CUSTOM_COMPONENTS from 'src/customizations/components'
|
|
6
4
|
import type { ComponentType } from 'react'
|
|
5
|
+
import CUSTOM_COMPONENTS from 'src/customizations/components'
|
|
6
|
+
import { PageContentType, getPage } from 'src/server/cms'
|
|
7
7
|
|
|
8
|
-
import RenderSections from './RenderSections'
|
|
9
|
-
import { RegionBar } from '@faststore/components'
|
|
10
|
-
import Alert from 'src/components/sections/Alert/Alert'
|
|
11
|
-
import Navbar from 'src/components/navigation/Navbar'
|
|
12
8
|
import Footer from 'src/components/common/Footer'
|
|
9
|
+
import RegionBar from 'src/components/common/RegionBar'
|
|
13
10
|
import Toast from 'src/components/common/Toast'
|
|
11
|
+
import Navbar from 'src/components/navigation/Navbar'
|
|
12
|
+
import Alert from 'src/components/sections/Alert/Alert'
|
|
13
|
+
import RenderSections from './RenderSections'
|
|
14
14
|
|
|
15
15
|
// TODO: When the CMS is finished, switch to using 'globalSections'.
|
|
16
16
|
export const GLOBAL_SECTIONS_CONTENT_TYPE = 'globalAlert'
|
|
@@ -4,6 +4,9 @@ import { useCallback, useState } from 'react'
|
|
|
4
4
|
import { Alert as UIAlert, AlertProps as UIAlertProps } from '@faststore/ui'
|
|
5
5
|
import { mark } from 'src/sdk/tests/mark'
|
|
6
6
|
|
|
7
|
+
import Section from 'src/components/sections/Section/Section'
|
|
8
|
+
import styles from './section.module.scss'
|
|
9
|
+
|
|
7
10
|
export interface AlertProps extends UIAlertProps {
|
|
8
11
|
/**
|
|
9
12
|
* For CMS integration purposes, should be used to pass content through it
|
|
@@ -28,9 +31,11 @@ function Alert({
|
|
|
28
31
|
}
|
|
29
32
|
|
|
30
33
|
return (
|
|
31
|
-
<
|
|
32
|
-
{
|
|
33
|
-
|
|
34
|
+
<Section className={`${styles.section} section-alert`}>
|
|
35
|
+
<UIAlert onClose={onAlertClose} {...otherProps}>
|
|
36
|
+
{content ?? children}
|
|
37
|
+
</UIAlert>
|
|
38
|
+
</Section>
|
|
34
39
|
)
|
|
35
40
|
}
|
|
36
41
|
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/* stylelint-disable no-invalid-position-at-import-rule */
|
|
2
|
+
@import "@faststore/ui/src/styles/base/utilities.scss";
|
|
3
|
+
|
|
4
|
+
.section {
|
|
5
|
+
@import "@faststore/ui/src/components/atoms/Icon/styles.scss";
|
|
6
|
+
@import "@faststore/ui/src/components/atoms/Button/styles.scss";
|
|
7
|
+
@import "@faststore/ui/src/components/atoms/Link/styles.scss";
|
|
8
|
+
@import "@faststore/ui/src/components/molecules/Alert/styles.scss";
|
|
9
|
+
}
|
|
@@ -4,14 +4,15 @@ import {
|
|
|
4
4
|
PaymentMethods as UIPaymentMethods,
|
|
5
5
|
} from '@faststore/ui'
|
|
6
6
|
|
|
7
|
-
import IncentivesFooter from 'src/components/sections/Incentives/IncentivesFooter'
|
|
8
7
|
import Link from 'src/components/ui/Link'
|
|
9
8
|
import Logo from 'src/components/ui/Logo'
|
|
10
9
|
import { mark } from 'src/sdk/tests/mark'
|
|
11
10
|
|
|
12
|
-
import
|
|
11
|
+
import Incentives from 'src/components/ui/Incentives/Incentives'
|
|
12
|
+
import { incentivesMockFooter } from 'src/components/ui/Incentives/incentivesMock'
|
|
13
13
|
import FooterFlags from './FooterFlags'
|
|
14
14
|
import FooterLinks from './FooterLinks'
|
|
15
|
+
import styles from './section.module.scss'
|
|
15
16
|
|
|
16
17
|
type FooterProps = {
|
|
17
18
|
/**
|
|
@@ -34,93 +35,90 @@ export function Footer({
|
|
|
34
35
|
sectionPaymentMethods = true,
|
|
35
36
|
}: FooterProps) {
|
|
36
37
|
return (
|
|
37
|
-
<footer
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
</
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
</
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
</
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
</
|
|
100
|
-
</
|
|
101
|
-
</
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
and its affiliated companies.
|
|
122
|
-
</p>
|
|
123
|
-
<address>Mount St, 000, New York / NY - 00000.</address>
|
|
38
|
+
<footer className={`section ${styles.section} section-footer`}>
|
|
39
|
+
<div
|
|
40
|
+
data-fs-footer
|
|
41
|
+
data-fs-footer-incentives={sectionIncentives}
|
|
42
|
+
data-fs-footer-social={sectionSocial}
|
|
43
|
+
data-fs-footer-payment-methods={sectionPaymentMethods}
|
|
44
|
+
className="layout__content-full"
|
|
45
|
+
>
|
|
46
|
+
{sectionIncentives && <Incentives incentives={incentivesMockFooter} />}
|
|
47
|
+
<div data-fs-footer-nav className="layout__content">
|
|
48
|
+
<FooterLinks />
|
|
49
|
+
{sectionSocial && (
|
|
50
|
+
<section data-fs-footer-social>
|
|
51
|
+
<p data-fs-footer-title>Follow us</p>
|
|
52
|
+
<UIList>
|
|
53
|
+
<li>
|
|
54
|
+
<Link
|
|
55
|
+
variant="display"
|
|
56
|
+
size="small"
|
|
57
|
+
href="https://www.facebook.com/"
|
|
58
|
+
title="Facebook"
|
|
59
|
+
target="_blank"
|
|
60
|
+
rel="noopener noreferrer"
|
|
61
|
+
>
|
|
62
|
+
<Icon name="Facebook" />
|
|
63
|
+
</Link>
|
|
64
|
+
</li>
|
|
65
|
+
<li>
|
|
66
|
+
<Link
|
|
67
|
+
variant="display"
|
|
68
|
+
size="small"
|
|
69
|
+
href="https://www.instagram.com/"
|
|
70
|
+
title="Instagram"
|
|
71
|
+
target="_blank"
|
|
72
|
+
rel="noopener noreferrer"
|
|
73
|
+
>
|
|
74
|
+
<Icon name="Instagram" />
|
|
75
|
+
</Link>
|
|
76
|
+
</li>
|
|
77
|
+
<li>
|
|
78
|
+
<Link
|
|
79
|
+
variant="display"
|
|
80
|
+
size="small"
|
|
81
|
+
href="https://www.pinterest.com/"
|
|
82
|
+
title="Pinterest"
|
|
83
|
+
target="_blank"
|
|
84
|
+
rel="noopener noreferrer"
|
|
85
|
+
>
|
|
86
|
+
<Icon name="Pinterest" />
|
|
87
|
+
</Link>
|
|
88
|
+
</li>
|
|
89
|
+
<li>
|
|
90
|
+
<Link
|
|
91
|
+
variant="display"
|
|
92
|
+
size="small"
|
|
93
|
+
href="https://twitter.com/"
|
|
94
|
+
title="Twitter"
|
|
95
|
+
target="_blank"
|
|
96
|
+
rel="noopener noreferrer"
|
|
97
|
+
>
|
|
98
|
+
<Icon name="Twitter" />
|
|
99
|
+
</Link>
|
|
100
|
+
</li>
|
|
101
|
+
</UIList>
|
|
102
|
+
</section>
|
|
103
|
+
)}
|
|
104
|
+
</div>
|
|
105
|
+
<div data-fs-footer-note className="layout__content">
|
|
106
|
+
<Logo />
|
|
107
|
+
{sectionPaymentMethods && (
|
|
108
|
+
<UIPaymentMethods
|
|
109
|
+
title={<p>Payment Methods</p>}
|
|
110
|
+
flagList={FooterFlags}
|
|
111
|
+
/>
|
|
112
|
+
)}
|
|
113
|
+
<div data-fs-footer-copyright className="text__legend">
|
|
114
|
+
<p>This website uses VTEX technology</p>
|
|
115
|
+
<p>
|
|
116
|
+
In-store price may vary. Prices and offers are subject to change.
|
|
117
|
+
2021 Store name. All rights reserved. Store is a trademark of
|
|
118
|
+
Store and its affiliated companies.
|
|
119
|
+
</p>
|
|
120
|
+
<address>Mount St, 000, New York / NY - 00000.</address>
|
|
121
|
+
</div>
|
|
124
122
|
</div>
|
|
125
123
|
</div>
|
|
126
124
|
</footer>
|
|
@@ -1,16 +1,14 @@
|
|
|
1
|
-
import { useState } from 'react'
|
|
2
1
|
import {
|
|
3
|
-
List as UIList,
|
|
4
2
|
Accordion as UIAccordion,
|
|
5
|
-
AccordionItem as UIAccordionItem,
|
|
6
3
|
AccordionButton as UIAccordionButton,
|
|
4
|
+
AccordionItem as UIAccordionItem,
|
|
7
5
|
AccordionPanel as UIAccordionPanel,
|
|
6
|
+
List as UIList,
|
|
8
7
|
} from '@faststore/ui'
|
|
8
|
+
import { useState } from 'react'
|
|
9
9
|
|
|
10
10
|
import Link from 'src/components/ui/Link'
|
|
11
11
|
|
|
12
|
-
import styles from './footer.module.scss'
|
|
13
|
-
|
|
14
12
|
const links = [
|
|
15
13
|
{
|
|
16
14
|
title: 'Our company',
|
|
@@ -128,7 +126,7 @@ function FooterLinks() {
|
|
|
128
126
|
}
|
|
129
127
|
|
|
130
128
|
return (
|
|
131
|
-
<section
|
|
129
|
+
<section data-fs-footer data-fs-footer-links>
|
|
132
130
|
<div className="display-mobile">
|
|
133
131
|
<UIAccordion indices={indicesExpanded} onChange={onChange}>
|
|
134
132
|
{links.map((section) => (
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/* stylelint-disable no-invalid-position-at-import-rule */
|
|
2
|
+
@import "@faststore/ui/src/styles/base/utilities.scss";
|
|
3
|
+
|
|
4
|
+
.section {
|
|
5
|
+
@import "@faststore/ui/src/components/atoms/Link/styles.scss";
|
|
6
|
+
@import "@faststore/ui/src/components/atoms/List/styles.scss";
|
|
7
|
+
@import "@faststore/ui/src/components/atoms/Logo/styles.scss";
|
|
8
|
+
@import "@faststore/ui/src/components/molecules/Accordion/styles.scss";
|
|
9
|
+
@import "@faststore/ui/src/components/organisms/PaymentMethods/styles.scss";
|
|
10
|
+
@import "@faststore/ui/src/components/organisms/Incentives/styles.scss";
|
|
11
|
+
@import "@faststore/ui/src/components/organisms/Footer/styles.scss";
|
|
12
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import RegionBarComponent from 'src/components/region/RegionBar/RegionBar'
|
|
2
|
+
import Section from 'src/components/sections/Section/Section'
|
|
3
|
+
import styles from './section.module.scss'
|
|
4
|
+
|
|
5
|
+
type RegionBarProps = {
|
|
6
|
+
className?: string
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
function RegionBar({ className = '' }: RegionBarProps) {
|
|
10
|
+
return (
|
|
11
|
+
<Section className={`${styles.section} section-region-bar`}>
|
|
12
|
+
<RegionBarComponent className={className} />
|
|
13
|
+
</Section>
|
|
14
|
+
)
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export default RegionBar
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './RegionBar'
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/* stylelint-disable no-invalid-position-at-import-rule */
|
|
2
|
+
@import "@faststore/ui/src/styles/base/utilities.scss";
|
|
3
|
+
|
|
4
|
+
.section {
|
|
5
|
+
@import "@faststore/ui/src/components/atoms/Icon/styles.scss";
|
|
6
|
+
@import "@faststore/ui/src/components/atoms/Button/styles.scss";
|
|
7
|
+
@import "@faststore/ui/src/components/molecules/RegionBar/styles.scss";
|
|
8
|
+
}
|
|
@@ -1,26 +1,28 @@
|
|
|
1
1
|
import { Suspense, useRef, useState } from 'react'
|
|
2
2
|
|
|
3
3
|
import {
|
|
4
|
-
useUI,
|
|
5
|
-
useScrollDirection,
|
|
6
4
|
Icon as UIIcon,
|
|
7
5
|
IconButton as UIIconButton,
|
|
8
6
|
Navbar as UINavbar,
|
|
7
|
+
NavbarButtons as UINavbarButtons,
|
|
9
8
|
NavbarHeader as UINavbarHeader,
|
|
10
9
|
NavbarRow as UINavbarRow,
|
|
11
|
-
|
|
10
|
+
useScrollDirection,
|
|
11
|
+
useUI,
|
|
12
12
|
} from '@faststore/ui'
|
|
13
13
|
|
|
14
14
|
import CartToggle from 'src/components/cart/CartToggle'
|
|
15
|
-
import SearchInput from 'src/components/search/SearchInput'
|
|
16
15
|
import type { SearchInputRef } from 'src/components/search/SearchInput'
|
|
17
|
-
import
|
|
18
|
-
import Link from 'src/components/ui/Link'
|
|
16
|
+
import SearchInput from 'src/components/search/SearchInput'
|
|
19
17
|
import { ButtonSignIn, ButtonSignInFallback } from 'src/components/ui/Button'
|
|
18
|
+
import Link from 'src/components/ui/Link'
|
|
19
|
+
import Logo from 'src/components/ui/Logo'
|
|
20
20
|
import { mark } from 'src/sdk/tests/mark'
|
|
21
21
|
|
|
22
|
-
import NavbarSlider from '../NavbarSlider'
|
|
23
22
|
import NavbarLinks from '../NavbarLinks'
|
|
23
|
+
import NavbarSlider from '../NavbarSlider'
|
|
24
|
+
|
|
25
|
+
import styles from './section.module.scss'
|
|
24
26
|
|
|
25
27
|
function Navbar() {
|
|
26
28
|
const scrollDirection = useScrollDirection()
|
|
@@ -34,67 +36,66 @@ function Navbar() {
|
|
|
34
36
|
}
|
|
35
37
|
|
|
36
38
|
return (
|
|
37
|
-
<
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
</>
|
|
60
|
-
)}
|
|
39
|
+
<header className={`section ${styles.section} section-navbar`}>
|
|
40
|
+
<UINavbar scrollDirection={scrollDirection}>
|
|
41
|
+
<UINavbarHeader>
|
|
42
|
+
<UINavbarRow className="layout__content">
|
|
43
|
+
{!searchExpanded && (
|
|
44
|
+
<>
|
|
45
|
+
<UIIconButton
|
|
46
|
+
data-fs-navbar-button-menu
|
|
47
|
+
aria-label="Open Menu"
|
|
48
|
+
icon={<UIIcon name="List" width={32} height={32} />}
|
|
49
|
+
onClick={openNavbar}
|
|
50
|
+
/>
|
|
51
|
+
<Link
|
|
52
|
+
href="/"
|
|
53
|
+
aria-label="Go to Faststore home"
|
|
54
|
+
title="Go to Faststore home"
|
|
55
|
+
data-fs-navbar-logo
|
|
56
|
+
>
|
|
57
|
+
<Logo />
|
|
58
|
+
</Link>
|
|
59
|
+
</>
|
|
60
|
+
)}
|
|
61
61
|
|
|
62
|
-
|
|
62
|
+
<SearchInput />
|
|
63
63
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
64
|
+
<UINavbarButtons searchExpanded={searchExpanded}>
|
|
65
|
+
{searchExpanded && (
|
|
66
|
+
<UIIconButton
|
|
67
|
+
data-fs-button-collapse
|
|
68
|
+
aria-label="Collapse search bar"
|
|
69
|
+
icon={<UIIcon name="CaretLeft" width={32} height={32} />}
|
|
70
|
+
onClick={() => {
|
|
71
|
+
setSearchExpanded(false)
|
|
72
|
+
searchMobileRef.current?.resetSearchInput()
|
|
73
|
+
}}
|
|
74
|
+
/>
|
|
75
|
+
)}
|
|
76
76
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
77
|
+
<SearchInput
|
|
78
|
+
placeholder=""
|
|
79
|
+
ref={searchMobileRef}
|
|
80
|
+
testId="store-input-mobile"
|
|
81
|
+
buttonTestId="store-input-mobile-button"
|
|
82
|
+
onSearchClick={handlerExpandSearch}
|
|
83
|
+
/>
|
|
84
84
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
85
|
+
<Suspense fallback={<ButtonSignInFallback />}>
|
|
86
|
+
<ButtonSignIn />
|
|
87
|
+
</Suspense>
|
|
88
88
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
89
|
+
<CartToggle />
|
|
90
|
+
</UINavbarButtons>
|
|
91
|
+
</UINavbarRow>
|
|
92
|
+
</UINavbarHeader>
|
|
93
93
|
|
|
94
|
-
|
|
94
|
+
<NavbarLinks className="hidden-mobile" />
|
|
95
95
|
|
|
96
|
-
|
|
97
|
-
|
|
96
|
+
{displayNavbar && <NavbarSlider />}
|
|
97
|
+
</UINavbar>
|
|
98
|
+
</header>
|
|
98
99
|
)
|
|
99
100
|
}
|
|
100
101
|
|