@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.
Files changed (157) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/docs/API-reference/components/ai/x-components.ai-overview.md +4 -4
  3. package/docs/API-reference/components/common/animations/x-components.animate-width.md +4 -4
  4. package/docs/API-reference/components/common/animations/x-components.change-height.md +10 -6
  5. package/docs/API-reference/components/common/animations/x-components.collapse-height.md +15 -11
  6. package/docs/API-reference/components/common/animations/x-components.collapse-width.md +12 -10
  7. package/docs/API-reference/components/common/animations/x-components.cross-fade.md +9 -9
  8. package/docs/API-reference/components/common/animations/x-components.fade-and-slide.md +6 -6
  9. package/docs/API-reference/components/common/animations/x-components.fade.md +9 -9
  10. package/docs/API-reference/components/common/animations/x-components.no-animation.md +2 -2
  11. package/docs/API-reference/components/common/animations/x-components.staggered-fade-and-slide.md +5 -5
  12. package/docs/API-reference/components/common/column-picker/x-components.base-column-picker-dropdown.md +13 -9
  13. package/docs/API-reference/components/common/column-picker/x-components.base-column-picker-list.md +18 -18
  14. package/docs/API-reference/components/common/currency/x-components.base-currency.md +15 -15
  15. package/docs/API-reference/components/common/filters/labels/x-components.base-price-filter-label.md +6 -2
  16. package/docs/API-reference/components/common/filters/labels/x-components.base-rating-filter-label.md +26 -26
  17. package/docs/API-reference/components/common/layouts/x-components.fixed-header-and-asides-layout.md +1 -1
  18. package/docs/API-reference/components/common/layouts/x-components.multi-column-max-width-layout.md +1 -1
  19. package/docs/API-reference/components/common/layouts/x-components.single-column-layout.md +1 -1
  20. package/docs/API-reference/components/common/modals/x-components.base-events-modal-close.md +5 -3
  21. package/docs/API-reference/components/common/modals/x-components.base-events-modal-open.md +2 -2
  22. package/docs/API-reference/components/common/modals/x-components.base-events-modal.md +28 -10
  23. package/docs/API-reference/components/common/modals/x-components.base-id-modal-close.md +2 -2
  24. package/docs/API-reference/components/common/modals/x-components.base-id-modal-open.md +2 -2
  25. package/docs/API-reference/components/common/modals/x-components.base-id-modal.md +10 -2
  26. package/docs/API-reference/components/common/modals/x-components.base-modal.md +12 -12
  27. package/docs/API-reference/components/common/modals/x-components.close-main-modal.md +5 -1
  28. package/docs/API-reference/components/common/modals/x-components.main-modal.md +20 -4
  29. package/docs/API-reference/components/common/modals/x-components.open-main-modal.md +5 -1
  30. package/docs/API-reference/components/common/panels/x-components.base-header-toggle-panel.md +17 -13
  31. package/docs/API-reference/components/common/panels/x-components.base-id-toggle-panel-button.md +11 -4
  32. package/docs/API-reference/components/common/panels/x-components.base-id-toggle-panel.md +20 -13
  33. package/docs/API-reference/components/common/panels/x-components.base-tabs-panel.md +13 -10
  34. package/docs/API-reference/components/common/panels/x-components.base-toggle-panel.md +4 -4
  35. package/docs/API-reference/components/common/result/x-components.base-result-add-to-cart.md +4 -4
  36. package/docs/API-reference/components/common/result/x-components.base-result-current-price.md +7 -5
  37. package/docs/API-reference/components/common/result/x-components.base-result-image.md +25 -19
  38. package/docs/API-reference/components/common/result/x-components.base-result-link.md +5 -5
  39. package/docs/API-reference/components/common/result/x-components.base-result-previous-price.md +7 -5
  40. package/docs/API-reference/components/common/result/x-components.base-result-rating.md +26 -23
  41. package/docs/API-reference/components/common/result/x-components.result-variant-selector.md +62 -42
  42. package/docs/API-reference/components/common/result/x-components.result-variants-provider.md +35 -25
  43. package/docs/API-reference/components/common/scroll/x-components.base-scroll.md +11 -11
  44. package/docs/API-reference/components/common/suggestions/x-components.base-suggestion.md +24 -24
  45. package/docs/API-reference/components/common/suggestions/x-components.base-suggestions.md +47 -44
  46. package/docs/API-reference/components/common/x-components.auto-progress-bar.md +8 -5
  47. package/docs/API-reference/components/common/x-components.base-dropdown.md +7 -5
  48. package/docs/API-reference/components/common/x-components.base-event-button.md +9 -7
  49. package/docs/API-reference/components/common/x-components.base-grid.md +23 -23
  50. package/docs/API-reference/components/common/x-components.base-keyboard-navigation.md +6 -6
  51. package/docs/API-reference/components/common/x-components.base-rating.md +3 -3
  52. package/docs/API-reference/components/common/x-components.base-slider.md +20 -16
  53. package/docs/API-reference/components/common/x-components.base-switch.md +6 -6
  54. package/docs/API-reference/components/common/x-components.base-variable-column-grid.md +37 -28
  55. package/docs/API-reference/components/common/x-components.display-click-provider.md +9 -9
  56. package/docs/API-reference/components/common/x-components.display-emitter.md +1 -1
  57. package/docs/API-reference/components/common/x-components.global-x-bus.md +3 -3
  58. package/docs/API-reference/components/common/x-components.highlight.md +6 -6
  59. package/docs/API-reference/components/common/x-components.location-provider.md +4 -4
  60. package/docs/API-reference/components/common/x-components.page-loader-button.md +14 -14
  61. package/docs/API-reference/components/common/x-components.page-selector.md +12 -12
  62. package/docs/API-reference/components/common/x-components.sliding-panel.md +23 -20
  63. package/docs/API-reference/components/common/x-components.snippet-callbacks.md +3 -3
  64. package/docs/API-reference/components/device/x-components.device-detector.md +15 -15
  65. package/docs/API-reference/components/empathize/x-components.empathize.md +20 -20
  66. package/docs/API-reference/components/experience-controls/x-components.experience-controls.md +1 -1
  67. package/docs/API-reference/components/extra-params/x-components.extra-params.md +3 -3
  68. package/docs/API-reference/components/extra-params/x-components.renderless-extra-param.md +9 -5
  69. package/docs/API-reference/components/extra-params/x-components.snippet-config-extra-params.md +8 -8
  70. package/docs/API-reference/components/facets/x-components.clear-filters.md +10 -6
  71. package/docs/API-reference/components/facets/x-components.facets/facets-provider.md +16 -16
  72. package/docs/API-reference/components/facets/x-components.facets/facets.md +15 -9
  73. package/docs/API-reference/components/facets/x-components.filters/all-filter.md +20 -6
  74. package/docs/API-reference/components/facets/x-components.filters/editable-number-range-filter.md +37 -30
  75. package/docs/API-reference/components/facets/x-components.filters/hierarchical-filter.md +33 -27
  76. package/docs/API-reference/components/facets/x-components.filters/number-range-filter.md +19 -16
  77. package/docs/API-reference/components/facets/x-components.filters/renderless-filter.md +17 -15
  78. package/docs/API-reference/components/facets/x-components.filters/simple-filter.md +38 -32
  79. package/docs/API-reference/components/facets/x-components.lists/exclude-filters-with-no-results.md +30 -30
  80. package/docs/API-reference/components/facets/x-components.lists/filters-list.md +15 -15
  81. package/docs/API-reference/components/facets/x-components.lists/filters-search.md +31 -22
  82. package/docs/API-reference/components/facets/x-components.lists/selected-filters-list.md +8 -6
  83. package/docs/API-reference/components/facets/x-components.lists/selected-filters.md +5 -5
  84. package/docs/API-reference/components/facets/x-components.lists/sliced-filters.md +35 -8
  85. package/docs/API-reference/components/facets/x-components.lists/sorted-filters.md +7 -2
  86. package/docs/API-reference/components/facets/x-components.preselected-filters.md +15 -9
  87. package/docs/API-reference/components/history-queries/x-components.clear-history-queries.md +8 -5
  88. package/docs/API-reference/components/history-queries/x-components.history-queries-switch.md +12 -9
  89. package/docs/API-reference/components/history-queries/x-components.history-queries.md +18 -15
  90. package/docs/API-reference/components/history-queries/x-components.history-query.md +21 -21
  91. package/docs/API-reference/components/history-queries/x-components.my-history.md +14 -11
  92. package/docs/API-reference/components/history-queries/x-components.remove-history-query.md +5 -5
  93. package/docs/API-reference/components/identifier-results/x-components.identifier-result.md +3 -3
  94. package/docs/API-reference/components/identifier-results/x-components.identifier-results.md +7 -7
  95. package/docs/API-reference/components/next-queries/x-components.next-queries-list.md +20 -15
  96. package/docs/API-reference/components/next-queries/x-components.next-queries.md +17 -13
  97. package/docs/API-reference/components/next-queries/x-components.next-query-preview.md +36 -25
  98. package/docs/API-reference/components/next-queries/x-components.next-query.md +14 -12
  99. package/docs/API-reference/components/popular-searches/x-components.popular-search.md +11 -11
  100. package/docs/API-reference/components/popular-searches/x-components.popular-searches.md +10 -7
  101. package/docs/API-reference/components/queries-preview/x-components.query-preview-button.md +6 -6
  102. package/docs/API-reference/components/queries-preview/x-components.query-preview-list.md +23 -21
  103. package/docs/API-reference/components/queries-preview/x-components.query-preview.md +27 -16
  104. package/docs/API-reference/components/query-suggestions/x-components.query-suggestion.md +20 -17
  105. package/docs/API-reference/components/query-suggestions/x-components.query-suggestions.md +16 -13
  106. package/docs/API-reference/components/recommendations/x-components.recommendations.md +23 -12
  107. package/docs/API-reference/components/related-prompts/x-components.related-prompt.md +12 -12
  108. package/docs/API-reference/components/related-prompts/x-components.related-prompts-list.md +13 -13
  109. package/docs/API-reference/components/related-prompts/x-components.related-prompts-tag-list.md +8 -5
  110. package/docs/API-reference/components/related-tags/x-components.related-tag.md +16 -16
  111. package/docs/API-reference/components/related-tags/x-components.related-tags.md +19 -16
  112. package/docs/API-reference/components/scroll/x-components.main-scroll-item.md +9 -5
  113. package/docs/API-reference/components/scroll/x-components.main-scroll.md +16 -8
  114. package/docs/API-reference/components/scroll/x-components.scroll-to-top.md +1 -1
  115. package/docs/API-reference/components/scroll/x-components.scroll.md +27 -27
  116. package/docs/API-reference/components/search/x-components.banner.md +16 -16
  117. package/docs/API-reference/components/search/x-components.banners-list.md +13 -13
  118. package/docs/API-reference/components/search/x-components.fallback-disclaimer.md +4 -4
  119. package/docs/API-reference/components/search/x-components.partial-query-button.md +6 -6
  120. package/docs/API-reference/components/search/x-components.partial-results-list.md +11 -7
  121. package/docs/API-reference/components/search/x-components.promoted.md +16 -16
  122. package/docs/API-reference/components/search/x-components.promoteds-list.md +13 -13
  123. package/docs/API-reference/components/search/x-components.redirection.md +2 -2
  124. package/docs/API-reference/components/search/x-components.results-list.md +17 -13
  125. package/docs/API-reference/components/search/x-components.sort-dropdown.md +13 -9
  126. package/docs/API-reference/components/search/x-components.sort-list.md +7 -7
  127. package/docs/API-reference/components/search/x-components.sort-picker-list.md +10 -10
  128. package/docs/API-reference/components/search/x-components.spellcheck-button.md +2 -2
  129. package/docs/API-reference/components/search/x-components.spellcheck.md +5 -3
  130. package/docs/API-reference/components/search-box/x-components.clear-search-input.md +15 -7
  131. package/docs/API-reference/components/search-box/x-components.search-button.md +11 -11
  132. package/docs/API-reference/components/search-box/x-components.search-input-placeholder.md +22 -16
  133. package/docs/API-reference/components/search-box/x-components.search-input.md +19 -10
  134. package/docs/API-reference/components/semantic-queries/x-components.semantic-queries.md +17 -11
  135. package/docs/API-reference/components/semantic-queries/x-components.semantic-query.md +12 -9
  136. package/docs/API-reference/components/tagging/x-components.tagging.md +8 -4
  137. package/docs/API-reference/components/url/x-components.url-handler.md +2 -2
  138. package/js/store/utils/store-emitters.utils.js.map +1 -1
  139. package/js/x-bus/x-bus.js.map +1 -1
  140. package/js/x-bus/x-priority-queue/x-priority-queue.js.map +1 -1
  141. package/js/x-modules/facets/entities/types.js.map +1 -1
  142. package/package.json +6 -6
  143. package/types/store/utils/store-emitters.utils.d.ts.map +1 -1
  144. package/types/wiring/events.types.d.ts.map +1 -1
  145. package/types/x-bus/x-bus.d.ts.map +1 -1
  146. package/types/x-bus/x-priority-queue/x-priority-queue.d.ts.map +1 -1
  147. package/types/x-modules/facets/entities/types.d.ts.map +1 -1
  148. package/types/x-modules/facets/store/types.d.ts.map +1 -1
  149. package/types/x-modules/history-queries/store/types.d.ts.map +1 -1
  150. package/types/x-modules/identifier-results/store/types.d.ts.map +1 -1
  151. package/types/x-modules/next-queries/store/types.d.ts.map +1 -1
  152. package/types/x-modules/popular-searches/store/types.d.ts.map +1 -1
  153. package/types/x-modules/query-suggestions/store/types.d.ts.map +1 -1
  154. package/types/x-modules/recommendations/store/types.d.ts.map +1 -1
  155. package/types/x-modules/related-tags/store/types.d.ts.map +1 -1
  156. package/types/x-modules/search/store/types.d.ts.map +1 -1
  157. package/types/x-modules/semantic-queries/store/types.d.ts.map +1 -1
@@ -40,9 +40,9 @@ Simple panel that receives its open state via prop, which is responsible for ren
40
40
  </template>
41
41
 
42
42
  <script setup>
43
- import { BaseTogglePanel } from '@empathyco/x-components'
44
- import { CollapseFromTop } from '@empathyco/x-components/animations'
45
- const animation = CollapseFromTop
46
- const filters = [{ label: 'Color' }, { label: 'Size' }, { label: 'Brand' }]
43
+ import { BaseTogglePanel } from "@empathyco/x-components";
44
+ import { CollapseFromTop } from "@empathyco/x-components/animations";
45
+ const animation = CollapseFromTop;
46
+ const filters = [{ label: "Color" }, { label: "Size" }, { label: "Brand" }];
47
47
  </script>
48
48
  ```
@@ -46,12 +46,12 @@ This component is a button to emit `UserClickedResultAddToCart` when clicked by
46
46
  </template>
47
47
 
48
48
  <script setup>
49
- import { BaseResultAddToCart } from '@empathyco/x-components'
49
+ import { BaseResultAddToCart } from "@empathyco/x-components";
50
50
  const result = {
51
- id: '123',
52
- name: 'Product name',
51
+ id: "123",
52
+ name: "Product name",
53
53
  price: 19.99,
54
54
  // ...other result properties
55
- }
55
+ };
56
56
  </script>
57
57
  ```
@@ -35,11 +35,11 @@ the `BaseCurrency` component use an injected one.
35
35
  </template>
36
36
 
37
37
  <script setup>
38
- import { BaseResultCurrentPrice } from '@empathyco/x-components'
38
+ import { BaseResultCurrentPrice } from "@empathyco/x-components";
39
39
  const result = {
40
40
  price: { value: 123.45, hasDiscount: false },
41
41
  // ...other result properties
42
- }
42
+ };
43
43
  </script>
44
44
  ```
45
45
 
@@ -48,15 +48,17 @@ const result = {
48
48
  ```vue
49
49
  <template>
50
50
  <BaseResultCurrentPrice :result="result">
51
- <span class="custom-base-result-current-price">{{ result.price.value }}</span>
51
+ <span class="custom-base-result-current-price">{{
52
+ result.price.value
53
+ }}</span>
52
54
  </BaseResultCurrentPrice>
53
55
  </template>
54
56
 
55
57
  <script setup>
56
- import { BaseResultCurrentPrice } from '@empathyco/x-components'
58
+ import { BaseResultCurrentPrice } from "@empathyco/x-components";
57
59
  const result = {
58
60
  price: { value: 123.45, hasDiscount: false },
59
61
  // ...other result properties
60
- }
62
+ };
61
63
  </script>
62
64
  ```
@@ -39,11 +39,11 @@ The result prop is required. It will render a `<img/>` with the result image:
39
39
  </template>
40
40
 
41
41
  <script setup>
42
- import { BaseResultImage } from '@empathyco/x-components'
42
+ import { BaseResultImage } from "@empathyco/x-components";
43
43
  const result = {
44
- name: 'Jacket',
45
- images: ['https://some-image-url.com/image1.jpg'],
46
- }
44
+ name: "Jacket",
45
+ images: ["https://some-image-url.com/image1.jpg"],
46
+ };
47
47
  </script>
48
48
  ```
49
49
 
@@ -57,11 +57,14 @@ If a result has multiple images, it can show the next one on hover.
57
57
  </template>
58
58
 
59
59
  <script setup>
60
- import { BaseResultImage } from '@empathyco/x-components'
60
+ import { BaseResultImage } from "@empathyco/x-components";
61
61
  const result = {
62
- name: 'Jacket',
63
- images: ['https://some-image-url.com/image1.jpg', 'https://some-image-url.com/image2.jpg'],
64
- }
62
+ name: "Jacket",
63
+ images: [
64
+ "https://some-image-url.com/image1.jpg",
65
+ "https://some-image-url.com/image2.jpg",
66
+ ],
67
+ };
65
68
  </script>
66
69
  ```
67
70
 
@@ -87,11 +90,11 @@ displayed while the real one is loaded.
87
90
  </template>
88
91
 
89
92
  <script setup>
90
- import { BaseResultImage } from '@empathyco/x-components'
93
+ import { BaseResultImage } from "@empathyco/x-components";
91
94
  const result = {
92
- name: 'Jacket',
93
- images: ['https://some-image-url.com/image1.jpg'],
94
- }
95
+ name: "Jacket",
96
+ images: ["https://some-image-url.com/image1.jpg"],
97
+ };
95
98
  </script>
96
99
  ```
97
100
 
@@ -117,13 +120,16 @@ The `hoverAnimation` is used to transition between the image and the hover image
117
120
  </template>
118
121
 
119
122
  <script setup>
120
- import { BaseResultImage } from '@empathyco/x-components'
121
- import { CrossFade, CollapseHeight } from '@empathyco/x-components/animations'
122
- const loadAnimation = CrossFade
123
- const hoverAnimation = CollapseHeight
123
+ import { BaseResultImage } from "@empathyco/x-components";
124
+ import { CrossFade, CollapseHeight } from "@empathyco/x-components/animations";
125
+ const loadAnimation = CrossFade;
126
+ const hoverAnimation = CollapseHeight;
124
127
  const result = {
125
- name: 'Jacket',
126
- images: ['https://some-image-url.com/image1.jpg', 'https://some-image-url.com/image2.jpg'],
127
- }
128
+ name: "Jacket",
129
+ images: [
130
+ "https://some-image-url.com/image1.jpg",
131
+ "https://some-image-url.com/image2.jpg",
132
+ ],
133
+ };
128
134
  </script>
129
135
  ```
@@ -49,11 +49,11 @@ The result prop is required. It will render an anchor element with the href to t
49
49
  </template>
50
50
 
51
51
  <script setup>
52
- import { BaseResultLink } from '@empathyco/x-components'
52
+ import { BaseResultLink } from "@empathyco/x-components";
53
53
  const result = {
54
- name: 'Jacket',
55
- url: 'https://shop.com/jacket',
56
- images: ['https://shop.com/jacket.jpg'],
57
- }
54
+ name: "Jacket",
55
+ url: "https://shop.com/jacket",
56
+ images: ["https://shop.com/jacket.jpg"],
57
+ };
58
58
  </script>
59
59
  ```
@@ -34,11 +34,11 @@ This component shows the previous price formatted if it has discount. The compon
34
34
  </template>
35
35
 
36
36
  <script setup>
37
- import { BaseResultPreviousPrice } from '@empathyco/x-components'
37
+ import { BaseResultPreviousPrice } from "@empathyco/x-components";
38
38
  const result = {
39
39
  price: { originalValue: 199.99, hasDiscount: true },
40
40
  // ...other result properties
41
- }
41
+ };
42
42
  </script>
43
43
  ```
44
44
 
@@ -47,15 +47,17 @@ const result = {
47
47
  ```vue
48
48
  <template>
49
49
  <BaseResultPreviousPrice :result="result">
50
- <span class="custom-base-result-previous-price">{{ result.price.originalValue }}</span>
50
+ <span class="custom-base-result-previous-price">{{
51
+ result.price.originalValue
52
+ }}</span>
51
53
  </BaseResultPreviousPrice>
52
54
  </template>
53
55
 
54
56
  <script setup>
55
- import { BaseResultPreviousPrice } from '@empathyco/x-components'
57
+ import { BaseResultPreviousPrice } from "@empathyco/x-components";
56
58
  const result = {
57
59
  price: { originalValue: 199.99, hasDiscount: true },
58
60
  // ...other result properties
59
- }
61
+ };
60
62
  </script>
61
63
  ```
@@ -39,12 +39,12 @@ This component emits the following events:
39
39
  </template>
40
40
 
41
41
  <script setup>
42
- import { BaseResultRating } from '@empathyco/x-components'
42
+ import { BaseResultRating } from "@empathyco/x-components";
43
43
  const result = {
44
44
  id: 1,
45
- name: 'Result with rating',
45
+ name: "Result with rating",
46
46
  rating: { value: 3 },
47
- }
47
+ };
48
48
  </script>
49
49
  ```
50
50
 
@@ -60,12 +60,12 @@ In this example, the result rating has been configured to 6 as maximum value usi
60
60
  </template>
61
61
 
62
62
  <script setup>
63
- import { BaseResultRating } from '@empathyco/x-components'
63
+ import { BaseResultRating } from "@empathyco/x-components";
64
64
  const result = {
65
65
  id: 1,
66
- name: 'Result with rating',
66
+ name: "Result with rating",
67
67
  rating: { value: 3 },
68
- }
68
+ };
69
69
  </script>
70
70
  ```
71
71
 
@@ -79,12 +79,12 @@ In this example, the result rating has been configured with a link to redirect w
79
79
  </template>
80
80
 
81
81
  <script setup>
82
- import { BaseResultRating } from '@empathyco/x-components'
82
+ import { BaseResultRating } from "@empathyco/x-components";
83
83
  const result = {
84
84
  id: 1,
85
- name: 'Result with rating',
85
+ name: "Result with rating",
86
86
  rating: { value: 3 },
87
- }
87
+ };
88
88
  </script>
89
89
  ```
90
90
 
@@ -94,18 +94,21 @@ In this example, a message has been added to be shown when the result rating is
94
94
 
95
95
  ```vue
96
96
  <template>
97
- <BaseResultRating :result="result" @UserClickedAResultRating="logUserClickedRating" />
97
+ <BaseResultRating
98
+ :result="result"
99
+ @UserClickedAResultRating="logUserClickedRating"
100
+ />
98
101
  </template>
99
102
 
100
103
  <script setup>
101
- import { BaseResultRating } from '@empathyco/x-components'
104
+ import { BaseResultRating } from "@empathyco/x-components";
102
105
  const result = {
103
106
  id: 1,
104
- name: 'Result with rating',
107
+ name: "Result with rating",
105
108
  rating: { value: 3 },
106
- }
109
+ };
107
110
  function logUserClickedRating(result) {
108
- console.log('User clickedRating of this result:', result)
111
+ console.log("User clickedRating of this result:", result);
109
112
  }
110
113
  </script>
111
114
  ```
@@ -126,12 +129,12 @@ states (filled and empty), must have the same size make component work properly.
126
129
  </template>
127
130
 
128
131
  <script setup>
129
- import { BaseResultRating } from '@empathyco/x-components'
132
+ import { BaseResultRating } from "@empathyco/x-components";
130
133
  const result = {
131
134
  id: 1,
132
- name: 'Result with rating',
135
+ name: "Result with rating",
133
136
  rating: { value: 3 },
134
- }
137
+ };
135
138
  </script>
136
139
  ```
137
140
 
@@ -149,12 +152,12 @@ link and event behaviour:
149
152
  </template>
150
153
 
151
154
  <script setup>
152
- import { BaseResultRating } from '@empathyco/x-components'
155
+ import { BaseResultRating } from "@empathyco/x-components";
153
156
  const result = {
154
157
  id: 1,
155
- name: 'Result with rating',
158
+ name: "Result with rating",
156
159
  rating: { value: 3 },
157
- }
160
+ };
158
161
  </script>
159
162
  ```
160
163
 
@@ -171,11 +174,11 @@ It is also possible to reuse our rating component:
171
174
  </template>
172
175
 
173
176
  <script setup>
174
- import { BaseResultRating, BaseRating } from '@empathyco/x-components'
177
+ import { BaseResultRating, BaseRating } from "@empathyco/x-components";
175
178
  const result = {
176
179
  id: 1,
177
- name: 'Result with rating',
180
+ name: "Result with rating",
178
181
  rating: { value: 3 },
179
- }
182
+ };
180
183
  </script>
181
184
  ```
@@ -53,28 +53,31 @@ rendered.
53
53
  </template>
54
54
 
55
55
  <script setup>
56
- import { ResultVariantsProvider, ResultVariantSelector } from '@empathyco/x-components'
56
+ import {
57
+ ResultVariantsProvider,
58
+ ResultVariantSelector,
59
+ } from "@empathyco/x-components";
57
60
  const result = {
58
- id: 'jacket',
59
- modelName: 'Result',
60
- type: 'Product',
61
+ id: "jacket",
62
+ modelName: "Result",
63
+ type: "Product",
61
64
  isWishlisted: false,
62
- identifier: { value: 'jacket' },
65
+ identifier: { value: "jacket" },
63
66
  images: [],
64
- name: 'jacket',
67
+ name: "jacket",
65
68
  price: { hasDiscount: false, originalValue: 10, value: 10 },
66
- url: '/products/jacket',
69
+ url: "/products/jacket",
67
70
  variants: [
68
71
  {
69
- name: 'red',
70
- variants: [{ name: 'red XL' }, { name: 'red L' }],
72
+ name: "red",
73
+ variants: [{ name: "red XL" }, { name: "red L" }],
71
74
  },
72
75
  {
73
- name: 'blue',
74
- variants: [{ name: 'blue S' }, { name: 'blue M' }, { name: 'blue L' }],
76
+ name: "blue",
77
+ variants: [{ name: "blue S" }, { name: "blue M" }, { name: "blue L" }],
75
78
  },
76
79
  ],
77
- }
80
+ };
78
81
  </script>
79
82
  ```
80
83
 
@@ -85,9 +88,14 @@ You can customize the list using the default slot:
85
88
  ```vue
86
89
  <template>
87
90
  <ResultVariantsProvider :result="result">
88
- <ResultVariantSelector :level="0" #default="{ variants, selectedVariant, selectVariant }">
91
+ <ResultVariantSelector
92
+ :level="0"
93
+ #default="{ variants, selectedVariant, selectVariant }"
94
+ >
89
95
  <div>
90
- <p v-if="selectedVariant">Selected variant: {{ selectedVariant.name }}</p>
96
+ <p v-if="selectedVariant">
97
+ Selected variant: {{ selectedVariant.name }}
98
+ </p>
91
99
  <ul class="x-flex">
92
100
  <li v-for="(variant, index) in variants" :key="index">
93
101
  <button @click="selectVariant(variant)">{{ variant.name }}</button>
@@ -99,19 +107,22 @@ You can customize the list using the default slot:
99
107
  </template>
100
108
 
101
109
  <script setup>
102
- import { ResultVariantsProvider, ResultVariantSelector } from '@empathyco/x-components'
110
+ import {
111
+ ResultVariantsProvider,
112
+ ResultVariantSelector,
113
+ } from "@empathyco/x-components";
103
114
  const result = {
104
- id: 'jacket',
105
- modelName: 'Result',
106
- type: 'Product',
115
+ id: "jacket",
116
+ modelName: "Result",
117
+ type: "Product",
107
118
  isWishlisted: false,
108
- identifier: { value: 'jacket' },
119
+ identifier: { value: "jacket" },
109
120
  images: [],
110
- name: 'jacket',
121
+ name: "jacket",
111
122
  price: { hasDiscount: false, originalValue: 10, value: 10 },
112
- url: '/products/jacket',
113
- variants: [{ name: 'red' }, { name: 'blue' }],
114
- }
123
+ url: "/products/jacket",
124
+ variants: [{ name: "red" }, { name: "blue" }],
125
+ };
115
126
  </script>
116
127
  ```
117
128
 
@@ -122,7 +133,10 @@ You can customize the variant item using the `variant` slot:
122
133
  ```vue
123
134
  <template>
124
135
  <ResultVariantsProvider :result="result">
125
- <ResultVariantSelector :level="0" #variant="{ variant, isSelected, selectVariant }">
136
+ <ResultVariantSelector
137
+ :level="0"
138
+ #variant="{ variant, isSelected, selectVariant }"
139
+ >
126
140
  <div>
127
141
  <button @click="selectVariant">
128
142
  {{ variant.name }}
@@ -134,19 +148,22 @@ You can customize the variant item using the `variant` slot:
134
148
  </template>
135
149
 
136
150
  <script setup>
137
- import { ResultVariantsProvider, ResultVariantSelector } from '@empathyco/x-components'
151
+ import {
152
+ ResultVariantsProvider,
153
+ ResultVariantSelector,
154
+ } from "@empathyco/x-components";
138
155
  const result = {
139
- id: 'jacket',
140
- modelName: 'Result',
141
- type: 'Product',
156
+ id: "jacket",
157
+ modelName: "Result",
158
+ type: "Product",
142
159
  isWishlisted: false,
143
- identifier: { value: 'jacket' },
160
+ identifier: { value: "jacket" },
144
161
  images: [],
145
- name: 'jacket',
162
+ name: "jacket",
146
163
  price: { hasDiscount: false, originalValue: 10, value: 10 },
147
- url: '/products/jacket',
148
- variants: [{ name: 'red' }, { name: 'blue' }],
149
- }
164
+ url: "/products/jacket",
165
+ variants: [{ name: "red" }, { name: "blue" }],
166
+ };
150
167
  </script>
151
168
  ```
152
169
 
@@ -167,18 +184,21 @@ You can customize the content of the default variant button using the `variant-c
167
184
  </template>
168
185
 
169
186
  <script setup>
170
- import { ResultVariantsProvider, ResultVariantSelector } from '@empathyco/x-components'
187
+ import {
188
+ ResultVariantsProvider,
189
+ ResultVariantSelector,
190
+ } from "@empathyco/x-components";
171
191
  const result = {
172
- id: 'jacket',
173
- modelName: 'Result',
174
- type: 'Product',
192
+ id: "jacket",
193
+ modelName: "Result",
194
+ type: "Product",
175
195
  isWishlisted: false,
176
- identifier: { value: 'jacket' },
196
+ identifier: { value: "jacket" },
177
197
  images: [],
178
- name: 'jacket',
198
+ name: "jacket",
179
199
  price: { hasDiscount: false, originalValue: 10, value: 10 },
180
- url: '/products/jacket',
181
- variants: [{ name: 'red' }, { name: 'blue' }],
182
- }
200
+ url: "/products/jacket",
201
+ variants: [{ name: "red" }, { name: "blue" }],
202
+ };
183
203
  </script>
184
204
  ```
@@ -52,28 +52,31 @@ By default, the first variants of all the levels will be selected when the compo
52
52
  </template>
53
53
 
54
54
  <script setup>
55
- import { ResultVariantsProvider, ResultVariantSelector } from '@empathyco/x-components'
55
+ import {
56
+ ResultVariantsProvider,
57
+ ResultVariantSelector,
58
+ } from "@empathyco/x-components";
56
59
  const result = {
57
- id: 'jacket',
58
- modelName: 'Result',
59
- type: 'Product',
60
+ id: "jacket",
61
+ modelName: "Result",
62
+ type: "Product",
60
63
  isWishlisted: false,
61
- identifier: { value: 'jacket' },
64
+ identifier: { value: "jacket" },
62
65
  images: [],
63
- name: 'jacket',
66
+ name: "jacket",
64
67
  price: { hasDiscount: false, originalValue: 10, value: 10 },
65
- url: '/products/jacket',
68
+ url: "/products/jacket",
66
69
  variants: [
67
70
  {
68
- name: 'red',
69
- variants: [{ name: 'red XL' }, { name: 'red L' }],
71
+ name: "red",
72
+ variants: [{ name: "red XL" }, { name: "red L" }],
70
73
  },
71
74
  {
72
- name: 'blue',
73
- variants: [{ name: 'blue S' }, { name: 'blue M' }, { name: 'blue L' }],
75
+ name: "blue",
76
+ variants: [{ name: "blue S" }, { name: "blue M" }, { name: "blue L" }],
74
77
  },
75
78
  ],
76
- }
79
+ };
77
80
  </script>
78
81
  ```
79
82
 
@@ -85,7 +88,11 @@ first variant of the first level, and so on.
85
88
 
86
89
  ```vue
87
90
  <template>
88
- <ResultVariantsProvider :result="result" :autoSelectDepth="0" #default="{ result }">
91
+ <ResultVariantsProvider
92
+ :result="result"
93
+ :autoSelectDepth="0"
94
+ #default="{ result }"
95
+ >
89
96
  <p>Result name: {{ result.name }}</p>
90
97
 
91
98
  <h1>Select color</h1>
@@ -101,27 +108,30 @@ first variant of the first level, and so on.
101
108
  </template>
102
109
 
103
110
  <script setup>
104
- import { ResultVariantsProvider, ResultVariantSelector } from '@empathyco/x-components'
111
+ import {
112
+ ResultVariantsProvider,
113
+ ResultVariantSelector,
114
+ } from "@empathyco/x-components";
105
115
  const result = {
106
- id: 'jacket',
107
- modelName: 'Result',
108
- type: 'Product',
116
+ id: "jacket",
117
+ modelName: "Result",
118
+ type: "Product",
109
119
  isWishlisted: false,
110
- identifier: { value: 'jacket' },
120
+ identifier: { value: "jacket" },
111
121
  images: [],
112
- name: 'jacket',
122
+ name: "jacket",
113
123
  price: { hasDiscount: false, originalValue: 10, value: 10 },
114
- url: '/products/jacket',
124
+ url: "/products/jacket",
115
125
  variants: [
116
126
  {
117
- name: 'red',
118
- variants: [{ name: 'red XL' }, { name: 'red L' }],
127
+ name: "red",
128
+ variants: [{ name: "red XL" }, { name: "red L" }],
119
129
  },
120
130
  {
121
- name: 'blue',
122
- variants: [{ name: 'blue S' }, { name: 'blue M' }, { name: 'blue L' }],
131
+ name: "blue",
132
+ variants: [{ name: "blue S" }, { name: "blue M" }, { name: "blue L" }],
123
133
  },
124
134
  ],
125
- }
135
+ };
126
136
  </script>
127
137
  ```
@@ -61,21 +61,21 @@ for scroll position, direction, when reaching the start or end, and when about r
61
61
  </template>
62
62
 
63
63
  <script setup>
64
- import { BaseScroll } from '@empathyco/x-components'
64
+ import { BaseScroll } from "@empathyco/x-components";
65
65
  function onScroll(position) {
66
- console.log('scroll', position)
66
+ console.log("scroll", position);
67
67
  }
68
68
  function onDirectionChange(direction) {
69
- console.log('scroll:direction-change', direction)
69
+ console.log("scroll:direction-change", direction);
70
70
  }
71
71
  function onAtStart() {
72
- console.log('scroll:at-start')
72
+ console.log("scroll:at-start");
73
73
  }
74
74
  function onAlmostAtEnd(distance) {
75
- console.log('scroll:almost-at-end', distance)
75
+ console.log("scroll:almost-at-end", distance);
76
76
  }
77
77
  function onAtEnd() {
78
- console.log('scroll:at-end')
78
+ console.log("scroll:at-end");
79
79
  }
80
80
  </script>
81
81
  ```
@@ -95,9 +95,9 @@ Set `resetOnChange` to `false` to prevent scroll reset on query change (default
95
95
  </template>
96
96
 
97
97
  <script setup>
98
- import { BaseScroll } from '@empathyco/x-components'
98
+ import { BaseScroll } from "@empathyco/x-components";
99
99
  function onScroll(position) {
100
- console.log('scroll', position)
100
+ console.log("scroll", position);
101
101
  }
102
102
  </script>
103
103
  ```
@@ -117,10 +117,10 @@ Configure which events reset the scroll position using the `resetOn` prop.
117
117
  </template>
118
118
 
119
119
  <script setup>
120
- import { BaseScroll } from '@empathyco/x-components'
121
- const resetScrollEvents = ['UserAcceptedAQuery']
120
+ import { BaseScroll } from "@empathyco/x-components";
121
+ const resetScrollEvents = ["UserAcceptedAQuery"];
122
122
  function onScroll(position) {
123
- console.log('scroll', position)
123
+ console.log("scroll", position);
124
124
  }
125
125
  </script>
126
126
  ```