react-instantsearch 6.40.4 → 7.0.1
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/README.md +113 -2
- package/dist/cjs/index.js +27 -0
- package/dist/cjs/package.json +1 -0
- package/dist/cjs/types/PartialKeys.js +1 -0
- package/dist/cjs/types/Translatable.js +1 -0
- package/dist/cjs/types/index.js +27 -0
- package/dist/cjs/ui/Breadcrumb.js +59 -0
- package/dist/cjs/ui/ClearRefinements.js +30 -0
- package/dist/cjs/ui/CurrentRefinements.js +53 -0
- package/dist/cjs/ui/HierarchicalMenu.js +82 -0
- package/dist/cjs/ui/Highlight.js +27 -0
- package/dist/cjs/ui/Hits.js +49 -0
- package/dist/cjs/ui/HitsPerPage.js +36 -0
- package/dist/cjs/ui/InfiniteHits.js +62 -0
- package/dist/cjs/ui/InternalHighlight.js +56 -0
- package/dist/cjs/ui/Menu.js +54 -0
- package/dist/cjs/ui/Pagination.js +127 -0
- package/dist/cjs/ui/PoweredBy.js +39 -0
- package/dist/cjs/ui/RangeInput.js +124 -0
- package/dist/cjs/ui/RefinementList.js +69 -0
- package/dist/cjs/ui/SearchBox.js +153 -0
- package/dist/cjs/ui/ShowMoreButton.js +19 -0
- package/dist/cjs/ui/Snippet.js +27 -0
- package/dist/cjs/ui/SortBy.js +37 -0
- package/dist/cjs/ui/Stats.js +34 -0
- package/dist/cjs/ui/ToggleRefinement.js +35 -0
- package/dist/cjs/ui/lib/cx.js +12 -0
- package/dist/cjs/ui/lib/isModifierClick.js +10 -0
- package/dist/cjs/widgets/Breadcrumb.js +49 -0
- package/dist/cjs/widgets/ClearRefinements.js +44 -0
- package/dist/cjs/widgets/CurrentRefinements.js +36 -0
- package/dist/cjs/widgets/HierarchicalMenu.js +70 -0
- package/dist/cjs/widgets/Highlight.js +33 -0
- package/dist/cjs/widgets/Hits.js +32 -0
- package/dist/cjs/widgets/HitsPerPage.js +40 -0
- package/dist/cjs/widgets/InfiniteHits.js +57 -0
- package/dist/cjs/widgets/Menu.js +64 -0
- package/dist/cjs/widgets/Pagination.js +76 -0
- package/dist/cjs/widgets/PoweredBy.js +19 -0
- package/dist/cjs/widgets/RangeInput.js +53 -0
- package/dist/cjs/widgets/RefinementList.js +124 -0
- package/dist/cjs/widgets/SearchBox.js +91 -0
- package/dist/cjs/widgets/Snippet.js +33 -0
- package/dist/cjs/widgets/SortBy.js +34 -0
- package/dist/cjs/widgets/Stats.js +43 -0
- package/dist/cjs/widgets/ToggleRefinement.js +40 -0
- package/dist/cjs/widgets/index.js +203 -0
- package/dist/es/index.d.ts +2 -0
- package/dist/es/index.js +2 -1
- package/dist/es/types/PartialKeys.d.ts +4 -0
- package/dist/es/types/PartialKeys.js +1 -0
- package/dist/es/types/Translatable.d.ts +5 -0
- package/dist/es/types/Translatable.js +1 -0
- package/dist/es/types/index.d.ts +2 -0
- package/dist/es/types/index.js +2 -0
- package/dist/es/ui/Breadcrumb.d.ts +48 -0
- package/dist/es/ui/Breadcrumb.js +52 -0
- package/dist/es/ui/ClearRefinements.d.ts +26 -0
- package/dist/es/ui/ClearRefinements.js +23 -0
- package/dist/es/ui/CurrentRefinements.d.ts +47 -0
- package/dist/es/ui/CurrentRefinements.js +46 -0
- package/dist/es/ui/HierarchicalMenu.d.ts +73 -0
- package/dist/es/ui/HierarchicalMenu.js +75 -0
- package/dist/es/ui/Highlight.d.ts +6 -0
- package/dist/es/ui/Highlight.js +20 -0
- package/dist/es/ui/Hits.d.ts +31 -0
- package/dist/es/ui/Hits.js +42 -0
- package/dist/es/ui/HitsPerPage.d.ts +23 -0
- package/dist/es/ui/HitsPerPage.js +29 -0
- package/dist/es/ui/InfiniteHits.d.ts +56 -0
- package/dist/es/ui/InfiniteHits.js +55 -0
- package/dist/es/ui/InternalHighlight.d.ts +32 -0
- package/dist/es/ui/InternalHighlight.js +47 -0
- package/dist/es/ui/Menu.d.ts +59 -0
- package/dist/es/ui/Menu.js +47 -0
- package/dist/es/ui/Pagination.d.ts +121 -0
- package/dist/es/ui/Pagination.js +120 -0
- package/dist/es/ui/PoweredBy.d.ts +29 -0
- package/dist/es/ui/PoweredBy.js +32 -0
- package/dist/es/ui/RangeInput.d.ts +60 -0
- package/dist/es/ui/RangeInput.js +115 -0
- package/dist/es/ui/RefinementList.d.ts +73 -0
- package/dist/es/ui/RefinementList.js +62 -0
- package/dist/es/ui/SearchBox.d.ts +64 -0
- package/dist/es/ui/SearchBox.js +146 -0
- package/dist/es/ui/ShowMoreButton.d.ts +19 -0
- package/dist/es/ui/ShowMoreButton.js +12 -0
- package/dist/es/ui/Snippet.d.ts +6 -0
- package/dist/es/ui/Snippet.js +20 -0
- package/dist/es/ui/SortBy.d.ts +21 -0
- package/dist/es/ui/SortBy.js +30 -0
- package/dist/es/ui/Stats.d.ts +20 -0
- package/dist/es/ui/Stats.js +27 -0
- package/dist/es/ui/ToggleRefinement.d.ts +25 -0
- package/dist/es/ui/ToggleRefinement.js +28 -0
- package/dist/es/ui/lib/cx.d.ts +1 -0
- package/dist/es/ui/lib/cx.js +6 -0
- package/dist/es/ui/lib/isModifierClick.d.ts +2 -0
- package/dist/es/ui/lib/isModifierClick.js +4 -0
- package/dist/es/widgets/Breadcrumb.d.ts +8 -0
- package/dist/es/widgets/Breadcrumb.js +42 -0
- package/dist/es/widgets/ClearRefinements.d.ts +8 -0
- package/dist/es/widgets/ClearRefinements.js +37 -0
- package/dist/es/widgets/CurrentRefinements.d.ts +6 -0
- package/dist/es/widgets/CurrentRefinements.js +29 -0
- package/dist/es/widgets/HierarchicalMenu.d.ts +8 -0
- package/dist/es/widgets/HierarchicalMenu.js +63 -0
- package/dist/es/widgets/Highlight.d.ts +8 -0
- package/dist/es/widgets/Highlight.js +26 -0
- package/dist/es/widgets/Hits.d.ts +7 -0
- package/dist/es/widgets/Hits.js +25 -0
- package/dist/es/widgets/HitsPerPage.d.ts +6 -0
- package/dist/es/widgets/HitsPerPage.js +33 -0
- package/dist/es/widgets/InfiniteHits.d.ts +15 -0
- package/dist/es/widgets/InfiniteHits.js +50 -0
- package/dist/es/widgets/Menu.d.ts +8 -0
- package/dist/es/widgets/Menu.js +57 -0
- package/dist/es/widgets/Pagination.d.ts +8 -0
- package/dist/es/widgets/Pagination.js +69 -0
- package/dist/es/widgets/PoweredBy.d.ts +5 -0
- package/dist/es/widgets/PoweredBy.js +12 -0
- package/dist/es/widgets/RangeInput.d.ts +8 -0
- package/dist/es/widgets/RangeInput.js +46 -0
- package/dist/es/widgets/RefinementList.d.ts +15 -0
- package/dist/es/widgets/RefinementList.js +116 -0
- package/dist/es/widgets/SearchBox.d.ts +13 -0
- package/dist/es/widgets/SearchBox.js +83 -0
- package/dist/es/widgets/Snippet.d.ts +8 -0
- package/dist/es/widgets/Snippet.js +26 -0
- package/dist/es/widgets/SortBy.d.ts +6 -0
- package/dist/es/widgets/SortBy.js +27 -0
- package/dist/es/widgets/Stats.d.ts +8 -0
- package/dist/es/widgets/Stats.js +36 -0
- package/dist/es/widgets/ToggleRefinement.d.ts +7 -0
- package/dist/es/widgets/ToggleRefinement.js +33 -0
- package/dist/es/widgets/index.d.ts +18 -0
- package/dist/es/widgets/index.js +18 -0
- package/dist/umd/ReactInstantSearch.js +19990 -0
- package/dist/umd/ReactInstantSearch.js.map +1 -0
- package/dist/umd/ReactInstantSearch.min.js +3 -0
- package/dist/umd/ReactInstantSearch.min.js.map +1 -0
- package/package.json +28 -24
- package/connectors.js +0 -29
- package/dist/README.md +0 -101
- package/dist/connectors.js +0 -168
- package/dist/dom.js +0 -198
- package/dist/es/connectors.js +0 -26
- package/dist/es/dom.js +0 -31
- package/dist/es/native.js +0 -5
- package/dist/es/server.js +0 -1
- package/dist/index.js +0 -12
- package/dist/native.js +0 -42
- package/dist/package.json +0 -56
- package/dist/server.js +0 -12
- package/dist/umd/Connectors.js +0 -11215
- package/dist/umd/Connectors.js.map +0 -1
- package/dist/umd/Connectors.min.js +0 -3
- package/dist/umd/Connectors.min.js.map +0 -1
- package/dist/umd/Core.js +0 -650
- package/dist/umd/Core.js.map +0 -1
- package/dist/umd/Core.min.js +0 -3
- package/dist/umd/Core.min.js.map +0 -1
- package/dist/umd/Dom.js +0 -18935
- package/dist/umd/Dom.js.map +0 -1
- package/dist/umd/Dom.min.js +0 -3
- package/dist/umd/Dom.min.js.map +0 -1
- package/dom.js +0 -34
- package/index.js +0 -1
- package/native.js +0 -8
- package/server.js +0 -1
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _Breadcrumb = require("./Breadcrumb");
|
|
7
|
+
Object.keys(_Breadcrumb).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _Breadcrumb[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function get() {
|
|
13
|
+
return _Breadcrumb[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
var _ClearRefinements = require("./ClearRefinements");
|
|
18
|
+
Object.keys(_ClearRefinements).forEach(function (key) {
|
|
19
|
+
if (key === "default" || key === "__esModule") return;
|
|
20
|
+
if (key in exports && exports[key] === _ClearRefinements[key]) return;
|
|
21
|
+
Object.defineProperty(exports, key, {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: function get() {
|
|
24
|
+
return _ClearRefinements[key];
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
var _CurrentRefinements = require("./CurrentRefinements");
|
|
29
|
+
Object.keys(_CurrentRefinements).forEach(function (key) {
|
|
30
|
+
if (key === "default" || key === "__esModule") return;
|
|
31
|
+
if (key in exports && exports[key] === _CurrentRefinements[key]) return;
|
|
32
|
+
Object.defineProperty(exports, key, {
|
|
33
|
+
enumerable: true,
|
|
34
|
+
get: function get() {
|
|
35
|
+
return _CurrentRefinements[key];
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
var _HierarchicalMenu = require("./HierarchicalMenu");
|
|
40
|
+
Object.keys(_HierarchicalMenu).forEach(function (key) {
|
|
41
|
+
if (key === "default" || key === "__esModule") return;
|
|
42
|
+
if (key in exports && exports[key] === _HierarchicalMenu[key]) return;
|
|
43
|
+
Object.defineProperty(exports, key, {
|
|
44
|
+
enumerable: true,
|
|
45
|
+
get: function get() {
|
|
46
|
+
return _HierarchicalMenu[key];
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
var _Highlight = require("./Highlight");
|
|
51
|
+
Object.keys(_Highlight).forEach(function (key) {
|
|
52
|
+
if (key === "default" || key === "__esModule") return;
|
|
53
|
+
if (key in exports && exports[key] === _Highlight[key]) return;
|
|
54
|
+
Object.defineProperty(exports, key, {
|
|
55
|
+
enumerable: true,
|
|
56
|
+
get: function get() {
|
|
57
|
+
return _Highlight[key];
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
});
|
|
61
|
+
var _Hits = require("./Hits");
|
|
62
|
+
Object.keys(_Hits).forEach(function (key) {
|
|
63
|
+
if (key === "default" || key === "__esModule") return;
|
|
64
|
+
if (key in exports && exports[key] === _Hits[key]) return;
|
|
65
|
+
Object.defineProperty(exports, key, {
|
|
66
|
+
enumerable: true,
|
|
67
|
+
get: function get() {
|
|
68
|
+
return _Hits[key];
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
});
|
|
72
|
+
var _HitsPerPage = require("./HitsPerPage");
|
|
73
|
+
Object.keys(_HitsPerPage).forEach(function (key) {
|
|
74
|
+
if (key === "default" || key === "__esModule") return;
|
|
75
|
+
if (key in exports && exports[key] === _HitsPerPage[key]) return;
|
|
76
|
+
Object.defineProperty(exports, key, {
|
|
77
|
+
enumerable: true,
|
|
78
|
+
get: function get() {
|
|
79
|
+
return _HitsPerPage[key];
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
});
|
|
83
|
+
var _InfiniteHits = require("./InfiniteHits");
|
|
84
|
+
Object.keys(_InfiniteHits).forEach(function (key) {
|
|
85
|
+
if (key === "default" || key === "__esModule") return;
|
|
86
|
+
if (key in exports && exports[key] === _InfiniteHits[key]) return;
|
|
87
|
+
Object.defineProperty(exports, key, {
|
|
88
|
+
enumerable: true,
|
|
89
|
+
get: function get() {
|
|
90
|
+
return _InfiniteHits[key];
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
});
|
|
94
|
+
var _Menu = require("./Menu");
|
|
95
|
+
Object.keys(_Menu).forEach(function (key) {
|
|
96
|
+
if (key === "default" || key === "__esModule") return;
|
|
97
|
+
if (key in exports && exports[key] === _Menu[key]) return;
|
|
98
|
+
Object.defineProperty(exports, key, {
|
|
99
|
+
enumerable: true,
|
|
100
|
+
get: function get() {
|
|
101
|
+
return _Menu[key];
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
});
|
|
105
|
+
var _Pagination = require("./Pagination");
|
|
106
|
+
Object.keys(_Pagination).forEach(function (key) {
|
|
107
|
+
if (key === "default" || key === "__esModule") return;
|
|
108
|
+
if (key in exports && exports[key] === _Pagination[key]) return;
|
|
109
|
+
Object.defineProperty(exports, key, {
|
|
110
|
+
enumerable: true,
|
|
111
|
+
get: function get() {
|
|
112
|
+
return _Pagination[key];
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
});
|
|
116
|
+
var _PoweredBy = require("./PoweredBy");
|
|
117
|
+
Object.keys(_PoweredBy).forEach(function (key) {
|
|
118
|
+
if (key === "default" || key === "__esModule") return;
|
|
119
|
+
if (key in exports && exports[key] === _PoweredBy[key]) return;
|
|
120
|
+
Object.defineProperty(exports, key, {
|
|
121
|
+
enumerable: true,
|
|
122
|
+
get: function get() {
|
|
123
|
+
return _PoweredBy[key];
|
|
124
|
+
}
|
|
125
|
+
});
|
|
126
|
+
});
|
|
127
|
+
var _RangeInput = require("./RangeInput");
|
|
128
|
+
Object.keys(_RangeInput).forEach(function (key) {
|
|
129
|
+
if (key === "default" || key === "__esModule") return;
|
|
130
|
+
if (key in exports && exports[key] === _RangeInput[key]) return;
|
|
131
|
+
Object.defineProperty(exports, key, {
|
|
132
|
+
enumerable: true,
|
|
133
|
+
get: function get() {
|
|
134
|
+
return _RangeInput[key];
|
|
135
|
+
}
|
|
136
|
+
});
|
|
137
|
+
});
|
|
138
|
+
var _RefinementList = require("./RefinementList");
|
|
139
|
+
Object.keys(_RefinementList).forEach(function (key) {
|
|
140
|
+
if (key === "default" || key === "__esModule") return;
|
|
141
|
+
if (key in exports && exports[key] === _RefinementList[key]) return;
|
|
142
|
+
Object.defineProperty(exports, key, {
|
|
143
|
+
enumerable: true,
|
|
144
|
+
get: function get() {
|
|
145
|
+
return _RefinementList[key];
|
|
146
|
+
}
|
|
147
|
+
});
|
|
148
|
+
});
|
|
149
|
+
var _SearchBox = require("./SearchBox");
|
|
150
|
+
Object.keys(_SearchBox).forEach(function (key) {
|
|
151
|
+
if (key === "default" || key === "__esModule") return;
|
|
152
|
+
if (key in exports && exports[key] === _SearchBox[key]) return;
|
|
153
|
+
Object.defineProperty(exports, key, {
|
|
154
|
+
enumerable: true,
|
|
155
|
+
get: function get() {
|
|
156
|
+
return _SearchBox[key];
|
|
157
|
+
}
|
|
158
|
+
});
|
|
159
|
+
});
|
|
160
|
+
var _Snippet = require("./Snippet");
|
|
161
|
+
Object.keys(_Snippet).forEach(function (key) {
|
|
162
|
+
if (key === "default" || key === "__esModule") return;
|
|
163
|
+
if (key in exports && exports[key] === _Snippet[key]) return;
|
|
164
|
+
Object.defineProperty(exports, key, {
|
|
165
|
+
enumerable: true,
|
|
166
|
+
get: function get() {
|
|
167
|
+
return _Snippet[key];
|
|
168
|
+
}
|
|
169
|
+
});
|
|
170
|
+
});
|
|
171
|
+
var _SortBy = require("./SortBy");
|
|
172
|
+
Object.keys(_SortBy).forEach(function (key) {
|
|
173
|
+
if (key === "default" || key === "__esModule") return;
|
|
174
|
+
if (key in exports && exports[key] === _SortBy[key]) return;
|
|
175
|
+
Object.defineProperty(exports, key, {
|
|
176
|
+
enumerable: true,
|
|
177
|
+
get: function get() {
|
|
178
|
+
return _SortBy[key];
|
|
179
|
+
}
|
|
180
|
+
});
|
|
181
|
+
});
|
|
182
|
+
var _Stats = require("./Stats");
|
|
183
|
+
Object.keys(_Stats).forEach(function (key) {
|
|
184
|
+
if (key === "default" || key === "__esModule") return;
|
|
185
|
+
if (key in exports && exports[key] === _Stats[key]) return;
|
|
186
|
+
Object.defineProperty(exports, key, {
|
|
187
|
+
enumerable: true,
|
|
188
|
+
get: function get() {
|
|
189
|
+
return _Stats[key];
|
|
190
|
+
}
|
|
191
|
+
});
|
|
192
|
+
});
|
|
193
|
+
var _ToggleRefinement = require("./ToggleRefinement");
|
|
194
|
+
Object.keys(_ToggleRefinement).forEach(function (key) {
|
|
195
|
+
if (key === "default" || key === "__esModule") return;
|
|
196
|
+
if (key in exports && exports[key] === _ToggleRefinement[key]) return;
|
|
197
|
+
Object.defineProperty(exports, key, {
|
|
198
|
+
enumerable: true,
|
|
199
|
+
get: function get() {
|
|
200
|
+
return _ToggleRefinement[key];
|
|
201
|
+
}
|
|
202
|
+
});
|
|
203
|
+
});
|
package/dist/es/index.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export
|
|
1
|
+
export * from 'react-instantsearch-core';
|
|
2
|
+
export * from "./widgets/index.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { useBreadcrumb } from 'react-instantsearch-core';
|
|
3
|
+
export type BreadcrumbTranslations = {
|
|
4
|
+
/**
|
|
5
|
+
* The label of the root element
|
|
6
|
+
*/
|
|
7
|
+
rootElementText: string;
|
|
8
|
+
};
|
|
9
|
+
export type BreadcrumbClassNames = {
|
|
10
|
+
/**
|
|
11
|
+
* Class names to apply to the root element
|
|
12
|
+
*/
|
|
13
|
+
root: string;
|
|
14
|
+
/**
|
|
15
|
+
* Class names to apply to the root element when there are no refinements possible
|
|
16
|
+
*/
|
|
17
|
+
noRefinementRoot: string;
|
|
18
|
+
/**
|
|
19
|
+
* Class names to apply to the list element
|
|
20
|
+
*/
|
|
21
|
+
list: string;
|
|
22
|
+
/**
|
|
23
|
+
* Class names to apply to each item element
|
|
24
|
+
*/
|
|
25
|
+
item: string;
|
|
26
|
+
/**
|
|
27
|
+
* Class names to apply to the selected item
|
|
28
|
+
*/
|
|
29
|
+
selectedItem: string;
|
|
30
|
+
/**
|
|
31
|
+
* Class names to apply to the separator between items
|
|
32
|
+
*/
|
|
33
|
+
separator: string;
|
|
34
|
+
/**
|
|
35
|
+
* Class names to apply to each link element
|
|
36
|
+
*/
|
|
37
|
+
link: string;
|
|
38
|
+
};
|
|
39
|
+
type UseBreadcrumbRenderState = ReturnType<typeof useBreadcrumb>;
|
|
40
|
+
export type BreadcrumbProps = React.ComponentProps<'div'> & Pick<UseBreadcrumbRenderState, 'items' | 'createURL'> & {
|
|
41
|
+
classNames?: Partial<BreadcrumbClassNames>;
|
|
42
|
+
hasItems: boolean;
|
|
43
|
+
onNavigate: UseBreadcrumbRenderState['refine'];
|
|
44
|
+
separator?: string;
|
|
45
|
+
translations: BreadcrumbTranslations;
|
|
46
|
+
};
|
|
47
|
+
export declare function Breadcrumb({ classNames, items, hasItems, createURL, onNavigate, separator, translations, ...props }: BreadcrumbProps): JSX.Element;
|
|
48
|
+
export {};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
var _excluded = ["classNames", "items", "hasItems", "createURL", "onNavigate", "separator", "translations"];
|
|
2
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
3
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
4
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
5
|
+
import React from 'react';
|
|
6
|
+
import { cx } from "./lib/cx.js";
|
|
7
|
+
import { isModifierClick } from "./lib/isModifierClick.js";
|
|
8
|
+
export function Breadcrumb(_ref) {
|
|
9
|
+
var _ref$classNames = _ref.classNames,
|
|
10
|
+
classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
|
|
11
|
+
_ref$items = _ref.items,
|
|
12
|
+
items = _ref$items === void 0 ? [] : _ref$items,
|
|
13
|
+
hasItems = _ref.hasItems,
|
|
14
|
+
createURL = _ref.createURL,
|
|
15
|
+
onNavigate = _ref.onNavigate,
|
|
16
|
+
_ref$separator = _ref.separator,
|
|
17
|
+
separator = _ref$separator === void 0 ? '>' : _ref$separator,
|
|
18
|
+
translations = _ref.translations,
|
|
19
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
20
|
+
var handleClick = function handleClick(value) {
|
|
21
|
+
return function (event) {
|
|
22
|
+
if (!isModifierClick(event)) {
|
|
23
|
+
event.preventDefault();
|
|
24
|
+
onNavigate(value);
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
return /*#__PURE__*/React.createElement("div", _extends({}, props, {
|
|
29
|
+
className: cx('ais-Breadcrumb', classNames.root, !hasItems && cx('ais-Breadcrumb--noRefinement', classNames.noRefinementRoot), props.className)
|
|
30
|
+
}), /*#__PURE__*/React.createElement("ul", {
|
|
31
|
+
className: cx('ais-Breadcrumb-list', classNames.list)
|
|
32
|
+
}, /*#__PURE__*/React.createElement("li", {
|
|
33
|
+
className: cx('ais-Breadcrumb-item', classNames.item, !hasItems && cx('ais-Breadcrumb-item--selected', classNames.selectedItem))
|
|
34
|
+
}, /*#__PURE__*/React.createElement("a", {
|
|
35
|
+
href: createURL(null),
|
|
36
|
+
onClick: handleClick(null),
|
|
37
|
+
className: cx('ais-Breadcrumb-link', classNames.link)
|
|
38
|
+
}, translations.rootElementText)), items.map(function (item, index) {
|
|
39
|
+
var isLast = index === items.length - 1;
|
|
40
|
+
return /*#__PURE__*/React.createElement("li", {
|
|
41
|
+
key: index,
|
|
42
|
+
className: cx('ais-Breadcrumb-item', classNames.item, isLast && cx('ais-Breadcrumb-item--selected', classNames.selectedItem))
|
|
43
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
44
|
+
"aria-hidden": "true",
|
|
45
|
+
className: cx('ais-Breadcrumb-separator', classNames.separator)
|
|
46
|
+
}, separator), isLast ? item.label : /*#__PURE__*/React.createElement("a", {
|
|
47
|
+
className: cx('ais-Breadcrumb-link', classNames.link),
|
|
48
|
+
href: createURL(item.value),
|
|
49
|
+
onClick: handleClick(item.value)
|
|
50
|
+
}, item.label));
|
|
51
|
+
})));
|
|
52
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export type ClearRefinementsTranslations = {
|
|
3
|
+
/**
|
|
4
|
+
* The label of the button
|
|
5
|
+
*/
|
|
6
|
+
resetButtonText: string;
|
|
7
|
+
};
|
|
8
|
+
export type ClearRefinementsProps = React.ComponentProps<'div'> & Pick<React.ComponentProps<'button'>, 'disabled' | 'onClick'> & {
|
|
9
|
+
translations: ClearRefinementsTranslations;
|
|
10
|
+
classNames?: Partial<ClearRefinementsClassNames>;
|
|
11
|
+
};
|
|
12
|
+
export type ClearRefinementsClassNames = {
|
|
13
|
+
/**
|
|
14
|
+
* Class names to apply to the root element
|
|
15
|
+
*/
|
|
16
|
+
root: string;
|
|
17
|
+
/**
|
|
18
|
+
* Class names to apply to the button
|
|
19
|
+
*/
|
|
20
|
+
button: string;
|
|
21
|
+
/**
|
|
22
|
+
* Class names to apply to the button when it's disabled
|
|
23
|
+
*/
|
|
24
|
+
disabledButton: string;
|
|
25
|
+
};
|
|
26
|
+
export declare function ClearRefinements({ classNames, disabled, onClick, translations, ...props }: ClearRefinementsProps): JSX.Element;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
var _excluded = ["classNames", "disabled", "onClick", "translations"];
|
|
2
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
3
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
4
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
5
|
+
import React from 'react';
|
|
6
|
+
import { cx } from "./lib/cx.js";
|
|
7
|
+
export function ClearRefinements(_ref) {
|
|
8
|
+
var _ref$classNames = _ref.classNames,
|
|
9
|
+
classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
|
|
10
|
+
_ref$disabled = _ref.disabled,
|
|
11
|
+
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
12
|
+
_ref$onClick = _ref.onClick,
|
|
13
|
+
onClick = _ref$onClick === void 0 ? function () {} : _ref$onClick,
|
|
14
|
+
translations = _ref.translations,
|
|
15
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
16
|
+
return /*#__PURE__*/React.createElement("div", _extends({}, props, {
|
|
17
|
+
className: cx('ais-ClearRefinements', classNames.root, props.className)
|
|
18
|
+
}), /*#__PURE__*/React.createElement("button", {
|
|
19
|
+
disabled: disabled,
|
|
20
|
+
onClick: onClick,
|
|
21
|
+
className: cx('ais-ClearRefinements-button', classNames.button, disabled && cx('ais-ClearRefinements-button--disabled', classNames.disabledButton))
|
|
22
|
+
}, translations.resetButtonText));
|
|
23
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { CurrentRefinementsConnectorParamsItem, CurrentRefinementsConnectorParamsRefinement } from 'instantsearch.js/es/connectors/current-refinements/connectCurrentRefinements';
|
|
3
|
+
export type CurrentRefinementsProps = React.ComponentProps<'div'> & {
|
|
4
|
+
classNames?: Partial<CurrentRefinementsClassNames>;
|
|
5
|
+
items?: Array<Pick<CurrentRefinementsConnectorParamsItem, 'label' | 'refinements'> & Record<string, unknown>>;
|
|
6
|
+
onRemove?: (refinement: CurrentRefinementsConnectorParamsRefinement) => void;
|
|
7
|
+
hasRefinements?: boolean;
|
|
8
|
+
};
|
|
9
|
+
export type CurrentRefinementsClassNames = {
|
|
10
|
+
/**
|
|
11
|
+
* Class names to apply to the root element
|
|
12
|
+
*/
|
|
13
|
+
root: string;
|
|
14
|
+
/**
|
|
15
|
+
* Class names to apply to the root element when there are no refinements possible
|
|
16
|
+
*/
|
|
17
|
+
noRefinementRoot: string;
|
|
18
|
+
/**
|
|
19
|
+
* Class names to apply to the list element
|
|
20
|
+
*/
|
|
21
|
+
list: string;
|
|
22
|
+
/**
|
|
23
|
+
* Class names to apply to the list element when there are no refinements possible
|
|
24
|
+
*/
|
|
25
|
+
noRefinementList: string;
|
|
26
|
+
/**
|
|
27
|
+
* Class names to apply to each refinement
|
|
28
|
+
*/
|
|
29
|
+
item: string;
|
|
30
|
+
/**
|
|
31
|
+
* Class names to apply to the label of each refinement
|
|
32
|
+
*/
|
|
33
|
+
label: string;
|
|
34
|
+
/**
|
|
35
|
+
* Class names to apply to the container of each refinement's value
|
|
36
|
+
*/
|
|
37
|
+
category: string;
|
|
38
|
+
/**
|
|
39
|
+
* Class names to apply to the text element of each refinement's value
|
|
40
|
+
*/
|
|
41
|
+
categoryLabel: string;
|
|
42
|
+
/**
|
|
43
|
+
* Class names to apply to the each refinement's delete button
|
|
44
|
+
*/
|
|
45
|
+
delete: string;
|
|
46
|
+
};
|
|
47
|
+
export declare function CurrentRefinements({ classNames, items, onRemove, hasRefinements, ...props }: CurrentRefinementsProps): JSX.Element;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
var _excluded = ["classNames", "items", "onRemove", "hasRefinements"];
|
|
2
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
3
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
4
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
5
|
+
import React from 'react';
|
|
6
|
+
import { cx } from "./lib/cx.js";
|
|
7
|
+
import { isModifierClick } from "./lib/isModifierClick.js";
|
|
8
|
+
export function CurrentRefinements(_ref) {
|
|
9
|
+
var _ref$classNames = _ref.classNames,
|
|
10
|
+
classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
|
|
11
|
+
_ref$items = _ref.items,
|
|
12
|
+
items = _ref$items === void 0 ? [] : _ref$items,
|
|
13
|
+
_ref$onRemove = _ref.onRemove,
|
|
14
|
+
onRemove = _ref$onRemove === void 0 ? function () {} : _ref$onRemove,
|
|
15
|
+
_ref$hasRefinements = _ref.hasRefinements,
|
|
16
|
+
hasRefinements = _ref$hasRefinements === void 0 ? false : _ref$hasRefinements,
|
|
17
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
18
|
+
return /*#__PURE__*/React.createElement("div", _extends({}, props, {
|
|
19
|
+
className: cx('ais-CurrentRefinements', classNames.root, !hasRefinements && cx('ais-CurrentRefinements--noRefinement', classNames.noRefinementRoot), props.className)
|
|
20
|
+
}), /*#__PURE__*/React.createElement("ul", {
|
|
21
|
+
className: cx('ais-CurrentRefinements-list', classNames.list, !hasRefinements && cx('ais-CurrentRefinements-list--noRefinement', classNames.noRefinementList))
|
|
22
|
+
}, items.map(function (item) {
|
|
23
|
+
return /*#__PURE__*/React.createElement("li", {
|
|
24
|
+
key: [item.indexName, item.label].join('/'),
|
|
25
|
+
className: cx('ais-CurrentRefinements-item', classNames.item)
|
|
26
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
27
|
+
className: cx('ais-CurrentRefinements-label', classNames.label)
|
|
28
|
+
}, item.label, ":"), item.refinements.map(function (refinement) {
|
|
29
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
30
|
+
key: refinement.label,
|
|
31
|
+
className: cx('ais-CurrentRefinements-category', classNames.category)
|
|
32
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
33
|
+
className: cx('ais-CurrentRefinements-categoryLabel', classNames.categoryLabel)
|
|
34
|
+
}, refinement.label), /*#__PURE__*/React.createElement("button", {
|
|
35
|
+
type: "button",
|
|
36
|
+
onClick: function onClick(event) {
|
|
37
|
+
if (isModifierClick(event)) {
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
onRemove(refinement);
|
|
41
|
+
},
|
|
42
|
+
className: cx('ais-CurrentRefinements-delete', classNames.delete)
|
|
43
|
+
}, "\u2715"));
|
|
44
|
+
}));
|
|
45
|
+
})));
|
|
46
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ShowMoreButtonTranslations } from './ShowMoreButton';
|
|
3
|
+
import type { useHierarchicalMenu } from 'react-instantsearch-core';
|
|
4
|
+
type HierarchicalMenuClassNames = {
|
|
5
|
+
/**
|
|
6
|
+
* Class names to apply to the root element
|
|
7
|
+
*/
|
|
8
|
+
root: string;
|
|
9
|
+
/**
|
|
10
|
+
* Class names to apply to the root element when there are no refinements possible
|
|
11
|
+
*/
|
|
12
|
+
noRefinementRoot: string;
|
|
13
|
+
/**
|
|
14
|
+
* Class names to apply to the list element
|
|
15
|
+
*/
|
|
16
|
+
list: string;
|
|
17
|
+
/**
|
|
18
|
+
* Class names to apply to each child list element
|
|
19
|
+
*/
|
|
20
|
+
childList: string;
|
|
21
|
+
/**
|
|
22
|
+
* Class names to apply to each item element
|
|
23
|
+
*/
|
|
24
|
+
item: string;
|
|
25
|
+
/**
|
|
26
|
+
* Class names to apply to the selected item
|
|
27
|
+
*/
|
|
28
|
+
selectedItem: string;
|
|
29
|
+
/**
|
|
30
|
+
* Class names to apply to the parent item of the list
|
|
31
|
+
*/
|
|
32
|
+
parentItem: string;
|
|
33
|
+
/**
|
|
34
|
+
* Class names to apply to each link element
|
|
35
|
+
*/
|
|
36
|
+
link: string;
|
|
37
|
+
/**
|
|
38
|
+
* Class names to apply to the link of each selected item
|
|
39
|
+
*/
|
|
40
|
+
selectedItemLink: string;
|
|
41
|
+
/**
|
|
42
|
+
* Class names to apply to the label of an item element
|
|
43
|
+
*/
|
|
44
|
+
label: string;
|
|
45
|
+
/**
|
|
46
|
+
* Class names to apply to the count of an item element
|
|
47
|
+
*/
|
|
48
|
+
count: string;
|
|
49
|
+
/**
|
|
50
|
+
* Class names to apply to the "Show more" button
|
|
51
|
+
*/
|
|
52
|
+
showMore: string;
|
|
53
|
+
/**
|
|
54
|
+
* Class names to apply to the "Show more" button if it's disabled
|
|
55
|
+
*/
|
|
56
|
+
disabledShowMore: string;
|
|
57
|
+
};
|
|
58
|
+
type HierarchicalListProps = Pick<ReturnType<typeof useHierarchicalMenu>, 'items' | 'createURL'> & {
|
|
59
|
+
className?: string;
|
|
60
|
+
classNames?: Partial<HierarchicalMenuClassNames>;
|
|
61
|
+
onNavigate: (value: string) => void;
|
|
62
|
+
};
|
|
63
|
+
export type HierarchicalMenuProps = React.ComponentProps<'div'> & HierarchicalListProps & {
|
|
64
|
+
hasItems: boolean;
|
|
65
|
+
showMore?: boolean;
|
|
66
|
+
canToggleShowMore: boolean;
|
|
67
|
+
onToggleShowMore: () => void;
|
|
68
|
+
isShowingMore: boolean;
|
|
69
|
+
translations: ShowMoreButtonTranslations;
|
|
70
|
+
};
|
|
71
|
+
export type HierarchicalMenuTranslations = ShowMoreButtonTranslations;
|
|
72
|
+
export declare function HierarchicalMenu({ classNames, items, hasItems, onNavigate, createURL, showMore, canToggleShowMore, onToggleShowMore, isShowingMore, translations, ...props }: HierarchicalMenuProps): JSX.Element;
|
|
73
|
+
export {};
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
var _excluded = ["classNames", "items", "hasItems", "onNavigate", "createURL", "showMore", "canToggleShowMore", "onToggleShowMore", "isShowingMore", "translations"];
|
|
2
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
3
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
4
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
5
|
+
import React from 'react';
|
|
6
|
+
import { cx } from "./lib/cx.js";
|
|
7
|
+
import { isModifierClick } from "./lib/isModifierClick.js";
|
|
8
|
+
import { ShowMoreButton } from "./ShowMoreButton.js";
|
|
9
|
+
function HierarchicalList(_ref) {
|
|
10
|
+
var className = _ref.className,
|
|
11
|
+
_ref$classNames = _ref.classNames,
|
|
12
|
+
classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
|
|
13
|
+
items = _ref.items,
|
|
14
|
+
createURL = _ref.createURL,
|
|
15
|
+
onNavigate = _ref.onNavigate;
|
|
16
|
+
if (items.length === 0) {
|
|
17
|
+
return null;
|
|
18
|
+
}
|
|
19
|
+
return /*#__PURE__*/React.createElement("ul", {
|
|
20
|
+
className: cx('ais-HierarchicalMenu-list', classNames.list, className)
|
|
21
|
+
}, items.map(function (item) {
|
|
22
|
+
return /*#__PURE__*/React.createElement("li", {
|
|
23
|
+
key: item.value,
|
|
24
|
+
className: cx('ais-HierarchicalMenu-item', classNames.item, item.data && item.data.length > 0 && cx('ais-HierarchicalMenu-item--parent', classNames.parentItem), item.isRefined && cx('ais-HierarchicalMenu-item--selected', classNames.selectedItem))
|
|
25
|
+
}, /*#__PURE__*/React.createElement("a", {
|
|
26
|
+
className: cx('ais-HierarchicalMenu-link', classNames.link, item.isRefined && cx('ais-HierarchicalMenu-link--selected', classNames.selectedItemLink)),
|
|
27
|
+
href: createURL(item.value),
|
|
28
|
+
onClick: function onClick(event) {
|
|
29
|
+
if (isModifierClick(event)) {
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
event.preventDefault();
|
|
33
|
+
onNavigate(item.value);
|
|
34
|
+
}
|
|
35
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
36
|
+
className: cx('ais-HierarchicalMenu-label', classNames.label)
|
|
37
|
+
}, item.label), /*#__PURE__*/React.createElement("span", {
|
|
38
|
+
className: cx('ais-HierarchicalMenu-count', classNames.count)
|
|
39
|
+
}, item.count)), item.data && /*#__PURE__*/React.createElement(HierarchicalList, {
|
|
40
|
+
className: cx('ais-HierarchicalMenu-list--child', classNames.childList),
|
|
41
|
+
classNames: classNames,
|
|
42
|
+
items: item.data,
|
|
43
|
+
onNavigate: onNavigate,
|
|
44
|
+
createURL: createURL
|
|
45
|
+
}));
|
|
46
|
+
}));
|
|
47
|
+
}
|
|
48
|
+
export function HierarchicalMenu(_ref2) {
|
|
49
|
+
var _ref2$classNames = _ref2.classNames,
|
|
50
|
+
classNames = _ref2$classNames === void 0 ? {} : _ref2$classNames,
|
|
51
|
+
items = _ref2.items,
|
|
52
|
+
hasItems = _ref2.hasItems,
|
|
53
|
+
onNavigate = _ref2.onNavigate,
|
|
54
|
+
createURL = _ref2.createURL,
|
|
55
|
+
showMore = _ref2.showMore,
|
|
56
|
+
canToggleShowMore = _ref2.canToggleShowMore,
|
|
57
|
+
onToggleShowMore = _ref2.onToggleShowMore,
|
|
58
|
+
isShowingMore = _ref2.isShowingMore,
|
|
59
|
+
translations = _ref2.translations,
|
|
60
|
+
props = _objectWithoutProperties(_ref2, _excluded);
|
|
61
|
+
return /*#__PURE__*/React.createElement("div", _extends({}, props, {
|
|
62
|
+
className: cx('ais-HierarchicalMenu', classNames.root, !hasItems && cx('ais-HierarchicalMenu--noRefinement', classNames.noRefinementRoot), props.className)
|
|
63
|
+
}), /*#__PURE__*/React.createElement(HierarchicalList, {
|
|
64
|
+
classNames: classNames,
|
|
65
|
+
items: items,
|
|
66
|
+
onNavigate: onNavigate,
|
|
67
|
+
createURL: createURL
|
|
68
|
+
}), showMore && /*#__PURE__*/React.createElement(ShowMoreButton, {
|
|
69
|
+
className: cx('ais-HierarchicalMenu-showMore', classNames.showMore, !canToggleShowMore && cx('ais-HierarchicalMenu-showMore--disabled', classNames.disabledShowMore)),
|
|
70
|
+
disabled: !canToggleShowMore,
|
|
71
|
+
onClick: onToggleShowMore,
|
|
72
|
+
isShowingMore: isShowingMore,
|
|
73
|
+
translations: translations
|
|
74
|
+
}));
|
|
75
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { InternalHighlightProps, InternalHighlightClassNames } from './InternalHighlight';
|
|
2
|
+
export type HighlightClassNames = InternalHighlightClassNames;
|
|
3
|
+
export type HighlightProps = Omit<InternalHighlightProps, 'classNames'> & {
|
|
4
|
+
classNames?: Partial<HighlightClassNames>;
|
|
5
|
+
};
|
|
6
|
+
export declare function Highlight({ classNames, ...props }: HighlightProps): JSX.Element;
|