@faststore/ui 3.70.2 → 3.80.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@faststore/ui",
3
- "version": "3.70.2",
3
+ "version": "3.80.0",
4
4
  "description": "A lightweight, framework agnostic component library for React",
5
5
  "author": "emersonlaurentino",
6
6
  "license": "MIT",
@@ -47,7 +47,7 @@
47
47
  }
48
48
  ],
49
49
  "dependencies": {
50
- "@faststore/components": "^3.70.2",
50
+ "@faststore/components": "^3.80.0",
51
51
  "include-media": "^1.4.10",
52
52
  "modern-normalize": "^1.1.0",
53
53
  "react-swipeable": "^7.0.0",
@@ -70,5 +70,5 @@
70
70
  "volta": {
71
71
  "extends": "../../package.json"
72
72
  },
73
- "gitHead": "9388d1dd171b76fa3ccb77ec3a5327b2ca9a01fc"
73
+ "gitHead": "1b4a2efd041bfbd78d6848e5da407d1fe0d3c66b"
74
74
  }
@@ -82,6 +82,10 @@
82
82
  }
83
83
  }
84
84
 
85
+ [data-fs-product-comparison-dropdown-menu-content] [data-fs-dropdown-item] {
86
+ border-bottom: none;
87
+ }
88
+
85
89
  // --------------------------------------------------------
86
90
  // Variants Styles
87
91
  // --------------------------------------------------------
@@ -0,0 +1,413 @@
1
+ [data-fs-product-comparison-toolbar] {
2
+ // Design Tokens for Product Comparison Toolbar
3
+ // --------------------------------------------------------
4
+
5
+ // Default properties
6
+
7
+ // Shadow
8
+ --fs-product-comparison-box-shadow: var(--fs-shadow-darker);
9
+
10
+ // Background
11
+ --fs-product-comparison-bkg-color: var(--fs-color-body-bkg);
12
+ --fs-product-comparison-bkg-color-neutral: var(--fs-color-neutral-1);
13
+
14
+ // Text
15
+ --fs-product-comparison-text-weight: var(--fs-text-weight-light);
16
+ --fs-product-comparison-text-color: var(--fs-border-color-light);
17
+
18
+ // --------------------------------------------------------
19
+ // Structural Styles
20
+ // --------------------------------------------------------
21
+
22
+ position: fixed;
23
+ bottom: 0;
24
+ z-index: var(--fs-z-index-highest);
25
+ display: grid;
26
+ grid-template-columns: 1fr auto;
27
+ width: 100%;
28
+ padding: var(--fs-spacing-2);
29
+ background-color: var(--fs-product-comparison-bkg-color);
30
+ box-shadow: var(--fs-product-comparison-box-shadow);
31
+
32
+ [data-fs-product-comparison-toolbar-image] {
33
+ display: flex;
34
+ gap: var(--fs-spacing-1);
35
+ margin-bottom: var(--fs-spacing-1);
36
+
37
+ img {
38
+ width: var(--fs-spacing-8);
39
+ height: var(--fs-spacing-8);
40
+ resize: both;
41
+ border-radius: var(--fs-border-radius);
42
+ }
43
+
44
+ [data-fs-product-comparison-toolbar-image-more] {
45
+ display: flex;
46
+ align-items: center;
47
+ justify-content: center;
48
+ width: var(--fs-spacing-8);
49
+ height: var(--fs-spacing-8);
50
+ background-color: #f5f5f5;
51
+ }
52
+ }
53
+
54
+ [data-fs-product-comparison-selection-warning-label] {
55
+ display: flex;
56
+ align-items: center;
57
+ color: var(--fs-color-disabled-text);
58
+ }
59
+
60
+ @include media("<notebook") {
61
+ [data-fs-button] {
62
+ &[data-fs-button-variant="primary"],
63
+ &[data-fs-button-variant="tertiary"] {
64
+ font-size: var(--fs-text-size-1);
65
+ }
66
+
67
+ &[data-fs-button-variant="primary"] {
68
+ grid-row: 2;
69
+ grid-column: 1 / -1;
70
+ width: 100%;
71
+ }
72
+ }
73
+ }
74
+
75
+ @include media(">notebook") {
76
+ display: flex;
77
+ gap: var(--fs-spacing-2);
78
+ align-items: center;
79
+ justify-content: space-between;
80
+ padding: var(--fs-spacing-3) var(--fs-spacing-8);
81
+
82
+ [data-fs-product-comparison-toolbar-image] {
83
+ display: flex;
84
+ gap: var(--fs-spacing-2);
85
+ justify-self: left;
86
+ margin-right: auto;
87
+ }
88
+ }
89
+ }
90
+
91
+ [data-fs-product-comparison-sidebar] {
92
+ // --------------------------------------------------------
93
+ // Design Tokens for Product Comparison Sidebar
94
+ // --------------------------------------------------------
95
+
96
+ // Default properties
97
+
98
+ // Background
99
+ --fs-product-comparison-bkg-color: var(--fs-color-body-bkg);
100
+
101
+ // Title
102
+ --fs-product-comparison-title-size: var(--fs-text-size-6);
103
+ --fs-product-comparison-title-weight: var(--fs-text-weight-semibold);
104
+
105
+ // Spacing
106
+ --fs-product-comparison-padding: var(--fs-spacing-8);
107
+
108
+ // Partial
109
+ --fs-product-comparison-slide-over-partial-gap: calc(2 * var(--fs-grid-padding));
110
+ --fs-product-comparison-slide-over-partial-width-mobile: calc(100vw - var(--fs-slide-over-partial-gap));
111
+ --fs-product-comparison-slide-over-partial-width-notebook: calc(100% / 3);
112
+ --fs-product-comparison-slide-over-partial-max-width-notebook: calc(var(--fs-grid-breakpoint-notebook) / 3);
113
+
114
+ // --------------------------------------------------------
115
+ // Structural Styles
116
+ // --------------------------------------------------------
117
+
118
+ display: flex;
119
+ flex-direction: column;
120
+
121
+ &[data-fs-slide-over] {
122
+ padding: var(--fs-spacing-1);
123
+
124
+ [data-fs-slide-over-header] {
125
+ [data-fs-product-comparison-sidebar-header-title] {
126
+ padding: 0;
127
+ font-size: var(--fs-text-size-3);
128
+ font-weight: var(--fs-text-weight-semibold);
129
+ text-align: left;
130
+ letter-spacing: -0.04em;
131
+ }
132
+
133
+ div {
134
+ display: flex;
135
+ gap: var(--fs-spacing-2);
136
+ align-items: center;
137
+ }
138
+ }
139
+
140
+ &[data-fs-slide-over-size="partial"] {
141
+ width: 100vw;
142
+ }
143
+
144
+ [data-fs-product-comparison-filters] {
145
+ display: none;
146
+ }
147
+
148
+ [data-fs-table] {
149
+ max-width: 100%;
150
+ overflow: auto;
151
+
152
+ [data-fs-table-content] {
153
+ width: 100%;
154
+ }
155
+
156
+ [data-fs-table-head] {
157
+ [data-fs-table-row] {
158
+ display: flex;
159
+ gap: var(--fs-spacing-3);
160
+
161
+ [data-fs-table-cell] {
162
+ display: flex;
163
+ flex-direction: column;
164
+ gap: var(--fs-spacing-1);
165
+ justify-content: space-between;
166
+ width: 12.5rem; // 200px -> 12.5rem
167
+ }
168
+ }
169
+ }
170
+
171
+ [data-fs-table-body] {
172
+ display: flex;
173
+ flex-direction: column;
174
+ width: 100%;
175
+ padding: 0;
176
+ margin-top: var(--fs-spacing-3);
177
+ border-top: var(--fs-border-width) solid var(--fs-border-color-light);
178
+
179
+ @include media(">tablet") {
180
+ width: 100%;
181
+ }
182
+
183
+ [data-fs-table-row] {
184
+ display: flex;
185
+ gap: var(--fs-spacing-2);
186
+ border-bottom: var(--fs-border-width) solid var(--fs-border-color-light);
187
+
188
+ [data-fs-table-cell] {
189
+ width: 12.5rem;
190
+ padding: var(--fs-spacing-3) 0;
191
+ color: var(--fs-color-text-light);
192
+
193
+ [data-fs-product-comparison-row-header-button] {
194
+ display: flex;
195
+ align-items: center;
196
+ justify-content: space-between;
197
+ width: 100%;
198
+ margin-bottom: var(--fs-spacing-0);
199
+ padding: 0;
200
+
201
+ [data-fs-button-wrapper] {
202
+ width: 100%;
203
+ display: flex;
204
+ flex-direction: row;
205
+ flex-wrap: wrap;
206
+ justify-content: space-between;
207
+ text-align: start;
208
+ padding: 0;
209
+ padding-right: var(--fs-spacing-1);
210
+ }
211
+ }
212
+
213
+ [data-fs-product-comparison-row-header-button-title] {
214
+ font-size: var(--fs-text-size-3);
215
+ font-weight: var(--fs-text-weight-medium);
216
+ color: var(--fs-color-text);
217
+ line-height: 1.7;
218
+ }
219
+
220
+ [data-fs-product-comparison-row-header-button-description] {
221
+ font-size: var(--fs-text-size-2);
222
+ font-weight: var(--fs-text-weight-regular);
223
+ color: var(--fs-color-text-light);
224
+ line-height: 1.25;
225
+ }
226
+
227
+ [data-fs-product-comparison-row-label] {
228
+ display: block;
229
+ margin-bottom: var(--fs-spacing-1);
230
+ font-size: var(--fs-text-size-1);
231
+ }
232
+
233
+ [data-fs-product-comparison-row-text] {
234
+ font-size: var(--fs-text-size-2);
235
+ font-weight: var(--fs-text-weight-medium);
236
+ color: var(--fs-color-text);
237
+ }
238
+ }
239
+
240
+ &[data-fs-product-comparison-row-header] {
241
+ margin-top: var(--fs-spacing-4);
242
+ margin-bottom: var(--fs-spacing-2);
243
+ border-bottom: 0;
244
+
245
+ [data-fs-table-cell] {
246
+ width: 100%;
247
+ padding: 0;
248
+ }
249
+ }
250
+ }
251
+ }
252
+ }
253
+ }
254
+
255
+ @include media(">notebook") {
256
+ display: flex;
257
+ flex-direction: column;
258
+ padding: var(--fs-spacing-6) var(--fs-spacing-8);
259
+
260
+ &[data-fs-slide-over] {
261
+ [data-fs-slide-over-header] {
262
+ padding: var(--fs-spacing-1) 0;
263
+ font-size: var(--fs-product-comparison-title-size);
264
+ font-weight: var(--fs-product-comparison-title-weight);
265
+ }
266
+
267
+ &[data-fs-slide-over-size="partial"] {
268
+ width: calc(100vw - 10vw);
269
+ max-width: calc(100vw - 10vw);
270
+ padding: var(--fs-spacing-5) var(--fs-spacing-8);
271
+ }
272
+
273
+ [data-fs-dropdown-button] {
274
+ display: none;
275
+ }
276
+
277
+ [data-fs-product-comparison-filters] {
278
+ display: flex;
279
+ gap: var(--fs-spacing-4);
280
+ padding-bottom: var(--fs-spacing-4);
281
+ margin-bottom: var(--fs-spacing-3);
282
+
283
+ [data-fs-toggle-field] {
284
+ flex-direction: row-reverse;
285
+
286
+ [data-fs-label] {
287
+ margin-right: var(--fs-spacing-1);
288
+ margin-left: 0;
289
+ }
290
+ }
291
+
292
+ [data-fs-product-comparison-container] {
293
+ display: flex;
294
+ align-items: center;
295
+
296
+ [data-fs-product-comparison-filters-sort-label] {
297
+ margin-right: var(--fs-spacing-1);
298
+ font-size: var(--fs-text-size-2);
299
+ font-weight: var(--fs-product-comparison-text-weight);
300
+ }
301
+ }
302
+ }
303
+
304
+ [data-fs-table] {
305
+ [data-fs-table-head] {
306
+ [data-fs-table-row] {
307
+ display: flex;
308
+ gap: var(--fs-spacing-3);
309
+
310
+ [data-fs-table-cell] {
311
+ [data-fs-product-card-heading] {
312
+ display: flex;
313
+ flex-direction: column;
314
+ align-items: flex-start;
315
+ justify-content: flex-start;
316
+ }
317
+ }
318
+ }
319
+ }
320
+
321
+ [data-fs-table-body] {
322
+ width: 100%;
323
+
324
+ [data-fs-table-row] {
325
+ display: flex;
326
+ gap: var(--fs-spacing-3);
327
+ min-width: 80vw;
328
+
329
+ [data-fs-table-cell] {
330
+ width: 12.5rem;
331
+
332
+ [data-fs-product-comparison-row-header-button] {
333
+ margin-bottom: var(--fs-spacing-1);
334
+ font-size: var(--fs-text-size-3);
335
+ }
336
+ }
337
+ }
338
+ }
339
+ }
340
+ }
341
+ }
342
+ }
343
+
344
+ [data-fs-product-comparison-dropdown-button] {
345
+ @include media(">notebook") {
346
+ display: none;
347
+ }
348
+ }
349
+
350
+ [data-fs-product-comparison-dropdown-menu-content] {
351
+ z-index: var(--fs-z-index-highest);
352
+ margin: var(--fs-spacing-0) 0 var(--fs-spacing-2);
353
+ background-color: var(--fs-color-tertiary-bkg-light);
354
+ box-shadow: var(--fs-shadow-hover);
355
+
356
+ [data-fs-dropdown-item] {
357
+ position: relative;
358
+ gap: var(--fs-spacing-2);
359
+ width: 100%;
360
+ padding: var(--fs-spacing-0) var(--fs-spacing-5);
361
+ margin: 0;
362
+ color: var(--fs-color-text);
363
+
364
+ &[data-fs-dropdown-filter-selected] {
365
+ padding: var(--fs-spacing-0) var(--fs-spacing-4) var(--fs-spacing-0) var(--fs-spacing-0);
366
+ }
367
+
368
+ p {
369
+ font-size: var(--fs-text-size-2);
370
+ font-weight: var(--fs-text-weight-regular);
371
+ line-height: var(--fs-spacing-4);
372
+ color: var(--fs-color-text);
373
+ }
374
+
375
+ [data-fs-toggle-field-label] {
376
+ font-size: var(--fs-text-size-2);
377
+ font-weight: var(--fs-text-weight-semibold);
378
+ color: var(--fs-color-text);
379
+ }
380
+ }
381
+
382
+ [data-fs-product-comparison-dropdown-item-filter-type] {
383
+ padding: var(--fs-spacing-0) var(--fs-spacing-5);
384
+
385
+ [data-fs-product-comparison-dropdown-item-filter-type-text] {
386
+ font-size: var(--fs-text-size-1);
387
+ font-weight: var(--fs-text-weight-regular);
388
+ color: var(--fs-color-neutral-6);
389
+ }
390
+ }
391
+
392
+ [data-fs-toggle-field] {
393
+ flex-direction: row-reverse;
394
+ padding: var(--fs-spacing-0) var(--fs-spacing-5) var(--fs-spacing-1);
395
+ margin-bottom: var(--fs-spacing-1);
396
+ border-bottom: 1px solid var(--fs-border-color-light);
397
+
398
+ [data-fs-label] {
399
+ margin-right: var(--fs-spacing-6);
400
+ margin-left: 0;
401
+ }
402
+ }
403
+ }
404
+
405
+ [data-fs-product-grid-item] {
406
+ [data-fs-product-comparison-trigger] {
407
+ height: calc(var(--fs-spacing-5) + var(--fs-spacing-0));
408
+ }
409
+
410
+ [data-fs-checkbox-field] {
411
+ padding: var(--fs-spacing-1);
412
+ }
413
+ }
@@ -94,16 +94,19 @@
94
94
  padding: var(--fs-spacing-2) var(--fs-spacing-3);
95
95
 
96
96
  @include media("<notebook") {
97
+ justify-content: space-between;
97
98
  background-color: var(--fs-color-neutral-bkg);
98
99
  }
99
100
 
100
101
  @include media(">=notebook") {
101
102
  grid-column: 4 /span 2;
103
+ gap: var(--fs-spacing-3);
102
104
  justify-content: left;
103
105
  order: unset;
104
106
  min-height: initial;
105
107
  padding: 0;
106
108
  background-color: unset;
109
+ inline-size: max-content;
107
110
  }
108
111
 
109
112
  [data-fs-product-listing-results-count-skeleton] {
@@ -116,6 +119,7 @@
116
119
 
117
120
  order: 3;
118
121
  padding: 0 var(--padding);
122
+ border-top: var(--fs-border-radius-small) solid var(--fs-color-neutral-bkg);
119
123
 
120
124
  @include media("<notebook") {
121
125
  background-color: var(--fs-color-neutral-bkg);
@@ -81,6 +81,7 @@
81
81
  @import "../components/organisms/PaymentMethods/styles";
82
82
  @import "../components/organisms/PickupPointCards/styles";
83
83
  @import "../components/organisms/PriceRange/styles";
84
+ @import "../components/organisms/ProductComparison/styles.scss";
84
85
  @import "../components/organisms/ProductDetails/styles";
85
86
  @import "../components/organisms/ProductGallery/styles";
86
87
  @import "../components/organisms/ProductGrid/styles";