@faststore/core 0.3.16 → 2.0.65-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.
Files changed (136) hide show
  1. package/.storybook/storybook.css +1 -0
  2. package/.turbo/turbo-build.log +50 -0
  3. package/.turbo/turbo-lint.log +2 -0
  4. package/@generated/graphql/index.ts +27 -3
  5. package/@generated/graphql/persisted.json +1 -1
  6. package/CHANGELOG.md +127 -169
  7. package/README.md +2 -2
  8. package/cypress/integration/analytics.test.js +4 -4
  9. package/cypress/integration/cart.test.js +2 -2
  10. package/cypress/integration/plp.test.js +9 -9
  11. package/package.json +9 -10
  12. package/src/Layout.tsx +7 -2
  13. package/src/components/cart/CartItem/CartItem.tsx +30 -71
  14. package/src/components/cart/CartSidebar/CartSidebar.stories.mdx +1 -1
  15. package/src/components/cart/CartSidebar/CartSidebar.tsx +13 -17
  16. package/src/components/cart/CartSidebar/cart-sidebar.module.scss +2 -0
  17. package/src/components/common/Alert/Alert.tsx +6 -22
  18. package/src/components/common/Footer/Footer.stories.mdx +1 -1
  19. package/src/components/common/Footer/Footer.tsx +5 -38
  20. package/src/components/common/Footer/FooterFlags.tsx +23 -0
  21. package/src/components/common/Footer/FooterLinks.tsx +16 -12
  22. package/src/components/common/Footer/footer.module.scss +2 -28
  23. package/src/components/common/Footer/index.ts +1 -0
  24. package/src/components/common/Navbar/NavLinks.stories.mdx +1 -1
  25. package/src/components/common/Navbar/Navbar.stories.mdx +1 -1
  26. package/src/components/common/Navbar/Navbar.tsx +1 -1
  27. package/src/components/common/Navbar/NavbarSlider.stories.mdx +1 -1
  28. package/src/components/common/Navbar/NavbarSlider.tsx +2 -2
  29. package/src/components/common/Toast/Toast.tsx +1 -1
  30. package/src/components/product/ProductCard/ProductCard.tsx +44 -59
  31. package/src/components/product/ProductGrid/ProductGrid.tsx +7 -1
  32. package/src/components/regionalization/Regionalization.stories.mdx +24 -6
  33. package/src/components/regionalization/RegionalizationBar/RegionalizationBar.stories.mdx +1 -1
  34. package/src/components/regionalization/RegionalizationBar/RegionalizationBar.tsx +1 -1
  35. package/src/components/regionalization/RegionalizationButton/RegionalizationButton.tsx +1 -1
  36. package/src/components/regionalization/RegionalizationModal/RegionalizationModal.stories.mdx +17 -4
  37. package/src/components/regionalization/RegionalizationModal/RegionalizationModal.tsx +4 -5
  38. package/src/components/regionalization/RegionalizationModal/RegionalizationModalContent.tsx +19 -26
  39. package/src/components/regionalization/RegionalizationModal/regionalization-modal-body.module.scss +25 -0
  40. package/src/components/search/Filter/Facets.stories.mdx +10 -10
  41. package/src/components/search/Filter/Facets.tsx +69 -61
  42. package/src/components/search/Filter/Filter.stories.mdx +1 -1
  43. package/src/components/search/Filter/Filter.tsx +1 -1
  44. package/src/components/search/Filter/FilterSlider.stories.mdx +1 -1
  45. package/src/components/search/Filter/FilterSlider.tsx +2 -2
  46. package/src/components/search/Filter/facets.module.scss +16 -16
  47. package/src/components/search/Search.stories.mdx +28 -24
  48. package/src/components/search/SearchDropdown/SearchDropdown.stories.mdx +0 -1
  49. package/src/components/search/SearchInput/SearchInput.stories.mdx +0 -1
  50. package/src/components/search/SearchTop/SearchTop.stories.mdx +0 -1
  51. package/src/components/sections/Newsletter/Newsletter.stories.mdx +1 -1
  52. package/src/components/sections/Newsletter/Newsletter.tsx +1 -1
  53. package/src/components/sections/ProducDetailsContent/ProductDetailsContent.tsx +146 -146
  54. package/src/components/sections/ProductDetails/ProductDetails.tsx +4 -4
  55. package/src/components/sections/ProductGallery/ProductGallery.tsx +18 -18
  56. package/src/components/sections/ProductShelf/ProductShelf.tsx +10 -2
  57. package/src/components/sections/ProductTiles/ProductTiles.tsx +2 -2
  58. package/src/components/skeletons/FilterSkeleton/FilterSkeleton.stories.mdx +1 -1
  59. package/src/components/skeletons/FilterSkeleton/FilterSkeleton.tsx +20 -8
  60. package/src/components/skeletons/FilterSkeleton/filter-skeleton.module.scss +2 -2
  61. package/src/components/skeletons/ProductCardSkeleton/ProductCardSkeleton.stories.mdx +6 -69
  62. package/src/components/skeletons/ProductCardSkeleton/ProductCardSkeleton.tsx +36 -9
  63. package/src/components/skeletons/ProductCardSkeleton/product-card-skeleton.module.scss +16 -55
  64. package/src/components/skeletons/ProductGridSkeleton/ProductGridSkeleton.tsx +3 -1
  65. package/src/components/skeletons/ProductShelfSkeleton/ProductShelfSkeleton.tsx +3 -1
  66. package/src/components/skeletons/ProductTilesSkeleton/ProductTileSkeleton/ProductTileSkeleton.tsx +18 -17
  67. package/src/components/skeletons/ProductTilesSkeleton/ProductTileSkeleton/product-tile-skeleton.module.scss +37 -174
  68. package/src/components/skeletons/ProductTilesSkeleton/ProductTilesSkeleton.tsx +18 -3
  69. package/src/components/ui/Breadcrumb/Breadcrumb.tsx +17 -16
  70. package/src/components/ui/Gift/Gift.tsx +18 -27
  71. package/src/components/ui/SkuSelector/sku-selector.module.scss +1 -1
  72. package/src/components/ui/SlideOver/SlideOver.stories.mdx +2 -2
  73. package/src/components/ui/SlideOver/SlideOver.tsx +1 -0
  74. package/src/components/ui/Tiles/Tiles.stories.mdx +1 -3
  75. package/src/components/ui/Tiles/tiles.module.scss +11 -13
  76. package/src/components/ui/Toast/Toast.stories.mdx +1 -1
  77. package/src/components/ui/Toast/Toast.tsx +1 -1
  78. package/src/pages/_app.tsx +1 -1
  79. package/src/sdk/cart/index.ts +5 -0
  80. package/src/sdk/cart/useBuyButton.ts +1 -1
  81. package/src/sdk/cart/useCartToggleButton.ts +1 -1
  82. package/src/styles/vendors/include-media.scss +1 -1
  83. package/tsconfig.json +4 -6
  84. package/.eslintrc.json +0 -3
  85. package/.github/CODEOWNERS +0 -2
  86. package/.github/workflows/release.yml +0 -42
  87. package/.release-it.json +0 -32
  88. package/src/components/cart/CartItem/cart-item.module.scss +0 -68
  89. package/src/components/product/ProductCard/product-card.module.scss +0 -254
  90. package/src/components/regionalization/RegionalizationModal/regionalization-modal-content.module.scss +0 -79
  91. package/src/components/skeletons/Shimmer/Shimmer.tsx +0 -11
  92. package/src/components/skeletons/Shimmer/index.ts +0 -1
  93. package/src/components/skeletons/Shimmer/shimmer.module.scss +0 -43
  94. package/src/components/skeletons/Skeleton/Skeleton.tsx +0 -49
  95. package/src/components/skeletons/Skeleton/index.ts +0 -1
  96. package/src/components/skeletons/Skeleton/skeleton.module.scss +0 -77
  97. package/src/components/skeletons/Skeletons.stories.mdx +0 -177
  98. package/src/components/ui/Accordion/Accordion.stories.mdx +0 -222
  99. package/src/components/ui/Accordion/Accordion.tsx +0 -39
  100. package/src/components/ui/Accordion/AccordionItem.stories.mdx +0 -116
  101. package/src/components/ui/Accordion/AccordionItem.tsx +0 -82
  102. package/src/components/ui/Accordion/accordion.module.scss +0 -65
  103. package/src/components/ui/Accordion/index.ts +0 -2
  104. package/src/components/ui/Alert/Alert.stories.mdx +0 -164
  105. package/src/components/ui/Alert/Alert.tsx +0 -81
  106. package/src/components/ui/Alert/alert.module.scss +0 -93
  107. package/src/components/ui/Alert/index.ts +0 -1
  108. package/src/components/ui/Dropdown/Dropdown.stories.mdx +0 -232
  109. package/src/components/ui/Dropdown/Dropdown.tsx +0 -12
  110. package/src/components/ui/Dropdown/DropdownButton.tsx +0 -20
  111. package/src/components/ui/Dropdown/DropdownItem.stories.mdx +0 -139
  112. package/src/components/ui/Dropdown/DropdownItem.tsx +0 -26
  113. package/src/components/ui/Dropdown/DropdownMenu.stories.mdx +0 -115
  114. package/src/components/ui/Dropdown/DropdownMenu.tsx +0 -34
  115. package/src/components/ui/Dropdown/dropdown.module.scss +0 -101
  116. package/src/components/ui/Dropdown/index.ts +0 -4
  117. package/src/components/ui/Gift/Gift.stories.mdx +0 -99
  118. package/src/components/ui/Gift/gift.module.scss +0 -94
  119. package/src/components/ui/Modal/Modal.stories.mdx +0 -144
  120. package/src/components/ui/Modal/Modal.tsx +0 -43
  121. package/src/components/ui/Modal/index.ts +0 -1
  122. package/src/components/ui/Modal/modal.module.scss +0 -46
  123. package/src/components/ui/PriceRange/PriceRange.stories.mdx +0 -192
  124. package/src/components/ui/PriceRange/PriceRange.tsx +0 -140
  125. package/src/components/ui/PriceRange/index.ts +0 -1
  126. package/src/components/ui/PriceRange/price-range.module.scss +0 -176
  127. package/src/components/ui/ProductTitle/ProductTitle.stories.mdx +0 -105
  128. package/src/components/ui/ProductTitle/ProductTitle.tsx +0 -11
  129. package/src/components/ui/ProductTitle/index.ts +0 -1
  130. package/src/components/ui/ProductTitle/product-title.module.scss +0 -48
  131. package/src/components/ui/QuantitySelector/QuantitySelector.stories.mdx +0 -246
  132. package/src/components/ui/QuantitySelector/QuantitySelector.tsx +0 -103
  133. package/src/components/ui/QuantitySelector/index.ts +0 -1
  134. package/src/components/ui/QuantitySelector/quantity-selector.module.scss +0 -155
  135. package/src/sdk/ui/Provider.tsx +0 -151
  136. package/src/sdk/ui/useFadeEffect.ts +0 -21
@@ -6,22 +6,37 @@ import { ProductTileSkeleton } from '.'
6
6
 
7
7
  // TODO: // Replace it when items number become dynamically defined
8
8
  const DEFAULT_ITEMS_NUMBER = 3
9
+ const DEFAULT_ITEMS_NUMBER_TWO = 2
10
+
11
+ const getRatio = (products: number, idx: number) => {
12
+ const expandsFirstTile = products === DEFAULT_ITEMS_NUMBER && idx === 0
13
+
14
+ const expandsFirstTwoTile =
15
+ products === DEFAULT_ITEMS_NUMBER_TWO && (idx === 0 || idx === 1)
16
+
17
+ if (expandsFirstTile || expandsFirstTwoTile) {
18
+ return 5 / 3
19
+ }
20
+
21
+ return 3 / 4
22
+ }
9
23
 
10
24
  interface ProductTilesSkeletonProps {
11
25
  loading?: boolean
12
- variant?: 'wide' | 'default'
13
26
  }
14
27
 
15
28
  function ProductTilesSkeleton({
16
29
  children,
17
30
  loading = true,
18
- variant = 'default',
19
31
  }: PropsWithChildren<ProductTilesSkeletonProps>) {
20
32
  return loading ? (
21
33
  <Tiles>
22
34
  {Array.from({ length: DEFAULT_ITEMS_NUMBER }, (_, index) => (
23
35
  <Tile key={String(index)}>
24
- <ProductTileSkeleton index={index + 1} variant={variant} />
36
+ <ProductTileSkeleton
37
+ index={index + 1}
38
+ aspectRatio={getRatio(DEFAULT_ITEMS_NUMBER, index)}
39
+ />
25
40
  </Tile>
26
41
  ))}
27
42
  </Tiles>
@@ -1,13 +1,14 @@
1
1
  import type { BreadcrumbProps as UIBreadcrumbProps } from '@faststore/ui'
2
- import { Breadcrumb as UIBreadcrumb } from '@faststore/ui'
2
+ import {
3
+ Breadcrumb as UIBreadcrumb,
4
+ Dropdown as UIDropdown,
5
+ DropdownButton as UIDropdownButton,
6
+ DropdownMenu as UIDropdownMenu,
7
+ DropdownItem as UIDropdownItem,
8
+ } from '@faststore/ui'
3
9
  import { useRouter } from 'next/router'
4
10
  import { memo } from 'react'
5
11
 
6
- import Dropdown, {
7
- DropdownButton,
8
- DropdownItem,
9
- DropdownMenu,
10
- } from 'src/components/ui/Dropdown'
11
12
  import Icon from 'src/components/ui/Icon'
12
13
  import Link from 'src/components/ui/Link'
13
14
 
@@ -77,25 +78,25 @@ function BaseBreadcrumb({
77
78
  )}
78
79
 
79
80
  {collapseBreadcrumb && (
80
- <Dropdown>
81
- <DropdownButton data-fs-breadcrumb-dropdown-button>
81
+ <UIDropdown>
82
+ <UIDropdownButton data-fs-breadcrumb-dropdown-button size="small">
82
83
  <Icon name="DotsThree" width={24} height={24} />
83
- </DropdownButton>
84
- <DropdownMenu data-fs-breadcrumb-dropdown-menu>
84
+ </UIDropdownButton>
85
+ <UIDropdownMenu data-fs-breadcrumb-dropdown-menu>
85
86
  {mediumItems.map(({ item, name }, index) => (
86
- <DropdownItem
87
+ <UIDropdownItem
87
88
  data-fs-breadcrumb-dropdown-item
89
+ onClick={() => router.push(item)}
90
+ key={String(index)}
88
91
  icon={
89
92
  <Icon name="ArrowElbowDownRight" width={24} height={24} />
90
93
  }
91
- onClick={() => router.push(item)}
92
- key={String(index)}
93
94
  >
94
95
  {name}
95
- </DropdownItem>
96
+ </UIDropdownItem>
96
97
  ))}
97
- </DropdownMenu>
98
- </Dropdown>
98
+ </UIDropdownMenu>
99
+ </UIDropdown>
99
100
  )}
100
101
 
101
102
  {collapseBreadcrumb &&
@@ -1,24 +1,22 @@
1
+ import type { GiftProps } from '@faststore/ui'
1
2
  import {
3
+ Badge as UIBadge,
2
4
  Gift as UIGift,
3
- GiftImage as UIGiftImage,
4
5
  GiftContent as UIGiftContent,
5
- Badge as UIBadge,
6
+ GiftImage as UIGiftImage,
6
7
  } from '@faststore/ui'
7
- import type { GiftProps } from '@faststore/ui'
8
8
 
9
- import { useFormattedPrice } from 'src/sdk/product/useFormattedPrice'
10
9
  import Icon from 'src/components/ui/Icon'
11
- import Price from 'src/components/ui/Price'
12
10
  import { Image } from 'src/components/ui/Image'
13
- import type { ProductSummary_ProductFragment } from '@generated/graphql'
14
-
15
- import styles from './gift.module.scss'
11
+ import Price from 'src/components/ui/Price'
12
+ import { useFormattedPrice } from 'src/sdk/product/useFormattedPrice'
13
+ import type { CartItem as ICartItem } from 'src/sdk/cart'
16
14
 
17
15
  export type Props = GiftProps & {
18
16
  /**
19
17
  * Product to be showed as `Gift`.
20
18
  */
21
- product: ProductSummary_ProductFragment
19
+ item: ICartItem
22
20
  /**
23
21
  * Additional message in the title
24
22
  */
@@ -30,38 +28,31 @@ export type Props = GiftProps & {
30
28
  }
31
29
 
32
30
  function Gift({
33
- product,
31
+ item,
34
32
  titleMessage = 'Get a',
35
33
  badgeLabel = 'Free',
36
34
  ...otherProps
37
35
  }: Props) {
38
- const {
39
- isVariantOf,
40
- image: [img],
41
- offers: {
42
- offers: [{ listPrice }],
43
- },
44
- } = product
45
-
46
36
  return (
47
- <UIGift
48
- className={styles.fsGift}
49
- icon={<Icon name="Tag" width={18} height={18} />}
50
- {...otherProps}
51
- >
37
+ <UIGift icon={<Icon name="Tag" width={18} height={18} />} {...otherProps}>
52
38
  <UIGiftImage>
53
- <Image src={img.url} alt={img.alternateName} width={89} height={89} />
39
+ <Image
40
+ src={item.itemOffered.image[0].url}
41
+ alt={item.itemOffered.image[0].alternateName}
42
+ width={89}
43
+ height={89}
44
+ />
54
45
  </UIGiftImage>
55
46
  <UIGiftContent>
56
47
  <h3 data-fs-gift-product-title>
57
- {titleMessage} {isVariantOf.name}
48
+ {titleMessage} {item.itemOffered.isVariantOf.name}
58
49
  </h3>
59
50
  <span data-fs-gift-product-summary>
60
51
  <Price
61
- value={listPrice}
52
+ value={item.price}
62
53
  formatter={useFormattedPrice}
63
54
  testId="list-price"
64
- data-value={listPrice}
55
+ data-value={item.price}
65
56
  variant="listing"
66
57
  classes="text__legend"
67
58
  SRText="Original price:"
@@ -80,7 +80,7 @@
80
80
  margin-bottom: var(--fs-sku-selector-title-margin-bottom);
81
81
  }
82
82
 
83
- [data-fs-radio-option] {
83
+ [data-fs-radio-group-option] {
84
84
  position: relative;
85
85
  width: var(--fs-sku-selector-option-width);
86
86
  height: var(--fs-sku-selector-option-height);
@@ -1,8 +1,8 @@
1
1
  import { Meta, Canvas, Story, ArgsTable } from '@storybook/addon-docs'
2
2
 
3
3
  import { SearchProvider, useSearch } from '@faststore/sdk'
4
- import UIProvider, { useUI } from 'src/sdk/ui/Provider'
5
- import { useFadeEffect } from 'src/sdk/ui/useFadeEffect'
4
+ import { UIProvider, useUI } from '@faststore/ui'
5
+ import { useFadeEffect } from '@faststore/ui'
6
6
  import { useCart } from 'src/sdk/cart'
7
7
 
8
8
  import { NavbarSlider } from 'src/components/common/Navbar'
@@ -44,6 +44,7 @@ function SlideOver({
44
44
  <UIModal
45
45
  className={`${styles.fsSlideOver} ${className}`}
46
46
  isOpen={isOpen}
47
+ data-fs-modal={null}
47
48
  data-fs-slide-over
48
49
  data-fs-slide-over-direction={direction}
49
50
  data-fs-slide-over-size={size}
@@ -132,7 +132,7 @@ of items to be displayed, the tiles will be arranged differently.
132
132
 
133
133
  <TokenTable>
134
134
  <TokenRow token="--fs-tiles-gap-mobile" value="var(--fs-grid-gap-2)" />
135
- <TokenRow token="--fs-tiles-gap-tablet" value="var(--fs-grid-gap-3)" />
135
+ <TokenRow token="--fs-tiles-gap-notebook" value="var(--fs-grid-gap-3)" />
136
136
  </TokenTable>
137
137
 
138
138
  ---
@@ -143,8 +143,6 @@ of items to be displayed, the tiles will be arranged differently.
143
143
 
144
144
  <TokenTable>
145
145
  <TokenRow token="--fs-tiles-tile-min-width" value="9rem" />
146
- <TokenRow token="--fs-tiles-tile-height-mobile" value="24rem" />
147
- <TokenRow token="--fs-tiles-tile-height-tablet" value="28rem" />
148
146
  <TokenDivider />
149
147
  <TokenRow
150
148
  token="--fs-tiles-tile-border-radius"
@@ -7,12 +7,10 @@
7
7
 
8
8
  // Default properties
9
9
  --fs-tiles-gap-mobile : var(--fs-grid-gap-2);
10
- --fs-tiles-gap-tablet : var(--fs-grid-gap-3);
10
+ --fs-tiles-gap-notebook : var(--fs-grid-gap-3);
11
11
 
12
12
  // Tile
13
13
  --fs-tiles-tile-min-width : 9rem;
14
- --fs-tiles-tile-height-mobile : 24rem;
15
- --fs-tiles-tile-height-tablet : 28rem;
16
14
  --fs-tiles-tile-border-radius : var(--fs-border-radius);
17
15
 
18
16
  // --------------------------------------------------------
@@ -20,37 +18,37 @@
20
18
  // --------------------------------------------------------
21
19
 
22
20
  display: grid;
23
- grid-template-rows: repeat(2, 1fr);
24
21
  grid-template-columns: repeat(2, 1fr);
25
22
  row-gap: var(--fs-tiles-gap-mobile);
26
23
  column-gap: var(--fs-tiles-gap-mobile);
27
24
 
28
25
  @include media(">=tablet") {
29
- grid-template-rows: repeat(1, 1fr);
30
26
  grid-template-columns: repeat(4, 1fr);
31
- column-gap: var(--fs-tiles-gap-tablet);
32
27
  }
33
28
 
29
+ @include media(">=notebook") { column-gap: var(--fs-tiles-gap-notebook); }
30
+
34
31
  [data-fs-tile] {
35
32
  min-width: var(--fs-tiles-tile-min-width);
36
- height: var(--fs-tiles-tile-height-mobile);
37
33
 
38
34
  > * {
39
35
  overflow: hidden;
40
36
  border-radius: var(--fs-tiles-tile-border-radius);
41
- }
42
37
 
43
- @include media(">=tablet") { height: var(--fs-tiles-tile-height-tablet); }
38
+ @include media(">=tablet") {
39
+ display: grid;
40
+ grid-auto-rows: 62% auto;
41
+ [data-fs-product-card-image] { height: 100%; }
42
+ }
43
+
44
+ @include media(">=notebook") { grid-auto-rows: 80% auto; }
45
+ }
44
46
  }
45
47
 
46
48
  // --------------------------------------------------------
47
49
  // Variants Styles
48
50
  // --------------------------------------------------------
49
51
 
50
- &[data-fs-tiles-variant="expanded-first"], &[data-fs-tiles-variant="expanded-first-two"] {
51
- grid-template-rows: auto 1fr;
52
- }
53
-
54
52
  &[data-fs-tiles-variant="expanded-first"] > [data-fs-tile]:first-child,
55
53
  &[data-fs-tiles-variant="expanded-first-two"] > [data-fs-tile]:first-child,
56
54
  &[data-fs-tiles-variant="expanded-first-two"] > [data-fs-tile]:nth-child(2) {
@@ -5,7 +5,7 @@ import {
5
5
  TokenDivider,
6
6
  } from 'src/../.storybook/components'
7
7
 
8
- import UIProvider, { useUI } from 'src/sdk/ui/Provider'
8
+ import { UIProvider, useUI } from '@faststore/ui'
9
9
 
10
10
  import Toast from '.'
11
11
  import { Button } from '@faststore/ui'
@@ -1,7 +1,7 @@
1
1
  import { useEffect, useRef, useState } from 'react'
2
2
 
3
3
  import Icon from 'src/components/ui/Icon'
4
- import { useUI } from 'src/sdk/ui/Provider'
4
+ import { useUI } from '@faststore/ui'
5
5
 
6
6
  import styles from './toast.module.scss'
7
7
 
@@ -11,7 +11,7 @@ import type { AppProps } from 'next/app'
11
11
  import Layout from 'src/Layout'
12
12
  import AnalyticsHandler from 'src/sdk/analytics'
13
13
  import ErrorBoundary from 'src/sdk/error/ErrorBoundary'
14
- import UIProvider from 'src/sdk/ui/Provider'
14
+ import { UIProvider } from '@faststore/ui'
15
15
 
16
16
  function App({ Component, pageProps }: AppProps) {
17
17
  return (
@@ -66,6 +66,11 @@ export const ValidateCartMutation = gql`
66
66
  isVariantOf {
67
67
  productGroupID
68
68
  name
69
+ skuVariants {
70
+ activeVariations
71
+ slugsMap(dominantVariantName: "Color")
72
+ availableVariations(dominantVariantName: "Color")
73
+ }
69
74
  }
70
75
  gtin
71
76
  additionalProperty {
@@ -6,7 +6,7 @@ import type { AnalyticsItem } from 'src/sdk/analytics/types'
6
6
  import type { CartItem } from 'src/sdk/cart'
7
7
 
8
8
  import { useSession } from '../session'
9
- import { useUI } from '../ui/Provider'
9
+ import { useUI } from '@faststore/ui'
10
10
  import { cartStore } from './index'
11
11
 
12
12
  export const useBuyButton = (item: CartItem | null) => {
@@ -1,6 +1,6 @@
1
1
  import { useCallback } from 'react'
2
2
 
3
- import { useUI } from '../ui/Provider'
3
+ import { useUI } from '@faststore/ui'
4
4
  import { useCart } from './index'
5
5
 
6
6
  export const useCartToggleButton = () => {
@@ -1,4 +1,4 @@
1
1
  // Include Media //////////////////////////
2
2
 
3
- @import "../../../node_modules/include-media/dist/include-media";
3
+ @import "~include-media/dist/include-media";
4
4
  @import "include-media_overwrite";
package/tsconfig.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
+ "extends": "@faststore/shared/tsconfig.json",
2
3
  "compilerOptions": {
3
- "allowSyntheticDefaultImports": true,
4
+ "declaration": false,
4
5
  "moduleResolution": "node",
5
6
  "jsx": "preserve",
6
7
  "jsxImportSource": "react",
@@ -14,15 +15,12 @@
14
15
  "src/*": ["src/*"],
15
16
  "@generated/*": ["@generated/*"]
16
17
  },
17
- "forceConsistentCasingInFileNames": true,
18
18
  "strict": false,
19
19
  "incremental": true,
20
20
  "isolatedModules": true,
21
21
  "target": "es5",
22
- "lib": ["dom", "dom.iterable", "esnext"],
23
- "skipLibCheck": true,
24
- "esModuleInterop": true
22
+ "lib": ["dom", "dom.iterable", "esnext"]
25
23
  },
26
24
  "include": ["*.d.ts", "src/**/*.ts", "src/**/*.tsx", "@generated/**/*.ts"],
27
- "exclude": ["node_modules", "public"]
25
+ "exclude": ["node_modules", "public", "src/components/search/searchMock.ts"]
28
26
  }
package/.eslintrc.json DELETED
@@ -1,3 +0,0 @@
1
- {
2
- "extends": "next/core-web-vitals"
3
- }
@@ -1,2 +0,0 @@
1
- # Make @vtex-sites/cms-schema default reviewer for all schema changes for CMS
2
- src/@vtex/gatsby-plugin-cms/ @vtex-sites/cms-schema
@@ -1,42 +0,0 @@
1
- # This Action should run on main branch and verify lint, test, and then publish the version on npm
2
- name: CD
3
-
4
- on:
5
- push:
6
- branches:
7
- - evergreen
8
-
9
- jobs:
10
- release:
11
- name: Release
12
- timeout-minutes: 5
13
- runs-on: ubuntu-latest
14
- if: github.repository == 'vtex-sites/nextjs.store' && !startsWith(github.event.head_commit.message, 'chore(release):')
15
-
16
-
17
- steps:
18
- - name: Check out code
19
- uses: actions/checkout@v2
20
- with:
21
- token: ${{ secrets.VTEX_GITHUB_BOT_TOKEN }}
22
- fetch-depth: 2
23
-
24
- - name: Setup Node.js environment
25
- uses: actions/setup-node@v2
26
- with:
27
- node-version: 16
28
- cache: 'yarn'
29
- registry-url: 'https://registry.npmjs.org'
30
-
31
- - name: Configure CI Git User
32
- run: |
33
- git config user.name vtexgithubbot
34
- git config user.email vtexgithubbot@github.com
35
-
36
- - name: Install dependencies
37
- run: yarn install --verbose
38
-
39
- - name: Release
40
- run: npm run release
41
- env:
42
- NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
package/.release-it.json DELETED
@@ -1,32 +0,0 @@
1
- {
2
- "git": {
3
- "commitMessage": "chore(release): ${version}"
4
- },
5
- "npm": {
6
- "publish": true,
7
- "skipChecks": true
8
- },
9
- "publishConfig": {
10
- "access": "public",
11
- "registry": "registry.npmjs.org"
12
- },
13
- "plugins": {
14
- "@release-it/conventional-changelog": {
15
- "preset": {
16
- "name": "conventionalcommits",
17
- "types": [
18
- { "type": "feat", "section": "Features" },
19
- { "type": "fix", "section": "Bug Fixes" },
20
- { "type": "chore", "section": "Chores" },
21
- { "type": "docs", "section": "Documentation" },
22
- { "type": "style", "section": "Style changes" },
23
- { "type": "refactor", "section": "Refactoring" },
24
- { "type": "perf", "section": "Performance" },
25
- { "type": "test", "section": "Tests" }
26
- ]
27
- },
28
- "infile": "CHANGELOG.md",
29
- "header": "# Changelog\n\nAll notable changes to this project will be documented in this file.\n\nThe format is based on [Conventional Changelog](https://github.com/conventional-changelog/conventional-changelog),\nand this project adheres to [Calendar Versioning](https://calver.org/)."
30
- }
31
- }
32
- }
@@ -1,68 +0,0 @@
1
- @import "src/styles/scaffold";
2
-
3
- .fs-cart-item {
4
- // --------------------------------------------------------
5
- // Design Tokens for CartItem
6
- // --------------------------------------------------------
7
-
8
- // Default properties
9
- --fs-cart-item-padding : var(--fs-spacing-3);
10
- --fs-cart-item-bkg-color : var(--fs-control-bkg);
11
-
12
- --fs-cart-item-border-width : var(--fs-border-width);
13
- --fs-cart-item-border-color : var(--fs-border-color-light);
14
- --fs-cart-item-border-radius : var(--fs-border-radius);
15
-
16
- // Image
17
- --fs-cart-item-image-border-radius : var(--fs-cart-item-border-radius);
18
-
19
- // Title
20
- --fs-cart-item-title-margin-bottom : var(--fs-spacing-0);
21
- --fs-cart-item-title-line-height : 1.2;
22
- --fs-cart-item-title-color : var(--fs-color-text);
23
-
24
- // Actions
25
- --fs-cart-item-actions-margin-top : var(--fs-spacing-3);
26
-
27
- // --------------------------------------------------------
28
- // Structural Styles
29
- // --------------------------------------------------------
30
-
31
- padding: var(--fs-cart-item-padding);
32
- background-color: var(--fs-cart-item-bkg-color);
33
- border: var(--fs-cart-item-border-width) solid var(--fs-cart-item-border-color);
34
- border-radius: var(--fs-cart-item-border-radius);
35
-
36
- [data-fs-cart-item-content] {
37
- display: grid;
38
- grid-template-columns: rem(72px) repeat(4, 1fr);
39
- column-gap: var(--fs-grid-gap-2);
40
- align-items: center;
41
- }
42
-
43
- [data-fs-cart-item-summary] {
44
- flex-direction: column;
45
- grid-column: 2 / span 4;
46
- }
47
-
48
- [data-fs-cart-item-title] {
49
- margin-bottom: var(--fs-cart-item-title-margin-bottom);
50
- line-height: var(--fs-cart-item-title-line-height);
51
- color: var(--fs-cart-item-title-color);
52
- text-decoration: none;
53
- outline: none;
54
-
55
- @include truncate-title;
56
- }
57
-
58
- [data-fs-cart-item-prices] {
59
- display: flex;
60
- align-items: baseline;
61
- }
62
-
63
- [data-fs-cart-item-actions] {
64
- display: flex;
65
- justify-content: space-between;
66
- margin-top: var(--fs-cart-item-actions-margin-top);
67
- }
68
- }