@redneckz/wildless-cms-uni-blocks 0.4.1 → 0.4.2
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/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +49 -54
- package/bundle/bundle.umd.min.js +1 -1
- package/dist/components/BaseTile/BaseTile.js +1 -1
- package/dist/components/BaseTile/BaseTile.js.map +1 -1
- package/dist/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
- package/dist/components/BenefitsBlock/BenefitsBlockContent.d.ts +2 -2
- package/dist/components/BlockContent.d.ts +1 -2
- package/dist/components/Blocks.d.ts +0 -1
- package/dist/components/Blocks.js +0 -2
- package/dist/components/Blocks.js.map +1 -1
- package/dist/components/Footer/MediaButton.d.ts +1 -1
- package/dist/components/Footer/SocialMedia.d.ts +1 -1
- package/dist/components/Footer/SocialMedia.mobile.d.ts +1 -1
- package/dist/components/Gallery/GalleryContainer.js.map +1 -1
- package/dist/components/PictureText/PictureText.js +14 -5
- package/dist/components/PictureText/PictureText.js.map +1 -1
- package/dist/components/PictureText/PictureTextContent.d.ts +8 -16
- package/dist/components/ProductBlock/ProductBlockContent.d.ts +3 -15
- package/dist/components/ProductBlock/ProductBlockInner.js +1 -1
- package/dist/components/ProductBlock/ProductBlockInner.js.map +1 -1
- package/dist/components/ProductBlock/ProductBlockInner.mobile.js +1 -1
- package/dist/components/ProductBlock/ProductBlockInner.mobile.js.map +1 -1
- package/dist/components/ProductBlock/renderBenefit.d.ts +4 -2
- package/dist/components/ProductBlock/renderBenefit.js +3 -22
- package/dist/components/ProductBlock/renderBenefit.js.map +1 -1
- package/dist/components/ProductGallery/ProductGallery.js +5 -5
- package/dist/components/ProductGallery/ProductGallery.js.map +1 -1
- package/dist/components/ProductTile/ProductTile.js +1 -1
- package/dist/components/ProductTile/ProductTile.js.map +1 -1
- package/dist/components/PromoTile/PromoTile.js +1 -1
- package/dist/components/PromoTile/PromoTile.js.map +1 -1
- package/dist/components/Recommendation/RecommendationCard.d.ts +1 -1
- package/dist/components/StepsBlock/StepsBlockStyleMaps.d.ts +1 -1
- package/dist/ui-kit/BenefitItem/BenefitItem.d.ts +4 -0
- package/dist/ui-kit/BenefitItem/BenefitItem.js +29 -0
- package/dist/ui-kit/BenefitItem/BenefitItem.js.map +1 -0
- package/dist/ui-kit/BenefitItem/BenefitItemProps.d.ts +24 -0
- package/dist/{components/Insurance/InsuranceContent.js → ui-kit/BenefitItem/BenefitItemProps.js} +1 -1
- package/dist/ui-kit/BenefitItem/BenefitItemProps.js.map +1 -0
- package/dist/ui-kit/Foldable/Foldable.js +1 -1
- package/dist/ui-kit/Foldable/Foldable.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/BaseTile/BaseTile.js +1 -1
- package/lib/components/BaseTile/BaseTile.js.map +1 -1
- package/lib/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
- package/lib/components/BenefitsBlock/BenefitsBlockContent.d.ts +2 -2
- package/lib/components/BlockContent.d.ts +1 -2
- package/lib/components/Blocks.d.ts +0 -1
- package/lib/components/Blocks.js +0 -2
- package/lib/components/Blocks.js.map +1 -1
- package/lib/components/Footer/MediaButton.d.ts +1 -1
- package/lib/components/Footer/SocialMedia.d.ts +1 -1
- package/lib/components/Footer/SocialMedia.mobile.d.ts +1 -1
- package/lib/components/Gallery/GalleryContainer.js.map +1 -1
- package/lib/components/PictureText/PictureText.fixture.d.ts +4 -0
- package/lib/components/PictureText/PictureText.js +14 -5
- package/lib/components/PictureText/PictureText.js.map +1 -1
- package/lib/components/PictureText/PictureTextContent.d.ts +8 -16
- package/lib/components/ProductBlock/ProductBlockContent.d.ts +3 -15
- package/lib/components/ProductBlock/ProductBlockInner.js +1 -1
- package/lib/components/ProductBlock/ProductBlockInner.js.map +1 -1
- package/lib/components/ProductBlock/ProductBlockInner.mobile.js +1 -1
- package/lib/components/ProductBlock/ProductBlockInner.mobile.js.map +1 -1
- package/lib/components/ProductBlock/renderBenefit.d.ts +4 -3
- package/lib/components/ProductBlock/renderBenefit.js +4 -23
- package/lib/components/ProductBlock/renderBenefit.js.map +1 -1
- package/lib/components/ProductGallery/ProductGallery.js +5 -5
- package/lib/components/ProductGallery/ProductGallery.js.map +1 -1
- package/lib/components/ProductTile/ProductTile.js +1 -1
- package/lib/components/ProductTile/ProductTile.js.map +1 -1
- package/lib/components/PromoTile/PromoTile.js +1 -1
- package/lib/components/PromoTile/PromoTile.js.map +1 -1
- package/lib/components/Recommendation/RecommendationCard.d.ts +1 -1
- package/lib/components/StepsBlock/StepsBlockStyleMaps.d.ts +1 -1
- package/lib/ui-kit/BenefitItem/BenefitItem.d.ts +4 -0
- package/lib/ui-kit/BenefitItem/BenefitItem.js +27 -0
- package/lib/ui-kit/BenefitItem/BenefitItem.js.map +1 -0
- package/lib/ui-kit/BenefitItem/BenefitItemProps.d.ts +24 -0
- package/lib/ui-kit/BenefitItem/BenefitItemProps.js +2 -0
- package/lib/ui-kit/BenefitItem/BenefitItemProps.js.map +1 -0
- package/lib/ui-kit/Foldable/Foldable.js +1 -1
- package/lib/ui-kit/Foldable/Foldable.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +20 -12
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/dist/components/BaseTile/BaseTile.js +1 -1
- package/mobile/dist/components/BaseTile/BaseTile.js.map +1 -1
- package/mobile/dist/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
- package/mobile/dist/components/BenefitsBlock/BenefitsBlockContent.d.ts +2 -2
- package/mobile/dist/components/BlockContent.d.ts +1 -2
- package/mobile/dist/components/Footer/MediaButton.d.ts +1 -1
- package/mobile/dist/components/Footer/SocialMedia.d.ts +1 -1
- package/mobile/dist/components/Gallery/GalleryContainer.js.map +1 -1
- package/mobile/dist/components/PictureText/PictureText.js +14 -5
- package/mobile/dist/components/PictureText/PictureText.js.map +1 -1
- package/mobile/dist/components/PictureText/PictureTextContent.d.ts +8 -16
- package/mobile/dist/components/ProductBlock/ProductBlockContent.d.ts +3 -15
- package/mobile/dist/components/ProductBlock/ProductBlockInner.js +1 -1
- package/mobile/dist/components/ProductBlock/ProductBlockInner.js.map +1 -1
- package/mobile/dist/components/ProductBlock/renderBenefit.d.ts +4 -2
- package/mobile/dist/components/ProductBlock/renderBenefit.js +3 -19
- package/mobile/dist/components/ProductBlock/renderBenefit.js.map +1 -1
- package/mobile/dist/components/ProductTile/ProductTile.js +1 -1
- package/mobile/dist/components/ProductTile/ProductTile.js.map +1 -1
- package/mobile/dist/components/PromoTile/PromoTile.js +1 -1
- package/mobile/dist/components/PromoTile/PromoTile.js.map +1 -1
- package/mobile/dist/components/Recommendation/RecommendationCard.d.ts +1 -1
- package/mobile/dist/components/StepsBlock/StepsBlockStyleMaps.d.ts +1 -1
- package/mobile/dist/ui-kit/BenefitItem/BenefitItem.d.ts +4 -0
- package/mobile/dist/ui-kit/BenefitItem/BenefitItem.js +29 -0
- package/mobile/dist/ui-kit/BenefitItem/BenefitItem.js.map +1 -0
- package/mobile/dist/ui-kit/BenefitItem/BenefitItemProps.d.ts +24 -0
- package/mobile/dist/{components/Insurance/InsuranceContent.js → ui-kit/BenefitItem/BenefitItemProps.js} +1 -1
- package/mobile/dist/ui-kit/BenefitItem/BenefitItemProps.js.map +1 -0
- package/mobile/dist/ui-kit/Foldable/Foldable.js +1 -1
- package/mobile/dist/ui-kit/Foldable/Foldable.js.map +1 -1
- package/mobile/lib/components/BaseTile/BaseTile.js +1 -1
- package/mobile/lib/components/BaseTile/BaseTile.js.map +1 -1
- package/mobile/lib/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
- package/mobile/lib/components/BenefitsBlock/BenefitsBlockContent.d.ts +2 -2
- package/mobile/lib/components/BlockContent.d.ts +1 -2
- package/mobile/lib/components/Footer/MediaButton.d.ts +1 -1
- package/mobile/lib/components/Footer/SocialMedia.d.ts +1 -1
- package/mobile/lib/components/Gallery/GalleryContainer.js.map +1 -1
- package/mobile/lib/components/PictureText/PictureText.js +14 -5
- package/mobile/lib/components/PictureText/PictureText.js.map +1 -1
- package/mobile/lib/components/PictureText/PictureTextContent.d.ts +8 -16
- package/mobile/lib/components/ProductBlock/ProductBlockContent.d.ts +3 -15
- package/mobile/lib/components/ProductBlock/ProductBlockInner.js +1 -1
- package/mobile/lib/components/ProductBlock/ProductBlockInner.js.map +1 -1
- package/mobile/lib/components/ProductBlock/renderBenefit.d.ts +4 -2
- package/mobile/lib/components/ProductBlock/renderBenefit.js +4 -20
- package/mobile/lib/components/ProductBlock/renderBenefit.js.map +1 -1
- package/mobile/lib/components/ProductTile/ProductTile.js +1 -1
- package/mobile/lib/components/ProductTile/ProductTile.js.map +1 -1
- package/mobile/lib/components/PromoTile/PromoTile.js +1 -1
- package/mobile/lib/components/PromoTile/PromoTile.js.map +1 -1
- package/mobile/lib/components/Recommendation/RecommendationCard.d.ts +1 -1
- package/mobile/lib/components/StepsBlock/StepsBlockStyleMaps.d.ts +1 -1
- package/mobile/lib/ui-kit/BenefitItem/BenefitItem.d.ts +4 -0
- package/mobile/lib/ui-kit/BenefitItem/BenefitItem.js +27 -0
- package/mobile/lib/ui-kit/BenefitItem/BenefitItem.js.map +1 -0
- package/mobile/lib/ui-kit/BenefitItem/BenefitItemProps.d.ts +24 -0
- package/mobile/lib/ui-kit/BenefitItem/BenefitItemProps.js +2 -0
- package/mobile/lib/ui-kit/BenefitItem/BenefitItemProps.js.map +1 -0
- package/mobile/lib/ui-kit/Foldable/Foldable.js +1 -1
- package/mobile/lib/ui-kit/Foldable/Foldable.js.map +1 -1
- package/mobile/src/components/BaseTile/BaseTile.tsx +2 -2
- package/mobile/src/components/BenefitsBlock/BenefitsBlock.tsx +2 -2
- package/mobile/src/components/BenefitsBlock/BenefitsBlockContent.ts +2 -2
- package/mobile/src/components/BlockContent.ts +0 -2
- package/mobile/src/components/ContentPage/ContentPage.page.json +41 -41
- package/mobile/src/components/Footer/MediaButton.tsx +1 -1
- package/mobile/src/components/Footer/SocialMedia.tsx +1 -1
- package/mobile/src/components/Gallery/Gallery.tsx +1 -1
- package/mobile/src/components/Gallery/GalleryContainer.tsx +0 -1
- package/mobile/src/components/PictureText/PictureText.example.json +7 -4
- package/mobile/src/components/PictureText/PictureText.tsx +55 -34
- package/mobile/src/components/PictureText/PictureTextContent.ts +8 -17
- package/mobile/src/components/ProductBlock/ProductBlockContent.ts +3 -17
- package/mobile/src/components/ProductBlock/ProductBlockInner.tsx +1 -5
- package/mobile/src/components/ProductBlock/renderBenefit.tsx +17 -42
- package/mobile/src/components/ProductTile/ProductTile.tsx +1 -1
- package/mobile/src/components/PromoTile/PromoTile.tsx +1 -1
- package/mobile/src/components/Recommendation/RecommendationCard.tsx +1 -1
- package/mobile/src/components/StepsBlock/StepsBlockStyleMaps.ts +1 -1
- package/mobile/src/components/__snapshots__/Blocks.spec.tsx.snap +15 -30
- package/mobile/src/ui-kit/BenefitItem/BenefitItem.tsx +58 -0
- package/mobile/src/ui-kit/BenefitItem/BenefitItemProps.ts +27 -0
- package/mobile/src/ui-kit/Foldable/Foldable.tsx +1 -1
- package/package.json +1 -1
- package/src/components/BaseTile/BaseTile.tsx +2 -2
- package/src/components/BenefitsBlock/BenefitsBlock.tsx +2 -2
- package/src/components/BenefitsBlock/BenefitsBlockContent.ts +2 -2
- package/src/components/BlockContent.ts +0 -2
- package/src/components/Blocks.ts +0 -2
- package/src/components/ContentPage/ContentPage.page.json +41 -41
- package/src/components/Footer/MediaButton.tsx +1 -1
- package/src/components/Footer/SocialMedia.mobile.tsx +1 -1
- package/src/components/Footer/SocialMedia.tsx +1 -1
- package/src/components/Gallery/Gallery.mobile.tsx +1 -1
- package/src/components/Gallery/GalleryContainer.tsx +0 -1
- package/src/components/PictureText/PictureText.example.json +7 -4
- package/src/components/PictureText/PictureText.fixture.tsx +74 -5
- package/src/components/PictureText/PictureText.tsx +55 -34
- package/src/components/PictureText/PictureTextContent.ts +8 -17
- package/src/components/ProductBlock/ProductBlock.fixture.mobile.tsx +3 -3
- package/src/components/ProductBlock/ProductBlock.fixture.tsx +28 -6
- package/src/components/ProductBlock/ProductBlockContent.ts +3 -17
- package/src/components/ProductBlock/ProductBlockInner.mobile.tsx +1 -5
- package/src/components/ProductBlock/ProductBlockInner.tsx +1 -3
- package/src/components/ProductBlock/renderBenefit.tsx +17 -51
- package/src/components/ProductGallery/ProductGallery.tsx +5 -4
- package/src/components/ProductTile/ProductTile.tsx +1 -1
- package/src/components/PromoTile/PromoTile.tsx +1 -1
- package/src/components/Recommendation/RecommendationCard.tsx +1 -1
- package/src/components/StepsBlock/StepsBlockStyleMaps.ts +1 -1
- package/src/components/__snapshots__/Blocks.spec.tsx.snap +15 -30
- package/src/ui-kit/BenefitItem/BenefitItem.tsx +58 -0
- package/src/ui-kit/BenefitItem/BenefitItemProps.ts +27 -0
- package/src/ui-kit/Foldable/Foldable.tsx +1 -1
- package/dist/components/Insurance/Insurance.d.ts +0 -5
- package/dist/components/Insurance/Insurance.js +0 -24
- package/dist/components/Insurance/Insurance.js.map +0 -1
- package/dist/components/Insurance/InsuranceContent.d.ts +0 -27
- package/dist/components/Insurance/InsuranceContent.js.map +0 -1
- package/dist/components/ProductBlock/renderBenefit.mobile.d.ts +0 -3
- package/dist/components/ProductBlock/renderBenefit.mobile.js +0 -25
- package/dist/components/ProductBlock/renderBenefit.mobile.js.map +0 -1
- package/lib/components/Insurance/Insurance.d.ts +0 -5
- package/lib/components/Insurance/Insurance.fixture.d.ts +0 -6
- package/lib/components/Insurance/Insurance.js +0 -22
- package/lib/components/Insurance/Insurance.js.map +0 -1
- package/lib/components/Insurance/InsuranceContent.d.ts +0 -27
- package/lib/components/Insurance/InsuranceContent.js +0 -2
- package/lib/components/Insurance/InsuranceContent.js.map +0 -1
- package/lib/components/ProductBlock/renderBenefit.mobile.d.ts +0 -3
- package/lib/components/ProductBlock/renderBenefit.mobile.js +0 -22
- package/lib/components/ProductBlock/renderBenefit.mobile.js.map +0 -1
- package/mobile/dist/components/Insurance/Insurance.d.ts +0 -5
- package/mobile/dist/components/Insurance/Insurance.js +0 -24
- package/mobile/dist/components/Insurance/Insurance.js.map +0 -1
- package/mobile/dist/components/Insurance/InsuranceContent.d.ts +0 -27
- package/mobile/dist/components/Insurance/InsuranceContent.js.map +0 -1
- package/mobile/lib/components/Insurance/Insurance.d.ts +0 -5
- package/mobile/lib/components/Insurance/Insurance.js +0 -22
- package/mobile/lib/components/Insurance/Insurance.js.map +0 -1
- package/mobile/lib/components/Insurance/InsuranceContent.d.ts +0 -27
- package/mobile/lib/components/Insurance/InsuranceContent.js +0 -2
- package/mobile/lib/components/Insurance/InsuranceContent.js.map +0 -1
- package/mobile/src/components/Insurance/Insurance.example.json +0 -29
- package/mobile/src/components/Insurance/Insurance.tsx +0 -83
- package/mobile/src/components/Insurance/InsuranceContent.ts +0 -29
- package/src/components/Insurance/Insurance.example.json +0 -29
- package/src/components/Insurance/Insurance.fixture.tsx +0 -70
- package/src/components/Insurance/Insurance.tsx +0 -83
- package/src/components/Insurance/InsuranceContent.ts +0 -29
- package/src/components/ProductBlock/renderBenefit.mobile.tsx +0 -44
|
@@ -4,27 +4,15 @@ import type { LinkProps } from '../../model/LinkProps';
|
|
|
4
4
|
import type { ButtonContent, BackwardButtonProps } from '../../ui-kit/Button/ButtonProps';
|
|
5
5
|
import type { ImageContent } from '../../ui-kit/Img/ImgProps';
|
|
6
6
|
import type { ListContent } from '../../ui-kit/List/ListContent';
|
|
7
|
-
import type { Picture } from '../../model/Picture';
|
|
8
7
|
import type { HeadlineProps } from '../../model/HeadlineType';
|
|
9
|
-
|
|
10
|
-
icon?: Picture;
|
|
11
|
-
/** @title Название */
|
|
12
|
-
label?: string;
|
|
13
|
-
/** @title Описание */
|
|
14
|
-
description?: string;
|
|
15
|
-
}
|
|
16
|
-
export declare type BenefitItemProps = {
|
|
17
|
-
benefit: ProductBlockBenefit;
|
|
18
|
-
version?: BlockVersion;
|
|
19
|
-
benefitsVersion?: IconVersion;
|
|
20
|
-
};
|
|
8
|
+
import type { BenefitItemProps } from '../../ui-kit/BenefitItem/BenefitItemProps';
|
|
21
9
|
export declare type ProductBlockInnerContent = HeadlineProps & ListContent & ButtonContent & ImageContent & {
|
|
22
10
|
/**
|
|
23
|
-
* @title
|
|
11
|
+
* @title Список преимуществ
|
|
24
12
|
* @minItems 2
|
|
25
13
|
* @maxItems 3
|
|
26
14
|
*/
|
|
27
|
-
benefits?:
|
|
15
|
+
benefits?: BenefitItemProps[];
|
|
28
16
|
benefitsVersion?: IconVersion;
|
|
29
17
|
version?: BlockVersion;
|
|
30
18
|
/**
|
|
@@ -7,7 +7,7 @@ import { List } from '../../ui-kit/List/List.js';
|
|
|
7
7
|
import { BaseTile } from '../BaseTile/BaseTile.js';
|
|
8
8
|
import { renderBenefit } from './renderBenefit.js';
|
|
9
9
|
export const ProductBlockInner = JSX(({ className = '', context, title, headlineVersion = 'L', description, benefits, benefitsVersion = 'normal', buttons, image, items, version = 'primary', isDotted = true, label, }) => {
|
|
10
|
-
return (_jsxs("div", { className: `w-full ${className}`, children: [_jsxs("div", { children: [label ? renderLabel(label, version) : null, _jsx(Headline, { context: context, className: "!p-0 max-w-[600px]", title: title, description: description, bgColorHeadline: version, headlineVersion: headlineVersion }), _jsxs(BaseTile, { context: context, buttons: buttons?.length ? (_jsx(ButtonSection, { context: context, buttons: buttons, className: "flex flex-col mt-5 gap-2.5" })) : null, children: [benefits?.filter((_) => _.label)?.length ? (_jsx("div", { className: "mt-3", children: benefits.map(
|
|
10
|
+
return (_jsxs("div", { className: `w-full ${className}`, children: [_jsxs("div", { children: [label ? renderLabel(label, version) : null, _jsx(Headline, { context: context, className: "!p-0 max-w-[600px]", title: title, description: description, bgColorHeadline: version, headlineVersion: headlineVersion }), _jsxs(BaseTile, { context: context, buttons: buttons?.length ? (_jsx(ButtonSection, { context: context, buttons: buttons, className: "flex flex-col mt-5 gap-2.5" })) : null, children: [benefits?.filter((_) => _.label)?.length ? (_jsx("div", { className: "mt-3", children: benefits.map(renderBenefit(version, benefitsVersion)) })) : null, items?.length ? (_jsx(List, { className: "mt-3 text-m", items: items, version: version, isDotted: isDotted })) : null] })] }), renderImage(image)] }));
|
|
11
11
|
});
|
|
12
12
|
function renderImage(image) {
|
|
13
13
|
return image?.src ? (_jsx(Img, { imageClassName: "mt-5 mx-auto block", image: { className: 'block', ...image } })) : null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductBlockInner.js","sourceRoot":"","sources":["../../../src/components/ProductBlock/ProductBlockInner.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAExC,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAClE,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAC;AAC3C,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAGhD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAIhD,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,CAClC,CAAC,EACC,SAAS,GAAG,EAAE,EACd,OAAO,EACP,KAAK,EACL,eAAe,GAAG,GAAG,EACrB,WAAW,EACX,QAAQ,EACR,eAAe,GAAG,QAAQ,EAC1B,OAAO,EACP,KAAK,EACL,KAAK,EACL,OAAO,GAAG,SAAS,EACnB,QAAQ,GAAG,IAAI,EACf,KAAK,GACN,EAAE,EAAE;IACH,OAAO,CACL,eAAK,SAAS,EAAE,UAAU,SAAS,EAAE,aACnC,0BACG,KAAK,CAAC,CAAC,CAAC,WAAW,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,EAC3C,KAAC,QAAQ,IACP,OAAO,EAAE,OAAO,EAChB,SAAS,EAAC,oBAAoB,EAC9B,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,WAAW,EACxB,eAAe,EAAE,OAAO,EACxB,eAAe,EAAE,eAAe,GAChC,EACF,MAAC,QAAQ,IACP,OAAO,EAAE,OAAO,EAChB,OAAO,EACL,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,CAChB,KAAC,aAAa,IACZ,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,OAAO,EAChB,SAAS,EAAC,4BAA4B,GACtC,CACH,CAAC,CAAC,CAAC,IAAI,aAGT,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAC1C,cAAK,SAAS,EAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"ProductBlockInner.js","sourceRoot":"","sources":["../../../src/components/ProductBlock/ProductBlockInner.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAExC,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAClE,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAC;AAC3C,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAGhD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAIhD,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,CAClC,CAAC,EACC,SAAS,GAAG,EAAE,EACd,OAAO,EACP,KAAK,EACL,eAAe,GAAG,GAAG,EACrB,WAAW,EACX,QAAQ,EACR,eAAe,GAAG,QAAQ,EAC1B,OAAO,EACP,KAAK,EACL,KAAK,EACL,OAAO,GAAG,SAAS,EACnB,QAAQ,GAAG,IAAI,EACf,KAAK,GACN,EAAE,EAAE;IACH,OAAO,CACL,eAAK,SAAS,EAAE,UAAU,SAAS,EAAE,aACnC,0BACG,KAAK,C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,CAAC;AAED,MAAM,aAAa,GAAiC;IAClD,OAAO,EAAE,0CAA0C;IACnD,SAAS,EAAE,eAAe;CAC3B,CAAC;AAEF,MAAM,WAAW,GAAG,CAAC,KAAa,EAAE,OAAqB,EAAE,EAAE,CAAC,CAC5D,cACE,SAAS,EAAE,6DAA6D,aAAa,CAAC,OAAO,CAAC,EAAE,YAE/F,KAAK,GACF,CACP,CAAC"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import type {
|
|
3
|
-
|
|
2
|
+
import type { BlockVersion } from '../../model/BlockVersion';
|
|
3
|
+
import type { BenefitItemProps } from '../../ui-kit/BenefitItem/BenefitItemProps';
|
|
4
|
+
import type { IconVersion } from '../../model/IconVersion';
|
|
5
|
+
export declare const renderBenefit: (version?: BlockVersion, benefitsVersion?: IconVersion) => ({ icon, label, description }: BenefitItemProps, i: number) => JSX.Element;
|
|
@@ -1,22 +1,6 @@
|
|
|
1
|
-
import { jsx as _jsx
|
|
2
|
-
import {
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
secondary: 'text-white',
|
|
1
|
+
import { jsx as _jsx } from "@redneckz/uni-jsx/jsx-runtime";
|
|
2
|
+
import { BenefitItem } from '../../ui-kit/BenefitItem/BenefitItem.js';
|
|
3
|
+
export const renderBenefit = (version = 'primary', benefitsVersion = 'normal') => ({ icon, label, description }, i) => {
|
|
4
|
+
return (_jsx(BenefitItem, { icon: icon, label: label, description: description, version: version, benefitsVersion: benefitsVersion }, String(i)));
|
|
6
5
|
};
|
|
7
|
-
const benefitDescStyleMap = {
|
|
8
|
-
primary: 'text-secondary-text',
|
|
9
|
-
secondary: 'text-white',
|
|
10
|
-
};
|
|
11
|
-
export function renderBenefit({ benefit, version = 'primary' }, i) {
|
|
12
|
-
const isIconWhite = version === 'secondary';
|
|
13
|
-
return (_jsxs("div", { className: "flex gap-3 items-center mb-2.5 last:mb-0", children: [benefit.icon ? (_jsx(Img, { className: renderBenefitIconBgStyle(version), image: { ...benefit?.icon, iconVersion: isIconWhite ? 'white' : 'normal' }, width: "24", height: "24", asSVG: true })) : null, _jsx("div", { className: `text-l m-0 ${benefitTitleStyleMap[version]}`, children: benefit.label }), benefit.description && (_jsx("div", { className: `text-s ${benefitDescStyleMap[version]}`, children: benefit.description }))] }, String(i)));
|
|
14
|
-
}
|
|
15
|
-
function renderBenefitIconBgStyle(version) {
|
|
16
|
-
let bgColorStyle = 'text-primary-main';
|
|
17
|
-
if (version === 'secondary') {
|
|
18
|
-
bgColorStyle = 'text-black';
|
|
19
|
-
}
|
|
20
|
-
return `w-6 h-6 rounded-full box-border ${bgColorStyle}`;
|
|
21
|
-
}
|
|
22
6
|
//# sourceMappingURL=renderBenefit.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderBenefit.js","sourceRoot":"","sources":["../../../src/components/ProductBlock/renderBenefit.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"renderBenefit.js","sourceRoot":"","sources":["../../../src/components/ProductBlock/renderBenefit.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AAEnE,MAAM,CAAC,MAAM,aAAa,GACxB,CAAC,UAAwB,SAAS,EAAE,kBAA+B,QAAQ,EAAE,EAAE,CAC/E,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,WAAW,EAAoB,EAAE,CAAS,EAAE,EAAE;IAC5D,OAAO,CACL,KAAC,WAAW,IAEV,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,WAAW,EACxB,OAAO,EAAE,OAAO,EAChB,eAAe,EAAE,eAAe,IAL3B,MAAM,CAAC,CAAC,CAAC,CAMd,CACH,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -16,7 +16,7 @@ export const ProductTile = JSX(({ context, className = '', title, headlineVersio
|
|
|
16
16
|
: null] }), buttons?.length ? (_jsx(ButtonSection, { context: context, buttons: buttons, className: "flex self-end mt-5 gap-4 z-[1] text-l" })) : null, image?.src ? _jsx(Img, { className: "absolute right-0 bottom-0", image: image }) : null] }));
|
|
17
17
|
});
|
|
18
18
|
function renderBenefits(benefits, version) {
|
|
19
|
-
return (_jsxs("div", { className: "flex mt-
|
|
19
|
+
return (_jsxs("div", { className: "flex mt-3.5", children: [benefits.length ? (_jsx("div", { className: "mr-6 gap-2.5 text-h6", children: benefits.map(renderBenefitLabel) })) : null, benefits.length ? (_jsx("div", { className: "pt-1 text-m", children: benefits.map((_, i) => renderBenefitDescription(_, i, version)) })) : null] }));
|
|
20
20
|
}
|
|
21
21
|
function renderBenefitLabel(benefit, i) {
|
|
22
22
|
return (_jsx("div", { className: `${i ? 'mt-2.5' : ''}`, children: benefit.label }, String(i)));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductTile.js","sourceRoot":"","sources":["../../../src/components/ProductTile/ProductTile.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAGxC,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAClE,OAAO,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAC;AAC3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAKhD,MAAM,mBAAmB,GAAiC;IACxD,OAAO,EAAE,4BAA4B;IACrC,SAAS,EAAE,4BAA4B;CACxC,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG,GAAG,CAC5B,CAAC,EACC,OAAO,EACP,SAAS,GAAG,EAAE,EACd,KAAK,EACL,eAAe,GAAG,GAAG,EACrB,WAAW,EACX,qBAAqB,EACrB,QAAQ,EACR,OAAO,EACP,KAAK,EACL,OAAO,GAAG,SAAS,EACnB,GAAG,IAAI,EACR,EAAE,EAAE;IACH,OAAO,CACL,MAAC,YAAY,IACX,OAAO,EAAE,OAAO,EAChB,SAAS,EAAE,mHAAmH,SAAS,IACrI,mBAAmB,CAAC,OAAO,CAC7B,IAAI,mBAAmB,CAAC,SAAS,CAAC,IAAI,gBAAgB,CAAC,SAAS,CAAC,GAAG,KAChE,IAAI,aAER,eAAK,SAAS,EAAC,OAAO,aACpB,KAAC,QAAQ,IACP,OAAO,EAAE,OAAO,EAChB,SAAS,EAAC,MAAM,EAChB,EAAE,EAAC,IAAI,EACP,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,WAAW,EACxB,eAAe,EAAE,eAAe,EAChC,eAAe,EAAE,OAAO,EACxB,KAAK,EAAC,MAAM,GACZ,EACD,cAAc,CAAC,QAAQ,IAAI,EAAE,EAAE,OAAO,CAAC,EACvC,qBAAqB;wBACpB,CAAC,CAAC,2BAA2B,CAAC,qBAAqB,EAAE,OAAO,CAAC;wBAC7D,CAAC,CAAC,IAAI,IACJ,EACL,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,CACjB,KAAC,aAAa,IACZ,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,OAAO,EAChB,SAAS,EAAC,uCAAuC,GACjD,CACH,CAAC,CAAC,CAAC,IAAI,EACP,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC,KAAC,GAAG,IAAC,SAAS,EAAC,2BAA2B,EAAC,KAAK,EAAE,KAAK,GAAI,CAAC,CAAC,CAAC,IAAI,IACnE,CAChB,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,SAAS,cAAc,CAAC,QAAuB,EAAE,OAAqB;IACpE,OAAO,CACL,eAAK,SAAS,EAAC,
|
|
1
|
+
{"version":3,"file":"ProductTile.js","sourceRoot":"","sources":["../../../src/components/ProductTile/ProductTile.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CA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B,SAAS,EAAE,YAAY;KACxB,CAAC;IAEF,OAAO,CACL,cAAqB,SAAS,EAAE,gBAAgB,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,IAAI,aAAa,CAAC,OAAO,CAAC,EAAE,YACxF,OAAO,CAAC,WAAW,IADZ,MAAM,CAAC,CAAC,CAAC,CAEb,CACP,CAAC;AACJ,CAAC;AAED,SAAS,2BAA2B,CAAC,qBAA6B,EAAE,OAAO,GAAG,SAAS;IACrF,MAAM,YAAY,GAAiC;QACjD,OAAO,EAAE,qBAAqB;QAC9B,SAAS,EAAE,YAAY;KACxB,CAAC;IAEF,OAAO,CACL,cAAK,SAAS,EAAE,uBAAuB,YAAY,CAAC,OAAO,CAAC,EAAE,YAAG,qBAAqB,GAAO,CAC9F,CAAC;AACJ,CAAC"}
|
|
@@ -12,7 +12,7 @@ const promoTileStyleMap = {
|
|
|
12
12
|
secondary: 'bg-primary-main text-white',
|
|
13
13
|
};
|
|
14
14
|
export const PromoTile = JSX(({ className = '', context, title = 'Акции и спецпредложения', date, description, buttons = [], version = 'primary', ...rest }) => {
|
|
15
|
-
return (_jsx(BlockWrapper, { context: context, className: `bg-white text-primary-text font-sans p-9 box-border ${className} ${promoTileStyleMap[version]} ${getTileRightPadding(className)} ${getTileMinHeight(className)} `, ...rest, children: _jsx(BaseTile, { context: context, title: title ? (_jsx("div", { children: _jsx(Headline, { context: context, title: title, className: `!p-0 max-w-[600px]`, headlineVersion: getTileHeadingType(className), bgColorHeadline: version, align: "left", as: "h2" }) })) : null, buttons: buttons?.length ? (_jsx(ButtonSection, { context: context, buttons: buttons, className: "flex
|
|
15
|
+
return (_jsx(BlockWrapper, { context: context, className: `bg-white text-primary-text font-sans p-9 box-border ${className} ${promoTileStyleMap[version]} ${getTileRightPadding(className)} ${getTileMinHeight(className)} `, ...rest, children: _jsx(BaseTile, { context: context, title: title ? (_jsx("div", { children: _jsx(Headline, { context: context, title: title, className: `!p-0 max-w-[600px]`, headlineVersion: getTileHeadingType(className), bgColorHeadline: version, align: "left", as: "h2" }) })) : null, buttons: buttons?.length ? (_jsx(ButtonSection, { context: context, buttons: buttons, className: "flex gap-3" })) : null, children: _jsxs("div", { className: "mt-1.5", children: [date ? _jsx("div", { className: "text-s mb-2", children: formatDate(date) }) : null, _jsx("div", { className: "text-l", children: description })] }) }) }));
|
|
16
16
|
});
|
|
17
17
|
function formatDate(date) {
|
|
18
18
|
const dateObj = new Date(date);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PromoTile.js","sourceRoot":"","sources":["../../../src/components/PromoTile/PromoTile.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAGxC,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAClE,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAKhD,MAAM,iBAAiB,GAAiC;IACtD,OAAO,EAAE,4BAA4B;IACrC,SAAS,EAAE,4BAA4B;CACxC,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAG,GAAG,CAC1B,CAAC,EACC,SAAS,GAAG,EAAE,EACd,OAAO,EACP,KAAK,GAAG,yBAAyB,EACjC,IAAI,EACJ,WAAW,EACX,OAAO,GAAG,EAAE,EACZ,OAAO,GAAG,SAAS,EACnB,GAAG,IAAI,EACR,EAAE,EAAE;IACH,OAAO,CACL,KAAC,YAAY,IACX,OAAO,EAAE,OAAO,EAChB,SAAS,EAAE,uDAAuD,SAAS,IACzE,iBAAiB,C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UAAU,GAA+B;QAC7C,GAAG,EAAE,SAAS;QACd,KAAK,EAAE,MAAM;QACb,IAAI,EAAE,SAAS;KAChB,CAAC;IAEF,OAAO,OAAO,CAAC,cAAc,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;AACvE,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BlockVersion } from '../../model/BlockVersion';
|
|
1
|
+
import type { BlockVersion } from '../../model/BlockVersion';
|
|
2
2
|
import type { UniBlockProps } from '../../types';
|
|
3
3
|
import type { RecommendationCardTypes } from './RecommendationContent';
|
|
4
4
|
export interface RecommendationCardProps extends RecommendationCardTypes, UniBlockProps {
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { BenefitItemProps, BenefitItemCommonProps } from './BenefitItemProps';
|
|
2
|
+
export interface BenefitGeneralProps extends BenefitItemProps, BenefitItemCommonProps {
|
|
3
|
+
}
|
|
4
|
+
export declare const BenefitItem: import("@redneckz/uni-jsx").UNIComponent<BenefitGeneralProps, any, any>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
|
|
2
|
+
import { JSX } from '@redneckz/uni-jsx';
|
|
3
|
+
import { Img } from '../Img/Img.js';
|
|
4
|
+
const titleStyleMap = {
|
|
5
|
+
primary: 'text-primary-text',
|
|
6
|
+
secondary: 'text-white',
|
|
7
|
+
};
|
|
8
|
+
const descStyleMap = {
|
|
9
|
+
primary: 'text-secondary-text',
|
|
10
|
+
secondary: 'text-white',
|
|
11
|
+
};
|
|
12
|
+
export const BenefitItem = JSX((props) => {
|
|
13
|
+
const { className = '', icon, label, description, version = 'primary', benefitsVersion = 'normal', } = props;
|
|
14
|
+
const isIconWhite = benefitsVersion === 'white' || version === 'secondary';
|
|
15
|
+
return (_jsxs("div", { className: `flex items-center gap-5 ${className}`, children: [icon ? (_jsx(Img, { className: renderBenefitIconBgStyle(version, benefitsVersion), image: { ...icon, iconVersion: isIconWhite ? 'white' : 'normal' }, asSVG: true })) : null, _jsxs("div", { className: "gap-0.5", children: [label ? _jsx("div", { className: `text-h6 ${titleStyleMap[version]}`, children: label }) : null, description ? (_jsx("div", { className: `text-m-light ${descStyleMap[version]}`, children: description })) : null] })] }));
|
|
16
|
+
});
|
|
17
|
+
function renderBenefitIconBgStyle(version, benefitsVersion) {
|
|
18
|
+
let bgColorStyle = 'bg-primary-main text-black';
|
|
19
|
+
if (version === 'secondary') {
|
|
20
|
+
bgColorStyle = 'bg-white/30 text-black';
|
|
21
|
+
}
|
|
22
|
+
else if (benefitsVersion === 'normal') {
|
|
23
|
+
bgColorStyle = 'bg-secondary-light text-primary-main';
|
|
24
|
+
}
|
|
25
|
+
return `w-[50px] h-[50px] rounded-full p-[10px] box-border ${bgColorStyle}`;
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=BenefitItem.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BenefitItem.js","sourceRoot":"","sources":["../../../src/ui-kit/BenefitItem/BenefitItem.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAExC,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAKjC,MAAM,aAAa,GAAiC;IAClD,OAAO,EAAE,mBAAmB;IAC5B,SAAS,EAAE,YAAY;CACxB,CAAC;AACF,MAAM,YAAY,GAAiC;IACjD,OAAO,EAAE,qBAAqB;IAC9B,SAAS,EAAE,YAAY;CACxB,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG,GAAG,CAAsB,CAAC,KAAK,EAAE,EAAE;IAC5D,MAAM,EACJ,SAAS,GAAG,EAAE,EACd,IAAI,EACJ,KAAK,EACL,WAAW,EACX,OAAO,GAAG,SAAS,EACnB,eAAe,GAAG,QAAQ,GAC3B,GAAG,KAAK,CAAC;IAEV,MAAM,WAAW,GAAG,eAAe,KAAK,OAAO,IAAI,OAAO,KAAK,WAAW,CAAC;IAE3E,OAAO,CACL,eAAK,SAAS,EAAE,2BAA2B,SAAS,EAAE,aACnD,IAAI,CAAC,CAAC,CAAC,CACN,KAAC,GAAG,IACF,SAAS,EAAE,wBAAwB,CAAC,OAAO,EAAE,eAAe,CAAC,EAC7D,KAAK,EAAE,EAAE,GAAG,IAAI,EAAE,WAAW,EAAE,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,EAAE,EACjE,KAAK,SACL,CACH,CAAC,CAAC,CAAC,IAAI,EACR,eAAK,SAAS,EAAC,SAAS,aACrB,KAAK,CAAC,CAAC,CAAC,cAAK,SAAS,EAAE,WAAW,aAAa,CAAC,OAAO,CAAC,EAAE,YAAG,KAAK,GAAO,CAAC,CAAC,CAAC,IAAI,EACjF,WAAW,CAAC,CAAC,CAAC,CACb,cAAK,SAAS,EAAE,gBAAgB,YAAY,CAAC,OAAO,CAAC,EAAE,YAAG,WAAW,GAAO,CAC7E,CAAC,CAAC,CAAC,IAAI,IACJ,IACF,CACP,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,SAAS,wBAAwB,CAAC,OAAO,EAAE,eAAe;IACxD,IAAI,YAAY,GAAG,4BAA4B,CAAC;IAEhD,IAAI,OAAO,KAAK,WAAW,EAAE;QAC3B,YAAY,GAAG,wBAAwB,CAAC;KACzC;SAAM,IAAI,eAAe,KAAK,QAAQ,EAAE;QACvC,YAAY,GAAG,sCAAsC,CAAC;KACvD;IAED,OAAO,sDAAsD,YAAY,EAAE,CAAC;AAC9E,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { Picture } from '../../model/Picture';
|
|
2
|
+
import type { BlockVersion } from '../../model/BlockVersion';
|
|
3
|
+
import type { IconVersion } from '../../model/IconVersion';
|
|
4
|
+
export interface BenefitItemCommonProps {
|
|
5
|
+
benefitsVersion?: IconVersion;
|
|
6
|
+
/** @hidden */
|
|
7
|
+
version?: BlockVersion;
|
|
8
|
+
/** @hidden */
|
|
9
|
+
className?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare type BenefitItemProps = {
|
|
12
|
+
icon?: Picture;
|
|
13
|
+
/** @title Название */
|
|
14
|
+
label?: string;
|
|
15
|
+
/** @title Описание */
|
|
16
|
+
description?: string;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* @title Преимущество
|
|
20
|
+
*/
|
|
21
|
+
export declare type BenefitsProps = BenefitItemCommonProps & {
|
|
22
|
+
/** @title Список преимуществ */
|
|
23
|
+
benefits?: BenefitItemProps[];
|
|
24
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BenefitItemProps.js","sourceRoot":"","sources":["../../../src/ui-kit/BenefitItem/BenefitItemProps.ts"],"names":[],"mappings":""}
|
|
@@ -9,7 +9,7 @@ export const Foldable = JSX(({ blocks = [], hiddenBlocksNum = 0, foldButtonClass
|
|
|
9
9
|
initialState: isUnfolded,
|
|
10
10
|
});
|
|
11
11
|
const buttonClassName = foldButtonClasses ||
|
|
12
|
-
'border-none bg-primary-main px-0 py-[26px] mb-[1px] w-full font-sans text-white text-
|
|
12
|
+
'border-none bg-primary-main hover:bg-primary-hover px-0 py-[26px] mb-[1px] w-full font-sans text-white text-h4 flex justify-center cursor-pointer';
|
|
13
13
|
const getFoldButtonLabel = isActive ? 'Скрыть' : foldButtonLabel;
|
|
14
14
|
return blocks ? (_jsxs("div", { children: [renderBlocks(blocks, render, { blocksToHide, isActive, containerClasses }), hiddenBlocksNum ? (_jsxs("button", { className: buttonClassName, "data-theme": foldButtonDataTheme, onClick: handleToggle, children: [_jsx("span", { className: "pr-3", children: getFoldButtonLabel }), icon ? _jsx(Icon, { name: icon, iconVersion: "white", width: "20", height: "20", asSVG: true }) : null] })) : null] })) : null;
|
|
15
15
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Foldable.js","sourceRoot":"","sources":["../../../src/ui-kit/Foldable/Foldable.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAIxC,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,uBAAuB,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAuB/E,MAAM,CAAC,MAAM,QAAQ,GAAG,GAAG,CACzB,CAAC,EACC,MAAM,GAAG,EAAE,EACX,eAAe,GAAG,CAAC,EACnB,iBAAiB,EACjB,eAAe,EACf,mBAAmB,EACnB,UAAU,EACV,gBAAgB,EAChB,MAAM,GAAG,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,GAClB,EAAE,EAAE;IACH,MAAM,YAAY,GAAG,KAAK,CAAC,eAAe,EAAE,CAAC,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;IAE9D,MAAM,EAAE,IAAI,EAAE,YAAY,EAAE,QAAQ,EAAE,GAAG,gBAAgB,CAAC;QACxD,YAAY,EAAE,UAAU;KACzB,CAAC,CAAC;IAEH,MAAM,eAAe,GACnB,iBAAiB;QACjB,
|
|
1
|
+
{"version":3,"file":"Foldable.js","sourceRoot":"","sources":["../../../src/ui-kit/Foldable/Foldable.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAIxC,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,uBAAuB,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAuB/E,MAAM,CAAC,MAAM,QAAQ,GAAG,GAAG,CACzB,CAAC,EACC,MAAM,GAAG,EAAE,EACX,eAAe,GAAG,CAAC,EACnB,iBAAiB,EACjB,eAAe,EACf,mBAAmB,EACnB,UAAU,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YAAY,GAAG,YAAY,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IAEzE,OAAO,MAAM,CACX,0BACG,aAAa,EACd,cAAK,SAAS,EAAE,GAAG,uBAAuB,IAAI,gBAAgB,EAAE,YAAG,YAAY,GAAO,IAClF,EACN,QAAQ,CACT,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -10,9 +10,9 @@ export const BaseTile = JSX<BaseTileProps>(
|
|
|
10
10
|
<div className={`font-sans flex flex-col grow h-full items-start ${className}`}>
|
|
11
11
|
{title}
|
|
12
12
|
<div className="flex grow w-full justify-between">
|
|
13
|
-
<div className="flex flex-col
|
|
13
|
+
<div className="flex flex-col w-full">
|
|
14
14
|
<div>{children}</div>
|
|
15
|
-
{buttons ? <div>{buttons}</div> : null}
|
|
15
|
+
{buttons ? <div className="mt-9">{buttons}</div> : null}
|
|
16
16
|
</div>
|
|
17
17
|
{image}
|
|
18
18
|
</div>
|
|
@@ -4,7 +4,7 @@ import type { UniBlockProps } from '../../types';
|
|
|
4
4
|
import { Heading } from '../../ui-kit/Heading/Heading';
|
|
5
5
|
import { Img } from '../../ui-kit/Img/Img';
|
|
6
6
|
import type { BenefitItemProps, BenefitsBlockContent } from './BenefitsBlockContent';
|
|
7
|
-
import {
|
|
7
|
+
import { DescriptionDef, ListBenefitDef, TextBenefitDef } from './BenefitsBlockContent';
|
|
8
8
|
|
|
9
9
|
export interface BenefitsBlockProps extends BenefitsBlockContent, UniBlockProps {}
|
|
10
10
|
|
|
@@ -53,7 +53,7 @@ const renderStep = (benefit: BenefitItemProps, i: number) => {
|
|
|
53
53
|
);
|
|
54
54
|
};
|
|
55
55
|
|
|
56
|
-
const renderDescription = (description?:
|
|
56
|
+
const renderDescription = (description?: DescriptionDef) => {
|
|
57
57
|
const benefitType = description ? description?.benefitType : null;
|
|
58
58
|
if (!benefitType) {
|
|
59
59
|
return null;
|
|
@@ -32,7 +32,7 @@ export type ListBenefitDef = {
|
|
|
32
32
|
/**
|
|
33
33
|
* @title Вид контента
|
|
34
34
|
*/
|
|
35
|
-
export type
|
|
35
|
+
export type DescriptionDef = EmptyOption | TextBenefitDef | ListBenefitDef;
|
|
36
36
|
|
|
37
37
|
/**
|
|
38
38
|
* @title Преимущество
|
|
@@ -41,7 +41,7 @@ export interface BenefitItemProps {
|
|
|
41
41
|
/** @title Название */
|
|
42
42
|
label?: string;
|
|
43
43
|
/** @title Описание */
|
|
44
|
-
description?:
|
|
44
|
+
description?: DescriptionDef;
|
|
45
45
|
icon?: Picture;
|
|
46
46
|
}
|
|
47
47
|
|
|
@@ -8,7 +8,6 @@ import type { GalleryContent } from './Gallery/GalleryContent';
|
|
|
8
8
|
import type { GracePeriodContent } from './GracePeriod/GracePeriodContent';
|
|
9
9
|
import type { GroupBlockContent } from './GroupBlock/GroupBlockContent';
|
|
10
10
|
import type { HeaderContent } from './Header/HeaderContent';
|
|
11
|
-
import type { InsuranceContent } from './Insurance/InsuranceContent';
|
|
12
11
|
import type { InsuranceAmountBlockContent } from './InsuranceAmountBlock/InsuranceAmountBlockContent';
|
|
13
12
|
import type { LinkDocsContent } from './LinkDocs/LinkDocsContent';
|
|
14
13
|
import type { LinkListContent } from './LinkList/LinkListContent';
|
|
@@ -57,5 +56,4 @@ export type BlockContent =
|
|
|
57
56
|
| LinkListContent
|
|
58
57
|
| GroupBlockContent
|
|
59
58
|
| BonusBenefitsBlockContent
|
|
60
|
-
| InsuranceContent
|
|
61
59
|
| SafeDepositRentalContent;
|
|
@@ -1947,12 +1947,51 @@
|
|
|
1947
1947
|
"alt": "Варианты потребительского кредита",
|
|
1948
1948
|
"format": "webp",
|
|
1949
1949
|
"size": {
|
|
1950
|
-
"width":
|
|
1951
|
-
"height":
|
|
1950
|
+
"width": 400,
|
|
1951
|
+
"height": 300
|
|
1952
1952
|
}
|
|
1953
1953
|
}
|
|
1954
1954
|
}
|
|
1955
1955
|
},
|
|
1956
|
+
{
|
|
1957
|
+
"type": "PictureText",
|
|
1958
|
+
"style": ["col-span-12"],
|
|
1959
|
+
"content": {
|
|
1960
|
+
"title": "Страховые риски и продукты",
|
|
1961
|
+
"description": "Описание",
|
|
1962
|
+
"sum": 500000,
|
|
1963
|
+
"image": {
|
|
1964
|
+
"src": "insurance.png",
|
|
1965
|
+
"title": "страхование",
|
|
1966
|
+
"format": "webp",
|
|
1967
|
+
"alt": "Страховые риски и продукты",
|
|
1968
|
+
"size": {
|
|
1969
|
+
"width": 400,
|
|
1970
|
+
"height": 300
|
|
1971
|
+
},
|
|
1972
|
+
"sources": [
|
|
1973
|
+
{
|
|
1974
|
+
"src": "insurance.png 1x, insurance-2x.png 2x",
|
|
1975
|
+
"format": "png"
|
|
1976
|
+
}
|
|
1977
|
+
]
|
|
1978
|
+
},
|
|
1979
|
+
"benefits": [
|
|
1980
|
+
{
|
|
1981
|
+
"label": "Ликвидация организации",
|
|
1982
|
+
"icon": {
|
|
1983
|
+
"icon": "ShieldTickIcon"
|
|
1984
|
+
}
|
|
1985
|
+
},
|
|
1986
|
+
{
|
|
1987
|
+
"label": "Сокращение численности работников организации",
|
|
1988
|
+
"icon": {
|
|
1989
|
+
"icon": "ShieldTickIcon"
|
|
1990
|
+
}
|
|
1991
|
+
}
|
|
1992
|
+
]
|
|
1993
|
+
}
|
|
1994
|
+
},
|
|
1956
1995
|
{
|
|
1957
1996
|
"type": "Recommendation",
|
|
1958
1997
|
"style": ["col-span-12"],
|
|
@@ -2144,45 +2183,6 @@
|
|
|
2144
2183
|
]
|
|
2145
2184
|
}
|
|
2146
2185
|
},
|
|
2147
|
-
{
|
|
2148
|
-
"type": "Insurance",
|
|
2149
|
-
"style": ["col-span-12"],
|
|
2150
|
-
"content": {
|
|
2151
|
-
"title": "Страховые риски и продукты",
|
|
2152
|
-
"description": "Описание",
|
|
2153
|
-
"sum": 500000,
|
|
2154
|
-
"image": {
|
|
2155
|
-
"src": "insurance.png",
|
|
2156
|
-
"title": "страхование",
|
|
2157
|
-
"format": "webp",
|
|
2158
|
-
"alt": "Страховые риски и продукты",
|
|
2159
|
-
"size": {
|
|
2160
|
-
"width": 400,
|
|
2161
|
-
"height": 300
|
|
2162
|
-
},
|
|
2163
|
-
"sources": [
|
|
2164
|
-
{
|
|
2165
|
-
"src": "insurance.png 1x, insurance-2x.png 2x",
|
|
2166
|
-
"format": "png"
|
|
2167
|
-
}
|
|
2168
|
-
]
|
|
2169
|
-
},
|
|
2170
|
-
"benefits": [
|
|
2171
|
-
{
|
|
2172
|
-
"label": "Ликвидация организации",
|
|
2173
|
-
"icon": {
|
|
2174
|
-
"icon": "ShieldTickIcon"
|
|
2175
|
-
}
|
|
2176
|
-
},
|
|
2177
|
-
{
|
|
2178
|
-
"label": "Сокращение численности работников организации",
|
|
2179
|
-
"icon": {
|
|
2180
|
-
"icon": "ShieldTickIcon"
|
|
2181
|
-
}
|
|
2182
|
-
}
|
|
2183
|
-
]
|
|
2184
|
-
}
|
|
2185
|
-
},
|
|
2186
2186
|
{
|
|
2187
2187
|
"type": "InsuranceAmountBlock",
|
|
2188
2188
|
"style": ["col-span-12"],
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
2
|
import { useLink } from '../../hooks/useLink';
|
|
3
|
-
import { BlockVersion } from '../../model/BlockVersion';
|
|
3
|
+
import type { BlockVersion } from '../../model/BlockVersion';
|
|
4
4
|
import type { LinkProps } from '../../model/LinkProps';
|
|
5
5
|
import type { UniBlockProps } from '../../types';
|
|
6
6
|
import { MediaButton } from './MediaButton';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
-
import { BlockVersion } from '../../model/BlockVersion';
|
|
2
|
+
import type { BlockVersion } from '../../model/BlockVersion';
|
|
3
3
|
import type { ListOrientation } from '../../model/ListOrientation';
|
|
4
4
|
import { Button } from '../../ui-kit/Button/Button';
|
|
5
5
|
import { Heading } from '../../ui-kit/Heading/Heading';
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
2
|
import type { GalleryVersion } from '../../model/GalleryVersion';
|
|
3
|
-
import { Heading } from '../../ui-kit/Heading/Heading';
|
|
4
3
|
import type { ContentPageContext } from '../ContentPage/ContentPageContext';
|
|
5
4
|
import { cardStyleMap, cardVersionMap, cardWidthMap, galleryLengthForScrollMap } from './constants';
|
|
6
5
|
import { GalleryCardInner } from './GalleryCardInner';
|
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
"image": {
|
|
5
5
|
"format": "webp",
|
|
6
6
|
"size": {
|
|
7
|
-
"width":
|
|
7
|
+
"width": 400,
|
|
8
|
+
"height": 300
|
|
8
9
|
}
|
|
9
10
|
},
|
|
10
11
|
"version": "primary",
|
|
@@ -13,14 +14,16 @@
|
|
|
13
14
|
{
|
|
14
15
|
"label": "Преимущество №1",
|
|
15
16
|
"icon": {
|
|
16
|
-
"icon": "
|
|
17
|
+
"icon": "ShieldTickIcon"
|
|
17
18
|
}
|
|
18
19
|
},
|
|
19
20
|
{
|
|
20
21
|
"label": "Преимущество №2",
|
|
21
22
|
"icon": {
|
|
22
|
-
"icon": "
|
|
23
|
+
"icon": "ShieldTickIcon"
|
|
23
24
|
}
|
|
24
25
|
}
|
|
25
|
-
]
|
|
26
|
+
],
|
|
27
|
+
"sum": 500000,
|
|
28
|
+
"monthLimit": 25000
|
|
26
29
|
}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
2
|
import type { UniBlockProps } from '../../types';
|
|
3
|
-
import type {
|
|
4
|
-
|
|
5
|
-
import {
|
|
3
|
+
import type { PictureTextContent } from './PictureTextContent';
|
|
4
|
+
import type { BlockVersion } from '../../model/BlockVersion';
|
|
5
|
+
import type { BenefitItemProps } from '../../ui-kit/BenefitItem/BenefitItemProps';
|
|
6
6
|
import { BlockWrapper } from '../../ui-kit/BlockWrapper';
|
|
7
|
-
import { Heading } from '../../ui-kit/Heading/Heading';
|
|
8
7
|
import { Img } from '../../ui-kit/Img/Img';
|
|
8
|
+
import { BenefitItem } from '../../ui-kit/BenefitItem/BenefitItem';
|
|
9
|
+
import { Headline } from '../Headline/Headline';
|
|
10
|
+
import { addSpacesBetweenNumbers } from '../../utils/addSpacesBetweenNumbers';
|
|
9
11
|
|
|
10
12
|
export interface PictureTextProps extends PictureTextContent, UniBlockProps {}
|
|
11
13
|
|
|
@@ -17,56 +19,75 @@ const pictureTextStyleMap: Record<BlockVersion, string> = {
|
|
|
17
19
|
export const PictureText = JSX<PictureTextProps>(
|
|
18
20
|
({
|
|
19
21
|
className = '',
|
|
22
|
+
context,
|
|
20
23
|
title,
|
|
24
|
+
description,
|
|
21
25
|
image,
|
|
22
26
|
benefits,
|
|
23
27
|
version = 'primary',
|
|
28
|
+
sum,
|
|
29
|
+
monthLimit,
|
|
24
30
|
directionRight = false,
|
|
25
31
|
...rest
|
|
26
32
|
}) => {
|
|
27
33
|
return (
|
|
28
34
|
<BlockWrapper
|
|
29
35
|
className={`relative font-sans p-14 ${pictureTextStyleMap[version]} ${className}`}
|
|
36
|
+
context={context}
|
|
30
37
|
{...rest}
|
|
31
38
|
>
|
|
32
|
-
<
|
|
33
|
-
|
|
39
|
+
<Headline
|
|
40
|
+
context={context}
|
|
41
|
+
className="!p-0"
|
|
42
|
+
title={title}
|
|
43
|
+
description={description}
|
|
44
|
+
headlineVersion="M"
|
|
45
|
+
bgColorHeadline={version}
|
|
46
|
+
align="center"
|
|
47
|
+
/>
|
|
48
|
+
<div className={'flex justify-center gap-[122px] mt-[30px]'}>
|
|
34
49
|
{image?.src && <Img className={directionRight ? 'order-2 ml-6' : 'mr-6'} image={image} />}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
{benefits.map(
|
|
38
|
-
|
|
39
|
-
|
|
50
|
+
<div className="w-[558px] m-auto">
|
|
51
|
+
{benefits?.length ? (
|
|
52
|
+
<div className="flex flex-col gap-4">{benefits.map(renderBenefit(version))}</div>
|
|
53
|
+
) : null}
|
|
54
|
+
{renderInsuranceSumMonth(sum, monthLimit)}
|
|
55
|
+
</div>
|
|
40
56
|
</div>
|
|
41
57
|
</BlockWrapper>
|
|
42
58
|
);
|
|
43
59
|
},
|
|
44
60
|
);
|
|
45
61
|
|
|
46
|
-
|
|
62
|
+
const renderBenefit = (version: BlockVersion) => (benefit: BenefitItemProps, i: number) =>
|
|
63
|
+
(
|
|
64
|
+
<BenefitItem
|
|
65
|
+
key={String(i)}
|
|
66
|
+
icon={benefit.icon}
|
|
67
|
+
label={benefit.label}
|
|
68
|
+
description={benefit.description}
|
|
69
|
+
version={version}
|
|
70
|
+
/>
|
|
71
|
+
);
|
|
72
|
+
|
|
73
|
+
function renderInsuranceSumMonth(sum?: number, monthLimit?: number) {
|
|
74
|
+
return sum || monthLimit ? (
|
|
75
|
+
<div className="bg-main-divider rounded-md flex mt-7 gap-6 px-5 py-4">
|
|
76
|
+
{Number.isFinite(sum) ? renderValueBlock('Страховая сумма:', sum, Boolean(monthLimit)) : null}
|
|
77
|
+
{Number.isFinite(monthLimit)
|
|
78
|
+
? renderValueBlock('Ежемесячный лимит:', monthLimit, Boolean(sum))
|
|
79
|
+
: null}
|
|
80
|
+
</div>
|
|
81
|
+
) : null;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
function renderValueBlock(title: string, sum = 0, isAnotherBlock = false) {
|
|
85
|
+
const widthStyle = isAnotherBlock ? 'w-fit' : 'w-full';
|
|
86
|
+
|
|
47
87
|
return (
|
|
48
|
-
<div
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
className="w-[48px] h-[48px] bg-main rounded-full box-border p-[12px]"
|
|
52
|
-
image={benefit.icon}
|
|
53
|
-
width="48"
|
|
54
|
-
height="48"
|
|
55
|
-
asSVG
|
|
56
|
-
/>
|
|
57
|
-
) : null}
|
|
58
|
-
<div className="flex gap-1 flex-col h-full ml-5 max-w-[490px]">
|
|
59
|
-
{benefit?.label ? (
|
|
60
|
-
<div className={`text-xl m-0 ${version === 'primary' ? 'text-primary-text' : ''}`}>
|
|
61
|
-
{benefit.label}
|
|
62
|
-
</div>
|
|
63
|
-
) : null}
|
|
64
|
-
{benefit?.description ? (
|
|
65
|
-
<div className={`text-s ${version === 'primary' ? 'text-secondary-text' : ''}`}>
|
|
66
|
-
{benefit.description}
|
|
67
|
-
</div>
|
|
68
|
-
) : null}
|
|
69
|
-
</div>
|
|
88
|
+
<div className={`flex justify-between items-center gap-2 w-full ${widthStyle}`}>
|
|
89
|
+
<span className="text-secondary-text text-l-light">{title}</span>
|
|
90
|
+
<span className="text-primary-main text-h6">{addSpacesBetweenNumbers(sum)} ₽</span>
|
|
70
91
|
</div>
|
|
71
92
|
);
|
|
72
93
|
}
|