@depict-ai/react-ui 2.1.7 → 2.1.8

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 (48) hide show
  1. package/ES10/index.cjs +1 -1
  2. package/ES10/index.d.ts +1 -1
  3. package/ES10/index.js +1 -1
  4. package/dist/main.js +527 -0
  5. package/dist/module.js +510 -0
  6. package/dist/styles/components/PLP/Buttons.scss +181 -0
  7. package/dist/styles/components/PLP/MorphingSign.scss +30 -0
  8. package/dist/styles/components/PLP/PLPResults.scss +26 -0
  9. package/dist/styles/components/PLP/ProductListingPage.scss +168 -0
  10. package/dist/styles/components/PLP/ScrollStatus.scss +31 -0
  11. package/dist/styles/components/PLP/SelectedFilters.scss +82 -0
  12. package/dist/styles/components/PLP/SlidableItems.scss +121 -0
  13. package/dist/styles/components/PLP/SortAndFilter/FloatingButtons.scss +84 -0
  14. package/dist/styles/components/PLP/SortAndFilter/SortAndFilter.scss +800 -0
  15. package/dist/styles/components/PLP/SortAndFilter/SortAndFilterModal.scss +158 -0
  16. package/dist/styles/components/PLP/SortAndFilter/WhiteSortAndFilter.scss +152 -0
  17. package/dist/styles/components/PLP/Toast.scss +59 -0
  18. package/dist/styles/components/PLP/index.scss +51 -0
  19. package/dist/styles/components/category/BreadCrumbs.scss +32 -0
  20. package/dist/styles/components/category/CategoryTitle.scss +40 -0
  21. package/dist/styles/components/category/QuickLinks.scss +80 -0
  22. package/dist/styles/components/category/index.scss +23 -0
  23. package/dist/styles/components/search/Autocomplete.scss +197 -0
  24. package/dist/styles/components/search/CategorySuggestions.scss +82 -0
  25. package/dist/styles/components/search/InstantCard.scss +122 -0
  26. package/dist/styles/components/search/InstantResults.scss +12 -0
  27. package/dist/styles/components/search/PreviousSearches.scss +90 -0
  28. package/dist/styles/components/search/QueryInput.scss +189 -0
  29. package/dist/styles/components/search/SearchModal.scss +101 -0
  30. package/dist/styles/components/search/SearchRecommendations.scss +28 -0
  31. package/dist/styles/components/search/ShowingResultsFor.scss +13 -0
  32. package/dist/styles/components/search/index.scss +40 -0
  33. package/dist/styles/default.css +1 -0
  34. package/dist/styles/helpers/custom_input.scss +194 -0
  35. package/dist/styles/helpers/supports-hover.scss +7 -0
  36. package/dist/styles/helpers/utils.scss +90 -0
  37. package/dist/styles/plain-css-fallback-styling.css +1 -1
  38. package/dist/styles/variables.scss +61 -0
  39. package/latest/index.cjs +1 -1
  40. package/latest/index.d.ts +1 -1
  41. package/latest/index.js +1 -1
  42. package/package.json +4 -4
  43. package/server/ES10/index.cjs +1 -1
  44. package/server/ES10/index.d.ts +1 -1
  45. package/server/ES10/index.js +1 -1
  46. package/server/latest/index.cjs +1 -1
  47. package/server/latest/index.d.ts +1 -1
  48. package/server/latest/index.js +1 -1
@@ -0,0 +1,158 @@
1
+ @use "../../../variables";
2
+ @use "../../../helpers/utils";
3
+
4
+ /// Mobile modal - taking arguments from SortAndFilter mixin so see SortAndFilter docs for more info
5
+ @mixin SortAndFilterModal(
6
+ $mobile-top-level-collapse-color,
7
+ $mobile-top-level-collapse-background,
8
+ $close-icon-color: #fff,
9
+ $some-text-color: variables.$brand-dark-grey,
10
+ $sort-and-filter-modal-background: variables.$brand-lighter-grey,
11
+ $title-font-weight: false,
12
+ $expanded-title-font-weight: $title-font-weight
13
+ ) {
14
+ .depict-filter-sort-modal-backdrop {
15
+ @include utils.modal-backdrop($background: rgba(0, 0, 0, 0.7), $z-index: variables.$base-z-index);
16
+ will-change: opacity;
17
+ opacity: 0;
18
+ }
19
+
20
+ .dismiss-modal {
21
+ background: transparent;
22
+ padding: 0;
23
+ line-height: 0;
24
+ border: none;
25
+ position: fixed;
26
+ top: 14px;
27
+ transform: translateY(calc(-100% - 14px));
28
+ left: 4px;
29
+ z-index: variables.$base-z-index + 3;
30
+ cursor: pointer;
31
+ svg {
32
+ transform: scale(0.6646);
33
+ path {
34
+ fill: $close-icon-color;
35
+ }
36
+ }
37
+ }
38
+
39
+ .filter-sort-modal {
40
+ z-index: calc(#{variables.$base-z-index} + 2);
41
+ position: fixed;
42
+ top: 0;
43
+ left: 30px;
44
+ width: calc(100% - 30px);
45
+ height: 100%;
46
+ background: $sort-and-filter-modal-background;
47
+ display: flex;
48
+ flex-direction: column;
49
+ justify-content: space-between;
50
+ will-change: transform;
51
+ transform: translateY(100%);
52
+
53
+ // the toggles that close/expand the whole sorting and filter section on mobile
54
+ details {
55
+ &.sorting,
56
+ &.filters {
57
+ & > summary {
58
+ list-style: none;
59
+ &::-webkit-details-marker {
60
+ display: none;
61
+ }
62
+ }
63
+ .sort-filter-summary > .summary {
64
+ cursor: pointer;
65
+ box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.05);
66
+ color: $mobile-top-level-collapse-color;
67
+ padding: 13px 20px;
68
+ background: $mobile-top-level-collapse-background;
69
+ display: flex;
70
+ justify-content: space-between;
71
+ @if $title-font-weight {
72
+ font-weight: $title-font-weight;
73
+ }
74
+ .left-els {
75
+ display: flex;
76
+ align-items: center;
77
+ @include utils.flex-gap(10px, "row nowrap");
78
+ }
79
+ }
80
+ }
81
+ &[open] {
82
+ .sort-filter-summary > .summary {
83
+ @if $expanded-title-font-weight {
84
+ font-weight: $expanded-title-font-weight;
85
+ }
86
+ }
87
+ }
88
+ }
89
+ .filter-icon,
90
+ .sort-icon {
91
+ fill: $mobile-top-level-collapse-color;
92
+ }
93
+
94
+ & > .body {
95
+ overflow-y: auto;
96
+ display: flex;
97
+ flex-direction: column;
98
+ background: $sort-and-filter-modal-background;
99
+ @include utils.flex-gap(2px, "column nowrap");
100
+ }
101
+ .filters,
102
+ .sorting {
103
+ .body {
104
+ color: $some-text-color;
105
+ }
106
+ & > summary {
107
+ .morphing-sign span {
108
+ background: $mobile-top-level-collapse-color;
109
+ }
110
+ }
111
+ }
112
+
113
+ .filters {
114
+ .filter-collapsible-body {
115
+ background: transparent;
116
+ }
117
+ .body {
118
+ padding: 10px;
119
+ background: unset;
120
+
121
+ .filter-part,
122
+ .view-more-clear {
123
+ background: rgb(253, 253, 253);
124
+ }
125
+ }
126
+ }
127
+ .sorting .body {
128
+ margin: 10px;
129
+ background: rgb(238, 238, 240);
130
+ border-radius: variables.$border-radius;
131
+ padding: 0;
132
+ }
133
+
134
+ .bottom-row {
135
+ flex-shrink: 0;
136
+ padding: 10px;
137
+ display: flex;
138
+ justify-content: space-between;
139
+ @include utils.flex-gap(10px, "row nowrap");
140
+
141
+ & > button {
142
+ padding-top: 12px;
143
+ padding-bottom: 12px;
144
+ border-radius: variables.$border-radius;
145
+ }
146
+
147
+ .show-results {
148
+ flex-grow: 1;
149
+ font-weight: 500;
150
+ font-size: 1.1em;
151
+ }
152
+
153
+ .clear {
154
+ font-size: 1.1em;
155
+ }
156
+ }
157
+ }
158
+ }
@@ -0,0 +1,152 @@
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
+ }
@@ -0,0 +1,59 @@
1
+ @use "../../variables";
2
+ @use "../../helpers/utils";
3
+
4
+ /// Toast is a small, unobtrusive, banner that appears at the bottom of the page when we clear their filters when going sideways in the category tree (or they do it manually). The Toast has a button that allows them to get their filters back (restore them) in case they want it back.
5
+ /// It's a general component otherwise and might also be used for other messages.
6
+ /// @param {Number} $z-index [variables.$base-z-index * 5] - The z-index of the Toast.
7
+ /// @param {Color} $progress-bar-color [variables.$brand-dark-grey] - The color of the progress bar below the toast that shows when it will auto-close.
8
+
9
+ @mixin Toast($z-index: calc(#{variables.$base-z-index} + 5), $progress-bar-color: variables.$brand-dark-grey) {
10
+ .depict.plp.toast {
11
+ position: fixed;
12
+ bottom: 10px;
13
+ left: 50%;
14
+ transform: translateX(-50%);
15
+ z-index: $z-index;
16
+ background: white;
17
+ box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.05);
18
+ padding: 10px 20px;
19
+ border-radius: variables.$border-radius;
20
+ border-image-source: linear-gradient(90deg, $progress-bar-color 0%, $progress-bar-color 100%);
21
+ border-image-slice: 0 0 100% 0;
22
+ border-bottom-style: solid;
23
+ border-bottom-width: 2px; // doesn't show in chrome sometimes without
24
+ white-space: nowrap;
25
+
26
+ *,
27
+ & * {
28
+ user-select: none;
29
+ -webkit-user-select: none;
30
+ }
31
+
32
+ @media (min-width: 1000px) {
33
+ padding: 10px 40px;
34
+ }
35
+
36
+ &,
37
+ & .buttons {
38
+ display: flex;
39
+ justify-content: center;
40
+ align-items: center;
41
+ @media (max-width: 999px) {
42
+ @include utils.flex-gap(10px, "row nowrap");
43
+ }
44
+ @media (min-width: 1000px) {
45
+ @include utils.flex-gap(30px, "row nowrap");
46
+ }
47
+ }
48
+
49
+ & {
50
+ color: variables.$brand-dark-grey;
51
+ }
52
+ button {
53
+ padding: 5px 20px;
54
+ border-radius: variables.$border-radius;
55
+ cursor: pointer;
56
+ }
57
+ @content;
58
+ }
59
+ }
@@ -0,0 +1,51 @@
1
+ @use "sass:meta";
2
+
3
+ // Component style mixins
4
+ @use "../../variables";
5
+ @use "SelectedFilters";
6
+ @use "ScrollStatus";
7
+ @use "SlidableItems";
8
+ @use "PLPResults";
9
+ @use "SortAndFilter/SortAndFilter";
10
+ @use "SortAndFilter/WhiteSortAndFilter";
11
+ @use "SortAndFilter/FloatingButtons";
12
+ @use "Toast";
13
+ @use "ProductListingPage";
14
+ @use "Buttons";
15
+
16
+ @forward "SelectedFilters";
17
+ @forward "ScrollStatus";
18
+ @forward "SlidableItems";
19
+ @forward "PLPResults";
20
+ @forward "SortAndFilter/SortAndFilter";
21
+ @forward "SortAndFilter/WhiteSortAndFilter";
22
+ @forward "SortAndFilter/FloatingButtons";
23
+ @forward "Toast";
24
+ @forward "ProductListingPage";
25
+ @forward "Buttons";
26
+
27
+ /// Default variables
28
+ @forward "../../variables";
29
+
30
+ /// Load all PLP mixins with default values. PLP encompasses both Search and Category page, so you will always need to include the mixins that this includes somehow. If only minor theming is needed styles in variables.scss can be
31
+ /// reassigned: https://sass-lang.com/documentation/at-rules/use#reassigning-variables
32
+ /// If more control is needed use these mixins separately and pass custom params
33
+
34
+ @mixin all-PLP-components() {
35
+ .depict.plp {
36
+ @include PLPResults.PLPResults();
37
+ @include ProductListingPage.ProductListingPage();
38
+ @include SelectedFilters.SelectedFilters();
39
+ @include ScrollStatus.ScrollStatus();
40
+ @if variables.$white {
41
+ @include WhiteSortAndFilter.WhiteSortAndFilter();
42
+ } @else {
43
+ @include SortAndFilter.SortAndFilter();
44
+ }
45
+ @include FloatingButtons.FloatingButtons();
46
+ @include SlidableItems.SlidableItems();
47
+ @include Buttons.PrimaryButton();
48
+ @include Buttons.SecondaryButton();
49
+ }
50
+ @include Toast.Toast();
51
+ }
@@ -0,0 +1,32 @@
1
+ @use "../../variables";
2
+
3
+ /// BreadCrumbs is the trail of links that shows the user where they are in the site hierarchy and allows them to go back up the tree. Often BreadCrumbs are located at the top of the page.
4
+ /// @param {Color} $color [variables.$brand-dark-grey] - The color of the text.
5
+ /// @param {Color} $separator-color [variables.$brand-grey] - The color of the separator between the links.
6
+ /// @param {Color} $selected-color [variables.$brand-black] - The color of the last link in the trail (the one that is selected).
7
+
8
+ @mixin BreadCrumbs(
9
+ $color: variables.$brand-dark-grey,
10
+ $separator-color: variables.$brand-grey,
11
+ $selected-color: variables.$brand-black
12
+ ) {
13
+ .crumbs {
14
+ display: flex;
15
+ flex-wrap: wrap;
16
+ .crumb {
17
+ color: $color;
18
+ &:hover {
19
+ text-decoration: underline;
20
+ }
21
+ &:last-of-type {
22
+ color: $selected-color;
23
+ font-weight: 500;
24
+ }
25
+ }
26
+ .separator {
27
+ margin-left: 10px;
28
+ margin-right: 10px;
29
+ color: $separator-color;
30
+ }
31
+ }
32
+ }
@@ -0,0 +1,40 @@
1
+ @use "../../variables";
2
+ @use "../../helpers/utils";
3
+ @use "../../helpers/supports-hover";
4
+
5
+ /// CategoryTitle is the component that shows the title of the current category along with the number of products in it.
6
+ /// This component is optional. When setting up the SDK in TypeScript you can choose between using this component (CategoryTitle) or embedded_num_products which will just show the number of products in the category and allow you to add a title outside of the category page yourself.
7
+ /// You only need to call the mixin if you're using the CategoryTitle component.
8
+ /// @param {Number} $title-font-weight [700] - The font weight of the title
9
+ /// @param {Number} $explanation-font-weight [500] - The font weight of the dash, number of products and "products" string
10
+ /// @param {Color} $explanation-color [variables.$brand-grey] - The color of the dash, number of products and "products" string
11
+
12
+ @mixin CategoryTitle(
13
+ $title-font-weight: 700,
14
+ $explanation-font-weight: 500,
15
+ $explanation-color: variables.$brand-grey
16
+ ) {
17
+ .category-title {
18
+ overflow-wrap: anywhere;
19
+ font-size: 1.5em;
20
+ display: flex;
21
+ align-items: center;
22
+ flex-wrap: wrap;
23
+ * {
24
+ display: flex;
25
+ align-items: center;
26
+ }
27
+ .title {
28
+ margin-right: 10px;
29
+ font-weight: $title-font-weight;
30
+ font-size: inherit;
31
+ }
32
+ .explanation {
33
+ color: $explanation-color;
34
+ font-weight: $explanation-font-weight;
35
+ .product-count {
36
+ margin-left: 10px;
37
+ }
38
+ }
39
+ }
40
+ }
@@ -0,0 +1,80 @@
1
+ @use "../../variables";
2
+ @use "../../helpers/utils";
3
+ @use "../../helpers/supports-hover";
4
+ @use "../PLP/Buttons";
5
+ @use "sass:color";
6
+ @use "sass:map";
7
+
8
+ /// The QuickLinks show the quick links to the subcategories or sibling categories of the current category.
9
+ /// It enables to user to navigate to a subcategory or sibling category without having to go back to the category page.
10
+ /// @param {Color} $background [white] - The background color of the individual quick links
11
+ /// @param {Border | false} $border-radius [false] - Border radius override of the individual quick links. Set to false to use default border radius.
12
+ /// @param {Color} $selected-background [map.get(Buttons.get-primary-button-properties(), "background")] - Background of the currently selected quick link
13
+ /// @param {Color | false} $hovered-background [false] - Override background of the quick link when hovered. Set to false to automatically infer it.
14
+
15
+ @mixin QuickLinks(
16
+ $background: white,
17
+ $border-radius: false,
18
+ $selected-background: map.get(Buttons.get-primary-button-properties(), "background"),
19
+ $hovered-background: false
20
+ ) {
21
+ .quicklinks {
22
+ overflow: hidden;
23
+ .quicklink {
24
+ white-space: nowrap;
25
+ padding: 10px 20px;
26
+ background: $background;
27
+ color: variables.$brand-black;
28
+ transition: all 75ms ease-in-out;
29
+ @if $border-radius {
30
+ border-radius: $border-radius;
31
+ } @else {
32
+ border-radius: variables.$border-radius;
33
+ }
34
+ &:focus {
35
+ outline: none;
36
+ }
37
+ @include supports-hover.supports-hover() {
38
+ &:hover {
39
+ @if $hovered-background {
40
+ background: $hovered-background;
41
+ } @else {
42
+ @include utils.highlight-background($normal-background: $background);
43
+ }
44
+ }
45
+ }
46
+ &:focus-visible {
47
+ @if $hovered-background {
48
+ background: $hovered-background;
49
+ } @else {
50
+ @include utils.highlight-background($normal-background: $background);
51
+ }
52
+ filter: map.get(Buttons.get-secondary-button-properties(), "focus-visible-filter");
53
+ }
54
+ &:active {
55
+ @include utils.highlight-background($normal-background: $background, $darken-factor: 10%, $lighten-factor: 20%);
56
+ }
57
+ &.selected {
58
+ color: white;
59
+ background: $selected-background;
60
+ @include supports-hover.supports-hover() {
61
+ &:hover {
62
+ // should we have this? since it's selected, nothing will happen when clicked
63
+ @include utils.highlight-background($normal-background: $selected-background);
64
+ }
65
+ }
66
+ &:focus-visible {
67
+ @include utils.highlight-background($normal-background: $selected-background);
68
+ filter: map.get(Buttons.get-primary-button-properties(), "focus-visible-filter");
69
+ }
70
+ &:active {
71
+ @include utils.highlight-background(
72
+ $normal-background: $selected-background,
73
+ $darken-factor: 10%,
74
+ $lighten-factor: 20%
75
+ );
76
+ }
77
+ }
78
+ }
79
+ }
80
+ }
@@ -0,0 +1,23 @@
1
+ // Component style mixins
2
+ @use "BreadCrumbs";
3
+ @use "QuickLinks";
4
+ @use "CategoryTitle";
5
+ @use "../PLP/ProductListingPage";
6
+
7
+ @forward "BreadCrumbs";
8
+ @forward "QuickLinks";
9
+ @forward "CategoryTitle";
10
+ @forward "../PLP/ProductListingPage";
11
+
12
+ /// Load all category page mixins with default values. If only minor theming is needed styles in variables.scss can be
13
+ /// reassigned: https://sass-lang.com/documentation/at-rules/use#reassigning-variables.
14
+ /// The variables are forwarded from PLP/index.scss.
15
+ /// If more control is needed use these mixins separately and pass custom params.
16
+ @mixin all-category-components() {
17
+ .depict.category {
18
+ @include BreadCrumbs.BreadCrumbs();
19
+ @include QuickLinks.QuickLinks();
20
+ @include CategoryTitle.CategoryTitle();
21
+ @include ProductListingPage.CategoryPage();
22
+ }
23
+ }