@meduza/ui-kit-2 0.1.25 → 0.1.27

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.
@@ -790,7 +790,7 @@ var makeStyleContext = function makeStyleContext(classNames, styleContext, style
790
790
  return classNames.concat(context);
791
791
  };
792
792
 
793
- var styles$8 = {"root":"Tag-module_root__3IqWC","small":"Tag-module_small__2IAb7","large":"Tag-module_large__22z_o","dark":"Tag-module_dark__sgnt1","light":"Tag-module_light__1zUhp","gold":"Tag-module_gold__2ksA7","gray":"Tag-module_gray__mGAO_","inherit":"Tag-module_inherit__2QB5U","is1to1":"Tag-module_is1to1__3EDbC","is1to2":"Tag-module_is1to2__3xbC6","isInSuperBlock":"Tag-module_isInSuperBlock__38JE0","is1to3":"Tag-module_is1to3__3j5K-","is1to4":"Tag-module_is1to4__2vq4r","slide":"Tag-module_slide__2nMDw","game":"Tag-module_game__3j5yG","card":"Tag-module_card__1EAeF","live":"Tag-module_live__rwXuR","episode":"Tag-module_episode__3o6gg","podcast":"Tag-module_podcast__VPoll","rich":"Tag-module_rich__2URd9","isInDynamicBlock":"Tag-module_isInDynamicBlock__1YM9I","mobile":"Tag-module_mobile__QQxuv","desktop":"Tag-module_desktop__1Bjsy"};
793
+ var styles$8 = {"root":"Tag-module_root__3IqWC","small":"Tag-module_small__2IAb7","large":"Tag-module_large__22z_o","dark":"Tag-module_dark__sgnt1","light":"Tag-module_light__1zUhp","gold":"Tag-module_gold__2ksA7","gray":"Tag-module_gray__mGAO_","inherit":"Tag-module_inherit__2QB5U","is1to1":"Tag-module_is1to1__3EDbC","is1to2":"Tag-module_is1to2__3xbC6","isInSuperBlock":"Tag-module_isInSuperBlock__38JE0","is1to3":"Tag-module_is1to3__3j5K-","is1to4":"Tag-module_is1to4__2vq4r","slide":"Tag-module_slide__2nMDw","game":"Tag-module_game__3j5yG","richRelated":"Tag-module_richRelated__2vbQQ","card":"Tag-module_card__1EAeF","live":"Tag-module_live__rwXuR","episode":"Tag-module_episode__3o6gg","podcast":"Tag-module_podcast__VPoll","rich":"Tag-module_rich__2URd9","isInDynamicBlock":"Tag-module_isInDynamicBlock__1YM9I","mobile":"Tag-module_mobile__QQxuv","desktop":"Tag-module_desktop__1Bjsy"};
794
794
 
795
795
  var Tag = function Tag(_ref) {
796
796
  var children = _ref.children,
@@ -1503,6 +1503,8 @@ var RichTitle = function RichTitle(_ref) {
1503
1503
  featured = _ref$block$data.featured,
1504
1504
  first = _ref$block$data.first,
1505
1505
  second = _ref$block$data.second,
1506
+ _ref$block$data$as = _ref$block$data.as,
1507
+ TagName = _ref$block$data$as === void 0 ? 'h1' : _ref$block$data$as,
1506
1508
  styleContext = _ref.styleContext;
1507
1509
  var classNames = [[styles$n.root, true], [styles$n[onlyOn], true], [styles$n.featured, !!featured]];
1508
1510
 
@@ -1510,7 +1512,7 @@ var RichTitle = function RichTitle(_ref) {
1510
1512
  classNames = makeStyleContext(classNames, styleContext, styles$n);
1511
1513
  }
1512
1514
 
1513
- return React.createElement("h1", {
1515
+ return React.createElement(TagName, {
1514
1516
  "data-testid": "rich-title",
1515
1517
  className: makeClassName(classNames)
1516
1518
  }, first, second && React.createElement("span", null, " ", second));
@@ -1605,7 +1607,7 @@ var RelatedBlock = function RelatedBlock(_ref) {
1605
1607
 
1606
1608
  var handleClick = function handleClick(url) {
1607
1609
  if (trackClick) {
1608
- postMessage('simpleRelated', 'click', url);
1610
+ postMessage('simpleRelated', url, 'click');
1609
1611
  }
1610
1612
  };
1611
1613
 
@@ -1670,7 +1672,7 @@ var SourceBlock = function SourceBlock(_ref) {
1670
1672
  }, origin))));
1671
1673
  };
1672
1674
 
1673
- var styles$s = {"root":"RelatedRichBlock-module_root__3NYmj","wrapper":"RelatedRichBlock-module_wrapper__1eLIQ","overlay":"RelatedRichBlock-module_overlay__3XSg_","overlayHeader":"RelatedRichBlock-module_overlayHeader__2Nmbv","isRich":"RelatedRichBlock-module_isRich__1LnA4","body":"RelatedRichBlock-module_body__1ZHZS","isCard":"RelatedRichBlock-module_isCard__2naDz","hasGradient":"RelatedRichBlock-module_hasGradient__27LOk","cover":"RelatedRichBlock-module_cover__3yygp","tag":"RelatedRichBlock-module_tag__3OLyG","dark":"RelatedRichBlock-module_dark__3Y1fE","light":"RelatedRichBlock-module_light__2mUxL","mobile":"RelatedRichBlock-module_mobile__JpCS4","desktop":"RelatedRichBlock-module_desktop__trL0D"};
1675
+ var styles$s = {"root":"RelatedRichBlock-module_root__3NYmj","wrapper":"RelatedRichBlock-module_wrapper__1eLIQ","overlay":"RelatedRichBlock-module_overlay__3XSg_","overlayHeader":"RelatedRichBlock-module_overlayHeader__2Nmbv","isRich":"RelatedRichBlock-module_isRich__1LnA4","body":"RelatedRichBlock-module_body__1ZHZS","hasGradient":"RelatedRichBlock-module_hasGradient__27LOk","isCard":"RelatedRichBlock-module_isCard__2naDz","cover":"RelatedRichBlock-module_cover__3yygp","picture":"RelatedRichBlock-module_picture__128HJ","tag":"RelatedRichBlock-module_tag__3OLyG","dark":"RelatedRichBlock-module_dark__3Y1fE","light":"RelatedRichBlock-module_light__2mUxL","mobile":"RelatedRichBlock-module_mobile__JpCS4","desktop":"RelatedRichBlock-module_desktop__trL0D"};
1674
1676
 
1675
1677
  /* eslint-disable react/jsx-no-target-blank */
1676
1678
  var RelatedRichBlock = function RelatedRichBlock(_ref) {
@@ -1696,7 +1698,8 @@ var RelatedRichBlock = function RelatedRichBlock(_ref) {
1696
1698
 
1697
1699
  var cardType = "is" + toCapitalize(layout);
1698
1700
  useEffect(function () {
1699
- setType(Math.random() >= 0.5 ? 'simpleRelated' : 'richRelated');
1701
+ // setType(Math.random() >= 0.5 ? 'simpleRelated' : 'richRelated')
1702
+ setType('richRelated');
1700
1703
  }, []);
1701
1704
 
1702
1705
  var _useInView = useInView({
@@ -1752,7 +1755,7 @@ var RelatedRichBlock = function RelatedRichBlock(_ref) {
1752
1755
  return React.createElement("a", {
1753
1756
  "data-testid": "related-rich-block",
1754
1757
  className: makeClassName(classNames),
1755
- href: url,
1758
+ href: "/" + url,
1756
1759
  target: "_blank",
1757
1760
  onClick: function onClick() {
1758
1761
  return handleClick();
@@ -1769,14 +1772,16 @@ var RelatedRichBlock = function RelatedRichBlock(_ref) {
1769
1772
  }, React.createElement(Tag, {
1770
1773
  size: "small",
1771
1774
  theme: "inherit",
1772
- styleContext: "rich"
1775
+ styleContext: "richRelated"
1773
1776
  }, tag)), React.createElement("div", {
1774
1777
  className: styles$s.cover
1778
+ }, React.createElement("div", {
1779
+ className: styles$s.picture
1775
1780
  }, React.createElement(Image, {
1776
1781
  optimized: urls,
1777
1782
  ratio: ratio,
1778
1783
  display: "narrow"
1779
- })), React.createElement("div", {
1784
+ }))), React.createElement("div", {
1780
1785
  className: styles$s.body
1781
1786
  }, blocks.map(function (item) {
1782
1787
  return React.createElement(RenderBlocks, {