@redneckz/wildless-cms-uni-blocks 0.3.23 → 0.3.26
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 +30 -51
- package/bundle/bundle.umd.min.js +1 -1
- package/dist/components/Blocks.mobile.d.ts +1 -0
- package/dist/components/Blocks.mobile.js +2 -0
- package/dist/components/Blocks.mobile.js.map +1 -1
- package/dist/components/ComparisonTable/ComparisonTable.mobile.js +18 -6
- package/dist/components/ComparisonTable/ComparisonTable.mobile.js.map +1 -1
- package/dist/components/ComparisonTable/ComparisonTableContent.d.ts +3 -2
- package/dist/components/ContentPage/ContentPage.js.map +1 -1
- package/dist/components/Gallery/Gallery.mobile.js +4 -4
- package/dist/components/Gallery/Gallery.mobile.js.map +1 -1
- package/dist/components/Gallery/GalleryCardInner.js +4 -9
- package/dist/components/Gallery/GalleryCardInner.js.map +1 -1
- package/dist/components/Gallery/GalleryContent.d.ts +3 -2
- package/dist/components/LinkDocs/LinkDocsContent.d.ts +3 -9
- package/dist/components/MiniGallery/MiniGalleryContent.d.ts +1 -1
- package/dist/components/OtherProducts/OtherProductsItem.js +1 -1
- package/dist/components/OtherProducts/OtherProductsItem.js.map +1 -1
- package/dist/components/ProductBlock/ProductBlock.mobile.js +7 -5
- package/dist/components/ProductBlock/ProductBlock.mobile.js.map +1 -1
- package/dist/components/ProductBlock/ProductBlockContent.d.ts +4 -0
- package/dist/components/ProductBlock/ProductBlockInner.js +2 -2
- package/dist/components/ProductBlock/ProductBlockInner.js.map +1 -1
- package/dist/components/ProductBlock/ProductBlockInner.mobile.js +8 -3
- package/dist/components/ProductBlock/ProductBlockInner.mobile.js.map +1 -1
- package/dist/components/ProductBlock/renderBenefit.mobile.d.ts +2 -1
- package/dist/components/ProductBlock/renderBenefit.mobile.js +1 -1
- package/dist/components/ProductBlock/renderBenefit.mobile.js.map +1 -1
- package/dist/components/ProductGallery/ProductGalleryContent.d.ts +4 -1
- package/dist/components/TariffsTable/TariffsTableCell.js +4 -4
- package/dist/components/TariffsTable/TariffsTableCell.js.map +1 -1
- package/dist/components/TariffsTable/TariffsTableContent.d.ts +1 -1
- package/dist/components/TariffsTable/TariffsTableTileCell.js +4 -2
- package/dist/components/TariffsTable/TariffsTableTileCell.js.map +1 -1
- package/dist/components/TextBlock/TextBlock.mobile.js +1 -1
- package/dist/components/TextBlock/TextBlock.mobile.js.map +1 -1
- package/dist/components/Tile/Tile.js +1 -1
- package/dist/components/Tile/Tile.js.map +1 -1
- package/dist/icons/IconName.d.ts +1 -1
- package/dist/icons/IconName.js.map +1 -1
- package/dist/ui-kit/Icon/Icon.js +2 -1
- package/dist/ui-kit/Icon/Icon.js.map +1 -1
- package/dist/ui-kit/Icon/IconProps.d.ts +2 -2
- package/dist/ui-kit/Img/Img.js +3 -1
- package/dist/ui-kit/Img/Img.js.map +1 -1
- package/dist/ui-kit/List/List.d.ts +1 -1
- package/dist/ui-kit/List/List.js +7 -2
- package/dist/ui-kit/List/List.js.map +1 -1
- package/dist/ui-kit/List/ListItem.d.ts +1 -1
- package/dist/ui-kit/List/ListItem.js +4 -9
- package/dist/ui-kit/List/ListItem.js.map +1 -1
- package/dist/ui-kit/List/ListProps.d.ts +2 -0
- package/lib/common.css +1 -1
- package/lib/components/Blocks.mobile.d.ts +1 -0
- package/lib/components/Blocks.mobile.js +2 -0
- package/lib/components/Blocks.mobile.js.map +1 -1
- package/lib/components/ComparisonTable/ComparisonTable.mobile.js +18 -6
- package/lib/components/ComparisonTable/ComparisonTable.mobile.js.map +1 -1
- package/lib/components/ComparisonTable/ComparisonTableContent.d.ts +3 -2
- package/lib/components/ContentPage/ContentPage.js.map +1 -1
- package/lib/components/Gallery/Gallery.mobile.js +4 -4
- package/lib/components/Gallery/Gallery.mobile.js.map +1 -1
- package/lib/components/Gallery/GalleryCardInner.js +4 -9
- package/lib/components/Gallery/GalleryCardInner.js.map +1 -1
- package/lib/components/Gallery/GalleryContent.d.ts +3 -2
- package/lib/components/LinkDocs/LinkDocsContent.d.ts +3 -9
- package/lib/components/MiniGallery/MiniGalleryContent.d.ts +1 -1
- package/lib/components/OtherProducts/OtherProductsItem.js +1 -1
- package/lib/components/OtherProducts/OtherProductsItem.js.map +1 -1
- package/lib/components/ProductBlock/ProductBlock.fixture.mobile.d.ts +4 -0
- package/lib/components/ProductBlock/ProductBlock.mobile.js +7 -5
- package/lib/components/ProductBlock/ProductBlock.mobile.js.map +1 -1
- package/lib/components/ProductBlock/ProductBlockContent.d.ts +4 -0
- package/lib/components/ProductBlock/ProductBlockInner.js +2 -2
- package/lib/components/ProductBlock/ProductBlockInner.js.map +1 -1
- package/lib/components/ProductBlock/ProductBlockInner.mobile.js +8 -3
- package/lib/components/ProductBlock/ProductBlockInner.mobile.js.map +1 -1
- package/lib/components/ProductBlock/renderBenefit.mobile.d.ts +2 -1
- package/lib/components/ProductBlock/renderBenefit.mobile.js +1 -1
- package/lib/components/ProductBlock/renderBenefit.mobile.js.map +1 -1
- package/lib/components/ProductGallery/ProductGalleryContent.d.ts +4 -1
- package/lib/components/TariffsTable/TariffsTableCell.js +4 -4
- package/lib/components/TariffsTable/TariffsTableCell.js.map +1 -1
- package/lib/components/TariffsTable/TariffsTableContent.d.ts +1 -1
- package/lib/components/TariffsTable/TariffsTableTileCell.js +4 -2
- package/lib/components/TariffsTable/TariffsTableTileCell.js.map +1 -1
- package/lib/components/TextBlock/TextBlock.mobile.js +1 -1
- package/lib/components/TextBlock/TextBlock.mobile.js.map +1 -1
- package/lib/components/Tile/Tile.js +1 -1
- package/lib/components/Tile/Tile.js.map +1 -1
- package/lib/icons/IconName.js.map +1 -1
- package/lib/ui-kit/Icon/Icon.js +2 -1
- package/lib/ui-kit/Icon/Icon.js.map +1 -1
- package/lib/ui-kit/Icon/IconProps.d.ts +2 -2
- package/lib/ui-kit/Img/Img.js +3 -1
- package/lib/ui-kit/Img/Img.js.map +1 -1
- package/lib/ui-kit/List/List.d.ts +1 -1
- package/lib/ui-kit/List/List.fixture.d.ts +10 -0
- package/lib/ui-kit/List/List.js +7 -2
- package/lib/ui-kit/List/List.js.map +1 -1
- package/lib/ui-kit/List/ListItem.d.ts +1 -1
- package/lib/ui-kit/List/ListItem.js +4 -9
- package/lib/ui-kit/List/ListItem.js.map +1 -1
- package/lib/ui-kit/List/ListProps.d.ts +2 -0
- package/mobile/bundle/bundle.umd.js +74 -75
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/dist/components/Blocks.d.ts +1 -0
- package/mobile/dist/components/Blocks.js +2 -0
- package/mobile/dist/components/Blocks.js.map +1 -1
- package/mobile/dist/components/ComparisonTable/ComparisonTable.js +18 -6
- package/mobile/dist/components/ComparisonTable/ComparisonTable.js.map +1 -1
- package/mobile/dist/components/ComparisonTable/ComparisonTableContent.d.ts +3 -2
- package/mobile/dist/components/ContentPage/ContentPage.js.map +1 -1
- package/mobile/dist/components/Gallery/Gallery.js +4 -4
- package/mobile/dist/components/Gallery/Gallery.js.map +1 -1
- package/mobile/dist/components/Gallery/GalleryCardInner.js +4 -9
- package/mobile/dist/components/Gallery/GalleryCardInner.js.map +1 -1
- package/mobile/dist/components/Gallery/GalleryContent.d.ts +3 -2
- package/mobile/dist/components/LinkDocs/LinkDocsContent.d.ts +3 -9
- package/mobile/dist/components/MiniGallery/MiniGalleryContent.d.ts +1 -1
- package/mobile/dist/components/OtherProducts/OtherProductsItem.js +1 -1
- package/mobile/dist/components/OtherProducts/OtherProductsItem.js.map +1 -1
- package/mobile/dist/components/ProductBlock/ProductBlock.js +7 -5
- package/mobile/dist/components/ProductBlock/ProductBlock.js.map +1 -1
- package/mobile/dist/components/ProductBlock/ProductBlockContent.d.ts +4 -0
- package/mobile/dist/components/ProductBlock/ProductBlockInner.js +8 -3
- package/mobile/dist/components/ProductBlock/ProductBlockInner.js.map +1 -1
- package/mobile/dist/components/ProductBlock/renderBenefit.d.ts +2 -1
- package/mobile/dist/components/ProductBlock/renderBenefit.js +1 -1
- package/mobile/dist/components/ProductBlock/renderBenefit.js.map +1 -1
- package/mobile/dist/components/ProductGallery/ProductGalleryContent.d.ts +4 -1
- package/mobile/dist/components/TariffsTable/TariffsTableCell.js +4 -4
- package/mobile/dist/components/TariffsTable/TariffsTableCell.js.map +1 -1
- package/mobile/dist/components/TariffsTable/TariffsTableContent.d.ts +1 -1
- package/mobile/dist/components/TariffsTable/TariffsTableTileCell.js +4 -2
- package/mobile/dist/components/TariffsTable/TariffsTableTileCell.js.map +1 -1
- package/mobile/dist/components/TextBlock/TextBlock.js +1 -1
- package/mobile/dist/components/TextBlock/TextBlock.js.map +1 -1
- package/mobile/dist/components/Tile/Tile.js +1 -1
- package/mobile/dist/components/Tile/Tile.js.map +1 -1
- package/mobile/dist/ui-kit/Icon/Icon.js +2 -1
- package/mobile/dist/ui-kit/Icon/Icon.js.map +1 -1
- package/mobile/dist/ui-kit/Icon/IconProps.d.ts +2 -2
- package/mobile/dist/ui-kit/List/List.d.ts +1 -1
- package/mobile/dist/ui-kit/List/List.js +7 -2
- package/mobile/dist/ui-kit/List/List.js.map +1 -1
- package/mobile/dist/ui-kit/List/ListItem.d.ts +1 -1
- package/mobile/dist/ui-kit/List/ListItem.js +4 -9
- package/mobile/dist/ui-kit/List/ListItem.js.map +1 -1
- package/mobile/dist/ui-kit/List/ListProps.d.ts +2 -0
- package/mobile/lib/components/Blocks.d.ts +1 -0
- package/mobile/lib/components/Blocks.js +2 -0
- package/mobile/lib/components/Blocks.js.map +1 -1
- package/mobile/lib/components/ComparisonTable/ComparisonTable.js +18 -6
- package/mobile/lib/components/ComparisonTable/ComparisonTable.js.map +1 -1
- package/mobile/lib/components/ComparisonTable/ComparisonTableContent.d.ts +3 -2
- package/mobile/lib/components/ContentPage/ContentPage.js.map +1 -1
- package/mobile/lib/components/Gallery/Gallery.js +4 -4
- package/mobile/lib/components/Gallery/Gallery.js.map +1 -1
- package/mobile/lib/components/Gallery/GalleryCardInner.js +4 -9
- package/mobile/lib/components/Gallery/GalleryCardInner.js.map +1 -1
- package/mobile/lib/components/Gallery/GalleryContent.d.ts +3 -2
- package/mobile/lib/components/LinkDocs/LinkDocsContent.d.ts +3 -9
- package/mobile/lib/components/MiniGallery/MiniGalleryContent.d.ts +1 -1
- package/mobile/lib/components/OtherProducts/OtherProductsItem.js +1 -1
- package/mobile/lib/components/OtherProducts/OtherProductsItem.js.map +1 -1
- package/mobile/lib/components/ProductBlock/ProductBlock.js +7 -5
- package/mobile/lib/components/ProductBlock/ProductBlock.js.map +1 -1
- package/mobile/lib/components/ProductBlock/ProductBlockContent.d.ts +4 -0
- package/mobile/lib/components/ProductBlock/ProductBlockInner.js +8 -3
- package/mobile/lib/components/ProductBlock/ProductBlockInner.js.map +1 -1
- package/mobile/lib/components/ProductBlock/renderBenefit.d.ts +2 -1
- package/mobile/lib/components/ProductBlock/renderBenefit.js +1 -1
- package/mobile/lib/components/ProductBlock/renderBenefit.js.map +1 -1
- package/mobile/lib/components/ProductGallery/ProductGalleryContent.d.ts +4 -1
- package/mobile/lib/components/TariffsTable/TariffsTableCell.js +4 -4
- package/mobile/lib/components/TariffsTable/TariffsTableCell.js.map +1 -1
- package/mobile/lib/components/TariffsTable/TariffsTableContent.d.ts +1 -1
- package/mobile/lib/components/TariffsTable/TariffsTableTileCell.js +4 -2
- package/mobile/lib/components/TariffsTable/TariffsTableTileCell.js.map +1 -1
- package/mobile/lib/components/TextBlock/TextBlock.js +1 -1
- package/mobile/lib/components/TextBlock/TextBlock.js.map +1 -1
- package/mobile/lib/components/Tile/Tile.js +1 -1
- package/mobile/lib/components/Tile/Tile.js.map +1 -1
- package/mobile/lib/ui-kit/Icon/Icon.js +2 -1
- package/mobile/lib/ui-kit/Icon/Icon.js.map +1 -1
- package/mobile/lib/ui-kit/Icon/IconProps.d.ts +2 -2
- package/mobile/lib/ui-kit/List/List.d.ts +1 -1
- package/mobile/lib/ui-kit/List/List.js +7 -2
- package/mobile/lib/ui-kit/List/List.js.map +1 -1
- package/mobile/lib/ui-kit/List/ListItem.d.ts +1 -1
- package/mobile/lib/ui-kit/List/ListItem.js +4 -9
- package/mobile/lib/ui-kit/List/ListItem.js.map +1 -1
- package/mobile/lib/ui-kit/List/ListProps.d.ts +2 -0
- package/mobile/src/components/Blocks.ts +2 -0
- package/mobile/src/components/ComparisonTable/ComparisonTable.example.json +1 -0
- package/mobile/src/components/ComparisonTable/ComparisonTable.tsx +52 -31
- package/mobile/src/components/ComparisonTable/ComparisonTableContent.ts +3 -2
- package/mobile/src/components/ContentPage/ContentPage.tsx +0 -1
- package/mobile/src/components/CreditCalculator/CreditCalculator.example.json +19 -0
- package/mobile/src/components/Gallery/Gallery.example.json +1 -0
- package/mobile/src/components/Gallery/Gallery.tsx +5 -4
- package/mobile/src/components/Gallery/GalleryCardInner.tsx +13 -18
- package/mobile/src/components/Gallery/GalleryContent.ts +3 -2
- package/mobile/src/components/LinkDocs/LinkDocsContent.ts +3 -10
- package/mobile/src/components/MiniGallery/MiniGalleryContent.ts +1 -1
- package/mobile/src/components/OtherProducts/OtherProductsItem.tsx +1 -1
- package/mobile/src/components/ProductBlock/ProductBlock.example.json +1 -0
- package/mobile/src/components/ProductBlock/ProductBlock.tsx +17 -12
- package/mobile/src/components/ProductBlock/ProductBlockContent.ts +4 -0
- package/mobile/src/components/ProductBlock/ProductBlockInner.tsx +25 -5
- package/mobile/src/components/ProductBlock/renderBenefit.tsx +2 -1
- package/mobile/src/components/ProductGallery/ProductGalleryContent.ts +4 -1
- package/mobile/src/components/TariffsTable/TariffsTableCell.tsx +28 -27
- package/mobile/src/components/TariffsTable/TariffsTableContent.ts +1 -1
- package/mobile/src/components/TariffsTable/TariffsTableTileCell.tsx +33 -31
- package/mobile/src/components/TextBlock/TextBlock.example.json +2 -1
- package/mobile/src/components/TextBlock/TextBlock.tsx +2 -2
- package/mobile/src/components/Tile/Tile.tsx +3 -1
- package/mobile/src/ui-kit/Icon/Icon.tsx +7 -1
- package/mobile/src/ui-kit/Icon/IconProps.ts +2 -2
- package/mobile/src/ui-kit/List/List.tsx +9 -3
- package/mobile/src/ui-kit/List/ListItem.tsx +5 -12
- package/mobile/src/ui-kit/List/ListProps.ts +2 -0
- package/package.json +1 -1
- package/src/components/Blocks.mobile.ts +2 -0
- package/src/components/ComparisonTable/ComparisonTable.example.json +1 -0
- package/src/components/ComparisonTable/ComparisonTable.fixture.mobile.tsx +1 -1
- package/src/components/ComparisonTable/ComparisonTable.mobile.tsx +52 -31
- package/src/components/ComparisonTable/ComparisonTableContent.ts +3 -2
- package/src/components/ContentPage/ContentPage.tsx +0 -1
- package/src/components/CreditCalculator/CreditCalculator.example.json +19 -0
- package/src/components/Gallery/Gallery.example.json +1 -0
- package/src/components/Gallery/Gallery.fixture.mobile.tsx +3 -2
- package/src/components/Gallery/Gallery.mobile.tsx +5 -4
- package/src/components/Gallery/GalleryCardInner.tsx +13 -18
- package/src/components/Gallery/GalleryContent.ts +3 -2
- package/src/components/LinkDocs/LinkDocsContent.ts +3 -10
- package/src/components/MiniGallery/MiniGalleryContent.ts +1 -1
- package/src/components/OtherProducts/OtherProductsItem.tsx +1 -1
- package/src/components/ProductBlock/ProductBlock.example.json +1 -0
- package/src/components/ProductBlock/ProductBlock.fixture.mobile.tsx +49 -13
- package/src/components/ProductBlock/ProductBlock.mobile.tsx +17 -12
- package/src/components/ProductBlock/ProductBlockContent.ts +4 -0
- package/src/components/ProductBlock/ProductBlockInner.mobile.tsx +25 -5
- package/src/components/ProductBlock/ProductBlockInner.tsx +8 -1
- package/src/components/ProductBlock/renderBenefit.mobile.tsx +2 -1
- package/src/components/ProductGallery/ProductGalleryContent.ts +4 -1
- package/src/components/TariffsTable/TariffsTableCell.tsx +28 -27
- package/src/components/TariffsTable/TariffsTableContent.ts +1 -1
- package/src/components/TariffsTable/TariffsTableTileCell.tsx +33 -31
- package/src/components/TextBlock/TextBlock.example.json +2 -1
- package/src/components/TextBlock/TextBlock.fixture.mobile.tsx +8 -0
- package/src/components/TextBlock/TextBlock.mobile.tsx +2 -2
- package/src/components/Tile/Tile.tsx +3 -1
- package/src/icons/IconName.ts +152 -3
- package/src/ui-kit/Icon/Icon.tsx +7 -1
- package/src/ui-kit/Icon/IconProps.ts +2 -2
- package/src/ui-kit/Img/Img.tsx +5 -2
- package/src/ui-kit/List/List.fixture.tsx +37 -0
- package/src/ui-kit/List/List.tsx +9 -3
- package/src/ui-kit/List/ListItem.tsx +5 -12
- package/src/ui-kit/List/ListProps.ts +2 -0
- package/dist/ui-kit/BlockItem/BlockItem.d.ts +0 -2
- package/dist/ui-kit/BlockItem/BlockItem.js +0 -23
- package/dist/ui-kit/BlockItem/BlockItem.js.map +0 -1
- package/dist/ui-kit/BlockItem/BlockItemProps.d.ts +0 -21
- package/dist/ui-kit/BlockItem/BlockItemProps.js +0 -2
- package/dist/ui-kit/BlockItem/BlockItemProps.js.map +0 -1
- package/lib/ui-kit/BlockItem/BlockItem.d.ts +0 -2
- package/lib/ui-kit/BlockItem/BlockItem.fixture.d.ts +0 -8
- package/lib/ui-kit/BlockItem/BlockItem.js +0 -21
- package/lib/ui-kit/BlockItem/BlockItem.js.map +0 -1
- package/lib/ui-kit/BlockItem/BlockItemProps.d.ts +0 -21
- package/lib/ui-kit/BlockItem/BlockItemProps.js +0 -2
- package/lib/ui-kit/BlockItem/BlockItemProps.js.map +0 -1
- package/mobile/dist/ui-kit/BlockItem/BlockItem.d.ts +0 -2
- package/mobile/dist/ui-kit/BlockItem/BlockItem.js +0 -23
- package/mobile/dist/ui-kit/BlockItem/BlockItem.js.map +0 -1
- package/mobile/dist/ui-kit/BlockItem/BlockItemProps.d.ts +0 -21
- package/mobile/dist/ui-kit/BlockItem/BlockItemProps.js +0 -2
- package/mobile/dist/ui-kit/BlockItem/BlockItemProps.js.map +0 -1
- package/mobile/lib/ui-kit/BlockItem/BlockItem.d.ts +0 -2
- package/mobile/lib/ui-kit/BlockItem/BlockItem.js +0 -21
- package/mobile/lib/ui-kit/BlockItem/BlockItem.js.map +0 -1
- package/mobile/lib/ui-kit/BlockItem/BlockItemProps.d.ts +0 -21
- package/mobile/lib/ui-kit/BlockItem/BlockItemProps.js +0 -2
- package/mobile/lib/ui-kit/BlockItem/BlockItemProps.js.map +0 -1
- package/mobile/src/ui-kit/BlockItem/BlockItem.tsx +0 -33
- package/mobile/src/ui-kit/BlockItem/BlockItemProps.ts +0 -23
- package/src/ui-kit/BlockItem/BlockItem.fixture.tsx +0 -12
- package/src/ui-kit/BlockItem/BlockItem.tsx +0 -33
- package/src/ui-kit/BlockItem/BlockItemProps.ts +0 -23
|
@@ -396,11 +396,12 @@
|
|
|
396
396
|
const svgColorsMap = {
|
|
397
397
|
none: '',
|
|
398
398
|
primary: 'text-primary-main',
|
|
399
|
+
secondary: 'text-primary-text',
|
|
399
400
|
};
|
|
400
401
|
const Icon = JSX(({ className = '', name, alt = `Иконка ${IconTitleMap[name] || name}`, title = alt, asSVG, color = 'primary', ...imgProps }) => {
|
|
401
402
|
const href = `${projectSettings.CDN || ''}icons/${name}.svg`;
|
|
402
403
|
if (asSVG) {
|
|
403
|
-
return (jsxs("svg", { className: `${svgColorsMap[color]} ${className}`, ...imgProps, "aria-hidden": "true", children: [title ? jsx("title", { children: title }) : null, alt ? jsx("desc", { children: alt }) : null, jsx("use", { href: `${href}#icon`, xlinkHref: `${href}#icon` })] }));
|
|
404
|
+
return (jsxs("svg", { className: `${svgColorsMap[color]} ${className}`, ...imgProps, "aria-hidden": "true", style: color === 'secondary' ? { filter: 'invert(1)' } : null, children: [title ? jsx("title", { children: title }) : null, alt ? jsx("desc", { children: alt }) : null, jsx("use", { href: `${href}#icon`, xlinkHref: `${href}#icon` })] }));
|
|
404
405
|
}
|
|
405
406
|
return (jsx("img", { className: className, src: href, alt: alt, title: title, ...imgProps, "aria-hidden": "true" }));
|
|
406
407
|
});
|
|
@@ -737,28 +738,28 @@
|
|
|
737
738
|
return jsx("div", { className: `font-normal text-base ${className}`, children: description });
|
|
738
739
|
});
|
|
739
740
|
|
|
740
|
-
const LIST_STYLE_CLASSES
|
|
741
|
-
const
|
|
742
|
-
primary: 'text-primary-text',
|
|
743
|
-
secondary: 'text-white',
|
|
744
|
-
gray: 'text-secondary-text',
|
|
745
|
-
};
|
|
746
|
-
const LIST_STYLE_MAP$1 = {
|
|
741
|
+
const LIST_STYLE_CLASSES = 'rounded-full inline-block mr-3 mt-2';
|
|
742
|
+
const LIST_DOT_STYLE_MAP = {
|
|
747
743
|
primary: 'bg-primary-main',
|
|
748
744
|
secondary: 'bg-white',
|
|
749
745
|
gray: 'bg-secondary-text',
|
|
750
746
|
};
|
|
751
747
|
const ListItem = JSX(({ className = '', isDotted = true, children, version = 'primary' }) => {
|
|
752
|
-
return (jsxs("div", { className: `font-sans flex items-start ${className}`, role: "listitem", children: [isDotted && jsx("div", { className: getListStyle
|
|
748
|
+
return (jsxs("div", { className: `font-sans flex items-start ${className}`, role: "listitem", children: [isDotted && jsx("div", { className: getListStyle(version) }), jsx("span", { children: children })] }));
|
|
753
749
|
});
|
|
754
|
-
const getListStyle
|
|
755
|
-
const size = version === 'gray' ? 'w-
|
|
756
|
-
return `${LIST_STYLE_CLASSES
|
|
750
|
+
const getListStyle = (version) => {
|
|
751
|
+
const size = version === 'gray' ? 'w-1.5 h-1.5 min-w-1.5 min-h-1.5' : 'w-2 h-2 min-w-2 min-h-2';
|
|
752
|
+
return `${LIST_STYLE_CLASSES} ${LIST_DOT_STYLE_MAP[version]} ${size}`;
|
|
757
753
|
};
|
|
758
754
|
|
|
755
|
+
const TEXT_STYLE_MAP = {
|
|
756
|
+
primary: 'text-primary-text',
|
|
757
|
+
secondary: 'text-white',
|
|
758
|
+
gray: 'text-secondary-text',
|
|
759
|
+
};
|
|
759
760
|
const List = JSX((props) => {
|
|
760
|
-
const { className = '', itemClassName, isDotted, items, version } = props;
|
|
761
|
-
return (jsx("section", { className: `${className}`, role: "list", children: items?.length
|
|
761
|
+
const { className = '', itemClassName, isDotted, items, version = 'primary' } = props;
|
|
762
|
+
return (jsx("section", { className: `${TEXT_STYLE_MAP[version]} ${className}`, role: "list", children: items?.length
|
|
762
763
|
? items.map((_, i) => (jsx(ListItem, { className: itemClassName, isDotted: isDotted, version: version, children: _ }, String(i))))
|
|
763
764
|
: null }));
|
|
764
765
|
});
|
|
@@ -776,21 +777,28 @@
|
|
|
776
777
|
secondary: 'text-white',
|
|
777
778
|
};
|
|
778
779
|
function renderBenefit(benefit, i, version) {
|
|
779
|
-
return (jsxs("div", { className: "flex gap-3 items-center mb-2.5 last:mb-0", children: [benefit.icon && (jsx(Icon, { className: "w-6 h-6 rounded-full box-border", name: benefit.icon, width: "24", height: "24", asSVG: true })), jsx("div", { className: `font-medium text-m-title-xs m-0 ${benefitTitleStyleMap[version]}`, children: benefit.label }), benefit.description && (jsx("div", { className: `font-normal text-m-sm ${benefitDescStyleMap[version]}`, children: benefit.description }))] }, String(i)));
|
|
780
|
+
return (jsxs("div", { className: "flex gap-3 items-center mb-2.5 last:mb-0", children: [benefit.icon && (jsx(Icon, { className: "w-6 h-6 rounded-full box-border", name: benefit.icon, width: "24", height: "24", asSVG: true, color: version })), jsx("div", { className: `font-medium text-m-title-xs m-0 ${benefitTitleStyleMap[version]}`, children: benefit.label }), benefit.description && (jsx("div", { className: `font-normal text-m-sm ${benefitDescStyleMap[version]}`, children: benefit.description }))] }, String(i)));
|
|
780
781
|
}
|
|
781
782
|
|
|
782
|
-
const ProductBlockInner = JSX(({ className = '', context, title, headingType = 'h2', description, benefits, buttons, image, items, version = 'primary', }) => {
|
|
783
|
-
return (jsxs("div", { className: `w-full
|
|
783
|
+
const ProductBlockInner = JSX(({ className = '', context, title, headingType = 'h2', description, benefits, buttons, image, items, version = 'primary', isDotted = true, label, }) => {
|
|
784
|
+
return (jsxs("div", { className: `w-full ${className}`, children: [jsxs("div", { children: [label ? renderLabel(label, version) : null, 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 text-m-md", items: items, version: version, isDotted: isDotted })) : null] })] }), renderImage$1(image)] }));
|
|
784
785
|
});
|
|
785
786
|
function renderImage$1(image) {
|
|
786
|
-
return image?.src ? (jsx(
|
|
787
|
+
return image?.src ? (jsx(Img, { imageClassName: "mt-5 mx-auto block", image: { className: 'block', ...image } })) : null;
|
|
787
788
|
}
|
|
789
|
+
const labelStyleMap = {
|
|
790
|
+
primary: 'text-primary-main border-secondary-hover',
|
|
791
|
+
secondary: 'text-white/80',
|
|
792
|
+
};
|
|
793
|
+
const renderLabel = (label, version) => (jsx("div", { className: `m-xs px-2.5 py-1.5 mb-5 rounded-md border-2 w-fit ${labelStyleMap[version]}`, children: label }));
|
|
788
794
|
|
|
789
|
-
const
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
795
|
+
const productBlockStyleMap = {
|
|
796
|
+
primary: 'bg-white text-primary-text',
|
|
797
|
+
secondary: 'bg-primary-main text-white',
|
|
798
|
+
};
|
|
799
|
+
const ProductBlock = JSX((props /* Get rid of image and benefits */) => {
|
|
800
|
+
const { className = '', version = 'primary' } = props;
|
|
801
|
+
return (jsx("section", { className: `font-sans bg-white px-4 py-6 ${productBlockStyleMap[version]} ${className}`, children: jsx(ProductBlockInner, { ...props }) }));
|
|
794
802
|
});
|
|
795
803
|
|
|
796
804
|
const textBlockStyleMaps = {
|
|
@@ -815,7 +823,7 @@
|
|
|
815
823
|
};
|
|
816
824
|
const TextBlock = JSX(({ title, description, blockVersion = 'primary', iconVersion, image, className = '', items, isDotted = true, }) => {
|
|
817
825
|
const textBlockStyleMap = textBlockStyleMaps[blockVersion];
|
|
818
|
-
return (jsxs("section", { className: `font-sans px-4 py-[18px] flex flex-col ${textBlockStyleMap.background} ${className}`, children: [iconVersion === 'small' ? renderIcon(textBlockStyleMap.icon) : null, iconVersion === 'big' ? renderImage(image) : null, jsxs("div", { className: "py-0.5", children: [title ? (jsx("div", { className: `font-medium text-base mb-1 ${textBlockStyleMap.title}`, children: title })) : null, description ? (jsx("div", { className: `text-sm ${textBlockStyleMap.description}`, children: description })) : null, items?.length ? (jsx(List, { className: "mt-1", items: items, isDotted: isDotted, version: blockVersion
|
|
826
|
+
return (jsxs("section", { className: `font-sans px-4 py-[18px] flex flex-col ${textBlockStyleMap.background} ${className}`, children: [iconVersion === 'small' ? renderIcon(textBlockStyleMap.icon) : null, iconVersion === 'big' ? renderImage(image) : null, jsxs("div", { className: "py-0.5", children: [title ? (jsx("div", { className: `font-medium text-base mb-1 ${textBlockStyleMap.title}`, children: title })) : null, description ? (jsx("div", { className: `text-sm ${textBlockStyleMap.description}`, children: description })) : null, items?.length ? (jsx(List, { className: "mt-1 text-m-md", items: items, isDotted: isDotted, version: blockVersion === 'secondary' ? 'secondary' : 'gray' })) : null] })] }));
|
|
819
827
|
});
|
|
820
828
|
function renderIcon(className) {
|
|
821
829
|
return (jsx("div", { className: "mb-3", children: jsx("div", { className: `rounded-full h-4 w-4 text-center text-xs ${className}`, children: "i" }) }));
|
|
@@ -876,10 +884,10 @@
|
|
|
876
884
|
const Tile = JSX((props) => {
|
|
877
885
|
const { context, title, description, items, children, buttons, image, className = '', version = 'primary', role, } = props;
|
|
878
886
|
return (jsx("section", { className: `overflow-hidden font-sans p-9 box-border ${className} ${tileStyleMap[version]} ${getTileRightPadding(className)} ${getTileMinHeight(className)} `, role: role, children: jsxs(BaseTile, { context: context, title: title && (jsx(Heading, { headingType: getTileHeadingType(className), title: title, className: `whitespace-pre-wrap max-w-[600px] ${title ? 'mb-3' : ''}
|
|
879
|
-
${version === 'primary' ? 'text-primary-text' : ''}` })), buttons: buttons?.length ? (jsx(ButtonSection, { context: context, buttons: buttons, className: "flex mt-9 gap-3" })) : null, image: image?.src && jsx(Img, { className: "mt-auto ml-7", image: image }), children: [description && jsx(Description, { className: "mt-4 max-w-[600px]", description: description }), children, renderList(items, version)] }) }));
|
|
887
|
+
${version === 'primary' ? 'text-primary-text' : ''}` })), buttons: buttons?.length ? (jsx(ButtonSection, { context: context, buttons: buttons, className: "flex mt-9 gap-3" })) : null, image: image?.src && jsx(Img, { className: "mt-auto ml-7", image: image }), children: [description && jsx(Description, { className: "mt-4 max-w-[600px]", description: description }), children, renderList$1(items, version)] }) }));
|
|
880
888
|
});
|
|
881
|
-
function renderList(items, version) {
|
|
882
|
-
return items?.length ? jsx(List, { items: items, version: version }) : null;
|
|
889
|
+
function renderList$1(items, version) {
|
|
890
|
+
return items?.length ? (jsx(List, { items: items, itemClassName: "mt-2.5 first:mt-0", version: version })) : null;
|
|
883
891
|
}
|
|
884
892
|
|
|
885
893
|
const productTileStyleMap = {
|
|
@@ -904,11 +912,11 @@
|
|
|
904
912
|
primary: 'bg-white',
|
|
905
913
|
secondary: 'bg-primary-main text-white',
|
|
906
914
|
};
|
|
907
|
-
const Gallery = JSX(({ context, title, description, cards = [], className,
|
|
908
|
-
return (jsxs("section", { className: `relative font-sans text-primary-text bg-white px-4 py-6 overflow-hidden ${className}`, children: [jsxs("div", { className: "flex flex-col items-center mb-5", children: [title ? (jsx(Heading, { headingType: "h3", className: `text-center ${description ? 'mb-2' : 'mb-5'}`, title: title })) : null, description ? (jsx("div", { className: "font-normal text-m-md max-w-[600px] text-center mb-5", children: description })) : null] }), renderCardsLayout(
|
|
915
|
+
const Gallery = JSX(({ context, title, description, cards = [], className, orientation = 'horizontal' }) => {
|
|
916
|
+
return (jsxs("section", { className: `relative font-sans text-primary-text bg-white px-4 py-6 overflow-hidden ${className}`, children: [jsxs("div", { className: "flex flex-col items-center mb-5", children: [title ? (jsx(Heading, { headingType: "h3", className: `text-center ${description ? 'mb-2' : 'mb-5'}`, title: title })) : null, description ? (jsx("div", { className: "font-normal text-m-md max-w-[600px] text-center mb-5", children: description })) : null] }), renderCardsLayout(orientation, cards, context)] }));
|
|
909
917
|
});
|
|
910
|
-
function renderCardsLayout(
|
|
911
|
-
return
|
|
918
|
+
function renderCardsLayout(orientation, cards, context) {
|
|
919
|
+
return orientation === 'horizontal' ? (jsx(SwipeListControl, { context: context, children: cards?.map(renderCard$1) })) : (jsx("div", { className: "grid gap-[14px]", children: cards?.map(renderCard$1) }));
|
|
912
920
|
}
|
|
913
921
|
function renderCard$1(card, key) {
|
|
914
922
|
return (jsxs("div", { className: `h-full justify-between box-border horizontal-list-item border-solid border rounded-md border-main-stroke p-4 flex flex-col
|
|
@@ -961,28 +969,9 @@
|
|
|
961
969
|
mini: 276,
|
|
962
970
|
};
|
|
963
971
|
|
|
964
|
-
const LIST_STYLE_CLASSES = 'rounded-full inline-block mr-3 mt-2';
|
|
965
|
-
const TEXT_STYLE_MAP = {
|
|
966
|
-
primary: 'text-secondary-text',
|
|
967
|
-
secondary: 'text-white',
|
|
968
|
-
gray: 'text-secondary-text',
|
|
969
|
-
};
|
|
970
|
-
const LIST_STYLE_MAP = {
|
|
971
|
-
primary: 'bg-primary-main',
|
|
972
|
-
secondary: 'bg-white',
|
|
973
|
-
gray: 'bg-secondary-text',
|
|
974
|
-
};
|
|
975
|
-
const BlockItem = JSX(({ className = '', isDotted = true, text, children, version = 'primary' }) => {
|
|
976
|
-
return (jsxs("div", { className: `font-sans flex items-start ${className}`, role: "listitem", children: [isDotted && jsx("div", { className: getListStyle(version) }), jsx("span", { className: TEXT_STYLE_MAP[version], children: text || children })] }));
|
|
977
|
-
});
|
|
978
|
-
const getListStyle = (version) => {
|
|
979
|
-
const size = version === 'gray' ? 'w-[6px] h-[6px] min-w-[6px] min-h-[6px]' : 'w-2 h-2 min-w-2 min-h-2';
|
|
980
|
-
return `${LIST_STYLE_CLASSES} ${LIST_STYLE_MAP[version]} ${size}`;
|
|
981
|
-
};
|
|
982
|
-
|
|
983
972
|
const GalleryCardInner = JSX(({ title, description, image, items, button, version }) => {
|
|
984
973
|
const titleStyleClasses = getTitleStyle(version, description, items);
|
|
985
|
-
return (jsxs("div", { children: [jsxs("div", { children: [image?.src ? (jsx("div", { className: "flex justify-center", children: jsx(Img, { className: "mb-6", image: image }) })) : null, title ? renderCardTitle(title, titleStyleClasses) : null, description ? (jsx("div", { className: `font-normal text-sm ${title ? 'mt-2' : ''}`, children: description })) : null, items?.length ? renderItems(items, version) : null] }), button?.text ? renderButton$1(button) : null] }));
|
|
974
|
+
return (jsxs("div", { className: "h-full flex flex-col justify-between", children: [jsxs("div", { children: [image?.src ? (jsx("div", { className: "flex justify-center", children: jsx(Img, { className: "mb-6", image: image }) })) : null, title ? renderCardTitle(title, titleStyleClasses) : null, description ? (jsx("div", { className: `font-normal text-sm ${title ? 'mt-2' : ''}`, children: description })) : null, items?.length ? renderItems(items, version) : null] }), button?.text ? renderButton$1(button) : null] }));
|
|
986
975
|
});
|
|
987
976
|
function renderButton$1(button) {
|
|
988
977
|
return (jsx(Button, { className: "mt-6 w-full", appendLeft: button.icon && jsx(Icon, { name: button.icon, width: "24px", height: "24px", asSVG: true }), ...button }));
|
|
@@ -990,13 +979,8 @@
|
|
|
990
979
|
function renderCardTitle(title, className) {
|
|
991
980
|
return jsx("div", { className: `font-medium text-xl m-0 ${className}`, children: title });
|
|
992
981
|
}
|
|
993
|
-
function renderItems(items, version) {
|
|
994
|
-
return (jsx(
|
|
995
|
-
.filter((item) => item?.text)
|
|
996
|
-
.map((item, i) => renderItem(item.text, i, version)) }));
|
|
997
|
-
}
|
|
998
|
-
function renderItem(item, i, version) {
|
|
999
|
-
return (jsx(BlockItem, { version: version ?? 'primary', children: jsx("span", { className: "text-sm", children: item }) }, String(i)));
|
|
982
|
+
function renderItems(items, version = 'primary') {
|
|
983
|
+
return (jsx(List, { className: `max-w-[308px] mt-2 text-sm ${version === 'primary' ? '!text-secondary-text' : ''}`, itemClassName: "mt-1 first:mt-0", items: items.filter((item) => item?.text).map((item) => item.text), version: version }));
|
|
1000
984
|
}
|
|
1001
985
|
function getTitleStyle(version, description, items) {
|
|
1002
986
|
return `font-medium text-xl m-0
|
|
@@ -1121,7 +1105,7 @@
|
|
|
1121
1105
|
const renderButton = ({ header, buttonVersion }) => (jsx(Button, { href: header.link.href, target: header.link.target, version: buttonVersion, className: "font-medium text-m-sm mt-4 py-[11px]", children: header.link.text }));
|
|
1122
1106
|
const renderToggleButton = ({ onToggleColumn, isFillGradient, showRow }) => (jsx("div", { className: "mt-5", role: "cell", children: jsx("a", { role: "link", onClick: onToggleColumn, className: `font-medium text-m-sm cursor-pointer ${isFillGradient ? 'text-white/80' : 'text-primary-main'}`, children: !showRow ? 'Показать описание' : 'Скрыть' }) }));
|
|
1123
1107
|
|
|
1124
|
-
const ComparisonTable = JSX(({ className, context, title, rowHeaders, columns, visibleRowLength = 0, isColoredFirstColumn = false,
|
|
1108
|
+
const ComparisonTable = JSX(({ className, context, title, rowHeaders, columns, visibleRowLength = 0, isColoredFirstColumn = false, orientation = 'horizontal', }) => {
|
|
1125
1109
|
const tableData = columns?.map(({ data, header }) => ({
|
|
1126
1110
|
header,
|
|
1127
1111
|
column: data?.map((cell, i) => ({ cell, rowHeader: rowHeaders?.[i]?.title })),
|
|
@@ -1138,23 +1122,35 @@
|
|
|
1138
1122
|
isColoredFirstColumn,
|
|
1139
1123
|
columnsViewState,
|
|
1140
1124
|
handleToggleColumn,
|
|
1141
|
-
|
|
1125
|
+
orientation,
|
|
1142
1126
|
setColumnsViewState,
|
|
1143
1127
|
})] }));
|
|
1144
1128
|
});
|
|
1145
|
-
const renderColumns = ({ context, tableData, visibleRowLength, isColoredFirstColumn, columnsViewState, handleToggleColumn,
|
|
1129
|
+
const renderColumns = ({ context, tableData, visibleRowLength, isColoredFirstColumn, columnsViewState, handleToggleColumn, orientation = 'horizontal', setColumnsViewState, }) => (jsx("div", { role: "table", children: tableData?.length
|
|
1130
|
+
? renderInnerTable({
|
|
1131
|
+
orientation,
|
|
1146
1132
|
context,
|
|
1133
|
+
columnsViewState,
|
|
1134
|
+
setColumnsViewState,
|
|
1135
|
+
tableData,
|
|
1147
1136
|
visibleRowLength,
|
|
1148
1137
|
isColoredFirstColumn,
|
|
1149
|
-
columnsViewState,
|
|
1150
1138
|
handleToggleColumn,
|
|
1151
|
-
})
|
|
1139
|
+
})
|
|
1140
|
+
: null }));
|
|
1141
|
+
const renderInnerTable = ({ orientation, context, columnsViewState, setColumnsViewState, tableData, visibleRowLength, isColoredFirstColumn, handleToggleColumn, }) => orientation === 'horizontal' ? (tableData.map(renderColumn({
|
|
1142
|
+
context,
|
|
1143
|
+
visibleRowLength,
|
|
1144
|
+
isColoredFirstColumn,
|
|
1145
|
+
columnsViewState,
|
|
1146
|
+
handleToggleColumn,
|
|
1147
|
+
}))) : (jsx(SwipeListControl, { context: context, onSlideChange: onSlideChange(columnsViewState, setColumnsViewState), children: tableData.map(renderColumn({
|
|
1152
1148
|
context,
|
|
1153
1149
|
visibleRowLength,
|
|
1154
1150
|
isColoredFirstColumn,
|
|
1155
1151
|
columnsViewState,
|
|
1156
1152
|
handleToggleColumn,
|
|
1157
|
-
}))
|
|
1153
|
+
})) }));
|
|
1158
1154
|
const renderColumn = ({ context, visibleRowLength, isColoredFirstColumn, columnsViewState, handleToggleColumn }) => (columnData, i) => (jsx(TableColumn, { context: context, visibleRowLength: visibleRowLength, showRow: columnsViewState[i], header: columnData.header, columnData: columnData.column, isFillGradient: i === 0 && isColoredFirstColumn, onToggleColumn: () => handleToggleColumn(i) }, String(i)));
|
|
1159
1155
|
const onSlideChange = (columnsViewState, setColumnsViewState) => () => {
|
|
1160
1156
|
setColumnsViewState(new Array(columnsViewState.length).fill(false));
|
|
@@ -1440,6 +1436,16 @@
|
|
|
1440
1436
|
});
|
|
1441
1437
|
const renderSubItem = (item, i) => (jsx(HeaderItem, { className: "mr-8 whitespace-nowrap text-sm", ...item }, String(i)));
|
|
1442
1438
|
|
|
1439
|
+
const GOLDEN_RATIO = 1.618;
|
|
1440
|
+
const Placeholder = JSX(({ className, context, title, description = 'Блок в разработке...' }) => {
|
|
1441
|
+
return (jsx("section", { className: `bg-white text-primary-text font-sans p-9 box-border ${className} ${getTileRightPadding(className)} ${getTileMinHeight(className)} `, children: jsxs(BaseTile, { context: context, title: title ? (jsx(Heading, { headingType: getTileHeadingType(className), title: title, className: `whitespace-pre-wrap max-w-[600px]` })) : null, children: [description ? (jsx(Description, { className: "mt-4 max-w-[600px]", description: description })) : null, jsx("figure", { className: "m-0 min-w-[600px]", children: renderShimmer() })] }) }));
|
|
1442
|
+
});
|
|
1443
|
+
const renderShimmer = (size = 3) => goldenSequence(100, size)
|
|
1444
|
+
.map((_) => Math.floor(_))
|
|
1445
|
+
.map(renderShimmerItem);
|
|
1446
|
+
const renderShimmerItem = (width = 100, index) => (jsx("div", { style: { width: `${width}%` }, className: "h-4 mt-2 bg-secondary-light" }, String(index)));
|
|
1447
|
+
const goldenSequence = (first, size) => [first].concat(size > 0 ? goldenSequence(first / GOLDEN_RATIO, size - 1) : []);
|
|
1448
|
+
|
|
1443
1449
|
const ProductGalleryBlock = JSX(({ block, headingType, context }) => {
|
|
1444
1450
|
return (jsx("section", { className: "flex grow-0 shrink-0 basis-full px-4 pt-6", children: jsx("div", { className: "flex grow", children: jsx(ProductBlockInner, { context: context, headingType: headingType || 'h2', ...block }) }) }));
|
|
1445
1451
|
});
|
|
@@ -1496,7 +1502,9 @@
|
|
|
1496
1502
|
const TariffsTableTileCell = JSX(({ header, data }) => {
|
|
1497
1503
|
return (jsxs("div", { className: "rounded-md border-main-stroke h-full box-border border p-4", children: [jsx(TableTileHeader, { ...header }), data?.length ? data.map(renderCellInner) : null] }));
|
|
1498
1504
|
});
|
|
1499
|
-
const renderCellInner = ({ label, description, list, image, buttons }, i) => (jsxs("div", { children: [i > 0 && (jsx("div", { className: "border-main-divider border border-solid border-t-0 border-x-0 my-2" })), label ? jsx("div", { className: "text-m-sm m-0", children: label }) : null, description ? (jsx("div", { className: "text-m-sm text-secondary-text mt-[3px]", children: description })) : null, list?.items?.length ? (
|
|
1505
|
+
const renderCellInner = ({ label, description, list, image, buttons }, i) => (jsxs("div", { children: [i > 0 && (jsx("div", { className: "border-main-divider border border-solid border-t-0 border-x-0 my-2" })), label ? jsx("div", { className: "text-m-sm m-0", children: label }) : null, description ? (jsx("div", { className: "text-m-sm text-secondary-text mt-[3px]", children: description })) : null, list?.items?.length ? renderList(list) : null, image && jsx(Img, { image: { ...image, className: 'm-0' } }), buttons?.length ? renderButtons(buttons) : null] }, String(i)));
|
|
1506
|
+
const renderList = (list) => (jsx(List, { className: "flex flex-col justify-between items-start text-m-sm", version: "gray", items: list.items, isDotted: list.isDotted ?? true }));
|
|
1507
|
+
const renderButtons = (buttons) => (jsx("div", { children: buttons.map(({ icon, rounded, ...buttonProps }, idx) => (jsx(Button, { className: `mt-3 ${idx > 0 && rounded ? 'ml-2.5' : ''} ${icon ? 'w-12 h-12' : ''}`, rounded: rounded, appendLeft: icon && jsx(Icon, { name: icon, width: "24px", height: "24px", asSVG: true }), ...buttonProps, "aria-label": icon }, String(idx)))) }));
|
|
1500
1508
|
|
|
1501
1509
|
const TariffsTableVertical = JSX(({ tiles }) => (jsx("div", { className: "flex flex-col gap-3.5", children: tiles.map((tile, i) => (jsx(TariffsTableTileCell, { ...tile }, String(i)))) })));
|
|
1502
1510
|
|
|
@@ -1532,6 +1540,7 @@
|
|
|
1532
1540
|
StepsBlock,
|
|
1533
1541
|
TariffsTable,
|
|
1534
1542
|
TextBlock,
|
|
1543
|
+
Placeholder,
|
|
1535
1544
|
};
|
|
1536
1545
|
|
|
1537
1546
|
const LikeButton = JSX(({ className, onClick, ariaLabel }) => (jsx("button", { type: "button", className: `border-0 w-[36px] bg-inherit cursor-pointer ${className || ''}`, onClick: onClick, "aria-label": ariaLabel, children: renderLikeIcon() })));
|
|
@@ -1550,16 +1559,6 @@
|
|
|
1550
1559
|
return (jsxs("div", { className: `border-main border-2 border-solid bg-white flex w-[125px] items-center justify-center gap-3 p-2 font-sans ${className || ''}`, children: [jsx(LikeButton, { onClick: likeService.like, ariaLabel: "\u041F\u043E\u0441\u0442\u0430\u0432\u0438\u0442\u044C \u043E\u0442\u043C\u0435\u0442\u043A\u0443 \u00AB\u043B\u0430\u0439\u043A\u00BB" }), jsx(LikeButton, { onClick: likeService.dislike, className: "rotate-180", ariaLabel: "\u041F\u043E\u0441\u0442\u0430\u0432\u0438\u0442\u044C \u043E\u0442\u043C\u0435\u0442\u043A\u0443 \u00AB\u0434\u0438\u0437\u043B\u0430\u0439\u043A\u00BB" }), jsx("span", { className: "select-none", children: likeService.likeCount })] }));
|
|
1551
1560
|
});
|
|
1552
1561
|
|
|
1553
|
-
const GOLDEN_RATIO = 1.618;
|
|
1554
|
-
const Placeholder = JSX(({ className, context, title, description = 'Блок в разработке...' }) => {
|
|
1555
|
-
return (jsx("section", { className: `bg-white text-primary-text font-sans p-9 box-border ${className} ${getTileRightPadding(className)} ${getTileMinHeight(className)} `, children: jsxs(BaseTile, { context: context, title: title ? (jsx(Heading, { headingType: getTileHeadingType(className), title: title, className: `whitespace-pre-wrap max-w-[600px]` })) : null, children: [description ? (jsx(Description, { className: "mt-4 max-w-[600px]", description: description })) : null, jsx("figure", { className: "m-0 min-w-[600px]", children: renderShimmer() })] }) }));
|
|
1556
|
-
});
|
|
1557
|
-
const renderShimmer = (size = 3) => goldenSequence(100, size)
|
|
1558
|
-
.map((_) => Math.floor(_))
|
|
1559
|
-
.map(renderShimmerItem);
|
|
1560
|
-
const renderShimmerItem = (width = 100, index) => (jsx("div", { style: { width: `${width}%` }, className: "h-4 mt-2 bg-secondary-light" }, String(index)));
|
|
1561
|
-
const goldenSequence = (first, size) => [first].concat(size > 0 ? goldenSequence(first / GOLDEN_RATIO, size - 1) : []);
|
|
1562
|
-
|
|
1563
1562
|
const defaultBlockDecorator = ({ blockClassName, block, render }) => render({ blockClassName, block });
|
|
1564
1563
|
const ContentPage = JSX(({ className, context, blocksRegistry, data: { style: pageStyle, blocks, slots = {}, likeControl, colorPalette = 'pc' }, blockDecorator = defaultBlockDecorator, }) => {
|
|
1565
1564
|
const { header } = slots;
|