@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,4 +1,5 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
+
import { AlignText } from '../../model/AlignText';
|
|
2
3
|
import { VersionStyleMap } from '../../model/BlockVersion';
|
|
3
4
|
import type { UniBlockProps } from '../../model/JSXBlock';
|
|
4
5
|
import { BlockWrapper } from '../../ui-kit/BlockWrapper';
|
|
@@ -24,6 +25,8 @@ export const MobileAppTile = JSX<MobileAppTileProps>(
|
|
|
24
25
|
items,
|
|
25
26
|
image,
|
|
26
27
|
headingType = 'h4',
|
|
28
|
+
alignTitle = 'left',
|
|
29
|
+
description,
|
|
27
30
|
...rest
|
|
28
31
|
}) => {
|
|
29
32
|
const textColorClass = version === 'primary' ? 'text-primary-text' : '';
|
|
@@ -49,7 +52,7 @@ export const MobileAppTile = JSX<MobileAppTileProps>(
|
|
|
49
52
|
as="h3"
|
|
50
53
|
title={title}
|
|
51
54
|
className={`whitespace-pre-wrap max-w-[509px] mb-6
|
|
52
|
-
${textColorClass}`}
|
|
55
|
+
${textColorClass} ${AlignText[alignTitle]}`}
|
|
53
56
|
/>
|
|
54
57
|
) : null
|
|
55
58
|
}
|
|
@@ -59,6 +62,7 @@ export const MobileAppTile = JSX<MobileAppTileProps>(
|
|
|
59
62
|
) : null
|
|
60
63
|
}
|
|
61
64
|
>
|
|
65
|
+
{renderDescription(description)}
|
|
62
66
|
<div className="flex flex-1 items-center">
|
|
63
67
|
{qr?.src ? (
|
|
64
68
|
<div className={`flex justify-center mr-5 bg-white rounded-md ${containerStyle}`}>
|
|
@@ -87,3 +91,6 @@ const renderList = (version: ListItemVersion, items?: string[]) => {
|
|
|
87
91
|
</span>
|
|
88
92
|
);
|
|
89
93
|
};
|
|
94
|
+
|
|
95
|
+
const renderDescription = (description?: string) =>
|
|
96
|
+
description ? <p className="text-xl-light mb-5">{description}</p> : null;
|
|
@@ -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';
|
|
@@ -12,6 +13,11 @@ export type MobileAppTileContent = HeadlineCommonProps &
|
|
|
12
13
|
HeadingCommonProps &
|
|
13
14
|
ButtonContent &
|
|
14
15
|
ListContent & {
|
|
16
|
+
/**
|
|
17
|
+
* @title Выравнивание заголовка
|
|
18
|
+
* @default left
|
|
19
|
+
*/
|
|
20
|
+
alignTitle?: AlignType;
|
|
15
21
|
// TODO: description для мобильной версии
|
|
16
22
|
/** @title QR-код */
|
|
17
23
|
qr?: Picture;
|
|
@@ -59,7 +59,7 @@ export const Tile = JSX<TileProps>((props) => {
|
|
|
59
59
|
buttons?.length ? (
|
|
60
60
|
<ButtonSection
|
|
61
61
|
context={context}
|
|
62
|
-
buttons={buttons.map((button) => ({ ...button, className: 'w-[158px]' }))}
|
|
62
|
+
buttons={buttons.map((button) => ({ ...button, className: 'min-w-[158px]' }))}
|
|
63
63
|
className="flex mt-8 gap-3"
|
|
64
64
|
/>
|
|
65
65
|
) : null
|
|
@@ -6,9 +6,9 @@ export type HeadlineVersion = 'XXL' | 'XL' | 'L' | 'M' | 'S';
|
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* @title Размер заголовка
|
|
9
|
-
* @enumNames ["Самый большой тонкий", "Самый большой", "Очень большой тонкий", "Очень большой", "Большой", "Средний", "Маленький"]
|
|
9
|
+
* @enumNames ["Заголовок", "Самый большой тонкий", "Самый большой", "Очень большой тонкий", "Очень большой", "Большой", "Средний", "Маленький"]
|
|
10
10
|
*/
|
|
11
|
-
export type HeadlineSmallVersion = 'XL_L' | 'XL_R' | 'L_L' | 'L_R' | 'M' | 'S' | 'XS';
|
|
11
|
+
export type HeadlineSmallVersion = 'H6' | 'XL_L' | 'XL_R' | 'L_L' | 'L_R' | 'M' | 'S' | 'XS';
|
|
12
12
|
|
|
13
13
|
export type TitleProps = {
|
|
14
14
|
/** @title Заголовок */
|
|
@@ -13,29 +13,38 @@ interface DefaultFoldButtonProps {
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
export const DefaultFoldButton = JSX<DefaultFoldButtonProps>(
|
|
16
|
-
({ className, label, icon, dataTheme = '', onClick }) =>
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
16
|
+
({ className = '', label, icon, dataTheme = '', onClick }) => {
|
|
17
|
+
const STATE_STYLE =
|
|
18
|
+
'hover:bg-primary-hover focus:border-primary-text active:bg-primary-active outline-none';
|
|
19
|
+
const DIMENSIONS_STYLE = 'flex justify-center w-full px-0 py-5 mb-[1px]';
|
|
20
|
+
|
|
21
|
+
return (
|
|
22
|
+
<button
|
|
23
|
+
className={[
|
|
24
|
+
'border border-transparent bg-primary-main font-sans text-white cursor-pointer',
|
|
25
|
+
STATE_STYLE,
|
|
26
|
+
DIMENSIONS_STYLE,
|
|
27
|
+
className,
|
|
28
|
+
].join(' ')}
|
|
29
|
+
data-theme={dataTheme}
|
|
30
|
+
onClick={onClick}
|
|
31
|
+
>
|
|
32
|
+
<span className="text-h4 pr-3">{label}</span>
|
|
33
|
+
{icon ? (
|
|
34
|
+
<Img
|
|
35
|
+
image={{
|
|
36
|
+
icon,
|
|
37
|
+
iconVersion: 'white',
|
|
38
|
+
}}
|
|
39
|
+
className="flex-shrink-0 my-auto"
|
|
40
|
+
width="20"
|
|
41
|
+
height="20"
|
|
42
|
+
asSVG
|
|
43
|
+
/>
|
|
44
|
+
) : null}
|
|
45
|
+
</button>
|
|
46
|
+
);
|
|
47
|
+
},
|
|
39
48
|
);
|
|
40
49
|
|
|
41
50
|
export const renderDefaultFoldButton = ({ isUnfolded, onToggle }: FoldablePartProps) => {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
2
|
import type { ListItemSize, ListItemVersion } from './ListProps';
|
|
3
|
+
|
|
3
4
|
/**
|
|
4
5
|
* @title Параметры элемента списка
|
|
5
6
|
*/
|
|
@@ -18,19 +19,21 @@ const LIST_DOT_STYLE_MAP: Record<ListItemVersion, string> = {
|
|
|
18
19
|
};
|
|
19
20
|
|
|
20
21
|
const DOT_SIZE_MAP = {
|
|
21
|
-
L: 'w-1.5 h-1.5 min-w-1.5 min-h-1.5 mr-4
|
|
22
|
-
M: 'w-1.5 h-1.5 min-w-1.5 min-h-1.5 mr-3
|
|
23
|
-
S: 'w-1 h-1 min-w-1 min-h-1 mr-2
|
|
22
|
+
L: 'w-1.5 h-1.5 min-w-1.5 min-h-1.5 mr-4',
|
|
23
|
+
M: 'w-1.5 h-1.5 min-w-1.5 min-h-1.5 mr-3',
|
|
24
|
+
S: 'w-1 h-1 min-w-1 min-h-1 mr-2',
|
|
24
25
|
};
|
|
25
26
|
|
|
26
27
|
export const ListItem = JSX<ListItemProps>(
|
|
27
28
|
({ className = '', isDotted = true, children, version = 'primary', size = 'M' }) => {
|
|
28
29
|
return (
|
|
29
|
-
<div className={`font-sans flex items-
|
|
30
|
+
<div className={`font-sans flex items-baseline ${className}`} role="listitem">
|
|
30
31
|
{isDotted ? (
|
|
31
|
-
<div
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
<div>
|
|
33
|
+
<div
|
|
34
|
+
className={`rounded-full align-middle inline-block ${LIST_DOT_STYLE_MAP[version]} ${DOT_SIZE_MAP[size]}`}
|
|
35
|
+
/>
|
|
36
|
+
</div>
|
|
34
37
|
) : null}
|
|
35
38
|
<span>{children}</span>
|
|
36
39
|
</div>
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { ContentPageMeta } from '../../model/ContentPageDef';
|
|
2
|
-
import { VNode as _VNode } from '../../model/VNode';
|
|
3
|
-
export interface ContentPageHeadProps {
|
|
4
|
-
HeadComponent: <Props, Context, VNode = _VNode>(props: Props, context?: Context) => VNode;
|
|
5
|
-
data: ContentPageMeta;
|
|
6
|
-
}
|
|
7
|
-
export declare const ContentPageHead: import("@redneckz/uni-jsx").UNIComponent<ContentPageHeadProps, any, any>;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { ContentPageMeta } from '../../model/ContentPageDef';
|
|
2
|
-
import { VNode as _VNode } from '../../model/VNode';
|
|
3
|
-
export interface ContentPageHeadProps {
|
|
4
|
-
HeadComponent: <Props, Context, VNode = _VNode>(props: Props, context?: Context) => VNode;
|
|
5
|
-
data: ContentPageMeta;
|
|
6
|
-
}
|
|
7
|
-
export declare const ContentPageHead: import("@redneckz/uni-jsx").UNIComponent<ContentPageHeadProps, any, any>;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
-
exports.ContentPageHead = void 0;
|
|
3
|
-
const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
|
|
4
|
-
const uni_jsx_1 = require("@redneckz/uni-jsx");
|
|
5
|
-
exports.ContentPageHead = (0, uni_jsx_1.JSX)(({ HeadComponent, data, children }) => {
|
|
6
|
-
const { title, main, og, twitter, jsonLd } = data;
|
|
7
|
-
const { description, keywords, canonical, robots } = main || {};
|
|
8
|
-
return ((0, jsx_runtime_1.jsxs)(HeadComponent, { children: [(0, jsx_runtime_1.jsx)("title", { children: title }), (0, jsx_runtime_1.jsx)("meta", { name: "viewport", content: "width=device-width, initial-scale=1" }), description ? (0, jsx_runtime_1.jsx)("meta", { name: "description", content: description }) : null, keywords ? (0, jsx_runtime_1.jsx)("meta", { name: "keywords", content: keywords.join(',') }) : null, robots ? (0, jsx_runtime_1.jsx)("meta", { name: "robots", content: robots.join(',') }) : null, renderOpenGraph(og), renderTwitter(twitter), canonical ? (0, jsx_runtime_1.jsx)("link", { rel: "canonical", href: canonical }) : null, jsonLd ? (0, jsx_runtime_1.jsx)("script", { type: "application/ld+json", children: jsonLd }) : null, children] }));
|
|
9
|
-
});
|
|
10
|
-
function renderOpenGraph(og) {
|
|
11
|
-
return og
|
|
12
|
-
? Object.entries(og).map(([key, value]) => ((0, jsx_runtime_1.jsx)("meta", { property: `og:${key}`, content: value }, key)))
|
|
13
|
-
: null;
|
|
14
|
-
}
|
|
15
|
-
function renderTwitter(twitter) {
|
|
16
|
-
return twitter
|
|
17
|
-
? Object.entries(twitter).map(([key, value]) => ((0, jsx_runtime_1.jsx)("meta", { name: `twitter:${key}`, content: value }, key)))
|
|
18
|
-
: null;
|
|
19
|
-
}
|
|
20
|
-
//# sourceMappingURL=ContentPageHead.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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CAAC,CAAC,CAAC;AAEH,SAAS,eAAe,CAAC,EAAsC;IAC7D,OAAO,EAAE;QACP,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,CACvC,iCAAgB,QAAQ,EAAE,MAAM,GAAG,EAAE,EAAE,OAAO,EAAE,KAAK,IAA1C,GAAG,CAA2C,CAC1D,CAAC;QACJ,CAAC,CAAC,IAAI,CAAC;AACX,CAAC;AAED,SAAS,aAAa,CAAC,OAA2C;IAChE,OAAO,OAAO;QACZ,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,CAC5C,iCAAgB,IAAI,EAAE,WAAW,GAAG,EAAE,EAAE,OAAO,EAAE,KAAK,IAA3C,GAAG,CAA4C,CAC3D,CAAC;QACJ,CAAC,CAAC,IAAI,CAAC;AACX,CAAC"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { ContentPageMeta } from '../../model/ContentPageDef';
|
|
2
|
-
import { VNode as _VNode } from '../../model/VNode';
|
|
3
|
-
export interface ContentPageHeadProps {
|
|
4
|
-
HeadComponent: <Props, Context, VNode = _VNode>(props: Props, context?: Context) => VNode;
|
|
5
|
-
data: ContentPageMeta;
|
|
6
|
-
}
|
|
7
|
-
export declare const ContentPageHead: import("@redneckz/uni-jsx").UNIComponent<ContentPageHeadProps, any, any>;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
|
|
2
|
-
import { JSX } from '@redneckz/uni-jsx';
|
|
3
|
-
export const ContentPageHead = JSX(({ HeadComponent, data, children }) => {
|
|
4
|
-
const { title, main, og, twitter, jsonLd } = data;
|
|
5
|
-
const { description, keywords, canonical, robots } = main || {};
|
|
6
|
-
return (_jsxs(HeadComponent, { children: [_jsx("title", { children: title }), _jsx("meta", { name: "viewport", content: "width=device-width, initial-scale=1" }), description ? _jsx("meta", { name: "description", content: description }) : null, keywords ? _jsx("meta", { name: "keywords", content: keywords.join(',') }) : null, robots ? _jsx("meta", { name: "robots", content: robots.join(',') }) : null, renderOpenGraph(og), renderTwitter(twitter), canonical ? _jsx("link", { rel: "canonical", href: canonical }) : null, jsonLd ? _jsx("script", { type: "application/ld+json", children: jsonLd }) : null, children] }));
|
|
7
|
-
});
|
|
8
|
-
function renderOpenGraph(og) {
|
|
9
|
-
return og
|
|
10
|
-
? Object.entries(og).map(([key, value]) => (_jsx("meta", { property: `og:${key}`, content: value }, key)))
|
|
11
|
-
: null;
|
|
12
|
-
}
|
|
13
|
-
function renderTwitter(twitter) {
|
|
14
|
-
return twitter
|
|
15
|
-
? Object.entries(twitter).map(([key, value]) => (_jsx("meta", { name: `twitter:${key}`, content: value }, key)))
|
|
16
|
-
: null;
|
|
17
|
-
}
|
|
18
|
-
//# sourceMappingURL=ContentPageHead.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ContentPageHead.js","sourceRoot":"","sources":["../../../src/components/ContentPage/ContentPageHead.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAQxC,MAAM,CAAC,MAAM,eAAe,GAAG,GAAG,CAAuB,CAAC,EAAE,aAAa,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE;IAC7F,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IAClD,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,IAAI,IAAI,EAAE,CAAC;IAEhE,OAAO,CACL,MAAC,aAAa,eACZ,0BAAQ,KAAK,GAAS,EACtB,eAAM,IAAI,EAAC,UAA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AE,CAAC,CAC5C,eAAgB,IAAI,EAAE,WAAW,GAAG,EAAE,EAAE,OAAO,EAAE,KAAK,IAA3C,GAAG,CAA4C,CAC3D,CAAC;QACJ,CAAC,CAAC,IAAI,CAAC;AACX,CAAC"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { ContentPageMeta } from '../../model/ContentPageDef';
|
|
2
|
-
import { VNode as _VNode } from '../../model/VNode';
|
|
3
|
-
export interface ContentPageHeadProps {
|
|
4
|
-
HeadComponent: <Props, Context, VNode = _VNode>(props: Props, context?: Context) => VNode;
|
|
5
|
-
data: ContentPageMeta;
|
|
6
|
-
}
|
|
7
|
-
export declare const ContentPageHead: import("@redneckz/uni-jsx").UNIComponent<ContentPageHeadProps, any, any>;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { ContentPageMeta } from '../../model/ContentPageDef';
|
|
2
|
-
import { VNode as _VNode } from '../../model/VNode';
|
|
3
|
-
export interface ContentPageHeadProps {
|
|
4
|
-
HeadComponent: <Props, Context, VNode = _VNode>(props: Props, context?: Context) => VNode;
|
|
5
|
-
data: ContentPageMeta;
|
|
6
|
-
}
|
|
7
|
-
export declare const ContentPageHead: import("@redneckz/uni-jsx").UNIComponent<ContentPageHeadProps, any, any>;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
-
exports.ContentPageHead = void 0;
|
|
3
|
-
const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
|
|
4
|
-
const uni_jsx_1 = require("@redneckz/uni-jsx");
|
|
5
|
-
exports.ContentPageHead = (0, uni_jsx_1.JSX)(({ HeadComponent, data, children }) => {
|
|
6
|
-
const { title, main, og, twitter, jsonLd } = data;
|
|
7
|
-
const { description, keywords, canonical, robots } = main || {};
|
|
8
|
-
return ((0, jsx_runtime_1.jsxs)(HeadComponent, { children: [(0, jsx_runtime_1.jsx)("title", { children: title }), (0, jsx_runtime_1.jsx)("meta", { name: "viewport", content: "width=device-width, initial-scale=1" }), description ? (0, jsx_runtime_1.jsx)("meta", { name: "description", content: description }) : null, keywords ? (0, jsx_runtime_1.jsx)("meta", { name: "keywords", content: keywords.join(',') }) : null, robots ? (0, jsx_runtime_1.jsx)("meta", { name: "robots", content: robots.join(',') }) : null, renderOpenGraph(og), renderTwitter(twitter), canonical ? (0, jsx_runtime_1.jsx)("link", { rel: "canonical", href: canonical }) : null, jsonLd ? (0, jsx_runtime_1.jsx)("script", { type: "application/ld+json", children: jsonLd }) : null, children] }));
|
|
9
|
-
});
|
|
10
|
-
function renderOpenGraph(og) {
|
|
11
|
-
return og
|
|
12
|
-
? Object.entries(og).map(([key, value]) => ((0, jsx_runtime_1.jsx)("meta", { property: `og:${key}`, content: value }, key)))
|
|
13
|
-
: null;
|
|
14
|
-
}
|
|
15
|
-
function renderTwitter(twitter) {
|
|
16
|
-
return twitter
|
|
17
|
-
? Object.entries(twitter).map(([key, value]) => ((0, jsx_runtime_1.jsx)("meta", { name: `twitter:${key}`, content: value }, key)))
|
|
18
|
-
: null;
|
|
19
|
-
}
|
|
20
|
-
//# sourceMappingURL=ContentPageHead.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ContentPageHead.js","sourceRoot":"","sources":["../../../src/components/ContentPage/ContentPageHead.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AAQ3B,QAAA,eAAe,GAAG,IAAA,aAAG,EAAuB,CAAC,EAAE,aAAa,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE;IAC7F,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IAClD,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,IAAI,IAAI,EAAE,CAAC;IAEhE,OAAO,CACL,wBAAC,aAAa,eACZ,4CAAQ,KAAK,GAAS,EACtB,iCAAM,I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KAAK,CAAC,EAAE,EAAE,CAAC,CAC5C,iCAAgB,IAAI,EAAE,WAAW,GAAG,EAAE,EAAE,OAAO,EAAE,KAAK,IAA3C,GAAG,CAA4C,CAC3D,CAAC;QACJ,CAAC,CAAC,IAAI,CAAC;AACX,CAAC"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { ContentPageMeta } from '../../model/ContentPageDef';
|
|
2
|
-
import { VNode as _VNode } from '../../model/VNode';
|
|
3
|
-
export interface ContentPageHeadProps {
|
|
4
|
-
HeadComponent: <Props, Context, VNode = _VNode>(props: Props, context?: Context) => VNode;
|
|
5
|
-
data: ContentPageMeta;
|
|
6
|
-
}
|
|
7
|
-
export declare const ContentPageHead: import("@redneckz/uni-jsx").UNIComponent<ContentPageHeadProps, any, any>;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
|
|
2
|
-
import { JSX } from '@redneckz/uni-jsx';
|
|
3
|
-
export const ContentPageHead = JSX(({ HeadComponent, data, children }) => {
|
|
4
|
-
const { title, main, og, twitter, jsonLd } = data;
|
|
5
|
-
const { description, keywords, canonical, robots } = main || {};
|
|
6
|
-
return (_jsxs(HeadComponent, { children: [_jsx("title", { children: title }), _jsx("meta", { name: "viewport", content: "width=device-width, initial-scale=1" }), description ? _jsx("meta", { name: "description", content: description }) : null, keywords ? _jsx("meta", { name: "keywords", content: keywords.join(',') }) : null, robots ? _jsx("meta", { name: "robots", content: robots.join(',') }) : null, renderOpenGraph(og), renderTwitter(twitter), canonical ? _jsx("link", { rel: "canonical", href: canonical }) : null, jsonLd ? _jsx("script", { type: "application/ld+json", children: jsonLd }) : null, children] }));
|
|
7
|
-
});
|
|
8
|
-
function renderOpenGraph(og) {
|
|
9
|
-
return og
|
|
10
|
-
? Object.entries(og).map(([key, value]) => (_jsx("meta", { property: `og:${key}`, content: value }, key)))
|
|
11
|
-
: null;
|
|
12
|
-
}
|
|
13
|
-
function renderTwitter(twitter) {
|
|
14
|
-
return twitter
|
|
15
|
-
? Object.entries(twitter).map(([key, value]) => (_jsx("meta", { name: `twitter:${key}`, content: value }, key)))
|
|
16
|
-
: null;
|
|
17
|
-
}
|
|
18
|
-
//# sourceMappingURL=ContentPageHead.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ContentPageHead.js","sourceRoot":"","sources":["../../../src/components/ContentPage/ContentPageHead.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAQxC,MAAM,CAAC,MAAM,eAAe,GAAG,GAAG,CAAuB,CAAC,EAAE,aAAa,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE;IAC7F,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IAClD,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,IAAI,IAAI,EAAE,CAAC;IAEhE,OAAO,CACL,MAAC,aAAa,eACZ,0BAAQ,KAAK,GAAS,EACtB,eAAM,IAAI,EAAC,UAAU,EAAC,OAAO,EAAC,qCAAqC,GAAG,EACrE,WAAW,CAAC,CAAC,CAAC,eAAM,IAAI,EAAC,aAAa,EAAC,OAAO,EAAE,WAAW,GAAI,CAAC,CAAC,CAAC,IAAI,EACtE,QAAQ,CAAC,CAAC,CAAC,eAAM,IAAI,EAAC,UAAU,EAAC,OAAO,EAAE,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,GAAI,CAAC,CAAC,CAAC,IAAI,EACvE,MAAM,CAAC,CAAC,CAAC,eAAM,IAAI,EAAC,QAAQ,EAAC,OAAO,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,GAAI,CAAC,CAAC,CAAC,IAAI,EACjE,eAAe,CAAC,EAAE,CAAC,EACnB,aAAa,CAAC,OAAO,CAAC,EACtB,SAAS,CAAC,CAAC,CAAC,eAAM,GAAG,EAAC,WAAW,EAAC,IAAI,EAAE,SAAS,GAAI,CAAC,CAAC,CAAC,IAAI,EAC5D,MAAM,CAAC,CAAC,CAAC,iBAAQ,IAAI,EAAC,qBAAqB,YAAE,MAAM,GAAU,CAAC,CAAC,CAAC,IAAI,EACpE,QAAQ,IACK,CACjB,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,SAAS,eAAe,CAAC,EAAsC;IAC7D,OAAO,EAAE;QACP,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,CACvC,eAAgB,QAAQ,EAAE,MAAM,GAAG,EAAE,EAAE,OAAO,EAAE,KAAK,IAA1C,GAAG,CAA2C,CAC1D,CAAC;QACJ,CAAC,CAAC,IAAI,CAAC;AACX,CAAC;AAED,SAAS,aAAa,CAAC,OAA2C;IAChE,OAAO,OAAO;QACZ,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,CAC5C,eAAgB,IAAI,EAAE,WAAW,GAAG,EAAE,EAAE,OAAO,EAAE,KAAK,IAA3C,GAAG,CAA4C,CAC3D,CAAC;QACJ,CAAC,CAAC,IAAI,CAAC;AACX,CAAC"}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
-
import type { ContentPageMeta } from '../../model/ContentPageDef';
|
|
3
|
-
import { VNode as _VNode } from '../../model/VNode';
|
|
4
|
-
export interface ContentPageHeadProps {
|
|
5
|
-
HeadComponent: <Props, Context, VNode = _VNode>(props: Props, context?: Context) => VNode;
|
|
6
|
-
data: ContentPageMeta;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export const ContentPageHead = JSX<ContentPageHeadProps>(({ HeadComponent, data, children }) => {
|
|
10
|
-
const { title, main, og, twitter, jsonLd } = data;
|
|
11
|
-
const { description, keywords, canonical, robots } = main || {};
|
|
12
|
-
|
|
13
|
-
return (
|
|
14
|
-
<HeadComponent>
|
|
15
|
-
<title>{title}</title>
|
|
16
|
-
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
17
|
-
{description ? <meta name="description" content={description} /> : null}
|
|
18
|
-
{keywords ? <meta name="keywords" content={keywords.join(',')} /> : null}
|
|
19
|
-
{robots ? <meta name="robots" content={robots.join(',')} /> : null}
|
|
20
|
-
{renderOpenGraph(og)}
|
|
21
|
-
{renderTwitter(twitter)}
|
|
22
|
-
{canonical ? <link rel="canonical" href={canonical} /> : null}
|
|
23
|
-
{jsonLd ? <script type="application/ld+json">{jsonLd}</script> : null}
|
|
24
|
-
{children}
|
|
25
|
-
</HeadComponent>
|
|
26
|
-
);
|
|
27
|
-
});
|
|
28
|
-
|
|
29
|
-
function renderOpenGraph(og: Record<string, string> | undefined) {
|
|
30
|
-
return og
|
|
31
|
-
? Object.entries(og).map(([key, value]) => (
|
|
32
|
-
<meta key={key} property={`og:${key}`} content={value} />
|
|
33
|
-
))
|
|
34
|
-
: null;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
function renderTwitter(twitter: Record<string, string> | undefined) {
|
|
38
|
-
return twitter
|
|
39
|
-
? Object.entries(twitter).map(([key, value]) => (
|
|
40
|
-
<meta key={key} name={`twitter:${key}`} content={value} />
|
|
41
|
-
))
|
|
42
|
-
: null;
|
|
43
|
-
}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
-
import type { ContentPageMeta } from '../../model/ContentPageDef';
|
|
3
|
-
import { VNode as _VNode } from '../../model/VNode';
|
|
4
|
-
export interface ContentPageHeadProps {
|
|
5
|
-
HeadComponent: <Props, Context, VNode = _VNode>(props: Props, context?: Context) => VNode;
|
|
6
|
-
data: ContentPageMeta;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export const ContentPageHead = JSX<ContentPageHeadProps>(({ HeadComponent, data, children }) => {
|
|
10
|
-
const { title, main, og, twitter, jsonLd } = data;
|
|
11
|
-
const { description, keywords, canonical, robots } = main || {};
|
|
12
|
-
|
|
13
|
-
return (
|
|
14
|
-
<HeadComponent>
|
|
15
|
-
<title>{title}</title>
|
|
16
|
-
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
17
|
-
{description ? <meta name="description" content={description} /> : null}
|
|
18
|
-
{keywords ? <meta name="keywords" content={keywords.join(',')} /> : null}
|
|
19
|
-
{robots ? <meta name="robots" content={robots.join(',')} /> : null}
|
|
20
|
-
{renderOpenGraph(og)}
|
|
21
|
-
{renderTwitter(twitter)}
|
|
22
|
-
{canonical ? <link rel="canonical" href={canonical} /> : null}
|
|
23
|
-
{jsonLd ? <script type="application/ld+json">{jsonLd}</script> : null}
|
|
24
|
-
{children}
|
|
25
|
-
</HeadComponent>
|
|
26
|
-
);
|
|
27
|
-
});
|
|
28
|
-
|
|
29
|
-
function renderOpenGraph(og: Record<string, string> | undefined) {
|
|
30
|
-
return og
|
|
31
|
-
? Object.entries(og).map(([key, value]) => (
|
|
32
|
-
<meta key={key} property={`og:${key}`} content={value} />
|
|
33
|
-
))
|
|
34
|
-
: null;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
function renderTwitter(twitter: Record<string, string> | undefined) {
|
|
38
|
-
return twitter
|
|
39
|
-
? Object.entries(twitter).map(([key, value]) => (
|
|
40
|
-
<meta key={key} name={`twitter:${key}`} content={value} />
|
|
41
|
-
))
|
|
42
|
-
: null;
|
|
43
|
-
}
|