@rocketsearch/vue-uappi 0.0.0-stage → 0.1.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.
@@ -0,0 +1,719 @@
1
+ /* Port de linxecommerce/2.0.0/src/scss/search.scss (página de busca) — CSS nested nativo.
2
+ Na Linx a busca era um painel fixo sobre a página; aqui ela É a página (rota /busca). */
3
+
4
+ .rocket-search {
5
+ @media (max-width: 1024px) {
6
+ & .wrapper {
7
+ padding: 0 15px;
8
+ }
9
+ }
10
+
11
+ &[data-facets-mode="fixed"] {
12
+ & .rocket-search__products-result .wrapper {
13
+ grid-template-columns: 100%;
14
+ }
15
+
16
+ & .rocket-search__products-result__col-left {
17
+ padding-right: 0;
18
+ }
19
+
20
+ & .rocket-search__products-result__col-right {
21
+ padding-left: 0;
22
+ }
23
+
24
+ & .rocket-search__header {
25
+ display: grid;
26
+ grid-template-columns: 1fr repeat(2, fit-content(100%));
27
+
28
+ @media (max-width: 1024px) {
29
+ grid-template-columns: repeat(2, minmax(0, 1fr));
30
+ }
31
+ }
32
+ }
33
+
34
+ & #rocket-search__overlay {
35
+ position: fixed;
36
+ inset: 0;
37
+ z-index: 99999;
38
+ transition: all 0.2s ease-in-out;
39
+ background-color: rgba(0, 0, 0, 0.5);
40
+
41
+ &:not(.visible) {
42
+ display: none !important;
43
+ }
44
+ }
45
+
46
+ &.rocket-search--page .rocket-search__products-result {
47
+ width: 100%;
48
+ padding: 32px 0 0;
49
+
50
+ @media screen and (max-width: 1023px) {
51
+ padding-top: 24px;
52
+ }
53
+
54
+ & .wrapper {
55
+ display: grid;
56
+ grid-template-columns: 22% 78%;
57
+
58
+ @media screen and (max-width: 1023px) {
59
+ grid-template-columns: 100%;
60
+ }
61
+ }
62
+ }
63
+
64
+ & .rocket-search__products-result__col-left {
65
+ @media screen and (min-width: 1024px) {
66
+ padding-right: 25px;
67
+ }
68
+ }
69
+
70
+ & .rocket-search__products-result__col-right {
71
+ min-width: 0;
72
+
73
+ @media screen and (min-width: 1024px) {
74
+ padding-left: 25px;
75
+ }
76
+ }
77
+
78
+ & .rocket-search__header {
79
+ display: flex;
80
+ align-items: center;
81
+ justify-content: space-between;
82
+ gap: 20px;
83
+
84
+ @media screen and (max-width: 1023px) {
85
+ display: grid;
86
+ grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
87
+ gap: 20px 10px;
88
+ }
89
+ }
90
+
91
+ & .rocket-search__count {
92
+ color: #b6b6b6;
93
+
94
+ @media screen and (max-width: 1023px) {
95
+ grid-column: 1 / -1;
96
+ order: 99;
97
+ font-size: 14px;
98
+ text-align: left;
99
+ }
100
+ }
101
+
102
+ & .rocket-search__products {
103
+ margin: 25px 0 0;
104
+ padding: 0;
105
+ list-style: none;
106
+ display: grid;
107
+ grid-template-columns: repeat(var(--product-columns), minmax(0, 1fr));
108
+ gap: var(--product-columns-gap);
109
+ scroll-margin: 200px;
110
+ }
111
+
112
+ & .rocket-search__close {
113
+ padding: 0;
114
+ border: none;
115
+ font-size: 20px;
116
+ background-color: transparent;
117
+ cursor: pointer;
118
+ }
119
+
120
+ & .rocket-search__open-facets {
121
+ position: relative;
122
+ width: fit-content;
123
+ height: 40px;
124
+ gap: 10px;
125
+ color: #fff;
126
+ cursor: pointer;
127
+ display: flex;
128
+ font-size: 14px;
129
+ min-width: 185px;
130
+ font-weight: bold;
131
+ line-height: 40px;
132
+ padding: 0 15px;
133
+ align-items: center;
134
+ border: none;
135
+ border-radius: var(--radius);
136
+ justify-content: center;
137
+ background-color: var(--primary-color);
138
+
139
+ @media (max-width: 1024px) {
140
+ width: 100%;
141
+ min-width: unset;
142
+ }
143
+ }
144
+
145
+ & .rocket-search__sorter {
146
+ position: relative;
147
+ display: flex;
148
+ align-items: center;
149
+ justify-content: center;
150
+ gap: 11px;
151
+ min-width: 185px;
152
+ height: 40px;
153
+ color: #232626;
154
+ font-size: 14px;
155
+ border: 1px solid #d7d7d7;
156
+ border-radius: var(--radius);
157
+ background: #f8f8f8;
158
+
159
+ @media screen and (max-width: 1023px) {
160
+ width: 100%;
161
+ min-width: unset;
162
+ }
163
+
164
+ & .select {
165
+ width: 100%;
166
+ height: 100%;
167
+ gap: 11px;
168
+ cursor: pointer;
169
+ display: flex;
170
+ align-items: center;
171
+ justify-content: center;
172
+
173
+ @media screen and (max-width: 1023px) {
174
+ gap: 4px;
175
+ padding: 0 15px;
176
+ }
177
+
178
+ & .text {
179
+ color: #232626;
180
+ font-size: 14px;
181
+ font-weight: 500;
182
+ }
183
+ }
184
+
185
+ & ul.select-options {
186
+ position: absolute;
187
+ top: 100%;
188
+ right: 0;
189
+ width: 100%;
190
+ margin: 0;
191
+ padding: 0;
192
+ list-style: none;
193
+ z-index: 100;
194
+ overflow: hidden;
195
+ border-radius: var(--radius);
196
+ background-color: #fff;
197
+ box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1607843137);
198
+
199
+ & li {
200
+ cursor: pointer;
201
+ display: flex;
202
+ align-items: center;
203
+ gap: 5px;
204
+ color: #232626;
205
+ line-height: 30px;
206
+ padding: 0 10px;
207
+ white-space: nowrap;
208
+ border-bottom: 1px solid #f1f1f1;
209
+
210
+ &.selected,
211
+ &:hover {
212
+ color: #fff;
213
+ border-color: var(--secondary-color);
214
+ background-color: var(--secondary-color);
215
+ }
216
+
217
+ &:last-child {
218
+ border: none;
219
+ }
220
+ }
221
+ }
222
+ }
223
+
224
+ & .rocket-search__footer {
225
+ margin-top: 40px;
226
+ display: flex;
227
+ align-items: center;
228
+ justify-content: center;
229
+ }
230
+
231
+ & .rocket-search__livescroll {
232
+ width: 200px;
233
+ height: 39px;
234
+ padding: 0 0.5rem;
235
+ color: #fff !important;
236
+ font-size: 15px;
237
+ font-weight: bold;
238
+ border: none;
239
+ border-radius: 20px;
240
+ cursor: pointer;
241
+ background-color: var(--primary-color);
242
+
243
+ &.button-loading {
244
+ font-size: 0;
245
+
246
+ &::before {
247
+ content: "Carregando...";
248
+ display: block;
249
+ font-size: 15px;
250
+ text-align: center;
251
+ }
252
+ }
253
+ }
254
+
255
+ & .rocket-search__empty {
256
+ margin: 40px 0;
257
+ color: #6d6d6d;
258
+ font-size: 15px;
259
+ text-align: center;
260
+ }
261
+
262
+ /* ---- Facets ---- */
263
+
264
+ & .rocket-search__facets {
265
+ padding-left: 19px;
266
+
267
+ @media screen and (max-width: 1023px) {
268
+ max-width: calc(100% - 30px);
269
+ }
270
+ }
271
+
272
+ & .rocket-search__facets--fixed {
273
+ position: fixed;
274
+ top: 0;
275
+ left: 0;
276
+ width: 100%;
277
+ height: 100dvh;
278
+ overflow: auto;
279
+ z-index: 999999;
280
+ padding: 24px 16px;
281
+ max-width: 420px;
282
+ transform: translateX(-100%);
283
+ transition: 300ms all ease;
284
+ background-color: #fff;
285
+
286
+ &.opened {
287
+ transform: translateX(0);
288
+ }
289
+ }
290
+
291
+ & .rocket-search__facets__header {
292
+ display: flex;
293
+ align-items: center;
294
+ justify-content: space-between;
295
+ margin-bottom: 24px;
296
+
297
+ & > strong {
298
+ font-size: 16px;
299
+ }
300
+ }
301
+
302
+ & .rocket-search__facets__selected {
303
+ margin-bottom: 24px;
304
+
305
+ & > span {
306
+ display: block;
307
+ margin-bottom: 12px;
308
+ }
309
+
310
+ & ul {
311
+ display: flex;
312
+ align-items: center;
313
+ flex-wrap: wrap;
314
+ gap: 10px;
315
+ margin: 0;
316
+ padding: 0;
317
+ list-style: none;
318
+ }
319
+
320
+ & li:not(.rocket-search__clear-all-filters) {
321
+ position: relative;
322
+ display: flex;
323
+ align-items: center;
324
+ gap: 5px;
325
+ padding: 0.5rem 1rem;
326
+ color: #fff;
327
+ font-size: 13px;
328
+ border-radius: 18px;
329
+ background-color: var(--primary-color);
330
+ }
331
+
332
+ & .option-title {
333
+ white-space: nowrap;
334
+ }
335
+
336
+ & .rocket-search__facets__selected__clear-filter {
337
+ padding: 0;
338
+ border: none;
339
+ color: #fff;
340
+ background: transparent;
341
+ cursor: pointer;
342
+ }
343
+
344
+ & .rocket-search__clear-all-filters button {
345
+ font-size: 12px;
346
+ text-decoration: underline;
347
+ text-transform: uppercase;
348
+ border: none;
349
+ background: transparent;
350
+ cursor: pointer;
351
+ }
352
+
353
+ & .name {
354
+ display: none;
355
+ }
356
+ }
357
+
358
+ & .rocket-search__facets__selected--v2 {
359
+ padding: 20px 0 15px;
360
+ margin-bottom: 5px;
361
+ font-size: 15px;
362
+
363
+ &,
364
+ & ul {
365
+ display: flex;
366
+ flex-wrap: wrap;
367
+ align-items: center;
368
+ gap: 16px 10px;
369
+ }
370
+
371
+ & ul {
372
+ margin: 0;
373
+ padding: 0;
374
+ list-style: none;
375
+ }
376
+
377
+ & li {
378
+ display: flex;
379
+ align-items: center;
380
+ gap: 4px;
381
+ }
382
+
383
+ & li .name {
384
+ display: none;
385
+ }
386
+
387
+ & li .label {
388
+ display: inline-block;
389
+ text-transform: lowercase;
390
+
391
+ &::first-letter {
392
+ text-transform: uppercase;
393
+ }
394
+ }
395
+
396
+ & li .rocket-search__facets__selected__clear-filter {
397
+ width: 14px;
398
+ height: 14px;
399
+ display: flex;
400
+ align-items: center;
401
+ justify-content: center;
402
+ flex-shrink: 0;
403
+ color: #fff;
404
+ font-size: 12px;
405
+ line-height: 14px;
406
+ border: none;
407
+ border-radius: 100%;
408
+ background-color: var(--secondary-color);
409
+ padding: 0;
410
+ cursor: pointer;
411
+ }
412
+
413
+ & .rocket-search__clear-all-filters button {
414
+ display: flex;
415
+ align-items: center;
416
+ gap: 4px;
417
+ padding: 0;
418
+ border: none;
419
+ font-size: 15px;
420
+ background-color: transparent;
421
+ cursor: pointer;
422
+ }
423
+ }
424
+
425
+ & .rocket-search__facets-type {
426
+ padding: 24px 0;
427
+
428
+ @media screen and (max-width: 1023px) {
429
+ padding: 15px 10px;
430
+
431
+ &:not(.last) {
432
+ border-bottom: 1px solid #f5f5f5;
433
+ }
434
+ }
435
+
436
+ &[facet-type="range"] {
437
+ --slider-circle-size: 16px;
438
+ --min-position: 0%;
439
+ --max-position: 100%;
440
+ --background-color: #fff;
441
+ --slider-color: #f1f1f1;
442
+ font-size: 15px;
443
+
444
+ & * {
445
+ -webkit-user-drag: none;
446
+ user-select: none;
447
+ }
448
+
449
+ & .multi-range {
450
+ position: relative;
451
+ height: var(--slider-circle-size);
452
+ margin-bottom: 13px;
453
+
454
+ & input[type="range"] {
455
+ position: absolute;
456
+ top: 50%;
457
+ width: 100%;
458
+ height: 6px;
459
+ margin: 0;
460
+ padding: 0;
461
+ border: 0;
462
+ outline: none;
463
+ pointer-events: none;
464
+ transform: translateY(-50%);
465
+ background: linear-gradient(to right,
466
+ var(--background-color) var(--min-position),
467
+ var(--slider-color) var(--min-position),
468
+ var(--slider-color) var(--max-position),
469
+ var(--background-color) var(--max-position));
470
+ background-size: 100% 6px;
471
+ appearance: none;
472
+
473
+ &.max {
474
+ background: none;
475
+ }
476
+
477
+ &::-webkit-slider-thumb {
478
+ width: var(--slider-circle-size);
479
+ height: var(--slider-circle-size);
480
+ margin: 5px 0;
481
+ cursor: grab;
482
+ border-radius: 50%;
483
+ pointer-events: all;
484
+ background-color: var(--primary-color);
485
+ appearance: none;
486
+ }
487
+
488
+ &::-moz-range-thumb {
489
+ width: var(--slider-circle-size);
490
+ height: var(--slider-circle-size);
491
+ cursor: grab;
492
+ border: none;
493
+ border-radius: 50%;
494
+ pointer-events: all;
495
+ background-color: var(--primary-color);
496
+ }
497
+ }
498
+ }
499
+
500
+ & .prices {
501
+ display: flex;
502
+ justify-content: space-between;
503
+ }
504
+ }
505
+
506
+ &.closed {
507
+ & .rocket-search__facets-title {
508
+ margin-bottom: 0;
509
+
510
+ & .icon {
511
+ transform: rotate(0);
512
+ }
513
+ }
514
+
515
+ & .rocket-search__facets-content {
516
+ display: none;
517
+ }
518
+ }
519
+ }
520
+
521
+ & .rocket-search__facets-title {
522
+ display: flex;
523
+ align-items: center;
524
+ justify-content: space-between;
525
+ margin-bottom: 20px;
526
+ cursor: pointer;
527
+
528
+ & strong {
529
+ color: var(--secondary-color);
530
+ font-size: 15px;
531
+ font-weight: 700;
532
+ }
533
+
534
+ & .icon {
535
+ transform: rotate(180deg);
536
+ }
537
+ }
538
+
539
+ & .rocket-search__facets-content {
540
+ & ul {
541
+ display: flex;
542
+ flex-direction: column;
543
+ gap: 16px;
544
+ max-height: 280px;
545
+ margin: 0;
546
+ padding: 0;
547
+ list-style: none;
548
+ overflow-x: hidden;
549
+ overflow-y: auto;
550
+ }
551
+
552
+ & li {
553
+ & a {
554
+ display: flex;
555
+ align-items: center;
556
+ gap: 10px;
557
+ color: #9a9a9a;
558
+ font-size: 14px;
559
+ cursor: pointer;
560
+ }
561
+
562
+ & .icon > svg {
563
+ width: 100%;
564
+ height: auto;
565
+
566
+ & [fill] {
567
+ fill: var(--primary-color);
568
+ }
569
+ }
570
+
571
+ &:not(.selected) .icon {
572
+ display: block;
573
+ width: 12px;
574
+ height: 12px;
575
+ border: 1.5px solid #d9d9d9;
576
+ border-radius: 50%;
577
+ transition: background 0.3s, border-color 0.3s;
578
+
579
+ & svg {
580
+ display: none;
581
+ }
582
+ }
583
+
584
+ &.selected .icon {
585
+ width: 12px;
586
+ height: 12px;
587
+ }
588
+ }
589
+
590
+ & .option-title {
591
+ display: inline-block;
592
+ color: #7f817f;
593
+ font-weight: 400;
594
+ text-transform: lowercase;
595
+
596
+ &::first-letter {
597
+ text-transform: uppercase;
598
+ }
599
+ }
600
+
601
+ }
602
+
603
+ & .rocket-search__facets__buttons {
604
+ display: flex;
605
+ flex-direction: column;
606
+ align-items: center;
607
+ width: 100%;
608
+ margin: 20px auto 30px;
609
+
610
+ & .apply,
611
+ & .clear-all {
612
+ width: 100%;
613
+ height: 50px;
614
+ font-size: 17px;
615
+ font-weight: 700;
616
+ line-height: 50px;
617
+ text-transform: uppercase;
618
+ border-radius: var(--radius);
619
+ cursor: pointer;
620
+ }
621
+
622
+ & .apply {
623
+ color: #fff;
624
+ border: none;
625
+ background-color: var(--secondary-color);
626
+ }
627
+
628
+ & .clear-all {
629
+ margin-top: 20px;
630
+ color: var(--secondary-color);
631
+ border: 1px solid var(--secondary-color);
632
+ background-color: #fff;
633
+ }
634
+ }
635
+
636
+ /* ---- Paginação ---- */
637
+
638
+ & .rocket-search__pager {
639
+ --circle-size: 45px;
640
+ display: flex;
641
+ align-items: center;
642
+ justify-content: center;
643
+ width: 100%;
644
+ margin: 58px 0;
645
+ }
646
+
647
+ & .rocket-search__pager__page-numbers {
648
+ display: flex;
649
+ align-items: center;
650
+ justify-content: center;
651
+ gap: 10px;
652
+ margin: 0;
653
+
654
+ & a {
655
+ width: 100%;
656
+ height: 100%;
657
+ color: #9e9e9e;
658
+ cursor: pointer;
659
+ display: flex;
660
+ font-size: 16px;
661
+ font-weight: 700;
662
+ line-height: var(--circle-size);
663
+ align-items: center;
664
+ border: 1px solid #e2e2e2;
665
+ border-radius: 100%;
666
+ justify-content: center;
667
+ background: #eee;
668
+ }
669
+ }
670
+
671
+ & .rocket-search__pager__page-number,
672
+ & .rocket-search__pager__prev,
673
+ & .rocket-search__pager__next {
674
+ width: var(--circle-size);
675
+ height: var(--circle-size);
676
+ padding: 0;
677
+ display: flex;
678
+ align-items: center;
679
+ justify-content: center;
680
+ }
681
+
682
+ & .rocket-search__pager__page-selected {
683
+ width: var(--circle-size);
684
+ height: var(--circle-size);
685
+ color: #fff;
686
+ font-size: 16px;
687
+ font-weight: 700;
688
+ line-height: var(--circle-size);
689
+ text-align: center;
690
+ border-radius: 100%;
691
+ background: var(--secondary-color);
692
+ }
693
+
694
+ & .rocket-search__pager__prev a svg {
695
+ transform: rotate(180deg);
696
+ }
697
+
698
+ & .rocket-search__pager__next a {
699
+ border: 0;
700
+ background-color: var(--secondary-color);
701
+
702
+ & svg {
703
+ filter: brightness(0) invert(1);
704
+ }
705
+ }
706
+ }
707
+
708
+ /* "Você quis dizer?" na página de busca (port de linxecommerce/2.0.0/src/scss/search.scss). */
709
+ .rocket-search .rocket-search__did-you-mean {
710
+ margin: 0 0 16px;
711
+ color: #232626;
712
+ font-size: 14px;
713
+
714
+ & a {
715
+ color: inherit;
716
+ font-weight: 600;
717
+ text-decoration: underline;
718
+ }
719
+ }