@redneckz/wildless-cms-uni-blocks 0.3.13 → 0.3.16
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 +57 -7
- package/bundle/bundle.umd.min.js +1 -1
- package/dist/components/Blocks.d.ts +1 -0
- package/dist/components/Blocks.js +2 -0
- package/dist/components/Blocks.js.map +1 -1
- package/dist/components/ContentPage/ContentPageHead.js +1 -1
- package/dist/components/ContentPage/ContentPageHead.js.map +1 -1
- package/dist/components/Footer/Footer.mobile.js +1 -1
- package/dist/components/Footer/Footer.mobile.js.map +1 -1
- package/dist/components/Headline/Headline.js +4 -8
- package/dist/components/Headline/Headline.js.map +1 -1
- package/dist/components/Headline/Headline.mobile.js +4 -2
- package/dist/components/Headline/Headline.mobile.js.map +1 -1
- package/dist/components/Headline/HeadlineContent.d.ts +2 -2
- package/dist/components/Headline/constants.d.ts +10 -0
- package/dist/components/Headline/constants.js +25 -0
- package/dist/components/Headline/constants.js.map +1 -0
- 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/Recommendation/Recommendation.d.ts +5 -0
- package/dist/components/Recommendation/Recommendation.js +34 -0
- package/dist/components/Recommendation/Recommendation.js.map +1 -0
- package/dist/components/Recommendation/RecommendationCard.d.ts +7 -0
- package/dist/components/Recommendation/RecommendationCard.js +13 -0
- package/dist/components/Recommendation/RecommendationCard.js.map +1 -0
- package/dist/components/Recommendation/RecommendationContent.d.ts +14 -0
- package/dist/components/Recommendation/RecommendationContent.js +2 -0
- package/dist/components/Recommendation/RecommendationContent.js.map +1 -0
- package/dist/components/StepsBlock/StepsBlock.mobile.js +28 -6
- package/dist/components/StepsBlock/StepsBlock.mobile.js.map +1 -1
- package/dist/components/StepsBlock/StepsBlockContent.d.ts +2 -0
- package/dist/model/BlockVersion.d.ts +6 -1
- package/dist/ui-kit/Description/Description.js +1 -1
- package/lib/common.css +1 -1
- package/lib/components/Blocks.d.ts +1 -0
- package/lib/components/Blocks.js +2 -0
- package/lib/components/Blocks.js.map +1 -1
- package/lib/components/ContentPage/ContentPageHead.js +1 -1
- package/lib/components/ContentPage/ContentPageHead.js.map +1 -1
- package/lib/components/Footer/Footer.mobile.js +1 -1
- package/lib/components/Footer/Footer.mobile.js.map +1 -1
- package/lib/components/Headline/Headline.fixture.d.ts +4 -2
- package/lib/components/Headline/Headline.fixture.mobile.d.ts +2 -3
- package/lib/components/Headline/Headline.js +4 -8
- package/lib/components/Headline/Headline.js.map +1 -1
- package/lib/components/Headline/Headline.mobile.js +4 -2
- package/lib/components/Headline/Headline.mobile.js.map +1 -1
- package/lib/components/Headline/HeadlineContent.d.ts +2 -2
- package/lib/components/Headline/constants.d.ts +10 -0
- package/lib/components/Headline/constants.js +23 -0
- package/lib/components/Headline/constants.js.map +1 -0
- 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/Recommendation/Recommendation.d.ts +5 -0
- package/lib/components/Recommendation/Recommendation.fixture.d.ts +6 -0
- package/lib/components/Recommendation/Recommendation.js +32 -0
- package/lib/components/Recommendation/Recommendation.js.map +1 -0
- package/lib/components/Recommendation/RecommendationCard.d.ts +7 -0
- package/lib/components/Recommendation/RecommendationCard.js +11 -0
- package/lib/components/Recommendation/RecommendationCard.js.map +1 -0
- package/lib/components/Recommendation/RecommendationContent.d.ts +14 -0
- package/lib/components/Recommendation/RecommendationContent.js +2 -0
- package/lib/components/Recommendation/RecommendationContent.js.map +1 -0
- package/lib/components/StepsBlock/StepsBlock.fixture.mobile.d.ts +1 -4
- package/lib/components/StepsBlock/StepsBlock.mobile.js +28 -6
- package/lib/components/StepsBlock/StepsBlock.mobile.js.map +1 -1
- package/lib/components/StepsBlock/StepsBlockContent.d.ts +2 -0
- package/lib/model/BlockVersion.d.ts +6 -1
- package/lib/ui-kit/Description/Description.js +1 -1
- package/mobile/bundle/bundle.umd.js +69 -23
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/dist/components/ContentPage/ContentPageHead.js +1 -1
- package/mobile/dist/components/ContentPage/ContentPageHead.js.map +1 -1
- package/mobile/dist/components/Footer/Footer.js +1 -1
- package/mobile/dist/components/Footer/Footer.js.map +1 -1
- package/mobile/dist/components/Headline/Headline.js +4 -2
- package/mobile/dist/components/Headline/Headline.js.map +1 -1
- package/mobile/dist/components/Headline/HeadlineContent.d.ts +2 -2
- package/mobile/dist/components/Headline/constants.d.ts +10 -0
- package/mobile/dist/components/Headline/constants.js +25 -0
- package/mobile/dist/components/Headline/constants.js.map +1 -0
- package/mobile/dist/components/ProductBlock/ProductBlockInner.js +1 -1
- package/mobile/dist/components/ProductBlock/ProductBlockInner.js.map +1 -1
- package/mobile/dist/components/Recommendation/Recommendation.d.ts +5 -0
- package/mobile/dist/components/Recommendation/Recommendation.js +34 -0
- package/mobile/dist/components/Recommendation/Recommendation.js.map +1 -0
- package/mobile/dist/components/Recommendation/RecommendationCard.d.ts +7 -0
- package/mobile/dist/components/Recommendation/RecommendationCard.js +13 -0
- package/mobile/dist/components/Recommendation/RecommendationCard.js.map +1 -0
- package/mobile/dist/components/Recommendation/RecommendationContent.d.ts +14 -0
- package/mobile/dist/components/Recommendation/RecommendationContent.js +2 -0
- package/mobile/dist/components/Recommendation/RecommendationContent.js.map +1 -0
- package/mobile/dist/components/StepsBlock/StepsBlock.js +28 -6
- package/mobile/dist/components/StepsBlock/StepsBlock.js.map +1 -1
- package/mobile/dist/components/StepsBlock/StepsBlockContent.d.ts +2 -0
- package/mobile/dist/model/BlockVersion.d.ts +6 -1
- package/mobile/dist/ui-kit/Description/Description.js +1 -1
- package/mobile/lib/components/ContentPage/ContentPageHead.js +1 -1
- package/mobile/lib/components/ContentPage/ContentPageHead.js.map +1 -1
- package/mobile/lib/components/Footer/Footer.js +1 -1
- package/mobile/lib/components/Footer/Footer.js.map +1 -1
- package/mobile/lib/components/Headline/Headline.js +4 -2
- package/mobile/lib/components/Headline/Headline.js.map +1 -1
- package/mobile/lib/components/Headline/HeadlineContent.d.ts +2 -2
- package/mobile/lib/components/Headline/constants.d.ts +10 -0
- package/mobile/lib/components/Headline/constants.js +23 -0
- package/mobile/lib/components/Headline/constants.js.map +1 -0
- package/mobile/lib/components/ProductBlock/ProductBlockInner.js +1 -1
- package/mobile/lib/components/ProductBlock/ProductBlockInner.js.map +1 -1
- package/mobile/lib/components/Recommendation/Recommendation.d.ts +5 -0
- package/mobile/lib/components/Recommendation/Recommendation.js +32 -0
- package/mobile/lib/components/Recommendation/Recommendation.js.map +1 -0
- package/mobile/lib/components/Recommendation/RecommendationCard.d.ts +7 -0
- package/mobile/lib/components/Recommendation/RecommendationCard.js +11 -0
- package/mobile/lib/components/Recommendation/RecommendationCard.js.map +1 -0
- package/mobile/lib/components/Recommendation/RecommendationContent.d.ts +14 -0
- package/mobile/lib/components/Recommendation/RecommendationContent.js +2 -0
- package/mobile/lib/components/Recommendation/RecommendationContent.js.map +1 -0
- package/mobile/lib/components/StepsBlock/StepsBlock.js +28 -6
- package/mobile/lib/components/StepsBlock/StepsBlock.js.map +1 -1
- package/mobile/lib/components/StepsBlock/StepsBlockContent.d.ts +2 -0
- package/mobile/lib/model/BlockVersion.d.ts +6 -1
- package/mobile/lib/ui-kit/Description/Description.js +1 -1
- package/mobile/src/components/ContentPage/ContentPage.page.json +74 -0
- package/mobile/src/components/ContentPage/ContentPageHead.tsx +1 -1
- package/mobile/src/components/Footer/Footer.tsx +2 -2
- package/mobile/src/components/Headline/Headline.example.json +1 -1
- package/mobile/src/components/Headline/Headline.tsx +25 -4
- package/mobile/src/components/Headline/HeadlineContent.ts +2 -3
- package/mobile/src/components/Headline/constants.ts +32 -0
- package/mobile/src/components/ProductBlock/ProductBlockInner.tsx +3 -1
- package/mobile/src/components/Recommendation/Recommendation.example.json +38 -0
- package/mobile/src/components/Recommendation/Recommendation.tsx +105 -0
- package/mobile/src/components/Recommendation/RecommendationCard.tsx +33 -0
- package/mobile/src/components/Recommendation/RecommendationContent.ts +19 -0
- package/mobile/src/components/StepsBlock/StepsBlock.tsx +60 -19
- package/mobile/src/components/StepsBlock/StepsBlockContent.ts +2 -1
- package/mobile/src/model/BlockVersion.ts +7 -1
- package/mobile/src/ui-kit/Description/Description.tsx +1 -1
- package/package.json +1 -1
- package/src/components/Blocks.ts +2 -0
- package/src/components/ContentPage/ContentPage.page.json +74 -0
- package/src/components/ContentPage/ContentPageHead.tsx +1 -1
- package/src/components/Footer/Footer.mobile.tsx +2 -2
- package/src/components/Headline/Headline.example.json +1 -1
- package/src/components/Headline/Headline.fixture.mobile.tsx +39 -15
- package/src/components/Headline/Headline.fixture.tsx +20 -17
- package/src/components/Headline/Headline.mobile.tsx +25 -4
- package/src/components/Headline/Headline.tsx +10 -12
- package/src/components/Headline/HeadlineContent.ts +2 -3
- package/src/components/Headline/constants.ts +32 -0
- package/src/components/ProductBlock/ProductBlockInner.mobile.tsx +3 -1
- package/src/components/ProductBlock/ProductBlockInner.tsx +1 -1
- package/src/components/Recommendation/Recommendation.example.json +38 -0
- package/src/components/Recommendation/Recommendation.fixture.tsx +73 -0
- package/src/components/Recommendation/Recommendation.tsx +105 -0
- package/src/components/Recommendation/RecommendationCard.tsx +33 -0
- package/src/components/Recommendation/RecommendationContent.ts +19 -0
- package/src/components/StepsBlock/StepsBlock.fixture.mobile.tsx +127 -72
- package/src/components/StepsBlock/StepsBlock.mobile.tsx +60 -19
- package/src/components/StepsBlock/StepsBlockContent.ts +2 -1
- package/src/model/BlockVersion.ts +7 -1
- package/src/ui-kit/Description/Description.tsx +1 -1
|
@@ -8,6 +8,6 @@ import { List } from '../../ui-kit/List/List.js';
|
|
|
8
8
|
import { BaseTile } from '../BaseTile/BaseTile.js';
|
|
9
9
|
import { renderBenefit } from './renderBenefit.js';
|
|
10
10
|
export const ProductBlockInner = JSX(({ className = '', context, title, headingType = 'h2', description, benefits, buttons, image, items, version = 'primary', }) => {
|
|
11
|
-
return (_jsxs("div", { className: `flex grow justify-between items-stretch ${className}`, children: [_jsx("div", { className: 'flex flex-col', children: _jsxs(BaseTile, { context: context, title: title && (_jsx(Heading, { headingType: headingType, title: title, className: "whitespace-pre-wrap max-w-[600px]" })), buttons: buttons?.length ? (_jsx(ButtonSection, { context: context, buttons: buttons, className: "flex mt-9 gap-3" })) : null, children: [description && (_jsx(Description, { className: "
|
|
11
|
+
return (_jsxs("div", { className: `flex grow justify-between items-stretch ${className}`, children: [_jsx("div", { className: 'flex flex-col', children: _jsxs(BaseTile, { context: context, title: title && (_jsx(Heading, { headingType: headingType, title: title, className: "whitespace-pre-wrap max-w-[600px]" })), buttons: buttons?.length ? (_jsx(ButtonSection, { context: context, buttons: buttons, className: "flex mt-9 gap-3" })) : null, children: [description && (_jsx(Description, { className: "mt-4 max-w-[600px]", description: description })), benefits?.filter((items) => items.label)?.length ? (_jsx("div", { className: "flex gap-6 mt-6", children: benefits.map((_, i) => renderBenefit(_, i, version)) })) : null, items?.length ? (_jsx(List, { className: "mt-5", items: items, itemClassName: "mb-[10px]", version: version })) : null] }) }), image?.src && _jsx(Img, { className: "mt-auto", image: image })] }));
|
|
12
12
|
});
|
|
13
13
|
//# sourceMappingURL=ProductBlockInner.js.map
|
|
@@ -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,WAAW,EAAE,MAAM,sCAAsC,CAAC;AACnE,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AACvD,OAAO,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAC;AAC3C,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAEhD,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,WAAW,GAAG,IAAI,EAClB,WAAW,EACX,QAAQ,EACR,OAAO,EACP,KAAK,EACL,KAAK,EACL,OAAO,GAAG,SAAS,GACpB,EAAE,EAAE;IACH,OAAO,CACL,eAAK,SAAS,EAAE,2CAA2C,SAAS,EAAE,aACpE,cAAK,SAAS,EAAE,eAAe,YAC7B,MAAC,QAAQ,IACP,OAAO,EAAE,OAAO,EAChB,KAAK,EACH,KAAK,IAAI,CACP,KAAC,OAAO,IACN,WAAW,EAAE,WAAW,EACxB,KAAK,EAAE,KAAK,EACZ,SAAS,EAAC,mCAAmC,GAC7C,CACH,EAEH,OAAO,EACL,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,CAChB,KAAC,aAAa,IAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAC,iBAAiB,GAAG,CAClF,CAAC,CAAC,CAAC,IAAI,aAGT,WAAW,IAAI,CACd,KAAC,WAAW,IAAC,SAAS,EAAC,
|
|
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,WAAW,EAAE,MAA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CAAC,EAAE,EAAE,CAAC,aAAa,CAAC,CAAC,EAAE,CAAC,EAAE,OAAO,CAAC,CAAC,GACjD,CACP,CAAC,CAAC,CAAC,IAAI,EACP,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,CACf,KAAC,IAAI,IAAC,SAAS,EAAC,MAAM,EAAC,KAAK,EAAE,KAAK,EAAE,aAAa,EAAC,WAAW,EAAC,OAAO,EAAE,OAAO,GAAI,CACpF,CAAC,CAAC,CAAC,IAAI,IACC,GACP,EACL,KAAK,EAAE,GAAG,IAAI,KAAC,GAAG,IAAC,SAAS,EAAC,SAAS,EAAC,KAAK,EAAE,KAAK,GAAI,IACpD,CACP,CAAC;AACJ,CAAC,CACF,CAAC"}
|
|
@@ -8,7 +8,7 @@ import { List } from '../../ui-kit/List/List.js';
|
|
|
8
8
|
import { BaseTile } from '../BaseTile/BaseTile.js';
|
|
9
9
|
import { renderBenefit } from './renderBenefit.js';
|
|
10
10
|
export const ProductBlockInner = JSX(({ className = '', context, title, headingType = 'h2', description, benefits, buttons, image, items, version = 'primary', }) => {
|
|
11
|
-
return (_jsxs("div", { className: `w-full text-primary-text ${className}`, children: [_jsx("div", { children: _jsxs(BaseTile, { context: context, title: title && (_jsx(Heading, { headingType: headingType, title: title, className: "whitespace-pre-wrap max-w-[600px]" })), buttons: buttons?.length ? (_jsx(ButtonSection, { context: context, buttons: buttons, className: "flex flex-col mt-5 gap-2.5" })) : null, children: [description ? _jsx(Description, { className: "mt-3", description: description }) : null, benefits?.filter((items) => items.label)?.length ? (_jsx("div", { className: "mt-3", children: benefits.map((_, i) => renderBenefit(_, i, version)) })) : null, items?.length ? _jsx(List, { className: "mt-3", items: items }) : null] }) }), renderImage(image)] }));
|
|
11
|
+
return (_jsxs("div", { className: `w-full text-primary-text ${className}`, children: [_jsx("div", { children: _jsxs(BaseTile, { context: context, title: title && (_jsx(Heading, { headingType: headingType, title: title, className: "whitespace-pre-wrap max-w-[600px]" })), buttons: buttons?.length ? (_jsx(ButtonSection, { context: context, buttons: buttons, className: "flex flex-col mt-5 gap-2.5" })) : null, children: [description ? (_jsx(Description, { className: "mt-3 text-m-md", description: description })) : null, benefits?.filter((items) => items.label)?.length ? (_jsx("div", { className: "mt-3", children: benefits.map((_, i) => renderBenefit(_, i, version)) })) : null, items?.length ? _jsx(List, { className: "mt-3", items: items }) : null] }) }), renderImage(image)] }));
|
|
12
12
|
});
|
|
13
13
|
function renderImage(image) {
|
|
14
14
|
return image?.src ? (_jsx("div", { className: "mt-5", children: _jsx(Img, { image: { className: 'block', ...image } }) })) : null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductBlockInner.mobile.js","sourceRoot":"","sources":["../../../src/components/ProductBlock/ProductBlockInner.mobile.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAExC,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAClE,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AACnE,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AACvD,OAAO,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAC;AAC3C,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAEhD,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,WAAW,GAAG,IAAI,EAClB,WAAW,EACX,QAAQ,EACR,OAAO,EACP,KAAK,EACL,KAAK,EACL,OAAO,GAAG,SAAS,GACpB,EAAE,EAAE;IACH,OAAO,CACL,eAAK,SAAS,EAAE,4BAA4B,SAAS,EAAE,aACrD,wBACE,MAAC,QAAQ,IACP,OAAO,EAAE,OAAO,EAChB,KAAK,EACH,KAAK,IAAI,CACP,KAAC,OAAO,IACN,WAAW,EAAE,WAAW,EACxB,KAAK,EAAE,KAAK,EACZ,SAAS,EAAC,mCAAmC,GAC7C,CACH,EAEH,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,WAAW,CAAC,CAAC,CAAC,KAAC,WAAW,IAAC,SAAS,EAAC,
|
|
1
|
+
{"version":3,"file":"ProductBlockInner.mobile.js","sourceRoot":"","sources":["../../../src/components/ProductBlock/ProductBlockInner.mobile.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAExC,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAClE,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AACnE,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AACvD,OAAO,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAC;AAC3C,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAEhD,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,WAAW,GAAG,IAAI,EAClB,WAAW,EACX,QAAQ,EACR,OAAO,EACP,KAAK,EACL,KAAK,EACL,OAAO,GAAG,SAAS,GACpB,EAAE,EAAE;IACH,OAAO,CACL,eAAK,SAAS,EAAE,4BAA4B,SAAS,EAAE,aACrD,wBACE,MAAC,QAAQ,IACP,OAAO,EAAE,OAAO,EAChB,KAAK,EACH,KAAK,IAAI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niBlockProps } from '../../types';
|
|
2
|
+
import type { RecommendationContent } from './RecommendationContent';
|
|
3
|
+
export interface RecommendationProps extends RecommendationContent, UniBlockProps {
|
|
4
|
+
}
|
|
5
|
+
export declare const Recommendation: (props: import("@redneckz/uni-jsx").PropsWithChildren<RecommendationProps, any>, context?: any) => any;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
|
|
2
|
+
import { JSX } from '@redneckz/uni-jsx';
|
|
3
|
+
import { ArrowButton } from '../../ui-kit/Button/ArrowButton.js';
|
|
4
|
+
import { Heading } from '../../ui-kit/Heading/Heading.js';
|
|
5
|
+
import { RecommendationCard } from './RecommendationCard.js';
|
|
6
|
+
const BLUR_BLOCK_CLASSES = 'absolute top-0 bottom-0 w-[84px]';
|
|
7
|
+
const CARD_FULL_VIEW_COUNT = 2;
|
|
8
|
+
const CARD_SHIFT = 525;
|
|
9
|
+
export const Recommendation = JSX(({ context, recommendations = [], className = '', title, version }) => {
|
|
10
|
+
const [activeCardIndex, setActiveCardIndex] = context.useState(0);
|
|
11
|
+
const blockClassName = version === 'secondary' ? 'bg-primary-main text-white' : 'bg-white text-primary-text';
|
|
12
|
+
const cardClassName = version === 'secondary' ? 'border-main-divider' : 'border-main-stroke';
|
|
13
|
+
return (_jsxs("section", { className: `relative font-sans p-[50px] overflow-hidden ${blockClassName} ${className}`, children: [title ? _jsx(Heading, { headingType: "h3", className: "mb-8", title: title }) : null, _jsx("div", { className: "flex duration-1000 gap-4", style: { transform: `translateX(-${activeCardIndex * CARD_SHIFT}px)` }, role: "list", children: recommendations?.length
|
|
14
|
+
? recommendations.map(renderRecommendationCard({ context, version, className: cardClassName }))
|
|
15
|
+
: null }), renderNavButtons({
|
|
16
|
+
cardsCount: recommendations.length,
|
|
17
|
+
activeCardIndex,
|
|
18
|
+
setActiveCardIndex,
|
|
19
|
+
}), _jsx("div", { className: `${BLUR_BLOCK_CLASSES} left-0 ${version === 'secondary' ? 'bg-opacity-from-main' : 'bg-opacity-from-white'}` }), _jsx("div", { className: `${BLUR_BLOCK_CLASSES} right-0 ${version === 'secondary' ? 'bg-opacity-to-main' : 'bg-opacity-to-white'}` })] }));
|
|
20
|
+
});
|
|
21
|
+
const renderRecommendationCard = ({ context, version, className }) => (card, i) => {
|
|
22
|
+
return (_jsx(RecommendationCard, { context: context, ...card, version: version, className: className }, String(i)));
|
|
23
|
+
};
|
|
24
|
+
const renderNavButtons = ({ cardsCount, activeCardIndex, setActiveCardIndex, }) => {
|
|
25
|
+
const handleNextClick = () => setActiveCardIndex(activeCardIndex + 1);
|
|
26
|
+
const handlePrevClick = () => setActiveCardIndex(activeCardIndex - 1);
|
|
27
|
+
const isUseSlider = cardsCount > CARD_FULL_VIEW_COUNT;
|
|
28
|
+
const showNextButton = isUseSlider && cardsCount - activeCardIndex > CARD_FULL_VIEW_COUNT;
|
|
29
|
+
const showPrevButton = isUseSlider && activeCardIndex > 0;
|
|
30
|
+
return (_jsxs("div", { children: [showPrevButton && (_jsx(ArrowButton, { className: "absolute top-1/2 left-8 rotate-180 z-10 mt-6", onClick: handlePrevClick, ariaLabel: "\u041F\u0440\u043E\u043B\u0438\u0441\u0442\u0430\u0442\u044C \u0432\u043B\u0435\u0432\u043E" })), showNextButton && (_jsx(ArrowButton, { className: "absolute top-1/2 right-8 z-10 mt-6", onClick: handleNextClick, ariaLabel: "\u041F\u0440\u043E\u043B\u0438\u0441\u0442\u0430\u0442\u044C \u0432\u043F\u0440\u0430\u0432\u043E" }))] }));
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=Recommendation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Recommendation.js","sourceRoot":"","sources":["../../../src/components/Recommendation/Recommendation.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAExC,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC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,EAAC,6FAAkB,GAC5B,CACH,EACA,cAAc,IAAI,CACjB,KAAC,WAAW,IACV,SAAS,EAAC,oCAAoC,EAC9C,OAAO,EAAE,eAAe,EACxB,SAAS,EAAC,mGAAmB,GAC7B,CACH,IACG,CACP,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { BlockVersion } from '../../model/BlockVersion';
|
|
2
|
+
import type { UniBlockProps } from '../../types';
|
|
3
|
+
import type { RecommendationCardContent } from './RecommendationContent';
|
|
4
|
+
export interface RecommendationCardProps extends RecommendationCardContent, UniBlockProps {
|
|
5
|
+
version?: BlockVersion;
|
|
6
|
+
}
|
|
7
|
+
export declare const RecommendationCard: (props: import("@redneckz/uni-jsx").PropsWithChildren<RecommendationCardProps, any>, context?: any) => any;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
|
|
2
|
+
import { JSX } from '@redneckz/uni-jsx';
|
|
3
|
+
import { Description } from '../../ui-kit/Description/Description.js';
|
|
4
|
+
import { Heading } from '../../ui-kit/Heading/Heading.js';
|
|
5
|
+
import { Img } from '../../ui-kit/Img/Img.js';
|
|
6
|
+
import { List } from '../../ui-kit/List/List.js';
|
|
7
|
+
import { BaseTile } from '../BaseTile/BaseTile.js';
|
|
8
|
+
export const RecommendationCard = JSX(({ context, className = '', title, description, items, image, version }) => {
|
|
9
|
+
return (_jsx("section", { className: `border border-solid box-border rounded-md p-7 min-w-[515px] max-w-[515px] ${className}`, role: "listitem", children: _jsxs(BaseTile, { context: context, title: title && _jsx(Heading, { headingType: "h4", title: title, className: "mb-4" }), image: image?.src && _jsx(Img, { className: "mt-auto ml-7", image: image }), children: [description ? _jsx(Description, { description: description }) : null, items?.length ? _jsx(List, { items: items, version: version }) : null] }) }));
|
|
10
|
+
});
|
|
11
|
+
//# sourceMappingURL=RecommendationCard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RecommendationCard.js","sourceRoot":"","sources":["../../../src/components/Recommendation/RecommendationCard.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAGxC,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AACnE,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AACvD,OAAO,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAC;AAC3C,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAOhD,MAAM,CAAC,MAAM,kBAAkB,GAAG,GAAG,CACnC,CAAC,EAAE,OAAO,EAAE,SAAS,GAAG,EAAE,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,EAAE;IACzE,OAAO,CACL,kBACE,SAAS,EAAE,6EAA6E,SAAS,EAAE,EACnG,IAAI,EAAC,UAAU,YAEf,MAAC,QAAQ,IACP,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,KAAK,IAAI,KAAC,OAAO,IAAC,WAAW,EAAC,IAAI,EAAC,KAAK,EAAE,KAAK,EAAE,SAAS,EAAC,MAAM,GAAG,EAC3E,KAAK,EAAE,KAAK,EAAE,GAAG,IAAI,KAAC,GAAG,IAAC,SAAS,EAAC,cAAc,EAAC,KAAK,EAAE,KAAK,GAAI,aAElE,WAAW,CAAC,CAAC,CAAC,KAAC,WAAW,IAAC,WAAW,EAAE,WAAW,GAAI,CAAC,CAAC,CAAC,IAAI,EAC9D,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,KAAC,IAAI,IAAC,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,GAAI,CAAC,CAAC,CAAC,IAAI,IACvD,GACH,CACX,CAAC;AACJ,CAAC,CACF,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { BlockVersion } from '../../model/BlockVersion';
|
|
2
|
+
import type { DescriptionContent } from '../../ui-kit/Description/DescriptionContent';
|
|
3
|
+
import type { HeadingContent } from '../../ui-kit/Heading/HeadingContent';
|
|
4
|
+
import type { ImageContent } from '../../ui-kit/Img/ImgProps';
|
|
5
|
+
import type { ListContent } from '../../ui-kit/List/ListContent';
|
|
6
|
+
export declare type RecommendationCardContent = HeadingContent & DescriptionContent & ListContent & ImageContent;
|
|
7
|
+
/**
|
|
8
|
+
* @title Рекомендации
|
|
9
|
+
*/
|
|
10
|
+
export interface RecommendationContent extends HeadingContent {
|
|
11
|
+
/** @title Карточки */
|
|
12
|
+
recommendations?: RecommendationCardContent[];
|
|
13
|
+
version?: BlockVersion;
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RecommendationContent.js","sourceRoot":"","sources":["../../../src/components/Recommendation/RecommendationContent.ts"],"names":[],"mappings":""}
|
|
@@ -2,21 +2,43 @@ import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
|
|
|
2
2
|
import { JSX } from '@redneckz/uni-jsx';
|
|
3
3
|
import { Heading } from '../../ui-kit/Heading/Heading.js';
|
|
4
4
|
import { Icon } from '../../ui-kit/Icon/Icon.js';
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
const STEPS_BLOCK_STYLE_MAPS = {
|
|
6
|
+
primary: {
|
|
7
|
+
background: 'bg-white',
|
|
8
|
+
title: 'text-primary-text',
|
|
9
|
+
description: 'text-secondary-text',
|
|
10
|
+
iconBackground: 'bg-secondary-light',
|
|
11
|
+
iconConnector: 'bg-secondary-light',
|
|
12
|
+
},
|
|
13
|
+
secondary: {
|
|
14
|
+
background: 'bg-primary-main',
|
|
15
|
+
title: 'text-white',
|
|
16
|
+
description: 'text-white/80',
|
|
17
|
+
iconBackground: 'bg-white/30',
|
|
18
|
+
iconConnector: 'bg-white',
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
const styleMaps = (version) => STEPS_BLOCK_STYLE_MAPS[version];
|
|
22
|
+
export const StepsBlock = JSX(({ className, title, description, steps, size = 'normal', version = 'primary' }) => {
|
|
23
|
+
const style = styleMaps(version);
|
|
24
|
+
return (_jsxs("section", { className: `box-border font-sans bg-white px-4 py-6 flex flex-col
|
|
25
|
+
${style.background} ${style.title} ${className || ''}`, children: [title && (_jsx(Heading, { headingType: "h3", className: `text-center ${style.title}`, title: title })), description && (_jsx("p", { className: `text-m-md text-center ${style.description} ${title && 'mt-2'}`, children: description })), steps?.length ? (_jsx("div", { className: `box-border py-0.5 mb-0.5 mt-5`, children: _jsx("div", { className: "flex flex-col justify-between gap-x-[101px]", children: steps.map((step, i) => renderStepTitle({ step, size, i, length: steps.length, version: version })) }) })) : null] }));
|
|
7
26
|
});
|
|
8
27
|
const renderStepTitle = (params) => {
|
|
9
|
-
const { step, size, i, length } = params;
|
|
28
|
+
const { step, size, i, length, version } = params;
|
|
10
29
|
const isLastStep = length - 1 === i;
|
|
11
30
|
const margin = size === 'normal' ? 'ml-[34px]' : 'ml-[24px]';
|
|
12
|
-
|
|
31
|
+
const style = styleMaps(version);
|
|
32
|
+
return (_jsx("div", { children: _jsxs("div", { className: "flex flex-row text-center relative", children: [_jsxs("div", { className: "overflow-hidden", children: [renderIconArea(params), !isLastStep && (_jsx("div", { className: `min-h-8 h-full w-[2px] ${style.iconConnector} ${margin}` }))] }), _jsxs("div", { className: "flex flex-col justify-start relative", children: [step.label && (_jsx("div", { className: "font-medium text-m-title-xs m-0 text-left", children: step.label })), step.description && (_jsx("div", { className: `font-normal text-sm ${style.description} text-left ${step.label ? 'mt-1' : ''}`, children: step.description }))] })] }, String(i)) }, String(i)));
|
|
13
33
|
};
|
|
14
|
-
const renderIconArea = (
|
|
34
|
+
const renderIconArea = (params) => {
|
|
35
|
+
const { step, size, i, version } = params;
|
|
36
|
+
const style = styleMaps(version);
|
|
15
37
|
const iconAreaSize = size === 'normal'
|
|
16
38
|
? 'h-[70px] w-[70px] min-w-[70px] min-h-[70px]'
|
|
17
39
|
: 'h-[50px] w-[50px] min-w-[50px] min-h-[50px]';
|
|
18
40
|
const iconSize = size === 'normal' ? '38' : '27';
|
|
19
41
|
const iconTextSize = size === 'normal' ? 'text-m-title' : 'text-m-title-xs';
|
|
20
|
-
return (_jsx("div", { className: `${iconAreaSize}
|
|
42
|
+
return (_jsx("div", { className: `${iconAreaSize} ${style.iconBackground} rounded-full z-10 mr-3 flex justify-center content-center`, children: _jsx("span", { className: `font-medium flex self-center ${style.title} ${iconTextSize}`, children: (step.icon && _jsx(Icon, { name: step.icon, width: iconSize, height: iconSize, asSVG: true })) || i + 1 }) }));
|
|
21
43
|
};
|
|
22
44
|
//# sourceMappingURL=StepsBlock.mobile.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StepsBlock.mobile.js","sourceRoot":"","sources":["../../../src/components/StepsBlock/StepsBlock.mobile.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"StepsBlock.mobile.js","sourceRoot":"","sources":["../../../src/components/StepsBlock/StepsBlock.mobile.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AACvD,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAgB9C,MAAM,sBAAsB,GAAoC;IAC9D,OAAO,EAAE;QACP,UAAU,EAAE,UAAU;QACtB,KAAK,EAAE,mBAAmB;QAC1B,WAAW,EAAE,qBAAqB;QAClC,cAAc,EAAE,oBAAoB;QACpC,aAAa,EAAE,oBAAoB;KACpC;IACD,SAAS,EAAE;QACT,UAAU,EAAE,iBAAiB;QAC7B,KAAK,EAAE,YAAY;QACnB,WAAW,EAAE,eAAe;QAC5B,cAAc,EAAE,aAA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CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;IACjD,MAAM,YAAY,GAAG,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,iBAAiB,CAAC;IAE5E,OAAO,CACL,cACE,SAAS,EAAE,GAAG,YAAY,IAAI,KAAK,CAAC,cAAc,4DAA4D,YAE9G,eAAM,SAAS,EAAE,gCAAgC,KAAK,CAAC,KAAK,IAAI,YAAY,EAAE,YAC3E,CAAC,IAAI,CAAC,IAAI,IAAI,KAAC,IAAI,IAAC,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,SAAG,CAAC,IAAI,CAAC,GAAG,CAAC,GACtF,GACH,CACP,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { IconName } from '../../ui-kit/Icon/IconProps';
|
|
2
2
|
import type { SizeVersion } from '../../model/SizeVersion';
|
|
3
|
+
import type { BlockVersion } from '../../model/BlockVersion';
|
|
3
4
|
/**
|
|
4
5
|
* @title Шаг
|
|
5
6
|
*/
|
|
@@ -27,4 +28,5 @@ export interface StepsBlockContent {
|
|
|
27
28
|
*/
|
|
28
29
|
steps?: Step[];
|
|
29
30
|
size?: SizeVersion;
|
|
31
|
+
version?: BlockVersion;
|
|
30
32
|
}
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @title Цвет
|
|
2
|
+
* @title Цвет блока
|
|
3
3
|
* @enumNames ["Основная", "Второстепенная"]
|
|
4
4
|
*/
|
|
5
5
|
export declare type BlockVersion = 'primary' | 'secondary';
|
|
6
|
+
/**
|
|
7
|
+
* @title Цвет блока
|
|
8
|
+
* @enumNames ["Прозрачная", Основная", "Второстепенная"]
|
|
9
|
+
*/
|
|
10
|
+
export declare type BlockVersionWithTransparent = 'transparent' | 'primary' | 'secondary';
|
|
@@ -2,6 +2,6 @@ import { jsx as _jsx } from "@redneckz/uni-jsx/jsx-runtime";
|
|
|
2
2
|
import { JSX } from '@redneckz/uni-jsx';
|
|
3
3
|
export const Description = JSX((props) => {
|
|
4
4
|
const { className = '', description } = props;
|
|
5
|
-
return _jsx("div", { className: `font-normal text-
|
|
5
|
+
return _jsx("div", { className: `font-normal text-base ${className}`, children: description });
|
|
6
6
|
});
|
|
7
7
|
//# sourceMappingURL=Description.js.map
|
|
@@ -267,8 +267,32 @@
|
|
|
267
267
|
return format ? `image/${String(format)}` : undefined;
|
|
268
268
|
}
|
|
269
269
|
|
|
270
|
-
const
|
|
271
|
-
|
|
270
|
+
const ALIGN_TEXT = {
|
|
271
|
+
left: 'text-left',
|
|
272
|
+
center: 'text-center',
|
|
273
|
+
right: 'text-right',
|
|
274
|
+
};
|
|
275
|
+
const HEADLINE_BLOCK_STYLE_MAPS = {
|
|
276
|
+
transparent: {
|
|
277
|
+
background: 'bg-transparent',
|
|
278
|
+
text: 'text-primary-text',
|
|
279
|
+
description: 'text-primary-text',
|
|
280
|
+
},
|
|
281
|
+
primary: {
|
|
282
|
+
background: 'bg-white',
|
|
283
|
+
text: 'text-primary-text',
|
|
284
|
+
description: 'text-primary-text',
|
|
285
|
+
},
|
|
286
|
+
secondary: {
|
|
287
|
+
background: 'bg-primary-main',
|
|
288
|
+
text: 'text-white',
|
|
289
|
+
description: 'text-white/80',
|
|
290
|
+
},
|
|
291
|
+
};
|
|
292
|
+
|
|
293
|
+
const Headline = JSX(({ bgColorHeadline = 'transparent', className = '', title, description, image, align = 'left', }) => {
|
|
294
|
+
const STYLE_MAPS = HEADLINE_BLOCK_STYLE_MAPS[bgColorHeadline];
|
|
295
|
+
return (jsxs("section", { className: `px-4 py-6 ${STYLE_MAPS.background} ${className}`, children: [title && (jsx(Heading, { headingType: "h2", className: `${STYLE_MAPS.text} ${ALIGN_TEXT[align]}`, title: title })), description && (jsx("p", { className: `font-normal text-m-md ${STYLE_MAPS.description} ${ALIGN_TEXT[align]} ${title ? 'mt-2.5' : ''}`, children: description })), image?.src && (jsx("div", { className: "mt-5 mx-auto flex justify-center", children: jsx(Img, { image: image }) }))] }));
|
|
272
296
|
});
|
|
273
297
|
|
|
274
298
|
// column-gap between children of SwipeListControl container
|
|
@@ -551,7 +575,7 @@
|
|
|
551
575
|
|
|
552
576
|
const Description = JSX((props) => {
|
|
553
577
|
const { className = '', description } = props;
|
|
554
|
-
return jsx("div", { className: `font-normal text-
|
|
578
|
+
return jsx("div", { className: `font-normal text-base ${className}`, children: description });
|
|
555
579
|
});
|
|
556
580
|
|
|
557
581
|
const LIST_STYLE_CLASSES$1 = 'rounded-full inline-block mr-3 mt-2';
|
|
@@ -597,7 +621,7 @@
|
|
|
597
621
|
}
|
|
598
622
|
|
|
599
623
|
const ProductBlockInner = JSX(({ className = '', context, title, headingType = 'h2', description, benefits, buttons, image, items, version = 'primary', }) => {
|
|
600
|
-
return (jsxs("div", { className: `w-full text-primary-text ${className}`, children: [jsx("div", { children: jsxs(BaseTile, { context: context, title: title && (jsx(Heading, { headingType: headingType, title: title, className: "whitespace-pre-wrap max-w-[600px]" })), buttons: buttons?.length ? (jsx(ButtonSection, { context: context, buttons: buttons, className: "flex flex-col mt-5 gap-2.5" })) : null, children: [description ? jsx(Description, { className: "mt-3", description: description }) : null, benefits?.filter((items) => items.label)?.length ? (jsx("div", { className: "mt-3", children: benefits.map((_, i) => renderBenefit(_, i, version)) })) : null, items?.length ? jsx(List, { className: "mt-3", items: items }) : null] }) }), renderImage$1(image)] }));
|
|
624
|
+
return (jsxs("div", { className: `w-full text-primary-text ${className}`, children: [jsx("div", { children: jsxs(BaseTile, { context: context, title: title && (jsx(Heading, { headingType: headingType, title: title, className: "whitespace-pre-wrap max-w-[600px]" })), buttons: buttons?.length ? (jsx(ButtonSection, { context: context, buttons: buttons, className: "flex flex-col mt-5 gap-2.5" })) : null, children: [description ? (jsx(Description, { className: "mt-3 text-m-md", description: description })) : null, benefits?.filter((items) => items.label)?.length ? (jsx("div", { className: "mt-3", children: benefits.map((_, i) => renderBenefit(_, i, version)) })) : null, items?.length ? jsx(List, { className: "mt-3", items: items }) : null] }) }), renderImage$1(image)] }));
|
|
601
625
|
});
|
|
602
626
|
function renderImage$1(image) {
|
|
603
627
|
return image?.src ? (jsx("div", { className: "mt-5", children: jsx(Img, { image: { className: 'block', ...image } }) })) : null;
|
|
@@ -1136,6 +1160,18 @@
|
|
|
1136
1160
|
});
|
|
1137
1161
|
const TextInformationLink = JSX(({ className, index, text, href, target, onClick }) => (jsx("a", { className: `font-sans font-normal text-xs text-secondary-text visited:text-secondary-text hover:text-primary-text inline-block no-underline max-w-[292px] ${className || ''}`, href: href, target: target, onClick: onClick, children: text || `Документ ${index}` })));
|
|
1138
1162
|
|
|
1163
|
+
function useSitemap(useAsyncData) {
|
|
1164
|
+
const { data } = useAsyncData(sitemapURL(), fetchSitemap);
|
|
1165
|
+
return data || {};
|
|
1166
|
+
}
|
|
1167
|
+
async function fetchSitemap() {
|
|
1168
|
+
const response = await fetch(sitemapURL());
|
|
1169
|
+
return await response.json();
|
|
1170
|
+
}
|
|
1171
|
+
function sitemapURL() {
|
|
1172
|
+
return `/wcms-resources/${projectSettings.SITEMAP || 'sitemap'}.json`;
|
|
1173
|
+
}
|
|
1174
|
+
|
|
1139
1175
|
const SearchBar = JSX(({ className, context }) => {
|
|
1140
1176
|
const { term, setTerm } = context.useSearch();
|
|
1141
1177
|
return (jsxs("form", { className: `relative ${className || ''}`, children: [jsxs("div", { className: "absolute rounded h-full flex items-center justify-center pl-4 max-w-[170px] gap-3.5 pointer-events-none", children: [jsx("div", { className: "w-[20px] h-[20px]", children: jsx(Icon, { name: "LoupeIcon", width: "24", height: "24" }) }), !term && (jsx("label", { htmlFor: "search-bar-input", className: "font-sans font-normal text-sm text-secondary-text", children: "\u041F\u043E\u0438\u0441\u043A \u043F\u043E \u0441\u0430\u0439\u0442\u0443" }))] }), jsx("input", { id: "search-bar-input", className: 'h-12 pl-12 w-full peer placeholder-transparent font-sans font-normal text-base text-black border border-solid rounded box-border outline-none pr-[6%] border-main-divider focus:border-primary-text', value: term, onChange: (e) => setTerm(e.target.value), type: "text", name: "search-bar-input", placeholder: "some search" }), jsx("button", { className: "visible peer-placeholder-shown:invisible absolute top-2 right-3 w-6 h-6 p-1 bg-transparent cursor-pointer", onClick: (e) => {
|
|
@@ -1154,18 +1190,6 @@
|
|
|
1154
1190
|
],
|
|
1155
1191
|
}));
|
|
1156
1192
|
|
|
1157
|
-
function useSitemap(useAsyncData) {
|
|
1158
|
-
const { data } = useAsyncData(sitemapURL(), fetchSitemap);
|
|
1159
|
-
return data || {};
|
|
1160
|
-
}
|
|
1161
|
-
async function fetchSitemap() {
|
|
1162
|
-
const response = await fetch(sitemapURL());
|
|
1163
|
-
return await response.json();
|
|
1164
|
-
}
|
|
1165
|
-
function sitemapURL() {
|
|
1166
|
-
return `/wcms-resources/${projectSettings.SITEMAP || 'sitemap'}.json`;
|
|
1167
|
-
}
|
|
1168
|
-
|
|
1169
1193
|
const Footer = JSX(({ className = '', documents, relatedEnterprises, contacts, socialMedia, context, horizontalNavigationTitle, }) => {
|
|
1170
1194
|
const sitemap = useSitemap(context.useAsyncData);
|
|
1171
1195
|
const dispositions = sitemap?.dispositions;
|
|
@@ -1261,22 +1285,44 @@
|
|
|
1261
1285
|
return (jsx("section", { className: `font-sans bg-white overflow-hidden w-100 pb-6 ${className || ''}`, children: jsx(SwipeListControl, { context: context, children: galleryBlocks.map((block, i) => (jsx(ProductGalleryBlock, { block: block, context: context }, String(i)))) }) }));
|
|
1262
1286
|
});
|
|
1263
1287
|
|
|
1264
|
-
const
|
|
1265
|
-
|
|
1288
|
+
const STEPS_BLOCK_STYLE_MAPS = {
|
|
1289
|
+
primary: {
|
|
1290
|
+
background: 'bg-white',
|
|
1291
|
+
title: 'text-primary-text',
|
|
1292
|
+
description: 'text-secondary-text',
|
|
1293
|
+
iconBackground: 'bg-secondary-light',
|
|
1294
|
+
iconConnector: 'bg-secondary-light',
|
|
1295
|
+
},
|
|
1296
|
+
secondary: {
|
|
1297
|
+
background: 'bg-primary-main',
|
|
1298
|
+
title: 'text-white',
|
|
1299
|
+
description: 'text-white/80',
|
|
1300
|
+
iconBackground: 'bg-white/30',
|
|
1301
|
+
iconConnector: 'bg-white',
|
|
1302
|
+
},
|
|
1303
|
+
};
|
|
1304
|
+
const styleMaps = (version) => STEPS_BLOCK_STYLE_MAPS[version];
|
|
1305
|
+
const StepsBlock = JSX(({ className, title, description, steps, size = 'normal', version = 'primary' }) => {
|
|
1306
|
+
const style = styleMaps(version);
|
|
1307
|
+
return (jsxs("section", { className: `box-border font-sans bg-white px-4 py-6 flex flex-col
|
|
1308
|
+
${style.background} ${style.title} ${className || ''}`, children: [title && (jsx(Heading, { headingType: "h3", className: `text-center ${style.title}`, title: title })), description && (jsx("p", { className: `text-m-md text-center ${style.description} ${title && 'mt-2'}`, children: description })), steps?.length ? (jsx("div", { className: `box-border py-0.5 mb-0.5 mt-5`, children: jsx("div", { className: "flex flex-col justify-between gap-x-[101px]", children: steps.map((step, i) => renderStepTitle({ step, size, i, length: steps.length, version: version })) }) })) : null] }));
|
|
1266
1309
|
});
|
|
1267
1310
|
const renderStepTitle = (params) => {
|
|
1268
|
-
const { step, size, i, length } = params;
|
|
1311
|
+
const { step, size, i, length, version } = params;
|
|
1269
1312
|
const isLastStep = length - 1 === i;
|
|
1270
1313
|
const margin = size === 'normal' ? 'ml-[34px]' : 'ml-[24px]';
|
|
1271
|
-
|
|
1314
|
+
const style = styleMaps(version);
|
|
1315
|
+
return (jsx("div", { children: jsxs("div", { className: "flex flex-row text-center relative", children: [jsxs("div", { className: "overflow-hidden", children: [renderIconArea(params), !isLastStep && (jsx("div", { className: `min-h-8 h-full w-[2px] ${style.iconConnector} ${margin}` }))] }), jsxs("div", { className: "flex flex-col justify-start relative", children: [step.label && (jsx("div", { className: "font-medium text-m-title-xs m-0 text-left", children: step.label })), step.description && (jsx("div", { className: `font-normal text-sm ${style.description} text-left ${step.label ? 'mt-1' : ''}`, children: step.description }))] })] }, String(i)) }, String(i)));
|
|
1272
1316
|
};
|
|
1273
|
-
const renderIconArea = (
|
|
1317
|
+
const renderIconArea = (params) => {
|
|
1318
|
+
const { step, size, i, version } = params;
|
|
1319
|
+
const style = styleMaps(version);
|
|
1274
1320
|
const iconAreaSize = size === 'normal'
|
|
1275
1321
|
? 'h-[70px] w-[70px] min-w-[70px] min-h-[70px]'
|
|
1276
1322
|
: 'h-[50px] w-[50px] min-w-[50px] min-h-[50px]';
|
|
1277
1323
|
const iconSize = size === 'normal' ? '38' : '27';
|
|
1278
1324
|
const iconTextSize = size === 'normal' ? 'text-m-title' : 'text-m-title-xs';
|
|
1279
|
-
return (jsx("div", { className: `${iconAreaSize}
|
|
1325
|
+
return (jsx("div", { className: `${iconAreaSize} ${style.iconBackground} rounded-full z-10 mr-3 flex justify-center content-center`, children: jsx("span", { className: `font-medium flex self-center ${style.title} ${iconTextSize}`, children: (step.icon && jsx(Icon, { name: step.icon, width: iconSize, height: iconSize, asSVG: true })) || i + 1 }) }));
|
|
1280
1326
|
};
|
|
1281
1327
|
|
|
1282
1328
|
const TableTileHeader = JSX(({ title, icon }) => {
|
|
@@ -1381,7 +1427,7 @@
|
|
|
1381
1427
|
});
|
|
1382
1428
|
function renderOpenGraph(og) {
|
|
1383
1429
|
return og
|
|
1384
|
-
? Object.entries(og).map(([key, value]) => (jsx("meta", {
|
|
1430
|
+
? Object.entries(og).map(([key, value]) => (jsx("meta", { property: `og:${key}`, content: value }, key)))
|
|
1385
1431
|
: null;
|
|
1386
1432
|
}
|
|
1387
1433
|
function renderTwitter(twitter) {
|