@meduza/ui-kit-2 1.3.1 → 1.4.0
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/RelatedCarousel/RelatedCarousel.types.d.ts +5 -0
- package/dist/RelatedCarousel/index.d.ts +3 -0
- package/dist/index.d.ts +1 -0
- package/dist/ui-kit-2.cjs.development.js +346 -241
- 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 +346 -242
- package/dist/ui-kit-2.esm.js.map +1 -1
- package/dist/ui-kit-game.css +91 -0
- package/dist/ui-kit.css +91 -0
- package/package.json +1 -1
- package/src/Lazy/index.tsx +7 -20
- package/src/RelatedCarousel/RelatedCarousel.module.css +90 -0
- package/src/RelatedCarousel/RelatedCarousel.stories.module.css +53 -0
- package/src/RelatedCarousel/RelatedCarousel.stories.tsx +48 -0
- package/src/RelatedCarousel/RelatedCarousel.test.tsx +27 -0
- package/src/RelatedCarousel/RelatedCarousel.types.ts +6 -0
- package/src/RelatedCarousel/index.tsx +167 -0
- package/src/RelatedCarousel/mock.json +17 -0
- package/src/index.tsx +1 -0
|
@@ -34,7 +34,7 @@ const ButtonLoader = () => (/*#__PURE__*/React.createElement("svg", {
|
|
|
34
34
|
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"
|
|
35
35
|
}))));
|
|
36
36
|
|
|
37
|
-
var styles$
|
|
37
|
+
var styles$J = {"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-","isInToolbar":"Button-module_isInToolbar__84SG-","isInPodcast":"Button-module_isInPodcast__SNSpl","isInSpoiler":"Button-module_isInSpoiler__pGp-w","isInChronology":"Button-module_isInChronology__T-znS","ghost":"Button-module_ghost__1s5-r","isInDropdown":"Button-module_isInDropdown__gN7TI","loader":"Button-module_loader__r0Mjs","isFancy":"Button-module_isFancy__gTRmu"};
|
|
38
38
|
|
|
39
39
|
const Button = ({
|
|
40
40
|
theme = 'gold',
|
|
@@ -54,12 +54,12 @@ const Button = ({
|
|
|
54
54
|
};
|
|
55
55
|
return /*#__PURE__*/React.createElement("button", {
|
|
56
56
|
"data-testid": "button",
|
|
57
|
-
className: makeClassName([[styles$
|
|
57
|
+
className: makeClassName([[styles$J.root, true], [styles$J[size], !!size], [styles$J[theme], !!theme], [styles$J[appearance], !!appearance], [styles$J[state], !!state && !!styles$J[state]], [styles$J[styleContext], !!styleContext]]),
|
|
58
58
|
disabled: disabled,
|
|
59
59
|
onClick: handleClick,
|
|
60
60
|
type: "button"
|
|
61
61
|
}, state === 'isLoading' ? (/*#__PURE__*/React.createElement("span", {
|
|
62
|
-
className: styles$
|
|
62
|
+
className: styles$J.loader
|
|
63
63
|
}, /*#__PURE__*/React.createElement(ButtonLoader, null))) : children);
|
|
64
64
|
};
|
|
65
65
|
|
|
@@ -253,7 +253,7 @@ const icons = {
|
|
|
253
253
|
}
|
|
254
254
|
};
|
|
255
255
|
|
|
256
|
-
var styles$
|
|
256
|
+
var styles$I = {"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","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","speedHalf":"SvgSymbol-module_speedHalf__mvVYC","speedThreeQuarters":"SvgSymbol-module_speedThreeQuarters__9N7uH","speedOne":"SvgSymbol-module_speedOne__sRNph","speedOneQuarter":"SvgSymbol-module_speedOneQuarter__fKIT7","speedOneHalf":"SvgSymbol-module_speedOneHalf__7yXsa","speedTwo":"SvgSymbol-module_speedTwo__Bv8-b","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-","receipt":"SvgSymbol-module_receipt__o3V8u","isInHeader":"SvgSymbol-module_isInHeader__M5Tzw"};
|
|
257
257
|
|
|
258
258
|
const SvgSymbol = ({
|
|
259
259
|
icon,
|
|
@@ -265,7 +265,7 @@ const SvgSymbol = ({
|
|
|
265
265
|
"data-testid": "svg-symbol",
|
|
266
266
|
xmlns: "http://www.w3.org/2000/svg",
|
|
267
267
|
xmlnsXlink: "http://www.w3.org/1999/xlink",
|
|
268
|
-
className: makeClassName([[styles$
|
|
268
|
+
className: makeClassName([[styles$I.root, true], [styles$I[size], !!styles$I[size]], [styles$I[icon], !!styles$I[icon]], [styles$I[styleContext], !!styles$I[styleContext]]]),
|
|
269
269
|
width: data.width,
|
|
270
270
|
height: data.height,
|
|
271
271
|
viewBox: `0 0 ${data.width} ${data.height}`,
|
|
@@ -275,7 +275,7 @@ const SvgSymbol = ({
|
|
|
275
275
|
});
|
|
276
276
|
};
|
|
277
277
|
|
|
278
|
-
var styles$
|
|
278
|
+
var styles$H = {"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","isInMenu":"Switcher-module_isInMenu__RQVhp","isInLive":"Switcher-module_isInLive__ZyMCT","children":"Switcher-module_children__uLapU"};
|
|
279
279
|
|
|
280
280
|
const Switcher = ({
|
|
281
281
|
enabled,
|
|
@@ -286,20 +286,20 @@ const Switcher = ({
|
|
|
286
286
|
childrenRight
|
|
287
287
|
}) => (/*#__PURE__*/React.createElement("label", {
|
|
288
288
|
"data-testid": "switcher",
|
|
289
|
-
className: makeClassName([[styles$
|
|
289
|
+
className: makeClassName([[styles$H.root, true], [styles$H[theme], !!styles$H[theme]], [styles$H[styleContext], !!styles$H[styleContext]]])
|
|
290
290
|
}, childrenLeft && (/*#__PURE__*/React.createElement("div", {
|
|
291
|
-
className: makeClassName([[styles$
|
|
291
|
+
className: makeClassName([[styles$H.children, true], [styles$H.left, true]])
|
|
292
292
|
}, childrenLeft)), /*#__PURE__*/React.createElement("input", {
|
|
293
|
-
className: styles$
|
|
293
|
+
className: styles$H.input,
|
|
294
294
|
type: "checkbox",
|
|
295
295
|
checked: enabled,
|
|
296
296
|
onChange: onChange
|
|
297
297
|
}), /*#__PURE__*/React.createElement("span", {
|
|
298
|
-
className: styles$
|
|
298
|
+
className: styles$H.control
|
|
299
299
|
}, /*#__PURE__*/React.createElement("span", {
|
|
300
|
-
className: styles$
|
|
300
|
+
className: styles$H.knob
|
|
301
301
|
})), childrenRight && (/*#__PURE__*/React.createElement("div", {
|
|
302
|
-
className: makeClassName([[styles$
|
|
302
|
+
className: makeClassName([[styles$H.children, true], [styles$H.right, true]])
|
|
303
303
|
}, childrenRight))));
|
|
304
304
|
|
|
305
305
|
const makeStyleContext = (classNames, styleContext, styles) => {
|
|
@@ -325,31 +325,21 @@ const postMessage = (category, element, action) => {
|
|
|
325
325
|
}
|
|
326
326
|
};
|
|
327
327
|
|
|
328
|
-
var styles$
|
|
328
|
+
var styles$G = {"root":"Lazy-module_root__DWw8D"};
|
|
329
329
|
|
|
330
330
|
const Lazy = ({
|
|
331
331
|
children,
|
|
332
|
-
threshold
|
|
332
|
+
threshold = 0
|
|
333
333
|
}) => {
|
|
334
|
-
const [ref, inView
|
|
335
|
-
threshold: threshold
|
|
334
|
+
const [ref, inView] = reactIntersectionObserver.useInView({
|
|
335
|
+
threshold: threshold,
|
|
336
|
+
triggerOnce: true
|
|
336
337
|
});
|
|
337
|
-
const [visible, setVisible] = React.useState(false);
|
|
338
|
-
React.useEffect(() => {
|
|
339
|
-
if (entry && entry.boundingClientRect && entry.boundingClientRect.y < 0) {
|
|
340
|
-
setVisible(true);
|
|
341
|
-
}
|
|
342
|
-
}, [entry]);
|
|
343
|
-
React.useEffect(() => {
|
|
344
|
-
if (inView) {
|
|
345
|
-
setVisible(true);
|
|
346
|
-
}
|
|
347
|
-
}, [inView]);
|
|
348
338
|
return /*#__PURE__*/React.createElement("div", {
|
|
349
|
-
className: makeClassName([[styles$
|
|
339
|
+
className: makeClassName([[styles$G.root, true], [styles$G.visible, inView]]),
|
|
350
340
|
ref: ref,
|
|
351
341
|
"data-testid": "lazy"
|
|
352
|
-
},
|
|
342
|
+
}, inView && children);
|
|
353
343
|
};
|
|
354
344
|
|
|
355
345
|
const MediaQuerySizes = {
|
|
@@ -437,7 +427,7 @@ const RenderPicture = ({
|
|
|
437
427
|
}));
|
|
438
428
|
};
|
|
439
429
|
|
|
440
|
-
var styles$
|
|
430
|
+
var styles$F = {"root":"Image-module_root__H5wAh","fullRatio":"Image-module_fullRatio__q7QPa","isStatic":"Image-module_isStatic__TmQ1V","isLoaded":"Image-module_isLoaded__keFnD","wrapper":"Image-module_wrapper__gJtbB","fullscreen":"Image-module_fullscreen__4PU9c","dark":"Image-module_dark__qjo5O"};
|
|
441
431
|
|
|
442
432
|
const Image = ({
|
|
443
433
|
alt,
|
|
@@ -471,9 +461,9 @@ const Image = ({
|
|
|
471
461
|
};
|
|
472
462
|
/* fallback w325 url until w6 was released */
|
|
473
463
|
const fallbackSource = source && source[0] || optimized.w325 && optimized.w325['1x'] || optimized.original;
|
|
474
|
-
let classNames = [[styles$
|
|
464
|
+
let classNames = [[styles$F.root, true], [styles$F.isLoaded, isLoaded], [styles$F.fullscreen, isFullscreenEnabled], [styles$F.fullRatio, ratio === null]];
|
|
475
465
|
if (styleContext) {
|
|
476
|
-
classNames = makeStyleContext(classNames, styleContext, styles$
|
|
466
|
+
classNames = makeStyleContext(classNames, styleContext, styles$F);
|
|
477
467
|
}
|
|
478
468
|
const wrapperProps = isFullscreenEnabled ? {
|
|
479
469
|
onClick: handleClick,
|
|
@@ -486,7 +476,7 @@ const Image = ({
|
|
|
486
476
|
style: blockStyles,
|
|
487
477
|
"data-testid": "image"
|
|
488
478
|
}, /*#__PURE__*/React.createElement("div", {
|
|
489
|
-
className: styles$
|
|
479
|
+
className: styles$F.wrapper,
|
|
490
480
|
style: pictureStyles,
|
|
491
481
|
...wrapperProps
|
|
492
482
|
}, lazy ? (/*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Lazy, {
|
|
@@ -511,7 +501,7 @@ const Image = ({
|
|
|
511
501
|
}))));
|
|
512
502
|
};
|
|
513
503
|
|
|
514
|
-
var styles$
|
|
504
|
+
var styles$E = {"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"};
|
|
515
505
|
|
|
516
506
|
const Popover = ({
|
|
517
507
|
children,
|
|
@@ -543,20 +533,20 @@ const Popover = ({
|
|
|
543
533
|
/* eslint-disable jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions */
|
|
544
534
|
return /*#__PURE__*/React.createElement("div", {
|
|
545
535
|
"data-testid": "popover",
|
|
546
|
-
className: makeClassName([[styles$
|
|
536
|
+
className: makeClassName([[styles$E.root, true], [styles$E.visible, visible]])
|
|
547
537
|
}, /*#__PURE__*/React.createElement("div", {
|
|
548
|
-
className: styles$
|
|
538
|
+
className: styles$E.overlay,
|
|
549
539
|
onClick: () => handleClose()
|
|
550
540
|
}), /*#__PURE__*/React.createElement("div", {
|
|
551
|
-
className: styles$
|
|
541
|
+
className: styles$E.container
|
|
552
542
|
}, /*#__PURE__*/React.createElement("button", {
|
|
553
543
|
type: "button",
|
|
554
|
-
className: styles$
|
|
544
|
+
className: styles$E.dismiss,
|
|
555
545
|
onClick: () => handleClose(),
|
|
556
546
|
"aria-label": "dismiss"
|
|
557
547
|
}), /*#__PURE__*/React.createElement("svg", {
|
|
558
548
|
width: "100%",
|
|
559
|
-
className: styles$
|
|
549
|
+
className: styles$E.background
|
|
560
550
|
}, /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("mask", {
|
|
561
551
|
id: "myMask",
|
|
562
552
|
x: "0",
|
|
@@ -585,11 +575,11 @@ const Popover = ({
|
|
|
585
575
|
width: "100%",
|
|
586
576
|
height: "100%"
|
|
587
577
|
})), /*#__PURE__*/React.createElement("div", {
|
|
588
|
-
className: styles$
|
|
578
|
+
className: styles$E.body
|
|
589
579
|
}, children)));
|
|
590
580
|
};
|
|
591
581
|
|
|
592
|
-
var styles$
|
|
582
|
+
var styles$D = {"root":"Footnote-module_root__W5D8G","body":"Footnote-module_body__C-ZC-","dismiss":"Footnote-module_dismiss__Q2hAX"};
|
|
593
583
|
|
|
594
584
|
const Footnote = ({
|
|
595
585
|
children,
|
|
@@ -597,16 +587,16 @@ const Footnote = ({
|
|
|
597
587
|
}) => {
|
|
598
588
|
return /*#__PURE__*/React.createElement("div", {
|
|
599
589
|
"data-testid": "footnote",
|
|
600
|
-
className: makeClassName([[styles$
|
|
590
|
+
className: makeClassName([[styles$D.root, true]])
|
|
601
591
|
}, /*#__PURE__*/React.createElement("button", {
|
|
602
|
-
className: styles$
|
|
592
|
+
className: styles$D.dismiss,
|
|
603
593
|
type: "button",
|
|
604
594
|
onClick: () => onClose()
|
|
605
595
|
}, /*#__PURE__*/React.createElement(SvgSymbol, {
|
|
606
596
|
icon: "cross",
|
|
607
597
|
size: "unset"
|
|
608
598
|
})), /*#__PURE__*/React.createElement("div", {
|
|
609
|
-
className: styles$
|
|
599
|
+
className: styles$D.body
|
|
610
600
|
}, children));
|
|
611
601
|
};
|
|
612
602
|
|
|
@@ -615,7 +605,7 @@ var viewportSize = () => ({
|
|
|
615
605
|
height: window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight
|
|
616
606
|
});
|
|
617
607
|
|
|
618
|
-
var styles$
|
|
608
|
+
var styles$C = {"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"};
|
|
619
609
|
|
|
620
610
|
const DotsOnImage = ({
|
|
621
611
|
block: {
|
|
@@ -697,7 +687,7 @@ const DotsOnImage = ({
|
|
|
697
687
|
});
|
|
698
688
|
};
|
|
699
689
|
return /*#__PURE__*/React.createElement("div", {
|
|
700
|
-
className: makeClassName([[styles$
|
|
690
|
+
className: makeClassName([[styles$C.root, true], [styles$C.isVisible, visible]]),
|
|
701
691
|
"data-testid": "dots-on-image",
|
|
702
692
|
ref: ref
|
|
703
693
|
}, /*#__PURE__*/React.createElement(Image, {
|
|
@@ -710,7 +700,7 @@ const DotsOnImage = ({
|
|
|
710
700
|
}), /*#__PURE__*/React.createElement("div", {
|
|
711
701
|
ref: container
|
|
712
702
|
}, dots.map(dot => (/*#__PURE__*/React.createElement("div", {
|
|
713
|
-
className: styles$
|
|
703
|
+
className: styles$C.dot,
|
|
714
704
|
key: dot.id,
|
|
715
705
|
style: {
|
|
716
706
|
top: `${dot.position.y}%`,
|
|
@@ -718,7 +708,7 @@ const DotsOnImage = ({
|
|
|
718
708
|
transform: `scale(${ratio}) translate(-${50 / ratio}%, -${50 / ratio}%)`
|
|
719
709
|
}
|
|
720
710
|
}, /*#__PURE__*/React.createElement("button", {
|
|
721
|
-
className: makeClassName([[styles$
|
|
711
|
+
className: makeClassName([[styles$C.marker, true], [styles$C.isActive, dot.id === popover.id]]),
|
|
722
712
|
type: "button",
|
|
723
713
|
style: {
|
|
724
714
|
backgroundColor: dot.icon.color
|
|
@@ -729,7 +719,7 @@ const DotsOnImage = ({
|
|
|
729
719
|
__html: dot.icon.svg_string
|
|
730
720
|
}
|
|
731
721
|
})), dot.icon.type === 'number' && dot.icon.number)))), popover.show && (/*#__PURE__*/React.createElement(React.Fragment, null, viewportSize().width >= MediaQuerySizes.LANDSCAPE_TABLET ? (/*#__PURE__*/React.createElement("div", {
|
|
732
|
-
className: makeClassName([[styles$
|
|
722
|
+
className: makeClassName([[styles$C.popover, true], [styles$C[popover.side], !!popover.side], [styles$C[popover.align], !!popover.align]]),
|
|
733
723
|
style: popover.style
|
|
734
724
|
}, /*#__PURE__*/React.createElement(Footnote, {
|
|
735
725
|
onClose: () => {
|
|
@@ -754,7 +744,7 @@ const DotsOnImage = ({
|
|
|
754
744
|
})))))));
|
|
755
745
|
};
|
|
756
746
|
|
|
757
|
-
var styles$
|
|
747
|
+
var styles$B = {"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-","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","isInBookRelated":"Tag-module_isInBookRelated__ikTaj","isInBlockMetaContainer":"Tag-module_isInBlockMetaContainer__bAmLh","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","isInPodcastPlayer":"Tag-module_isInPodcastPlayer__H4sK9","mobile":"Tag-module_mobile__19oMH","desktop":"Tag-module_desktop__cNyQs"};
|
|
758
748
|
|
|
759
749
|
const Tag = ({
|
|
760
750
|
children,
|
|
@@ -764,9 +754,9 @@ const Tag = ({
|
|
|
764
754
|
correlation,
|
|
765
755
|
onlyOn
|
|
766
756
|
}) => {
|
|
767
|
-
let classNames = [[styles$
|
|
757
|
+
let classNames = [[styles$B.root, true], [styles$B[size], !!size && !!styles$B[size]], [styles$B[theme], !!theme && !!styles$B[theme]], [styles$B[onlyOn], !!onlyOn && !!styles$B[onlyOn]], [styles$B[correlation], !!correlation && !!styles$B[correlation]]];
|
|
768
758
|
if (styleContext) {
|
|
769
|
-
classNames = makeStyleContext(classNames, styleContext, styles$
|
|
759
|
+
classNames = makeStyleContext(classNames, styleContext, styles$B);
|
|
770
760
|
}
|
|
771
761
|
return /*#__PURE__*/React.createElement("div", {
|
|
772
762
|
"data-testid": "tag",
|
|
@@ -774,34 +764,34 @@ const Tag = ({
|
|
|
774
764
|
}, children);
|
|
775
765
|
};
|
|
776
766
|
|
|
777
|
-
var styles$
|
|
767
|
+
var styles$A = {"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"};
|
|
778
768
|
|
|
779
769
|
const MediaCaption = ({
|
|
780
770
|
credit,
|
|
781
771
|
caption,
|
|
782
772
|
styleContext
|
|
783
773
|
}) => {
|
|
784
|
-
let classNames = [[styles$
|
|
774
|
+
let classNames = [[styles$A.root, true]];
|
|
785
775
|
if (styleContext) {
|
|
786
|
-
classNames = makeStyleContext(classNames, styleContext, styles$
|
|
776
|
+
classNames = makeStyleContext(classNames, styleContext, styles$A);
|
|
787
777
|
}
|
|
788
778
|
return /*#__PURE__*/React.createElement("div", {
|
|
789
779
|
"data-testid": "media-caption",
|
|
790
780
|
className: makeClassName(classNames)
|
|
791
781
|
}, caption && (/*#__PURE__*/React.createElement("div", {
|
|
792
|
-
className: styles$
|
|
782
|
+
className: styles$A.caption,
|
|
793
783
|
dangerouslySetInnerHTML: {
|
|
794
784
|
__html: caption
|
|
795
785
|
}
|
|
796
786
|
})), credit && (/*#__PURE__*/React.createElement("div", {
|
|
797
|
-
className: styles$
|
|
787
|
+
className: styles$A.credit,
|
|
798
788
|
dangerouslySetInnerHTML: {
|
|
799
789
|
__html: credit
|
|
800
790
|
}
|
|
801
791
|
})));
|
|
802
792
|
};
|
|
803
793
|
|
|
804
|
-
var styles$
|
|
794
|
+
var styles$z = {"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"};
|
|
805
795
|
|
|
806
796
|
const Table = ({
|
|
807
797
|
styleContext,
|
|
@@ -823,26 +813,26 @@ const Table = ({
|
|
|
823
813
|
'#e7f2ef': 'green',
|
|
824
814
|
'#f4f0f8': 'violet'
|
|
825
815
|
};
|
|
826
|
-
let classNames = [[styles$
|
|
816
|
+
let classNames = [[styles$z.root, true], [styles$z[display], !!display && !!styles$z[display]]];
|
|
827
817
|
if (styleContext) {
|
|
828
|
-
classNames = makeStyleContext(classNames, styleContext, styles$
|
|
818
|
+
classNames = makeStyleContext(classNames, styleContext, styles$z);
|
|
829
819
|
}
|
|
830
820
|
return /*#__PURE__*/React.createElement("div", {
|
|
831
821
|
"data-testid": "table",
|
|
832
822
|
className: makeClassName(classNames)
|
|
833
823
|
}, /*#__PURE__*/React.createElement("div", {
|
|
834
|
-
className: styles$
|
|
824
|
+
className: styles$z.wrapper
|
|
835
825
|
}, /*#__PURE__*/React.createElement("div", {
|
|
836
|
-
className: styles$
|
|
826
|
+
className: styles$z.table
|
|
837
827
|
}, /*#__PURE__*/React.createElement("div", {
|
|
838
|
-
className: styles$
|
|
828
|
+
className: styles$z.tracks
|
|
839
829
|
}, rows.map((row, i) => {
|
|
840
830
|
return /*#__PURE__*/React.createElement("div", {
|
|
841
831
|
key: row.key,
|
|
842
|
-
className: styles$
|
|
832
|
+
className: styles$z.row
|
|
843
833
|
}, row.cells.map((cell, j) => (/*#__PURE__*/React.createElement("div", {
|
|
844
834
|
key: cell.key,
|
|
845
|
-
className: makeClassName([[styles$
|
|
835
|
+
className: makeClassName([[styles$z.cell, true], [styles$z.header, options.header && i === 0], [styles$z[colors[cell.color]], true], [styles$z[columnsWidth[j]], true], [styles$z.fixedColumn, options.fixed_first_column && j === 0]]),
|
|
846
836
|
dangerouslySetInnerHTML: {
|
|
847
837
|
__html: cell.val
|
|
848
838
|
}
|
|
@@ -853,7 +843,7 @@ const Table = ({
|
|
|
853
843
|
})));
|
|
854
844
|
};
|
|
855
845
|
|
|
856
|
-
var styles$
|
|
846
|
+
var styles$y = {"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"};
|
|
857
847
|
|
|
858
848
|
const MaterialNote = ({
|
|
859
849
|
block: {
|
|
@@ -861,15 +851,15 @@ const MaterialNote = ({
|
|
|
861
851
|
},
|
|
862
852
|
styleContext
|
|
863
853
|
}) => {
|
|
864
|
-
let classNames = [[styles$
|
|
854
|
+
let classNames = [[styles$y.root, true]];
|
|
865
855
|
if (styleContext) {
|
|
866
|
-
classNames = makeStyleContext(classNames, styleContext, styles$
|
|
856
|
+
classNames = makeStyleContext(classNames, styleContext, styles$y);
|
|
867
857
|
}
|
|
868
858
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
869
859
|
"data-testid": "material-note",
|
|
870
860
|
className: makeClassName(classNames)
|
|
871
861
|
}, data && data.map(item => (/*#__PURE__*/React.createElement("p", {
|
|
872
|
-
className: styles$
|
|
862
|
+
className: styles$y[item.type],
|
|
873
863
|
key: item.id,
|
|
874
864
|
dangerouslySetInnerHTML: {
|
|
875
865
|
__html: item.data
|
|
@@ -877,39 +867,39 @@ const MaterialNote = ({
|
|
|
877
867
|
})))));
|
|
878
868
|
};
|
|
879
869
|
|
|
880
|
-
var styles$
|
|
870
|
+
var styles$x = {"root":"MaterialTitle-module_root__VSphO","primary":"MaterialTitle-module_primary__XGnpb","secondary":"MaterialTitle-module_secondary__7IDEp"};
|
|
881
871
|
|
|
882
872
|
const Primary = ({
|
|
883
873
|
children
|
|
884
874
|
}) => {
|
|
885
875
|
return /*#__PURE__*/React.createElement("span", {
|
|
886
|
-
className: styles$
|
|
876
|
+
className: styles$x.primary
|
|
887
877
|
}, children);
|
|
888
878
|
};
|
|
889
879
|
const Secondary = ({
|
|
890
880
|
children
|
|
891
881
|
}) => {
|
|
892
882
|
return /*#__PURE__*/React.createElement("span", {
|
|
893
|
-
className: styles$
|
|
883
|
+
className: styles$x.secondary
|
|
894
884
|
}, children);
|
|
895
885
|
};
|
|
896
886
|
const MaterialTitle = ({
|
|
897
887
|
children
|
|
898
888
|
}) => {
|
|
899
889
|
return /*#__PURE__*/React.createElement("h1", {
|
|
900
|
-
className: styles$
|
|
890
|
+
className: styles$x.root,
|
|
901
891
|
"data-testid": "material-title"
|
|
902
892
|
}, children);
|
|
903
893
|
};
|
|
904
894
|
|
|
905
|
-
var styles$
|
|
895
|
+
var styles$w = {"root":"Dropdown-module_root__Wv7S-","menu":"Dropdown-module_menu__11IQL","inactive":"Dropdown-module_inactive__E5CP6","isInAudioPanel":"Dropdown-module_isInAudioPanel__UniSV"};
|
|
906
896
|
|
|
907
897
|
const Menu = ({
|
|
908
898
|
children
|
|
909
899
|
}) => {
|
|
910
900
|
return /*#__PURE__*/React.createElement("div", {
|
|
911
901
|
"data-testid": "dropdown",
|
|
912
|
-
className: styles$
|
|
902
|
+
className: styles$w.menu
|
|
913
903
|
}, children);
|
|
914
904
|
};
|
|
915
905
|
const Dropdown = ({
|
|
@@ -917,9 +907,9 @@ const Dropdown = ({
|
|
|
917
907
|
active,
|
|
918
908
|
styleContext
|
|
919
909
|
}) => {
|
|
920
|
-
let classNames = [[styles$
|
|
910
|
+
let classNames = [[styles$w.root, true], [styles$w.inactive, !active && styleContext === 'isPodcastSeason' && !!styles$w.inactive]];
|
|
921
911
|
if (styleContext) {
|
|
922
|
-
classNames = makeStyleContext(classNames, styleContext, styles$
|
|
912
|
+
classNames = makeStyleContext(classNames, styleContext, styles$w);
|
|
923
913
|
}
|
|
924
914
|
return /*#__PURE__*/React.createElement("div", {
|
|
925
915
|
"data-testid": "dropdown",
|
|
@@ -927,13 +917,13 @@ const Dropdown = ({
|
|
|
927
917
|
}, children);
|
|
928
918
|
};
|
|
929
919
|
|
|
930
|
-
var styles$
|
|
920
|
+
var styles$v = {"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","podcast":"Toolbar-module_podcast__ahY4M"};
|
|
931
921
|
|
|
932
922
|
const ToolbarItem = ({
|
|
933
923
|
children
|
|
934
924
|
}) => {
|
|
935
925
|
return /*#__PURE__*/React.createElement("li", {
|
|
936
|
-
className: styles$
|
|
926
|
+
className: styles$v.item
|
|
937
927
|
}, children);
|
|
938
928
|
};
|
|
939
929
|
|
|
@@ -941,19 +931,19 @@ const Toolbar = ({
|
|
|
941
931
|
children,
|
|
942
932
|
styleContext
|
|
943
933
|
}) => {
|
|
944
|
-
let classNames = [[styles$
|
|
934
|
+
let classNames = [[styles$v.root, true]];
|
|
945
935
|
if (styleContext) {
|
|
946
|
-
classNames = makeStyleContext(classNames, styleContext, styles$
|
|
936
|
+
classNames = makeStyleContext(classNames, styleContext, styles$v);
|
|
947
937
|
}
|
|
948
938
|
return /*#__PURE__*/React.createElement("div", {
|
|
949
939
|
"data-testid": "toolbar",
|
|
950
940
|
className: makeClassName(classNames)
|
|
951
941
|
}, /*#__PURE__*/React.createElement("ul", {
|
|
952
|
-
className: styles$
|
|
942
|
+
className: styles$v.list
|
|
953
943
|
}, children));
|
|
954
944
|
};
|
|
955
945
|
|
|
956
|
-
var styles$
|
|
946
|
+
var styles$u = {"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","isInBookRelated":"Meta-module_isInBookRelated__Ohidg","mobile":"Meta-module_mobile__PbG8N","desktop":"Meta-module_desktop__W5AB7"};
|
|
957
947
|
|
|
958
948
|
const Meta = ({
|
|
959
949
|
hasSource,
|
|
@@ -962,9 +952,9 @@ const Meta = ({
|
|
|
962
952
|
onlyOn,
|
|
963
953
|
styleContext
|
|
964
954
|
}) => {
|
|
965
|
-
let classNames = [[styles$
|
|
955
|
+
let classNames = [[styles$u.root, true], [styles$u[theme], !!theme && !!styles$u[theme]], [styles$u[onlyOn], !!onlyOn], [styles$u.hasSource, hasSource]];
|
|
966
956
|
if (styleContext) {
|
|
967
|
-
classNames = makeStyleContext(classNames, styleContext, styles$
|
|
957
|
+
classNames = makeStyleContext(classNames, styleContext, styles$u);
|
|
968
958
|
}
|
|
969
959
|
return /*#__PURE__*/React.createElement("div", {
|
|
970
960
|
"data-testid": "meta",
|
|
@@ -972,7 +962,7 @@ const Meta = ({
|
|
|
972
962
|
}, children);
|
|
973
963
|
};
|
|
974
964
|
|
|
975
|
-
var styles$
|
|
965
|
+
var styles$t = {"root":"Timestamp-module_root__jPJ6w"};
|
|
976
966
|
|
|
977
967
|
const Timestamp = ({
|
|
978
968
|
publishedAt,
|
|
@@ -996,7 +986,7 @@ const Timestamp = ({
|
|
|
996
986
|
return /*#__PURE__*/React.createElement("time", {
|
|
997
987
|
suppressHydrationWarning: true,
|
|
998
988
|
"data-testid": "timestamp",
|
|
999
|
-
className: styles$
|
|
989
|
+
className: styles$t.root
|
|
1000
990
|
}, published);
|
|
1001
991
|
};
|
|
1002
992
|
|
|
@@ -1056,7 +1046,7 @@ const DangerousHTML = ({
|
|
|
1056
1046
|
}));
|
|
1057
1047
|
};
|
|
1058
1048
|
|
|
1059
|
-
var styles$
|
|
1049
|
+
var styles$s = {"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","isDefaultVideo":"EmbedBlock-module_isDefaultVideo__UTW9Q","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","isProportional":"EmbedBlock-module_isProportional__x8-8g","mobile":"EmbedBlock-module_mobile__lEuww","desktop":"EmbedBlock-module_desktop__599S7"};
|
|
1060
1050
|
|
|
1061
1051
|
const EmbedGif = ({
|
|
1062
1052
|
gif,
|
|
@@ -1094,9 +1084,9 @@ const EmbedGif = ({
|
|
|
1094
1084
|
};
|
|
1095
1085
|
}, []);
|
|
1096
1086
|
return /*#__PURE__*/React.createElement("div", {
|
|
1097
|
-
className: styles$
|
|
1087
|
+
className: styles$s.figure
|
|
1098
1088
|
}, /*#__PURE__*/React.createElement("div", {
|
|
1099
|
-
className: styles$
|
|
1089
|
+
className: styles$s.objectWrap,
|
|
1100
1090
|
style: style,
|
|
1101
1091
|
"data-frozen": videoFrozen
|
|
1102
1092
|
}, /*#__PURE__*/React.createElement("video", {
|
|
@@ -1161,7 +1151,7 @@ const EmbedBlock = ({
|
|
|
1161
1151
|
case 'image':
|
|
1162
1152
|
{
|
|
1163
1153
|
return /*#__PURE__*/React.createElement("div", {
|
|
1164
|
-
className: styles$
|
|
1154
|
+
className: styles$s.figure
|
|
1165
1155
|
}, /*#__PURE__*/React.createElement(Image, {
|
|
1166
1156
|
source: !optimized && [small, large],
|
|
1167
1157
|
optimized: block.data.optimized,
|
|
@@ -1177,7 +1167,7 @@ const EmbedBlock = ({
|
|
|
1177
1167
|
case 'game_embed':
|
|
1178
1168
|
{
|
|
1179
1169
|
return /*#__PURE__*/React.createElement("div", {
|
|
1180
|
-
className: styles$
|
|
1170
|
+
className: styles$s.gameEmbed
|
|
1181
1171
|
}, /*#__PURE__*/React.createElement("iframe", {
|
|
1182
1172
|
src: block.data.game_src,
|
|
1183
1173
|
id: block.data.game_id,
|
|
@@ -1187,7 +1177,7 @@ const EmbedBlock = ({
|
|
|
1187
1177
|
case 'dots_on_image':
|
|
1188
1178
|
{
|
|
1189
1179
|
return /*#__PURE__*/React.createElement("div", {
|
|
1190
|
-
className: styles$
|
|
1180
|
+
className: styles$s.figure
|
|
1191
1181
|
}, /*#__PURE__*/React.createElement(DotsOnImage, {
|
|
1192
1182
|
block: data
|
|
1193
1183
|
}));
|
|
@@ -1196,9 +1186,9 @@ const EmbedBlock = ({
|
|
|
1196
1186
|
{
|
|
1197
1187
|
if (platform === 'mirror' && videoFileUrl) {
|
|
1198
1188
|
return /*#__PURE__*/React.createElement("div", {
|
|
1199
|
-
className: styles$
|
|
1189
|
+
className: styles$s.object
|
|
1200
1190
|
}, /*#__PURE__*/React.createElement("div", {
|
|
1201
|
-
className: makeClassName([[styles$
|
|
1191
|
+
className: makeClassName([[styles$s.objectWrap, true], [styles$s.isDefaultVideo, true]])
|
|
1202
1192
|
}, /*#__PURE__*/React.createElement("video", {
|
|
1203
1193
|
src: videoFileUrl,
|
|
1204
1194
|
poster: thumbnailUrl,
|
|
@@ -1208,12 +1198,12 @@ const EmbedBlock = ({
|
|
|
1208
1198
|
})));
|
|
1209
1199
|
}
|
|
1210
1200
|
return /*#__PURE__*/React.createElement("div", {
|
|
1211
|
-
className: styles$
|
|
1201
|
+
className: styles$s.object
|
|
1212
1202
|
}, /*#__PURE__*/React.createElement("div", {
|
|
1213
|
-
className: makeClassName([[styles$
|
|
1203
|
+
className: makeClassName([[styles$s.wrapper, true], [styles$s.isProportional, isProportional]]),
|
|
1214
1204
|
style: style
|
|
1215
1205
|
}, /*#__PURE__*/React.createElement(DangerousHTML, {
|
|
1216
|
-
className: styles$
|
|
1206
|
+
className: styles$s.objectWrap,
|
|
1217
1207
|
html: html
|
|
1218
1208
|
})));
|
|
1219
1209
|
}
|
|
@@ -1222,28 +1212,28 @@ const EmbedBlock = ({
|
|
|
1222
1212
|
if (isProportional) {
|
|
1223
1213
|
style.aspectRatio = `${block.data.width} / ${block.data.height}`;
|
|
1224
1214
|
}
|
|
1225
|
-
let classNames = [[styles$
|
|
1215
|
+
let classNames = [[styles$s.root, true], [styles$s.cc, cc], [styles$s[display], !!display && styles$s[display]], [styles$s[provider], !!provider && !!styles$s[provider]], [styles$s[onlyOn], !!onlyOn && styles$s[onlyOn]], [styles$s.mobileFullwidth, mobileFullwidth], [styles$s.proportional, isProportional]];
|
|
1226
1216
|
// Убираем из контекста все, что не начинается с приставки isIn,
|
|
1227
1217
|
// чтобы не применились лишние модификаторы
|
|
1228
1218
|
// TODO: в w6 модификаторы должны передаваться явно
|
|
1229
1219
|
if (styleContext && Array.isArray(styleContext)) {
|
|
1230
|
-
const filteredContext = styleContext.filter(key => key.startsWith('isIn') && styles$
|
|
1220
|
+
const filteredContext = styleContext.filter(key => key.startsWith('isIn') && styles$s[key]).reduce((acc, key) => {
|
|
1231
1221
|
acc.push(key);
|
|
1232
1222
|
return acc;
|
|
1233
1223
|
}, []);
|
|
1234
|
-
classNames = makeStyleContext(classNames, filteredContext, styles$
|
|
1224
|
+
classNames = makeStyleContext(classNames, filteredContext, styles$s);
|
|
1235
1225
|
}
|
|
1236
1226
|
return /*#__PURE__*/React.createElement("figure", {
|
|
1237
1227
|
className: makeClassName(classNames)
|
|
1238
1228
|
}, children && (/*#__PURE__*/React.createElement("div", {
|
|
1239
|
-
className: styles$
|
|
1229
|
+
className: styles$s.object
|
|
1240
1230
|
}, /*#__PURE__*/React.createElement("div", {
|
|
1241
|
-
className: makeClassName([[styles$
|
|
1231
|
+
className: makeClassName([[styles$s.wrapper, true], [styles$s.isProportional, isProportional]]),
|
|
1242
1232
|
style: style
|
|
1243
1233
|
}, /*#__PURE__*/React.createElement("div", {
|
|
1244
|
-
className: styles$
|
|
1234
|
+
className: styles$s.objectWrap
|
|
1245
1235
|
}, children)))), !children && renderEmbed(style), cc === 'default' && /*#__PURE__*/React.createElement("figcaption", null, renderCC()), cc === 'button' && (/*#__PURE__*/React.createElement("button", {
|
|
1246
|
-
className: styles$
|
|
1236
|
+
className: styles$s.control,
|
|
1247
1237
|
type: "button",
|
|
1248
1238
|
"aria-label": "Open",
|
|
1249
1239
|
onClick: () => {
|
|
@@ -1348,7 +1338,7 @@ const EmbedBlockContainer = ({
|
|
|
1348
1338
|
});
|
|
1349
1339
|
};
|
|
1350
1340
|
|
|
1351
|
-
var styles$
|
|
1341
|
+
var styles$r = {"root":"QuoteBlock-module_root__4qa1J","center":"QuoteBlock-module_center__1f83y"};
|
|
1352
1342
|
|
|
1353
1343
|
const QuoteBlock = ({
|
|
1354
1344
|
block: {
|
|
@@ -1356,9 +1346,9 @@ const QuoteBlock = ({
|
|
|
1356
1346
|
},
|
|
1357
1347
|
styleContext
|
|
1358
1348
|
}) => {
|
|
1359
|
-
let classNames = [[styles$
|
|
1349
|
+
let classNames = [[styles$r.root, true]];
|
|
1360
1350
|
if (styleContext) {
|
|
1361
|
-
classNames = makeStyleContext(classNames, styleContext, styles$
|
|
1351
|
+
classNames = makeStyleContext(classNames, styleContext, styles$r);
|
|
1362
1352
|
}
|
|
1363
1353
|
return /*#__PURE__*/React.createElement("div", {
|
|
1364
1354
|
"data-testid": "quote-block",
|
|
@@ -1370,7 +1360,7 @@ const QuoteBlock = ({
|
|
|
1370
1360
|
}));
|
|
1371
1361
|
};
|
|
1372
1362
|
|
|
1373
|
-
var styles$
|
|
1363
|
+
var styles$q = {"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"};
|
|
1374
1364
|
|
|
1375
1365
|
const CardTitle = ({
|
|
1376
1366
|
block: {
|
|
@@ -1386,15 +1376,15 @@ const CardTitle = ({
|
|
|
1386
1376
|
return /*#__PURE__*/React.createElement("div", {
|
|
1387
1377
|
"data-testid": "card-title",
|
|
1388
1378
|
id: id,
|
|
1389
|
-
className: makeClassName([[styles$
|
|
1379
|
+
className: makeClassName([[styles$q.root, true], [styles$q[onlyOn], !!onlyOn], [styles$q[styleContext], !!styleContext && !!styles$q[styleContext]]])
|
|
1390
1380
|
}, /*#__PURE__*/React.createElement("div", {
|
|
1391
|
-
className: styles$
|
|
1381
|
+
className: styles$q.index
|
|
1392
1382
|
}, index), /*#__PURE__*/React.createElement("h3", {
|
|
1393
|
-
className: styles$
|
|
1383
|
+
className: styles$q.title
|
|
1394
1384
|
}, text));
|
|
1395
1385
|
};
|
|
1396
1386
|
|
|
1397
|
-
var styles$
|
|
1387
|
+
var styles$p = {"root":"ChapterBlock-module_root__iw7d2","subtitle":"ChapterBlock-module_subtitle__IpWgz","mobile":"ChapterBlock-module_mobile__V1Eye","desktop":"ChapterBlock-module_desktop__9xWf4"};
|
|
1398
1388
|
|
|
1399
1389
|
const ChapterBlock = ({
|
|
1400
1390
|
block: {
|
|
@@ -1407,9 +1397,9 @@ const ChapterBlock = ({
|
|
|
1407
1397
|
return /*#__PURE__*/React.createElement("div", {
|
|
1408
1398
|
"data-testid": "chapter-block",
|
|
1409
1399
|
id: id,
|
|
1410
|
-
className: makeClassName([[styles$
|
|
1400
|
+
className: makeClassName([[styles$p.root, true], [styles$p[onlyOn], !!onlyOn]])
|
|
1411
1401
|
}, /*#__PURE__*/React.createElement("div", {
|
|
1412
|
-
className: makeClassName([[styles$
|
|
1402
|
+
className: makeClassName([[styles$p.subtitle, true], [styles$p[styleContext], !!styleContext && !!styles$p[styleContext]]]),
|
|
1413
1403
|
dangerouslySetInnerHTML: {
|
|
1414
1404
|
__html: data
|
|
1415
1405
|
}
|
|
@@ -1425,7 +1415,7 @@ const generateGradient = (color, type) => {
|
|
|
1425
1415
|
return `linear-gradient(-180deg, ${gradient})`;
|
|
1426
1416
|
};
|
|
1427
1417
|
|
|
1428
|
-
var styles$
|
|
1418
|
+
var styles$o = {"root":"SimpleTitle-module_root__YOzNn","mobile":"SimpleTitle-module_mobile__1QiJd","desktop":"SimpleTitle-module_desktop__ZF5Af"};
|
|
1429
1419
|
|
|
1430
1420
|
const SimpleTitle = ({
|
|
1431
1421
|
block: {
|
|
@@ -1436,9 +1426,9 @@ const SimpleTitle = ({
|
|
|
1436
1426
|
},
|
|
1437
1427
|
styleContext
|
|
1438
1428
|
}) => {
|
|
1439
|
-
let classNames = [[styles$
|
|
1429
|
+
let classNames = [[styles$o.root, true], [styles$o[onlyOn], true]];
|
|
1440
1430
|
if (styleContext) {
|
|
1441
|
-
classNames = makeStyleContext(classNames, styleContext, styles$
|
|
1431
|
+
classNames = makeStyleContext(classNames, styleContext, styles$o);
|
|
1442
1432
|
}
|
|
1443
1433
|
return /*#__PURE__*/React.createElement("h1", {
|
|
1444
1434
|
"data-testid": "simple-title",
|
|
@@ -1446,7 +1436,7 @@ const SimpleTitle = ({
|
|
|
1446
1436
|
}, first);
|
|
1447
1437
|
};
|
|
1448
1438
|
|
|
1449
|
-
var styles$
|
|
1439
|
+
var styles$n = {"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","isInFeaturedBlock":"RichTitle-module_isInFeaturedBlock__3vYu9","isInMediaBlock":"RichTitle-module_isInMediaBlock__2h6rl","isInBookRelated":"RichTitle-module_isInBookRelated__LcCPV","isInDynamicBlock":"RichTitle-module_isInDynamicBlock__J-gM6","isInPodcastPlayer":"RichTitle-module_isInPodcastPlayer__kvEPH","large":"RichTitle-module_large__n2URP","medium":"RichTitle-module_medium__KkBLJ","mobile":"RichTitle-module_mobile__W5L9E","desktop":"RichTitle-module_desktop__k0PkC"};
|
|
1450
1440
|
|
|
1451
1441
|
const RichTitle = ({
|
|
1452
1442
|
block: {
|
|
@@ -1461,9 +1451,9 @@ const RichTitle = ({
|
|
|
1461
1451
|
styleContext,
|
|
1462
1452
|
size = 'default'
|
|
1463
1453
|
}) => {
|
|
1464
|
-
let classNames = [[styles$
|
|
1454
|
+
let classNames = [[styles$n.root, true], [styles$n[onlyOn], true], [styles$n.featured, !!featured], [styles$n[size], !!size]];
|
|
1465
1455
|
if (styleContext) {
|
|
1466
|
-
classNames = makeStyleContext(classNames, styleContext, styles$
|
|
1456
|
+
classNames = makeStyleContext(classNames, styleContext, styles$n);
|
|
1467
1457
|
}
|
|
1468
1458
|
return /*#__PURE__*/React.createElement(TagName, {
|
|
1469
1459
|
"data-testid": "rich-title",
|
|
@@ -1471,7 +1461,7 @@ const RichTitle = ({
|
|
|
1471
1461
|
}, first, second && /*#__PURE__*/React.createElement("span", null, " ", second));
|
|
1472
1462
|
};
|
|
1473
1463
|
|
|
1474
|
-
var styles$
|
|
1464
|
+
var styles$m = {"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"};
|
|
1475
1465
|
|
|
1476
1466
|
const SimpleBlock = ({
|
|
1477
1467
|
block: {
|
|
@@ -1483,9 +1473,9 @@ const SimpleBlock = ({
|
|
|
1483
1473
|
id = null
|
|
1484
1474
|
}) => {
|
|
1485
1475
|
let TagName;
|
|
1486
|
-
let classNames = [[styles$
|
|
1476
|
+
let classNames = [[styles$m[type], !!type && !!styles$m[type]], [styles$m[onlyOn], true]];
|
|
1487
1477
|
if (styleContext) {
|
|
1488
|
-
classNames = makeStyleContext(classNames, styleContext, styles$
|
|
1478
|
+
classNames = makeStyleContext(classNames, styleContext, styles$m);
|
|
1489
1479
|
}
|
|
1490
1480
|
switch (type) {
|
|
1491
1481
|
case 'context_p':
|
|
@@ -1517,7 +1507,7 @@ const SimpleBlock = ({
|
|
|
1517
1507
|
});
|
|
1518
1508
|
};
|
|
1519
1509
|
|
|
1520
|
-
var styles$
|
|
1510
|
+
var styles$l = {"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"};
|
|
1521
1511
|
|
|
1522
1512
|
const ListBlock = ({
|
|
1523
1513
|
block: {
|
|
@@ -1528,9 +1518,9 @@ const ListBlock = ({
|
|
|
1528
1518
|
styleContext
|
|
1529
1519
|
}) => {
|
|
1530
1520
|
const TagName = type;
|
|
1531
|
-
let classNames = [[styles$
|
|
1521
|
+
let classNames = [[styles$l.root, true], [styles$l[onlyOn], true], [styles$l[type], !!type && !!styles$l[type]]];
|
|
1532
1522
|
if (styleContext) {
|
|
1533
|
-
classNames = makeStyleContext(classNames, styleContext, styles$
|
|
1523
|
+
classNames = makeStyleContext(classNames, styleContext, styles$l);
|
|
1534
1524
|
}
|
|
1535
1525
|
return /*#__PURE__*/React.createElement(TagName, {
|
|
1536
1526
|
className: makeClassName(classNames),
|
|
@@ -1543,7 +1533,7 @@ const ListBlock = ({
|
|
|
1543
1533
|
}))));
|
|
1544
1534
|
};
|
|
1545
1535
|
|
|
1546
|
-
var styles$
|
|
1536
|
+
var styles$k = {"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"};
|
|
1547
1537
|
|
|
1548
1538
|
const RelatedBlock = ({
|
|
1549
1539
|
block: {
|
|
@@ -1555,28 +1545,28 @@ const RelatedBlock = ({
|
|
|
1555
1545
|
},
|
|
1556
1546
|
styleContext
|
|
1557
1547
|
}) => {
|
|
1558
|
-
let classNames = [[styles$
|
|
1548
|
+
let classNames = [[styles$k.root, true], [styles$k[onlyOn], true]];
|
|
1559
1549
|
if (styleContext) {
|
|
1560
|
-
classNames = makeStyleContext(classNames, styleContext, styles$
|
|
1550
|
+
classNames = makeStyleContext(classNames, styleContext, styles$k);
|
|
1561
1551
|
}
|
|
1562
1552
|
return /*#__PURE__*/React.createElement("div", {
|
|
1563
1553
|
"data-testid": "related-block",
|
|
1564
1554
|
className: makeClassName(classNames)
|
|
1565
1555
|
}, /*#__PURE__*/React.createElement("h3", {
|
|
1566
|
-
className: styles$
|
|
1556
|
+
className: styles$k.header
|
|
1567
1557
|
}, title), /*#__PURE__*/React.createElement("ul", {
|
|
1568
|
-
className: styles$
|
|
1558
|
+
className: styles$k.items
|
|
1569
1559
|
}, related.map((item, index) => (/*#__PURE__*/React.createElement("li", {
|
|
1570
1560
|
key: item.id || index,
|
|
1571
|
-
className: styles$
|
|
1561
|
+
className: styles$k[item.layout]
|
|
1572
1562
|
}, /*#__PURE__*/React.createElement(reactRouterDom.Link, {
|
|
1573
1563
|
to: item.full_url || `/${item.url}`
|
|
1574
1564
|
}, /*#__PURE__*/React.createElement("span", {
|
|
1575
|
-
className: styles$
|
|
1565
|
+
className: styles$k.first
|
|
1576
1566
|
}, item.title), item.second_title && ' ', item.second_title && /*#__PURE__*/React.createElement("span", null, item.second_title)))))));
|
|
1577
1567
|
};
|
|
1578
1568
|
|
|
1579
|
-
var styles$
|
|
1569
|
+
var styles$j = {"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"};
|
|
1580
1570
|
|
|
1581
1571
|
const SourceBlock = ({
|
|
1582
1572
|
block: {
|
|
@@ -1589,16 +1579,16 @@ const SourceBlock = ({
|
|
|
1589
1579
|
},
|
|
1590
1580
|
styleContext
|
|
1591
1581
|
}) => {
|
|
1592
|
-
let classNames = [[styles$
|
|
1582
|
+
let classNames = [[styles$j.root, true], [styles$j[onlyOn], true]];
|
|
1593
1583
|
if (styleContext) {
|
|
1594
|
-
classNames = makeStyleContext(classNames, styleContext, styles$
|
|
1584
|
+
classNames = makeStyleContext(classNames, styleContext, styles$j);
|
|
1595
1585
|
}
|
|
1596
1586
|
return /*#__PURE__*/React.createElement("blockquote", {
|
|
1597
1587
|
"data-testid": "source-block",
|
|
1598
1588
|
cite: url,
|
|
1599
1589
|
className: makeClassName(classNames)
|
|
1600
1590
|
}, /*#__PURE__*/React.createElement("a", {
|
|
1601
|
-
className: styles$
|
|
1591
|
+
className: styles$j.text,
|
|
1602
1592
|
href: url,
|
|
1603
1593
|
target: "_blank",
|
|
1604
1594
|
rel: "noopener noreferrer"
|
|
@@ -1608,11 +1598,11 @@ const SourceBlock = ({
|
|
|
1608
1598
|
__html: item.data
|
|
1609
1599
|
}
|
|
1610
1600
|
}))), /*#__PURE__*/React.createElement("footer", null, /*#__PURE__*/React.createElement("cite", {
|
|
1611
|
-
className: styles$
|
|
1601
|
+
className: styles$j.origin
|
|
1612
1602
|
}, origin))));
|
|
1613
1603
|
};
|
|
1614
1604
|
|
|
1615
|
-
var styles$
|
|
1605
|
+
var styles$i = {"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"};
|
|
1616
1606
|
|
|
1617
1607
|
const SensitiveBlock = ({
|
|
1618
1608
|
block,
|
|
@@ -1635,40 +1625,40 @@ const SensitiveBlock = ({
|
|
|
1635
1625
|
const handleClick = () => {
|
|
1636
1626
|
isVisible(true);
|
|
1637
1627
|
};
|
|
1638
|
-
let classNames = [[styles$
|
|
1628
|
+
let classNames = [[styles$i.root, true], [styles$i.visible, visible], [styles$i[display], display && styles$i[display]]];
|
|
1639
1629
|
let context = ['isInSensitiveBlock'];
|
|
1640
1630
|
if (styleContext) {
|
|
1641
|
-
classNames = makeStyleContext(classNames, styleContext, styles$
|
|
1631
|
+
classNames = makeStyleContext(classNames, styleContext, styles$i);
|
|
1642
1632
|
context = [...styleContext, 'isInSensitiveBlock'];
|
|
1643
1633
|
}
|
|
1644
1634
|
return /*#__PURE__*/React.createElement("div", {
|
|
1645
1635
|
"data-testid": "sensitive-block",
|
|
1646
1636
|
className: makeClassName(classNames)
|
|
1647
1637
|
}, /*#__PURE__*/React.createElement("div", {
|
|
1648
|
-
className: styles$
|
|
1638
|
+
className: styles$i.container
|
|
1649
1639
|
}, /*#__PURE__*/React.createElement("div", {
|
|
1650
|
-
className: styles$
|
|
1640
|
+
className: styles$i.overlay,
|
|
1651
1641
|
style: {
|
|
1652
1642
|
backgroundImage: `url(${blurredImage})`
|
|
1653
1643
|
}
|
|
1654
1644
|
}, /*#__PURE__*/React.createElement("div", {
|
|
1655
|
-
className: styles$
|
|
1645
|
+
className: styles$i.content
|
|
1656
1646
|
}, /*#__PURE__*/React.createElement("p", {
|
|
1657
1647
|
dangerouslySetInnerHTML: {
|
|
1658
1648
|
__html: block.title
|
|
1659
1649
|
}
|
|
1660
1650
|
}), /*#__PURE__*/React.createElement("div", {
|
|
1661
|
-
className: styles$
|
|
1651
|
+
className: styles$i.button
|
|
1662
1652
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
1663
1653
|
onClick: () => handleClick(),
|
|
1664
1654
|
theme: "light"
|
|
1665
1655
|
}, block.button.text)))), /*#__PURE__*/React.createElement("div", {
|
|
1666
|
-
className: styles$
|
|
1656
|
+
className: styles$i.media
|
|
1667
1657
|
}, /*#__PURE__*/React.createElement(EmbedBlockContainer, {
|
|
1668
1658
|
block: block.item,
|
|
1669
1659
|
styleContext: context
|
|
1670
1660
|
}))), cc && (/*#__PURE__*/React.createElement("figcaption", {
|
|
1671
|
-
className: styles$
|
|
1661
|
+
className: styles$i.figcaption
|
|
1672
1662
|
}, /*#__PURE__*/React.createElement(MediaCaption, {
|
|
1673
1663
|
credit: credit,
|
|
1674
1664
|
caption: caption,
|
|
@@ -1676,7 +1666,7 @@ const SensitiveBlock = ({
|
|
|
1676
1666
|
}))));
|
|
1677
1667
|
};
|
|
1678
1668
|
|
|
1679
|
-
var styles$
|
|
1669
|
+
var styles$h = {"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"};
|
|
1680
1670
|
|
|
1681
1671
|
const GroupedBlock = ({
|
|
1682
1672
|
block,
|
|
@@ -1692,19 +1682,19 @@ const GroupedBlock = ({
|
|
|
1692
1682
|
return width / (height / maxHeight);
|
|
1693
1683
|
});
|
|
1694
1684
|
const sumWidth = normalizedBoxesWidth.reduce((sum, x) => sum + x);
|
|
1695
|
-
let classNames = [[styles$
|
|
1685
|
+
let classNames = [[styles$h.root, true], [styles$h[onlyOn], true], [styles$h.hasFigcaption, block.cc === 'default'], [styles$h[block.display], !!block.display && styles$h[block.display]]];
|
|
1696
1686
|
if (styleContext) {
|
|
1697
|
-
classNames = makeStyleContext(classNames, styleContext, styles$
|
|
1687
|
+
classNames = makeStyleContext(classNames, styleContext, styles$h);
|
|
1698
1688
|
}
|
|
1699
1689
|
return /*#__PURE__*/React.createElement("div", {
|
|
1700
1690
|
"data-testid": "grouped-block",
|
|
1701
1691
|
className: makeClassName(classNames)
|
|
1702
1692
|
}, /*#__PURE__*/React.createElement("div", {
|
|
1703
|
-
className: styles$
|
|
1693
|
+
className: styles$h.items
|
|
1704
1694
|
}, block.data.map((item, index) => {
|
|
1705
1695
|
const percentWidth = normalizedBoxesWidth[index] / sumWidth * 100;
|
|
1706
1696
|
return /*#__PURE__*/React.createElement("div", {
|
|
1707
|
-
className: styles$
|
|
1697
|
+
className: styles$h.item,
|
|
1708
1698
|
key: item.id,
|
|
1709
1699
|
style: {
|
|
1710
1700
|
width: `${percentWidth}%`
|
|
@@ -1717,7 +1707,7 @@ const GroupedBlock = ({
|
|
|
1717
1707
|
styleContext: ['isInGroupedBlock']
|
|
1718
1708
|
})));
|
|
1719
1709
|
})), block.cc && (/*#__PURE__*/React.createElement("figcaption", {
|
|
1720
|
-
className: styles$
|
|
1710
|
+
className: styles$h.figcaption
|
|
1721
1711
|
}, /*#__PURE__*/React.createElement(MediaCaption, {
|
|
1722
1712
|
credit: block.credit,
|
|
1723
1713
|
caption: block.caption,
|
|
@@ -1725,7 +1715,7 @@ const GroupedBlock = ({
|
|
|
1725
1715
|
}))));
|
|
1726
1716
|
};
|
|
1727
1717
|
|
|
1728
|
-
var styles$
|
|
1718
|
+
var styles$g = {"root":"MetaItem-module_root__sRbrZ","hasBullets":"MetaItem-module_hasBullets__b1eW9","hasSource":"MetaItem-module_hasSource__35olm","datetime":"MetaItem-module_datetime__--O8c","tag":"MetaItem-module_tag__3HzOp"};
|
|
1729
1719
|
|
|
1730
1720
|
const MetaItem = ({
|
|
1731
1721
|
hasSource,
|
|
@@ -1734,28 +1724,28 @@ const MetaItem = ({
|
|
|
1734
1724
|
bullets,
|
|
1735
1725
|
variant
|
|
1736
1726
|
}) => {
|
|
1737
|
-
const classNames = [[styles$
|
|
1727
|
+
const classNames = [[styles$g.root, true], [styles$g[type], !!type && !!styles$g[type]], [styles$g.hasSource, !!hasSource], [styles$g.hasBullets, !!bullets], [styles$g[variant], !!variant && !!styles$g[variant]]];
|
|
1738
1728
|
return /*#__PURE__*/React.createElement("div", {
|
|
1739
1729
|
"data-testid": "meta-item",
|
|
1740
1730
|
className: makeClassName(classNames)
|
|
1741
1731
|
}, children);
|
|
1742
1732
|
};
|
|
1743
1733
|
|
|
1744
|
-
var styles$
|
|
1734
|
+
var styles$f = {"root":"MetaItemLive-module_root__XfQiW","gold":"MetaItemLive-module_gold__f1UOy","icon":"MetaItemLive-module_icon__JIMLl","pulse":"MetaItemLive-module_pulse__zzrle","text":"MetaItemLive-module_text__wgLcT"};
|
|
1745
1735
|
|
|
1746
1736
|
const MetaItemLive = ({
|
|
1747
1737
|
theme = 'gold',
|
|
1748
1738
|
children
|
|
1749
1739
|
}) => {
|
|
1750
|
-
const classNames = [[styles$
|
|
1740
|
+
const classNames = [[styles$f.root, true], [styles$f[theme], !!theme && styles$f[theme]]];
|
|
1751
1741
|
return /*#__PURE__*/React.createElement("div", {
|
|
1752
1742
|
"data-testid": "meta-item-live",
|
|
1753
1743
|
"data-meta": "live",
|
|
1754
1744
|
className: makeClassName(classNames)
|
|
1755
1745
|
}, /*#__PURE__*/React.createElement("div", {
|
|
1756
|
-
className: styles$
|
|
1746
|
+
className: styles$f.icon
|
|
1757
1747
|
}), children && /*#__PURE__*/React.createElement("span", {
|
|
1758
|
-
className: styles$
|
|
1748
|
+
className: styles$f.text
|
|
1759
1749
|
}, children));
|
|
1760
1750
|
};
|
|
1761
1751
|
|
|
@@ -1775,7 +1765,7 @@ const pluralize = (number, one, two, five) => {
|
|
|
1775
1765
|
return five;
|
|
1776
1766
|
};
|
|
1777
1767
|
|
|
1778
|
-
var styles$
|
|
1768
|
+
var styles$e = {"root":"DocumentItemsCount-module_root__u4M3y","items":"DocumentItemsCount-module_items__OE-hf"};
|
|
1779
1769
|
|
|
1780
1770
|
const DocumentItemsCount = ({
|
|
1781
1771
|
type,
|
|
@@ -1812,9 +1802,9 @@ const DocumentItemsCount = ({
|
|
|
1812
1802
|
const itemsCount = `${items} ${pluralize(items, i18n[lang][type].one, i18n[lang][type].two, i18n[lang][type].five)}`;
|
|
1813
1803
|
return /*#__PURE__*/React.createElement("div", {
|
|
1814
1804
|
"data-testid": "document-items-count",
|
|
1815
|
-
className: styles$
|
|
1805
|
+
className: styles$e.root
|
|
1816
1806
|
}, children, /*#__PURE__*/React.createElement("span", {
|
|
1817
|
-
className: styles$
|
|
1807
|
+
className: styles$e.items
|
|
1818
1808
|
}, itemsCount));
|
|
1819
1809
|
};
|
|
1820
1810
|
|
|
@@ -1923,15 +1913,15 @@ const MetaContainer = ({
|
|
|
1923
1913
|
}));
|
|
1924
1914
|
};
|
|
1925
1915
|
|
|
1926
|
-
var styles$
|
|
1916
|
+
var styles$d = {"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"};
|
|
1927
1917
|
|
|
1928
1918
|
const DonatesTeaser = ({
|
|
1929
1919
|
styleContext,
|
|
1930
1920
|
lang = 'ru'
|
|
1931
1921
|
}) => {
|
|
1932
|
-
let classNames = [[styles$
|
|
1922
|
+
let classNames = [[styles$d.root, true], [styles$d[lang], styles$d[lang]]];
|
|
1933
1923
|
if (styleContext) {
|
|
1934
|
-
classNames = makeStyleContext(classNames, styleContext, styles$
|
|
1924
|
+
classNames = makeStyleContext(classNames, styleContext, styles$d);
|
|
1935
1925
|
}
|
|
1936
1926
|
const data = {
|
|
1937
1927
|
ru: {
|
|
@@ -1951,20 +1941,20 @@ const DonatesTeaser = ({
|
|
|
1951
1941
|
"data-testid": "donates-teaser",
|
|
1952
1942
|
className: makeClassName(classNames)
|
|
1953
1943
|
}, /*#__PURE__*/React.createElement("div", {
|
|
1954
|
-
className: styles$
|
|
1944
|
+
className: styles$d.main
|
|
1955
1945
|
}, /*#__PURE__*/React.createElement("h3", {
|
|
1956
|
-
className: styles$
|
|
1946
|
+
className: styles$d.title
|
|
1957
1947
|
}, /*#__PURE__*/React.createElement("span", {
|
|
1958
1948
|
dangerouslySetInnerHTML: {
|
|
1959
1949
|
__html: data[lang].title
|
|
1960
1950
|
}
|
|
1961
1951
|
}), ` `, /*#__PURE__*/React.createElement("span", {
|
|
1962
|
-
className: styles$
|
|
1952
|
+
className: styles$d.text,
|
|
1963
1953
|
dangerouslySetInnerHTML: {
|
|
1964
1954
|
__html: data[lang].subtitle
|
|
1965
1955
|
}
|
|
1966
1956
|
}))), /*#__PURE__*/React.createElement("div", {
|
|
1967
|
-
className: styles$
|
|
1957
|
+
className: styles$d.cta
|
|
1968
1958
|
}, /*#__PURE__*/React.createElement("a", {
|
|
1969
1959
|
href: data[lang].href,
|
|
1970
1960
|
target: "_blank",
|
|
@@ -1972,15 +1962,15 @@ const DonatesTeaser = ({
|
|
|
1972
1962
|
}, /*#__PURE__*/React.createElement("span", null, data[lang].button))));
|
|
1973
1963
|
};
|
|
1974
1964
|
|
|
1975
|
-
var styles$
|
|
1965
|
+
var styles$c = {"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"};
|
|
1976
1966
|
|
|
1977
1967
|
const AnnouncementInText = ({
|
|
1978
1968
|
styleContext,
|
|
1979
1969
|
lang = 'ru'
|
|
1980
1970
|
}) => {
|
|
1981
|
-
let classNames = [[styles$
|
|
1971
|
+
let classNames = [[styles$c.root, true], [styles$c[lang], styles$c[lang]]];
|
|
1982
1972
|
if (styleContext) {
|
|
1983
|
-
classNames = makeStyleContext(classNames, styleContext, styles$
|
|
1973
|
+
classNames = makeStyleContext(classNames, styleContext, styles$c);
|
|
1984
1974
|
}
|
|
1985
1975
|
const data = {
|
|
1986
1976
|
ru: {
|
|
@@ -2001,9 +1991,9 @@ const AnnouncementInText = ({
|
|
|
2001
1991
|
"data-testid": "announcement-in-text",
|
|
2002
1992
|
className: makeClassName(classNames)
|
|
2003
1993
|
}, /*#__PURE__*/React.createElement("div", {
|
|
2004
|
-
className: styles$
|
|
1994
|
+
className: styles$c.body
|
|
2005
1995
|
}, /*#__PURE__*/React.createElement("h3", {
|
|
2006
|
-
className: styles$
|
|
1996
|
+
className: styles$c.title,
|
|
2007
1997
|
dangerouslySetInnerHTML: {
|
|
2008
1998
|
__html: localeData.title
|
|
2009
1999
|
}
|
|
@@ -2012,18 +2002,18 @@ const AnnouncementInText = ({
|
|
|
2012
2002
|
__html: localeData.text
|
|
2013
2003
|
}
|
|
2014
2004
|
})), /*#__PURE__*/React.createElement("div", {
|
|
2015
|
-
className: styles$
|
|
2005
|
+
className: styles$c.footer
|
|
2016
2006
|
}, /*#__PURE__*/React.createElement("a", {
|
|
2017
|
-
className: styles$
|
|
2007
|
+
className: styles$c.link,
|
|
2018
2008
|
href: localeData.href,
|
|
2019
2009
|
target: "_blank",
|
|
2020
2010
|
rel: "noreferrer"
|
|
2021
2011
|
}, /*#__PURE__*/React.createElement("span", null, localeData.button)), /*#__PURE__*/React.createElement("span", {
|
|
2022
|
-
className: styles$
|
|
2012
|
+
className: styles$c.button
|
|
2023
2013
|
}, /*#__PURE__*/React.createElement("span", null, localeData.button))));
|
|
2024
2014
|
};
|
|
2025
2015
|
|
|
2026
|
-
var styles$
|
|
2016
|
+
var styles$b = {"root":"VersesBlock-module_root__CrgSZ","ol":"VersesBlock-module_ol__ToXjg","ul":"VersesBlock-module_ul__wfaQD","center":"VersesBlock-module_center__E1IS-","isInImportantLead":"VersesBlock-module_isInImportantLead__pdugk","dark":"VersesBlock-module_dark__FwaPS","mobile":"VersesBlock-module_mobile__EcHvz","desktop":"VersesBlock-module_desktop__quKfJ"};
|
|
2027
2017
|
|
|
2028
2018
|
const VersesBlock = ({
|
|
2029
2019
|
block: {
|
|
@@ -2033,9 +2023,9 @@ const VersesBlock = ({
|
|
|
2033
2023
|
},
|
|
2034
2024
|
styleContext
|
|
2035
2025
|
}) => {
|
|
2036
|
-
let classNames = [[styles$
|
|
2026
|
+
let classNames = [[styles$b.root, true], [styles$b[onlyOn], true], [styles$b[type], !!type && !!styles$b[type]]];
|
|
2037
2027
|
if (styleContext) {
|
|
2038
|
-
classNames = makeStyleContext(classNames, styleContext, styles$
|
|
2028
|
+
classNames = makeStyleContext(classNames, styleContext, styles$b);
|
|
2039
2029
|
}
|
|
2040
2030
|
return /*#__PURE__*/React.createElement("ul", {
|
|
2041
2031
|
className: makeClassName(classNames),
|
|
@@ -2205,7 +2195,7 @@ const RenderBlocks = ({
|
|
|
2205
2195
|
}
|
|
2206
2196
|
};
|
|
2207
2197
|
|
|
2208
|
-
var styles$
|
|
2198
|
+
var styles$a = {"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-"};
|
|
2209
2199
|
|
|
2210
2200
|
const Cover = ({
|
|
2211
2201
|
block: {
|
|
@@ -2226,13 +2216,13 @@ const Cover = ({
|
|
|
2226
2216
|
}) => {
|
|
2227
2217
|
const [isPopoverShown, setIsPopoverShown] = React.useState(false);
|
|
2228
2218
|
const style = {};
|
|
2229
|
-
let classNames = [[styles$
|
|
2219
|
+
let classNames = [[styles$a.root, true], [styles$a[onlyOn], !!onlyOn && !!styles$a[onlyOn]]];
|
|
2230
2220
|
if (styleContext) {
|
|
2231
|
-
classNames = makeStyleContext(classNames, styleContext, styles$
|
|
2221
|
+
classNames = makeStyleContext(classNames, styleContext, styles$a);
|
|
2232
2222
|
}
|
|
2233
2223
|
if (gradients) {
|
|
2234
2224
|
const theme = [gradients.text_rgb === '0,0,0' ? 'dark' : 'light'];
|
|
2235
|
-
classNames = makeStyleContext(classNames, theme, styles$
|
|
2225
|
+
classNames = makeStyleContext(classNames, theme, styles$a);
|
|
2236
2226
|
style.backgroundImage = generateGradient(gradients.bg_rgb, 'mediaBlockBottom');
|
|
2237
2227
|
}
|
|
2238
2228
|
const renderCC = context => (/*#__PURE__*/React.createElement(MediaCaption, {
|
|
@@ -2244,20 +2234,20 @@ const Cover = ({
|
|
|
2244
2234
|
"data-testid": "cover",
|
|
2245
2235
|
className: makeClassName(classNames)
|
|
2246
2236
|
}, /*#__PURE__*/React.createElement("div", {
|
|
2247
|
-
className: styles$
|
|
2237
|
+
className: styles$a.image
|
|
2248
2238
|
}, /*#__PURE__*/React.createElement(Image, {
|
|
2249
2239
|
optimized: urls,
|
|
2250
2240
|
ratio: mobileRatio,
|
|
2251
2241
|
display: "narrow"
|
|
2252
2242
|
})), /*#__PURE__*/React.createElement("div", {
|
|
2253
|
-
className: styles$
|
|
2243
|
+
className: styles$a.body,
|
|
2254
2244
|
style: style
|
|
2255
2245
|
}, blocks.map(item => (/*#__PURE__*/React.createElement(RenderBlocks, {
|
|
2256
2246
|
key: item.id,
|
|
2257
2247
|
block: item,
|
|
2258
2248
|
styleContext: styleContext
|
|
2259
2249
|
})))), cc === 'button' && (/*#__PURE__*/React.createElement("button", {
|
|
2260
|
-
className: styles$
|
|
2250
|
+
className: styles$a.control,
|
|
2261
2251
|
type: "button",
|
|
2262
2252
|
"aria-label": "Open",
|
|
2263
2253
|
onClick: () => {
|
|
@@ -2270,7 +2260,7 @@ const Cover = ({
|
|
|
2270
2260
|
}, renderCC('isInPopover'))));
|
|
2271
2261
|
};
|
|
2272
2262
|
|
|
2273
|
-
var styles$
|
|
2263
|
+
var styles$9 = {"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"};
|
|
2274
2264
|
|
|
2275
2265
|
const HalfBlock = ({
|
|
2276
2266
|
block: {
|
|
@@ -2287,29 +2277,29 @@ const HalfBlock = ({
|
|
|
2287
2277
|
},
|
|
2288
2278
|
styleContext
|
|
2289
2279
|
}) => {
|
|
2290
|
-
let classNames = [[styles$
|
|
2280
|
+
let classNames = [[styles$9.root, true], [styles$9[onlyOn], true]];
|
|
2291
2281
|
if (styleContext) {
|
|
2292
|
-
classNames = makeStyleContext(classNames, styleContext, styles$
|
|
2282
|
+
classNames = makeStyleContext(classNames, styleContext, styles$9);
|
|
2293
2283
|
}
|
|
2294
2284
|
return /*#__PURE__*/React.createElement("div", {
|
|
2295
2285
|
"data-testid": "half-block",
|
|
2296
2286
|
className: makeClassName(classNames)
|
|
2297
2287
|
}, /*#__PURE__*/React.createElement("div", {
|
|
2298
|
-
className: styles$
|
|
2288
|
+
className: styles$9.main
|
|
2299
2289
|
}, /*#__PURE__*/React.createElement("div", {
|
|
2300
|
-
className: styles$
|
|
2290
|
+
className: styles$9.image
|
|
2301
2291
|
}, /*#__PURE__*/React.createElement(Image, {
|
|
2302
2292
|
optimized: optimized,
|
|
2303
2293
|
ratio: ratio,
|
|
2304
2294
|
display: "super_full"
|
|
2305
2295
|
})), /*#__PURE__*/React.createElement("div", {
|
|
2306
|
-
className: styles$
|
|
2296
|
+
className: styles$9.body
|
|
2307
2297
|
}, data.blocks.map(item => (/*#__PURE__*/React.createElement(RenderBlocks, {
|
|
2308
2298
|
key: item.id,
|
|
2309
2299
|
block: item,
|
|
2310
2300
|
styleContext: ['rich']
|
|
2311
2301
|
}))))), /*#__PURE__*/React.createElement("div", {
|
|
2312
|
-
className: styles$
|
|
2302
|
+
className: styles$9.footer
|
|
2313
2303
|
}, /*#__PURE__*/React.createElement(MediaCaption, {
|
|
2314
2304
|
credit: credit,
|
|
2315
2305
|
caption: caption,
|
|
@@ -2317,7 +2307,7 @@ const HalfBlock = ({
|
|
|
2317
2307
|
})));
|
|
2318
2308
|
};
|
|
2319
2309
|
|
|
2320
|
-
var styles$
|
|
2310
|
+
var styles$8 = {"root":"ImportantLead-module_root__-rnt6","slide":"ImportantLead-module_slide__zcovu","mobile":"ImportantLead-module_mobile__msInp","desktop":"ImportantLead-module_desktop__ELC2-"};
|
|
2321
2311
|
|
|
2322
2312
|
const ImportantLead = ({
|
|
2323
2313
|
block: {
|
|
@@ -2326,9 +2316,9 @@ const ImportantLead = ({
|
|
|
2326
2316
|
},
|
|
2327
2317
|
styleContext
|
|
2328
2318
|
}) => {
|
|
2329
|
-
let classNames = [[styles$
|
|
2319
|
+
let classNames = [[styles$8.root, true], [styles$8[onlyOn], !!onlyOn]];
|
|
2330
2320
|
if (styleContext) {
|
|
2331
|
-
classNames = makeStyleContext(classNames, styleContext, styles$
|
|
2321
|
+
classNames = makeStyleContext(classNames, styleContext, styles$8);
|
|
2332
2322
|
}
|
|
2333
2323
|
return /*#__PURE__*/React.createElement("div", {
|
|
2334
2324
|
"data-testid": "important-lead",
|
|
@@ -2340,7 +2330,7 @@ const ImportantLead = ({
|
|
|
2340
2330
|
}))));
|
|
2341
2331
|
};
|
|
2342
2332
|
|
|
2343
|
-
var styles$
|
|
2333
|
+
var styles$7 = {"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"};
|
|
2344
2334
|
|
|
2345
2335
|
const Spoiler = ({
|
|
2346
2336
|
block: {
|
|
@@ -2369,11 +2359,11 @@ const Spoiler = ({
|
|
|
2369
2359
|
postMessage('', 'openSpoiler', 'click');
|
|
2370
2360
|
}
|
|
2371
2361
|
};
|
|
2372
|
-
let classNames = [[styles$
|
|
2362
|
+
let classNames = [[styles$7.root, true], [styles$7[onlyOn], !!onlyOn], [styles$7[display], !!display && styles$7[display]], [[styles$7.spoiled], !!spoiled]];
|
|
2373
2363
|
const context = ['center'];
|
|
2374
2364
|
if (styleContext) {
|
|
2375
2365
|
context.concat(styleContext);
|
|
2376
|
-
classNames = makeStyleContext(classNames, styleContext, styles$
|
|
2366
|
+
classNames = makeStyleContext(classNames, styleContext, styles$7);
|
|
2377
2367
|
}
|
|
2378
2368
|
const buttonCollapse = button ? button.collapse : 'Свернуть';
|
|
2379
2369
|
const buttonExpande = button ? button.expand : buttonTitle;
|
|
@@ -2382,15 +2372,15 @@ const Spoiler = ({
|
|
|
2382
2372
|
className: makeClassName(classNames),
|
|
2383
2373
|
"data-testid": "spoiler"
|
|
2384
2374
|
}, /*#__PURE__*/React.createElement("div", {
|
|
2385
|
-
className: styles$
|
|
2375
|
+
className: styles$7.header
|
|
2386
2376
|
}, title && /*#__PURE__*/React.createElement("h3", null, title)), /*#__PURE__*/React.createElement("div", {
|
|
2387
|
-
className: styles$
|
|
2377
|
+
className: styles$7.body
|
|
2388
2378
|
}, blocks.map(item => (/*#__PURE__*/React.createElement(RenderBlocks, {
|
|
2389
2379
|
key: item.id,
|
|
2390
2380
|
block: item,
|
|
2391
2381
|
styleContext: context
|
|
2392
2382
|
})))), /*#__PURE__*/React.createElement("div", {
|
|
2393
|
-
className: styles$
|
|
2383
|
+
className: styles$7.footer
|
|
2394
2384
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
2395
2385
|
size: "default",
|
|
2396
2386
|
theme: "gray",
|
|
@@ -2401,7 +2391,7 @@ const Spoiler = ({
|
|
|
2401
2391
|
}))));
|
|
2402
2392
|
};
|
|
2403
2393
|
|
|
2404
|
-
var styles$
|
|
2394
|
+
var styles$6 = {"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"};
|
|
2405
2395
|
|
|
2406
2396
|
/* eslint-disable react/jsx-no-target-blank */
|
|
2407
2397
|
const RelatedRichBlock = ({
|
|
@@ -2438,16 +2428,16 @@ const RelatedRichBlock = ({
|
|
|
2438
2428
|
const handleClick = () => {
|
|
2439
2429
|
postMessage('richRelated', url, 'click');
|
|
2440
2430
|
};
|
|
2441
|
-
let classNames = [[styles$
|
|
2431
|
+
let classNames = [[styles$6.root, true], [styles$6[cardType], !!layout && !!styles$6[cardType]], [styles$6.hasGradient, !!gradients], [styles$6[onlyOn], !!onlyOn && !!styles$6[onlyOn]]];
|
|
2442
2432
|
let context = ['isInMediaBlock'];
|
|
2443
2433
|
if (styleContext) {
|
|
2444
|
-
classNames = makeStyleContext(classNames, styleContext, styles$
|
|
2434
|
+
classNames = makeStyleContext(classNames, styleContext, styles$6);
|
|
2445
2435
|
context = [...styleContext, 'isInMediaBlock'];
|
|
2446
2436
|
}
|
|
2447
2437
|
if (gradients) {
|
|
2448
2438
|
styleHeader.backgroundImage = generateGradient(gradients.bg_rgb, 'mediaBlockTop');
|
|
2449
2439
|
const theme = [gradients.text_rgb === '0,0,0' ? 'dark' : 'light'];
|
|
2450
|
-
classNames = makeStyleContext(classNames, theme, styles$
|
|
2440
|
+
classNames = makeStyleContext(classNames, theme, styles$6);
|
|
2451
2441
|
if (onlyOn === 'desktop') {
|
|
2452
2442
|
style.backgroundImage = generateGradient(gradients.bg_rgb, 'mediaBlockBottom');
|
|
2453
2443
|
}
|
|
@@ -2459,27 +2449,27 @@ const RelatedRichBlock = ({
|
|
|
2459
2449
|
onClick: () => handleClick(),
|
|
2460
2450
|
ref: ref
|
|
2461
2451
|
}, layout === 'rich' && (/*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
2462
|
-
className: styles$
|
|
2452
|
+
className: styles$6.overlay,
|
|
2463
2453
|
style: style
|
|
2464
2454
|
}), /*#__PURE__*/React.createElement("div", {
|
|
2465
|
-
className: styles$
|
|
2455
|
+
className: styles$6.overlayHeader,
|
|
2466
2456
|
style: styleHeader
|
|
2467
2457
|
}))), /*#__PURE__*/React.createElement("div", {
|
|
2468
|
-
className: styles$
|
|
2458
|
+
className: styles$6.tag
|
|
2469
2459
|
}, /*#__PURE__*/React.createElement(Tag, {
|
|
2470
2460
|
size: "small",
|
|
2471
2461
|
theme: "inherit",
|
|
2472
2462
|
styleContext: "richRelated"
|
|
2473
2463
|
}, tag)), /*#__PURE__*/React.createElement("div", {
|
|
2474
|
-
className: styles$
|
|
2464
|
+
className: styles$6.cover
|
|
2475
2465
|
}, /*#__PURE__*/React.createElement("div", {
|
|
2476
|
-
className: styles$
|
|
2466
|
+
className: styles$6.picture
|
|
2477
2467
|
}, /*#__PURE__*/React.createElement(Image, {
|
|
2478
2468
|
optimized: urls,
|
|
2479
2469
|
ratio: ratio,
|
|
2480
2470
|
display: "narrow"
|
|
2481
2471
|
}))), /*#__PURE__*/React.createElement("div", {
|
|
2482
|
-
className: styles$
|
|
2472
|
+
className: styles$6.body
|
|
2483
2473
|
}, blocks.map(item => (/*#__PURE__*/React.createElement(RenderBlocks, {
|
|
2484
2474
|
key: item.id,
|
|
2485
2475
|
block: item,
|
|
@@ -2487,7 +2477,7 @@ const RelatedRichBlock = ({
|
|
|
2487
2477
|
})))));
|
|
2488
2478
|
};
|
|
2489
2479
|
|
|
2490
|
-
var styles$
|
|
2480
|
+
var styles$5 = {"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"};
|
|
2491
2481
|
|
|
2492
2482
|
/* eslint-disable react/jsx-no-target-blank */
|
|
2493
2483
|
const ShopRelatedBlock = ({
|
|
@@ -2524,14 +2514,14 @@ const ShopRelatedBlock = ({
|
|
|
2524
2514
|
const handleClick = () => {
|
|
2525
2515
|
postMessage('productRelated', url, 'click');
|
|
2526
2516
|
};
|
|
2527
|
-
let classNames = [[styles$
|
|
2517
|
+
let classNames = [[styles$5.root, true], [styles$5.hasGradient, !!gradients], [styles$5[onlyOn], !!onlyOn && !!styles$5[onlyOn]]];
|
|
2528
2518
|
if (styleContext) {
|
|
2529
|
-
classNames = makeStyleContext(classNames, styleContext, styles$
|
|
2519
|
+
classNames = makeStyleContext(classNames, styleContext, styles$5);
|
|
2530
2520
|
}
|
|
2531
2521
|
if (gradients) {
|
|
2532
2522
|
styleHeader.backgroundImage = generateGradient(gradients.bg_rgb, 'mediaBlockTop');
|
|
2533
2523
|
const theme = [gradients.text_rgb === '0,0,0' ? 'dark' : 'light'];
|
|
2534
|
-
classNames = makeStyleContext(classNames, theme, styles$
|
|
2524
|
+
classNames = makeStyleContext(classNames, theme, styles$5);
|
|
2535
2525
|
if (onlyOn === 'desktop') {
|
|
2536
2526
|
style.backgroundImage = generateGradient(gradients.bg_rgb, 'mediaBlockBottom');
|
|
2537
2527
|
}
|
|
@@ -2544,35 +2534,35 @@ const ShopRelatedBlock = ({
|
|
|
2544
2534
|
onClick: () => handleClick(),
|
|
2545
2535
|
ref: ref
|
|
2546
2536
|
}, layout === 'rich' && (/*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
2547
|
-
className: styles$
|
|
2537
|
+
className: styles$5.overlay,
|
|
2548
2538
|
style: style
|
|
2549
2539
|
}), /*#__PURE__*/React.createElement("div", {
|
|
2550
|
-
className: styles$
|
|
2540
|
+
className: styles$5.overlayHeader,
|
|
2551
2541
|
style: styleHeader
|
|
2552
2542
|
}))), /*#__PURE__*/React.createElement("div", {
|
|
2553
|
-
className: styles$
|
|
2543
|
+
className: styles$5.tag
|
|
2554
2544
|
}, /*#__PURE__*/React.createElement(Tag, {
|
|
2555
2545
|
size: "small",
|
|
2556
2546
|
theme: "inherit",
|
|
2557
2547
|
styleContext: "richRelated"
|
|
2558
2548
|
}, tag)), /*#__PURE__*/React.createElement("div", {
|
|
2559
|
-
className: styles$
|
|
2549
|
+
className: styles$5.cover
|
|
2560
2550
|
}, /*#__PURE__*/React.createElement("div", {
|
|
2561
|
-
className: styles$
|
|
2551
|
+
className: styles$5.picture
|
|
2562
2552
|
}, /*#__PURE__*/React.createElement(Image, {
|
|
2563
2553
|
optimized: urls,
|
|
2564
2554
|
ratio: ratio,
|
|
2565
2555
|
display: "narrow"
|
|
2566
2556
|
}))), /*#__PURE__*/React.createElement("div", {
|
|
2567
|
-
className: styles$
|
|
2557
|
+
className: styles$5.body
|
|
2568
2558
|
}, /*#__PURE__*/React.createElement("h2", {
|
|
2569
|
-
className: styles$
|
|
2559
|
+
className: styles$5.title
|
|
2570
2560
|
}, firstTitle, /*#__PURE__*/React.createElement("span", {
|
|
2571
|
-
className: styles$
|
|
2561
|
+
className: styles$5.price
|
|
2572
2562
|
}, secondTitle))));
|
|
2573
2563
|
};
|
|
2574
2564
|
|
|
2575
|
-
var styles$
|
|
2565
|
+
var styles$4 = {"root":"RelatedBook-module_root__QsOmA","container":"RelatedBook-module_container__vdDiZ","imageWrap":"RelatedBook-module_imageWrap__WmwnE","image":"RelatedBook-module_image__U1e5t","picture":"RelatedBook-module_picture__NXg-K","tag":"RelatedBook-module_tag__mSbbz","contentWrap":"RelatedBook-module_contentWrap__HIGRi","content":"RelatedBook-module_content__23Pfr","title":"RelatedBook-module_title__VRbr-","footer":"RelatedBook-module_footer__Z05t-","center":"RelatedBook-module_center__Fa6cj","isLight":"RelatedBook-module_isLight__W-0TO","isDark":"RelatedBook-module_isDark__0mrtK","mobile":"RelatedBook-module_mobile__7rm-n","desktop":"RelatedBook-module_desktop__OZ9Jx"};
|
|
2576
2566
|
|
|
2577
2567
|
const RelatedBook = ({
|
|
2578
2568
|
block,
|
|
@@ -2580,9 +2570,9 @@ const RelatedBook = ({
|
|
|
2580
2570
|
}) => {
|
|
2581
2571
|
const theme = block.data.theme.text_color === '0,0,0' ? 'isDark' : 'isLight';
|
|
2582
2572
|
const onlyOn = block.only_on || block.data.onlyOn;
|
|
2583
|
-
let classNames = [[styles$
|
|
2573
|
+
let classNames = [[styles$4.root, true], [styles$4[theme], theme], [styles$4[onlyOn], !!onlyOn && !!styles$4[onlyOn]]];
|
|
2584
2574
|
if (styleContext) {
|
|
2585
|
-
classNames = makeStyleContext(classNames, styleContext, styles$
|
|
2575
|
+
classNames = makeStyleContext(classNames, styleContext, styles$4);
|
|
2586
2576
|
}
|
|
2587
2577
|
const cssProps = {
|
|
2588
2578
|
'--bgColor': `rgb(${block.data.theme.background_color || '0, 0, 0'})`
|
|
@@ -2592,13 +2582,13 @@ const RelatedBook = ({
|
|
|
2592
2582
|
className: makeClassName(classNames),
|
|
2593
2583
|
style: cssProps
|
|
2594
2584
|
}, /*#__PURE__*/React.createElement("div", {
|
|
2595
|
-
className: styles$
|
|
2585
|
+
className: styles$4.container
|
|
2596
2586
|
}, /*#__PURE__*/React.createElement("div", {
|
|
2597
|
-
className: styles$
|
|
2587
|
+
className: styles$4.imageWrap
|
|
2598
2588
|
}, /*#__PURE__*/React.createElement("div", {
|
|
2599
|
-
className: styles$
|
|
2589
|
+
className: styles$4.image
|
|
2600
2590
|
}, /*#__PURE__*/React.createElement("picture", {
|
|
2601
|
-
className: styles$
|
|
2591
|
+
className: styles$4.picture
|
|
2602
2592
|
}, /*#__PURE__*/React.createElement(Image, {
|
|
2603
2593
|
optimized: block.data.cover.urls,
|
|
2604
2594
|
ratio: 0,
|
|
@@ -2606,9 +2596,9 @@ const RelatedBook = ({
|
|
|
2606
2596
|
styleContext: ['isStatic'],
|
|
2607
2597
|
lazy: true
|
|
2608
2598
|
})))), /*#__PURE__*/React.createElement("div", {
|
|
2609
|
-
className: styles$
|
|
2599
|
+
className: styles$4.contentWrap
|
|
2610
2600
|
}, /*#__PURE__*/React.createElement("div", {
|
|
2611
|
-
className: styles$
|
|
2601
|
+
className: styles$4.content
|
|
2612
2602
|
}, block.data.blocks.map(item => (/*#__PURE__*/React.createElement(RenderBlocks, {
|
|
2613
2603
|
key: item.id,
|
|
2614
2604
|
block: item,
|
|
@@ -2692,7 +2682,7 @@ const RawHtmlBlock = ({
|
|
|
2692
2682
|
}
|
|
2693
2683
|
};
|
|
2694
2684
|
|
|
2695
|
-
var styles$
|
|
2685
|
+
var styles$3 = {"root":"ListViewSwitcher-module_root__pBsR5","input":"ListViewSwitcher-module_input__vtDVD","knob":"ListViewSwitcher-module_knob__g-OZ2","sm":"ListViewSwitcher-module_sm__y1teD","md":"ListViewSwitcher-module_md__0M8KR","grid":"ListViewSwitcher-module_grid__qBmnM","list":"ListViewSwitcher-module_list__NORMp"};
|
|
2696
2686
|
|
|
2697
2687
|
/* eslint-disable jsx-a11y/label-has-associated-control */
|
|
2698
2688
|
const ListViewSwitcher = ({
|
|
@@ -2701,20 +2691,134 @@ const ListViewSwitcher = ({
|
|
|
2701
2691
|
size = 'md'
|
|
2702
2692
|
}) => (/*#__PURE__*/React.createElement("label", {
|
|
2703
2693
|
"data-testid": "listViewSwitcher",
|
|
2704
|
-
className: makeClassName([[styles$
|
|
2694
|
+
className: makeClassName([[styles$3.root, true], [styles$3[size], true]])
|
|
2705
2695
|
}, /*#__PURE__*/React.createElement("input", {
|
|
2706
|
-
className: styles$
|
|
2696
|
+
className: styles$3.input,
|
|
2707
2697
|
type: "checkbox",
|
|
2708
2698
|
checked: enabled,
|
|
2709
2699
|
onChange: onChange
|
|
2710
2700
|
}), /*#__PURE__*/React.createElement("span", {
|
|
2711
|
-
className: styles$
|
|
2701
|
+
className: styles$3.knob
|
|
2712
2702
|
}), /*#__PURE__*/React.createElement("span", {
|
|
2713
|
-
className: styles$
|
|
2703
|
+
className: styles$3.grid
|
|
2714
2704
|
}), /*#__PURE__*/React.createElement("span", {
|
|
2715
|
-
className: styles$
|
|
2705
|
+
className: styles$3.list
|
|
2716
2706
|
})));
|
|
2717
2707
|
|
|
2708
|
+
var styles$2 = {"root":"RelatedCarousel-module_root__G-Eub","track":"RelatedCarousel-module_track__UVQ2n","slide":"RelatedCarousel-module_slide__MI9tF","dots":"RelatedCarousel-module_dots__mOSIC","dotsTrack":"RelatedCarousel-module_dotsTrack__V7bnX","dotCell":"RelatedCarousel-module_dotCell__kl64s","dot":"RelatedCarousel-module_dot__Jo52r","isSmall":"RelatedCarousel-module_isSmall__ZP5hd","isTiny":"RelatedCarousel-module_isTiny__mjhtD","isActive":"RelatedCarousel-module_isActive__Nz2aj"};
|
|
2709
|
+
|
|
2710
|
+
const VISIBLE_DOTS = 6;
|
|
2711
|
+
const EDGE_DOTS = 2;
|
|
2712
|
+
const getDotsStart = (activeIndex, currentStart, total) => {
|
|
2713
|
+
if (total <= VISIBLE_DOTS) {
|
|
2714
|
+
return 0;
|
|
2715
|
+
}
|
|
2716
|
+
let start = currentStart;
|
|
2717
|
+
if (activeIndex < start + EDGE_DOTS) {
|
|
2718
|
+
start = activeIndex - EDGE_DOTS;
|
|
2719
|
+
}
|
|
2720
|
+
if (activeIndex > start + VISIBLE_DOTS - 1 - EDGE_DOTS) {
|
|
2721
|
+
start = activeIndex - VISIBLE_DOTS + 1 + EDGE_DOTS;
|
|
2722
|
+
}
|
|
2723
|
+
return Math.max(0, Math.min(start, total - VISIBLE_DOTS));
|
|
2724
|
+
};
|
|
2725
|
+
const getDotScale = (index, start, total) => {
|
|
2726
|
+
const position = index - start;
|
|
2727
|
+
const hasBefore = start > 0;
|
|
2728
|
+
const hasAfter = start + VISIBLE_DOTS < total;
|
|
2729
|
+
if (hasBefore && position === 0) {
|
|
2730
|
+
return 'tiny';
|
|
2731
|
+
}
|
|
2732
|
+
if (hasBefore && position === 1) {
|
|
2733
|
+
return 'small';
|
|
2734
|
+
}
|
|
2735
|
+
if (hasAfter && position === VISIBLE_DOTS - 1) {
|
|
2736
|
+
return 'tiny';
|
|
2737
|
+
}
|
|
2738
|
+
if (hasAfter && position === VISIBLE_DOTS - 2) {
|
|
2739
|
+
return 'small';
|
|
2740
|
+
}
|
|
2741
|
+
return 'full';
|
|
2742
|
+
};
|
|
2743
|
+
const getSlideStep = track => {
|
|
2744
|
+
if (!track) {
|
|
2745
|
+
return 0;
|
|
2746
|
+
}
|
|
2747
|
+
const [first, second] = Array.from(track.children);
|
|
2748
|
+
if (!first) {
|
|
2749
|
+
return 0;
|
|
2750
|
+
}
|
|
2751
|
+
return second ? second.offsetLeft - first.offsetLeft : first.offsetWidth;
|
|
2752
|
+
};
|
|
2753
|
+
const RelatedCarousel = ({
|
|
2754
|
+
children,
|
|
2755
|
+
ariaLabel
|
|
2756
|
+
}) => {
|
|
2757
|
+
const trackRef = React.useRef(null);
|
|
2758
|
+
const frameRef = React.useRef(0);
|
|
2759
|
+
const [activeIndex, setActiveIndex] = React.useState(0);
|
|
2760
|
+
const [dotsStart, setDotsStart] = React.useState(0);
|
|
2761
|
+
const slides = React.Children.toArray(children);
|
|
2762
|
+
const lastIndex = slides.length - 1;
|
|
2763
|
+
const total = slides.length;
|
|
2764
|
+
React.useEffect(() => {
|
|
2765
|
+
const track = trackRef.current;
|
|
2766
|
+
if (!track) {
|
|
2767
|
+
return undefined;
|
|
2768
|
+
}
|
|
2769
|
+
const handleScroll = () => {
|
|
2770
|
+
cancelAnimationFrame(frameRef.current);
|
|
2771
|
+
frameRef.current = requestAnimationFrame(() => {
|
|
2772
|
+
const step = getSlideStep(track);
|
|
2773
|
+
if (!step) {
|
|
2774
|
+
return;
|
|
2775
|
+
}
|
|
2776
|
+
const index = Math.max(0, Math.min(lastIndex, Math.round(track.scrollLeft / step)));
|
|
2777
|
+
setActiveIndex(index);
|
|
2778
|
+
setDotsStart(start => getDotsStart(index, start, lastIndex + 1));
|
|
2779
|
+
});
|
|
2780
|
+
};
|
|
2781
|
+
track.addEventListener('scroll', handleScroll, {
|
|
2782
|
+
passive: true
|
|
2783
|
+
});
|
|
2784
|
+
return () => {
|
|
2785
|
+
cancelAnimationFrame(frameRef.current);
|
|
2786
|
+
track.removeEventListener('scroll', handleScroll);
|
|
2787
|
+
};
|
|
2788
|
+
}, [lastIndex]);
|
|
2789
|
+
const dotsStyle = {
|
|
2790
|
+
'--dotsVisible': Math.min(total, VISIBLE_DOTS),
|
|
2791
|
+
'--dotsStart': dotsStart
|
|
2792
|
+
};
|
|
2793
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
2794
|
+
"data-testid": "related-carousel",
|
|
2795
|
+
className: makeClassName([[styles$2.root, true]]),
|
|
2796
|
+
role: "group",
|
|
2797
|
+
"aria-label": ariaLabel
|
|
2798
|
+
}, /*#__PURE__*/React.createElement("ul", {
|
|
2799
|
+
className: styles$2.track,
|
|
2800
|
+
ref: trackRef
|
|
2801
|
+
}, slides.map((slide, index) => (/*#__PURE__*/React.createElement("li", {
|
|
2802
|
+
className: styles$2.slide,
|
|
2803
|
+
key: index
|
|
2804
|
+
}, slide)))), /*#__PURE__*/React.createElement("div", {
|
|
2805
|
+
"aria-hidden": "true",
|
|
2806
|
+
className: styles$2.dots,
|
|
2807
|
+
style: dotsStyle
|
|
2808
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
2809
|
+
className: styles$2.dotsTrack
|
|
2810
|
+
}, slides.map((_slide, index) => {
|
|
2811
|
+
const isActive = index === activeIndex;
|
|
2812
|
+
const scale = getDotScale(index, dotsStart, total);
|
|
2813
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
2814
|
+
key: index,
|
|
2815
|
+
className: styles$2.dotCell
|
|
2816
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
2817
|
+
className: makeClassName([[styles$2.dot, true], [styles$2.isActive, isActive], [styles$2.isSmall, scale === 'small'], [styles$2.isTiny, scale === 'tiny']])
|
|
2818
|
+
}));
|
|
2819
|
+
}))));
|
|
2820
|
+
};
|
|
2821
|
+
|
|
2718
2822
|
var styles$1 = {"root":"ToolbarButton-module_root__upsEH","isDark":"ToolbarButton-module_isDark__gWpv-","dark":"ToolbarButton-module_dark__5XOEp","icon":"ToolbarButton-module_icon__Ldcgq","text":"ToolbarButton-module_text__4R2a0","isActive":"ToolbarButton-module_isActive__N4kkV"};
|
|
2719
2823
|
|
|
2720
2824
|
const ToolbarButton = ({
|
|
@@ -2793,6 +2897,7 @@ exports.Primary = Primary;
|
|
|
2793
2897
|
exports.QuoteBlock = QuoteBlock;
|
|
2794
2898
|
exports.RawHtmlBlock = RawHtmlBlock;
|
|
2795
2899
|
exports.RelatedBlock = RelatedBlock;
|
|
2900
|
+
exports.RelatedCarousel = RelatedCarousel;
|
|
2796
2901
|
exports.RelatedRichBlock = RelatedRichBlock;
|
|
2797
2902
|
exports.RenderBlocks = RenderBlocks;
|
|
2798
2903
|
exports.RichTitle = RichTitle;
|