@depict-ai/react-ui 2.1.4 → 2.1.6
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/ES10/index.cjs +1 -1
- package/ES10/index.d.ts +1 -1
- package/ES10/index.js +1 -1
- package/latest/index.cjs +1 -1
- package/latest/index.d.ts +1 -1
- package/latest/index.js +1 -1
- package/package.json +2 -2
- package/server/ES10/index.cjs +1 -1
- package/server/ES10/index.d.ts +1 -1
- package/server/ES10/index.js +1 -1
- package/server/latest/index.cjs +1 -1
- package/server/latest/index.d.ts +1 -1
- package/server/latest/index.js +1 -1
- package/dist/main.js +0 -527
- package/dist/module.js +0 -510
- package/dist/styles/components/PLP/Buttons.scss +0 -181
- package/dist/styles/components/PLP/MorphingSign.scss +0 -30
- package/dist/styles/components/PLP/PLPResults.scss +0 -26
- package/dist/styles/components/PLP/ProductListingPage.scss +0 -168
- package/dist/styles/components/PLP/ScrollStatus.scss +0 -31
- package/dist/styles/components/PLP/SelectedFilters.scss +0 -82
- package/dist/styles/components/PLP/SlidableItems.scss +0 -121
- package/dist/styles/components/PLP/SortAndFilter/FloatingButtons.scss +0 -84
- package/dist/styles/components/PLP/SortAndFilter/SortAndFilter.scss +0 -800
- package/dist/styles/components/PLP/SortAndFilter/SortAndFilterModal.scss +0 -158
- package/dist/styles/components/PLP/SortAndFilter/WhiteSortAndFilter.scss +0 -152
- package/dist/styles/components/PLP/Toast.scss +0 -59
- package/dist/styles/components/PLP/index.scss +0 -51
- package/dist/styles/components/category/BreadCrumbs.scss +0 -32
- package/dist/styles/components/category/CategoryTitle.scss +0 -40
- package/dist/styles/components/category/QuickLinks.scss +0 -80
- package/dist/styles/components/category/index.scss +0 -23
- package/dist/styles/components/search/Autocomplete.scss +0 -197
- package/dist/styles/components/search/CategorySuggestions.scss +0 -82
- package/dist/styles/components/search/InstantCard.scss +0 -122
- package/dist/styles/components/search/InstantResults.scss +0 -12
- package/dist/styles/components/search/PreviousSearches.scss +0 -90
- package/dist/styles/components/search/QueryInput.scss +0 -189
- package/dist/styles/components/search/SearchModal.scss +0 -101
- package/dist/styles/components/search/SearchRecommendations.scss +0 -28
- package/dist/styles/components/search/ShowingResultsFor.scss +0 -13
- package/dist/styles/components/search/index.scss +0 -40
- package/dist/styles/default.css +0 -1
- package/dist/styles/helpers/custom_input.scss +0 -194
- package/dist/styles/helpers/supports-hover.scss +0 -7
- package/dist/styles/helpers/utils.scss +0 -90
- package/dist/styles/variables.scss +0 -61
|
@@ -1,181 +0,0 @@
|
|
|
1
|
-
@use "../../variables";
|
|
2
|
-
@use "../../helpers/supports-hover";
|
|
3
|
-
@use "../../helpers/utils";
|
|
4
|
-
@use "sass:color";
|
|
5
|
-
@use "sass:map";
|
|
6
|
-
|
|
7
|
-
$primary-button-overrides: ();
|
|
8
|
-
$secondary-button-overrides: ();
|
|
9
|
-
|
|
10
|
-
/// Used to get the current properties of the primary button. (`Buttons.$primary-button-overrides` merged into the default properties.) This is so that parts of the button styling can be re-used in other mixins in the state they were in as the mixins get called.
|
|
11
|
-
/// @example
|
|
12
|
-
/// filter: map.get(Buttons.get-primary-button-properties(), "focus-visible-filter");
|
|
13
|
-
@function get-primary-button-properties() {
|
|
14
|
-
$primary-button-properties: (
|
|
15
|
-
"background": variables.$brand-black,
|
|
16
|
-
"color": #fff,
|
|
17
|
-
// so that the page doesn't jump when there's half a border when switching between having sort and filters open (the buttons switch between pimary and secondary)
|
|
18
|
-
"border": 1px solid transparent,
|
|
19
|
-
"border-radius": variables.$border-radius,
|
|
20
|
-
"hover-filter": drop-shadow(-2px -2px 4px rgba(255, 255, 255, 0.25)) drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.15)),
|
|
21
|
-
"active-filter": drop-shadow(2px 2px 4px rgba(255, 255, 255, 0.25)) drop-shadow(-2px -2px 4px rgba(0, 0, 0, 0.15)),
|
|
22
|
-
"focus-visible-filter": drop-shadow(2px 2px 4px rgba(65, 143, 195, 0.8))
|
|
23
|
-
drop-shadow(-2px -2px 4px rgba(65, 143, 195, 0.8)),
|
|
24
|
-
);
|
|
25
|
-
@return map.merge($primary-button-properties, $primary-button-overrides);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
/// Used to get the current properties of the secondary button. (`Buttons.$secondary-button-overrides` merged into the default properties.) This is so that parts of the button styling can be re-used in other mixins in the state they were in as the mixins get called.
|
|
29
|
-
/// @example
|
|
30
|
-
/// filter: map.get(Buttons.get-secondary-button-properties(), "focus-visible-filter");
|
|
31
|
-
@function get-secondary-button-properties() {
|
|
32
|
-
$secondary-button-properties: (
|
|
33
|
-
"background": variables.$brand-lightest-grey,
|
|
34
|
-
"color": variables.$brand-dark-grey,
|
|
35
|
-
"border": 1px solid variables.$brand-black,
|
|
36
|
-
"border-radius": variables.$border-radius,
|
|
37
|
-
"hover-filter": drop-shadow(-2px -2px 4px rgba(255, 255, 255, 0.25)) drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.15)),
|
|
38
|
-
"active-filter": drop-shadow(2px 2px 4px rgba(255, 255, 255, 0.25)) drop-shadow(-2px -2px 4px rgba(0, 0, 0, 0.15)),
|
|
39
|
-
"focus-visible-filter": drop-shadow(-2px -2px 4px rgba(65, 143, 195, 0.8))
|
|
40
|
-
drop-shadow(2px 2px 4px rgba(65, 143, 195, 0.8)),
|
|
41
|
-
);
|
|
42
|
-
@return map.merge($secondary-button-properties, $secondary-button-overrides);
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
/// Generates styling for our primary buttons, including hover, active and focus-visible states
|
|
46
|
-
///
|
|
47
|
-
/// *Please only provide options to this mixin if you want to create styling for just a specific button.*
|
|
48
|
-
///
|
|
49
|
-
/// This mixin and the SecondaryButton mixin are currently specialties in how they get customised using maps. Everything that isn't customised using maps is subject to change in the future.
|
|
50
|
-
////
|
|
51
|
-
/// *For generally changing how the buttons look, override the $primary-button-overrides map with a custom map containing the properties you want to change.*
|
|
52
|
-
/// See the example below.
|
|
53
|
-
/// @example
|
|
54
|
-
/// // To override styling (see explanation in description)
|
|
55
|
-
/// Buttons.$primary-button-overrides: ("background": #3f322a, "color": rgb(240,240,240));
|
|
56
|
-
/// @param {Color} $background [map.get(get-primary-button-properties(), "background")] - The background color of the button. From this color other button states will be automatically inferred by lightening or darkening it.
|
|
57
|
-
///
|
|
58
|
-
/// @param {Color} $color [map.get(get-primary-button-properties(), "color")] - The color of the button text
|
|
59
|
-
/// @param {Border} $border [map.get(get-primary-button-properties(), "border")] - The button border
|
|
60
|
-
/// @param {Number with unit} $border-radius [map.get(get-primary-button-properties(), "border-radius")] - The button border radius
|
|
61
|
-
/// @param {Filter} $hover-filter [map.get(get-primary-button-properties(), "hover-filter")] - The filter to apply on hover
|
|
62
|
-
/// @param {Filter} $active-filter [map.get(get-primary-button-properties(), "active-filter")] - The filter to apply on active
|
|
63
|
-
/// @param {Filter} $focus-visible-filter [map.get(get-primary-button-properties(), "focus-visible-filter")] - The filter to apply on focus-visible (when the button is focused using keyboard navigation)
|
|
64
|
-
|
|
65
|
-
@mixin PrimaryButton(
|
|
66
|
-
$background: map.get(get-primary-button-properties(), "background"),
|
|
67
|
-
$color: map.get(get-primary-button-properties(), "color"),
|
|
68
|
-
$border: map.get(get-primary-button-properties(), "border"),
|
|
69
|
-
$border-radius: map.get(get-primary-button-properties(), "border-radius"),
|
|
70
|
-
$hover-filter: map.get(get-primary-button-properties(), "hover-filter"),
|
|
71
|
-
$active-filter: map.get(get-primary-button-properties(), "active-filter"),
|
|
72
|
-
$focus-visible-filter: map.get(get-primary-button-properties(), "focus-visible-filter")
|
|
73
|
-
) {
|
|
74
|
-
// not using button.primary since that's 100% going to conflict with existing declarations on sites
|
|
75
|
-
button.major {
|
|
76
|
-
@include Button(
|
|
77
|
-
$background,
|
|
78
|
-
$color,
|
|
79
|
-
$border,
|
|
80
|
-
$border-radius,
|
|
81
|
-
$hover-filter,
|
|
82
|
-
$active-filter,
|
|
83
|
-
$focus-visible-filter
|
|
84
|
-
) {
|
|
85
|
-
@content;
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
/// Generates styling for our secondary buttons, including hover, active and focus-visible states
|
|
91
|
-
///
|
|
92
|
-
/// *Please only provide options to this mixin if you want to create styling for just a specific button.*
|
|
93
|
-
///
|
|
94
|
-
/// This mixin and the SecondaryButton mixin are currently specialties in how they get customised using maps. Everything that isn't customised using maps is subject to change in the future.
|
|
95
|
-
////
|
|
96
|
-
/// *For generally changing how the buttons look, override the $secondary-button-overrides map with a custom map containing the properties you want to change.*
|
|
97
|
-
/// See the example below.
|
|
98
|
-
/// @example
|
|
99
|
-
/// // To override styling (see explanation in description)
|
|
100
|
-
/// Buttons.$secondary-button-overrides: ("border": 1px solid #afafaf, "background": white);
|
|
101
|
-
/// @param {Color} $background [map.get(get-secondary-button-properties(), "background")] - The background color of the button. From this color other button states will be automatically inferred by lightening or darkening it.
|
|
102
|
-
///
|
|
103
|
-
/// @param {Color} $color [map.get(get-secondary-button-properties(), "color")] - The color of the button text
|
|
104
|
-
/// @param {Border} $border [map.get(get-secondary-button-properties(), "border")] - The button border
|
|
105
|
-
/// @param {Number with unit} $border-radius [map.get(get-secondary-button-properties(), "border-radius")] - The button border radius
|
|
106
|
-
/// @param {Filter} $hover-filter [map.get(get-secondary-button-properties(), "hover-filter")] - The filter to apply on hover
|
|
107
|
-
/// @param {Filter} $active-filter [map.get(get-secondary-button-properties(), "active-filter")] - The filter to apply on active
|
|
108
|
-
/// @param {Filter} $focus-visible-filter [map.get(get-secondary-button-properties(), "focus-visible-filter")] - The filter to apply on focus-visible (when the button is focused using keyboard navigation)
|
|
109
|
-
|
|
110
|
-
@mixin SecondaryButton(
|
|
111
|
-
$background: map.get(get-secondary-button-properties(), "background"),
|
|
112
|
-
$color: map.get(get-secondary-button-properties(), "color"),
|
|
113
|
-
$border: map.get(get-secondary-button-properties(), "border"),
|
|
114
|
-
$border-radius: map.get(get-secondary-button-properties(), "border-radius"),
|
|
115
|
-
$hover-filter: map.get(get-secondary-button-properties(), "hover-filter"),
|
|
116
|
-
$active-filter: map.get(get-secondary-button-properties(), "active-filter"),
|
|
117
|
-
$focus-visible-filter: map.get(get-secondary-button-properties(), "focus-visible-filter")
|
|
118
|
-
) {
|
|
119
|
-
// not using button.secondary since that's 100% going to conflict with existing declarations on sites
|
|
120
|
-
button.minor {
|
|
121
|
-
@include Button(
|
|
122
|
-
$background,
|
|
123
|
-
$color,
|
|
124
|
-
$border,
|
|
125
|
-
$border-radius,
|
|
126
|
-
$hover-filter,
|
|
127
|
-
$active-filter,
|
|
128
|
-
$focus-visible-filter
|
|
129
|
-
) {
|
|
130
|
-
@content;
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
@mixin Button(
|
|
136
|
-
$background,
|
|
137
|
-
$color,
|
|
138
|
-
$border,
|
|
139
|
-
$border-radius,
|
|
140
|
-
$hover-filter,
|
|
141
|
-
$active-filter,
|
|
142
|
-
$focus-visible-filter,
|
|
143
|
-
$padding: 10px 20px
|
|
144
|
-
) {
|
|
145
|
-
background: $background;
|
|
146
|
-
color: $color;
|
|
147
|
-
border: $border;
|
|
148
|
-
border-radius: $border-radius;
|
|
149
|
-
@if $padding {
|
|
150
|
-
padding: $padding;
|
|
151
|
-
}
|
|
152
|
-
display: flex;
|
|
153
|
-
white-space: pre-wrap; // can't have spaces otherwise
|
|
154
|
-
justify-content: center;
|
|
155
|
-
align-items: center;
|
|
156
|
-
cursor: pointer;
|
|
157
|
-
transition: filter 150ms ease-in-out, background 100ms ease-in-out;
|
|
158
|
-
|
|
159
|
-
svg path {
|
|
160
|
-
fill: $color; // treat icons the same as text
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
@include supports-hover.supports-hover() {
|
|
164
|
-
&:hover {
|
|
165
|
-
filter: $hover-filter;
|
|
166
|
-
@include utils.highlight-background($normal-background: $background);
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
&:active {
|
|
170
|
-
filter: $active-filter;
|
|
171
|
-
@include utils.highlight-background($normal-background: $background, $darken-factor: 10%, $lighten-factor: 20%);
|
|
172
|
-
}
|
|
173
|
-
&:focus {
|
|
174
|
-
outline-style: none;
|
|
175
|
-
}
|
|
176
|
-
&:focus-visible {
|
|
177
|
-
filter: $focus-visible-filter;
|
|
178
|
-
@include utils.highlight-background($normal-background: $background);
|
|
179
|
-
}
|
|
180
|
-
@content;
|
|
181
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
@mixin MorphingSign($color: #fff) {
|
|
2
|
-
.morphing-sign {
|
|
3
|
-
/* https://stackoverflow.com/a/38136283 */
|
|
4
|
-
border: 0;
|
|
5
|
-
position: relative;
|
|
6
|
-
width: 1.5em;
|
|
7
|
-
height: 1.5em;
|
|
8
|
-
|
|
9
|
-
span {
|
|
10
|
-
position: absolute;
|
|
11
|
-
background: $color;
|
|
12
|
-
border-radius: 2px;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
/* Create the "+" shape by positioning the spans absolutely */
|
|
16
|
-
span:first-child {
|
|
17
|
-
top: 25%;
|
|
18
|
-
bottom: 25%;
|
|
19
|
-
width: 10%;
|
|
20
|
-
left: 45%;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
span:last-child {
|
|
24
|
-
left: 25%;
|
|
25
|
-
right: 25%;
|
|
26
|
-
height: 10%;
|
|
27
|
-
top: 45%;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
@use "../../variables";
|
|
2
|
-
@use "../../helpers/utils";
|
|
3
|
-
|
|
4
|
-
/// Base styling (PLP) that applies to both category and search pages for the PLPResults component, the component which holds the product cards.
|
|
5
|
-
/// Another part of this styling is in the ProductListingPage mixin, which takes care about the overall layout of the page (which mostly means margins and paddings).
|
|
6
|
-
|
|
7
|
-
@mixin PLPResults() {
|
|
8
|
-
.listing-page {
|
|
9
|
-
display: flex;
|
|
10
|
-
flex-direction: column;
|
|
11
|
-
|
|
12
|
-
.no-results {
|
|
13
|
-
background: white;
|
|
14
|
-
padding: 40px;
|
|
15
|
-
display: flex;
|
|
16
|
-
justify-content: flex-start;
|
|
17
|
-
align-items: center;
|
|
18
|
-
flex-direction: column;
|
|
19
|
-
flex-grow: 2;
|
|
20
|
-
.hint {
|
|
21
|
-
text-decoration: underline;
|
|
22
|
-
cursor: pointer;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
}
|
|
@@ -1,168 +0,0 @@
|
|
|
1
|
-
@use "../../helpers/utils";
|
|
2
|
-
|
|
3
|
-
/// Styling that ties together the different components that are common to both Category and Search pages. Mainly takes care of margins and paddings but also sets the styling for .cards which is in both PLPResults and SearchRecommendations.
|
|
4
|
-
///
|
|
5
|
-
/// Note that for the gaps not the exact values will always be used but often multiples for different places where it's appropriate.
|
|
6
|
-
///
|
|
7
|
-
/// @param {Number with size unit} $spacing-to-filters [12px] - The spacing between the filters and content.
|
|
8
|
-
/// @param {Number with size unit} $desktop-item-gap [20px] - The vertical gap between the different items on desktop.
|
|
9
|
-
/// @param {Number with size unit} $mobile-item-gap [16px] - The vertical gap between the different items on mobile.
|
|
10
|
-
|
|
11
|
-
@mixin ProductListingPage($spacing-to-filters: 12px, $desktop-item-gap: 20px, $mobile-item-gap: 16px) {
|
|
12
|
-
.listing-page {
|
|
13
|
-
padding: $desktop-item-gap calc(#{$desktop-item-gap} / 2);
|
|
14
|
-
@include mobile_sizes() {
|
|
15
|
-
padding: $mobile-item-gap calc(#{$mobile-item-gap} / 2);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
&,
|
|
19
|
-
& * {
|
|
20
|
-
box-sizing: border-box;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
& > .filter-results-for-one-row,
|
|
24
|
-
& > .results-for {
|
|
25
|
-
margin-bottom: calc(#{$desktop-item-gap} / 2);
|
|
26
|
-
@include mobile_sizes() {
|
|
27
|
-
margin-bottom: calc(#{$mobile-item-gap} / 2);
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
& > .sort-and-filter-buttons {
|
|
32
|
-
margin-top: calc(#{$desktop-item-gap} / 2);
|
|
33
|
-
margin-bottom: calc(#{$desktop-item-gap} / 2);
|
|
34
|
-
@include mobile_sizes() {
|
|
35
|
-
margin-top: calc(#{$mobile-item-gap} / 2);
|
|
36
|
-
margin-bottom: calc(#{$mobile-item-gap} / 2);
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
.PLP-results {
|
|
40
|
-
margin-top: calc(#{$desktop-item-gap} / 2);
|
|
41
|
-
@include mobile_sizes() {
|
|
42
|
-
margin-top: calc(#{$mobile-item-gap} / 2);
|
|
43
|
-
}
|
|
44
|
-
display: flex;
|
|
45
|
-
& > {
|
|
46
|
-
.filters,
|
|
47
|
-
.sorting {
|
|
48
|
-
margin-left: $spacing-to-filters;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
.cards {
|
|
53
|
-
// this is for all product lists, meaning PLPResults (category + search product lists) and SearchRecommendations
|
|
54
|
-
flex-wrap: wrap;
|
|
55
|
-
display: flex;
|
|
56
|
-
flex-direction: row;
|
|
57
|
-
flex-grow: 1;
|
|
58
|
-
overflow: hidden;
|
|
59
|
-
align-content: flex-start;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
/// Styling that ties together the different components on the SearchPage. Mainly takes care of margins and paddings.
|
|
65
|
-
///
|
|
66
|
-
/// Note that for the gaps not the exact values will always be used but often multiples for different places where it's appropriate.
|
|
67
|
-
///
|
|
68
|
-
/// @param {Number with size unit} $spacing-to-filters [12px] - The spacing between the filters and content.
|
|
69
|
-
/// @param {Number with size unit} $desktop-item-gap [20px] - The vertical gap between the different items on desktop.
|
|
70
|
-
/// @param {Number with size unit} $mobile-item-gap [16px] - The vertical gap between the different items on mobile.
|
|
71
|
-
/// @param {Boolean} $spacing-above-search-field [true] - Whether to add equal spacing above the search field as below.
|
|
72
|
-
/// @param {Number with size unit} $query-input-width [800px] - The max width of the query input field (if present)
|
|
73
|
-
/// @param {Number} $gaps-to-recs-factor [3] - The factor to multiply the gaps with to get the spacing above the recommendations.
|
|
74
|
-
|
|
75
|
-
@mixin SearchPage(
|
|
76
|
-
$spacing-to-filters: 12px,
|
|
77
|
-
$desktop-item-gap: 20px,
|
|
78
|
-
$mobile-item-gap: 16px,
|
|
79
|
-
$spacing-above-search-field: true,
|
|
80
|
-
$query-input-width: 800px,
|
|
81
|
-
$gap-to-recs-factor: 3
|
|
82
|
-
) {
|
|
83
|
-
.listing-page {
|
|
84
|
-
.query-input {
|
|
85
|
-
width: min(100%, $query-input-width);
|
|
86
|
-
align-self: center;
|
|
87
|
-
|
|
88
|
-
@if $spacing-above-search-field {
|
|
89
|
-
margin-top: calc(#{$desktop-item-gap} * 2);
|
|
90
|
-
}
|
|
91
|
-
margin-bottom: $desktop-item-gap;
|
|
92
|
-
@include mobile_sizes() {
|
|
93
|
-
margin-bottom: $mobile-item-gap;
|
|
94
|
-
@if $spacing-above-search-field {
|
|
95
|
-
margin-top: calc(#{$mobile-item-gap});
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
~ .category-suggestions .category-suggestion {
|
|
99
|
-
&:last-child {
|
|
100
|
-
margin-right: auto;
|
|
101
|
-
}
|
|
102
|
-
&:first-child {
|
|
103
|
-
margin-left: auto;
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
.category-suggestions {
|
|
108
|
-
margin-bottom: $desktop-item-gap;
|
|
109
|
-
@include mobile_sizes() {
|
|
110
|
-
margin-bottom: $mobile-item-gap;
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
.query-input {
|
|
114
|
-
// if there are no category suggestions we should have 2x the gap between where they should be and what's there, only for desktop tho
|
|
115
|
-
& + .filter-results-for-one-row,
|
|
116
|
-
& + .results-for {
|
|
117
|
-
@media (min-width: 652px) {
|
|
118
|
-
margin-top: $desktop-item-gap;
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
.search-recs {
|
|
123
|
-
// whole gap here so that we don't have to make the margin bottom of search-results conditional
|
|
124
|
-
margin-top: calc(#{$desktop-item-gap} * #{$gap-to-recs-factor});
|
|
125
|
-
// in between these there's the border, a visual line separating the results and recs
|
|
126
|
-
padding-top: calc(#{$desktop-item-gap} * #{$gap-to-recs-factor});
|
|
127
|
-
@include mobile_sizes() {
|
|
128
|
-
margin-top: calc(#{$mobile-item-gap} * #{$gap-to-recs-factor});
|
|
129
|
-
padding-top: calc(#{$mobile-item-gap} * #{$gap-to-recs-factor});
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
.PLP-results.nothing + .search-recs {
|
|
133
|
-
// if no results, bring us closer
|
|
134
|
-
margin-top: calc(#{$desktop-item-gap} * 1.5);
|
|
135
|
-
padding-top: calc(#{$desktop-item-gap} * 1.5);
|
|
136
|
-
@include mobile_sizes() {
|
|
137
|
-
margin-top: calc(#{$mobile-item-gap} * 1.5);
|
|
138
|
-
padding-top: calc(#{$mobile-item-gap} * 1.5);
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
/// Styling that ties together the different components on the CategoryPage. Mainly takes care of margins and paddings.
|
|
145
|
-
///
|
|
146
|
-
/// @param {Number with size unit} $spacing-to-filters [12px] - The spacing between the filters and content.
|
|
147
|
-
/// @param {Number with size unit} $desktop-item-gap [20px] - The vertical gap between the different items on desktop.
|
|
148
|
-
/// @param {Number with size unit} $mobile-item-gap [16px] - The vertical gap between the different items on mobile.
|
|
149
|
-
|
|
150
|
-
@mixin CategoryPage($spacing-to-filters: 12px, $desktop-item-gap: 20px, $mobile-item-gap: 16px) {
|
|
151
|
-
.listing-page {
|
|
152
|
-
.quicklinks,
|
|
153
|
-
.crumbs {
|
|
154
|
-
margin-bottom: $desktop-item-gap;
|
|
155
|
-
@include mobile_sizes() {
|
|
156
|
-
margin-bottom: $mobile-item-gap;
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
/// Internal mixin that dictates when the vertical spaces should switch to the "mobile" versions
|
|
163
|
-
|
|
164
|
-
@mixin mobile_sizes() {
|
|
165
|
-
@media (max-width: 651px) {
|
|
166
|
-
@content;
|
|
167
|
-
}
|
|
168
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
@use "../../variables";
|
|
2
|
-
|
|
3
|
-
/// ScrollStatus shows the user how many items are left to scroll through, if they scroll at a speed that indicates that they are no longer looking at each product but rather just trying to see how many there are.
|
|
4
|
-
///
|
|
5
|
-
/// If you too think that blurring the background would look great here, please take a minute to upvote this chrome bug: https://bugs.chromium.org/p/chromium/issues/detail?id=1382360
|
|
6
|
-
///
|
|
7
|
-
/// @param {Color} $scroll-status-background [rgba(100, 100, 100, 0.9)] - The background color of the scroll status. I recommend setting a slightly transparent color.
|
|
8
|
-
/// @param {Number with size unit} $border-radius [variables.$border-radius * 5] - The border-radius of the scroll status.
|
|
9
|
-
|
|
10
|
-
@mixin ScrollStatus(
|
|
11
|
-
$scroll-status-background: rgba(100, 100, 100, 0.9),
|
|
12
|
-
$border-radius: calc(#{variables.$border-radius} * 5)
|
|
13
|
-
) {
|
|
14
|
-
.scroll-status {
|
|
15
|
-
pointer-events: none;
|
|
16
|
-
position: sticky;
|
|
17
|
-
bottom: 10vh;
|
|
18
|
-
white-space: nowrap;
|
|
19
|
-
display: flex;
|
|
20
|
-
justify-content: center;
|
|
21
|
-
z-index: calc(#{variables.$base-z-index} + 4);
|
|
22
|
-
align-items: center;
|
|
23
|
-
opacity: 0;
|
|
24
|
-
.text {
|
|
25
|
-
background: $scroll-status-background;
|
|
26
|
-
color: white;
|
|
27
|
-
padding: 10px 20px;
|
|
28
|
-
border-radius: $border-radius;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
}
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
@use "../../variables";
|
|
2
|
-
@use "../../helpers/utils";
|
|
3
|
-
@use "../../helpers/supports-hover";
|
|
4
|
-
@use "./Buttons";
|
|
5
|
-
@use "sass:map";
|
|
6
|
-
|
|
7
|
-
/// Mixin that styles the SelectedFilters component, which is the component that shows the selected filters if both the sorting and filtering menus are currently hidden.
|
|
8
|
-
/// @param {Number with size unit} $border-radius [variables.$border-radius] - A local override of the border-radius variable.
|
|
9
|
-
/// @param {String} $title-color [variables.$brand-black] - The color of the text that says "Filters:" (the key of this string is `selected_filters_title_` in the locale files).
|
|
10
|
-
/// @param {String} $filter-title-transform [uppercase] - text-transform for the aforementioned "Filters:" string
|
|
11
|
-
/// @param {Number with size unit} $margin-on-desktop [0px] - Margin above/below SelectedFilters on desktop. This is set here because ExpandingContainer, our expanding component, gets confused when the margin isn't precisely on this element. Otherwise this value would be in ProductListingPage.scss.
|
|
12
|
-
/// @param {Boolean} $set-border-on-crumbs [true] - Whether to set a border on the "crumbs" (a crumb is one selected filter).
|
|
13
|
-
|
|
14
|
-
@mixin SelectedFilters(
|
|
15
|
-
$border-radius: variables.$border-radius,
|
|
16
|
-
$title-color: variables.$brand-black,
|
|
17
|
-
$filter-title-transform: uppercase,
|
|
18
|
-
$margin-on-desktop: 0px,
|
|
19
|
-
$set-border-on-crumbs: true
|
|
20
|
-
) {
|
|
21
|
-
.listing-page .selected-filters {
|
|
22
|
-
.inner {
|
|
23
|
-
// this is in here because it's an ExpandingContainer and the animation gets borked otherwise
|
|
24
|
-
margin-top: 10px;
|
|
25
|
-
margin-bottom: 10px;
|
|
26
|
-
display: flex;
|
|
27
|
-
align-items: center;
|
|
28
|
-
.title {
|
|
29
|
-
margin-right: 10px;
|
|
30
|
-
}
|
|
31
|
-
@media (min-width: 652px) {
|
|
32
|
-
margin-top: $margin-on-desktop;
|
|
33
|
-
margin-bottom: $margin-on-desktop;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
.title {
|
|
37
|
-
@media (max-width: 600px) {
|
|
38
|
-
display: none;
|
|
39
|
-
}
|
|
40
|
-
font-size: 1.1em;
|
|
41
|
-
text-transform: $filter-title-transform;
|
|
42
|
-
color: $title-color;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.depict-slider {
|
|
46
|
-
overflow: hidden;
|
|
47
|
-
width: unset;
|
|
48
|
-
|
|
49
|
-
.clear-filter {
|
|
50
|
-
@if $set-border-on-crumbs {
|
|
51
|
-
border: 1px solid map.get(Buttons.get-primary-button-properties(), "background");
|
|
52
|
-
}
|
|
53
|
-
svg {
|
|
54
|
-
width: 12.64px;
|
|
55
|
-
height: 12.64px;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
.clear-all-filters {
|
|
59
|
-
@if $set-border-on-crumbs {
|
|
60
|
-
border: map.get(Buttons.get-secondary-button-properties(), "border");
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
.clear-filter,
|
|
65
|
-
.clear-all-filters {
|
|
66
|
-
flex: 0 0 auto;
|
|
67
|
-
box-sizing: border-box;
|
|
68
|
-
white-space: nowrap;
|
|
69
|
-
padding: 5px 10px;
|
|
70
|
-
display: flex;
|
|
71
|
-
@include utils.flex-gap(5px, "row nowrap");
|
|
72
|
-
align-items: center;
|
|
73
|
-
border-radius: $border-radius;
|
|
74
|
-
font-size: 1em;
|
|
75
|
-
line-height: 1;
|
|
76
|
-
cursor: pointer;
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
@content;
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
}
|
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
// @use "../../../rendering/slider_button_positioning";
|
|
2
|
-
@use "../../helpers/utils";
|
|
3
|
-
@use "../../components/PLP/Buttons";
|
|
4
|
-
@use "../../variables";
|
|
5
|
-
@use "../../helpers/supports-hover";
|
|
6
|
-
@use "sass:map";
|
|
7
|
-
|
|
8
|
-
/// Mixin copy-pasted from @depict-ai/utilishared that helps with positioning slider buttons
|
|
9
|
-
@mixin button_positioning {
|
|
10
|
-
.d-navbutton {
|
|
11
|
-
position: absolute;
|
|
12
|
-
z-index: 2;
|
|
13
|
-
top: 50%;
|
|
14
|
-
transform: translateY(-50%);
|
|
15
|
-
-webkit-transform: translateY(-50%);
|
|
16
|
-
touch-action: manipulation;
|
|
17
|
-
transition-duration: 0.2s;
|
|
18
|
-
padding-right: 1px;
|
|
19
|
-
cursor: pointer;
|
|
20
|
-
&.hidden {
|
|
21
|
-
cursor: default;
|
|
22
|
-
opacity: 0;
|
|
23
|
-
animation-name: depict_slider_button_unclickable;
|
|
24
|
-
animation-duration: 5s;
|
|
25
|
-
animation-fill-mode: forwards;
|
|
26
|
-
}
|
|
27
|
-
&.left {
|
|
28
|
-
transform: translateY(-50%) rotate(180deg);
|
|
29
|
-
left: -1px; // fix chrome rendering half a px of not the button
|
|
30
|
-
}
|
|
31
|
-
&.right {
|
|
32
|
-
right: -1px;
|
|
33
|
-
}
|
|
34
|
-
img {
|
|
35
|
-
width: 100%;
|
|
36
|
-
height: 100%;
|
|
37
|
-
}
|
|
38
|
-
@content;
|
|
39
|
-
}
|
|
40
|
-
@keyframes depict_slider_button_unclickable {
|
|
41
|
-
0% {
|
|
42
|
-
pointer-events: all;
|
|
43
|
-
}
|
|
44
|
-
100% {
|
|
45
|
-
pointer-events: none;
|
|
46
|
-
visibility: hidden; // make not keyboard focusable with tab
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
/// Styling for sliders used in the PLP.
|
|
52
|
-
/// Most of the times SlidableItems is used for items laid out horizontally that do not fit the screen width.
|
|
53
|
-
///
|
|
54
|
-
/// Examples are the QuickLinks (used to navigate sideways or downwards in the category tree) and the SelectedFilters (if not all selected filters fit on the screen).
|
|
55
|
-
/// @param {Color} $fade-to [variables.$brand-lighter-grey] - The color the slider buttons fade to, set this to the background color behind the slider.
|
|
56
|
-
/// @param {Color} @fade-from [transparent] - The color the slider buttons fade from, you probably want to leave this at transparent.
|
|
57
|
-
@mixin SlidableItems($fade-to: variables.$brand-lighter-grey, $fade-from: rgba(238, 238, 240, 0)) {
|
|
58
|
-
// TODO: we could probably infer these colours (and maybe some more) if we add some global background color variable
|
|
59
|
-
.depict-slider {
|
|
60
|
-
width: 100%;
|
|
61
|
-
position: relative;
|
|
62
|
-
.sliding {
|
|
63
|
-
height: 100%;
|
|
64
|
-
@include utils.flex-gap(10px, "row nowrap");
|
|
65
|
-
align-items: center;
|
|
66
|
-
display: flex;
|
|
67
|
-
flex-direction: row;
|
|
68
|
-
flex-wrap: nowrap;
|
|
69
|
-
overflow-x: scroll;
|
|
70
|
-
/* Internet Explorer 10+; next 3 properties stolen from: https://stackoverflow.com/a/38994837*/
|
|
71
|
-
-ms-overflow-style: none;
|
|
72
|
-
/* Firefox */
|
|
73
|
-
scrollbar-width: none;
|
|
74
|
-
// Chrome and Safari
|
|
75
|
-
&::-webkit-scrollbar {
|
|
76
|
-
display: none;
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
// TODO: break out button button positioning related lib code into a package and import that here instead of duplicating the code
|
|
80
|
-
// @include slider_button_positioning.button_positioning {
|
|
81
|
-
@include button_positioning {
|
|
82
|
-
height: calc(100% + 2px);
|
|
83
|
-
padding-top: 0;
|
|
84
|
-
padding-left: 0;
|
|
85
|
-
padding-bottom: 0;
|
|
86
|
-
width: 26px;
|
|
87
|
-
background: linear-gradient(270deg, $fade-to 50%, $fade-from 105%);
|
|
88
|
-
display: flex;
|
|
89
|
-
align-items: center;
|
|
90
|
-
justify-content: flex-end;
|
|
91
|
-
border: none;
|
|
92
|
-
|
|
93
|
-
& > div {
|
|
94
|
-
display: flex;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
@include supports-hover.supports-hover() {
|
|
98
|
-
&:hover {
|
|
99
|
-
svg {
|
|
100
|
-
transform: scale(1.2);
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
&:focus-visible {
|
|
105
|
-
svg {
|
|
106
|
-
transform: scale(1.5);
|
|
107
|
-
path {
|
|
108
|
-
filter: map.get(Buttons.get-secondary-button-properties(), "focus-visible-filter");
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
svg {
|
|
113
|
-
transition-duration: 150ms;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
&:active {
|
|
117
|
-
opacity: 0.9;
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
}
|