react-instantsearch 7.25.0 → 7.26.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.
Files changed (127) hide show
  1. package/dist/cjs/components/AutocompleteSearch.js +25 -36
  2. package/dist/cjs/components/Carousel.js +25 -39
  3. package/dist/cjs/components/index.js +6 -15
  4. package/dist/cjs/index.js +85 -44
  5. package/dist/cjs/lib/useStickToBottom.js +11 -17
  6. package/dist/cjs/package.json +4 -1
  7. package/dist/cjs/types/PartialKeys.js +2 -1
  8. package/dist/cjs/types/Translatable.js +2 -1
  9. package/dist/cjs/types/index.js +1 -26
  10. package/dist/cjs/ui/Breadcrumb.js +52 -57
  11. package/dist/cjs/ui/ClearRefinements.js +23 -28
  12. package/dist/cjs/ui/CurrentRefinements.js +48 -50
  13. package/dist/cjs/ui/HierarchicalMenu.js +71 -79
  14. package/dist/cjs/ui/Highlight.js +21 -25
  15. package/dist/cjs/ui/HitsPerPage.js +31 -34
  16. package/dist/cjs/ui/InfiniteHits.js +83 -88
  17. package/dist/cjs/ui/InternalHighlight.js +9 -10
  18. package/dist/cjs/ui/Menu.js +53 -56
  19. package/dist/cjs/ui/Pagination.js +117 -124
  20. package/dist/cjs/ui/PoweredBy.js +33 -37
  21. package/dist/cjs/ui/RangeInput.js +96 -116
  22. package/dist/cjs/ui/RefinementList.js +66 -67
  23. package/dist/cjs/ui/ReverseHighlight.js +21 -25
  24. package/dist/cjs/ui/SearchBox.js +141 -151
  25. package/dist/cjs/ui/ShowMoreButton.js +14 -17
  26. package/dist/cjs/ui/Snippet.js +21 -25
  27. package/dist/cjs/ui/SortBy.js +32 -36
  28. package/dist/cjs/ui/Stats.js +29 -32
  29. package/dist/cjs/ui/ToggleRefinement.js +30 -33
  30. package/dist/cjs/ui/lib/capitalize.js +5 -7
  31. package/dist/cjs/ui/lib/index.js +8 -26
  32. package/dist/cjs/ui/lib/isModifierClick.js +6 -8
  33. package/dist/cjs/widgets/Autocomplete.js +450 -491
  34. package/dist/cjs/widgets/Breadcrumb.js +34 -47
  35. package/dist/cjs/widgets/Chat.js +174 -221
  36. package/dist/cjs/widgets/ClearRefinements.js +31 -42
  37. package/dist/cjs/widgets/CurrentRefinements.js +27 -32
  38. package/dist/cjs/widgets/FilterSuggestions.js +46 -53
  39. package/dist/cjs/widgets/FrequentlyBoughtTogether.js +66 -74
  40. package/dist/cjs/widgets/HierarchicalMenu.js +53 -68
  41. package/dist/cjs/widgets/Highlight.js +31 -31
  42. package/dist/cjs/widgets/Hits.js +59 -64
  43. package/dist/cjs/widgets/HitsPerPage.js +32 -38
  44. package/dist/cjs/widgets/InfiniteHits.js +44 -61
  45. package/dist/cjs/widgets/LookingSimilar.js +66 -74
  46. package/dist/cjs/widgets/Menu.js +48 -62
  47. package/dist/cjs/widgets/Pagination.js +59 -74
  48. package/dist/cjs/widgets/PoweredBy.js +14 -17
  49. package/dist/cjs/widgets/RangeInput.js +38 -51
  50. package/dist/cjs/widgets/RefinementList.js +100 -125
  51. package/dist/cjs/widgets/RelatedProducts.js +66 -74
  52. package/dist/cjs/widgets/ReverseHighlight.js +38 -44
  53. package/dist/cjs/widgets/SearchBox.js +63 -86
  54. package/dist/cjs/widgets/Snippet.js +31 -31
  55. package/dist/cjs/widgets/SortBy.js +26 -32
  56. package/dist/cjs/widgets/Stats.js +54 -68
  57. package/dist/cjs/widgets/ToggleRefinement.js +33 -38
  58. package/dist/cjs/widgets/TrendingItems.js +70 -78
  59. package/dist/cjs/widgets/chat/tools/SearchIndexTool.js +92 -99
  60. package/dist/cjs/widgets/index.js +77 -289
  61. package/dist/cjs/widgets/index.umd.js +68 -322
  62. package/dist/es/components/AutocompleteSearch.js +22 -28
  63. package/dist/es/components/Carousel.js +23 -31
  64. package/dist/es/components/index.js +1 -1
  65. package/dist/es/index.js +29 -4
  66. package/dist/es/lib/useStickToBottom.js +10 -12
  67. package/dist/es/package.json +4 -0
  68. package/dist/es/types/PartialKeys.js +1 -1
  69. package/dist/es/types/Translatable.js +1 -1
  70. package/dist/es/types/index.js +1 -2
  71. package/dist/es/ui/Breadcrumb.js +49 -49
  72. package/dist/es/ui/ClearRefinements.js +21 -21
  73. package/dist/es/ui/CurrentRefinements.js +46 -43
  74. package/dist/es/ui/HierarchicalMenu.js +68 -71
  75. package/dist/es/ui/Highlight.js +19 -18
  76. package/dist/es/ui/HitsPerPage.js +29 -27
  77. package/dist/es/ui/InfiniteHits.js +80 -80
  78. package/dist/es/ui/InternalHighlight.js +7 -4
  79. package/dist/es/ui/Menu.js +51 -49
  80. package/dist/es/ui/Pagination.js +114 -116
  81. package/dist/es/ui/PoweredBy.js +31 -30
  82. package/dist/es/ui/RangeInput.js +93 -107
  83. package/dist/es/ui/RefinementList.js +64 -60
  84. package/dist/es/ui/ReverseHighlight.js +19 -18
  85. package/dist/es/ui/SearchBox.js +138 -143
  86. package/dist/es/ui/ShowMoreButton.js +13 -11
  87. package/dist/es/ui/Snippet.js +19 -18
  88. package/dist/es/ui/SortBy.js +30 -29
  89. package/dist/es/ui/Stats.js +27 -25
  90. package/dist/es/ui/ToggleRefinement.js +28 -26
  91. package/dist/es/ui/lib/capitalize.js +5 -3
  92. package/dist/es/ui/lib/index.js +2 -2
  93. package/dist/es/ui/lib/isModifierClick.js +6 -4
  94. package/dist/es/widgets/Autocomplete.js +438 -474
  95. package/dist/es/widgets/Breadcrumb.js +31 -39
  96. package/dist/es/widgets/Chat.js +164 -196
  97. package/dist/es/widgets/ClearRefinements.js +28 -34
  98. package/dist/es/widgets/CurrentRefinements.js +24 -24
  99. package/dist/es/widgets/FilterSuggestions.js +41 -42
  100. package/dist/es/widgets/FrequentlyBoughtTogether.js +62 -65
  101. package/dist/es/widgets/HierarchicalMenu.js +50 -60
  102. package/dist/es/widgets/Highlight.js +30 -25
  103. package/dist/es/widgets/Hits.js +54 -53
  104. package/dist/es/widgets/HitsPerPage.js +29 -30
  105. package/dist/es/widgets/InfiniteHits.js +41 -53
  106. package/dist/es/widgets/LookingSimilar.js +62 -65
  107. package/dist/es/widgets/Menu.js +45 -54
  108. package/dist/es/widgets/Pagination.js +56 -66
  109. package/dist/es/widgets/PoweredBy.js +12 -10
  110. package/dist/es/widgets/RangeInput.js +35 -43
  111. package/dist/es/widgets/RefinementList.js +98 -118
  112. package/dist/es/widgets/RelatedProducts.js +61 -64
  113. package/dist/es/widgets/ReverseHighlight.js +36 -37
  114. package/dist/es/widgets/SearchBox.js +61 -79
  115. package/dist/es/widgets/Snippet.js +30 -25
  116. package/dist/es/widgets/SortBy.js +23 -24
  117. package/dist/es/widgets/Stats.js +51 -60
  118. package/dist/es/widgets/ToggleRefinement.js +30 -30
  119. package/dist/es/widgets/TrendingItems.js +65 -68
  120. package/dist/es/widgets/chat/tools/SearchIndexTool.js +89 -91
  121. package/dist/es/widgets/index.js +27 -26
  122. package/dist/es/widgets/index.umd.js +36 -33
  123. package/dist/umd/ReactInstantSearch.js +23411 -30098
  124. package/dist/umd/ReactInstantSearch.min.js +3 -3
  125. package/package.json +8 -12
  126. package/dist/umd/ReactInstantSearch.js.map +0 -1
  127. package/dist/umd/ReactInstantSearch.min.js.map +0 -1
@@ -1,150 +1,145 @@
1
- var _excluded = ["formRef", "inputRef", "inputProps", "isSearchStalled", "onChange", "onReset", "onSubmit", "placeholder", "value", "autoFocus", "resetIconComponent", "submitIconComponent", "loadingIconComponent", "classNames", "translations"];
2
- function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
3
- function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
4
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
1
+ import { _ as _$2 } from '@swc/helpers/cjs/_object_spread.cjs';
2
+ import { _ as _$1 } from '@swc/helpers/cjs/_object_spread_props.cjs';
3
+ import { _ } from '@swc/helpers/cjs/_object_without_properties.cjs';
5
4
  import { cx } from 'instantsearch-ui-components';
6
5
  import React from 'react';
7
- var _ref2 = /*#__PURE__*/React.createElement("path", {
8
- d: "M26.804 29.01c-2.832 2.34-6.465 3.746-10.426 3.746C7.333 32.756 0 25.424 0 16.378 0 7.333 7.333 0 16.378 0c9.046 0 16.378 7.333 16.378 16.378 0 3.96-1.406 7.594-3.746 10.426l10.534 10.534c.607.607.61 1.59-.004 2.202-.61.61-1.597.61-2.202.004L26.804 29.01zm-10.426.627c7.323 0 13.26-5.936 13.26-13.26 0-7.32-5.937-13.257-13.26-13.257C9.056 3.12 3.12 9.056 3.12 16.378c0 7.323 5.936 13.26 13.258 13.26z"
9
- });
10
- function DefaultSubmitIcon(_ref) {
11
- var classNames = _ref.classNames;
12
- return /*#__PURE__*/React.createElement("svg", {
13
- className: cx('ais-SearchBox-submitIcon', classNames.submitIcon),
14
- width: "10",
15
- height: "10",
16
- viewBox: "0 0 40 40",
17
- "aria-hidden": "true"
18
- }, _ref2);
6
+
7
+ function DefaultSubmitIcon(param) {
8
+ var classNames = param.classNames;
9
+ return /*#__PURE__*/ React.createElement("svg", {
10
+ className: cx('ais-SearchBox-submitIcon', classNames.submitIcon),
11
+ width: "10",
12
+ height: "10",
13
+ viewBox: "0 0 40 40",
14
+ "aria-hidden": "true"
15
+ }, /*#__PURE__*/ React.createElement("path", {
16
+ d: "M26.804 29.01c-2.832 2.34-6.465 3.746-10.426 3.746C7.333 32.756 0 25.424 0 16.378 0 7.333 7.333 0 16.378 0c9.046 0 16.378 7.333 16.378 16.378 0 3.96-1.406 7.594-3.746 10.426l10.534 10.534c.607.607.61 1.59-.004 2.202-.61.61-1.597.61-2.202.004L26.804 29.01zm-10.426.627c7.323 0 13.26-5.936 13.26-13.26 0-7.32-5.937-13.257-13.26-13.257C9.056 3.12 3.12 9.056 3.12 16.378c0 7.323 5.936 13.26 13.258 13.26z"
17
+ }));
19
18
  }
20
- var _ref4 = /*#__PURE__*/React.createElement("path", {
21
- d: "M8.114 10L.944 2.83 0 1.885 1.886 0l.943.943L10 8.113l7.17-7.17.944-.943L20 1.886l-.943.943-7.17 7.17 7.17 7.17.943.944L18.114 20l-.943-.943-7.17-7.17-7.17 7.17-.944.943L0 18.114l.943-.943L8.113 10z"
22
- });
23
- function DefaultResetIcon(_ref3) {
24
- var classNames = _ref3.classNames;
25
- return /*#__PURE__*/React.createElement("svg", {
26
- className: cx('ais-SearchBox-resetIcon', classNames.resetIcon),
27
- viewBox: "0 0 20 20",
28
- width: "10",
29
- height: "10",
30
- "aria-hidden": "true"
31
- }, _ref4);
19
+ function DefaultResetIcon(param) {
20
+ var classNames = param.classNames;
21
+ return /*#__PURE__*/ React.createElement("svg", {
22
+ className: cx('ais-SearchBox-resetIcon', classNames.resetIcon),
23
+ viewBox: "0 0 20 20",
24
+ width: "10",
25
+ height: "10",
26
+ "aria-hidden": "true"
27
+ }, /*#__PURE__*/ React.createElement("path", {
28
+ d: "M8.114 10L.944 2.83 0 1.885 1.886 0l.943.943L10 8.113l7.17-7.17.944-.943L20 1.886l-.943.943-7.17 7.17 7.17 7.17.943.944L18.114 20l-.943-.943-7.17-7.17-7.17 7.17-.944.943L0 18.114l.943-.943L8.113 10z"
29
+ }));
32
30
  }
33
- var _ref6 = /*#__PURE__*/React.createElement("g", {
34
- fill: "none",
35
- fillRule: "evenodd"
36
- }, /*#__PURE__*/React.createElement("g", {
37
- transform: "translate(1 1)",
38
- strokeWidth: "2"
39
- }, /*#__PURE__*/React.createElement("circle", {
40
- strokeOpacity: ".5",
41
- cx: "18",
42
- cy: "18",
43
- r: "18"
44
- }), /*#__PURE__*/React.createElement("path", {
45
- d: "M36 18c0-9.94-8.06-18-18-18"
46
- }, /*#__PURE__*/React.createElement("animateTransform", {
47
- attributeName: "transform",
48
- type: "rotate",
49
- from: "0 18 18",
50
- to: "360 18 18",
51
- dur: "1s",
52
- repeatCount: "indefinite"
53
- }))));
54
- function DefaultLoadingIcon(_ref5) {
55
- var classNames = _ref5.classNames;
56
- return /*#__PURE__*/React.createElement("svg", {
57
- "aria-label": "Results are loading",
58
- width: "16",
59
- height: "16",
60
- viewBox: "0 0 38 38",
61
- stroke: "#444",
62
- className: cx('ais-SearchBox-loadingIcon', classNames.loadingIcon),
63
- "aria-hidden": "true"
64
- }, _ref6);
31
+ function DefaultLoadingIcon(param) {
32
+ var classNames = param.classNames;
33
+ return /*#__PURE__*/ React.createElement("svg", {
34
+ "aria-label": "Results are loading",
35
+ width: "16",
36
+ height: "16",
37
+ viewBox: "0 0 38 38",
38
+ stroke: "#444",
39
+ className: cx('ais-SearchBox-loadingIcon', classNames.loadingIcon),
40
+ "aria-hidden": "true"
41
+ }, /*#__PURE__*/ React.createElement("g", {
42
+ fill: "none",
43
+ fillRule: "evenodd"
44
+ }, /*#__PURE__*/ React.createElement("g", {
45
+ transform: "translate(1 1)",
46
+ strokeWidth: "2"
47
+ }, /*#__PURE__*/ React.createElement("circle", {
48
+ strokeOpacity: ".5",
49
+ cx: "18",
50
+ cy: "18",
51
+ r: "18"
52
+ }), /*#__PURE__*/ React.createElement("path", {
53
+ d: "M36 18c0-9.94-8.06-18-18-18"
54
+ }, /*#__PURE__*/ React.createElement("animateTransform", {
55
+ attributeName: "transform",
56
+ type: "rotate",
57
+ from: "0 18 18",
58
+ to: "360 18 18",
59
+ dur: "1s",
60
+ repeatCount: "indefinite"
61
+ })))));
65
62
  }
66
- export function SearchBox(_ref7) {
67
- var formRef = _ref7.formRef,
68
- inputRef = _ref7.inputRef,
69
- inputProps = _ref7.inputProps,
70
- isSearchStalled = _ref7.isSearchStalled,
71
- onChange = _ref7.onChange,
72
- onReset = _ref7.onReset,
73
- onSubmit = _ref7.onSubmit,
74
- _ref7$placeholder = _ref7.placeholder,
75
- placeholder = _ref7$placeholder === void 0 ? '' : _ref7$placeholder,
76
- value = _ref7.value,
77
- autoFocus = _ref7.autoFocus,
78
- _ref7$resetIconCompon = _ref7.resetIconComponent,
79
- ResetIcon = _ref7$resetIconCompon === void 0 ? DefaultResetIcon : _ref7$resetIconCompon,
80
- _ref7$submitIconCompo = _ref7.submitIconComponent,
81
- SubmitIcon = _ref7$submitIconCompo === void 0 ? DefaultSubmitIcon : _ref7$submitIconCompo,
82
- _ref7$loadingIconComp = _ref7.loadingIconComponent,
83
- LoadingIcon = _ref7$loadingIconComp === void 0 ? DefaultLoadingIcon : _ref7$loadingIconComp,
84
- _ref7$classNames = _ref7.classNames,
85
- classNames = _ref7$classNames === void 0 ? {} : _ref7$classNames,
86
- translations = _ref7.translations,
87
- props = _objectWithoutProperties(_ref7, _excluded);
88
- function handleSubmit(event) {
89
- event.preventDefault();
90
- event.stopPropagation();
91
- if (onSubmit) {
92
- onSubmit(event);
63
+ function SearchBox(_0) {
64
+ var formRef = _0.formRef, inputRef = _0.inputRef, inputProps = _0.inputProps, isSearchStalled = _0.isSearchStalled, onChange = _0.onChange, onReset = _0.onReset, onSubmit = _0.onSubmit, _0_placeholder = _0.placeholder, placeholder = _0_placeholder === void 0 ? '' : _0_placeholder, value = _0.value, autoFocus = _0.autoFocus, tmp = _0.resetIconComponent, ResetIcon = tmp === void 0 ? DefaultResetIcon : tmp, tmp1 = _0.submitIconComponent, SubmitIcon = tmp1 === void 0 ? DefaultSubmitIcon : tmp1, tmp2 = _0.loadingIconComponent, LoadingIcon = tmp2 === void 0 ? DefaultLoadingIcon : tmp2, _0_classNames = _0.classNames, classNames = _0_classNames === void 0 ? {} : _0_classNames, translations = _0.translations, props = _(_0, [
65
+ "formRef",
66
+ "inputRef",
67
+ "inputProps",
68
+ "isSearchStalled",
69
+ "onChange",
70
+ "onReset",
71
+ "onSubmit",
72
+ "placeholder",
73
+ "value",
74
+ "autoFocus",
75
+ "resetIconComponent",
76
+ "submitIconComponent",
77
+ "loadingIconComponent",
78
+ "classNames",
79
+ "translations"
80
+ ]);
81
+ function handleSubmit(event) {
82
+ event.preventDefault();
83
+ event.stopPropagation();
84
+ if (onSubmit) {
85
+ onSubmit(event);
86
+ }
87
+ if (inputRef.current) {
88
+ inputRef.current.blur();
89
+ }
93
90
  }
94
- if (inputRef.current) {
95
- inputRef.current.blur();
91
+ function handleReset(event) {
92
+ event.preventDefault();
93
+ event.stopPropagation();
94
+ onReset(event);
95
+ if (inputRef.current) {
96
+ inputRef.current.focus();
97
+ }
96
98
  }
97
- }
98
- function handleReset(event) {
99
- event.preventDefault();
100
- event.stopPropagation();
101
- onReset(event);
102
- if (inputRef.current) {
103
- inputRef.current.focus();
104
- }
105
- }
106
- return /*#__PURE__*/React.createElement("div", _extends({}, props, {
107
- className: cx('ais-SearchBox', classNames.root, props.className)
108
- }), /*#__PURE__*/React.createElement("form", {
109
- ref: formRef,
110
- action: "",
111
- className: cx('ais-SearchBox-form', classNames.form),
112
- noValidate: true,
113
- onSubmit: handleSubmit,
114
- onReset: handleReset,
115
- role: "search"
116
- }, /*#__PURE__*/React.createElement("input", _extends({}, inputProps, {
117
- ref: inputRef,
118
- className: cx('ais-SearchBox-input', classNames.input, inputProps === null || inputProps === void 0 ? void 0 : inputProps.className),
119
- "aria-label": "Search",
120
- autoComplete: "off",
121
- autoCorrect: "off",
122
- autoCapitalize: "off",
123
- placeholder: placeholder,
124
- spellCheck: false,
125
- maxLength: 512,
126
- type: "search",
127
- value: value,
128
- onChange: onChange,
129
- onCompositionEnd: onChange,
130
- autoFocus: autoFocus
131
- })), /*#__PURE__*/React.createElement("button", {
132
- className: cx('ais-SearchBox-submit', classNames.submit),
133
- type: "submit",
134
- title: translations.submitButtonTitle
135
- }, /*#__PURE__*/React.createElement(SubmitIcon, {
136
- classNames: classNames
137
- })), /*#__PURE__*/React.createElement("button", {
138
- className: cx('ais-SearchBox-reset', classNames.reset),
139
- type: "reset",
140
- title: translations.resetButtonTitle,
141
- hidden: value.length === 0 || isSearchStalled
142
- }, /*#__PURE__*/React.createElement(ResetIcon, {
143
- classNames: classNames
144
- })), /*#__PURE__*/React.createElement("span", {
145
- className: cx('ais-SearchBox-loadingIndicator', classNames.loadingIndicator),
146
- hidden: !isSearchStalled
147
- }, /*#__PURE__*/React.createElement(LoadingIcon, {
148
- classNames: classNames
149
- }))));
150
- }
99
+ return /*#__PURE__*/ React.createElement("div", _$1(_$2({}, props), {
100
+ className: cx('ais-SearchBox', classNames.root, props.className)
101
+ }), /*#__PURE__*/ React.createElement("form", {
102
+ ref: formRef,
103
+ action: "",
104
+ className: cx('ais-SearchBox-form', classNames.form),
105
+ noValidate: true,
106
+ onSubmit: handleSubmit,
107
+ onReset: handleReset,
108
+ role: "search"
109
+ }, /*#__PURE__*/ React.createElement("input", _$1(_$2({}, inputProps), {
110
+ ref: inputRef,
111
+ className: cx('ais-SearchBox-input', classNames.input, inputProps === null || inputProps === void 0 ? void 0 : inputProps.className),
112
+ "aria-label": "Search",
113
+ autoComplete: "off",
114
+ autoCorrect: "off",
115
+ autoCapitalize: "off",
116
+ placeholder: placeholder,
117
+ spellCheck: false,
118
+ maxLength: 512,
119
+ type: "search",
120
+ value: value,
121
+ onChange: onChange,
122
+ onCompositionEnd: onChange,
123
+ autoFocus: autoFocus
124
+ })), /*#__PURE__*/ React.createElement("button", {
125
+ className: cx('ais-SearchBox-submit', classNames.submit),
126
+ type: "submit",
127
+ title: translations.submitButtonTitle
128
+ }, /*#__PURE__*/ React.createElement(SubmitIcon, {
129
+ classNames: classNames
130
+ })), /*#__PURE__*/ React.createElement("button", {
131
+ className: cx('ais-SearchBox-reset', classNames.reset),
132
+ type: "reset",
133
+ title: translations.resetButtonTitle,
134
+ hidden: value.length === 0 || isSearchStalled
135
+ }, /*#__PURE__*/ React.createElement(ResetIcon, {
136
+ classNames: classNames
137
+ })), /*#__PURE__*/ React.createElement("span", {
138
+ className: cx('ais-SearchBox-loadingIndicator', classNames.loadingIndicator),
139
+ hidden: !isSearchStalled
140
+ }, /*#__PURE__*/ React.createElement(LoadingIcon, {
141
+ classNames: classNames
142
+ }))));
143
+ }
144
+
145
+ export { SearchBox };
@@ -1,12 +1,14 @@
1
- var _excluded = ["isShowingMore", "translations"];
2
- function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
3
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
1
+ import { _ } from '@swc/helpers/cjs/_object_without_properties.cjs';
4
2
  import React from 'react';
5
- export function ShowMoreButton(_ref) {
6
- var isShowingMore = _ref.isShowingMore,
7
- translations = _ref.translations,
8
- props = _objectWithoutProperties(_ref, _excluded);
9
- return /*#__PURE__*/React.createElement("button", props, translations.showMoreButtonText({
10
- isShowingMore: isShowingMore
11
- }));
12
- }
3
+
4
+ function ShowMoreButton(_0) {
5
+ var isShowingMore = _0.isShowingMore, translations = _0.translations, props = _(_0, [
6
+ "isShowingMore",
7
+ "translations"
8
+ ]);
9
+ return /*#__PURE__*/ React.createElement("button", props, translations.showMoreButtonText({
10
+ isShowingMore: isShowingMore
11
+ }));
12
+ }
13
+
14
+ export { ShowMoreButton };
@@ -1,20 +1,21 @@
1
- var _excluded = ["classNames"];
2
- function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
3
- function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
4
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
1
+ import { _ as _$1 } from '@swc/helpers/cjs/_object_spread.cjs';
2
+ import { _ } from '@swc/helpers/cjs/_object_without_properties.cjs';
5
3
  import { cx } from 'instantsearch-ui-components';
6
4
  import React from 'react';
7
- import { InternalHighlight } from "./InternalHighlight.js";
8
- export function Snippet(_ref) {
9
- var _ref$classNames = _ref.classNames,
10
- classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
11
- props = _objectWithoutProperties(_ref, _excluded);
12
- return /*#__PURE__*/React.createElement(InternalHighlight, _extends({
13
- classNames: {
14
- root: cx('ais-Snippet', classNames.root),
15
- highlighted: cx('ais-Snippet-highlighted', classNames.highlighted),
16
- nonHighlighted: cx('ais-Snippet-nonHighlighted', classNames.nonHighlighted),
17
- separator: cx('ais-Snippet-separator', classNames.separator)
18
- }
19
- }, props));
20
- }
5
+ import { InternalHighlight } from './InternalHighlight.js';
6
+
7
+ function Snippet(_0) {
8
+ var _0_classNames = _0.classNames, classNames = _0_classNames === void 0 ? {} : _0_classNames, props = _(_0, [
9
+ "classNames"
10
+ ]);
11
+ return /*#__PURE__*/ React.createElement(InternalHighlight, _$1({
12
+ classNames: {
13
+ root: cx('ais-Snippet', classNames.root),
14
+ highlighted: cx('ais-Snippet-highlighted', classNames.highlighted),
15
+ nonHighlighted: cx('ais-Snippet-nonHighlighted', classNames.nonHighlighted),
16
+ separator: cx('ais-Snippet-separator', classNames.separator)
17
+ }
18
+ }, props));
19
+ }
20
+
21
+ export { Snippet };
@@ -1,31 +1,32 @@
1
- var _excluded = ["items", "value", "onChange", "classNames"];
2
- function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
3
- function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
4
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
1
+ import { _ as _$2 } from '@swc/helpers/cjs/_object_spread.cjs';
2
+ import { _ as _$1 } from '@swc/helpers/cjs/_object_spread_props.cjs';
3
+ import { _ } from '@swc/helpers/cjs/_object_without_properties.cjs';
5
4
  import { cx } from 'instantsearch-ui-components';
6
5
  import React from 'react';
7
- export function SortBy(_ref) {
8
- var items = _ref.items,
9
- value = _ref.value,
10
- _ref$onChange = _ref.onChange,
11
- _onChange = _ref$onChange === void 0 ? function () {} : _ref$onChange,
12
- _ref$classNames = _ref.classNames,
13
- classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
14
- props = _objectWithoutProperties(_ref, _excluded);
15
- return /*#__PURE__*/React.createElement("div", _extends({}, props, {
16
- className: cx('ais-SortBy', classNames.root, props.className)
17
- }), /*#__PURE__*/React.createElement("select", {
18
- className: cx('ais-SortBy-select', classNames.select),
19
- onChange: function onChange(event) {
20
- return _onChange(event.target.value);
21
- },
22
- value: value,
23
- "aria-label": "Sort results by"
24
- }, items.map(function (item) {
25
- return /*#__PURE__*/React.createElement("option", {
26
- className: cx('ais-SortBy-option', classNames.option),
27
- key: item.value,
28
- value: item.value
29
- }, item.label);
30
- })));
31
- }
6
+
7
+ function SortBy(_0) {
8
+ var items = _0.items, value = _0.value, _0_onChange = _0.onChange, onChange = _0_onChange === void 0 ? function() {} : _0_onChange, _0_classNames = _0.classNames, classNames = _0_classNames === void 0 ? {} : _0_classNames, props = _(_0, [
9
+ "items",
10
+ "value",
11
+ "onChange",
12
+ "classNames"
13
+ ]);
14
+ return /*#__PURE__*/ React.createElement("div", _$1(_$2({}, props), {
15
+ className: cx('ais-SortBy', classNames.root, props.className)
16
+ }), /*#__PURE__*/ React.createElement("select", {
17
+ className: cx('ais-SortBy-select', classNames.select),
18
+ onChange: function onChange1(event) {
19
+ return onChange(event.target.value);
20
+ },
21
+ value: value,
22
+ "aria-label": "Sort results by"
23
+ }, items.map(function(item) {
24
+ return /*#__PURE__*/ React.createElement("option", {
25
+ className: cx('ais-SortBy-option', classNames.option),
26
+ key: item.value,
27
+ value: item.value
28
+ }, item.label);
29
+ })));
30
+ }
31
+
32
+ export { SortBy };
@@ -1,27 +1,29 @@
1
- var _excluded = ["classNames", "nbHits", "processingTimeMS", "nbSortedHits", "areHitsSorted", "translations"];
2
- function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
3
- function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
4
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
1
+ import { _ as _$2 } from '@swc/helpers/cjs/_object_spread.cjs';
2
+ import { _ as _$1 } from '@swc/helpers/cjs/_object_spread_props.cjs';
3
+ import { _ } from '@swc/helpers/cjs/_object_without_properties.cjs';
5
4
  import { cx } from 'instantsearch-ui-components';
6
5
  import React from 'react';
7
- export function Stats(_ref) {
8
- var _ref$classNames = _ref.classNames,
9
- classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
10
- nbHits = _ref.nbHits,
11
- processingTimeMS = _ref.processingTimeMS,
12
- nbSortedHits = _ref.nbSortedHits,
13
- areHitsSorted = _ref.areHitsSorted,
14
- translations = _ref.translations,
15
- props = _objectWithoutProperties(_ref, _excluded);
16
- var translationOptions = {
17
- nbHits: nbHits,
18
- processingTimeMS: processingTimeMS,
19
- nbSortedHits: nbSortedHits,
20
- areHitsSorted: areHitsSorted
21
- };
22
- return /*#__PURE__*/React.createElement("div", _extends({}, props, {
23
- className: cx('ais-Stats', classNames.root, props.className)
24
- }), /*#__PURE__*/React.createElement("span", {
25
- className: "ais-Stats-text"
26
- }, translations.rootElementText(translationOptions)));
27
- }
6
+
7
+ function Stats(_0) {
8
+ var _0_classNames = _0.classNames, classNames = _0_classNames === void 0 ? {} : _0_classNames, nbHits = _0.nbHits, processingTimeMS = _0.processingTimeMS, nbSortedHits = _0.nbSortedHits, areHitsSorted = _0.areHitsSorted, translations = _0.translations, props = _(_0, [
9
+ "classNames",
10
+ "nbHits",
11
+ "processingTimeMS",
12
+ "nbSortedHits",
13
+ "areHitsSorted",
14
+ "translations"
15
+ ]);
16
+ var translationOptions = {
17
+ nbHits: nbHits,
18
+ processingTimeMS: processingTimeMS,
19
+ nbSortedHits: nbSortedHits,
20
+ areHitsSorted: areHitsSorted
21
+ };
22
+ return /*#__PURE__*/ React.createElement("div", _$1(_$2({}, props), {
23
+ className: cx('ais-Stats', classNames.root, props.className)
24
+ }), /*#__PURE__*/ React.createElement("span", {
25
+ className: "ais-Stats-text"
26
+ }, translations.rootElementText(translationOptions)));
27
+ }
28
+
29
+ export { Stats };
@@ -1,28 +1,30 @@
1
- var _excluded = ["classNames", "checked", "onChange", "label"];
2
- function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
3
- function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
4
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
1
+ import { _ as _$2 } from '@swc/helpers/cjs/_object_spread.cjs';
2
+ import { _ as _$1 } from '@swc/helpers/cjs/_object_spread_props.cjs';
3
+ import { _ } from '@swc/helpers/cjs/_object_without_properties.cjs';
5
4
  import { cx } from 'instantsearch-ui-components';
6
5
  import React from 'react';
7
- export function ToggleRefinement(_ref) {
8
- var _ref$classNames = _ref.classNames,
9
- classNames = _ref$classNames === void 0 ? {} : _ref$classNames,
10
- checked = _ref.checked,
11
- _onChange = _ref.onChange,
12
- label = _ref.label,
13
- props = _objectWithoutProperties(_ref, _excluded);
14
- return /*#__PURE__*/React.createElement("div", _extends({}, props, {
15
- className: cx('ais-ToggleRefinement', classNames.root, props.className)
16
- }), /*#__PURE__*/React.createElement("label", {
17
- className: cx('ais-ToggleRefinement-label', classNames.label)
18
- }, /*#__PURE__*/React.createElement("input", {
19
- className: cx('ais-ToggleRefinement-checkbox', classNames.checkbox),
20
- type: "checkbox",
21
- checked: checked,
22
- onChange: function onChange(event) {
23
- _onChange(event.target.checked);
24
- }
25
- }), /*#__PURE__*/React.createElement("span", {
26
- className: cx('ais-ToggleRefinement-labelText', classNames.labelText)
27
- }, label)));
28
- }
6
+
7
+ function ToggleRefinement(_0) {
8
+ var _0_classNames = _0.classNames, classNames = _0_classNames === void 0 ? {} : _0_classNames, checked = _0.checked, onChange = _0.onChange, label = _0.label, props = _(_0, [
9
+ "classNames",
10
+ "checked",
11
+ "onChange",
12
+ "label"
13
+ ]);
14
+ return /*#__PURE__*/ React.createElement("div", _$1(_$2({}, props), {
15
+ className: cx('ais-ToggleRefinement', classNames.root, props.className)
16
+ }), /*#__PURE__*/ React.createElement("label", {
17
+ className: cx('ais-ToggleRefinement-label', classNames.label)
18
+ }, /*#__PURE__*/ React.createElement("input", {
19
+ className: cx('ais-ToggleRefinement-checkbox', classNames.checkbox),
20
+ type: "checkbox",
21
+ checked: checked,
22
+ onChange: function onChange1(event) {
23
+ onChange(event.target.checked);
24
+ }
25
+ }), /*#__PURE__*/ React.createElement("span", {
26
+ className: cx('ais-ToggleRefinement-labelText', classNames.labelText)
27
+ }, label)));
28
+ }
29
+
30
+ export { ToggleRefinement };
@@ -1,3 +1,5 @@
1
- export function capitalize(text) {
2
- return text.toString().charAt(0).toUpperCase() + text.toString().slice(1);
3
- }
1
+ function capitalize(text) {
2
+ return text.toString().charAt(0).toUpperCase() + text.toString().slice(1);
3
+ }
4
+
5
+ export { capitalize };
@@ -1,2 +1,2 @@
1
- export * from "./capitalize.js";
2
- export * from "./isModifierClick.js";
1
+ export { capitalize } from './capitalize.js';
2
+ export { isModifierClick } from './isModifierClick.js';
@@ -1,4 +1,6 @@
1
- export function isModifierClick(event) {
2
- var isMiddleClick = event.button === 1;
3
- return Boolean(isMiddleClick || event.altKey || event.ctrlKey || event.metaKey || event.shiftKey);
4
- }
1
+ function isModifierClick(event) {
2
+ var isMiddleClick = event.button === 1;
3
+ return Boolean(isMiddleClick || event.altKey || event.ctrlKey || event.metaKey || event.shiftKey);
4
+ }
5
+
6
+ export { isModifierClick };