@meduza/ui-kit-2 0.8.626 → 0.8.628

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.
@@ -1001,7 +1001,7 @@ const Toolbar = ({
1001
1001
  }, children));
1002
1002
  };
1003
1003
 
1004
- 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"};
1004
+ var styles$s = {"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"};
1005
1005
 
1006
1006
  const Meta = ({
1007
1007
  hasSource,
@@ -1474,7 +1474,7 @@ const SimpleTitle = ({
1474
1474
  }, first);
1475
1475
  };
1476
1476
 
1477
- var styles$l = {"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","isInMediaBlock":"RichTitle-module_isInMediaBlock__2h6rl","isInBookRelated":"RichTitle-module_isInBookRelated__LcCPV","isInDynamicBlock":"RichTitle-module_isInDynamicBlock__J-gM6","rootEpisodeInMaterial":"RichTitle-module_rootEpisodeInMaterial__SRFt0","rootEpisodeInEmbed":"RichTitle-module_rootEpisodeInEmbed__er5hq","isInPodcastPlayer":"RichTitle-module_isInPodcastPlayer__kvEPH","mobile":"RichTitle-module_mobile__W5L9E","desktop":"RichTitle-module_desktop__k0PkC"};
1477
+ var styles$l = {"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","isInMediaBlock":"RichTitle-module_isInMediaBlock__2h6rl","isInBookRelated":"RichTitle-module_isInBookRelated__LcCPV","isInDynamicBlock":"RichTitle-module_isInDynamicBlock__J-gM6","episodeInMaterial":"RichTitle-module_episodeInMaterial__pp-Wt","episodeInEmbed":"RichTitle-module_episodeInEmbed__gJpJL","isInPodcastPlayer":"RichTitle-module_isInPodcastPlayer__kvEPH","mobile":"RichTitle-module_mobile__W5L9E","desktop":"RichTitle-module_desktop__k0PkC"};
1478
1478
 
1479
1479
  const RichTitle = ({
1480
1480
  block: {
@@ -1489,7 +1489,7 @@ const RichTitle = ({
1489
1489
  styleContext,
1490
1490
  type
1491
1491
  }) => {
1492
- let classNames = [[styles$l.root, true], [styles$l[onlyOn], true], [styles$l.featured, !!featured], [styles$l.rootEpisodeInMaterial, type === 'isInMaterial'], [styles$l.rootEpisodeInEmbed, type === 'isEmbeded']];
1492
+ let classNames = [[styles$l.root, true], [styles$l[onlyOn], true], [styles$l.featured, !!featured], [styles$l.episodeInMaterial, type === 'isInMaterial'], [styles$l.episodeInEmbed, type === 'isEmbeded']];
1493
1493
  if (styleContext) {
1494
1494
  classNames = makeStyleContext(classNames, styleContext, styles$l);
1495
1495
  }
@@ -1855,8 +1855,8 @@ const MetaContainer = ({
1855
1855
  theme
1856
1856
  }
1857
1857
  },
1858
- styleContext,
1859
- type
1858
+ styleContext
1859
+ // type
1860
1860
  }) => {
1861
1861
  const themeColor = styleContext && styleContext.indexOf('dark') !== -1 ? 'light' : 'unset';
1862
1862
  const isPodcast = styleContext && styleContext.indexOf('podcast') !== -1;
@@ -1868,122 +1868,134 @@ const MetaContainer = ({
1868
1868
  });
1869
1869
  }
1870
1870
  const hasSource = !!components.find(item => item.type === 'source_name');
1871
- const classNames = [[styles$s.containerInDynamicBlock, styleContext === 'isInDynamicBlock' || styleContext.includes('episode')], [styles$s.containerInDynamicBlockAndMaterial, styleContext === 'isInDynamicBlock' && type === 'isInMaterial']];
1872
- return /*#__PURE__*/React.createElement("div", {
1873
- className: makeClassName(classNames)
1874
- }, /*#__PURE__*/React.createElement(Meta, {
1875
- styleContext: context,
1876
- theme: theme || themeColor,
1877
- onlyOn: block.only_on,
1878
- hasSource: hasSource
1879
- }, components.map(component => {
1880
- switch (component.type) {
1881
- case 'source_name':
1882
- {
1883
- return /*#__PURE__*/React.createElement(MetaItem, {
1884
- hasSource: hasSource,
1885
- bullets: true,
1886
- key: component.id
1887
- }, /*#__PURE__*/React.createElement(React.Fragment, null, lang === 'ru' ? 'Источник: ' : 'Source: ', component.url && ( /*#__PURE__*/React.createElement("a", {
1888
- href: component.url,
1889
- rel: "noopener noreferrer",
1890
- target: "_blank"
1891
- }, component.text)), !component.url && component.text));
1892
- }
1893
- case 'duration':
1894
- {
1895
- // if (styleContext === 'isInDynamicBlock') {
1896
- // return (
1897
- // <MetaItem hasSource={hasSource} bullets key={component.id}>
1898
- // {component.text}
1899
- // </MetaItem>
1900
- // )
1901
- // }
1902
- return /*#__PURE__*/React.createElement(MetaItem, {
1903
- hasSource: hasSource,
1904
- bullets: true,
1905
- key: component.id
1906
- }, /*#__PURE__*/React.createElement(React.Fragment, null, styleContext !== 'isInDynamicBlock' && ( /*#__PURE__*/React.createElement(SvgSymbol, {
1907
- icon: "podcast",
1908
- size: "small"
1909
- })), component.text));
1910
- }
1911
- case 'datetime':
1912
- {
1913
- const format = component.format && toCamel(component.format) || 'date';
1914
- return /*#__PURE__*/React.createElement(MetaItem, {
1915
- hasSource: hasSource,
1916
- bullets: true,
1917
- key: component.id,
1918
- type: "datetime"
1919
- }, /*#__PURE__*/React.createElement(Timestamp, {
1920
- publishedAt: component.datetime,
1921
- // type={
1922
- // styleContext === 'isInDynamicBlock'
1923
- // ? 'fromNow'
1924
- // : format || 'date'
1871
+ // const classNames: ClassNames = [
1872
+ // [
1873
+ // styles.containerInDynamicBlock,
1874
+ // styleContext === 'isInDynamicBlock' || styleContext.includes('episode')
1875
+ // ],
1876
+ // [
1877
+ // styles.containerInDynamicBlockAndMaterial,
1878
+ // styleContext === 'isInDynamicBlock' && type === 'isInMaterial'
1879
+ // ]
1880
+ // ]
1881
+ return (
1882
+ /*#__PURE__*/
1883
+ // <div className={makeClassName(classNames)}>
1884
+ React.createElement(Meta, {
1885
+ styleContext: context,
1886
+ theme: theme || themeColor,
1887
+ onlyOn: block.only_on,
1888
+ hasSource: hasSource
1889
+ }, components.map(component => {
1890
+ switch (component.type) {
1891
+ case 'source_name':
1892
+ {
1893
+ return /*#__PURE__*/React.createElement(MetaItem, {
1894
+ hasSource: hasSource,
1895
+ bullets: true,
1896
+ key: component.id
1897
+ }, /*#__PURE__*/React.createElement(React.Fragment, null, lang === 'ru' ? 'Источник: ' : 'Source: ', component.url && ( /*#__PURE__*/React.createElement("a", {
1898
+ href: component.url,
1899
+ rel: "noopener noreferrer",
1900
+ target: "_blank"
1901
+ }, component.text)), !component.url && component.text));
1902
+ }
1903
+ case 'duration':
1904
+ {
1905
+ // if (styleContext === 'isInDynamicBlock') {
1906
+ // return (
1907
+ // <MetaItem hasSource={hasSource} bullets key={component.id}>
1908
+ // {component.text}
1909
+ // </MetaItem>
1910
+ // )
1925
1911
  // }
1926
- type: format || 'date',
1927
- locale: lang
1928
- }));
1929
- }
1930
- case 'items_count':
1931
- {
1932
- return /*#__PURE__*/React.createElement(MetaItem, {
1933
- hasSource: hasSource,
1934
- bullets: true,
1935
- key: component.id
1936
- }, /*#__PURE__*/React.createElement(DocumentItemsCount, {
1937
- items: component.count,
1938
- type: isPodcast ? 'podcast' : 'card',
1939
- lang: lang
1940
- }, /*#__PURE__*/React.createElement(SvgSymbol, {
1941
- icon: "card",
1942
- size: "unset"
1943
- })));
1944
- }
1945
- case 'broadcast_active':
1946
- {
1947
- return /*#__PURE__*/React.createElement(MetaItem, {
1948
- hasSource: hasSource,
1949
- bullets: true,
1950
- key: component.id
1951
- }, /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(MetaItemLive, null), " \u041F\u0440\u044F\u043C\u043E\u0439 \u044D\u0444\u0438\u0440"));
1952
- }
1953
- case 'broadcast':
1954
- {
1955
- return /*#__PURE__*/React.createElement(MetaItem, {
1956
- hasSource: hasSource,
1957
- bullets: true,
1958
- key: component.id
1959
- }, /*#__PURE__*/React.createElement(React.Fragment, null, component.with_icon && /*#__PURE__*/React.createElement(MetaItemLive, null), component.label));
1960
- }
1961
- case 'string':
1962
- {
1963
- return /*#__PURE__*/React.createElement(MetaItem, {
1964
- hasSource: hasSource,
1965
- bullets: true,
1966
- key: component.id
1967
- }, component.text);
1968
- }
1969
- default:
1970
- {
1971
- return null;
1972
- }
1973
- }
1974
- }), (isRead || isListened) && ( /*#__PURE__*/React.createElement(MetaItem, {
1975
- hasSource: hasSource,
1976
- bullets: true,
1977
- type: isListened ? 'listened' : 'read'
1978
- }, /*#__PURE__*/React.createElement(SvgSymbol, {
1979
- icon: isListened ? 'listened' : 'read',
1980
- size: "unset"
1981
- }))), isSlides && lang === 'ru' && ( /*#__PURE__*/React.createElement("div", {
1982
- className: styles$s.bookmark
1983
- }, /*#__PURE__*/React.createElement(BookmarkButton, {
1984
- isInBookmarks: isInBookmarks,
1985
- onClick: () => bookmarkAction('bookmark', 'top')
1986
- })))));
1912
+ return /*#__PURE__*/React.createElement(MetaItem, {
1913
+ hasSource: hasSource,
1914
+ bullets: true,
1915
+ key: component.id
1916
+ }, /*#__PURE__*/React.createElement(React.Fragment, null, styleContext !== 'isInDynamicBlock' && ( /*#__PURE__*/React.createElement(SvgSymbol, {
1917
+ icon: "podcast",
1918
+ size: "small"
1919
+ })), component.text));
1920
+ }
1921
+ case 'datetime':
1922
+ {
1923
+ const format = component.format && toCamel(component.format) || 'date';
1924
+ return /*#__PURE__*/React.createElement(MetaItem, {
1925
+ hasSource: hasSource,
1926
+ bullets: true,
1927
+ key: component.id,
1928
+ type: "datetime"
1929
+ }, /*#__PURE__*/React.createElement(Timestamp, {
1930
+ publishedAt: component.datetime,
1931
+ // type={
1932
+ // styleContext === 'isInDynamicBlock'
1933
+ // ? 'fromNow'
1934
+ // : format || 'date'
1935
+ // }
1936
+ type: format || 'date',
1937
+ locale: lang
1938
+ }));
1939
+ }
1940
+ case 'items_count':
1941
+ {
1942
+ return /*#__PURE__*/React.createElement(MetaItem, {
1943
+ hasSource: hasSource,
1944
+ bullets: true,
1945
+ key: component.id
1946
+ }, /*#__PURE__*/React.createElement(DocumentItemsCount, {
1947
+ items: component.count,
1948
+ type: isPodcast ? 'podcast' : 'card',
1949
+ lang: lang
1950
+ }, /*#__PURE__*/React.createElement(SvgSymbol, {
1951
+ icon: "card",
1952
+ size: "unset"
1953
+ })));
1954
+ }
1955
+ case 'broadcast_active':
1956
+ {
1957
+ return /*#__PURE__*/React.createElement(MetaItem, {
1958
+ hasSource: hasSource,
1959
+ bullets: true,
1960
+ key: component.id
1961
+ }, /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(MetaItemLive, null), " \u041F\u0440\u044F\u043C\u043E\u0439 \u044D\u0444\u0438\u0440"));
1962
+ }
1963
+ case 'broadcast':
1964
+ {
1965
+ return /*#__PURE__*/React.createElement(MetaItem, {
1966
+ hasSource: hasSource,
1967
+ bullets: true,
1968
+ key: component.id
1969
+ }, /*#__PURE__*/React.createElement(React.Fragment, null, component.with_icon && /*#__PURE__*/React.createElement(MetaItemLive, null), component.label));
1970
+ }
1971
+ case 'string':
1972
+ {
1973
+ return /*#__PURE__*/React.createElement(MetaItem, {
1974
+ hasSource: hasSource,
1975
+ bullets: true,
1976
+ key: component.id
1977
+ }, component.text);
1978
+ }
1979
+ default:
1980
+ {
1981
+ return null;
1982
+ }
1983
+ }
1984
+ }), (isRead || isListened) && ( /*#__PURE__*/React.createElement(MetaItem, {
1985
+ hasSource: hasSource,
1986
+ bullets: true,
1987
+ type: isListened ? 'listened' : 'read'
1988
+ }, /*#__PURE__*/React.createElement(SvgSymbol, {
1989
+ icon: isListened ? 'listened' : 'read',
1990
+ size: "unset"
1991
+ }))), isSlides && lang === 'ru' && ( /*#__PURE__*/React.createElement("div", {
1992
+ className: styles$s.bookmark
1993
+ }, /*#__PURE__*/React.createElement(BookmarkButton, {
1994
+ isInBookmarks: isInBookmarks,
1995
+ onClick: () => bookmarkAction('bookmark', 'top')
1996
+ }))))
1997
+ // </div>
1998
+ );
1987
1999
  };
1988
2000
 
1989
2001
  var styles$b = {"root":"DonatesTeaser-module_root__XQCVy","main":"DonatesTeaser-module_main__eN9kd","title":"DonatesTeaser-module_title__9umo1","text":"DonatesTeaser-module_text__s6tyf","cta":"DonatesTeaser-module_cta__-50aB","center":"DonatesTeaser-module_center__gxLvW","isInCard":"DonatesTeaser-module_isInCard__vaUhd","isInSlide":"DonatesTeaser-module_isInSlide__Dh4NH","ru":"DonatesTeaser-module_ru__y-PlJ","en":"DonatesTeaser-module_en__0Iisr"};