@meduza/ui-kit-2 0.4.5 → 0.4.7
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/DocumentItemsCount/DocumentItemsCount.types.d.ts +1 -0
- package/dist/Dropdown/Dropdown.types.d.ts +1 -0
- package/dist/Lazy/Lazy.types.d.ts +1 -0
- package/dist/ListBlock/ListBlock.types.d.ts +1 -0
- package/dist/Meta/Meta.mock.d.ts +12 -0
- package/dist/RichTitle/RichTitle.types.d.ts +1 -0
- package/dist/Tag/Tag.types.d.ts +1 -1
- package/dist/Toolbar/Toolbar.types.d.ts +1 -0
- package/dist/index.d.ts +0 -1
- package/dist/ui-kit-2.cjs.development.js +204 -293
- 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 +205 -293
- package/dist/ui-kit-2.esm.js.map +1 -1
- package/dist/ui-kit.css +4 -220
- package/package.json +1 -1
- package/src/Meta/Meta.mock.ts +19 -0
- package/src/Meta/Meta.stories.module.css +16 -0
- package/src/Meta/Meta.stories.tsx +17 -4
- package/src/Meta/MetaContainer.tsx +8 -0
- package/src/Tag/Tag.module.css +4 -3
- package/src/Tag/Tag.stories.tsx +16 -3
- package/src/Tag/Tag.types.ts +7 -1
- package/dist/ShopRelatedBlock/ShopRelatedBlock.types.d.ts +0 -4
- package/dist/ShopRelatedBlock/index.d.ts +0 -3
package/dist/ui-kit-2.esm.js
CHANGED
|
@@ -30,7 +30,7 @@ const ButtonLoader = () => /*#__PURE__*/React.createElement("svg", {
|
|
|
30
30
|
d: "M15 0c8.18 0 14.83 6.547 14.997 14.686L30 15h-2c0-7.077-5.655-12.833-12.693-12.996L15 2V0z"
|
|
31
31
|
})));
|
|
32
32
|
|
|
33
|
-
var styles$
|
|
33
|
+
var styles$F = {"root":"Button-module_root__9OQ5b","gold":"Button-module_gold__q-XBP","isLoading":"Button-module_isLoading__Z53G4","gray":"Button-module_gray__fypDq","sand":"Button-module_sand__e5v-k","dark":"Button-module_dark__qv4NQ","light":"Button-module_light__TLYLT","black":"Button-module_black__GIsbk","red":"Button-module_red__kybni","default":"Button-module_default__utLb-","isInSpoiler":"Button-module_isInSpoiler__pGp-w","ghost":"Button-module_ghost__1s5-r","isInDropdown":"Button-module_isInDropdown__gN7TI","loader":"Button-module_loader__r0Mjs","isFancy":"Button-module_isFancy__gTRmu"};
|
|
34
34
|
|
|
35
35
|
const Button = ({
|
|
36
36
|
theme = 'gold',
|
|
@@ -50,12 +50,12 @@ const Button = ({
|
|
|
50
50
|
};
|
|
51
51
|
return /*#__PURE__*/React.createElement("button", {
|
|
52
52
|
"data-testid": "button",
|
|
53
|
-
className: makeClassName([[styles$
|
|
53
|
+
className: makeClassName([[styles$F.root, true], [styles$F[size], !!size], [styles$F[theme], !!theme], [styles$F[appearance], !!appearance], [styles$F[state], !!state && !!styles$F[state]], [styles$F[styleContext], !!styleContext]]),
|
|
54
54
|
disabled: disabled,
|
|
55
55
|
onClick: handleClick,
|
|
56
56
|
type: "button"
|
|
57
57
|
}, state === 'isLoading' ? /*#__PURE__*/React.createElement("span", {
|
|
58
|
-
className: styles$
|
|
58
|
+
className: styles$F.loader
|
|
59
59
|
}, /*#__PURE__*/React.createElement(ButtonLoader, null)) : children);
|
|
60
60
|
};
|
|
61
61
|
|
|
@@ -227,7 +227,7 @@ const icons = {
|
|
|
227
227
|
}
|
|
228
228
|
};
|
|
229
229
|
|
|
230
|
-
var styles$
|
|
230
|
+
var styles$E = {"root":"SvgSymbol-module_root__WctNR","small":"SvgSymbol-module_small__h9V-w","normal":"SvgSymbol-module_normal__gFAVe","medium":"SvgSymbol-module_medium__QaYjY","large":"SvgSymbol-module_large__o6A4o","adaptive":"SvgSymbol-module_adaptive__gL9qn","fb":"SvgSymbol-module_fb__HZqcB","vk":"SvgSymbol-module_vk__XctB2","ok":"SvgSymbol-module_ok__IM6Z9","tw":"SvgSymbol-module_tw__fio-Q","tg":"SvgSymbol-module_tg__GRhd-","magic":"SvgSymbol-module_magic__N-jKk","reaction":"SvgSymbol-module_reaction__xSbgo","card":"SvgSymbol-module_card__2nVFu","podcast":"SvgSymbol-module_podcast__Yp05r","read":"SvgSymbol-module_read__Bu653","listened":"SvgSymbol-module_listened__AOn7j","menu":"SvgSymbol-module_menu__z-dLm","cross":"SvgSymbol-module_cross__3Xej1","isInFeature":"SvgSymbol-module_isInFeature__BmyI-","isInCard":"SvgSymbol-module_isInCard__USxBS","isInTopicBlockItem":"SvgSymbol-module_isInTopicBlockItem__cnCgw","isInPageStatic":"SvgSymbol-module_isInPageStatic__7kMP-","isInMaterialMeta":"SvgSymbol-module_isInMaterialMeta__lIKJO","isInAudioPlayer":"SvgSymbol-module_isInAudioPlayer__mamWa","isInEpisodeBlock":"SvgSymbol-module_isInEpisodeBlock__oZ6JG","isInButtonPlaybackRate":"SvgSymbol-module_isInButtonPlaybackRate__NnADm","isInButtonBackward":"SvgSymbol-module_isInButtonBackward__x8L9a","isInButtonForward":"SvgSymbol-module_isInButtonForward__TtixK","isInToolbar":"SvgSymbol-module_isInToolbar__RzbaX","play":"SvgSymbol-module_play__dAES0","meduzaLogo":"SvgSymbol-module_meduzaLogo__aVKzZ","arrow":"SvgSymbol-module_arrow__lWTSJ","oil":"SvgSymbol-module_oil__VFGTp","search":"SvgSymbol-module_search__h06cc","user":"SvgSymbol-module_user__ORMm-","bookmark":"SvgSymbol-module_bookmark__JPKyG","shareBookmark":"SvgSymbol-module_shareBookmark__7w9X9","receipt":"SvgSymbol-module_receipt__o3V8u","isInHeader":"SvgSymbol-module_isInHeader__M5Tzw"};
|
|
231
231
|
|
|
232
232
|
const SvgSymbol = ({
|
|
233
233
|
icon,
|
|
@@ -239,7 +239,7 @@ const SvgSymbol = ({
|
|
|
239
239
|
"data-testid": "svg-symbol",
|
|
240
240
|
xmlns: "http://www.w3.org/2000/svg",
|
|
241
241
|
xmlnsXlink: "http://www.w3.org/1999/xlink",
|
|
242
|
-
className: makeClassName([[styles$
|
|
242
|
+
className: makeClassName([[styles$E.root, true], [styles$E[size], !!styles$E[size]], [styles$E[icon], !!styles$E[icon]], [styles$E[styleContext], !!styles$E[styleContext]]]),
|
|
243
243
|
width: data.width,
|
|
244
244
|
height: data.height,
|
|
245
245
|
viewBox: `0 0 ${data.width} ${data.height}`,
|
|
@@ -249,7 +249,7 @@ const SvgSymbol = ({
|
|
|
249
249
|
});
|
|
250
250
|
};
|
|
251
251
|
|
|
252
|
-
var styles$
|
|
252
|
+
var styles$D = {"root":"Switcher-module_root__cBsJB","dark":"Switcher-module_dark__1QQsH","control":"Switcher-module_control__60WMX","input":"Switcher-module_input__5UDnv","knob":"Switcher-module_knob__PwA1A","children":"Switcher-module_children__uLapU","left":"Switcher-module_left__5-HNa","right":"Switcher-module_right__82Edk","isInPanel":"Switcher-module_isInPanel__-nBSf","isInMenu":"Switcher-module_isInMenu__RQVhp","isInLive":"Switcher-module_isInLive__ZyMCT"};
|
|
253
253
|
|
|
254
254
|
const Switcher = ({
|
|
255
255
|
enabled,
|
|
@@ -260,20 +260,20 @@ const Switcher = ({
|
|
|
260
260
|
theme = 'light'
|
|
261
261
|
}) => /*#__PURE__*/React.createElement("label", {
|
|
262
262
|
"data-testid": "switcher",
|
|
263
|
-
className: makeClassName([[styles$
|
|
263
|
+
className: makeClassName([[styles$D.root, true], [styles$D[theme], !!styles$D[theme]], [styles$D[styleContext], !!styles$D[styleContext]]])
|
|
264
264
|
}, children && childrenPosition === 'left' && /*#__PURE__*/React.createElement("div", {
|
|
265
|
-
className: makeClassName([[styles$
|
|
265
|
+
className: makeClassName([[styles$D.children, true], [styles$D.left, true]])
|
|
266
266
|
}, children), /*#__PURE__*/React.createElement("input", {
|
|
267
|
-
className: styles$
|
|
267
|
+
className: styles$D.input,
|
|
268
268
|
type: "checkbox",
|
|
269
269
|
checked: enabled,
|
|
270
270
|
onChange: onChange
|
|
271
271
|
}), /*#__PURE__*/React.createElement("span", {
|
|
272
|
-
className: styles$
|
|
272
|
+
className: styles$D.control
|
|
273
273
|
}, /*#__PURE__*/React.createElement("span", {
|
|
274
|
-
className: styles$
|
|
274
|
+
className: styles$D.knob
|
|
275
275
|
})), children && childrenPosition === 'right' && /*#__PURE__*/React.createElement("div", {
|
|
276
|
-
className: makeClassName([[styles$
|
|
276
|
+
className: makeClassName([[styles$D.children, true], [styles$D.right, true]])
|
|
277
277
|
}, children));
|
|
278
278
|
|
|
279
279
|
const makeStyleContext = (classNames, styleContext, styles) => {
|
|
@@ -299,7 +299,7 @@ const postMessage = (category, element, action) => {
|
|
|
299
299
|
}
|
|
300
300
|
};
|
|
301
301
|
|
|
302
|
-
var styles$
|
|
302
|
+
var styles$C = {"root":"Lazy-module_root__DWw8D"};
|
|
303
303
|
|
|
304
304
|
const Lazy = ({
|
|
305
305
|
children,
|
|
@@ -320,7 +320,7 @@ const Lazy = ({
|
|
|
320
320
|
}
|
|
321
321
|
}, [inView]);
|
|
322
322
|
return /*#__PURE__*/React.createElement("div", {
|
|
323
|
-
className: makeClassName([[styles$
|
|
323
|
+
className: makeClassName([[styles$C.root, true], [styles$C.visible, visible]]),
|
|
324
324
|
ref: ref,
|
|
325
325
|
"data-testid": "lazy"
|
|
326
326
|
}, visible && children);
|
|
@@ -413,7 +413,7 @@ const RenderPicture = ({
|
|
|
413
413
|
}));
|
|
414
414
|
};
|
|
415
415
|
|
|
416
|
-
var styles$
|
|
416
|
+
var styles$B = {"root":"Image-module_root__H5wAh","isLoaded":"Image-module_isLoaded__keFnD","wrapper":"Image-module_wrapper__gJtbB","fullscreen":"Image-module_fullscreen__4PU9c","dark":"Image-module_dark__qjo5O"};
|
|
417
417
|
|
|
418
418
|
const Image = ({
|
|
419
419
|
alt,
|
|
@@ -446,16 +446,16 @@ const Image = ({
|
|
|
446
446
|
};
|
|
447
447
|
/* fallback w325 url until w6 was released */
|
|
448
448
|
const fallbackSource = source && source[0] || optimized.w325 && optimized.w325['1x'] || optimized.original;
|
|
449
|
-
let classNames = [[styles$
|
|
449
|
+
let classNames = [[styles$B.root, true], [styles$B.isLoaded, isLoaded], [styles$B.fullscreen, lightBox && optimized && optimized.original && fullscreen]];
|
|
450
450
|
if (styleContext) {
|
|
451
|
-
classNames = makeStyleContext(classNames, styleContext, styles$
|
|
451
|
+
classNames = makeStyleContext(classNames, styleContext, styles$B);
|
|
452
452
|
}
|
|
453
453
|
return /*#__PURE__*/React.createElement("div", {
|
|
454
454
|
className: makeClassName(classNames),
|
|
455
455
|
style: blockStyles,
|
|
456
456
|
"data-testid": "image"
|
|
457
457
|
}, /*#__PURE__*/React.createElement("div", {
|
|
458
|
-
className: styles$
|
|
458
|
+
className: styles$B.wrapper,
|
|
459
459
|
style: pictureStyles,
|
|
460
460
|
onClick: () => handleClick(),
|
|
461
461
|
onKeyPress: () => handleClick(),
|
|
@@ -483,7 +483,7 @@ const Image = ({
|
|
|
483
483
|
})));
|
|
484
484
|
};
|
|
485
485
|
|
|
486
|
-
var styles$
|
|
486
|
+
var styles$A = {"root":"Popover-module_root__nBiV4","fadeOut":"Popover-module_fadeOut__Y88V7","visible":"Popover-module_visible__XVQLW","fadeIn":"Popover-module_fadeIn__FK1gd","overlay":"Popover-module_overlay__NAPar","container":"Popover-module_container__y4SB1","disappear":"Popover-module_disappear__uUn2b","dismiss":"Popover-module_dismiss__W8KFF","background":"Popover-module_background__apiio","appear":"Popover-module_appear__b-CZ2","body":"Popover-module_body__UJEZf"};
|
|
487
487
|
|
|
488
488
|
const Popover = ({
|
|
489
489
|
children,
|
|
@@ -515,20 +515,20 @@ const Popover = ({
|
|
|
515
515
|
/* eslint-disable jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions */
|
|
516
516
|
return /*#__PURE__*/React.createElement("div", {
|
|
517
517
|
"data-testid": "popover",
|
|
518
|
-
className: makeClassName([[styles$
|
|
518
|
+
className: makeClassName([[styles$A.root, true], [styles$A.visible, visible]])
|
|
519
519
|
}, /*#__PURE__*/React.createElement("div", {
|
|
520
|
-
className: styles$
|
|
520
|
+
className: styles$A.overlay,
|
|
521
521
|
onClick: () => handleClose()
|
|
522
522
|
}), /*#__PURE__*/React.createElement("div", {
|
|
523
|
-
className: styles$
|
|
523
|
+
className: styles$A.container
|
|
524
524
|
}, /*#__PURE__*/React.createElement("button", {
|
|
525
525
|
type: "button",
|
|
526
|
-
className: styles$
|
|
526
|
+
className: styles$A.dismiss,
|
|
527
527
|
onClick: () => handleClose(),
|
|
528
528
|
"aria-label": "dismiss"
|
|
529
529
|
}), /*#__PURE__*/React.createElement("svg", {
|
|
530
530
|
width: "100%",
|
|
531
|
-
className: styles$
|
|
531
|
+
className: styles$A.background
|
|
532
532
|
}, /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("mask", {
|
|
533
533
|
id: "myMask",
|
|
534
534
|
x: "0",
|
|
@@ -557,11 +557,11 @@ const Popover = ({
|
|
|
557
557
|
width: "100%",
|
|
558
558
|
height: "100%"
|
|
559
559
|
})), /*#__PURE__*/React.createElement("div", {
|
|
560
|
-
className: styles$
|
|
560
|
+
className: styles$A.body
|
|
561
561
|
}, children)));
|
|
562
562
|
};
|
|
563
563
|
|
|
564
|
-
var styles$
|
|
564
|
+
var styles$z = {"root":"Footnote-module_root__W5D8G","body":"Footnote-module_body__C-ZC-","dismiss":"Footnote-module_dismiss__Q2hAX"};
|
|
565
565
|
|
|
566
566
|
const Footnote = ({
|
|
567
567
|
children,
|
|
@@ -569,16 +569,16 @@ const Footnote = ({
|
|
|
569
569
|
}) => {
|
|
570
570
|
return /*#__PURE__*/React.createElement("div", {
|
|
571
571
|
"data-testid": "footnote",
|
|
572
|
-
className: makeClassName([[styles$
|
|
572
|
+
className: makeClassName([[styles$z.root, true]])
|
|
573
573
|
}, /*#__PURE__*/React.createElement("button", {
|
|
574
|
-
className: styles$
|
|
574
|
+
className: styles$z.dismiss,
|
|
575
575
|
type: "button",
|
|
576
576
|
onClick: () => onClose()
|
|
577
577
|
}, /*#__PURE__*/React.createElement(SvgSymbol, {
|
|
578
578
|
icon: "cross",
|
|
579
579
|
size: "unset"
|
|
580
580
|
})), /*#__PURE__*/React.createElement("div", {
|
|
581
|
-
className: styles$
|
|
581
|
+
className: styles$z.body
|
|
582
582
|
}, children));
|
|
583
583
|
};
|
|
584
584
|
|
|
@@ -587,7 +587,7 @@ var viewportSize = (() => ({
|
|
|
587
587
|
height: window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight
|
|
588
588
|
}));
|
|
589
589
|
|
|
590
|
-
var styles$
|
|
590
|
+
var styles$y = {"root":"DotsOnImage-module_root__8UQf2","isVisible":"DotsOnImage-module_isVisible__rA5x9","marker":"DotsOnImage-module_marker__pLdQT","show":"DotsOnImage-module_show__Ec0lG","dot":"DotsOnImage-module_dot__e2MWx","isActive":"DotsOnImage-module_isActive__Bhb58","popover":"DotsOnImage-module_popover__zHSbU","isRight":"DotsOnImage-module_isRight__IaUbc","isTop":"DotsOnImage-module_isTop__RMK49","isLeft":"DotsOnImage-module_isLeft__Q6JZ-","isBottom":"DotsOnImage-module_isBottom__c-aLe"};
|
|
591
591
|
|
|
592
592
|
const DotsOnImage = ({
|
|
593
593
|
block: {
|
|
@@ -669,7 +669,7 @@ const DotsOnImage = ({
|
|
|
669
669
|
});
|
|
670
670
|
};
|
|
671
671
|
return /*#__PURE__*/React.createElement("div", {
|
|
672
|
-
className: makeClassName([[styles$
|
|
672
|
+
className: makeClassName([[styles$y.root, true], [styles$y.isVisible, visible]]),
|
|
673
673
|
"data-testid": "dots-on-image",
|
|
674
674
|
ref: ref
|
|
675
675
|
}, /*#__PURE__*/React.createElement(Image, {
|
|
@@ -682,7 +682,7 @@ const DotsOnImage = ({
|
|
|
682
682
|
}), /*#__PURE__*/React.createElement("div", {
|
|
683
683
|
ref: container
|
|
684
684
|
}, dots.map(dot => /*#__PURE__*/React.createElement("div", {
|
|
685
|
-
className: styles$
|
|
685
|
+
className: styles$y.dot,
|
|
686
686
|
key: dot.id,
|
|
687
687
|
style: {
|
|
688
688
|
top: `${dot.position.y}%`,
|
|
@@ -690,7 +690,7 @@ const DotsOnImage = ({
|
|
|
690
690
|
transform: `scale(${ratio}) translate(-${50 / ratio}%, -${50 / ratio}%)`
|
|
691
691
|
}
|
|
692
692
|
}, /*#__PURE__*/React.createElement("button", {
|
|
693
|
-
className: makeClassName([[styles$
|
|
693
|
+
className: makeClassName([[styles$y.marker, true], [styles$y.isActive, dot.id === popover.id]]),
|
|
694
694
|
type: "button",
|
|
695
695
|
style: {
|
|
696
696
|
backgroundColor: dot.icon.color
|
|
@@ -701,7 +701,7 @@ const DotsOnImage = ({
|
|
|
701
701
|
__html: dot.icon.svg_string
|
|
702
702
|
}
|
|
703
703
|
}), dot.icon.type === 'number' && dot.icon.number))), popover.show && /*#__PURE__*/React.createElement(React.Fragment, null, viewportSize().width >= MediaQuerySizes.LANDSCAPE_TABLET ? /*#__PURE__*/React.createElement("div", {
|
|
704
|
-
className: makeClassName([[styles$
|
|
704
|
+
className: makeClassName([[styles$y.popover, true], [styles$y[popover.side], !!popover.side], [styles$y[popover.align], !!popover.align]]),
|
|
705
705
|
style: popover.style
|
|
706
706
|
}, /*#__PURE__*/React.createElement(Footnote, {
|
|
707
707
|
onClose: () => {
|
|
@@ -726,7 +726,7 @@ const DotsOnImage = ({
|
|
|
726
726
|
})))));
|
|
727
727
|
};
|
|
728
728
|
|
|
729
|
-
var styles$
|
|
729
|
+
var styles$x = {"root":"Tag-module_root__sGbnM","small":"Tag-module_small__hcPrf","large":"Tag-module_large__EKMu6","dark":"Tag-module_dark__9SHCb","light":"Tag-module_light__qlfy3","gold":"Tag-module_gold__u0bzS","gray":"Tag-module_gray__eazPk","inherit":"Tag-module_inherit__z21c-","custom":"Tag-module_custom__NU9-e","is1to1":"Tag-module_is1to1__V-fH5","is1to2":"Tag-module_is1to2__b9Obh","isInSuperBlock":"Tag-module_isInSuperBlock__wrFUY","is1to3":"Tag-module_is1to3__vZT-R","is1to4":"Tag-module_is1to4__MBh5V","slide":"Tag-module_slide__gzptP","game":"Tag-module_game__NmKec","podcastMaterial":"Tag-module_podcastMaterial__O-LBI","richRelated":"Tag-module_richRelated__Qs6Ei","card":"Tag-module_card__TX87-","live":"Tag-module_live__ykyR7","episode":"Tag-module_episode__3OHmN","podcast":"Tag-module_podcast__K6dHn","rich":"Tag-module_rich__vPnWd","isInDynamicBlock":"Tag-module_isInDynamicBlock__WNleF","mobile":"Tag-module_mobile__19oMH","desktop":"Tag-module_desktop__cNyQs"};
|
|
730
730
|
|
|
731
731
|
const Tag = ({
|
|
732
732
|
children,
|
|
@@ -736,9 +736,9 @@ const Tag = ({
|
|
|
736
736
|
correlation,
|
|
737
737
|
onlyOn
|
|
738
738
|
}) => {
|
|
739
|
-
let classNames = [[styles$
|
|
739
|
+
let classNames = [[styles$x.root, true], [styles$x[size], !!size && !!styles$x[size]], [styles$x[theme], !!theme && !!styles$x[theme]], [styles$x[onlyOn], !!onlyOn && !!styles$x[onlyOn]], [styles$x[correlation], !!correlation && !!styles$x[correlation]]];
|
|
740
740
|
if (styleContext) {
|
|
741
|
-
classNames = makeStyleContext(classNames, styleContext, styles$
|
|
741
|
+
classNames = makeStyleContext(classNames, styleContext, styles$x);
|
|
742
742
|
}
|
|
743
743
|
return /*#__PURE__*/React.createElement("div", {
|
|
744
744
|
"data-testid": "tag",
|
|
@@ -746,34 +746,34 @@ const Tag = ({
|
|
|
746
746
|
}, children);
|
|
747
747
|
};
|
|
748
748
|
|
|
749
|
-
var styles$
|
|
749
|
+
var styles$w = {"root":"MediaCaption-module_root__1r0wu","caption":"MediaCaption-module_caption__ewfcc","credit":"MediaCaption-module_credit__7y4v8","dark":"MediaCaption-module_dark__7a9Cm","video":"MediaCaption-module_video__RDTUa","picture":"MediaCaption-module_picture__abCvw","desktop":"MediaCaption-module_desktop__e0lCY","isDark":"MediaCaption-module_isDark__IFb9X"};
|
|
750
750
|
|
|
751
751
|
const MediaCaption = ({
|
|
752
752
|
credit,
|
|
753
753
|
caption,
|
|
754
754
|
styleContext
|
|
755
755
|
}) => {
|
|
756
|
-
let classNames = [[styles$
|
|
756
|
+
let classNames = [[styles$w.root, true]];
|
|
757
757
|
if (styleContext) {
|
|
758
|
-
classNames = makeStyleContext(classNames, styleContext, styles$
|
|
758
|
+
classNames = makeStyleContext(classNames, styleContext, styles$w);
|
|
759
759
|
}
|
|
760
760
|
return /*#__PURE__*/React.createElement("div", {
|
|
761
761
|
"data-testid": "media-caption",
|
|
762
762
|
className: makeClassName(classNames)
|
|
763
763
|
}, caption && /*#__PURE__*/React.createElement("div", {
|
|
764
|
-
className: styles$
|
|
764
|
+
className: styles$w.caption,
|
|
765
765
|
dangerouslySetInnerHTML: {
|
|
766
766
|
__html: caption
|
|
767
767
|
}
|
|
768
768
|
}), credit && /*#__PURE__*/React.createElement("div", {
|
|
769
|
-
className: styles$
|
|
769
|
+
className: styles$w.credit,
|
|
770
770
|
dangerouslySetInnerHTML: {
|
|
771
771
|
__html: credit
|
|
772
772
|
}
|
|
773
773
|
}));
|
|
774
774
|
};
|
|
775
775
|
|
|
776
|
-
var styles$
|
|
776
|
+
var styles$v = {"root":"Table-module_root__fRuZq","card":"Table-module_card__8r-EA","table":"Table-module_table__7Pagp","slide":"Table-module_slide__dgMPV","wrapper":"Table-module_wrapper__AP4Pz","tracks":"Table-module_tracks__mRNG0","default":"Table-module_default__nwBEg","full":"Table-module_full__YZPDz","row":"Table-module_row__9OHT3","cell":"Table-module_cell__yFdqc","fixedColumn":"Table-module_fixedColumn__O2528","white":"Table-module_white__Laj3-","gray":"Table-module_gray__FPFh0","pink":"Table-module_pink__CGkAA","blue":"Table-module_blue__b8BHs","yellow":"Table-module_yellow__YOJgu","orange":"Table-module_orange__B-i8L","green":"Table-module_green__Bt6iC","violet":"Table-module_violet__yTZd7","header":"Table-module_header__YPDzO","s":"Table-module_s__I-CeX","m":"Table-module_m__vxhDf","l":"Table-module_l__GYHhk","xs":"Table-module_xs__imR8t"};
|
|
777
777
|
|
|
778
778
|
const Table = ({
|
|
779
779
|
styleContext,
|
|
@@ -795,26 +795,26 @@ const Table = ({
|
|
|
795
795
|
'#e7f2ef': 'green',
|
|
796
796
|
'#f4f0f8': 'violet'
|
|
797
797
|
};
|
|
798
|
-
let classNames = [[styles$
|
|
798
|
+
let classNames = [[styles$v.root, true], [styles$v[display], !!display && !!styles$v[display]]];
|
|
799
799
|
if (styleContext) {
|
|
800
|
-
classNames = makeStyleContext(classNames, styleContext, styles$
|
|
800
|
+
classNames = makeStyleContext(classNames, styleContext, styles$v);
|
|
801
801
|
}
|
|
802
802
|
return /*#__PURE__*/React.createElement("div", {
|
|
803
803
|
"data-testid": "table",
|
|
804
804
|
className: makeClassName(classNames)
|
|
805
805
|
}, /*#__PURE__*/React.createElement("div", {
|
|
806
|
-
className: styles$
|
|
806
|
+
className: styles$v.wrapper
|
|
807
807
|
}, /*#__PURE__*/React.createElement("div", {
|
|
808
|
-
className: styles$
|
|
808
|
+
className: styles$v.table
|
|
809
809
|
}, /*#__PURE__*/React.createElement("div", {
|
|
810
|
-
className: styles$
|
|
810
|
+
className: styles$v.tracks
|
|
811
811
|
}, rows.map((row, i) => {
|
|
812
812
|
return /*#__PURE__*/React.createElement("div", {
|
|
813
813
|
key: row.key,
|
|
814
|
-
className: styles$
|
|
814
|
+
className: styles$v.row
|
|
815
815
|
}, row.cells.map((cell, j) => /*#__PURE__*/React.createElement("div", {
|
|
816
816
|
key: cell.key,
|
|
817
|
-
className: makeClassName([[styles$
|
|
817
|
+
className: makeClassName([[styles$v.cell, true], [styles$v.header, options.header && i === 0], [styles$v[colors[cell.color]], true], [styles$v[columnsWidth[j]], true], [styles$v.fixedColumn, options.fixed_first_column && j === 0]]),
|
|
818
818
|
dangerouslySetInnerHTML: {
|
|
819
819
|
__html: cell.val
|
|
820
820
|
}
|
|
@@ -825,7 +825,7 @@ const Table = ({
|
|
|
825
825
|
}));
|
|
826
826
|
};
|
|
827
827
|
|
|
828
|
-
var styles$
|
|
828
|
+
var styles$u = {"root":"MaterialNote-module_root__99HSA","dark":"MaterialNote-module_dark__etjym","note_credit":"MaterialNote-module_note_credit__J1skG","note_caption":"MaterialNote-module_note_caption__G2Ad0","center":"MaterialNote-module_center__mDLEO","default":"MaterialNote-module_default__ozgd7","card":"MaterialNote-module_card__EVuZe","slide":"MaterialNote-module_slide__mg8XV","game":"MaterialNote-module_game__c-r0n","gameSurvey":"MaterialNote-module_gameSurvey__azhu6"};
|
|
829
829
|
|
|
830
830
|
const MaterialNote = ({
|
|
831
831
|
block: {
|
|
@@ -833,15 +833,15 @@ const MaterialNote = ({
|
|
|
833
833
|
},
|
|
834
834
|
styleContext
|
|
835
835
|
}) => {
|
|
836
|
-
let classNames = [[styles$
|
|
836
|
+
let classNames = [[styles$u.root, true]];
|
|
837
837
|
if (styleContext) {
|
|
838
|
-
classNames = makeStyleContext(classNames, styleContext, styles$
|
|
838
|
+
classNames = makeStyleContext(classNames, styleContext, styles$u);
|
|
839
839
|
}
|
|
840
840
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
841
841
|
"data-testid": "material-note",
|
|
842
842
|
className: makeClassName(classNames)
|
|
843
843
|
}, data && data.map(item => /*#__PURE__*/React.createElement("p", {
|
|
844
|
-
className: styles$
|
|
844
|
+
className: styles$u[item.type],
|
|
845
845
|
key: item.id,
|
|
846
846
|
dangerouslySetInnerHTML: {
|
|
847
847
|
__html: item.data
|
|
@@ -849,7 +849,7 @@ const MaterialNote = ({
|
|
|
849
849
|
}))));
|
|
850
850
|
};
|
|
851
851
|
|
|
852
|
-
var styles$
|
|
852
|
+
var styles$t = {"root":"BookmarkButton-module_root__A-75w","control":"BookmarkButton-module_control__-xy5O","dark":"BookmarkButton-module_dark__GkMEC","light":"BookmarkButton-module_light__1W6tx","isInBookmarks":"BookmarkButton-module_isInBookmarks__YSjjj","isInGrid":"BookmarkButton-module_isInGrid__Desh-"};
|
|
853
853
|
|
|
854
854
|
const BookmarkButton = ({
|
|
855
855
|
styleContext,
|
|
@@ -857,15 +857,15 @@ const BookmarkButton = ({
|
|
|
857
857
|
isInBookmarks,
|
|
858
858
|
onClick
|
|
859
859
|
}) => {
|
|
860
|
-
let classNames = [[styles$
|
|
860
|
+
let classNames = [[styles$t.root, true], [styles$t.isInBookmarks, isInBookmarks], [styles$t[theme], !!theme && !!styles$t[theme]]];
|
|
861
861
|
if (styleContext) {
|
|
862
|
-
classNames = makeStyleContext(classNames, styleContext, styles$
|
|
862
|
+
classNames = makeStyleContext(classNames, styleContext, styles$t);
|
|
863
863
|
}
|
|
864
864
|
return /*#__PURE__*/React.createElement("div", {
|
|
865
865
|
"data-testid": "bookmark-button",
|
|
866
866
|
className: makeClassName(classNames)
|
|
867
867
|
}, /*#__PURE__*/React.createElement("button", {
|
|
868
|
-
className: styles$
|
|
868
|
+
className: styles$t.control,
|
|
869
869
|
onClick: () => onClick(),
|
|
870
870
|
type: "button"
|
|
871
871
|
}, /*#__PURE__*/React.createElement(SvgSymbol, {
|
|
@@ -874,39 +874,39 @@ const BookmarkButton = ({
|
|
|
874
874
|
})));
|
|
875
875
|
};
|
|
876
876
|
|
|
877
|
-
var styles$
|
|
877
|
+
var styles$s = {"root":"MaterialTitle-module_root__VSphO","primary":"MaterialTitle-module_primary__XGnpb","secondary":"MaterialTitle-module_secondary__7IDEp"};
|
|
878
878
|
|
|
879
879
|
const Primary = ({
|
|
880
880
|
children
|
|
881
881
|
}) => {
|
|
882
882
|
return /*#__PURE__*/React.createElement("span", {
|
|
883
|
-
className: styles$
|
|
883
|
+
className: styles$s.primary
|
|
884
884
|
}, children);
|
|
885
885
|
};
|
|
886
886
|
const Secondary = ({
|
|
887
887
|
children
|
|
888
888
|
}) => {
|
|
889
889
|
return /*#__PURE__*/React.createElement("span", {
|
|
890
|
-
className: styles$
|
|
890
|
+
className: styles$s.secondary
|
|
891
891
|
}, children);
|
|
892
892
|
};
|
|
893
893
|
const MaterialTitle = ({
|
|
894
894
|
children
|
|
895
895
|
}) => {
|
|
896
896
|
return /*#__PURE__*/React.createElement("h1", {
|
|
897
|
-
className: styles$
|
|
897
|
+
className: styles$s.root,
|
|
898
898
|
"data-testid": "material-title"
|
|
899
899
|
}, children);
|
|
900
900
|
};
|
|
901
901
|
|
|
902
|
-
var styles$
|
|
902
|
+
var styles$r = {"root":"Dropdown-module_root__Wv7S-","active":"Dropdown-module_active__jEkE7","menu":"Dropdown-module_menu__11IQL","isInAudioPanel":"Dropdown-module_isInAudioPanel__UniSV"};
|
|
903
903
|
|
|
904
904
|
const Menu = ({
|
|
905
905
|
children
|
|
906
906
|
}) => {
|
|
907
907
|
return /*#__PURE__*/React.createElement("div", {
|
|
908
908
|
"data-testid": "dropdown",
|
|
909
|
-
className: styles$
|
|
909
|
+
className: styles$r.menu
|
|
910
910
|
}, children);
|
|
911
911
|
};
|
|
912
912
|
const Dropdown = ({
|
|
@@ -914,9 +914,9 @@ const Dropdown = ({
|
|
|
914
914
|
active,
|
|
915
915
|
styleContext
|
|
916
916
|
}) => {
|
|
917
|
-
let classNames = [[styles$
|
|
917
|
+
let classNames = [[styles$r.root, true], [styles$r.active, !!active && !!styles$r.active]];
|
|
918
918
|
if (styleContext) {
|
|
919
|
-
classNames = makeStyleContext(classNames, styleContext, styles$
|
|
919
|
+
classNames = makeStyleContext(classNames, styleContext, styles$r);
|
|
920
920
|
}
|
|
921
921
|
return /*#__PURE__*/React.createElement("div", {
|
|
922
922
|
"data-testid": "dropdown",
|
|
@@ -924,13 +924,13 @@ const Dropdown = ({
|
|
|
924
924
|
}, children);
|
|
925
925
|
};
|
|
926
926
|
|
|
927
|
-
var styles$
|
|
927
|
+
var styles$q = {"root":"Toolbar-module_root__RnmlI","list":"Toolbar-module_list__-IhdP","item":"Toolbar-module_item__CWmGM","isInTopbar":"Toolbar-module_isInTopbar__WEDi8","center":"Toolbar-module_center__pvdiJ","game":"Toolbar-module_game__etwIA","gameSurvey":"Toolbar-module_gameSurvey__v4D31","slide":"Toolbar-module_slide__PtB3l","card":"Toolbar-module_card__Lutyq","isDark":"Toolbar-module_isDark__MG6Ar","dark":"Toolbar-module_dark__a9sgz"};
|
|
928
928
|
|
|
929
929
|
const ToolbarItem = ({
|
|
930
930
|
children
|
|
931
931
|
}) => {
|
|
932
932
|
return /*#__PURE__*/React.createElement("li", {
|
|
933
|
-
className: styles$
|
|
933
|
+
className: styles$q.item
|
|
934
934
|
}, children);
|
|
935
935
|
};
|
|
936
936
|
|
|
@@ -938,19 +938,19 @@ const Toolbar = ({
|
|
|
938
938
|
children,
|
|
939
939
|
styleContext
|
|
940
940
|
}) => {
|
|
941
|
-
let classNames = [[styles$
|
|
941
|
+
let classNames = [[styles$q.root, true]];
|
|
942
942
|
if (styleContext) {
|
|
943
|
-
classNames = makeStyleContext(classNames, styleContext, styles$
|
|
943
|
+
classNames = makeStyleContext(classNames, styleContext, styles$q);
|
|
944
944
|
}
|
|
945
945
|
return /*#__PURE__*/React.createElement("div", {
|
|
946
946
|
"data-testid": "toolbar",
|
|
947
947
|
className: makeClassName(classNames)
|
|
948
948
|
}, /*#__PURE__*/React.createElement("ul", {
|
|
949
|
-
className: styles$
|
|
949
|
+
className: styles$q.list
|
|
950
950
|
}, children));
|
|
951
951
|
};
|
|
952
952
|
|
|
953
|
-
var styles$
|
|
953
|
+
var styles$p = {"root":"Meta-module_root__H-Q4d","rich":"Meta-module_rich__dCkJK","podcast":"Meta-module_podcast__MI8gD","episode":"Meta-module_episode__0n9CF","simple":"Meta-module_simple__tztcr","slide":"Meta-module_slide__3OyIN","card":"Meta-module_card__2vqfN","game":"Meta-module_game__HNcgr","isInMaterial":"Meta-module_isInMaterial__vKcTK","isInSearchItem":"Meta-module_isInSearchItem__ENqHo","isInMediaBlock":"Meta-module_isInMediaBlock__TENZG","center":"Meta-module_center__seHro","half":"Meta-module_half__aoa9h","podcastMaterial":"Meta-module_podcastMaterial__GTPyD","light":"Meta-module_light__oW3kc","dark":"Meta-module_dark__tLQNJ","isDark":"Meta-module_isDark__xSl1J","hasSource":"Meta-module_hasSource__OZJ0y","bookmark":"Meta-module_bookmark__jcFWn","mobile":"Meta-module_mobile__PbG8N","desktop":"Meta-module_desktop__W5AB7"};
|
|
954
954
|
|
|
955
955
|
const Meta = ({
|
|
956
956
|
hasSource,
|
|
@@ -959,9 +959,9 @@ const Meta = ({
|
|
|
959
959
|
onlyOn,
|
|
960
960
|
styleContext
|
|
961
961
|
}) => {
|
|
962
|
-
let classNames = [[styles$
|
|
962
|
+
let classNames = [[styles$p.root, true], [styles$p[theme], !!theme && !!styles$p[theme]], [styles$p[onlyOn], !!onlyOn], [styles$p.hasSource, hasSource]];
|
|
963
963
|
if (styleContext) {
|
|
964
|
-
classNames = makeStyleContext(classNames, styleContext, styles$
|
|
964
|
+
classNames = makeStyleContext(classNames, styleContext, styles$p);
|
|
965
965
|
}
|
|
966
966
|
return /*#__PURE__*/React.createElement("div", {
|
|
967
967
|
"data-testid": "meta",
|
|
@@ -969,7 +969,7 @@ const Meta = ({
|
|
|
969
969
|
}, children);
|
|
970
970
|
};
|
|
971
971
|
|
|
972
|
-
var styles$
|
|
972
|
+
var styles$o = {"root":"Timestamp-module_root__jPJ6w"};
|
|
973
973
|
|
|
974
974
|
const Timestamp = ({
|
|
975
975
|
publishedAt,
|
|
@@ -993,7 +993,7 @@ const Timestamp = ({
|
|
|
993
993
|
return /*#__PURE__*/React.createElement("time", {
|
|
994
994
|
suppressHydrationWarning: true,
|
|
995
995
|
"data-testid": "timestamp",
|
|
996
|
-
className: styles$
|
|
996
|
+
className: styles$o.root
|
|
997
997
|
}, published);
|
|
998
998
|
};
|
|
999
999
|
|
|
@@ -1053,7 +1053,7 @@ const DangerousHTML = ({
|
|
|
1053
1053
|
}));
|
|
1054
1054
|
};
|
|
1055
1055
|
|
|
1056
|
-
var styles$
|
|
1056
|
+
var styles$n = {"root":"EmbedBlock-module_root__wNZlD","object":"EmbedBlock-module_object__DONQ0","objectWrap":"EmbedBlock-module_objectWrap__qpbni","gameEmbed":"EmbedBlock-module_gameEmbed__tO5Ha","proportional":"EmbedBlock-module_proportional__zDPfm","default":"EmbedBlock-module_default__np8MO","xs":"EmbedBlock-module_xs__PNHGz","full":"EmbedBlock-module_full__Gmz7o","super_full":"EmbedBlock-module_super_full__-h382","figure":"EmbedBlock-module_figure__fNZB-","dark":"EmbedBlock-module_dark__S2R9f","isInGroupedBlock":"EmbedBlock-module_isInGroupedBlock__Wjj7k","control":"EmbedBlock-module_control__9bJUa","raw_html":"EmbedBlock-module_raw_html__EfYVy","mobileFullwidth":"EmbedBlock-module_mobileFullwidth__1MDT5","isInCard":"EmbedBlock-module_isInCard__WnLHG","isInSlide":"EmbedBlock-module_isInSlide__BtdnY","cc":"EmbedBlock-module_cc__Gyw44","isInSensitiveBlock":"EmbedBlock-module_isInSensitiveBlock__nYajZ","isInAnswer":"EmbedBlock-module_isInAnswer__WuZ0H","picture":"EmbedBlock-module_picture__Weamy","wrapper":"EmbedBlock-module_wrapper__ynT7R","mobile":"EmbedBlock-module_mobile__lEuww","desktop":"EmbedBlock-module_desktop__599S7"};
|
|
1057
1057
|
|
|
1058
1058
|
const EmbedGif = ({
|
|
1059
1059
|
gif,
|
|
@@ -1091,9 +1091,9 @@ const EmbedGif = ({
|
|
|
1091
1091
|
};
|
|
1092
1092
|
}, []);
|
|
1093
1093
|
return /*#__PURE__*/React.createElement("div", {
|
|
1094
|
-
className: styles$
|
|
1094
|
+
className: styles$n.figure
|
|
1095
1095
|
}, /*#__PURE__*/React.createElement("div", {
|
|
1096
|
-
className: styles$
|
|
1096
|
+
className: styles$n.objectWrap,
|
|
1097
1097
|
style: style,
|
|
1098
1098
|
"data-frozen": videoFrozen
|
|
1099
1099
|
}, /*#__PURE__*/React.createElement("video", {
|
|
@@ -1153,7 +1153,7 @@ const EmbedBlock = ({
|
|
|
1153
1153
|
case 'image':
|
|
1154
1154
|
{
|
|
1155
1155
|
return /*#__PURE__*/React.createElement("div", {
|
|
1156
|
-
className: styles$
|
|
1156
|
+
className: styles$n.figure
|
|
1157
1157
|
}, /*#__PURE__*/React.createElement(Image, {
|
|
1158
1158
|
source: !optimized && [small, large],
|
|
1159
1159
|
optimized: block.data.optimized,
|
|
@@ -1168,7 +1168,7 @@ const EmbedBlock = ({
|
|
|
1168
1168
|
case 'game_embed':
|
|
1169
1169
|
{
|
|
1170
1170
|
return /*#__PURE__*/React.createElement("div", {
|
|
1171
|
-
className: styles$
|
|
1171
|
+
className: styles$n.gameEmbed
|
|
1172
1172
|
}, /*#__PURE__*/React.createElement("iframe", {
|
|
1173
1173
|
src: block.data.game_src,
|
|
1174
1174
|
id: block.data.game_id,
|
|
@@ -1178,7 +1178,7 @@ const EmbedBlock = ({
|
|
|
1178
1178
|
case 'dots_on_image':
|
|
1179
1179
|
{
|
|
1180
1180
|
return /*#__PURE__*/React.createElement("div", {
|
|
1181
|
-
className: styles$
|
|
1181
|
+
className: styles$n.figure
|
|
1182
1182
|
}, /*#__PURE__*/React.createElement(DotsOnImage, {
|
|
1183
1183
|
block: data
|
|
1184
1184
|
}));
|
|
@@ -1186,12 +1186,12 @@ const EmbedBlock = ({
|
|
|
1186
1186
|
default:
|
|
1187
1187
|
{
|
|
1188
1188
|
return /*#__PURE__*/React.createElement("div", {
|
|
1189
|
-
className: styles$
|
|
1189
|
+
className: styles$n.object
|
|
1190
1190
|
}, /*#__PURE__*/React.createElement("div", {
|
|
1191
|
-
className: styles$
|
|
1191
|
+
className: styles$n.wrapper,
|
|
1192
1192
|
style: style
|
|
1193
1193
|
}, /*#__PURE__*/React.createElement(DangerousHTML, {
|
|
1194
|
-
className: styles$
|
|
1194
|
+
className: styles$n.objectWrap,
|
|
1195
1195
|
html: html
|
|
1196
1196
|
})));
|
|
1197
1197
|
}
|
|
@@ -1201,28 +1201,28 @@ const EmbedBlock = ({
|
|
|
1201
1201
|
style.paddingBottom = `${block.data.height / block.data.width * 100}%`;
|
|
1202
1202
|
style.height = 0;
|
|
1203
1203
|
}
|
|
1204
|
-
let classNames = [[styles$
|
|
1204
|
+
let classNames = [[styles$n.root, true], [styles$n.cc, cc], [styles$n[display], !!display && styles$n[display]], [styles$n[provider], !!provider && !!styles$n[provider]], [styles$n[onlyOn], !!onlyOn && styles$n[onlyOn]], [styles$n.mobileFullwidth, mobileFullwidth], [styles$n.proportional, isProportional]];
|
|
1205
1205
|
// Убираем из контекста все, что не начинается с приставки isIn,
|
|
1206
1206
|
// чтобы не применились лишние модификаторы
|
|
1207
1207
|
// TODO: в w6 модификаторы должны передаваться явно
|
|
1208
1208
|
if (styleContext && Array.isArray(styleContext)) {
|
|
1209
|
-
const filteredContext = styleContext.filter(key => key.startsWith('isIn') && styles$
|
|
1209
|
+
const filteredContext = styleContext.filter(key => key.startsWith('isIn') && styles$n[key]).reduce((acc, key) => {
|
|
1210
1210
|
acc.push(key);
|
|
1211
1211
|
return acc;
|
|
1212
1212
|
}, []);
|
|
1213
|
-
classNames = makeStyleContext(classNames, filteredContext, styles$
|
|
1213
|
+
classNames = makeStyleContext(classNames, filteredContext, styles$n);
|
|
1214
1214
|
}
|
|
1215
1215
|
return /*#__PURE__*/React.createElement("figure", {
|
|
1216
1216
|
className: makeClassName(classNames)
|
|
1217
1217
|
}, children && /*#__PURE__*/React.createElement("div", {
|
|
1218
|
-
className: styles$
|
|
1218
|
+
className: styles$n.object
|
|
1219
1219
|
}, /*#__PURE__*/React.createElement("div", {
|
|
1220
|
-
className: styles$
|
|
1220
|
+
className: styles$n.wrapper,
|
|
1221
1221
|
style: style
|
|
1222
1222
|
}, /*#__PURE__*/React.createElement("div", {
|
|
1223
|
-
className: styles$
|
|
1223
|
+
className: styles$n.objectWrap
|
|
1224
1224
|
}, children))), !children && renderEmbed(style), cc === 'default' && /*#__PURE__*/React.createElement("figcaption", null, renderCC()), cc === 'button' && /*#__PURE__*/React.createElement("button", {
|
|
1225
|
-
className: styles$
|
|
1225
|
+
className: styles$n.control,
|
|
1226
1226
|
type: "button",
|
|
1227
1227
|
"aria-label": "Open",
|
|
1228
1228
|
onClick: () => {
|
|
@@ -1325,7 +1325,7 @@ const EmbedBlockContainer = ({
|
|
|
1325
1325
|
});
|
|
1326
1326
|
};
|
|
1327
1327
|
|
|
1328
|
-
var styles$
|
|
1328
|
+
var styles$m = {"root":"QuoteBlock-module_root__4qa1J","center":"QuoteBlock-module_center__1f83y"};
|
|
1329
1329
|
|
|
1330
1330
|
const QuoteBlock = ({
|
|
1331
1331
|
block: {
|
|
@@ -1333,9 +1333,9 @@ const QuoteBlock = ({
|
|
|
1333
1333
|
},
|
|
1334
1334
|
styleContext
|
|
1335
1335
|
}) => {
|
|
1336
|
-
let classNames = [[styles$
|
|
1336
|
+
let classNames = [[styles$m.root, true]];
|
|
1337
1337
|
if (styleContext) {
|
|
1338
|
-
classNames = makeStyleContext(classNames, styleContext, styles$
|
|
1338
|
+
classNames = makeStyleContext(classNames, styleContext, styles$m);
|
|
1339
1339
|
}
|
|
1340
1340
|
return /*#__PURE__*/React.createElement("div", {
|
|
1341
1341
|
"data-testid": "quote-block",
|
|
@@ -1347,7 +1347,7 @@ const QuoteBlock = ({
|
|
|
1347
1347
|
}));
|
|
1348
1348
|
};
|
|
1349
1349
|
|
|
1350
|
-
var styles$
|
|
1350
|
+
var styles$l = {"root":"CardTitle-module_root__Pvx--","index":"CardTitle-module_index__Keled","title":"CardTitle-module_title__Lkflo","mobile":"CardTitle-module_mobile__6N3hB","desktop":"CardTitle-module_desktop__sBokS"};
|
|
1351
1351
|
|
|
1352
1352
|
const CardTitle = ({
|
|
1353
1353
|
block: {
|
|
@@ -1361,15 +1361,15 @@ const CardTitle = ({
|
|
|
1361
1361
|
}) => {
|
|
1362
1362
|
return /*#__PURE__*/React.createElement("div", {
|
|
1363
1363
|
"data-testid": "card-title",
|
|
1364
|
-
className: makeClassName([[styles$
|
|
1364
|
+
className: makeClassName([[styles$l.root, true], [styles$l[onlyOn], !!onlyOn], [styles$l[styleContext], !!styleContext && !!styles$l[styleContext]]])
|
|
1365
1365
|
}, /*#__PURE__*/React.createElement("div", {
|
|
1366
|
-
className: styles$
|
|
1366
|
+
className: styles$l.index
|
|
1367
1367
|
}, index), /*#__PURE__*/React.createElement("h3", {
|
|
1368
|
-
className: styles$
|
|
1368
|
+
className: styles$l.title
|
|
1369
1369
|
}, text));
|
|
1370
1370
|
};
|
|
1371
1371
|
|
|
1372
|
-
var styles$
|
|
1372
|
+
var styles$k = {"root":"ChapterBlock-module_root__iw7d2","subtitle":"ChapterBlock-module_subtitle__IpWgz","mobile":"ChapterBlock-module_mobile__V1Eye","desktop":"ChapterBlock-module_desktop__9xWf4"};
|
|
1373
1373
|
|
|
1374
1374
|
const ChapterBlock = ({
|
|
1375
1375
|
block: {
|
|
@@ -1380,9 +1380,9 @@ const ChapterBlock = ({
|
|
|
1380
1380
|
}) => {
|
|
1381
1381
|
return /*#__PURE__*/React.createElement("div", {
|
|
1382
1382
|
"data-testid": "chapter-block",
|
|
1383
|
-
className: makeClassName([[styles$
|
|
1383
|
+
className: makeClassName([[styles$k.root, true], [styles$k[onlyOn], !!onlyOn]])
|
|
1384
1384
|
}, /*#__PURE__*/React.createElement("div", {
|
|
1385
|
-
className: makeClassName([[styles$
|
|
1385
|
+
className: makeClassName([[styles$k.subtitle, true], [styles$k[styleContext], !!styleContext && !!styles$k[styleContext]]]),
|
|
1386
1386
|
dangerouslySetInnerHTML: {
|
|
1387
1387
|
__html: data
|
|
1388
1388
|
}
|
|
@@ -1398,7 +1398,7 @@ const generateGradient = (color, type) => {
|
|
|
1398
1398
|
return `linear-gradient(-180deg, ${gradient})`;
|
|
1399
1399
|
};
|
|
1400
1400
|
|
|
1401
|
-
var styles$
|
|
1401
|
+
var styles$j = {"root":"SimpleTitle-module_root__YOzNn","mobile":"SimpleTitle-module_mobile__1QiJd","desktop":"SimpleTitle-module_desktop__ZF5Af"};
|
|
1402
1402
|
|
|
1403
1403
|
const SimpleTitle = ({
|
|
1404
1404
|
block: {
|
|
@@ -1409,9 +1409,9 @@ const SimpleTitle = ({
|
|
|
1409
1409
|
},
|
|
1410
1410
|
styleContext
|
|
1411
1411
|
}) => {
|
|
1412
|
-
let classNames = [[styles$
|
|
1412
|
+
let classNames = [[styles$j.root, true], [styles$j[onlyOn], true]];
|
|
1413
1413
|
if (styleContext) {
|
|
1414
|
-
classNames = makeStyleContext(classNames, styleContext, styles$
|
|
1414
|
+
classNames = makeStyleContext(classNames, styleContext, styles$j);
|
|
1415
1415
|
}
|
|
1416
1416
|
return /*#__PURE__*/React.createElement("h1", {
|
|
1417
1417
|
"data-testid": "simple-title",
|
|
@@ -1419,7 +1419,7 @@ const SimpleTitle = ({
|
|
|
1419
1419
|
}, first);
|
|
1420
1420
|
};
|
|
1421
1421
|
|
|
1422
|
-
var styles$
|
|
1422
|
+
var styles$i = {"root":"RichTitle-module_root__U5XQu","slide":"RichTitle-module_slide__eU9Ob","game":"RichTitle-module_game__S1csb","podcastMaterial":"RichTitle-module_podcastMaterial__AulVF","half":"RichTitle-module_half__yBMby","featured":"RichTitle-module_featured__ULNQn","isInMediaBlock":"RichTitle-module_isInMediaBlock__2h6rl","mobile":"RichTitle-module_mobile__W5L9E","desktop":"RichTitle-module_desktop__k0PkC"};
|
|
1423
1423
|
|
|
1424
1424
|
const RichTitle = ({
|
|
1425
1425
|
block: {
|
|
@@ -1433,9 +1433,9 @@ const RichTitle = ({
|
|
|
1433
1433
|
},
|
|
1434
1434
|
styleContext
|
|
1435
1435
|
}) => {
|
|
1436
|
-
let classNames = [[styles$
|
|
1436
|
+
let classNames = [[styles$i.root, true], [styles$i[onlyOn], true], [styles$i.featured, !!featured]];
|
|
1437
1437
|
if (styleContext) {
|
|
1438
|
-
classNames = makeStyleContext(classNames, styleContext, styles$
|
|
1438
|
+
classNames = makeStyleContext(classNames, styleContext, styles$i);
|
|
1439
1439
|
}
|
|
1440
1440
|
return /*#__PURE__*/React.createElement(TagName, {
|
|
1441
1441
|
"data-testid": "rich-title",
|
|
@@ -1443,7 +1443,7 @@ const RichTitle = ({
|
|
|
1443
1443
|
}, first, second && /*#__PURE__*/React.createElement("span", null, " ", second));
|
|
1444
1444
|
};
|
|
1445
1445
|
|
|
1446
|
-
var styles$
|
|
1446
|
+
var styles$h = {"p":"SimpleBlock-module_p__7aRnT","h2":"SimpleBlock-module_h2__aWlMn","h3":"SimpleBlock-module_h3__uPh0-","h4":"SimpleBlock-module_h4__MxGXA","lead":"SimpleBlock-module_lead__NzEPT","lead_hr":"SimpleBlock-module_lead_hr__XN0rm","context_p":"SimpleBlock-module_context_p__Mdu1R","blockquote":"SimpleBlock-module_blockquote__nX-Ab","game":"SimpleBlock-module_game__uVeJJ","slide":"SimpleBlock-module_slide__MaaUF","dark":"SimpleBlock-module_dark__qtLhq","divider":"SimpleBlock-module_divider__-VXBu","isInIntro":"SimpleBlock-module_isInIntro__UOePf","center":"SimpleBlock-module_center__D1CsV","isInImportantLead":"SimpleBlock-module_isInImportantLead__qzKDo","podcastMaterial":"SimpleBlock-module_podcastMaterial__XEMjh","isInAnswer":"SimpleBlock-module_isInAnswer__Asx7d","mobile":"SimpleBlock-module_mobile__EVGYJ","desktop":"SimpleBlock-module_desktop__6ZH5e","isDark":"SimpleBlock-module_isDark__ehYKr"};
|
|
1447
1447
|
|
|
1448
1448
|
const SimpleBlock = ({
|
|
1449
1449
|
block: {
|
|
@@ -1454,9 +1454,9 @@ const SimpleBlock = ({
|
|
|
1454
1454
|
styleContext
|
|
1455
1455
|
}) => {
|
|
1456
1456
|
let TagName;
|
|
1457
|
-
let classNames = [[styles$
|
|
1457
|
+
let classNames = [[styles$h[type], !!type && !!styles$h[type]], [styles$h[onlyOn], true]];
|
|
1458
1458
|
if (styleContext) {
|
|
1459
|
-
classNames = makeStyleContext(classNames, styleContext, styles$
|
|
1459
|
+
classNames = makeStyleContext(classNames, styleContext, styles$h);
|
|
1460
1460
|
}
|
|
1461
1461
|
switch (type) {
|
|
1462
1462
|
case 'context_p':
|
|
@@ -1487,7 +1487,7 @@ const SimpleBlock = ({
|
|
|
1487
1487
|
});
|
|
1488
1488
|
};
|
|
1489
1489
|
|
|
1490
|
-
var styles$
|
|
1490
|
+
var styles$g = {"root":"ListBlock-module_root__dqomP","ol":"ListBlock-module_ol__1l6nP","ul":"ListBlock-module_ul__bgHlv","center":"ListBlock-module_center__bEBN-","isInImportantLead":"ListBlock-module_isInImportantLead__ewcD1","dark":"ListBlock-module_dark__NzpYz","mobile":"ListBlock-module_mobile__qEBsn","desktop":"ListBlock-module_desktop__HN0IU"};
|
|
1491
1491
|
|
|
1492
1492
|
const ListBlock = ({
|
|
1493
1493
|
block: {
|
|
@@ -1498,9 +1498,9 @@ const ListBlock = ({
|
|
|
1498
1498
|
styleContext
|
|
1499
1499
|
}) => {
|
|
1500
1500
|
const TagName = type;
|
|
1501
|
-
let classNames = [[styles$
|
|
1501
|
+
let classNames = [[styles$g.root, true], [styles$g[onlyOn], true], [styles$g[type], !!type && !!styles$g[type]]];
|
|
1502
1502
|
if (styleContext) {
|
|
1503
|
-
classNames = makeStyleContext(classNames, styleContext, styles$
|
|
1503
|
+
classNames = makeStyleContext(classNames, styleContext, styles$g);
|
|
1504
1504
|
}
|
|
1505
1505
|
return /*#__PURE__*/React.createElement(TagName, {
|
|
1506
1506
|
className: makeClassName(classNames),
|
|
@@ -1513,7 +1513,7 @@ const ListBlock = ({
|
|
|
1513
1513
|
})));
|
|
1514
1514
|
};
|
|
1515
1515
|
|
|
1516
|
-
var styles$
|
|
1516
|
+
var styles$f = {"root":"RelatedBlock-module_root__cr1c-","header":"RelatedBlock-module_header__bfUJD","items":"RelatedBlock-module_items__rzzam","rich":"RelatedBlock-module_rich__1cWdn","first":"RelatedBlock-module_first__ZkcP5","simple":"RelatedBlock-module_simple__m22bj","center":"RelatedBlock-module_center__WVpIJ","isInSlideMaterial":"RelatedBlock-module_isInSlideMaterial__VumDw","mobile":"RelatedBlock-module_mobile__AScBA","desktop":"RelatedBlock-module_desktop__uMXUY"};
|
|
1517
1517
|
|
|
1518
1518
|
const RelatedBlock = ({
|
|
1519
1519
|
block: {
|
|
@@ -1525,28 +1525,28 @@ const RelatedBlock = ({
|
|
|
1525
1525
|
},
|
|
1526
1526
|
styleContext
|
|
1527
1527
|
}) => {
|
|
1528
|
-
let classNames = [[styles$
|
|
1528
|
+
let classNames = [[styles$f.root, true], [styles$f[onlyOn], true]];
|
|
1529
1529
|
if (styleContext) {
|
|
1530
|
-
classNames = makeStyleContext(classNames, styleContext, styles$
|
|
1530
|
+
classNames = makeStyleContext(classNames, styleContext, styles$f);
|
|
1531
1531
|
}
|
|
1532
1532
|
return /*#__PURE__*/React.createElement("div", {
|
|
1533
1533
|
"data-testid": "related-block",
|
|
1534
1534
|
className: makeClassName(classNames)
|
|
1535
1535
|
}, /*#__PURE__*/React.createElement("h3", {
|
|
1536
|
-
className: styles$
|
|
1536
|
+
className: styles$f.header
|
|
1537
1537
|
}, title), /*#__PURE__*/React.createElement("ul", {
|
|
1538
|
-
className: styles$
|
|
1538
|
+
className: styles$f.items
|
|
1539
1539
|
}, related.map((item, index) => /*#__PURE__*/React.createElement("li", {
|
|
1540
1540
|
key: item.id || index,
|
|
1541
|
-
className: styles$
|
|
1541
|
+
className: styles$f[item.layout]
|
|
1542
1542
|
}, /*#__PURE__*/React.createElement(Link, {
|
|
1543
1543
|
to: item.full_url || `/${item.url}`
|
|
1544
1544
|
}, /*#__PURE__*/React.createElement("span", {
|
|
1545
|
-
className: styles$
|
|
1545
|
+
className: styles$f.first
|
|
1546
1546
|
}, item.title), item.second_title && ' ', item.second_title && /*#__PURE__*/React.createElement("span", null, item.second_title))))));
|
|
1547
1547
|
};
|
|
1548
1548
|
|
|
1549
|
-
var styles$
|
|
1549
|
+
var styles$e = {"root":"SourceBlock-module_root__9dnI4","text":"SourceBlock-module_text__M5-uy","origin":"SourceBlock-module_origin__fyvxH","center":"SourceBlock-module_center__UOMwy","mobile":"SourceBlock-module_mobile__QVEyg","desktop":"SourceBlock-module_desktop__xdXWm","isDark":"SourceBlock-module_isDark__etwk1"};
|
|
1550
1550
|
|
|
1551
1551
|
const SourceBlock = ({
|
|
1552
1552
|
block: {
|
|
@@ -1559,16 +1559,16 @@ const SourceBlock = ({
|
|
|
1559
1559
|
},
|
|
1560
1560
|
styleContext
|
|
1561
1561
|
}) => {
|
|
1562
|
-
let classNames = [[styles$
|
|
1562
|
+
let classNames = [[styles$e.root, true], [styles$e[onlyOn], true]];
|
|
1563
1563
|
if (styleContext) {
|
|
1564
|
-
classNames = makeStyleContext(classNames, styleContext, styles$
|
|
1564
|
+
classNames = makeStyleContext(classNames, styleContext, styles$e);
|
|
1565
1565
|
}
|
|
1566
1566
|
return /*#__PURE__*/React.createElement("blockquote", {
|
|
1567
1567
|
"data-testid": "source-block",
|
|
1568
1568
|
cite: url,
|
|
1569
1569
|
className: makeClassName(classNames)
|
|
1570
1570
|
}, /*#__PURE__*/React.createElement("a", {
|
|
1571
|
-
className: styles$
|
|
1571
|
+
className: styles$e.text,
|
|
1572
1572
|
href: url,
|
|
1573
1573
|
target: "_blank",
|
|
1574
1574
|
rel: "noopener noreferrer"
|
|
@@ -1578,11 +1578,11 @@ const SourceBlock = ({
|
|
|
1578
1578
|
__html: item.data
|
|
1579
1579
|
}
|
|
1580
1580
|
})), /*#__PURE__*/React.createElement("footer", null, /*#__PURE__*/React.createElement("cite", {
|
|
1581
|
-
className: styles$
|
|
1581
|
+
className: styles$e.origin
|
|
1582
1582
|
}, origin))));
|
|
1583
1583
|
};
|
|
1584
1584
|
|
|
1585
|
-
var styles$
|
|
1585
|
+
var styles$d = {"root":"SensitiveBlock-module_root__1Nl9-","container":"SensitiveBlock-module_container__GE2tW","overlay":"SensitiveBlock-module_overlay__tEsK8","content":"SensitiveBlock-module_content__RYbdd","button":"SensitiveBlock-module_button__LGEEM","default":"SensitiveBlock-module_default__pkWhC","full":"SensitiveBlock-module_full__hlH41","media":"SensitiveBlock-module_media__nuL1S","super_full":"SensitiveBlock-module_super_full__C7UyP","visible":"SensitiveBlock-module_visible__bXhYO","isInCard":"SensitiveBlock-module_isInCard__uANYL","isInSlide":"SensitiveBlock-module_isInSlide__ZAVUU"};
|
|
1586
1586
|
|
|
1587
1587
|
const SensitiveBlock = ({
|
|
1588
1588
|
block,
|
|
@@ -1605,40 +1605,40 @@ const SensitiveBlock = ({
|
|
|
1605
1605
|
const handleClick = () => {
|
|
1606
1606
|
isVisible(true);
|
|
1607
1607
|
};
|
|
1608
|
-
let classNames = [[styles$
|
|
1608
|
+
let classNames = [[styles$d.root, true], [styles$d.visible, visible], [styles$d[display], display && styles$d[display]]];
|
|
1609
1609
|
let context = ['isInSensitiveBlock'];
|
|
1610
1610
|
if (styleContext) {
|
|
1611
|
-
classNames = makeStyleContext(classNames, styleContext, styles$
|
|
1611
|
+
classNames = makeStyleContext(classNames, styleContext, styles$d);
|
|
1612
1612
|
context = [...styleContext, 'isInSensitiveBlock'];
|
|
1613
1613
|
}
|
|
1614
1614
|
return /*#__PURE__*/React.createElement("div", {
|
|
1615
1615
|
"data-testid": "sensitive-block",
|
|
1616
1616
|
className: makeClassName(classNames)
|
|
1617
1617
|
}, /*#__PURE__*/React.createElement("div", {
|
|
1618
|
-
className: styles$
|
|
1618
|
+
className: styles$d.container
|
|
1619
1619
|
}, /*#__PURE__*/React.createElement("div", {
|
|
1620
|
-
className: styles$
|
|
1620
|
+
className: styles$d.overlay,
|
|
1621
1621
|
style: {
|
|
1622
1622
|
backgroundImage: `url(${blurredImage})`
|
|
1623
1623
|
}
|
|
1624
1624
|
}, /*#__PURE__*/React.createElement("div", {
|
|
1625
|
-
className: styles$
|
|
1625
|
+
className: styles$d.content
|
|
1626
1626
|
}, /*#__PURE__*/React.createElement("p", {
|
|
1627
1627
|
dangerouslySetInnerHTML: {
|
|
1628
1628
|
__html: block.title
|
|
1629
1629
|
}
|
|
1630
1630
|
}), /*#__PURE__*/React.createElement("div", {
|
|
1631
|
-
className: styles$
|
|
1631
|
+
className: styles$d.button
|
|
1632
1632
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
1633
1633
|
onClick: () => handleClick(),
|
|
1634
1634
|
theme: "light"
|
|
1635
1635
|
}, block.button.text)))), /*#__PURE__*/React.createElement("div", {
|
|
1636
|
-
className: styles$
|
|
1636
|
+
className: styles$d.media
|
|
1637
1637
|
}, /*#__PURE__*/React.createElement(EmbedBlockContainer, {
|
|
1638
1638
|
block: block.item,
|
|
1639
1639
|
styleContext: context
|
|
1640
1640
|
}))), cc && /*#__PURE__*/React.createElement("figcaption", {
|
|
1641
|
-
className: styles$
|
|
1641
|
+
className: styles$d.figcaption
|
|
1642
1642
|
}, /*#__PURE__*/React.createElement(MediaCaption, {
|
|
1643
1643
|
credit: credit,
|
|
1644
1644
|
caption: caption,
|
|
@@ -1646,7 +1646,7 @@ const SensitiveBlock = ({
|
|
|
1646
1646
|
})));
|
|
1647
1647
|
};
|
|
1648
1648
|
|
|
1649
|
-
var styles$
|
|
1649
|
+
var styles$c = {"root":"GroupedBlock-module_root__MQQin","hasFigcaption":"GroupedBlock-module_hasFigcaption__Y05ed","item":"GroupedBlock-module_item__-InqF","items":"GroupedBlock-module_items__8X4js","figcaption":"GroupedBlock-module_figcaption__OE5-u","default":"GroupedBlock-module_default__Tha8f","full":"GroupedBlock-module_full__SNwyE","super_full":"GroupedBlock-module_super_full__HTA9D","mobile":"GroupedBlock-module_mobile__xqMw5","desktop":"GroupedBlock-module_desktop__Oobdp"};
|
|
1650
1650
|
|
|
1651
1651
|
const GroupedBlock = ({
|
|
1652
1652
|
block,
|
|
@@ -1662,19 +1662,19 @@ const GroupedBlock = ({
|
|
|
1662
1662
|
return width / (height / maxHeight);
|
|
1663
1663
|
});
|
|
1664
1664
|
const sumWidth = normalizedBoxesWidth.reduce((sum, x) => sum + x);
|
|
1665
|
-
let classNames = [[styles$
|
|
1665
|
+
let classNames = [[styles$c.root, true], [styles$c[onlyOn], true], [styles$c.hasFigcaption, block.cc === 'default'], [styles$c[block.display], !!block.display && styles$c[block.display]]];
|
|
1666
1666
|
if (styleContext) {
|
|
1667
|
-
classNames = makeStyleContext(classNames, styleContext, styles$
|
|
1667
|
+
classNames = makeStyleContext(classNames, styleContext, styles$c);
|
|
1668
1668
|
}
|
|
1669
1669
|
return /*#__PURE__*/React.createElement("div", {
|
|
1670
1670
|
"data-testid": "grouped-block",
|
|
1671
1671
|
className: makeClassName(classNames)
|
|
1672
1672
|
}, /*#__PURE__*/React.createElement("div", {
|
|
1673
|
-
className: styles$
|
|
1673
|
+
className: styles$c.items
|
|
1674
1674
|
}, block.data.map((item, index) => {
|
|
1675
1675
|
const percentWidth = normalizedBoxesWidth[index] / sumWidth * 100;
|
|
1676
1676
|
return /*#__PURE__*/React.createElement("div", {
|
|
1677
|
-
className: styles$
|
|
1677
|
+
className: styles$c.item,
|
|
1678
1678
|
key: item.id,
|
|
1679
1679
|
style: {
|
|
1680
1680
|
width: `${percentWidth}%`
|
|
@@ -1687,7 +1687,7 @@ const GroupedBlock = ({
|
|
|
1687
1687
|
styleContext: ['isInGroupedBlock']
|
|
1688
1688
|
}));
|
|
1689
1689
|
})), block.cc && /*#__PURE__*/React.createElement("figcaption", {
|
|
1690
|
-
className: styles$
|
|
1690
|
+
className: styles$c.figcaption
|
|
1691
1691
|
}, /*#__PURE__*/React.createElement(MediaCaption, {
|
|
1692
1692
|
credit: block.credit,
|
|
1693
1693
|
caption: block.caption,
|
|
@@ -1695,7 +1695,7 @@ const GroupedBlock = ({
|
|
|
1695
1695
|
})));
|
|
1696
1696
|
};
|
|
1697
1697
|
|
|
1698
|
-
var styles$
|
|
1698
|
+
var styles$b = {"root":"MetaItem-module_root__sRbrZ","hasBullets":"MetaItem-module_hasBullets__b1eW9","hasSource":"MetaItem-module_hasSource__35olm","listened":"MetaItem-module_listened__XZWFQ","read":"MetaItem-module_read__O3cUz","datetime":"MetaItem-module_datetime__--O8c"};
|
|
1699
1699
|
|
|
1700
1700
|
const MetaItem = ({
|
|
1701
1701
|
hasSource,
|
|
@@ -1703,25 +1703,25 @@ const MetaItem = ({
|
|
|
1703
1703
|
children,
|
|
1704
1704
|
bullets
|
|
1705
1705
|
}) => {
|
|
1706
|
-
const classNames = [[styles$
|
|
1706
|
+
const classNames = [[styles$b.root, true], [styles$b[type], !!type && !!styles$b[type]], [styles$b.hasSource, !!hasSource], [styles$b.hasBullets, !!bullets]];
|
|
1707
1707
|
return /*#__PURE__*/React.createElement("div", {
|
|
1708
1708
|
"data-testid": "meta-item",
|
|
1709
1709
|
className: makeClassName(classNames)
|
|
1710
1710
|
}, children);
|
|
1711
1711
|
};
|
|
1712
1712
|
|
|
1713
|
-
var styles$
|
|
1713
|
+
var styles$a = {"root":"MetaItemLive-module_root__XfQiW","gold":"MetaItemLive-module_gold__f1UOy","frame":"MetaItemLive-module_frame__FHByQ","liveMiddle":"MetaItemLive-module_liveMiddle__SX4Gs","liveFirstWave":"MetaItemLive-module_liveFirstWave__QqstP","liveSecondWave":"MetaItemLive-module_liveSecondWave__hlbpt"};
|
|
1714
1714
|
|
|
1715
1715
|
const MetaItemLive = ({
|
|
1716
1716
|
theme = 'gold'
|
|
1717
1717
|
}) => {
|
|
1718
|
-
const classNames = [[styles$
|
|
1718
|
+
const classNames = [[styles$a.root, true], [styles$a[theme], !!theme && styles$a[theme]]];
|
|
1719
1719
|
return /*#__PURE__*/React.createElement("div", {
|
|
1720
1720
|
"data-testid": "meta-item-live",
|
|
1721
1721
|
"data-meta": "live",
|
|
1722
1722
|
className: makeClassName(classNames)
|
|
1723
1723
|
}, /*#__PURE__*/React.createElement("div", {
|
|
1724
|
-
className: styles$
|
|
1724
|
+
className: styles$a.frame
|
|
1725
1725
|
}));
|
|
1726
1726
|
};
|
|
1727
1727
|
|
|
@@ -1741,7 +1741,7 @@ const pluralize = (number, one, two, five) => {
|
|
|
1741
1741
|
return five;
|
|
1742
1742
|
};
|
|
1743
1743
|
|
|
1744
|
-
var styles$
|
|
1744
|
+
var styles$9 = {"root":"DocumentItemsCount-module_root__u4M3y"};
|
|
1745
1745
|
|
|
1746
1746
|
const DocumentItemsCount = ({
|
|
1747
1747
|
type,
|
|
@@ -1776,11 +1776,8 @@ const DocumentItemsCount = ({
|
|
|
1776
1776
|
}
|
|
1777
1777
|
};
|
|
1778
1778
|
const itemsCount = `${items} ${pluralize(items, i18n[lang][type].one, i18n[lang][type].two, i18n[lang][type].five)}`;
|
|
1779
|
-
return /*#__PURE__*/React.createElement("
|
|
1780
|
-
|
|
1781
|
-
className: styles$a.root
|
|
1782
|
-
}, children, /*#__PURE__*/React.createElement("span", {
|
|
1783
|
-
className: styles$a.items
|
|
1779
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, children, /*#__PURE__*/React.createElement("span", {
|
|
1780
|
+
className: styles$9.root
|
|
1784
1781
|
}, itemsCount));
|
|
1785
1782
|
};
|
|
1786
1783
|
|
|
@@ -1884,6 +1881,13 @@ const MetaContainer = ({
|
|
|
1884
1881
|
key: component.id
|
|
1885
1882
|
}, /*#__PURE__*/React.createElement(React.Fragment, null, component.with_icon && /*#__PURE__*/React.createElement(MetaItemLive, null), component.label));
|
|
1886
1883
|
}
|
|
1884
|
+
case 'string':
|
|
1885
|
+
{
|
|
1886
|
+
return /*#__PURE__*/React.createElement(MetaItem, {
|
|
1887
|
+
bullets: true,
|
|
1888
|
+
key: component.id
|
|
1889
|
+
}, component.text);
|
|
1890
|
+
}
|
|
1887
1891
|
default:
|
|
1888
1892
|
{
|
|
1889
1893
|
return null;
|
|
@@ -1897,22 +1901,22 @@ const MetaContainer = ({
|
|
|
1897
1901
|
icon: isListened ? 'listened' : 'read',
|
|
1898
1902
|
size: "unset"
|
|
1899
1903
|
})), isSlides && lang === 'ru' && /*#__PURE__*/React.createElement("div", {
|
|
1900
|
-
className: styles$
|
|
1904
|
+
className: styles$p.bookmark
|
|
1901
1905
|
}, /*#__PURE__*/React.createElement(BookmarkButton, {
|
|
1902
1906
|
isInBookmarks: isInBookmarks,
|
|
1903
1907
|
onClick: () => bookmarkAction('bookmark', 'top')
|
|
1904
1908
|
})));
|
|
1905
1909
|
};
|
|
1906
1910
|
|
|
1907
|
-
var styles$
|
|
1911
|
+
var styles$8 = {"root":"DonatesTeaser-module_root__XQCVy","main":"DonatesTeaser-module_main__eN9kd","title":"DonatesTeaser-module_title__9umo1","text":"DonatesTeaser-module_text__s6tyf","cta":"DonatesTeaser-module_cta__-50aB","center":"DonatesTeaser-module_center__gxLvW","isInCard":"DonatesTeaser-module_isInCard__vaUhd","isInSlide":"DonatesTeaser-module_isInSlide__Dh4NH","ru":"DonatesTeaser-module_ru__y-PlJ","en":"DonatesTeaser-module_en__0Iisr"};
|
|
1908
1912
|
|
|
1909
1913
|
const DonatesTeaser = ({
|
|
1910
1914
|
styleContext,
|
|
1911
1915
|
lang = 'ru'
|
|
1912
1916
|
}) => {
|
|
1913
|
-
let classNames = [[styles$
|
|
1917
|
+
let classNames = [[styles$8.root, true], [styles$8[lang], styles$8[lang]]];
|
|
1914
1918
|
if (styleContext) {
|
|
1915
|
-
classNames = makeStyleContext(classNames, styleContext, styles$
|
|
1919
|
+
classNames = makeStyleContext(classNames, styleContext, styles$8);
|
|
1916
1920
|
}
|
|
1917
1921
|
const data = {
|
|
1918
1922
|
ru: {
|
|
@@ -1932,20 +1936,20 @@ const DonatesTeaser = ({
|
|
|
1932
1936
|
"data-testid": "donates-teaser",
|
|
1933
1937
|
className: makeClassName(classNames)
|
|
1934
1938
|
}, /*#__PURE__*/React.createElement("div", {
|
|
1935
|
-
className: styles$
|
|
1939
|
+
className: styles$8.main
|
|
1936
1940
|
}, /*#__PURE__*/React.createElement("h3", {
|
|
1937
|
-
className: styles$
|
|
1941
|
+
className: styles$8.title
|
|
1938
1942
|
}, /*#__PURE__*/React.createElement("span", {
|
|
1939
1943
|
dangerouslySetInnerHTML: {
|
|
1940
1944
|
__html: data[lang].title
|
|
1941
1945
|
}
|
|
1942
1946
|
}), ` `, /*#__PURE__*/React.createElement("span", {
|
|
1943
|
-
className: styles$
|
|
1947
|
+
className: styles$8.text,
|
|
1944
1948
|
dangerouslySetInnerHTML: {
|
|
1945
1949
|
__html: data[lang].subtitle
|
|
1946
1950
|
}
|
|
1947
1951
|
}))), /*#__PURE__*/React.createElement("div", {
|
|
1948
|
-
className: styles$
|
|
1952
|
+
className: styles$8.cta
|
|
1949
1953
|
}, /*#__PURE__*/React.createElement("a", {
|
|
1950
1954
|
href: data[lang].href,
|
|
1951
1955
|
target: "_blank",
|
|
@@ -1953,15 +1957,15 @@ const DonatesTeaser = ({
|
|
|
1953
1957
|
}, /*#__PURE__*/React.createElement("span", null, data[lang].button))));
|
|
1954
1958
|
};
|
|
1955
1959
|
|
|
1956
|
-
var styles$
|
|
1960
|
+
var styles$7 = {"root":"AnnouncementInText-module_root__C4-Oo","body":"AnnouncementInText-module_body__lZy-L","title":"AnnouncementInText-module_title__cb6i1","footer":"AnnouncementInText-module_footer__jRk9p","button":"AnnouncementInText-module_button__JuT-E","link":"AnnouncementInText-module_link__C0YxL","center":"AnnouncementInText-module_center__1DJjd","isInCard":"AnnouncementInText-module_isInCard__jIqpa","isInSlide":"AnnouncementInText-module_isInSlide__BWO-A","ru":"AnnouncementInText-module_ru__QHQad","en":"AnnouncementInText-module_en__r0PvM"};
|
|
1957
1961
|
|
|
1958
1962
|
const AnnouncementInText = ({
|
|
1959
1963
|
styleContext,
|
|
1960
1964
|
lang = 'ru'
|
|
1961
1965
|
}) => {
|
|
1962
|
-
let classNames = [[styles$
|
|
1966
|
+
let classNames = [[styles$7.root, true], [styles$7[lang], styles$7[lang]]];
|
|
1963
1967
|
if (styleContext) {
|
|
1964
|
-
classNames = makeStyleContext(classNames, styleContext, styles$
|
|
1968
|
+
classNames = makeStyleContext(classNames, styleContext, styles$7);
|
|
1965
1969
|
}
|
|
1966
1970
|
const data = {
|
|
1967
1971
|
ru: {
|
|
@@ -1982,9 +1986,9 @@ const AnnouncementInText = ({
|
|
|
1982
1986
|
"data-testid": "announcement-in-text",
|
|
1983
1987
|
className: makeClassName(classNames)
|
|
1984
1988
|
}, /*#__PURE__*/React.createElement("div", {
|
|
1985
|
-
className: styles$
|
|
1989
|
+
className: styles$7.body
|
|
1986
1990
|
}, /*#__PURE__*/React.createElement("h3", {
|
|
1987
|
-
className: styles$
|
|
1991
|
+
className: styles$7.title,
|
|
1988
1992
|
dangerouslySetInnerHTML: {
|
|
1989
1993
|
__html: localeData.title
|
|
1990
1994
|
}
|
|
@@ -1993,14 +1997,14 @@ const AnnouncementInText = ({
|
|
|
1993
1997
|
__html: localeData.text
|
|
1994
1998
|
}
|
|
1995
1999
|
})), /*#__PURE__*/React.createElement("div", {
|
|
1996
|
-
className: styles$
|
|
2000
|
+
className: styles$7.footer
|
|
1997
2001
|
}, /*#__PURE__*/React.createElement("a", {
|
|
1998
|
-
className: styles$
|
|
2002
|
+
className: styles$7.link,
|
|
1999
2003
|
href: localeData.href,
|
|
2000
2004
|
target: "_blank",
|
|
2001
2005
|
rel: "noreferrer"
|
|
2002
2006
|
}, /*#__PURE__*/React.createElement("span", null, localeData.button)), /*#__PURE__*/React.createElement("span", {
|
|
2003
|
-
className: styles$
|
|
2007
|
+
className: styles$7.button
|
|
2004
2008
|
}, /*#__PURE__*/React.createElement("span", null, localeData.button))));
|
|
2005
2009
|
};
|
|
2006
2010
|
|
|
@@ -2152,7 +2156,7 @@ const RenderBlocks = ({
|
|
|
2152
2156
|
}
|
|
2153
2157
|
};
|
|
2154
2158
|
|
|
2155
|
-
var styles$
|
|
2159
|
+
var styles$6 = {"root":"Cover-module_root__3pscq","body":"Cover-module_body__eJpUI","image":"Cover-module_image__frrrH","rich":"Cover-module_rich__YcxWa","dark":"Cover-module_dark__cRucL","light":"Cover-module_light__la-sk","control":"Cover-module_control__WP0G3","isInDynamicBlock":"Cover-module_isInDynamicBlock__qO-yt","mobile":"Cover-module_mobile__aotep","desktop":"Cover-module_desktop__dfbC-"};
|
|
2156
2160
|
|
|
2157
2161
|
const Cover = ({
|
|
2158
2162
|
block: {
|
|
@@ -2173,13 +2177,13 @@ const Cover = ({
|
|
|
2173
2177
|
}) => {
|
|
2174
2178
|
const [isPopoverShown, setIsPopoverShown] = useState(false);
|
|
2175
2179
|
const style = {};
|
|
2176
|
-
let classNames = [[styles$
|
|
2180
|
+
let classNames = [[styles$6.root, true], [styles$6[onlyOn], !!onlyOn && !!styles$6[onlyOn]]];
|
|
2177
2181
|
if (styleContext) {
|
|
2178
|
-
classNames = makeStyleContext(classNames, styleContext, styles$
|
|
2182
|
+
classNames = makeStyleContext(classNames, styleContext, styles$6);
|
|
2179
2183
|
}
|
|
2180
2184
|
if (gradients) {
|
|
2181
2185
|
const theme = [gradients.text_rgb === '0,0,0' ? 'dark' : 'light'];
|
|
2182
|
-
classNames = makeStyleContext(classNames, theme, styles$
|
|
2186
|
+
classNames = makeStyleContext(classNames, theme, styles$6);
|
|
2183
2187
|
style.backgroundImage = generateGradient(gradients.bg_rgb, 'mediaBlockBottom');
|
|
2184
2188
|
}
|
|
2185
2189
|
const renderCC = context => /*#__PURE__*/React.createElement(MediaCaption, {
|
|
@@ -2191,21 +2195,21 @@ const Cover = ({
|
|
|
2191
2195
|
"data-testid": "cover",
|
|
2192
2196
|
className: makeClassName(classNames)
|
|
2193
2197
|
}, /*#__PURE__*/React.createElement("div", {
|
|
2194
|
-
className: styles$
|
|
2198
|
+
className: styles$6.image
|
|
2195
2199
|
}, /*#__PURE__*/React.createElement(Image, {
|
|
2196
2200
|
optimized: urls,
|
|
2197
2201
|
ratio: mobileRatio,
|
|
2198
2202
|
display: "narrow",
|
|
2199
2203
|
lazy: true
|
|
2200
2204
|
})), /*#__PURE__*/React.createElement("div", {
|
|
2201
|
-
className: styles$
|
|
2205
|
+
className: styles$6.body,
|
|
2202
2206
|
style: style
|
|
2203
2207
|
}, blocks.map(item => /*#__PURE__*/React.createElement(RenderBlocks, {
|
|
2204
2208
|
key: item.id,
|
|
2205
2209
|
block: item,
|
|
2206
2210
|
styleContext: styleContext
|
|
2207
2211
|
}))), cc === 'button' && /*#__PURE__*/React.createElement("button", {
|
|
2208
|
-
className: styles$
|
|
2212
|
+
className: styles$6.control,
|
|
2209
2213
|
type: "button",
|
|
2210
2214
|
"aria-label": "Open",
|
|
2211
2215
|
onClick: () => {
|
|
@@ -2218,7 +2222,7 @@ const Cover = ({
|
|
|
2218
2222
|
}, renderCC('isInPopover')));
|
|
2219
2223
|
};
|
|
2220
2224
|
|
|
2221
|
-
var styles$
|
|
2225
|
+
var styles$5 = {"root":"HalfBlock-module_root__EXQbz","main":"HalfBlock-module_main__eIcRo","body":"HalfBlock-module_body__HPhGj","footer":"HalfBlock-module_footer__TFfCQ","image":"HalfBlock-module_image__XWLbK","mobile":"HalfBlock-module_mobile__uGGpm","desktop":"HalfBlock-module_desktop__p-hAq"};
|
|
2222
2226
|
|
|
2223
2227
|
const HalfBlock = ({
|
|
2224
2228
|
block: {
|
|
@@ -2235,29 +2239,29 @@ const HalfBlock = ({
|
|
|
2235
2239
|
},
|
|
2236
2240
|
styleContext
|
|
2237
2241
|
}) => {
|
|
2238
|
-
let classNames = [[styles$
|
|
2242
|
+
let classNames = [[styles$5.root, true], [styles$5[onlyOn], true]];
|
|
2239
2243
|
if (styleContext) {
|
|
2240
|
-
classNames = makeStyleContext(classNames, styleContext, styles$
|
|
2244
|
+
classNames = makeStyleContext(classNames, styleContext, styles$5);
|
|
2241
2245
|
}
|
|
2242
2246
|
return /*#__PURE__*/React.createElement("div", {
|
|
2243
2247
|
"data-testid": "half-block",
|
|
2244
2248
|
className: makeClassName(classNames)
|
|
2245
2249
|
}, /*#__PURE__*/React.createElement("div", {
|
|
2246
|
-
className: styles$
|
|
2250
|
+
className: styles$5.main
|
|
2247
2251
|
}, /*#__PURE__*/React.createElement("div", {
|
|
2248
|
-
className: styles$
|
|
2252
|
+
className: styles$5.image
|
|
2249
2253
|
}, /*#__PURE__*/React.createElement(Image, {
|
|
2250
2254
|
optimized: optimized,
|
|
2251
2255
|
ratio: ratio,
|
|
2252
2256
|
display: "super_full"
|
|
2253
2257
|
})), /*#__PURE__*/React.createElement("div", {
|
|
2254
|
-
className: styles$
|
|
2258
|
+
className: styles$5.body
|
|
2255
2259
|
}, data.blocks.map(item => /*#__PURE__*/React.createElement(RenderBlocks, {
|
|
2256
2260
|
key: item.id,
|
|
2257
2261
|
block: item,
|
|
2258
2262
|
styleContext: ['rich']
|
|
2259
2263
|
})))), /*#__PURE__*/React.createElement("div", {
|
|
2260
|
-
className: styles$
|
|
2264
|
+
className: styles$5.footer
|
|
2261
2265
|
}, /*#__PURE__*/React.createElement(MediaCaption, {
|
|
2262
2266
|
credit: credit,
|
|
2263
2267
|
caption: caption,
|
|
@@ -2265,7 +2269,7 @@ const HalfBlock = ({
|
|
|
2265
2269
|
})));
|
|
2266
2270
|
};
|
|
2267
2271
|
|
|
2268
|
-
var styles$
|
|
2272
|
+
var styles$4 = {"root":"ImportantLead-module_root__-rnt6","slide":"ImportantLead-module_slide__zcovu","mobile":"ImportantLead-module_mobile__msInp","desktop":"ImportantLead-module_desktop__ELC2-"};
|
|
2269
2273
|
|
|
2270
2274
|
const ImportantLead = ({
|
|
2271
2275
|
block: {
|
|
@@ -2274,9 +2278,9 @@ const ImportantLead = ({
|
|
|
2274
2278
|
},
|
|
2275
2279
|
styleContext
|
|
2276
2280
|
}) => {
|
|
2277
|
-
let classNames = [[styles$
|
|
2281
|
+
let classNames = [[styles$4.root, true], [styles$4[onlyOn], !!onlyOn]];
|
|
2278
2282
|
if (styleContext) {
|
|
2279
|
-
classNames = makeStyleContext(classNames, styleContext, styles$
|
|
2283
|
+
classNames = makeStyleContext(classNames, styleContext, styles$4);
|
|
2280
2284
|
}
|
|
2281
2285
|
return /*#__PURE__*/React.createElement("div", {
|
|
2282
2286
|
"data-testid": "important-lead",
|
|
@@ -2288,7 +2292,7 @@ const ImportantLead = ({
|
|
|
2288
2292
|
})));
|
|
2289
2293
|
};
|
|
2290
2294
|
|
|
2291
|
-
var styles$
|
|
2295
|
+
var styles$3 = {"root":"Spoiler-module_root__fAbb9","header":"Spoiler-module_header__iEKsQ","body":"Spoiler-module_body__jjqIn","spoiled":"Spoiler-module_spoiled__ENI93","footer":"Spoiler-module_footer__g21Zn","spoilerSticky":"Spoiler-module_spoilerSticky__YTiyF","spoilerStickyBg":"Spoiler-module_spoilerStickyBg__tmDnG","center":"Spoiler-module_center__0XCWo","full":"Spoiler-module_full__FtKDT","default":"Spoiler-module_default__wvlKw","mobile":"Spoiler-module_mobile__PWCMW","desktop":"Spoiler-module_desktop__qTakd"};
|
|
2292
2296
|
|
|
2293
2297
|
const Spoiler = ({
|
|
2294
2298
|
block: {
|
|
@@ -2317,11 +2321,11 @@ const Spoiler = ({
|
|
|
2317
2321
|
postMessage('', 'openSpoiler', 'click');
|
|
2318
2322
|
}
|
|
2319
2323
|
};
|
|
2320
|
-
let classNames = [[styles$
|
|
2324
|
+
let classNames = [[styles$3.root, true], [styles$3[onlyOn], !!onlyOn], [styles$3[display], !!display && styles$3[display]], [[styles$3.spoiled], !!spoiled]];
|
|
2321
2325
|
const context = ['center'];
|
|
2322
2326
|
if (styleContext) {
|
|
2323
2327
|
context.concat(styleContext);
|
|
2324
|
-
classNames = makeStyleContext(classNames, styleContext, styles$
|
|
2328
|
+
classNames = makeStyleContext(classNames, styleContext, styles$3);
|
|
2325
2329
|
}
|
|
2326
2330
|
const buttonCollapse = button ? button.collapse : 'Свернуть';
|
|
2327
2331
|
const buttonExpande = button ? button.expand : buttonTitle;
|
|
@@ -2330,15 +2334,15 @@ const Spoiler = ({
|
|
|
2330
2334
|
className: makeClassName(classNames),
|
|
2331
2335
|
"data-testid": "spoiler"
|
|
2332
2336
|
}, /*#__PURE__*/React.createElement("div", {
|
|
2333
|
-
className: styles$
|
|
2337
|
+
className: styles$3.header
|
|
2334
2338
|
}, title && /*#__PURE__*/React.createElement("h3", null, title)), /*#__PURE__*/React.createElement("div", {
|
|
2335
|
-
className: styles$
|
|
2339
|
+
className: styles$3.body
|
|
2336
2340
|
}, blocks.map(item => /*#__PURE__*/React.createElement(RenderBlocks, {
|
|
2337
2341
|
key: item.id,
|
|
2338
2342
|
block: item,
|
|
2339
2343
|
styleContext: context
|
|
2340
2344
|
}))), /*#__PURE__*/React.createElement("div", {
|
|
2341
|
-
className: styles$
|
|
2345
|
+
className: styles$3.footer
|
|
2342
2346
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
2343
2347
|
size: "default",
|
|
2344
2348
|
theme: "gray",
|
|
@@ -2349,7 +2353,7 @@ const Spoiler = ({
|
|
|
2349
2353
|
}))));
|
|
2350
2354
|
};
|
|
2351
2355
|
|
|
2352
|
-
var styles$
|
|
2356
|
+
var styles$2 = {"root":"RelatedRichBlock-module_root__-SEe7","wrapper":"RelatedRichBlock-module_wrapper__YkEpr","overlay":"RelatedRichBlock-module_overlay__tWuyR","overlayHeader":"RelatedRichBlock-module_overlayHeader__V3ynX","body":"RelatedRichBlock-module_body__XhS0U","isRich":"RelatedRichBlock-module_isRich__Z2kQ8","hasGradient":"RelatedRichBlock-module_hasGradient__s5Krh","picture":"RelatedRichBlock-module_picture__OmRKx","isCard":"RelatedRichBlock-module_isCard__wkMw-","cover":"RelatedRichBlock-module_cover__3gnIx","tag":"RelatedRichBlock-module_tag__c18sv","center":"RelatedRichBlock-module_center__KANd-","dark":"RelatedRichBlock-module_dark__cnk4R","light":"RelatedRichBlock-module_light__aJLn7","mobile":"RelatedRichBlock-module_mobile__N-G4U","desktop":"RelatedRichBlock-module_desktop__EaPOr"};
|
|
2353
2357
|
|
|
2354
2358
|
/* eslint-disable react/jsx-no-target-blank */
|
|
2355
2359
|
const RelatedRichBlock = ({
|
|
@@ -2386,16 +2390,16 @@ const RelatedRichBlock = ({
|
|
|
2386
2390
|
const handleClick = () => {
|
|
2387
2391
|
postMessage('richRelated', url, 'click');
|
|
2388
2392
|
};
|
|
2389
|
-
let classNames = [[styles$
|
|
2393
|
+
let classNames = [[styles$2.root, true], [styles$2[cardType], !!layout && !!styles$2[cardType]], [styles$2.hasGradient, !!gradients], [styles$2[onlyOn], !!onlyOn && !!styles$2[onlyOn]]];
|
|
2390
2394
|
let context = ['isInMediaBlock'];
|
|
2391
2395
|
if (styleContext) {
|
|
2392
|
-
classNames = makeStyleContext(classNames, styleContext, styles$
|
|
2396
|
+
classNames = makeStyleContext(classNames, styleContext, styles$2);
|
|
2393
2397
|
context = [...styleContext, 'isInMediaBlock'];
|
|
2394
2398
|
}
|
|
2395
2399
|
if (gradients) {
|
|
2396
2400
|
styleHeader.backgroundImage = generateGradient(gradients.bg_rgb, 'mediaBlockTop');
|
|
2397
2401
|
const theme = [gradients.text_rgb === '0,0,0' ? 'dark' : 'light'];
|
|
2398
|
-
classNames = makeStyleContext(classNames, theme, styles$
|
|
2402
|
+
classNames = makeStyleContext(classNames, theme, styles$2);
|
|
2399
2403
|
if (onlyOn === 'desktop') {
|
|
2400
2404
|
style.backgroundImage = generateGradient(gradients.bg_rgb, 'mediaBlockBottom');
|
|
2401
2405
|
}
|
|
@@ -2406,91 +2410,6 @@ const RelatedRichBlock = ({
|
|
|
2406
2410
|
to: `/${url}`,
|
|
2407
2411
|
onClick: () => handleClick(),
|
|
2408
2412
|
ref: ref
|
|
2409
|
-
}, layout === 'rich' && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
2410
|
-
className: styles$3.overlay,
|
|
2411
|
-
style: style
|
|
2412
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
2413
|
-
className: styles$3.overlayHeader,
|
|
2414
|
-
style: styleHeader
|
|
2415
|
-
})), /*#__PURE__*/React.createElement("div", {
|
|
2416
|
-
className: styles$3.tag
|
|
2417
|
-
}, /*#__PURE__*/React.createElement(Tag, {
|
|
2418
|
-
size: "small",
|
|
2419
|
-
theme: "inherit",
|
|
2420
|
-
styleContext: "richRelated"
|
|
2421
|
-
}, tag)), /*#__PURE__*/React.createElement("div", {
|
|
2422
|
-
className: styles$3.cover
|
|
2423
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
2424
|
-
className: styles$3.picture
|
|
2425
|
-
}, /*#__PURE__*/React.createElement(Image, {
|
|
2426
|
-
optimized: urls,
|
|
2427
|
-
ratio: ratio,
|
|
2428
|
-
display: "narrow"
|
|
2429
|
-
}))), /*#__PURE__*/React.createElement("div", {
|
|
2430
|
-
className: styles$3.body
|
|
2431
|
-
}, blocks.map(item => /*#__PURE__*/React.createElement(RenderBlocks, {
|
|
2432
|
-
key: item.id,
|
|
2433
|
-
block: item,
|
|
2434
|
-
styleContext: context
|
|
2435
|
-
}))));
|
|
2436
|
-
};
|
|
2437
|
-
|
|
2438
|
-
var styles$2 = {"root":"ShopRelatedBlock-module_root__eTGjC","wrapper":"ShopRelatedBlock-module_wrapper__v6yE3","overlay":"ShopRelatedBlock-module_overlay__oR67Y","overlayHeader":"ShopRelatedBlock-module_overlayHeader__YMcNw","body":"ShopRelatedBlock-module_body__W4pBN","hasGradient":"ShopRelatedBlock-module_hasGradient__50JTl","picture":"ShopRelatedBlock-module_picture__zjFL4","tag":"ShopRelatedBlock-module_tag__ixkda","center":"ShopRelatedBlock-module_center__IpBP4","title":"ShopRelatedBlock-module_title__COl93","price":"ShopRelatedBlock-module_price__5Qitu","dark":"ShopRelatedBlock-module_dark__d0QiW","light":"ShopRelatedBlock-module_light__lUDWA","mobile":"ShopRelatedBlock-module_mobile__I6Hih","desktop":"ShopRelatedBlock-module_desktop__ywKrb"};
|
|
2439
|
-
|
|
2440
|
-
/* eslint-disable react/jsx-no-target-blank */
|
|
2441
|
-
const ShopRelatedBlock = ({
|
|
2442
|
-
block: {
|
|
2443
|
-
only_on: onlyOn,
|
|
2444
|
-
data: {
|
|
2445
|
-
url,
|
|
2446
|
-
cover: {
|
|
2447
|
-
urls,
|
|
2448
|
-
gradients,
|
|
2449
|
-
tag,
|
|
2450
|
-
layout,
|
|
2451
|
-
ratio,
|
|
2452
|
-
first_title: firstTitle,
|
|
2453
|
-
second_title: secondTitle
|
|
2454
|
-
}
|
|
2455
|
-
}
|
|
2456
|
-
},
|
|
2457
|
-
styleContext
|
|
2458
|
-
}) => {
|
|
2459
|
-
const style = {};
|
|
2460
|
-
const styleHeader = {};
|
|
2461
|
-
const [ref, inView] = useInView({
|
|
2462
|
-
threshold: 0,
|
|
2463
|
-
triggerOnce: true
|
|
2464
|
-
});
|
|
2465
|
-
useEffect(() => {
|
|
2466
|
-
if (inView) {
|
|
2467
|
-
if (onlyOn === 'mobile' && window.innerWidth <= 511 || onlyOn === 'desktop' && window.innerWidth >= 512 || !onlyOn) {
|
|
2468
|
-
postMessage('productRelated', url, 'view');
|
|
2469
|
-
}
|
|
2470
|
-
}
|
|
2471
|
-
}, [inView]);
|
|
2472
|
-
const handleClick = () => {
|
|
2473
|
-
postMessage('productRelated', url, 'click');
|
|
2474
|
-
};
|
|
2475
|
-
let classNames = [[styles$2.root, true], [styles$2.hasGradient, !!gradients], [styles$2[onlyOn], !!onlyOn && !!styles$2[onlyOn]]];
|
|
2476
|
-
if (styleContext) {
|
|
2477
|
-
classNames = makeStyleContext(classNames, styleContext, styles$2);
|
|
2478
|
-
}
|
|
2479
|
-
if (gradients) {
|
|
2480
|
-
styleHeader.backgroundImage = generateGradient(gradients.bg_rgb, 'mediaBlockTop');
|
|
2481
|
-
const theme = [gradients.text_rgb === '0,0,0' ? 'dark' : 'light'];
|
|
2482
|
-
classNames = makeStyleContext(classNames, theme, styles$2);
|
|
2483
|
-
if (onlyOn === 'desktop') {
|
|
2484
|
-
style.backgroundImage = generateGradient(gradients.bg_rgb, 'mediaBlockBottom');
|
|
2485
|
-
}
|
|
2486
|
-
}
|
|
2487
|
-
return /*#__PURE__*/React.createElement("a", {
|
|
2488
|
-
"data-testid": "related-rich-block",
|
|
2489
|
-
className: makeClassName(classNames),
|
|
2490
|
-
href: url,
|
|
2491
|
-
target: "_blank",
|
|
2492
|
-
onClick: () => handleClick(),
|
|
2493
|
-
ref: ref
|
|
2494
2413
|
}, layout === 'rich' && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
2495
2414
|
className: styles$2.overlay,
|
|
2496
2415
|
style: style
|
|
@@ -2513,11 +2432,11 @@ const ShopRelatedBlock = ({
|
|
|
2513
2432
|
display: "narrow"
|
|
2514
2433
|
}))), /*#__PURE__*/React.createElement("div", {
|
|
2515
2434
|
className: styles$2.body
|
|
2516
|
-
}, /*#__PURE__*/React.createElement(
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
}
|
|
2435
|
+
}, blocks.map(item => /*#__PURE__*/React.createElement(RenderBlocks, {
|
|
2436
|
+
key: item.id,
|
|
2437
|
+
block: item,
|
|
2438
|
+
styleContext: context
|
|
2439
|
+
}))));
|
|
2521
2440
|
};
|
|
2522
2441
|
|
|
2523
2442
|
const RawHtmlBlock = ({
|
|
@@ -2571,13 +2490,6 @@ const RawHtmlBlock = ({
|
|
|
2571
2490
|
styleContext: styleContext
|
|
2572
2491
|
});
|
|
2573
2492
|
}
|
|
2574
|
-
case 'related_shop':
|
|
2575
|
-
{
|
|
2576
|
-
return /*#__PURE__*/React.createElement(ShopRelatedBlock, {
|
|
2577
|
-
block: block,
|
|
2578
|
-
styleContext: styleContext
|
|
2579
|
-
});
|
|
2580
|
-
}
|
|
2581
2493
|
default:
|
|
2582
2494
|
{
|
|
2583
2495
|
return /*#__PURE__*/React.createElement(BlockProvider, {
|
|
@@ -2649,5 +2561,5 @@ const TooltipFooter = ({
|
|
|
2649
2561
|
}, children);
|
|
2650
2562
|
};
|
|
2651
2563
|
|
|
2652
|
-
export { AnnouncementInText, BookmarkButton, Button, ButtonLoader, CardTitle, ChapterBlock, Cover, DocumentItemsCount, DonatesTeaser, DotsOnImage, Dropdown, EmbedBlockContainer, Footnote, GroupedBlock, HalfBlock, Image, ImportantLead, Lazy, ListBlock, MaterialNote, MaterialTitle, MediaCaption, Menu, Meta, MetaItem, MetaItemLive, Popover, Primary, QuoteBlock, RawHtmlBlock, RelatedBlock, RelatedRichBlock, RenderBlocks, RichTitle, Secondary, SensitiveBlock,
|
|
2564
|
+
export { AnnouncementInText, BookmarkButton, Button, ButtonLoader, CardTitle, ChapterBlock, Cover, DocumentItemsCount, DonatesTeaser, DotsOnImage, Dropdown, EmbedBlockContainer, Footnote, GroupedBlock, HalfBlock, Image, ImportantLead, Lazy, ListBlock, MaterialNote, MaterialTitle, MediaCaption, Menu, Meta, MetaItem, MetaItemLive, Popover, Primary, QuoteBlock, RawHtmlBlock, RelatedBlock, RelatedRichBlock, RenderBlocks, RichTitle, Secondary, SensitiveBlock, SimpleBlock, SimpleTitle, SourceBlock, Spoiler, SvgSymbol, Switcher, Table, Tag, Timestamp, Toolbar, ToolbarButton, ToolbarItem, Tooltip, TooltipFooter };
|
|
2653
2565
|
//# sourceMappingURL=ui-kit-2.esm.js.map
|