@depict-ai/react-ui 1.5.20 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ES10/index.cjs +149 -69
- package/ES10/index.d.ts +547 -37
- package/ES10/index.js +152 -74
- package/README.md +2 -1
- package/dist/main.js +293 -0
- package/dist/module.js +285 -0
- package/dist/styles/components/PLP/Buttons.scss +124 -0
- package/dist/styles/components/PLP/MorphingSign.scss +31 -0
- package/dist/styles/components/PLP/PLPResults.scss +20 -0
- package/dist/styles/components/PLP/ProductListingPage.scss +142 -0
- package/dist/styles/components/PLP/ScrollStatus.scss +24 -0
- package/dist/styles/components/PLP/SelectedFilters.scss +74 -0
- package/dist/styles/components/PLP/SlidableItems.scss +99 -0
- package/dist/styles/components/PLP/SortAndFilter/FloatingButtons.scss +75 -0
- package/dist/styles/components/PLP/SortAndFilter/SortAndFilter.scss +728 -0
- package/dist/styles/components/PLP/SortAndFilter/SortAndFilterModal.scss +160 -0
- package/dist/styles/components/PLP/SortAndFilter/WhiteSortAndFilter.scss +148 -0
- package/dist/styles/components/PLP/Toast.scss +54 -0
- package/dist/styles/components/PLP/index.scss +45 -0
- package/dist/styles/components/category/BreadCrumbs.scss +23 -0
- package/dist/styles/components/category/CategoryTitle.scss +28 -0
- package/dist/styles/components/category/QuickLinks.scss +71 -0
- package/dist/styles/components/category/index.scss +23 -0
- package/dist/styles/components/search/Autocomplete.scss +117 -0
- package/dist/styles/components/search/CategorySuggestions.scss +74 -0
- package/dist/styles/components/search/InstantCard.scss +117 -0
- package/dist/styles/components/search/InstantResults.scss +10 -0
- package/dist/styles/components/search/PreviousSearches.scss +77 -0
- package/dist/styles/components/search/QueryInput.scss +167 -0
- package/dist/styles/components/search/SearchModal.scss +95 -0
- package/dist/styles/components/search/SearchRecommendations.scss +25 -0
- package/dist/styles/components/search/ShowingResultsFor.scss +10 -0
- package/dist/styles/components/search/index.scss +40 -0
- package/dist/styles/default.css +1 -0
- package/dist/styles/helpers/custom_input.scss +162 -0
- package/dist/styles/helpers/supports-hover.scss +5 -0
- package/dist/styles/helpers/utils.scss +82 -0
- package/dist/styles/plain-css-fallback-styling.css +1 -1
- package/dist/styles/variables.scss +47 -0
- package/latest/index.cjs +145 -68
- package/latest/index.d.ts +547 -37
- package/latest/index.js +148 -73
- package/package.json +9 -9
- package/server/ES10/index.cjs +125 -1
- package/server/ES10/index.d.ts +547 -37
- package/server/ES10/index.js +127 -5
- package/server/latest/index.cjs +122 -1
- package/server/latest/index.d.ts +547 -37
- package/server/latest/index.js +124 -5
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
// @use "../../../rendering/slider_button_positioning";
|
|
2
|
+
@use "../../helpers/utils";
|
|
3
|
+
@use "../../variables";
|
|
4
|
+
@use "../../helpers/supports-hover";
|
|
5
|
+
|
|
6
|
+
@mixin button_positioning {
|
|
7
|
+
.d-navbutton {
|
|
8
|
+
position: absolute;
|
|
9
|
+
z-index: 2;
|
|
10
|
+
top: 50%;
|
|
11
|
+
transform: translateY(-50%);
|
|
12
|
+
-webkit-transform: translateY(-50%);
|
|
13
|
+
touch-action: manipulation;
|
|
14
|
+
transition-duration: 0.2s;
|
|
15
|
+
padding-right: 1px;
|
|
16
|
+
cursor: pointer;
|
|
17
|
+
&.hidden {
|
|
18
|
+
cursor: default;
|
|
19
|
+
opacity: 0;
|
|
20
|
+
animation-name: depict_slider_button_unclickable;
|
|
21
|
+
animation-duration: 5s;
|
|
22
|
+
animation-fill-mode: forwards;
|
|
23
|
+
}
|
|
24
|
+
&.left {
|
|
25
|
+
transform: translateY(-50%) rotate(180deg);
|
|
26
|
+
left: -1px; // fix chrome rendering half a px of not the button
|
|
27
|
+
}
|
|
28
|
+
&.right {
|
|
29
|
+
right: -1px;
|
|
30
|
+
}
|
|
31
|
+
img {
|
|
32
|
+
width: 100%;
|
|
33
|
+
height: 100%;
|
|
34
|
+
}
|
|
35
|
+
@content;
|
|
36
|
+
}
|
|
37
|
+
@keyframes depict_slider_button_unclickable {
|
|
38
|
+
0% {
|
|
39
|
+
pointer-events: all;
|
|
40
|
+
}
|
|
41
|
+
100% {
|
|
42
|
+
pointer-events: none;
|
|
43
|
+
visibility: hidden; // make not keyboard focusable with tab
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
@mixin SlidableItems($fade-to: variables.$brand-lighter-grey, $fade-from: rgba(238, 238, 240, 0)) {
|
|
49
|
+
.depict-slider {
|
|
50
|
+
width: 100%;
|
|
51
|
+
position: relative;
|
|
52
|
+
.sliding {
|
|
53
|
+
height: 100%;
|
|
54
|
+
@include utils.flex-gap(10px, "row nowrap");
|
|
55
|
+
align-items: center;
|
|
56
|
+
display: flex;
|
|
57
|
+
flex-direction: row;
|
|
58
|
+
flex-wrap: nowrap;
|
|
59
|
+
overflow-x: scroll;
|
|
60
|
+
/* Internet Explorer 10+; next 3 properties stolen from: https://stackoverflow.com/a/38994837*/
|
|
61
|
+
-ms-overflow-style: none;
|
|
62
|
+
/* Firefox */
|
|
63
|
+
scrollbar-width: none;
|
|
64
|
+
// Chrome and Safari
|
|
65
|
+
&::-webkit-scrollbar {
|
|
66
|
+
display: none;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
// TODO: break out button button positioning related lib code into a package and import that here instead of duplicating the code
|
|
70
|
+
// @include slider_button_positioning.button_positioning {
|
|
71
|
+
@include button_positioning {
|
|
72
|
+
height: calc(100% + 2px);
|
|
73
|
+
padding-top: 0;
|
|
74
|
+
padding-left: 0;
|
|
75
|
+
padding-bottom: 0;
|
|
76
|
+
width: 26px;
|
|
77
|
+
background: linear-gradient(270deg, $fade-to 50%, $fade-from 105%);
|
|
78
|
+
display: flex;
|
|
79
|
+
align-items: center;
|
|
80
|
+
justify-content: flex-end;
|
|
81
|
+
border: none;
|
|
82
|
+
|
|
83
|
+
@include supports-hover.supports-hover() {
|
|
84
|
+
&:hover {
|
|
85
|
+
svg {
|
|
86
|
+
transform: scale(1.2);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
svg {
|
|
91
|
+
transition-duration: 150ms;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
&:active {
|
|
95
|
+
opacity: 0.9;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
@use "../../../variables";
|
|
2
|
+
@use "../../../helpers/supports-hover";
|
|
3
|
+
|
|
4
|
+
@mixin FloatingButtons(
|
|
5
|
+
$button-background: variables.$brand-lighter-grey,
|
|
6
|
+
$hovered-button-background: variables.$brand-lightest-grey,
|
|
7
|
+
$button-border-color: variables.$brand-black,
|
|
8
|
+
$icon-color: variables.$brand-dark-grey,
|
|
9
|
+
$bottom-distance: 12px,
|
|
10
|
+
$side-distance: 12px,
|
|
11
|
+
$position: "left" // "left" or "right"
|
|
12
|
+
) {
|
|
13
|
+
.floating-buttons {
|
|
14
|
+
position: sticky;
|
|
15
|
+
bottom: $bottom-distance;
|
|
16
|
+
display: flex;
|
|
17
|
+
z-index: calc(#{variables.$base-z-index} + 4);
|
|
18
|
+
align-items: center;
|
|
19
|
+
opacity: 0;
|
|
20
|
+
transition-timing-function: ease-in-out;
|
|
21
|
+
transition-duration: 300ms;
|
|
22
|
+
@if $position== "left" {
|
|
23
|
+
padding-left: $side-distance;
|
|
24
|
+
justify-content: flex-start;
|
|
25
|
+
} @else if $position== "right" {
|
|
26
|
+
padding-right: $side-distance;
|
|
27
|
+
justify-content: flex-end;
|
|
28
|
+
}
|
|
29
|
+
&:not(.show-them) {
|
|
30
|
+
pointer-events: none;
|
|
31
|
+
}
|
|
32
|
+
&.show-them {
|
|
33
|
+
opacity: 1;
|
|
34
|
+
}
|
|
35
|
+
.filter {
|
|
36
|
+
margin-right: 5px;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.sort {
|
|
40
|
+
margin-left: 5px;
|
|
41
|
+
margin-right: 5px;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.up {
|
|
45
|
+
margin-left: 5px;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.sort,
|
|
49
|
+
.filter,
|
|
50
|
+
.up {
|
|
51
|
+
background: $button-background;
|
|
52
|
+
filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.1)) drop-shadow(-2px -2px 4px rgba(255, 255, 255, 0.3));
|
|
53
|
+
border: 1px solid $button-border-color;
|
|
54
|
+
border-radius: 20px;
|
|
55
|
+
padding: 10px;
|
|
56
|
+
@include supports-hover.supports-hover() {
|
|
57
|
+
&:hover {
|
|
58
|
+
background: $hovered-button-background;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
&:focus {
|
|
62
|
+
outline: none;
|
|
63
|
+
}
|
|
64
|
+
&:focus-visible {
|
|
65
|
+
background: $hovered-button-background;
|
|
66
|
+
}
|
|
67
|
+
div {
|
|
68
|
+
display: flex;
|
|
69
|
+
}
|
|
70
|
+
svg path {
|
|
71
|
+
fill: $icon-color;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|