@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
package/dist/ui-kit-2.esm.js
CHANGED
|
@@ -73,8 +73,6 @@ var Button = function Button(_ref) {
|
|
|
73
73
|
}, React.createElement(Loader, null)) : children);
|
|
74
74
|
};
|
|
75
75
|
|
|
76
|
-
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"};
|
|
77
|
-
|
|
78
76
|
var icons = {
|
|
79
77
|
meduzaLogo: {
|
|
80
78
|
width: 544,
|
|
@@ -233,6 +231,8 @@ var icons = {
|
|
|
233
231
|
}
|
|
234
232
|
};
|
|
235
233
|
|
|
234
|
+
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"};
|
|
235
|
+
|
|
236
236
|
var SvgSymbol = function SvgSymbol(_ref) {
|
|
237
237
|
var icon = _ref.icon,
|
|
238
238
|
size = _ref.size,
|
|
@@ -996,9 +996,9 @@ var DangerousHTML = function DangerousHTML(_ref) {
|
|
|
996
996
|
});
|
|
997
997
|
}, []);
|
|
998
998
|
useEffect(function () {
|
|
999
|
-
if (canRenderHtml && html.indexOf('script') > -1 && element.current.
|
|
999
|
+
if (canRenderHtml && html.indexOf('script') > -1 && element.current.firstElementChild) {
|
|
1000
1000
|
element.current.firstElementChild.innerHTML = html;
|
|
1001
|
-
replaceScriptElementsRecursive(element.current.
|
|
1001
|
+
replaceScriptElementsRecursive(element.current.firstElementChild);
|
|
1002
1002
|
prepareAnchors();
|
|
1003
1003
|
}
|
|
1004
1004
|
}, [canRenderHtml, element, html, replaceScriptElementsRecursive, prepareAnchors]);
|
|
@@ -1346,19 +1346,17 @@ var generateGradient = function generateGradient(color) {
|
|
|
1346
1346
|
return "linear-gradient(-180deg, " + gradient + ")";
|
|
1347
1347
|
};
|
|
1348
1348
|
|
|
1349
|
-
var styles$l = {"root":"
|
|
1350
|
-
|
|
1351
|
-
var styles$m = {"root":"SimpleTitle-module_root__2jVQN","mobile":"SimpleTitle-module_mobile__11gBz","desktop":"SimpleTitle-module_desktop__3yXgy"};
|
|
1349
|
+
var styles$l = {"root":"SimpleTitle-module_root__2jVQN","mobile":"SimpleTitle-module_mobile__11gBz","desktop":"SimpleTitle-module_desktop__3yXgy"};
|
|
1352
1350
|
|
|
1353
1351
|
var SimpleTitle = function SimpleTitle(_ref) {
|
|
1354
1352
|
var _ref$block = _ref.block,
|
|
1355
1353
|
first = _ref$block.data.first,
|
|
1356
1354
|
onlyOn = _ref$block.only_on,
|
|
1357
1355
|
styleContext = _ref.styleContext;
|
|
1358
|
-
var classNames = [[styles$
|
|
1356
|
+
var classNames = [[styles$l.root, true], [styles$l[onlyOn], true]];
|
|
1359
1357
|
|
|
1360
1358
|
if (styleContext) {
|
|
1361
|
-
classNames = makeStyleContext(classNames, styleContext, styles$
|
|
1359
|
+
classNames = makeStyleContext(classNames, styleContext, styles$l);
|
|
1362
1360
|
}
|
|
1363
1361
|
|
|
1364
1362
|
return React.createElement("div", {
|
|
@@ -1367,7 +1365,7 @@ var SimpleTitle = function SimpleTitle(_ref) {
|
|
|
1367
1365
|
}, first);
|
|
1368
1366
|
};
|
|
1369
1367
|
|
|
1370
|
-
var styles$
|
|
1368
|
+
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"};
|
|
1371
1369
|
|
|
1372
1370
|
var RichTitle = function RichTitle(_ref) {
|
|
1373
1371
|
var _ref$block = _ref.block,
|
|
@@ -1377,10 +1375,10 @@ var RichTitle = function RichTitle(_ref) {
|
|
|
1377
1375
|
first = _ref$block$data.first,
|
|
1378
1376
|
second = _ref$block$data.second,
|
|
1379
1377
|
styleContext = _ref.styleContext;
|
|
1380
|
-
var classNames = [[styles$
|
|
1378
|
+
var classNames = [[styles$m.root, true], [styles$m[onlyOn], true], [styles$m.featured, !!featured]];
|
|
1381
1379
|
|
|
1382
1380
|
if (styleContext) {
|
|
1383
|
-
classNames = makeStyleContext(classNames, styleContext, styles$
|
|
1381
|
+
classNames = makeStyleContext(classNames, styleContext, styles$m);
|
|
1384
1382
|
}
|
|
1385
1383
|
|
|
1386
1384
|
return React.createElement("h1", {
|
|
@@ -1389,7 +1387,7 @@ var RichTitle = function RichTitle(_ref) {
|
|
|
1389
1387
|
}, first, second && React.createElement("span", null, " ", second));
|
|
1390
1388
|
};
|
|
1391
1389
|
|
|
1392
|
-
var styles$
|
|
1390
|
+
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"};
|
|
1393
1391
|
|
|
1394
1392
|
var SimpleBlock = function SimpleBlock(_ref) {
|
|
1395
1393
|
var _ref$block = _ref.block,
|
|
@@ -1398,10 +1396,10 @@ var SimpleBlock = function SimpleBlock(_ref) {
|
|
|
1398
1396
|
onlyOn = _ref$block.only_on,
|
|
1399
1397
|
styleContext = _ref.styleContext;
|
|
1400
1398
|
var TagName;
|
|
1401
|
-
var classNames = [[styles$
|
|
1399
|
+
var classNames = [[styles$n[type], !!type && !!styles$n[type]], [styles$n[onlyOn], true]];
|
|
1402
1400
|
|
|
1403
1401
|
if (styleContext) {
|
|
1404
|
-
classNames = makeStyleContext(classNames, styleContext, styles$
|
|
1402
|
+
classNames = makeStyleContext(classNames, styleContext, styles$n);
|
|
1405
1403
|
}
|
|
1406
1404
|
|
|
1407
1405
|
switch (type) {
|
|
@@ -1432,7 +1430,7 @@ var SimpleBlock = function SimpleBlock(_ref) {
|
|
|
1432
1430
|
});
|
|
1433
1431
|
};
|
|
1434
1432
|
|
|
1435
|
-
var styles$
|
|
1433
|
+
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"};
|
|
1436
1434
|
|
|
1437
1435
|
var ListBlock = function ListBlock(_ref) {
|
|
1438
1436
|
var _ref$block = _ref.block,
|
|
@@ -1441,10 +1439,10 @@ var ListBlock = function ListBlock(_ref) {
|
|
|
1441
1439
|
onlyOn = _ref$block.only_on,
|
|
1442
1440
|
styleContext = _ref.styleContext;
|
|
1443
1441
|
var TagName = type;
|
|
1444
|
-
var classNames = [[styles$
|
|
1442
|
+
var classNames = [[styles$o.root, true], [styles$o[onlyOn], true], [styles$o[type], !!type && !!styles$o[type]]];
|
|
1445
1443
|
|
|
1446
1444
|
if (styleContext) {
|
|
1447
|
-
classNames = makeStyleContext(classNames, styleContext, styles$
|
|
1445
|
+
classNames = makeStyleContext(classNames, styleContext, styles$o);
|
|
1448
1446
|
}
|
|
1449
1447
|
|
|
1450
1448
|
return React.createElement(TagName, {
|
|
@@ -1459,7 +1457,7 @@ var ListBlock = function ListBlock(_ref) {
|
|
|
1459
1457
|
}));
|
|
1460
1458
|
};
|
|
1461
1459
|
|
|
1462
|
-
var styles$
|
|
1460
|
+
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"};
|
|
1463
1461
|
|
|
1464
1462
|
var RelatedBlock = function RelatedBlock(_ref) {
|
|
1465
1463
|
var _ref$block = _ref.block,
|
|
@@ -1468,46 +1466,47 @@ var RelatedBlock = function RelatedBlock(_ref) {
|
|
|
1468
1466
|
related = _ref$block$data.related,
|
|
1469
1467
|
onlyOn = _ref$block.only_on,
|
|
1470
1468
|
styleContext = _ref.styleContext;
|
|
1471
|
-
var classNames = [[styles$
|
|
1469
|
+
var classNames = [[styles$p.root, true], [styles$p[onlyOn], true]];
|
|
1472
1470
|
|
|
1473
1471
|
if (styleContext) {
|
|
1474
|
-
classNames = makeStyleContext(classNames, styleContext, styles$
|
|
1472
|
+
classNames = makeStyleContext(classNames, styleContext, styles$p);
|
|
1475
1473
|
}
|
|
1476
1474
|
|
|
1477
1475
|
return React.createElement("div", {
|
|
1478
1476
|
"data-testid": "related-block",
|
|
1479
1477
|
className: makeClassName(classNames)
|
|
1480
1478
|
}, React.createElement("h3", {
|
|
1481
|
-
className: styles$
|
|
1479
|
+
className: styles$p.header
|
|
1482
1480
|
}, title), React.createElement("ul", {
|
|
1483
|
-
className: styles$
|
|
1481
|
+
className: styles$p.items
|
|
1484
1482
|
}, related.map(function (item, index) {
|
|
1485
1483
|
return React.createElement("li", {
|
|
1486
1484
|
key: item.id || index,
|
|
1487
|
-
className: styles$
|
|
1485
|
+
className: styles$p[item.layout]
|
|
1488
1486
|
}, React.createElement("a", {
|
|
1489
1487
|
href: item.full_url || "/" + item.url,
|
|
1490
1488
|
target: "_blank",
|
|
1491
1489
|
rel: "noopener noreferrer"
|
|
1492
1490
|
}, React.createElement("span", {
|
|
1493
|
-
className: styles$
|
|
1491
|
+
className: styles$p.first
|
|
1494
1492
|
}, item.title), item.second_title && ' ', item.second_title && React.createElement("span", null, item.second_title)));
|
|
1495
1493
|
})));
|
|
1496
1494
|
};
|
|
1497
1495
|
|
|
1498
|
-
var styles$
|
|
1496
|
+
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"};
|
|
1499
1497
|
|
|
1500
1498
|
var SourceBlock = function SourceBlock(_ref) {
|
|
1501
1499
|
var _ref$block = _ref.block,
|
|
1502
1500
|
onlyOn = _ref$block.only_on,
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1501
|
+
_ref$block$data = _ref$block.data,
|
|
1502
|
+
quote = _ref$block$data.quote,
|
|
1503
|
+
origin = _ref$block$data.origin,
|
|
1504
|
+
url = _ref$block$data.url,
|
|
1506
1505
|
styleContext = _ref.styleContext;
|
|
1507
|
-
var classNames = [[styles$
|
|
1506
|
+
var classNames = [[styles$q.root, true], [styles$q[onlyOn], true]];
|
|
1508
1507
|
|
|
1509
1508
|
if (styleContext) {
|
|
1510
|
-
classNames = makeStyleContext(classNames, styleContext, styles$
|
|
1509
|
+
classNames = makeStyleContext(classNames, styleContext, styles$q);
|
|
1511
1510
|
}
|
|
1512
1511
|
|
|
1513
1512
|
return React.createElement("blockquote", {
|
|
@@ -1515,7 +1514,7 @@ var SourceBlock = function SourceBlock(_ref) {
|
|
|
1515
1514
|
cite: url,
|
|
1516
1515
|
className: makeClassName(classNames)
|
|
1517
1516
|
}, React.createElement("a", {
|
|
1518
|
-
className: styles$
|
|
1517
|
+
className: styles$q.text,
|
|
1519
1518
|
href: url,
|
|
1520
1519
|
target: "_blank",
|
|
1521
1520
|
rel: "noopener noreferrer"
|
|
@@ -1527,11 +1526,11 @@ var SourceBlock = function SourceBlock(_ref) {
|
|
|
1527
1526
|
}
|
|
1528
1527
|
});
|
|
1529
1528
|
}), React.createElement("footer", null, React.createElement("cite", {
|
|
1530
|
-
className: styles$
|
|
1529
|
+
className: styles$q.origin
|
|
1531
1530
|
}, origin))));
|
|
1532
1531
|
};
|
|
1533
1532
|
|
|
1534
|
-
var styles$
|
|
1533
|
+
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"};
|
|
1535
1534
|
|
|
1536
1535
|
var GroupedBlock = function GroupedBlock(_ref) {
|
|
1537
1536
|
var block = _ref.block,
|
|
@@ -1546,21 +1545,21 @@ var GroupedBlock = function GroupedBlock(_ref) {
|
|
|
1546
1545
|
var sumWidth = normalizedBoxesWidth.reduce(function (sum, x) {
|
|
1547
1546
|
return sum + x;
|
|
1548
1547
|
});
|
|
1549
|
-
var classNames = [[styles$
|
|
1548
|
+
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]]];
|
|
1550
1549
|
|
|
1551
1550
|
if (styleContext) {
|
|
1552
|
-
classNames = makeStyleContext(classNames, styleContext, styles$
|
|
1551
|
+
classNames = makeStyleContext(classNames, styleContext, styles$r);
|
|
1553
1552
|
}
|
|
1554
1553
|
|
|
1555
1554
|
return React.createElement("div", {
|
|
1556
1555
|
"data-testid": "grouped-block",
|
|
1557
1556
|
className: makeClassName(classNames)
|
|
1558
1557
|
}, React.createElement("div", {
|
|
1559
|
-
className: styles$
|
|
1558
|
+
className: styles$r.items
|
|
1560
1559
|
}, block.data.map(function (item, index) {
|
|
1561
1560
|
var percentWidth = normalizedBoxesWidth[index] / sumWidth * 100;
|
|
1562
1561
|
return React.createElement("div", {
|
|
1563
|
-
className: styles$
|
|
1562
|
+
className: styles$r.item,
|
|
1564
1563
|
key: item.id,
|
|
1565
1564
|
style: {
|
|
1566
1565
|
width: percentWidth + "%"
|
|
@@ -1570,7 +1569,7 @@ var GroupedBlock = function GroupedBlock(_ref) {
|
|
|
1570
1569
|
styleContext: "isInGroupedBlock"
|
|
1571
1570
|
}));
|
|
1572
1571
|
})), block.cc && React.createElement("figcaption", {
|
|
1573
|
-
className: styles$
|
|
1572
|
+
className: styles$r.figcaption
|
|
1574
1573
|
}, React.createElement(MediaCaption, {
|
|
1575
1574
|
credit: block.credit,
|
|
1576
1575
|
caption: block.caption,
|
|
@@ -1578,32 +1577,32 @@ var GroupedBlock = function GroupedBlock(_ref) {
|
|
|
1578
1577
|
})));
|
|
1579
1578
|
};
|
|
1580
1579
|
|
|
1581
|
-
var styles$
|
|
1580
|
+
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"};
|
|
1582
1581
|
|
|
1583
1582
|
var MetaItem = function MetaItem(_ref) {
|
|
1584
1583
|
var hasSource = _ref.hasSource,
|
|
1585
1584
|
type = _ref.type,
|
|
1586
1585
|
children = _ref.children,
|
|
1587
1586
|
bullets = _ref.bullets;
|
|
1588
|
-
var classNames = [[styles$
|
|
1587
|
+
var classNames = [[styles$s.root, true], [styles$s[type], !!type && !!styles$s[type]], [styles$s.hasSource, !!hasSource], [styles$s.hasBullets, !!bullets]];
|
|
1589
1588
|
return React.createElement("div", {
|
|
1590
1589
|
"data-testid": "meta-item",
|
|
1591
1590
|
className: makeClassName(classNames)
|
|
1592
1591
|
}, children);
|
|
1593
1592
|
};
|
|
1594
1593
|
|
|
1595
|
-
var styles$
|
|
1594
|
+
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"};
|
|
1596
1595
|
|
|
1597
1596
|
var MetaItemLive = function MetaItemLive(_ref) {
|
|
1598
1597
|
var _ref$theme = _ref.theme,
|
|
1599
1598
|
theme = _ref$theme === void 0 ? 'gold' : _ref$theme;
|
|
1600
|
-
var classNames = [[styles$
|
|
1599
|
+
var classNames = [[styles$t.root, true], [styles$t[theme], !!theme && styles$t[theme]]];
|
|
1601
1600
|
return React.createElement("div", {
|
|
1602
1601
|
"data-testid": "meta-item-live",
|
|
1603
1602
|
"data-meta": "live",
|
|
1604
1603
|
className: makeClassName(classNames)
|
|
1605
1604
|
}, React.createElement("div", {
|
|
1606
|
-
className: styles$
|
|
1605
|
+
className: styles$t.frame
|
|
1607
1606
|
}));
|
|
1608
1607
|
};
|
|
1609
1608
|
|
|
@@ -1628,7 +1627,7 @@ var pluralize = function pluralize(number, one, two, five) {
|
|
|
1628
1627
|
return five;
|
|
1629
1628
|
};
|
|
1630
1629
|
|
|
1631
|
-
var styles$
|
|
1630
|
+
var styles$u = {"root":"DocumentItemsCount-module_root__P3q-z","items":"DocumentItemsCount-module_items__3pfxW"};
|
|
1632
1631
|
|
|
1633
1632
|
var DocumentItemsCount = function DocumentItemsCount(_ref) {
|
|
1634
1633
|
var type = _ref.type,
|
|
@@ -1665,9 +1664,9 @@ var DocumentItemsCount = function DocumentItemsCount(_ref) {
|
|
|
1665
1664
|
var itemsCount = items + " " + pluralize(items, i18n[lang][type].one, i18n[lang][type].two, i18n[lang][type].five);
|
|
1666
1665
|
return React.createElement("div", {
|
|
1667
1666
|
"data-testid": "document-items-count",
|
|
1668
|
-
className: styles$
|
|
1667
|
+
className: styles$u.root
|
|
1669
1668
|
}, children, React.createElement("span", {
|
|
1670
|
-
className: styles$
|
|
1669
|
+
className: styles$u.items
|
|
1671
1670
|
}, itemsCount));
|
|
1672
1671
|
};
|
|
1673
1672
|
|
|
@@ -1937,6 +1936,8 @@ var RenderBlocks = function RenderBlocks(_ref) {
|
|
|
1937
1936
|
}
|
|
1938
1937
|
};
|
|
1939
1938
|
|
|
1939
|
+
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"};
|
|
1940
|
+
|
|
1940
1941
|
var Cover = function Cover(_ref) {
|
|
1941
1942
|
var _ref$block = _ref.block,
|
|
1942
1943
|
onlyOn = _ref$block.only_on,
|
|
@@ -1956,15 +1957,15 @@ var Cover = function Cover(_ref) {
|
|
|
1956
1957
|
setIsPopoverShown = _useState[1];
|
|
1957
1958
|
|
|
1958
1959
|
var style = {};
|
|
1959
|
-
var classNames = [[styles$
|
|
1960
|
+
var classNames = [[styles$v.root, true], [styles$v[onlyOn], !!onlyOn && !!styles$v[onlyOn]]];
|
|
1960
1961
|
|
|
1961
1962
|
if (styleContext) {
|
|
1962
|
-
classNames = makeStyleContext(classNames, styleContext, styles$
|
|
1963
|
+
classNames = makeStyleContext(classNames, styleContext, styles$v);
|
|
1963
1964
|
}
|
|
1964
1965
|
|
|
1965
1966
|
if (gradients) {
|
|
1966
1967
|
var theme = [gradients.text_rgb === '0,0,0' ? 'dark' : 'light'];
|
|
1967
|
-
classNames = makeStyleContext(classNames, theme, styles$
|
|
1968
|
+
classNames = makeStyleContext(classNames, theme, styles$v);
|
|
1968
1969
|
style.backgroundImage = generateGradient(gradients.bg_rgb);
|
|
1969
1970
|
}
|
|
1970
1971
|
|
|
@@ -1980,13 +1981,13 @@ var Cover = function Cover(_ref) {
|
|
|
1980
1981
|
"data-testid": "cover",
|
|
1981
1982
|
className: makeClassName(classNames)
|
|
1982
1983
|
}, React.createElement("div", {
|
|
1983
|
-
className: styles$
|
|
1984
|
+
className: styles$v.image
|
|
1984
1985
|
}, React.createElement(Image, {
|
|
1985
1986
|
optimized: urls,
|
|
1986
1987
|
ratio: mobileRatio,
|
|
1987
1988
|
display: "narrow"
|
|
1988
1989
|
})), React.createElement("div", {
|
|
1989
|
-
className: styles$
|
|
1990
|
+
className: styles$v.body,
|
|
1990
1991
|
style: style
|
|
1991
1992
|
}, blocks.map(function (item) {
|
|
1992
1993
|
return React.createElement(RenderBlocks, {
|
|
@@ -1995,7 +1996,7 @@ var Cover = function Cover(_ref) {
|
|
|
1995
1996
|
styleContext: styleContext
|
|
1996
1997
|
});
|
|
1997
1998
|
})), cc === 'button' && React.createElement("button", {
|
|
1998
|
-
className: styles$
|
|
1999
|
+
className: styles$v.control,
|
|
1999
2000
|
type: "button",
|
|
2000
2001
|
"aria-label": "Open",
|
|
2001
2002
|
onClick: function onClick() {
|