@depict-ai/react-ui 0.0.75 → 0.0.77

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 (31) hide show
  1. package/dist/index.d.ts +42 -103
  2. package/dist/main.js +16 -16
  3. package/dist/module.js +12 -12
  4. package/dist/styles/components/PLP/Buttons.scss +2 -2
  5. package/dist/styles/components/PLP/MorphingSign.scss +1 -1
  6. package/dist/styles/components/PLP/PLPResults.scss +1 -0
  7. package/dist/styles/components/PLP/ScrollStatus.scss +1 -1
  8. package/dist/styles/components/PLP/SelectedFilters.scss +3 -3
  9. package/dist/styles/components/PLP/SlidableItems.scss +1 -1
  10. package/dist/styles/components/PLP/SortAndFilter/FloatingButtons.scss +1 -1
  11. package/dist/styles/components/PLP/SortAndFilter/SortAndFilter.scss +38 -26
  12. package/dist/styles/components/PLP/SortAndFilter/SortAndFilterModal.scss +2 -2
  13. package/dist/styles/components/PLP/Toast.scss +2 -2
  14. package/dist/styles/components/category/BreadCrumbs.scss +3 -3
  15. package/dist/styles/components/category/CategoryTitle.scss +1 -1
  16. package/dist/styles/components/category/QuickLinks.scss +2 -2
  17. package/dist/styles/components/search/Autocomplete.scss +7 -7
  18. package/dist/styles/components/search/CategorySuggestions.scss +1 -1
  19. package/dist/styles/components/search/PreviousSearches.scss +3 -3
  20. package/dist/styles/components/search/SearchField.scss +28 -9
  21. package/dist/styles/default.css +1 -1
  22. package/dist/styles/helpers/color_inference.scss +112 -0
  23. package/dist/styles/helpers/custom_input.scss +1 -1
  24. package/dist/styles/helpers/utils.scss +14 -0
  25. package/dist/styles/index.scss +13 -5
  26. package/dist/styles/package.json +31 -0
  27. package/dist/styles/variables.scss +113 -67
  28. package/dist-server/index.d.ts +8 -8
  29. package/dist-server/main.js +12 -12
  30. package/dist-server/module.js +8 -8
  31. package/package.json +4 -4
@@ -8,15 +8,12 @@
8
8
  @use "sass:color";
9
9
  @use "sass:map";
10
10
 
11
- /// Mixin that styles the sorting and filtering menus.
12
-
13
11
  $brand-black: variables.get-merged(variables.$base-colors-defaults, variables.$base-colors, 800);
14
12
  $brand-dark-grey: variables.get-merged(variables.$base-colors-defaults, variables.$base-colors, 600);
15
13
  $brand-grey: variables.get-merged(variables.$base-colors-defaults, variables.$base-colors, 400);
16
14
  $brand-light-grey: variables.get-merged(variables.$base-colors-defaults, variables.$base-colors, 300);
17
15
  $brand-lighter-grey: variables.get-merged(variables.$base-colors-defaults, variables.$base-colors, 200);
18
16
  $brand-lightest-grey: variables.get-merged(variables.$base-colors-defaults, variables.$base-colors, 100);
19
- $deprecated-grey: variables.get-merged(variables.$base-colors-defaults, variables.$base-colors, "deprecated-grey");
20
17
 
21
18
  // Mega hack right now, we want to wait on Vicki's redesign of this
22
19
 
@@ -41,6 +38,7 @@ $hovered-checkbox-checked-background-color: $brand-dark-grey;
41
38
  $hovered-checkbox-border: 2px solid $brand-black;
42
39
  $hovered-radio-border: 2px solid $brand-black;
43
40
 
41
+ /// Mixin that styles the sorting and filtering menus.
44
42
  @mixin SortAndFilter() {
45
43
  $spacing_between_input_rows: variables.get-merged(
46
44
  variables.$filters-configuration-defaults,
@@ -133,8 +131,8 @@ $hovered-radio-border: 2px solid $brand-black;
133
131
  position: absolute;
134
132
  right: -4px;
135
133
  top: -4px;
136
- background: black;
137
- color: #fff;
134
+ background: variables.get-background-color("inverse", "default");
135
+ color: variables.get-text-icon-color("inverse", "default");
138
136
  border-radius: 13px;
139
137
  width: 20px;
140
138
  line-height: 1;
@@ -224,7 +222,7 @@ $hovered-radio-border: 2px solid $brand-black;
224
222
  text-overflow: ellipsis;
225
223
  white-space: pre-line;
226
224
  overflow-wrap: anywhere;
227
- color: variables.get-text-color("neutral", "default");
225
+ color: variables.get-text-icon-color("neutral", "default");
228
226
  -webkit-box-orient: vertical;
229
227
  -webkit-line-clamp: 1;
230
228
  overflow: hidden;
@@ -235,20 +233,20 @@ $hovered-radio-border: 2px solid $brand-black;
235
233
  *:checked,
236
234
  .fake-checked {
237
235
  & ~ .text {
238
- color: variables.get-text-color("neutral", "pressed");
236
+ color: variables.get-text-icon-color("base", "default");
239
237
  font-weight: variables.get-merged(variables.$font-weights-defaults, variables.$font-weights, 500);
240
238
  }
241
239
  }
242
240
 
243
241
  &.count-0 * + .text {
244
- color: variables.get-text-color("subtle", "default");
242
+ color: variables.get-text-icon-color("subtle", "default");
245
243
  }
246
244
  }
247
245
 
248
246
  .input-row,
249
247
  .hierarchical .checkbox-details.expandable .category-parent {
250
248
  .count {
251
- color: variables.get-text-color("subtle", "default");
249
+ color: variables.get-text-icon-color("subtle", "default");
252
250
  font-weight: variables.get-merged(variables.$font-weights-defaults, variables.$font-weights, 400);
253
251
  }
254
252
  }
@@ -266,8 +264,8 @@ $hovered-radio-border: 2px solid $brand-black;
266
264
  display: flex;
267
265
  @include utils.flex-gap(5px, "row nowrap");
268
266
  align-items: center;
269
- color: variables.get-text-color("subtle", "default");
270
- fill: variables.get-text-color("subtle", "default");
267
+ color: variables.get-text-icon-color("subtle", "default");
268
+ fill: variables.get-text-icon-color("subtle", "default");
271
269
 
272
270
  span {
273
271
  line-height: 1;
@@ -276,7 +274,7 @@ $hovered-radio-border: 2px solid $brand-black;
276
274
  }
277
275
 
278
276
  .ungrouped {
279
- /// Spacing above filters that aren't in a group
277
+ // Spacing above filters that aren't in a group
280
278
  margin-top: 25px;
281
279
  }
282
280
 
@@ -334,7 +332,7 @@ $hovered-radio-border: 2px solid $brand-black;
334
332
  }
335
333
 
336
334
  & > .summary {
337
- color: variables.get-text-color("neutral", "default");
335
+ color: variables.get-text-icon-color("neutral", "default");
338
336
  padding: 15px 10px;
339
337
 
340
338
  & > svg {
@@ -397,7 +395,7 @@ $hovered-radio-border: 2px solid $brand-black;
397
395
  margin-bottom: 0;
398
396
  margin-right: 0;
399
397
  margin-left: 0;
400
- color: black;
398
+ color: variables.get-text-icon-color("neutral", "default");
401
399
  cursor: pointer;
402
400
  padding: 10px;
403
401
  display: flex;
@@ -406,10 +404,21 @@ $hovered-radio-border: 2px solid $brand-black;
406
404
  text-transform: variables.$uppercase-text-transform;
407
405
  svg {
408
406
  path {
409
- fill: black;
407
+ fill: variables.get-text-icon-color("neutral", "default");
408
+ }
409
+ }
410
+
411
+ @include supports-hover.supports-hover() {
412
+ &:hover {
413
+ // We need this to be reaallyy subtle, neutral hover is too much
414
+ color: utils.highlight-color(variables.get-text-icon-color("neutral", "default"));
410
415
  }
411
416
  }
412
417
 
418
+ &:active {
419
+ color: variables.get-text-icon-color("neutral", "pressed");
420
+ }
421
+
413
422
  &:focus-visible {
414
423
  outline: none;
415
424
  filter: map.get(Buttons.get-secondary-button-properties(), "focus-visible-filter");
@@ -446,6 +455,8 @@ $hovered-radio-border: 2px solid $brand-black;
446
455
  position: relative;
447
456
  $expandable-separator-height: 1px;
448
457
  $expandable-separator-hover-change-factor: 20%;
458
+ $expandable-separator-color: variables.get-border-color("subtle", "disabled");
459
+ $expanded-separator-highlighted-color: variables.get-border-color("subtle", "default");
449
460
 
450
461
  & summary {
451
462
  &:before,
@@ -456,7 +467,7 @@ $hovered-radio-border: 2px solid $brand-black;
456
467
  right: 0;
457
468
  height: $expandable-separator-height;
458
469
  width: calc(100% - 20px); // Reduce for padding
459
- background: variables.get-background-color("base", "disabled");
470
+ background: $expandable-separator-color;
460
471
  }
461
472
 
462
473
  &:before {
@@ -473,7 +484,7 @@ $hovered-radio-border: 2px solid $brand-black;
473
484
  .input-row:hover ~ details > & {
474
485
  &:after,
475
486
  &:before {
476
- background: variables.get-background-color("subtle", "hover");
487
+ background: $expanded-separator-highlighted-color;
477
488
  z-index: 1;
478
489
  }
479
490
  }
@@ -483,7 +494,7 @@ $hovered-radio-border: 2px solid $brand-black;
483
494
  .input-row ~ details:focus-visible > & {
484
495
  &:after,
485
496
  &:before {
486
- background: variables.get-background-color("subtle", "hover");
497
+ background: $expanded-separator-highlighted-color;
487
498
  z-index: 1;
488
499
  }
489
500
  }
@@ -582,7 +593,7 @@ $hovered-radio-border: 2px solid $brand-black;
582
593
  height: $morphing-sign-width;
583
594
 
584
595
  span {
585
- background: black;
596
+ background: variables.get-text-icon-color("base", "hover");
586
597
  transition-duration: 150ms;
587
598
  transition-timing-function: ease-in-out;
588
599
  }
@@ -609,7 +620,7 @@ $hovered-radio-border: 2px solid $brand-black;
609
620
 
610
621
  input {
611
622
  border: 0.5px solid variables.get-border-color("base", "default");
612
- background: variables.get-background-color("base", "disabled");
623
+ background: variables.get-background-color("subtle", "default");
613
624
  transition-duration: 50ms;
614
625
  padding-top: 8px;
615
626
  padding-bottom: 8px;
@@ -617,14 +628,15 @@ $hovered-radio-border: 2px solid $brand-black;
617
628
  outline: none;
618
629
  text-align: center;
619
630
  -moz-appearance: textfield;
631
+ color: variables.get-text-icon-color("subtle", "default");
620
632
 
621
633
  &:focus-visible {
622
- background: variables.get-background-color("base", "hover");
634
+ background: variables.get-background-color("subtle", "hover");
623
635
  }
624
636
 
625
637
  @include supports-hover.supports-hover() {
626
638
  &:hover {
627
- background: variables.get-background-color("base", "hover");
639
+ background: variables.get-background-color("subtle", "hover");
628
640
  }
629
641
  }
630
642
 
@@ -642,7 +654,7 @@ $hovered-radio-border: 2px solid $brand-black;
642
654
  font-size: 19px;
643
655
  align-items: center;
644
656
  justify-content: center;
645
- color: variables.get-text-color("neutral", "default");
657
+ color: variables.get-text-icon-color("neutral", "default");
646
658
  }
647
659
  }
648
660
 
@@ -732,7 +744,7 @@ $hovered-radio-border: 2px solid $brand-black;
732
744
  padding-top: 10px;
733
745
  display: flex;
734
746
  justify-content: space-between;
735
- color: variables.get-text-color("neutral", "default");
747
+ color: variables.get-text-icon-color("neutral", "default");
736
748
  }
737
749
  }
738
750
 
@@ -758,7 +770,7 @@ $hovered-radio-border: 2px solid $brand-black;
758
770
  .body {
759
771
  @include utils.flex-gap(1px, "column nowrap");
760
772
  line-height: 1;
761
- color: variables.get-text-color("neutral", "default");
773
+ color: variables.get-text-icon-color("neutral", "default");
762
774
 
763
775
  .input-row {
764
776
  align-items: center;
@@ -776,7 +788,7 @@ $hovered-radio-border: 2px solid $brand-black;
776
788
  @mixin default_morphing_sign_in_expandable {
777
789
  .morphing-sign {
778
790
  span {
779
- background: variables.get-background-color("inverse", "hover");
791
+ background: variables.get-text-icon-color("base", "hover");
780
792
 
781
793
  &:first-child {
782
794
  width: 5%;
@@ -8,7 +8,7 @@
8
8
  $expanded-title-font-weight: variables.get-merged(variables.$font-weights-defaults, variables.$font-weights, 600);
9
9
  $sort-and-filter-modal-background: #fff;
10
10
  $mobile-top-level-collapse-background: $sort-and-filter-modal-background;
11
- $mobile-top-level-collapse-color: variables.get-text-color("base", "default");
11
+ $mobile-top-level-collapse-color: variables.get-text-icon-color("base", "default");
12
12
 
13
13
  .depict-filter-sort-modal-backdrop {
14
14
  @include utils.modal-backdrop($background: rgba(0, 0, 0, 0.7), $z-index: variables.$base-z-index);
@@ -100,7 +100,7 @@
100
100
  .filters,
101
101
  .sorting {
102
102
  .body {
103
- color: variables.get-text-color("neutral", "default");
103
+ color: variables.get-text-icon-color("neutral", "default");
104
104
  }
105
105
  & > summary {
106
106
  .morphing-sign span {
@@ -11,7 +11,7 @@
11
11
  left: 50%;
12
12
  transform: translateX(-50%);
13
13
  z-index: calc(#{variables.$base-z-index} + 5);
14
- background: white;
14
+ background: variables.get-background-color("base", "default");
15
15
  box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.05);
16
16
  padding: 10px 20px;
17
17
  border-radius: variables.$border-radius;
@@ -49,7 +49,7 @@
49
49
  }
50
50
 
51
51
  & {
52
- color: variables.get-text-color("base", "default");
52
+ color: variables.get-text-icon-color("base", "default");
53
53
  }
54
54
  button {
55
55
  padding: 5px 20px;
@@ -7,19 +7,19 @@
7
7
  display: flex;
8
8
  flex-wrap: wrap;
9
9
  .crumb {
10
- color: variables.get-text-color("neutral", "default");
10
+ color: variables.get-text-icon-color("neutral", "default");
11
11
  &:hover {
12
12
  text-decoration: underline;
13
13
  }
14
14
  &:last-of-type {
15
- color: variables.get-text-color("base", "default");
15
+ color: variables.get-text-icon-color("base", "default");
16
16
  font-weight: 500;
17
17
  }
18
18
  }
19
19
  .separator {
20
20
  margin-left: 10px;
21
21
  margin-right: 10px;
22
- color: variables.get-text-color("subtle", "default");
22
+ color: variables.get-text-icon-color("subtle", "default");
23
23
  }
24
24
  }
25
25
  }
@@ -23,7 +23,7 @@
23
23
  font-size: inherit;
24
24
  }
25
25
  .explanation {
26
- color: variables.get-text-color("subtle", "default");
26
+ color: variables.get-text-icon-color("subtle", "default");
27
27
  font-weight: 500;
28
28
  .product-count {
29
29
  margin-left: 10px;
@@ -15,7 +15,7 @@
15
15
  white-space: nowrap;
16
16
  padding: 10px 20px;
17
17
  background: variables.get-background-color("base", "default");
18
- color: variables.get-text-color("base", "default");
18
+ color: variables.get-text-icon-color("base", "default");
19
19
  transition: all 75ms ease-in-out;
20
20
  border-radius: variables.$border-radius;
21
21
  border: 1px solid variables.get-border-color("neutral", "default");
@@ -35,7 +35,7 @@
35
35
  background: variables.get-background-color("base", "pressed");
36
36
  }
37
37
  &.selected {
38
- color: variables.get-text-color("inverse", "default");
38
+ color: variables.get-text-icon-color("inverse", "default");
39
39
  background: variables.get-background-color("inverse", "default");
40
40
  border: 1px solid transparent;
41
41
  @include supports-hover.supports-hover() {
@@ -64,16 +64,16 @@
64
64
  $entries-with-highlight: variables.$autocomplete-entries-with-highlight
65
65
  ) {
66
66
  $entries-without-highlight-defaults: (
67
- "color": variables.get-text-color("neutral", "default"),
67
+ "color": variables.get-text-icon-color("neutral", "default"),
68
68
  "font-weight": variables.get-font-weight(400),
69
69
  );
70
70
  $entries-with-highlight-defaults: (
71
71
  "highlighted-part": (
72
- "color": variables.get-text-color("neutral", "default"),
72
+ "color": variables.get-text-icon-color("neutral", "default"),
73
73
  "font-weight": variables.get-font-weight(500),
74
74
  ),
75
75
  "toned-down-part": (
76
- "color": variables.get-text-color("neutral", "default") y,
76
+ "color": variables.get-text-icon-color("neutral", "default") y,
77
77
  "font-weight": variables.get-font-weight(400),
78
78
  ),
79
79
  );
@@ -85,7 +85,7 @@
85
85
  .text {
86
86
  font-size: 16px;
87
87
  font-weight: variables.get-font-weight(700);
88
- color: variables.get-text-color("neutral", "default");
88
+ color: variables.get-text-icon-color("neutral", "default");
89
89
  margin-top: 0;
90
90
  }
91
91
  .item,
@@ -124,6 +124,9 @@
124
124
  .suggestion {
125
125
  svg {
126
126
  flex-shrink: 0;
127
+ path {
128
+ fill: variables.get-text-icon-color("neutral", "default");
129
+ }
127
130
  }
128
131
  display: flex;
129
132
  justify-content: space-between;
@@ -138,9 +141,6 @@
138
141
  max-height: 13px;
139
142
  svg {
140
143
  transform: scale(0.6) translate(-6.9px, -7.2px);
141
- path {
142
- fill: variables.get-text-color("neutral", "default");
143
- }
144
144
  }
145
145
  }
146
146
 
@@ -32,7 +32,7 @@
32
32
  }
33
33
  border: 1px solid variables.get-border-color("subtle", "default");
34
34
  padding: 10px 20px;
35
- color: variables.get-text-color("base", "default");
35
+ color: variables.get-text-icon-color("base", "default");
36
36
  display: flex;
37
37
  height: 100%;
38
38
  align-items: center;
@@ -13,7 +13,7 @@
13
13
  display: flex;
14
14
  flex-direction: column;
15
15
  @include utils.flex-gap(15px, "column nowrap");
16
- $icon-color: variables.get-text-color("neutral", "default");
16
+ $icon-color: variables.get-text-icon-color("neutral", "default");
17
17
 
18
18
  .list {
19
19
  display: flex;
@@ -64,7 +64,7 @@
64
64
  &:hover svg {
65
65
  transform: scale(1.2);
66
66
  path {
67
- fill: variables.get-text-color("neutral", "pressed");
67
+ fill: variables.get-text-icon-color("neutral", "pressed");
68
68
  }
69
69
  }
70
70
  &:focus-visible {
@@ -72,7 +72,7 @@
72
72
  svg {
73
73
  transform: scale(1.2);
74
74
  path {
75
- fill: variables.get-text-color("neutral", "pressed");
75
+ fill: variables.get-text-icon-color("neutral", "pressed");
76
76
  }
77
77
  }
78
78
  }
@@ -12,6 +12,7 @@
12
12
  "background"
13
13
  );
14
14
  $border-radius: variables.get-merged(variables.$search-field-defaults, variables.$search-field, "border-radius");
15
+
15
16
  .search-field {
16
17
  input,
17
18
  button {
@@ -20,6 +21,9 @@
20
21
  display: flex;
21
22
  z-index: calc(#{variables.$search-page-base-z-index} + 5); // make shadow go above contents
22
23
  box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.05);
24
+ // For the shadow
25
+ border-radius: $border-radius;
26
+
23
27
  //&:focus-within {
24
28
  // // something like this could be nice?
25
29
  // box-shadow: 0px 4px 12px rgba(15, 15, 15, 0.16);
@@ -34,18 +38,18 @@
34
38
  padding-bottom: 14px;
35
39
  padding-right: 55px;
36
40
  width: 100%;
37
- color: variables.get-text-color("neutral", "default");
41
+ color: variables.get-text-icon-color("neutral", "default");
38
42
  background-color: $search-field-background;
39
43
  border: none;
40
44
 
41
45
  &:focus {
42
46
  outline: none;
43
- color: variables.get-text-color("neutral", "pressed");
47
+ color: variables.get-text-icon-color("neutral", "pressed");
44
48
  }
45
49
  @include supports-hover.supports-hover() {
46
50
  &:hover {
47
51
  outline: none;
48
- color: variables.get-text-color("neutral", "pressed");
52
+ color: variables.get-text-icon-color("neutral", "pressed");
49
53
  }
50
54
  }
51
55
  &.has-adjacent-back-button {
@@ -74,8 +78,9 @@
74
78
  border-bottom-left-radius: $border-radius;
75
79
  border-top-left-radius: $border-radius;
76
80
  cursor: pointer;
81
+
77
82
  svg path {
78
- fill: variables.get-text-color("neutral", "default");
83
+ fill: variables.get-text-icon-color("neutral", "default");
79
84
  }
80
85
  &:focus {
81
86
  outline: none;
@@ -83,13 +88,13 @@
83
88
  &:focus-visible {
84
89
  filter: map.get(Buttons.get-secondary-button-properties(), "focus-visible-filter");
85
90
  svg path {
86
- fill: variables.get-text-color("neutral", "hovered");
91
+ fill: variables.get-text-icon-color("neutral", "hover");
87
92
  }
88
93
  }
89
94
  @include supports-hover.supports-hover() {
90
95
  &:hover {
91
96
  svg path {
92
- fill: variables.get-text-color("neutral", "hovered");
97
+ fill: variables.get-text-icon-color("neutral", "hover");
93
98
  }
94
99
  }
95
100
  }
@@ -109,7 +114,7 @@
109
114
  border: none;
110
115
  padding: 0;
111
116
  svg path {
112
- fill: variables.get-text-color("neutral", "default");
117
+ fill: variables.get-text-icon-color("neutral", "default");
113
118
  }
114
119
 
115
120
  &:focus {
@@ -118,13 +123,13 @@
118
123
  &:focus-visible {
119
124
  filter: map.get(Buttons.get-secondary-button-properties(), "focus-visible-filter");
120
125
  svg path {
121
- fill: variables.get-text-color("neutral", "pressed");
126
+ fill: variables.get-text-icon-color("neutral", "pressed");
122
127
  }
123
128
  }
124
129
  @include supports-hover.supports-hover() {
125
130
  &:hover {
126
131
  svg path {
127
- fill: variables.get-text-color("neutral", "pressed");
132
+ fill: variables.get-text-icon-color("neutral", "pressed");
128
133
  }
129
134
  }
130
135
  }
@@ -138,4 +143,18 @@
138
143
  }
139
144
  @content;
140
145
  }
146
+
147
+ .search-field:not(.in-modal) {
148
+ $border: 1px solid variables.get-border-color("neutral", "default");
149
+ .query {
150
+ border-top: $border;
151
+ border-bottom: $border;
152
+ border-left: $border;
153
+ }
154
+ .submit {
155
+ border-top: $border;
156
+ border-bottom: $border;
157
+ border-right: $border;
158
+ }
159
+ }
141
160
  }