@depict-ai/react-ui 2.1.7 → 2.1.8

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 (48) hide show
  1. package/ES10/index.cjs +1 -1
  2. package/ES10/index.d.ts +1 -1
  3. package/ES10/index.js +1 -1
  4. package/dist/main.js +527 -0
  5. package/dist/module.js +510 -0
  6. package/dist/styles/components/PLP/Buttons.scss +181 -0
  7. package/dist/styles/components/PLP/MorphingSign.scss +30 -0
  8. package/dist/styles/components/PLP/PLPResults.scss +26 -0
  9. package/dist/styles/components/PLP/ProductListingPage.scss +168 -0
  10. package/dist/styles/components/PLP/ScrollStatus.scss +31 -0
  11. package/dist/styles/components/PLP/SelectedFilters.scss +82 -0
  12. package/dist/styles/components/PLP/SlidableItems.scss +121 -0
  13. package/dist/styles/components/PLP/SortAndFilter/FloatingButtons.scss +84 -0
  14. package/dist/styles/components/PLP/SortAndFilter/SortAndFilter.scss +800 -0
  15. package/dist/styles/components/PLP/SortAndFilter/SortAndFilterModal.scss +158 -0
  16. package/dist/styles/components/PLP/SortAndFilter/WhiteSortAndFilter.scss +152 -0
  17. package/dist/styles/components/PLP/Toast.scss +59 -0
  18. package/dist/styles/components/PLP/index.scss +51 -0
  19. package/dist/styles/components/category/BreadCrumbs.scss +32 -0
  20. package/dist/styles/components/category/CategoryTitle.scss +40 -0
  21. package/dist/styles/components/category/QuickLinks.scss +80 -0
  22. package/dist/styles/components/category/index.scss +23 -0
  23. package/dist/styles/components/search/Autocomplete.scss +197 -0
  24. package/dist/styles/components/search/CategorySuggestions.scss +82 -0
  25. package/dist/styles/components/search/InstantCard.scss +122 -0
  26. package/dist/styles/components/search/InstantResults.scss +12 -0
  27. package/dist/styles/components/search/PreviousSearches.scss +90 -0
  28. package/dist/styles/components/search/QueryInput.scss +189 -0
  29. package/dist/styles/components/search/SearchModal.scss +101 -0
  30. package/dist/styles/components/search/SearchRecommendations.scss +28 -0
  31. package/dist/styles/components/search/ShowingResultsFor.scss +13 -0
  32. package/dist/styles/components/search/index.scss +40 -0
  33. package/dist/styles/default.css +1 -0
  34. package/dist/styles/helpers/custom_input.scss +194 -0
  35. package/dist/styles/helpers/supports-hover.scss +7 -0
  36. package/dist/styles/helpers/utils.scss +90 -0
  37. package/dist/styles/plain-css-fallback-styling.css +1 -1
  38. package/dist/styles/variables.scss +61 -0
  39. package/latest/index.cjs +1 -1
  40. package/latest/index.d.ts +1 -1
  41. package/latest/index.js +1 -1
  42. package/package.json +4 -4
  43. package/server/ES10/index.cjs +1 -1
  44. package/server/ES10/index.d.ts +1 -1
  45. package/server/ES10/index.js +1 -1
  46. package/server/latest/index.cjs +1 -1
  47. package/server/latest/index.d.ts +1 -1
  48. package/server/latest/index.js +1 -1
@@ -0,0 +1,800 @@
1
+ @use "../../../helpers/utils";
2
+ @use "../../../helpers/custom_input";
3
+ @use "SortAndFilterModal";
4
+ @use "../MorphingSign";
5
+ @use "../../../variables";
6
+ @use "../../../helpers/supports-hover";
7
+ @use "../Buttons";
8
+ @use "sass:color";
9
+ @use "sass:map";
10
+
11
+ /// Mixin that styles the sorting and filtering menus.
12
+ /// The way this is configured is soon going to be subject to change, therefore the parameters are not argumented.
13
+ /// @param {Color} $mobile-top-level-collapse-color [variables.$brand-black] -
14
+ /// @param {Color} $mobile-top-level-collapse-background [#fff] -
15
+ /// @param {Color} $custom-input-checked-background [#fff] -
16
+ /// @param {Color} $custom-input-background [#fff] -
17
+ /// @param {Color} $custom-input-indicator-color [variables.$brand-black] -
18
+ /// @param {Color} $checkbox-background-color [#fff] -
19
+ /// @param {Color} $checkbox-checked-background-color [variables.$brand-black] -
20
+ /// @param {Color} $checkbox-checkmark-color [#fff] -
21
+ /// @param {Number with size unit} $checkbox-border-radius [if(variables.$border-radius == 0, 0, if(variables.$border-radius == 0px, 0, 2px))] -
22
+ /// @param {Border} $checkbox-border [1px solid variables.$brand-dark-grey] -
23
+ /// @param {Number with size unit} $checkbox-top-offset [0px] -
24
+ /// @param {Number with size unit} $checkbox-left-offset [0px] -
25
+ /// @param {Border} $radio-border [1px solid variables.$brand-dark-grey] -
26
+ /// @param {Color} $radio-background-color [#fff] -
27
+ /// @param {Color} $radio-selected-dot-color [variables.$brand-black] -
28
+ /// @param {Number with size unit} $radio-selected-dot-size [14px] -
29
+ /// @param {Number with size unit} $radio-selected-offset [0px] -
30
+ /// @param {Color} $separator-color [variables.$brand-dark-grey] -
31
+ /// @param {Color} $price-range-min-max-text-color [variables.$brand-dark-grey] -
32
+ /// @param {Color} $range-input-bg-color [variables.$brand-lightest-grey] -
33
+ /// @param {Color} $top-level-summary-background [variables.$brand-black] -
34
+ /// @param {Color} $hovered-top-level-summary-background [variables.$brand-dark-grey] -
35
+ /// @param {Color} $hovered-range-input-bg-color [variables.$brand-lighter-grey] -
36
+ /// @param {Color} $hovered-checkbox-bg [variables.$brand-lighter-grey] -
37
+ /// @param {false | Color} $hovered-checkbox-checked-background-color [false] -
38
+ /// @param {Color} $input-row-label-color [variables.$brand-dark-grey] -
39
+ /// @param {Color} $checked-input-row-label-color [#000] -
40
+ /// @param {Number} $input-row-label-font-weight [400] -
41
+ /// @param {Number} $checked-input-row-label-font-weight [500] -
42
+ /// @param {Color} $showing-selected-subfilter-count-color [variables.$brand-grey] -
43
+ /// @param {Color} $filter-available-products-color [variables.$brand-grey] -
44
+ /// @param {Color} $count-zero-input-row-label-color [rgb(194, 194, 194)] -
45
+ /// @param {Number with size unit} $spacing_between_input_rows [10px] -
46
+ /// @param {Number with size unit} $ungrouped-top-margin [25px] -
47
+ /// @param {Border} $hovered-checkbox-border [2px solid variables.$brand-black] -
48
+ /// @param {Border} $hovered-radio-border [2px solid variables.$brand-black] -
49
+ /// @param {Padding} $sort-and-filter-button-padding [10px 20px] -
50
+ /// @param {Color} $expandable-seperator-color [variables.$brand-lightest-grey] -
51
+ /// @param {Color} $expandable-seperator-hover-color [variables.$brand-lighter-grey] -
52
+ /// @param {Number with size unit} $expandable-seperator-height [1px] -
53
+ /// @param {Color} $filter-group-heading-color [#fff] -
54
+ /// @param {Color} $filter-groups-morphing-sign-color [#fff] -
55
+ /// @param {Number with size unit} $filter-group-summary-border-radius [4px] -
56
+ /// @param {Color} $sort-and-filter-modal-background [variables.$brand-lighter-grey] -
57
+ /// @param {Number with size unit} $filter-group-heading-padding [10px] -
58
+ /// @param {Number with size unit} $filter-group-summary-spacings [10px] -
59
+ /// @param {Number with size unit} $range-input-field-border-radius [4px] -
60
+ /// @param {Border} $range-input-field-border [none] -
61
+ /// @param {false | Number} $filter-group-title-bold [false] -
62
+ /// @param {Color} $view-more-clear-background [rgb(253, 253, 253)] -
63
+ /// @param {Color} $filter-collapsible-body-background [rgb(238, 238, 240)] -
64
+ /// @param {Number | Boolean} $sort-and-filter-modal-section-title-font-weight [false] -
65
+ /// @param {Number | Boolean} $sort-and-filter-modal-section-expanded-title-font-weight [$sort-and-filter-modal-section-title-font-weight] -
66
+
67
+ @mixin SortAndFilter(
68
+ $mobile-top-level-collapse-color: variables.$brand-black,
69
+ $mobile-top-level-collapse-background: #fff,
70
+ $custom-input-checked-background: #fff,
71
+ $custom-input-background: #fff,
72
+ $custom-input-indicator-color: variables.$brand-black,
73
+ $checkbox-background-color: #fff,
74
+ $checkbox-checked-background-color: variables.$brand-black,
75
+ $checkbox-checkmark-color: #fff,
76
+ $checkbox-border-radius: if(variables.$border-radius == 0, 0, if(variables.$border-radius == 0px, 0, 2px)),
77
+ // if global border radius is 0 or 0px, don't round input fields in their default value
78
+ $checkbox-border: 1px solid variables.$brand-dark-grey,
79
+ $checkbox-top-offset: 0px,
80
+ $checkbox-left-offset: 0px,
81
+ $radio-border: 1px solid variables.$brand-dark-grey,
82
+ $radio-background-color: #fff,
83
+ $radio-selected-dot-color: variables.$brand-black,
84
+ $radio-selected-dot-size: 14px,
85
+ $radio-selected-offset: 0px,
86
+ $separator-color: variables.$brand-dark-grey,
87
+ $price-range-min-max-text-color: variables.$brand-dark-grey,
88
+ $range-input-bg-color: variables.$brand-lightest-grey,
89
+ $top-level-summary-background: variables.$brand-black,
90
+ $hovered-top-level-summary-background: variables.$brand-dark-grey,
91
+ $hovered-range-input-bg-color: variables.$brand-lighter-grey,
92
+ $hovered-checkbox-bg: variables.$brand-lighter-grey,
93
+ $hovered-checkbox-checked-background-color: false,
94
+ $input-row-label-color: variables.$brand-dark-grey,
95
+ $checked-input-row-label-color: #000,
96
+ $input-row-label-font-weight: 400,
97
+ $checked-input-row-label-font-weight: 500,
98
+ $showing-selected-subfilter-count-color: variables.$brand-grey,
99
+ $filter-available-products-color: variables.$brand-grey,
100
+ $count-zero-input-row-label-color: rgb(194, 194, 194),
101
+ $spacing_between_input_rows: 10px,
102
+ $ungrouped-top-margin: 25px,
103
+ $hovered-checkbox-border: 2px solid variables.$brand-black,
104
+ $hovered-radio-border: 2px solid variables.$brand-black,
105
+ $sort-and-filter-button-padding: 10px 20px,
106
+ $expandable-seperator-color: variables.$brand-lightest-grey,
107
+ $expandable-seperator-hover-color: variables.$brand-lighter-grey,
108
+ $expandable-seperator-height: 1px,
109
+ $filter-group-heading-color: #fff,
110
+ $filter-groups-morphing-sign-color: #fff,
111
+ $filter-group-summary-border-radius: 4px,
112
+ $sort-and-filter-modal-background: variables.$brand-lighter-grey,
113
+ $filter-group-heading-padding: 10px,
114
+ $filter-group-summary-spacings: 10px,
115
+ $range-input-field-border-radius: 4px,
116
+ $range-input-field-border: none,
117
+ $filter-group-title-bold: false,
118
+ $view-more-clear-background: rgb(253, 253, 253),
119
+ $filter-collapsible-body-background: rgb(238, 238, 240),
120
+ $sort-and-filter-modal-section-title-font-weight: false,
121
+ $sort-and-filter-modal-section-expanded-title-font-weight: $sort-and-filter-modal-section-title-font-weight
122
+ ) {
123
+ $input-row-height-goal: max(21px, 1em); // if text gets bigger we have to get bigger too to not cut off the text
124
+ // it was meant to be 20px but there was a bug so I'm setting it to 21px now so it doesn't change
125
+ $count-distance-to-right: 30px;
126
+ $largest-border-on-custom-input: max(
127
+ custom_input.get_border_width($checkbox-border),
128
+ custom_input.get_border_width($radio-border)
129
+ );
130
+
131
+ @if (not $hovered-checkbox-checked-background-color) {
132
+ @if color.lightness($checkbox-checked-background-color) >= 50% {
133
+ $hovered-checkbox-checked-background-color: color.scale($checkbox-checked-background-color, $lightness: -10%);
134
+ } @else {
135
+ $hovered-checkbox-checked-background-color: color.scale($checkbox-checked-background-color, $lightness: +20%);
136
+ }
137
+ }
138
+
139
+ .major-minor-transition {
140
+ transition: filter 150ms ease-in-out, background 250ms ease-in-out, color 250ms ease-in-out,
141
+ border 250ms ease-in-out;
142
+ }
143
+
144
+ .filter-results-for-one-row {
145
+ display: flex;
146
+ align-items: center;
147
+ justify-content: space-between;
148
+ }
149
+
150
+ *:not(.filter-results-for-one-row) > .sort-and-filter-buttons .inner {
151
+ justify-content: space-between;
152
+ }
153
+
154
+ .sorting-attributes,
155
+ .sorting-direction {
156
+ padding: 10px;
157
+ background: white;
158
+ display: flex;
159
+ flex-direction: column;
160
+ @include utils.flex-gap(10px, "column nowrap");
161
+ }
162
+
163
+ .sort-and-filter-buttons {
164
+ .outer {
165
+ margin-top: -5px;
166
+ }
167
+ .inner {
168
+ display: flex;
169
+ justify-content: flex-end;
170
+ // Note: this can't be done with gap: or embedded_num_products will break since it assumes that the spacing is included in the width of these elements + margin
171
+ @include utils.flex-gap(10px, "row nowrap");
172
+ align-items: center;
173
+ overflow: hidden;
174
+ padding-top: 5px;
175
+ // hack around having to have overflow: hidden for embedded_num_products but still wanting to be able to see the overflowing number of filters badge
176
+ }
177
+ &.fake .toggle-button {
178
+ transition: none;
179
+ }
180
+ .toggle-button {
181
+ white-space: nowrap;
182
+ @include utils.flex-gap(5px, "row nowrap");
183
+ padding: $sort-and-filter-button-padding;
184
+ position: relative;
185
+
186
+ svg path {
187
+ transition-duration: 250ms;
188
+ }
189
+
190
+ &.major {
191
+ &.for-sorting {
192
+ @include utils.flex-gap(10px, "row nowrap");
193
+ }
194
+ }
195
+ }
196
+
197
+ .num-filters {
198
+ position: absolute;
199
+ right: -4px;
200
+ top: -4px;
201
+ background: black;
202
+ color: white;
203
+ border-radius: 13px;
204
+ width: 20px;
205
+ line-height: 1;
206
+ height: 20px;
207
+ display: flex;
208
+ justify-content: center;
209
+ align-items: center;
210
+ transition: opacity 250ms ease-in-out;
211
+ font-size: 12px;
212
+ z-index: calc(#{variables.$search-page-base-z-index} + 1);
213
+ }
214
+ .open-filters-button-container {
215
+ position: relative;
216
+ }
217
+ }
218
+
219
+ label {
220
+ margin: 0;
221
+ }
222
+
223
+ .PLP-results {
224
+ .sorting,
225
+ .filters {
226
+ flex-shrink: 0;
227
+ flex-basis: 330px;
228
+ }
229
+ }
230
+ // Shared body style for filters and sorting containers
231
+ .filters .body,
232
+ .sorting .body {
233
+ display: flex;
234
+ flex-direction: column;
235
+ @include custom_input.custom_input(
236
+ $checkbox-background-color,
237
+ $checkbox-checked-background-color,
238
+ $checkbox-checkmark-color,
239
+ $checkbox-border-radius,
240
+ $checkbox-border,
241
+ $checkbox-left-offset,
242
+ $checkbox-top-offset,
243
+ $radio-border,
244
+ $radio-background-color,
245
+ $radio-selected-dot-color,
246
+ $radio-selected-dot-size,
247
+ $radio-selected-offset,
248
+ $hovered-checkbox-bg,
249
+ $hovered-checkbox-checked-background-color,
250
+ $hovered-checkbox-border,
251
+ $hovered-radio-border,
252
+ $input-row-height-goal,
253
+ $largest-border-on-custom-input
254
+ );
255
+ }
256
+ .filters {
257
+ .body {
258
+ & > * {
259
+ // WhiteSortAndFilter wants to add a border above the space here which is why we're not using utils.flex-gap / margins
260
+ &:not(:first-child) {
261
+ padding-top: calc($filter-group-summary-spacings * 0.5);
262
+ }
263
+ &:not(:last-child) {
264
+ padding-bottom: calc($filter-group-summary-spacings * 0.5);
265
+ }
266
+ }
267
+
268
+ .input-row {
269
+ // Only input row in filters
270
+ padding-bottom: calc(#{$spacing_between_input_rows} / 2);
271
+ padding-top: calc(#{$spacing_between_input_rows} / 2);
272
+ justify-content: space-between;
273
+ &,
274
+ & > .left {
275
+ align-items: center;
276
+ display: flex;
277
+ }
278
+ .text {
279
+ //line-height: 1.8; /** Fix for ÅÄÖ getting cut-off **/
280
+ line-height: $input-row-height-goal; // Sorry ÅÄÖ, hope you survive this
281
+ display: -webkit-box;
282
+ text-overflow: ellipsis;
283
+ white-space: pre-line;
284
+ overflow-wrap: anywhere;
285
+ color: $input-row-label-color;
286
+ -webkit-box-orient: vertical;
287
+ -webkit-line-clamp: 1;
288
+ overflow: hidden;
289
+ font-weight: $input-row-label-font-weight;
290
+ word-break: break-word;
291
+ }
292
+ *:checked,
293
+ .fake-checked {
294
+ & ~ .text {
295
+ color: $checked-input-row-label-color;
296
+ font-weight: $checked-input-row-label-font-weight;
297
+ }
298
+ }
299
+ &.count-0 * + .text {
300
+ color: $count-zero-input-row-label-color;
301
+ }
302
+ }
303
+ .input-row,
304
+ .hierarchical .checkbox-details.expandable .category-parent {
305
+ .count {
306
+ color: $filter-available-products-color;
307
+ font-weight: 400;
308
+ }
309
+ }
310
+ .input-row:hover .count {
311
+ color: black;
312
+ }
313
+
314
+ .selected-w-sign {
315
+ display: flex;
316
+ align-items: center;
317
+ @include utils.flex-gap(10px, "row nowrap");
318
+ .show-selected {
319
+ display: flex;
320
+ @include utils.flex-gap(5px, "row nowrap");
321
+ align-items: center;
322
+ color: $showing-selected-subfilter-count-color;
323
+ fill: $showing-selected-subfilter-count-color;
324
+ span {
325
+ line-height: 1;
326
+ }
327
+ }
328
+ }
329
+ .ungrouped {
330
+ margin-top: $ungrouped-top-margin;
331
+ }
332
+
333
+ .clear-all-filters {
334
+ margin-top: 5px;
335
+ font-weight: 400;
336
+ padding: 0.7em;
337
+ text-transform: uppercase;
338
+ font-size: 1.1em;
339
+ }
340
+
341
+ details {
342
+ summary {
343
+ list-style: none;
344
+ &::-webkit-details-marker {
345
+ display: none;
346
+ }
347
+ cursor: pointer;
348
+ & > .summary {
349
+ display: flex;
350
+ justify-content: space-between;
351
+ align-items: center;
352
+ }
353
+ }
354
+ &.filter-collapsible {
355
+ .filter-group-summary {
356
+ background: $top-level-summary-background;
357
+ border-radius: $filter-group-summary-border-radius;
358
+
359
+ &:focus {
360
+ outline: none;
361
+ }
362
+ &:focus-visible {
363
+ background: $hovered-top-level-summary-background;
364
+ }
365
+ @include supports-hover.supports-hover() {
366
+ &:hover {
367
+ background: $hovered-top-level-summary-background;
368
+ }
369
+ }
370
+ & > .summary {
371
+ color: $filter-group-heading-color;
372
+ padding: $filter-group-heading-padding;
373
+ & > span {
374
+ @if $filter-group-title-bold {
375
+ font-weight: $filter-group-title-bold;
376
+ }
377
+ }
378
+ & > svg {
379
+ transform: rotate(270deg);
380
+ }
381
+ }
382
+ }
383
+ &[open] .filter-group-summary {
384
+ border-radius: $filter-group-summary-border-radius $filter-group-summary-border-radius 0px 0px;
385
+ }
386
+ }
387
+ }
388
+
389
+ .filter-collapsible-body {
390
+ background: $filter-collapsible-body-background;
391
+ display: flex;
392
+ flex-direction: column;
393
+ @include utils.flex-gap(1px, "column nowrap");
394
+ border-radius: 0px 0px 4px 4px;
395
+ overflow: hidden;
396
+
397
+ .view-more-clear {
398
+ background: $view-more-clear-background;
399
+ display: flex;
400
+ justify-content: space-between;
401
+ $gap: 10px;
402
+
403
+ .clear-group {
404
+ @include utils.flex-gap(calc($gap - calc(calc(21.064px - 8.42px) / 2)), "row nowrap");
405
+ margin-left: auto;
406
+ svg {
407
+ width: 11px;
408
+ height: 12px;
409
+ }
410
+ }
411
+
412
+ .expand-filter {
413
+ margin-right: auto;
414
+ @include utils.flex-gap($gap, "row nowrap");
415
+ &.expanded svg {
416
+ clip-path: polygon(20% 48%, 80% 48%, 80% 50.8%, 20% 50.8%);
417
+ transform: scale(1.6);
418
+ }
419
+ }
420
+
421
+ button {
422
+ background: transparent;
423
+ border: none;
424
+ margin-bottom: 0;
425
+ margin-right: 0;
426
+ margin-left: 0;
427
+ color: black;
428
+ cursor: pointer;
429
+ padding: 10px;
430
+ display: flex;
431
+ align-items: center;
432
+ justify-content: center;
433
+ text-transform: uppercase;
434
+ svg {
435
+ path {
436
+ fill: black;
437
+ }
438
+ }
439
+ &:focus-visible {
440
+ outline: none;
441
+ filter: map.get(Buttons.get-secondary-button-properties(), "focus-visible-filter");
442
+ }
443
+ }
444
+ }
445
+
446
+ .filter-part {
447
+ background: white;
448
+ padding: 15px 10px 20px 10px;
449
+ display: flex;
450
+ flex-direction: column;
451
+ @include utils.flex-gap(10px, "column nowrap");
452
+ }
453
+ }
454
+ *:not(.ungrouped) > form {
455
+ margin-bottom: calc(-1 * calc(#{$spacing_between_input_rows} / 2));
456
+ margin-top: calc(-1 * calc(#{$spacing_between_input_rows} / 2));
457
+ }
458
+ .hierarchical {
459
+ margin-left: -20px;
460
+
461
+ &.any-expandable {
462
+ .count {
463
+ margin-right: $count-distance-to-right;
464
+ }
465
+ }
466
+
467
+ .checkbox-details {
468
+ padding-left: 20px;
469
+
470
+ &.expandable {
471
+ position: relative;
472
+
473
+ & summary {
474
+ &:before,
475
+ &:after {
476
+ pointer-events: none;
477
+ content: "";
478
+ position: absolute;
479
+ right: 0;
480
+ background: $expandable-seperator-color;
481
+ height: $expandable-seperator-height;
482
+ width: calc(100% - 20px); // Reduce for padding
483
+ }
484
+
485
+ &:before {
486
+ // so that two adjacent separators merge into each other
487
+ top: calc(-0.5 * #{$expandable-seperator-height});
488
+ }
489
+
490
+ &:after {
491
+ bottom: calc(-0.5 * #{$expandable-seperator-height});
492
+ }
493
+
494
+ @include supports-hover.supports-hover() {
495
+ &:hover,
496
+ .input-row:hover ~ details > & {
497
+ &:after,
498
+ &:before {
499
+ background: $expandable-seperator-hover-color;
500
+ z-index: 1;
501
+ }
502
+ }
503
+ }
504
+ &:focus-visible,
505
+ .input-row ~ details:focus-visible > & {
506
+ &:after,
507
+ &:before {
508
+ background: $expandable-seperator-hover-color;
509
+ z-index: 1;
510
+ }
511
+ }
512
+ }
513
+
514
+ & > .input-row {
515
+ position: absolute;
516
+ padding-right: 30px;
517
+ }
518
+ & > details {
519
+ &:not([open]),
520
+ &[open] > .category-parent > .summary {
521
+ padding-top: calc(#{$spacing_between_input_rows} / 2);
522
+ padding-bottom: calc(#{$spacing_between_input_rows} / 2);
523
+ }
524
+ .category-parent {
525
+ &:focus {
526
+ outline: none;
527
+ box-shadow: none;
528
+ }
529
+ &:focus-visible {
530
+ outline: none;
531
+ box-shadow: none;
532
+ }
533
+ @supports selector(:focus-visible) {
534
+ &:not(:focus-visible) {
535
+ @include supports-hover.supports-hover() {
536
+ &:not(:hover) {
537
+ @include default_morphing_sign_in_expandable();
538
+ }
539
+ }
540
+ @media (hover: none) {
541
+ @include default_morphing_sign_in_expandable();
542
+ }
543
+ }
544
+ @include supports-hover.supports-hover() {
545
+ &:hover {
546
+ .morphing-sign {
547
+ transform: scale(1.5);
548
+ }
549
+ .count {
550
+ color: black;
551
+ }
552
+ }
553
+ }
554
+ &:focus-visible {
555
+ .count {
556
+ color: black;
557
+ }
558
+ .morphing-sign {
559
+ transform: scale(1.5);
560
+ }
561
+ }
562
+ }
563
+ @supports (not (selector(:focus-visible))) {
564
+ @include supports-hover.supports-hover() {
565
+ &:not(:hover) {
566
+ @include default_morphing_sign_in_expandable();
567
+ }
568
+ &:hover {
569
+ .morphing-sign {
570
+ transform: scale(1.5);
571
+ }
572
+ .count {
573
+ color: black;
574
+ }
575
+ }
576
+ }
577
+ @media (hover: none) {
578
+ @include default_morphing_sign_in_expandable();
579
+ }
580
+ }
581
+ & > .summary {
582
+ justify-content: flex-end;
583
+ $morphing-sign-width: #{$input-row-height-goal};
584
+ .count {
585
+ margin-right: calc(#{$count-distance-to-right} - #{$morphing-sign-width});
586
+ }
587
+ .morphing-sign {
588
+ // same as custom inputs
589
+ width: $morphing-sign-width;
590
+ transition-duration: 150ms;
591
+ transition-timing-function: ease-in-out;
592
+ height: $morphing-sign-width;
593
+ span {
594
+ background: black;
595
+ transition-duration: 150ms;
596
+ transition-timing-function: ease-in-out;
597
+ }
598
+ }
599
+ }
600
+ }
601
+ }
602
+ }
603
+ }
604
+ }
605
+ .range {
606
+ .input-group {
607
+ width: 100%;
608
+ display: flex;
609
+ // use paddings to not confuse useExpandingContainer
610
+ padding-top: 10px;
611
+ padding-bottom: 25px;
612
+ .field {
613
+ display: flex;
614
+ width: 100%;
615
+ align-items: center;
616
+ input {
617
+ border: $range-input-field-border;
618
+ border-radius: $range-input-field-border-radius;
619
+ background: $range-input-bg-color;
620
+ transition-duration: 50ms;
621
+ padding-top: 8px;
622
+ padding-bottom: 8px;
623
+ width: 100%;
624
+ outline: none;
625
+ text-align: center;
626
+ -moz-appearance: textfield;
627
+ &:focus-visible {
628
+ background: $hovered-range-input-bg-color;
629
+ }
630
+ @include supports-hover.supports-hover() {
631
+ &:hover {
632
+ background: $hovered-range-input-bg-color;
633
+ }
634
+ }
635
+ &::-webkit-outer-spin-button,
636
+ &::-webkit-inner-spin-button {
637
+ -webkit-appearance: none;
638
+ }
639
+ }
640
+ }
641
+ .separator {
642
+ flex-basis: 25px;
643
+ flex-shrink: 0;
644
+ display: flex;
645
+ font-size: 19px;
646
+ align-items: center;
647
+ justify-content: center;
648
+ color: $separator-color;
649
+ }
650
+ }
651
+
652
+ .slider {
653
+ height: 5px;
654
+ position: relative;
655
+ background: #ddd;
656
+ border-radius: 5px;
657
+ .progress {
658
+ height: 100%;
659
+ left: 25%;
660
+ right: 25%;
661
+ position: absolute;
662
+ border-radius: 5px;
663
+ background: variables.$brand-black;
664
+ }
665
+ }
666
+ .range-group {
667
+ position: relative;
668
+ input {
669
+ position: absolute;
670
+ width: 100%;
671
+ height: 0;
672
+ top: -2.5px;
673
+ margin: 0;
674
+ background: none;
675
+ pointer-events: none;
676
+ -webkit-appearance: none;
677
+ -moz-appearance: none;
678
+ &:focus {
679
+ outline: none;
680
+ }
681
+ $thumb_size: 20px;
682
+ &::-webkit-slider-thumb {
683
+ cursor: pointer;
684
+ height: $thumb_size;
685
+ width: $thumb_size;
686
+ border-radius: 50%;
687
+ background: variables.$brand-black;
688
+ @include supports-hover.supports-hover() {
689
+ &:hover {
690
+ background: variables.$brand-dark-grey;
691
+ }
692
+ }
693
+ pointer-events: auto;
694
+ -webkit-appearance: none;
695
+ box-shadow: 0 0 6px rgba(0, 0, 0, 0.05);
696
+ }
697
+ &::-moz-range-thumb {
698
+ // TODO: overflows to the left
699
+ cursor: pointer;
700
+ height: $thumb_size;
701
+ width: $thumb_size;
702
+ border: none;
703
+ border-radius: 50%;
704
+ background: variables.$brand-black;
705
+ @include supports-hover.supports-hover() {
706
+ &:hover {
707
+ background: variables.$brand-dark-grey;
708
+ }
709
+ }
710
+ pointer-events: auto;
711
+ -moz-appearance: none;
712
+ box-shadow: 0 0 6px rgba(0, 0, 0, 0.05);
713
+ }
714
+ &:focus-visible {
715
+ &::-webkit-slider-thumb {
716
+ background: variables.$brand-grey;
717
+ }
718
+ &::-moz-range-thumb {
719
+ background: variables.$brand-grey;
720
+ }
721
+ }
722
+ }
723
+ }
724
+
725
+ .value-text {
726
+ padding-top: 10px;
727
+ display: flex;
728
+ justify-content: space-between;
729
+ color: $price-range-min-max-text-color;
730
+ }
731
+ }
732
+ .checkbox-grid {
733
+ display: flex;
734
+ flex-wrap: wrap;
735
+ @include utils.flex-gap(10px, "row wrap");
736
+ .major,
737
+ .minor {
738
+ padding: 5px 10px;
739
+ &.minor {
740
+ border: 1px solid #d5d5d5;
741
+ }
742
+ }
743
+ }
744
+ @include CheckboxColor();
745
+ }
746
+ }
747
+ .sorting {
748
+ .body {
749
+ background: rgb(238, 238, 240);
750
+ @include utils.flex-gap(1px, "column nowrap");
751
+ line-height: 1;
752
+ .input-row {
753
+ align-items: center;
754
+ justify-content: flex-start;
755
+ display: flex;
756
+ }
757
+ }
758
+ }
759
+
760
+ @include MorphingSign.MorphingSign($filter-groups-morphing-sign-color);
761
+ @include SortAndFilterModal.SortAndFilterModal(
762
+ $mobile-top-level-collapse-color,
763
+ $mobile-top-level-collapse-background,
764
+ $sort-and-filter-modal-background: $sort-and-filter-modal-background,
765
+ $title-font-weight: $sort-and-filter-modal-section-title-font-weight,
766
+ $expanded-title-font-weight: $sort-and-filter-modal-section-expanded-title-font-weight
767
+ );
768
+
769
+ @content;
770
+ }
771
+
772
+ @mixin default_morphing_sign_in_expandable {
773
+ .morphing-sign {
774
+ span {
775
+ background: #333333;
776
+
777
+ &:first-child {
778
+ width: 5%;
779
+ left: 47.5%;
780
+ }
781
+
782
+ &:last-child {
783
+ height: 5%;
784
+ top: 47.5%;
785
+ }
786
+ }
787
+ }
788
+ }
789
+
790
+ @mixin CheckboxColor() {
791
+ .checkbox-color {
792
+ display: flex;
793
+ flex-wrap: wrap;
794
+ justify-content: space-between;
795
+
796
+ .input-row {
797
+ width: calc(50% - 10px);
798
+ }
799
+ }
800
+ }