@trafilea/afrodita-components 5.0.0-beta.231 → 5.0.0-beta.232
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/build/index.esm.js +14 -4
- package/build/index.esm.js.map +1 -1
- package/build/index.js +14 -4
- package/build/index.js.map +1 -1
- package/package.json +1 -1
package/build/index.js
CHANGED
|
@@ -11780,7 +11780,9 @@ var Rating = function (_a) {
|
|
|
11780
11780
|
var _b = _a.size, size = _b === void 0 ? exports.ComponentSize.Medium : _b, reviews = _a.reviews, reviewsText = _a.reviewsText, rating = _a.rating, _c = _a.wrapWithParenthesis, wrapWithParenthesis = _c === void 0 ? false : _c, _d = _a.underline, underline = _d === void 0 ? false : _d, reviewsContainerId = _a.reviewsContainerId;
|
|
11781
11781
|
function handleAnchorClick(e) {
|
|
11782
11782
|
var _a;
|
|
11783
|
-
e.
|
|
11783
|
+
if (e.cancelable) {
|
|
11784
|
+
e.preventDefault();
|
|
11785
|
+
}
|
|
11784
11786
|
if (reviewsContainerId) {
|
|
11785
11787
|
(_a = document.querySelector(reviewsContainerId)) === null || _a === void 0 ? void 0 : _a.scrollIntoView({
|
|
11786
11788
|
behavior: 'smooth',
|
|
@@ -13642,9 +13644,15 @@ var SearchBar = function (_a) {
|
|
|
13642
13644
|
onClose();
|
|
13643
13645
|
}
|
|
13644
13646
|
};
|
|
13645
|
-
return (jsxRuntime.jsxs("form", __assign$1({ role: "search", onSubmit: function (e) {
|
|
13647
|
+
return (jsxRuntime.jsxs("form", __assign$1({ role: "search", onSubmit: function (e) {
|
|
13648
|
+
if (e.cancelable) {
|
|
13649
|
+
e.preventDefault();
|
|
13650
|
+
}
|
|
13651
|
+
}, ref: ref, style: { position: 'relative' } }, { children: [jsxRuntime.jsxs(Container$p, __assign$1({ theme: theme }, { children: [jsxRuntime.jsx(Input, { value: state.term, placeholder: placeholder, onChange: function (e) { return dispatch({ type: 'UPDATE_TERM', payload: { term: e.target.value } }); }, onFocus: function () { return dispatch({ type: 'TOGGLE_PANEL', payload: { open: true } }); }, id: id, autoComplete: autoComplete, theme: theme, "aria-label": ariaLabel, onKeyDown: function (e) {
|
|
13646
13652
|
if (e.key === 'Enter') {
|
|
13647
|
-
e.
|
|
13653
|
+
if (e.cancelable) {
|
|
13654
|
+
e.preventDefault();
|
|
13655
|
+
}
|
|
13648
13656
|
e.stopPropagation();
|
|
13649
13657
|
onSearch(state.term);
|
|
13650
13658
|
}
|
|
@@ -13697,7 +13705,9 @@ function usePreventVerticalScroll(ref, dragThreshold) {
|
|
|
13697
13705
|
clientX.current = e.touches[0].clientX - firstClientX.current;
|
|
13698
13706
|
// Vertical scrolling does not work when you start swiping horizontally.
|
|
13699
13707
|
if (Math.abs(clientX.current) > dragThreshold) {
|
|
13700
|
-
e.
|
|
13708
|
+
if (e.cancelable) {
|
|
13709
|
+
e.preventDefault();
|
|
13710
|
+
}
|
|
13701
13711
|
e.returnValue = false;
|
|
13702
13712
|
return false;
|
|
13703
13713
|
}
|