@empathyco/x-components 6.0.0-alpha.219 → 6.0.0-alpha.220
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/CHANGELOG.md +8 -0
- package/docs/API-reference/components/ai/x-components.ai-overview.md +4 -4
- package/docs/API-reference/components/common/animations/x-components.animate-width.md +4 -4
- package/docs/API-reference/components/common/animations/x-components.change-height.md +10 -6
- package/docs/API-reference/components/common/animations/x-components.collapse-height.md +15 -11
- package/docs/API-reference/components/common/animations/x-components.collapse-width.md +12 -10
- package/docs/API-reference/components/common/animations/x-components.cross-fade.md +9 -9
- package/docs/API-reference/components/common/animations/x-components.fade-and-slide.md +6 -6
- package/docs/API-reference/components/common/animations/x-components.fade.md +9 -9
- package/docs/API-reference/components/common/animations/x-components.no-animation.md +2 -2
- package/docs/API-reference/components/common/animations/x-components.staggered-fade-and-slide.md +5 -5
- package/docs/API-reference/components/common/column-picker/x-components.base-column-picker-dropdown.md +13 -9
- package/docs/API-reference/components/common/column-picker/x-components.base-column-picker-list.md +18 -18
- package/docs/API-reference/components/common/currency/x-components.base-currency.md +15 -15
- package/docs/API-reference/components/common/filters/labels/x-components.base-price-filter-label.md +6 -2
- package/docs/API-reference/components/common/filters/labels/x-components.base-rating-filter-label.md +26 -26
- package/docs/API-reference/components/common/layouts/x-components.fixed-header-and-asides-layout.md +1 -1
- package/docs/API-reference/components/common/layouts/x-components.multi-column-max-width-layout.md +1 -1
- package/docs/API-reference/components/common/layouts/x-components.single-column-layout.md +1 -1
- package/docs/API-reference/components/common/modals/x-components.base-events-modal-close.md +5 -3
- package/docs/API-reference/components/common/modals/x-components.base-events-modal-open.md +2 -2
- package/docs/API-reference/components/common/modals/x-components.base-events-modal.md +28 -10
- package/docs/API-reference/components/common/modals/x-components.base-id-modal-close.md +2 -2
- package/docs/API-reference/components/common/modals/x-components.base-id-modal-open.md +2 -2
- package/docs/API-reference/components/common/modals/x-components.base-id-modal.md +10 -2
- package/docs/API-reference/components/common/modals/x-components.base-modal.md +12 -12
- package/docs/API-reference/components/common/modals/x-components.close-main-modal.md +5 -1
- package/docs/API-reference/components/common/modals/x-components.main-modal.md +20 -4
- package/docs/API-reference/components/common/modals/x-components.open-main-modal.md +5 -1
- package/docs/API-reference/components/common/panels/x-components.base-header-toggle-panel.md +17 -13
- package/docs/API-reference/components/common/panels/x-components.base-id-toggle-panel-button.md +11 -4
- package/docs/API-reference/components/common/panels/x-components.base-id-toggle-panel.md +20 -13
- package/docs/API-reference/components/common/panels/x-components.base-tabs-panel.md +13 -10
- package/docs/API-reference/components/common/panels/x-components.base-toggle-panel.md +4 -4
- package/docs/API-reference/components/common/result/x-components.base-result-add-to-cart.md +4 -4
- package/docs/API-reference/components/common/result/x-components.base-result-current-price.md +7 -5
- package/docs/API-reference/components/common/result/x-components.base-result-image.md +25 -19
- package/docs/API-reference/components/common/result/x-components.base-result-link.md +5 -5
- package/docs/API-reference/components/common/result/x-components.base-result-previous-price.md +7 -5
- package/docs/API-reference/components/common/result/x-components.base-result-rating.md +26 -23
- package/docs/API-reference/components/common/result/x-components.result-variant-selector.md +62 -42
- package/docs/API-reference/components/common/result/x-components.result-variants-provider.md +35 -25
- package/docs/API-reference/components/common/scroll/x-components.base-scroll.md +11 -11
- package/docs/API-reference/components/common/suggestions/x-components.base-suggestion.md +24 -24
- package/docs/API-reference/components/common/suggestions/x-components.base-suggestions.md +47 -44
- package/docs/API-reference/components/common/x-components.auto-progress-bar.md +8 -5
- package/docs/API-reference/components/common/x-components.base-dropdown.md +7 -5
- package/docs/API-reference/components/common/x-components.base-event-button.md +9 -7
- package/docs/API-reference/components/common/x-components.base-grid.md +23 -23
- package/docs/API-reference/components/common/x-components.base-keyboard-navigation.md +6 -6
- package/docs/API-reference/components/common/x-components.base-rating.md +3 -3
- package/docs/API-reference/components/common/x-components.base-slider.md +20 -16
- package/docs/API-reference/components/common/x-components.base-switch.md +6 -6
- package/docs/API-reference/components/common/x-components.base-variable-column-grid.md +37 -28
- package/docs/API-reference/components/common/x-components.display-click-provider.md +9 -9
- package/docs/API-reference/components/common/x-components.display-emitter.md +1 -1
- package/docs/API-reference/components/common/x-components.global-x-bus.md +3 -3
- package/docs/API-reference/components/common/x-components.highlight.md +6 -6
- package/docs/API-reference/components/common/x-components.location-provider.md +4 -4
- package/docs/API-reference/components/common/x-components.page-loader-button.md +14 -14
- package/docs/API-reference/components/common/x-components.page-selector.md +12 -12
- package/docs/API-reference/components/common/x-components.sliding-panel.md +23 -20
- package/docs/API-reference/components/common/x-components.snippet-callbacks.md +3 -3
- package/docs/API-reference/components/device/x-components.device-detector.md +15 -15
- package/docs/API-reference/components/empathize/x-components.empathize.md +20 -20
- package/docs/API-reference/components/experience-controls/x-components.experience-controls.md +1 -1
- package/docs/API-reference/components/extra-params/x-components.extra-params.md +3 -3
- package/docs/API-reference/components/extra-params/x-components.renderless-extra-param.md +9 -5
- package/docs/API-reference/components/extra-params/x-components.snippet-config-extra-params.md +8 -8
- package/docs/API-reference/components/facets/x-components.clear-filters.md +10 -6
- package/docs/API-reference/components/facets/x-components.facets/facets-provider.md +16 -16
- package/docs/API-reference/components/facets/x-components.facets/facets.md +15 -9
- package/docs/API-reference/components/facets/x-components.filters/all-filter.md +20 -6
- package/docs/API-reference/components/facets/x-components.filters/editable-number-range-filter.md +37 -30
- package/docs/API-reference/components/facets/x-components.filters/hierarchical-filter.md +33 -27
- package/docs/API-reference/components/facets/x-components.filters/number-range-filter.md +19 -16
- package/docs/API-reference/components/facets/x-components.filters/renderless-filter.md +17 -15
- package/docs/API-reference/components/facets/x-components.filters/simple-filter.md +38 -32
- package/docs/API-reference/components/facets/x-components.lists/exclude-filters-with-no-results.md +30 -30
- package/docs/API-reference/components/facets/x-components.lists/filters-list.md +15 -15
- package/docs/API-reference/components/facets/x-components.lists/filters-search.md +31 -22
- package/docs/API-reference/components/facets/x-components.lists/selected-filters-list.md +8 -6
- package/docs/API-reference/components/facets/x-components.lists/selected-filters.md +5 -5
- package/docs/API-reference/components/facets/x-components.lists/sliced-filters.md +35 -8
- package/docs/API-reference/components/facets/x-components.lists/sorted-filters.md +7 -2
- package/docs/API-reference/components/facets/x-components.preselected-filters.md +15 -9
- package/docs/API-reference/components/history-queries/x-components.clear-history-queries.md +8 -5
- package/docs/API-reference/components/history-queries/x-components.history-queries-switch.md +12 -9
- package/docs/API-reference/components/history-queries/x-components.history-queries.md +18 -15
- package/docs/API-reference/components/history-queries/x-components.history-query.md +21 -21
- package/docs/API-reference/components/history-queries/x-components.my-history.md +14 -11
- package/docs/API-reference/components/history-queries/x-components.remove-history-query.md +5 -5
- package/docs/API-reference/components/identifier-results/x-components.identifier-result.md +3 -3
- package/docs/API-reference/components/identifier-results/x-components.identifier-results.md +7 -7
- package/docs/API-reference/components/next-queries/x-components.next-queries-list.md +20 -15
- package/docs/API-reference/components/next-queries/x-components.next-queries.md +17 -13
- package/docs/API-reference/components/next-queries/x-components.next-query-preview.md +36 -25
- package/docs/API-reference/components/next-queries/x-components.next-query.md +14 -12
- package/docs/API-reference/components/popular-searches/x-components.popular-search.md +11 -11
- package/docs/API-reference/components/popular-searches/x-components.popular-searches.md +10 -7
- package/docs/API-reference/components/queries-preview/x-components.query-preview-button.md +6 -6
- package/docs/API-reference/components/queries-preview/x-components.query-preview-list.md +23 -21
- package/docs/API-reference/components/queries-preview/x-components.query-preview.md +27 -16
- package/docs/API-reference/components/query-suggestions/x-components.query-suggestion.md +20 -17
- package/docs/API-reference/components/query-suggestions/x-components.query-suggestions.md +16 -13
- package/docs/API-reference/components/recommendations/x-components.recommendations.md +23 -12
- package/docs/API-reference/components/related-prompts/x-components.related-prompt.md +12 -12
- package/docs/API-reference/components/related-prompts/x-components.related-prompts-list.md +13 -13
- package/docs/API-reference/components/related-prompts/x-components.related-prompts-tag-list.md +8 -5
- package/docs/API-reference/components/related-tags/x-components.related-tag.md +16 -16
- package/docs/API-reference/components/related-tags/x-components.related-tags.md +19 -16
- package/docs/API-reference/components/scroll/x-components.main-scroll-item.md +9 -5
- package/docs/API-reference/components/scroll/x-components.main-scroll.md +16 -8
- package/docs/API-reference/components/scroll/x-components.scroll-to-top.md +1 -1
- package/docs/API-reference/components/scroll/x-components.scroll.md +27 -27
- package/docs/API-reference/components/search/x-components.banner.md +16 -16
- package/docs/API-reference/components/search/x-components.banners-list.md +13 -13
- package/docs/API-reference/components/search/x-components.fallback-disclaimer.md +4 -4
- package/docs/API-reference/components/search/x-components.partial-query-button.md +6 -6
- package/docs/API-reference/components/search/x-components.partial-results-list.md +11 -7
- package/docs/API-reference/components/search/x-components.promoted.md +16 -16
- package/docs/API-reference/components/search/x-components.promoteds-list.md +13 -13
- package/docs/API-reference/components/search/x-components.redirection.md +2 -2
- package/docs/API-reference/components/search/x-components.results-list.md +17 -13
- package/docs/API-reference/components/search/x-components.sort-dropdown.md +13 -9
- package/docs/API-reference/components/search/x-components.sort-list.md +7 -7
- package/docs/API-reference/components/search/x-components.sort-picker-list.md +10 -10
- package/docs/API-reference/components/search/x-components.spellcheck-button.md +2 -2
- package/docs/API-reference/components/search/x-components.spellcheck.md +5 -3
- package/docs/API-reference/components/search-box/x-components.clear-search-input.md +15 -7
- package/docs/API-reference/components/search-box/x-components.search-button.md +11 -11
- package/docs/API-reference/components/search-box/x-components.search-input-placeholder.md +22 -16
- package/docs/API-reference/components/search-box/x-components.search-input.md +19 -10
- package/docs/API-reference/components/semantic-queries/x-components.semantic-queries.md +17 -11
- package/docs/API-reference/components/semantic-queries/x-components.semantic-query.md +12 -9
- package/docs/API-reference/components/tagging/x-components.tagging.md +8 -4
- package/docs/API-reference/components/url/x-components.url-handler.md +2 -2
- package/js/store/utils/store-emitters.utils.js.map +1 -1
- package/js/x-bus/x-bus.js.map +1 -1
- package/js/x-bus/x-priority-queue/x-priority-queue.js.map +1 -1
- package/js/x-modules/facets/entities/types.js.map +1 -1
- package/package.json +6 -6
- package/types/store/utils/store-emitters.utils.d.ts.map +1 -1
- package/types/wiring/events.types.d.ts.map +1 -1
- package/types/x-bus/x-bus.d.ts.map +1 -1
- package/types/x-bus/x-priority-queue/x-priority-queue.d.ts.map +1 -1
- package/types/x-modules/facets/entities/types.d.ts.map +1 -1
- package/types/x-modules/facets/store/types.d.ts.map +1 -1
- package/types/x-modules/history-queries/store/types.d.ts.map +1 -1
- package/types/x-modules/identifier-results/store/types.d.ts.map +1 -1
- package/types/x-modules/next-queries/store/types.d.ts.map +1 -1
- package/types/x-modules/popular-searches/store/types.d.ts.map +1 -1
- package/types/x-modules/query-suggestions/store/types.d.ts.map +1 -1
- package/types/x-modules/recommendations/store/types.d.ts.map +1 -1
- package/types/x-modules/related-tags/store/types.d.ts.map +1 -1
- package/types/x-modules/search/store/types.d.ts.map +1 -1
- package/types/x-modules/semantic-queries/store/types.d.ts.map +1 -1
|
@@ -56,14 +56,14 @@ _Here you can see how the RelatedTag component is rendered._
|
|
|
56
56
|
</template>
|
|
57
57
|
|
|
58
58
|
<script setup>
|
|
59
|
-
import { RelatedTag } from
|
|
59
|
+
import { RelatedTag } from "@empathyco/x-components/related-tags";
|
|
60
60
|
|
|
61
61
|
const tag = {
|
|
62
|
-
modelName:
|
|
63
|
-
query:
|
|
62
|
+
modelName: "RelatedTag",
|
|
63
|
+
query: "high heel",
|
|
64
64
|
isCurated: false,
|
|
65
|
-
tag:
|
|
66
|
-
}
|
|
65
|
+
tag: "heel",
|
|
66
|
+
};
|
|
67
67
|
</script>
|
|
68
68
|
```
|
|
69
69
|
|
|
@@ -81,14 +81,14 @@ _See how the related tag can be rendered._
|
|
|
81
81
|
</template>
|
|
82
82
|
|
|
83
83
|
<script setup>
|
|
84
|
-
import { RelatedTag } from
|
|
84
|
+
import { RelatedTag } from "@empathyco/x-components/related-tags";
|
|
85
85
|
|
|
86
86
|
const tag = {
|
|
87
|
-
modelName:
|
|
88
|
-
query:
|
|
87
|
+
modelName: "RelatedTag",
|
|
88
|
+
query: "high heel",
|
|
89
89
|
isCurated: false,
|
|
90
|
-
tag:
|
|
91
|
-
}
|
|
90
|
+
tag: "heel",
|
|
91
|
+
};
|
|
92
92
|
</script>
|
|
93
93
|
```
|
|
94
94
|
|
|
@@ -105,17 +105,17 @@ _See how the event is triggered when the related tag is clicked._
|
|
|
105
105
|
</template>
|
|
106
106
|
|
|
107
107
|
<script setup>
|
|
108
|
-
import { RelatedTag } from
|
|
108
|
+
import { RelatedTag } from "@empathyco/x-components/related-tags";
|
|
109
109
|
|
|
110
110
|
const tag = {
|
|
111
|
-
modelName:
|
|
112
|
-
query:
|
|
111
|
+
modelName: "RelatedTag",
|
|
112
|
+
query: "high heel",
|
|
113
113
|
isCurated: false,
|
|
114
|
-
tag:
|
|
115
|
-
}
|
|
114
|
+
tag: "heel",
|
|
115
|
+
};
|
|
116
116
|
|
|
117
117
|
function alertRelatedTag(relatedTag) {
|
|
118
|
-
alert(`You have clicked the related tag: ${relatedTag.query}`)
|
|
118
|
+
alert(`You have clicked the related tag: ${relatedTag.query}`);
|
|
119
119
|
}
|
|
120
120
|
</script>
|
|
121
121
|
```
|
|
@@ -49,8 +49,8 @@ _Search for a fashion term like "sandal" or "lipstick"._
|
|
|
49
49
|
</template>
|
|
50
50
|
|
|
51
51
|
<script setup>
|
|
52
|
-
import { SearchInput } from
|
|
53
|
-
import { RelatedTags } from
|
|
52
|
+
import { SearchInput } from "@empathyco/x-components/search-box";
|
|
53
|
+
import { RelatedTags } from "@empathyco/x-components/related-tags";
|
|
54
54
|
</script>
|
|
55
55
|
```
|
|
56
56
|
|
|
@@ -70,11 +70,11 @@ _Search for a fashion term and see the related tags with the animation effect._
|
|
|
70
70
|
</template>
|
|
71
71
|
|
|
72
72
|
<script setup>
|
|
73
|
-
import { SearchInput } from
|
|
74
|
-
import { RelatedTags } from
|
|
75
|
-
import { StaggeredFadeAndSlide } from
|
|
73
|
+
import { SearchInput } from "@empathyco/x-components/search-box";
|
|
74
|
+
import { RelatedTags } from "@empathyco/x-components/related-tags";
|
|
75
|
+
import { StaggeredFadeAndSlide } from "@empathyco/x-components";
|
|
76
76
|
|
|
77
|
-
const animation = StaggeredFadeAndSlide
|
|
77
|
+
const animation = StaggeredFadeAndSlide;
|
|
78
78
|
</script>
|
|
79
79
|
```
|
|
80
80
|
|
|
@@ -96,8 +96,8 @@ _Search for a fashion term and see how the related tags can be rendered._
|
|
|
96
96
|
</template>
|
|
97
97
|
|
|
98
98
|
<script setup>
|
|
99
|
-
import { SearchInput } from
|
|
100
|
-
import { RelatedTags, RelatedTag } from
|
|
99
|
+
import { SearchInput } from "@empathyco/x-components/search-box";
|
|
100
|
+
import { RelatedTags, RelatedTag } from "@empathyco/x-components/related-tags";
|
|
101
101
|
</script>
|
|
102
102
|
```
|
|
103
103
|
|
|
@@ -120,8 +120,8 @@ _Search for a fashion term and see how the related tags are rendered._
|
|
|
120
120
|
</template>
|
|
121
121
|
|
|
122
122
|
<script setup>
|
|
123
|
-
import { SearchInput } from
|
|
124
|
-
import { RelatedTags } from
|
|
123
|
+
import { SearchInput } from "@empathyco/x-components/search-box";
|
|
124
|
+
import { RelatedTags } from "@empathyco/x-components/related-tags";
|
|
125
125
|
</script>
|
|
126
126
|
```
|
|
127
127
|
|
|
@@ -146,9 +146,9 @@ _Search for a fashion term and see how the related tags can be rendered._
|
|
|
146
146
|
</template>
|
|
147
147
|
|
|
148
148
|
<script setup>
|
|
149
|
-
import { SearchInput } from
|
|
150
|
-
import { RelatedTags } from
|
|
151
|
-
import { ResultsList } from
|
|
149
|
+
import { SearchInput } from "@empathyco/x-components/search-box";
|
|
150
|
+
import { RelatedTags } from "@empathyco/x-components/related-tags";
|
|
151
|
+
import { ResultsList } from "@empathyco/x-components/search";
|
|
152
152
|
</script>
|
|
153
153
|
```
|
|
154
154
|
|
|
@@ -160,14 +160,17 @@ The `itemClass` prop can be used to add classes to the related tags.
|
|
|
160
160
|
<template>
|
|
161
161
|
<div>
|
|
162
162
|
<SearchInput />
|
|
163
|
-
<RelatedTags
|
|
163
|
+
<RelatedTags
|
|
164
|
+
#related-tag-content="{ relatedTag }"
|
|
165
|
+
itemClass="x-tag-outlined x-tag-auxiliary"
|
|
166
|
+
>
|
|
164
167
|
<span>{{ relatedTag.tag }}</span>
|
|
165
168
|
</RelatedTags>
|
|
166
169
|
</div>
|
|
167
170
|
</template>
|
|
168
171
|
|
|
169
172
|
<script setup>
|
|
170
|
-
import { SearchInput } from
|
|
171
|
-
import { RelatedTags } from
|
|
173
|
+
import { SearchInput } from "@empathyco/x-components/search-box";
|
|
174
|
+
import { RelatedTags } from "@empathyco/x-components/related-tags";
|
|
172
175
|
</script>
|
|
173
176
|
```
|
|
@@ -59,10 +59,14 @@ of all of these components. The URL is modified as the user scrolls.
|
|
|
59
59
|
</template>
|
|
60
60
|
|
|
61
61
|
<script setup>
|
|
62
|
-
import {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
62
|
+
import {
|
|
63
|
+
MainScroll,
|
|
64
|
+
Scroll,
|
|
65
|
+
MainScrollItem,
|
|
66
|
+
} from "@empathyco/x-components/scroll";
|
|
67
|
+
import { ResultsList } from "@empathyco/x-components/search";
|
|
68
|
+
import { SearchInput } from "@empathyco/x-components/search-box";
|
|
69
|
+
import { UrlHandler } from "@empathyco/x-components/url";
|
|
70
|
+
import { BaseResultLink } from "@empathyco/x-components";
|
|
67
71
|
</script>
|
|
68
72
|
```
|
|
@@ -37,13 +37,15 @@ it injects the needed utilities to determine the first visible item.
|
|
|
37
37
|
<template>
|
|
38
38
|
<MainScroll>
|
|
39
39
|
<ul>
|
|
40
|
-
<MainScrollItem v-for="item in 24" :key="item" tag="li"
|
|
40
|
+
<MainScrollItem v-for="item in 24" :key="item" tag="li"
|
|
41
|
+
>Item {{ item }}</MainScrollItem
|
|
42
|
+
>
|
|
41
43
|
</ul>
|
|
42
44
|
</MainScroll>
|
|
43
45
|
</template>
|
|
44
46
|
|
|
45
47
|
<script setup>
|
|
46
|
-
import { MainScroll, MainScrollItem } from
|
|
48
|
+
import { MainScroll, MainScrollItem } from "@empathyco/x-components/scroll";
|
|
47
49
|
</script>
|
|
48
50
|
|
|
49
51
|
<style scoped>
|
|
@@ -70,13 +72,15 @@ default browser scroll, you can do so by using the `useWindow` prop:
|
|
|
70
72
|
<template>
|
|
71
73
|
<MainScroll useWindow>
|
|
72
74
|
<ul>
|
|
73
|
-
<MainScrollItem v-for="item in 24" :key="item" tag="li"
|
|
75
|
+
<MainScrollItem v-for="item in 24" :key="item" tag="li"
|
|
76
|
+
>Item {{ item }}</MainScrollItem
|
|
77
|
+
>
|
|
74
78
|
</ul>
|
|
75
79
|
</MainScroll>
|
|
76
80
|
</template>
|
|
77
81
|
|
|
78
82
|
<script setup>
|
|
79
|
-
import { MainScroll, MainScrollItem } from
|
|
83
|
+
import { MainScroll, MainScrollItem } from "@empathyco/x-components/scroll";
|
|
80
84
|
</script>
|
|
81
85
|
```
|
|
82
86
|
|
|
@@ -94,13 +98,15 @@ when combined with the URL X Module.
|
|
|
94
98
|
<template>
|
|
95
99
|
<MainScroll :restoreScrollTimeoutMs="1000">
|
|
96
100
|
<ul>
|
|
97
|
-
<MainScrollItem v-for="item in 24" :key="item" tag="li"
|
|
101
|
+
<MainScrollItem v-for="item in 24" :key="item" tag="li"
|
|
102
|
+
>Item {{ item }}</MainScrollItem
|
|
103
|
+
>
|
|
98
104
|
</ul>
|
|
99
105
|
</MainScroll>
|
|
100
106
|
</template>
|
|
101
107
|
|
|
102
108
|
<script setup>
|
|
103
|
-
import { MainScroll, MainScrollItem } from
|
|
109
|
+
import { MainScroll, MainScrollItem } from "@empathyco/x-components/scroll";
|
|
104
110
|
</script>
|
|
105
111
|
```
|
|
106
112
|
|
|
@@ -117,12 +123,14 @@ and adjusting the element to be at least 75% intersecting.
|
|
|
117
123
|
<template>
|
|
118
124
|
<MainScroll :threshold="0.75" margin="-50px">
|
|
119
125
|
<ul>
|
|
120
|
-
<MainScrollItem v-for="item in 24" :key="item" tag="li"
|
|
126
|
+
<MainScrollItem v-for="item in 24" :key="item" tag="li"
|
|
127
|
+
>Item {{ item }}</MainScrollItem
|
|
128
|
+
>
|
|
121
129
|
</ul>
|
|
122
130
|
</MainScroll>
|
|
123
131
|
</template>
|
|
124
132
|
|
|
125
133
|
<script setup>
|
|
126
|
-
import { MainScroll, MainScrollItem } from
|
|
134
|
+
import { MainScroll, MainScrollItem } from "@empathyco/x-components/scroll";
|
|
127
135
|
</script>
|
|
128
136
|
```
|
|
@@ -58,7 +58,7 @@ It renders an element with scroll, with the content passed in the `default slot`
|
|
|
58
58
|
</template>
|
|
59
59
|
|
|
60
60
|
<script setup>
|
|
61
|
-
import { Scroll } from
|
|
61
|
+
import { Scroll } from "@empathyco/x-components/scroll";
|
|
62
62
|
</script>
|
|
63
63
|
```
|
|
64
64
|
|
|
@@ -84,22 +84,22 @@ import { Scroll } from '@empathyco/x-components/scroll'
|
|
|
84
84
|
</template>
|
|
85
85
|
|
|
86
86
|
<script setup>
|
|
87
|
-
import { Scroll } from
|
|
87
|
+
import { Scroll } from "@empathyco/x-components/scroll";
|
|
88
88
|
|
|
89
89
|
function scroll(position) {
|
|
90
|
-
console.log(
|
|
90
|
+
console.log("scroll", position);
|
|
91
91
|
}
|
|
92
92
|
function scrollDirectionChange(direction) {
|
|
93
|
-
console.log(
|
|
93
|
+
console.log("scroll:direction-change", direction);
|
|
94
94
|
}
|
|
95
95
|
function scrollAtStart(isAtStart) {
|
|
96
|
-
console.log(
|
|
96
|
+
console.log("scroll:at-start", isAtStart);
|
|
97
97
|
}
|
|
98
98
|
function scrollAlmostAtEnd(isAlmostAtEnd) {
|
|
99
|
-
console.log(
|
|
99
|
+
console.log("scroll:almost-at-end", isAlmostAtEnd);
|
|
100
100
|
}
|
|
101
101
|
function scrollAtEnd(isAtEnd) {
|
|
102
|
-
console.log(
|
|
102
|
+
console.log("scroll:at-end", isAtEnd);
|
|
103
103
|
}
|
|
104
104
|
</script>
|
|
105
105
|
```
|
|
@@ -119,28 +119,28 @@ You can use the XEvents API to subscribe to events programmatically:
|
|
|
119
119
|
</template>
|
|
120
120
|
|
|
121
121
|
<script setup>
|
|
122
|
-
import { onMounted } from
|
|
123
|
-
import { Scroll } from
|
|
124
|
-
import { use$x } from
|
|
122
|
+
import { onMounted } from "vue";
|
|
123
|
+
import { Scroll } from "@empathyco/x-components/scroll";
|
|
124
|
+
import { use$x } from "../../../composables";
|
|
125
125
|
|
|
126
|
-
const x = use$x()
|
|
126
|
+
const x = use$x();
|
|
127
127
|
|
|
128
128
|
onMounted(() => {
|
|
129
|
-
x.on(
|
|
130
|
-
console.log(distance)
|
|
131
|
-
})
|
|
132
|
-
x.on(
|
|
133
|
-
console.log(direction)
|
|
134
|
-
})
|
|
135
|
-
x.on(
|
|
136
|
-
console.log(isAtStart)
|
|
137
|
-
})
|
|
138
|
-
x.on(
|
|
139
|
-
console.log(isAlmostAtEnd)
|
|
140
|
-
})
|
|
141
|
-
x.on(
|
|
142
|
-
console.log(isAtEnd)
|
|
143
|
-
})
|
|
144
|
-
})
|
|
129
|
+
x.on("UserScrolled").subscribe((distance) => {
|
|
130
|
+
console.log(distance);
|
|
131
|
+
});
|
|
132
|
+
x.on("UserChangedScrollDirection").subscribe((direction) => {
|
|
133
|
+
console.log(direction);
|
|
134
|
+
});
|
|
135
|
+
x.on("UserReachedScrollStart").subscribe((isAtStart) => {
|
|
136
|
+
console.log(isAtStart);
|
|
137
|
+
});
|
|
138
|
+
x.on("UserAlmostReachedScrollEnd").subscribe((isAlmostAtEnd) => {
|
|
139
|
+
console.log(isAlmostAtEnd);
|
|
140
|
+
});
|
|
141
|
+
x.on("UserReachedScrollEnd").subscribe((isAtEnd) => {
|
|
142
|
+
console.log(isAtEnd);
|
|
143
|
+
});
|
|
144
|
+
});
|
|
145
145
|
</script>
|
|
146
146
|
```
|
|
@@ -32,17 +32,17 @@ _Here you can see how the `Banner` component is rendered._
|
|
|
32
32
|
</template>
|
|
33
33
|
|
|
34
34
|
<script setup>
|
|
35
|
-
import { Banner } from
|
|
36
|
-
import { ref } from
|
|
35
|
+
import { Banner } from "@empathyco/x-components/search";
|
|
36
|
+
import { ref } from "vue";
|
|
37
37
|
|
|
38
38
|
const banner = ref({
|
|
39
|
-
modelName:
|
|
40
|
-
id:
|
|
41
|
-
url:
|
|
42
|
-
image:
|
|
43
|
-
title:
|
|
39
|
+
modelName: "Banner",
|
|
40
|
+
id: "banner-example",
|
|
41
|
+
url: "https://my-website.com/summer-shirts",
|
|
42
|
+
image: "https://my-website.com/images/summer-shirts.jpg",
|
|
43
|
+
title: "Trendy summer shirts",
|
|
44
44
|
position: 1,
|
|
45
|
-
})
|
|
45
|
+
});
|
|
46
46
|
</script>
|
|
47
47
|
```
|
|
48
48
|
|
|
@@ -56,16 +56,16 @@ The `titleClass` prop can be used to add classes to the banner title.
|
|
|
56
56
|
</template>
|
|
57
57
|
|
|
58
58
|
<script setup>
|
|
59
|
-
import { Banner } from
|
|
60
|
-
import { ref } from
|
|
59
|
+
import { Banner } from "@empathyco/x-components/search";
|
|
60
|
+
import { ref } from "vue";
|
|
61
61
|
|
|
62
62
|
const banner = ref({
|
|
63
|
-
modelName:
|
|
64
|
-
id:
|
|
65
|
-
url:
|
|
66
|
-
image:
|
|
67
|
-
title:
|
|
63
|
+
modelName: "Banner",
|
|
64
|
+
id: "banner-example",
|
|
65
|
+
url: "https://my-website.com/summer-shirts",
|
|
66
|
+
image: "https://my-website.com/images/summer-shirts.jpg",
|
|
67
|
+
title: "Trendy summer shirts",
|
|
68
68
|
position: 1,
|
|
69
|
-
})
|
|
69
|
+
});
|
|
70
70
|
</script>
|
|
71
71
|
```
|
|
@@ -45,8 +45,8 @@ _Type any term in the input field to try it out!_
|
|
|
45
45
|
</template>
|
|
46
46
|
|
|
47
47
|
<script setup>
|
|
48
|
-
import { BannersList } from
|
|
49
|
-
import { SearchInput } from
|
|
48
|
+
import { BannersList } from "@empathyco/x-components/search";
|
|
49
|
+
import { SearchInput } from "@empathyco/x-components/search-box";
|
|
50
50
|
</script>
|
|
51
51
|
```
|
|
52
52
|
|
|
@@ -61,11 +61,11 @@ import { SearchInput } from '@empathyco/x-components/search-box'
|
|
|
61
61
|
</template>
|
|
62
62
|
|
|
63
63
|
<script setup>
|
|
64
|
-
import { BannersList } from
|
|
65
|
-
import { SearchInput } from
|
|
66
|
-
import { FadeAndSlide } from
|
|
64
|
+
import { BannersList } from "@empathyco/x-components/search";
|
|
65
|
+
import { SearchInput } from "@empathyco/x-components/search-box";
|
|
66
|
+
import { FadeAndSlide } from "@empathyco/x-components/animations";
|
|
67
67
|
|
|
68
|
-
const fadeAndSlide = FadeAndSlide
|
|
68
|
+
const fadeAndSlide = FadeAndSlide;
|
|
69
69
|
</script>
|
|
70
70
|
```
|
|
71
71
|
|
|
@@ -89,9 +89,9 @@ const fadeAndSlide = FadeAndSlide
|
|
|
89
89
|
</template>
|
|
90
90
|
|
|
91
91
|
<script setup>
|
|
92
|
-
import { BannersList } from
|
|
93
|
-
import { SearchInput } from
|
|
94
|
-
import { BaseGrid } from
|
|
92
|
+
import { BannersList } from "@empathyco/x-components/search";
|
|
93
|
+
import { SearchInput } from "@empathyco/x-components/search-box";
|
|
94
|
+
import { BaseGrid } from "@empathyco/x-components";
|
|
95
95
|
</script>
|
|
96
96
|
```
|
|
97
97
|
|
|
@@ -110,8 +110,8 @@ import { BaseGrid } from '@empathyco/x-components'
|
|
|
110
110
|
</template>
|
|
111
111
|
|
|
112
112
|
<script setup>
|
|
113
|
-
import { BannersList } from
|
|
114
|
-
import { SearchInput } from
|
|
113
|
+
import { BannersList } from "@empathyco/x-components/search";
|
|
114
|
+
import { SearchInput } from "@empathyco/x-components/search-box";
|
|
115
115
|
</script>
|
|
116
116
|
```
|
|
117
117
|
|
|
@@ -140,7 +140,7 @@ value.
|
|
|
140
140
|
</template>
|
|
141
141
|
|
|
142
142
|
<script setup>
|
|
143
|
-
import { ResultsList, BannersList } from
|
|
144
|
-
import { SearchInput } from
|
|
143
|
+
import { ResultsList, BannersList } from "@empathyco/x-components/search";
|
|
144
|
+
import { SearchInput } from "@empathyco/x-components/search-box";
|
|
145
145
|
</script>
|
|
146
146
|
```
|
|
@@ -28,7 +28,7 @@ its default slot. This component will be rendered if there is a no results with
|
|
|
28
28
|
</template>
|
|
29
29
|
|
|
30
30
|
<script setup>
|
|
31
|
-
import { FallbackDisclaimer } from
|
|
31
|
+
import { FallbackDisclaimer } from "@empathyco/x-components/search";
|
|
32
32
|
</script>
|
|
33
33
|
```
|
|
34
34
|
|
|
@@ -38,13 +38,13 @@ import { FallbackDisclaimer } from '@empathyco/x-components/search'
|
|
|
38
38
|
<template>
|
|
39
39
|
<FallbackDisclaimer>
|
|
40
40
|
<template #default="{ query }">
|
|
41
|
-
No results found for '{{ query }}' with the selected filters. The filters
|
|
42
|
-
unselected.
|
|
41
|
+
No results found for '{{ query }}' with the selected filters. The filters
|
|
42
|
+
have been unselected.
|
|
43
43
|
</template>
|
|
44
44
|
</FallbackDisclaimer>
|
|
45
45
|
</template>
|
|
46
46
|
|
|
47
47
|
<script setup>
|
|
48
|
-
import { FallbackDisclaimer } from
|
|
48
|
+
import { FallbackDisclaimer } from "@empathyco/x-components/search";
|
|
49
49
|
</script>
|
|
50
50
|
```
|
|
@@ -50,10 +50,10 @@ The component sets the current query as the new query and emits the `UserAccepte
|
|
|
50
50
|
</template>
|
|
51
51
|
|
|
52
52
|
<script setup>
|
|
53
|
-
import { PartialQueryButton } from
|
|
54
|
-
import { ref } from
|
|
53
|
+
import { PartialQueryButton } from "@empathyco/x-components/search";
|
|
54
|
+
import { ref } from "vue";
|
|
55
55
|
|
|
56
|
-
const query = ref(
|
|
56
|
+
const query = ref("shoes");
|
|
57
57
|
</script>
|
|
58
58
|
```
|
|
59
59
|
|
|
@@ -71,9 +71,9 @@ const query = ref('shoes')
|
|
|
71
71
|
</template>
|
|
72
72
|
|
|
73
73
|
<script setup>
|
|
74
|
-
import { PartialQueryButton } from
|
|
75
|
-
import { ref } from
|
|
74
|
+
import { PartialQueryButton } from "@empathyco/x-components/search";
|
|
75
|
+
import { ref } from "vue";
|
|
76
76
|
|
|
77
|
-
const query = ref(
|
|
77
|
+
const query = ref("bags");
|
|
78
78
|
</script>
|
|
79
79
|
```
|
|
@@ -40,8 +40,8 @@ It renders a list of partial results using the default slot:
|
|
|
40
40
|
</template>
|
|
41
41
|
|
|
42
42
|
<script setup>
|
|
43
|
-
import { PartialResultsList } from
|
|
44
|
-
import { ResultsList } from
|
|
43
|
+
import { PartialResultsList } from "@empathyco/x-components/search";
|
|
44
|
+
import { ResultsList } from "@empathyco/x-components/search";
|
|
45
45
|
</script>
|
|
46
46
|
```
|
|
47
47
|
|
|
@@ -59,8 +59,8 @@ Set the maximum partials to show to 3.
|
|
|
59
59
|
</template>
|
|
60
60
|
|
|
61
61
|
<script setup>
|
|
62
|
-
import { PartialResultsList } from
|
|
63
|
-
import { ResultsList } from
|
|
62
|
+
import { PartialResultsList } from "@empathyco/x-components/search";
|
|
63
|
+
import { ResultsList } from "@empathyco/x-components/search";
|
|
64
64
|
</script>
|
|
65
65
|
```
|
|
66
66
|
|
|
@@ -92,8 +92,12 @@ results and a button to update the query with the partial one.
|
|
|
92
92
|
</template>
|
|
93
93
|
|
|
94
94
|
<script setup>
|
|
95
|
-
import { PartialResultsList } from
|
|
96
|
-
import {
|
|
97
|
-
|
|
95
|
+
import { PartialResultsList } from "@empathyco/x-components/search";
|
|
96
|
+
import {
|
|
97
|
+
BaseGrid,
|
|
98
|
+
BaseResultLink,
|
|
99
|
+
BaseResultImage,
|
|
100
|
+
} from "@empathyco/x-components";
|
|
101
|
+
import { PartialQueryButton } from "@empathyco/x-components/search";
|
|
98
102
|
</script>
|
|
99
103
|
```
|
|
@@ -39,17 +39,17 @@ _Here you can see how the `Promoted` component is rendered._
|
|
|
39
39
|
</template>
|
|
40
40
|
|
|
41
41
|
<script setup>
|
|
42
|
-
import { Promoted } from
|
|
43
|
-
import { ref } from
|
|
42
|
+
import { Promoted } from "@empathyco/x-components/search";
|
|
43
|
+
import { ref } from "vue";
|
|
44
44
|
|
|
45
45
|
const promoted = ref({
|
|
46
|
-
modelName:
|
|
47
|
-
id:
|
|
48
|
-
url:
|
|
49
|
-
image:
|
|
50
|
-
title:
|
|
46
|
+
modelName: "Promoted",
|
|
47
|
+
id: "promoted-example",
|
|
48
|
+
url: "https://my-website.com/summer-shirts",
|
|
49
|
+
image: "https://my-website.com/images/summer-shirts.jpg",
|
|
50
|
+
title: "Trendy summer shirts",
|
|
51
51
|
position: 1,
|
|
52
|
-
})
|
|
52
|
+
});
|
|
53
53
|
</script>
|
|
54
54
|
```
|
|
55
55
|
|
|
@@ -63,16 +63,16 @@ The `titleClass` prop can be used to add classes to the promoted title.
|
|
|
63
63
|
</template>
|
|
64
64
|
|
|
65
65
|
<script setup>
|
|
66
|
-
import { Promoted } from
|
|
67
|
-
import { ref } from
|
|
66
|
+
import { Promoted } from "@empathyco/x-components/search";
|
|
67
|
+
import { ref } from "vue";
|
|
68
68
|
|
|
69
69
|
const promoted = ref({
|
|
70
|
-
modelName:
|
|
71
|
-
id:
|
|
72
|
-
url:
|
|
73
|
-
image:
|
|
74
|
-
title:
|
|
70
|
+
modelName: "Promoted",
|
|
71
|
+
id: "promoted-example",
|
|
72
|
+
url: "https://my-website.com/summer-shirts",
|
|
73
|
+
image: "https://my-website.com/images/summer-shirts.jpg",
|
|
74
|
+
title: "Trendy summer shirts",
|
|
75
75
|
position: 1,
|
|
76
|
-
})
|
|
76
|
+
});
|
|
77
77
|
</script>
|
|
78
78
|
```
|
|
@@ -45,8 +45,8 @@ _Type any term in the input field to try it out!_
|
|
|
45
45
|
</template>
|
|
46
46
|
|
|
47
47
|
<script setup>
|
|
48
|
-
import { PromotedsList } from
|
|
49
|
-
import { SearchInput } from
|
|
48
|
+
import { PromotedsList } from "@empathyco/x-components/search";
|
|
49
|
+
import { SearchInput } from "@empathyco/x-components/search-box";
|
|
50
50
|
</script>
|
|
51
51
|
```
|
|
52
52
|
|
|
@@ -61,11 +61,11 @@ import { SearchInput } from '@empathyco/x-components/search-box'
|
|
|
61
61
|
</template>
|
|
62
62
|
|
|
63
63
|
<script setup>
|
|
64
|
-
import { PromotedsList } from
|
|
65
|
-
import { FadeAndSlide } from
|
|
66
|
-
import { SearchInput } from
|
|
64
|
+
import { PromotedsList } from "@empathyco/x-components/search";
|
|
65
|
+
import { FadeAndSlide } from "@empathyco/x-components/animations";
|
|
66
|
+
import { SearchInput } from "@empathyco/x-components/search-box";
|
|
67
67
|
|
|
68
|
-
const fadeAndSlide = FadeAndSlide
|
|
68
|
+
const fadeAndSlide = FadeAndSlide;
|
|
69
69
|
</script>
|
|
70
70
|
```
|
|
71
71
|
|
|
@@ -89,9 +89,9 @@ const fadeAndSlide = FadeAndSlide
|
|
|
89
89
|
</template>
|
|
90
90
|
|
|
91
91
|
<script setup>
|
|
92
|
-
import { PromotedsList } from
|
|
93
|
-
import { SearchInput } from
|
|
94
|
-
import { BaseGrid } from
|
|
92
|
+
import { PromotedsList } from "@empathyco/x-components/search";
|
|
93
|
+
import { SearchInput } from "@empathyco/x-components/search-box";
|
|
94
|
+
import { BaseGrid } from "@empathyco/x-components";
|
|
95
95
|
</script>
|
|
96
96
|
```
|
|
97
97
|
|
|
@@ -110,8 +110,8 @@ import { BaseGrid } from '@empathyco/x-components'
|
|
|
110
110
|
</template>
|
|
111
111
|
|
|
112
112
|
<script setup>
|
|
113
|
-
import { PromotedsList } from
|
|
114
|
-
import { SearchInput } from
|
|
113
|
+
import { PromotedsList } from "@empathyco/x-components/search";
|
|
114
|
+
import { SearchInput } from "@empathyco/x-components/search-box";
|
|
115
115
|
</script>
|
|
116
116
|
```
|
|
117
117
|
|
|
@@ -135,7 +135,7 @@ value.
|
|
|
135
135
|
</template>
|
|
136
136
|
|
|
137
137
|
<script setup>
|
|
138
|
-
import { ResultsList, PromotedsList } from
|
|
139
|
-
import { SearchInput } from
|
|
138
|
+
import { ResultsList, PromotedsList } from "@empathyco/x-components/search";
|
|
139
|
+
import { SearchInput } from "@empathyco/x-components/search-box";
|
|
140
140
|
</script>
|
|
141
141
|
```
|