@meduza/ui-kit-2 0.1.75 → 0.1.77
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/DonatesTeaser/DonatesTeaser.types.d.ts +1 -0
- package/dist/MaterialNote/MaterialNote.types.d.ts +1 -0
- package/dist/ui-kit-2.cjs.development.js +34 -10
- 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 +34 -10
- package/dist/ui-kit-2.esm.js.map +1 -1
- package/dist/ui-kit.css +1364 -1369
- package/package.json +1 -1
- package/src/DonatesTeaser/DonatesTeaser.module.css +1 -7
- package/src/DonatesTeaser/DonatesTeaser.stories.tsx +2 -1
- package/src/DonatesTeaser/DonatesTeaser.types.ts +1 -0
- package/src/DonatesTeaser/index.tsx +26 -8
- package/src/MaterialNote/MaterialNote.types.ts +1 -0
- package/src/MaterialNote/index.tsx +2 -1
- package/src/RenderBlocks/index.tsx +3 -1
package/dist/ui-kit-2.esm.js
CHANGED
|
@@ -900,16 +900,32 @@ var Table = function Table(_ref) {
|
|
|
900
900
|
}));
|
|
901
901
|
};
|
|
902
902
|
|
|
903
|
-
var styles$b = {"root":"DonatesTeaser-module_root__3rtaJ","ctaInner":"DonatesTeaser-module_ctaInner__2LChL","main":"DonatesTeaser-module_main__YBt6p","
|
|
903
|
+
var styles$b = {"root":"DonatesTeaser-module_root__3rtaJ","ctaInner":"DonatesTeaser-module_ctaInner__2LChL","main":"DonatesTeaser-module_main__YBt6p","title":"DonatesTeaser-module_title__hs-yr","text":"DonatesTeaser-module_text__ro-QA","cta":"DonatesTeaser-module_cta__1orPb","center":"DonatesTeaser-module_center__2Ynx9","isInCard":"DonatesTeaser-module_isInCard__HrFh8","isInSlide":"DonatesTeaser-module_isInSlide__1vC4Z"};
|
|
904
904
|
|
|
905
905
|
var DonatesTeaser = function DonatesTeaser(_ref) {
|
|
906
|
-
var styleContext = _ref.styleContext
|
|
906
|
+
var styleContext = _ref.styleContext,
|
|
907
|
+
_ref$lang = _ref.lang,
|
|
908
|
+
lang = _ref$lang === void 0 ? 'ru' : _ref$lang;
|
|
907
909
|
var classNames = [[styles$b.root, true]];
|
|
908
910
|
|
|
909
911
|
if (styleContext) {
|
|
910
912
|
classNames = makeStyleContext(classNames, styleContext, styles$b);
|
|
911
913
|
}
|
|
912
914
|
|
|
915
|
+
var data = {
|
|
916
|
+
ru: {
|
|
917
|
+
title: 'Вы читали «Медузу». Вы слушали «Медузу». Вы смотрели «Медузу»',
|
|
918
|
+
subtitle: 'Помогите нам спасти «Медузу»',
|
|
919
|
+
button: 'Дать денег',
|
|
920
|
+
href: 'https://support.meduza.io'
|
|
921
|
+
},
|
|
922
|
+
en: {
|
|
923
|
+
title: 'You read Meduza. You listen to Meduza. You follow Meduza',
|
|
924
|
+
subtitle: 'Help save Meduza',
|
|
925
|
+
button: 'Pledge today',
|
|
926
|
+
href: 'https://support.meduza.io/en'
|
|
927
|
+
}
|
|
928
|
+
};
|
|
913
929
|
return React.createElement("div", {
|
|
914
930
|
"data-testid": "donates-teaser",
|
|
915
931
|
className: makeClassName(classNames)
|
|
@@ -917,25 +933,31 @@ var DonatesTeaser = function DonatesTeaser(_ref) {
|
|
|
917
933
|
className: styles$b.main
|
|
918
934
|
}, React.createElement("h3", {
|
|
919
935
|
className: styles$b.title
|
|
920
|
-
},
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
}, "
|
|
936
|
+
}, React.createElement("span", {
|
|
937
|
+
dangerouslySetInnerHTML: {
|
|
938
|
+
__html: data[lang].title
|
|
939
|
+
}
|
|
940
|
+
}), " ", React.createElement("span", {
|
|
941
|
+
className: styles$b.text,
|
|
942
|
+
dangerouslySetInnerHTML: {
|
|
943
|
+
__html: data[lang].subtitle
|
|
944
|
+
}
|
|
945
|
+
}))), React.createElement("div", {
|
|
925
946
|
className: styles$b.cta
|
|
926
947
|
}, React.createElement("a", {
|
|
927
|
-
href:
|
|
948
|
+
href: data[lang].href,
|
|
928
949
|
target: "_blank",
|
|
929
950
|
rel: "noreferrer"
|
|
930
951
|
}, React.createElement("span", {
|
|
931
952
|
className: styles$b.ctaInner
|
|
932
|
-
},
|
|
953
|
+
}, data[lang].button))));
|
|
933
954
|
};
|
|
934
955
|
|
|
935
956
|
var styles$c = {"root":"MaterialNote-module_root__1AcYe","dark":"MaterialNote-module_dark__xCry-","note_credit":"MaterialNote-module_note_credit__PuFyX","note_caption":"MaterialNote-module_note_caption__1ezSo","center":"MaterialNote-module_center__18RxI","default":"MaterialNote-module_default__1lQPl","card":"MaterialNote-module_card__OWXbQ","slide":"MaterialNote-module_slide__1ZBBq","game":"MaterialNote-module_game__cADMe","gameSurvey":"MaterialNote-module_gameSurvey__3SiG-"};
|
|
936
957
|
|
|
937
958
|
var MaterialNote = function MaterialNote(_ref) {
|
|
938
959
|
var data = _ref.block.data,
|
|
960
|
+
lang = _ref.lang,
|
|
939
961
|
styleContext = _ref.styleContext;
|
|
940
962
|
var classNames = [[styles$c.root, true]];
|
|
941
963
|
|
|
@@ -944,7 +966,8 @@ var MaterialNote = function MaterialNote(_ref) {
|
|
|
944
966
|
}
|
|
945
967
|
|
|
946
968
|
return React.createElement(React.Fragment, null, React.createElement(DonatesTeaser, {
|
|
947
|
-
styleContext: styleContext
|
|
969
|
+
styleContext: styleContext,
|
|
970
|
+
lang: lang
|
|
948
971
|
}), React.createElement("div", {
|
|
949
972
|
"data-testid": "material-note",
|
|
950
973
|
className: makeClassName(classNames)
|
|
@@ -2167,6 +2190,7 @@ var RenderBlocks = function RenderBlocks(_ref) {
|
|
|
2167
2190
|
case 'material_note':
|
|
2168
2191
|
return React.createElement(MaterialNote, {
|
|
2169
2192
|
block: block,
|
|
2193
|
+
lang: lang,
|
|
2170
2194
|
styleContext: styleContext
|
|
2171
2195
|
});
|
|
2172
2196
|
|