@gravity-ui/blog-constructor 8.3.0 → 8.4.0
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/build/cjs/blocks/SideCardList/SideCardList.css +47 -0
- package/build/cjs/blocks/SideCardList/SideCardList.d.ts +3 -0
- package/build/cjs/blocks/SideCardList/SideCardList.js +21 -0
- package/build/cjs/blocks/SideCardList/SideCardList.js.map +1 -0
- package/build/cjs/blocks/SideCardList/schema.d.ts +94 -0
- package/build/cjs/blocks/SideCardList/schema.js +37 -0
- package/build/cjs/blocks/SideCardList/schema.js.map +1 -0
- package/build/cjs/blocks/Take/Take.css +70 -0
- package/build/cjs/blocks/Take/Take.d.ts +2 -0
- package/build/cjs/blocks/Take/Take.js +28 -0
- package/build/cjs/blocks/Take/Take.js.map +1 -0
- package/build/cjs/blocks/Take/schema.d.ts +96 -0
- package/build/cjs/blocks/Take/schema.js +26 -0
- package/build/cjs/blocks/Take/schema.js.map +1 -0
- package/build/cjs/components/Wrapper/Wrapper.css +42 -0
- package/build/cjs/components/Wrapper/Wrapper.d.ts +1 -0
- package/build/cjs/components/Wrapper/Wrapper.js +2 -2
- package/build/cjs/components/Wrapper/Wrapper.js.map +1 -1
- package/build/cjs/constructor/blocksMap.d.ts +2 -0
- package/build/cjs/constructor/blocksMap.js +4 -0
- package/build/cjs/constructor/blocksMap.js.map +1 -1
- package/build/cjs/hooks/useExtendedComponentMap.d.ts +2 -0
- package/build/cjs/models/blocks.d.ts +21 -2
- package/build/cjs/models/blocks.js.map +1 -1
- package/build/cjs/models/common.d.ts +3 -1
- package/build/cjs/models/common.js +2 -0
- package/build/cjs/models/common.js.map +1 -1
- package/build/cjs/models/paddings.d.ts +1 -1
- package/build/cjs/models/paddings.js.map +1 -1
- package/build/cjs/schema/blocks.d.ts +1 -0
- package/build/cjs/schema/blocks.js +1 -0
- package/build/cjs/schema/blocks.js.map +1 -1
- package/build/cjs/schema/index.d.ts +96 -0
- package/build/cjs/schema/index.js +2 -1
- package/build/cjs/schema/index.js.map +1 -1
- package/build/esm/blocks/SideCardList/SideCardList.css +47 -0
- package/build/esm/blocks/SideCardList/SideCardList.d.ts +4 -0
- package/build/esm/blocks/SideCardList/SideCardList.js +18 -0
- package/build/esm/blocks/SideCardList/SideCardList.js.map +1 -0
- package/build/esm/blocks/SideCardList/schema.d.ts +94 -0
- package/build/esm/blocks/SideCardList/schema.js +34 -0
- package/build/esm/blocks/SideCardList/schema.js.map +1 -0
- package/build/esm/blocks/Take/Take.css +70 -0
- package/build/esm/blocks/Take/Take.d.ts +3 -0
- package/build/esm/blocks/Take/Take.js +24 -0
- package/build/esm/blocks/Take/Take.js.map +1 -0
- package/build/esm/blocks/Take/schema.d.ts +96 -0
- package/build/esm/blocks/Take/schema.js +23 -0
- package/build/esm/blocks/Take/schema.js.map +1 -0
- package/build/esm/components/Wrapper/Wrapper.css +42 -0
- package/build/esm/components/Wrapper/Wrapper.d.ts +1 -0
- package/build/esm/components/Wrapper/Wrapper.js +2 -2
- package/build/esm/components/Wrapper/Wrapper.js.map +1 -1
- package/build/esm/constructor/blocksMap.d.ts +2 -0
- package/build/esm/constructor/blocksMap.js +4 -0
- package/build/esm/constructor/blocksMap.js.map +1 -1
- package/build/esm/hooks/useExtendedComponentMap.d.ts +2 -0
- package/build/esm/models/blocks.d.ts +21 -2
- package/build/esm/models/blocks.js.map +1 -1
- package/build/esm/models/common.d.ts +3 -1
- package/build/esm/models/common.js +2 -0
- package/build/esm/models/common.js.map +1 -1
- package/build/esm/models/paddings.d.ts +1 -1
- package/build/esm/models/paddings.js.map +1 -1
- package/build/esm/schema/blocks.d.ts +1 -0
- package/build/esm/schema/blocks.js +1 -0
- package/build/esm/schema/blocks.js.map +1 -1
- package/build/esm/schema/index.d.ts +96 -0
- package/build/esm/schema/index.js +2 -1
- package/build/esm/schema/index.js.map +1 -1
- package/package.json +1 -1
- package/server/models/blocks.d.ts +21 -2
- package/server/models/common.d.ts +3 -1
- package/server/models/common.js +2 -0
- package/server/models/paddings.d.ts +1 -1
- package/styles/mixins.scss +60 -0
@@ -1,5 +1,5 @@
|
|
1
1
|
import * as React from 'react';
|
2
|
-
import { ContentBlockProps, FormBlockData, HeaderBlockProps, MediaProps as PCMediaProps, TextTheme } from '@gravity-ui/page-constructor';
|
2
|
+
import { AuthorItem, ContentBlockProps, FormBlockData, HeaderBlockProps, MediaProps as PCMediaProps, TextTheme } from '@gravity-ui/page-constructor';
|
3
3
|
import { BlockType, ClassNameProps, PostData, QAProps } from "./common.js";
|
4
4
|
import { PaddingsYFMProps } from "./paddings.js";
|
5
5
|
export type AuthorProps = ClassNameProps & {
|
@@ -53,6 +53,19 @@ export type FormProps = {
|
|
53
53
|
export type CompactMediaProps = {
|
54
54
|
description?: string;
|
55
55
|
} & PaddingsYFMProps & Partial<Pick<PCMediaProps, 'image'>>;
|
56
|
+
export type TakeProps = YFMProps & {
|
57
|
+
author: AuthorItem;
|
58
|
+
color?: string;
|
59
|
+
noBackground?: boolean;
|
60
|
+
};
|
61
|
+
export type SideCard = Pick<PCMediaProps, 'image'> & {
|
62
|
+
description: string;
|
63
|
+
url: string;
|
64
|
+
};
|
65
|
+
export type SideCardListProps = {
|
66
|
+
title?: string;
|
67
|
+
items: SideCard[];
|
68
|
+
} & PaddingsYFMProps;
|
56
69
|
export type AuthorBlockModel = {
|
57
70
|
type: BlockType.Author;
|
58
71
|
} & AuthorProps;
|
@@ -92,7 +105,13 @@ export type FormBlockModel = {
|
|
92
105
|
export type CompactMediaBlockModel = {
|
93
106
|
type: BlockType.CompactMedia;
|
94
107
|
} & CompactMediaProps;
|
95
|
-
export type
|
108
|
+
export type TakeBlockModel = {
|
109
|
+
type: BlockType.Take;
|
110
|
+
} & TakeProps;
|
111
|
+
export type SideCardListBlockModel = {
|
112
|
+
type: BlockType.SideCardList;
|
113
|
+
} & SideCardListProps;
|
114
|
+
export type BlockModel = AuthorBlockModel | BannerBlockModel | ColoredTextBlockModel | CTABlockModel | HeaderBlockModel | LayoutBlockModel | MediaBlockModel | MetaBlockModel | SuggestBlockModel | YFMBlockModel | FeedBlockModel | CompactMediaBlockModel | TakeBlockModel | SideCardListBlockModel;
|
96
115
|
export type Block = BlockModel & {
|
97
116
|
[x: string]: any;
|
98
117
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"blocks.js","sourceRoot":"../../../src","sources":["models/blocks.ts"],"names":[],"mappings":"","sourcesContent":["import * as React from 'react';\n\nimport {\n ContentBlockProps,\n FormBlockData,\n HeaderBlockProps,\n MediaProps as PCMediaProps,\n TextTheme,\n} from '@gravity-ui/page-constructor';\n\nimport {BlockType, ClassNameProps, PostData, QAProps} from './common';\nimport {PaddingsYFMProps} from './paddings';\n\n// blocks props\nexport type AuthorProps = ClassNameProps & {\n authorId: number | string;\n image: string;\n} & PaddingsYFMProps &\n QAProps;\n\nexport type BannerProps = ContentBlockProps &\n QAProps & {\n color?: string;\n image?: string;\n imageSize?: 's' | 'm';\n } & PaddingsYFMProps;\n\nexport type ColoredTextProps = ContentBlockProps &\n QAProps & {\n background?: {\n color?: string;\n image?: string;\n altText?: string;\n };\n } & PaddingsYFMProps;\n\nexport type CTAProps = QAProps & {\n items: Array<ContentBlockProps>;\n} & PaddingsYFMProps;\n\ntype HeaderBlogProps = {\n imageInGrid?: boolean;\n};\n\nexport type HeaderProps = HeaderBlockProps & PaddingsYFMProps & HeaderBlogProps;\n\nexport type LayoutProps = {\n fullWidth?: boolean;\n mobileOrder?: string;\n children: React.ReactElement[];\n} & PaddingsYFMProps;\n\nexport type MediaProps = ClassNameProps &\n PaddingsYFMProps &\n Partial<\n Pick<\n PCMediaProps,\n | 'youtube'\n | 'previewImg'\n | 'image'\n | 'video'\n | 'dataLens'\n | 'videoIframe'\n | 'videoMicrodata'\n >\n > & {\n text?: string;\n };\n\nexport type MetaProps = QAProps & {\n locale: string;\n theme?: TextTheme;\n} & PaddingsYFMProps;\n\nexport type SuggestProps = ClassNameProps & {\n posts: PostData[];\n} & PaddingsYFMProps;\n\nexport type YFMProps = {\n text: string;\n} & PaddingsYFMProps &\n QAProps;\n\nexport type FeedProps = {\n image: string;\n};\n\nexport type FormProps = {\n formData: FormBlockData;\n border?: 'shadow' | 'line' | 'none';\n} & PaddingsYFMProps &\n QAProps;\n\nexport type CompactMediaProps = {\n description?: string;\n} & PaddingsYFMProps &\n Partial<Pick<PCMediaProps, 'image'>>;\n\n// blocks models\nexport type AuthorBlockModel = {\n type: BlockType.Author;\n} & AuthorProps;\n\nexport type BannerBlockModel = {\n type: BlockType.Banner;\n} & BannerProps;\n\nexport type ColoredTextBlockModel = {\n type: BlockType.ColoredText;\n} & ColoredTextProps;\n\nexport type CTABlockModel = {\n type: BlockType.CTA;\n} & CTAProps;\n\nexport type HeaderBlockModel = {\n type: BlockType.Header;\n} & HeaderProps;\n\nexport type LayoutBlockModel = {\n type: BlockType.Layout;\n} & LayoutProps;\n\nexport type MediaBlockModel = {\n type: BlockType.Media;\n} & MediaProps;\n\nexport type MetaBlockModel = {\n type: BlockType.Meta;\n} & MetaProps;\n\nexport type SuggestBlockModel = {\n type: BlockType.Suggest;\n} & SuggestProps;\n\nexport type YFMBlockModel = {\n type: BlockType.YFM;\n} & YFMProps;\n\nexport type FeedBlockModel = {\n type: BlockType.Feed;\n} & FeedProps;\n\nexport type FormBlockModel = {\n type: BlockType.Form;\n} & FormProps;\n\nexport type CompactMediaBlockModel = {\n type: BlockType.CompactMedia;\n} & CompactMediaProps;\n\nexport type BlockModel =\n | AuthorBlockModel\n | BannerBlockModel\n | ColoredTextBlockModel\n | CTABlockModel\n | HeaderBlockModel\n | LayoutBlockModel\n | MediaBlockModel\n | MetaBlockModel\n | SuggestBlockModel\n | YFMBlockModel\n | FeedBlockModel\n | CompactMediaBlockModel;\n\nexport type Block = BlockModel & {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n [x: string]: any;\n};\n"]}
|
1
|
+
{"version":3,"file":"blocks.js","sourceRoot":"../../../src","sources":["models/blocks.ts"],"names":[],"mappings":"","sourcesContent":["import * as React from 'react';\n\nimport {\n AuthorItem,\n ContentBlockProps,\n FormBlockData,\n HeaderBlockProps,\n MediaProps as PCMediaProps,\n TextTheme,\n} from '@gravity-ui/page-constructor';\n\nimport {BlockType, ClassNameProps, PostData, QAProps} from './common';\nimport {PaddingsYFMProps} from './paddings';\n\n// blocks props\nexport type AuthorProps = ClassNameProps & {\n authorId: number | string;\n image: string;\n} & PaddingsYFMProps &\n QAProps;\n\nexport type BannerProps = ContentBlockProps &\n QAProps & {\n color?: string;\n image?: string;\n imageSize?: 's' | 'm';\n } & PaddingsYFMProps;\n\nexport type ColoredTextProps = ContentBlockProps &\n QAProps & {\n background?: {\n color?: string;\n image?: string;\n altText?: string;\n };\n } & PaddingsYFMProps;\n\nexport type CTAProps = QAProps & {\n items: Array<ContentBlockProps>;\n} & PaddingsYFMProps;\n\ntype HeaderBlogProps = {\n imageInGrid?: boolean;\n};\n\nexport type HeaderProps = HeaderBlockProps & PaddingsYFMProps & HeaderBlogProps;\n\nexport type LayoutProps = {\n fullWidth?: boolean;\n mobileOrder?: string;\n children: React.ReactElement[];\n} & PaddingsYFMProps;\n\nexport type MediaProps = ClassNameProps &\n PaddingsYFMProps &\n Partial<\n Pick<\n PCMediaProps,\n | 'youtube'\n | 'previewImg'\n | 'image'\n | 'video'\n | 'dataLens'\n | 'videoIframe'\n | 'videoMicrodata'\n >\n > & {\n text?: string;\n };\n\nexport type MetaProps = QAProps & {\n locale: string;\n theme?: TextTheme;\n} & PaddingsYFMProps;\n\nexport type SuggestProps = ClassNameProps & {\n posts: PostData[];\n} & PaddingsYFMProps;\n\nexport type YFMProps = {\n text: string;\n} & PaddingsYFMProps &\n QAProps;\n\nexport type FeedProps = {\n image: string;\n};\n\nexport type FormProps = {\n formData: FormBlockData;\n border?: 'shadow' | 'line' | 'none';\n} & PaddingsYFMProps &\n QAProps;\n\nexport type CompactMediaProps = {\n description?: string;\n} & PaddingsYFMProps &\n Partial<Pick<PCMediaProps, 'image'>>;\n\nexport type TakeProps = YFMProps & {\n author: AuthorItem;\n color?: string;\n noBackground?: boolean;\n};\n\nexport type SideCard = Pick<PCMediaProps, 'image'> & {\n description: string;\n url: string;\n};\n\nexport type SideCardListProps = {\n title?: string;\n items: SideCard[];\n} & PaddingsYFMProps;\n\n// blocks models\nexport type AuthorBlockModel = {\n type: BlockType.Author;\n} & AuthorProps;\n\nexport type BannerBlockModel = {\n type: BlockType.Banner;\n} & BannerProps;\n\nexport type ColoredTextBlockModel = {\n type: BlockType.ColoredText;\n} & ColoredTextProps;\n\nexport type CTABlockModel = {\n type: BlockType.CTA;\n} & CTAProps;\n\nexport type HeaderBlockModel = {\n type: BlockType.Header;\n} & HeaderProps;\n\nexport type LayoutBlockModel = {\n type: BlockType.Layout;\n} & LayoutProps;\n\nexport type MediaBlockModel = {\n type: BlockType.Media;\n} & MediaProps;\n\nexport type MetaBlockModel = {\n type: BlockType.Meta;\n} & MetaProps;\n\nexport type SuggestBlockModel = {\n type: BlockType.Suggest;\n} & SuggestProps;\n\nexport type YFMBlockModel = {\n type: BlockType.YFM;\n} & YFMProps;\n\nexport type FeedBlockModel = {\n type: BlockType.Feed;\n} & FeedProps;\n\nexport type FormBlockModel = {\n type: BlockType.Form;\n} & FormProps;\n\nexport type CompactMediaBlockModel = {\n type: BlockType.CompactMedia;\n} & CompactMediaProps;\n\nexport type TakeBlockModel = {\n type: BlockType.Take;\n} & TakeProps;\n\nexport type SideCardListBlockModel = {\n type: BlockType.SideCardList;\n} & SideCardListProps;\n\nexport type BlockModel =\n | AuthorBlockModel\n | BannerBlockModel\n | ColoredTextBlockModel\n | CTABlockModel\n | HeaderBlockModel\n | LayoutBlockModel\n | MediaBlockModel\n | MetaBlockModel\n | SuggestBlockModel\n | YFMBlockModel\n | FeedBlockModel\n | CompactMediaBlockModel\n | TakeBlockModel\n | SideCardListBlockModel;\n\nexport type Block = BlockModel & {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n [x: string]: any;\n};\n"]}
|
@@ -98,7 +98,9 @@ export declare enum BlockType {
|
|
98
98
|
Meta = "blog-meta-block",
|
99
99
|
Feed = "blog-feed-block",
|
100
100
|
Form = "blog-form-block",
|
101
|
-
CompactMedia = "blog-compact-media-block"
|
101
|
+
CompactMedia = "blog-compact-media-block",
|
102
|
+
Take = "blog-take-block",
|
103
|
+
SideCardList = "blog-side-card-list-block"
|
102
104
|
}
|
103
105
|
export type MetaProps = {
|
104
106
|
metaComponent: JSX.Element;
|
@@ -21,6 +21,8 @@ var BlockType;
|
|
21
21
|
BlockType["Feed"] = "blog-feed-block";
|
22
22
|
BlockType["Form"] = "blog-form-block";
|
23
23
|
BlockType["CompactMedia"] = "blog-compact-media-block";
|
24
|
+
BlockType["Take"] = "blog-take-block";
|
25
|
+
BlockType["SideCardList"] = "blog-side-card-list-block";
|
24
26
|
})(BlockType || (exports.BlockType = BlockType = {}));
|
25
27
|
var DefaultEventNames;
|
26
28
|
(function (DefaultEventNames) {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"common.js","sourceRoot":"../../../src","sources":["models/common.ts"],"names":[],"mappings":";;;AASA,IAAY,KAGX;AAHD,WAAY,KAAK;IACb,wBAAe,CAAA;IACf,sBAAa,CAAA;AACjB,CAAC,EAHW,KAAK,qBAAL,KAAK,QAGhB;AA2FD,IAAY,
|
1
|
+
{"version":3,"file":"common.js","sourceRoot":"../../../src","sources":["models/common.ts"],"names":[],"mappings":";;;AASA,IAAY,KAGX;AAHD,WAAY,KAAK;IACb,wBAAe,CAAA;IACf,sBAAa,CAAA;AACjB,CAAC,EAHW,KAAK,qBAAL,KAAK,QAGhB;AA2FD,IAAY,SAgBX;AAhBD,WAAY,SAAS;IACjB,yCAA4B,CAAA;IAC5B,mCAAsB,CAAA;IACtB,yCAA4B,CAAA;IAC5B,uCAA0B,CAAA;IAC1B,yCAA4B,CAAA;IAC5B,mCAAsB,CAAA;IACtB,oDAAuC,CAAA;IACvC,yCAA4B,CAAA;IAC5B,2CAA8B,CAAA;IAC9B,qCAAwB,CAAA;IACxB,qCAAwB,CAAA;IACxB,qCAAwB,CAAA;IACxB,sDAAyC,CAAA;IACzC,qCAAwB,CAAA;IACxB,uDAA0C,CAAA;AAC9C,CAAC,EAhBW,SAAS,yBAAT,SAAS,QAgBpB;AA+DD,IAAY,iBAUX;AAVD,WAAY,iBAAiB;IACzB,uDAAkC,CAAA;IAClC,qDAAgC,CAAA;IAChC,wDAAmC,CAAA;IACnC,kEAA6C,CAAA;IAC7C,kEAA6C,CAAA;IAC7C,kEAA6C,CAAA;IAC7C,+CAA0B,CAAA;IAC1B,uDAAkC,CAAA;IAClC,wDAAmC,CAAA;AACvC,CAAC,EAVW,iBAAiB,iCAAjB,iBAAiB,QAU5B;AAWD,IAAY,YAGX;AAHD,WAAY,YAAY;IACpB,2BAAW,CAAA;IACX,4BAAY,CAAA;AAChB,CAAC,EAHW,YAAY,4BAAZ,YAAY,QAGvB;AAED,IAAY,yBAGX;AAHD,WAAY,yBAAyB;IACjC,sCAAS,CAAA;IACT,sCAAS,CAAA;AACb,CAAC,EAHW,yBAAyB,yCAAzB,yBAAyB,QAGpC","sourcesContent":["import * as React from 'react';\n\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport {MarkdownItPluginCb} from '@diplodoc/transform/lib/plugins/typings';\nimport {HeaderBlockProps as PageConstructorHeaderBlockProps} from '@gravity-ui/page-constructor';\nimport {IBrowser, IDevice} from 'ua-parser-js';\n\nimport {Locale} from '../models/locale';\n\nexport enum Theme {\n Light = 'light',\n Dark = 'dark',\n}\n\nexport interface ClassNameProps {\n className?: string;\n}\n\nexport type Author = {\n id: number | string;\n avatar: string | null;\n createdAt: string;\n updatedAt: string;\n firstName: string | null;\n secondName: string | null;\n description: string | null;\n fullDescription: string | null;\n shortDescription: string | null;\n} & {\n [x: string]: string | null;\n};\n\nexport type Service = {\n id: number | string;\n slug: string;\n name: string;\n} & {\n [x: string]: string | null;\n};\n\nexport type Query = Record<string, number | string | null>;\n\n//page models\n\nexport interface Menu {\n title: string;\n}\n\nexport interface WithDeviceProps {\n device: IDevice;\n browser: IBrowser;\n isRobot: boolean;\n}\n\nexport interface PostsProps {\n posts: PostData[];\n count: number;\n totalCount: number;\n pinnedPost?: PostData;\n}\n\nexport type Tag = {\n slug: string;\n name: string;\n createdAt?: string;\n updatedAt?: string;\n icon?: string;\n isDeleted?: boolean;\n locale?: string;\n blogTagId?: number | string;\n count?: number;\n};\n\nexport interface PostData {\n author?: string;\n authors?: Author[];\n blogPostId?: number | string;\n content?: string;\n date: string;\n description?: string;\n hasUserLike: boolean;\n htmlTitle: string;\n id: number;\n image: string;\n isPublished?: boolean;\n sharedImage?: string;\n likes: number;\n locale: Locale;\n metaDescription?: string | null;\n metaTitle?: string | null;\n readingTime?: number;\n shareDescription?: string;\n shareImage?: string;\n shareTitle?: string;\n slug: string;\n keywords?: string[];\n tags: Tag[];\n textTitle: string;\n title: string;\n url: string;\n noIndex?: boolean;\n}\n\nexport enum BlockType {\n Header = 'blog-header-block',\n YFM = 'blog-yfm-block',\n Layout = 'blog-layout-block',\n Media = 'blog-media-block',\n Banner = 'blog-banner-block',\n CTA = 'blog-cta-block',\n ColoredText = 'blog-colored-text-block',\n Author = 'blog-author-block',\n Suggest = 'blog-suggest-block',\n Meta = 'blog-meta-block',\n Feed = 'blog-feed-block',\n Form = 'blog-form-block',\n CompactMedia = 'blog-compact-media-block',\n Take = 'blog-take-block',\n SideCardList = 'blog-side-card-list-block',\n}\n\nexport type MetaProps = {\n metaComponent: JSX.Element;\n needHelmetWrapper: boolean;\n};\n\nexport type MetaOrganizationType = {\n url: string;\n appTitle: string;\n legalName: string;\n supportEmail: string;\n};\n\nexport interface PostMetaProps {\n title: string;\n date: string;\n image: string;\n canonicalUrl: string;\n content?: string;\n description?: string;\n sharing: {\n shareTitle: string;\n shareDescription: string;\n shareImage: string;\n shareGenImage: string;\n shareGenTitle: string;\n };\n keywords?: string[];\n noIndex?: boolean;\n authors?: Author[];\n tags?: Tag[];\n organization: MetaOrganizationType;\n}\n\nexport type ToggleLikeCallbackType = ({\n postId,\n hasLike,\n}: {\n postId?: number | string;\n hasLike?: boolean;\n}) => void;\n\nexport interface HeaderBlockProps extends PageConstructorHeaderBlockProps {\n backLink?: {\n url: string;\n title: React.ReactNode;\n };\n}\n\nexport type GetPostsRequest = {\n tags: string | undefined;\n page: number;\n perPage: number;\n savedOnly: boolean;\n search: string | undefined;\n services: string | undefined;\n};\n\nexport type GetPostsType = (query: GetPostsRequest) => Promise<PostsProps>;\n\nexport type HandleChangeQueryParams = (params: Query) => void;\n\nexport enum DefaultEventNames {\n ShareButton = 'share-button-click',\n SaveButton = 'save-button-click',\n ShowMore = 'show-more-button-click',\n PaginatorHome = 'paginator-home-button-click',\n PaginatorNext = 'paginator-next-button-click',\n PaginatorPage = 'paginator-page-button-click',\n Tag = 'selector-tag-click',\n Service = 'selector-service-click',\n SaveOnly = 'save-only-button-click',\n}\n\nexport type FetchArgs = {\n page?: number;\n query: Query;\n};\n\nexport interface QAProps {\n qa?: string;\n}\n\nexport enum PostCardSize {\n SMALL = 's',\n MEDIUM = 'm',\n}\n\nexport enum PostCardTitleHeadingLevel {\n H2 = 'h2',\n H3 = 'h3',\n}\n\nexport interface TransformPostOptions {\n plugins?: MarkdownItPluginCb[];\n}\n"]}
|
@@ -4,7 +4,7 @@ export declare enum PaddingsDirections {
|
|
4
4
|
left = "left",
|
5
5
|
right = "right"
|
6
6
|
}
|
7
|
-
export type PaddingSize = 'xs' | 's' | 'm' | 'l' | 'xl';
|
7
|
+
export type PaddingSize = 'xs' | 's' | 'sm' | 'm' | 'l' | 'xl';
|
8
8
|
export type Paddings = {
|
9
9
|
[key in PaddingsDirections]?: PaddingSize;
|
10
10
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"paddings.js","sourceRoot":"../../../src","sources":["models/paddings.ts"],"names":[],"mappings":";;;AAAA,IAAY,kBAKX;AALD,WAAY,kBAAkB;IAC1B,iCAAW,CAAA;IACX,uCAAiB,CAAA;IACjB,mCAAa,CAAA;IACb,qCAAe,CAAA;AACnB,CAAC,EALW,kBAAkB,kCAAlB,kBAAkB,QAK7B","sourcesContent":["export enum PaddingsDirections {\n top = 'top',\n bottom = 'bottom',\n left = 'left',\n right = 'right',\n}\n\nexport type PaddingSize = 'xs' | 's' | 'm' | 'l' | 'xl';\n\nexport type Paddings = {\n [key in PaddingsDirections]?: PaddingSize;\n};\n\nexport type PaddingsYFMProps = {\n paddingTop?: PaddingSize;\n paddingBottom?: PaddingSize;\n paddingRight?: PaddingSize;\n paddingLeft?: PaddingSize;\n};\n"]}
|
1
|
+
{"version":3,"file":"paddings.js","sourceRoot":"../../../src","sources":["models/paddings.ts"],"names":[],"mappings":";;;AAAA,IAAY,kBAKX;AALD,WAAY,kBAAkB;IAC1B,iCAAW,CAAA;IACX,uCAAiB,CAAA;IACjB,mCAAa,CAAA;IACb,qCAAe,CAAA;AACnB,CAAC,EALW,kBAAkB,kCAAlB,kBAAkB,QAK7B","sourcesContent":["export enum PaddingsDirections {\n top = 'top',\n bottom = 'bottom',\n left = 'left',\n right = 'right',\n}\n\nexport type PaddingSize = 'xs' | 's' | 'sm' | 'm' | 'l' | 'xl';\n\nexport type Paddings = {\n [key in PaddingsDirections]?: PaddingSize;\n};\n\nexport type PaddingsYFMProps = {\n paddingTop?: PaddingSize;\n paddingBottom?: PaddingSize;\n paddingRight?: PaddingSize;\n paddingLeft?: PaddingSize;\n};\n"]}
|
@@ -12,4 +12,5 @@ tslib_1.__exportStar(require("../blocks/Meta/schema.js"), exports);
|
|
12
12
|
tslib_1.__exportStar(require("../blocks/Suggest/schema.js"), exports);
|
13
13
|
tslib_1.__exportStar(require("../blocks/YFM/schema.js"), exports);
|
14
14
|
tslib_1.__exportStar(require("../blocks/CompactMedia/schema.js"), exports);
|
15
|
+
tslib_1.__exportStar(require("../blocks/Take/schema.js"), exports);
|
15
16
|
//# sourceMappingURL=blocks.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"blocks.js","sourceRoot":"../../../src","sources":["schema/blocks.ts"],"names":[],"mappings":";;;AAAA,qEAAwC;AACxC,qEAAwC;AACxC,0EAA6C;AAC7C,kEAAqC;AACrC,mEAAsC;AACtC,qEAAwC;AACxC,oEAAuC;AACvC,mEAAsC;AACtC,sEAAyC;AACzC,kEAAqC;AACrC,2EAA8C","sourcesContent":["export * from '../blocks/Author/schema';\nexport * from '../blocks/Banner/schema';\nexport * from '../blocks/ColoredText/schema';\nexport * from '../blocks/CTA/schema';\nexport * from '../blocks/Feed/schema';\nexport * from '../blocks/Layout/schema';\nexport * from '../blocks/Media/schema';\nexport * from '../blocks/Meta/schema';\nexport * from '../blocks/Suggest/schema';\nexport * from '../blocks/YFM/schema';\nexport * from '../blocks/CompactMedia/schema';\n"]}
|
1
|
+
{"version":3,"file":"blocks.js","sourceRoot":"../../../src","sources":["schema/blocks.ts"],"names":[],"mappings":";;;AAAA,qEAAwC;AACxC,qEAAwC;AACxC,0EAA6C;AAC7C,kEAAqC;AACrC,mEAAsC;AACtC,qEAAwC;AACxC,oEAAuC;AACvC,mEAAsC;AACtC,sEAAyC;AACzC,kEAAqC;AACrC,2EAA8C;AAC9C,mEAAsC","sourcesContent":["export * from '../blocks/Author/schema';\nexport * from '../blocks/Banner/schema';\nexport * from '../blocks/ColoredText/schema';\nexport * from '../blocks/CTA/schema';\nexport * from '../blocks/Feed/schema';\nexport * from '../blocks/Layout/schema';\nexport * from '../blocks/Media/schema';\nexport * from '../blocks/Meta/schema';\nexport * from '../blocks/Suggest/schema';\nexport * from '../blocks/YFM/schema';\nexport * from '../blocks/CompactMedia/schema';\nexport * from '../blocks/Take/schema';\n"]}
|
@@ -2136,5 +2136,101 @@ export declare const schemasForCustom: {
|
|
2136
2136
|
};
|
2137
2137
|
};
|
2138
2138
|
};
|
2139
|
+
"blog-take-block": {
|
2140
|
+
"blog-take-block": {
|
2141
|
+
type: string;
|
2142
|
+
additionalProperties: boolean;
|
2143
|
+
required: string[];
|
2144
|
+
properties: {
|
2145
|
+
text: {
|
2146
|
+
type: string;
|
2147
|
+
contentType: string;
|
2148
|
+
};
|
2149
|
+
author: {
|
2150
|
+
type: string;
|
2151
|
+
additionalProperties: boolean;
|
2152
|
+
required: string[];
|
2153
|
+
properties: {
|
2154
|
+
firstName: {
|
2155
|
+
type: string;
|
2156
|
+
contentType: string;
|
2157
|
+
};
|
2158
|
+
secondName: {
|
2159
|
+
type: string;
|
2160
|
+
contentType: string;
|
2161
|
+
};
|
2162
|
+
description: {
|
2163
|
+
type: string;
|
2164
|
+
contentType: string;
|
2165
|
+
};
|
2166
|
+
avatar: {
|
2167
|
+
type: string;
|
2168
|
+
};
|
2169
|
+
};
|
2170
|
+
};
|
2171
|
+
paddingTop: {
|
2172
|
+
type: string;
|
2173
|
+
enum: string[];
|
2174
|
+
};
|
2175
|
+
paddingBottom: {
|
2176
|
+
type: string;
|
2177
|
+
enum: string[];
|
2178
|
+
};
|
2179
|
+
fullWidth: {
|
2180
|
+
type: string;
|
2181
|
+
};
|
2182
|
+
column: {
|
2183
|
+
type: string;
|
2184
|
+
enum: string[];
|
2185
|
+
};
|
2186
|
+
qa: {
|
2187
|
+
type: string;
|
2188
|
+
};
|
2189
|
+
anchor: {
|
2190
|
+
type: string;
|
2191
|
+
additionalProperties: boolean;
|
2192
|
+
required: string[];
|
2193
|
+
properties: {
|
2194
|
+
text: {
|
2195
|
+
type: string;
|
2196
|
+
contentType: string;
|
2197
|
+
};
|
2198
|
+
url: {
|
2199
|
+
type: string;
|
2200
|
+
};
|
2201
|
+
urlTitle: {
|
2202
|
+
type: string;
|
2203
|
+
};
|
2204
|
+
};
|
2205
|
+
};
|
2206
|
+
visible: {
|
2207
|
+
type: string;
|
2208
|
+
enum: string[];
|
2209
|
+
};
|
2210
|
+
resetPaddings: {
|
2211
|
+
type: string;
|
2212
|
+
};
|
2213
|
+
context: {
|
2214
|
+
type: string;
|
2215
|
+
};
|
2216
|
+
indent: {
|
2217
|
+
type: string;
|
2218
|
+
additionalProperties: boolean;
|
2219
|
+
properties: {
|
2220
|
+
top: {
|
2221
|
+
enum: string[];
|
2222
|
+
};
|
2223
|
+
bottom: {
|
2224
|
+
enum: string[];
|
2225
|
+
};
|
2226
|
+
};
|
2227
|
+
};
|
2228
|
+
type: {};
|
2229
|
+
when: {
|
2230
|
+
type: string;
|
2231
|
+
};
|
2232
|
+
};
|
2233
|
+
};
|
2234
|
+
};
|
2139
2235
|
};
|
2140
2236
|
};
|
@@ -5,7 +5,7 @@ const tslib_1 = require("tslib");
|
|
5
5
|
const common_1 = require("../models/common.js");
|
6
6
|
const blocks = tslib_1.__importStar(require("./blocks.js"));
|
7
7
|
const headers = tslib_1.__importStar(require("./headers.js"));
|
8
|
-
const { Author, Banner, ColoredText, CTA, Feed, Layout, Media, Meta, Suggest, YFM, CompactMedia } = blocks;
|
8
|
+
const { Author, Banner, ColoredText, CTA, Feed, Layout, Media, Meta, Suggest, YFM, CompactMedia, Take, } = blocks;
|
9
9
|
const { Header } = headers;
|
10
10
|
exports.validators = {
|
11
11
|
blocks,
|
@@ -27,6 +27,7 @@ exports.schemasForCustom = {
|
|
27
27
|
[common_1.BlockType.Suggest]: Suggest,
|
28
28
|
[common_1.BlockType.YFM]: YFM,
|
29
29
|
[common_1.BlockType.CompactMedia]: CompactMedia,
|
30
|
+
[common_1.BlockType.Take]: Take,
|
30
31
|
},
|
31
32
|
};
|
32
33
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"../../../src","sources":["schema/index.ts"],"names":[],"mappings":";;;;AAAA,gDAA2C;AAE3C,4DAAmC;AACnC,8DAAqC;AAErC,MAAM,
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"../../../src","sources":["schema/index.ts"],"names":[],"mappings":";;;;AAAA,gDAA2C;AAE3C,4DAAmC;AACnC,8DAAqC;AAErC,MAAM,EACF,MAAM,EACN,MAAM,EACN,WAAW,EACX,GAAG,EACH,IAAI,EACJ,MAAM,EACN,KAAK,EACL,IAAI,EACJ,OAAO,EACP,GAAG,EACH,YAAY,EACZ,IAAI,GACP,GAAG,MAAM,CAAC;AACX,MAAM,EAAC,MAAM,EAAC,GAAG,OAAO,CAAC;AAEZ,QAAA,UAAU,GAAG;IACtB,MAAM;IACN,OAAO;CACV,CAAC;AAEW,QAAA,gBAAgB,GAAG;IAC5B,OAAO,EAAE;QACL,CAAC,kBAAS,CAAC,MAAM,CAAC,EAAE,MAAM;KAC7B;IACD,MAAM,EAAE;QACJ,CAAC,kBAAS,CAAC,MAAM,CAAC,EAAE,MAAM;QAC1B,CAAC,kBAAS,CAAC,MAAM,CAAC,EAAE,MAAM;QAC1B,CAAC,kBAAS,CAAC,WAAW,CAAC,EAAE,WAAW;QACpC,CAAC,kBAAS,CAAC,GAAG,CAAC,EAAE,GAAG;QACpB,CAAC,kBAAS,CAAC,IAAI,CAAC,EAAE,IAAI;QACtB,CAAC,kBAAS,CAAC,MAAM,CAAC,EAAE,MAAM;QAC1B,CAAC,kBAAS,CAAC,KAAK,CAAC,EAAE,KAAK;QACxB,CAAC,kBAAS,CAAC,IAAI,CAAC,EAAE,IAAI;QACtB,CAAC,kBAAS,CAAC,OAAO,CAAC,EAAE,OAAO;QAC5B,CAAC,kBAAS,CAAC,GAAG,CAAC,EAAE,GAAG;QACpB,CAAC,kBAAS,CAAC,YAAY,CAAC,EAAE,YAAY;QACtC,CAAC,kBAAS,CAAC,IAAI,CAAC,EAAE,IAAI;KACzB;CACJ,CAAC","sourcesContent":["import {BlockType} from '../models/common';\n\nimport * as blocks from './blocks';\nimport * as headers from './headers';\n\nconst {\n Author,\n Banner,\n ColoredText,\n CTA,\n Feed,\n Layout,\n Media,\n Meta,\n Suggest,\n YFM,\n CompactMedia,\n Take,\n} = blocks;\nconst {Header} = headers;\n\nexport const validators = {\n blocks,\n headers,\n};\n\nexport const schemasForCustom = {\n headers: {\n [BlockType.Header]: Header,\n },\n blocks: {\n [BlockType.Author]: Author,\n [BlockType.Banner]: Banner,\n [BlockType.ColoredText]: ColoredText,\n [BlockType.CTA]: CTA,\n [BlockType.Feed]: Feed,\n [BlockType.Layout]: Layout,\n [BlockType.Media]: Media,\n [BlockType.Meta]: Meta,\n [BlockType.Suggest]: Suggest,\n [BlockType.YFM]: YFM,\n [BlockType.CompactMedia]: CompactMedia,\n [BlockType.Take]: Take,\n },\n};\n"]}
|
@@ -0,0 +1,47 @@
|
|
1
|
+
/* use this for style redefinitions to awoid problems with
|
2
|
+
unpredictable css rules order in build */
|
3
|
+
.bc-side-card-list__container {
|
4
|
+
display: flex;
|
5
|
+
flex-direction: column;
|
6
|
+
gap: 24px;
|
7
|
+
max-width: 296px;
|
8
|
+
}
|
9
|
+
.bc-side-card-list__title {
|
10
|
+
font-size: var(--g-text-header-2-font-size);
|
11
|
+
line-height: var(--g-text-header-2-line-height);
|
12
|
+
font-weight: 500;
|
13
|
+
}
|
14
|
+
.bc-side-card-list__items {
|
15
|
+
display: flex;
|
16
|
+
flex-direction: column;
|
17
|
+
gap: 16px;
|
18
|
+
}
|
19
|
+
.bc-side-card-list__item.bc-side-card-list__item {
|
20
|
+
min-height: auto;
|
21
|
+
}
|
22
|
+
|
23
|
+
.bc-side-card-list__item-image {
|
24
|
+
object-fit: contain;
|
25
|
+
object-position: left;
|
26
|
+
max-height: 104px;
|
27
|
+
max-width: 232px;
|
28
|
+
width: auto;
|
29
|
+
}
|
30
|
+
.bc-side-card-list__item-media {
|
31
|
+
max-width: 232px;
|
32
|
+
padding: 0 0 16px;
|
33
|
+
}
|
34
|
+
.bc-side-card-list__item-description {
|
35
|
+
padding-bottom: 12px;
|
36
|
+
}
|
37
|
+
@media (max-width: 1081px) {
|
38
|
+
.bc-side-card-list__container {
|
39
|
+
max-width: none;
|
40
|
+
width: 50%;
|
41
|
+
}
|
42
|
+
}
|
43
|
+
@media (max-width: 577px) {
|
44
|
+
.bc-side-card-list__container {
|
45
|
+
width: 100%;
|
46
|
+
}
|
47
|
+
}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
|
+
import { CardBase, Media as PCMedia, YFMWrapper } from '@gravity-ui/page-constructor';
|
3
|
+
import { Wrapper } from "../../components/Wrapper/Wrapper.js";
|
4
|
+
import { PaddingsDirections } from "../../models/paddings.js";
|
5
|
+
import { block } from "../../utils/cn.js";
|
6
|
+
import './SideCardList.css';
|
7
|
+
const b = block('side-card-list');
|
8
|
+
export const SideCardList = ({ title, items, paddingTop, paddingBottom }) => {
|
9
|
+
return (_jsxs(Wrapper, { paddings: {
|
10
|
+
[PaddingsDirections.top]: paddingTop,
|
11
|
+
[PaddingsDirections.bottom]: paddingBottom,
|
12
|
+
}, className: b('container'), children: [title && _jsx("div", { className: b('title'), children: title }), _jsx("div", { className: b('items'), children: items.map(({ url, description, image }, index) => (_jsx(CardBase, { url: url, className: b('item'), children: _jsxs(CardBase.Content, { children: [_jsx(PCMedia, { className: b('item-media'), imageClassName: b('item-image'), image: image }), description && (_jsx("div", { className: b('item-description'), children: _jsx(YFMWrapper, { content: description, modifiers: {
|
13
|
+
blog: true,
|
14
|
+
resetPaddings: true,
|
15
|
+
} }) }))] }) }, index))) })] }));
|
16
|
+
};
|
17
|
+
export default SideCardList;
|
18
|
+
//# sourceMappingURL=SideCardList.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"SideCardList.js","sourceRoot":"../../../../src","sources":["blocks/SideCardList/SideCardList.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAC,QAAQ,EAAE,KAAK,IAAI,OAAO,EAAE,UAAU,EAAC,MAAM,8BAA8B,CAAC;AAEpF,OAAO,EAAC,OAAO,EAAC,4CAAyC;AAEzD,OAAO,EAAC,kBAAkB,EAAC,iCAA8B;AACzD,OAAO,EAAC,KAAK,EAAC,0BAAuB;AAErC,OAAO,oBAAoB,CAAC;AAE5B,MAAM,CAAC,GAAG,KAAK,CAAC,gBAAgB,CAAC,CAAC;AAElC,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,EAAC,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,aAAa,EAAoB,EAAE,EAAE;IACzF,OAAO,CACH,MAAC,OAAO,IACJ,QAAQ,EAAE;YACN,CAAC,kBAAkB,CAAC,GAAG,CAAC,EAAE,UAAU;YACpC,CAAC,kBAAkB,CAAC,MAAM,CAAC,EAAE,aAAa;SAC7C,EACD,SAAS,EAAE,CAAC,CAAC,WAAW,CAAC,aAExB,KAAK,IAAI,cAAK,SAAS,EAAE,CAAC,CAAC,OAAO,CAAC,YAAG,KAAK,GAAO,EACnD,cAAK,SAAS,EAAE,CAAC,CAAC,OAAO,CAAC,YACrB,KAAK,CAAC,GAAG,CAAC,CAAC,EAAC,GAAG,EAAE,WAAW,EAAE,KAAK,EAAC,EAAE,KAAK,EAAE,EAAE,CAAC,CAC7C,KAAC,QAAQ,IAAa,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,CAAC,CAAC,MAAM,CAAC,YAChD,MAAC,QAAQ,CAAC,OAAO,eACb,KAAC,OAAO,IACJ,SAAS,EAAE,CAAC,CAAC,YAAY,CAAC,EAC1B,cAAc,EAAE,CAAC,CAAC,YAAY,CAAC,EAC/B,KAAK,EAAE,KAAK,GACd,EACD,WAAW,IAAI,CACZ,cAAK,SAAS,EAAE,CAAC,CAAC,kBAAkB,CAAC,YACjC,KAAC,UAAU,IACP,OAAO,EAAE,WAAW,EACpB,SAAS,EAAE;wCACP,IAAI,EAAE,IAAI;wCACV,aAAa,EAAE,IAAI;qCACtB,GACH,GACA,CACT,IACc,IAlBR,KAAK,CAmBT,CACd,CAAC,GACA,IACA,CACb,CAAC;AACN,CAAC,CAAC;AAEF,eAAe,YAAY,CAAC","sourcesContent":["import {CardBase, Media as PCMedia, YFMWrapper} from '@gravity-ui/page-constructor';\n\nimport {Wrapper} from '../../components/Wrapper/Wrapper';\nimport {SideCardListProps} from '../../models/blocks';\nimport {PaddingsDirections} from '../../models/paddings';\nimport {block} from '../../utils/cn';\n\nimport './SideCardList.scss';\n\nconst b = block('side-card-list');\n\nexport const SideCardList = ({title, items, paddingTop, paddingBottom}: SideCardListProps) => {\n return (\n <Wrapper\n paddings={{\n [PaddingsDirections.top]: paddingTop,\n [PaddingsDirections.bottom]: paddingBottom,\n }}\n className={b('container')}\n >\n {title && <div className={b('title')}>{title}</div>}\n <div className={b('items')}>\n {items.map(({url, description, image}, index) => (\n <CardBase key={index} url={url} className={b('item')}>\n <CardBase.Content>\n <PCMedia\n className={b('item-media')}\n imageClassName={b('item-image')}\n image={image}\n />\n {description && (\n <div className={b('item-description')}>\n <YFMWrapper\n content={description}\n modifiers={{\n blog: true,\n resetPaddings: true,\n }}\n />\n </div>\n )}\n </CardBase.Content>\n </CardBase>\n ))}\n </div>\n </Wrapper>\n );\n};\n\nexport default SideCardList;\n"]}
|
@@ -0,0 +1,94 @@
|
|
1
|
+
export declare const SideCardList: {
|
2
|
+
"blog-side-card-list-block": {
|
3
|
+
type: string;
|
4
|
+
additionalProperties: boolean;
|
5
|
+
required: string[];
|
6
|
+
properties: {
|
7
|
+
className: {
|
8
|
+
type: string;
|
9
|
+
};
|
10
|
+
title: {
|
11
|
+
type: string;
|
12
|
+
};
|
13
|
+
items: {
|
14
|
+
type: string;
|
15
|
+
items: {
|
16
|
+
type: string;
|
17
|
+
required: string[];
|
18
|
+
properties: {
|
19
|
+
image: {
|
20
|
+
type: string;
|
21
|
+
};
|
22
|
+
description: {
|
23
|
+
type: string;
|
24
|
+
};
|
25
|
+
url: {
|
26
|
+
type: string;
|
27
|
+
};
|
28
|
+
};
|
29
|
+
};
|
30
|
+
};
|
31
|
+
paddingTop: {
|
32
|
+
type: string;
|
33
|
+
enum: string[];
|
34
|
+
};
|
35
|
+
paddingBottom: {
|
36
|
+
type: string;
|
37
|
+
enum: string[];
|
38
|
+
};
|
39
|
+
fullWidth: {
|
40
|
+
type: string;
|
41
|
+
};
|
42
|
+
column: {
|
43
|
+
type: string;
|
44
|
+
enum: string[];
|
45
|
+
};
|
46
|
+
qa: {
|
47
|
+
type: string;
|
48
|
+
};
|
49
|
+
anchor: {
|
50
|
+
type: string;
|
51
|
+
additionalProperties: boolean;
|
52
|
+
required: string[];
|
53
|
+
properties: {
|
54
|
+
text: {
|
55
|
+
type: string;
|
56
|
+
contentType: string;
|
57
|
+
};
|
58
|
+
url: {
|
59
|
+
type: string;
|
60
|
+
};
|
61
|
+
urlTitle: {
|
62
|
+
type: string;
|
63
|
+
};
|
64
|
+
};
|
65
|
+
};
|
66
|
+
visible: {
|
67
|
+
type: string;
|
68
|
+
enum: string[];
|
69
|
+
};
|
70
|
+
resetPaddings: {
|
71
|
+
type: string;
|
72
|
+
};
|
73
|
+
context: {
|
74
|
+
type: string;
|
75
|
+
};
|
76
|
+
indent: {
|
77
|
+
type: string;
|
78
|
+
additionalProperties: boolean;
|
79
|
+
properties: {
|
80
|
+
top: {
|
81
|
+
enum: string[];
|
82
|
+
};
|
83
|
+
bottom: {
|
84
|
+
enum: string[];
|
85
|
+
};
|
86
|
+
};
|
87
|
+
};
|
88
|
+
type: {};
|
89
|
+
when: {
|
90
|
+
type: string;
|
91
|
+
};
|
92
|
+
};
|
93
|
+
};
|
94
|
+
};
|
@@ -0,0 +1,34 @@
|
|
1
|
+
import { validators } from '@gravity-ui/page-constructor';
|
2
|
+
import { BlockType } from "../../models/common.js";
|
3
|
+
import { BlogBlockBase } from "../../schema/common.js";
|
4
|
+
const { common: { BlockBaseProps }, } = validators;
|
5
|
+
export const SideCardList = {
|
6
|
+
[BlockType.SideCardList]: {
|
7
|
+
type: 'object',
|
8
|
+
additionalProperties: false,
|
9
|
+
required: ['items'],
|
10
|
+
properties: Object.assign(Object.assign(Object.assign({}, BlockBaseProps), BlogBlockBase), { className: {
|
11
|
+
type: 'string',
|
12
|
+
}, title: {
|
13
|
+
type: 'string',
|
14
|
+
}, items: {
|
15
|
+
type: 'array',
|
16
|
+
items: {
|
17
|
+
type: 'object',
|
18
|
+
required: ['image', 'description', 'url'],
|
19
|
+
properties: {
|
20
|
+
image: {
|
21
|
+
type: 'string',
|
22
|
+
},
|
23
|
+
description: {
|
24
|
+
type: 'string',
|
25
|
+
},
|
26
|
+
url: {
|
27
|
+
type: 'string',
|
28
|
+
},
|
29
|
+
},
|
30
|
+
},
|
31
|
+
} }),
|
32
|
+
},
|
33
|
+
};
|
34
|
+
//# sourceMappingURL=schema.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"../../../../src","sources":["blocks/SideCardList/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,8BAA8B,CAAC;AAExD,OAAO,EAAC,SAAS,EAAC,+BAA4B;AAC9C,OAAO,EAAC,aAAa,EAAC,+BAA4B;AAElD,MAAM,EACF,MAAM,EAAE,EAAC,cAAc,EAAC,GAC3B,GAAG,UAAU,CAAC;AAEf,MAAM,CAAC,MAAM,YAAY,GAAG;IACxB,CAAC,SAAS,CAAC,YAAY,CAAC,EAAE;QACtB,IAAI,EAAE,QAAQ;QACd,oBAAoB,EAAE,KAAK;QAC3B,QAAQ,EAAE,CAAC,OAAO,CAAC;QACnB,UAAU,gDACH,cAAc,GACd,aAAa,KAChB,SAAS,EAAE;gBACP,IAAI,EAAE,QAAQ;aACjB,EACD,KAAK,EAAE;gBACH,IAAI,EAAE,QAAQ;aACjB,EACD,KAAK,EAAE;gBACH,IAAI,EAAE,OAAO;gBACb,KAAK,EAAE;oBACH,IAAI,EAAE,QAAQ;oBACd,QAAQ,EAAE,CAAC,OAAO,EAAE,aAAa,EAAE,KAAK,CAAC;oBACzC,UAAU,EAAE;wBACR,KAAK,EAAE;4BACH,IAAI,EAAE,QAAQ;yBACjB;wBACD,WAAW,EAAE;4BACT,IAAI,EAAE,QAAQ;yBACjB;wBACD,GAAG,EAAE;4BACD,IAAI,EAAE,QAAQ;yBACjB;qBACJ;iBACJ;aACJ,GACJ;KACJ;CACJ,CAAC","sourcesContent":["import {validators} from '@gravity-ui/page-constructor';\n\nimport {BlockType} from '../../models/common';\nimport {BlogBlockBase} from '../../schema/common';\n\nconst {\n common: {BlockBaseProps},\n} = validators;\n\nexport const SideCardList = {\n [BlockType.SideCardList]: {\n type: 'object',\n additionalProperties: false,\n required: ['items'],\n properties: {\n ...BlockBaseProps,\n ...BlogBlockBase,\n className: {\n type: 'string',\n },\n title: {\n type: 'string',\n },\n items: {\n type: 'array',\n items: {\n type: 'object',\n required: ['image', 'description', 'url'],\n properties: {\n image: {\n type: 'string',\n },\n description: {\n type: 'string',\n },\n url: {\n type: 'string',\n },\n },\n },\n },\n },\n },\n};\n"]}
|
@@ -0,0 +1,70 @@
|
|
1
|
+
/* use this for style redefinitions to awoid problems with
|
2
|
+
unpredictable css rules order in build */
|
3
|
+
.bc-take__container {
|
4
|
+
--take-color: #d6e0e9;
|
5
|
+
display: flex;
|
6
|
+
flex-direction: column;
|
7
|
+
align-items: flex-start;
|
8
|
+
align-self: stretch;
|
9
|
+
gap: 40px;
|
10
|
+
border-radius: 24px 0 0 24px;
|
11
|
+
border-left: 4px solid var(--take-color);
|
12
|
+
background: linear-gradient(90deg, color-mix(in sRGB, var(--take-color) 20%, transparent) 0%, rgba(255, 255, 255, 0.2) 100%);
|
13
|
+
font-family: "YS Text";
|
14
|
+
}
|
15
|
+
.bc-take__container_noBackground {
|
16
|
+
background: none;
|
17
|
+
}
|
18
|
+
.bc-take__text {
|
19
|
+
font-size: 24px;
|
20
|
+
line-height: 32px;
|
21
|
+
font-weight: var(--g-text-body-font-weight);
|
22
|
+
font-family: inherit;
|
23
|
+
}
|
24
|
+
.bc-take__author {
|
25
|
+
align-items: flex-start;
|
26
|
+
max-width: 402px;
|
27
|
+
}
|
28
|
+
.bc-take__author .pc-author__name {
|
29
|
+
font-weight: var(--g-text-accent-font-weight);
|
30
|
+
font-size: var(--g-text-header-1-font-size);
|
31
|
+
line-height: var(--g-text-header-1-line-height);
|
32
|
+
}
|
33
|
+
.bc-take__author .pc-author__description {
|
34
|
+
font-size: var(--g-text-body-3-font-size);
|
35
|
+
line-height: var(--g-text-body-3-line-height);
|
36
|
+
}
|
37
|
+
.bc-take__avatar {
|
38
|
+
width: 88px;
|
39
|
+
height: 88px;
|
40
|
+
}
|
41
|
+
.bc-take__avatar img {
|
42
|
+
width: 88px;
|
43
|
+
height: 88px;
|
44
|
+
}
|
45
|
+
@media (max-width: 577px) {
|
46
|
+
.bc-take__text {
|
47
|
+
font-size: 20px;
|
48
|
+
line-height: 28px;
|
49
|
+
}
|
50
|
+
.bc-take__author {
|
51
|
+
max-width: none;
|
52
|
+
}
|
53
|
+
.bc-take__author .pc-author__name {
|
54
|
+
font-weight: var(--g-text-accent-font-weight);
|
55
|
+
font-size: var(--g-text-subheader-3-font-size);
|
56
|
+
line-height: var(--g-text-subheader-3-line-height);
|
57
|
+
}
|
58
|
+
.bc-take__author .pc-author__description {
|
59
|
+
font-size: var(--g-text-body-2-font-size);
|
60
|
+
line-height: var(--g-text-body-2-line-height);
|
61
|
+
}
|
62
|
+
.bc-take__avatar {
|
63
|
+
width: 80px;
|
64
|
+
height: 80px;
|
65
|
+
}
|
66
|
+
.bc-take__avatar img {
|
67
|
+
width: 80px;
|
68
|
+
height: 80px;
|
69
|
+
}
|
70
|
+
}
|
@@ -0,0 +1,24 @@
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
|
+
import * as React from 'react';
|
3
|
+
import { AuthorType, Author as PCAuthor, YFMWrapper } from '@gravity-ui/page-constructor';
|
4
|
+
import { Wrapper } from "../../components/Wrapper/Wrapper.js";
|
5
|
+
import { MobileContext } from "../../contexts/MobileContext.js";
|
6
|
+
import { PaddingsDirections } from "../../models/paddings.js";
|
7
|
+
import { block } from "../../utils/cn.js";
|
8
|
+
import './Take.css';
|
9
|
+
const b = block('take');
|
10
|
+
export const Take = (props) => {
|
11
|
+
const { paddingTop, paddingBottom, paddingLeft, paddingRight, text, author, color, noBackground, } = props;
|
12
|
+
const isMobile = React.useContext(MobileContext);
|
13
|
+
const containerStyle = color ? { '--take-color': color } : undefined;
|
14
|
+
return (_jsxs(Wrapper, { className: b('container', { noBackground }), paddings: {
|
15
|
+
[PaddingsDirections.top]: paddingTop,
|
16
|
+
[PaddingsDirections.bottom]: paddingBottom,
|
17
|
+
[PaddingsDirections.left]: paddingLeft,
|
18
|
+
[PaddingsDirections.right]: paddingRight,
|
19
|
+
}, style: containerStyle, children: [_jsx(YFMWrapper, { content: text, contentClassName: b('text'), tagName: "div", modifiers: {
|
20
|
+
blog: true,
|
21
|
+
resetPaddings: true,
|
22
|
+
} }), _jsx(PCAuthor, { type: isMobile ? AuthorType.Column : AuthorType.Line, author: author, className: b('author'), authorContainerClassName: b('avatar') })] }));
|
23
|
+
};
|
24
|
+
//# sourceMappingURL=Take.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Take.js","sourceRoot":"../../../../src","sources":["blocks/Take/Take.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAC,UAAU,EAAE,MAAM,IAAI,QAAQ,EAAE,UAAU,EAAC,MAAM,8BAA8B,CAAC;AAExF,OAAO,EAAC,OAAO,EAAC,4CAAyC;AACzD,OAAO,EAAC,aAAa,EAAC,wCAAqC;AAE3D,OAAO,EAAC,kBAAkB,EAAC,iCAA8B;AACzD,OAAO,EAAC,KAAK,EAAC,0BAAuB;AAErC,OAAO,YAAY,CAAC;AAEpB,MAAM,CAAC,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;AAExB,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,KAAgB,EAAE,EAAE;IACrC,MAAM,EACF,UAAU,EACV,aAAa,EACb,WAAW,EACX,YAAY,EACZ,IAAI,EACJ,MAAM,EACN,KAAK,EACL,YAAY,GACf,GAAG,KAAK,CAAC;IAEV,MAAM,QAAQ,GAAG,KAAK,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;IAEjD,MAAM,cAAc,GAAG,KAAK,CAAC,CAAC,CAAE,EAAC,cAAc,EAAE,KAAK,EAAyB,CAAC,CAAC,CAAC,SAAS,CAAC;IAE5F,OAAO,CACH,MAAC,OAAO,IACJ,SAAS,EAAE,CAAC,CAAC,WAAW,EAAE,EAAC,YAAY,EAAC,CAAC,EACzC,QAAQ,EAAE;YACN,CAAC,kBAAkB,CAAC,GAAG,CAAC,EAAE,UAAU;YACpC,CAAC,kBAAkB,CAAC,MAAM,CAAC,EAAE,aAAa;YAC1C,CAAC,kBAAkB,CAAC,IAAI,CAAC,EAAE,WAAW;YACtC,CAAC,kBAAkB,CAAC,KAAK,CAAC,EAAE,YAAY;SAC3C,EACD,KAAK,EAAE,cAAc,aAErB,KAAC,UAAU,IACP,OAAO,EAAE,IAAI,EACb,gBAAgB,EAAE,CAAC,CAAC,MAAM,CAAC,EAC3B,OAAO,EAAC,KAAK,EACb,SAAS,EAAE;oBACP,IAAI,EAAE,IAAI;oBACV,aAAa,EAAE,IAAI;iBACtB,GACH,EACF,KAAC,QAAQ,IACL,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,UAAU,CAAC,IAAI,EACpD,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,CAAC,CAAC,QAAQ,CAAC,EACtB,wBAAwB,EAAE,CAAC,CAAC,QAAQ,CAAC,GACvC,IACI,CACb,CAAC;AACN,CAAC,CAAC","sourcesContent":["import * as React from 'react';\n\nimport {AuthorType, Author as PCAuthor, YFMWrapper} from '@gravity-ui/page-constructor';\n\nimport {Wrapper} from '../../components/Wrapper/Wrapper';\nimport {MobileContext} from '../../contexts/MobileContext';\nimport {TakeProps} from '../../models/blocks';\nimport {PaddingsDirections} from '../../models/paddings';\nimport {block} from '../../utils/cn';\n\nimport './Take.scss';\n\nconst b = block('take');\n\nexport const Take = (props: TakeProps) => {\n const {\n paddingTop,\n paddingBottom,\n paddingLeft,\n paddingRight,\n text,\n author,\n color,\n noBackground,\n } = props;\n\n const isMobile = React.useContext(MobileContext);\n\n const containerStyle = color ? ({'--take-color': color} as React.CSSProperties) : undefined;\n\n return (\n <Wrapper\n className={b('container', {noBackground})}\n paddings={{\n [PaddingsDirections.top]: paddingTop,\n [PaddingsDirections.bottom]: paddingBottom,\n [PaddingsDirections.left]: paddingLeft,\n [PaddingsDirections.right]: paddingRight,\n }}\n style={containerStyle}\n >\n <YFMWrapper\n content={text}\n contentClassName={b('text')}\n tagName=\"div\"\n modifiers={{\n blog: true,\n resetPaddings: true,\n }}\n />\n <PCAuthor\n type={isMobile ? AuthorType.Column : AuthorType.Line}\n author={author}\n className={b('author')}\n authorContainerClassName={b('avatar')}\n />\n </Wrapper>\n );\n};\n"]}
|