@depict-ai/react-ui 0.0.73 → 0.0.75

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 (41) hide show
  1. package/dist/index.d.ts +2 -3
  2. package/dist/main.js +16 -34
  3. package/dist/module.js +17 -35
  4. package/dist/styles/components/PLP/Buttons.scss +24 -53
  5. package/dist/styles/components/PLP/MorphingSign.scss +4 -2
  6. package/dist/styles/components/PLP/PLPResults.scss +1 -1
  7. package/dist/styles/components/PLP/ProductListingPage.scss +21 -24
  8. package/dist/styles/components/PLP/ScrollStatus.scss +5 -8
  9. package/dist/styles/components/PLP/SelectedFilters.scss +25 -26
  10. package/dist/styles/components/PLP/SlidableItems.scss +2 -5
  11. package/dist/styles/components/PLP/SortAndFilter/FloatingButtons.scss +16 -24
  12. package/dist/styles/components/PLP/SortAndFilter/SortAndFilter.scss +186 -182
  13. package/dist/styles/components/PLP/SortAndFilter/SortAndFilterModal.scss +11 -12
  14. package/dist/styles/components/PLP/Toast.scss +8 -6
  15. package/dist/styles/components/PLP/index.scss +3 -39
  16. package/dist/styles/components/category/BreadCrumbs.scss +4 -11
  17. package/dist/styles/components/category/CategoryTitle.scss +4 -11
  18. package/dist/styles/components/category/QuickLinks.scss +14 -37
  19. package/dist/styles/components/category/index.scss +2 -18
  20. package/dist/styles/components/search/Autocomplete.scss +27 -42
  21. package/dist/styles/components/search/CategorySuggestions.scss +13 -42
  22. package/dist/styles/components/search/InstantCard.scss +8 -11
  23. package/dist/styles/components/search/InstantResults.scss +3 -3
  24. package/dist/styles/components/search/PreviousSearches.scss +6 -13
  25. package/dist/styles/components/search/SearchField.scss +26 -72
  26. package/dist/styles/components/search/SearchModal.scss +8 -23
  27. package/dist/styles/components/search/SearchRecommendations.scss +2 -2
  28. package/dist/styles/components/search/ShowingResultsFor.scss +2 -8
  29. package/dist/styles/components/search/index.scss +2 -30
  30. package/dist/styles/default.css +1 -1
  31. package/dist/styles/helpers/custom_input.scss +4 -4
  32. package/dist/styles/helpers/utils.scss +8 -2
  33. package/dist/styles/index.scss +49 -3
  34. package/dist/styles/variables.scss +247 -42
  35. package/dist-server/index.d.ts +1 -1
  36. package/dist-server/main.js +1 -1
  37. package/dist-server/module.js +1 -1
  38. package/locales/index.js +1 -1
  39. package/locales/require.js +1 -1
  40. package/package.json +4 -4
  41. package/dist/styles/components/PLP/SortAndFilter/WhiteSortAndFilter.scss +0 -152
@@ -30,11 +30,11 @@
30
30
  $hovered-checkbox-checked-background-color,
31
31
  $hovered-checkbox-border,
32
32
  $hovered-radio-border,
33
- $input-row-height-goal,
33
+ $input-row-height,
34
34
  $largest-border-on-custom-input
35
35
  ) {
36
36
  $width-and-height: calc(
37
- #{$input-row-height-goal} - calc(#{$largest-border-on-custom-input} * 2)
37
+ #{$input-row-height} - calc(#{$largest-border-on-custom-input} * 2)
38
38
  ); // border is on both sides
39
39
  /* Customize the label (the container) */
40
40
  .input-row {
@@ -72,10 +72,10 @@
72
72
  border: $checkbox-border;
73
73
  }
74
74
  &.color {
75
- padding: calc(#{$input-row-height-goal} / 2); // doesn't have border so needs more size
75
+ padding: calc(#{$input-row-height} / 2); // doesn't have border so needs more size
76
76
  &.outline {
77
77
  $border-width: 0.5px;
78
- padding: calc(calc(#{$input-row-height-goal} - calc(#{$border-width} * 2)) / 2);
78
+ padding: calc(calc(#{$input-row-height} - calc(#{$border-width} * 2)) / 2);
79
79
  border: $border-width solid #868689;
80
80
  }
81
81
  }
@@ -20,9 +20,15 @@
20
20
  /// @param {Color} $normal-background - The color to darken or lighten
21
21
  /// @param {Percentage} $darken-factor [10%] - The amount to darken the color by
22
22
  /// @param {Percentage} $lighten-factor [10%] - The amount to lighten the color by
23
- @mixin highlight-background($normal-background, $darken-factor: 10%, $lighten-factor: 10%) {
23
+ /// @param {Percentage} $saturation-factor [$darken-factor] - The amount to decrease saturation by when the color is darkened
24
+ @mixin highlight-background(
25
+ $normal-background,
26
+ $darken-factor: 10%,
27
+ $lighten-factor: 10%,
28
+ $saturation-factor: $darken-factor
29
+ ) {
24
30
  @if color.lightness($normal-background) >= 50% {
25
- background: color.adjust($normal-background, $lightness: -$darken-factor);
31
+ background: color.adjust($normal-background, $lightness: -$darken-factor, $saturation: -$saturation-factor);
26
32
  } @else {
27
33
  background: color.adjust($normal-background, $lightness: $lighten-factor);
28
34
  }
@@ -1,3 +1,49 @@
1
- @forward "./components/PLP";
2
- @forward "./components/category";
3
- @forward "./components/search";
1
+ @forward "./variables";
2
+
3
+ @use "./components/PLP";
4
+ @use "./components/category";
5
+ @use "./components/search";
6
+
7
+ /// Default theme for Search and Category pages
8
+ /// To configure variables, use `@use` and `with`
9
+ /// @param {"both" | "search" | "category"} $scope - What to generate styling for. Set this to `category` if you are only using the Category page or `search` if you are only using the Search page. If you are using both, set this to `both`.
10
+ ///
11
+ @mixin default-theme($scope) {
12
+ .depict.plp {
13
+ button {
14
+ border: none; // Disable default button border
15
+ }
16
+ @include PLP.PLPResults();
17
+ @include PLP.ProductListingPage();
18
+ @include PLP.SelectedFilters();
19
+ @include PLP.ScrollStatus();
20
+ @include PLP.SortAndFilter();
21
+ @include PLP.SortAndFilterModal();
22
+ @include PLP.FloatingButtons();
23
+ @include PLP.SlidableItems();
24
+ @include PLP.PrimaryButton();
25
+ @include PLP.SecondaryButton();
26
+ }
27
+ @if $scope != "category" {
28
+ .depict.search {
29
+ @include search.Autocomplete();
30
+ @include search.CategorySuggestions();
31
+ @include search.InstantResults();
32
+ @include search.InstantCard();
33
+ @include search.SearchField();
34
+ @include search.SearchModal();
35
+ @include search.SearchPage();
36
+ @include search.SearchRecommendations();
37
+ @include search.ShowingResultsFor();
38
+ }
39
+ }
40
+ @if $scope != "search" {
41
+ .depict.category {
42
+ @include category.BreadCrumbs();
43
+ @include category.QuickLinks();
44
+ @include category.CategoryTitle();
45
+ @include category.CategoryPage();
46
+ }
47
+ }
48
+ @include PLP.Toast();
49
+ }
@@ -1,61 +1,266 @@
1
+ @use "sass:map";
2
+ @use "sass:color";
3
+
1
4
  ////
2
5
  /// This is the file containing the main variables used across all styles, such as base colors, rounds and z-index
3
6
  /// Many values and variables are derived from them
4
7
  ////
5
8
 
6
- $brand-black: #0f0f0f;
7
- $brand-grey: #868689;
8
- $brand-dark-grey: #333335;
9
- $brand-light-grey: #bcbcbe;
10
- $brand-lighter-grey: #eeeef0;
11
- $brand-lightest-grey: #fafafc;
12
- $deprecated-grey: #e7e8e7;
9
+ @function get-merged($map, $map2, $key) {
10
+ @return map.get(map.deep-merge($map, $map2), $key);
11
+ }
12
+
13
+ /// Set this to the background color of your page. It's needed for example for some things that fade into the background color (that are over another element).
14
+ $page-background-color: white !default;
15
+
16
+ $base-colors: () !default;
17
+ $base-colors-defaults: (
18
+ 1000: #000,
19
+ 800: #0f0f0f,
20
+ 600: #333335,
21
+ 500: #868689,
22
+ 400: #cbcbcc,
23
+ 300: #e4e4e5,
24
+ 200: #f3f3f5,
25
+ 100: #fafafc,
26
+ 0: #fff,
27
+ "deprecated-grey": #e7e8e7,
28
+ );
29
+
30
+ $text-icon-colors: () !default;
31
+ $text-icon-colors-defaults: (
32
+ "base": (
33
+ "default": get-merged($base-colors-defaults, $base-colors, 800),
34
+ "hover": get-merged($base-colors-defaults, $base-colors, 600),
35
+ "pressed": get-merged($base-colors-defaults, $base-colors, 1000),
36
+ "disabled": get-merged($base-colors-defaults, $base-colors, 400),
37
+ ),
38
+ "neutral": (
39
+ "default": get-merged($base-colors-defaults, $base-colors, 600),
40
+ "hover": get-merged($base-colors-defaults, $base-colors, 800),
41
+ "pressed": get-merged($base-colors-defaults, $base-colors, 1000),
42
+ "disabled": get-merged($base-colors-defaults, $base-colors, 400),
43
+ ),
44
+ "subtle": (
45
+ "default": get-merged($base-colors-defaults, $base-colors, 500),
46
+ "hover": get-merged($base-colors-defaults, $base-colors, 600),
47
+ "pressed": get-merged($base-colors-defaults, $base-colors, 800),
48
+ "disabled": get-merged($base-colors-defaults, $base-colors, 400),
49
+ ),
50
+ "inverse": (
51
+ "default": get-merged($base-colors-defaults, $base-colors, 0),
52
+ "hover": get-merged($base-colors-defaults, $base-colors, 200),
53
+ "pressed": get-merged($base-colors-defaults, $base-colors, 300),
54
+ "disabled": get-merged($base-colors-defaults, $base-colors, 500),
55
+ ),
56
+ );
57
+
58
+ $border-colors: () !default;
59
+ $border-colors-defaults: (
60
+ "base": (
61
+ "default": get-merged($base-colors-defaults, $base-colors, 800),
62
+ "hover": get-merged($base-colors-defaults, $base-colors, 600),
63
+ "pressed": get-merged($base-colors-defaults, $base-colors, 1000),
64
+ "disabled": get-merged($base-colors-defaults, $base-colors, 400),
65
+ ),
66
+ "neutral": (
67
+ "default": get-merged($base-colors-defaults, $base-colors, 400),
68
+ "hover": get-merged($base-colors-defaults, $base-colors, 500),
69
+ "pressed": get-merged($base-colors-defaults, $base-colors, 700),
70
+ "disabled": get-merged($base-colors-defaults, $base-colors, 300),
71
+ ),
72
+ "subtle": (
73
+ "default": get-merged($base-colors-defaults, $base-colors, 300),
74
+ "hover": get-merged($base-colors-defaults, $base-colors, 400),
75
+ "pressed": get-merged($base-colors-defaults, $base-colors, 500),
76
+ "disabled": get-merged($base-colors-defaults, $base-colors, 200),
77
+ ),
78
+ "inverse": (
79
+ "default": get-merged($base-colors-defaults, $base-colors, 0),
80
+ "hover": get-merged($base-colors-defaults, $base-colors, 400),
81
+ "pressed": get-merged($base-colors-defaults, $base-colors, 300),
82
+ "disabled": get-merged($base-colors-defaults, $base-colors, 500),
83
+ ),
84
+ );
85
+
86
+ $background-colors: () !default;
87
+ $background-colors-defaults: (
88
+ "base": (
89
+ "default": get-merged($base-colors-defaults, $base-colors, 0),
90
+ "hover": get-merged($base-colors-defaults, $base-colors, 200),
91
+ "pressed": get-merged($base-colors-defaults, $base-colors, 300),
92
+ "disabled": get-merged($base-colors-defaults, $base-colors, 100),
93
+ ),
94
+ "neutral": (
95
+ "default": get-merged($base-colors-defaults, $base-colors, 300),
96
+ "hover": get-merged($base-colors-defaults, $base-colors, 400),
97
+ "pressed": get-merged($base-colors-defaults, $base-colors, 200),
98
+ "disabled": get-merged($base-colors-defaults, $base-colors, 100),
99
+ ),
100
+ "subtle": (
101
+ "default": get-merged($base-colors-defaults, $base-colors, 200),
102
+ "hover": get-merged($base-colors-defaults, $base-colors, 300),
103
+ "pressed": get-merged($base-colors-defaults, $base-colors, 400),
104
+ "disabled": get-merged($base-colors-defaults, $base-colors, 100),
105
+ ),
106
+ "inverse": (
107
+ "default": get-merged($base-colors-defaults, $base-colors, 800),
108
+ "hover": get-merged($base-colors-defaults, $base-colors, 600),
109
+ "pressed": get-merged($base-colors-defaults, $base-colors, 1000),
110
+ "disabled": get-merged($base-colors-defaults, $base-colors, 400),
111
+ ),
112
+ );
113
+
114
+ /// Change this to what's available in your font
115
+ $font-weights: () !default;
116
+ $font-weights-defaults: (
117
+ 300: 300,
118
+ 400: 400,
119
+ 500: 500,
120
+ 600: 600,
121
+ );
122
+
13
123
  /// The base z-index of the modal
14
- $base-z-index: 5000;
124
+ $base-z-index: 5000 !default;
15
125
  /// The z-index of the search page
16
- $search-page-base-z-index: 1;
126
+ $search-page-base-z-index: 1 !default;
17
127
  /// The border radius to use. This is used in many places and not often exactly this value. Sometimes a multiple is used and if it's 0 then everything will be square
18
128
  ///
19
129
  /// Does re-assigning this variable with, for example, `PLP.$border-radius: 0` or `variables.$border-radius: 0` give an error in your IDE?
20
130
  /// Please upvote the Jetbrains issue (and maybe also comment why this is an issue for you) to get it fixed in WebStorm: https://youtrack.jetbrains.com/issue/WEB-46500
21
- $border-radius: 4px;
131
+ $border-radius: 4px !default;
22
132
 
23
- /// Makes the PLP.all-components mixin use WhiteSortAndFilter instead of SortAndFilter
24
- $white: true !default;
133
+ // The color of the progress bar below the toast that shows when it will auto-close
134
+ $toast-progress-bar-color: map.get(
135
+ get-merged($text-icon-colors-defaults, $text-icon-colors, "base"),
136
+ "default"
137
+ ) !default;
25
138
 
26
- // Instant Card
27
- $instant-card-sales-price-color: #ff2e3e;
28
- $instant-card-show-price: true;
29
- $instant-card-show-tagline: true;
139
+ /// Sometimes text is all uppercase in the UI. This is the default text transform used to do that that. For example, if you don't want uppercase text, you can set this to `none`
140
+ $uppercase-text-transform: uppercase !default;
141
+
142
+ $filters-configuration: () !default;
143
+ $filters-configuration-defaults: (
144
+ /// How much space should be between the input rows. Input row being a checkbox/radio button and its label.
145
+ "spacing-between-input-rows": 10px,
146
+ /// How high an "input row" should try to be. Input row being a checkbox/radio button and its label. If this is smaller than the text size, it will be ignored.
147
+ "input-row-height-goal": 21px
148
+ );
149
+
150
+ $search-modal: () !default;
151
+ $search-modal-defaults: (
152
+ /// The max width of the modal
153
+ /// Also used for the max width of SearchField on the search page
154
+ "max-width": 800px,
155
+ /// If the modal should snap to the top at certain screen sizes, only recommended to disable if you take care of this via JS
156
+ "top-snapping": true
157
+ );
30
158
 
31
- // Doesn't work well in IDEs
32
- $g-instant-card: (
159
+ /// Configuration for the buttons that show up when scrolling up after not being too close to the top on mobile
160
+ $floating-buttons: () !default;
161
+ $floating-buttons-defaults: (
162
+ /// The distance from the bottom of the buttons to the bottom of the screen.
163
+ "bottom-distance": 12px,
164
+ // The distance from the `$position`-side of the buttons to the `$position`-side of the screen.
165
+ "side-distance": 12px,
166
+ //The side of the screen the buttons should be aligned to. Can be "left" or "right".
167
+ "position": "left"
168
+ );
169
+
170
+ /// Background of the SearchField
171
+ $search-field: () !default;
172
+ $search-field-defaults: (
173
+ /// The background color of the input field, clear button and back buton
174
+ "background": map.get(get-merged($background-colors-defaults, $background-colors, "base"), "default"),
175
+ /// Border radius of the outer edges of the whole SearchField
176
+ "border-radius": calc(#{$border-radius} * 2.5)
177
+ );
178
+
179
+ /// Not all gaps can currently be customised using this but some of them do. If this is useful for you and you think we should make it more consistent, please let us know.
180
+ $gaps: () !default;
181
+ $gaps-defaults: (
182
+ /// The gap between the individual instant results in the modal
183
+ "between-instant-results": 5px,
184
+ /// The query suggestion part of the modal
185
+ "autocomplete":
186
+ (
187
+ /// The vertical gap between the "list-style items", the individual suggestions that have the full width.
188
+ "between-items-in-row-mode": 5px,
189
+ /// The vertical gap between the category and query suggestion sections
190
+ "between-category-and-other": 20px,
191
+ /// The horizontal gap between the individual query suggestions that show up in "compact" mode (multiple in the same row) when no query has been entered
192
+ "between-compact-suggestions": 5px
193
+ ),
194
+ /// The product listing page (PLP) overall
195
+ /// Note that for the gaps here not the exact values will always be used but often multiples for different places where it's appropriate.
196
+ "listing-page":
197
+ (
198
+ /// The spacing between the filters and content.
199
+ "spacing-to-filters": 12px,
200
+ /// The vertical gap between the different items on desktop.
201
+ "desktop-item-gap": 20px,
202
+ /// The vertical gap between the different items on mobile.
203
+ "mobile-item-gap": 16px,
204
+ /// Spacing above and below selected filters
205
+ "above-and-below-selected-filters":
206
+ (
207
+ "mobile": 10px,
208
+ "desktop": 0,
209
+ ),
210
+ /// Values specific to the search page
211
+ "search":
212
+ (
213
+ /// Whether to add equal spacing above the search field as below.
214
+ "spacing-above-search-field": true,
215
+ /// The factor to multiply the gaps with to get the spacing above the recommendations.
216
+ "gap-to-recs-factor": 3
217
+ )
218
+ )
219
+ );
220
+
221
+ /// Customize Instant Card
222
+ $instant-card: () !default;
223
+ $instant-card-defaults: (
33
224
  "sales-price-color": #ff2e3e,
34
225
  "show-price": true,
35
- "show-subtitle": true,
226
+ "show-tagline": true,
36
227
  );
37
228
 
38
- /// Configure the styling - right now only works for three variables.
39
- /// This is subject to change.
40
- ///
41
- /// @param {String} $instant-card-sales-price-color [null]
42
- /// Determines the color of the sales price in the Instant Card component
43
- /// @param {Boolean} $instant-card-show-price [null]
44
- /// Determines if the price is shown in the Instant Card component
45
- /// @param {Boolean} $instant-card-show-tagline [null]
46
- /// Determines if the tagline is shown in the Instand Card component
47
- @mixin configure(
48
- $instant-card-sales-price-color: null,
49
- $instant-card-show-price: null,
50
- $instant-card-show-tagline: null
51
- ) {
52
- @if $instant-card-sales-price-color != null {
53
- $instant-card-sales-price-color: $instant-card-sales-price-color !global;
54
- }
55
- @if $instant-card-show-price != null {
56
- $instant-card-show-price: $instant-card-show-price !global;
57
- }
58
- @if $instant-card-show-tagline != null {
59
- $instant-card-show-tagline: $instant-card-show-tagline !global;
60
- }
229
+ /// See documentation of Autocomplete mixin for explanation of these maps
230
+ /// They allow customizing the highlighting in the query suggestions
231
+ $autocomplete-entries-without-highlight: () !default;
232
+ $autocomplete-entries-with-highlight: () !default;
233
+
234
+ $primary-button: () !default;
235
+ $secondary-button: () !default;
236
+
237
+ /// Makes it easy to get the text color
238
+ /// @param {"base" | "neutral" | "subtle" | "inverse"} $type - What type of color
239
+ /// @param {"default" | "hover" | "pressed" | "disabled"} $state ["base"] - The state
240
+ @function get-text-color($type, $state) {
241
+ @return map.get(get-merged($text-icon-colors-defaults, $text-icon-colors, $type), $state);
242
+ }
243
+
244
+ /// Makes it easy to get the border color
245
+ /// @param {"base" | "neutral" | "subtle" | "inverse"} $type - What type of color
246
+ /// @param {"default" | "hover" | "pressed" | "disabled"} $state ["base"] - The state
247
+ @function get-border-color($type, $state) {
248
+ @return map.get(get-merged($border-colors-defaults, $border-colors, $type), $state);
249
+ }
250
+
251
+ /// Makes it easy to get the background color
252
+ /// @param {"base" | "neutral" | "subtle" | "inverse"} $type - What type of color
253
+ /// @param {"default" | "hover" | "pressed" | "disabled"} $state ["base"] - The state
254
+ @function get-background-color($type, $state) {
255
+ @return map.get(get-merged($background-colors-defaults, $background-colors, $type), $state);
256
+ }
257
+
258
+ /// Makes it easy to get font weight
259
+ /// @param {300 | 400 | 500 | 600} $type - What type of font weight to get (light, regular, medium or bold)
260
+ @function get-font-weight($type) {
261
+ @return get-merged($font-weights-defaults, $font-weights, $type);
262
+ }
263
+
264
+ @function get-gap($name) {
265
+ @return get-merged($gaps-defaults, $gaps, $name);
61
266
  }
@@ -9,7 +9,7 @@ interface UseDepictSearchFieldReturn {
9
9
  */
10
10
  DepictSearchField: () => ReactElement;
11
11
  }
12
- export const version = "0.0.73";
12
+ export const version = "0.0.75";
13
13
  export function DepictProvider(props: any): any;
14
14
  export function DepictSearchPage(): any;
15
15
  export function DepictCategoryPage(): any;
@@ -19,7 +19,7 @@ $parcel$export(module.exports, "useDepictSearchModal", () => $41e7e5d85b5e0d49$e
19
19
  $parcel$export(module.exports, "version", () => $db7b67857900028b$export$83d89fbfd8236492);
20
20
 
21
21
 
22
- const $db7b67857900028b$export$83d89fbfd8236492 = "0.0.73";
22
+ const $db7b67857900028b$export$83d89fbfd8236492 = "0.0.75";
23
23
 
24
24
 
25
25
  function $41e7e5d85b5e0d49$export$9fac37a9c21c2f3b(props) {
@@ -3,7 +3,7 @@ import {jsx as $1RlIW$jsx} from "react/jsx-runtime";
3
3
 
4
4
 
5
5
 
6
- const $c9c4d066f9a5b51b$export$83d89fbfd8236492 = "0.0.73";
6
+ const $c9c4d066f9a5b51b$export$83d89fbfd8236492 = "0.0.75";
7
7
 
8
8
 
9
9
  function $2b1fdeb83610500f$export$9fac37a9c21c2f3b(props) {
package/locales/index.js CHANGED
@@ -1 +1 @@
1
- export * from "@depict-ai/ui/locales";
1
+ export * from "@depict-ai/ui/locales";
@@ -1 +1 @@
1
- module.exports = require("@depict-ai/ui/locales");
1
+ module.exports = require("@depict-ai/ui/locales");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@depict-ai/react-ui",
3
- "version": "0.0.73",
3
+ "version": "0.0.75",
4
4
  "packageManager": "yarn@3.2.2",
5
5
  "source": "src/index.ts",
6
6
  "main": "dist/main.js",
@@ -90,8 +90,8 @@
90
90
  "/locales"
91
91
  ],
92
92
  "dependencies": {
93
- "@depict-ai/ui": "^0.0.51",
94
- "@depict-ai/utilishared": "^0.0.48",
93
+ "@depict-ai/ui": "^0.0.53",
94
+ "@depict-ai/utilishared": "^0.0.50",
95
95
  "solid-js": "^1.6.2"
96
96
  },
97
97
  "peerDependencies": {
@@ -104,7 +104,7 @@
104
104
  "@babel/preset-typescript": "latest",
105
105
  "@babel/runtime": "latest",
106
106
  "@babel/runtime-corejs3": "latest",
107
- "@depict-ai/plp-styling": "^0.0.12",
107
+ "@depict-ai/plp-styling": "^0.0.14",
108
108
  "@jest/globals": "^29.3.1",
109
109
  "@parcel/babel-preset-env": "latest",
110
110
  "@parcel/resolver-default": "^2.8.0",
@@ -1,152 +0,0 @@
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
- /// A wrapper around SortAndFilter that styles the sorting and filtering menus for the white theme by providing a default set of white variables.
10
- ///
11
- /// ### Parameters
12
- /// See [SortAndFilter](#undefined-mixin-SortAndFilter) for parameters.
13
- @mixin WhiteSortAndFilter(
14
- $mobile-top-level-collapse-color: variables.$brand-black,
15
- $mobile-top-level-collapse-background: #fff,
16
- $custom-input-checked-background: #fff,
17
- $custom-input-background: #fff,
18
- $custom-input-indicator-color: variables.$brand-black,
19
- $checkbox-background-color: #fff,
20
- $checkbox-checked-background-color: variables.$brand-black,
21
- $checkbox-checkmark-color: #fff,
22
- $checkbox-border-radius: if(variables.$border-radius == 0, 0, if(variables.$border-radius == 0px, 0, 2px)),
23
- // if global border radius is 0 or 0px, don't round input fields in their default value
24
- $checkbox-border: 1px solid variables.$brand-dark-grey,
25
- $checkbox-top-offset: 0px,
26
- $checkbox-left-offset: 0px,
27
- $radio-border: 1px solid variables.$brand-dark-grey,
28
- $radio-background-color: #fff,
29
- $radio-selected-dot-color: variables.$brand-black,
30
- $radio-selected-dot-size: 14px,
31
- $radio-selected-offset: 0px,
32
- $separator-color: variables.$brand-dark-grey,
33
- $price-range-min-max-text-color: variables.$brand-dark-grey,
34
- $range-input-bg-color: variables.$brand-lightest-grey,
35
- $clear-all-filters-color: #fff,
36
- $top-level-summary-background: transparent,
37
- $hovered-top-level-summary-background: variables.$brand-lightest-grey,
38
- $hovered-range-input-bg-color: variables.$brand-lighter-grey,
39
- $hovered-checkbox-bg: variables.$brand-lighter-grey,
40
- $hovered-checkbox-checked-background-color: variables.$brand-dark-grey,
41
- $input-row-label-color: variables.$brand-dark-grey,
42
- $checked-input-row-label-color: #000,
43
- $input-row-label-font-weight: 400,
44
- $checked-input-row-label-font-weight: 500,
45
- $showing-selected-subfilter-count-color: variables.$brand-grey,
46
- $filter-available-products-color: variables.$brand-grey,
47
- $count-zero-input-row-label-color: rgb(194, 194, 194),
48
- $spacing_between_input_rows: 10px,
49
- $ungrouped-top-margin: 25px,
50
- $hovered-checkbox-border: 2px solid variables.$brand-black,
51
- $hovered-radio-border: 2px solid variables.$brand-black,
52
- $sort-and-filter-button-padding: 10px 20px,
53
- $expandable-seperator-color: variables.$brand-lightest-grey,
54
- $expandable-seperator-hover-color: variables.$brand-lighter-grey,
55
- $expandable-seperator-height: 1px,
56
- $filter-group-heading-color: variables.$brand-dark-grey,
57
- $filter-groups-morphing-sign-color: variables.$brand-dark-grey,
58
- $filter-group-border-color: variables.$brand-light-grey,
59
- $filter-group-summary-border-radius: 0px,
60
- $sort-and-filter-modal-background: white,
61
- $filter-group-heading-padding: 15px 10px,
62
- $filter-group-summary-spacings: 0px,
63
- $range-input-field-border-radius: 0px,
64
- $range-input-field-border: 0.5px solid #000000,
65
- $filter-group-title-bold: 500,
66
- $view-more-clear-background: white,
67
- $filter-collapsible-body-background: white,
68
- $sort-and-filter-modal-section-title-font-weight: bold,
69
- $sort-and-filter-modal-section-expanded-title-font-weight: $sort-and-filter-modal-section-title-font-weight,
70
- $expanded-filter-group-border-color: variables.$brand-lighter-grey,
71
- $view-more-clear-border-color: variables.$brand-lighter-grey
72
- ) {
73
- @include SortAndFilter.SortAndFilter(
74
- $mobile-top-level-collapse-color,
75
- $mobile-top-level-collapse-background,
76
- $custom-input-checked-background,
77
- $custom-input-background,
78
- $custom-input-indicator-color,
79
- $checkbox-background-color,
80
- $checkbox-checked-background-color,
81
- $checkbox-checkmark-color,
82
- $checkbox-border-radius,
83
- $checkbox-border,
84
- $checkbox-top-offset,
85
- $checkbox-left-offset,
86
- $radio-border,
87
- $radio-background-color,
88
- $radio-selected-dot-color,
89
- $radio-selected-dot-size,
90
- $radio-selected-offset,
91
- $separator-color,
92
- $price-range-min-max-text-color,
93
- $range-input-bg-color,
94
- $top-level-summary-background,
95
- $hovered-top-level-summary-background,
96
- $hovered-range-input-bg-color,
97
- $hovered-checkbox-bg,
98
- $hovered-checkbox-checked-background-color,
99
- $input-row-label-color,
100
- $checked-input-row-label-color,
101
- $input-row-label-font-weight,
102
- $checked-input-row-label-font-weight,
103
- $showing-selected-subfilter-count-color,
104
- $filter-available-products-color,
105
- $count-zero-input-row-label-color,
106
- $spacing_between_input_rows,
107
- $ungrouped-top-margin,
108
- $hovered-checkbox-border,
109
- $hovered-radio-border,
110
- $sort-and-filter-button-padding,
111
- $expandable-seperator-color,
112
- $expandable-seperator-hover-color,
113
- $expandable-seperator-height,
114
- $filter-group-heading-color,
115
- $filter-groups-morphing-sign-color,
116
- $filter-group-summary-border-radius,
117
- $sort-and-filter-modal-background,
118
- $filter-group-heading-padding,
119
- $filter-group-summary-spacings,
120
- $range-input-field-border-radius,
121
- $range-input-field-border,
122
- $filter-group-title-bold,
123
- $view-more-clear-background,
124
- $filter-collapsible-body-background,
125
- $sort-and-filter-modal-section-title-font-weight,
126
- $sort-and-filter-modal-section-expanded-title-font-weight
127
- );
128
- .filters .body {
129
- details.filter-collapsible {
130
- border-top: 1px solid $filter-group-border-color;
131
- &[open] {
132
- & > summary {
133
- border-bottom: 1px solid $expanded-filter-group-border-color;
134
- }
135
- }
136
- .filter-collapsible-body {
137
- margin-bottom: 15px;
138
- }
139
- }
140
- .view-more-clear {
141
- border-top: 1px solid $view-more-clear-border-color;
142
- }
143
- }
144
- .filter-sort-modal details {
145
- &.sorting,
146
- &.filters {
147
- .sort-filter-summary > .summary {
148
- border-top: 1px solid #f4f4f4;
149
- }
150
- }
151
- }
152
- }