@redneckz/wildless-cms-uni-blocks 0.5.15 → 0.6.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/migration-scripts/0.5.14.js +27 -0
- package/bin/migration-scripts/0.6.16.js +90 -0
- package/bin/utils.js +2 -0
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +57 -44
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/Blocks.d.ts +1 -0
- package/bundle/components/ContactsBlock/ContactsBlock.d.ts +5 -0
- package/bundle/components/ContactsBlock/ContactsBlockContent.d.ts +36 -0
- package/bundle/components/ContentPage/renderContentPageHead.d.ts +3 -0
- package/bundle/components/Gallery/GalleryContent.d.ts +3 -1
- package/bundle/components/Headline/constants.d.ts +0 -2
- package/bundle/components/MobileAppTile/MobileAppTileContent.d.ts +6 -0
- package/bundle/model/AlignText.d.ts +2 -0
- package/bundle/model/HeadlineType.d.ts +2 -2
- package/dist/components/Accordion/Accordion.js +2 -6
- package/dist/components/Accordion/Accordion.js.map +1 -1
- package/dist/components/Blocks.d.ts +1 -0
- package/dist/components/Blocks.js +2 -0
- package/dist/components/Blocks.js.map +1 -1
- package/dist/components/ContactsBlock/ContactsBlock.d.ts +5 -0
- package/dist/components/ContactsBlock/ContactsBlock.js +19 -0
- package/dist/components/ContactsBlock/ContactsBlock.js.map +1 -0
- package/dist/components/ContactsBlock/ContactsBlockContent.d.ts +36 -0
- package/dist/components/ContactsBlock/ContactsBlockContent.js +2 -0
- package/dist/components/ContactsBlock/ContactsBlockContent.js.map +1 -0
- package/dist/components/ContentPage/renderContentPageHead.d.ts +3 -0
- package/dist/components/ContentPage/renderContentPageHead.js +30 -0
- package/dist/components/ContentPage/renderContentPageHead.js.map +1 -0
- package/dist/components/Gallery/Gallery.mobile.js +2 -1
- package/dist/components/Gallery/Gallery.mobile.js.map +1 -1
- package/dist/components/Gallery/GalleryCardInner.js +6 -11
- package/dist/components/Gallery/GalleryCardInner.js.map +1 -1
- package/dist/components/Gallery/GalleryContainer.js +2 -2
- package/dist/components/Gallery/GalleryContainer.js.map +1 -1
- package/dist/components/Gallery/GalleryContent.d.ts +3 -1
- package/dist/components/Gallery/GalleryInner.js +4 -3
- package/dist/components/Gallery/GalleryInner.js.map +1 -1
- package/dist/components/Headline/Headline.js +2 -1
- package/dist/components/Headline/Headline.js.map +1 -1
- package/dist/components/Headline/Headline.mobile.js +2 -1
- package/dist/components/Headline/Headline.mobile.js.map +1 -1
- package/dist/components/Headline/constants.d.ts +0 -2
- package/dist/components/Headline/constants.js +2 -6
- package/dist/components/Headline/constants.js.map +1 -1
- package/dist/components/MobileAppTile/MobileAppTile.js +5 -3
- package/dist/components/MobileAppTile/MobileAppTile.js.map +1 -1
- package/dist/components/MobileAppTile/MobileAppTileContent.d.ts +6 -0
- package/dist/components/StepsBlock/StepsBlock.js +1 -1
- package/dist/components/StepsBlock/StepsBlock.js.map +1 -1
- package/dist/components/Tile/Tile.js +1 -1
- package/dist/components/Tile/Tile.js.map +1 -1
- package/dist/model/AlignText.d.ts +2 -0
- package/dist/model/AlignText.js +8 -0
- package/dist/model/AlignText.js.map +1 -0
- package/dist/model/HeadlineType.d.ts +2 -2
- package/dist/ui-kit/Foldable/DefaultFoldButton.js +13 -4
- package/dist/ui-kit/Foldable/DefaultFoldButton.js.map +1 -1
- package/dist/ui-kit/List/ListItem.js +4 -4
- package/dist/ui-kit/List/ListItem.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/Accordion/Accordion.js +2 -6
- package/lib/components/Accordion/Accordion.js.map +1 -1
- package/lib/components/Blocks.d.ts +1 -0
- package/lib/components/Blocks.js +2 -0
- package/lib/components/Blocks.js.map +1 -1
- package/lib/components/ContactsBlock/ContactsBlock.d.ts +5 -0
- package/lib/components/ContactsBlock/ContactsBlock.fixture.d.ts +5 -0
- package/lib/components/ContactsBlock/ContactsBlock.js +17 -0
- package/lib/components/ContactsBlock/ContactsBlock.js.map +1 -0
- package/lib/components/ContactsBlock/ContactsBlockContent.d.ts +36 -0
- package/lib/components/ContactsBlock/ContactsBlockContent.js +2 -0
- package/lib/components/ContactsBlock/ContactsBlockContent.js.map +1 -0
- package/lib/components/ContentPage/renderContentPageHead.d.ts +3 -0
- package/lib/components/ContentPage/renderContentPageHead.js +27 -0
- package/lib/components/ContentPage/renderContentPageHead.js.map +1 -0
- package/lib/components/Gallery/Gallery.mobile.js +2 -1
- package/lib/components/Gallery/Gallery.mobile.js.map +1 -1
- package/lib/components/Gallery/GalleryCardInner.js +6 -11
- package/lib/components/Gallery/GalleryCardInner.js.map +1 -1
- package/lib/components/Gallery/GalleryContainer.js +2 -2
- package/lib/components/Gallery/GalleryContainer.js.map +1 -1
- package/lib/components/Gallery/GalleryContent.d.ts +3 -1
- package/lib/components/Gallery/GalleryInner.js +4 -3
- package/lib/components/Gallery/GalleryInner.js.map +1 -1
- package/lib/components/Headline/Headline.js +3 -2
- package/lib/components/Headline/Headline.js.map +1 -1
- package/lib/components/Headline/Headline.mobile.js +3 -2
- package/lib/components/Headline/Headline.mobile.js.map +1 -1
- package/lib/components/Headline/constants.d.ts +0 -2
- package/lib/components/Headline/constants.js +1 -5
- package/lib/components/Headline/constants.js.map +1 -1
- package/lib/components/MiniGallery/MiniGallery.fixture.d.ts +2 -1
- package/lib/components/MobileAppTile/MobileAppTile.js +5 -3
- package/lib/components/MobileAppTile/MobileAppTile.js.map +1 -1
- package/lib/components/MobileAppTile/MobileAppTileContent.d.ts +6 -0
- package/lib/components/StepsBlock/StepsBlock.js +1 -1
- package/lib/components/StepsBlock/StepsBlock.js.map +1 -1
- package/lib/components/Tile/Tile.js +1 -1
- package/lib/components/Tile/Tile.js.map +1 -1
- package/lib/model/AlignText.d.ts +2 -0
- package/lib/model/AlignText.js +6 -0
- package/lib/model/AlignText.js.map +1 -0
- package/lib/model/HeadlineType.d.ts +2 -2
- package/lib/ui-kit/Foldable/DefaultFoldButton.js +13 -4
- package/lib/ui-kit/Foldable/DefaultFoldButton.js.map +1 -1
- package/lib/ui-kit/List/ListItem.js +4 -4
- package/lib/ui-kit/List/ListItem.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +10 -8
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/ContactsBlock/ContactsBlock.d.ts +5 -0
- package/mobile/bundle/components/ContactsBlock/ContactsBlockContent.d.ts +36 -0
- package/mobile/bundle/components/ContentPage/renderContentPageHead.d.ts +3 -0
- package/mobile/bundle/components/Gallery/GalleryContent.d.ts +3 -1
- package/mobile/bundle/components/Headline/constants.d.ts +0 -2
- package/mobile/bundle/components/MobileAppTile/MobileAppTileContent.d.ts +6 -0
- package/mobile/bundle/model/AlignText.d.ts +2 -0
- package/mobile/bundle/model/HeadlineType.d.ts +2 -2
- package/mobile/dist/components/ContactsBlock/ContactsBlock.d.ts +5 -0
- package/mobile/dist/components/ContactsBlock/ContactsBlock.js +19 -0
- package/mobile/dist/components/ContactsBlock/ContactsBlock.js.map +1 -0
- package/mobile/dist/components/ContactsBlock/ContactsBlockContent.d.ts +36 -0
- package/mobile/dist/components/ContactsBlock/ContactsBlockContent.js +2 -0
- package/mobile/dist/components/ContactsBlock/ContactsBlockContent.js.map +1 -0
- package/mobile/dist/components/ContentPage/renderContentPageHead.d.ts +3 -0
- package/mobile/dist/components/ContentPage/renderContentPageHead.js +30 -0
- package/mobile/dist/components/ContentPage/renderContentPageHead.js.map +1 -0
- package/mobile/dist/components/Gallery/Gallery.js +2 -1
- package/mobile/dist/components/Gallery/Gallery.js.map +1 -1
- package/mobile/dist/components/Gallery/GalleryCardInner.js +6 -11
- package/mobile/dist/components/Gallery/GalleryCardInner.js.map +1 -1
- package/mobile/dist/components/Gallery/GalleryContainer.js +2 -2
- package/mobile/dist/components/Gallery/GalleryContainer.js.map +1 -1
- package/mobile/dist/components/Gallery/GalleryContent.d.ts +3 -1
- package/mobile/dist/components/Gallery/GalleryInner.js +4 -3
- package/mobile/dist/components/Gallery/GalleryInner.js.map +1 -1
- package/mobile/dist/components/Headline/Headline.js +2 -1
- package/mobile/dist/components/Headline/Headline.js.map +1 -1
- package/mobile/dist/components/Headline/constants.d.ts +0 -2
- package/mobile/dist/components/Headline/constants.js +2 -6
- package/mobile/dist/components/Headline/constants.js.map +1 -1
- package/mobile/dist/components/MobileAppTile/MobileAppTileContent.d.ts +6 -0
- package/mobile/dist/components/Tile/Tile.js +1 -1
- package/mobile/dist/components/Tile/Tile.js.map +1 -1
- package/mobile/dist/model/AlignText.d.ts +2 -0
- package/mobile/dist/model/AlignText.js +8 -0
- package/mobile/dist/model/AlignText.js.map +1 -0
- package/mobile/dist/model/HeadlineType.d.ts +2 -2
- package/mobile/dist/ui-kit/Foldable/DefaultFoldButton.js +13 -4
- package/mobile/dist/ui-kit/Foldable/DefaultFoldButton.js.map +1 -1
- package/mobile/dist/ui-kit/List/ListItem.js +4 -4
- package/mobile/dist/ui-kit/List/ListItem.js.map +1 -1
- package/mobile/lib/components/ContactsBlock/ContactsBlock.d.ts +5 -0
- package/mobile/lib/components/ContactsBlock/ContactsBlock.js +17 -0
- package/mobile/lib/components/ContactsBlock/ContactsBlock.js.map +1 -0
- package/mobile/lib/components/ContactsBlock/ContactsBlockContent.d.ts +36 -0
- package/mobile/lib/components/ContactsBlock/ContactsBlockContent.js +2 -0
- package/mobile/lib/components/ContactsBlock/ContactsBlockContent.js.map +1 -0
- package/mobile/lib/components/ContentPage/renderContentPageHead.d.ts +3 -0
- package/mobile/lib/components/ContentPage/renderContentPageHead.js +27 -0
- package/mobile/lib/components/ContentPage/renderContentPageHead.js.map +1 -0
- package/mobile/lib/components/Gallery/Gallery.js +2 -1
- package/mobile/lib/components/Gallery/Gallery.js.map +1 -1
- package/mobile/lib/components/Gallery/GalleryCardInner.js +6 -11
- package/mobile/lib/components/Gallery/GalleryCardInner.js.map +1 -1
- package/mobile/lib/components/Gallery/GalleryContainer.js +2 -2
- package/mobile/lib/components/Gallery/GalleryContainer.js.map +1 -1
- package/mobile/lib/components/Gallery/GalleryContent.d.ts +3 -1
- package/mobile/lib/components/Gallery/GalleryInner.js +4 -3
- package/mobile/lib/components/Gallery/GalleryInner.js.map +1 -1
- package/mobile/lib/components/Headline/Headline.js +3 -2
- package/mobile/lib/components/Headline/Headline.js.map +1 -1
- package/mobile/lib/components/Headline/constants.d.ts +0 -2
- package/mobile/lib/components/Headline/constants.js +1 -5
- package/mobile/lib/components/Headline/constants.js.map +1 -1
- package/mobile/lib/components/MobileAppTile/MobileAppTileContent.d.ts +6 -0
- package/mobile/lib/components/Tile/Tile.js +1 -1
- package/mobile/lib/components/Tile/Tile.js.map +1 -1
- package/mobile/lib/model/AlignText.d.ts +2 -0
- package/mobile/lib/model/AlignText.js +6 -0
- package/mobile/lib/model/AlignText.js.map +1 -0
- package/mobile/lib/model/HeadlineType.d.ts +2 -2
- package/mobile/lib/ui-kit/Foldable/DefaultFoldButton.js +13 -4
- package/mobile/lib/ui-kit/Foldable/DefaultFoldButton.js.map +1 -1
- package/mobile/lib/ui-kit/List/ListItem.js +4 -4
- package/mobile/lib/ui-kit/List/ListItem.js.map +1 -1
- package/mobile/src/components/ContactsBlock/ContactsBlock.example.json +51 -0
- package/mobile/src/components/ContactsBlock/ContactsBlock.tsx +70 -0
- package/mobile/src/components/ContactsBlock/ContactsBlock.ui.json +8 -0
- package/mobile/src/components/ContactsBlock/ContactsBlockContent.ts +39 -0
- package/mobile/src/components/ContentPage/renderContentPageHead.tsx +38 -0
- package/mobile/src/components/Gallery/Gallery.example.json +2 -2
- package/mobile/src/components/Gallery/Gallery.tsx +9 -5
- package/mobile/src/components/Gallery/Gallery.ui.json +11 -1
- package/mobile/src/components/Gallery/GalleryCardInner.tsx +17 -26
- package/mobile/src/components/Gallery/GalleryContainer.tsx +1 -2
- package/mobile/src/components/Gallery/GalleryContent.ts +3 -1
- package/mobile/src/components/Gallery/GalleryInner.tsx +11 -4
- package/mobile/src/components/Headline/Headline.tsx +4 -3
- package/mobile/src/components/Headline/constants.ts +1 -7
- package/mobile/src/components/MobileAppTile/MobileAppTileContent.ts +6 -0
- package/mobile/src/components/Tile/Tile.tsx +1 -1
- package/mobile/src/model/AlignText.ts +7 -0
- package/mobile/src/model/HeadlineType.ts +2 -2
- package/mobile/src/ui-kit/Foldable/DefaultFoldButton.tsx +32 -23
- package/mobile/src/ui-kit/List/ListItem.tsx +10 -7
- package/package.json +1 -1
- package/src/components/Accordion/Accordion.tsx +2 -8
- package/src/components/Blocks.ts +2 -0
- package/src/components/ContactsBlock/ContactsBlock.example.json +51 -0
- package/src/components/ContactsBlock/ContactsBlock.fixture.tsx +57 -0
- package/src/components/ContactsBlock/ContactsBlock.tsx +70 -0
- package/src/components/ContactsBlock/ContactsBlock.ui.json +8 -0
- package/src/components/ContactsBlock/ContactsBlockContent.ts +39 -0
- package/src/components/ContentPage/renderContentPageHead.tsx +38 -0
- package/src/components/Gallery/Gallery.example.json +2 -2
- package/src/components/Gallery/Gallery.fixture.mobile.tsx +3 -3
- package/src/components/Gallery/Gallery.fixture.tsx +20 -24
- package/src/components/Gallery/Gallery.mobile.tsx +9 -5
- package/src/components/Gallery/Gallery.ui.json +11 -1
- package/src/components/Gallery/GalleryCardInner.tsx +17 -26
- package/src/components/Gallery/GalleryContainer.tsx +1 -2
- package/src/components/Gallery/GalleryContent.ts +3 -1
- package/src/components/Gallery/GalleryInner.tsx +11 -4
- package/src/components/Headline/Headline.mobile.tsx +4 -3
- package/src/components/Headline/Headline.tsx +4 -3
- package/src/components/Headline/constants.ts +1 -7
- package/src/components/MiniGallery/MiniGallery.fixture.tsx +72 -44
- package/src/components/MobileAppTile/MobileAppTile.fixture.tsx +1 -0
- package/src/components/MobileAppTile/MobileAppTile.tsx +8 -1
- package/src/components/MobileAppTile/MobileAppTileContent.ts +6 -0
- package/src/components/StepsBlock/StepsBlock.tsx +1 -1
- package/src/components/Tile/Tile.tsx +1 -1
- package/src/model/AlignText.ts +7 -0
- package/src/model/HeadlineType.ts +2 -2
- package/src/ui-kit/Foldable/DefaultFoldButton.tsx +32 -23
- package/src/ui-kit/List/ListItem.tsx +10 -7
- package/bundle/components/ContentPage/ContentPageHead.d.ts +0 -7
- package/dist/components/ContentPage/ContentPageHead.d.ts +0 -7
- package/dist/components/ContentPage/ContentPageHead.js +0 -20
- package/dist/components/ContentPage/ContentPageHead.js.map +0 -1
- package/lib/components/ContentPage/ContentPageHead.d.ts +0 -7
- package/lib/components/ContentPage/ContentPageHead.js +0 -18
- package/lib/components/ContentPage/ContentPageHead.js.map +0 -1
- package/mobile/bundle/components/ContentPage/ContentPageHead.d.ts +0 -7
- package/mobile/dist/components/ContentPage/ContentPageHead.d.ts +0 -7
- package/mobile/dist/components/ContentPage/ContentPageHead.js +0 -20
- package/mobile/dist/components/ContentPage/ContentPageHead.js.map +0 -1
- package/mobile/lib/components/ContentPage/ContentPageHead.d.ts +0 -7
- package/mobile/lib/components/ContentPage/ContentPageHead.js +0 -18
- package/mobile/lib/components/ContentPage/ContentPageHead.js.map +0 -1
- package/mobile/src/components/ContentPage/ContentPageHead.tsx +0 -43
- package/src/components/ContentPage/ContentPageHead.tsx +0 -43
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
|
|
2
2
|
import { JSX } from '@redneckz/uni-jsx';
|
|
3
|
+
import { AlignText } from '../../model/AlignText.js';
|
|
3
4
|
import { Heading } from '../../ui-kit/Heading/Heading.js';
|
|
4
5
|
import { Img } from '../../ui-kit/Img/Img.js';
|
|
5
|
-
import {
|
|
6
|
+
import { HEADLINE_BLOCK_STYLE_MAPS } from './constants.js';
|
|
6
7
|
export const Headline = JSX(({ bgColorHeadline = 'transparent', className = '', title, description, image, align = 'left', }) => {
|
|
7
8
|
const STYLE_MAPS = HEADLINE_BLOCK_STYLE_MAPS[bgColorHeadline];
|
|
8
|
-
return (_jsxs("section", { className: `px-4 py-6 flex flex-col gap-2.5 ${STYLE_MAPS.background} ${className}`, children: [title ? (_jsx(Heading, { headingType: "h2", className: `${STYLE_MAPS.text} ${
|
|
9
|
+
return (_jsxs("section", { className: `px-4 py-6 flex flex-col gap-2.5 ${STYLE_MAPS.background} ${className}`, children: [title ? (_jsx(Heading, { headingType: "h2", className: `${STYLE_MAPS.text} ${AlignText[align]}`, title: title })) : null, description ? (_jsx("p", { className: `text-m ${STYLE_MAPS.description} ${AlignText[align]}`, children: description })) : null, image?.src && (_jsx("div", { className: "mt-2.5 mx-auto flex justify-center", children: _jsx(Img, { image: image }) }))] }));
|
|
9
10
|
});
|
|
10
11
|
//# sourceMappingURL=Headline.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Headline.js","sourceRoot":"","sources":["../../../src/components/Headline/Headline.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"Headline.js","sourceRoot":"","sources":["../../../src/components/Headline/Headline.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAGlD,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AACvD,OAAO,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAC;AAC3C,OAAO,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAC;AAKxD,MAAM,CAAC,MAAM,QAAQ,GAAG,GAAG,CACzB,CAAC,EACC,eAAe,GAAG,aAAa,EAC/B,SAAS,GAAG,EAAE,EACd,KAAK,EACL,WAAW,EACX,KAAK,EACL,KAAK,GAAG,MAAM,GACf,EAAE,EAAE;IACH,MAAM,UAAU,GAAG,yBAAyB,CAAC,eAAe,CAAC,CAAC;IAE9D,OAAO,CACL,mBAAS,SAAS,EAAE,mCAAmC,UAAU,CAAC,UAAU,IAAI,SAAS,EAAE,aACxF,KAAK,CAAC,CAAC,CAAC,CACP,KAAC,OAAO,IACN,WAAW,EAAC,IAAI,EAChB,SAAS,EAAE,GAAG,UAAU,CAAC,IAAI,IAAI,SAAS,CAAC,KAAK,CAAC,EAAE,EACnD,KAAK,EAAE,KAAK,GACZ,CACH,CAAC,CAAC,CAAC,IAAI,EACP,WAAW,CAAC,CAAC,CAAC,CACb,YAAG,SAAS,EAAE,UAAU,UAAU,CAAC,WAAW,IAAI,SAAS,CAAC,KAAK,CAAC,EAAE,YAAG,WAAW,GAAK,CACxF,CAAC,CAAC,CAAC,IAAI,EACP,KAAK,EAAE,GAAG,IAAI,CACb,cAAK,SAAS,EAAC,oCAAoC,YACjD,KAAC,GAAG,IAAC,KAAK,EAAE,KAAK,GAAI,GACjB,CACP,IACO,CACX,CAAC;AACJ,CAAC,CACF,CAAC"}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import type { AlignType } from '../../model/AlignType';
|
|
2
1
|
import type { BlockVersionWithTransparent } from '../../model/BlockVersion';
|
|
3
2
|
import type { HeadlineSmallVersion, HeadlineVersion } from '../../model/HeadlineType';
|
|
4
3
|
import type { HeadingTagType, HeadingType } from '../../ui-kit/Heading/HeadingProps';
|
|
5
|
-
export declare const ALIGN_TEXT: Record<AlignType, string>;
|
|
6
4
|
declare type StyleType = {
|
|
7
5
|
background: string;
|
|
8
6
|
text: string;
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
export const ALIGN_TEXT = {
|
|
2
|
-
left: 'text-left',
|
|
3
|
-
center: 'text-center',
|
|
4
|
-
right: 'text-right',
|
|
5
|
-
};
|
|
6
1
|
export const HEADLINE_BLOCK_STYLE_MAPS = {
|
|
7
2
|
transparent: {
|
|
8
3
|
background: 'bg-transparent',
|
|
@@ -53,6 +48,7 @@ export const HEADLINE_VERSION = {
|
|
|
53
48
|
},
|
|
54
49
|
};
|
|
55
50
|
export const HEADLINE_SMALL_VERSION = {
|
|
51
|
+
H6: 'text-h6',
|
|
56
52
|
XL_L: 'text-xl-light',
|
|
57
53
|
XL_R: 'text-xl',
|
|
58
54
|
L_L: 'text-l-light',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/components/Headline/constants.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/components/Headline/constants.ts"],"names":[],"mappings":"AAiBA,MAAM,CAAC,MAAM,yBAAyB,GAAmD;IACvF,WAAW,EAAE;QACX,UAAU,EAAE,gBAAgB;QAC5B,IAAI,EAAE,mBAAmB;QACzB,WAAW,EAAE,mBAAmB;KACjC;IACD,OAAO,EAAE;QACP,UAAU,EAAE,UAAU;QACtB,IAAI,EAAE,mBAAmB;QACzB,WAAW,EAAE,mBAAmB;KACjC;IACD,SAAS,EAAE;QACT,UAAU,EAAE,iBAAiB;QAC7B,IAAI,EAAE,YAAY;QAClB,WAAW,EAAE,eAAe;KAC7B;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAA8C;IACzE,GAAG,EAAE;QACH,eAAe,EAAE,SAAS;QAC1B,GAAG,EAAE,YAAY;QACjB,WAAW,EAAE,IAAI;QACjB,EAAE,EAAE,IAAI;KACT;IACD,EAAE,EAAE;QACF,eAAe,EAAE,eAAe;QAChC,GAAG,EAAE,OAAO;QACZ,WAAW,EAAE,IAAI;QACjB,EAAE,EAAE,IAAI;KACT;IACD,CAAC,EAAE;QACD,eAAe,EAAE,eAAe;QAChC,GAAG,EAAE,OAAO;QACZ,WAAW,EAAE,IAAI;QACjB,EAAE,EAAE,IAAI;KACT;IACD,CAAC,EAAE;QACD,eAAe,EAAE,eAAe;QAChC,GAAG,EAAE,OAAO;QACZ,WAAW,EAAE,IAAI;QACjB,EAAE,EAAE,IAAI;KACT;IACD,CAAC,EAAE;QACD,eAAe,EAAE,eAAe;QAChC,GAAG,EAAE,OAAO;QACZ,WAAW,EAAE,IAAI;QACjB,EAAE,EAAE,IAAI;KACT;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,sBAAsB,GAAyC;IAC1E,EAAE,EAAE,SAAS;IACb,IAAI,EAAE,eAAe;IACrB,IAAI,EAAE,SAAS;IACf,GAAG,EAAE,cAAc;IACnB,GAAG,EAAE,QAAQ;IACb,CAAC,EAAE,cAAc;IACjB,CAAC,EAAE,cAAc;IACjB,EAAE,EAAE,eAAe;CACpB,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { AlignType } from '../../model/AlignType';
|
|
1
2
|
import type { BlockVersion } from '../../model/BlockVersion';
|
|
2
3
|
import type { HeadlineCommonProps } from '../../model/HeadlineType';
|
|
3
4
|
import type { Picture } from '../../model/Picture';
|
|
@@ -8,6 +9,11 @@ import type { ListContent } from '../../ui-kit/List/ListContent';
|
|
|
8
9
|
* @title Мобильное приложение
|
|
9
10
|
*/
|
|
10
11
|
export declare type MobileAppTileContent = HeadlineCommonProps & HeadingCommonProps & ButtonContent & ListContent & {
|
|
12
|
+
/**
|
|
13
|
+
* @title Выравнивание заголовка
|
|
14
|
+
* @default left
|
|
15
|
+
*/
|
|
16
|
+
alignTitle?: AlignType;
|
|
11
17
|
/** @title QR-код */
|
|
12
18
|
qr?: Picture;
|
|
13
19
|
/** @title Ссылка */
|
|
@@ -13,7 +13,7 @@ import { getTileRightPadding } from '../BaseTile/getTileRightPadding.js';
|
|
|
13
13
|
export const Tile = JSX((props) => {
|
|
14
14
|
const { context, title, headingType = 'h3', description, items, children, buttons, image, isDotted = true, listItemSize = 'M', className = '', version = 'primary', ...rest } = props;
|
|
15
15
|
const headingClassName = version === 'primary' ? 'text-primary-text' : '';
|
|
16
|
-
return (_jsx(BlockWrapper, { context: context, className: `overflow-hidden font-sans p-9 pr-3 box-border ${className} ${VersionStyleMap[version]} ${getTileRightPadding(className)} ${getTileMinHeight(className)} `, ...rest, children: _jsxs(BaseTile, { context: context, title: title ? (_jsx(Heading, { headingType: headingType, as: "h2", title: title, className: `whitespace-pre-wrap max-w-[600px] ${headingClassName}` })) : null, buttons: buttons?.length ? (_jsx(ButtonSection, { context: context, buttons: buttons.map((button) => ({ ...button, className: 'w-[158px]' })), className: "flex mt-8 gap-3" })) : null, image: image?.src ? _jsx(Img, { className: "mt-auto ml-7", image: image }) : null, children: [description ? (_jsx(Description, { className: "max-w-[600px] text-xl-light mt-2.5", description: description })) : null, children, renderList({ version, isDotted, listItemSize }, items)] }) }));
|
|
16
|
+
return (_jsx(BlockWrapper, { context: context, className: `overflow-hidden font-sans p-9 pr-3 box-border ${className} ${VersionStyleMap[version]} ${getTileRightPadding(className)} ${getTileMinHeight(className)} `, ...rest, children: _jsxs(BaseTile, { context: context, title: title ? (_jsx(Heading, { headingType: headingType, as: "h2", title: title, className: `whitespace-pre-wrap max-w-[600px] ${headingClassName}` })) : null, buttons: buttons?.length ? (_jsx(ButtonSection, { context: context, buttons: buttons.map((button) => ({ ...button, className: 'min-w-[158px]' })), className: "flex mt-8 gap-3" })) : null, image: image?.src ? _jsx(Img, { className: "mt-auto ml-7", image: image }) : null, children: [description ? (_jsx(Description, { className: "max-w-[600px] text-xl-light mt-2.5", description: description })) : null, children, renderList({ version, isDotted, listItemSize }, items)] }) }));
|
|
17
17
|
});
|
|
18
18
|
function renderList({ version, isDotted, listItemSize }, items) {
|
|
19
19
|
return items?.length ? (_jsx(List, { items: items, isDotted: isDotted, className: "mt-2.5", listItemSize: listItemSize, itemClassName: "mb-1.5", version: version })) : null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tile.js","sourceRoot":"","sources":["../../../src/components/Tile/Tile.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAE3D,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAClE,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AAC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IAClF,OAAO,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,CACrB,KAAC,IAAI,IACH,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,QAAQ,EAClB,SAAS,EAAC,QAAQ,EAClB,YAAY,EAAE,YAAY,EAC1B,aAAa,EAAC,QAAQ,EACtB,OAAO,EAAE,OAAO,GAChB,CACH,CAAC,CAAC,CAAC,IAAI,CAAC;AACX,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AlignText.js","sourceRoot":"","sources":["../../src/model/AlignText.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,SAAS,GAA8B;IAClD,IAAI,EAAE,WAAW;IACjB,MAAM,EAAE,aAAa;IACrB,KAAK,EAAE,YAAY;CACpB,CAAC"}
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
export declare type HeadlineVersion = 'XXL' | 'XL' | 'L' | 'M' | 'S';
|
|
6
6
|
/**
|
|
7
7
|
* @title Размер заголовка
|
|
8
|
-
* @enumNames ["Самый большой тонкий", "Самый большой", "Очень большой тонкий", "Очень большой", "Большой", "Средний", "Маленький"]
|
|
8
|
+
* @enumNames ["Заголовок", "Самый большой тонкий", "Самый большой", "Очень большой тонкий", "Очень большой", "Большой", "Средний", "Маленький"]
|
|
9
9
|
*/
|
|
10
|
-
export declare type HeadlineSmallVersion = 'XL_L' | 'XL_R' | 'L_L' | 'L_R' | 'M' | 'S' | 'XS';
|
|
10
|
+
export declare type HeadlineSmallVersion = 'H6' | 'XL_L' | 'XL_R' | 'L_L' | 'L_R' | 'M' | 'S' | 'XS';
|
|
11
11
|
export declare type TitleProps = {
|
|
12
12
|
/** @title Заголовок */
|
|
13
13
|
title?: string;
|
|
@@ -1,10 +1,19 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
|
|
2
2
|
import { JSX } from '@redneckz/uni-jsx';
|
|
3
3
|
import { Img } from '../Img/Img.js';
|
|
4
|
-
export const DefaultFoldButton = JSX(({ className, label, icon, dataTheme = '', onClick }) =>
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
export const DefaultFoldButton = JSX(({ className = '', label, icon, dataTheme = '', onClick }) => {
|
|
5
|
+
const STATE_STYLE = 'hover:bg-primary-hover focus:border-primary-text active:bg-primary-active outline-none';
|
|
6
|
+
const DIMENSIONS_STYLE = 'flex justify-center w-full px-0 py-5 mb-[1px]';
|
|
7
|
+
return (_jsxs("button", { className: [
|
|
8
|
+
'border border-transparent bg-primary-main font-sans text-white cursor-pointer',
|
|
9
|
+
STATE_STYLE,
|
|
10
|
+
DIMENSIONS_STYLE,
|
|
11
|
+
className,
|
|
12
|
+
].join(' '), "data-theme": dataTheme, onClick: onClick, children: [_jsx("span", { className: "text-h4 pr-3", children: label }), icon ? (_jsx(Img, { image: {
|
|
13
|
+
icon,
|
|
14
|
+
iconVersion: 'white',
|
|
15
|
+
}, className: "flex-shrink-0 my-auto", width: "20", height: "20", asSVG: true })) : null] }));
|
|
16
|
+
});
|
|
8
17
|
export const renderDefaultFoldButton = ({ isUnfolded, onToggle }) => {
|
|
9
18
|
const labels = ['Развернуть', 'Скрыть'];
|
|
10
19
|
const icons = ['ArrowDownIcon', 'ArrowUpIcon'];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DefaultFoldButton.js","sourceRoot":"","sources":["../../../src/ui-kit/Foldable/DefaultFoldButton.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAGxC,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAWjC,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,CAClC,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,GAAG,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,
|
|
1
|
+
{"version":3,"file":"DefaultFoldButton.js","sourceRoot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CAAC,EACjC,OAAO,EAAE,QAAQ,GACjB,CACH,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -6,11 +6,11 @@ const LIST_DOT_STYLE_MAP = {
|
|
|
6
6
|
gray: 'bg-secondary-text',
|
|
7
7
|
};
|
|
8
8
|
const DOT_SIZE_MAP = {
|
|
9
|
-
L: 'w-1.5 h-1.5 min-w-1.5 min-h-1.5 mr-4
|
|
10
|
-
M: 'w-1.5 h-1.5 min-w-1.5 min-h-1.5 mr-3
|
|
11
|
-
S: 'w-1 h-1 min-w-1 min-h-1 mr-2
|
|
9
|
+
L: 'w-1.5 h-1.5 min-w-1.5 min-h-1.5 mr-4',
|
|
10
|
+
M: 'w-1.5 h-1.5 min-w-1.5 min-h-1.5 mr-3',
|
|
11
|
+
S: 'w-1 h-1 min-w-1 min-h-1 mr-2',
|
|
12
12
|
};
|
|
13
13
|
export const ListItem = JSX(({ className = '', isDotted = true, children, version = 'primary', size = 'M' }) => {
|
|
14
|
-
return (_jsxs("div", { className: `font-sans flex items-
|
|
14
|
+
return (_jsxs("div", { className: `font-sans flex items-baseline ${className}`, role: "listitem", children: [isDotted ? (_jsx("div", { children: _jsx("div", { className: `rounded-full align-middle inline-block ${LIST_DOT_STYLE_MAP[version]} ${DOT_SIZE_MAP[size]}` }) })) : null, _jsx("span", { children: children })] }));
|
|
15
15
|
});
|
|
16
16
|
//# sourceMappingURL=ListItem.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListItem.js","sourceRoot":"","sources":["../../../src/ui-kit/List/ListItem.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"ListItem.js","sourceRoot":"","sources":["../../../src/ui-kit/List/ListItem.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAcxC,MAAM,kBAAkB,GAAoC;IAC1D,OAAO,EAAE,iBAAiB;IAC1B,SAAS,EAAE,UAAU;IACrB,IAAI,EAAE,mBAAmB;CAC1B,CAAC;AAEF,MAAM,YAAY,GAAG;IACnB,CAAC,EAAE,sCAAsC;IACzC,CAAC,EAAE,sCAAsC;IACzC,CAAC,EAAE,8BAA8B;CAClC,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAG,GAAG,CACzB,CAAC,EAAE,SAAS,GAAG,EAAE,EAAE,QAAQ,GAAG,IAAI,EAAE,QAAQ,EAAE,OAAO,GAAG,SAAS,EAAE,IAAI,GAAG,GAAG,EAAE,EAAE,EAAE;IACjF,OAAO,CACL,eAAK,SAAS,EAAE,iCAAiC,SAAS,EAAE,EAAE,IAAI,EAAC,UAAU,aAC1E,QAAQ,CAAC,CAAC,CAAC,CACV,wBACE,cACE,SAAS,EAAE,0CAA0C,kBAAkB,CAAC,OAAO,CAAC,IAAI,YAAY,CAAC,IAAI,CAAC,EAAE,GACxG,GACE,CACP,CAAC,CAAC,CAAC,IAAI,EACR,yBAAO,QAAQ,GAAQ,IACnB,CACP,CAAC;AACJ,CAAC,CACF,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
{
|
|
2
|
+
"contactsBlockVersion": "secondary",
|
|
3
|
+
"info": [
|
|
4
|
+
{
|
|
5
|
+
"title": "Заголовок 1",
|
|
6
|
+
"description": "Описание 1",
|
|
7
|
+
"button": {
|
|
8
|
+
"href": "#",
|
|
9
|
+
"text": "Кнопка 1",
|
|
10
|
+
"target": "_blank",
|
|
11
|
+
"version": "secondary"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"title": "Заголовок 2",
|
|
16
|
+
"description": "Описание 2",
|
|
17
|
+
"button": {
|
|
18
|
+
"href": "#",
|
|
19
|
+
"text": "Кнопка 2",
|
|
20
|
+
"target": "_blank",
|
|
21
|
+
"version": "secondary"
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
],
|
|
25
|
+
"contacts": [
|
|
26
|
+
[
|
|
27
|
+
{
|
|
28
|
+
"title": "Заголовок 3",
|
|
29
|
+
"description": "Описание 3",
|
|
30
|
+
"additionalDescription": "Доп описание 3"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"title": "Заголовок 4",
|
|
34
|
+
"description": "Описание 4",
|
|
35
|
+
"additionalDescription": "Доп описание 4"
|
|
36
|
+
}
|
|
37
|
+
],
|
|
38
|
+
[
|
|
39
|
+
{
|
|
40
|
+
"title": "Заголовок 5",
|
|
41
|
+
"description": "Описание 5",
|
|
42
|
+
"additionalDescription": "Доп описание 5"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"title": "Заголовок 6",
|
|
46
|
+
"description": "Описание 6",
|
|
47
|
+
"additionalDescription": "Доп описание 6"
|
|
48
|
+
}
|
|
49
|
+
]
|
|
50
|
+
]
|
|
51
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
+
import { UniBlockProps } from '../../model/JSXBlock';
|
|
3
|
+
import { BlockWrapper } from '../../ui-kit/BlockWrapper';
|
|
4
|
+
import { Button } from '../../ui-kit/Button/Button';
|
|
5
|
+
import { Description } from '../../ui-kit/Description/Description';
|
|
6
|
+
import { Heading } from '../../ui-kit/Heading/Heading';
|
|
7
|
+
import type { ContactItemProps, ContactsBlockContent, InfoItemProps } from './ContactsBlockContent';
|
|
8
|
+
|
|
9
|
+
export interface ContactsBlockProps extends ContactsBlockContent, UniBlockProps {}
|
|
10
|
+
|
|
11
|
+
interface RenderContactsColumnProps {
|
|
12
|
+
contactsColumn?: ContactItemProps[];
|
|
13
|
+
index?: number;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const contactsBlockStyleMap = {
|
|
17
|
+
primary: 'bg-white',
|
|
18
|
+
secondary: 'bg-primary-main text-white',
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export const ContactsBlock = JSX<ContactsBlockProps>(
|
|
22
|
+
({ className = '', contacts, context, info, contactsBlockVersion = 'secondary', ...rest }) => {
|
|
23
|
+
return (
|
|
24
|
+
<BlockWrapper
|
|
25
|
+
context={context}
|
|
26
|
+
className={`${contactsBlockStyleMap[contactsBlockVersion]} flex p-12 ${className}`}
|
|
27
|
+
{...rest}
|
|
28
|
+
>
|
|
29
|
+
{info ? renderInfo(info) : null}
|
|
30
|
+
{contacts ? renderContacts(contacts) : null}
|
|
31
|
+
</BlockWrapper>
|
|
32
|
+
);
|
|
33
|
+
},
|
|
34
|
+
);
|
|
35
|
+
|
|
36
|
+
const renderInfo = (info: InfoItemProps[]) => (
|
|
37
|
+
<div className="flex grow basis-0 pr-11">
|
|
38
|
+
{info.map(({ title, description, button }, index) => (
|
|
39
|
+
<div className="grow basis-0 pr-11 last:pr-0" key={String(index)}>
|
|
40
|
+
<Heading as="h5" headingType="h5" title={title} className="pb-2.5" />
|
|
41
|
+
<Description className="text-l-light pb-6" description={description} />
|
|
42
|
+
{button ? <Button {...button} /> : null}
|
|
43
|
+
</div>
|
|
44
|
+
))}
|
|
45
|
+
</div>
|
|
46
|
+
);
|
|
47
|
+
|
|
48
|
+
const renderContacts = (contacts: ContactItemProps[][]) => (
|
|
49
|
+
<div className="flex grow basis-0">
|
|
50
|
+
{contacts.map((contactsColumn, index) => renderContactsColumn({ contactsColumn, index }))}
|
|
51
|
+
</div>
|
|
52
|
+
);
|
|
53
|
+
|
|
54
|
+
const renderContactsColumn = ({ contactsColumn, index }: RenderContactsColumnProps) =>
|
|
55
|
+
contactsColumn ? (
|
|
56
|
+
<div className="flex flex-col grow basis-0 pr-11" key={String(index)}>
|
|
57
|
+
{contactsColumn.map(({ title, description, additionalDescription }, key) => (
|
|
58
|
+
<div className="pr-11 last:pr-0 last:mt-5" key={String(key)}>
|
|
59
|
+
<Heading as="h5" headingType="h5" title={title} />
|
|
60
|
+
<Description className="text-l-light mt-2.5" description={description} />
|
|
61
|
+
{additionalDescription ? (
|
|
62
|
+
<Description
|
|
63
|
+
className="text-m-light mt-1.5 opacity-80"
|
|
64
|
+
description={additionalDescription}
|
|
65
|
+
/>
|
|
66
|
+
) : null}
|
|
67
|
+
</div>
|
|
68
|
+
))}
|
|
69
|
+
</div>
|
|
70
|
+
) : null;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { HeadlineCommonProps } from '../../model/HeadlineType';
|
|
2
|
+
import type { ButtonProps } from '../../ui-kit/Button/ButtonProps';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @title Контакты
|
|
6
|
+
*/
|
|
7
|
+
export interface ContactsBlockContent {
|
|
8
|
+
/**
|
|
9
|
+
* @title Данные
|
|
10
|
+
* @maxItems 2
|
|
11
|
+
* */
|
|
12
|
+
info?: InfoItemProps[];
|
|
13
|
+
/**
|
|
14
|
+
* @title Контакты
|
|
15
|
+
* @maxItems 2
|
|
16
|
+
* */
|
|
17
|
+
contacts?: ContactItemProps[][];
|
|
18
|
+
contactsBlockVersion?: 'secondary';
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* @title Элемент плитки
|
|
23
|
+
*/
|
|
24
|
+
export interface ContactItemProps {
|
|
25
|
+
/** @title Дополнительное описание */
|
|
26
|
+
additionalDescription?: string;
|
|
27
|
+
/** @title Описание */
|
|
28
|
+
description?: string;
|
|
29
|
+
/** @title Заголовок */
|
|
30
|
+
title?: string;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* @title Элемент плитки
|
|
35
|
+
*/
|
|
36
|
+
export interface InfoItemProps extends HeadlineCommonProps {
|
|
37
|
+
/** @title Кнопка */
|
|
38
|
+
button?: ButtonProps;
|
|
39
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { ContentPageMeta } from '../../model/ContentPageDef';
|
|
2
|
+
|
|
3
|
+
export function renderContentPageHead(data: ContentPageMeta) {
|
|
4
|
+
const { title, main, og, twitter, jsonLd } = data;
|
|
5
|
+
const { description, keywords, canonical, robots } = main || {};
|
|
6
|
+
|
|
7
|
+
return [
|
|
8
|
+
<title key="title">{title}</title>,
|
|
9
|
+
<meta key="viewport" name="viewport" content="width=device-width, initial-scale=1" />,
|
|
10
|
+
description ? <meta key="description" name="description" content={description} /> : null,
|
|
11
|
+
keywords ? <meta key="keywords" name="keywords" content={keywords.join(',')} /> : null,
|
|
12
|
+
robots ? <meta key="robots" name="robots" content={robots.join(',')} /> : null,
|
|
13
|
+
renderOpenGraph(og),
|
|
14
|
+
renderTwitter(twitter),
|
|
15
|
+
canonical ? <link key="canonical" rel="canonical" href={canonical} /> : null,
|
|
16
|
+
jsonLd ? (
|
|
17
|
+
<script key="jsonLd" type="application/ld+json">
|
|
18
|
+
{jsonLd}
|
|
19
|
+
</script>
|
|
20
|
+
) : null,
|
|
21
|
+
].filter(Boolean);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
function renderOpenGraph(og: Record<string, string> | undefined) {
|
|
25
|
+
return og
|
|
26
|
+
? Object.entries(og).map(([key, value]) => (
|
|
27
|
+
<meta key={key} property={`og:${key}`} content={value} />
|
|
28
|
+
))
|
|
29
|
+
: null;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function renderTwitter(twitter: Record<string, string> | undefined) {
|
|
33
|
+
return twitter
|
|
34
|
+
? Object.entries(twitter).map(([key, value]) => (
|
|
35
|
+
<meta key={key} name={`twitter:${key}`} content={value} />
|
|
36
|
+
))
|
|
37
|
+
: null;
|
|
38
|
+
}
|
|
@@ -11,6 +11,7 @@ import { SwipeListControl } from '../../ui-kit/SwipeListControl/SwipeListControl
|
|
|
11
11
|
import type { ContentPageContext } from '../ContentPage/ContentPageContext';
|
|
12
12
|
import type { GalleryCardProps, GalleryItemProps } from './GalleryContent';
|
|
13
13
|
import type { GalleryProps } from './GalleryProps';
|
|
14
|
+
import { Picture } from '../../model/Picture';
|
|
14
15
|
|
|
15
16
|
export const Gallery = JSX<GalleryProps>(
|
|
16
17
|
({ context, title, description, cards = [], className, orientation = 'horizontal' }) => {
|
|
@@ -54,11 +55,7 @@ function renderCard(card: GalleryCardProps, key: number) {
|
|
|
54
55
|
key={key}
|
|
55
56
|
>
|
|
56
57
|
<div>
|
|
57
|
-
{card.
|
|
58
|
-
<div className="flex justify-center">
|
|
59
|
-
<Img className="mb-3.5" image={card.image} />
|
|
60
|
-
</div>
|
|
61
|
-
) : null}
|
|
58
|
+
{renderImage(card.icon)}
|
|
62
59
|
{card.title ? <h3 className={`text-m-title-xs font-medium m-0`}>{card.title}</h3> : null}
|
|
63
60
|
{card.description ? renderDescription(card) : null}
|
|
64
61
|
{card.items?.length ? renderItems(card.items, card.isDotted, card.version) : null}
|
|
@@ -68,6 +65,13 @@ function renderCard(card: GalleryCardProps, key: number) {
|
|
|
68
65
|
);
|
|
69
66
|
}
|
|
70
67
|
|
|
68
|
+
const renderImage = (image?: Picture) =>
|
|
69
|
+
image?.src || image?.icon ? (
|
|
70
|
+
<div className="flex justify-center">
|
|
71
|
+
<Img className="mb-3.5" image={image} />
|
|
72
|
+
</div>
|
|
73
|
+
) : null;
|
|
74
|
+
|
|
71
75
|
function renderButton(button?: ButtonWithIconProps) {
|
|
72
76
|
return <Button className="mt-3" {...button} />;
|
|
73
77
|
}
|
|
@@ -1,27 +1,20 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
-
import
|
|
2
|
+
import { AlignText } from '../../model/AlignText';
|
|
3
3
|
import type { BlockVersion } from '../../model/BlockVersion';
|
|
4
4
|
import type { Picture } from '../../model/Picture';
|
|
5
5
|
import { Button } from '../../ui-kit/Button/Button';
|
|
6
|
-
import type { ButtonWithIconProps } from '../../ui-kit/Button/ButtonProps';
|
|
7
6
|
import { Img } from '../../ui-kit/Img/Img';
|
|
8
7
|
import { List } from '../../ui-kit/List/List';
|
|
9
8
|
import { HEADLINE_SMALL_VERSION } from '../Headline/constants';
|
|
10
9
|
import type { GalleryCardProps, GalleryItemProps } from './GalleryContent';
|
|
11
10
|
|
|
12
|
-
const ALIGN_TITLE: Record<AlignType, string> = {
|
|
13
|
-
left: 'text-left',
|
|
14
|
-
center: 'text-center',
|
|
15
|
-
right: 'text-right',
|
|
16
|
-
};
|
|
17
|
-
|
|
18
11
|
export const GalleryCardInner = JSX<GalleryCardProps>(
|
|
19
12
|
({
|
|
20
13
|
title,
|
|
21
|
-
headlineSmallVersion = '
|
|
14
|
+
headlineSmallVersion = 'H6',
|
|
22
15
|
description,
|
|
23
16
|
additionalDescription,
|
|
24
|
-
|
|
17
|
+
icon,
|
|
25
18
|
items,
|
|
26
19
|
button,
|
|
27
20
|
version,
|
|
@@ -29,42 +22,40 @@ export const GalleryCardInner = JSX<GalleryCardProps>(
|
|
|
29
22
|
align = 'center',
|
|
30
23
|
}) => {
|
|
31
24
|
return (
|
|
32
|
-
<div className={`h-full flex flex-col justify-between ${
|
|
25
|
+
<div className={`h-full flex flex-col justify-between ${AlignText[align]}`}>
|
|
33
26
|
<div className="flex flex-col h-full">
|
|
34
|
-
{renderImage(
|
|
27
|
+
{renderImage(icon)}
|
|
35
28
|
{renderCardTitle(headlineSmallVersion, title)}
|
|
36
29
|
{renderDescription(description, title)}
|
|
37
|
-
{renderAdditionalDescription(additionalDescription)}
|
|
38
30
|
{items?.length ? renderItems(items, isDotted, version) : null}
|
|
31
|
+
{renderAdditionalDescription(additionalDescription)}
|
|
39
32
|
</div>
|
|
40
|
-
{button ?
|
|
33
|
+
{button?.text ? <Button className="mt-6" {...button} /> : null}
|
|
41
34
|
</div>
|
|
42
35
|
);
|
|
43
36
|
},
|
|
44
37
|
);
|
|
45
38
|
|
|
46
|
-
const renderImage = (image?: Picture) =>
|
|
47
|
-
|
|
48
|
-
<
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
39
|
+
const renderImage = (image?: Picture) => (
|
|
40
|
+
<div className="flex justify-center">
|
|
41
|
+
{image?.src ? <Img className="mb-5" image={image} /> : null}
|
|
42
|
+
{image?.icon ? (
|
|
43
|
+
<Img className={`w-[32px] h-[32px] min-w-[32px] mb-5 rounded-full`} image={image} asSVG />
|
|
44
|
+
) : null}
|
|
45
|
+
</div>
|
|
46
|
+
);
|
|
52
47
|
|
|
53
48
|
const renderCardTitle = (headlineSmallVersion: string, title?: string) =>
|
|
54
49
|
title ? <div className={HEADLINE_SMALL_VERSION[headlineSmallVersion]}>{title}</div> : null;
|
|
55
50
|
|
|
56
51
|
const renderDescription = (description?: string, title?: string) =>
|
|
57
|
-
description ? <div className={`text-
|
|
52
|
+
description ? <div className={`text-l ${title ? 'mt-2' : ''}`}>{description}</div> : null;
|
|
58
53
|
|
|
59
54
|
const renderAdditionalDescription = (additionalDescription?: string) =>
|
|
60
55
|
additionalDescription ? (
|
|
61
56
|
<div className="text-m-light text-secondary-text mt-auto">{additionalDescription}</div>
|
|
62
57
|
) : null;
|
|
63
58
|
|
|
64
|
-
const renderButton = (button: ButtonWithIconProps) => (
|
|
65
|
-
<Button className="mt-6 w-full" {...button} />
|
|
66
|
-
);
|
|
67
|
-
|
|
68
59
|
const renderItems = (
|
|
69
60
|
items: GalleryItemProps[],
|
|
70
61
|
isDotted: boolean,
|
|
@@ -72,7 +63,7 @@ const renderItems = (
|
|
|
72
63
|
) => (
|
|
73
64
|
<List
|
|
74
65
|
className={`max-w-[308px] mt-2 text-s ${version === 'primary' ? '!text-secondary-text' : ''}`}
|
|
75
|
-
itemClassName="
|
|
66
|
+
itemClassName="text-left"
|
|
76
67
|
items={items.filter((item) => item?.text).map((item) => item.text as string)}
|
|
77
68
|
isDotted={isDotted}
|
|
78
69
|
version={version}
|
|
@@ -22,7 +22,7 @@ export const GalleryContainer = JSX<GalleryContainerProps>(
|
|
|
22
22
|
({
|
|
23
23
|
context,
|
|
24
24
|
title,
|
|
25
|
-
headlineVersion = '
|
|
25
|
+
headlineVersion = 'M',
|
|
26
26
|
description,
|
|
27
27
|
cards = [],
|
|
28
28
|
version = 'normal',
|
|
@@ -30,7 +30,6 @@ export const GalleryContainer = JSX<GalleryContainerProps>(
|
|
|
30
30
|
}) => {
|
|
31
31
|
return (
|
|
32
32
|
<div>
|
|
33
|
-
<div className="absolute top-0 left-0 bottom-0 w-[84px] bg-gradient-to-r from-white to-transparent" />
|
|
34
33
|
<Headline
|
|
35
34
|
context={context}
|
|
36
35
|
className="!p-0"
|
|
@@ -20,6 +20,7 @@ export interface GalleryItemProps {
|
|
|
20
20
|
* @default {"headlineSmallVersion": "XL_L"}
|
|
21
21
|
*/
|
|
22
22
|
export type GalleryCardProps = HeadlineSmallProps & {
|
|
23
|
+
/** @title Дополнительное описание */
|
|
23
24
|
additionalDescription?: string;
|
|
24
25
|
/**
|
|
25
26
|
* @default {
|
|
@@ -35,7 +36,7 @@ export type GalleryCardProps = HeadlineSmallProps & {
|
|
|
35
36
|
* }]
|
|
36
37
|
* }
|
|
37
38
|
*/
|
|
38
|
-
|
|
39
|
+
icon?: Picture;
|
|
39
40
|
/** @title Кнопка */
|
|
40
41
|
button?: ButtonWithIconProps;
|
|
41
42
|
/**
|
|
@@ -64,4 +65,5 @@ export type GalleryContent = HeadlineProps & {
|
|
|
64
65
|
cards?: GalleryCardProps[];
|
|
65
66
|
/** @title Отображать элементы в моб. версии (прокрутка shift+mouseScroll) */
|
|
66
67
|
orientation?: ListOrientation; //TODO: for mobile
|
|
68
|
+
button?: ButtonWithIconProps;
|
|
67
69
|
};
|