@meduza/ui-kit-2 0.8.628 → 0.8.629
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/Meta/Meta.types.d.ts +0 -1
- package/dist/RawHtmlBlock/RawHtmlBlock.types.d.ts +0 -1
- package/dist/RenderBlocks/RenderBlocks.types.d.ts +0 -1
- package/dist/ui-kit-2.cjs.development.js +105 -137
- 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 +105 -137
- package/dist/ui-kit-2.esm.js.map +1 -1
- package/dist/ui-kit-game.css +0 -16
- package/dist/ui-kit.css +0 -16
- package/package.json +1 -1
- package/src/Meta/Meta.module.css +0 -16
- package/src/Meta/Meta.types.ts +0 -1
- package/src/Meta/MetaContainer.tsx +0 -27
- package/src/RawHtmlBlock/RawHtmlBlock.types.ts +0 -1
- package/src/RawHtmlBlock/index.tsx +1 -3
- package/src/RenderBlocks/RenderBlocks.types.ts +0 -1
- package/src/RenderBlocks/index.tsx +1 -3
|
@@ -1856,7 +1856,6 @@ const MetaContainer = ({
|
|
|
1856
1856
|
}
|
|
1857
1857
|
},
|
|
1858
1858
|
styleContext
|
|
1859
|
-
// type
|
|
1860
1859
|
}) => {
|
|
1861
1860
|
const themeColor = styleContext && styleContext.indexOf('dark') !== -1 ? 'light' : 'unset';
|
|
1862
1861
|
const isPodcast = styleContext && styleContext.indexOf('podcast') !== -1;
|
|
@@ -1868,134 +1867,107 @@ const MetaContainer = ({
|
|
|
1868
1867
|
});
|
|
1869
1868
|
}
|
|
1870
1869
|
const hasSource = !!components.find(item => item.type === 'source_name');
|
|
1871
|
-
|
|
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
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
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
|
-
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
|
-
);
|
|
1870
|
+
return /*#__PURE__*/React.createElement(Meta, {
|
|
1871
|
+
styleContext: context,
|
|
1872
|
+
theme: theme || themeColor,
|
|
1873
|
+
onlyOn: block.only_on,
|
|
1874
|
+
hasSource: hasSource
|
|
1875
|
+
}, components.map(component => {
|
|
1876
|
+
switch (component.type) {
|
|
1877
|
+
case 'source_name':
|
|
1878
|
+
{
|
|
1879
|
+
return /*#__PURE__*/React.createElement(MetaItem, {
|
|
1880
|
+
hasSource: hasSource,
|
|
1881
|
+
bullets: true,
|
|
1882
|
+
key: component.id
|
|
1883
|
+
}, /*#__PURE__*/React.createElement(React.Fragment, null, lang === 'ru' ? 'Источник: ' : 'Source: ', component.url && ( /*#__PURE__*/React.createElement("a", {
|
|
1884
|
+
href: component.url,
|
|
1885
|
+
rel: "noopener noreferrer",
|
|
1886
|
+
target: "_blank"
|
|
1887
|
+
}, component.text)), !component.url && component.text));
|
|
1888
|
+
}
|
|
1889
|
+
case 'duration':
|
|
1890
|
+
{
|
|
1891
|
+
return /*#__PURE__*/React.createElement(MetaItem, {
|
|
1892
|
+
hasSource: hasSource,
|
|
1893
|
+
bullets: true,
|
|
1894
|
+
key: component.id
|
|
1895
|
+
}, /*#__PURE__*/React.createElement(React.Fragment, null, styleContext !== 'isInDynamicBlock' && ( /*#__PURE__*/React.createElement(SvgSymbol, {
|
|
1896
|
+
icon: "podcast",
|
|
1897
|
+
size: "small"
|
|
1898
|
+
})), component.text));
|
|
1899
|
+
}
|
|
1900
|
+
case 'datetime':
|
|
1901
|
+
{
|
|
1902
|
+
const format = component.format && toCamel(component.format) || 'date';
|
|
1903
|
+
return /*#__PURE__*/React.createElement(MetaItem, {
|
|
1904
|
+
hasSource: hasSource,
|
|
1905
|
+
bullets: true,
|
|
1906
|
+
key: component.id,
|
|
1907
|
+
type: "datetime"
|
|
1908
|
+
}, /*#__PURE__*/React.createElement(Timestamp, {
|
|
1909
|
+
publishedAt: component.datetime,
|
|
1910
|
+
type: format || 'date',
|
|
1911
|
+
locale: lang
|
|
1912
|
+
}));
|
|
1913
|
+
}
|
|
1914
|
+
case 'items_count':
|
|
1915
|
+
{
|
|
1916
|
+
return /*#__PURE__*/React.createElement(MetaItem, {
|
|
1917
|
+
hasSource: hasSource,
|
|
1918
|
+
bullets: true,
|
|
1919
|
+
key: component.id
|
|
1920
|
+
}, /*#__PURE__*/React.createElement(DocumentItemsCount, {
|
|
1921
|
+
items: component.count,
|
|
1922
|
+
type: isPodcast ? 'podcast' : 'card',
|
|
1923
|
+
lang: lang
|
|
1924
|
+
}, /*#__PURE__*/React.createElement(SvgSymbol, {
|
|
1925
|
+
icon: "card",
|
|
1926
|
+
size: "unset"
|
|
1927
|
+
})));
|
|
1928
|
+
}
|
|
1929
|
+
case 'broadcast_active':
|
|
1930
|
+
{
|
|
1931
|
+
return /*#__PURE__*/React.createElement(MetaItem, {
|
|
1932
|
+
hasSource: hasSource,
|
|
1933
|
+
bullets: true,
|
|
1934
|
+
key: component.id
|
|
1935
|
+
}, /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(MetaItemLive, null), " \u041F\u0440\u044F\u043C\u043E\u0439 \u044D\u0444\u0438\u0440"));
|
|
1936
|
+
}
|
|
1937
|
+
case 'broadcast':
|
|
1938
|
+
{
|
|
1939
|
+
return /*#__PURE__*/React.createElement(MetaItem, {
|
|
1940
|
+
hasSource: hasSource,
|
|
1941
|
+
bullets: true,
|
|
1942
|
+
key: component.id
|
|
1943
|
+
}, /*#__PURE__*/React.createElement(React.Fragment, null, component.with_icon && /*#__PURE__*/React.createElement(MetaItemLive, null), component.label));
|
|
1944
|
+
}
|
|
1945
|
+
case 'string':
|
|
1946
|
+
{
|
|
1947
|
+
return /*#__PURE__*/React.createElement(MetaItem, {
|
|
1948
|
+
hasSource: hasSource,
|
|
1949
|
+
bullets: true,
|
|
1950
|
+
key: component.id
|
|
1951
|
+
}, component.text);
|
|
1952
|
+
}
|
|
1953
|
+
default:
|
|
1954
|
+
{
|
|
1955
|
+
return null;
|
|
1956
|
+
}
|
|
1957
|
+
}
|
|
1958
|
+
}), (isRead || isListened) && ( /*#__PURE__*/React.createElement(MetaItem, {
|
|
1959
|
+
hasSource: hasSource,
|
|
1960
|
+
bullets: true,
|
|
1961
|
+
type: isListened ? 'listened' : 'read'
|
|
1962
|
+
}, /*#__PURE__*/React.createElement(SvgSymbol, {
|
|
1963
|
+
icon: isListened ? 'listened' : 'read',
|
|
1964
|
+
size: "unset"
|
|
1965
|
+
}))), isSlides && lang === 'ru' && ( /*#__PURE__*/React.createElement("div", {
|
|
1966
|
+
className: styles$s.bookmark
|
|
1967
|
+
}, /*#__PURE__*/React.createElement(BookmarkButton, {
|
|
1968
|
+
isInBookmarks: isInBookmarks,
|
|
1969
|
+
onClick: () => bookmarkAction('bookmark', 'top')
|
|
1970
|
+
}))));
|
|
1999
1971
|
};
|
|
2000
1972
|
|
|
2001
1973
|
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"};
|
|
@@ -2130,8 +2102,7 @@ const RenderBlocks = ({
|
|
|
2130
2102
|
isRead,
|
|
2131
2103
|
isListened,
|
|
2132
2104
|
bookmarkAction,
|
|
2133
|
-
isInBookmarks
|
|
2134
|
-
type = 'default'
|
|
2105
|
+
isInBookmarks
|
|
2135
2106
|
}) => {
|
|
2136
2107
|
switch (block.type) {
|
|
2137
2108
|
case 'tag':
|
|
@@ -2166,8 +2137,7 @@ const RenderBlocks = ({
|
|
|
2166
2137
|
isRead: isRead,
|
|
2167
2138
|
isListened: isListened,
|
|
2168
2139
|
isInBookmarks: isInBookmarks,
|
|
2169
|
-
bookmarkAction: bookmarkAction
|
|
2170
|
-
type: type
|
|
2140
|
+
bookmarkAction: bookmarkAction
|
|
2171
2141
|
});
|
|
2172
2142
|
}
|
|
2173
2143
|
case 'blockquote':
|
|
@@ -2706,8 +2676,7 @@ const RawHtmlBlock = ({
|
|
|
2706
2676
|
isInBookmarks,
|
|
2707
2677
|
bookmarkAction,
|
|
2708
2678
|
lightBox,
|
|
2709
|
-
lang
|
|
2710
|
-
type = 'default'
|
|
2679
|
+
lang
|
|
2711
2680
|
}) => {
|
|
2712
2681
|
const context = {
|
|
2713
2682
|
lightBox: lightBox || null
|
|
@@ -2775,8 +2744,7 @@ const RawHtmlBlock = ({
|
|
|
2775
2744
|
isListened: isListened,
|
|
2776
2745
|
isInBookmarks: isInBookmarks,
|
|
2777
2746
|
bookmarkAction: bookmarkAction,
|
|
2778
|
-
lang: lang
|
|
2779
|
-
type: type
|
|
2747
|
+
lang: lang
|
|
2780
2748
|
}));
|
|
2781
2749
|
}
|
|
2782
2750
|
}
|