@faststore/core 0.3.17 → 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 (94) 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 +116 -180
  7. package/README.md +2 -2
  8. package/cypress/integration/analytics.test.js +3 -3
  9. package/cypress/integration/cart.test.js +2 -2
  10. package/cypress/integration/plp.test.js +8 -8
  11. package/package.json +8 -9
  12. package/src/Layout.tsx +1 -1
  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 +9 -12
  16. package/src/components/common/Footer/Footer.tsx +5 -38
  17. package/src/components/common/Footer/FooterFlags.tsx +23 -0
  18. package/src/components/common/Footer/footer.module.scss +2 -28
  19. package/src/components/common/Footer/index.ts +1 -0
  20. package/src/components/common/Navbar/NavLinks.stories.mdx +1 -1
  21. package/src/components/common/Navbar/Navbar.stories.mdx +1 -1
  22. package/src/components/common/Navbar/Navbar.tsx +1 -1
  23. package/src/components/common/Navbar/NavbarSlider.stories.mdx +1 -1
  24. package/src/components/common/Navbar/NavbarSlider.tsx +2 -2
  25. package/src/components/common/Toast/Toast.tsx +1 -1
  26. package/src/components/product/ProductCard/ProductCard.tsx +44 -59
  27. package/src/components/product/ProductGrid/ProductGrid.tsx +7 -1
  28. package/src/components/regionalization/Regionalization.stories.mdx +24 -6
  29. package/src/components/regionalization/RegionalizationBar/RegionalizationBar.stories.mdx +1 -1
  30. package/src/components/regionalization/RegionalizationBar/RegionalizationBar.tsx +1 -1
  31. package/src/components/regionalization/RegionalizationButton/RegionalizationButton.tsx +1 -1
  32. package/src/components/regionalization/RegionalizationModal/RegionalizationModal.stories.mdx +17 -4
  33. package/src/components/regionalization/RegionalizationModal/RegionalizationModal.tsx +4 -5
  34. package/src/components/regionalization/RegionalizationModal/RegionalizationModalContent.tsx +19 -26
  35. package/src/components/regionalization/RegionalizationModal/regionalization-modal-body.module.scss +25 -0
  36. package/src/components/search/Filter/Facets.stories.mdx +1 -1
  37. package/src/components/search/Filter/Filter.stories.mdx +1 -1
  38. package/src/components/search/Filter/Filter.tsx +1 -1
  39. package/src/components/search/Filter/FilterSlider.stories.mdx +1 -1
  40. package/src/components/search/Filter/FilterSlider.tsx +2 -2
  41. package/src/components/sections/Newsletter/Newsletter.stories.mdx +1 -1
  42. package/src/components/sections/Newsletter/Newsletter.tsx +1 -1
  43. package/src/components/sections/ProductDetails/ProductDetails.tsx +2 -2
  44. package/src/components/sections/ProductGallery/ProductGallery.tsx +18 -18
  45. package/src/components/sections/ProductShelf/ProductShelf.tsx +10 -2
  46. package/src/components/sections/ProductTiles/ProductTiles.tsx +2 -2
  47. package/src/components/skeletons/FilterSkeleton/FilterSkeleton.stories.mdx +1 -1
  48. package/src/components/skeletons/FilterSkeleton/FilterSkeleton.tsx +20 -8
  49. package/src/components/skeletons/FilterSkeleton/filter-skeleton.module.scss +2 -2
  50. package/src/components/skeletons/ProductCardSkeleton/ProductCardSkeleton.stories.mdx +6 -69
  51. package/src/components/skeletons/ProductCardSkeleton/ProductCardSkeleton.tsx +36 -9
  52. package/src/components/skeletons/ProductCardSkeleton/product-card-skeleton.module.scss +16 -55
  53. package/src/components/skeletons/ProductGridSkeleton/ProductGridSkeleton.tsx +3 -1
  54. package/src/components/skeletons/ProductShelfSkeleton/ProductShelfSkeleton.tsx +3 -1
  55. package/src/components/skeletons/ProductTilesSkeleton/ProductTileSkeleton/ProductTileSkeleton.tsx +18 -17
  56. package/src/components/skeletons/ProductTilesSkeleton/ProductTileSkeleton/product-tile-skeleton.module.scss +37 -174
  57. package/src/components/skeletons/ProductTilesSkeleton/ProductTilesSkeleton.tsx +18 -3
  58. package/src/components/ui/Gift/Gift.tsx +12 -15
  59. package/src/components/ui/SlideOver/SlideOver.stories.mdx +2 -2
  60. package/src/components/ui/SlideOver/SlideOver.tsx +1 -0
  61. package/src/components/ui/Tiles/Tiles.stories.mdx +1 -3
  62. package/src/components/ui/Tiles/tiles.module.scss +11 -13
  63. package/src/components/ui/Toast/Toast.stories.mdx +1 -1
  64. package/src/components/ui/Toast/Toast.tsx +1 -1
  65. package/src/pages/_app.tsx +1 -1
  66. package/src/sdk/cart/index.ts +5 -0
  67. package/src/sdk/cart/useBuyButton.ts +1 -1
  68. package/src/sdk/cart/useCartToggleButton.ts +1 -1
  69. package/src/styles/vendors/include-media.scss +1 -1
  70. package/tsconfig.json +3 -5
  71. package/.eslintrc.json +0 -3
  72. package/.github/CODEOWNERS +0 -2
  73. package/.github/workflows/release.yml +0 -42
  74. package/.release-it.json +0 -32
  75. package/src/components/cart/CartItem/cart-item.module.scss +0 -68
  76. package/src/components/product/ProductCard/product-card.module.scss +0 -254
  77. package/src/components/regionalization/RegionalizationModal/regionalization-modal-content.module.scss +0 -79
  78. package/src/components/skeletons/Shimmer/Shimmer.tsx +0 -11
  79. package/src/components/skeletons/Shimmer/index.ts +0 -1
  80. package/src/components/skeletons/Shimmer/shimmer.module.scss +0 -43
  81. package/src/components/skeletons/Skeleton/Skeleton.tsx +0 -49
  82. package/src/components/skeletons/Skeleton/index.ts +0 -1
  83. package/src/components/skeletons/Skeleton/skeleton.module.scss +0 -77
  84. package/src/components/skeletons/Skeletons.stories.mdx +0 -177
  85. package/src/components/ui/Modal/Modal.stories.mdx +0 -144
  86. package/src/components/ui/Modal/Modal.tsx +0 -43
  87. package/src/components/ui/Modal/index.ts +0 -1
  88. package/src/components/ui/Modal/modal.module.scss +0 -46
  89. package/src/components/ui/ProductTitle/ProductTitle.stories.mdx +0 -105
  90. package/src/components/ui/ProductTitle/ProductTitle.tsx +0 -11
  91. package/src/components/ui/ProductTitle/index.ts +0 -1
  92. package/src/components/ui/ProductTitle/product-title.module.scss +0 -48
  93. package/src/sdk/ui/Provider.tsx +0 -151
  94. package/src/sdk/ui/useFadeEffect.ts +0 -21
@@ -1,9 +1,7 @@
1
1
  import type { PropsWithChildren } from 'react'
2
2
 
3
- import Shimmer from '../Shimmer'
4
- import Skeleton from '../Skeleton'
3
+ import { Skeleton as UISkeleton } from '@faststore/ui'
5
4
  import styles from './filter-skeleton.module.scss'
6
-
7
5
  interface FilterSkeletonProps {
8
6
  /**
9
7
  * Control whether skeleton should be visible or not.
@@ -17,13 +15,27 @@ function FilterSkeleton({
17
15
  }: PropsWithChildren<FilterSkeletonProps>) {
18
16
  return loading ? (
19
17
  <div className={styles.fsFilterSkeleton} data-fs-filter-skeleton>
20
- <Skeleton shimmer variant="text" />
18
+ <UISkeleton
19
+ data-fs-filter-skeleton-text
20
+ size={{ width: '100%', height: '1.5rem' }}
21
+ />
21
22
 
22
23
  <div data-fs-filter-skeleton-content>
23
- <Skeleton variant="text" />
24
- <Skeleton variant="text" />
25
- <Skeleton variant="text" />
26
- <Shimmer />
24
+ <UISkeleton
25
+ data-fs-filter-skeleton-text
26
+ size={{ width: '100%', height: '1.5rem' }}
27
+ shimmer={false}
28
+ />
29
+ <UISkeleton
30
+ data-fs-filter-skeleton-text
31
+ size={{ width: '100%', height: '1.5rem' }}
32
+ shimmer={false}
33
+ />
34
+ <UISkeleton
35
+ data-fs-filter-skeleton-text
36
+ size={{ width: '100%', height: '1.5rem' }}
37
+ shimmer={false}
38
+ />
27
39
  </div>
28
40
  </div>
29
41
  ) : (
@@ -28,7 +28,7 @@
28
28
 
29
29
  @include media("<notebook") { display: none; }
30
30
 
31
- [data-fs-skeleton-variant="text"] {
31
+ [data-fs-filter-skeleton-text] {
32
32
  max-width: var(--fs-filter-skeleton-title-max-width);
33
33
  margin-bottom: var(--fs-filter-skeleton-title-margin-bottom);
34
34
  }
@@ -42,7 +42,7 @@
42
42
  border: var(--fs-filter-skeleton-content-border-width) solid var(--fs-filter-skeleton-content-border-color);
43
43
  border-radius: var(--fs-filter-skeleton-content-border-radius);
44
44
 
45
- [data-fs-skeleton-variant="text"] {
45
+ [data-fs-skeleton] {
46
46
  min-width: 100%;
47
47
  min-height: var(--fs-filter-skeleton-content-min-height);
48
48
  margin-bottom: var(--fs-filter-skeleton-content-margin-bottom);
@@ -39,7 +39,7 @@ The loading placeholder for the <code>ProductCard</code> used in several section
39
39
 
40
40
  ## Overview
41
41
 
42
- The `ProductCardSkeleton` component is part of [Skeletons](?path=/docs/features-skeletons-overview--usage) feature.
42
+ The `ProductCardSkeleton` component is part of Skeletons feature.
43
43
 
44
44
  ---
45
45
 
@@ -68,71 +68,13 @@ The `ProductCardSkeleton` component is part of [Skeletons](?path=/docs/features-
68
68
  token="--fs-product-card-skeleton-padding"
69
69
  value="var(--fs-spacing-1) var(--fs-spacing-1) var(--fs-spacing-2)"
70
70
  />
71
- <TokenRow
72
- token="--fs-product-card-skeleton-border-width"
73
- value="var(--fs-border-width)"
74
- />
75
- <TokenRow
76
- token="--fs-product-card-skeleton-border-color"
77
- value="transparent"
78
- isColor
79
- />
80
71
  <TokenRow
81
72
  token="--fs-product-card-skeleton-border-radius"
82
73
  value="var(--fs-border-radius)"
83
74
  />
84
- </TokenTable>
85
-
86
- ### Content
87
-
88
- <TokenTable>
89
- <TokenRow token="--fs-product-card-skeleton-content-height" value="20%" />
90
- <TokenRow
91
- token="--fs-product-card-skeleton-content-margin-top"
92
- value="var(--fs-spacing-2)"
93
- />
94
- </TokenTable>
95
-
96
- ### Button
97
-
98
- <TokenTable>
99
- <TokenRow
100
- token="--fs-product-card-skeleton-button-margin-top"
101
- value="var(--fs-spacing-4)"
102
- />
103
- </TokenTable>
104
-
105
- ### Text
106
-
107
- <TokenTable>
108
- <TokenRow
109
- token="--fs-product-card-skeleton-text-margin-bottom"
110
- value="var(--fs-product-card-skeleton-content-margin-top)"
111
- />
112
- </TokenTable>
113
-
114
- ### Badge
115
-
116
- <TokenTable>
117
- <TokenRow
118
- token="--fs-product-card-skeleton-badge-min-height"
119
- value="var(--fs-spacing-5)"
120
- />
121
- <TokenRow
122
- token="--fs-product-card-skeleton-badge-margin-top"
123
- value="var(--fs-product-card-skeleton-text-margin-top)"
124
- />
125
- <TokenRow
126
- token="--fs-product-card-skeleton-badge-max-width"
127
- value="var(--fs-product-card-skeleton-content-height)"
128
- />
129
75
  <TokenRow
130
- token="--fs-product-card-skeleton-badge-min-width-mobile"
131
- value="30%"
132
- />
133
- <TokenRow
134
- token="--fs-product-card-skeleton-badge-min-width-tablet"
135
- value="var(--fs-product-card-skeleton-content-height)"
76
+ token="--fs-product-card-skeleton-gap"
77
+ value="var(--fs-spacing-1)"
136
78
  />
137
79
  </TokenTable>
138
80
 
@@ -150,12 +92,8 @@ The `ProductCardSkeleton` component is part of [Skeletons](?path=/docs/features-
150
92
 
151
93
  <TokenTable>
152
94
  <TokenRow
153
- token="--fs-product-card-skeleton-sectioned-image-min-width"
154
- value="13rem"
155
- />
156
- <TokenRow
157
- token="--fs-product-card-skeleton-sectioned-image-height"
158
- value="var(--fs-product-card-skeleton-image-height-desktop)"
95
+ token="--fs-product-card-skeleton-sectioned-min-width"
96
+ value="10rem"
159
97
  />
160
98
  </TokenTable>
161
99
 
@@ -168,9 +106,8 @@ The `ProductCardSkeleton` component is part of [Skeletons](?path=/docs/features-
168
106
  </Canvas>
169
107
 
170
108
  <TokenTable>
171
- <TokenRow token="--fs-product-card-skeleton-bordered-mobile" value="none" />
172
109
  <TokenRow
173
- token="--fs-product-card-skeleton-bordered-desktop"
110
+ token="--fs-product-card-skeleton-bordered"
174
111
  value="var(--fs-border-width) solid var(--fs-border-color-light)"
175
112
  />
176
113
  </TokenTable>
@@ -1,5 +1,5 @@
1
- import Shimmer from '../Shimmer'
2
- import Skeleton from '../Skeleton'
1
+ import { Skeleton as UISkeleton } from '@faststore/ui'
2
+
3
3
  import styles from './product-card-skeleton.module.scss'
4
4
 
5
5
  interface ProductCardSkeletonProps {
@@ -19,12 +19,17 @@ interface ProductCardSkeletonProps {
19
19
  * Specifies the component variant.
20
20
  */
21
21
  variant?: 'default' | 'wide'
22
+ /**
23
+ * Specifies the ProductCard image's aspect ratio.
24
+ */
25
+ aspectRatio?: number
22
26
  }
23
27
 
24
28
  function ProductCardSkeleton({
25
29
  bordered,
26
30
  sectioned,
27
31
  displayButton,
32
+ aspectRatio = 1,
28
33
  variant = 'default',
29
34
  }: ProductCardSkeletonProps) {
30
35
  return (
@@ -35,16 +40,38 @@ function ProductCardSkeleton({
35
40
  data-fs-product-card-skeleton-bordered={bordered}
36
41
  data-fs-product-card-skeleton-sectioned={sectioned}
37
42
  >
38
- <div data-fs-product-card-skeleton-image>
39
- <Skeleton variant="image" />
43
+ <div
44
+ data-fs-product-card-skeleton-image
45
+ style={
46
+ {
47
+ '--fs-product-card-skeleton-image-aspect-ratio': aspectRatio,
48
+ } as React.CSSProperties
49
+ }
50
+ >
51
+ <UISkeleton size={{ width: '100%', height: '100%' }} />
40
52
  </div>
41
53
  <div data-fs-product-card-skeleton-content>
42
- <Skeleton variant="text" />
43
- <Skeleton variant="text" />
44
- <Skeleton variant="badge" />
45
- {displayButton && <Skeleton variant="button" />}
54
+ <UISkeleton
55
+ data-fs-product-card-skeleton-text
56
+ size={{ width: '90%', height: '1.5rem' }}
57
+ />
58
+ <UISkeleton
59
+ data-fs-product-card-skeleton-text
60
+ size={{ width: '70%', height: '1.5rem' }}
61
+ />
62
+ <UISkeleton
63
+ data-fs-product-card-skeleton-badge
64
+ size={{ width: '6rem', height: '2rem' }}
65
+ border="pill"
66
+ />
67
+ {displayButton && (
68
+ <UISkeleton
69
+ data-fs-product-card-skeleton-button
70
+ size={{ width: '6rem', height: '2rem' }}
71
+ style={{ columnGap: '.75rem' }}
72
+ />
73
+ )}
46
74
  </div>
47
- <Shimmer />
48
75
  </div>
49
76
  )
50
77
  }
@@ -7,34 +7,14 @@
7
7
 
8
8
  // Default properties
9
9
  --fs-product-card-skeleton-padding : var(--fs-spacing-1) var(--fs-spacing-1) var(--fs-spacing-2);
10
- --fs-product-card-skeleton-border-width : var(--fs-border-width);
11
- --fs-product-card-skeleton-border-color : transparent;
12
10
  --fs-product-card-skeleton-border-radius : var(--fs-border-radius);
13
-
14
- // Content
15
- --fs-product-card-skeleton-content-height : 20%;
16
- --fs-product-card-skeleton-content-margin-top : var(--fs-spacing-2);
17
-
18
- // Button
19
- --fs-product-card-skeleton-button-margin-top : var(--fs-spacing-4);
20
-
21
- // Text
22
- --fs-product-card-skeleton-text-margin-bottom : var(--fs-product-card-skeleton-content-margin-top);
23
-
24
- // Badge
25
- --fs-product-card-skeleton-badge-min-height : var(--fs-spacing-5);
26
- --fs-product-card-skeleton-badge-margin-top : var(--fs-product-card-skeleton-text-margin-top);
27
- --fs-product-card-skeleton-badge-max-width : var(--fs-product-card-skeleton-content-height);
28
- --fs-product-card-skeleton-badge-min-width-mobile : 30%;
29
- --fs-product-card-skeleton-badge-min-width-tablet : var(--fs-product-card-skeleton-content-height);
11
+ --fs-product-card-skeleton-gap : var(--fs-spacing-1);
30
12
 
31
13
  // Sectioned
32
- --fs-product-card-skeleton-sectioned-image-min-width : 13rem;
33
- --fs-product-card-skeleton-sectioned-image-height : 12.188rem;
14
+ --fs-product-card-skeleton-sectioned-min-width : 10rem;
34
15
 
35
16
  // Bordered
36
- --fs-product-card-skeleton-bordered-mobile : none;
37
- --fs-product-card-skeleton-bordered-desktop : var(--fs-border-width) solid var(--fs-border-color-light);
17
+ --fs-product-card-skeleton-bordered : var(--fs-border-width) solid var(--fs-border-color-light);
38
18
 
39
19
  // --------------------------------------------------------
40
20
  // Structural Styles
@@ -43,36 +23,24 @@
43
23
  position: relative;
44
24
  display: flex;
45
25
  flex-direction: column;
46
- min-width: 14vw;
47
- height: 100%;
26
+ row-gap: var(--fs-product-card-skeleton-gap);
48
27
  padding: var(--fs-product-card-skeleton-padding);
49
28
  overflow: hidden;
50
- border: var(--fs-product-card-skeleton-border-width) solid var(--fs-product-card-skeleton-border-color);
51
29
  border-radius: var(--fs-product-card-skeleton-border-radius);
52
30
 
53
- @include media(">=notebook") { min-width: 12rem; }
54
-
55
31
  [data-fs-product-card-skeleton-content] {
56
- position: relative;
57
- height: var(--fs-product-card-skeleton-content-height);
58
- margin-top: var(--fs-product-card-skeleton-content-margin-top);
59
-
60
- [data-fs-skeleton-variant="text"] { margin-bottom: var(--fs-product-card-skeleton-text-margin-bottom); }
61
-
62
- [data-fs-skeleton-variant="button"] { margin-top: var(--fs-product-card-skeleton-button-margin-top); }
63
-
64
- [data-fs-skeleton-variant="badge"] {
65
- min-width: var(--fs-product-card-skeleton-badge-min-width-mobile);
32
+ display: flex;
33
+ flex-direction: column;
34
+ row-gap: var(--fs-product-card-skeleton-gap);
35
+ }
66
36
 
67
- @include media(">=notebook") {
68
- min-height: var(--fs-product-card-skeleton-badge-min-height);
69
- margin-top: var(--fs-product-card-skeleton-badge-margin-top);
70
- }
37
+ [data-fs-product-card-skeleton-image] {
38
+ aspect-ratio: var(--fs-product-card-skeleton-image-aspect-ratio);
71
39
 
72
- @include media(">=tablet") {
73
- min-width: var(--fs-product-card-skeleton-badge-min-width-tablet);
74
- max-width: var(--fs-product-card-skeleton-badge-max-width);
75
- }
40
+ [data-fs-skeleton-wrapper],
41
+ [data-fs-skeleton] {
42
+ width: 100%;
43
+ height: 100%;
76
44
  }
77
45
  }
78
46
 
@@ -81,17 +49,10 @@
81
49
  // --------------------------------------------------------
82
50
 
83
51
  &[data-fs-product-card-skeleton-sectioned="true"] {
84
- [data-fs-skeleton-variant="image"] {
85
- min-width: var(--fs-product-card-skeleton-sectioned-image-min-width);
86
- min-height: var(--fs-product-card-skeleton-sectioned-image-height);
87
- }
52
+ min-width: var(--fs-product-card-skeleton-sectioned-min-width);
88
53
  }
89
54
 
90
55
  &[data-fs-product-card-skeleton-bordered="true"] {
91
- border: var(--fs-product-card-skeleton-bordered-mobile);
92
-
93
- @include media(">=notebook") {
94
- border: var(--fs-product-card-skeleton-bordered-desktop);
95
- }
56
+ border: var(--fs-product-card-skeleton-bordered);
96
57
  }
97
58
  }
@@ -7,17 +7,19 @@ import ProductCardSkeleton from '../ProductCardSkeleton'
7
7
 
8
8
  interface ProductGridSkeletonProps {
9
9
  loading?: boolean
10
+ aspectRatio?: number
10
11
  }
11
12
 
12
13
  function ProductGridSkeleton({
13
14
  children,
15
+ aspectRatio,
14
16
  loading = true,
15
17
  }: PropsWithChildren<ProductGridSkeletonProps>) {
16
18
  return loading ? (
17
19
  <ul className={styles.fsProductGrid}>
18
20
  {Array.from({ length: ITEMS_PER_PAGE }, (_, index) => (
19
21
  <li key={String(index)}>
20
- <ProductCardSkeleton bordered />
22
+ <ProductCardSkeleton aspectRatio={aspectRatio} bordered />
21
23
  </li>
22
24
  ))}
23
25
  </ul>
@@ -7,10 +7,12 @@ import ProductCardSkeleton from '../ProductCardSkeleton'
7
7
 
8
8
  interface Props {
9
9
  loading?: boolean
10
+ aspectRatio?: number
10
11
  }
11
12
 
12
13
  function ProductShelfSkeleton({
13
14
  children,
15
+ aspectRatio,
14
16
  loading = true,
15
17
  }: PropsWithChildren<Props>) {
16
18
  return loading ? (
@@ -20,7 +22,7 @@ function ProductShelfSkeleton({
20
22
  >
21
23
  {Array.from({ length: ITEMS_PER_SECTION }, (_, index) => (
22
24
  <li key={String(index)}>
23
- <ProductCardSkeleton sectioned />
25
+ <ProductCardSkeleton aspectRatio={aspectRatio} sectioned />
24
26
  </li>
25
27
  ))}
26
28
  </ul>
@@ -1,44 +1,46 @@
1
- import Skeleton from 'src/components/skeletons/Skeleton'
2
- import Shimmer from 'src/components/skeletons/Shimmer'
1
+ import { Skeleton as UISkeleton } from '@faststore/ui'
3
2
 
4
3
  import styles from './product-tile-skeleton.module.scss'
5
4
 
6
5
  interface ProductTileSkeletonProps {
7
6
  index: number
8
- bordered?: boolean
9
- variant?: 'wide' | 'default'
7
+ aspectRatio?: number
10
8
  }
11
9
 
12
10
  function ProductTileSkeleton({
13
11
  index,
14
- bordered,
15
- variant = 'default',
12
+ aspectRatio = 1,
16
13
  }: ProductTileSkeletonProps) {
17
14
  return (
18
15
  <div
19
16
  data-fs-product-tile-skeleton
20
17
  className={styles.fsProductTileSkeleton}
21
18
  data-fs-product-tile-skeleton-index={index}
22
- data-fs-product-tile-skeleton-variant={variant}
23
- data-fs-product-tile-skeleton-bordered={bordered}
24
19
  >
25
20
  <div
26
21
  data-fs-product-tile-skeleton-image
27
22
  data-fs-product-tile-skeleton-index={index}
23
+ style={
24
+ {
25
+ '--fs-product-tile-skeleton-image-aspect-ratio': aspectRatio,
26
+ } as React.CSSProperties
27
+ }
28
28
  >
29
- <Skeleton variant="image" />
29
+ <UISkeleton size={{ width: 'auto', height: '100%' }} loading={true} />
30
30
  </div>
31
31
  <div
32
32
  data-fs-product-tile-skeleton-content
33
33
  data-fs-product-tile-skeleton-index={index}
34
34
  >
35
- <div
36
- data-fs-product-tile-skeleton-text
37
- data-fs-product-tile-skeleton-index={index}
38
- >
39
- <Skeleton variant="text" />
35
+ <div data-fs-product-tile-skeleton-heading>
36
+ <div
37
+ data-fs-product-tile-skeleton-text
38
+ data-fs-product-tile-skeleton-index={index}
39
+ >
40
+ <UISkeleton size={{ width: '70%', height: '1.5rem' }} />
41
+ </div>
40
42
  <div data-fs-product-tile-skeleton-price>
41
- <Skeleton variant="text" />
43
+ <UISkeleton size={{ width: '60%', height: '1.5rem' }} />
42
44
  </div>
43
45
  </div>
44
46
 
@@ -46,10 +48,9 @@ function ProductTileSkeleton({
46
48
  data-fs-product-tile-skeleton-badge
47
49
  data-fs-product-tile-skeleton-index={index}
48
50
  >
49
- <Skeleton variant="badge" />
51
+ <UISkeleton size={{ width: '6rem', height: '2rem' }} border="pill" />
50
52
  </div>
51
53
  </div>
52
- <Shimmer />
53
54
  </div>
54
55
  )
55
56
  }