@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.
- package/.storybook/storybook.css +1 -0
- package/.turbo/turbo-build.log +50 -0
- package/.turbo/turbo-lint.log +2 -0
- package/@generated/graphql/index.ts +27 -3
- package/@generated/graphql/persisted.json +1 -1
- package/CHANGELOG.md +116 -180
- package/README.md +2 -2
- package/cypress/integration/analytics.test.js +3 -3
- package/cypress/integration/cart.test.js +2 -2
- package/cypress/integration/plp.test.js +8 -8
- package/package.json +8 -9
- package/src/Layout.tsx +1 -1
- package/src/components/cart/CartItem/CartItem.tsx +30 -71
- package/src/components/cart/CartSidebar/CartSidebar.stories.mdx +1 -1
- package/src/components/cart/CartSidebar/CartSidebar.tsx +9 -12
- package/src/components/common/Footer/Footer.tsx +5 -38
- package/src/components/common/Footer/FooterFlags.tsx +23 -0
- package/src/components/common/Footer/footer.module.scss +2 -28
- package/src/components/common/Footer/index.ts +1 -0
- package/src/components/common/Navbar/NavLinks.stories.mdx +1 -1
- package/src/components/common/Navbar/Navbar.stories.mdx +1 -1
- package/src/components/common/Navbar/Navbar.tsx +1 -1
- package/src/components/common/Navbar/NavbarSlider.stories.mdx +1 -1
- package/src/components/common/Navbar/NavbarSlider.tsx +2 -2
- package/src/components/common/Toast/Toast.tsx +1 -1
- package/src/components/product/ProductCard/ProductCard.tsx +44 -59
- package/src/components/product/ProductGrid/ProductGrid.tsx +7 -1
- package/src/components/regionalization/Regionalization.stories.mdx +24 -6
- package/src/components/regionalization/RegionalizationBar/RegionalizationBar.stories.mdx +1 -1
- package/src/components/regionalization/RegionalizationBar/RegionalizationBar.tsx +1 -1
- package/src/components/regionalization/RegionalizationButton/RegionalizationButton.tsx +1 -1
- package/src/components/regionalization/RegionalizationModal/RegionalizationModal.stories.mdx +17 -4
- package/src/components/regionalization/RegionalizationModal/RegionalizationModal.tsx +4 -5
- package/src/components/regionalization/RegionalizationModal/RegionalizationModalContent.tsx +19 -26
- package/src/components/regionalization/RegionalizationModal/regionalization-modal-body.module.scss +25 -0
- package/src/components/search/Filter/Facets.stories.mdx +1 -1
- package/src/components/search/Filter/Filter.stories.mdx +1 -1
- package/src/components/search/Filter/Filter.tsx +1 -1
- package/src/components/search/Filter/FilterSlider.stories.mdx +1 -1
- package/src/components/search/Filter/FilterSlider.tsx +2 -2
- package/src/components/sections/Newsletter/Newsletter.stories.mdx +1 -1
- package/src/components/sections/Newsletter/Newsletter.tsx +1 -1
- package/src/components/sections/ProductDetails/ProductDetails.tsx +2 -2
- package/src/components/sections/ProductGallery/ProductGallery.tsx +18 -18
- package/src/components/sections/ProductShelf/ProductShelf.tsx +10 -2
- package/src/components/sections/ProductTiles/ProductTiles.tsx +2 -2
- package/src/components/skeletons/FilterSkeleton/FilterSkeleton.stories.mdx +1 -1
- package/src/components/skeletons/FilterSkeleton/FilterSkeleton.tsx +20 -8
- package/src/components/skeletons/FilterSkeleton/filter-skeleton.module.scss +2 -2
- package/src/components/skeletons/ProductCardSkeleton/ProductCardSkeleton.stories.mdx +6 -69
- package/src/components/skeletons/ProductCardSkeleton/ProductCardSkeleton.tsx +36 -9
- package/src/components/skeletons/ProductCardSkeleton/product-card-skeleton.module.scss +16 -55
- package/src/components/skeletons/ProductGridSkeleton/ProductGridSkeleton.tsx +3 -1
- package/src/components/skeletons/ProductShelfSkeleton/ProductShelfSkeleton.tsx +3 -1
- package/src/components/skeletons/ProductTilesSkeleton/ProductTileSkeleton/ProductTileSkeleton.tsx +18 -17
- package/src/components/skeletons/ProductTilesSkeleton/ProductTileSkeleton/product-tile-skeleton.module.scss +37 -174
- package/src/components/skeletons/ProductTilesSkeleton/ProductTilesSkeleton.tsx +18 -3
- package/src/components/ui/Gift/Gift.tsx +12 -15
- package/src/components/ui/SlideOver/SlideOver.stories.mdx +2 -2
- package/src/components/ui/SlideOver/SlideOver.tsx +1 -0
- package/src/components/ui/Tiles/Tiles.stories.mdx +1 -3
- package/src/components/ui/Tiles/tiles.module.scss +11 -13
- package/src/components/ui/Toast/Toast.stories.mdx +1 -1
- package/src/components/ui/Toast/Toast.tsx +1 -1
- package/src/pages/_app.tsx +1 -1
- package/src/sdk/cart/index.ts +5 -0
- package/src/sdk/cart/useBuyButton.ts +1 -1
- package/src/sdk/cart/useCartToggleButton.ts +1 -1
- package/src/styles/vendors/include-media.scss +1 -1
- package/tsconfig.json +3 -5
- package/.eslintrc.json +0 -3
- package/.github/CODEOWNERS +0 -2
- package/.github/workflows/release.yml +0 -42
- package/.release-it.json +0 -32
- package/src/components/cart/CartItem/cart-item.module.scss +0 -68
- package/src/components/product/ProductCard/product-card.module.scss +0 -254
- package/src/components/regionalization/RegionalizationModal/regionalization-modal-content.module.scss +0 -79
- package/src/components/skeletons/Shimmer/Shimmer.tsx +0 -11
- package/src/components/skeletons/Shimmer/index.ts +0 -1
- package/src/components/skeletons/Shimmer/shimmer.module.scss +0 -43
- package/src/components/skeletons/Skeleton/Skeleton.tsx +0 -49
- package/src/components/skeletons/Skeleton/index.ts +0 -1
- package/src/components/skeletons/Skeleton/skeleton.module.scss +0 -77
- package/src/components/skeletons/Skeletons.stories.mdx +0 -177
- package/src/components/ui/Modal/Modal.stories.mdx +0 -144
- package/src/components/ui/Modal/Modal.tsx +0 -43
- package/src/components/ui/Modal/index.ts +0 -1
- package/src/components/ui/Modal/modal.module.scss +0 -46
- package/src/components/ui/ProductTitle/ProductTitle.stories.mdx +0 -105
- package/src/components/ui/ProductTitle/ProductTitle.tsx +0 -11
- package/src/components/ui/ProductTitle/index.ts +0 -1
- package/src/components/ui/ProductTitle/product-title.module.scss +0 -48
- package/src/sdk/ui/Provider.tsx +0 -151
- package/src/sdk/ui/useFadeEffect.ts +0 -21
|
@@ -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
|
-
}
|
|
@@ -1,254 +0,0 @@
|
|
|
1
|
-
@import "src/styles/scaffold";
|
|
2
|
-
|
|
3
|
-
.fs-product-card {
|
|
4
|
-
// --------------------------------------------------------
|
|
5
|
-
// Design Tokens for Product Card
|
|
6
|
-
// --------------------------------------------------------
|
|
7
|
-
|
|
8
|
-
// Default properties
|
|
9
|
-
--fs-product-card-padding : var(--fs-spacing-1) var(--fs-spacing-1) var(--fs-spacing-2) var(--fs-spacing-1);
|
|
10
|
-
--fs-product-card-gap : var(--fs-grid-gap-2);
|
|
11
|
-
--fs-product-card-min-width : 10rem;
|
|
12
|
-
|
|
13
|
-
--fs-product-card-shadow : var(--fs-shadow);
|
|
14
|
-
--fs-product-card-shadow-hover : var(--fs-shadow-hover);
|
|
15
|
-
|
|
16
|
-
--fs-product-card-bkg-color : var(--fs-color-body-bkg);
|
|
17
|
-
--fs-product-card-bkg-color-hover : var(--fs-product-card-bkg-color);
|
|
18
|
-
--fs-product-card-bkg-color-focus : var(--fs-product-card-bkg-color-hover);
|
|
19
|
-
|
|
20
|
-
--fs-product-card-border-radius : var(--fs-border-radius);
|
|
21
|
-
--fs-product-card-border-width : var(--fs-border-width);
|
|
22
|
-
--fs-product-card-border-color : var(--fs-border-color-light);
|
|
23
|
-
--fs-product-card-border-color-hover : var(--fs-border-color-hover);
|
|
24
|
-
|
|
25
|
-
--fs-product-card-transition-function : var(--fs-transition-function);
|
|
26
|
-
--fs-product-card-transition-property : var(--fs-transition-property);
|
|
27
|
-
--fs-product-card-transition-timing : var(--fs-transition-timing);
|
|
28
|
-
|
|
29
|
-
// Content
|
|
30
|
-
--fs-product-card-content-padding : var(--fs-spacing-2) 0 0 0;
|
|
31
|
-
|
|
32
|
-
// Image
|
|
33
|
-
--fs-product-card-img-radius : var(--fs-product-card-border-radius);
|
|
34
|
-
--fs-product-card-img-scale-hover : 1;
|
|
35
|
-
|
|
36
|
-
// Title
|
|
37
|
-
--fs-product-card-title-color : var(--fs-color-text);
|
|
38
|
-
--fs-product-card-title-size : var(--fs-text-size-base);
|
|
39
|
-
--fs-product-card-title-weight : var(--fs-text-weight-regular);
|
|
40
|
-
--fs-product-card-title-max-lines : var(--fs-text-max-lines);
|
|
41
|
-
|
|
42
|
-
// Price
|
|
43
|
-
--fs-product-card-price-color : var(--fs-color-text);
|
|
44
|
-
--fs-product-card-price-size : var(--fs-text-size-base);
|
|
45
|
-
--fs-product-card-price-listing-color : var(--fs-color-text-light);
|
|
46
|
-
--fs-product-card-price-listing-size : var(--fs-text-size-legend);
|
|
47
|
-
|
|
48
|
-
// Description
|
|
49
|
-
--fs-product-card-description-color : var(--fs-color-text);
|
|
50
|
-
--fs-product-card-description-size : var(--fs-text-size-legend);
|
|
51
|
-
|
|
52
|
-
// Subtitle
|
|
53
|
-
--fs-product-card-subtitle-color : var(--fs-color-text-light);
|
|
54
|
-
--fs-product-card-subtitle-size : var(--fs-text-size-tiny);
|
|
55
|
-
|
|
56
|
-
// Wide
|
|
57
|
-
--fs-product-card-wide-padding : 0;
|
|
58
|
-
--fs-product-card-wide-content-padding : var(--fs-spacing-2);
|
|
59
|
-
--fs-product-card-wide-bkg-color : var(--fs-color-neutral-bkg);
|
|
60
|
-
--fs-product-card-wide-min-width : 9rem;
|
|
61
|
-
|
|
62
|
-
// --------------------------------------------------------
|
|
63
|
-
// Structural Styles
|
|
64
|
-
// --------------------------------------------------------
|
|
65
|
-
|
|
66
|
-
position: relative;
|
|
67
|
-
display: grid;
|
|
68
|
-
grid-template-rows: minmax(0, max-content);
|
|
69
|
-
grid-auto-flow: row;
|
|
70
|
-
min-width: var(--fs-product-card-min-width);
|
|
71
|
-
height: 100%;
|
|
72
|
-
padding: var(--fs-product-card-padding);
|
|
73
|
-
background-color: var(--fs-product-card-bkg-color);
|
|
74
|
-
border: var(--fs-product-card-border-width) solid transparent;
|
|
75
|
-
border-radius: var(--fs-product-card-border-radius);
|
|
76
|
-
box-shadow: var(--fs-product-card-shadow);
|
|
77
|
-
transition: var(--fs-product-card-transition-property) var(--fs-product-card-transition-timing) var(--fs-product-card-transition-function);
|
|
78
|
-
|
|
79
|
-
&:focus-within {
|
|
80
|
-
@include focus-ring;
|
|
81
|
-
|
|
82
|
-
background-color: var(--fs-product-card-bkg-color-focus);
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
@media (hover: hover) {
|
|
86
|
-
&:hover {
|
|
87
|
-
background-color: var(--fs-product-card-bkg-color-hover);
|
|
88
|
-
border-color: var(--fs-product-card-border-color-hover);
|
|
89
|
-
box-shadow: var(--fs-product-card-shadow-hover);
|
|
90
|
-
[data-fs-product-card-image] img { transform: scale(var(--fs-product-card-img-scale-hover)); }
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
[data-fs-product-card-image] {
|
|
95
|
-
position: relative;
|
|
96
|
-
display: flex;
|
|
97
|
-
justify-content: center;
|
|
98
|
-
overflow: hidden;
|
|
99
|
-
border-radius: var(--fs-product-card-img-radius);
|
|
100
|
-
|
|
101
|
-
img {
|
|
102
|
-
transition: var(--fs-product-card-transition-property) var(--fs-product-card-transition-timing) var(--fs-product-card-transition-function);
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
[data-fs-product-card-content] {
|
|
107
|
-
display: grid;
|
|
108
|
-
grid-template-rows: 1fr auto;
|
|
109
|
-
padding: var(--fs-product-card-content-padding);
|
|
110
|
-
|
|
111
|
-
[data-fs-link] {
|
|
112
|
-
min-height: 100%;
|
|
113
|
-
padding: 0;
|
|
114
|
-
color: var(--fs-product-card-title-color);
|
|
115
|
-
text-decoration: none;
|
|
116
|
-
outline: none;
|
|
117
|
-
|
|
118
|
-
&::after {
|
|
119
|
-
position: absolute;
|
|
120
|
-
top: 0;
|
|
121
|
-
right: 0;
|
|
122
|
-
bottom: 0;
|
|
123
|
-
left: 0;
|
|
124
|
-
display: block;
|
|
125
|
-
content: "";
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
[data-fs-badge],
|
|
130
|
-
[data-fs-product-card-actions] { margin-top: var(--fs-spacing-2); }
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
[data-fs-product-card-actions] {
|
|
134
|
-
display: flex;
|
|
135
|
-
align-items: flex-end;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
[data-fs-product-card-title] {
|
|
139
|
-
font-size: var(--fs-product-card-title-size);
|
|
140
|
-
font-weight: var(--fs-product-card-title-weight);
|
|
141
|
-
line-height: 1.25;
|
|
142
|
-
color: var(--fs-product-card-title-color);
|
|
143
|
-
|
|
144
|
-
@include truncate-title(var(--fs-product-card-title-max-lines));
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
[data-fs-product-card-prices] {
|
|
148
|
-
display: inline-flex;
|
|
149
|
-
align-content: center;
|
|
150
|
-
|
|
151
|
-
[data-variant="spot"] {
|
|
152
|
-
font-size: var(--fs-product-card-price-size);
|
|
153
|
-
color: var(--fs-product-card-price-color);
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
[data-variant="listing"] {
|
|
157
|
-
font-size: var(--fs-product-card-price-listing-size);
|
|
158
|
-
color: var(--fs-product-card-price-listing-color);
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
[data-fs-product-card-footer] {
|
|
163
|
-
display: flex;
|
|
164
|
-
gap: var(--fs-product-card-gap);
|
|
165
|
-
align-items: center;
|
|
166
|
-
justify-content: space-between;
|
|
167
|
-
margin-top: var(--fs-product-card-gap);
|
|
168
|
-
|
|
169
|
-
small {
|
|
170
|
-
display: block;
|
|
171
|
-
font-size: var(--fs-product-card-subtitle-size);
|
|
172
|
-
color: var(--fs-product-card-subtitle-color);
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
// --------------------------------------------------------
|
|
177
|
-
// Variants Styles
|
|
178
|
-
// --------------------------------------------------------
|
|
179
|
-
|
|
180
|
-
&[data-fs-product-card-bordered="true"] {
|
|
181
|
-
border: var(--fs-product-card-border-width) solid var(--fs-product-card-border-color);
|
|
182
|
-
|
|
183
|
-
@media (hover: hover) {
|
|
184
|
-
&:hover {
|
|
185
|
-
border-color: var(--fs-product-card-border-color-hover);
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
&[data-fs-product-card-variant="wide"] {
|
|
191
|
-
--fs-product-card-padding : var(--fs-product-card-wide-padding);
|
|
192
|
-
--fs-product-card-content-padding : var(--fs-product-card-wide-content-padding);
|
|
193
|
-
--fs-product-card-bkg-color : var(--fs-product-card-wide-bkg-color);
|
|
194
|
-
--fs-product-card-min-width : var(--fs-product-card-wide-min-width);
|
|
195
|
-
|
|
196
|
-
grid-template-rows: 1fr auto;
|
|
197
|
-
|
|
198
|
-
@include media(">=tablet") {
|
|
199
|
-
grid-template-rows: 5fr 2fr;
|
|
200
|
-
|
|
201
|
-
&[data-fs-product-card-actionable="true"] {
|
|
202
|
-
grid-template-rows: 10fr 7fr;
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
@include media(">=notebook") {
|
|
207
|
-
&[data-fs-product-card-actionable="true"] {
|
|
208
|
-
grid-template-rows: 6fr 3fr;
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
grid-template-rows: 4fr 1fr;
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
[data-fs-product-card-content] {
|
|
215
|
-
@include media(">=notebook") {
|
|
216
|
-
display: grid;
|
|
217
|
-
grid-template-rows: auto;
|
|
218
|
-
grid-template-columns: 1fr auto;
|
|
219
|
-
gap: var(--fs-product-card-gap);
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
[data-product-card-image] {
|
|
224
|
-
border-radius: 0;
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
[data-fs-badge] {
|
|
228
|
-
@include media(">=notebook") {
|
|
229
|
-
grid-row: 1;
|
|
230
|
-
grid-column: 2;
|
|
231
|
-
margin-top: 0;
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
&[data-fs-product-card-variant="horizontal"] {
|
|
237
|
-
grid-template-rows: auto;
|
|
238
|
-
grid-template-columns: 40% 1fr;
|
|
239
|
-
grid-auto-flow: column;
|
|
240
|
-
gap: var(--fs-product-card-gap);
|
|
241
|
-
min-width: calc(var(--fs-product-card-min-width) * 1.5);
|
|
242
|
-
|
|
243
|
-
[data-product-card-image] { grid-row: span 2; }
|
|
244
|
-
|
|
245
|
-
[data-fs-product-card-content] {
|
|
246
|
-
display: grid;
|
|
247
|
-
grid-row: 1;
|
|
248
|
-
gap: calc(var(--fs-product-card-gap) / 2);
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
[data-fs-badge] { align-self: end; }
|
|
252
|
-
[data-fs-product-card-prices] { margin-bottom: 0; }
|
|
253
|
-
}
|
|
254
|
-
}
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
.fs-regionalization-modal-content {
|
|
2
|
-
// --------------------------------------------------------
|
|
3
|
-
// Design Tokens for Regionalization Modal
|
|
4
|
-
// --------------------------------------------------------
|
|
5
|
-
|
|
6
|
-
// Default properties
|
|
7
|
-
--fs-regionalization-modal-padding : var(--fs-spacing-1) var(--fs-spacing-4) var(--fs-spacing-5);
|
|
8
|
-
--fs-regionalization-modal-background-color : var(--fs-color-body-bkg);
|
|
9
|
-
--fs-regionalization-modal-border-radius : var(--fs-border-radius);
|
|
10
|
-
|
|
11
|
-
// Header
|
|
12
|
-
--fs-regionalization-modal-header-padding : var(--fs-spacing-4) var(--fs-spacing-7) var(--fs-spacing-4) var(--fs-spacing-4);
|
|
13
|
-
|
|
14
|
-
// Title
|
|
15
|
-
--fs-regionalization-modal-title-margin-bottom : .625rem;
|
|
16
|
-
--fs-regionalization-modal-title-size : var(--fs-text-size-lead);
|
|
17
|
-
--fs-regionalization-modal-title-weight : var(--fs-text-weight-bold);
|
|
18
|
-
--fs-regionalization-modal-title-line-height : 1.2;
|
|
19
|
-
|
|
20
|
-
// Description
|
|
21
|
-
--fs-regionalization-modal-description-size : var(--fs-text-size-body);
|
|
22
|
-
--fs-regionalization-modal-description-line-height : 1.5;
|
|
23
|
-
--fs-regionalization-modal-description-color : var(--fs-color-text-light);
|
|
24
|
-
|
|
25
|
-
// Close Button
|
|
26
|
-
--fs-regionalization-modal-close-button-position-top : 0;
|
|
27
|
-
--fs-regionalization-modal-close-button-position-right : 0;
|
|
28
|
-
|
|
29
|
-
// Link
|
|
30
|
-
--fs-regionalization-modal-link-padding : 0;
|
|
31
|
-
--fs-regionalization-modal-link-color : var(--fs-color-link);
|
|
32
|
-
--fs-regionalization-modal-link-margin-right : var(--fs-spacing-0);
|
|
33
|
-
|
|
34
|
-
position: relative;
|
|
35
|
-
background-color: var(--fs-regionalization-modal-background-color);
|
|
36
|
-
border-radius: var(--fs-regionalization-modal-border-radius);
|
|
37
|
-
|
|
38
|
-
[data-fs-regionalization-modal-header] {
|
|
39
|
-
padding: var(--fs-regionalization-modal-header-padding);
|
|
40
|
-
|
|
41
|
-
[data-fs-regionalization-modal-title] {
|
|
42
|
-
margin-bottom: var(--fs-regionalization-modal-title-margin-bottom);
|
|
43
|
-
font-size: var(--fs-regionalization-modal-title-size);
|
|
44
|
-
font-weight: var(--fs-regionalization-modal-title-weight);
|
|
45
|
-
line-height: var(--fs-regionalization-modal-title-line-height);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
[data-fs-regionalization-modal-description] {
|
|
49
|
-
font-size: var(--fs-regionalization-modal-description-size);
|
|
50
|
-
line-height: var(--fs-regionalization-modal-description-line-height);
|
|
51
|
-
color: var(--fs-regionalization-modal-description-color);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
[data-fs-regionalization-modal-button] {
|
|
55
|
-
position: absolute;
|
|
56
|
-
top: var(--fs-regionalization-modal-close-button-position-top);
|
|
57
|
-
right: var(--fs-regionalization-modal-close-button-position-right);
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
[data-fs-regionalization-modal-body] {
|
|
62
|
-
padding: var(--fs-regionalization-modal-padding);
|
|
63
|
-
|
|
64
|
-
[data-fs-regionalization-modal-input] {
|
|
65
|
-
margin-bottom: var(--fs-spacing-6);
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
[data-fs-regionalization-modal-link] {
|
|
69
|
-
display: flex;
|
|
70
|
-
flex-direction: row;
|
|
71
|
-
align-content: flex-start;
|
|
72
|
-
align-items: center;
|
|
73
|
-
justify-content: flex-start;
|
|
74
|
-
padding: var(--fs-regionalization-modal-link-padding);
|
|
75
|
-
margin-right: var(--fs-regionalization-modal-link-margin-right);
|
|
76
|
-
color: var(--fs-regionalization-modal-link-color);
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from './Shimmer'
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
.fs-shimmer {
|
|
2
|
-
// --------------------------------------------------------
|
|
3
|
-
// Design Tokens for Shimmer
|
|
4
|
-
// --------------------------------------------------------
|
|
5
|
-
|
|
6
|
-
// Default properties
|
|
7
|
-
--fs-shimmer-wrapper-transition-timing : 850ms;
|
|
8
|
-
--fs-shimmer-wrapper-transition-function : linear;
|
|
9
|
-
--fs-shimmer-wrapper-transition-iteration : infinite;
|
|
10
|
-
|
|
11
|
-
// Shimmer
|
|
12
|
-
--fs-shimmer-width : 50%;
|
|
13
|
-
--fs-shimmer-height : 100%;
|
|
14
|
-
--fs-shimmer-bkg-color : rgb(255 255 255 / 20%);
|
|
15
|
-
--fs-shimmer-box-shadow : 0 0 var(--fs-spacing-5) var(--fs-spacing-5) rgb(255 255 255 / 20%);
|
|
16
|
-
|
|
17
|
-
// --------------------------------------------------------
|
|
18
|
-
// Structural Styles
|
|
19
|
-
// --------------------------------------------------------
|
|
20
|
-
|
|
21
|
-
/*
|
|
22
|
-
* Parent must have `position: relative` and `overflow: hidden`
|
|
23
|
-
* in order to the effect to work properly.
|
|
24
|
-
*/
|
|
25
|
-
position: absolute;
|
|
26
|
-
top: 0;
|
|
27
|
-
left: 0;
|
|
28
|
-
width: 100vw;
|
|
29
|
-
height: 100%;
|
|
30
|
-
animation: loading var(--fs-shimmer-wrapper-transition-timing) var(--fs-shimmer-wrapper-transition-iteration) var(--fs-shimmer-wrapper-transition-function);
|
|
31
|
-
|
|
32
|
-
[data-fs-shimmer] {
|
|
33
|
-
width: var(--fs-shimmer-width);
|
|
34
|
-
height: var(--fs-shimmer-height);
|
|
35
|
-
background: var(--fs-shimmer-bkg-color);
|
|
36
|
-
box-shadow: var(--fs-shimmer-box-shadow);
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
@keyframes loading {
|
|
41
|
-
0% { transform: translate3d(-50vw, 0, 0); }
|
|
42
|
-
100% { transform: translate3d(0, 0, 0); }
|
|
43
|
-
}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import type { PropsWithChildren } from 'react'
|
|
2
|
-
import { Skeleton as UISkeleton } from '@faststore/ui'
|
|
3
|
-
|
|
4
|
-
import Shimmer from '../Shimmer'
|
|
5
|
-
import styles from './skeleton.module.scss'
|
|
6
|
-
|
|
7
|
-
type Variant = 'text' | 'button' | 'image' | 'badge'
|
|
8
|
-
|
|
9
|
-
interface SkeletonProps {
|
|
10
|
-
/**
|
|
11
|
-
* Control whether skeleton should be visible or not.
|
|
12
|
-
*/
|
|
13
|
-
loading?: boolean
|
|
14
|
-
/**
|
|
15
|
-
* Control whether the shimmer effect should be displayed or not.
|
|
16
|
-
*/
|
|
17
|
-
shimmer?: boolean
|
|
18
|
-
/**
|
|
19
|
-
* Specifies the skeleton element variant.
|
|
20
|
-
*/
|
|
21
|
-
variant: Variant
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
function Skeleton({
|
|
25
|
-
variant,
|
|
26
|
-
children,
|
|
27
|
-
loading = true,
|
|
28
|
-
shimmer = false,
|
|
29
|
-
...otherProps
|
|
30
|
-
}: PropsWithChildren<SkeletonProps>) {
|
|
31
|
-
return loading ? (
|
|
32
|
-
<div
|
|
33
|
-
data-fs-skeleton-wrapper
|
|
34
|
-
className={styles.fsSkeleton}
|
|
35
|
-
data-fs-skeleton-shimmer={shimmer}
|
|
36
|
-
>
|
|
37
|
-
<UISkeleton
|
|
38
|
-
data-fs-skeleton
|
|
39
|
-
data-fs-skeleton-variant={variant}
|
|
40
|
-
{...otherProps}
|
|
41
|
-
/>
|
|
42
|
-
{shimmer && <Shimmer />}
|
|
43
|
-
</div>
|
|
44
|
-
) : (
|
|
45
|
-
<>{children}</>
|
|
46
|
-
)
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
export default Skeleton
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from './Skeleton'
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
@import "src/styles/scaffold";
|
|
2
|
-
|
|
3
|
-
.fs-skeleton {
|
|
4
|
-
// --------------------------------------------------------
|
|
5
|
-
// Design Tokens for Skeleton
|
|
6
|
-
// --------------------------------------------------------
|
|
7
|
-
|
|
8
|
-
// Default properties
|
|
9
|
-
--fs-skeleton-bkg-color : var(--fs-color-disabled-bkg);
|
|
10
|
-
--fs-skeleton-border-radius : var(--fs-border-radius);
|
|
11
|
-
|
|
12
|
-
// Text
|
|
13
|
-
--fs-skeleton-text-width : 100%;
|
|
14
|
-
--fs-skeleton-text-height : var(--fs-spacing-4);
|
|
15
|
-
|
|
16
|
-
// Button
|
|
17
|
-
--fs-skeleton-button-width : var(--fs-spacing-13);
|
|
18
|
-
--fs-skeleton-button-height : var(--fs-spacing-5);
|
|
19
|
-
--fs-skeleton-button-gap : var(--fs-spacing-2);
|
|
20
|
-
--fs-skeleton-button-border-radius : var(--fs-skeleton-border-radius);
|
|
21
|
-
|
|
22
|
-
// Image
|
|
23
|
-
--fs-skeleton-image-height-mobile : 45vw;
|
|
24
|
-
--fs-skeleton-image-height-desktop : 12.188rem;
|
|
25
|
-
--fs-skeleton-image-border-radius : var(--fs-skeleton-border-radius);
|
|
26
|
-
|
|
27
|
-
// Badge
|
|
28
|
-
--fs-skeleton-badge-width : 40%;
|
|
29
|
-
--fs-skeleton-badge-height : var(--fs-spacing-5);
|
|
30
|
-
--fs-skeleton-badge-border-radius : var(--fs-border-radius-pill);
|
|
31
|
-
|
|
32
|
-
// --------------------------------------------------------
|
|
33
|
-
// Structural Styles
|
|
34
|
-
// --------------------------------------------------------
|
|
35
|
-
|
|
36
|
-
&[data-fs-skeleton-shimmer="true"] {
|
|
37
|
-
position: relative;
|
|
38
|
-
overflow: hidden;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
[data-fs-skeleton] {
|
|
42
|
-
overflow: hidden;
|
|
43
|
-
background: var(--fs-skeleton-bkg-color);
|
|
44
|
-
border-radius: var(--fs-skeleton-border-radius);
|
|
45
|
-
|
|
46
|
-
// --------------------------------------------------------
|
|
47
|
-
// Variants Styles
|
|
48
|
-
// --------------------------------------------------------
|
|
49
|
-
|
|
50
|
-
&[data-fs-skeleton-variant="text"] {
|
|
51
|
-
width: var(--fs-skeleton-text-width);
|
|
52
|
-
height: var(--fs-skeleton-text-height);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
&[data-fs-skeleton-variant="button"] {
|
|
56
|
-
column-gap: var(--fs-skeleton-button-gap);
|
|
57
|
-
width: var(--fs-skeleton-button-width);
|
|
58
|
-
height: var(--fs-skeleton-button-height);
|
|
59
|
-
border-radius: var(--fs-skeleton-button-border-radius);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
&[data-fs-skeleton-variant="image"] {
|
|
63
|
-
height: var(--fs-skeleton-image-height-mobile);
|
|
64
|
-
border-radius: var(--fs-skeleton-image-border-radius);
|
|
65
|
-
|
|
66
|
-
@include media(">=notebook") {
|
|
67
|
-
height: var(--fs-skeleton-image-height-desktop);
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
&[data-fs-skeleton-variant="badge"] {
|
|
72
|
-
width: var(--fs-skeleton-badge-width);
|
|
73
|
-
height: var(--fs-skeleton-badge-height);
|
|
74
|
-
border-radius: var(--fs-skeleton-badge-border-radius);
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
}
|