@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.
- package/dist/ui-kit-2.cjs.development.js +132 -120
- package/dist/ui-kit-2.cjs.development.js.map +1 -1
- package/dist/ui-kit-2.cjs.production.min.js +1 -1
- package/dist/ui-kit-2.cjs.production.min.js.map +1 -1
- package/dist/ui-kit-2.esm.js +132 -120
- package/dist/ui-kit-2.esm.js.map +1 -1
- package/dist/ui-kit-game.css +7 -10
- package/dist/ui-kit.css +7 -10
- package/package.json +1 -1
- package/src/Meta/Meta.module.css +4 -4
- package/src/Meta/MetaContainer.tsx +145 -145
- package/src/RichTitle/RichTitle.module.css +2 -2
- package/src/RichTitle/index.tsx +2 -2
|
@@ -1001,7 +1001,7 @@ const Toolbar = ({
|
|
|
1001
1001
|
}, children));
|
|
1002
1002
|
};
|
|
1003
1003
|
|
|
1004
|
-
var styles$s = {"
|
|
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","
|
|
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.
|
|
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 = [
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
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
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
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"};
|