@meduza/ui-kit-2 0.1.52 → 0.1.54-a
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/ui-kit-2.cjs.development.js +129 -140
- 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 +130 -141
- package/dist/ui-kit-2.esm.js.map +1 -1
- package/dist/ui-kit.css +1104 -1108
- package/package.json +15 -12
- package/src/EmbedBlock/EmbedGif.tsx +0 -3
- package/src/RelatedBlock/index.tsx +4 -6
- package/src/RelatedRichBlock/index.tsx +5 -3
- package/src/Toolbar/index.tsx +2 -9
- package/src/ToolbarButton/index.tsx +12 -9
- package/src/_storybook/PreviewWrapper/PreviewWrapper.module.css +2 -1
|
@@ -10,7 +10,7 @@ var reactIntersectionObserver = require('react-intersection-observer');
|
|
|
10
10
|
var dayjs = _interopDefault(require('dayjs'));
|
|
11
11
|
require('dayjs/locale/ru');
|
|
12
12
|
var relativeTime = _interopDefault(require('dayjs/plugin/relativeTime'));
|
|
13
|
-
var
|
|
13
|
+
var reactRouterDom = require('react-router-dom');
|
|
14
14
|
|
|
15
15
|
var makeClassName = function makeClassName(list) {
|
|
16
16
|
return list.filter(function (_ref) {
|
|
@@ -1006,35 +1006,26 @@ var Dropdown = function Dropdown(_ref2) {
|
|
|
1006
1006
|
}, children);
|
|
1007
1007
|
};
|
|
1008
1008
|
|
|
1009
|
-
var
|
|
1009
|
+
var toolbarStyles = {"root":"Toolbar-module_root__2HF2r","list":"Toolbar-module_list__1n5ny","item":"Toolbar-module_item__36x7d","isInTopbar":"Toolbar-module_isInTopbar__223iP","center":"Toolbar-module_center__3_H8M","game":"Toolbar-module_game__5-jY_","gameSurvey":"Toolbar-module_gameSurvey__1hQEz","dark":"Toolbar-module_dark__2Ejc9"};
|
|
1010
1010
|
|
|
1011
1011
|
var Toolbar = function Toolbar(_ref) {
|
|
1012
1012
|
var children = _ref.children,
|
|
1013
1013
|
styleContext = _ref.styleContext;
|
|
1014
|
-
var classNames = [[
|
|
1014
|
+
var classNames = [[toolbarStyles.root, true]];
|
|
1015
1015
|
|
|
1016
1016
|
if (styleContext) {
|
|
1017
|
-
classNames = makeStyleContext(classNames, styleContext,
|
|
1017
|
+
classNames = makeStyleContext(classNames, styleContext, toolbarStyles);
|
|
1018
1018
|
}
|
|
1019
1019
|
|
|
1020
|
-
var renderItems = function renderItems() {
|
|
1021
|
-
return React.Children.map(children, function (item, index) {
|
|
1022
|
-
return React__default.createElement("li", {
|
|
1023
|
-
className: styles$f.item,
|
|
1024
|
-
key: index + "-" + item.props.type
|
|
1025
|
-
}, React__default.cloneElement(item));
|
|
1026
|
-
});
|
|
1027
|
-
};
|
|
1028
|
-
|
|
1029
1020
|
return React__default.createElement("div", {
|
|
1030
1021
|
"data-testid": "toolbar",
|
|
1031
1022
|
className: makeClassName(classNames)
|
|
1032
1023
|
}, React__default.createElement("ul", {
|
|
1033
|
-
className:
|
|
1034
|
-
},
|
|
1024
|
+
className: toolbarStyles.list
|
|
1025
|
+
}, children));
|
|
1035
1026
|
};
|
|
1036
1027
|
|
|
1037
|
-
var styles$
|
|
1028
|
+
var styles$f = {"root":"Meta-module_root__12AG7","rich":"Meta-module_rich__1XBtZ","podcast":"Meta-module_podcast__1m4zo","episode":"Meta-module_episode__1K2Xv","simple":"Meta-module_simple__3vUiI","slide":"Meta-module_slide__3g6fG","card":"Meta-module_card__LE1RK","game":"Meta-module_game__3aNlZ","isInMaterial":"Meta-module_isInMaterial__zaYMy","isInSearchItem":"Meta-module_isInSearchItem__1wbpx","isInMediaBlock":"Meta-module_isInMediaBlock__3xfPF","center":"Meta-module_center__3BBPr","half":"Meta-module_half__1xRkT","light":"Meta-module_light__2baE-","dark":"Meta-module_dark__24y9m","hasSource":"Meta-module_hasSource__2lXiN","bookmark":"Meta-module_bookmark__3ot3k","mobile":"Meta-module_mobile__22LGV","desktop":"Meta-module_desktop__1ZGUS"};
|
|
1038
1029
|
|
|
1039
1030
|
var Meta = function Meta(_ref) {
|
|
1040
1031
|
var hasSource = _ref.hasSource,
|
|
@@ -1042,10 +1033,10 @@ var Meta = function Meta(_ref) {
|
|
|
1042
1033
|
children = _ref.children,
|
|
1043
1034
|
onlyOn = _ref.onlyOn,
|
|
1044
1035
|
styleContext = _ref.styleContext;
|
|
1045
|
-
var classNames = [[styles$
|
|
1036
|
+
var classNames = [[styles$f.root, true], [styles$f[theme], !!theme && !!styles$f[theme]], [styles$f[onlyOn], !!onlyOn], [styles$f.hasSource, hasSource]];
|
|
1046
1037
|
|
|
1047
1038
|
if (styleContext) {
|
|
1048
|
-
classNames = makeStyleContext(classNames, styleContext, styles$
|
|
1039
|
+
classNames = makeStyleContext(classNames, styleContext, styles$f);
|
|
1049
1040
|
}
|
|
1050
1041
|
|
|
1051
1042
|
return React__default.createElement("div", {
|
|
@@ -1054,7 +1045,7 @@ var Meta = function Meta(_ref) {
|
|
|
1054
1045
|
}, children);
|
|
1055
1046
|
};
|
|
1056
1047
|
|
|
1057
|
-
var styles$
|
|
1048
|
+
var styles$g = {"root":"Timestamp-module_root__coOvT"};
|
|
1058
1049
|
|
|
1059
1050
|
var Timestamp = function Timestamp(_ref) {
|
|
1060
1051
|
var publishedAt = _ref.publishedAt,
|
|
@@ -1079,7 +1070,7 @@ var Timestamp = function Timestamp(_ref) {
|
|
|
1079
1070
|
|
|
1080
1071
|
return React__default.createElement("time", {
|
|
1081
1072
|
"data-testid": "timestamp",
|
|
1082
|
-
className: styles$
|
|
1073
|
+
className: styles$g.root
|
|
1083
1074
|
}, published);
|
|
1084
1075
|
};
|
|
1085
1076
|
|
|
@@ -1146,7 +1137,7 @@ var DangerousHTML = function DangerousHTML(_ref) {
|
|
|
1146
1137
|
}));
|
|
1147
1138
|
};
|
|
1148
1139
|
|
|
1149
|
-
var styles$
|
|
1140
|
+
var styles$h = {"root":"EmbedBlock-module_root__28k9U","object":"EmbedBlock-module_object__2_UZ7","objectWrap":"EmbedBlock-module_objectWrap__1aDVd","gameEmbed":"EmbedBlock-module_gameEmbed__AZQSo","proportional":"EmbedBlock-module_proportional__3lAv4","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-","control":"EmbedBlock-module_control__xr8dZ","raw_html":"EmbedBlock-module_raw_html__MQoAA","mobileFullwidth":"EmbedBlock-module_mobileFullwidth__QFFLH","isInCard":"EmbedBlock-module_isInCard__37rtq","isInSlide":"EmbedBlock-module_isInSlide__2ea5q","cc":"EmbedBlock-module_cc__1BQ5g","isInSensitiveBlock":"EmbedBlock-module_isInSensitiveBlock__3wWYF","isInAnswer":"EmbedBlock-module_isInAnswer__tLlgs","picture":"EmbedBlock-module_picture__186q0","wrapper":"EmbedBlock-module_wrapper__33XvX","mobile":"EmbedBlock-module_mobile__1P-eo","desktop":"EmbedBlock-module_desktop__SF5a_"};
|
|
1150
1141
|
|
|
1151
1142
|
var EmbedGif = function EmbedGif(_ref) {
|
|
1152
1143
|
var gif = _ref.gif,
|
|
@@ -1176,8 +1167,6 @@ var EmbedGif = function EmbedGif(_ref) {
|
|
|
1176
1167
|
var _viewportSize = viewportSize(),
|
|
1177
1168
|
viewportWidth = _viewportSize.width;
|
|
1178
1169
|
|
|
1179
|
-
enableInlineVideo(video);
|
|
1180
|
-
|
|
1181
1170
|
if (viewportWidth >= MediaQuerySizes.MOBILE) {
|
|
1182
1171
|
video.setAttribute('autoplay', true);
|
|
1183
1172
|
video.play();
|
|
@@ -1194,9 +1183,9 @@ var EmbedGif = function EmbedGif(_ref) {
|
|
|
1194
1183
|
};
|
|
1195
1184
|
}, []);
|
|
1196
1185
|
return React__default.createElement("div", {
|
|
1197
|
-
className: styles$
|
|
1186
|
+
className: styles$h.figure
|
|
1198
1187
|
}, React__default.createElement("div", {
|
|
1199
|
-
className: styles$
|
|
1188
|
+
className: styles$h.objectWrap,
|
|
1200
1189
|
style: style,
|
|
1201
1190
|
"data-frozen": videoFrozen
|
|
1202
1191
|
}, React__default.createElement("video", {
|
|
@@ -1262,7 +1251,7 @@ var EmbedBlock = function EmbedBlock(_ref) {
|
|
|
1262
1251
|
case 'image':
|
|
1263
1252
|
{
|
|
1264
1253
|
return React__default.createElement("div", {
|
|
1265
|
-
className: styles$
|
|
1254
|
+
className: styles$h.figure
|
|
1266
1255
|
}, React__default.createElement(Image, {
|
|
1267
1256
|
source: !optimized && [small, large],
|
|
1268
1257
|
optimized: block.data.optimized,
|
|
@@ -1278,7 +1267,7 @@ var EmbedBlock = function EmbedBlock(_ref) {
|
|
|
1278
1267
|
case 'game_embed':
|
|
1279
1268
|
{
|
|
1280
1269
|
return React__default.createElement("div", {
|
|
1281
|
-
className: styles$
|
|
1270
|
+
className: styles$h.gameEmbed
|
|
1282
1271
|
}, React__default.createElement("iframe", {
|
|
1283
1272
|
src: block.data.game_src,
|
|
1284
1273
|
id: block.data.game_id,
|
|
@@ -1289,7 +1278,7 @@ var EmbedBlock = function EmbedBlock(_ref) {
|
|
|
1289
1278
|
case 'dots_on_image':
|
|
1290
1279
|
{
|
|
1291
1280
|
return React__default.createElement("div", {
|
|
1292
|
-
className: styles$
|
|
1281
|
+
className: styles$h.figure
|
|
1293
1282
|
}, React__default.createElement(DotsOnImage, {
|
|
1294
1283
|
block: data
|
|
1295
1284
|
}));
|
|
@@ -1298,12 +1287,12 @@ var EmbedBlock = function EmbedBlock(_ref) {
|
|
|
1298
1287
|
default:
|
|
1299
1288
|
{
|
|
1300
1289
|
return React__default.createElement("div", {
|
|
1301
|
-
className: styles$
|
|
1290
|
+
className: styles$h.object
|
|
1302
1291
|
}, React__default.createElement("div", {
|
|
1303
|
-
className: styles$
|
|
1292
|
+
className: styles$h.wrapper,
|
|
1304
1293
|
style: style
|
|
1305
1294
|
}, React__default.createElement(DangerousHTML, {
|
|
1306
|
-
className: styles$
|
|
1295
|
+
className: styles$h.objectWrap,
|
|
1307
1296
|
html: html
|
|
1308
1297
|
})));
|
|
1309
1298
|
}
|
|
@@ -1315,31 +1304,31 @@ var EmbedBlock = function EmbedBlock(_ref) {
|
|
|
1315
1304
|
style.height = 0;
|
|
1316
1305
|
}
|
|
1317
1306
|
|
|
1318
|
-
var classNames = [[styles$
|
|
1307
|
+
var classNames = [[styles$h.root, true], [styles$h.cc, cc], [styles$h[display], !!display && styles$h[display]], [styles$h[provider], !!provider && !!styles$h[provider]], [styles$h[onlyOn], !!onlyOn && styles$h[onlyOn]], [styles$h.mobileFullwidth, mobileFullwidth], [styles$h.proportional, isProportional]]; // Убираем из контекста все, что не начинается с приставки isIn,
|
|
1319
1308
|
// чтобы не применились лишние модификаторы
|
|
1320
1309
|
// TODO: в w6 модификаторы должны передаваться явно
|
|
1321
1310
|
|
|
1322
1311
|
if (styleContext && Array.isArray(styleContext)) {
|
|
1323
1312
|
var filteredContext = styleContext.filter(function (key) {
|
|
1324
|
-
return key.startsWith('isIn') && styles$
|
|
1313
|
+
return key.startsWith('isIn') && styles$h[key];
|
|
1325
1314
|
}).reduce(function (acc, key) {
|
|
1326
1315
|
acc.push(key);
|
|
1327
1316
|
return acc;
|
|
1328
1317
|
}, []);
|
|
1329
|
-
classNames = makeStyleContext(classNames, filteredContext, styles$
|
|
1318
|
+
classNames = makeStyleContext(classNames, filteredContext, styles$h);
|
|
1330
1319
|
}
|
|
1331
1320
|
|
|
1332
1321
|
return React__default.createElement("figure", {
|
|
1333
1322
|
className: makeClassName(classNames)
|
|
1334
1323
|
}, children && React__default.createElement("div", {
|
|
1335
|
-
className: styles$
|
|
1324
|
+
className: styles$h.object
|
|
1336
1325
|
}, React__default.createElement("div", {
|
|
1337
|
-
className: styles$
|
|
1326
|
+
className: styles$h.wrapper,
|
|
1338
1327
|
style: style
|
|
1339
1328
|
}, React__default.createElement("div", {
|
|
1340
|
-
className: styles$
|
|
1329
|
+
className: styles$h.objectWrap
|
|
1341
1330
|
}, children))), !children && renderEmbed(style), cc === 'default' && React__default.createElement("figcaption", null, renderCC()), cc === 'button' && React__default.createElement("button", {
|
|
1342
|
-
className: styles$
|
|
1331
|
+
className: styles$h.control,
|
|
1343
1332
|
type: "button",
|
|
1344
1333
|
"aria-label": "Open",
|
|
1345
1334
|
onClick: function onClick() {
|
|
@@ -1415,15 +1404,15 @@ var EmbedBlockContainer = function EmbedBlockContainer(_ref) {
|
|
|
1415
1404
|
});
|
|
1416
1405
|
};
|
|
1417
1406
|
|
|
1418
|
-
var styles$
|
|
1407
|
+
var styles$i = {"root":"QuoteBlock-module_root__2GrcC","center":"QuoteBlock-module_center__cTFNy"};
|
|
1419
1408
|
|
|
1420
1409
|
var QuoteBlock = function QuoteBlock(_ref) {
|
|
1421
1410
|
var data = _ref.block.data,
|
|
1422
1411
|
styleContext = _ref.styleContext;
|
|
1423
|
-
var classNames = [[styles$
|
|
1412
|
+
var classNames = [[styles$i.root, true]];
|
|
1424
1413
|
|
|
1425
1414
|
if (styleContext) {
|
|
1426
|
-
classNames = makeStyleContext(classNames, styleContext, styles$
|
|
1415
|
+
classNames = makeStyleContext(classNames, styleContext, styles$i);
|
|
1427
1416
|
}
|
|
1428
1417
|
|
|
1429
1418
|
return React__default.createElement("div", {
|
|
@@ -1436,7 +1425,7 @@ var QuoteBlock = function QuoteBlock(_ref) {
|
|
|
1436
1425
|
}));
|
|
1437
1426
|
};
|
|
1438
1427
|
|
|
1439
|
-
var styles$
|
|
1428
|
+
var styles$j = {"root":"CardTitle-module_root__1uqqF","index":"CardTitle-module_index__4FsTf","title":"CardTitle-module_title__2iTI6","mobile":"CardTitle-module_mobile__1_kij","desktop":"CardTitle-module_desktop__1l3_n"};
|
|
1440
1429
|
|
|
1441
1430
|
var CardTitle = function CardTitle(_ref) {
|
|
1442
1431
|
var _ref$block$data = _ref.block.data,
|
|
@@ -1446,15 +1435,15 @@ var CardTitle = function CardTitle(_ref) {
|
|
|
1446
1435
|
styleContext = _ref.styleContext;
|
|
1447
1436
|
return React__default.createElement("div", {
|
|
1448
1437
|
"data-testid": "card-title",
|
|
1449
|
-
className: makeClassName([[styles$
|
|
1438
|
+
className: makeClassName([[styles$j.root, true], [styles$j[onlyOn], !!onlyOn], [styles$j[styleContext], !!styleContext && !!styles$j[styleContext]]])
|
|
1450
1439
|
}, React__default.createElement("div", {
|
|
1451
|
-
className: styles$
|
|
1440
|
+
className: styles$j.index
|
|
1452
1441
|
}, index), React__default.createElement("h3", {
|
|
1453
|
-
className: styles$
|
|
1442
|
+
className: styles$j.title
|
|
1454
1443
|
}, text));
|
|
1455
1444
|
};
|
|
1456
1445
|
|
|
1457
|
-
var styles$
|
|
1446
|
+
var styles$k = {"root":"ChapterBlock-module_root__1WyVn","subtitle":"ChapterBlock-module_subtitle__3TXll","mobile":"ChapterBlock-module_mobile__CiO0w","desktop":"ChapterBlock-module_desktop__tk1Nk"};
|
|
1458
1447
|
|
|
1459
1448
|
var ChapterBlock = function ChapterBlock(_ref) {
|
|
1460
1449
|
var _ref$block = _ref.block,
|
|
@@ -1463,9 +1452,9 @@ var ChapterBlock = function ChapterBlock(_ref) {
|
|
|
1463
1452
|
styleContext = _ref.styleContext;
|
|
1464
1453
|
return React__default.createElement("div", {
|
|
1465
1454
|
"data-testid": "chapter-block",
|
|
1466
|
-
className: makeClassName([[styles$
|
|
1455
|
+
className: makeClassName([[styles$k.root, true], [styles$k[onlyOn], !!onlyOn]])
|
|
1467
1456
|
}, React__default.createElement("div", {
|
|
1468
|
-
className: makeClassName([[styles$
|
|
1457
|
+
className: makeClassName([[styles$k.subtitle, true], [styles$k[styleContext], !!styleContext && !!styles$k[styleContext]]]),
|
|
1469
1458
|
dangerouslySetInnerHTML: {
|
|
1470
1459
|
__html: data
|
|
1471
1460
|
}
|
|
@@ -1483,17 +1472,17 @@ var generateGradient = function generateGradient(color, type) {
|
|
|
1483
1472
|
return "linear-gradient(-180deg, " + gradient + ")";
|
|
1484
1473
|
};
|
|
1485
1474
|
|
|
1486
|
-
var styles$
|
|
1475
|
+
var styles$l = {"root":"SimpleTitle-module_root__2jVQN","mobile":"SimpleTitle-module_mobile__11gBz","desktop":"SimpleTitle-module_desktop__3yXgy"};
|
|
1487
1476
|
|
|
1488
1477
|
var SimpleTitle = function SimpleTitle(_ref) {
|
|
1489
1478
|
var _ref$block = _ref.block,
|
|
1490
1479
|
first = _ref$block.data.first,
|
|
1491
1480
|
onlyOn = _ref$block.only_on,
|
|
1492
1481
|
styleContext = _ref.styleContext;
|
|
1493
|
-
var classNames = [[styles$
|
|
1482
|
+
var classNames = [[styles$l.root, true], [styles$l[onlyOn], true]];
|
|
1494
1483
|
|
|
1495
1484
|
if (styleContext) {
|
|
1496
|
-
classNames = makeStyleContext(classNames, styleContext, styles$
|
|
1485
|
+
classNames = makeStyleContext(classNames, styleContext, styles$l);
|
|
1497
1486
|
}
|
|
1498
1487
|
|
|
1499
1488
|
return React__default.createElement("div", {
|
|
@@ -1502,7 +1491,7 @@ var SimpleTitle = function SimpleTitle(_ref) {
|
|
|
1502
1491
|
}, first);
|
|
1503
1492
|
};
|
|
1504
1493
|
|
|
1505
|
-
var styles$
|
|
1494
|
+
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","isInMediaBlock":"RichTitle-module_isInMediaBlock__3RDw4","mobile":"RichTitle-module_mobile__1Cb6E","desktop":"RichTitle-module_desktop__2ixSQ"};
|
|
1506
1495
|
|
|
1507
1496
|
var RichTitle = function RichTitle(_ref) {
|
|
1508
1497
|
var _ref$block = _ref.block,
|
|
@@ -1514,10 +1503,10 @@ var RichTitle = function RichTitle(_ref) {
|
|
|
1514
1503
|
_ref$block$data$as = _ref$block$data.as,
|
|
1515
1504
|
TagName = _ref$block$data$as === void 0 ? 'h1' : _ref$block$data$as,
|
|
1516
1505
|
styleContext = _ref.styleContext;
|
|
1517
|
-
var classNames = [[styles$
|
|
1506
|
+
var classNames = [[styles$m.root, true], [styles$m[onlyOn], true], [styles$m.featured, !!featured]];
|
|
1518
1507
|
|
|
1519
1508
|
if (styleContext) {
|
|
1520
|
-
classNames = makeStyleContext(classNames, styleContext, styles$
|
|
1509
|
+
classNames = makeStyleContext(classNames, styleContext, styles$m);
|
|
1521
1510
|
}
|
|
1522
1511
|
|
|
1523
1512
|
return React__default.createElement(TagName, {
|
|
@@ -1526,7 +1515,7 @@ var RichTitle = function RichTitle(_ref) {
|
|
|
1526
1515
|
}, first, second && React__default.createElement("span", null, " ", second));
|
|
1527
1516
|
};
|
|
1528
1517
|
|
|
1529
|
-
var styles$
|
|
1518
|
+
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"};
|
|
1530
1519
|
|
|
1531
1520
|
var SimpleBlock = function SimpleBlock(_ref) {
|
|
1532
1521
|
var _ref$block = _ref.block,
|
|
@@ -1535,10 +1524,10 @@ var SimpleBlock = function SimpleBlock(_ref) {
|
|
|
1535
1524
|
onlyOn = _ref$block.only_on,
|
|
1536
1525
|
styleContext = _ref.styleContext;
|
|
1537
1526
|
var TagName;
|
|
1538
|
-
var classNames = [[styles$
|
|
1527
|
+
var classNames = [[styles$n[type], !!type && !!styles$n[type]], [styles$n[onlyOn], true]];
|
|
1539
1528
|
|
|
1540
1529
|
if (styleContext) {
|
|
1541
|
-
classNames = makeStyleContext(classNames, styleContext, styles$
|
|
1530
|
+
classNames = makeStyleContext(classNames, styleContext, styles$n);
|
|
1542
1531
|
}
|
|
1543
1532
|
|
|
1544
1533
|
switch (type) {
|
|
@@ -1569,7 +1558,7 @@ var SimpleBlock = function SimpleBlock(_ref) {
|
|
|
1569
1558
|
});
|
|
1570
1559
|
};
|
|
1571
1560
|
|
|
1572
|
-
var styles$
|
|
1561
|
+
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"};
|
|
1573
1562
|
|
|
1574
1563
|
var ListBlock = function ListBlock(_ref) {
|
|
1575
1564
|
var _ref$block = _ref.block,
|
|
@@ -1578,10 +1567,10 @@ var ListBlock = function ListBlock(_ref) {
|
|
|
1578
1567
|
onlyOn = _ref$block.only_on,
|
|
1579
1568
|
styleContext = _ref.styleContext;
|
|
1580
1569
|
var TagName = type;
|
|
1581
|
-
var classNames = [[styles$
|
|
1570
|
+
var classNames = [[styles$o.root, true], [styles$o[onlyOn], true], [styles$o[type], !!type && !!styles$o[type]]];
|
|
1582
1571
|
|
|
1583
1572
|
if (styleContext) {
|
|
1584
|
-
classNames = makeStyleContext(classNames, styleContext, styles$
|
|
1573
|
+
classNames = makeStyleContext(classNames, styleContext, styles$o);
|
|
1585
1574
|
}
|
|
1586
1575
|
|
|
1587
1576
|
return React__default.createElement(TagName, {
|
|
@@ -1597,7 +1586,7 @@ var ListBlock = function ListBlock(_ref) {
|
|
|
1597
1586
|
}));
|
|
1598
1587
|
};
|
|
1599
1588
|
|
|
1600
|
-
var styles$
|
|
1589
|
+
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"};
|
|
1601
1590
|
|
|
1602
1591
|
var RelatedBlock = function RelatedBlock(_ref) {
|
|
1603
1592
|
var _ref$block = _ref.block,
|
|
@@ -1606,34 +1595,32 @@ var RelatedBlock = function RelatedBlock(_ref) {
|
|
|
1606
1595
|
related = _ref$block$data.related,
|
|
1607
1596
|
onlyOn = _ref$block.only_on,
|
|
1608
1597
|
styleContext = _ref.styleContext;
|
|
1609
|
-
var classNames = [[styles$
|
|
1598
|
+
var classNames = [[styles$p.root, true], [styles$p[onlyOn], true]];
|
|
1610
1599
|
|
|
1611
1600
|
if (styleContext) {
|
|
1612
|
-
classNames = makeStyleContext(classNames, styleContext, styles$
|
|
1601
|
+
classNames = makeStyleContext(classNames, styleContext, styles$p);
|
|
1613
1602
|
}
|
|
1614
1603
|
|
|
1615
1604
|
return React__default.createElement("div", {
|
|
1616
1605
|
"data-testid": "related-block",
|
|
1617
1606
|
className: makeClassName(classNames)
|
|
1618
1607
|
}, React__default.createElement("h3", {
|
|
1619
|
-
className: styles$
|
|
1608
|
+
className: styles$p.header
|
|
1620
1609
|
}, title), React__default.createElement("ul", {
|
|
1621
|
-
className: styles$
|
|
1610
|
+
className: styles$p.items
|
|
1622
1611
|
}, related.map(function (item, index) {
|
|
1623
1612
|
return React__default.createElement("li", {
|
|
1624
1613
|
key: item.id || index,
|
|
1625
|
-
className: styles$
|
|
1626
|
-
}, React__default.createElement(
|
|
1627
|
-
|
|
1628
|
-
target: "_blank",
|
|
1629
|
-
rel: "noopener noreferrer"
|
|
1614
|
+
className: styles$p[item.layout]
|
|
1615
|
+
}, React__default.createElement(reactRouterDom.Link, {
|
|
1616
|
+
to: item.full_url || "/" + item.url
|
|
1630
1617
|
}, React__default.createElement("span", {
|
|
1631
|
-
className: styles$
|
|
1618
|
+
className: styles$p.first
|
|
1632
1619
|
}, item.title), item.second_title && ' ', item.second_title && React__default.createElement("span", null, item.second_title)));
|
|
1633
1620
|
})));
|
|
1634
1621
|
};
|
|
1635
1622
|
|
|
1636
|
-
var styles$
|
|
1623
|
+
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"};
|
|
1637
1624
|
|
|
1638
1625
|
var SourceBlock = function SourceBlock(_ref) {
|
|
1639
1626
|
var _ref$block = _ref.block,
|
|
@@ -1643,10 +1630,10 @@ var SourceBlock = function SourceBlock(_ref) {
|
|
|
1643
1630
|
origin = _ref$block$data.origin,
|
|
1644
1631
|
url = _ref$block$data.url,
|
|
1645
1632
|
styleContext = _ref.styleContext;
|
|
1646
|
-
var classNames = [[styles$
|
|
1633
|
+
var classNames = [[styles$q.root, true], [styles$q[onlyOn], true]];
|
|
1647
1634
|
|
|
1648
1635
|
if (styleContext) {
|
|
1649
|
-
classNames = makeStyleContext(classNames, styleContext, styles$
|
|
1636
|
+
classNames = makeStyleContext(classNames, styleContext, styles$q);
|
|
1650
1637
|
}
|
|
1651
1638
|
|
|
1652
1639
|
return React__default.createElement("blockquote", {
|
|
@@ -1654,7 +1641,7 @@ var SourceBlock = function SourceBlock(_ref) {
|
|
|
1654
1641
|
cite: url,
|
|
1655
1642
|
className: makeClassName(classNames)
|
|
1656
1643
|
}, React__default.createElement("a", {
|
|
1657
|
-
className: styles$
|
|
1644
|
+
className: styles$q.text,
|
|
1658
1645
|
href: url,
|
|
1659
1646
|
target: "_blank",
|
|
1660
1647
|
rel: "noopener noreferrer"
|
|
@@ -1666,11 +1653,11 @@ var SourceBlock = function SourceBlock(_ref) {
|
|
|
1666
1653
|
}
|
|
1667
1654
|
});
|
|
1668
1655
|
}), React__default.createElement("footer", null, React__default.createElement("cite", {
|
|
1669
|
-
className: styles$
|
|
1656
|
+
className: styles$q.origin
|
|
1670
1657
|
}, origin))));
|
|
1671
1658
|
};
|
|
1672
1659
|
|
|
1673
|
-
var styles$
|
|
1660
|
+
var styles$r = {"root":"SensitiveBlock-module_root__2iJbD","container":"SensitiveBlock-module_container__1Wtix","overlay":"SensitiveBlock-module_overlay__hfDVS","content":"SensitiveBlock-module_content__sNpxZ","button":"SensitiveBlock-module_button__3BGZK","default":"SensitiveBlock-module_default__2HgmZ","full":"SensitiveBlock-module_full__3Hph9","media":"SensitiveBlock-module_media__3wnlo","super_full":"SensitiveBlock-module_super_full__14UOv","visible":"SensitiveBlock-module_visible__1B-NV","isInCard":"SensitiveBlock-module_isInCard__1L-lu","isInSlide":"SensitiveBlock-module_isInSlide__f_Ql2"};
|
|
1674
1661
|
|
|
1675
1662
|
var SensitiveBlock = function SensitiveBlock(_ref) {
|
|
1676
1663
|
var block = _ref.block,
|
|
@@ -1690,11 +1677,11 @@ var SensitiveBlock = function SensitiveBlock(_ref) {
|
|
|
1690
1677
|
isVisible(true);
|
|
1691
1678
|
};
|
|
1692
1679
|
|
|
1693
|
-
var classNames = [[styles$
|
|
1680
|
+
var classNames = [[styles$r.root, true], [styles$r.visible, visible], [styles$r[display], display && styles$r[display]]];
|
|
1694
1681
|
var context = ['isInSensitiveBlock'];
|
|
1695
1682
|
|
|
1696
1683
|
if (styleContext) {
|
|
1697
|
-
classNames = makeStyleContext(classNames, styleContext, styles$
|
|
1684
|
+
classNames = makeStyleContext(classNames, styleContext, styles$r);
|
|
1698
1685
|
context = [].concat(styleContext, ['isInSensitiveBlock']);
|
|
1699
1686
|
}
|
|
1700
1687
|
|
|
@@ -1702,32 +1689,32 @@ var SensitiveBlock = function SensitiveBlock(_ref) {
|
|
|
1702
1689
|
"data-testid": "sensitive-block",
|
|
1703
1690
|
className: makeClassName(classNames)
|
|
1704
1691
|
}, React__default.createElement("div", {
|
|
1705
|
-
className: styles$
|
|
1692
|
+
className: styles$r.container
|
|
1706
1693
|
}, React__default.createElement("div", {
|
|
1707
|
-
className: styles$
|
|
1694
|
+
className: styles$r.overlay,
|
|
1708
1695
|
style: {
|
|
1709
1696
|
backgroundImage: "url(" + blurredImage + ")"
|
|
1710
1697
|
}
|
|
1711
1698
|
}, React__default.createElement("div", {
|
|
1712
|
-
className: styles$
|
|
1699
|
+
className: styles$r.content
|
|
1713
1700
|
}, React__default.createElement("p", {
|
|
1714
1701
|
dangerouslySetInnerHTML: {
|
|
1715
1702
|
__html: block.title
|
|
1716
1703
|
}
|
|
1717
1704
|
}), React__default.createElement("div", {
|
|
1718
|
-
className: styles$
|
|
1705
|
+
className: styles$r.button
|
|
1719
1706
|
}, React__default.createElement(Button, {
|
|
1720
1707
|
onClick: function onClick() {
|
|
1721
1708
|
return handleClick();
|
|
1722
1709
|
},
|
|
1723
1710
|
theme: "light"
|
|
1724
1711
|
}, block.button.text)))), React__default.createElement("div", {
|
|
1725
|
-
className: styles$
|
|
1712
|
+
className: styles$r.media
|
|
1726
1713
|
}, React__default.createElement(EmbedBlockContainer, {
|
|
1727
1714
|
block: block.item,
|
|
1728
1715
|
styleContext: context
|
|
1729
1716
|
}))), cc && React__default.createElement("figcaption", {
|
|
1730
|
-
className: styles$
|
|
1717
|
+
className: styles$r.figcaption
|
|
1731
1718
|
}, React__default.createElement(MediaCaption, {
|
|
1732
1719
|
credit: credit,
|
|
1733
1720
|
caption: caption,
|
|
@@ -1735,7 +1722,7 @@ var SensitiveBlock = function SensitiveBlock(_ref) {
|
|
|
1735
1722
|
})));
|
|
1736
1723
|
};
|
|
1737
1724
|
|
|
1738
|
-
var styles$
|
|
1725
|
+
var styles$s = {"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"};
|
|
1739
1726
|
|
|
1740
1727
|
var GroupedBlock = function GroupedBlock(_ref) {
|
|
1741
1728
|
var block = _ref.block,
|
|
@@ -1752,21 +1739,21 @@ var GroupedBlock = function GroupedBlock(_ref) {
|
|
|
1752
1739
|
var sumWidth = normalizedBoxesWidth.reduce(function (sum, x) {
|
|
1753
1740
|
return sum + x;
|
|
1754
1741
|
});
|
|
1755
|
-
var classNames = [[styles$
|
|
1742
|
+
var classNames = [[styles$s.root, true], [styles$s[onlyOn], true], [styles$s.hasFigcaption, block.cc === 'default'], [styles$s[block.display], !!block.display && styles$s[block.display]]];
|
|
1756
1743
|
|
|
1757
1744
|
if (styleContext) {
|
|
1758
|
-
classNames = makeStyleContext(classNames, styleContext, styles$
|
|
1745
|
+
classNames = makeStyleContext(classNames, styleContext, styles$s);
|
|
1759
1746
|
}
|
|
1760
1747
|
|
|
1761
1748
|
return React__default.createElement("div", {
|
|
1762
1749
|
"data-testid": "grouped-block",
|
|
1763
1750
|
className: makeClassName(classNames)
|
|
1764
1751
|
}, React__default.createElement("div", {
|
|
1765
|
-
className: styles$
|
|
1752
|
+
className: styles$s.items
|
|
1766
1753
|
}, block.data.map(function (item, index) {
|
|
1767
1754
|
var percentWidth = normalizedBoxesWidth[index] / sumWidth * 100;
|
|
1768
1755
|
return React__default.createElement("div", {
|
|
1769
|
-
className: styles$
|
|
1756
|
+
className: styles$s.item,
|
|
1770
1757
|
key: item.id,
|
|
1771
1758
|
style: {
|
|
1772
1759
|
width: percentWidth + "%"
|
|
@@ -1779,7 +1766,7 @@ var GroupedBlock = function GroupedBlock(_ref) {
|
|
|
1779
1766
|
styleContext: ['isInGroupedBlock']
|
|
1780
1767
|
}));
|
|
1781
1768
|
})), block.cc && React__default.createElement("figcaption", {
|
|
1782
|
-
className: styles$
|
|
1769
|
+
className: styles$s.figcaption
|
|
1783
1770
|
}, React__default.createElement(MediaCaption, {
|
|
1784
1771
|
credit: block.credit,
|
|
1785
1772
|
caption: block.caption,
|
|
@@ -1787,32 +1774,32 @@ var GroupedBlock = function GroupedBlock(_ref) {
|
|
|
1787
1774
|
})));
|
|
1788
1775
|
};
|
|
1789
1776
|
|
|
1790
|
-
var styles$
|
|
1777
|
+
var styles$t = {"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"};
|
|
1791
1778
|
|
|
1792
1779
|
var MetaItem = function MetaItem(_ref) {
|
|
1793
1780
|
var hasSource = _ref.hasSource,
|
|
1794
1781
|
type = _ref.type,
|
|
1795
1782
|
children = _ref.children,
|
|
1796
1783
|
bullets = _ref.bullets;
|
|
1797
|
-
var classNames = [[styles$
|
|
1784
|
+
var classNames = [[styles$t.root, true], [styles$t[type], !!type && !!styles$t[type]], [styles$t.hasSource, !!hasSource], [styles$t.hasBullets, !!bullets]];
|
|
1798
1785
|
return React__default.createElement("div", {
|
|
1799
1786
|
"data-testid": "meta-item",
|
|
1800
1787
|
className: makeClassName(classNames)
|
|
1801
1788
|
}, children);
|
|
1802
1789
|
};
|
|
1803
1790
|
|
|
1804
|
-
var styles$
|
|
1791
|
+
var styles$u = {"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"};
|
|
1805
1792
|
|
|
1806
1793
|
var MetaItemLive = function MetaItemLive(_ref) {
|
|
1807
1794
|
var _ref$theme = _ref.theme,
|
|
1808
1795
|
theme = _ref$theme === void 0 ? 'gold' : _ref$theme;
|
|
1809
|
-
var classNames = [[styles$
|
|
1796
|
+
var classNames = [[styles$u.root, true], [styles$u[theme], !!theme && styles$u[theme]]];
|
|
1810
1797
|
return React__default.createElement("div", {
|
|
1811
1798
|
"data-testid": "meta-item-live",
|
|
1812
1799
|
"data-meta": "live",
|
|
1813
1800
|
className: makeClassName(classNames)
|
|
1814
1801
|
}, React__default.createElement("div", {
|
|
1815
|
-
className: styles$
|
|
1802
|
+
className: styles$u.frame
|
|
1816
1803
|
}));
|
|
1817
1804
|
};
|
|
1818
1805
|
|
|
@@ -1837,7 +1824,7 @@ var pluralize = function pluralize(number, one, two, five) {
|
|
|
1837
1824
|
return five;
|
|
1838
1825
|
};
|
|
1839
1826
|
|
|
1840
|
-
var styles$
|
|
1827
|
+
var styles$v = {"root":"DocumentItemsCount-module_root__P3q-z","items":"DocumentItemsCount-module_items__3pfxW"};
|
|
1841
1828
|
|
|
1842
1829
|
var DocumentItemsCount = function DocumentItemsCount(_ref) {
|
|
1843
1830
|
var type = _ref.type,
|
|
@@ -1874,9 +1861,9 @@ var DocumentItemsCount = function DocumentItemsCount(_ref) {
|
|
|
1874
1861
|
var itemsCount = items + " " + pluralize(items, i18n[lang][type].one, i18n[lang][type].two, i18n[lang][type].five);
|
|
1875
1862
|
return React__default.createElement("div", {
|
|
1876
1863
|
"data-testid": "document-items-count",
|
|
1877
|
-
className: styles$
|
|
1864
|
+
className: styles$v.root
|
|
1878
1865
|
}, children, React__default.createElement("span", {
|
|
1879
|
-
className: styles$
|
|
1866
|
+
className: styles$v.items
|
|
1880
1867
|
}, itemsCount));
|
|
1881
1868
|
};
|
|
1882
1869
|
|
|
@@ -1999,7 +1986,7 @@ var MetaContainer = function MetaContainer(_ref) {
|
|
|
1999
1986
|
icon: isListened ? 'listened' : 'read',
|
|
2000
1987
|
size: "unset"
|
|
2001
1988
|
})), isSlides && lang === 'ru' && React__default.createElement("div", {
|
|
2002
|
-
className: styles$
|
|
1989
|
+
className: styles$f.bookmark
|
|
2003
1990
|
}, React__default.createElement(BookmarkButton, {
|
|
2004
1991
|
isInBookmarks: isInBookmarks,
|
|
2005
1992
|
onClick: function onClick() {
|
|
@@ -2161,7 +2148,7 @@ var RenderBlocks = function RenderBlocks(_ref) {
|
|
|
2161
2148
|
}
|
|
2162
2149
|
};
|
|
2163
2150
|
|
|
2164
|
-
var styles$
|
|
2151
|
+
var styles$w = {"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"};
|
|
2165
2152
|
|
|
2166
2153
|
var Cover = function Cover(_ref) {
|
|
2167
2154
|
var _ref$block = _ref.block,
|
|
@@ -2182,15 +2169,15 @@ var Cover = function Cover(_ref) {
|
|
|
2182
2169
|
setIsPopoverShown = _useState[1];
|
|
2183
2170
|
|
|
2184
2171
|
var style = {};
|
|
2185
|
-
var classNames = [[styles$
|
|
2172
|
+
var classNames = [[styles$w.root, true], [styles$w[onlyOn], !!onlyOn && !!styles$w[onlyOn]]];
|
|
2186
2173
|
|
|
2187
2174
|
if (styleContext) {
|
|
2188
|
-
classNames = makeStyleContext(classNames, styleContext, styles$
|
|
2175
|
+
classNames = makeStyleContext(classNames, styleContext, styles$w);
|
|
2189
2176
|
}
|
|
2190
2177
|
|
|
2191
2178
|
if (gradients) {
|
|
2192
2179
|
var theme = [gradients.text_rgb === '0,0,0' ? 'dark' : 'light'];
|
|
2193
|
-
classNames = makeStyleContext(classNames, theme, styles$
|
|
2180
|
+
classNames = makeStyleContext(classNames, theme, styles$w);
|
|
2194
2181
|
style.backgroundImage = generateGradient(gradients.bg_rgb, 'mediaBlockBottom');
|
|
2195
2182
|
}
|
|
2196
2183
|
|
|
@@ -2206,13 +2193,13 @@ var Cover = function Cover(_ref) {
|
|
|
2206
2193
|
"data-testid": "cover",
|
|
2207
2194
|
className: makeClassName(classNames)
|
|
2208
2195
|
}, React__default.createElement("div", {
|
|
2209
|
-
className: styles$
|
|
2196
|
+
className: styles$w.image
|
|
2210
2197
|
}, React__default.createElement(Image, {
|
|
2211
2198
|
optimized: urls,
|
|
2212
2199
|
ratio: mobileRatio,
|
|
2213
2200
|
display: "narrow"
|
|
2214
2201
|
})), React__default.createElement("div", {
|
|
2215
|
-
className: styles$
|
|
2202
|
+
className: styles$w.body,
|
|
2216
2203
|
style: style
|
|
2217
2204
|
}, blocks.map(function (item) {
|
|
2218
2205
|
return React__default.createElement(RenderBlocks, {
|
|
@@ -2221,7 +2208,7 @@ var Cover = function Cover(_ref) {
|
|
|
2221
2208
|
styleContext: styleContext
|
|
2222
2209
|
});
|
|
2223
2210
|
})), cc === 'button' && React__default.createElement("button", {
|
|
2224
|
-
className: styles$
|
|
2211
|
+
className: styles$w.control,
|
|
2225
2212
|
type: "button",
|
|
2226
2213
|
"aria-label": "Open",
|
|
2227
2214
|
onClick: function onClick() {
|
|
@@ -2234,7 +2221,7 @@ var Cover = function Cover(_ref) {
|
|
|
2234
2221
|
}, renderCC('isInPopover')));
|
|
2235
2222
|
};
|
|
2236
2223
|
|
|
2237
|
-
var styles$
|
|
2224
|
+
var styles$x = {"root":"HalfBlock-module_root__2frv2","main":"HalfBlock-module_main__2XX73","body":"HalfBlock-module_body__3MnEN","footer":"HalfBlock-module_footer__1C0yp","image":"HalfBlock-module_image__2lYel","mobile":"HalfBlock-module_mobile__2latf","desktop":"HalfBlock-module_desktop__3B1Ej"};
|
|
2238
2225
|
|
|
2239
2226
|
var HalfBlock = function HalfBlock(_ref) {
|
|
2240
2227
|
var _ref$block = _ref.block,
|
|
@@ -2246,25 +2233,25 @@ var HalfBlock = function HalfBlock(_ref) {
|
|
|
2246
2233
|
credit = _ref$block$data$cover.credit,
|
|
2247
2234
|
caption = _ref$block$data$cover.caption,
|
|
2248
2235
|
styleContext = _ref.styleContext;
|
|
2249
|
-
var classNames = [[styles$
|
|
2236
|
+
var classNames = [[styles$x.root, true], [styles$x[onlyOn], true]];
|
|
2250
2237
|
|
|
2251
2238
|
if (styleContext) {
|
|
2252
|
-
classNames = makeStyleContext(classNames, styleContext, styles$
|
|
2239
|
+
classNames = makeStyleContext(classNames, styleContext, styles$x);
|
|
2253
2240
|
}
|
|
2254
2241
|
|
|
2255
2242
|
return React__default.createElement("div", {
|
|
2256
2243
|
"data-testid": "half-block",
|
|
2257
2244
|
className: makeClassName(classNames)
|
|
2258
2245
|
}, React__default.createElement("div", {
|
|
2259
|
-
className: styles$
|
|
2246
|
+
className: styles$x.main
|
|
2260
2247
|
}, React__default.createElement("div", {
|
|
2261
|
-
className: styles$
|
|
2248
|
+
className: styles$x.image
|
|
2262
2249
|
}, React__default.createElement(Image, {
|
|
2263
2250
|
optimized: optimized,
|
|
2264
2251
|
ratio: ratio,
|
|
2265
2252
|
display: "super_full"
|
|
2266
2253
|
})), React__default.createElement("div", {
|
|
2267
|
-
className: styles$
|
|
2254
|
+
className: styles$x.body
|
|
2268
2255
|
}, data.blocks.map(function (item) {
|
|
2269
2256
|
return React__default.createElement(RenderBlocks, {
|
|
2270
2257
|
key: item.id,
|
|
@@ -2272,7 +2259,7 @@ var HalfBlock = function HalfBlock(_ref) {
|
|
|
2272
2259
|
styleContext: ['rich']
|
|
2273
2260
|
});
|
|
2274
2261
|
}))), React__default.createElement("div", {
|
|
2275
|
-
className: styles$
|
|
2262
|
+
className: styles$x.footer
|
|
2276
2263
|
}, React__default.createElement(MediaCaption, {
|
|
2277
2264
|
credit: credit,
|
|
2278
2265
|
caption: caption,
|
|
@@ -2280,17 +2267,17 @@ var HalfBlock = function HalfBlock(_ref) {
|
|
|
2280
2267
|
})));
|
|
2281
2268
|
};
|
|
2282
2269
|
|
|
2283
|
-
var styles$
|
|
2270
|
+
var styles$y = {"root":"ImportantLead-module_root__2BdT3","slide":"ImportantLead-module_slide__3kQ9x","mobile":"ImportantLead-module_mobile__3BXbm","desktop":"ImportantLead-module_desktop__3Zljc"};
|
|
2284
2271
|
|
|
2285
2272
|
var ImportantLead = function ImportantLead(_ref) {
|
|
2286
2273
|
var _ref$block = _ref.block,
|
|
2287
2274
|
onlyOn = _ref$block.only_on,
|
|
2288
2275
|
data = _ref$block.data,
|
|
2289
2276
|
styleContext = _ref.styleContext;
|
|
2290
|
-
var classNames = [[styles$
|
|
2277
|
+
var classNames = [[styles$y.root, true], [styles$y[onlyOn], !!onlyOn]];
|
|
2291
2278
|
|
|
2292
2279
|
if (styleContext) {
|
|
2293
|
-
classNames = makeStyleContext(classNames, styleContext, styles$
|
|
2280
|
+
classNames = makeStyleContext(classNames, styleContext, styles$y);
|
|
2294
2281
|
}
|
|
2295
2282
|
|
|
2296
2283
|
return React__default.createElement("div", {
|
|
@@ -2305,7 +2292,7 @@ var ImportantLead = function ImportantLead(_ref) {
|
|
|
2305
2292
|
}));
|
|
2306
2293
|
};
|
|
2307
2294
|
|
|
2308
|
-
var styles$
|
|
2295
|
+
var styles$z = {"root":"Spoiler-module_root__1OfSR","header":"Spoiler-module_header__1rZUs","body":"Spoiler-module_body__Q1e_c","spoiled":"Spoiler-module_spoiled__1A5r4","footer":"Spoiler-module_footer__23mh7","spoilerSticky":"Spoiler-module_spoilerSticky__3Kd30","spoilerStickyBg":"Spoiler-module_spoilerStickyBg__nYdlo","center":"Spoiler-module_center__tq1m0","full":"Spoiler-module_full__1QFqR","default":"Spoiler-module_default__2Kjx8","mobile":"Spoiler-module_mobile__2BPt8","desktop":"Spoiler-module_desktop__1BIFJ"};
|
|
2309
2296
|
|
|
2310
2297
|
var Spoiler = function Spoiler(_ref) {
|
|
2311
2298
|
var _ref$block = _ref.block,
|
|
@@ -2340,11 +2327,11 @@ var Spoiler = function Spoiler(_ref) {
|
|
|
2340
2327
|
}
|
|
2341
2328
|
};
|
|
2342
2329
|
|
|
2343
|
-
var classNames = [[styles$
|
|
2330
|
+
var classNames = [[styles$z.root, true], [styles$z[onlyOn], !!onlyOn], [styles$z[display], !!display && styles$z[display]], [[styles$z.spoiled], !!spoiled]];
|
|
2344
2331
|
var context = ['center'];
|
|
2345
2332
|
|
|
2346
2333
|
if (styleContext) {
|
|
2347
|
-
classNames = makeStyleContext(classNames, styleContext, styles$
|
|
2334
|
+
classNames = makeStyleContext(classNames, styleContext, styles$z);
|
|
2348
2335
|
}
|
|
2349
2336
|
|
|
2350
2337
|
var buttonCollapse = button ? button.collapse : 'Свернуть';
|
|
@@ -2354,9 +2341,9 @@ var Spoiler = function Spoiler(_ref) {
|
|
|
2354
2341
|
className: makeClassName(classNames),
|
|
2355
2342
|
"data-testid": "spoiler"
|
|
2356
2343
|
}, React__default.createElement("div", {
|
|
2357
|
-
className: styles$
|
|
2344
|
+
className: styles$z.header
|
|
2358
2345
|
}, title && React__default.createElement("h3", null, title)), React__default.createElement("div", {
|
|
2359
|
-
className: styles$
|
|
2346
|
+
className: styles$z.body
|
|
2360
2347
|
}, blocks.map(function (item) {
|
|
2361
2348
|
return React__default.createElement(RenderBlocks, {
|
|
2362
2349
|
key: item.id,
|
|
@@ -2364,7 +2351,7 @@ var Spoiler = function Spoiler(_ref) {
|
|
|
2364
2351
|
styleContext: context
|
|
2365
2352
|
});
|
|
2366
2353
|
})), React__default.createElement("div", {
|
|
2367
|
-
className: styles$
|
|
2354
|
+
className: styles$z.footer
|
|
2368
2355
|
}, React__default.createElement(Button, {
|
|
2369
2356
|
size: "default",
|
|
2370
2357
|
theme: "gray",
|
|
@@ -2377,7 +2364,7 @@ var Spoiler = function Spoiler(_ref) {
|
|
|
2377
2364
|
}))));
|
|
2378
2365
|
};
|
|
2379
2366
|
|
|
2380
|
-
var styles$
|
|
2367
|
+
var styles$A = {"root":"RelatedRichBlock-module_root__3NYmj","wrapper":"RelatedRichBlock-module_wrapper__1eLIQ","overlay":"RelatedRichBlock-module_overlay__3XSg_","overlayHeader":"RelatedRichBlock-module_overlayHeader__2Nmbv","body":"RelatedRichBlock-module_body__1ZHZS","isRich":"RelatedRichBlock-module_isRich__1LnA4","hasGradient":"RelatedRichBlock-module_hasGradient__27LOk","picture":"RelatedRichBlock-module_picture__128HJ","isCard":"RelatedRichBlock-module_isCard__2naDz","cover":"RelatedRichBlock-module_cover__3yygp","tag":"RelatedRichBlock-module_tag__3OLyG","center":"RelatedRichBlock-module_center__197sx","dark":"RelatedRichBlock-module_dark__3Y1fE","light":"RelatedRichBlock-module_light__2mUxL","mobile":"RelatedRichBlock-module_mobile__JpCS4","desktop":"RelatedRichBlock-module_desktop__trL0D"};
|
|
2381
2368
|
|
|
2382
2369
|
/* eslint-disable react/jsx-no-target-blank */
|
|
2383
2370
|
var RelatedRichBlock = function RelatedRichBlock(_ref) {
|
|
@@ -2416,55 +2403,55 @@ var RelatedRichBlock = function RelatedRichBlock(_ref) {
|
|
|
2416
2403
|
postMessage('richRelated', url, 'click');
|
|
2417
2404
|
};
|
|
2418
2405
|
|
|
2419
|
-
var classNames = [[styles$
|
|
2406
|
+
var classNames = [[styles$A.root, true], [styles$A[cardType], !!layout && !!styles$A[cardType]], [styles$A.hasGradient, !!gradients], [styles$A[onlyOn], !!onlyOn && !!styles$A[onlyOn]]];
|
|
2420
2407
|
var context = ['isInMediaBlock'];
|
|
2421
2408
|
|
|
2422
2409
|
if (styleContext) {
|
|
2423
|
-
classNames = makeStyleContext(classNames, styleContext, styles$
|
|
2410
|
+
classNames = makeStyleContext(classNames, styleContext, styles$A);
|
|
2424
2411
|
context = [].concat(styleContext, ['isInMediaBlock']);
|
|
2425
2412
|
}
|
|
2426
2413
|
|
|
2427
2414
|
if (gradients) {
|
|
2428
2415
|
styleHeader.backgroundImage = generateGradient(gradients.bg_rgb, 'mediaBlockTop');
|
|
2429
2416
|
var theme = [gradients.text_rgb === '0,0,0' ? 'dark' : 'light'];
|
|
2430
|
-
classNames = makeStyleContext(classNames, theme, styles$
|
|
2417
|
+
classNames = makeStyleContext(classNames, theme, styles$A);
|
|
2431
2418
|
|
|
2432
2419
|
if (onlyOn === 'desktop') {
|
|
2433
2420
|
style.backgroundImage = generateGradient(gradients.bg_rgb, 'mediaBlockBottom');
|
|
2434
2421
|
}
|
|
2435
2422
|
}
|
|
2436
2423
|
|
|
2437
|
-
return React__default.createElement(
|
|
2424
|
+
return React__default.createElement(reactRouterDom.Link, {
|
|
2438
2425
|
"data-testid": "related-rich-block",
|
|
2439
2426
|
className: makeClassName(classNames),
|
|
2440
|
-
href: "/" + url,
|
|
2441
2427
|
target: "_blank",
|
|
2428
|
+
to: "/" + url,
|
|
2442
2429
|
onClick: function onClick() {
|
|
2443
2430
|
return handleClick();
|
|
2444
2431
|
},
|
|
2445
2432
|
ref: ref
|
|
2446
2433
|
}, layout === 'rich' && React__default.createElement(React__default.Fragment, null, React__default.createElement("div", {
|
|
2447
|
-
className: styles$
|
|
2434
|
+
className: styles$A.overlay,
|
|
2448
2435
|
style: style
|
|
2449
2436
|
}), React__default.createElement("div", {
|
|
2450
|
-
className: styles$
|
|
2437
|
+
className: styles$A.overlayHeader,
|
|
2451
2438
|
style: styleHeader
|
|
2452
2439
|
})), React__default.createElement("div", {
|
|
2453
|
-
className: styles$
|
|
2440
|
+
className: styles$A.tag
|
|
2454
2441
|
}, React__default.createElement(Tag, {
|
|
2455
2442
|
size: "small",
|
|
2456
2443
|
theme: "inherit",
|
|
2457
2444
|
styleContext: "richRelated"
|
|
2458
2445
|
}, tag)), React__default.createElement("div", {
|
|
2459
|
-
className: styles$
|
|
2446
|
+
className: styles$A.cover
|
|
2460
2447
|
}, React__default.createElement("div", {
|
|
2461
|
-
className: styles$
|
|
2448
|
+
className: styles$A.picture
|
|
2462
2449
|
}, React__default.createElement(Image, {
|
|
2463
2450
|
optimized: urls,
|
|
2464
2451
|
ratio: ratio,
|
|
2465
2452
|
display: "narrow"
|
|
2466
2453
|
}))), React__default.createElement("div", {
|
|
2467
|
-
className: styles$
|
|
2454
|
+
className: styles$A.body
|
|
2468
2455
|
}, blocks.map(function (item) {
|
|
2469
2456
|
return React__default.createElement(RenderBlocks, {
|
|
2470
2457
|
key: item.id,
|
|
@@ -2545,7 +2532,7 @@ var RawHtmlBlock = function RawHtmlBlock(_ref) {
|
|
|
2545
2532
|
}
|
|
2546
2533
|
};
|
|
2547
2534
|
|
|
2548
|
-
var styles$
|
|
2535
|
+
var styles$B = {"root":"ToolbarButton-module_root__xN-fq","dark":"ToolbarButton-module_dark__GrIOr","bookmark":"ToolbarButton-module_bookmark__3369b","isActive":"ToolbarButton-module_isActive__3NLAE","text":"ToolbarButton-module_text__32m6s"};
|
|
2549
2536
|
|
|
2550
2537
|
var ToolbarButton = function ToolbarButton(_ref) {
|
|
2551
2538
|
var children = _ref.children,
|
|
@@ -2553,8 +2540,10 @@ var ToolbarButton = function ToolbarButton(_ref) {
|
|
|
2553
2540
|
theme = _ref.theme,
|
|
2554
2541
|
isActive = _ref.isActive,
|
|
2555
2542
|
_onClick = _ref.onClick;
|
|
2556
|
-
var classNames = [[styles$
|
|
2557
|
-
return React__default.createElement("
|
|
2543
|
+
var classNames = [[styles$B.root, true], [styles$B[type], !!styles$B[type]], [styles$B[theme], !!styles$B[theme] && !!theme], [styles$B.isActive, !!isActive]];
|
|
2544
|
+
return React__default.createElement("li", {
|
|
2545
|
+
className: toolbarStyles.item
|
|
2546
|
+
}, React__default.createElement("button", {
|
|
2558
2547
|
"data-testid": "toolbar-button",
|
|
2559
2548
|
className: makeClassName(classNames),
|
|
2560
2549
|
type: "button",
|
|
@@ -2566,8 +2555,8 @@ var ToolbarButton = function ToolbarButton(_ref) {
|
|
|
2566
2555
|
icon: type,
|
|
2567
2556
|
styleContext: "isInToolbar"
|
|
2568
2557
|
}), children && React__default.createElement("span", {
|
|
2569
|
-
className: styles$
|
|
2570
|
-
}, children));
|
|
2558
|
+
className: styles$B.text
|
|
2559
|
+
}, children)));
|
|
2571
2560
|
};
|
|
2572
2561
|
|
|
2573
2562
|
exports.BookmarkButton = BookmarkButton;
|