@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
@@ -58,29 +58,29 @@ If the suggestion contains a filter, it is displayed next to the suggestion.
58
58
  </template>
59
59
 
60
60
  <script setup>
61
- import { BaseSuggestion } from '@empathyco/x-components'
62
- const query = 'st'
61
+ import { BaseSuggestion } from "@empathyco/x-components";
62
+ const query = "st";
63
63
  const suggestion = {
64
- modelName: 'QuerySuggestion',
65
- query: 'steak',
64
+ modelName: "QuerySuggestion",
65
+ query: "steak",
66
66
  facets: [
67
67
  {
68
- modelName: 'SimpleFacet',
69
- id: 'category',
70
- label: 'Category',
68
+ modelName: "SimpleFacet",
69
+ id: "category",
70
+ label: "Category",
71
71
  filters: [
72
72
  {
73
- id: 'category:groceries',
74
- modelName: 'SimpleFilter',
75
- facetId: 'category-facet',
76
- label: 'Groceries',
73
+ id: "category:groceries",
74
+ modelName: "SimpleFilter",
75
+ facetId: "category-facet",
76
+ label: "Groceries",
77
77
  selected: false,
78
78
  totalResults: 10,
79
79
  },
80
80
  ],
81
81
  },
82
82
  ],
83
- }
83
+ };
84
84
  </script>
85
85
  ```
86
86
 
@@ -100,12 +100,12 @@ You can make this component render any content you want by using the `default` s
100
100
  </template>
101
101
 
102
102
  <script setup>
103
- import { BaseSuggestion } from '@empathyco/x-components'
104
- const query = 'st'
103
+ import { BaseSuggestion } from "@empathyco/x-components";
104
+ const query = "st";
105
105
  const suggestion = {
106
- modelName: 'QuerySuggestion',
107
- query: 'steak',
108
- }
106
+ modelName: "QuerySuggestion",
107
+ query: "steak",
108
+ };
109
109
  </script>
110
110
  ```
111
111
 
@@ -123,14 +123,14 @@ You can emit additional custom events when a suggestion is selected by passing t
123
123
  </template>
124
124
 
125
125
  <script setup>
126
- import { BaseSuggestion } from '@empathyco/x-components'
127
- const query = 'st'
126
+ import { BaseSuggestion } from "@empathyco/x-components";
127
+ const query = "st";
128
128
  const suggestion = {
129
- modelName: 'QuerySuggestion',
130
- query: 'steak',
131
- }
129
+ modelName: "QuerySuggestion",
130
+ query: "steak",
131
+ };
132
132
  const suggestionSelectedEvents = {
133
- CustomSuggestionEvent: { custom: 'payload' },
134
- }
133
+ CustomSuggestionEvent: { custom: "payload" },
134
+ };
135
135
  </script>
136
136
  ```
@@ -46,32 +46,32 @@ when clicked.
46
46
  </template>
47
47
 
48
48
  <script setup>
49
- import { ref } from 'vue'
50
- import { BaseSuggestions } from '@empathyco/x-components'
51
- import { use$x } from '../../composables'
49
+ import { ref } from "vue";
50
+ import { BaseSuggestions } from "@empathyco/x-components";
51
+ import { use$x } from "../../composables";
52
52
 
53
- const x = use$x()
53
+ const x = use$x();
54
54
  const suggestions = ref([
55
55
  {
56
- query: 'Chips',
56
+ query: "Chips",
57
57
  facets: [],
58
- key: 'chips',
58
+ key: "chips",
59
59
  totalResults: 10,
60
60
  results: [],
61
- modelName: 'PopularSearch',
61
+ modelName: "PopularSearch",
62
62
  },
63
63
  {
64
- query: 'Puzzle',
64
+ query: "Puzzle",
65
65
  facets: [],
66
- key: 'puzzle',
66
+ key: "puzzle",
67
67
  totalResults: 5,
68
68
  results: [],
69
- modelName: 'PopularSearch',
69
+ modelName: "PopularSearch",
70
70
  },
71
- ])
71
+ ]);
72
72
  function emitSuggestionSelected(event, suggestion) {
73
- x.emit('UserAcceptedAQuery', suggestion.query, { target: event.target })
74
- x.emit('UserSelectedAQuerySuggestion', suggestion, { target: event.target })
73
+ x.emit("UserAcceptedAQuery", suggestion.query, { target: event.target });
74
+ x.emit("UserSelectedAQuerySuggestion", suggestion, { target: event.target });
75
75
  }
76
76
  </script>
77
77
  ```
@@ -87,41 +87,41 @@ another toy in the input field to try it out!_
87
87
  </template>
88
88
 
89
89
  <script setup>
90
- import { BaseSuggestions } from '@empathyco/x-components'
90
+ import { BaseSuggestions } from "@empathyco/x-components";
91
91
  const suggestions = [
92
92
  {
93
93
  facets: [],
94
- key: 'chips',
95
- query: 'Chips',
94
+ key: "chips",
95
+ query: "Chips",
96
96
  totalResults: 10,
97
97
  results: [],
98
- modelName: 'PopularSearch',
98
+ modelName: "PopularSearch",
99
99
  },
100
100
  {
101
101
  facets: [],
102
- key: 'puzzle',
103
- query: 'Puzzle',
102
+ key: "puzzle",
103
+ query: "Puzzle",
104
104
  totalResults: 5,
105
105
  results: [],
106
- modelName: 'PopularSearch',
106
+ modelName: "PopularSearch",
107
107
  },
108
108
  {
109
109
  facets: [],
110
- key: 'lego',
111
- query: 'Lego',
110
+ key: "lego",
111
+ query: "Lego",
112
112
  totalResults: 8,
113
113
  results: [],
114
- modelName: 'PopularSearch',
114
+ modelName: "PopularSearch",
115
115
  },
116
116
  {
117
117
  facets: [],
118
- key: 'car',
119
- query: 'Car',
118
+ key: "car",
119
+ query: "Car",
120
120
  totalResults: 3,
121
121
  results: [],
122
- modelName: 'PopularSearch',
122
+ modelName: "PopularSearch",
123
123
  },
124
- ]
124
+ ];
125
125
  </script>
126
126
  ```
127
127
 
@@ -141,33 +141,33 @@ This will render:
141
141
  </template>
142
142
 
143
143
  <script setup>
144
- import { BaseSuggestions } from '@empathyco/x-components'
144
+ import { BaseSuggestions } from "@empathyco/x-components";
145
145
  const suggestions = [
146
146
  {
147
147
  facets: [
148
148
  {
149
- id: 'exampleFacet',
150
- label: 'exampleFacet',
151
- modelName: 'SimpleFacet',
149
+ id: "exampleFacet",
150
+ label: "exampleFacet",
151
+ modelName: "SimpleFacet",
152
152
  filters: [
153
153
  {
154
- facetId: 'exampleFacet',
154
+ facetId: "exampleFacet",
155
155
  id: '{!tag=exampleFacet}exampleFacet_60361120_64009600:"EXAMPLE"',
156
- label: 'EXAMPLE',
156
+ label: "EXAMPLE",
157
157
  selected: false,
158
158
  totalResults: 10,
159
- modelName: 'SimpleFilter',
159
+ modelName: "SimpleFilter",
160
160
  },
161
161
  ],
162
162
  },
163
163
  ],
164
- key: 'chips',
165
- query: 'Chips',
164
+ key: "chips",
165
+ query: "Chips",
166
166
  totalResults: 10,
167
167
  results: [],
168
- modelName: 'PopularSearch',
168
+ modelName: "PopularSearch",
169
169
  },
170
- ]
170
+ ];
171
171
  </script>
172
172
  ```
173
173
 
@@ -175,20 +175,23 @@ In this example, the `suggestionItemClass` prop can be used to add classes to th
175
175
 
176
176
  ```vue
177
177
  <template>
178
- <BaseSuggestions :suggestions="suggestions" suggestionItemClass="x-custom-class" />
178
+ <BaseSuggestions
179
+ :suggestions="suggestions"
180
+ suggestionItemClass="x-custom-class"
181
+ />
179
182
  </template>
180
183
 
181
184
  <script setup>
182
- import { BaseSuggestions } from '@empathyco/x-components'
185
+ import { BaseSuggestions } from "@empathyco/x-components";
183
186
  const suggestions = [
184
187
  {
185
188
  facets: [],
186
- key: 'chips',
187
- query: 'Chips',
189
+ key: "chips",
190
+ query: "Chips",
188
191
  totalResults: 10,
189
192
  results: [],
190
- modelName: 'PopularSearch',
193
+ modelName: "PopularSearch",
191
194
  },
192
- ]
195
+ ];
193
196
  </script>
194
197
  ```
@@ -31,13 +31,16 @@ Here you have a basic example of how the auto progress bar is rendered.
31
31
 
32
32
  ```vue live
33
33
  <template>
34
- <AutoProgressBar :isLoading="isLoading" :durationInSeconds="durationInSeconds" />
34
+ <AutoProgressBar
35
+ :isLoading="isLoading"
36
+ :durationInSeconds="durationInSeconds"
37
+ />
35
38
  </template>
36
39
 
37
40
  <script setup>
38
- import { AutoProgressBar } from '@empathyco/x-components'
39
- const isLoading = true
40
- const durationInSeconds = 100
41
+ import { AutoProgressBar } from "@empathyco/x-components";
42
+ const isLoading = true;
43
+ const durationInSeconds = 100;
41
44
  </script>
42
45
  ```
43
46
 
@@ -52,6 +55,6 @@ to cancel the animation by sending the isLoading prop to false.
52
55
  </template>
53
56
 
54
57
  <script setup>
55
- import { AutoProgressBar } from '@empathyco/x-components'
58
+ import { AutoProgressBar } from "@empathyco/x-components";
56
59
  </script>
57
60
  ```
@@ -50,7 +50,9 @@ provided, the `item` slot will be used for that.
50
50
  ```vue
51
51
  <template>
52
52
  <BaseDropdown v-model="value" :items="items">
53
- <template #toggle="{ item, isOpen }">{{ item }} {{ isOpen ? '🔼' : '🔽' }}️</template>
53
+ <template #toggle="{ item, isOpen }"
54
+ >{{ item }} {{ isOpen ? "🔼" : "🔽" }}️</template
55
+ >
54
56
  <template #item="{ item, isSelected, isHighlighted }">
55
57
  <span v-if="isHighlighted">🟢</span>
56
58
  <span v-if="isSelected">✅</span>
@@ -60,9 +62,9 @@ provided, the `item` slot will be used for that.
60
62
  </template>
61
63
 
62
64
  <script setup>
63
- import { BaseDropdown } from '@empathyco/x-components'
64
- import { ref } from 'vue'
65
- const items = ['a', 2, { id: '3' }]
66
- const value = ref('a')
65
+ import { BaseDropdown } from "@empathyco/x-components";
66
+ import { ref } from "vue";
67
+ const items = ["a", 2, { id: "3" }];
68
+ const value = ref("a");
67
69
  </script>
68
70
  ```
@@ -38,8 +38,8 @@ with the value as payload on click:
38
38
  </template>
39
39
 
40
40
  <script setup>
41
- import { BaseEventButton } from '@empathyco/x-components'
42
- const payload = { foo: 'bar' }
41
+ import { BaseEventButton } from "@empathyco/x-components";
42
+ const payload = { foo: "bar" };
43
43
  </script>
44
44
  ```
45
45
 
@@ -51,7 +51,7 @@ If the event doesn't need payload then `undefined` must be passed:
51
51
  </template>
52
52
 
53
53
  <script setup>
54
- import { BaseEventButton } from '@empathyco/x-components'
54
+ import { BaseEventButton } from "@empathyco/x-components";
55
55
  </script>
56
56
  ```
57
57
 
@@ -59,12 +59,14 @@ It can emit multiple events at the same time:
59
59
 
60
60
  ```vue
61
61
  <template>
62
- <BaseEventButton :events="{ myFirstEvent: payload1, mySecondEvent: payload2 }" />
62
+ <BaseEventButton
63
+ :events="{ myFirstEvent: payload1, mySecondEvent: payload2 }"
64
+ />
63
65
  </template>
64
66
 
65
67
  <script setup>
66
- import { BaseEventButton } from '@empathyco/x-components'
67
- const payload1 = { foo: 1 }
68
- const payload2 = { bar: 2 }
68
+ import { BaseEventButton } from "@empathyco/x-components";
69
+ const payload1 = { foo: 1 };
70
+ const payload2 = { bar: 2 };
69
71
  </script>
70
72
  ```
@@ -50,12 +50,12 @@ It renders a list of items using the default slot:
50
50
  </template>
51
51
 
52
52
  <script setup>
53
- import { BaseGrid } from '@empathyco/x-components'
53
+ import { BaseGrid } from "@empathyco/x-components";
54
54
  const items = [
55
- { id: 1, name: 'Item 1' },
56
- { id: 2, name: 'Item 2' },
57
- { id: 3, name: 'Item 3' },
58
- ]
55
+ { id: 1, name: "Item 1" },
56
+ { id: 2, name: "Item 2" },
57
+ { id: 3, name: "Item 3" },
58
+ ];
59
59
  </script>
60
60
  ```
61
61
 
@@ -73,12 +73,12 @@ It renders a grid with 12 columns instead of 6, which is the default value:
73
73
  </template>
74
74
 
75
75
  <script setup>
76
- import { BaseGrid } from '@empathyco/x-components'
76
+ import { BaseGrid } from "@empathyco/x-components";
77
77
  const items = [
78
- { id: 1, name: 'Item 1' },
79
- { id: 2, name: 'Item 2' },
80
- { id: 3, name: 'Item 3' },
81
- ]
78
+ { id: 1, name: "Item 1" },
79
+ { id: 2, name: "Item 2" },
80
+ { id: 3, name: "Item 3" },
81
+ ];
82
82
  </script>
83
83
  ```
84
84
 
@@ -118,15 +118,15 @@ and are rendered in different slots.
118
118
  </template>
119
119
 
120
120
  <script setup>
121
- import { BaseGrid } from '@empathyco/x-components'
122
- import BaseResultLink from './BaseResultLink.vue'
123
- const animation = 'ul'
121
+ import { BaseGrid } from "@empathyco/x-components";
122
+ import BaseResultLink from "./BaseResultLink.vue";
123
+ const animation = "ul";
124
124
  const items = [
125
- { id: 1, modelName: 'banner', title: 'Banner 1' },
126
- { id: 2, modelName: 'next-queries', totalResults: 5 },
127
- { id: 3, modelName: 'promoted', title: 'Promo 1' },
128
- { id: 4, modelName: 'result', name: 'Result 1' },
129
- ]
125
+ { id: 1, modelName: "banner", title: "Banner 1" },
126
+ { id: 2, modelName: "next-queries", totalResults: 5 },
127
+ { id: 3, modelName: "promoted", title: "Promo 1" },
128
+ { id: 4, modelName: "result", name: "Result 1" },
129
+ ];
130
130
  </script>
131
131
  ```
132
132
 
@@ -145,11 +145,11 @@ items.
145
145
  </template>
146
146
 
147
147
  <script setup>
148
- import { BaseGrid } from '@empathyco/x-components'
148
+ import { BaseGrid } from "@empathyco/x-components";
149
149
  const items = [
150
- { id: 1, name: 'Item 1' },
151
- { id: 2, name: 'Item 2' },
152
- { id: 3, name: 'Item 3' },
153
- ]
150
+ { id: 1, name: "Item 1" },
151
+ { id: 2, name: "Item 2" },
152
+ { id: 3, name: "Item 3" },
153
+ ];
154
154
  </script>
155
155
  ```
@@ -48,8 +48,8 @@ reaching the navigation limit in any direction.
48
48
  </template>
49
49
 
50
50
  <script setup>
51
- import { BaseKeyboardNavigation } from '@empathyco/x-components'
52
- import QuerySuggestions from './QuerySuggestions.vue'
51
+ import { BaseKeyboardNavigation } from "@empathyco/x-components";
52
+ import QuerySuggestions from "./QuerySuggestions.vue";
53
53
  </script>
54
54
  ```
55
55
 
@@ -76,8 +76,8 @@ import QuerySuggestions from './QuerySuggestions.vue'
76
76
  </template>
77
77
 
78
78
  <script setup>
79
- import { BaseKeyboardNavigation } from '@empathyco/x-components'
80
- import QuerySuggestions from './QuerySuggestions.vue'
79
+ import { BaseKeyboardNavigation } from "@empathyco/x-components";
80
+ import QuerySuggestions from "./QuerySuggestions.vue";
81
81
  </script>
82
82
  ```
83
83
 
@@ -102,7 +102,7 @@ import QuerySuggestions from './QuerySuggestions.vue'
102
102
  </template>
103
103
 
104
104
  <script setup>
105
- import { BaseKeyboardNavigation } from '@empathyco/x-components'
106
- import QuerySuggestions from './QuerySuggestions.vue'
105
+ import { BaseKeyboardNavigation } from "@empathyco/x-components";
106
+ import QuerySuggestions from "./QuerySuggestions.vue";
107
107
  </script>
108
108
  ```
@@ -36,7 +36,7 @@ on this value.
36
36
  </template>
37
37
 
38
38
  <script setup>
39
- import { BaseRating } from '@empathyco/x-components'
39
+ import { BaseRating } from "@empathyco/x-components";
40
40
  </script>
41
41
  ```
42
42
 
@@ -55,7 +55,7 @@ import { BaseRating } from '@empathyco/x-components'
55
55
  </template>
56
56
 
57
57
  <script setup>
58
- import { BaseRating } from '@empathyco/x-components'
59
- import TestIcon from './TestIcon.vue'
58
+ import { BaseRating } from "@empathyco/x-components";
59
+ import TestIcon from "./TestIcon.vue";
60
60
  </script>
61
61
  ```
@@ -50,9 +50,9 @@ It is required to send the value prop which holds the selected values.
50
50
  </template>
51
51
 
52
52
  <script setup>
53
- import { BaseSlider } from '@empathyco/x-components'
54
- import { ref } from 'vue'
55
- const selectedRange = ref({ min: 0, max: 1000 })
53
+ import { BaseSlider } from "@empathyco/x-components";
54
+ import { ref } from "vue";
55
+ const selectedRange = ref({ min: 0, max: 1000 });
56
56
  </script>
57
57
  ```
58
58
 
@@ -64,10 +64,10 @@ const selectedRange = ref({ min: 0, max: 1000 })
64
64
  </template>
65
65
 
66
66
  <script setup>
67
- import { BaseSlider } from '@empathyco/x-components'
68
- import { ref } from 'vue'
69
- const threshold = { min: 0, max: 1000 }
70
- const selectedRange = ref({ ...threshold })
67
+ import { BaseSlider } from "@empathyco/x-components";
68
+ import { ref } from "vue";
69
+ const threshold = { min: 0, max: 1000 };
70
+ const selectedRange = ref({ ...threshold });
71
71
  </script>
72
72
  ```
73
73
 
@@ -79,7 +79,11 @@ It is possible to override the default slot to customize the layout for the sele
79
79
 
80
80
  ```vue live
81
81
  <template>
82
- <BaseSlider v-model="selectedRange" :threshold="threshold" v-slot="{ rangeSelected }">
82
+ <BaseSlider
83
+ v-model="selectedRange"
84
+ :threshold="threshold"
85
+ v-slot="{ rangeSelected }"
86
+ >
83
87
  <p class="x-base-slider__selected-min">
84
88
  <span>min value</span>
85
89
  <span>
@@ -96,10 +100,10 @@ It is possible to override the default slot to customize the layout for the sele
96
100
  </template>
97
101
 
98
102
  <script setup>
99
- import { BaseSlider } from '@empathyco/x-components'
100
- import { ref } from 'vue'
101
- const threshold = { min: 0, max: 1000 }
102
- const selectedRange = ref({ ...threshold })
103
+ import { BaseSlider } from "@empathyco/x-components";
104
+ import { ref } from "vue";
105
+ const threshold = { min: 0, max: 1000 };
106
+ const selectedRange = ref({ ...threshold });
103
107
  </script>
104
108
  ```
105
109
 
@@ -131,9 +135,9 @@ manually.
131
135
  </template>
132
136
 
133
137
  <script setup>
134
- import { BaseSlider } from '@empathyco/x-components'
135
- import { ref } from 'vue'
136
- const threshold = { min: 0, max: 1000 }
137
- const selectedRange = ref({ ...threshold })
138
+ import { BaseSlider } from "@empathyco/x-components";
139
+ import { ref } from "vue";
140
+ const threshold = { min: 0, max: 1000 };
141
+ const selectedRange = ref({ ...threshold });
138
142
  </script>
139
143
  ```
@@ -38,9 +38,9 @@ _Try clicking it to see how it changes its state_
38
38
  </template>
39
39
 
40
40
  <script setup>
41
- import { BaseSwitch } from '@empathyco/x-components'
42
- import { ref } from 'vue'
43
- const value = ref(false)
41
+ import { BaseSwitch } from "@empathyco/x-components";
42
+ import { ref } from "vue";
43
+ const value = ref(false);
44
44
  </script>
45
45
  ```
46
46
 
@@ -53,8 +53,8 @@ change:
53
53
  </template>
54
54
 
55
55
  <script setup>
56
- import { BaseSwitch } from '@empathyco/x-components'
57
- import { ref } from 'vue'
58
- const value = ref(false)
56
+ import { BaseSwitch } from "@empathyco/x-components";
57
+ import { ref } from "vue";
58
+ const value = ref(false);
59
59
  </script>
60
60
  ```