@meduza/ui-kit-2 0.1.7 → 0.1.9
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/Image/Image.types.d.ts +2 -2
- package/dist/MaterialNote/MaterialNote.stories.d.ts +2 -1
- package/dist/MaterialNote/MaterialNote.types.d.ts +2 -1
- package/dist/MaterialTitle/MaterialTitle.types.d.ts +2 -2
- package/dist/Popover/Popover.types.d.ts +2 -2
- package/dist/Tag/Tag.types.d.ts +2 -2
- package/dist/ui-kit-2.cjs.development.js +83 -79
- 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 +83 -79
- package/dist/ui-kit-2.esm.js.map +1 -1
- package/dist/ui-kit.css +446 -446
- package/dist/utils/DangerousHtml.d.ts +3 -3
- package/dist/utils/makeClassName.d.ts +2 -1
- package/dist/utils/makeStyleContext.d.ts +2 -1
- package/package.json +12 -4
- package/src/BookmarkButton/BookmarkButton.stories.tsx +1 -1
- package/src/BookmarkButton/index.tsx +2 -4
- package/src/Button/Button.stories.tsx +2 -2
- package/src/Button/Button.test.tsx +3 -3
- package/src/Button/index.tsx +3 -3
- package/src/CardTitle/CardTitle.stories.tsx +1 -1
- package/src/CardTitle/CardTitle.test.tsx +1 -1
- package/src/CardTitle/index.tsx +1 -2
- package/src/ChapterBlock/ChapterBlock.stories.tsx +1 -1
- package/src/ChapterBlock/ChapterBlock.test.tsx +1 -1
- package/src/ChapterBlock/index.tsx +4 -8
- package/src/Cover/Cover.stories.tsx +1 -1
- package/src/Cover/Cover.test.tsx +1 -1
- package/src/Cover/index.tsx +5 -6
- package/src/DocumentItemsCount/DocumentItemsCount.stories.tsx +2 -2
- package/src/DocumentItemsCount/DocumentItemsCount.test.tsx +1 -1
- package/src/DocumentItemsCount/index.tsx +0 -1
- package/src/DotsOnImage/DotsOnImage.stories.tsx +1 -1
- package/src/DotsOnImage/DotsOnImage.test.tsx +1 -0
- package/src/DotsOnImage/index.tsx +1 -2
- package/src/Dropdown/index.tsx +2 -2
- package/src/EmbedBlock/EmbedBlock.stories.tsx +2 -2
- package/src/EmbedBlock/EmbedBlock.test.tsx +1 -1
- package/src/EmbedBlock/EmbedBlock.tsx +3 -8
- package/src/EmbedBlock/EmbedGif.tsx +0 -3
- package/src/EmbedBlock/IframeBlock.tsx +0 -1
- package/src/EmbedBlock/index.tsx +0 -1
- package/src/GroupedBlock/GroupedBlock.stories.tsx +2 -2
- package/src/GroupedBlock/GroupedBlock.test.tsx +1 -1
- package/src/GroupedBlock/GroupedBlock.types.ts +1 -1
- package/src/GroupedBlock/index.tsx +4 -6
- package/src/HalfBlock/HalfBlock.stories.tsx +1 -1
- package/src/HalfBlock/HalfBlock.test.tsx +1 -1
- package/src/HalfBlock/HalfBlock.types.ts +1 -1
- package/src/HalfBlock/index.tsx +3 -5
- package/src/Image/Image.stories.tsx +1 -1
- package/src/Image/Image.test.tsx +1 -1
- package/src/Image/Image.types.ts +2 -2
- package/src/Image/RenderPicture.tsx +1 -2
- package/src/Image/index.tsx +1 -6
- package/src/ImportantLead/ImportantLead.stories.tsx +1 -1
- package/src/ImportantLead/ImportantLead.test.tsx +1 -1
- package/src/ImportantLead/index.tsx +3 -5
- package/src/Lazy/Lazy.stories.tsx +3 -2
- package/src/Lazy/Lazy.test.tsx +1 -1
- package/src/Lazy/index.tsx +2 -4
- package/src/ListBlock/ListBlock.stories.tsx +3 -3
- package/src/ListBlock/ListBlock.test.tsx +1 -1
- package/src/ListBlock/index.tsx +3 -5
- package/src/MaterialNote/MaterialNote.stories.tsx +4 -3
- package/src/MaterialNote/MaterialNote.test.tsx +1 -1
- package/src/MaterialNote/MaterialNote.types.ts +2 -1
- package/src/MaterialNote/index.tsx +3 -3
- package/src/MaterialTitle/MaterialTitle.stories.tsx +1 -1
- package/src/MaterialTitle/MaterialTitle.test.tsx +1 -1
- package/src/MaterialTitle/MaterialTitle.types.ts +2 -1
- package/src/MediaCaption/MediaCaption.stories.tsx +1 -1
- package/src/MediaCaption/MediaCaption.test.tsx +1 -1
- package/src/MediaCaption/MediaCaption.types.ts +2 -2
- package/src/MediaCaption/index.tsx +2 -2
- package/src/Meta/Meta.stories.tsx +2 -2
- package/src/Meta/Meta.test.tsx +1 -1
- package/src/Meta/MetaContainer.tsx +2 -4
- package/src/Meta/index.tsx +2 -3
- package/src/MetaItem/MetaItem.stories.tsx +2 -2
- package/src/MetaItem/MetaItem.test.tsx +1 -1
- package/src/MetaItem/index.tsx +1 -3
- package/src/MetaItemLive/MetaItemLive.stories.tsx +2 -2
- package/src/MetaItemLive/MetaItemLive.test.tsx +1 -1
- package/src/MetaItemLive/index.tsx +1 -3
- package/src/Popover/Popover.stories.tsx +1 -1
- package/src/Popover/Popover.test.tsx +1 -1
- package/src/Popover/Popover.types.ts +2 -1
- package/src/Popover/index.tsx +1 -2
- package/src/QuoteBlock/QuoteBlock.stories.tsx +1 -1
- package/src/QuoteBlock/QuoteBlock.test.tsx +1 -1
- package/src/QuoteBlock/index.tsx +2 -3
- package/src/RawHtmlBlock/RawHtmlBlock.stories.tsx +2 -2
- package/src/RawHtmlBlock/RawHtmlBlock.test.tsx +1 -1
- package/src/RawHtmlBlock/index.tsx +0 -2
- package/src/RelatedBlock/RelatedBlock.stories.tsx +1 -1
- package/src/RelatedBlock/RelatedBlock.test.tsx +1 -1
- package/src/RelatedBlock/index.tsx +2 -3
- package/src/RenderBlocks/RenderBlocks.stories.tsx +1 -1
- package/src/RenderBlocks/RenderBlocks.test.tsx +1 -1
- package/src/RenderBlocks/index.tsx +0 -1
- package/src/RichTitle/RichTitle.stories.tsx +1 -1
- package/src/RichTitle/RichTitle.test.tsx +1 -1
- package/src/RichTitle/index.tsx +2 -3
- package/src/SimpleBlock/SimpleBlock.stories.tsx +2 -2
- package/src/SimpleBlock/SimpleBlock.test.tsx +1 -1
- package/src/SimpleBlock/index.tsx +8 -11
- package/src/SimpleTitle/SimpleTitle.stories.tsx +1 -1
- package/src/SimpleTitle/SimpleTitle.test.tsx +1 -1
- package/src/SimpleTitle/index.tsx +2 -2
- package/src/SourceBlock/SourceBlock.stories.tsx +6 -6
- package/src/SourceBlock/SourceBlock.test.tsx +1 -1
- package/src/SourceBlock/index.tsx +7 -6
- package/src/SourceBlock/mock.json +15 -0
- package/src/Spoiler/Spoiler.stories.tsx +1 -1
- package/src/Spoiler/Spoiler.test.tsx +1 -1
- package/src/Spoiler/index.tsx +4 -5
- package/src/SvgSymbol/SvgSymbol.stories.tsx +6 -6
- package/src/SvgSymbol/SvgSymbol.test.tsx +1 -1
- package/src/SvgSymbol/index.tsx +2 -2
- package/src/Switcher/Switcher.stories.tsx +4 -4
- package/src/Switcher/Switcher.test.tsx +1 -1
- package/src/Switcher/index.tsx +1 -2
- package/src/Table/Table.stories.tsx +1 -1
- package/src/Table/Table.test.tsx +1 -1
- package/src/Table/index.tsx +2 -2
- package/src/Tag/Tag.stories.tsx +1 -3
- package/src/Tag/Tag.test.tsx +4 -4
- package/src/Tag/Tag.types.ts +3 -1
- package/src/Tag/index.tsx +2 -2
- package/src/Timestamp/Timestamp.stories.tsx +1 -1
- package/src/Timestamp/Timestamp.test.tsx +1 -1
- package/src/Timestamp/index.tsx +0 -2
- package/src/Toolbar/Toolbar.stories.tsx +0 -2
- package/src/Toolbar/Toolbar.test.tsx +1 -1
- package/src/Toolbar/index.tsx +2 -3
- package/src/ToolbarButton/ToolbarButton.stories.tsx +2 -2
- package/src/ToolbarButton/ToolbarButton.test.tsx +1 -1
- package/src/ToolbarButton/index.tsx +2 -3
- package/src/_storybook/PreviewWrapper/index.tsx +1 -1
- package/src/utils/DangerousHtml.tsx +26 -18
- package/src/utils/generateGradient.ts +1 -1
- package/src/utils/makeClassName.ts +3 -1
- package/src/utils/makeStyleContext.ts +8 -4
- package/src/utils/toCamel.ts +1 -1
|
@@ -17,13 +17,13 @@ export interface ImageProps {
|
|
|
17
17
|
};
|
|
18
18
|
width?: number;
|
|
19
19
|
height?: number;
|
|
20
|
-
source?:
|
|
20
|
+
source?: string[];
|
|
21
21
|
lazy?: boolean;
|
|
22
22
|
fullscreen?: boolean;
|
|
23
23
|
ratio?: number;
|
|
24
24
|
}
|
|
25
25
|
export interface PictureProps {
|
|
26
|
-
source?:
|
|
26
|
+
source?: string[];
|
|
27
27
|
optimized?: {
|
|
28
28
|
original?: string;
|
|
29
29
|
w325: OptimizedImageItem;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { MaterialNoteProps } from 'src/MaterialNote/MaterialNote.types';
|
|
2
3
|
declare const _default: {
|
|
3
4
|
title: string;
|
|
4
|
-
component: React.FC<
|
|
5
|
+
component: React.FC<MaterialNoteProps>;
|
|
5
6
|
parameters: {
|
|
6
7
|
themeWrapperSideBySide: boolean;
|
|
7
8
|
};
|
package/dist/Tag/Tag.types.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
export declare type TagSizes = 'small' | 'large';
|
|
3
3
|
export declare type TagThemes = 'dark' | 'gold' | 'gray' | 'light' | 'inherit';
|
|
4
4
|
export declare type TagStyleContexts = 'isInToolbar' | 'isInSpoiler' | 'isInDropdown';
|
|
5
5
|
export interface TagProps {
|
|
6
|
-
children: JSX.Element[] | JSX.Element;
|
|
6
|
+
children: React.ReactNode | JSX.Element[] | JSX.Element;
|
|
7
7
|
styleContext?: string | string[];
|
|
8
8
|
theme: TagThemes;
|
|
9
9
|
size: TagSizes;
|
|
@@ -80,8 +80,6 @@ var Button = function Button(_ref) {
|
|
|
80
80
|
}, React__default.createElement(Loader, null)) : children);
|
|
81
81
|
};
|
|
82
82
|
|
|
83
|
-
var styles$1 = {"root":"SvgSymbol-module_root__2CsRW","small":"SvgSymbol-module_small__2g6oR","normal":"SvgSymbol-module_normal__9lFn1","medium":"SvgSymbol-module_medium__2eF5L","large":"SvgSymbol-module_large__2kQrt","adaptive":"SvgSymbol-module_adaptive__3_68T","fb":"SvgSymbol-module_fb__1whmw","vk":"SvgSymbol-module_vk__3VEuu","ok":"SvgSymbol-module_ok__2_1Qb","tw":"SvgSymbol-module_tw__2VRG5","tg":"SvgSymbol-module_tg__2xe2f","reaction":"SvgSymbol-module_reaction__rrJvf","card":"SvgSymbol-module_card__1XAqw","podcast":"SvgSymbol-module_podcast__3oPoo","read":"SvgSymbol-module_read__2V82i","listened":"SvgSymbol-module_listened__1oMFV","menu":"SvgSymbol-module_menu__2iYFt","cross":"SvgSymbol-module_cross__J2lCN","isInFeature":"SvgSymbol-module_isInFeature__cDeTI","isInCard":"SvgSymbol-module_isInCard__pKq4e","isInTopicBlockItem":"SvgSymbol-module_isInTopicBlockItem__3Te91","isInPageStatic":"SvgSymbol-module_isInPageStatic__H31Rd","isInMaterialMeta":"SvgSymbol-module_isInMaterialMeta__2IbAw","isInAudioPlayer":"SvgSymbol-module_isInAudioPlayer__2xlzW","isInEpisodeBlock":"SvgSymbol-module_isInEpisodeBlock__2vY3o","isInButtonPlaybackRate":"SvgSymbol-module_isInButtonPlaybackRate__1L3TW","isInButtonBackward":"SvgSymbol-module_isInButtonBackward__1Grf9","isInButtonForward":"SvgSymbol-module_isInButtonForward__D1AFL","isInToolbar":"SvgSymbol-module_isInToolbar__3SaIh","play":"SvgSymbol-module_play__pM-qY","meduzaLogo":"SvgSymbol-module_meduzaLogo__2Ouzp","arrow":"SvgSymbol-module_arrow__11naX","oil":"SvgSymbol-module_oil__hvHE5","search":"SvgSymbol-module_search__VK6p3","user":"SvgSymbol-module_user__1MGim","bookmark":"SvgSymbol-module_bookmark__2z7tX","receipt":"SvgSymbol-module_receipt__3Eqow","isInHeader":"SvgSymbol-module_isInHeader__1QHjL"};
|
|
84
|
-
|
|
85
83
|
var icons = {
|
|
86
84
|
meduzaLogo: {
|
|
87
85
|
width: 544,
|
|
@@ -240,6 +238,8 @@ var icons = {
|
|
|
240
238
|
}
|
|
241
239
|
};
|
|
242
240
|
|
|
241
|
+
var styles$1 = {"root":"SvgSymbol-module_root__2CsRW","small":"SvgSymbol-module_small__2g6oR","normal":"SvgSymbol-module_normal__9lFn1","medium":"SvgSymbol-module_medium__2eF5L","large":"SvgSymbol-module_large__2kQrt","adaptive":"SvgSymbol-module_adaptive__3_68T","fb":"SvgSymbol-module_fb__1whmw","vk":"SvgSymbol-module_vk__3VEuu","ok":"SvgSymbol-module_ok__2_1Qb","tw":"SvgSymbol-module_tw__2VRG5","tg":"SvgSymbol-module_tg__2xe2f","reaction":"SvgSymbol-module_reaction__rrJvf","card":"SvgSymbol-module_card__1XAqw","podcast":"SvgSymbol-module_podcast__3oPoo","read":"SvgSymbol-module_read__2V82i","listened":"SvgSymbol-module_listened__1oMFV","menu":"SvgSymbol-module_menu__2iYFt","cross":"SvgSymbol-module_cross__J2lCN","isInFeature":"SvgSymbol-module_isInFeature__cDeTI","isInCard":"SvgSymbol-module_isInCard__pKq4e","isInTopicBlockItem":"SvgSymbol-module_isInTopicBlockItem__3Te91","isInPageStatic":"SvgSymbol-module_isInPageStatic__H31Rd","isInMaterialMeta":"SvgSymbol-module_isInMaterialMeta__2IbAw","isInAudioPlayer":"SvgSymbol-module_isInAudioPlayer__2xlzW","isInEpisodeBlock":"SvgSymbol-module_isInEpisodeBlock__2vY3o","isInButtonPlaybackRate":"SvgSymbol-module_isInButtonPlaybackRate__1L3TW","isInButtonBackward":"SvgSymbol-module_isInButtonBackward__1Grf9","isInButtonForward":"SvgSymbol-module_isInButtonForward__D1AFL","isInToolbar":"SvgSymbol-module_isInToolbar__3SaIh","play":"SvgSymbol-module_play__pM-qY","meduzaLogo":"SvgSymbol-module_meduzaLogo__2Ouzp","arrow":"SvgSymbol-module_arrow__11naX","oil":"SvgSymbol-module_oil__hvHE5","search":"SvgSymbol-module_search__VK6p3","user":"SvgSymbol-module_user__1MGim","bookmark":"SvgSymbol-module_bookmark__2z7tX","receipt":"SvgSymbol-module_receipt__3Eqow","isInHeader":"SvgSymbol-module_isInHeader__1QHjL"};
|
|
242
|
+
|
|
243
243
|
var SvgSymbol = function SvgSymbol(_ref) {
|
|
244
244
|
var icon = _ref.icon,
|
|
245
245
|
size = _ref.size,
|
|
@@ -439,8 +439,6 @@ var Image = function Image(_ref) {
|
|
|
439
439
|
var _useContext = React.useContext(BlockContext),
|
|
440
440
|
lightBox = _useContext.lightBox;
|
|
441
441
|
|
|
442
|
-
console.log(React.useContext(BlockContext));
|
|
443
|
-
|
|
444
442
|
var handleClick = function handleClick() {
|
|
445
443
|
var _viewportSize = viewportSize(),
|
|
446
444
|
viewportWidth = _viewportSize.width;
|
|
@@ -1005,21 +1003,20 @@ var DangerousHTML = function DangerousHTML(_ref) {
|
|
|
1005
1003
|
});
|
|
1006
1004
|
}, []);
|
|
1007
1005
|
React.useEffect(function () {
|
|
1008
|
-
if (canRenderHtml && html.indexOf('script') > -1 && element.current) {
|
|
1009
|
-
element.current.innerHTML = html;
|
|
1010
|
-
replaceScriptElementsRecursive(element.current);
|
|
1006
|
+
if (canRenderHtml && html.indexOf('script') > -1 && element.current.firstElementChild) {
|
|
1007
|
+
element.current.firstElementChild.innerHTML = html;
|
|
1008
|
+
replaceScriptElementsRecursive(element.current.firstElementChild);
|
|
1011
1009
|
prepareAnchors();
|
|
1012
1010
|
}
|
|
1013
|
-
}, [canRenderHtml, element, html]);
|
|
1014
|
-
return React__default.createElement(
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
ref: element,
|
|
1011
|
+
}, [canRenderHtml, element, html, replaceScriptElementsRecursive, prepareAnchors]);
|
|
1012
|
+
return React__default.createElement("div", {
|
|
1013
|
+
ref: element
|
|
1014
|
+
}, React__default.createElement(TagName, {
|
|
1018
1015
|
className: className,
|
|
1019
1016
|
dangerouslySetInnerHTML: {
|
|
1020
1017
|
__html: html
|
|
1021
1018
|
}
|
|
1022
|
-
});
|
|
1019
|
+
}));
|
|
1023
1020
|
};
|
|
1024
1021
|
|
|
1025
1022
|
var styles$h = {"root":"EmbedBlock-module_root__28k9U","object":"EmbedBlock-module_object__2_UZ7","objectWrap":"EmbedBlock-module_objectWrap__1aDVd","proportional":"EmbedBlock-module_proportional__3lAv4","attachment":"EmbedBlock-module_attachment__2pE0t","default":"EmbedBlock-module_default__LSDny","xs":"EmbedBlock-module_xs__1hFgW","full":"EmbedBlock-module_full__1TEjx","super_full":"EmbedBlock-module_super_full__1Fn9A","figure":"EmbedBlock-module_figure__vAvcN","dark":"EmbedBlock-module_dark__1be2G","isInGroupedBlock":"EmbedBlock-module_isInGroupedBlock__3r_i-","gameEmbed":"EmbedBlock-module_gameEmbed__AZQSo","mobile":"EmbedBlock-module_mobile__1P-eo","desktop":"EmbedBlock-module_desktop__SF5a_","control":"EmbedBlock-module_control__xr8dZ","raw_html":"EmbedBlock-module_raw_html__MQoAA","mobileFullwidth":"EmbedBlock-module_mobileFullwidth__QFFLH","card":"EmbedBlock-module_card__KTbvp","slide":"EmbedBlock-module_slide__3cL3M","cc":"EmbedBlock-module_cc__1BQ5g","isInAnswer":"EmbedBlock-module_isInAnswer__tLlgs","picture":"EmbedBlock-module_picture__186q0","wrapper":"EmbedBlock-module_wrapper__33XvX"};
|
|
@@ -1333,15 +1330,18 @@ var CardTitle = function CardTitle(_ref) {
|
|
|
1333
1330
|
var styles$k = {"root":"ChapterBlock-module_root__1WyVn","subtitle":"ChapterBlock-module_subtitle__3TXll","mobile":"ChapterBlock-module_mobile__CiO0w","desktop":"ChapterBlock-module_desktop__tk1Nk"};
|
|
1334
1331
|
|
|
1335
1332
|
var ChapterBlock = function ChapterBlock(_ref) {
|
|
1336
|
-
var block = _ref.block,
|
|
1337
|
-
|
|
1333
|
+
var _ref$block = _ref.block,
|
|
1334
|
+
data = _ref$block.data,
|
|
1335
|
+
onlyOn = _ref$block.only_on,
|
|
1338
1336
|
styleContext = _ref.styleContext;
|
|
1339
1337
|
return React__default.createElement("div", {
|
|
1340
1338
|
"data-testid": "chapter-block",
|
|
1341
1339
|
className: makeClassName([[styles$k.root, true], [styles$k[onlyOn], !!onlyOn]])
|
|
1342
|
-
}, React__default.createElement(
|
|
1340
|
+
}, React__default.createElement("div", {
|
|
1343
1341
|
className: makeClassName([[styles$k.subtitle, true], [styles$k[styleContext], !!styleContext && !!styles$k[styleContext]]]),
|
|
1344
|
-
|
|
1342
|
+
dangerouslySetInnerHTML: {
|
|
1343
|
+
__html: data
|
|
1344
|
+
}
|
|
1345
1345
|
}));
|
|
1346
1346
|
};
|
|
1347
1347
|
|
|
@@ -1353,19 +1353,17 @@ var generateGradient = function generateGradient(color) {
|
|
|
1353
1353
|
return "linear-gradient(-180deg, " + gradient + ")";
|
|
1354
1354
|
};
|
|
1355
1355
|
|
|
1356
|
-
var styles$l = {"root":"
|
|
1357
|
-
|
|
1358
|
-
var styles$m = {"root":"SimpleTitle-module_root__2jVQN","mobile":"SimpleTitle-module_mobile__11gBz","desktop":"SimpleTitle-module_desktop__3yXgy"};
|
|
1356
|
+
var styles$l = {"root":"SimpleTitle-module_root__2jVQN","mobile":"SimpleTitle-module_mobile__11gBz","desktop":"SimpleTitle-module_desktop__3yXgy"};
|
|
1359
1357
|
|
|
1360
1358
|
var SimpleTitle = function SimpleTitle(_ref) {
|
|
1361
1359
|
var _ref$block = _ref.block,
|
|
1362
1360
|
first = _ref$block.data.first,
|
|
1363
1361
|
onlyOn = _ref$block.only_on,
|
|
1364
1362
|
styleContext = _ref.styleContext;
|
|
1365
|
-
var classNames = [[styles$
|
|
1363
|
+
var classNames = [[styles$l.root, true], [styles$l[onlyOn], true]];
|
|
1366
1364
|
|
|
1367
1365
|
if (styleContext) {
|
|
1368
|
-
classNames = makeStyleContext(classNames, styleContext, styles$
|
|
1366
|
+
classNames = makeStyleContext(classNames, styleContext, styles$l);
|
|
1369
1367
|
}
|
|
1370
1368
|
|
|
1371
1369
|
return React__default.createElement("div", {
|
|
@@ -1374,7 +1372,7 @@ var SimpleTitle = function SimpleTitle(_ref) {
|
|
|
1374
1372
|
}, first);
|
|
1375
1373
|
};
|
|
1376
1374
|
|
|
1377
|
-
var styles$
|
|
1375
|
+
var styles$m = {"root":"RichTitle-module_root__BK_WT","slide":"RichTitle-module_slide__1A-gB","game":"RichTitle-module_game__1g8Bn","half":"RichTitle-module_half__10GRI","featured":"RichTitle-module_featured__wJfaQ","mobile":"RichTitle-module_mobile__1Cb6E","desktop":"RichTitle-module_desktop__2ixSQ"};
|
|
1378
1376
|
|
|
1379
1377
|
var RichTitle = function RichTitle(_ref) {
|
|
1380
1378
|
var _ref$block = _ref.block,
|
|
@@ -1384,10 +1382,10 @@ var RichTitle = function RichTitle(_ref) {
|
|
|
1384
1382
|
first = _ref$block$data.first,
|
|
1385
1383
|
second = _ref$block$data.second,
|
|
1386
1384
|
styleContext = _ref.styleContext;
|
|
1387
|
-
var classNames = [[styles$
|
|
1385
|
+
var classNames = [[styles$m.root, true], [styles$m[onlyOn], true], [styles$m.featured, !!featured]];
|
|
1388
1386
|
|
|
1389
1387
|
if (styleContext) {
|
|
1390
|
-
classNames = makeStyleContext(classNames, styleContext, styles$
|
|
1388
|
+
classNames = makeStyleContext(classNames, styleContext, styles$m);
|
|
1391
1389
|
}
|
|
1392
1390
|
|
|
1393
1391
|
return React__default.createElement("h1", {
|
|
@@ -1396,7 +1394,7 @@ var RichTitle = function RichTitle(_ref) {
|
|
|
1396
1394
|
}, first, second && React__default.createElement("span", null, " ", second));
|
|
1397
1395
|
};
|
|
1398
1396
|
|
|
1399
|
-
var styles$
|
|
1397
|
+
var styles$n = {"p":"SimpleBlock-module_p__Q3azD","h2":"SimpleBlock-module_h2__S0LRs","h3":"SimpleBlock-module_h3__2Kv7Y","h4":"SimpleBlock-module_h4__2TJO3","lead":"SimpleBlock-module_lead__35nXx","lead_hr":"SimpleBlock-module_lead_hr__1yD5v","context_p":"SimpleBlock-module_context_p__33saY","blockquote":"SimpleBlock-module_blockquote__pwpcX","game":"SimpleBlock-module_game__2sjgl","slide":"SimpleBlock-module_slide__Aqgfu","dark":"SimpleBlock-module_dark__1J_ov","isInIntro":"SimpleBlock-module_isInIntro__DfutD","center":"SimpleBlock-module_center__2rjif","isInImportantLead":"SimpleBlock-module_isInImportantLead__3VGzT","isInAnswer":"SimpleBlock-module_isInAnswer__3aX6X","mobile":"SimpleBlock-module_mobile__Ckgek","desktop":"SimpleBlock-module_desktop__2se2o"};
|
|
1400
1398
|
|
|
1401
1399
|
var SimpleBlock = function SimpleBlock(_ref) {
|
|
1402
1400
|
var _ref$block = _ref.block,
|
|
@@ -1404,11 +1402,11 @@ var SimpleBlock = function SimpleBlock(_ref) {
|
|
|
1404
1402
|
type = _ref$block.type,
|
|
1405
1403
|
onlyOn = _ref$block.only_on,
|
|
1406
1404
|
styleContext = _ref.styleContext;
|
|
1407
|
-
var
|
|
1408
|
-
var classNames = [[styles$
|
|
1405
|
+
var TagName;
|
|
1406
|
+
var classNames = [[styles$n[type], !!type && !!styles$n[type]], [styles$n[onlyOn], true]];
|
|
1409
1407
|
|
|
1410
1408
|
if (styleContext) {
|
|
1411
|
-
classNames = makeStyleContext(classNames, styleContext, styles$
|
|
1409
|
+
classNames = makeStyleContext(classNames, styleContext, styles$n);
|
|
1412
1410
|
}
|
|
1413
1411
|
|
|
1414
1412
|
switch (type) {
|
|
@@ -1417,28 +1415,29 @@ var SimpleBlock = function SimpleBlock(_ref) {
|
|
|
1417
1415
|
case 'note_caption':
|
|
1418
1416
|
case 'note_credit':
|
|
1419
1417
|
{
|
|
1420
|
-
|
|
1418
|
+
TagName = 'p';
|
|
1421
1419
|
break;
|
|
1422
1420
|
}
|
|
1423
1421
|
|
|
1424
1422
|
case 'lead_hr':
|
|
1425
1423
|
{
|
|
1426
|
-
|
|
1424
|
+
TagName = 'div';
|
|
1427
1425
|
break;
|
|
1428
1426
|
}
|
|
1429
1427
|
|
|
1430
1428
|
default:
|
|
1431
|
-
|
|
1429
|
+
TagName = type;
|
|
1432
1430
|
}
|
|
1433
1431
|
|
|
1434
|
-
return React__default.createElement(
|
|
1432
|
+
return React__default.createElement(TagName, {
|
|
1435
1433
|
className: makeClassName(classNames),
|
|
1436
|
-
|
|
1437
|
-
|
|
1434
|
+
dangerouslySetInnerHTML: {
|
|
1435
|
+
__html: data
|
|
1436
|
+
}
|
|
1438
1437
|
});
|
|
1439
1438
|
};
|
|
1440
1439
|
|
|
1441
|
-
var styles$
|
|
1440
|
+
var styles$o = {"root":"ListBlock-module_root__3Q3Ga","ol":"ListBlock-module_ol__21CgV","ul":"ListBlock-module_ul__2MRrS","center":"ListBlock-module_center__tdIwd","isInImportantLead":"ListBlock-module_isInImportantLead__UP0ic","dark":"ListBlock-module_dark__3E3tV","mobile":"ListBlock-module_mobile__2-nuV","desktop":"ListBlock-module_desktop__1EE0g"};
|
|
1442
1441
|
|
|
1443
1442
|
var ListBlock = function ListBlock(_ref) {
|
|
1444
1443
|
var _ref$block = _ref.block,
|
|
@@ -1447,24 +1446,25 @@ var ListBlock = function ListBlock(_ref) {
|
|
|
1447
1446
|
onlyOn = _ref$block.only_on,
|
|
1448
1447
|
styleContext = _ref.styleContext;
|
|
1449
1448
|
var TagName = type;
|
|
1450
|
-
var classNames = [[styles$
|
|
1449
|
+
var classNames = [[styles$o.root, true], [styles$o[onlyOn], true], [styles$o[type], !!type && !!styles$o[type]]];
|
|
1451
1450
|
|
|
1452
1451
|
if (styleContext) {
|
|
1453
|
-
classNames = makeStyleContext(classNames, styleContext, styles$
|
|
1452
|
+
classNames = makeStyleContext(classNames, styleContext, styles$o);
|
|
1454
1453
|
}
|
|
1455
1454
|
|
|
1456
1455
|
return React__default.createElement(TagName, {
|
|
1457
1456
|
className: makeClassName(classNames)
|
|
1458
1457
|
}, data.map(function (item, index) {
|
|
1459
|
-
return React__default.createElement(
|
|
1458
|
+
return React__default.createElement("li", {
|
|
1460
1459
|
key: index,
|
|
1461
|
-
|
|
1462
|
-
|
|
1460
|
+
dangerouslySetInnerHTML: {
|
|
1461
|
+
__html: item
|
|
1462
|
+
}
|
|
1463
1463
|
});
|
|
1464
1464
|
}));
|
|
1465
1465
|
};
|
|
1466
1466
|
|
|
1467
|
-
var styles$
|
|
1467
|
+
var styles$p = {"root":"RelatedBlock-module_root__IKcQq","header":"RelatedBlock-module_header__2SuWP","items":"RelatedBlock-module_items__2V-Ap","rich":"RelatedBlock-module_rich__ddaHq","first":"RelatedBlock-module_first__BKItW","simple":"RelatedBlock-module_simple__29HVO","center":"RelatedBlock-module_center__1LmW8","isInSlideMaterial":"RelatedBlock-module_isInSlideMaterial__2YSYG","mobile":"RelatedBlock-module_mobile__2XM5a","desktop":"RelatedBlock-module_desktop__2mXeq"};
|
|
1468
1468
|
|
|
1469
1469
|
var RelatedBlock = function RelatedBlock(_ref) {
|
|
1470
1470
|
var _ref$block = _ref.block,
|
|
@@ -1473,46 +1473,47 @@ var RelatedBlock = function RelatedBlock(_ref) {
|
|
|
1473
1473
|
related = _ref$block$data.related,
|
|
1474
1474
|
onlyOn = _ref$block.only_on,
|
|
1475
1475
|
styleContext = _ref.styleContext;
|
|
1476
|
-
var classNames = [[styles$
|
|
1476
|
+
var classNames = [[styles$p.root, true], [styles$p[onlyOn], true]];
|
|
1477
1477
|
|
|
1478
1478
|
if (styleContext) {
|
|
1479
|
-
classNames = makeStyleContext(classNames, styleContext, styles$
|
|
1479
|
+
classNames = makeStyleContext(classNames, styleContext, styles$p);
|
|
1480
1480
|
}
|
|
1481
1481
|
|
|
1482
1482
|
return React__default.createElement("div", {
|
|
1483
1483
|
"data-testid": "related-block",
|
|
1484
1484
|
className: makeClassName(classNames)
|
|
1485
1485
|
}, React__default.createElement("h3", {
|
|
1486
|
-
className: styles$
|
|
1486
|
+
className: styles$p.header
|
|
1487
1487
|
}, title), React__default.createElement("ul", {
|
|
1488
|
-
className: styles$
|
|
1488
|
+
className: styles$p.items
|
|
1489
1489
|
}, related.map(function (item, index) {
|
|
1490
1490
|
return React__default.createElement("li", {
|
|
1491
1491
|
key: item.id || index,
|
|
1492
|
-
className: styles$
|
|
1492
|
+
className: styles$p[item.layout]
|
|
1493
1493
|
}, React__default.createElement("a", {
|
|
1494
1494
|
href: item.full_url || "/" + item.url,
|
|
1495
1495
|
target: "_blank",
|
|
1496
1496
|
rel: "noopener noreferrer"
|
|
1497
1497
|
}, React__default.createElement("span", {
|
|
1498
|
-
className: styles$
|
|
1498
|
+
className: styles$p.first
|
|
1499
1499
|
}, item.title), item.second_title && ' ', item.second_title && React__default.createElement("span", null, item.second_title)));
|
|
1500
1500
|
})));
|
|
1501
1501
|
};
|
|
1502
1502
|
|
|
1503
|
-
var styles$
|
|
1503
|
+
var styles$q = {"root":"SourceBlock-module_root__1P3XD","text":"SourceBlock-module_text__Si4vm","origin":"SourceBlock-module_origin__l3JbO","center":"SourceBlock-module_center__3P93B","mobile":"SourceBlock-module_mobile__2gw4S","desktop":"SourceBlock-module_desktop__DecT6"};
|
|
1504
1504
|
|
|
1505
1505
|
var SourceBlock = function SourceBlock(_ref) {
|
|
1506
1506
|
var _ref$block = _ref.block,
|
|
1507
1507
|
onlyOn = _ref$block.only_on,
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1508
|
+
_ref$block$data = _ref$block.data,
|
|
1509
|
+
quote = _ref$block$data.quote,
|
|
1510
|
+
origin = _ref$block$data.origin,
|
|
1511
|
+
url = _ref$block$data.url,
|
|
1511
1512
|
styleContext = _ref.styleContext;
|
|
1512
|
-
var classNames = [[styles$
|
|
1513
|
+
var classNames = [[styles$q.root, true], [styles$q[onlyOn], true]];
|
|
1513
1514
|
|
|
1514
1515
|
if (styleContext) {
|
|
1515
|
-
classNames = makeStyleContext(classNames, styleContext, styles$
|
|
1516
|
+
classNames = makeStyleContext(classNames, styleContext, styles$q);
|
|
1516
1517
|
}
|
|
1517
1518
|
|
|
1518
1519
|
return React__default.createElement("blockquote", {
|
|
@@ -1520,22 +1521,23 @@ var SourceBlock = function SourceBlock(_ref) {
|
|
|
1520
1521
|
cite: url,
|
|
1521
1522
|
className: makeClassName(classNames)
|
|
1522
1523
|
}, React__default.createElement("a", {
|
|
1523
|
-
className: styles$
|
|
1524
|
+
className: styles$q.text,
|
|
1524
1525
|
href: url,
|
|
1525
1526
|
target: "_blank",
|
|
1526
1527
|
rel: "noopener noreferrer"
|
|
1527
1528
|
}, quote.map(function (item, index) {
|
|
1528
|
-
return React__default.createElement(
|
|
1529
|
+
return React__default.createElement("p", {
|
|
1529
1530
|
key: index,
|
|
1530
|
-
|
|
1531
|
-
|
|
1531
|
+
dangerouslySetInnerHTML: {
|
|
1532
|
+
__html: item.data
|
|
1533
|
+
}
|
|
1532
1534
|
});
|
|
1533
1535
|
}), React__default.createElement("footer", null, React__default.createElement("cite", {
|
|
1534
|
-
className: styles$
|
|
1536
|
+
className: styles$q.origin
|
|
1535
1537
|
}, origin))));
|
|
1536
1538
|
};
|
|
1537
1539
|
|
|
1538
|
-
var styles$
|
|
1540
|
+
var styles$r = {"root":"GroupedBlock-module_root__2qfQA","hasFigcaption":"GroupedBlock-module_hasFigcaption__2_mcf","item":"GroupedBlock-module_item__3sz9_","items":"GroupedBlock-module_items__2DV2X","figcaption":"GroupedBlock-module_figcaption__2Q_wf","default":"GroupedBlock-module_default__3ylw_","full":"GroupedBlock-module_full__1dzQR","super_full":"GroupedBlock-module_super_full__1PU72","mobile":"GroupedBlock-module_mobile__3n8Ub","desktop":"GroupedBlock-module_desktop__6ZRpA"};
|
|
1539
1541
|
|
|
1540
1542
|
var GroupedBlock = function GroupedBlock(_ref) {
|
|
1541
1543
|
var block = _ref.block,
|
|
@@ -1550,21 +1552,21 @@ var GroupedBlock = function GroupedBlock(_ref) {
|
|
|
1550
1552
|
var sumWidth = normalizedBoxesWidth.reduce(function (sum, x) {
|
|
1551
1553
|
return sum + x;
|
|
1552
1554
|
});
|
|
1553
|
-
var classNames = [[styles$
|
|
1555
|
+
var classNames = [[styles$r.root, true], [styles$r[onlyOn], true], [styles$r.hasFigcaption, block.cc === 'default'], [styles$r[block.display], !!block.display && styles$r[block.display]]];
|
|
1554
1556
|
|
|
1555
1557
|
if (styleContext) {
|
|
1556
|
-
classNames = makeStyleContext(classNames, styleContext, styles$
|
|
1558
|
+
classNames = makeStyleContext(classNames, styleContext, styles$r);
|
|
1557
1559
|
}
|
|
1558
1560
|
|
|
1559
1561
|
return React__default.createElement("div", {
|
|
1560
1562
|
"data-testid": "grouped-block",
|
|
1561
1563
|
className: makeClassName(classNames)
|
|
1562
1564
|
}, React__default.createElement("div", {
|
|
1563
|
-
className: styles$
|
|
1565
|
+
className: styles$r.items
|
|
1564
1566
|
}, block.data.map(function (item, index) {
|
|
1565
1567
|
var percentWidth = normalizedBoxesWidth[index] / sumWidth * 100;
|
|
1566
1568
|
return React__default.createElement("div", {
|
|
1567
|
-
className: styles$
|
|
1569
|
+
className: styles$r.item,
|
|
1568
1570
|
key: item.id,
|
|
1569
1571
|
style: {
|
|
1570
1572
|
width: percentWidth + "%"
|
|
@@ -1574,7 +1576,7 @@ var GroupedBlock = function GroupedBlock(_ref) {
|
|
|
1574
1576
|
styleContext: "isInGroupedBlock"
|
|
1575
1577
|
}));
|
|
1576
1578
|
})), block.cc && React__default.createElement("figcaption", {
|
|
1577
|
-
className: styles$
|
|
1579
|
+
className: styles$r.figcaption
|
|
1578
1580
|
}, React__default.createElement(MediaCaption, {
|
|
1579
1581
|
credit: block.credit,
|
|
1580
1582
|
caption: block.caption,
|
|
@@ -1582,32 +1584,32 @@ var GroupedBlock = function GroupedBlock(_ref) {
|
|
|
1582
1584
|
})));
|
|
1583
1585
|
};
|
|
1584
1586
|
|
|
1585
|
-
var styles$
|
|
1587
|
+
var styles$s = {"root":"MetaItem-module_root__2VQom","hasBullets":"MetaItem-module_hasBullets__CkQPI","hasSource":"MetaItem-module_hasSource__1DmCI","listened":"MetaItem-module_listened__lwvAO","read":"MetaItem-module_read__5eAIG","datetime":"MetaItem-module_datetime__3tOWm"};
|
|
1586
1588
|
|
|
1587
1589
|
var MetaItem = function MetaItem(_ref) {
|
|
1588
1590
|
var hasSource = _ref.hasSource,
|
|
1589
1591
|
type = _ref.type,
|
|
1590
1592
|
children = _ref.children,
|
|
1591
1593
|
bullets = _ref.bullets;
|
|
1592
|
-
var classNames = [[styles$
|
|
1594
|
+
var classNames = [[styles$s.root, true], [styles$s[type], !!type && !!styles$s[type]], [styles$s.hasSource, !!hasSource], [styles$s.hasBullets, !!bullets]];
|
|
1593
1595
|
return React__default.createElement("div", {
|
|
1594
1596
|
"data-testid": "meta-item",
|
|
1595
1597
|
className: makeClassName(classNames)
|
|
1596
1598
|
}, children);
|
|
1597
1599
|
};
|
|
1598
1600
|
|
|
1599
|
-
var styles$
|
|
1601
|
+
var styles$t = {"root":"MetaItemLive-module_root__2mpD3","gold":"MetaItemLive-module_gold__3yZEV","frame":"MetaItemLive-module_frame__1H_Ha","liveMiddle":"MetaItemLive-module_liveMiddle__wyuV3","liveFirstWave":"MetaItemLive-module_liveFirstWave__3dbvz","liveSecondWave":"MetaItemLive-module_liveSecondWave__12g57"};
|
|
1600
1602
|
|
|
1601
1603
|
var MetaItemLive = function MetaItemLive(_ref) {
|
|
1602
1604
|
var _ref$theme = _ref.theme,
|
|
1603
1605
|
theme = _ref$theme === void 0 ? 'gold' : _ref$theme;
|
|
1604
|
-
var classNames = [[styles$
|
|
1606
|
+
var classNames = [[styles$t.root, true], [styles$t[theme], !!theme && styles$t[theme]]];
|
|
1605
1607
|
return React__default.createElement("div", {
|
|
1606
1608
|
"data-testid": "meta-item-live",
|
|
1607
1609
|
"data-meta": "live",
|
|
1608
1610
|
className: makeClassName(classNames)
|
|
1609
1611
|
}, React__default.createElement("div", {
|
|
1610
|
-
className: styles$
|
|
1612
|
+
className: styles$t.frame
|
|
1611
1613
|
}));
|
|
1612
1614
|
};
|
|
1613
1615
|
|
|
@@ -1632,7 +1634,7 @@ var pluralize = function pluralize(number, one, two, five) {
|
|
|
1632
1634
|
return five;
|
|
1633
1635
|
};
|
|
1634
1636
|
|
|
1635
|
-
var styles$
|
|
1637
|
+
var styles$u = {"root":"DocumentItemsCount-module_root__P3q-z","items":"DocumentItemsCount-module_items__3pfxW"};
|
|
1636
1638
|
|
|
1637
1639
|
var DocumentItemsCount = function DocumentItemsCount(_ref) {
|
|
1638
1640
|
var type = _ref.type,
|
|
@@ -1669,9 +1671,9 @@ var DocumentItemsCount = function DocumentItemsCount(_ref) {
|
|
|
1669
1671
|
var itemsCount = items + " " + pluralize(items, i18n[lang][type].one, i18n[lang][type].two, i18n[lang][type].five);
|
|
1670
1672
|
return React__default.createElement("div", {
|
|
1671
1673
|
"data-testid": "document-items-count",
|
|
1672
|
-
className: styles$
|
|
1674
|
+
className: styles$u.root
|
|
1673
1675
|
}, children, React__default.createElement("span", {
|
|
1674
|
-
className: styles$
|
|
1676
|
+
className: styles$u.items
|
|
1675
1677
|
}, itemsCount));
|
|
1676
1678
|
};
|
|
1677
1679
|
|
|
@@ -1941,6 +1943,8 @@ var RenderBlocks = function RenderBlocks(_ref) {
|
|
|
1941
1943
|
}
|
|
1942
1944
|
};
|
|
1943
1945
|
|
|
1946
|
+
var styles$v = {"root":"Cover-module_root__18Z8J","body":"Cover-module_body__1xs8e","image":"Cover-module_image__2f3Qc","rich":"Cover-module_rich__1fAGA","dark":"Cover-module_dark__2Ac-w","light":"Cover-module_light__FUp5X","control":"Cover-module_control__VXbhi","isInDynamicBlock":"Cover-module_isInDynamicBlock__3eghb","mobile":"Cover-module_mobile__5DKa1","desktop":"Cover-module_desktop__2mrOc"};
|
|
1947
|
+
|
|
1944
1948
|
var Cover = function Cover(_ref) {
|
|
1945
1949
|
var _ref$block = _ref.block,
|
|
1946
1950
|
onlyOn = _ref$block.only_on,
|
|
@@ -1960,15 +1964,15 @@ var Cover = function Cover(_ref) {
|
|
|
1960
1964
|
setIsPopoverShown = _useState[1];
|
|
1961
1965
|
|
|
1962
1966
|
var style = {};
|
|
1963
|
-
var classNames = [[styles$
|
|
1967
|
+
var classNames = [[styles$v.root, true], [styles$v[onlyOn], !!onlyOn && !!styles$v[onlyOn]]];
|
|
1964
1968
|
|
|
1965
1969
|
if (styleContext) {
|
|
1966
|
-
classNames = makeStyleContext(classNames, styleContext, styles$
|
|
1970
|
+
classNames = makeStyleContext(classNames, styleContext, styles$v);
|
|
1967
1971
|
}
|
|
1968
1972
|
|
|
1969
1973
|
if (gradients) {
|
|
1970
1974
|
var theme = [gradients.text_rgb === '0,0,0' ? 'dark' : 'light'];
|
|
1971
|
-
classNames = makeStyleContext(classNames, theme, styles$
|
|
1975
|
+
classNames = makeStyleContext(classNames, theme, styles$v);
|
|
1972
1976
|
style.backgroundImage = generateGradient(gradients.bg_rgb);
|
|
1973
1977
|
}
|
|
1974
1978
|
|
|
@@ -1984,13 +1988,13 @@ var Cover = function Cover(_ref) {
|
|
|
1984
1988
|
"data-testid": "cover",
|
|
1985
1989
|
className: makeClassName(classNames)
|
|
1986
1990
|
}, React__default.createElement("div", {
|
|
1987
|
-
className: styles$
|
|
1991
|
+
className: styles$v.image
|
|
1988
1992
|
}, React__default.createElement(Image, {
|
|
1989
1993
|
optimized: urls,
|
|
1990
1994
|
ratio: mobileRatio,
|
|
1991
1995
|
display: "narrow"
|
|
1992
1996
|
})), React__default.createElement("div", {
|
|
1993
|
-
className: styles$
|
|
1997
|
+
className: styles$v.body,
|
|
1994
1998
|
style: style
|
|
1995
1999
|
}, blocks.map(function (item) {
|
|
1996
2000
|
return React__default.createElement(RenderBlocks, {
|
|
@@ -1999,7 +2003,7 @@ var Cover = function Cover(_ref) {
|
|
|
1999
2003
|
styleContext: styleContext
|
|
2000
2004
|
});
|
|
2001
2005
|
})), cc === 'button' && React__default.createElement("button", {
|
|
2002
|
-
className: styles$
|
|
2006
|
+
className: styles$v.control,
|
|
2003
2007
|
type: "button",
|
|
2004
2008
|
"aria-label": "Open",
|
|
2005
2009
|
onClick: function onClick() {
|