@meduza/ui-kit-2 0.8.602 → 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.
- package/dist/Meta/Meta.types.d.ts +1 -1
- package/dist/RawHtmlBlock/RawHtmlBlock.types.d.ts +1 -0
- package/dist/RenderBlocks/RenderBlocks.types.d.ts +1 -0
- package/dist/ui-kit-2.cjs.development.js +19 -13
- 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 +19 -13
- package/dist/ui-kit-2.esm.js.map +1 -1
- package/dist/ui-kit-game.css +10 -6
- package/dist/ui-kit.css +10 -6
- package/package.json +1 -1
- package/src/Meta/Meta.module.css +10 -6
- package/src/Meta/Meta.types.ts +1 -1
- package/src/Meta/MetaContainer.tsx +135 -124
- package/src/Meta/index.tsx +2 -4
- package/src/RawHtmlBlock/RawHtmlBlock.types.ts +1 -0
- package/src/RawHtmlBlock/index.tsx +3 -1
- package/src/RenderBlocks/RenderBlocks.types.ts +1 -0
- package/src/RenderBlocks/index.tsx +3 -1
|
@@ -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;
|
|
@@ -16,5 +17,4 @@ export interface MetaProps {
|
|
|
16
17
|
hasSource?: boolean;
|
|
17
18
|
theme?: string;
|
|
18
19
|
children: React.ReactNode;
|
|
19
|
-
type: string[] | string;
|
|
20
20
|
}
|
|
@@ -959,17 +959,16 @@ const Toolbar = ({
|
|
|
959
959
|
}, children));
|
|
960
960
|
};
|
|
961
961
|
|
|
962
|
-
var styles$s = {"
|
|
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,
|
|
966
966
|
theme,
|
|
967
967
|
children,
|
|
968
968
|
onlyOn,
|
|
969
|
-
styleContext
|
|
970
|
-
type
|
|
969
|
+
styleContext
|
|
971
970
|
}) => {
|
|
972
|
-
let classNames = [[styles$s.root, true], [styles$s[theme], !!theme && !!styles$s[theme]], [styles$s[onlyOn], !!onlyOn], [styles$s.hasSource, hasSource]
|
|
971
|
+
let classNames = [[styles$s.root, true], [styles$s[theme], !!theme && !!styles$s[theme]], [styles$s[onlyOn], !!onlyOn], [styles$s.hasSource, hasSource]];
|
|
973
972
|
if (styleContext) {
|
|
974
973
|
classNames = makeStyleContext(classNames, styleContext, styles$s);
|
|
975
974
|
}
|
|
@@ -1813,7 +1812,8 @@ const MetaContainer = ({
|
|
|
1813
1812
|
theme
|
|
1814
1813
|
}
|
|
1815
1814
|
},
|
|
1816
|
-
styleContext
|
|
1815
|
+
styleContext,
|
|
1816
|
+
type
|
|
1817
1817
|
}) => {
|
|
1818
1818
|
const themeColor = styleContext && styleContext.indexOf('dark') !== -1 ? 'light' : 'unset';
|
|
1819
1819
|
const isPodcast = styleContext && styleContext.indexOf('podcast') !== -1;
|
|
@@ -1825,12 +1825,14 @@ const MetaContainer = ({
|
|
|
1825
1825
|
});
|
|
1826
1826
|
}
|
|
1827
1827
|
const hasSource = !!components.find(item => item.type === 'source_name');
|
|
1828
|
-
|
|
1828
|
+
const classNames = [[styles$s.containerInDynamicBlock, styleContext === 'isInDynamicBlock'], [styles$s.containerInDynamicBlockAndMaterial, styleContext === 'isInDynamicBlock' && type === 'isInMaterial']];
|
|
1829
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
1830
|
+
className: makeClassName(classNames)
|
|
1831
|
+
}, /*#__PURE__*/React.createElement(Meta, {
|
|
1829
1832
|
styleContext: context,
|
|
1830
1833
|
theme: theme || themeColor,
|
|
1831
1834
|
onlyOn: block.only_on,
|
|
1832
|
-
hasSource: hasSource
|
|
1833
|
-
type: styleContext
|
|
1835
|
+
hasSource: hasSource
|
|
1834
1836
|
}, components.map(component => {
|
|
1835
1837
|
switch (component.type) {
|
|
1836
1838
|
case 'source_name':
|
|
@@ -1933,7 +1935,7 @@ const MetaContainer = ({
|
|
|
1933
1935
|
}, /*#__PURE__*/React.createElement(BookmarkButton, {
|
|
1934
1936
|
isInBookmarks: isInBookmarks,
|
|
1935
1937
|
onClick: () => bookmarkAction('bookmark', 'top')
|
|
1936
|
-
}))));
|
|
1938
|
+
})))));
|
|
1937
1939
|
};
|
|
1938
1940
|
|
|
1939
1941
|
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"};
|
|
@@ -2068,7 +2070,8 @@ const RenderBlocks = ({
|
|
|
2068
2070
|
isRead,
|
|
2069
2071
|
isListened,
|
|
2070
2072
|
bookmarkAction,
|
|
2071
|
-
isInBookmarks
|
|
2073
|
+
isInBookmarks,
|
|
2074
|
+
type = 'default'
|
|
2072
2075
|
}) => {
|
|
2073
2076
|
switch (block.type) {
|
|
2074
2077
|
case 'tag':
|
|
@@ -2103,7 +2106,8 @@ const RenderBlocks = ({
|
|
|
2103
2106
|
isRead: isRead,
|
|
2104
2107
|
isListened: isListened,
|
|
2105
2108
|
isInBookmarks: isInBookmarks,
|
|
2106
|
-
bookmarkAction: bookmarkAction
|
|
2109
|
+
bookmarkAction: bookmarkAction,
|
|
2110
|
+
type: type
|
|
2107
2111
|
});
|
|
2108
2112
|
}
|
|
2109
2113
|
case 'blockquote':
|
|
@@ -2642,7 +2646,8 @@ const RawHtmlBlock = ({
|
|
|
2642
2646
|
isInBookmarks,
|
|
2643
2647
|
bookmarkAction,
|
|
2644
2648
|
lightBox,
|
|
2645
|
-
lang
|
|
2649
|
+
lang,
|
|
2650
|
+
type = 'default'
|
|
2646
2651
|
}) => {
|
|
2647
2652
|
const context = {
|
|
2648
2653
|
lightBox: lightBox || null
|
|
@@ -2710,7 +2715,8 @@ const RawHtmlBlock = ({
|
|
|
2710
2715
|
isListened: isListened,
|
|
2711
2716
|
isInBookmarks: isInBookmarks,
|
|
2712
2717
|
bookmarkAction: bookmarkAction,
|
|
2713
|
-
lang: lang
|
|
2718
|
+
lang: lang,
|
|
2719
|
+
type: type
|
|
2714
2720
|
}));
|
|
2715
2721
|
}
|
|
2716
2722
|
}
|