@trafilea/afrodita-components 5.0.0-beta.42 → 5.0.0-beta.43

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.
@@ -10607,13 +10607,22 @@ var CustomLabel = newStyled.div(function (_a) {
10607
10607
  var starsNumber = 5;
10608
10608
  var Rating = function (_a) {
10609
10609
  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;
10610
+ function handleAnchorClick(e) {
10611
+ var _a;
10612
+ e.preventDefault();
10613
+ if (reviewsContainerId) {
10614
+ (_a = document.querySelector(reviewsContainerId)) === null || _a === void 0 ? void 0 : _a.scrollIntoView({
10615
+ behavior: 'smooth',
10616
+ });
10617
+ }
10618
+ }
10610
10619
  var theme = useTheme();
10611
10620
  var containerAttributes = reviewsContainerId
10612
10621
  ? {
10613
10622
  href: reviewsContainerId,
10614
10623
  }
10615
10624
  : {};
10616
- return (jsxs$1(Container$x, __assign$1({ as: reviewsContainerId ? 'a' : 'div' }, containerAttributes, { "data-testid": "Container" }, { children: [jsx$1(StarList, { rating: rating, size: size, starsNumber: starsNumber, fill: theme.component.stars.element.color }, void 0), jsxs$1(CustomLabel, __assign$1({ theme: theme, size: size, wrapWithParenthesis: wrapWithParenthesis, underline: underline, "data-testid": "CustomLabel" }, { children: [reviews, " ", reviewsText] }), void 0)] }), void 0));
10625
+ return (jsxs$1(Container$x, __assign$1({ as: reviewsContainerId ? 'a' : 'div' }, containerAttributes, { "data-testid": "Container", onClick: handleAnchorClick }, { children: [jsx$1(StarList, { rating: rating, size: size, starsNumber: starsNumber, fill: theme.component.stars.element.color }, void 0), jsxs$1(CustomLabel, __assign$1({ theme: theme, size: size, wrapWithParenthesis: wrapWithParenthesis, underline: underline, "data-testid": "CustomLabel" }, { children: [reviews, " ", reviewsText] }), void 0)] }), void 0));
10617
10626
  };
10618
10627
 
10619
10628
  var Container$w = newStyled.div(templateObject_1$R || (templateObject_1$R = __makeTemplateObject(["\n display: flex;\n align-items: center;\n font-size: 0.88rem;\n"], ["\n display: flex;\n align-items: center;\n font-size: 0.88rem;\n"])));
@@ -11830,13 +11839,13 @@ var ImageContainer = newStyled.div(function (_a) {
11830
11839
  });
11831
11840
  });
11832
11841
  var Container$f = newStyled.a(templateObject_1$n || (templateObject_1$n = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n align-items: center;\n width: min-content;\n text-decoration: none;\n"], ["\n display: flex;\n flex-direction: column;\n align-items: center;\n width: min-content;\n text-decoration: none;\n"])));
11833
- var H1 = newStyled.h1(templateObject_2$d || (templateObject_2$d = __makeTemplateObject(["\n font-size: 0.875rem;\n font-weight: normal;\n line-height: 1.375rem;\n min-height: 2.75rem;\n text-align: center;\n color: ", ";\n margin: 0.25rem 0;\n text-align: ", ";\n"], ["\n font-size: 0.875rem;\n font-weight: normal;\n line-height: 1.375rem;\n min-height: 2.75rem;\n text-align: center;\n color: ", ";\n margin: 0.25rem 0;\n text-align: ", ";\n"])), function (props) { return props.theme.colors.pallete.secondary.color; }, function (props) { return props.align; });
11842
+ var H1 = newStyled.h1(templateObject_2$d || (templateObject_2$d = __makeTemplateObject(["\n font-size: 0.83rem;\n font-weight: normal;\n line-height: 1.375rem;\n min-height: 2.75rem;\n text-align: center;\n color: ", ";\n margin: 0.25rem 0;\n text-align: ", ";\n"], ["\n font-size: 0.83rem;\n font-weight: normal;\n line-height: 1.375rem;\n min-height: 2.75rem;\n text-align: center;\n color: ", ";\n margin: 0.25rem 0;\n text-align: ", ";\n"])), function (props) { return props.theme.colors.pallete.secondary.color; }, function (props) { return props.align; });
11834
11843
  var getStylesBySize = function (size) {
11835
11844
  switch (size) {
11836
11845
  case ComponentSize.Medium:
11837
11846
  return {
11838
- width: '12.1rem',
11839
- height: '15.8rem',
11847
+ width: '205px',
11848
+ height: '274px',
11840
11849
  };
11841
11850
  case ComponentSize.Small:
11842
11851
  return {
@@ -11851,8 +11860,8 @@ var getStylesBySize = function (size) {
11851
11860
  /* istanbul ignore next */
11852
11861
  default:
11853
11862
  return {
11854
- width: '12.1rem',
11855
- height: '15.8rem',
11863
+ width: '205px',
11864
+ height: '274px',
11856
11865
  };
11857
11866
  }
11858
11867
  };