@meduza/ui-kit-2 1.4.7-b → 1.4.8

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.
@@ -741,7 +741,7 @@ const DotsOnImage = ({
741
741
  })))))));
742
742
  };
743
743
 
744
- var styles$B = {"root":"Tag-module_root__sGbnM","small":"Tag-module_small__hcPrf","large":"Tag-module_large__EKMu6","dark":"Tag-module_dark__9SHCb","light":"Tag-module_light__qlfy3","gold":"Tag-module_gold__u0bzS","gray":"Tag-module_gray__eazPk","inherit":"Tag-module_inherit__z21c-","is1to1":"Tag-module_is1to1__V-fH5","is1to2":"Tag-module_is1to2__b9Obh","isInSuperBlock":"Tag-module_isInSuperBlock__wrFUY","is1to3":"Tag-module_is1to3__vZT-R","is1to4":"Tag-module_is1to4__MBh5V","slide":"Tag-module_slide__gzptP","game":"Tag-module_game__NmKec","podcastMaterial":"Tag-module_podcastMaterial__O-LBI","richRelated":"Tag-module_richRelated__Qs6Ei","isInBookRelated":"Tag-module_isInBookRelated__ikTaj","isInBlockMetaContainer":"Tag-module_isInBlockMetaContainer__bAmLh","card":"Tag-module_card__TX87-","live":"Tag-module_live__ykyR7","episode":"Tag-module_episode__3OHmN","podcast":"Tag-module_podcast__K6dHn","rich":"Tag-module_rich__vPnWd","isInDynamicBlock":"Tag-module_isInDynamicBlock__WNleF","isInPodcastPlayer":"Tag-module_isInPodcastPlayer__H4sK9","mobile":"Tag-module_mobile__19oMH","desktop":"Tag-module_desktop__cNyQs"};
744
+ var styles$B = {"root":"Tag-module_root__sGbnM","small":"Tag-module_small__hcPrf","large":"Tag-module_large__EKMu6","dark":"Tag-module_dark__9SHCb","light":"Tag-module_light__qlfy3","gold":"Tag-module_gold__u0bzS","gray":"Tag-module_gray__eazPk","inherit":"Tag-module_inherit__z21c-","overlay":"Tag-module_overlay__Xw8fF","is1to1":"Tag-module_is1to1__V-fH5","is1to2":"Tag-module_is1to2__b9Obh","isInSuperBlock":"Tag-module_isInSuperBlock__wrFUY","is1to3":"Tag-module_is1to3__vZT-R","is1to4":"Tag-module_is1to4__MBh5V","slide":"Tag-module_slide__gzptP","game":"Tag-module_game__NmKec","podcastMaterial":"Tag-module_podcastMaterial__O-LBI","richRelated":"Tag-module_richRelated__Qs6Ei","isInBookRelated":"Tag-module_isInBookRelated__ikTaj","isInBlockMetaContainer":"Tag-module_isInBlockMetaContainer__bAmLh","card":"Tag-module_card__TX87-","live":"Tag-module_live__ykyR7","episode":"Tag-module_episode__3OHmN","podcast":"Tag-module_podcast__K6dHn","rich":"Tag-module_rich__vPnWd","isInDynamicBlock":"Tag-module_isInDynamicBlock__WNleF","isInPodcastPlayer":"Tag-module_isInPodcastPlayer__H4sK9","mobile":"Tag-module_mobile__19oMH","desktop":"Tag-module_desktop__cNyQs"};
745
745
 
746
746
  const Tag = ({
747
747
  children,
@@ -940,7 +940,7 @@ const Toolbar = ({
940
940
  }, children));
941
941
  };
942
942
 
943
- var styles$u = {"root":"Meta-module_root__H-Q4d","rich":"Meta-module_rich__dCkJK","podcast":"Meta-module_podcast__MI8gD","episode":"Meta-module_episode__0n9CF","simple":"Meta-module_simple__tztcr","slide":"Meta-module_slide__3OyIN","card":"Meta-module_card__2vqfN","game":"Meta-module_game__HNcgr","isInMaterial":"Meta-module_isInMaterial__vKcTK","isInSearchItem":"Meta-module_isInSearchItem__ENqHo","isInMediaBlock":"Meta-module_isInMediaBlock__TENZG","center":"Meta-module_center__seHro","half":"Meta-module_half__aoa9h","podcastMaterial":"Meta-module_podcastMaterial__GTPyD","light":"Meta-module_light__oW3kc","dark":"Meta-module_dark__tLQNJ","isDark":"Meta-module_isDark__xSl1J","hasSource":"Meta-module_hasSource__OZJ0y","isInBookRelated":"Meta-module_isInBookRelated__Ohidg","mobile":"Meta-module_mobile__PbG8N","desktop":"Meta-module_desktop__W5AB7"};
943
+ var styles$u = {"root":"Meta-module_root__H-Q4d","rich":"Meta-module_rich__dCkJK","podcast":"Meta-module_podcast__MI8gD","episode":"Meta-module_episode__0n9CF","simple":"Meta-module_simple__tztcr","slide":"Meta-module_slide__3OyIN","card":"Meta-module_card__2vqfN","game":"Meta-module_game__HNcgr","isInMaterial":"Meta-module_isInMaterial__vKcTK","isInSearchItem":"Meta-module_isInSearchItem__ENqHo","isInMediaBlock":"Meta-module_isInMediaBlock__TENZG","center":"Meta-module_center__seHro","half":"Meta-module_half__aoa9h","podcastMaterial":"Meta-module_podcastMaterial__GTPyD","light":"Meta-module_light__oW3kc","overlay":"Meta-module_overlay__ZRKZy","dark":"Meta-module_dark__tLQNJ","isDark":"Meta-module_isDark__xSl1J","hasSource":"Meta-module_hasSource__OZJ0y","richRelated":"Meta-module_richRelated__fIo0x","isInBookRelated":"Meta-module_isInBookRelated__Ohidg","mobile":"Meta-module_mobile__PbG8N","desktop":"Meta-module_desktop__W5AB7"};
944
944
 
945
945
  const Meta = ({
946
946
  hasSource,
@@ -1433,7 +1433,7 @@ const SimpleTitle = ({
1433
1433
  }, first);
1434
1434
  };
1435
1435
 
1436
- var styles$n = {"root":"RichTitle-module_root__U5XQu","slide":"RichTitle-module_slide__eU9Ob","game":"RichTitle-module_game__S1csb","podcastMaterial":"RichTitle-module_podcastMaterial__AulVF","half":"RichTitle-module_half__yBMby","featured":"RichTitle-module_featured__ULNQn","isInFeaturedBlock":"RichTitle-module_isInFeaturedBlock__3vYu9","isInMediaBlock":"RichTitle-module_isInMediaBlock__2h6rl","isInBookRelated":"RichTitle-module_isInBookRelated__LcCPV","isInDynamicBlock":"RichTitle-module_isInDynamicBlock__J-gM6","isInPodcastPlayer":"RichTitle-module_isInPodcastPlayer__kvEPH","large":"RichTitle-module_large__n2URP","medium":"RichTitle-module_medium__KkBLJ","mobile":"RichTitle-module_mobile__W5L9E","desktop":"RichTitle-module_desktop__k0PkC"};
1436
+ var styles$n = {"root":"RichTitle-module_root__U5XQu","slide":"RichTitle-module_slide__eU9Ob","game":"RichTitle-module_game__S1csb","podcastMaterial":"RichTitle-module_podcastMaterial__AulVF","half":"RichTitle-module_half__yBMby","featured":"RichTitle-module_featured__ULNQn","isInFeaturedBlock":"RichTitle-module_isInFeaturedBlock__3vYu9","isInMediaBlock":"RichTitle-module_isInMediaBlock__2h6rl","richRelated":"RichTitle-module_richRelated__cvt3o","isInBookRelated":"RichTitle-module_isInBookRelated__LcCPV","isInDynamicBlock":"RichTitle-module_isInDynamicBlock__J-gM6","isInPodcastPlayer":"RichTitle-module_isInPodcastPlayer__kvEPH","large":"RichTitle-module_large__n2URP","medium":"RichTitle-module_medium__KkBLJ","mobile":"RichTitle-module_mobile__W5L9E","desktop":"RichTitle-module_desktop__k0PkC"};
1437
1437
 
1438
1438
  const RichTitle = ({
1439
1439
  block: {
@@ -2192,7 +2192,7 @@ const RenderBlocks = ({
2192
2192
  }
2193
2193
  };
2194
2194
 
2195
- var styles$a = {"root":"Cover-module_root__3pscq","body":"Cover-module_body__eJpUI","image":"Cover-module_image__frrrH","rich":"Cover-module_rich__YcxWa","dark":"Cover-module_dark__cRucL","light":"Cover-module_light__la-sk","control":"Cover-module_control__WP0G3","isInDynamicBlock":"Cover-module_isInDynamicBlock__qO-yt","mobile":"Cover-module_mobile__aotep","desktop":"Cover-module_desktop__dfbC-"};
2195
+ var styles$a = {"root":"Cover-module_root__3pscq","body":"Cover-module_body__eJpUI","image":"Cover-module_image__frrrH","rich":"Cover-module_rich__YcxWa","dark":"Cover-module_dark__cRucL","light":"Cover-module_light__la-sk","isOnImage":"Cover-module_isOnImage__J296p","control":"Cover-module_control__WP0G3","isInDynamicBlock":"Cover-module_isInDynamicBlock__qO-yt","mobile":"Cover-module_mobile__aotep","desktop":"Cover-module_desktop__dfbC-"};
2196
2196
 
2197
2197
  const Cover = ({
2198
2198
  block: {
@@ -2209,15 +2209,19 @@ const Cover = ({
2209
2209
  }
2210
2210
  }
2211
2211
  },
2212
- styleContext
2212
+ styleContext,
2213
+ titleStyle
2213
2214
  }) => {
2214
2215
  const [isPopoverShown, setIsPopoverShown] = useState(false);
2215
2216
  const style = {};
2216
- let classNames = [[styles$a.root, true], [styles$a[onlyOn], !!onlyOn && !!styles$a[onlyOn]]];
2217
+ const isOnImage = !!titleStyle;
2218
+ const contexts = Array.isArray(styleContext) ? styleContext : [styleContext].filter(Boolean);
2219
+ const blockStyleContext = isOnImage ? [...contexts, 'overlay'] : styleContext;
2220
+ let classNames = [[styles$a.root, true], [styles$a[onlyOn], !!onlyOn && !!styles$a[onlyOn]], [styles$a.isOnImage, isOnImage]];
2217
2221
  if (styleContext) {
2218
2222
  classNames = makeStyleContext(classNames, styleContext, styles$a);
2219
2223
  }
2220
- if (gradients) {
2224
+ if (gradients && !isOnImage) {
2221
2225
  const theme = [gradients.text_rgb === '0,0,0' ? 'dark' : 'light'];
2222
2226
  classNames = makeStyleContext(classNames, theme, styles$a);
2223
2227
  style.backgroundImage = generateGradient(gradients.bg_rgb, 'mediaBlockBottom');
@@ -2229,7 +2233,8 @@ const Cover = ({
2229
2233
  }));
2230
2234
  return /*#__PURE__*/React.createElement("div", {
2231
2235
  "data-testid": "cover",
2232
- className: makeClassName(classNames)
2236
+ className: makeClassName(classNames),
2237
+ style: titleStyle
2233
2238
  }, /*#__PURE__*/React.createElement("div", {
2234
2239
  className: styles$a.image
2235
2240
  }, /*#__PURE__*/React.createElement(Image, {
@@ -2242,7 +2247,7 @@ const Cover = ({
2242
2247
  }, blocks.map(item => (/*#__PURE__*/React.createElement(RenderBlocks, {
2243
2248
  key: item.id,
2244
2249
  block: item,
2245
- styleContext: styleContext
2250
+ styleContext: blockStyleContext
2246
2251
  })))), cc === 'button' && (/*#__PURE__*/React.createElement("button", {
2247
2252
  className: styles$a.control,
2248
2253
  type: "button",
@@ -2388,7 +2393,7 @@ const Spoiler = ({
2388
2393
  }))));
2389
2394
  };
2390
2395
 
2391
- var styles$6 = {"root":"RelatedRichBlock-module_root__-SEe7","content":"RelatedRichBlock-module_content__iyMrN","cover":"RelatedRichBlock-module_cover__3gnIx","body":"RelatedRichBlock-module_body__XhS0U","isCard":"RelatedRichBlock-module_isCard__wkMw-","tag":"RelatedRichBlock-module_tag__c18sv","center":"RelatedRichBlock-module_center__KANd-","mobile":"RelatedRichBlock-module_mobile__N-G4U","desktop":"RelatedRichBlock-module_desktop__EaPOr"};
2396
+ var styles$6 = {"root":"RelatedRichBlock-module_root__-SEe7","isInCard":"RelatedRichBlock-module_isInCard__F3ip3","content":"RelatedRichBlock-module_content__iyMrN","cover":"RelatedRichBlock-module_cover__3gnIx","body":"RelatedRichBlock-module_body__XhS0U","isCard":"RelatedRichBlock-module_isCard__wkMw-","tag":"RelatedRichBlock-module_tag__c18sv","center":"RelatedRichBlock-module_center__KANd-","mobile":"RelatedRichBlock-module_mobile__N-G4U","desktop":"RelatedRichBlock-module_desktop__EaPOr"};
2392
2397
 
2393
2398
  const RelatedRichBlock = ({
2394
2399
  block: {
@@ -2409,10 +2414,10 @@ const RelatedRichBlock = ({
2409
2414
  }) => {
2410
2415
  const cardType = `is${toCapitalize(layout)}`;
2411
2416
  let classNames = [[styles$6.root, true], [styles$6[cardType], !!layout && !!styles$6[cardType]], [styles$6.hasGradient, !!gradients], [styles$6[onlyOn], !!onlyOn && !!styles$6[onlyOn]]];
2412
- let context = ['isInMediaBlock'];
2417
+ let context = ['isInMediaBlock', 'richRelated'];
2413
2418
  if (styleContext) {
2414
2419
  classNames = makeStyleContext(classNames, styleContext, styles$6);
2415
- context = [...styleContext, 'isInMediaBlock'];
2420
+ context = [...styleContext, 'isInMediaBlock', 'richRelated'];
2416
2421
  }
2417
2422
  return /*#__PURE__*/React.createElement(Link, {
2418
2423
  "data-testid": "related-rich-block",