@faststore/core 2.1.31 → 2.1.35

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.
Files changed (140) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/build-manifest.json +67 -67
  3. package/.next/cache/.tsbuildinfo +1 -1
  4. package/.next/cache/config.json +3 -3
  5. package/.next/cache/eslint/.cache_1gneedd +1 -1
  6. package/.next/cache/next-server.js.nft.json +1 -1
  7. package/.next/cache/webpack/client-production/0.pack +0 -0
  8. package/.next/cache/webpack/client-production/index.pack +0 -0
  9. package/.next/cache/webpack/server-production/0.pack +0 -0
  10. package/.next/cache/webpack/server-production/index.pack +0 -0
  11. package/.next/next-server.js.nft.json +1 -1
  12. package/.next/prerender-manifest.json +1 -1
  13. package/.next/react-loadable-manifest.json +3 -3
  14. package/.next/routes-manifest.json +1 -1
  15. package/.next/server/chunks/186.js +16 -39
  16. package/.next/server/chunks/253.js +22 -48
  17. package/.next/server/chunks/289.js +4 -7
  18. package/.next/server/chunks/350.js +1 -1
  19. package/.next/server/chunks/721.js +22 -51
  20. package/.next/server/chunks/74.js +154 -215
  21. package/.next/server/chunks/81.js +88 -172
  22. package/.next/server/chunks/907.js +54 -100
  23. package/.next/server/middleware-build-manifest.js +1 -1
  24. package/.next/server/middleware-react-loadable-manifest.js +1 -1
  25. package/.next/server/pages/404.js.nft.json +1 -1
  26. package/.next/server/pages/500.js.nft.json +1 -1
  27. package/.next/server/pages/[...slug].js.nft.json +1 -1
  28. package/.next/server/pages/[slug]/p.js +82 -135
  29. package/.next/server/pages/[slug]/p.js.nft.json +1 -1
  30. package/.next/server/pages/_app.js.nft.json +1 -1
  31. package/.next/server/pages/account.js.nft.json +1 -1
  32. package/.next/server/pages/api/graphql.js +1 -1
  33. package/.next/server/pages/checkout.js.nft.json +1 -1
  34. package/.next/server/pages/en-US/404.html +2 -2
  35. package/.next/server/pages/en-US/500.html +2 -2
  36. package/.next/server/pages/en-US/account.html +2 -2
  37. package/.next/server/pages/en-US/checkout.html +2 -2
  38. package/.next/server/pages/en-US/login.html +2 -2
  39. package/.next/server/pages/en-US/s.html +2 -2
  40. package/.next/server/pages/en-US.html +2 -2
  41. package/.next/server/pages/index.js.nft.json +1 -1
  42. package/.next/server/pages/login.js.nft.json +1 -1
  43. package/.next/server/pages/s.js.nft.json +1 -1
  44. package/.next/server/pages-manifest.json +2 -2
  45. package/.next/static/chunks/209-d1d2eeaeefbc68f7.js +1 -0
  46. package/.next/static/chunks/548-6b23e7ad82cd22b9.js +1 -0
  47. package/.next/static/chunks/{64.7ea3677ac3a10e00.js → 64.2f385ef39cd5877d.js} +1 -1
  48. package/.next/static/chunks/706-1020d118bb59b204.js +1 -0
  49. package/.next/static/chunks/{738-67a288ca3569cdbb.js → 738-a5ff304828f20cbf.js} +1 -1
  50. package/.next/static/chunks/791-681afeb766a9098f.js +1 -0
  51. package/.next/static/chunks/pages/404-14d27e3706f3d2c3.js +1 -0
  52. package/.next/static/chunks/pages/500-250ccf5c9626e451.js +1 -0
  53. package/.next/static/chunks/pages/[...slug]-bcfaf0c5d60b57a0.js +1 -0
  54. package/.next/static/chunks/pages/[slug]/p-c1f2b05344981f12.js +1 -0
  55. package/.next/static/chunks/pages/index-bdbfb082027ed2b7.js +1 -0
  56. package/.next/static/chunks/pages/login-b1bdf30c951bb60d.js +1 -0
  57. package/.next/static/chunks/webpack-73cade94715ad9e1.js +1 -0
  58. package/.next/static/css/208b7dd52a0981bd.css +1 -0
  59. package/.next/static/css/41ef280537acec50.css +1 -0
  60. package/.next/static/css/4ad5a6bd11a9f8d8.css +1 -0
  61. package/.next/static/css/5330ae3076254840.css +1 -0
  62. package/.next/static/css/5972921daee792bb.css +1 -0
  63. package/.next/static/css/6e1a7434f061d0ef.css +1 -0
  64. package/.next/static/css/82a475e147f4b2ee.css +1 -0
  65. package/.next/static/css/af5ef0767b748cb3.css +1 -0
  66. package/.next/static/css/cb7d1fcea42fab9c.css +1 -0
  67. package/.next/static/css/d67fbe2a613293c1.css +1 -0
  68. package/.next/static/uXS-aZT8ClbPcIudKFF0d/_buildManifest.js +1 -0
  69. package/.next/trace +80 -80
  70. package/.turbo/turbo-build.log +10 -19
  71. package/package.json +8 -8
  72. package/src/components/common/Alert/Alert.tsx +5 -8
  73. package/src/components/navigation/Navbar/Navbar.tsx +22 -22
  74. package/src/components/navigation/NavbarLinks/NavbarLinks.tsx +8 -7
  75. package/src/components/navigation/NavbarSlider/NavbarSlider.tsx +15 -14
  76. package/src/components/product/ProductGrid/ProductGrid.tsx +5 -10
  77. package/src/components/region/RegionBar/RegionBar.tsx +27 -13
  78. package/src/components/search/Filter/Filter.tsx +6 -11
  79. package/src/components/sections/Alert/Alert.tsx +17 -13
  80. package/src/components/sections/Alert/Overrides.tsx +13 -25
  81. package/src/components/sections/BannerText/BannerText.tsx +24 -20
  82. package/src/components/sections/BannerText/Overrides.tsx +11 -23
  83. package/src/components/sections/Breadcrumb/Overrides.tsx +13 -25
  84. package/src/components/sections/EmptyState/EmptyState.tsx +6 -8
  85. package/src/components/sections/EmptyState/Overrides.tsx +12 -24
  86. package/src/components/sections/Hero/Hero.tsx +15 -12
  87. package/src/components/sections/Hero/Overrides.tsx +12 -24
  88. package/src/components/sections/Navbar/Overrides.tsx +43 -31
  89. package/src/components/sections/Newsletter/Overrides.tsx +28 -26
  90. package/src/components/sections/ProductDetails/Overrides.tsx +51 -38
  91. package/src/components/sections/ProductDetails/ProductDetails.tsx +22 -30
  92. package/src/components/sections/ProductGallery/Overrides.tsx +44 -35
  93. package/src/components/sections/ProductShelf/Overrides.tsx +14 -28
  94. package/src/components/sections/RegionBar/Overrides.tsx +12 -24
  95. package/src/components/ui/Breadcrumb/Breadcrumb.tsx +9 -7
  96. package/src/components/ui/ImageGallery/ImageGallery.tsx +13 -19
  97. package/src/components/ui/Newsletter/Newsletter.tsx +23 -24
  98. package/src/components/ui/ProductDetails/ProductDetailsSettings.tsx +21 -17
  99. package/src/components/ui/ProductGallery/ProductGallery.tsx +31 -38
  100. package/src/components/ui/ProductShelf/ProductShelf.tsx +11 -16
  101. package/src/components/ui/ShippingSimulation/ShippingSimulation.tsx +2 -3
  102. package/src/components/ui/SkuSelector/Selectors.tsx +8 -7
  103. package/src/customizations/components/overrides/Alert.tsx +3 -7
  104. package/src/customizations/components/overrides/BannerText.tsx +3 -7
  105. package/src/customizations/components/overrides/Breadcrumb.tsx +3 -7
  106. package/src/customizations/components/overrides/EmptyState.tsx +3 -6
  107. package/src/customizations/components/overrides/Hero.tsx +3 -8
  108. package/src/customizations/components/overrides/Navbar.tsx +3 -16
  109. package/src/customizations/components/overrides/Newsletter.tsx +3 -11
  110. package/src/customizations/components/overrides/ProductDetails.tsx +3 -18
  111. package/src/customizations/components/overrides/ProductGallery.tsx +3 -16
  112. package/src/customizations/components/overrides/ProductShelf.tsx +3 -8
  113. package/src/customizations/components/overrides/RegionBar.tsx +3 -8
  114. package/src/typings/overrideDefinitionUtils.ts +40 -0
  115. package/src/typings/overrides.ts +267 -0
  116. package/src/utils/overrides.ts +53 -0
  117. package/.next/static/chunks/209-9a50f2317fccb202.js +0 -1
  118. package/.next/static/chunks/548-ab84e9e8b49413ab.js +0 -1
  119. package/.next/static/chunks/706-5aea41dd07970d2d.js +0 -1
  120. package/.next/static/chunks/791-63b1ccf9964b6517.js +0 -1
  121. package/.next/static/chunks/pages/404-d5f20744ecd83121.js +0 -1
  122. package/.next/static/chunks/pages/500-3911549ab88d0378.js +0 -1
  123. package/.next/static/chunks/pages/[...slug]-2232ce78cb672654.js +0 -1
  124. package/.next/static/chunks/pages/[slug]/p-16595182cbda6bb9.js +0 -1
  125. package/.next/static/chunks/pages/index-7c2ec2e4b6081dbc.js +0 -1
  126. package/.next/static/chunks/pages/login-4cc4b8e52608f076.js +0 -1
  127. package/.next/static/chunks/webpack-a86bbea19dfdfd35.js +0 -1
  128. package/.next/static/css/08e3fc80f9bad95d.css +0 -1
  129. package/.next/static/css/1b23beb5af203ffb.css +0 -1
  130. package/.next/static/css/4b19e1e142e038b0.css +0 -1
  131. package/.next/static/css/584640ffee46aa49.css +0 -1
  132. package/.next/static/css/7486a2a5fcda5283.css +0 -1
  133. package/.next/static/css/7d822a137c54a781.css +0 -1
  134. package/.next/static/css/a49f71ae6bb528e0.css +0 -1
  135. package/.next/static/css/d1ad1d89f8d5c7a1.css +0 -1
  136. package/.next/static/css/e02cdad8fc000339.css +0 -1
  137. package/.next/static/css/f9d59f597a4d8f82.css +0 -1
  138. package/.next/static/xYGxa3PwWTjNHEfOkCiX-/_buildManifest.js +0 -1
  139. package/src/typings/overrides.d.ts +0 -97
  140. /package/.next/static/{xYGxa3PwWTjNHEfOkCiX- → uXS-aZT8ClbPcIudKFF0d}/_ssgManifest.js +0 -0
@@ -5,6 +5,7 @@ import {
5
5
  Skeleton as UISkeleton,
6
6
  Icon as UIIcon,
7
7
  } from '@faststore/ui'
8
+
8
9
  import ProductCard from 'src/components/product/ProductCard'
9
10
  import FilterDesktop from 'src/components/search/Filter/FilterDesktop'
10
11
 
@@ -12,41 +13,49 @@ const FilterSlider = lazy(
12
13
  () => import('src/components/search/Filter/FilterSlider')
13
14
  )
14
15
 
15
- import ProductGalleryCustomizations from 'src/customizations/components/overrides/ProductGallery'
16
-
17
- const productGalleryComponentsCustomization = {}
18
-
19
- const productGalleryPropsCustomization = {} as any
20
-
21
- Object.entries(ProductGalleryCustomizations.components).forEach(
22
- ([key, value]) => {
23
- if (value.Component) {
24
- productGalleryComponentsCustomization[key] = value.Component
25
- }
26
- }
16
+ import { getSectionOverrides } from 'src/utils/overrides'
17
+ import { override } from 'src/customizations/components/overrides/ProductGallery'
18
+ import type { ProductGalleryOverrideDefinition } from 'src/typings/overrides'
19
+
20
+ const {
21
+ MobileFilterButton,
22
+ FilterIcon,
23
+ PrevIcon,
24
+ ResultsCountSkeleton,
25
+ SortSkeleton,
26
+ FilterButtonSkeleton,
27
+ LinkButtonPrev,
28
+ LinkButtonNext,
29
+ __experimentalFilterDesktop,
30
+ __experimentalFilterSlider,
31
+ __experimentalProductCard,
32
+ } = getSectionOverrides(
33
+ {
34
+ MobileFilterButton: UIButton,
35
+ FilterIcon: UIIcon,
36
+ PrevIcon: UIIcon,
37
+ ResultsCountSkeleton: UISkeleton,
38
+ SortSkeleton: UISkeleton,
39
+ FilterButtonSkeleton: UISkeleton,
40
+ LinkButtonPrev: UILinkButton,
41
+ LinkButtonNext: UILinkButton,
42
+ __experimentalFilterDesktop: FilterDesktop,
43
+ __experimentalFilterSlider: FilterSlider,
44
+ __experimentalProductCard: ProductCard,
45
+ },
46
+ override as ProductGalleryOverrideDefinition
27
47
  )
28
48
 
29
- Object.entries(ProductGalleryCustomizations.components).forEach(
30
- ([key, value]) => {
31
- if (value.props) {
32
- productGalleryPropsCustomization[key] = value.props
33
- }
34
- }
35
- )
36
-
37
- const Components = {
38
- Button: UIButton,
39
- FilterIcon: UIIcon,
40
- PrevIcon: UIIcon,
41
- ResultsCountSkeleton: UISkeleton,
42
- SortSkeleton: UISkeleton,
43
- FilterButtonSkeleton: UISkeleton,
44
- LinkButtonPrev: UILinkButton,
45
- LinkButtonNext: UILinkButton,
46
- __experimentalFilterDesktop: FilterDesktop,
47
- __experimentalFilterSlider: FilterSlider,
48
- __experimentalProductCard: ProductCard,
49
- ...productGalleryComponentsCustomization,
49
+ export {
50
+ MobileFilterButton,
51
+ FilterIcon,
52
+ PrevIcon,
53
+ ResultsCountSkeleton,
54
+ SortSkeleton,
55
+ FilterButtonSkeleton,
56
+ LinkButtonPrev,
57
+ LinkButtonNext,
58
+ __experimentalFilterDesktop,
59
+ __experimentalFilterSlider,
60
+ __experimentalProductCard,
50
61
  }
51
-
52
- export { Components, productGalleryPropsCustomization as Props }
@@ -1,34 +1,20 @@
1
1
  import { ProductShelf as UIProductShelf } from '@faststore/ui'
2
+
2
3
  import ProductCard from 'src/components/product/ProductCard'
3
4
  import Carousel from 'src/components/ui/Carousel'
4
5
 
5
- import ProductShelfCustomizations from 'src/customizations/components/overrides/ProductShelf'
6
-
7
- const productShelfComponentsCustomization = {}
8
-
9
- const productShelfPropsCustomization = {} as any
10
-
11
- Object.entries(ProductShelfCustomizations.components).forEach(
12
- ([key, value]) => {
13
- if (value.Component) {
14
- productShelfComponentsCustomization[key] = value.Component
15
- }
16
- }
17
- )
18
-
19
- Object.entries(ProductShelfCustomizations.components).forEach(
20
- ([key, value]) => {
21
- if (value.props) {
22
- productShelfPropsCustomization[key] = value.props
23
- }
24
- }
25
- )
6
+ import { getSectionOverrides } from 'src/utils/overrides'
7
+ import { override } from 'src/customizations/components/overrides/ProductShelf'
8
+ import type { ProductShelfOverrideDefinition } from 'src/typings/overrides'
26
9
 
27
- const Components = {
28
- ProductShelf: UIProductShelf,
29
- __experimentalCarousel: Carousel,
30
- __experimentalProductCard: ProductCard,
31
- ...productShelfComponentsCustomization,
32
- }
10
+ const { ProductShelf, __experimentalCarousel, __experimentalProductCard } =
11
+ getSectionOverrides(
12
+ {
13
+ ProductShelf: UIProductShelf,
14
+ __experimentalCarousel: Carousel,
15
+ __experimentalProductCard: ProductCard,
16
+ },
17
+ override as ProductShelfOverrideDefinition
18
+ )
33
19
 
34
- export { Components, productShelfPropsCustomization as Props }
20
+ export { ProductShelf, __experimentalCarousel, __experimentalProductCard }
@@ -1,28 +1,16 @@
1
1
  import { RegionBar as UIRegionBar, Icon as UIIcon } from '@faststore/ui'
2
2
 
3
- import RegionBarCustomizations from 'src/customizations/components/overrides/RegionBar'
3
+ import { getSectionOverrides } from 'src/utils/overrides'
4
+ import { override } from 'src/customizations/components/overrides/RegionBar'
5
+ import type { RegionBarOverrideDefinition } from 'src/typings/overrides'
4
6
 
5
- const regionBarComponentsCustomization = {}
7
+ const { RegionBar, LocationIcon, ButtonIcon } = getSectionOverrides(
8
+ {
9
+ RegionBar: UIRegionBar,
10
+ LocationIcon: UIIcon,
11
+ ButtonIcon: UIIcon,
12
+ },
13
+ override as RegionBarOverrideDefinition
14
+ )
6
15
 
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 }
16
+ export { RegionBar, LocationIcon, ButtonIcon }
@@ -3,8 +3,10 @@ import { memo } from 'react'
3
3
 
4
4
  import Link from 'src/components/ui/Link'
5
5
 
6
- import { Components, Props } from 'src/components/sections/Breadcrumb/Overrides'
7
- const { Breadcrumb: BreadcrumbWrapper, Icon } = Components
6
+ import {
7
+ Breadcrumb as BreadcrumbWrapper,
8
+ Icon,
9
+ } from 'src/components/sections/Breadcrumb/Overrides'
8
10
 
9
11
  export interface BreadcrumbProps extends UIBreadcrumbProps {
10
12
  icon: string
@@ -12,11 +14,11 @@ export interface BreadcrumbProps extends UIBreadcrumbProps {
12
14
  }
13
15
 
14
16
  const Breadcrumb = ({
15
- icon = Props['Icon'].name ?? 'Home',
17
+ icon = Icon.props.name ?? 'Home',
16
18
  alt = 'Go to homepage',
17
19
  ...otherProps
18
20
  }: BreadcrumbProps) => (
19
- <BreadcrumbWrapper
21
+ <BreadcrumbWrapper.Component
20
22
  homeLink={
21
23
  <Link
22
24
  data-fs-breadcrumb-link
@@ -25,11 +27,11 @@ const Breadcrumb = ({
25
27
  href="/"
26
28
  prefetch={false}
27
29
  >
28
- <Icon
30
+ <Icon.Component
29
31
  width={18}
30
32
  height={18}
31
33
  weight="bold"
32
- {...Props['Icon']}
34
+ {...Icon.props}
33
35
  name={icon}
34
36
  />
35
37
  </Link>
@@ -39,7 +41,7 @@ const Breadcrumb = ({
39
41
  {name}
40
42
  </Link>
41
43
  )}
42
- {...Props['Breadcrumb']}
44
+ {...BreadcrumbWrapper.props}
43
45
  {...otherProps}
44
46
  />
45
47
  )
@@ -4,14 +4,15 @@ import { useEffect, useState } from 'react'
4
4
  import { useRouter } from 'next/router'
5
5
 
6
6
  import {
7
- Components,
8
- Props,
7
+ ImageGallery as ImageGalleryWrapper,
8
+ ImageZoom,
9
+ __experimentalImageGalleryImage as Image,
9
10
  } from 'src/components/sections/ProductDetails/Overrides'
10
11
 
11
12
  const ImageComponent = ({ url, alternateName }) => {
12
- const { __experimentalImageGalleryImage: Image } = Components
13
-
14
- return <Image src={url} alt={alternateName} width={68} height={68} />
13
+ return (
14
+ <Image.Component src={url} alt={alternateName} width={68} height={68} />
15
+ )
15
16
  }
16
17
 
17
18
  export interface ImageGalleryProps {
@@ -25,34 +26,27 @@ const ImageGallery = ({ images, ...otherProps }: ImageGalleryProps) => {
25
26
 
26
27
  useEffect(() => setSelectedImageIdx(0), [dynamicRoute])
27
28
 
28
- // Deconstructing the object to avoid circular dependency errors
29
- const {
30
- ImageGallery: ImageGalleryWrapper,
31
- ImageZoom,
32
- __experimentalImageGalleryImage: Image,
33
- } = Components
34
-
35
29
  return (
36
- <ImageGalleryWrapper
37
- {...Props['ImageGallery']}
30
+ <ImageGalleryWrapper.Component
31
+ {...ImageGalleryWrapper.props}
38
32
  images={images}
39
33
  ImageComponent={ImageComponent}
40
34
  selectedImageIdx={selectedImageIdx}
41
35
  setSelectedImageIdx={setSelectedImageIdx}
42
36
  {...otherProps}
43
37
  >
44
- <ImageZoom {...Props['ImageZoom']}>
45
- <Image
38
+ <ImageZoom.Component {...ImageZoom.props}>
39
+ <Image.Component
46
40
  sizes="(max-width: 360px) 50vw, (max-width: 768px) 90vw, 50vw"
47
41
  width={691}
48
42
  height={691 * (3 / 4)}
49
43
  loading="eager"
50
- {...Props['__experimentalImageGalleryImage']}
44
+ {...Image.props}
51
45
  src={currentImage.url}
52
46
  alt={currentImage.alternateName}
53
47
  />
54
- </ImageZoom>
55
- </ImageGalleryWrapper>
48
+ </ImageZoom.Component>
49
+ </ImageGalleryWrapper.Component>
56
50
  )
57
51
  }
58
52
 
@@ -3,18 +3,17 @@ import { forwardRef, useRef } from 'react'
3
3
  import { convertFromRaw } from 'draft-js'
4
4
  import { stateToHTML } from 'draft-js-export-html'
5
5
  import { useUI } from '@faststore/ui'
6
- import { useNewsletter } from 'src/sdk/newsletter/useNewsletter'
7
-
8
- import { Components, Props } from 'src/components/sections/Newsletter/Overrides'
6
+ import type { InputFieldProps } from '@faststore/ui'
9
7
 
10
- const {
8
+ import { useNewsletter } from 'src/sdk/newsletter/useNewsletter'
9
+ import {
11
10
  ToastIconSuccess,
12
11
  ToastIconError,
13
12
  HeaderIcon,
14
- InputFieldEmail,
15
13
  InputFieldName,
14
+ InputFieldEmail,
16
15
  Button,
17
- } = Components
16
+ } from 'src/components/sections/Newsletter/Overrides'
18
17
 
19
18
  const cmsToHtml = (content) => {
20
19
  if (!content) {
@@ -146,11 +145,11 @@ const Newsletter = forwardRef<HTMLFormElement, NewsletterProps>(
146
145
  ...toastSubscribe,
147
146
  status: 'INFO',
148
147
  icon: (
149
- <ToastIconSuccess
148
+ <ToastIconSuccess.Component
150
149
  width={30}
151
150
  height={30}
152
- {...Props['ToastIconSuccess']}
153
- name={toastSubscribe.icon ?? Props['ToastIconSuccess'].name}
151
+ {...ToastIconSuccess.props}
152
+ name={toastSubscribe.icon ?? ToastIconSuccess.props.name}
154
153
  />
155
154
  ),
156
155
  })
@@ -159,11 +158,11 @@ const Newsletter = forwardRef<HTMLFormElement, NewsletterProps>(
159
158
  ...toastSubscribeError,
160
159
  status: 'ERROR',
161
160
  icon: (
162
- <ToastIconError
161
+ <ToastIconError.Component
163
162
  width={30}
164
163
  height={30}
165
- {...Props['ToastIconError']}
166
- name={toastSubscribe.icon ?? Props['ToastIconError'].name}
164
+ {...ToastIconError.props}
165
+ name={toastSubscribe.icon ?? ToastIconError.props.name}
167
166
  />
168
167
  ),
169
168
  })
@@ -184,11 +183,11 @@ const Newsletter = forwardRef<HTMLFormElement, NewsletterProps>(
184
183
  >
185
184
  <header data-fs-newsletter-header>
186
185
  <h3>
187
- <HeaderIcon
186
+ <HeaderIcon.Component
188
187
  width={32}
189
188
  height={32}
190
- {...Props['HeaderIcon']}
191
- name={icon?.icon ?? Props['HeaderIcon'].name}
189
+ {...HeaderIcon.props}
190
+ name={icon?.icon ?? HeaderIcon.props.name}
192
191
  />
193
192
  {title}
194
193
  </h3>
@@ -198,22 +197,22 @@ const Newsletter = forwardRef<HTMLFormElement, NewsletterProps>(
198
197
  <div data-fs-newsletter-controls>
199
198
  <>
200
199
  {displayNameInput ? (
201
- <InputFieldName
200
+ <InputFieldName.Component
202
201
  id="newsletter-name"
203
202
  required
204
- {...Props['InputFieldName']}
205
- label={nameInputLabel ?? Props['InputFieldName'].label}
203
+ {...(InputFieldName.props as InputFieldProps)}
204
+ label={nameInputLabel ?? InputFieldName.props.label}
206
205
  // Dynamic props shouldn't be overridable
207
206
  // This decision can be reviewed later if needed
208
207
  inputRef={nameInputRef}
209
208
  />
210
209
  ) : null}
211
- <InputFieldEmail
210
+ <InputFieldEmail.Component
212
211
  id="newsletter-email"
213
212
  type="email"
214
213
  required
215
- {...Props['InputFieldEmail']}
216
- label={emailInputLabel ?? Props['InputFieldEmail'].label}
214
+ {...(InputFieldEmail.props as InputFieldProps)}
215
+ label={emailInputLabel ?? InputFieldEmail.props.label}
217
216
  // Dynamic props shouldn't be overridable
218
217
  // This decision can be reviewed later if needed
219
218
  inputRef={emailInputRef}
@@ -224,14 +223,14 @@ const Newsletter = forwardRef<HTMLFormElement, NewsletterProps>(
224
223
  __html: cmsToHtml(privacyPolicy),
225
224
  }}
226
225
  ></span>
227
- <Button
226
+ <Button.Component
228
227
  variant="secondary"
229
228
  inverse
230
229
  type="submit"
231
- {...Props['Button']}
230
+ {...Button.props}
232
231
  >
233
232
  {loading ? subscribeButtonLoadingLabel : subscribeButtonLabel}
234
- </Button>
233
+ </Button.Component>
235
234
  </>
236
235
  </div>
237
236
  </form>
@@ -9,12 +9,12 @@ import Selectors from 'src/components/ui/SkuSelector'
9
9
  import AddToCartLoadingSkeleton from './AddToCartLoadingSkeleton'
10
10
 
11
11
  import {
12
- Components,
13
- Props,
12
+ BuyButton,
13
+ Icon,
14
+ Price,
15
+ QuantitySelector,
14
16
  } from 'src/components/sections/ProductDetails/Overrides'
15
17
 
16
- const { BuyButton, Icon, Price, QuantitySelector } = Components
17
-
18
18
  interface ProductDetailsSettingsProps {
19
19
  product: ProductDetailsFragment_ProductFragment
20
20
  buyButtonTitle: string
@@ -34,8 +34,8 @@ function ProductDetailsSettings({
34
34
  quantity,
35
35
  setQuantity,
36
36
  buyButtonIcon: {
37
- icon: buyButtonIconName = Props['Icon'].name,
38
- alt: buyButtonIconAlt = Props['Icon']['aria-label'],
37
+ icon: buyButtonIconName = Icon.props.name,
38
+ alt: buyButtonIconAlt = Icon.props['aria-label'],
39
39
  },
40
40
  }: ProductDetailsSettingsProps) {
41
41
  const {
@@ -77,30 +77,34 @@ function ProductDetailsSettings({
77
77
  <>
78
78
  <section data-fs-product-details-values>
79
79
  <div data-fs-product-details-prices>
80
- <Price
80
+ <Price.Component
81
81
  formatter={useFormattedPrice}
82
82
  testId="list-price"
83
83
  variant="listing"
84
84
  SRText="Original price:"
85
- {...Props['Price']}
85
+ {...Price.props}
86
+ // Dynamic props shouldn't be overridable
87
+ // This decision can be reviewed later if needed
86
88
  value={listPrice}
87
89
  data-value={listPrice}
88
90
  />
89
- <Price
91
+ <Price.Component
90
92
  formatter={useFormattedPrice}
91
93
  testId="price"
92
94
  variant="spot"
93
95
  className="text__lead"
94
96
  SRText="Sale Price:"
95
- {...Props['Price']}
97
+ {...Price.props}
98
+ // Dynamic props shouldn't be overridable
99
+ // This decision can be reviewed later if needed
96
100
  value={lowPrice}
97
101
  data-value={lowPrice}
98
102
  />
99
103
  </div>
100
- <QuantitySelector
104
+ <QuantitySelector.Component
101
105
  min={1}
102
106
  max={10}
103
- {...Props['QuantitySelector']}
107
+ {...QuantitySelector.props}
104
108
  // Dynamic props shouldn't be overridable
105
109
  // This decision can be reviewed later if needed
106
110
  onChange={setQuantity}
@@ -122,11 +126,11 @@ function ProductDetailsSettings({
122
126
  isValidating ? (
123
127
  <AddToCartLoadingSkeleton />
124
128
  ) : (
125
- <BuyButton
126
- {...Props['BuyButton']}
129
+ <BuyButton.Component
130
+ {...BuyButton.props}
127
131
  icon={
128
- <Icon
129
- {...Props['Icon']}
132
+ <Icon.Component
133
+ {...Icon.props}
130
134
  aria-label={buyButtonIconAlt}
131
135
  name={buyButtonIconName}
132
136
  />
@@ -135,7 +139,7 @@ function ProductDetailsSettings({
135
139
  {...buyProps}
136
140
  >
137
141
  {buyButtonTitle || 'Add to Cart'}
138
- </BuyButton>
142
+ </BuyButton.Component>
139
143
  )
140
144
  }
141
145
  </>