@depict-ai/react-ui 2.1.11 → 2.1.13
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 +4 -4
- 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/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,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
|
-
}
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
@use "../../../variables";
|
|
2
|
-
@use "../../../helpers/supports-hover";
|
|
3
|
-
|
|
4
|
-
/// Styles the FloatingButtons. FloatingButtons are three buttons, one button to open sorting, one button to open filters and one button to scroll to the top that show up when scrolling upwards for a while on a mobile device not really close to the top of the page.
|
|
5
|
-
/// @param {Color} $button-background [variables.$brand-lighter-grey] - The background color of the buttons.
|
|
6
|
-
/// @param {Color} $hovered-button-background [variables.$brand-lightest-grey] - The background color of the buttons when hovered.
|
|
7
|
-
/// @param {Color} $button-border-color [variables.$brand-black] - The border color of the buttons.
|
|
8
|
-
/// @param {Color} $icon-color [variables.$brand-dark-grey] - The color of the icons.
|
|
9
|
-
/// @param {Number with unit} $bottom-distance [12px] - The distance from the bottom of the buttons to the bottom of the screen.
|
|
10
|
-
/// @param {Number with unit} $side-distance [12px] - The distance from the `$position`-side of the buttons to the `$position`-side of the screen.
|
|
11
|
-
/// @param {"left" | "right"} $position [left] - The side of the screen the buttons should be aligned to.
|
|
12
|
-
|
|
13
|
-
@mixin FloatingButtons(
|
|
14
|
-
$button-background: variables.$brand-lighter-grey,
|
|
15
|
-
$hovered-button-background: variables.$brand-lightest-grey,
|
|
16
|
-
$button-border-color: variables.$brand-black,
|
|
17
|
-
$icon-color: variables.$brand-dark-grey,
|
|
18
|
-
$bottom-distance: 12px,
|
|
19
|
-
$side-distance: 12px,
|
|
20
|
-
$position: "left" // "left" or "right"
|
|
21
|
-
) {
|
|
22
|
-
.floating-buttons {
|
|
23
|
-
position: sticky;
|
|
24
|
-
bottom: $bottom-distance;
|
|
25
|
-
display: flex;
|
|
26
|
-
z-index: calc(#{variables.$base-z-index} + 4);
|
|
27
|
-
align-items: center;
|
|
28
|
-
opacity: 0;
|
|
29
|
-
transition-timing-function: ease-in-out;
|
|
30
|
-
transition-duration: 300ms;
|
|
31
|
-
@if $position== "left" {
|
|
32
|
-
padding-left: $side-distance;
|
|
33
|
-
justify-content: flex-start;
|
|
34
|
-
} @else if $position== "right" {
|
|
35
|
-
padding-right: $side-distance;
|
|
36
|
-
justify-content: flex-end;
|
|
37
|
-
}
|
|
38
|
-
&:not(.show-them) {
|
|
39
|
-
pointer-events: none;
|
|
40
|
-
}
|
|
41
|
-
&.show-them {
|
|
42
|
-
opacity: 1;
|
|
43
|
-
}
|
|
44
|
-
.filter {
|
|
45
|
-
margin-right: 5px;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
.sort {
|
|
49
|
-
margin-left: 5px;
|
|
50
|
-
margin-right: 5px;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.up {
|
|
54
|
-
margin-left: 5px;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
.sort,
|
|
58
|
-
.filter,
|
|
59
|
-
.up {
|
|
60
|
-
background: $button-background;
|
|
61
|
-
filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.1)) drop-shadow(-2px -2px 4px rgba(255, 255, 255, 0.3));
|
|
62
|
-
border: 1px solid $button-border-color;
|
|
63
|
-
border-radius: 20px;
|
|
64
|
-
padding: 10px;
|
|
65
|
-
@include supports-hover.supports-hover() {
|
|
66
|
-
&:hover {
|
|
67
|
-
background: $hovered-button-background;
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
&:focus {
|
|
71
|
-
outline: none;
|
|
72
|
-
}
|
|
73
|
-
&:focus-visible {
|
|
74
|
-
background: $hovered-button-background;
|
|
75
|
-
}
|
|
76
|
-
div {
|
|
77
|
-
display: flex;
|
|
78
|
-
}
|
|
79
|
-
svg path {
|
|
80
|
-
fill: $icon-color;
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
}
|