@meduza/ui-kit-2 0.8.603 → 0.8.604

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.
@@ -9,6 +9,7 @@ export interface MetaContainerProps {
9
9
  bookmarkAction?: (service: CallToActions, place: string) => void;
10
10
  lightBox?: () => void;
11
11
  lang: 'ru' | 'en';
12
+ type?: any;
12
13
  }
13
14
  export interface MetaProps {
14
15
  onlyOn?: string;
@@ -14,4 +14,5 @@ export interface RawHtmlBlockProps {
14
14
  bookmarkAction?: (service: CallToActions, place: string) => void;
15
15
  lightBox?: LightboxContext | null | undefined;
16
16
  lang?: 'ru' | 'en';
17
+ type?: any;
17
18
  }
@@ -8,4 +8,5 @@ export interface RenderBlocksProps {
8
8
  bookmarkAction?: (service: CallToActions, place: string) => void;
9
9
  lightBox?: LightboxContext | null | undefined;
10
10
  lang?: 'ru' | 'en';
11
+ type?: any;
11
12
  }
@@ -959,7 +959,7 @@ const Toolbar = ({
959
959
  }, children));
960
960
  };
961
961
 
962
- var styles$s = {"containerInDynamicBlock":"Meta-module_containerInDynamicBlock__YSh66","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","bookmark":"Meta-module_bookmark__jcFWn","isInBookRelated":"Meta-module_isInBookRelated__Ohidg","mobile":"Meta-module_mobile__PbG8N","desktop":"Meta-module_desktop__W5AB7"};
962
+ var styles$s = {"containerInDynamicBlock":"Meta-module_containerInDynamicBlock__YSh66","containerInDynamicBlockAndMaterial":"Meta-module_containerInDynamicBlockAndMaterial__4v4A9","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","bookmark":"Meta-module_bookmark__jcFWn","isInBookRelated":"Meta-module_isInBookRelated__Ohidg","mobile":"Meta-module_mobile__PbG8N","desktop":"Meta-module_desktop__W5AB7"};
963
963
 
964
964
  const Meta = ({
965
965
  hasSource,
@@ -1812,7 +1812,8 @@ const MetaContainer = ({
1812
1812
  theme
1813
1813
  }
1814
1814
  },
1815
- styleContext
1815
+ styleContext,
1816
+ type
1816
1817
  }) => {
1817
1818
  const themeColor = styleContext && styleContext.indexOf('dark') !== -1 ? 'light' : 'unset';
1818
1819
  const isPodcast = styleContext && styleContext.indexOf('podcast') !== -1;
@@ -1824,7 +1825,7 @@ const MetaContainer = ({
1824
1825
  });
1825
1826
  }
1826
1827
  const hasSource = !!components.find(item => item.type === 'source_name');
1827
- const classNames = [[styles$s.containerInDynamicBlock, styleContext === 'isInDynamicBlock']];
1828
+ const classNames = [[styles$s.containerInDynamicBlock, styleContext === 'isInDynamicBlock'], [styles$s.containerInDynamicBlockAndMaterial, styleContext === 'isInDynamicBlock' && type === 'isInMaterial']];
1828
1829
  return /*#__PURE__*/React.createElement("div", {
1829
1830
  className: makeClassName(classNames)
1830
1831
  }, /*#__PURE__*/React.createElement(Meta, {
@@ -2069,7 +2070,8 @@ const RenderBlocks = ({
2069
2070
  isRead,
2070
2071
  isListened,
2071
2072
  bookmarkAction,
2072
- isInBookmarks
2073
+ isInBookmarks,
2074
+ type = 'default'
2073
2075
  }) => {
2074
2076
  switch (block.type) {
2075
2077
  case 'tag':
@@ -2104,7 +2106,8 @@ const RenderBlocks = ({
2104
2106
  isRead: isRead,
2105
2107
  isListened: isListened,
2106
2108
  isInBookmarks: isInBookmarks,
2107
- bookmarkAction: bookmarkAction
2109
+ bookmarkAction: bookmarkAction,
2110
+ type: type
2108
2111
  });
2109
2112
  }
2110
2113
  case 'blockquote':
@@ -2643,7 +2646,8 @@ const RawHtmlBlock = ({
2643
2646
  isInBookmarks,
2644
2647
  bookmarkAction,
2645
2648
  lightBox,
2646
- lang
2649
+ lang,
2650
+ type = 'default'
2647
2651
  }) => {
2648
2652
  const context = {
2649
2653
  lightBox: lightBox || null
@@ -2711,7 +2715,8 @@ const RawHtmlBlock = ({
2711
2715
  isListened: isListened,
2712
2716
  isInBookmarks: isInBookmarks,
2713
2717
  bookmarkAction: bookmarkAction,
2714
- lang: lang
2718
+ lang: lang,
2719
+ type: type
2715
2720
  }));
2716
2721
  }
2717
2722
  }