@depict-ai/react-ui 2.0.5 → 2.0.7

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 (47) 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 +293 -0
  5. package/dist/module.js +285 -0
  6. package/dist/styles/components/PLP/Buttons.scss +124 -0
  7. package/dist/styles/components/PLP/MorphingSign.scss +31 -0
  8. package/dist/styles/components/PLP/PLPResults.scss +20 -0
  9. package/dist/styles/components/PLP/ProductListingPage.scss +142 -0
  10. package/dist/styles/components/PLP/ScrollStatus.scss +24 -0
  11. package/dist/styles/components/PLP/SelectedFilters.scss +74 -0
  12. package/dist/styles/components/PLP/SlidableItems.scss +99 -0
  13. package/dist/styles/components/PLP/SortAndFilter/FloatingButtons.scss +75 -0
  14. package/dist/styles/components/PLP/SortAndFilter/SortAndFilter.scss +728 -0
  15. package/dist/styles/components/PLP/SortAndFilter/SortAndFilterModal.scss +160 -0
  16. package/dist/styles/components/PLP/SortAndFilter/WhiteSortAndFilter.scss +148 -0
  17. package/dist/styles/components/PLP/Toast.scss +54 -0
  18. package/dist/styles/components/PLP/index.scss +45 -0
  19. package/dist/styles/components/category/BreadCrumbs.scss +23 -0
  20. package/dist/styles/components/category/CategoryTitle.scss +28 -0
  21. package/dist/styles/components/category/QuickLinks.scss +71 -0
  22. package/dist/styles/components/category/index.scss +23 -0
  23. package/dist/styles/components/search/Autocomplete.scss +117 -0
  24. package/dist/styles/components/search/CategorySuggestions.scss +74 -0
  25. package/dist/styles/components/search/InstantCard.scss +117 -0
  26. package/dist/styles/components/search/InstantResults.scss +10 -0
  27. package/dist/styles/components/search/PreviousSearches.scss +77 -0
  28. package/dist/styles/components/search/QueryInput.scss +167 -0
  29. package/dist/styles/components/search/SearchModal.scss +95 -0
  30. package/dist/styles/components/search/SearchRecommendations.scss +25 -0
  31. package/dist/styles/components/search/ShowingResultsFor.scss +10 -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 +162 -0
  35. package/dist/styles/helpers/supports-hover.scss +5 -0
  36. package/dist/styles/helpers/utils.scss +82 -0
  37. package/dist/styles/variables.scss +47 -0
  38. package/latest/index.cjs +1 -1
  39. package/latest/index.d.ts +1 -1
  40. package/latest/index.js +1 -1
  41. package/package.json +2 -2
  42. package/server/ES10/index.cjs +1 -1
  43. package/server/ES10/index.d.ts +1 -1
  44. package/server/ES10/index.js +1 -1
  45. package/server/latest/index.cjs +1 -1
  46. package/server/latest/index.d.ts +1 -1
  47. package/server/latest/index.js +1 -1
@@ -0,0 +1,160 @@
1
+ @use "../../../variables";
2
+ @use "../../../helpers/utils";
3
+
4
+ /*
5
+ * Mobile modal - taking arguments from SortAndFilter mixin
6
+ */
7
+ @mixin SortAndFilterModal(
8
+ $mobile-top-level-collapse-color,
9
+ $mobile-top-level-collapse-background,
10
+ $close-icon-color: #fff,
11
+ $some-text-color: variables.$brand-dark-grey,
12
+ $sort-and-filter-modal-background: variables.$brand-lighter-grey,
13
+ $title-font-weight: false,
14
+ $expanded-title-font-weight: $title-font-weight
15
+ ) {
16
+ .depict-filter-sort-modal-backdrop {
17
+ @include utils.modal-backdrop($background: rgba(0, 0, 0, 0.7), $z-index: variables.$base-z-index);
18
+ will-change: opacity;
19
+ opacity: 0;
20
+ }
21
+
22
+ .dismiss-modal {
23
+ background: transparent;
24
+ padding: 0;
25
+ line-height: 0;
26
+ border: none;
27
+ position: fixed;
28
+ top: 14px;
29
+ transform: translateY(calc(-100% - 14px));
30
+ left: 4px;
31
+ z-index: variables.$base-z-index + 3;
32
+ cursor: pointer;
33
+ svg {
34
+ transform: scale(0.6646);
35
+ path {
36
+ fill: $close-icon-color;
37
+ }
38
+ }
39
+ }
40
+
41
+ .filter-sort-modal {
42
+ z-index: calc(variables.$base-z-index + 2);
43
+ position: fixed;
44
+ top: 0;
45
+ left: 30px;
46
+ width: calc(100% - 30px);
47
+ height: 100%;
48
+ background: $sort-and-filter-modal-background;
49
+ display: flex;
50
+ flex-direction: column;
51
+ justify-content: space-between;
52
+ will-change: transform;
53
+ transform: translateY(100%);
54
+
55
+ // the toggles that close/expand the whole sorting and filter section on mobile
56
+ details {
57
+ &.sorting,
58
+ &.filters {
59
+ & > summary {
60
+ list-style: none;
61
+ &::-webkit-details-marker {
62
+ display: none;
63
+ }
64
+ }
65
+ .sort-filter-summary > .summary {
66
+ cursor: pointer;
67
+ box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.05);
68
+ color: $mobile-top-level-collapse-color;
69
+ padding: 13px 20px;
70
+ background: $mobile-top-level-collapse-background;
71
+ display: flex;
72
+ justify-content: space-between;
73
+ @if $title-font-weight {
74
+ font-weight: $title-font-weight;
75
+ }
76
+ .left-els {
77
+ display: flex;
78
+ align-items: center;
79
+ @include utils.flex-gap(10px, "row nowrap");
80
+ }
81
+ }
82
+ }
83
+ &[open] {
84
+ .sort-filter-summary > .summary {
85
+ @if $expanded-title-font-weight {
86
+ font-weight: $expanded-title-font-weight;
87
+ }
88
+ }
89
+ }
90
+ }
91
+ .filter-icon,
92
+ .sort-icon {
93
+ fill: $mobile-top-level-collapse-color;
94
+ }
95
+
96
+ & > .body {
97
+ overflow-y: auto;
98
+ display: flex;
99
+ flex-direction: column;
100
+ background: $sort-and-filter-modal-background;
101
+ @include utils.flex-gap(2px, "column nowrap");
102
+ }
103
+ .filters,
104
+ .sorting {
105
+ .body {
106
+ color: $some-text-color;
107
+ }
108
+ & > summary {
109
+ .morphing-sign span {
110
+ background: $mobile-top-level-collapse-color;
111
+ }
112
+ }
113
+ }
114
+
115
+ .filters {
116
+ .filter-collapsible-body {
117
+ background: transparent;
118
+ }
119
+ .body {
120
+ padding: 10px;
121
+ background: unset;
122
+
123
+ .filter-part,
124
+ .view-more-clear {
125
+ background: rgb(253, 253, 253);
126
+ }
127
+ }
128
+ }
129
+ .sorting .body {
130
+ margin: 10px;
131
+ background: rgb(238, 238, 240);
132
+ border-radius: variables.$border-radius;
133
+ padding: 0;
134
+ }
135
+
136
+ .bottom-row {
137
+ flex-shrink: 0;
138
+ padding: 10px;
139
+ display: flex;
140
+ justify-content: space-between;
141
+ @include utils.flex-gap(10px, "row nowrap");
142
+
143
+ & > button {
144
+ padding-top: 12px;
145
+ padding-bottom: 12px;
146
+ border-radius: variables.$border-radius;
147
+ }
148
+
149
+ .show-results {
150
+ flex-grow: 1;
151
+ font-weight: 500;
152
+ font-size: 1.1em;
153
+ }
154
+
155
+ .clear {
156
+ font-size: 1.1em;
157
+ }
158
+ }
159
+ }
160
+ }
@@ -0,0 +1,148 @@
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 "SortAndFilter";
8
+
9
+ @mixin WhiteSortAndFilter(
10
+ $mobile-top-level-collapse-color: variables.$brand-black,
11
+ $mobile-top-level-collapse-background: #fff,
12
+ $custom-input-checked-background: #fff,
13
+ $custom-input-background: #fff,
14
+ $custom-input-indicator-color: variables.$brand-black,
15
+ $checkbox-background-color: #fff,
16
+ $checkbox-checked-background-color: variables.$brand-black,
17
+ $checkbox-checkmark-color: #fff,
18
+ $checkbox-border-radius: if(variables.$border-radius == 0, 0, if(variables.$border-radius == 0px, 0, 2px)),
19
+ // if global border radius is 0 or 0px, don't round input fields in their default value
20
+ $checkbox-border: 1px solid variables.$brand-black,
21
+ $checkbox-top-offset: 0px,
22
+ $checkbox-left-offset: 0px,
23
+ $radio-border: 1px solid variables.$brand-black,
24
+ $radio-background-color: #fff,
25
+ $radio-selected-dot-color: variables.$brand-black,
26
+ $radio-selected-dot-size: 14px,
27
+ $radio-selected-offset: 0px,
28
+ $separator-color: variables.$brand-dark-grey,
29
+ $price-range-min-max-text-color: variables.$brand-dark-grey,
30
+ $range-input-bg-color: variables.$brand-lightest-grey,
31
+ $clear-all-filters-color: #fff,
32
+ $top-level-summary-background: transparent,
33
+ $hovered-top-level-summary-background: variables.$brand-lightest-grey,
34
+ $hovered-range-input-bg-color: variables.$brand-lighter-grey,
35
+ $hovered-checkbox-bg: variables.$brand-lighter-grey,
36
+ $hovered-checkbox-checked-background-color: variables.$brand-dark-grey,
37
+ $input-row-label-color: variables.$brand-dark-grey,
38
+ $checked-input-row-label-color: #000,
39
+ $input-row-label-font-weight: 400,
40
+ $checked-input-row-label-font-weight: 500,
41
+ $showing-selected-subfilter-count-color: variables.$brand-grey,
42
+ $filter-available-products-color: variables.$brand-grey,
43
+ $count-zero-input-row-label-color: rgb(194, 194, 194),
44
+ $spacing_between_input_rows: 10px,
45
+ $ungrouped-top-margin: 25px,
46
+ $hovered-checkbox-border: 2px solid variables.$brand-black,
47
+ $hovered-radio-border: 2px solid variables.$brand-black,
48
+ $sort-and-filter-button-padding: 10px 20px,
49
+ $expandable-seperator-color: variables.$brand-lightest-grey,
50
+ $expandable-seperator-hover-color: variables.$brand-lighter-grey,
51
+ $expandable-seperator-height: 1px,
52
+ $filter-group-heading-color: variables.$brand-dark-grey,
53
+ $filter-groups-morphing-sign-color: variables.$brand-dark-grey,
54
+ $filter-group-border-color: variables.$brand-light-grey,
55
+ $filter-group-summary-border-radius: 0px,
56
+ $sort-and-filter-modal-background: white,
57
+ $filter-group-heading-padding: 15px 10px,
58
+ $filter-group-summary-spacings: 0px,
59
+ $range-input-field-border-radius: 0px,
60
+ $range-input-field-border: 0.5px solid #000000,
61
+ $filter-group-title-bold: 500,
62
+ $view-more-clear-background: white,
63
+ $filter-collapsible-body-background: white,
64
+ $sort-and-filter-modal-section-title-font-weight: bold,
65
+ $sort-and-filter-modal-section-expanded-title-font-weight: $sort-and-filter-modal-section-title-font-weight,
66
+ $expanded-filter-group-border-color: variables.$brand-lighter-grey,
67
+ $view-more-clear-border-color: variables.$brand-lighter-grey
68
+ ) {
69
+ @include SortAndFilter.SortAndFilter(
70
+ $mobile-top-level-collapse-color,
71
+ $mobile-top-level-collapse-background,
72
+ $custom-input-checked-background,
73
+ $custom-input-background,
74
+ $custom-input-indicator-color,
75
+ $checkbox-background-color,
76
+ $checkbox-checked-background-color,
77
+ $checkbox-checkmark-color,
78
+ $checkbox-border-radius,
79
+ $checkbox-border,
80
+ $checkbox-top-offset,
81
+ $checkbox-left-offset,
82
+ $radio-border,
83
+ $radio-background-color,
84
+ $radio-selected-dot-color,
85
+ $radio-selected-dot-size,
86
+ $radio-selected-offset,
87
+ $separator-color,
88
+ $price-range-min-max-text-color,
89
+ $range-input-bg-color,
90
+ $top-level-summary-background,
91
+ $hovered-top-level-summary-background,
92
+ $hovered-range-input-bg-color,
93
+ $hovered-checkbox-bg,
94
+ $hovered-checkbox-checked-background-color,
95
+ $input-row-label-color,
96
+ $checked-input-row-label-color,
97
+ $input-row-label-font-weight,
98
+ $checked-input-row-label-font-weight,
99
+ $showing-selected-subfilter-count-color,
100
+ $filter-available-products-color,
101
+ $count-zero-input-row-label-color,
102
+ $spacing_between_input_rows,
103
+ $ungrouped-top-margin,
104
+ $hovered-checkbox-border,
105
+ $hovered-radio-border,
106
+ $sort-and-filter-button-padding,
107
+ $expandable-seperator-color,
108
+ $expandable-seperator-hover-color,
109
+ $expandable-seperator-height,
110
+ $filter-group-heading-color,
111
+ $filter-groups-morphing-sign-color,
112
+ $filter-group-summary-border-radius,
113
+ $sort-and-filter-modal-background,
114
+ $filter-group-heading-padding,
115
+ $filter-group-summary-spacings,
116
+ $range-input-field-border-radius,
117
+ $range-input-field-border,
118
+ $filter-group-title-bold,
119
+ $view-more-clear-background,
120
+ $filter-collapsible-body-background,
121
+ $sort-and-filter-modal-section-title-font-weight,
122
+ $sort-and-filter-modal-section-expanded-title-font-weight
123
+ );
124
+ .filters .body {
125
+ details.filter-collapsible {
126
+ border-top: 1px solid $filter-group-border-color;
127
+ &[open] {
128
+ & > summary {
129
+ border-bottom: 1px solid $expanded-filter-group-border-color;
130
+ }
131
+ }
132
+ .filter-collapsible-body {
133
+ margin-bottom: 15px;
134
+ }
135
+ }
136
+ .view-more-clear {
137
+ border-top: 1px solid $view-more-clear-border-color;
138
+ }
139
+ }
140
+ .filter-sort-modal details {
141
+ &.sorting,
142
+ &.filters {
143
+ .sort-filter-summary > .summary {
144
+ border-top: 1px solid #f4f4f4;
145
+ }
146
+ }
147
+ }
148
+ }
@@ -0,0 +1,54 @@
1
+ @use "../../variables";
2
+ @use "../../helpers/utils";
3
+
4
+ @mixin Toast($z-index: calc(#{variables.$base-z-index} + 5), $progress-bar-color: variables.$brand-dark-grey) {
5
+ .depict.plp.toast {
6
+ position: fixed;
7
+ bottom: 10px;
8
+ left: 50%;
9
+ transform: translateX(-50%);
10
+ z-index: $z-index;
11
+ background: white;
12
+ box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.05);
13
+ padding: 10px 20px;
14
+ border-radius: variables.$border-radius;
15
+ border-image-source: linear-gradient(90deg, $progress-bar-color 0%, $progress-bar-color 100%);
16
+ border-image-slice: 0 0 100% 0;
17
+ border-bottom-style: solid;
18
+ border-bottom-width: 2px; // doesn't show in chrome sometimes without
19
+ white-space: nowrap;
20
+
21
+ *,
22
+ & * {
23
+ user-select: none;
24
+ -webkit-user-select: none;
25
+ }
26
+
27
+ @media (min-width: 1000px) {
28
+ padding: 10px 40px;
29
+ }
30
+
31
+ &,
32
+ & .buttons {
33
+ display: flex;
34
+ justify-content: center;
35
+ align-items: center;
36
+ @media (max-width: 999px) {
37
+ @include utils.flex-gap(10px, "row nowrap");
38
+ }
39
+ @media (min-width: 1000px) {
40
+ @include utils.flex-gap(30px, "row nowrap");
41
+ }
42
+ }
43
+
44
+ & {
45
+ color: variables.$brand-dark-grey;
46
+ }
47
+ button {
48
+ padding: 5px 20px;
49
+ border-radius: variables.$border-radius;
50
+ cursor: pointer;
51
+ }
52
+ @content;
53
+ }
54
+ }
@@ -0,0 +1,45 @@
1
+ @use "sass:meta";
2
+
3
+ // Component style mixins
4
+ @use "SelectedFilters";
5
+ @use "ScrollStatus";
6
+ @use "SlidableItems";
7
+ @use "PLPResults";
8
+ @use "SortAndFilter/SortAndFilter";
9
+ @use "SortAndFilter/WhiteSortAndFilter";
10
+ @use "SortAndFilter/FloatingButtons";
11
+ @use "Toast";
12
+ @use "ProductListingPage";
13
+ @use "Buttons";
14
+
15
+ @forward "SelectedFilters";
16
+ @forward "ScrollStatus";
17
+ @forward "SlidableItems";
18
+ @forward "PLPResults";
19
+ @forward "SortAndFilter/SortAndFilter";
20
+ @forward "SortAndFilter/WhiteSortAndFilter";
21
+ @forward "SortAndFilter/FloatingButtons";
22
+ @forward "Toast";
23
+ @forward "ProductListingPage";
24
+ @forward "Buttons";
25
+
26
+ // Default variables
27
+ @forward "../../variables";
28
+
29
+ // Load all mixins with default values. If only minor theming is needed styles in variables.scss can be
30
+ // reassigned: https://sass-lang.com/documentation/at-rules/use#reassigning-variables
31
+ // If more control is needed use these mixins separately and pass custom params
32
+ @mixin all-components() {
33
+ .depict.plp {
34
+ @include PLPResults.PLPResults();
35
+ @include ProductListingPage.ProductListingPage();
36
+ @include SelectedFilters.SelectedFilters();
37
+ @include ScrollStatus.ScrollStatus();
38
+ @include SortAndFilter.SortAndFilter();
39
+ @include FloatingButtons.FloatingButtons();
40
+ @include SlidableItems.SlidableItems();
41
+ @include Buttons.PrimaryButton();
42
+ @include Buttons.SecondaryButton();
43
+ }
44
+ @include Toast.Toast();
45
+ }
@@ -0,0 +1,23 @@
1
+ @use "../../variables";
2
+
3
+ @mixin BreadCrumbs() {
4
+ .crumbs {
5
+ display: flex;
6
+ flex-wrap: wrap;
7
+ .crumb {
8
+ color: variables.$brand-dark-grey;
9
+ &:hover {
10
+ text-decoration: underline;
11
+ }
12
+ &:last-of-type {
13
+ color: variables.$brand-black;
14
+ font-weight: 500;
15
+ }
16
+ }
17
+ .separator {
18
+ margin-left: 10px;
19
+ margin-right: 10px;
20
+ color: variables.$brand-grey;
21
+ }
22
+ }
23
+ }
@@ -0,0 +1,28 @@
1
+ @use "../../variables";
2
+ @use "../../helpers/utils";
3
+ @use "../../helpers/supports-hover";
4
+
5
+ @mixin CategoryTitle($title-font-weight: 700, $explanation-font-weight: 500, $title-color: variables.$brand-grey) {
6
+ .category-title {
7
+ overflow-wrap: anywhere;
8
+ font-size: 1.5em;
9
+ display: flex;
10
+ align-items: center;
11
+ flex-wrap: wrap;
12
+ * {
13
+ display: flex;
14
+ align-items: center;
15
+ }
16
+ .title {
17
+ margin-right: 10px;
18
+ font-weight: $title-font-weight;
19
+ }
20
+ .explanation {
21
+ color: $title-color;
22
+ font-weight: $explanation-font-weight;
23
+ .product-count {
24
+ margin-left: 10px;
25
+ }
26
+ }
27
+ }
28
+ }
@@ -0,0 +1,71 @@
1
+ @use "../../variables";
2
+ @use "../../helpers/utils";
3
+ @use "../../helpers/supports-hover";
4
+ @use "../PLP/Buttons";
5
+ @use "sass:color";
6
+
7
+ @mixin QuickLinks(
8
+ $background: white,
9
+ $border-radius: false,
10
+ $selected-background: Buttons.$primary-button-background,
11
+ $hovered-background: false
12
+ ) {
13
+ .quicklinks {
14
+ overflow: hidden;
15
+ .quicklink {
16
+ white-space: nowrap;
17
+ padding: 10px 20px;
18
+ border-radius: variables.$border-radius;
19
+ background: $background;
20
+ color: variables.$brand-black;
21
+ transition: all 75ms ease-in-out;
22
+ &:focus {
23
+ outline: none;
24
+ }
25
+ @if $border-radius {
26
+ border-radius: $border-radius;
27
+ }
28
+ @include supports-hover.supports-hover() {
29
+ &:hover {
30
+ @if $hovered-background {
31
+ background: $hovered-background;
32
+ } @else {
33
+ @include utils.highlight-background($normal-background: $background);
34
+ }
35
+ }
36
+ }
37
+ &:focus-visible {
38
+ @if $hovered-background {
39
+ background: $hovered-background;
40
+ } @else {
41
+ @include utils.highlight-background($normal-background: $background);
42
+ }
43
+ filter: Buttons.$secondary-button-focus-visible-filter;
44
+ }
45
+ &:active {
46
+ @include utils.highlight-background($normal-background: $background, $darken-factor: 10%, $lighten-factor: 20%);
47
+ }
48
+ &.selected {
49
+ color: white;
50
+ background: $selected-background;
51
+ @include supports-hover.supports-hover() {
52
+ &:hover {
53
+ // should we have this? since it's selected, nothing will happen when clicked
54
+ @include utils.highlight-background($normal-background: $selected-background);
55
+ }
56
+ }
57
+ &:focus-visible {
58
+ @include utils.highlight-background($normal-background: $selected-background);
59
+ filter: Buttons.$primary-button-focus-visible-filter;
60
+ }
61
+ &:active {
62
+ @include utils.highlight-background(
63
+ $normal-background: $selected-background,
64
+ $darken-factor: 10%,
65
+ $lighten-factor: 20%
66
+ );
67
+ }
68
+ }
69
+ }
70
+ }
71
+ }
@@ -0,0 +1,23 @@
1
+ // Component style mixins
2
+ @use "BreadCrumbs";
3
+ @use "QuickLinks";
4
+ @use "CategoryTitle";
5
+ @use "../PLP/ProductListingPage";
6
+
7
+ @forward "BreadCrumbs";
8
+ @forward "QuickLinks";
9
+ @forward "CategoryTitle";
10
+ @forward "../PLP/ProductListingPage";
11
+
12
+ // Load all mixins with default values. If only minor theming is needed styles in variables.scss can be
13
+ // reassigned: https://sass-lang.com/documentation/at-rules/use#reassigning-variables
14
+ // The variables are forwarded from PLP/index.scss
15
+ // If more control is needed use these mixins separately and pass custom params
16
+ @mixin all-components() {
17
+ .depict.category {
18
+ @include BreadCrumbs.BreadCrumbs();
19
+ @include QuickLinks.QuickLinks();
20
+ @include CategoryTitle.CategoryTitle();
21
+ @include ProductListingPage.CategoryPage();
22
+ }
23
+ }
@@ -0,0 +1,117 @@
1
+ @use "../../variables";
2
+ @use "../../helpers/utils";
3
+ @use "PreviousSearches";
4
+ @use "../PLP/Buttons";
5
+
6
+ @mixin Autocomplete(
7
+ $background: white,
8
+ $selected-background: #ffffff80,
9
+ $search-icon-color: variables.$brand-black,
10
+ $history-icon-color: variables.$brand-black,
11
+ $autocomplete-gap-between-items-in-row-mode: 5px,
12
+ $autocomplete-gap-between-category-and-other: 20px,
13
+ $heading-color: variables.$brand-dark-grey,
14
+ $heading-font-weight: 700,
15
+ $entries-without-highlight-color: variables.$brand-dark-grey,
16
+ $entries-without-highlight-font-weight: 400,
17
+ $entries-with-highlight-highlighted-part-color: variables.$brand-dark-grey,
18
+ $entries-with-highlight-highlighted-part-font-weight: 500,
19
+ $entries-with-highlight-toned-down-part-color: variables.$brand-dark-grey,
20
+ $entries-with-highlight-toned-down-part-font-weight: 400
21
+ ) {
22
+ @include PreviousSearches.PreviousSearches(
23
+ $icon-color: $history-icon-color,
24
+ $item-color: $entries-without-highlight-color
25
+ );
26
+ .previous-searches,
27
+ .suggestions {
28
+ .text {
29
+ font-size: 16px;
30
+ font-weight: $heading-font-weight;
31
+ color: $heading-color;
32
+ margin-top: 0;
33
+ }
34
+ .item,
35
+ .suggestion {
36
+ background: $background;
37
+ &.selected {
38
+ background: $selected-background;
39
+ }
40
+
41
+ &:focus-visible {
42
+ outline: none;
43
+ filter: Buttons.$secondary-button-focus-visible-filter;
44
+ }
45
+ }
46
+ }
47
+ .suggestions {
48
+ display: flex;
49
+ flex-direction: column;
50
+ @include utils.flex-gap($autocomplete-gap-between-category-and-other, "column nowrap");
51
+
52
+ &:not(.compact) > .suggestion-container,
53
+ &.compact > .suggestion-container:not(.query) {
54
+ @include utils.flex-gap($autocomplete-gap-between-items-in-row-mode, "column nowrap");
55
+ }
56
+ .suggestion-container {
57
+ display: flex;
58
+ flex-direction: column;
59
+ .suggestion {
60
+ svg {
61
+ flex-shrink: 0;
62
+ }
63
+ display: flex;
64
+ justify-content: space-between;
65
+ overflow-wrap: anywhere;
66
+ align-items: center;
67
+ border-radius: variables.$border-radius;
68
+ font-weight: $entries-without-highlight-font-weight;
69
+ color: $entries-without-highlight-color;
70
+
71
+ padding: 10px 20px;
72
+
73
+ .search-icon {
74
+ max-width: 12px;
75
+ max-height: 13px;
76
+ svg {
77
+ transform: scale(0.6) translate(-6.9px, -7.2px);
78
+ path {
79
+ fill: $search-icon-color;
80
+ }
81
+ }
82
+ }
83
+
84
+ .has-history-match {
85
+ color: $entries-with-highlight-toned-down-part-color;
86
+ font-weight: $entries-with-highlight-toned-down-part-font-weight;
87
+ .highlighted-part {
88
+ color: $entries-with-highlight-highlighted-part-color;
89
+ font-weight: $entries-with-highlight-highlighted-part-font-weight;
90
+ }
91
+ }
92
+
93
+ .category {
94
+ margin-right: 20px;
95
+ }
96
+
97
+ .type {
98
+ color: #868689;
99
+ text-transform: capitalize;
100
+ }
101
+ }
102
+
103
+ &.query {
104
+ flex-direction: column;
105
+ .suggestion {
106
+ justify-content: flex-start;
107
+ @include utils.flex-gap(8px, "row nowrap");
108
+ }
109
+ }
110
+ }
111
+ &.compact > .suggestion-container.query {
112
+ flex-direction: row;
113
+ flex-wrap: wrap;
114
+ @include utils.flex-gap(5px, "row wrap");
115
+ }
116
+ }
117
+ }