@redneckz/wildless-cms-uni-blocks 0.9.7 → 0.9.9
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/bin/migration-scripts/0.9.8.js +29 -0
- package/bin/migration-scripts/0.9.9.js +110 -0
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +15 -38
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +2 -0
- package/bundle/components/StepsBlock/StepsBlockContent.d.ts +10 -1
- package/dist/components/Blocks.js +0 -2
- package/dist/components/Blocks.js.map +1 -1
- package/dist/components/CarouselProductCard/CarouselProductCard.js +1 -1
- package/dist/components/CarouselProductCard/CarouselProductCard.js.map +1 -1
- package/dist/components/CarouselProgramsCard/CarouselProgramsCard.js +2 -2
- package/dist/components/CarouselProgramsCard/CarouselProgramsCard.js.map +1 -1
- package/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js +4 -6
- package/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
- package/dist/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +2 -0
- package/dist/components/StepsBlock/StepsBlock.js +5 -3
- package/dist/components/StepsBlock/StepsBlock.js.map +1 -1
- package/dist/components/StepsBlock/StepsBlockContent.d.ts +10 -1
- package/dist/components/StepsBlock/StepsBlockStyleMaps.js +2 -2
- package/dist/components/StepsBlock/StepsBlockStyleMaps.js.map +1 -1
- package/dist/ui-kit/LinkWrapper/LinkWrapper.js +2 -1
- package/dist/ui-kit/LinkWrapper/LinkWrapper.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/Blocks.js +0 -2
- package/lib/components/Blocks.js.map +1 -1
- package/lib/components/Carousel/Carousel.fixture.d.ts +1 -0
- package/lib/components/CarouselProductCard/CarouselProductCard.js +1 -1
- package/lib/components/CarouselProductCard/CarouselProductCard.js.map +1 -1
- package/lib/components/CarouselProgramsCard/CarouselProgramsCard.js +2 -2
- package/lib/components/CarouselProgramsCard/CarouselProgramsCard.js.map +1 -1
- package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.fixture.d.ts +2 -0
- package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js +4 -6
- package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
- package/lib/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +2 -0
- package/lib/components/StepsBlock/StepsBlock.js +5 -3
- package/lib/components/StepsBlock/StepsBlock.js.map +1 -1
- package/lib/components/StepsBlock/StepsBlockContent.d.ts +10 -1
- package/lib/components/StepsBlock/StepsBlockStyleMaps.js +2 -2
- package/lib/components/StepsBlock/StepsBlockStyleMaps.js.map +1 -1
- package/lib/ui-kit/LinkWrapper/LinkWrapper.js +2 -1
- package/lib/ui-kit/LinkWrapper/LinkWrapper.js.map +1 -1
- package/lib/ui-kit/SwipeListControl/SwipeListItem.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +3 -3
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +2 -0
- package/mobile/bundle/components/StepsBlock/StepsBlockContent.d.ts +10 -1
- package/mobile/dist/components/CarouselProductCard/CarouselProductCard.js +1 -1
- package/mobile/dist/components/CarouselProductCard/CarouselProductCard.js.map +1 -1
- package/mobile/dist/components/CarouselProgramsCard/CarouselProgramsCard.js +2 -2
- package/mobile/dist/components/CarouselProgramsCard/CarouselProgramsCard.js.map +1 -1
- package/mobile/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js +4 -6
- package/mobile/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
- package/mobile/dist/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +2 -0
- package/mobile/dist/components/StepsBlock/StepsBlockContent.d.ts +10 -1
- package/mobile/dist/components/StepsBlock/StepsBlockStyleMaps.js +2 -2
- package/mobile/dist/components/StepsBlock/StepsBlockStyleMaps.js.map +1 -1
- package/mobile/dist/ui-kit/LinkWrapper/LinkWrapper.js +2 -1
- package/mobile/dist/ui-kit/LinkWrapper/LinkWrapper.js.map +1 -1
- package/mobile/lib/components/CarouselProductCard/CarouselProductCard.js +1 -1
- package/mobile/lib/components/CarouselProductCard/CarouselProductCard.js.map +1 -1
- package/mobile/lib/components/CarouselProgramsCard/CarouselProgramsCard.js +2 -2
- package/mobile/lib/components/CarouselProgramsCard/CarouselProgramsCard.js.map +1 -1
- package/mobile/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js +4 -6
- package/mobile/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
- package/mobile/lib/components/CarouselRecommendationCard/CarouselRecommendationCardContent.d.ts +2 -0
- package/mobile/lib/components/StepsBlock/StepsBlockContent.d.ts +10 -1
- package/mobile/lib/components/StepsBlock/StepsBlockStyleMaps.js +2 -2
- package/mobile/lib/components/StepsBlock/StepsBlockStyleMaps.js.map +1 -1
- package/mobile/lib/ui-kit/LinkWrapper/LinkWrapper.js +2 -1
- package/mobile/lib/ui-kit/LinkWrapper/LinkWrapper.js.map +1 -1
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListItem.js.map +1 -1
- package/mobile/src/components/CarouselProductCard/CarouselProductCard.tsx +1 -1
- package/mobile/src/components/CarouselProgramsCard/CarouselProgramsCard.tsx +3 -3
- package/mobile/src/components/CarouselRecommendationCard/CarouselRecommendationCard.example.json +1 -0
- package/mobile/src/components/CarouselRecommendationCard/CarouselRecommendationCard.tsx +19 -30
- package/mobile/src/components/CarouselRecommendationCard/CarouselRecommendationCardContent.ts +2 -0
- package/mobile/src/components/StepsBlock/StepsBlock.example.json +7 -5
- package/mobile/src/components/StepsBlock/StepsBlock.ui.json +10 -0
- package/mobile/src/components/StepsBlock/StepsBlockContent.ts +10 -2
- package/mobile/src/components/StepsBlock/StepsBlockStyleMaps.ts +3 -2
- package/mobile/src/ui-kit/LinkWrapper/LinkWrapper.tsx +2 -1
- package/mobile/src/ui-kit/SwipeListControl/SwipeListItem.tsx +1 -1
- package/package.json +1 -1
- package/src/components/Blocks.ts +0 -2
- package/src/components/Carousel/Carousel.fixture.tsx +25 -2
- package/src/components/CarouselProductCard/CarouselProductCard.tsx +1 -1
- package/src/components/CarouselProgramsCard/CarouselProgramsCard.fixture.tsx +2 -2
- package/src/components/CarouselProgramsCard/CarouselProgramsCard.tsx +3 -3
- package/src/components/CarouselRecommendationCard/CarouselRecommendationCard.example.json +1 -0
- package/src/components/CarouselRecommendationCard/CarouselRecommendationCard.fixture.tsx +28 -1
- package/src/components/CarouselRecommendationCard/CarouselRecommendationCard.tsx +19 -30
- package/src/components/CarouselRecommendationCard/CarouselRecommendationCardContent.ts +2 -0
- package/src/components/StepsBlock/StepsBlock.example.json +7 -5
- package/src/components/StepsBlock/StepsBlock.fixture.tsx +14 -8
- package/src/components/StepsBlock/StepsBlock.tsx +13 -4
- package/src/components/StepsBlock/StepsBlock.ui.json +10 -0
- package/src/components/StepsBlock/StepsBlockContent.ts +10 -2
- package/src/components/StepsBlock/StepsBlockStyleMaps.ts +3 -2
- package/src/ui-kit/LinkWrapper/LinkWrapper.tsx +2 -1
- package/src/ui-kit/SwipeListControl/SwipeListItem.tsx +1 -1
- package/bundle/components/Recommendation/Recommendation.d.ts +0 -5
- package/bundle/components/Recommendation/RecommendationCard.d.ts +0 -5
- package/bundle/components/Recommendation/RecommendationContent.d.ts +0 -24
- package/dist/components/Recommendation/Recommendation.d.ts +0 -5
- package/dist/components/Recommendation/Recommendation.js +0 -26
- package/dist/components/Recommendation/Recommendation.js.map +0 -1
- package/dist/components/Recommendation/RecommendationCard.d.ts +0 -5
- package/dist/components/Recommendation/RecommendationCard.js +0 -17
- package/dist/components/Recommendation/RecommendationCard.js.map +0 -1
- package/dist/components/Recommendation/RecommendationContent.d.ts +0 -24
- package/dist/components/Recommendation/RecommendationContent.js +0 -2
- package/dist/components/Recommendation/RecommendationContent.js.map +0 -1
- package/lib/components/Recommendation/Recommendation.d.ts +0 -5
- package/lib/components/Recommendation/Recommendation.fixture.d.ts +0 -15
- package/lib/components/Recommendation/Recommendation.js +0 -24
- package/lib/components/Recommendation/Recommendation.js.map +0 -1
- package/lib/components/Recommendation/RecommendationCard.d.ts +0 -5
- package/lib/components/Recommendation/RecommendationCard.js +0 -15
- package/lib/components/Recommendation/RecommendationCard.js.map +0 -1
- package/lib/components/Recommendation/RecommendationContent.d.ts +0 -24
- package/lib/components/Recommendation/RecommendationContent.js +0 -2
- package/lib/components/Recommendation/RecommendationContent.js.map +0 -1
- package/mobile/bundle/components/Recommendation/Recommendation.d.ts +0 -5
- package/mobile/bundle/components/Recommendation/RecommendationCard.d.ts +0 -5
- package/mobile/bundle/components/Recommendation/RecommendationContent.d.ts +0 -24
- package/mobile/dist/components/Recommendation/Recommendation.d.ts +0 -5
- package/mobile/dist/components/Recommendation/Recommendation.js +0 -26
- package/mobile/dist/components/Recommendation/Recommendation.js.map +0 -1
- package/mobile/dist/components/Recommendation/RecommendationCard.d.ts +0 -5
- package/mobile/dist/components/Recommendation/RecommendationCard.js +0 -17
- package/mobile/dist/components/Recommendation/RecommendationCard.js.map +0 -1
- package/mobile/dist/components/Recommendation/RecommendationContent.d.ts +0 -24
- package/mobile/dist/components/Recommendation/RecommendationContent.js +0 -2
- package/mobile/dist/components/Recommendation/RecommendationContent.js.map +0 -1
- package/mobile/lib/components/Recommendation/Recommendation.d.ts +0 -5
- package/mobile/lib/components/Recommendation/Recommendation.js +0 -24
- package/mobile/lib/components/Recommendation/Recommendation.js.map +0 -1
- package/mobile/lib/components/Recommendation/RecommendationCard.d.ts +0 -5
- package/mobile/lib/components/Recommendation/RecommendationCard.js +0 -15
- package/mobile/lib/components/Recommendation/RecommendationCard.js.map +0 -1
- package/mobile/lib/components/Recommendation/RecommendationContent.d.ts +0 -24
- package/mobile/lib/components/Recommendation/RecommendationContent.js +0 -2
- package/mobile/lib/components/Recommendation/RecommendationContent.js.map +0 -1
- package/mobile/src/components/Catalog/Catalog.ui.json +0 -1
- package/mobile/src/components/Recommendation/Recommendation.example.json +0 -61
- package/mobile/src/components/Recommendation/Recommendation.tsx +0 -66
- package/mobile/src/components/Recommendation/Recommendation.ui.json +0 -19
- package/mobile/src/components/Recommendation/RecommendationCard.tsx +0 -49
- package/mobile/src/components/Recommendation/RecommendationContent.ts +0 -27
- package/src/components/Catalog/Catalog.ui.json +0 -1
- package/src/components/Recommendation/Recommendation.example.json +0 -61
- package/src/components/Recommendation/Recommendation.fixture.tsx +0 -176
- package/src/components/Recommendation/Recommendation.tsx +0 -66
- package/src/components/Recommendation/Recommendation.ui.json +0 -19
- package/src/components/Recommendation/RecommendationCard.tsx +0 -49
- package/src/components/Recommendation/RecommendationContent.ts +0 -27
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
-
exports.Recommendation = void 0;
|
|
3
|
-
const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
|
|
4
|
-
const uni_jsx_1 = require("@redneckz/uni-jsx");
|
|
5
|
-
const useCarouselControls_1 = require("../../hooks/useCarouselControls");
|
|
6
|
-
const BlockWrapper_1 = require("../../ui-kit/BlockWrapper");
|
|
7
|
-
const renderArrows_1 = require("../../ui-kit/Button/renderArrows");
|
|
8
|
-
const Heading_1 = require("../../ui-kit/Heading/Heading");
|
|
9
|
-
const RecommendationCard_1 = require("./RecommendationCard");
|
|
10
|
-
const BLUR_BLOCK_CLASSES = 'absolute top-0 bottom-0 w-[84px]';
|
|
11
|
-
const CARD_VIEW_COUNT = 2;
|
|
12
|
-
const CARD_SHIFT = 525;
|
|
13
|
-
exports.Recommendation = (0, uni_jsx_1.JSX)(({ recommendations = [], className = '', title, version = 'primary', ...rest }) => {
|
|
14
|
-
const [activeIndex, controls] = (0, useCarouselControls_1.useCarouselControls)({
|
|
15
|
-
itemCount: recommendations.length,
|
|
16
|
-
visibleItemCount: CARD_VIEW_COUNT,
|
|
17
|
-
});
|
|
18
|
-
return ((0, jsx_runtime_1.jsxs)(BlockWrapper_1.BlockWrapper, { className: `relative font-sans p-9 overflow-hidden text-center ${className}`, version: version, ...rest, children: [title ? (0, jsx_runtime_1.jsx)(Heading_1.Heading, { headingType: "h3", className: "mb-6", title: title }) : null, (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("div", { className: "flex duration-1000 gap-3.5", style: { transform: `translateX(-${activeIndex * CARD_SHIFT}px)` }, role: "list", children: recommendations.length
|
|
19
|
-
? recommendations.map((card, i) => ((0, jsx_runtime_1.jsx)(RecommendationCard_1.RecommendationCard, { version: version, className: "border-gray group-data-secondary:border-white/50", ...card }, String(i))))
|
|
20
|
-
: null }), (0, renderArrows_1.renderArrows)({
|
|
21
|
-
...controls,
|
|
22
|
-
btnClass: ['left-8', 'right-8'],
|
|
23
|
-
className: 'top-1/2 mt-3',
|
|
24
|
-
})] }), (0, jsx_runtime_1.jsx)("div", { className: `${BLUR_BLOCK_CLASSES} left-0 ${version === 'secondary' ? 'bg-opacity-from-main' : 'bg-opacity-from-white'}` }), (0, jsx_runtime_1.jsx)("div", { className: `${BLUR_BLOCK_CLASSES} right-0 ${version === 'secondary' ? 'bg-opacity-to-main' : 'bg-opacity-to-white'}` })] }));
|
|
25
|
-
});
|
|
26
|
-
//# sourceMappingURL=Recommendation.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Recommendation.js","sourceRoot":"","sources":["../../../src/components/Recommendation/Recommendation.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,yEAAsE;AAEtE,4DAAyD;AACzD,mEAAgE;AAChE,0DAAuD;AACvD,6DAA0D;AAG1D,MAAM,kBAAkB,GAAG,kCAAkC,CAAC;AAC9D,MAAM,eAAe,GAAG,CAAC,CAAC;AAC1B,MAAM,UAAU,GAAG,GAAG,CAAC;AAIV,QAAA,cAAc,GAAG,IAAA,aAAG,EAC/B,CAAC,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kB,YAC9B,OAAO,KAAK,WAAW,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,qBACnD,EAAE,GACF,IACW,CAChB,CAAC;AACJ,CAAC,CACF,CAAC"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { UniBlockProps } from '../../model/JSXBlock';
|
|
2
|
-
import type { RecommendationCardTypes } from './RecommendationContent';
|
|
3
|
-
export interface RecommendationCardProps extends RecommendationCardTypes, UniBlockProps {
|
|
4
|
-
}
|
|
5
|
-
export declare const RecommendationCard: import("@redneckz/uni-jsx").UNIComponent<RecommendationCardProps, any, any>;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
-
exports.RecommendationCard = void 0;
|
|
3
|
-
const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
|
|
4
|
-
const uni_jsx_1 = require("@redneckz/uni-jsx");
|
|
5
|
-
const BlockWrapper_1 = require("../../ui-kit/BlockWrapper");
|
|
6
|
-
const renderButtonsSection_1 = require("../../ui-kit/Button/renderButtonsSection");
|
|
7
|
-
const Heading_1 = require("../../ui-kit/Heading/Heading");
|
|
8
|
-
const Img_1 = require("../../ui-kit/Img/Img");
|
|
9
|
-
const List_1 = require("../../ui-kit/List/List");
|
|
10
|
-
const BaseTile_1 = require("../BaseTile/BaseTile");
|
|
11
|
-
const SocialMedia_1 = require("../Footer/SocialMedia");
|
|
12
|
-
exports.RecommendationCard = (0, uni_jsx_1.JSX)(({ className = '', title, description, items, image, socialMedia, button, ...rest }) => {
|
|
13
|
-
const tileTitle = title ? ((0, jsx_runtime_1.jsx)(Heading_1.Heading, { headingType: "h5", as: "h3", className: "mb-3.5 z-10", title: title })) : null;
|
|
14
|
-
const tileImage = image?.src ? ((0, jsx_runtime_1.jsx)(Img_1.Img, { className: "absolute bottom-0 right-0 m-0", image: image })) : null;
|
|
15
|
-
return ((0, jsx_runtime_1.jsx)(BlockWrapper_1.BlockWrapper, { className: `relative overflow-hidden text-left border border-solid box-border p-7 min-w-[524px] min-h-[218px] ${className}`, role: "listitem", ...rest, children: (0, jsx_runtime_1.jsx)(BaseTile_1.BaseTile, { className: "flex justify-between", title: tileTitle, image: tileImage, children: (0, jsx_runtime_1.jsxs)("div", { className: "h-full flex flex-col justify-between", children: [description ? (0, jsx_runtime_1.jsx)("span", { className: "mb-2", children: description }) : null, items?.length ? ((0, jsx_runtime_1.jsx)(List_1.List, { className: "text-xl-light flex flex-col flex-1 gap-2 max-w-[236px]", items: items })) : null, socialMedia ? (0, jsx_runtime_1.jsx)(SocialMedia_1.SocialMedia, { className: "pt-10 pb-0", media: socialMedia }) : null, button?.text ? ((0, jsx_runtime_1.jsx)("div", { className: "pt-2", children: (0, renderButtonsSection_1.renderButtonsSection)([button], { buttonClassName: 'mt-16 px-5' }) })) : null] }) }) }));
|
|
16
|
-
});
|
|
17
|
-
//# sourceMappingURL=RecommendationCard.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RecommendationCard.js","sourceRoot":"","sources":["../../../src/components/Recommendation/RecommendationCard.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AAExC,4DAAyD;AACzD,mFAAgF;AAChF,0DAAuD;AACvD,8CAA2C;AAC3C,iDAA8C;AAC9C,mDAAgD;AAChD,uDAAoD;AAKvC,QAAA,kBAAkB,GAAG,IAAA,aAAG,EACnC,CAAC,EAAE,SAAS,GAAG,EAAE,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,EAAE,EAAE;IACrF,MAAM,SAAS,GAAG,KAAK,CAAC,CAAC,CAAC,CACxB,uBAAC,iBAAO,IAAC,WAAW,EAAC,IAAI,EAAC,EAAE,EAAC,IAAI,EAAC,SAAS,EAAC,aAAa,EAAC,KAAK,EAAE,KAAK,GAAI,CAC3E,CAAC,CAAC,CAAC,IAAI,CAAC;IACT,MAAM,SAAS,GAAG,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC,CAC7B,uBAAC,SAAG,IAAC,SAAS,EAAC,+BAA+B,EAAC,KAAK,EAAE,KAAK,GAAI,CAChE,CAAC,CAAC,CAAC,IAAI,CAAC;IAET,OAAO,CACL,uBAAC,2BAAY,IACX,SAAS,EAAE,qGAAqG,SAAS,EAAE,EAC3H,IAAI,EAAC,UAAU,KACX,IAAI,YAER,uBAAC,mBAAQ,IAAC,SAAS,EAAC,sBAAsB,EAAC,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,YAC3E,iCAAK,SAAS,EAAC,sCAAsC,aAClD,WAAW,CAAC,CAAC,CAAC,iCAAM,SAAS,EAAC,MAAM,YAAE,WAAW,GAAQ,CAAC,CAAC,CAAC,IAAI,EAChE,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,CACf,uBAAC,WAAI,IACH,SAAS,EAAC,wDAAwD,EAClE,KAAK,EAAE,KAAK,GACZ,CACH,CAAC,CAAC,CAAC,IAAI,EACP,WAAW,CAAC,CAAC,CAAC,uBAAC,yBAAW,IAAC,SAAS,EAAC,YAAY,EAAC,KAAK,EAAE,WAAW,GAAI,CAAC,CAAC,CAAC,IAAI,EAC/E,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,CACd,gCAAK,SAAS,EAAC,MAAM,YAClB,IAAA,2CAAoB,EAAC,CAAC,MAAM,CAAC,EAAE,EAAE,eAAe,EAAE,YAAY,EAAE,CAAC,GAC9D,CACP,CAAC,CAAC,CAAC,IAAI,IACJ,GACG,GACE,CAChB,CAAC;AACJ,CAAC,CACF,CAAC"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import type { HeadlineCommonProps, TitleProps } from '../../model/HeadlineType';
|
|
2
|
-
import type { UniBlockContent } from '../../model/JSXBlock';
|
|
3
|
-
import type { LinkCommonProps } from '../../model/LinkProps';
|
|
4
|
-
import type { ButtonProps } from '../../ui-kit/Button/ButtonProps';
|
|
5
|
-
import { ImageContent } from '../../ui-kit/Img/ImgProps';
|
|
6
|
-
import type { ListContent } from '../../ui-kit/List/ListContent';
|
|
7
|
-
/**
|
|
8
|
-
* @title Карточка
|
|
9
|
-
*/
|
|
10
|
-
export interface RecommendationCardTypes extends HeadlineCommonProps, ListContent, ImageContent {
|
|
11
|
-
/**
|
|
12
|
-
* @title Соц сети
|
|
13
|
-
* @minItems 3
|
|
14
|
-
*/
|
|
15
|
-
socialMedia?: LinkCommonProps[];
|
|
16
|
-
button?: ButtonProps;
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* @title Рекомендации
|
|
20
|
-
*/
|
|
21
|
-
export declare type RecommendationContent = UniBlockContent & TitleProps & {
|
|
22
|
-
/** @title Карточки */
|
|
23
|
-
recommendations?: RecommendationCardTypes[];
|
|
24
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RecommendationContent.js","sourceRoot":"","sources":["../../../src/components/Recommendation/RecommendationContent.ts"],"names":[],"mappings":""}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { UniBlockProps } from '../../model/JSXBlock';
|
|
2
|
-
import type { RecommendationContent } from './RecommendationContent';
|
|
3
|
-
export interface RecommendationProps extends RecommendationContent, UniBlockProps {
|
|
4
|
-
}
|
|
5
|
-
export declare const Recommendation: import("@redneckz/uni-jsx").UNIComponent<RecommendationProps, any, any>;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import '../../setup-fixture';
|
|
3
|
-
import { RecommendationProps } from './Recommendation';
|
|
4
|
-
export declare const defaultProps: RecommendationProps;
|
|
5
|
-
export declare const shortProps: RecommendationProps;
|
|
6
|
-
export declare const buttonProps: RecommendationProps;
|
|
7
|
-
declare const _default: {
|
|
8
|
-
default: JSX.Element;
|
|
9
|
-
'secondary private clients': JSX.Element;
|
|
10
|
-
'secondary business clients': JSX.Element;
|
|
11
|
-
'secondary ecosystem own': JSX.Element;
|
|
12
|
-
'secondary private short': JSX.Element;
|
|
13
|
-
'with button': JSX.Element;
|
|
14
|
-
};
|
|
15
|
-
export default _default;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
|
|
2
|
-
import { JSX } from '@redneckz/uni-jsx';
|
|
3
|
-
import { useCarouselControls } from '../../hooks/useCarouselControls.js';
|
|
4
|
-
import { BlockWrapper } from '../../ui-kit/BlockWrapper.js';
|
|
5
|
-
import { renderArrows } from '../../ui-kit/Button/renderArrows.js';
|
|
6
|
-
import { Heading } from '../../ui-kit/Heading/Heading.js';
|
|
7
|
-
import { RecommendationCard } from './RecommendationCard.js';
|
|
8
|
-
const BLUR_BLOCK_CLASSES = 'absolute top-0 bottom-0 w-[84px]';
|
|
9
|
-
const CARD_VIEW_COUNT = 2;
|
|
10
|
-
const CARD_SHIFT = 525;
|
|
11
|
-
export const Recommendation = JSX(({ recommendations = [], className = '', title, version = 'primary', ...rest }) => {
|
|
12
|
-
const [activeIndex, controls] = useCarouselControls({
|
|
13
|
-
itemCount: recommendations.length,
|
|
14
|
-
visibleItemCount: CARD_VIEW_COUNT,
|
|
15
|
-
});
|
|
16
|
-
return (_jsxs(BlockWrapper, { className: `relative font-sans p-9 overflow-hidden text-center ${className}`, version: version, ...rest, children: [title ? _jsx(Heading, { headingType: "h3", className: "mb-6", title: title }) : null, _jsxs("div", { children: [_jsx("div", { className: "flex duration-1000 gap-3.5", style: { transform: `translateX(-${activeIndex * CARD_SHIFT}px)` }, role: "list", children: recommendations.length
|
|
17
|
-
? recommendations.map((card, i) => (_jsx(RecommendationCard, { version: version, className: "border-gray group-data-secondary:border-white/50", ...card }, String(i))))
|
|
18
|
-
: null }), renderArrows({
|
|
19
|
-
...controls,
|
|
20
|
-
btnClass: ['left-8', 'right-8'],
|
|
21
|
-
className: 'top-1/2 mt-3',
|
|
22
|
-
})] }), _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'}` })] }));
|
|
23
|
-
});
|
|
24
|
-
//# sourceMappingURL=Recommendation.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Recommendation.js","sourceRoot":"","sources":["../../../src/components/Recommendation/Recommendation.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAEtE,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAChE,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAG1D,MAAM,kBAAkB,GAAG,kCAAkC,CAAC;AAC9D,MAAM,eAAe,GAAG,CAAC,CAAC;AAC1B,MAAM,UAAU,GAAG,GAAG,CAAC;AAIvB,MAAM,CAAC,MAAM,cAAc,GAAG,GAAG,CAC/B,CAAC,EAAE,eAAe,GAAG,EAAE,EAAE,SAAS,GAAG,EAAE,EAAE,KAAK,EAAE,OAAO,GAAG,SAAS,EAAE,GAAG,IAAI,EAAE,EAAE,EAAE;IAChF,MAAM,CAAC,WAAW,EAAE,QAAQ,CAAC,GAAG,mBAAmB,CAAC;QAClD,SAAS,EAAE,eAAe,CAAC,MAAM;QACjC,gBAAgB,EAAE,eAAe;KAClC,CAAC,CAAC;IAEH,OAAO,CACL,MAAC,YAAY,IACX,SAAS,EAAE,sDAAsD,SAAS,EAAE,EAC5E,OAAO,EAAE,OAAO,KACZ,IAAI,aAEP,KAAK,CAAC,CAAC,CAAC,KAAC,OAAO,IAAC,WAAW,EAAC,IAAI,EAAC,SAAS,EAAC,MAAM,EAAC,KAAK,EAAE,KAAK,GAAI,CAAC,CAAC,CAAC,IAAI,EAC3E,0BACE,cACE,SAAS,EAAC,4BAA4B,EACtC,KAAK,EAAE,EAAE,SAAS,EAAE,eAAe,WAAW,GAAG,UAAU,KAAK,EAAE,EAClE,IAAI,EAAC,MAAM,YAEV,eAAe,CAAC,MAAM;4BACrB,CAAC,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,CAC/B,KAAC,kBAAkB,IAEjB,OAAO,EAAE,OAAO,EAChB,SAAS,EAAC,kDAAkD,KACxD,IAAI,IAHH,MAAM,CAAC,CAAC,CAAC,CAId,CACH,CAAC;4BACJ,CAAC,CAAC,IAAI,GACJ,EACL,YAAY,CAAC;wBACZ,GAAG,QAAQ;wBACX,QAAQ,EAAE,CAAC,QAAQ,EAAE,SAAS,CAAC;wBAC/B,SAAS,EAAE,cAAc;qBAC1B,CAAC,IACE,EACN,cACE,SAAS,EAAE,GAAG,kBAAkB,WAC9B,OAAO,KAAK,WAAW,CAAC,CAAC,CAAC,sBAAsB,CAAC,CAAC,CAAC,uBACrD,EAAE,GACF,EACF,cACE,SAAS,EAAE,GAAG,kBAAkB,YAC9B,OAAO,KAAK,WAAW,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,qBACnD,EAAE,GACF,IACW,CAChB,CAAC;AACJ,CAAC,CACF,CAAC"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { UniBlockProps } from '../../model/JSXBlock';
|
|
2
|
-
import type { RecommendationCardTypes } from './RecommendationContent';
|
|
3
|
-
export interface RecommendationCardProps extends RecommendationCardTypes, UniBlockProps {
|
|
4
|
-
}
|
|
5
|
-
export declare const RecommendationCard: import("@redneckz/uni-jsx").UNIComponent<RecommendationCardProps, any, any>;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
|
|
2
|
-
import { JSX } from '@redneckz/uni-jsx';
|
|
3
|
-
import { BlockWrapper } from '../../ui-kit/BlockWrapper.js';
|
|
4
|
-
import { renderButtonsSection } from '../../ui-kit/Button/renderButtonsSection.js';
|
|
5
|
-
import { Heading } from '../../ui-kit/Heading/Heading.js';
|
|
6
|
-
import { Img } from '../../ui-kit/Img/Img.js';
|
|
7
|
-
import { List } from '../../ui-kit/List/List.js';
|
|
8
|
-
import { BaseTile } from '../BaseTile/BaseTile.js';
|
|
9
|
-
import { SocialMedia } from '../Footer/SocialMedia.js';
|
|
10
|
-
export const RecommendationCard = JSX(({ className = '', title, description, items, image, socialMedia, button, ...rest }) => {
|
|
11
|
-
const tileTitle = title ? (_jsx(Heading, { headingType: "h5", as: "h3", className: "mb-3.5 z-10", title: title })) : null;
|
|
12
|
-
const tileImage = image?.src ? (_jsx(Img, { className: "absolute bottom-0 right-0 m-0", image: image })) : null;
|
|
13
|
-
return (_jsx(BlockWrapper, { className: `relative overflow-hidden text-left border border-solid box-border p-7 min-w-[524px] min-h-[218px] ${className}`, role: "listitem", ...rest, children: _jsx(BaseTile, { className: "flex justify-between", title: tileTitle, image: tileImage, children: _jsxs("div", { className: "h-full flex flex-col justify-between", children: [description ? _jsx("span", { className: "mb-2", children: description }) : null, items?.length ? (_jsx(List, { className: "text-xl-light flex flex-col flex-1 gap-2 max-w-[236px]", items: items })) : null, socialMedia ? _jsx(SocialMedia, { className: "pt-10 pb-0", media: socialMedia }) : null, button?.text ? (_jsx("div", { className: "pt-2", children: renderButtonsSection([button], { buttonClassName: 'mt-16 px-5' }) })) : null] }) }) }));
|
|
14
|
-
});
|
|
15
|
-
//# sourceMappingURL=RecommendationCard.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RecommendationCard.js","sourceRoot":"","sources":["../../../src/components/Recommendation/RecommendationCard.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAA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AAM,YAAE,WAAW,GAAQ,CAAC,CAAC,CAAC,IAAI,EAChE,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,CACf,KAAC,IAAI,IACH,SAAS,EAAC,wDAAwD,EAClE,KAAK,EAAE,KAAK,GACZ,CACH,CAAC,CAAC,CAAC,IAAI,EACP,WAAW,CAAC,CAAC,CAAC,KAAC,WAAW,IAAC,SAAS,EAAC,YAAY,EAAC,KAAK,EAAE,WAAW,GAAI,CAAC,CAAC,CAAC,IAAI,EAC/E,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,CACd,cAAK,SAAS,EAAC,MAAM,YAClB,oBAAoB,CAAC,CAAC,MAAM,CAAC,EAAE,EAAE,eAAe,EAAE,YAAY,EAAE,CAAC,GAC9D,CACP,CAAC,CAAC,CAAC,IAAI,IACJ,GACG,GACE,CAChB,CAAC;AACJ,CAAC,CACF,CAAC"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import type { HeadlineCommonProps, TitleProps } from '../../model/HeadlineType';
|
|
2
|
-
import type { UniBlockContent } from '../../model/JSXBlock';
|
|
3
|
-
import type { LinkCommonProps } from '../../model/LinkProps';
|
|
4
|
-
import type { ButtonProps } from '../../ui-kit/Button/ButtonProps';
|
|
5
|
-
import { ImageContent } from '../../ui-kit/Img/ImgProps';
|
|
6
|
-
import type { ListContent } from '../../ui-kit/List/ListContent';
|
|
7
|
-
/**
|
|
8
|
-
* @title Карточка
|
|
9
|
-
*/
|
|
10
|
-
export interface RecommendationCardTypes extends HeadlineCommonProps, ListContent, ImageContent {
|
|
11
|
-
/**
|
|
12
|
-
* @title Соц сети
|
|
13
|
-
* @minItems 3
|
|
14
|
-
*/
|
|
15
|
-
socialMedia?: LinkCommonProps[];
|
|
16
|
-
button?: ButtonProps;
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* @title Рекомендации
|
|
20
|
-
*/
|
|
21
|
-
export declare type RecommendationContent = UniBlockContent & TitleProps & {
|
|
22
|
-
/** @title Карточки */
|
|
23
|
-
recommendations?: RecommendationCardTypes[];
|
|
24
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RecommendationContent.js","sourceRoot":"","sources":["../../../src/components/Recommendation/RecommendationContent.ts"],"names":[],"mappings":""}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { UniBlockProps } from '../../model/JSXBlock';
|
|
2
|
-
import type { RecommendationContent } from './RecommendationContent';
|
|
3
|
-
export interface RecommendationProps extends RecommendationContent, UniBlockProps {
|
|
4
|
-
}
|
|
5
|
-
export declare const Recommendation: import("@redneckz/uni-jsx").UNIComponent<RecommendationProps, any, any>;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { UniBlockProps } from '../../model/JSXBlock';
|
|
2
|
-
import type { RecommendationCardTypes } from './RecommendationContent';
|
|
3
|
-
export interface RecommendationCardProps extends RecommendationCardTypes, UniBlockProps {
|
|
4
|
-
}
|
|
5
|
-
export declare const RecommendationCard: import("@redneckz/uni-jsx").UNIComponent<RecommendationCardProps, any, any>;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import type { HeadlineCommonProps, TitleProps } from '../../model/HeadlineType';
|
|
2
|
-
import type { UniBlockContent } from '../../model/JSXBlock';
|
|
3
|
-
import type { LinkCommonProps } from '../../model/LinkProps';
|
|
4
|
-
import type { ButtonProps } from '../../ui-kit/Button/ButtonProps';
|
|
5
|
-
import { ImageContent } from '../../ui-kit/Img/ImgProps';
|
|
6
|
-
import type { ListContent } from '../../ui-kit/List/ListContent';
|
|
7
|
-
/**
|
|
8
|
-
* @title Карточка
|
|
9
|
-
*/
|
|
10
|
-
export interface RecommendationCardTypes extends HeadlineCommonProps, ListContent, ImageContent {
|
|
11
|
-
/**
|
|
12
|
-
* @title Соц сети
|
|
13
|
-
* @minItems 3
|
|
14
|
-
*/
|
|
15
|
-
socialMedia?: LinkCommonProps[];
|
|
16
|
-
button?: ButtonProps;
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* @title Рекомендации
|
|
20
|
-
*/
|
|
21
|
-
export declare type RecommendationContent = UniBlockContent & TitleProps & {
|
|
22
|
-
/** @title Карточки */
|
|
23
|
-
recommendations?: RecommendationCardTypes[];
|
|
24
|
-
};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { UniBlockProps } from '../../model/JSXBlock';
|
|
2
|
-
import type { RecommendationContent } from './RecommendationContent';
|
|
3
|
-
export interface RecommendationProps extends RecommendationContent, UniBlockProps {
|
|
4
|
-
}
|
|
5
|
-
export declare const Recommendation: import("@redneckz/uni-jsx").UNIComponent<RecommendationProps, any, any>;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
-
exports.Recommendation = void 0;
|
|
3
|
-
const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
|
|
4
|
-
const uni_jsx_1 = require("@redneckz/uni-jsx");
|
|
5
|
-
const useCarouselControls_1 = require("../../hooks/useCarouselControls");
|
|
6
|
-
const BlockWrapper_1 = require("../../ui-kit/BlockWrapper");
|
|
7
|
-
const renderArrows_1 = require("../../ui-kit/Button/renderArrows");
|
|
8
|
-
const Heading_1 = require("../../ui-kit/Heading/Heading");
|
|
9
|
-
const RecommendationCard_1 = require("./RecommendationCard");
|
|
10
|
-
const BLUR_BLOCK_CLASSES = 'absolute top-0 bottom-0 w-[84px]';
|
|
11
|
-
const CARD_VIEW_COUNT = 2;
|
|
12
|
-
const CARD_SHIFT = 525;
|
|
13
|
-
exports.Recommendation = (0, uni_jsx_1.JSX)(({ recommendations = [], className = '', title, version = 'primary', ...rest }) => {
|
|
14
|
-
const [activeIndex, controls] = (0, useCarouselControls_1.useCarouselControls)({
|
|
15
|
-
itemCount: recommendations.length,
|
|
16
|
-
visibleItemCount: CARD_VIEW_COUNT,
|
|
17
|
-
});
|
|
18
|
-
return ((0, jsx_runtime_1.jsxs)(BlockWrapper_1.BlockWrapper, { className: `relative font-sans p-9 overflow-hidden text-center ${className}`, version: version, ...rest, children: [title ? (0, jsx_runtime_1.jsx)(Heading_1.Heading, { headingType: "h3", className: "mb-6", title: title }) : null, (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("div", { className: "flex duration-1000 gap-3.5", style: { transform: `translateX(-${activeIndex * CARD_SHIFT}px)` }, role: "list", children: recommendations.length
|
|
19
|
-
? recommendations.map((card, i) => ((0, jsx_runtime_1.jsx)(RecommendationCard_1.RecommendationCard, { version: version, className: "border-gray group-data-secondary:border-white/50", ...card }, String(i))))
|
|
20
|
-
: null }), (0, renderArrows_1.renderArrows)({
|
|
21
|
-
...controls,
|
|
22
|
-
btnClass: ['left-8', 'right-8'],
|
|
23
|
-
className: 'top-1/2 mt-3',
|
|
24
|
-
})] }), (0, jsx_runtime_1.jsx)("div", { className: `${BLUR_BLOCK_CLASSES} left-0 ${version === 'secondary' ? 'bg-opacity-from-main' : 'bg-opacity-from-white'}` }), (0, jsx_runtime_1.jsx)("div", { className: `${BLUR_BLOCK_CLASSES} right-0 ${version === 'secondary' ? 'bg-opacity-to-main' : 'bg-opacity-to-white'}` })] }));
|
|
25
|
-
});
|
|
26
|
-
//# sourceMappingURL=Recommendation.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Recommendation.js","sourceRoot":"","sources":["../../../src/components/Recommendation/Recommendation.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,yEAAsE;AAEtE,4DAAyD;AACzD,mEAAgE;AAChE,0DAAuD;AACvD,6DAA0D;AAG1D,MAAM,kBAAkB,GAAG,kCAAkC,CAAC;AAC9D,MAAM,eAAe,GAAG,CAAC,CAAC;AAC1B,MAAM,UAAU,GAAG,GAAG,CAAC;AAIV,QAAA,cAAc,GAAG,IAAA,aAAG,EAC/B,CAAC,EAAE,eAAe,GAAG,EAAE,EAAE,SAAS,GAAG,EAAE,EAAE,KAAK,EAAE,OAAO,GAAG,SA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EAAE,GACF,IACW,CAChB,CAAC;AACJ,CAAC,CACF,CAAC"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { UniBlockProps } from '../../model/JSXBlock';
|
|
2
|
-
import type { RecommendationCardTypes } from './RecommendationContent';
|
|
3
|
-
export interface RecommendationCardProps extends RecommendationCardTypes, UniBlockProps {
|
|
4
|
-
}
|
|
5
|
-
export declare const RecommendationCard: import("@redneckz/uni-jsx").UNIComponent<RecommendationCardProps, any, any>;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
-
exports.RecommendationCard = void 0;
|
|
3
|
-
const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
|
|
4
|
-
const uni_jsx_1 = require("@redneckz/uni-jsx");
|
|
5
|
-
const BlockWrapper_1 = require("../../ui-kit/BlockWrapper");
|
|
6
|
-
const renderButtonsSection_1 = require("../../ui-kit/Button/renderButtonsSection");
|
|
7
|
-
const Heading_1 = require("../../ui-kit/Heading/Heading");
|
|
8
|
-
const Img_1 = require("../../ui-kit/Img/Img");
|
|
9
|
-
const List_1 = require("../../ui-kit/List/List");
|
|
10
|
-
const BaseTile_1 = require("../BaseTile/BaseTile");
|
|
11
|
-
const SocialMedia_1 = require("../Footer/SocialMedia");
|
|
12
|
-
exports.RecommendationCard = (0, uni_jsx_1.JSX)(({ className = '', title, description, items, image, socialMedia, button, ...rest }) => {
|
|
13
|
-
const tileTitle = title ? ((0, jsx_runtime_1.jsx)(Heading_1.Heading, { headingType: "h5", as: "h3", className: "mb-3.5 z-10", title: title })) : null;
|
|
14
|
-
const tileImage = image?.src ? ((0, jsx_runtime_1.jsx)(Img_1.Img, { className: "absolute bottom-0 right-0 m-0", image: image })) : null;
|
|
15
|
-
return ((0, jsx_runtime_1.jsx)(BlockWrapper_1.BlockWrapper, { className: `relative overflow-hidden text-left border border-solid box-border p-7 min-w-[524px] min-h-[218px] ${className}`, role: "listitem", ...rest, children: (0, jsx_runtime_1.jsx)(BaseTile_1.BaseTile, { className: "flex justify-between", title: tileTitle, image: tileImage, children: (0, jsx_runtime_1.jsxs)("div", { className: "h-full flex flex-col justify-between", children: [description ? (0, jsx_runtime_1.jsx)("span", { className: "mb-2", children: description }) : null, items?.length ? ((0, jsx_runtime_1.jsx)(List_1.List, { className: "text-xl-light flex flex-col flex-1 gap-2 max-w-[236px]", items: items })) : null, socialMedia ? (0, jsx_runtime_1.jsx)(SocialMedia_1.SocialMedia, { className: "pt-10 pb-0", media: socialMedia }) : null, button?.text ? ((0, jsx_runtime_1.jsx)("div", { className: "pt-2", children: (0, renderButtonsSection_1.renderButtonsSection)([button], { buttonClassName: 'mt-16 px-5' }) })) : null] }) }) }));
|
|
16
|
-
});
|
|
17
|
-
//# sourceMappingURL=RecommendationCard.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RecommendationCard.js","sourceRoot":"","sources":["../../../src/components/Recommendation/RecommendationCard.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AAExC,4DAAyD;AACzD,mFAAgF;AAChF,0DAAuD;AACvD,8CAA2C;AAC3C,iDAA8C;AAC9C,mDAAgD;AAChD,uDAAoD;AAKvC,QAAA,kBAAkB,GAAG,IAAA,aAAG,EACnC,CAAC,EAAE,SAAS,GAAG,EAAE,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,EAAE,EAAE;IACrF,MAAM,SAAS,GAAG,KAAK,CAAC,CAAC,CAAC,CACxB,uBAAC,iBAAO,IAAC,WAAW,EAAC,IAAI,EAAC,EAAE,EAAC,IAAI,EAAC,SAAS,EAAC,aAAa,EAAC,KAAK,EAAE,KAAK,GAAI,CAC3E,CAAC,CAAC,CAAC,IAAI,CAAC;IACT,MAAM,SAAS,GAAG,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC,CAC7B,uBAAC,SAAG,IAAC,SAAS,EAAC,+BAA+B,EAAC,KAAK,EAAE,KAAK,GAAI,CAChE,CAAC,CAAC,CAAC,IAAI,CAAC;IAET,OAAO,CACL,uBAAC,2BAAY,IACX,SAAS,EAAE,qGAAqG,SAAS,EAAE,EAC3H,IAAI,EAAC,UAAU,KACX,IAAI,YAER,uBAAC,mBAAQ,IAAC,SAAS,EAAC,sBAAsB,EAAC,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,YAC3E,iCAAK,SAAS,EAAC,sCAAsC,aAClD,WAAW,CAAC,CAAC,CAAC,iCAAM,SAAS,EAAC,MAAM,YAAE,WAAW,GAAQ,CAAC,CAAC,CAAC,IAAI,EAChE,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,CACf,uBAAC,WAAI,IACH,SAAS,EAAC,wDAAwD,EAClE,KAAK,EAAE,KAAK,GACZ,CACH,CAAC,CAAC,CAAC,IAAI,EACP,WAAW,CAAC,CAAC,CAAC,uBAAC,yBAAW,IAAC,SAAS,EAAC,YAAY,EAAC,KAAK,EAAE,WAAW,GAAI,CAAC,CAAC,CAAC,IAAI,EAC/E,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,CACd,gCAAK,SAAS,EAAC,MAAM,YAClB,IAAA,2CAAoB,EAAC,CAAC,MAAM,CAAC,EAAE,EAAE,eAAe,EAAE,YAAY,EAAE,CAAC,GAC9D,CACP,CAAC,CAAC,CAAC,IAAI,IACJ,GACG,GACE,CAChB,CAAC;AACJ,CAAC,CACF,CAAC"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import type { HeadlineCommonProps, TitleProps } from '../../model/HeadlineType';
|
|
2
|
-
import type { UniBlockContent } from '../../model/JSXBlock';
|
|
3
|
-
import type { LinkCommonProps } from '../../model/LinkProps';
|
|
4
|
-
import type { ButtonProps } from '../../ui-kit/Button/ButtonProps';
|
|
5
|
-
import { ImageContent } from '../../ui-kit/Img/ImgProps';
|
|
6
|
-
import type { ListContent } from '../../ui-kit/List/ListContent';
|
|
7
|
-
/**
|
|
8
|
-
* @title Карточка
|
|
9
|
-
*/
|
|
10
|
-
export interface RecommendationCardTypes extends HeadlineCommonProps, ListContent, ImageContent {
|
|
11
|
-
/**
|
|
12
|
-
* @title Соц сети
|
|
13
|
-
* @minItems 3
|
|
14
|
-
*/
|
|
15
|
-
socialMedia?: LinkCommonProps[];
|
|
16
|
-
button?: ButtonProps;
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* @title Рекомендации
|
|
20
|
-
*/
|
|
21
|
-
export declare type RecommendationContent = UniBlockContent & TitleProps & {
|
|
22
|
-
/** @title Карточки */
|
|
23
|
-
recommendations?: RecommendationCardTypes[];
|
|
24
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RecommendationContent.js","sourceRoot":"","sources":["../../../src/components/Recommendation/RecommendationContent.ts"],"names":[],"mappings":""}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { UniBlockProps } from '../../model/JSXBlock';
|
|
2
|
-
import type { RecommendationContent } from './RecommendationContent';
|
|
3
|
-
export interface RecommendationProps extends RecommendationContent, UniBlockProps {
|
|
4
|
-
}
|
|
5
|
-
export declare const Recommendation: import("@redneckz/uni-jsx").UNIComponent<RecommendationProps, any, any>;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
|
|
2
|
-
import { JSX } from '@redneckz/uni-jsx';
|
|
3
|
-
import { useCarouselControls } from '../../hooks/useCarouselControls.js';
|
|
4
|
-
import { BlockWrapper } from '../../ui-kit/BlockWrapper.js';
|
|
5
|
-
import { renderArrows } from '../../ui-kit/Button/renderArrows.js';
|
|
6
|
-
import { Heading } from '../../ui-kit/Heading/Heading.js';
|
|
7
|
-
import { RecommendationCard } from './RecommendationCard.js';
|
|
8
|
-
const BLUR_BLOCK_CLASSES = 'absolute top-0 bottom-0 w-[84px]';
|
|
9
|
-
const CARD_VIEW_COUNT = 2;
|
|
10
|
-
const CARD_SHIFT = 525;
|
|
11
|
-
export const Recommendation = JSX(({ recommendations = [], className = '', title, version = 'primary', ...rest }) => {
|
|
12
|
-
const [activeIndex, controls] = useCarouselControls({
|
|
13
|
-
itemCount: recommendations.length,
|
|
14
|
-
visibleItemCount: CARD_VIEW_COUNT,
|
|
15
|
-
});
|
|
16
|
-
return (_jsxs(BlockWrapper, { className: `relative font-sans p-9 overflow-hidden text-center ${className}`, version: version, ...rest, children: [title ? _jsx(Heading, { headingType: "h3", className: "mb-6", title: title }) : null, _jsxs("div", { children: [_jsx("div", { className: "flex duration-1000 gap-3.5", style: { transform: `translateX(-${activeIndex * CARD_SHIFT}px)` }, role: "list", children: recommendations.length
|
|
17
|
-
? recommendations.map((card, i) => (_jsx(RecommendationCard, { version: version, className: "border-gray group-data-secondary:border-white/50", ...card }, String(i))))
|
|
18
|
-
: null }), renderArrows({
|
|
19
|
-
...controls,
|
|
20
|
-
btnClass: ['left-8', 'right-8'],
|
|
21
|
-
className: 'top-1/2 mt-3',
|
|
22
|
-
})] }), _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'}` })] }));
|
|
23
|
-
});
|
|
24
|
-
//# sourceMappingURL=Recommendation.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Recommendation.js","sourceRoot":"","sources":["../../../src/components/Recommendation/Recommendation.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAEtE,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,C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AAQ;wBACX,QAAQ,EAAE,CAAC,QAAQ,EAAE,SAAS,CAAC;wBAC/B,SAAS,EAAE,cAAc;qBAC1B,CAAC,IACE,EACN,cACE,SAAS,EAAE,GAAG,kBAAkB,WAC9B,OAAO,KAAK,WAAW,CAAC,CAAC,CAAC,sBAAsB,CAAC,CAAC,CAAC,uBACrD,EAAE,GACF,EACF,cACE,SAAS,EAAE,GAAG,kBAAkB,YAC9B,OAAO,KAAK,WAAW,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,qBACnD,EAAE,GACF,IACW,CAChB,CAAC;AACJ,CAAC,CACF,CAAC"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { UniBlockProps } from '../../model/JSXBlock';
|
|
2
|
-
import type { RecommendationCardTypes } from './RecommendationContent';
|
|
3
|
-
export interface RecommendationCardProps extends RecommendationCardTypes, UniBlockProps {
|
|
4
|
-
}
|
|
5
|
-
export declare const RecommendationCard: import("@redneckz/uni-jsx").UNIComponent<RecommendationCardProps, any, any>;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
|
|
2
|
-
import { JSX } from '@redneckz/uni-jsx';
|
|
3
|
-
import { BlockWrapper } from '../../ui-kit/BlockWrapper.js';
|
|
4
|
-
import { renderButtonsSection } from '../../ui-kit/Button/renderButtonsSection.js';
|
|
5
|
-
import { Heading } from '../../ui-kit/Heading/Heading.js';
|
|
6
|
-
import { Img } from '../../ui-kit/Img/Img.js';
|
|
7
|
-
import { List } from '../../ui-kit/List/List.js';
|
|
8
|
-
import { BaseTile } from '../BaseTile/BaseTile.js';
|
|
9
|
-
import { SocialMedia } from '../Footer/SocialMedia.js';
|
|
10
|
-
export const RecommendationCard = JSX(({ className = '', title, description, items, image, socialMedia, button, ...rest }) => {
|
|
11
|
-
const tileTitle = title ? (_jsx(Heading, { headingType: "h5", as: "h3", className: "mb-3.5 z-10", title: title })) : null;
|
|
12
|
-
const tileImage = image?.src ? (_jsx(Img, { className: "absolute bottom-0 right-0 m-0", image: image })) : null;
|
|
13
|
-
return (_jsx(BlockWrapper, { className: `relative overflow-hidden text-left border border-solid box-border p-7 min-w-[524px] min-h-[218px] ${className}`, role: "listitem", ...rest, children: _jsx(BaseTile, { className: "flex justify-between", title: tileTitle, image: tileImage, children: _jsxs("div", { className: "h-full flex flex-col justify-between", children: [description ? _jsx("span", { className: "mb-2", children: description }) : null, items?.length ? (_jsx(List, { className: "text-xl-light flex flex-col flex-1 gap-2 max-w-[236px]", items: items })) : null, socialMedia ? _jsx(SocialMedia, { className: "pt-10 pb-0", media: socialMedia }) : null, button?.text ? (_jsx("div", { className: "pt-2", children: renderButtonsSection([button], { buttonClassName: 'mt-16 px-5' }) })) : null] }) }) }));
|
|
14
|
-
});
|
|
15
|
-
//# sourceMappingURL=RecommendationCard.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RecommendationCard.js","sourceRoot":"","sources":["../../../src/components/Recommendation/RecommendationCard.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAExC,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AAChF,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;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAKpD,MAAM,CAAC,MAAM,kBAAkB,GAAG,GAAG,CACnC,CAAC,EAAE,SAAS,GAAG,EAAE,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,KAAK,EAAE,WAAW,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,CAAC,CACF,CAAC"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import type { HeadlineCommonProps, TitleProps } from '../../model/HeadlineType';
|
|
2
|
-
import type { UniBlockContent } from '../../model/JSXBlock';
|
|
3
|
-
import type { LinkCommonProps } from '../../model/LinkProps';
|
|
4
|
-
import type { ButtonProps } from '../../ui-kit/Button/ButtonProps';
|
|
5
|
-
import { ImageContent } from '../../ui-kit/Img/ImgProps';
|
|
6
|
-
import type { ListContent } from '../../ui-kit/List/ListContent';
|
|
7
|
-
/**
|
|
8
|
-
* @title Карточка
|
|
9
|
-
*/
|
|
10
|
-
export interface RecommendationCardTypes extends HeadlineCommonProps, ListContent, ImageContent {
|
|
11
|
-
/**
|
|
12
|
-
* @title Соц сети
|
|
13
|
-
* @minItems 3
|
|
14
|
-
*/
|
|
15
|
-
socialMedia?: LinkCommonProps[];
|
|
16
|
-
button?: ButtonProps;
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* @title Рекомендации
|
|
20
|
-
*/
|
|
21
|
-
export declare type RecommendationContent = UniBlockContent & TitleProps & {
|
|
22
|
-
/** @title Карточки */
|
|
23
|
-
recommendations?: RecommendationCardTypes[];
|
|
24
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RecommendationContent.js","sourceRoot":"","sources":["../../../src/components/Recommendation/RecommendationContent.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"content": {
|
|
3
|
-
"title": "Блок рекомендаций",
|
|
4
|
-
"recommendations": [
|
|
5
|
-
{
|
|
6
|
-
"image": {
|
|
7
|
-
"format": "webp",
|
|
8
|
-
"size": {
|
|
9
|
-
"width": 180,
|
|
10
|
-
"height": 180
|
|
11
|
-
}
|
|
12
|
-
},
|
|
13
|
-
"title": "Заголовок 1",
|
|
14
|
-
"description": "Описание 1",
|
|
15
|
-
"socialMedia": [
|
|
16
|
-
{ "href": "https://t.me" },
|
|
17
|
-
{ "href": "https://vk.com" },
|
|
18
|
-
{ "href": "https://ok.ru" }
|
|
19
|
-
],
|
|
20
|
-
"button": {
|
|
21
|
-
"text": "",
|
|
22
|
-
"version": "secondary"
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
"image": {
|
|
27
|
-
"format": "webp",
|
|
28
|
-
"size": {
|
|
29
|
-
"width": 180,
|
|
30
|
-
"height": 180
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
|
-
"title": "Заголовок 2",
|
|
34
|
-
"description": "Описание 2",
|
|
35
|
-
"button": {
|
|
36
|
-
"href": "",
|
|
37
|
-
"text": "Подробнее",
|
|
38
|
-
"target": "_self",
|
|
39
|
-
"version": "primary"
|
|
40
|
-
}
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
"image": {
|
|
44
|
-
"format": "webp",
|
|
45
|
-
"size": {
|
|
46
|
-
"width": 180,
|
|
47
|
-
"height": 180
|
|
48
|
-
}
|
|
49
|
-
},
|
|
50
|
-
"title": "Заголовок 3",
|
|
51
|
-
"description": "Описание 3",
|
|
52
|
-
"socialMedia": [
|
|
53
|
-
{ "href": "https://t.me" },
|
|
54
|
-
{ "href": "https://vk.com" },
|
|
55
|
-
{ "href": "https://ok.ru" }
|
|
56
|
-
]
|
|
57
|
-
}
|
|
58
|
-
],
|
|
59
|
-
"version": "primary"
|
|
60
|
-
}
|
|
61
|
-
}
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
-
import { useCarouselControls } from '../../hooks/useCarouselControls';
|
|
3
|
-
import type { UniBlockProps } from '../../model/JSXBlock';
|
|
4
|
-
import { BlockWrapper } from '../../ui-kit/BlockWrapper';
|
|
5
|
-
import { renderArrows } from '../../ui-kit/Button/renderArrows';
|
|
6
|
-
import { Heading } from '../../ui-kit/Heading/Heading';
|
|
7
|
-
import { RecommendationCard } from './RecommendationCard';
|
|
8
|
-
import type { RecommendationContent } from './RecommendationContent';
|
|
9
|
-
|
|
10
|
-
const BLUR_BLOCK_CLASSES = 'absolute top-0 bottom-0 w-[84px]';
|
|
11
|
-
const CARD_VIEW_COUNT = 2;
|
|
12
|
-
const CARD_SHIFT = 525;
|
|
13
|
-
|
|
14
|
-
export interface RecommendationProps extends RecommendationContent, UniBlockProps {}
|
|
15
|
-
|
|
16
|
-
export const Recommendation = JSX<RecommendationProps>(
|
|
17
|
-
({ recommendations = [], className = '', title, version = 'primary', ...rest }) => {
|
|
18
|
-
const [activeIndex, controls] = useCarouselControls({
|
|
19
|
-
itemCount: recommendations.length,
|
|
20
|
-
visibleItemCount: CARD_VIEW_COUNT,
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
return (
|
|
24
|
-
<BlockWrapper
|
|
25
|
-
className={`relative font-sans p-9 overflow-hidden text-center ${className}`}
|
|
26
|
-
version={version}
|
|
27
|
-
{...rest}
|
|
28
|
-
>
|
|
29
|
-
{title ? <Heading headingType="h3" className="mb-6" title={title} /> : null}
|
|
30
|
-
<div>
|
|
31
|
-
<div
|
|
32
|
-
className="flex duration-1000 gap-3.5"
|
|
33
|
-
style={{ transform: `translateX(-${activeIndex * CARD_SHIFT}px)` }}
|
|
34
|
-
role="list"
|
|
35
|
-
>
|
|
36
|
-
{recommendations.length
|
|
37
|
-
? recommendations.map((card, i) => (
|
|
38
|
-
<RecommendationCard
|
|
39
|
-
key={String(i)}
|
|
40
|
-
version={version}
|
|
41
|
-
className="border-gray group-data-secondary:border-white/50"
|
|
42
|
-
{...card}
|
|
43
|
-
/>
|
|
44
|
-
))
|
|
45
|
-
: null}
|
|
46
|
-
</div>
|
|
47
|
-
{renderArrows({
|
|
48
|
-
...controls,
|
|
49
|
-
btnClass: ['left-8', 'right-8'],
|
|
50
|
-
className: 'top-1/2 mt-3',
|
|
51
|
-
})}
|
|
52
|
-
</div>
|
|
53
|
-
<div
|
|
54
|
-
className={`${BLUR_BLOCK_CLASSES} left-0 ${
|
|
55
|
-
version === 'secondary' ? 'bg-opacity-from-main' : 'bg-opacity-from-white'
|
|
56
|
-
}`}
|
|
57
|
-
/>
|
|
58
|
-
<div
|
|
59
|
-
className={`${BLUR_BLOCK_CLASSES} right-0 ${
|
|
60
|
-
version === 'secondary' ? 'bg-opacity-to-main' : 'bg-opacity-to-white'
|
|
61
|
-
}`}
|
|
62
|
-
/>
|
|
63
|
-
</BlockWrapper>
|
|
64
|
-
);
|
|
65
|
-
},
|
|
66
|
-
);
|