react-instantsearch 7.5.5 → 7.6.0
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/dist/cjs/ui/Breadcrumb.js +8 -8
- package/dist/cjs/ui/ClearRefinements.js +3 -3
- package/dist/cjs/ui/CurrentRefinements.js +9 -8
- package/dist/cjs/ui/HierarchicalMenu.js +9 -9
- package/dist/cjs/ui/Highlight.js +5 -5
- package/dist/cjs/ui/Hits.js +4 -4
- package/dist/cjs/ui/HitsPerPage.js +4 -4
- package/dist/cjs/ui/InfiniteHits.js +6 -6
- package/dist/cjs/ui/InternalHighlight.js +8 -51
- package/dist/cjs/ui/Menu.js +8 -8
- package/dist/cjs/ui/Pagination.js +12 -12
- package/dist/cjs/ui/PoweredBy.js +4 -4
- package/dist/cjs/ui/RangeInput.js +9 -9
- package/dist/cjs/ui/RefinementList.js +11 -11
- package/dist/cjs/ui/SearchBox.js +10 -12
- package/dist/cjs/ui/Snippet.js +5 -5
- package/dist/cjs/ui/SortBy.js +4 -4
- package/dist/cjs/ui/Stats.js +2 -2
- package/dist/cjs/ui/ToggleRefinement.js +5 -5
- package/dist/cjs/ui/lib/index.js +0 -11
- package/dist/es/ui/Breadcrumb.js +1 -1
- package/dist/es/ui/ClearRefinements.js +1 -1
- package/dist/es/ui/CurrentRefinements.js +2 -1
- package/dist/es/ui/HierarchicalMenu.js +1 -1
- package/dist/es/ui/Highlight.d.ts +1 -1
- package/dist/es/ui/Highlight.js +1 -1
- package/dist/es/ui/Hits.js +1 -1
- package/dist/es/ui/HitsPerPage.js +1 -1
- package/dist/es/ui/InfiniteHits.js +1 -1
- package/dist/es/ui/InternalHighlight.d.ts +1 -32
- package/dist/es/ui/InternalHighlight.js +6 -47
- package/dist/es/ui/Menu.js +1 -1
- package/dist/es/ui/Pagination.js +1 -1
- package/dist/es/ui/PoweredBy.js +1 -1
- package/dist/es/ui/RangeInput.js +1 -1
- package/dist/es/ui/RefinementList.js +1 -1
- package/dist/es/ui/SearchBox.js +2 -4
- package/dist/es/ui/Snippet.d.ts +1 -1
- package/dist/es/ui/Snippet.js +1 -1
- package/dist/es/ui/SortBy.js +1 -1
- package/dist/es/ui/Stats.js +1 -1
- package/dist/es/ui/ToggleRefinement.js +1 -1
- package/dist/es/ui/lib/index.d.ts +0 -1
- package/dist/es/ui/lib/index.js +0 -1
- package/dist/umd/ReactInstantSearch.js +151 -66
- package/dist/umd/ReactInstantSearch.js.map +1 -1
- package/dist/umd/ReactInstantSearch.min.js +1 -1
- package/dist/umd/ReactInstantSearch.min.js.map +1 -1
- package/package.json +5 -5
- package/dist/cjs/ui/lib/cx.js +0 -12
- package/dist/es/ui/lib/cx.d.ts +0 -1
- package/dist/es/ui/lib/cx.js +0 -6
|
@@ -4,8 +4,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.Breadcrumb = Breadcrumb;
|
|
7
|
+
var _instantsearchUiComponents = require("instantsearch-ui-components");
|
|
7
8
|
var _react = _interopRequireDefault(require("react"));
|
|
8
|
-
var _cx = require("./lib/cx");
|
|
9
9
|
var _isModifierClick = require("./lib/isModifierClick");
|
|
10
10
|
var _excluded = ["classNames", "items", "hasItems", "createURL", "onNavigate", "separator", "translations"];
|
|
11
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -33,25 +33,25 @@ function Breadcrumb(_ref) {
|
|
|
33
33
|
};
|
|
34
34
|
};
|
|
35
35
|
return /*#__PURE__*/_react.default.createElement("div", _extends({}, props, {
|
|
36
|
-
className: (0,
|
|
36
|
+
className: (0, _instantsearchUiComponents.cx)('ais-Breadcrumb', classNames.root, !hasItems && (0, _instantsearchUiComponents.cx)('ais-Breadcrumb--noRefinement', classNames.noRefinementRoot), props.className)
|
|
37
37
|
}), /*#__PURE__*/_react.default.createElement("ul", {
|
|
38
|
-
className: (0,
|
|
38
|
+
className: (0, _instantsearchUiComponents.cx)('ais-Breadcrumb-list', classNames.list)
|
|
39
39
|
}, /*#__PURE__*/_react.default.createElement("li", {
|
|
40
|
-
className: (0,
|
|
40
|
+
className: (0, _instantsearchUiComponents.cx)('ais-Breadcrumb-item', classNames.item, !hasItems && (0, _instantsearchUiComponents.cx)('ais-Breadcrumb-item--selected', classNames.selectedItem))
|
|
41
41
|
}, /*#__PURE__*/_react.default.createElement("a", {
|
|
42
42
|
href: createURL(null),
|
|
43
43
|
onClick: handleClick(null),
|
|
44
|
-
className: (0,
|
|
44
|
+
className: (0, _instantsearchUiComponents.cx)('ais-Breadcrumb-link', classNames.link)
|
|
45
45
|
}, translations.rootElementText)), items.map(function (item, index) {
|
|
46
46
|
var isLast = index === items.length - 1;
|
|
47
47
|
return /*#__PURE__*/_react.default.createElement("li", {
|
|
48
48
|
key: index,
|
|
49
|
-
className: (0,
|
|
49
|
+
className: (0, _instantsearchUiComponents.cx)('ais-Breadcrumb-item', classNames.item, isLast && (0, _instantsearchUiComponents.cx)('ais-Breadcrumb-item--selected', classNames.selectedItem))
|
|
50
50
|
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
51
51
|
"aria-hidden": "true",
|
|
52
|
-
className: (0,
|
|
52
|
+
className: (0, _instantsearchUiComponents.cx)('ais-Breadcrumb-separator', classNames.separator)
|
|
53
53
|
}, separator), isLast ? item.label : /*#__PURE__*/_react.default.createElement("a", {
|
|
54
|
-
className: (0,
|
|
54
|
+
className: (0, _instantsearchUiComponents.cx)('ais-Breadcrumb-link', classNames.link),
|
|
55
55
|
href: createURL(item.value),
|
|
56
56
|
onClick: handleClick(item.value)
|
|
57
57
|
}, item.label));
|
|
@@ -4,8 +4,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.ClearRefinements = ClearRefinements;
|
|
7
|
+
var _instantsearchUiComponents = require("instantsearch-ui-components");
|
|
7
8
|
var _react = _interopRequireDefault(require("react"));
|
|
8
|
-
var _cx = require("./lib/cx");
|
|
9
9
|
var _excluded = ["classNames", "disabled", "onClick", "translations"];
|
|
10
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
11
|
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); }
|
|
@@ -21,10 +21,10 @@ function ClearRefinements(_ref) {
|
|
|
21
21
|
translations = _ref.translations,
|
|
22
22
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
23
23
|
return /*#__PURE__*/_react.default.createElement("div", _extends({}, props, {
|
|
24
|
-
className: (0,
|
|
24
|
+
className: (0, _instantsearchUiComponents.cx)('ais-ClearRefinements', classNames.root, props.className)
|
|
25
25
|
}), /*#__PURE__*/_react.default.createElement("button", {
|
|
26
26
|
disabled: disabled,
|
|
27
27
|
onClick: onClick,
|
|
28
|
-
className: (0,
|
|
28
|
+
className: (0, _instantsearchUiComponents.cx)('ais-ClearRefinements-button', classNames.button, disabled && (0, _instantsearchUiComponents.cx)('ais-ClearRefinements-button--disabled', classNames.disabledButton))
|
|
29
29
|
}, translations.resetButtonText));
|
|
30
30
|
}
|
|
@@ -4,6 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.CurrentRefinements = CurrentRefinements;
|
|
7
|
+
var _instantsearchUiComponents = require("instantsearch-ui-components");
|
|
7
8
|
var _react = _interopRequireDefault(require("react"));
|
|
8
9
|
var _lib = require("./lib");
|
|
9
10
|
var _excluded = ["classNames", "items", "hasRefinements"];
|
|
@@ -20,22 +21,22 @@ function CurrentRefinements(_ref) {
|
|
|
20
21
|
hasRefinements = _ref$hasRefinements === void 0 ? false : _ref$hasRefinements,
|
|
21
22
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
22
23
|
return /*#__PURE__*/_react.default.createElement("div", _extends({}, props, {
|
|
23
|
-
className: (0,
|
|
24
|
+
className: (0, _instantsearchUiComponents.cx)('ais-CurrentRefinements', classNames.root, !hasRefinements && (0, _instantsearchUiComponents.cx)('ais-CurrentRefinements--noRefinement', classNames.noRefinementRoot), props.className)
|
|
24
25
|
}), /*#__PURE__*/_react.default.createElement("ul", {
|
|
25
|
-
className: (0,
|
|
26
|
-
!hasRefinements && (0,
|
|
26
|
+
className: (0, _instantsearchUiComponents.cx)('ais-CurrentRefinements-list', classNames.list, /* @MAJOR remove to ensure conformity with InstantSearch.css specs */
|
|
27
|
+
!hasRefinements && (0, _instantsearchUiComponents.cx)('ais-CurrentRefinements-list--noRefinement', classNames.noRefinementList))
|
|
27
28
|
}, items.map(function (item) {
|
|
28
29
|
return /*#__PURE__*/_react.default.createElement("li", {
|
|
29
30
|
key: [item.indexName, item.label].join('/'),
|
|
30
|
-
className: (0,
|
|
31
|
+
className: (0, _instantsearchUiComponents.cx)('ais-CurrentRefinements-item', classNames.item)
|
|
31
32
|
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
32
|
-
className: (0,
|
|
33
|
+
className: (0, _instantsearchUiComponents.cx)('ais-CurrentRefinements-label', classNames.label)
|
|
33
34
|
}, (0, _lib.capitalize)(item.label), ":", ' '), item.refinements.map(function (refinement) {
|
|
34
35
|
return /*#__PURE__*/_react.default.createElement("span", {
|
|
35
36
|
key: refinement.label,
|
|
36
|
-
className: (0,
|
|
37
|
+
className: (0, _instantsearchUiComponents.cx)('ais-CurrentRefinements-category', classNames.category)
|
|
37
38
|
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
38
|
-
className: (0,
|
|
39
|
+
className: (0, _instantsearchUiComponents.cx)('ais-CurrentRefinements-categoryLabel', classNames.categoryLabel)
|
|
39
40
|
}, refinement.label), /*#__PURE__*/_react.default.createElement("button", {
|
|
40
41
|
type: "button",
|
|
41
42
|
onClick: function onClick(event) {
|
|
@@ -44,7 +45,7 @@ function CurrentRefinements(_ref) {
|
|
|
44
45
|
}
|
|
45
46
|
item.refine(refinement);
|
|
46
47
|
},
|
|
47
|
-
className: (0,
|
|
48
|
+
className: (0, _instantsearchUiComponents.cx)('ais-CurrentRefinements-delete', classNames.delete)
|
|
48
49
|
}, "\u2715"));
|
|
49
50
|
}));
|
|
50
51
|
})));
|
|
@@ -4,8 +4,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.HierarchicalMenu = HierarchicalMenu;
|
|
7
|
+
var _instantsearchUiComponents = require("instantsearch-ui-components");
|
|
7
8
|
var _react = _interopRequireDefault(require("react"));
|
|
8
|
-
var _cx = require("./lib/cx");
|
|
9
9
|
var _isModifierClick = require("./lib/isModifierClick");
|
|
10
10
|
var _ShowMoreButton = require("./ShowMoreButton");
|
|
11
11
|
var _excluded = ["classNames", "items", "hasItems", "onNavigate", "createURL", "showMore", "canToggleShowMore", "onToggleShowMore", "isShowingMore", "translations"];
|
|
@@ -24,13 +24,13 @@ function HierarchicalList(_ref) {
|
|
|
24
24
|
return null;
|
|
25
25
|
}
|
|
26
26
|
return /*#__PURE__*/_react.default.createElement("ul", {
|
|
27
|
-
className: (0,
|
|
27
|
+
className: (0, _instantsearchUiComponents.cx)('ais-HierarchicalMenu-list', classNames.list, className)
|
|
28
28
|
}, items.map(function (item) {
|
|
29
29
|
return /*#__PURE__*/_react.default.createElement("li", {
|
|
30
30
|
key: item.value,
|
|
31
|
-
className: (0,
|
|
31
|
+
className: (0, _instantsearchUiComponents.cx)('ais-HierarchicalMenu-item', classNames.item, item.isRefined && (0, _instantsearchUiComponents.cx)('ais-HierarchicalMenu-item--selected', classNames.selectedItem), item.data && item.data.length > 0 && (0, _instantsearchUiComponents.cx)('ais-HierarchicalMenu-item--parent', classNames.parentItem))
|
|
32
32
|
}, /*#__PURE__*/_react.default.createElement("a", {
|
|
33
|
-
className: (0,
|
|
33
|
+
className: (0, _instantsearchUiComponents.cx)('ais-HierarchicalMenu-link', classNames.link, item.isRefined && (0, _instantsearchUiComponents.cx)('ais-HierarchicalMenu-link--selected', classNames.selectedItemLink)),
|
|
34
34
|
href: createURL(item.value),
|
|
35
35
|
onClick: function onClick(event) {
|
|
36
36
|
if ((0, _isModifierClick.isModifierClick)(event)) {
|
|
@@ -40,11 +40,11 @@ function HierarchicalList(_ref) {
|
|
|
40
40
|
onNavigate(item.value);
|
|
41
41
|
}
|
|
42
42
|
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
43
|
-
className: (0,
|
|
43
|
+
className: (0, _instantsearchUiComponents.cx)('ais-HierarchicalMenu-label', classNames.label)
|
|
44
44
|
}, item.label), /*#__PURE__*/_react.default.createElement("span", {
|
|
45
|
-
className: (0,
|
|
45
|
+
className: (0, _instantsearchUiComponents.cx)('ais-HierarchicalMenu-count', classNames.count)
|
|
46
46
|
}, item.count)), item.data && /*#__PURE__*/_react.default.createElement(HierarchicalList, {
|
|
47
|
-
className: (0,
|
|
47
|
+
className: (0, _instantsearchUiComponents.cx)('ais-HierarchicalMenu-list--child', classNames.childList),
|
|
48
48
|
classNames: classNames,
|
|
49
49
|
items: item.data,
|
|
50
50
|
onNavigate: onNavigate,
|
|
@@ -66,14 +66,14 @@ function HierarchicalMenu(_ref2) {
|
|
|
66
66
|
translations = _ref2.translations,
|
|
67
67
|
props = _objectWithoutProperties(_ref2, _excluded);
|
|
68
68
|
return /*#__PURE__*/_react.default.createElement("div", _extends({}, props, {
|
|
69
|
-
className: (0,
|
|
69
|
+
className: (0, _instantsearchUiComponents.cx)('ais-HierarchicalMenu', classNames.root, !hasItems && (0, _instantsearchUiComponents.cx)('ais-HierarchicalMenu--noRefinement', classNames.noRefinementRoot), props.className)
|
|
70
70
|
}), /*#__PURE__*/_react.default.createElement(HierarchicalList, {
|
|
71
71
|
classNames: classNames,
|
|
72
72
|
items: items,
|
|
73
73
|
onNavigate: onNavigate,
|
|
74
74
|
createURL: createURL
|
|
75
75
|
}), showMore && /*#__PURE__*/_react.default.createElement(_ShowMoreButton.ShowMoreButton, {
|
|
76
|
-
className: (0,
|
|
76
|
+
className: (0, _instantsearchUiComponents.cx)('ais-HierarchicalMenu-showMore', classNames.showMore, !canToggleShowMore && (0, _instantsearchUiComponents.cx)('ais-HierarchicalMenu-showMore--disabled', classNames.disabledShowMore)),
|
|
77
77
|
disabled: !canToggleShowMore,
|
|
78
78
|
onClick: onToggleShowMore,
|
|
79
79
|
isShowingMore: isShowingMore,
|
package/dist/cjs/ui/Highlight.js
CHANGED
|
@@ -4,9 +4,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.Highlight = Highlight;
|
|
7
|
+
var _instantsearchUiComponents = require("instantsearch-ui-components");
|
|
7
8
|
var _react = _interopRequireDefault(require("react"));
|
|
8
9
|
var _InternalHighlight = require("./InternalHighlight");
|
|
9
|
-
var _cx = require("./lib/cx");
|
|
10
10
|
var _excluded = ["classNames"];
|
|
11
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
12
|
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); }
|
|
@@ -18,10 +18,10 @@ function Highlight(_ref) {
|
|
|
18
18
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
19
19
|
return /*#__PURE__*/_react.default.createElement(_InternalHighlight.InternalHighlight, _extends({
|
|
20
20
|
classNames: {
|
|
21
|
-
root: (0,
|
|
22
|
-
highlighted: (0,
|
|
23
|
-
nonHighlighted: (0,
|
|
24
|
-
separator: (0,
|
|
21
|
+
root: (0, _instantsearchUiComponents.cx)('ais-Highlight', classNames.root),
|
|
22
|
+
highlighted: (0, _instantsearchUiComponents.cx)('ais-Highlight-highlighted', classNames.highlighted),
|
|
23
|
+
nonHighlighted: (0, _instantsearchUiComponents.cx)('ais-Highlight-nonHighlighted', classNames.nonHighlighted),
|
|
24
|
+
separator: (0, _instantsearchUiComponents.cx)('ais-Highlight-separator', classNames.separator)
|
|
25
25
|
}
|
|
26
26
|
}, props));
|
|
27
27
|
}
|
package/dist/cjs/ui/Hits.js
CHANGED
|
@@ -4,8 +4,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.Hits = Hits;
|
|
7
|
+
var _instantsearchUiComponents = require("instantsearch-ui-components");
|
|
7
8
|
var _react = _interopRequireDefault(require("react"));
|
|
8
|
-
var _cx = require("./lib/cx");
|
|
9
9
|
var _excluded = ["hits", "sendEvent", "hitComponent", "classNames"];
|
|
10
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
11
|
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); }
|
|
@@ -28,13 +28,13 @@ function Hits(_ref2) {
|
|
|
28
28
|
classNames = _ref2$classNames === void 0 ? {} : _ref2$classNames,
|
|
29
29
|
props = _objectWithoutProperties(_ref2, _excluded);
|
|
30
30
|
return /*#__PURE__*/_react.default.createElement("div", _extends({}, props, {
|
|
31
|
-
className: (0,
|
|
31
|
+
className: (0, _instantsearchUiComponents.cx)('ais-Hits', classNames.root, hits.length === 0 && (0, _instantsearchUiComponents.cx)('ais-Hits--empty', classNames.emptyRoot), props.className)
|
|
32
32
|
}), /*#__PURE__*/_react.default.createElement("ol", {
|
|
33
|
-
className: (0,
|
|
33
|
+
className: (0, _instantsearchUiComponents.cx)('ais-Hits-list', classNames.list)
|
|
34
34
|
}, hits.map(function (hit) {
|
|
35
35
|
return /*#__PURE__*/_react.default.createElement("li", {
|
|
36
36
|
key: hit.objectID,
|
|
37
|
-
className: (0,
|
|
37
|
+
className: (0, _instantsearchUiComponents.cx)('ais-Hits-item', classNames.item),
|
|
38
38
|
onClick: function onClick() {
|
|
39
39
|
sendEvent('click:internal', hit, 'Hit Clicked');
|
|
40
40
|
},
|
|
@@ -4,8 +4,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.HitsPerPage = HitsPerPage;
|
|
7
|
+
var _instantsearchUiComponents = require("instantsearch-ui-components");
|
|
7
8
|
var _react = _interopRequireDefault(require("react"));
|
|
8
|
-
var _cx = require("./lib/cx");
|
|
9
9
|
var _excluded = ["items", "onChange", "currentValue", "classNames"];
|
|
10
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
11
|
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); }
|
|
@@ -19,9 +19,9 @@ function HitsPerPage(_ref) {
|
|
|
19
19
|
classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
|
|
20
20
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
21
21
|
return /*#__PURE__*/_react.default.createElement("div", _extends({}, props, {
|
|
22
|
-
className: (0,
|
|
22
|
+
className: (0, _instantsearchUiComponents.cx)('ais-HitsPerPage', classNames.root, props.className)
|
|
23
23
|
}), /*#__PURE__*/_react.default.createElement("select", {
|
|
24
|
-
className: (0,
|
|
24
|
+
className: (0, _instantsearchUiComponents.cx)('ais-HitsPerPage-select', classNames.select),
|
|
25
25
|
onChange: function onChange(event) {
|
|
26
26
|
_onChange(Number(event.target.value));
|
|
27
27
|
},
|
|
@@ -29,7 +29,7 @@ function HitsPerPage(_ref) {
|
|
|
29
29
|
}, items.map(function (item) {
|
|
30
30
|
return /*#__PURE__*/_react.default.createElement("option", {
|
|
31
31
|
key: item.value,
|
|
32
|
-
className: (0,
|
|
32
|
+
className: (0, _instantsearchUiComponents.cx)('ais-HitsPerPage-option', classNames.option),
|
|
33
33
|
value: item.value
|
|
34
34
|
}, item.label);
|
|
35
35
|
})));
|
|
@@ -4,8 +4,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.InfiniteHits = InfiniteHits;
|
|
7
|
+
var _instantsearchUiComponents = require("instantsearch-ui-components");
|
|
7
8
|
var _react = _interopRequireDefault(require("react"));
|
|
8
|
-
var _cx = require("./lib/cx");
|
|
9
9
|
var _excluded = ["hitComponent", "hits", "sendEvent", "isFirstPage", "isLastPage", "onShowPrevious", "onShowMore", "classNames", "translations"];
|
|
10
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
11
|
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); }
|
|
@@ -33,17 +33,17 @@ function InfiniteHits(_ref2) {
|
|
|
33
33
|
translations = _ref2.translations,
|
|
34
34
|
props = _objectWithoutProperties(_ref2, _excluded);
|
|
35
35
|
return /*#__PURE__*/_react.default.createElement("div", _extends({}, props, {
|
|
36
|
-
className: (0,
|
|
36
|
+
className: (0, _instantsearchUiComponents.cx)('ais-InfiniteHits', classNames.root, hits.length === 0 && (0, _instantsearchUiComponents.cx)('ais-InfiniteHits--empty', classNames.emptyRoot), props.className)
|
|
37
37
|
}), onShowPrevious && /*#__PURE__*/_react.default.createElement("button", {
|
|
38
|
-
className: (0,
|
|
38
|
+
className: (0, _instantsearchUiComponents.cx)('ais-InfiniteHits-loadPrevious', classNames.loadPrevious, isFirstPage && (0, _instantsearchUiComponents.cx)('ais-InfiniteHits-loadPrevious--disabled', classNames.disabledLoadPrevious)),
|
|
39
39
|
onClick: onShowPrevious,
|
|
40
40
|
disabled: isFirstPage
|
|
41
41
|
}, translations.showPreviousButtonText), /*#__PURE__*/_react.default.createElement("ol", {
|
|
42
|
-
className: (0,
|
|
42
|
+
className: (0, _instantsearchUiComponents.cx)('ais-InfiniteHits-list', classNames.list)
|
|
43
43
|
}, hits.map(function (hit) {
|
|
44
44
|
return /*#__PURE__*/_react.default.createElement("li", {
|
|
45
45
|
key: hit.objectID,
|
|
46
|
-
className: (0,
|
|
46
|
+
className: (0, _instantsearchUiComponents.cx)('ais-InfiniteHits-item', classNames.item),
|
|
47
47
|
onClick: function onClick() {
|
|
48
48
|
sendEvent('click:internal', hit, 'Hit Clicked');
|
|
49
49
|
},
|
|
@@ -55,7 +55,7 @@ function InfiniteHits(_ref2) {
|
|
|
55
55
|
sendEvent: sendEvent
|
|
56
56
|
}));
|
|
57
57
|
})), /*#__PURE__*/_react.default.createElement("button", {
|
|
58
|
-
className: (0,
|
|
58
|
+
className: (0, _instantsearchUiComponents.cx)('ais-InfiniteHits-loadMore', classNames.loadMore, isLastPage && (0, _instantsearchUiComponents.cx)('ais-InfiniteHits-loadMore--disabled', classNames.disabledLoadMore)),
|
|
59
59
|
onClick: onShowMore,
|
|
60
60
|
disabled: isLastPage
|
|
61
61
|
}, translations.showMoreButtonText));
|
|
@@ -1,56 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
7
|
-
exports.InternalHighlight =
|
|
8
|
-
var
|
|
9
|
-
var
|
|
10
|
-
var
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
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; }
|
|
16
|
-
function HighlightPart(_ref) {
|
|
17
|
-
var classNames = _ref.classNames,
|
|
18
|
-
children = _ref.children,
|
|
19
|
-
highlightedTagName = _ref.highlightedTagName,
|
|
20
|
-
isHighlighted = _ref.isHighlighted,
|
|
21
|
-
nonHighlightedTagName = _ref.nonHighlightedTagName;
|
|
22
|
-
var TagName = isHighlighted ? highlightedTagName : nonHighlightedTagName;
|
|
23
|
-
return /*#__PURE__*/_react.default.createElement(TagName, {
|
|
24
|
-
className: isHighlighted ? classNames.highlighted : classNames.nonHighlighted
|
|
25
|
-
}, children);
|
|
26
|
-
}
|
|
27
|
-
function InternalHighlight(_ref2) {
|
|
28
|
-
var parts = _ref2.parts,
|
|
29
|
-
_ref2$highlightedTagN = _ref2.highlightedTagName,
|
|
30
|
-
highlightedTagName = _ref2$highlightedTagN === void 0 ? 'mark' : _ref2$highlightedTagN,
|
|
31
|
-
_ref2$nonHighlightedT = _ref2.nonHighlightedTagName,
|
|
32
|
-
nonHighlightedTagName = _ref2$nonHighlightedT === void 0 ? 'span' : _ref2$nonHighlightedT,
|
|
33
|
-
_ref2$separator = _ref2.separator,
|
|
34
|
-
separator = _ref2$separator === void 0 ? ', ' : _ref2$separator,
|
|
35
|
-
className = _ref2.className,
|
|
36
|
-
classNames = _ref2.classNames,
|
|
37
|
-
props = _objectWithoutProperties(_ref2, _excluded);
|
|
38
|
-
return /*#__PURE__*/_react.default.createElement("span", _extends({}, props, {
|
|
39
|
-
className: (0, _cx.cx)(classNames.root, className)
|
|
40
|
-
}), parts.map(function (part, partIndex) {
|
|
41
|
-
var isLastPart = partIndex === parts.length - 1;
|
|
42
|
-
return /*#__PURE__*/_react.default.createElement(_react.Fragment, {
|
|
43
|
-
key: partIndex
|
|
44
|
-
}, part.map(function (subPart, subPartIndex) {
|
|
45
|
-
return /*#__PURE__*/_react.default.createElement(HighlightPart, {
|
|
46
|
-
key: subPartIndex,
|
|
47
|
-
classNames: classNames,
|
|
48
|
-
highlightedTagName: highlightedTagName,
|
|
49
|
-
nonHighlightedTagName: nonHighlightedTagName,
|
|
50
|
-
isHighlighted: subPart.isHighlighted
|
|
51
|
-
}, subPart.value);
|
|
52
|
-
}), !isLastPart && /*#__PURE__*/_react.default.createElement("span", {
|
|
53
|
-
className: classNames.separator
|
|
54
|
-
}, separator));
|
|
55
|
-
}));
|
|
56
|
-
}
|
|
6
|
+
exports.InternalHighlight = void 0;
|
|
7
|
+
var _instantsearchUiComponents = require("instantsearch-ui-components");
|
|
8
|
+
var _react = require("react");
|
|
9
|
+
var InternalHighlight = (0, _instantsearchUiComponents.createHighlightComponent)({
|
|
10
|
+
createElement: _react.createElement,
|
|
11
|
+
Fragment: _react.Fragment
|
|
12
|
+
});
|
|
13
|
+
exports.InternalHighlight = InternalHighlight;
|
package/dist/cjs/ui/Menu.js
CHANGED
|
@@ -4,8 +4,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.Menu = Menu;
|
|
7
|
+
var _instantsearchUiComponents = require("instantsearch-ui-components");
|
|
7
8
|
var _react = _interopRequireDefault(require("react"));
|
|
8
|
-
var _cx = require("./lib/cx");
|
|
9
9
|
var _ShowMoreButton = require("./ShowMoreButton");
|
|
10
10
|
var _excluded = ["items", "classNames", "showMore", "canToggleShowMore", "onToggleShowMore", "isShowingMore", "createURL", "onRefine", "translations"];
|
|
11
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -25,27 +25,27 @@ function Menu(_ref) {
|
|
|
25
25
|
translations = _ref.translations,
|
|
26
26
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
27
27
|
return /*#__PURE__*/_react.default.createElement("div", _extends({}, props, {
|
|
28
|
-
className: (0,
|
|
28
|
+
className: (0, _instantsearchUiComponents.cx)('ais-Menu', classNames.root, items.length === 0 && (0, _instantsearchUiComponents.cx)('ais-Menu--noRefinement', classNames.noRefinementRoot), props.className)
|
|
29
29
|
}), /*#__PURE__*/_react.default.createElement("ul", {
|
|
30
|
-
className: (0,
|
|
30
|
+
className: (0, _instantsearchUiComponents.cx)('ais-Menu-list', classNames.list)
|
|
31
31
|
}, items.map(function (item) {
|
|
32
32
|
return /*#__PURE__*/_react.default.createElement("li", {
|
|
33
33
|
key: item.label,
|
|
34
|
-
className: (0,
|
|
34
|
+
className: (0, _instantsearchUiComponents.cx)('ais-Menu-item', classNames.item, item.isRefined && (0, _instantsearchUiComponents.cx)('ais-Menu-item--selected', classNames.selectedItem))
|
|
35
35
|
}, /*#__PURE__*/_react.default.createElement("a", {
|
|
36
|
-
className: (0,
|
|
36
|
+
className: (0, _instantsearchUiComponents.cx)('ais-Menu-link', classNames.link),
|
|
37
37
|
href: createURL(item.value),
|
|
38
38
|
onClick: function onClick(event) {
|
|
39
39
|
event.preventDefault();
|
|
40
40
|
onRefine(item);
|
|
41
41
|
}
|
|
42
42
|
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
43
|
-
className: (0,
|
|
43
|
+
className: (0, _instantsearchUiComponents.cx)('ais-Menu-label', classNames.label)
|
|
44
44
|
}, item.label), /*#__PURE__*/_react.default.createElement("span", {
|
|
45
|
-
className: (0,
|
|
45
|
+
className: (0, _instantsearchUiComponents.cx)('ais-Menu-count', classNames.count)
|
|
46
46
|
}, item.count)));
|
|
47
47
|
})), showMore && /*#__PURE__*/_react.default.createElement(_ShowMoreButton.ShowMoreButton, {
|
|
48
|
-
className: (0,
|
|
48
|
+
className: (0, _instantsearchUiComponents.cx)('ais-Menu-showMore', classNames.showMore, !canToggleShowMore && (0, _instantsearchUiComponents.cx)('ais-Menu-showMore--disabled', classNames.disabledShowMore)),
|
|
49
49
|
disabled: !canToggleShowMore,
|
|
50
50
|
onClick: onToggleShowMore,
|
|
51
51
|
isShowingMore: isShowingMore,
|
|
@@ -4,8 +4,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.Pagination = Pagination;
|
|
7
|
+
var _instantsearchUiComponents = require("instantsearch-ui-components");
|
|
7
8
|
var _react = _interopRequireDefault(require("react"));
|
|
8
|
-
var _cx = require("./lib/cx");
|
|
9
9
|
var _isModifierClick = require("./lib/isModifierClick");
|
|
10
10
|
var _excluded = ["pages", "currentPage", "nbPages", "isFirstPage", "isLastPage", "showFirst", "showPrevious", "showNext", "showLast", "createURL", "onNavigate", "translations", "classNames"],
|
|
11
11
|
_excluded2 = ["isDisabled", "className", "classNames", "href", "onClick"];
|
|
@@ -38,12 +38,12 @@ function Pagination(_ref) {
|
|
|
38
38
|
var nextPageIndex = currentPage + 1;
|
|
39
39
|
var lastPageIndex = nbPages - 1;
|
|
40
40
|
return /*#__PURE__*/_react.default.createElement("div", _extends({}, props, {
|
|
41
|
-
className: (0,
|
|
41
|
+
className: (0, _instantsearchUiComponents.cx)('ais-Pagination', classNames.root, nbPages <= 1 && (0, _instantsearchUiComponents.cx)('ais-Pagination--noRefinement', classNames.noRefinementRoot), props.className)
|
|
42
42
|
}), /*#__PURE__*/_react.default.createElement("ul", {
|
|
43
|
-
className: (0,
|
|
43
|
+
className: (0, _instantsearchUiComponents.cx)('ais-Pagination-list', classNames.list)
|
|
44
44
|
}, showFirst && /*#__PURE__*/_react.default.createElement(PaginationItem, {
|
|
45
45
|
isDisabled: isFirstPage,
|
|
46
|
-
className: (0,
|
|
46
|
+
className: (0, _instantsearchUiComponents.cx)('ais-Pagination-item--firstPage', classNames.firstPageItem),
|
|
47
47
|
classNames: classNames,
|
|
48
48
|
"aria-label": translations.firstPageItemAriaLabel,
|
|
49
49
|
href: createURL(firstPageIndex),
|
|
@@ -52,7 +52,7 @@ function Pagination(_ref) {
|
|
|
52
52
|
}
|
|
53
53
|
}, translations.firstPageItemText), showPrevious && /*#__PURE__*/_react.default.createElement(PaginationItem, {
|
|
54
54
|
isDisabled: isFirstPage,
|
|
55
|
-
className: (0,
|
|
55
|
+
className: (0, _instantsearchUiComponents.cx)('ais-Pagination-item--previousPage', classNames.previousPageItem),
|
|
56
56
|
classNames: classNames,
|
|
57
57
|
"aria-label": translations.previousPageItemAriaLabel,
|
|
58
58
|
href: createURL(previousPageIndex),
|
|
@@ -63,7 +63,7 @@ function Pagination(_ref) {
|
|
|
63
63
|
return /*#__PURE__*/_react.default.createElement(PaginationItem, {
|
|
64
64
|
key: page,
|
|
65
65
|
isDisabled: false,
|
|
66
|
-
className: (0,
|
|
66
|
+
className: (0, _instantsearchUiComponents.cx)('ais-Pagination-item--page', classNames.pageItem, page === currentPage && (0, _instantsearchUiComponents.cx)('ais-Pagination-item--selected', classNames.selectedItem)),
|
|
67
67
|
classNames: classNames,
|
|
68
68
|
"aria-label": translations.pageItemAriaLabel({
|
|
69
69
|
currentPage: page + 1,
|
|
@@ -79,7 +79,7 @@ function Pagination(_ref) {
|
|
|
79
79
|
}));
|
|
80
80
|
}), showNext && /*#__PURE__*/_react.default.createElement(PaginationItem, {
|
|
81
81
|
isDisabled: isLastPage,
|
|
82
|
-
className: (0,
|
|
82
|
+
className: (0, _instantsearchUiComponents.cx)('ais-Pagination-item--nextPage', classNames.nextPageItem),
|
|
83
83
|
classNames: classNames,
|
|
84
84
|
"aria-label": translations.nextPageItemAriaLabel,
|
|
85
85
|
href: createURL(nextPageIndex),
|
|
@@ -88,7 +88,7 @@ function Pagination(_ref) {
|
|
|
88
88
|
}
|
|
89
89
|
}, translations.nextPageItemText), showLast && /*#__PURE__*/_react.default.createElement(PaginationItem, {
|
|
90
90
|
isDisabled: isLastPage,
|
|
91
|
-
className: (0,
|
|
91
|
+
className: (0, _instantsearchUiComponents.cx)('ais-Pagination-item--lastPage', classNames.lastPageItem),
|
|
92
92
|
classNames: classNames,
|
|
93
93
|
"aria-label": translations.lastPageItemAriaLabel,
|
|
94
94
|
href: createURL(lastPageIndex),
|
|
@@ -106,15 +106,15 @@ function PaginationItem(_ref2) {
|
|
|
106
106
|
props = _objectWithoutProperties(_ref2, _excluded2);
|
|
107
107
|
if (isDisabled) {
|
|
108
108
|
return /*#__PURE__*/_react.default.createElement("li", {
|
|
109
|
-
className: (0,
|
|
109
|
+
className: (0, _instantsearchUiComponents.cx)('ais-Pagination-item', classNames.item, 'ais-Pagination-item--disabled', classNames.disabledItem, className)
|
|
110
110
|
}, /*#__PURE__*/_react.default.createElement("span", _extends({
|
|
111
|
-
className: (0,
|
|
111
|
+
className: (0, _instantsearchUiComponents.cx)('ais-Pagination-link', classNames.link)
|
|
112
112
|
}, props)));
|
|
113
113
|
}
|
|
114
114
|
return /*#__PURE__*/_react.default.createElement("li", {
|
|
115
|
-
className: (0,
|
|
115
|
+
className: (0, _instantsearchUiComponents.cx)('ais-Pagination-item', classNames.item, className)
|
|
116
116
|
}, /*#__PURE__*/_react.default.createElement("a", _extends({
|
|
117
|
-
className: (0,
|
|
117
|
+
className: (0, _instantsearchUiComponents.cx)('ais-Pagination-link', classNames.link),
|
|
118
118
|
href: href,
|
|
119
119
|
onClick: function onClick(event) {
|
|
120
120
|
if ((0, _isModifierClick.isModifierClick)(event)) {
|
package/dist/cjs/ui/PoweredBy.js
CHANGED
|
@@ -4,8 +4,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.PoweredBy = PoweredBy;
|
|
7
|
+
var _instantsearchUiComponents = require("instantsearch-ui-components");
|
|
7
8
|
var _react = _interopRequireDefault(require("react"));
|
|
8
|
-
var _cx = require("./lib/cx");
|
|
9
9
|
var _excluded = ["classNames", "url", "theme"];
|
|
10
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
11
|
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); }
|
|
@@ -19,16 +19,16 @@ function PoweredBy(_ref) {
|
|
|
19
19
|
theme = _ref$theme === void 0 ? 'light' : _ref$theme,
|
|
20
20
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
21
21
|
return /*#__PURE__*/_react.default.createElement("div", _extends({}, props, {
|
|
22
|
-
className: (0,
|
|
22
|
+
className: (0, _instantsearchUiComponents.cx)('ais-PoweredBy', theme === 'dark' ? (0, _instantsearchUiComponents.cx)('ais-PoweredBy--dark', classNames.dark) : (0, _instantsearchUiComponents.cx)('ais-PoweredBy--light', classNames.light), classNames.root, props.className)
|
|
23
23
|
}), /*#__PURE__*/_react.default.createElement("a", {
|
|
24
24
|
href: url,
|
|
25
25
|
target: "_blank",
|
|
26
|
-
className: (0,
|
|
26
|
+
className: (0, _instantsearchUiComponents.cx)('ais-PoweredBy-link', classNames.link),
|
|
27
27
|
"aria-label": "Search by Algolia",
|
|
28
28
|
rel: "noopener noreferrer"
|
|
29
29
|
}, /*#__PURE__*/_react.default.createElement("svg", {
|
|
30
30
|
viewBox: "0 0 572 64",
|
|
31
|
-
className: (0,
|
|
31
|
+
className: (0, _instantsearchUiComponents.cx)('ais-PoweredBy-logo', classNames.logo)
|
|
32
32
|
}, /*#__PURE__*/_react.default.createElement("path", {
|
|
33
33
|
fill: theme === 'dark' ? '#FFF' : '#36395A',
|
|
34
34
|
d: "M16 48.3c-3.4 0-6.3-.6-8.7-1.7A12.4 12.4 0 0 1 1.9 42C.6 40 0 38 0 35.4h6.5a6.7 6.7 0 0 0 3.9 6c1.4.7 3.3 1.1 5.6 1.1 2.2 0 4-.3 5.4-1a7 7 0 0 0 3-2.4 6 6 0 0 0 1-3.4c0-1.5-.6-2.8-1.9-3.7-1.3-1-3.3-1.6-5.9-1.8l-4-.4c-3.7-.3-6.6-1.4-8.8-3.4a10 10 0 0 1-3.3-7.9c0-2.4.6-4.6 1.8-6.4a12 12 0 0 1 5-4.3c2.2-1 4.7-1.6 7.5-1.6s5.5.5 7.6 1.6a12 12 0 0 1 5 4.4c1.2 1.8 1.8 4 1.8 6.7h-6.5a6.4 6.4 0 0 0-3.5-5.9c-1-.6-2.6-1-4.4-1s-3.2.3-4.4 1c-1.1.6-2 1.4-2.6 2.4-.5 1-.8 2-.8 3.1a5 5 0 0 0 1.5 3.6c1 1 2.6 1.7 4.7 1.9l4 .3c2.8.2 5.2.8 7.2 1.8 2.1 1 3.7 2.2 4.9 3.8a9.7 9.7 0 0 1 1.7 5.8c0 2.5-.7 4.7-2 6.6a13 13 0 0 1-5.6 4.4c-2.4 1-5.2 1.6-8.4 1.6Zm35.6 0c-2.6 0-4.8-.4-6.7-1.3a13 13 0 0 1-4.7-3.5 17.1 17.1 0 0 1-3.6-10.4v-1c0-2 .3-3.8 1-5.6a13 13 0 0 1 7.3-8.3 15 15 0 0 1 6.3-1.4A13.2 13.2 0 0 1 64 24.3c1 2.2 1.6 4.6 1.6 7.2V34H39.4v-4.3h21.8l-1.8 2.2c0-2-.3-3.7-.9-5.1a7.3 7.3 0 0 0-2.7-3.4c-1.2-.7-2.7-1.1-4.6-1.1s-3.4.4-4.7 1.3a8 8 0 0 0-2.9 3.6c-.6 1.5-.9 3.3-.9 5.4 0 2 .3 3.7 1 5.3a7.9 7.9 0 0 0 2.8 3.7c1.3.8 3 1.3 5 1.3s3.8-.5 5.1-1.3c1.3-1 2.1-2 2.4-3.2h6a11.8 11.8 0 0 1-7 8.7 16 16 0 0 1-6.4 1.2ZM80 48c-2.2 0-4-.3-5.7-1a8.4 8.4 0 0 1-3.7-3.3 9.7 9.7 0 0 1-1.3-5.2c0-2 .5-3.8 1.5-5.2a9 9 0 0 1 4.3-3.1c1.8-.7 4-1 6.7-1H89v4.1h-7.5c-2 0-3.4.5-4.4 1.4-1 1-1.6 2.1-1.6 3.6s.5 2.7 1.6 3.6c1 1 2.5 1.4 4.4 1.4 1.1 0 2.2-.2 3.2-.7 1-.4 1.9-1 2.6-2 .6-1 1-2.4 1-4.2l1.7 2.1c-.2 2-.7 3.8-1.5 5.2a9 9 0 0 1-3.4 3.3 12 12 0 0 1-5.3 1Zm9.5-.7v-8.8h-1v-10c0-1.8-.5-3.2-1.4-4.1-1-1-2.4-1.4-4.2-1.4a142.9 142.9 0 0 0-10.2.4v-5.6a74.8 74.8 0 0 1 8.6-.4c3 0 5.5.4 7.5 1.2s3.4 2 4.4 3.6c1 1.7 1.4 4 1.4 6.7v18.4h-5Zm12.9 0V17.8h5v12.3h-.2c0-4.2 1-7.4 2.8-9.5a11 11 0 0 1 8.3-3.1h1v5.6h-2a9 9 0 0 0-6.3 2.2c-1.5 1.5-2.2 3.6-2.2 6.4v15.6h-6.4Zm34.4 1a15 15 0 0 1-6.6-1.3c-1.9-.9-3.4-2-4.7-3.5a15.5 15.5 0 0 1-2.7-5c-.6-1.7-1-3.6-1-5.4v-1c0-2 .4-3.8 1-5.6a15 15 0 0 1 2.8-4.9c1.3-1.5 2.8-2.6 4.6-3.5a16.4 16.4 0 0 1 13.3.2c2 1 3.5 2.3 4.8 4a12 12 0 0 1 2 6H144c-.2-1.6-1-3-2.2-4.1a7.5 7.5 0 0 0-5.2-1.7 8 8 0 0 0-4.7 1.3 8 8 0 0 0-2.8 3.6 13.8 13.8 0 0 0 0 10.3c.6 1.5 1.5 2.7 2.8 3.6s2.8 1.3 4.8 1.3c1.5 0 2.7-.2 3.8-.8a7 7 0 0 0 2.6-2c.7-1 1-2 1.2-3.2h6.2a11 11 0 0 1-2 6.2 15.1 15.1 0 0 1-11.8 5.5Zm19.7-1v-40h6.4V31h-1.3c0-3 .4-5.5 1.1-7.6a9.7 9.7 0 0 1 3.5-4.8A9.9 9.9 0 0 1 172 17h.3c3.5 0 6 1.1 7.9 3.5 1.7 2.3 2.6 5.7 2.6 10v16.8h-6.4V29.6c0-2.1-.6-3.8-1.8-5a6.4 6.4 0 0 0-4.8-1.8c-2 0-3.7.7-5 2a7.8 7.8 0 0 0-1.9 5.5v17h-6.4Zm63.8 1a12.2 12.2 0 0 1-10.9-6.2 19 19 0 0 1-1.8-7.3h1.4v12.5h-5.1v-40h6.4v19.8l-2 3.5c.2-3.1.8-5.7 1.9-7.7a11 11 0 0 1 4.4-4.5c1.8-1 3.9-1.5 6.1-1.5a13.4 13.4 0 0 1 12.8 9.1c.7 1.9 1 3.8 1 6v1c0 2.2-.3 4.1-1 6a13.6 13.6 0 0 1-13.2 9.4Zm-1.2-5.5a8.4 8.4 0 0 0 7.9-5c.7-1.5 1.1-3.3 1.1-5.3s-.4-3.8-1.1-5.3a8.7 8.7 0 0 0-3.2-3.6 9.6 9.6 0 0 0-9.2-.2 8.5 8.5 0 0 0-3.3 3.2c-.8 1.4-1.3 3-1.3 5v2.3a9 9 0 0 0 1.3 4.8 9 9 0 0 0 3.4 3c1.4.7 2.8 1 4.4 1Zm27.3 3.9-10-28.9h6.5l9.5 28.9h-6Zm-7.5 12.2v-5.7h4.9c1 0 2-.1 2.9-.4a4 4 0 0 0 2-1.4c.4-.7.9-1.6 1.2-2.7l8.6-30.9h6.2l-9.3 32.4a14 14 0 0 1-2.5 5 8.9 8.9 0 0 1-4 2.8c-1.5.6-3.4.9-5.6.9h-4.4Zm9-12.2v-5.2h6.4v5.2H248Z"
|
|
@@ -5,8 +5,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.RangeInput = RangeInput;
|
|
8
|
+
var _instantsearchUiComponents = require("instantsearch-ui-components");
|
|
8
9
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
-
var _cx = require("./lib/cx");
|
|
10
10
|
var _excluded = ["classNames", "range", "start", "step", "disabled", "onSubmit", "translations"];
|
|
11
11
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
12
12
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -70,17 +70,17 @@ function RangeInput(_ref) {
|
|
|
70
70
|
setPrevValues(values);
|
|
71
71
|
}
|
|
72
72
|
return /*#__PURE__*/_react.default.createElement("div", _extends({}, props, {
|
|
73
|
-
className: (0,
|
|
73
|
+
className: (0, _instantsearchUiComponents.cx)((0, _instantsearchUiComponents.cx)('ais-RangeInput', classNames.root), disabled && (0, _instantsearchUiComponents.cx)('ais-RangeInput--noRefinement', classNames.noRefinementRoot), props.className)
|
|
74
74
|
}), /*#__PURE__*/_react.default.createElement("form", {
|
|
75
|
-
className: (0,
|
|
75
|
+
className: (0, _instantsearchUiComponents.cx)('ais-RangeInput-form', classNames.form),
|
|
76
76
|
onSubmit: function onSubmit(event) {
|
|
77
77
|
event.preventDefault();
|
|
78
78
|
_onSubmit([from ? Number(from) : undefined, to ? Number(to) : undefined]);
|
|
79
79
|
}
|
|
80
80
|
}, /*#__PURE__*/_react.default.createElement("label", {
|
|
81
|
-
className: (0,
|
|
81
|
+
className: (0, _instantsearchUiComponents.cx)('ais-RangeInput-label', classNames.label)
|
|
82
82
|
}, /*#__PURE__*/_react.default.createElement("input", {
|
|
83
|
-
className: (0,
|
|
83
|
+
className: (0, _instantsearchUiComponents.cx)('ais-RangeInput-input', classNames.input, 'ais-RangeInput-input--min', classNames.inputMin),
|
|
84
84
|
type: "number",
|
|
85
85
|
min: min,
|
|
86
86
|
max: max,
|
|
@@ -97,11 +97,11 @@ function RangeInput(_ref) {
|
|
|
97
97
|
});
|
|
98
98
|
}
|
|
99
99
|
})), /*#__PURE__*/_react.default.createElement("span", {
|
|
100
|
-
className: (0,
|
|
100
|
+
className: (0, _instantsearchUiComponents.cx)('ais-RangeInput-separator', classNames.separator)
|
|
101
101
|
}, translations.separatorElementText), /*#__PURE__*/_react.default.createElement("label", {
|
|
102
|
-
className: (0,
|
|
102
|
+
className: (0, _instantsearchUiComponents.cx)('ais-RangeInput-label', classNames.label)
|
|
103
103
|
}, /*#__PURE__*/_react.default.createElement("input", {
|
|
104
|
-
className: (0,
|
|
104
|
+
className: (0, _instantsearchUiComponents.cx)('ais-RangeInput-input', classNames.input, 'ais-RangeInput-input--max', classNames.inputMax),
|
|
105
105
|
type: "number",
|
|
106
106
|
min: min,
|
|
107
107
|
max: max,
|
|
@@ -118,7 +118,7 @@ function RangeInput(_ref) {
|
|
|
118
118
|
});
|
|
119
119
|
}
|
|
120
120
|
})), /*#__PURE__*/_react.default.createElement("button", {
|
|
121
|
-
className: (0,
|
|
121
|
+
className: (0, _instantsearchUiComponents.cx)('ais-RangeInput-submit', classNames.submit),
|
|
122
122
|
type: "submit"
|
|
123
123
|
}, translations.submitButtonText)));
|
|
124
124
|
}
|