@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.esm.js
CHANGED
|
@@ -11754,7 +11754,9 @@ var Rating = function (_a) {
|
|
|
11754
11754
|
var _b = _a.size, size = _b === void 0 ? 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;
|
|
11755
11755
|
function handleAnchorClick(e) {
|
|
11756
11756
|
var _a;
|
|
11757
|
-
e.
|
|
11757
|
+
if (e.cancelable) {
|
|
11758
|
+
e.preventDefault();
|
|
11759
|
+
}
|
|
11758
11760
|
if (reviewsContainerId) {
|
|
11759
11761
|
(_a = document.querySelector(reviewsContainerId)) === null || _a === void 0 ? void 0 : _a.scrollIntoView({
|
|
11760
11762
|
behavior: 'smooth',
|
|
@@ -13616,9 +13618,15 @@ var SearchBar = function (_a) {
|
|
|
13616
13618
|
onClose();
|
|
13617
13619
|
}
|
|
13618
13620
|
};
|
|
13619
|
-
return (jsxs$1("form", __assign$1({ role: "search", onSubmit: function (e) {
|
|
13621
|
+
return (jsxs$1("form", __assign$1({ role: "search", onSubmit: function (e) {
|
|
13622
|
+
if (e.cancelable) {
|
|
13623
|
+
e.preventDefault();
|
|
13624
|
+
}
|
|
13625
|
+
}, ref: ref, style: { position: 'relative' } }, { children: [jsxs$1(Container$p, __assign$1({ theme: theme }, { children: [jsx$1(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) {
|
|
13620
13626
|
if (e.key === 'Enter') {
|
|
13621
|
-
e.
|
|
13627
|
+
if (e.cancelable) {
|
|
13628
|
+
e.preventDefault();
|
|
13629
|
+
}
|
|
13622
13630
|
e.stopPropagation();
|
|
13623
13631
|
onSearch(state.term);
|
|
13624
13632
|
}
|
|
@@ -13671,7 +13679,9 @@ function usePreventVerticalScroll(ref, dragThreshold) {
|
|
|
13671
13679
|
clientX.current = e.touches[0].clientX - firstClientX.current;
|
|
13672
13680
|
// Vertical scrolling does not work when you start swiping horizontally.
|
|
13673
13681
|
if (Math.abs(clientX.current) > dragThreshold) {
|
|
13674
|
-
e.
|
|
13682
|
+
if (e.cancelable) {
|
|
13683
|
+
e.preventDefault();
|
|
13684
|
+
}
|
|
13675
13685
|
e.returnValue = false;
|
|
13676
13686
|
return false;
|
|
13677
13687
|
}
|