@faststore/core 2.1.16 → 2.1.18
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/.next/BUILD_ID +1 -0
- package/.next/build-manifest.json +125 -0
- package/.next/cache/.tsbuildinfo +1 -0
- package/.next/cache/config.json +7 -0
- package/.next/cache/eslint/.cache_1gneedd +1 -0
- package/.next/cache/next-server.js.nft.json +1 -0
- package/.next/cache/webpack/client-production/0.pack +0 -0
- package/.next/cache/webpack/client-production/index.pack +0 -0
- package/.next/cache/webpack/server-production/0.pack +0 -0
- package/.next/cache/webpack/server-production/index.pack +0 -0
- package/.next/export-marker.json +1 -0
- package/.next/images-manifest.json +1 -0
- package/.next/next-server.js.nft.json +1 -0
- package/.next/package.json +1 -0
- package/.next/prerender-manifest.json +1 -0
- package/.next/react-loadable-manifest.json +44 -0
- package/.next/required-server-files.json +1 -0
- package/.next/routes-manifest.json +1 -0
- package/.next/server/chunks/123.js +58 -0
- package/.next/server/chunks/143.js +106 -0
- package/.next/server/chunks/183.js +90 -0
- package/.next/server/chunks/184.js +61 -0
- package/.next/server/chunks/186.js +136 -0
- package/.next/server/chunks/205.js +721 -0
- package/.next/server/chunks/247.js +61 -0
- package/.next/server/chunks/253.js +535 -0
- package/.next/server/chunks/269.js +517 -0
- package/.next/server/chunks/287.js +58 -0
- package/.next/server/chunks/289.js +242 -0
- package/.next/server/chunks/312.js +697 -0
- package/.next/server/chunks/350.js +143 -0
- package/.next/server/chunks/487.js +9142 -0
- package/.next/server/chunks/502.js +626 -0
- package/.next/server/chunks/513.js +257 -0
- package/.next/server/chunks/576.js +90 -0
- package/.next/server/chunks/597.js +211 -0
- package/.next/server/chunks/650.js +9142 -0
- package/.next/server/chunks/676.js +32 -0
- package/.next/server/chunks/74.js +4066 -0
- package/.next/server/chunks/825.js +4039 -0
- package/.next/server/chunks/854.js +72 -0
- package/.next/server/chunks/859.js +959 -0
- package/.next/server/chunks/886.js +120 -0
- package/.next/server/chunks/90.js +623 -0
- package/.next/server/chunks/907.js +1956 -0
- package/.next/server/chunks/98.js +124 -0
- package/.next/server/chunks/font-manifest.json +1 -0
- package/.next/server/font-manifest.json +1 -0
- package/.next/server/middleware-build-manifest.js +1 -0
- package/.next/server/middleware-manifest.json +6 -0
- package/.next/server/middleware-react-loadable-manifest.js +1 -0
- package/.next/server/pages/404.js +386 -0
- package/.next/server/pages/404.js.nft.json +1 -0
- package/.next/server/pages/500.js +388 -0
- package/.next/server/pages/500.js.nft.json +1 -0
- package/.next/server/pages/[...slug].js +778 -0
- package/.next/server/pages/[...slug].js.nft.json +1 -0
- package/.next/server/pages/[slug]/p.js +2390 -0
- package/.next/server/pages/[slug]/p.js.nft.json +1 -0
- package/.next/server/pages/_app.js +281 -0
- package/.next/server/pages/_app.js.nft.json +1 -0
- package/.next/server/pages/_document.js +340 -0
- package/.next/server/pages/_document.js.nft.json +1 -0
- package/.next/server/pages/_error.js +164 -0
- package/.next/server/pages/_error.js.nft.json +1 -0
- package/.next/server/pages/account.js +363 -0
- package/.next/server/pages/account.js.nft.json +1 -0
- package/.next/server/pages/api/graphql.js +365 -0
- package/.next/server/pages/api/graphql.js.nft.json +1 -0
- package/.next/server/pages/api/preview.js +119 -0
- package/.next/server/pages/api/preview.js.nft.json +1 -0
- package/.next/server/pages/checkout.js +363 -0
- package/.next/server/pages/checkout.js.nft.json +1 -0
- package/.next/server/pages/en-US/404.html +81 -0
- package/.next/server/pages/en-US/404.json +1 -0
- package/.next/server/pages/en-US/500.html +81 -0
- package/.next/server/pages/en-US/500.json +1 -0
- package/.next/server/pages/en-US/account.html +81 -0
- package/.next/server/pages/en-US/account.json +1 -0
- package/.next/server/pages/en-US/checkout.html +81 -0
- package/.next/server/pages/en-US/checkout.json +1 -0
- package/.next/server/pages/en-US/login.html +81 -0
- package/.next/server/pages/en-US/login.json +1 -0
- package/.next/server/pages/en-US/s.html +81 -0
- package/.next/server/pages/en-US/s.json +1 -0
- package/.next/server/pages/en-US.html +81 -0
- package/.next/server/pages/en-US.json +1 -0
- package/.next/server/pages/index.js +909 -0
- package/.next/server/pages/index.js.nft.json +1 -0
- package/.next/server/pages/login.js +368 -0
- package/.next/server/pages/login.js.nft.json +1 -0
- package/.next/server/pages/s.js +466 -0
- package/.next/server/pages/s.js.nft.json +1 -0
- package/.next/server/pages-manifest.json +16 -0
- package/.next/server/webpack-api-runtime.js +229 -0
- package/.next/server/webpack-runtime.js +229 -0
- package/.next/static/chunks/113-207e8eceab001eea.js +1 -0
- package/.next/static/chunks/130-15325805e3c8d5f4.js +1 -0
- package/.next/static/chunks/143.dd8a556e6957baa1.js +1 -0
- package/.next/static/chunks/495.0ecd099878b2a36d.js +1 -0
- package/.next/static/chunks/502.b14533723651e5a1.js +1 -0
- package/.next/static/chunks/548-ab84e9e8b49413ab.js +1 -0
- package/.next/static/chunks/597.f8d0595b113c70af.js +1 -0
- package/.next/static/chunks/64.7ea3677ac3a10e00.js +1 -0
- package/.next/static/chunks/651.7142f31ce1e052b3.js +1 -0
- package/.next/static/chunks/738-67a288ca3569cdbb.js +1 -0
- package/.next/static/chunks/741.52f7fb873418346f.js +1 -0
- package/.next/static/chunks/791-b6747a7c7ca0967e.js +1 -0
- package/.next/static/chunks/98.97381d2021f86cd9.js +1 -0
- package/.next/static/chunks/framework-dfd14d7ce6600b03.js +1 -0
- package/.next/static/chunks/main-fd466221927468fd.js +1 -0
- package/.next/static/chunks/pages/404-6da332b2c4ef0f41.js +1 -0
- package/.next/static/chunks/pages/500-88dd73506f17946c.js +1 -0
- package/.next/static/chunks/pages/[...slug]-ab804df4ac6c945e.js +1 -0
- package/.next/static/chunks/pages/[slug]/p-93d3f1c0f2d3aed2.js +1 -0
- package/.next/static/chunks/pages/_app-79d333aa6001a806.js +1 -0
- package/.next/static/chunks/pages/_error-a7a0c1d9bfbb4f38.js +1 -0
- package/.next/static/chunks/pages/account-06126db1f6dc537e.js +1 -0
- package/.next/static/chunks/pages/checkout-5138b7956d64dde8.js +1 -0
- package/.next/static/chunks/pages/index-7ba4f6708af42d8e.js +1 -0
- package/.next/static/chunks/pages/login-a688a70872ea61f5.js +1 -0
- package/.next/static/chunks/pages/s-99aad326e6aafeb7.js +1 -0
- package/.next/static/chunks/polyfills-c67a75d1b6f99dc8.js +1 -0
- package/.next/static/chunks/webpack-8bf035049b590d82.js +1 -0
- package/.next/static/css/0e00026896a2ee3e.css +1 -0
- package/.next/static/css/13ddbbc10e89ff0e.css +1 -0
- package/.next/static/css/1b23beb5af203ffb.css +1 -0
- package/.next/static/css/584640ffee46aa49.css +1 -0
- package/.next/static/css/6f33907361436e6c.css +1 -0
- package/.next/static/css/7d822a137c54a781.css +1 -0
- package/.next/static/css/a49f71ae6bb528e0.css +1 -0
- package/.next/static/css/e02cdad8fc000339.css +1 -0
- package/.next/static/css/f7ed956d370744ea.css +1 -0
- package/.next/static/css/f9d59f597a4d8f82.css +1 -0
- package/.next/static/hlJfefjb0gNJqepjDW_Eh/_buildManifest.js +1 -0
- package/.next/static/hlJfefjb0gNJqepjDW_Eh/_ssgManifest.js +1 -0
- package/.next/trace +78 -0
- package/.turbo/turbo-build.log +13 -13
- package/README.md +1 -2
- package/package.json +4 -4
- package/public/~partytown/debug/partytown-atomics.js +556 -0
- package/public/~partytown/debug/partytown-media.js +374 -0
- package/public/~partytown/debug/partytown-sandbox-sw.js +543 -0
- package/public/~partytown/debug/partytown-sw.js +59 -0
- package/public/~partytown/debug/partytown-ww-atomics.js +1789 -0
- package/public/~partytown/debug/partytown-ww-sw.js +1781 -0
- package/public/~partytown/debug/partytown.js +72 -0
- package/public/~partytown/partytown-atomics.js +2 -0
- package/public/~partytown/partytown-media.js +2 -0
- package/public/~partytown/partytown-sw.js +2 -0
- package/public/~partytown/partytown.js +2 -0
- package/src/components/common/Alert/Alert.tsx +14 -2
- package/src/components/common/Alert/section.module.scss +2 -0
- package/src/components/common/Footer/Footer.tsx +5 -14
- package/src/components/navigation/Navbar/Navbar.tsx +1 -1
- package/src/components/navigation/NavbarLinks/NavbarLinks.tsx +1 -1
- package/src/components/product/ProductCard/ProductCard.tsx +1 -1
- package/src/components/region/RegionBar/RegionBar.tsx +22 -6
- package/src/components/sections/Alert/Alert.tsx +23 -7
- package/src/components/sections/Alert/Overrides.tsx +27 -0
- package/src/components/sections/BannerNewsletter/BannerNewsletter.tsx +2 -4
- package/src/components/sections/BannerText/BannerText.tsx +0 -2
- package/src/components/sections/Breadcrumb/Breadcrumb.tsx +1 -1
- package/src/components/sections/EmptyState/EmptyState.tsx +12 -5
- package/src/components/sections/EmptyState/Overrides.tsx +26 -0
- package/src/components/sections/Incentives/Incentives.tsx +1 -1
- package/src/components/sections/Incentives/section.module.scss +2 -0
- package/src/components/sections/Navbar/section.module.scss +4 -0
- package/src/components/sections/Newsletter/Overrides.tsx +35 -0
- package/src/components/sections/Newsletter/section.module.scss +2 -0
- package/src/components/sections/ProductDetails/ProductDetails.tsx +2 -4
- package/src/components/sections/ProductGallery/ProductGallery.tsx +2 -4
- package/src/components/sections/ProductGallery/section.module.scss +13 -0
- package/src/components/sections/ProductShelf/section.module.scss +5 -0
- package/src/components/sections/ProductTiles/ProductTiles.tsx +18 -20
- package/src/components/sections/RegionBar/Overrides.tsx +28 -0
- package/src/components/sections/Section/section.scss +8 -0
- package/src/components/skeletons/ProductShelfSkeleton/ProductShelfSkeleton.tsx +1 -1
- package/src/components/ui/Incentives/Incentives.tsx +1 -1
- package/src/components/ui/Newsletter/Newsletter.tsx +67 -55
- package/src/components/ui/ProductGallery/ProductGallery.tsx +5 -2
- package/src/customizations/components/overrides/Alert.tsx +15 -0
- package/src/customizations/components/overrides/EmptyState.tsx +13 -0
- package/src/customizations/components/overrides/Newsletter.tsx +19 -0
- package/src/customizations/components/overrides/RegionBar.tsx +16 -0
- package/src/styles/global/components.scss +0 -6
- package/src/typings/overrides.d.ts +19 -0
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Button as UIButton,
|
|
3
|
+
InputField as UIInputField,
|
|
4
|
+
Icon as UIIcon,
|
|
5
|
+
} from '@faststore/ui'
|
|
6
|
+
|
|
7
|
+
import NewsletterCustomizations from 'src/customizations/components/overrides/Newsletter'
|
|
8
|
+
|
|
9
|
+
const newsletterComponentsCustomization = {}
|
|
10
|
+
|
|
11
|
+
const newsletterPropsCustomization = {} as any
|
|
12
|
+
|
|
13
|
+
Object.entries(NewsletterCustomizations.components).forEach(([key, value]) => {
|
|
14
|
+
if (value.Component) {
|
|
15
|
+
newsletterComponentsCustomization[key] = value.Component
|
|
16
|
+
}
|
|
17
|
+
})
|
|
18
|
+
|
|
19
|
+
Object.entries(NewsletterCustomizations.components).forEach(([key, value]) => {
|
|
20
|
+
if (value.props) {
|
|
21
|
+
newsletterPropsCustomization[key] = value.props
|
|
22
|
+
}
|
|
23
|
+
})
|
|
24
|
+
|
|
25
|
+
const Components = {
|
|
26
|
+
ToastIconSuccess: UIIcon,
|
|
27
|
+
ToastIconError: UIIcon,
|
|
28
|
+
HeaderIcon: UIIcon,
|
|
29
|
+
InputFieldName: UIInputField,
|
|
30
|
+
InputFieldEmail: UIInputField,
|
|
31
|
+
Button: UIButton,
|
|
32
|
+
...newsletterComponentsCustomization,
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export { Components, newsletterPropsCustomization as Props }
|
|
@@ -161,11 +161,9 @@ function ProductDetails({
|
|
|
161
161
|
])
|
|
162
162
|
|
|
163
163
|
return (
|
|
164
|
-
<Section
|
|
165
|
-
className={`${styles.section} section-product-details layout__content layout__section`}
|
|
166
|
-
>
|
|
164
|
+
<Section className={`${styles.section} section-product-details`}>
|
|
167
165
|
<section data-fs-product-details>
|
|
168
|
-
<section data-fs-product-details-body>
|
|
166
|
+
<section data-fs-product-details-body data-fs-content="product-details">
|
|
169
167
|
<header data-fs-product-details-title data-fs-product-details-section>
|
|
170
168
|
<ProductTitle
|
|
171
169
|
// TODO: We should review this prop. There's now way to override the title and use the dynamic name value.
|
|
@@ -47,9 +47,7 @@ function ProductGallerySection({
|
|
|
47
47
|
|
|
48
48
|
if (productGalleryData && totalCount === 0) {
|
|
49
49
|
return (
|
|
50
|
-
<Section
|
|
51
|
-
className={`${styles.section} section-product-gallery layout__content`}
|
|
52
|
-
>
|
|
50
|
+
<Section className={`${styles.section} section-product-gallery`}>
|
|
53
51
|
<section data-testid="product-gallery" data-fs-product-listing>
|
|
54
52
|
<EmptyGallery />
|
|
55
53
|
</section>
|
|
@@ -59,7 +57,7 @@ function ProductGallerySection({
|
|
|
59
57
|
|
|
60
58
|
return (
|
|
61
59
|
<Section
|
|
62
|
-
className={`${styles.section} section-product-gallery
|
|
60
|
+
className={`${styles.section} section-product-gallery layout__section`}
|
|
63
61
|
>
|
|
64
62
|
<ProductGallery
|
|
65
63
|
title={title}
|
|
@@ -1,4 +1,17 @@
|
|
|
1
1
|
.section {
|
|
2
|
+
@include media("<notebook") {
|
|
3
|
+
margin-top: 0;
|
|
4
|
+
&:last-child { margin-bottom: 0; }
|
|
5
|
+
|
|
6
|
+
@include section-divisor(bottom, 0);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
@include media(">=notebook") {
|
|
10
|
+
&:not(:last-child) {
|
|
11
|
+
@include section-divisor(bottom);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
2
15
|
@import "@faststore/ui/src/components/atoms/Badge/styles.scss";
|
|
3
16
|
@import "@faststore/ui/src/components/atoms/Button/styles.scss";
|
|
4
17
|
@import "@faststore/ui/src/components/atoms/Checkbox/styles.scss";
|
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
.section {
|
|
2
|
+
|
|
3
|
+
[data-fs-content="product-shelf"] { @include layout-content-full; }
|
|
4
|
+
|
|
2
5
|
[data-fs-product-shelf-skeleton] {
|
|
3
6
|
--fs-carousel-item-width-tablet : 14.2rem;
|
|
4
7
|
--fs-carousel-item-margin-right : var(--fs-spacing-3);
|
|
5
8
|
|
|
6
9
|
padding-bottom: var(--fs-spacing-5);
|
|
7
10
|
|
|
11
|
+
[data-fs-product-shelf-items] { @include layout-content; }
|
|
12
|
+
|
|
8
13
|
@include media("<tablet") {
|
|
9
14
|
[data-fs-product-shelf-item] {
|
|
10
15
|
&:not(:last-of-type) {
|
|
@@ -80,28 +80,26 @@ const ProductTiles = ({ title, ...variables }: ProductTilesProps) => {
|
|
|
80
80
|
|
|
81
81
|
return (
|
|
82
82
|
<Section
|
|
83
|
-
className={`${styles.section} section-product-tiles layout__section
|
|
83
|
+
className={`${styles.section} section-product-tiles layout__section`}
|
|
84
84
|
ref={ref}
|
|
85
85
|
>
|
|
86
|
-
<h2 className="text__title-section">{title}</h2>
|
|
87
|
-
<
|
|
88
|
-
<
|
|
89
|
-
|
|
90
|
-
{
|
|
91
|
-
<
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
</ProductTilesSkeleton>
|
|
104
|
-
</div>
|
|
86
|
+
<h2 className="text__title-section layout__content">{title}</h2>
|
|
87
|
+
<ProductTilesSkeleton loading={!products}>
|
|
88
|
+
<Tiles>
|
|
89
|
+
{productEdges.map((product, idx) => (
|
|
90
|
+
<Tile key={product.node.id}>
|
|
91
|
+
<ProductCard
|
|
92
|
+
data-testid="tile-card"
|
|
93
|
+
product={product.node}
|
|
94
|
+
index={idx + 1}
|
|
95
|
+
variant="wide"
|
|
96
|
+
aspectRatio={getRatio(productEdges.length, idx)}
|
|
97
|
+
imgProps={getSizes(productEdges.length, idx)}
|
|
98
|
+
/>
|
|
99
|
+
</Tile>
|
|
100
|
+
))}
|
|
101
|
+
</Tiles>
|
|
102
|
+
</ProductTilesSkeleton>
|
|
105
103
|
</Section>
|
|
106
104
|
)
|
|
107
105
|
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { RegionBar as UIRegionBar, Icon as UIIcon } from '@faststore/ui'
|
|
2
|
+
|
|
3
|
+
import RegionBarCustomizations from 'src/customizations/components/overrides/RegionBar'
|
|
4
|
+
|
|
5
|
+
const regionBarComponentsCustomization = {}
|
|
6
|
+
|
|
7
|
+
const regionBarPropsCustomization = {} as any
|
|
8
|
+
|
|
9
|
+
Object.entries(RegionBarCustomizations.components).forEach(([key, value]) => {
|
|
10
|
+
if (value.Component) {
|
|
11
|
+
regionBarComponentsCustomization[key] = value.Component
|
|
12
|
+
}
|
|
13
|
+
})
|
|
14
|
+
|
|
15
|
+
Object.entries(RegionBarCustomizations.components).forEach(([key, value]) => {
|
|
16
|
+
if (value.props) {
|
|
17
|
+
regionBarPropsCustomization[key] = value.props
|
|
18
|
+
}
|
|
19
|
+
})
|
|
20
|
+
|
|
21
|
+
const Components = {
|
|
22
|
+
RegionBar: UIRegionBar,
|
|
23
|
+
LocationIcon: UIIcon,
|
|
24
|
+
ButtonIcon: UIIcon,
|
|
25
|
+
...regionBarComponentsCustomization,
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export { Components, regionBarPropsCustomization as Props }
|
|
@@ -5,3 +5,11 @@
|
|
|
5
5
|
margin-bottom: var(--fs-spacing-3);
|
|
6
6
|
}
|
|
7
7
|
}
|
|
8
|
+
|
|
9
|
+
// TODO: Consider removing this and use the divisor mixins
|
|
10
|
+
.section__divisor {
|
|
11
|
+
padding-top: var(--fs-spacing-5);
|
|
12
|
+
border-top: var(--fs-border-width) solid var(--fs-border-color-light);
|
|
13
|
+
|
|
14
|
+
@include media(">=notebook") { padding-top: var(--fs-spacing-8); }
|
|
15
|
+
}
|
|
@@ -22,7 +22,7 @@ function ProductShelfSkeleton({
|
|
|
22
22
|
}: PropsWithChildren<Props>) {
|
|
23
23
|
return loading ? (
|
|
24
24
|
<UIProductShelf data-fs-product-shelf-skeleton>
|
|
25
|
-
<ProductShelfItems
|
|
25
|
+
<ProductShelfItems>
|
|
26
26
|
{Array.from({ length: ITEMS_PER_SECTION }, (_, index) => (
|
|
27
27
|
<ProductShelfItem key={String(index)}>
|
|
28
28
|
<ProductCardSkeleton aspectRatio={aspectRatio} sectioned bordered />
|
|
@@ -35,7 +35,7 @@ function Incentives({
|
|
|
35
35
|
data-fs-incentives-colored={colored}
|
|
36
36
|
data-fs-incentives-variant={variant}
|
|
37
37
|
>
|
|
38
|
-
<UIList
|
|
38
|
+
<UIList data-fs-content="incentives">
|
|
39
39
|
{incentives.map((incentive, index) => (
|
|
40
40
|
<li role="listitem" key={String(index)}>
|
|
41
41
|
<UIIncentive tabIndex={0}>
|
|
@@ -1,11 +1,21 @@
|
|
|
1
|
-
import { Button as UIButton, InputField as UIInputField } from '@faststore/ui'
|
|
2
1
|
import { ComponentPropsWithRef, FormEvent, useMemo } from 'react'
|
|
3
2
|
import { forwardRef, useRef } from 'react'
|
|
4
3
|
import { convertFromRaw } from 'draft-js'
|
|
5
4
|
import { stateToHTML } from 'draft-js-export-html'
|
|
6
|
-
import {
|
|
5
|
+
import { useUI } from '@faststore/ui'
|
|
7
6
|
import { useNewsletter } from 'src/sdk/newsletter/useNewsletter'
|
|
8
7
|
|
|
8
|
+
import { Components, Props } from 'src/components/sections/Newsletter/Overrides'
|
|
9
|
+
|
|
10
|
+
const {
|
|
11
|
+
ToastIconSuccess,
|
|
12
|
+
ToastIconError,
|
|
13
|
+
HeaderIcon,
|
|
14
|
+
InputFieldEmail,
|
|
15
|
+
InputFieldName,
|
|
16
|
+
Button,
|
|
17
|
+
} = Components
|
|
18
|
+
|
|
9
19
|
const cmsToHtml = (content) => {
|
|
10
20
|
if (!content) {
|
|
11
21
|
return ''
|
|
@@ -135,14 +145,26 @@ const Newsletter = forwardRef<HTMLFormElement, NewsletterProps>(
|
|
|
135
145
|
pushToast({
|
|
136
146
|
...toastSubscribe,
|
|
137
147
|
status: 'INFO',
|
|
138
|
-
icon:
|
|
148
|
+
icon: (
|
|
149
|
+
<ToastIconSuccess
|
|
150
|
+
width={30}
|
|
151
|
+
height={30}
|
|
152
|
+
{...Props['ToastIconSuccess']}
|
|
153
|
+
name={toastSubscribe.icon ?? Props['ToastIconSuccess'].name}
|
|
154
|
+
/>
|
|
155
|
+
),
|
|
139
156
|
})
|
|
140
157
|
} else {
|
|
141
158
|
pushToast({
|
|
142
159
|
...toastSubscribeError,
|
|
143
160
|
status: 'ERROR',
|
|
144
161
|
icon: (
|
|
145
|
-
<
|
|
162
|
+
<ToastIconError
|
|
163
|
+
width={30}
|
|
164
|
+
height={30}
|
|
165
|
+
{...Props['ToastIconError']}
|
|
166
|
+
name={toastSubscribe.icon ?? Props['ToastIconError'].name}
|
|
167
|
+
/>
|
|
146
168
|
),
|
|
147
169
|
})
|
|
148
170
|
}
|
|
@@ -157,70 +179,60 @@ const Newsletter = forwardRef<HTMLFormElement, NewsletterProps>(
|
|
|
157
179
|
<form
|
|
158
180
|
ref={ref}
|
|
159
181
|
data-fs-newsletter-form
|
|
182
|
+
data-fs-content="newsletter"
|
|
160
183
|
onSubmit={handleSubmit}
|
|
161
|
-
className="layout__content"
|
|
162
184
|
>
|
|
163
185
|
<header data-fs-newsletter-header>
|
|
164
186
|
<h3>
|
|
165
|
-
<
|
|
187
|
+
<HeaderIcon
|
|
188
|
+
width={32}
|
|
189
|
+
height={32}
|
|
190
|
+
{...Props['HeaderIcon']}
|
|
191
|
+
name={icon?.icon ?? Props['HeaderIcon'].name}
|
|
192
|
+
/>
|
|
166
193
|
{title}
|
|
167
194
|
</h3>
|
|
168
195
|
{description && <span> {description}</span>}
|
|
169
196
|
</header>
|
|
170
197
|
|
|
171
198
|
<div data-fs-newsletter-controls>
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
<
|
|
175
|
-
required
|
|
199
|
+
<>
|
|
200
|
+
{displayNameInput ? (
|
|
201
|
+
<InputFieldName
|
|
176
202
|
id="newsletter-name"
|
|
177
|
-
label={nameInputLabel}
|
|
178
|
-
inputRef={nameInputRef}
|
|
179
|
-
/>
|
|
180
|
-
<UIInputField
|
|
181
|
-
required
|
|
182
|
-
type="email"
|
|
183
|
-
id="newsletter-email"
|
|
184
|
-
label={emailInputLabel}
|
|
185
|
-
inputRef={emailInputRef}
|
|
186
|
-
/>
|
|
187
|
-
<span
|
|
188
|
-
data-fs-newsletter-addendum
|
|
189
|
-
dangerouslySetInnerHTML={{
|
|
190
|
-
__html: cmsToHtml(privacyPolicy),
|
|
191
|
-
}}
|
|
192
|
-
/>
|
|
193
|
-
<UIButton
|
|
194
|
-
variant="secondary"
|
|
195
|
-
inverse
|
|
196
|
-
type="submit"
|
|
197
|
-
aria-label={subscriptionButtonLabel}
|
|
198
|
-
>
|
|
199
|
-
{subscriptionButtonLabel}
|
|
200
|
-
</UIButton>
|
|
201
|
-
</>
|
|
202
|
-
) : (
|
|
203
|
-
<>
|
|
204
|
-
<UIInputField
|
|
205
203
|
required
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
inputRef={
|
|
211
|
-
onClear={() => null}
|
|
212
|
-
onSubmit={() => null}
|
|
213
|
-
displayClearButton={false}
|
|
214
|
-
buttonActionText={subscriptionButtonLabel}
|
|
215
|
-
/>
|
|
216
|
-
<span
|
|
217
|
-
data-fs-newsletter-addendum
|
|
218
|
-
dangerouslySetInnerHTML={{
|
|
219
|
-
__html: cmsToHtml(privacyPolicy),
|
|
220
|
-
}}
|
|
204
|
+
{...Props['InputFieldName']}
|
|
205
|
+
label={nameInputLabel ?? Props['InputFieldName'].label}
|
|
206
|
+
// Dynamic props shouldn't be overridable
|
|
207
|
+
// This decision can be reviewed later if needed
|
|
208
|
+
inputRef={nameInputRef}
|
|
221
209
|
/>
|
|
222
|
-
|
|
223
|
-
|
|
210
|
+
) : null}
|
|
211
|
+
<InputFieldEmail
|
|
212
|
+
id="newsletter-email"
|
|
213
|
+
type="email"
|
|
214
|
+
required
|
|
215
|
+
{...Props['InputFieldEmail']}
|
|
216
|
+
label={emailInputLabel ?? Props['InputFieldEmail'].label}
|
|
217
|
+
// Dynamic props shouldn't be overridable
|
|
218
|
+
// This decision can be reviewed later if needed
|
|
219
|
+
inputRef={emailInputRef}
|
|
220
|
+
/>
|
|
221
|
+
<span
|
|
222
|
+
data-fs-newsletter-addendum
|
|
223
|
+
dangerouslySetInnerHTML={{
|
|
224
|
+
__html: cmsToHtml(privacyPolicy),
|
|
225
|
+
}}
|
|
226
|
+
></span>
|
|
227
|
+
<Button
|
|
228
|
+
variant="secondary"
|
|
229
|
+
inverse
|
|
230
|
+
type="submit"
|
|
231
|
+
{...Props['Button']}
|
|
232
|
+
>
|
|
233
|
+
{loading ? subscribeButtonLoadingLabel : subscribeButtonLabel}
|
|
234
|
+
</Button>
|
|
235
|
+
</>
|
|
224
236
|
</div>
|
|
225
237
|
</form>
|
|
226
238
|
</div>
|
|
@@ -95,13 +95,16 @@ function ProductGallery({
|
|
|
95
95
|
return (
|
|
96
96
|
<section data-testid="product-gallery" data-fs-product-listing>
|
|
97
97
|
{searchTerm && (
|
|
98
|
-
<header data-fs-product-listing-search-term
|
|
98
|
+
<header data-fs-product-listing-search-term>
|
|
99
99
|
<h1>
|
|
100
100
|
{searchTermLabel} <span>{searchTerm}</span>
|
|
101
101
|
</h1>
|
|
102
102
|
</header>
|
|
103
103
|
)}
|
|
104
|
-
<div
|
|
104
|
+
<div
|
|
105
|
+
data-fs-product-listing-content-grid
|
|
106
|
+
data-fs-content="product-gallery"
|
|
107
|
+
>
|
|
105
108
|
<div data-fs-product-listing-filters>
|
|
106
109
|
<FilterSkeleton loading={facets?.length === 0}>
|
|
107
110
|
<Filter facets={facets} filter={filter} />
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// This is an example of how it can be used on the starter.
|
|
2
|
+
|
|
3
|
+
import { SectionOverride } from 'src/typings/overrides'
|
|
4
|
+
|
|
5
|
+
const SECTION = 'Alert' as const
|
|
6
|
+
|
|
7
|
+
const overrides: SectionOverride[typeof SECTION] = {
|
|
8
|
+
name: SECTION,
|
|
9
|
+
components: {
|
|
10
|
+
Alert: { props: {} },
|
|
11
|
+
Icon: { props: {} },
|
|
12
|
+
},
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export default overrides
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// This is an example of how it can be used on the starter.
|
|
2
|
+
import { SectionOverride } from 'src/typings/overrides'
|
|
3
|
+
|
|
4
|
+
const SECTION = 'EmptyState' as const
|
|
5
|
+
|
|
6
|
+
const overrides: SectionOverride[typeof SECTION] = {
|
|
7
|
+
name: SECTION,
|
|
8
|
+
components: {
|
|
9
|
+
EmptyState: { props: {} },
|
|
10
|
+
},
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export default overrides
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// This is an example of how it can be used on the starter.
|
|
2
|
+
|
|
3
|
+
import { SectionOverride } from 'src/typings/overrides'
|
|
4
|
+
|
|
5
|
+
const SECTION = 'Newsletter' as const
|
|
6
|
+
|
|
7
|
+
const overrides: SectionOverride[typeof SECTION] = {
|
|
8
|
+
name: SECTION,
|
|
9
|
+
components: {
|
|
10
|
+
ToastIconSuccess: { props: {} },
|
|
11
|
+
ToastIconError: { props: {} },
|
|
12
|
+
HeaderIcon: { props: {} },
|
|
13
|
+
InputFieldName: { props: {} },
|
|
14
|
+
InputFieldEmail: { props: {} },
|
|
15
|
+
Button: { props: {} },
|
|
16
|
+
},
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export default overrides
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// This is an example of how it can be used on the starter.
|
|
2
|
+
|
|
3
|
+
import { SectionOverride } from 'src/typings/overrides'
|
|
4
|
+
|
|
5
|
+
const SECTION = 'RegionBar' as const
|
|
6
|
+
|
|
7
|
+
const overrides: SectionOverride[typeof SECTION] = {
|
|
8
|
+
name: SECTION,
|
|
9
|
+
components: {
|
|
10
|
+
RegionBar: { props: {} },
|
|
11
|
+
LocationIcon: { props: {} },
|
|
12
|
+
ButtonIcon: { props: {} },
|
|
13
|
+
},
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export default overrides
|
|
@@ -2,9 +2,3 @@
|
|
|
2
2
|
@import "@faststore/ui/src/components/atoms/Overlay/styles.scss";
|
|
3
3
|
@import "@faststore/ui/src/components/atoms/SROnly/styles.scss";
|
|
4
4
|
@import "src/components/sections/Section/section.scss";
|
|
5
|
-
|
|
6
|
-
.section-navbar {
|
|
7
|
-
position: sticky;
|
|
8
|
-
top: 0;
|
|
9
|
-
z-index: var(--fs-z-index-high);
|
|
10
|
-
}
|
|
@@ -62,6 +62,25 @@ export const SECTIONS = {
|
|
|
62
62
|
'__experimentalProductCard',
|
|
63
63
|
],
|
|
64
64
|
},
|
|
65
|
+
Alert: {
|
|
66
|
+
components: ['Alert', 'Icon'],
|
|
67
|
+
},
|
|
68
|
+
EmptyState: {
|
|
69
|
+
components: ['EmptyState'],
|
|
70
|
+
},
|
|
71
|
+
RegionBar: {
|
|
72
|
+
components: ['RegionBar', 'LocationIcon', 'ButtonIcon'],
|
|
73
|
+
},
|
|
74
|
+
Newsletter: {
|
|
75
|
+
components: [
|
|
76
|
+
'ToastIconSuccess',
|
|
77
|
+
'ToastIconError',
|
|
78
|
+
'HeaderIcon',
|
|
79
|
+
'InputFieldName',
|
|
80
|
+
'InputFieldEmail',
|
|
81
|
+
'Button',
|
|
82
|
+
],
|
|
83
|
+
},
|
|
65
84
|
} as const
|
|
66
85
|
|
|
67
86
|
// export type ComponentOrProps =
|