@meduza/ui-kit-2 0.1.8 → 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/ui-kit-2.cjs.development.js +54 -53
- 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 +54 -53
- package/dist/ui-kit-2.esm.js.map +1 -1
- package/dist/ui-kit.css +279 -279
- 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 +1 -2
- 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 +1 -1
- 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 +1 -1
- package/src/GroupedBlock/GroupedBlock.test.tsx +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/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 -4
- 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 +2 -2
- package/src/ListBlock/ListBlock.test.tsx +1 -1
- package/src/ListBlock/index.tsx +2 -3
- 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/MediaCaption/MediaCaption.stories.tsx +1 -1
- package/src/MediaCaption/MediaCaption.test.tsx +1 -1
- package/src/MediaCaption/index.tsx +2 -2
- package/src/Meta/Meta.stories.tsx +1 -1
- 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/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 +2 -3
- 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 +6 -4
- 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/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 -1
- 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 +5 -7
- 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
|
};
|
|
@@ -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,
|
|
@@ -1003,9 +1003,9 @@ var DangerousHTML = function DangerousHTML(_ref) {
|
|
|
1003
1003
|
});
|
|
1004
1004
|
}, []);
|
|
1005
1005
|
React.useEffect(function () {
|
|
1006
|
-
if (canRenderHtml && html.indexOf('script') > -1 && element.current.
|
|
1006
|
+
if (canRenderHtml && html.indexOf('script') > -1 && element.current.firstElementChild) {
|
|
1007
1007
|
element.current.firstElementChild.innerHTML = html;
|
|
1008
|
-
replaceScriptElementsRecursive(element.current.
|
|
1008
|
+
replaceScriptElementsRecursive(element.current.firstElementChild);
|
|
1009
1009
|
prepareAnchors();
|
|
1010
1010
|
}
|
|
1011
1011
|
}, [canRenderHtml, element, html, replaceScriptElementsRecursive, prepareAnchors]);
|
|
@@ -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,
|
|
@@ -1405,10 +1403,10 @@ var SimpleBlock = function SimpleBlock(_ref) {
|
|
|
1405
1403
|
onlyOn = _ref$block.only_on,
|
|
1406
1404
|
styleContext = _ref.styleContext;
|
|
1407
1405
|
var TagName;
|
|
1408
|
-
var classNames = [[styles$
|
|
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) {
|
|
@@ -1439,7 +1437,7 @@ var SimpleBlock = function SimpleBlock(_ref) {
|
|
|
1439
1437
|
});
|
|
1440
1438
|
};
|
|
1441
1439
|
|
|
1442
|
-
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"};
|
|
1443
1441
|
|
|
1444
1442
|
var ListBlock = function ListBlock(_ref) {
|
|
1445
1443
|
var _ref$block = _ref.block,
|
|
@@ -1448,10 +1446,10 @@ var ListBlock = function ListBlock(_ref) {
|
|
|
1448
1446
|
onlyOn = _ref$block.only_on,
|
|
1449
1447
|
styleContext = _ref.styleContext;
|
|
1450
1448
|
var TagName = type;
|
|
1451
|
-
var classNames = [[styles$
|
|
1449
|
+
var classNames = [[styles$o.root, true], [styles$o[onlyOn], true], [styles$o[type], !!type && !!styles$o[type]]];
|
|
1452
1450
|
|
|
1453
1451
|
if (styleContext) {
|
|
1454
|
-
classNames = makeStyleContext(classNames, styleContext, styles$
|
|
1452
|
+
classNames = makeStyleContext(classNames, styleContext, styles$o);
|
|
1455
1453
|
}
|
|
1456
1454
|
|
|
1457
1455
|
return React__default.createElement(TagName, {
|
|
@@ -1466,7 +1464,7 @@ var ListBlock = function ListBlock(_ref) {
|
|
|
1466
1464
|
}));
|
|
1467
1465
|
};
|
|
1468
1466
|
|
|
1469
|
-
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"};
|
|
1470
1468
|
|
|
1471
1469
|
var RelatedBlock = function RelatedBlock(_ref) {
|
|
1472
1470
|
var _ref$block = _ref.block,
|
|
@@ -1475,46 +1473,47 @@ var RelatedBlock = function RelatedBlock(_ref) {
|
|
|
1475
1473
|
related = _ref$block$data.related,
|
|
1476
1474
|
onlyOn = _ref$block.only_on,
|
|
1477
1475
|
styleContext = _ref.styleContext;
|
|
1478
|
-
var classNames = [[styles$
|
|
1476
|
+
var classNames = [[styles$p.root, true], [styles$p[onlyOn], true]];
|
|
1479
1477
|
|
|
1480
1478
|
if (styleContext) {
|
|
1481
|
-
classNames = makeStyleContext(classNames, styleContext, styles$
|
|
1479
|
+
classNames = makeStyleContext(classNames, styleContext, styles$p);
|
|
1482
1480
|
}
|
|
1483
1481
|
|
|
1484
1482
|
return React__default.createElement("div", {
|
|
1485
1483
|
"data-testid": "related-block",
|
|
1486
1484
|
className: makeClassName(classNames)
|
|
1487
1485
|
}, React__default.createElement("h3", {
|
|
1488
|
-
className: styles$
|
|
1486
|
+
className: styles$p.header
|
|
1489
1487
|
}, title), React__default.createElement("ul", {
|
|
1490
|
-
className: styles$
|
|
1488
|
+
className: styles$p.items
|
|
1491
1489
|
}, related.map(function (item, index) {
|
|
1492
1490
|
return React__default.createElement("li", {
|
|
1493
1491
|
key: item.id || index,
|
|
1494
|
-
className: styles$
|
|
1492
|
+
className: styles$p[item.layout]
|
|
1495
1493
|
}, React__default.createElement("a", {
|
|
1496
1494
|
href: item.full_url || "/" + item.url,
|
|
1497
1495
|
target: "_blank",
|
|
1498
1496
|
rel: "noopener noreferrer"
|
|
1499
1497
|
}, React__default.createElement("span", {
|
|
1500
|
-
className: styles$
|
|
1498
|
+
className: styles$p.first
|
|
1501
1499
|
}, item.title), item.second_title && ' ', item.second_title && React__default.createElement("span", null, item.second_title)));
|
|
1502
1500
|
})));
|
|
1503
1501
|
};
|
|
1504
1502
|
|
|
1505
|
-
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"};
|
|
1506
1504
|
|
|
1507
1505
|
var SourceBlock = function SourceBlock(_ref) {
|
|
1508
1506
|
var _ref$block = _ref.block,
|
|
1509
1507
|
onlyOn = _ref$block.only_on,
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
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,
|
|
1513
1512
|
styleContext = _ref.styleContext;
|
|
1514
|
-
var classNames = [[styles$
|
|
1513
|
+
var classNames = [[styles$q.root, true], [styles$q[onlyOn], true]];
|
|
1515
1514
|
|
|
1516
1515
|
if (styleContext) {
|
|
1517
|
-
classNames = makeStyleContext(classNames, styleContext, styles$
|
|
1516
|
+
classNames = makeStyleContext(classNames, styleContext, styles$q);
|
|
1518
1517
|
}
|
|
1519
1518
|
|
|
1520
1519
|
return React__default.createElement("blockquote", {
|
|
@@ -1522,7 +1521,7 @@ var SourceBlock = function SourceBlock(_ref) {
|
|
|
1522
1521
|
cite: url,
|
|
1523
1522
|
className: makeClassName(classNames)
|
|
1524
1523
|
}, React__default.createElement("a", {
|
|
1525
|
-
className: styles$
|
|
1524
|
+
className: styles$q.text,
|
|
1526
1525
|
href: url,
|
|
1527
1526
|
target: "_blank",
|
|
1528
1527
|
rel: "noopener noreferrer"
|
|
@@ -1534,11 +1533,11 @@ var SourceBlock = function SourceBlock(_ref) {
|
|
|
1534
1533
|
}
|
|
1535
1534
|
});
|
|
1536
1535
|
}), React__default.createElement("footer", null, React__default.createElement("cite", {
|
|
1537
|
-
className: styles$
|
|
1536
|
+
className: styles$q.origin
|
|
1538
1537
|
}, origin))));
|
|
1539
1538
|
};
|
|
1540
1539
|
|
|
1541
|
-
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"};
|
|
1542
1541
|
|
|
1543
1542
|
var GroupedBlock = function GroupedBlock(_ref) {
|
|
1544
1543
|
var block = _ref.block,
|
|
@@ -1553,21 +1552,21 @@ var GroupedBlock = function GroupedBlock(_ref) {
|
|
|
1553
1552
|
var sumWidth = normalizedBoxesWidth.reduce(function (sum, x) {
|
|
1554
1553
|
return sum + x;
|
|
1555
1554
|
});
|
|
1556
|
-
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]]];
|
|
1557
1556
|
|
|
1558
1557
|
if (styleContext) {
|
|
1559
|
-
classNames = makeStyleContext(classNames, styleContext, styles$
|
|
1558
|
+
classNames = makeStyleContext(classNames, styleContext, styles$r);
|
|
1560
1559
|
}
|
|
1561
1560
|
|
|
1562
1561
|
return React__default.createElement("div", {
|
|
1563
1562
|
"data-testid": "grouped-block",
|
|
1564
1563
|
className: makeClassName(classNames)
|
|
1565
1564
|
}, React__default.createElement("div", {
|
|
1566
|
-
className: styles$
|
|
1565
|
+
className: styles$r.items
|
|
1567
1566
|
}, block.data.map(function (item, index) {
|
|
1568
1567
|
var percentWidth = normalizedBoxesWidth[index] / sumWidth * 100;
|
|
1569
1568
|
return React__default.createElement("div", {
|
|
1570
|
-
className: styles$
|
|
1569
|
+
className: styles$r.item,
|
|
1571
1570
|
key: item.id,
|
|
1572
1571
|
style: {
|
|
1573
1572
|
width: percentWidth + "%"
|
|
@@ -1577,7 +1576,7 @@ var GroupedBlock = function GroupedBlock(_ref) {
|
|
|
1577
1576
|
styleContext: "isInGroupedBlock"
|
|
1578
1577
|
}));
|
|
1579
1578
|
})), block.cc && React__default.createElement("figcaption", {
|
|
1580
|
-
className: styles$
|
|
1579
|
+
className: styles$r.figcaption
|
|
1581
1580
|
}, React__default.createElement(MediaCaption, {
|
|
1582
1581
|
credit: block.credit,
|
|
1583
1582
|
caption: block.caption,
|
|
@@ -1585,32 +1584,32 @@ var GroupedBlock = function GroupedBlock(_ref) {
|
|
|
1585
1584
|
})));
|
|
1586
1585
|
};
|
|
1587
1586
|
|
|
1588
|
-
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"};
|
|
1589
1588
|
|
|
1590
1589
|
var MetaItem = function MetaItem(_ref) {
|
|
1591
1590
|
var hasSource = _ref.hasSource,
|
|
1592
1591
|
type = _ref.type,
|
|
1593
1592
|
children = _ref.children,
|
|
1594
1593
|
bullets = _ref.bullets;
|
|
1595
|
-
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]];
|
|
1596
1595
|
return React__default.createElement("div", {
|
|
1597
1596
|
"data-testid": "meta-item",
|
|
1598
1597
|
className: makeClassName(classNames)
|
|
1599
1598
|
}, children);
|
|
1600
1599
|
};
|
|
1601
1600
|
|
|
1602
|
-
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"};
|
|
1603
1602
|
|
|
1604
1603
|
var MetaItemLive = function MetaItemLive(_ref) {
|
|
1605
1604
|
var _ref$theme = _ref.theme,
|
|
1606
1605
|
theme = _ref$theme === void 0 ? 'gold' : _ref$theme;
|
|
1607
|
-
var classNames = [[styles$
|
|
1606
|
+
var classNames = [[styles$t.root, true], [styles$t[theme], !!theme && styles$t[theme]]];
|
|
1608
1607
|
return React__default.createElement("div", {
|
|
1609
1608
|
"data-testid": "meta-item-live",
|
|
1610
1609
|
"data-meta": "live",
|
|
1611
1610
|
className: makeClassName(classNames)
|
|
1612
1611
|
}, React__default.createElement("div", {
|
|
1613
|
-
className: styles$
|
|
1612
|
+
className: styles$t.frame
|
|
1614
1613
|
}));
|
|
1615
1614
|
};
|
|
1616
1615
|
|
|
@@ -1635,7 +1634,7 @@ var pluralize = function pluralize(number, one, two, five) {
|
|
|
1635
1634
|
return five;
|
|
1636
1635
|
};
|
|
1637
1636
|
|
|
1638
|
-
var styles$
|
|
1637
|
+
var styles$u = {"root":"DocumentItemsCount-module_root__P3q-z","items":"DocumentItemsCount-module_items__3pfxW"};
|
|
1639
1638
|
|
|
1640
1639
|
var DocumentItemsCount = function DocumentItemsCount(_ref) {
|
|
1641
1640
|
var type = _ref.type,
|
|
@@ -1672,9 +1671,9 @@ var DocumentItemsCount = function DocumentItemsCount(_ref) {
|
|
|
1672
1671
|
var itemsCount = items + " " + pluralize(items, i18n[lang][type].one, i18n[lang][type].two, i18n[lang][type].five);
|
|
1673
1672
|
return React__default.createElement("div", {
|
|
1674
1673
|
"data-testid": "document-items-count",
|
|
1675
|
-
className: styles$
|
|
1674
|
+
className: styles$u.root
|
|
1676
1675
|
}, children, React__default.createElement("span", {
|
|
1677
|
-
className: styles$
|
|
1676
|
+
className: styles$u.items
|
|
1678
1677
|
}, itemsCount));
|
|
1679
1678
|
};
|
|
1680
1679
|
|
|
@@ -1944,6 +1943,8 @@ var RenderBlocks = function RenderBlocks(_ref) {
|
|
|
1944
1943
|
}
|
|
1945
1944
|
};
|
|
1946
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
|
+
|
|
1947
1948
|
var Cover = function Cover(_ref) {
|
|
1948
1949
|
var _ref$block = _ref.block,
|
|
1949
1950
|
onlyOn = _ref$block.only_on,
|
|
@@ -1963,15 +1964,15 @@ var Cover = function Cover(_ref) {
|
|
|
1963
1964
|
setIsPopoverShown = _useState[1];
|
|
1964
1965
|
|
|
1965
1966
|
var style = {};
|
|
1966
|
-
var classNames = [[styles$
|
|
1967
|
+
var classNames = [[styles$v.root, true], [styles$v[onlyOn], !!onlyOn && !!styles$v[onlyOn]]];
|
|
1967
1968
|
|
|
1968
1969
|
if (styleContext) {
|
|
1969
|
-
classNames = makeStyleContext(classNames, styleContext, styles$
|
|
1970
|
+
classNames = makeStyleContext(classNames, styleContext, styles$v);
|
|
1970
1971
|
}
|
|
1971
1972
|
|
|
1972
1973
|
if (gradients) {
|
|
1973
1974
|
var theme = [gradients.text_rgb === '0,0,0' ? 'dark' : 'light'];
|
|
1974
|
-
classNames = makeStyleContext(classNames, theme, styles$
|
|
1975
|
+
classNames = makeStyleContext(classNames, theme, styles$v);
|
|
1975
1976
|
style.backgroundImage = generateGradient(gradients.bg_rgb);
|
|
1976
1977
|
}
|
|
1977
1978
|
|
|
@@ -1987,13 +1988,13 @@ var Cover = function Cover(_ref) {
|
|
|
1987
1988
|
"data-testid": "cover",
|
|
1988
1989
|
className: makeClassName(classNames)
|
|
1989
1990
|
}, React__default.createElement("div", {
|
|
1990
|
-
className: styles$
|
|
1991
|
+
className: styles$v.image
|
|
1991
1992
|
}, React__default.createElement(Image, {
|
|
1992
1993
|
optimized: urls,
|
|
1993
1994
|
ratio: mobileRatio,
|
|
1994
1995
|
display: "narrow"
|
|
1995
1996
|
})), React__default.createElement("div", {
|
|
1996
|
-
className: styles$
|
|
1997
|
+
className: styles$v.body,
|
|
1997
1998
|
style: style
|
|
1998
1999
|
}, blocks.map(function (item) {
|
|
1999
2000
|
return React__default.createElement(RenderBlocks, {
|
|
@@ -2002,7 +2003,7 @@ var Cover = function Cover(_ref) {
|
|
|
2002
2003
|
styleContext: styleContext
|
|
2003
2004
|
});
|
|
2004
2005
|
})), cc === 'button' && React__default.createElement("button", {
|
|
2005
|
-
className: styles$
|
|
2006
|
+
className: styles$v.control,
|
|
2006
2007
|
type: "button",
|
|
2007
2008
|
"aria-label": "Open",
|
|
2008
2009
|
onClick: function onClick() {
|