@gravity-ui/page-constructor 7.22.0 → 7.23.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.
@@ -14,6 +14,12 @@ unpredictable css rules order in build */
14
14
  padding: 8px 32px 48px;
15
15
  margin-top: 24px;
16
16
  }
17
+ .pc-card-layout-block__title_centered {
18
+ display: flex;
19
+ flex-direction: column;
20
+ align-items: center;
21
+ text-align: center;
22
+ }
17
23
  .pc-card-layout-block__image {
18
24
  position: absolute;
19
25
  top: 0;
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
2
  import { CardLayoutBlockProps as CardLayoutBlockParams, ClassNameProps } from "../../models/index.js";
3
3
  export type CardLayoutBlockProps = React.PropsWithChildren<Omit<CardLayoutBlockParams, 'children'>> & ClassNameProps;
4
- declare const CardLayout: ({ title, description, animated, colSizes, children, className, titleClassName, background, }: CardLayoutBlockProps) => import("react/jsx-runtime").JSX.Element;
4
+ declare const CardLayout: ({ title, description, animated, colSizes, children, className, titleClassName, background, centered, }: CardLayoutBlockProps) => import("react/jsx-runtime").JSX.Element;
5
5
  export default CardLayout;
@@ -14,10 +14,10 @@ const DEFAULT_SIZES = {
14
14
  md: 4,
15
15
  };
16
16
  const b = (0, utils_1.block)('card-layout-block');
17
- const CardLayout = ({ title, description, animated, colSizes = DEFAULT_SIZES, children, className, titleClassName, background, }) => {
17
+ const CardLayout = ({ title, description, animated, colSizes = DEFAULT_SIZES, children, className, titleClassName, background, centered = false, }) => {
18
18
  const theme = (0, theme_1.useTheme)();
19
19
  const { border, ...backgroundImageProps } = (0, utils_1.getThemedValue)(background || {}, theme);
20
- return ((0, jsx_runtime_1.jsxs)(components_1.AnimateBlock, { className: b(null, className), animate: animated, children: [(title || description) && ((0, jsx_runtime_1.jsx)(components_1.Title, { title: title, subtitle: description, className: titleClassName })), (0, jsx_runtime_1.jsxs)("div", { className: b('content', {
20
+ return ((0, jsx_runtime_1.jsxs)(components_1.AnimateBlock, { className: b(null, className), animate: animated, children: [(title || description) && ((0, jsx_runtime_1.jsx)(components_1.Title, { title: title, subtitle: description, className: b('title', { centered }, titleClassName), colJustifyContent: centered ? grid_1.GridJustifyContent.Center : grid_1.GridJustifyContent.Start })), (0, jsx_runtime_1.jsxs)("div", { className: b('content', {
21
21
  'with-background': !(0, isEmpty_1.default)(background),
22
22
  }), children: [(0, jsx_runtime_1.jsx)(components_1.BackgroundImage, { className: b('image', { border }), ...backgroundImageProps }), (0, jsx_runtime_1.jsx)(grid_1.Row, { children: React.Children.map(children, (child, index) => ((0, jsx_runtime_1.jsx)(grid_1.Col, { sizes: colSizes, className: b('item'), children: child }, index))) })] })] }));
23
23
  };
@@ -1 +1 @@
1
- {"version":3,"file":"CardLayout.js","sourceRoot":"../../../../src","sources":["blocks/CardLayout/CardLayout.tsx"],"names":[],"mappings":";;;;AAAA,qDAA+B;AAE/B,wEAAqC;AAErC,0DAAsE;AACtE,wDAA6C;AAC7C,8CAAyD;AAEzD,gDAAkD;AAIlD,MAAM,aAAa,GAAwB;IACvC,GAAG,EAAE,EAAE;IACP,EAAE,EAAE,CAAC;IACL,EAAE,EAAE,CAAC;CACR,CAAC;AAMF,MAAM,CAAC,GAAG,IAAA,aAAK,EAAC,mBAAmB,CAAC,CAAC;AAErC,MAAM,UAAU,GAAG,CAAC,EAChB,KAAK,EACL,WAAW,EACX,QAAQ,EACR,QAAQ,GAAG,aAAa,EACxB,QAAQ,EACR,SAAS,EACT,cAAc,EACd,UAAU,GACS,EAAE,EAAE;IACvB,MAAM,KAAK,GAAG,IAAA,gBAAQ,GAAE,CAAC;IACzB,MAAM,EAAC,MAAM,EAAE,GAAG,oBAAoB,EAAC,GAAG,IAAA,sBAAc,EAAC,UAAU,IAAI,EAAE,EAAE,KAAK,CAAC,CAAC;IAClF,OAAO,CACH,wBAAC,yBAAY,IAAC,SAAS,EAAE,CAAC,CAAC,IAAI,EAAE,SAAS,CAAC,EAAE,OAAO,EAAE,QAAQ,aACzD,CAAC,KAAK,IAAI,WAAW,CAAC,IAAI,CACvB,uBAAC,kBAAK,IAAC,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,SAAS,EAAE,cAAc,GAAI,CAC5E,EACD,iCACI,SAAS,EAAE,CAAC,CAAC,SAAS,EAAE;oBACpB,iBAAiB,EAAE,CAAC,IAAA,iBAAO,EAAC,UAAU,CAAC;iBAC1C,CAAC,aAEF,uBAAC,4BAAe,IAAC,SAAS,EAAE,CAAC,CAAC,OAAO,EAAE,EAAC,MAAM,EAAC,CAAC,KAAM,oBAAoB,GAAI,EAC9E,uBAAC,UAAG,cACC,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC,CAC5C,uBAAC,UAAG,IAAa,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC,CAAC,MAAM,CAAC,YACjD,KAAK,IADA,KAAK,CAET,CACT,CAAC,GACA,IACJ,IACK,CAClB,CAAC;AACN,CAAC,CAAC;AAEF,kBAAe,UAAU,CAAC","sourcesContent":["import * as React from 'react';\n\nimport isEmpty from 'lodash/isEmpty';\n\nimport {AnimateBlock, BackgroundImage, Title} from '../../components';\nimport {useTheme} from '../../context/theme';\nimport {Col, GridColumnSizesType, Row} from '../../grid';\nimport {CardLayoutBlockProps as CardLayoutBlockParams, ClassNameProps} from '../../models';\nimport {block, getThemedValue} from '../../utils';\n\nimport './CardLayout.scss';\n\nconst DEFAULT_SIZES: GridColumnSizesType = {\n all: 12,\n sm: 6,\n md: 4,\n};\nexport type CardLayoutBlockProps = React.PropsWithChildren<\n Omit<CardLayoutBlockParams, 'children'>\n> &\n ClassNameProps;\n\nconst b = block('card-layout-block');\n\nconst CardLayout = ({\n title,\n description,\n animated,\n colSizes = DEFAULT_SIZES,\n children,\n className,\n titleClassName,\n background,\n}: CardLayoutBlockProps) => {\n const theme = useTheme();\n const {border, ...backgroundImageProps} = getThemedValue(background || {}, theme);\n return (\n <AnimateBlock className={b(null, className)} animate={animated}>\n {(title || description) && (\n <Title title={title} subtitle={description} className={titleClassName} />\n )}\n <div\n className={b('content', {\n 'with-background': !isEmpty(background),\n })}\n >\n <BackgroundImage className={b('image', {border})} {...backgroundImageProps} />\n <Row>\n {React.Children.map(children, (child, index) => (\n <Col key={index} sizes={colSizes} className={b('item')}>\n {child}\n </Col>\n ))}\n </Row>\n </div>\n </AnimateBlock>\n );\n};\n\nexport default CardLayout;\n"]}
1
+ {"version":3,"file":"CardLayout.js","sourceRoot":"../../../../src","sources":["blocks/CardLayout/CardLayout.tsx"],"names":[],"mappings":";;;;AAAA,qDAA+B;AAE/B,wEAAqC;AAErC,0DAAsE;AACtE,wDAA6C;AAC7C,8CAA6E;AAE7E,gDAAkD;AAIlD,MAAM,aAAa,GAAwB;IACvC,GAAG,EAAE,EAAE;IACP,EAAE,EAAE,CAAC;IACL,EAAE,EAAE,CAAC;CACR,CAAC;AAOF,MAAM,CAAC,GAAG,IAAA,aAAK,EAAC,mBAAmB,CAAC,CAAC;AAErC,MAAM,UAAU,GAAG,CAAC,EAChB,KAAK,EACL,WAAW,EACX,QAAQ,EACR,QAAQ,GAAG,aAAa,EACxB,QAAQ,EACR,SAAS,EACT,cAAc,EACd,UAAU,EACV,QAAQ,GAAG,KAAK,GACG,EAAE,EAAE;IACvB,MAAM,KAAK,GAAG,IAAA,gBAAQ,GAAE,CAAC;IACzB,MAAM,EAAC,MAAM,EAAE,GAAG,oBAAoB,EAAC,GAAG,IAAA,sBAAc,EAAC,UAAU,IAAI,EAAE,EAAE,KAAK,CAAC,CAAC;IAClF,OAAO,CACH,wBAAC,yBAAY,IAAC,SAAS,EAAE,CAAC,CAAC,IAAI,EAAE,SAAS,CAAC,EAAE,OAAO,EAAE,QAAQ,aACzD,CAAC,KAAK,IAAI,WAAW,CAAC,IAAI,CACvB,uBAAC,kBAAK,IACF,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,WAAW,EACrB,SAAS,EAAE,CAAC,CAAC,OAAO,EAAE,EAAC,QAAQ,EAAC,EAAE,cAAc,CAAC,EACjD,iBAAiB,EACb,QAAQ,CAAC,CAAC,CAAC,yBAAkB,CAAC,MAAM,CAAC,CAAC,CAAC,yBAAkB,CAAC,KAAK,GAErE,CACL,EACD,iCACI,SAAS,EAAE,CAAC,CAAC,SAAS,EAAE;oBACpB,iBAAiB,EAAE,CAAC,IAAA,iBAAO,EAAC,UAAU,CAAC;iBAC1C,CAAC,aAEF,uBAAC,4BAAe,IAAC,SAAS,EAAE,CAAC,CAAC,OAAO,EAAE,EAAC,MAAM,EAAC,CAAC,KAAM,oBAAoB,GAAI,EAC9E,uBAAC,UAAG,cACC,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC,CAC5C,uBAAC,UAAG,IAAa,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC,CAAC,MAAM,CAAC,YACjD,KAAK,IADA,KAAK,CAET,CACT,CAAC,GACA,IACJ,IACK,CAClB,CAAC;AACN,CAAC,CAAC;AAEF,kBAAe,UAAU,CAAC","sourcesContent":["import * as React from 'react';\n\nimport isEmpty from 'lodash/isEmpty';\n\nimport {AnimateBlock, BackgroundImage, Title} from '../../components';\nimport {useTheme} from '../../context/theme';\nimport {Col, GridColumnSizesType, GridJustifyContent, Row} from '../../grid';\nimport {CardLayoutBlockProps as CardLayoutBlockParams, ClassNameProps} from '../../models';\nimport {block, getThemedValue} from '../../utils';\n\nimport './CardLayout.scss';\n\nconst DEFAULT_SIZES: GridColumnSizesType = {\n all: 12,\n sm: 6,\n md: 4,\n};\n\nexport type CardLayoutBlockProps = React.PropsWithChildren<\n Omit<CardLayoutBlockParams, 'children'>\n> &\n ClassNameProps;\n\nconst b = block('card-layout-block');\n\nconst CardLayout = ({\n title,\n description,\n animated,\n colSizes = DEFAULT_SIZES,\n children,\n className,\n titleClassName,\n background,\n centered = false,\n}: CardLayoutBlockProps) => {\n const theme = useTheme();\n const {border, ...backgroundImageProps} = getThemedValue(background || {}, theme);\n return (\n <AnimateBlock className={b(null, className)} animate={animated}>\n {(title || description) && (\n <Title\n title={title}\n subtitle={description}\n className={b('title', {centered}, titleClassName)}\n colJustifyContent={\n centered ? GridJustifyContent.Center : GridJustifyContent.Start\n }\n />\n )}\n <div\n className={b('content', {\n 'with-background': !isEmpty(background),\n })}\n >\n <BackgroundImage className={b('image', {border})} {...backgroundImageProps} />\n <Row>\n {React.Children.map(children, (child, index) => (\n <Col key={index} sizes={colSizes} className={b('item')}>\n {child}\n </Col>\n ))}\n </Row>\n </div>\n </AnimateBlock>\n );\n};\n\nexport default CardLayout;\n"]}
@@ -1,8 +1,9 @@
1
- import { GridColumnSizesType } from "../../grid/index.js";
1
+ import { GridColumnSizesType, GridJustifyContent } from "../../grid/index.js";
2
2
  import { ClassNameProps, TitleProps as TitleParams } from "../../models/index.js";
3
3
  export interface TitleProps extends TitleParams {
4
4
  colSizes?: GridColumnSizesType;
5
+ colJustifyContent?: GridJustifyContent;
5
6
  id?: string;
6
7
  }
7
- declare const Title: ({ title, subtitle, className, colSizes, id, }: TitleProps & ClassNameProps) => import("react/jsx-runtime").JSX.Element | null;
8
+ declare const Title: ({ title, subtitle, className, colSizes, colJustifyContent, id, }: TitleProps & ClassNameProps) => import("react/jsx-runtime").JSX.Element | null;
8
9
  export default Title;
@@ -7,12 +7,12 @@ const utils_1 = require("../../utils/index.js");
7
7
  const YFMWrapper_1 = tslib_1.__importDefault(require("../YFMWrapper/YFMWrapper.js"));
8
8
  const TitleItem_1 = tslib_1.__importDefault(require("./TitleItem.js"));
9
9
  const b = (0, utils_1.block)('title');
10
- const Title = ({ title, subtitle, className, colSizes = { all: 12, sm: 8 }, id, }) => {
10
+ const Title = ({ title, subtitle, className, colSizes = { all: 12, sm: 8 }, colJustifyContent, id, }) => {
11
11
  if (!title && !subtitle) {
12
12
  return null;
13
13
  }
14
14
  const { text, ...titleProps } = !title || typeof title === 'string' ? { text: title } : title;
15
- return ((0, jsx_runtime_1.jsxs)("div", { className: b(null, className), id: id, children: [text && ((0, jsx_runtime_1.jsx)(grid_1.Col, { reset: true, sizes: colSizes, children: (0, jsx_runtime_1.jsx)(TitleItem_1.default, { text: text, ...titleProps }) })), subtitle && ((0, jsx_runtime_1.jsx)(grid_1.Col, { reset: true, sizes: colSizes, children: (0, jsx_runtime_1.jsx)("div", { className: b('description', { titleSize: titleProps?.textSize }), children: (0, jsx_runtime_1.jsx)(YFMWrapper_1.default, { content: subtitle, modifiers: { constructor: true } }) }) }))] }));
15
+ return ((0, jsx_runtime_1.jsxs)("div", { className: b(null, className), id: id, children: [text && ((0, jsx_runtime_1.jsx)(grid_1.Col, { reset: true, sizes: colSizes, ...(colJustifyContent && { justifyContent: colJustifyContent }), children: (0, jsx_runtime_1.jsx)(TitleItem_1.default, { text: text, ...titleProps }) })), subtitle && ((0, jsx_runtime_1.jsx)(grid_1.Col, { reset: true, sizes: colSizes, ...(colJustifyContent && { justifyContent: colJustifyContent }), children: (0, jsx_runtime_1.jsx)("div", { className: b('description', { titleSize: titleProps?.textSize }), children: (0, jsx_runtime_1.jsx)(YFMWrapper_1.default, { content: subtitle, modifiers: { constructor: true } }) }) }))] }));
16
16
  };
17
17
  exports.default = Title;
18
18
  //# sourceMappingURL=Title.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Title.js","sourceRoot":"../../../../src","sources":["components/Title/Title.tsx"],"names":[],"mappings":";;;;AAAA,8CAAoD;AAEpD,gDAAkC;AAClC,qFAAkD;AAElD,uEAAoC;AAIpC,MAAM,CAAC,GAAG,IAAA,aAAK,EAAC,OAAO,CAAC,CAAC;AAOzB,MAAM,KAAK,GAAG,CAAC,EACX,KAAK,EACL,QAAQ,EACR,SAAS,EACT,QAAQ,GAAG,EAAC,GAAG,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EAAC,EAC3B,EAAE,GACwB,EAAE,EAAE;IAC9B,IAAI,CAAC,KAAK,IAAI,CAAC,QAAQ,EAAE,CAAC;QACtB,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,MAAM,EAAC,IAAI,EAAE,GAAG,UAAU,EAAC,GACvB,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAE,EAAC,IAAI,EAAE,KAAK,EAAoB,CAAC,CAAC,CAAC,KAAK,CAAC;IAEpF,OAAO,CACH,iCAAK,SAAS,EAAE,CAAC,CAAC,IAAI,EAAE,SAAS,CAAC,EAAE,EAAE,EAAE,EAAE,aACrC,IAAI,IAAI,CACL,uBAAC,UAAG,IAAC,KAAK,QAAC,KAAK,EAAE,QAAQ,YACtB,uBAAC,mBAAS,IAAC,IAAI,EAAE,IAAI,KAAM,UAAU,GAAI,GACvC,CACT,EACA,QAAQ,IAAI,CACT,uBAAC,UAAG,IAAC,KAAK,QAAC,KAAK,EAAE,QAAQ,YACtB,gCAAK,SAAS,EAAE,CAAC,CAAC,aAAa,EAAE,EAAC,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAC,CAAC,YAC/D,uBAAC,oBAAU,IAAC,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAC,WAAW,EAAE,IAAI,EAAC,GAAI,GAC/D,GACJ,CACT,IACC,CACT,CAAC;AACN,CAAC,CAAC;AAEF,kBAAe,KAAK,CAAC","sourcesContent":["import {Col, GridColumnSizesType} from '../../grid';\nimport {ClassNameProps, TitleItemProps, TitleProps as TitleParams} from '../../models';\nimport {block} from '../../utils';\nimport YFMWrapper from '../YFMWrapper/YFMWrapper';\n\nimport TitleItem from './TitleItem';\n\nimport './Title.scss';\n\nconst b = block('title');\n\nexport interface TitleProps extends TitleParams {\n colSizes?: GridColumnSizesType;\n id?: string;\n}\n\nconst Title = ({\n title,\n subtitle,\n className,\n colSizes = {all: 12, sm: 8},\n id,\n}: TitleProps & ClassNameProps) => {\n if (!title && !subtitle) {\n return null;\n }\n\n const {text, ...titleProps} =\n !title || typeof title === 'string' ? ({text: title} as TitleItemProps) : title;\n\n return (\n <div className={b(null, className)} id={id}>\n {text && (\n <Col reset sizes={colSizes}>\n <TitleItem text={text} {...titleProps} />\n </Col>\n )}\n {subtitle && (\n <Col reset sizes={colSizes}>\n <div className={b('description', {titleSize: titleProps?.textSize})}>\n <YFMWrapper content={subtitle} modifiers={{constructor: true}} />\n </div>\n </Col>\n )}\n </div>\n );\n};\n\nexport default Title;\n"]}
1
+ {"version":3,"file":"Title.js","sourceRoot":"../../../../src","sources":["components/Title/Title.tsx"],"names":[],"mappings":";;;;AAAA,8CAAwE;AAExE,gDAAkC;AAClC,qFAAkD;AAElD,uEAAoC;AAIpC,MAAM,CAAC,GAAG,IAAA,aAAK,EAAC,OAAO,CAAC,CAAC;AAQzB,MAAM,KAAK,GAAG,CAAC,EACX,KAAK,EACL,QAAQ,EACR,SAAS,EACT,QAAQ,GAAG,EAAC,GAAG,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EAAC,EAC3B,iBAAiB,EACjB,EAAE,GACwB,EAAE,EAAE;IAC9B,IAAI,CAAC,KAAK,IAAI,CAAC,QAAQ,EAAE,CAAC;QACtB,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,MAAM,EAAC,IAAI,EAAE,GAAG,UAAU,EAAC,GACvB,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAE,EAAC,IAAI,EAAE,KAAK,EAAoB,CAAC,CAAC,CAAC,KAAK,CAAC;IAEpF,OAAO,CACH,iCAAK,SAAS,EAAE,CAAC,CAAC,IAAI,EAAE,SAAS,CAAC,EAAE,EAAE,EAAE,EAAE,aACrC,IAAI,IAAI,CACL,uBAAC,UAAG,IACA,KAAK,QACL,KAAK,EAAE,QAAQ,KACX,CAAC,iBAAiB,IAAI,EAAC,cAAc,EAAE,iBAAiB,EAAC,CAAC,YAE9D,uBAAC,mBAAS,IAAC,IAAI,EAAE,IAAI,KAAM,UAAU,GAAI,GACvC,CACT,EACA,QAAQ,IAAI,CACT,uBAAC,UAAG,IACA,KAAK,QACL,KAAK,EAAE,QAAQ,KACX,CAAC,iBAAiB,IAAI,EAAC,cAAc,EAAE,iBAAiB,EAAC,CAAC,YAE9D,gCAAK,SAAS,EAAE,CAAC,CAAC,aAAa,EAAE,EAAC,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAC,CAAC,YAC/D,uBAAC,oBAAU,IAAC,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAC,WAAW,EAAE,IAAI,EAAC,GAAI,GAC/D,GACJ,CACT,IACC,CACT,CAAC;AACN,CAAC,CAAC;AAEF,kBAAe,KAAK,CAAC","sourcesContent":["import {Col, GridColumnSizesType, GridJustifyContent} from '../../grid';\nimport {ClassNameProps, TitleItemProps, TitleProps as TitleParams} from '../../models';\nimport {block} from '../../utils';\nimport YFMWrapper from '../YFMWrapper/YFMWrapper';\n\nimport TitleItem from './TitleItem';\n\nimport './Title.scss';\n\nconst b = block('title');\n\nexport interface TitleProps extends TitleParams {\n colSizes?: GridColumnSizesType;\n colJustifyContent?: GridJustifyContent;\n id?: string;\n}\n\nconst Title = ({\n title,\n subtitle,\n className,\n colSizes = {all: 12, sm: 8},\n colJustifyContent,\n id,\n}: TitleProps & ClassNameProps) => {\n if (!title && !subtitle) {\n return null;\n }\n\n const {text, ...titleProps} =\n !title || typeof title === 'string' ? ({text: title} as TitleItemProps) : title;\n\n return (\n <div className={b(null, className)} id={id}>\n {text && (\n <Col\n reset\n sizes={colSizes}\n {...(colJustifyContent && {justifyContent: colJustifyContent})}\n >\n <TitleItem text={text} {...titleProps} />\n </Col>\n )}\n {subtitle && (\n <Col\n reset\n sizes={colSizes}\n {...(colJustifyContent && {justifyContent: colJustifyContent})}\n >\n <div className={b('description', {titleSize: titleProps?.textSize})}>\n <YFMWrapper content={subtitle} modifiers={{constructor: true}} />\n </div>\n </Col>\n )}\n </div>\n );\n};\n\nexport default Title;\n"]}
@@ -13,7 +13,7 @@ export declare const blockMap: {
13
13
  "header-block": (props: React.PropsWithChildren<import("./blocks/Header/Header.js").HeaderBlockFullProps>) => import("react/jsx-runtime").JSX.Element;
14
14
  "icons-block": ({ title, description, size, colSizes, items }: import("./models/index.js").IconsBlockProps) => import("react/jsx-runtime").JSX.Element;
15
15
  "header-slider-block": ({ items, arrows, ...props }: import("./models/index.js").HeaderSliderBlockProps) => import("react/jsx-runtime").JSX.Element;
16
- "card-layout-block": ({ title, description, animated, colSizes, children, className, titleClassName, background, }: import("./blocks/CardLayout/CardLayout.js").CardLayoutBlockProps) => import("react/jsx-runtime").JSX.Element;
16
+ "card-layout-block": ({ title, description, animated, colSizes, children, className, titleClassName, background, centered, }: import("./blocks/CardLayout/CardLayout.js").CardLayoutBlockProps) => import("react/jsx-runtime").JSX.Element;
17
17
  "content-layout-block": (props: import("./models/index.js").ContentLayoutBlockProps) => import("react/jsx-runtime").JSX.Element;
18
18
  "share-block": ({ items, title }: import("./models/index.js").ShareBlockProps) => import("react/jsx-runtime").JSX.Element;
19
19
  "map-block": ({ map, border, disableShadow, ...props }: import("./models/index.js").MapBlockProps) => import("react/jsx-runtime").JSX.Element;
@@ -271,6 +271,7 @@ export interface TabsBlockProps extends Animatable {
271
271
  export interface CardLayoutBlockProps extends Childable, Animatable, LoadableChildren {
272
272
  title?: TitleItemProps | string;
273
273
  titleClassName?: string;
274
+ centered?: boolean;
274
275
  description?: string;
275
276
  colSizes?: GridColumnSizesType;
276
277
  background?: ThemeSupporting<BackgroundImageProps & {
@@ -1 +1 @@
1
- {"version":3,"file":"blocks.js","sourceRoot":"../../../../src","sources":["models/constructor-items/blocks.ts"],"names":[],"mappings":";;;AA6CA,IAAY,SAuBX;AAvBD,WAAY,SAAS;IACjB,wDAA2C,CAAA;IAC3C,8DAAiD,CAAA;IACjD,kBAAkB;IAClB,gDAAmC,CAAA;IACnC,yCAA4B,CAAA;IAC5B,+CAAkC,CAAA;IAClC,sDAAyC,CAAA;IACzC,yCAA4B,CAAA;IAC5B,+CAAkC,CAAA;IAClC,uCAA0B,CAAA;IAC1B,qCAAwB,CAAA;IACxB,uCAA0B,CAAA;IAC1B,qCAAwB,CAAA;IACxB,sDAAyC,CAAA;IACzC,yCAA4B,CAAA;IAC5B,uCAA0B,CAAA;IAC1B,kDAAqC,CAAA;IACrC,wDAA2C,CAAA;IAC3C,uCAA0B,CAAA;IAC1B,mCAAsB,CAAA;IACtB,yCAA4B,CAAA;IAC5B,qCAAwB,CAAA;AAC5B,CAAC,EAvBW,SAAS,yBAAT,SAAS,QAuBpB;AAEY,QAAA,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;AACtC,QAAA,gBAAgB,GAAG,CAAC,SAAS,CAAC,WAAW,EAAE,SAAS,CAAC,iBAAiB,CAAC,CAAC;AAgCrF,IAAY,qBAKX;AALD,WAAY,qBAAqB;IAC7B,kCAAS,CAAA;IACT,kCAAS,CAAA;IACT,kCAAS,CAAA;IACT,kCAAS,CAAA;AACb,CAAC,EALW,qBAAqB,qCAArB,qBAAqB,QAKhC;AAED,IAAY,UAIX;AAJD,WAAY,UAAU;IAClB,sCAAwB,CAAA;IACxB,wCAA0B,CAAA;IAC1B,gDAAkC,CAAA;AACtC,CAAC,EAJW,UAAU,0BAAV,UAAU,QAIrB;AA0VD,IAAY,oBAMX;AAND,WAAY,oBAAoB;IAC5B,iCAAS,CAAA;IACT,6CAAqB,CAAA;IACrB,2CAAmB,CAAA;IACnB,6CAAqB,CAAA;IACrB,6CAAqB,CAAA;AACzB,CAAC,EANW,oBAAoB,oCAApB,oBAAoB,QAM/B;AAOD,IAAY,kBAGX;AAHD,WAAY,kBAAkB;IAC1B,uCAAiB,CAAA;IACjB,yCAAmB,CAAA;AACvB,CAAC,EAHW,kBAAkB,kCAAlB,kBAAkB,QAG7B;AAED,IAAY,kBAIX;AAJD,WAAY,kBAAkB;IAC1B,kDAA4B,CAAA;IAC5B,kDAA4B,CAAA;IAC5B,uCAAiB,CAAA;AACrB,CAAC,EAJW,kBAAkB,kCAAlB,kBAAkB,QAI7B","sourcesContent":["import * as React from 'react';\n\nimport {ButtonSize} from '@gravity-ui/uikit';\n\nimport {GridColumnSize, GridColumnSizesType, IndentValue} from '../../grid/types';\nimport {ThemeSupporting} from '../../utils';\nimport {DeviceSupporting} from '../../utils/breakpoint';\nimport {AnalyticsEventsBase} from '../common';\n\nimport {\n AnchorProps,\n Animatable,\n BackgroundImageProps,\n ButtonProps,\n CardBorder,\n ContentSize,\n ContentTextSize,\n ContentTheme,\n FileLinkProps,\n GravityIconProps,\n HeaderBreadCrumbsProps,\n HeaderImageSize,\n HeaderOffset,\n HeaderWidth,\n ImageDeviceProps,\n ImageProps,\n Justify,\n LegendTableMarkerType,\n LinkProps,\n MapProps,\n MediaDirection,\n MediaProps,\n MediaView,\n TextSize,\n TextTheme,\n ThemedImage,\n ThemedMediaProps,\n ThemedMediaVideoProps,\n TitleItemBaseProps,\n TitleItemProps,\n WithBorder,\n YandexFormProps,\n} from './common';\nimport {BannerCardProps, HubspotFormProps, SubBlock, SubBlockModels} from './sub-blocks';\n\nexport enum BlockType {\n PromoFeaturesBlock = 'promo-features-block',\n ExtendedFeaturesBlock = 'extended-features-block',\n /** @deprecated */\n SliderOldBlock = 'slider-old-block',\n SliderBlock = 'slider-block',\n QuestionsBlock = 'questions-block',\n FoldableListBlock = 'foldable-list-block',\n BannerBlock = 'banner-block',\n CompaniesBlock = 'companies-block',\n MediaBlock = 'media-block',\n InfoBlock = 'info-block',\n TableBlock = 'table-block',\n TabsBlock = 'tabs-block',\n HeaderSliderBlock = 'header-slider-block',\n HeaderBlock = 'header-block',\n IconsBlock = 'icons-block',\n CardLayoutBlock = 'card-layout-block',\n ContentLayoutBlock = 'content-layout-block',\n ShareBlock = 'share-block',\n MapBlock = 'map-block',\n FilterBlock = 'filter-block',\n FormBlock = 'form-block',\n}\n\nexport const BlockTypes = Object.values(BlockType);\nexport const HeaderBlockTypes = [BlockType.HeaderBlock, BlockType.HeaderSliderBlock];\n\nexport interface Childable {\n children?: SubBlock[];\n}\n\n//block props\nexport interface BlockBaseProps {\n anchor?: AnchorProps;\n visible?: GridColumnSize;\n /** @deprecated */\n resetPaddings?: boolean;\n indent?: {\n top?: IndentValue;\n bottom?: IndentValue;\n };\n qa?: string;\n}\n\nexport interface LoadableProps {\n source: string;\n /**\n * @deprecated Will be moved to params\n */\n serviceId?: number;\n params?: Record<string, string | number | boolean | object>;\n}\n\nexport interface LoadableChildren {\n loadable?: LoadableProps;\n}\n\nexport enum SliderBreakpointNames {\n Sm = 'sm',\n Md = 'md',\n Lg = 'lg',\n Xl = 'xl',\n}\n\nexport enum SliderType {\n MediaCard = 'media-card',\n HeaderCard = 'header-card',\n FullscreenCard = 'fullscreen-card',\n}\n\nexport type SliderBreakpointParams = Record<SliderBreakpointNames, number>;\nexport type SlidesToShow = Partial<SliderBreakpointParams> | number;\n\nexport interface SliderOldProps extends Childable, Animatable, LoadableChildren {\n dots?: boolean;\n arrows?: boolean;\n slidesToShow?: SlidesToShow;\n disclaimer?: {\n text: string;\n size?: TextSize;\n };\n title?: TitleItemBaseProps | string;\n description?: string;\n autoplay?: number;\n //for server transforms\n randomOrder?: boolean;\n adaptive?: boolean;\n}\n\nexport interface SliderProps extends Childable, Animatable, LoadableChildren {\n dots?: boolean;\n arrows?: boolean;\n slidesToShow?: SlidesToShow;\n disclaimer?: {\n text: string;\n size?: TextSize;\n };\n title?: TitleItemBaseProps | string;\n description?: string;\n autoplay?: number;\n //for server transforms\n randomOrder?: boolean;\n adaptive?: boolean;\n}\n\nexport interface HeaderSliderBlockProps extends Omit<SliderOldProps, 'title' | 'description'> {\n items: HeaderBlockProps[];\n}\n\ninterface HeaderBackgroundProps {\n /** @deprecated replaced by Media Props image */\n url?: string;\n /** @deprecated replaced by Media Props image */\n disableCompress?: boolean;\n}\n\nexport interface HeaderBlockBackground extends Partial<HeaderBackgroundProps>, Partial<MediaProps> {\n fullWidth?: boolean;\n fullWidthMedia?: boolean;\n}\n\nexport type ThemedHeaderBlockBackground = ThemeSupporting<HeaderBlockBackground>;\n\nexport interface HeaderBlockVideoIframe {\n src: string;\n autoplay?: boolean;\n previewImg?: string;\n height?: number;\n}\n\nexport interface HeaderBlockProps {\n title: string;\n overtitle?: string | JSX.Element;\n description?: string;\n additionalInfo?: string;\n buttons?: Pick<ButtonProps, 'url' | 'text' | 'theme' | 'primary' | 'size' | 'extraProps'>[];\n width?: HeaderWidth;\n /** @deprecated imageSize now depends on width */\n imageSize?: HeaderImageSize;\n /**\n * @deprecated used only on the main page\n * TODO: delete after the possibility to remove padding-bottom in the block\n */\n offset?: HeaderOffset;\n image?: ThemedImage;\n video?: ThemedMediaVideoProps;\n videoIframe?: HeaderBlockVideoIframe;\n mediaView?: MediaView;\n centered?: boolean;\n background?: ThemedHeaderBlockBackground;\n theme?: 'light' | 'dark';\n verticalOffset?: '0' | 's' | 'm' | 'l' | 'xl';\n breadcrumbs?: HeaderBreadCrumbsProps;\n status?: JSX.Element;\n renderTitle?: (title: string) => React.ReactNode;\n}\n\nexport interface ExtendedFeaturesItem\n extends Omit<\n ContentBlockProps,\n 'theme' | 'centered' | 'colSizes' | 'size' | 'title' | 'labels'\n > {\n title: string;\n label?: string;\n icon?: ThemedImage;\n /** @deprecated **/\n link?: LinkProps;\n}\n\nexport interface ExtendedFeaturesProps extends Animatable {\n items: ExtendedFeaturesItem[];\n title?: TitleItemProps | string;\n description?: string;\n colSizes?: GridColumnSizesType;\n}\n\nexport interface PromoFeaturesItem {\n title: string;\n text: string;\n theme?: 'accent' | 'accent-light' | 'primary';\n media?: ThemeSupporting<MediaProps>;\n}\n\nexport interface PromoFeaturesProps extends Animatable {\n items: PromoFeaturesItem[];\n title?: TitleItemProps | string;\n description?: string;\n theme?: 'grey' | 'default';\n}\n\nexport interface QuestionItem {\n title: string;\n text: string;\n listStyle?: 'dash' | 'disk';\n link?: LinkProps;\n}\n\nexport interface QuestionsProps\n extends Omit<ContentBlockProps, 'colSizes' | 'centered' | 'size' | 'theme' | 'labels'> {\n items: QuestionItem[];\n}\n\nexport interface QuestionBlockItemProps extends QuestionItem {\n isOpened: boolean;\n onClick: () => void;\n}\n\nexport interface FoldableListItem {\n title: string;\n text: string;\n listStyle?: 'dash' | 'disk';\n link?: LinkProps;\n}\n\nexport interface FoldableListProps\n extends Omit<ContentBlockProps, 'colSizes' | 'centered' | 'size' | 'theme' | 'labels'> {\n items: FoldableListItem[];\n}\n\nexport interface FoldableListBlockItemProps extends FoldableListItem {\n isOpened: boolean;\n onClick: () => void;\n}\n\nexport interface BannerBlockProps extends BannerCardProps, Animatable {}\n\nexport interface CompaniesBlockProps extends Animatable {\n title: string;\n description?: string;\n images: ThemeSupporting<ImageDeviceProps>;\n}\n\nexport interface MediaBaseBlockProps extends Animatable, MediaContentProps {\n direction?: MediaDirection;\n mobileDirection?: MediaDirection;\n largeMedia?: boolean;\n mediaOnly?: boolean;\n mediaOnlyColSizes?: GridColumnSizesType;\n}\n\nexport interface MediaContentProps\n extends Omit<ContentBlockProps, 'colSizes' | 'text' | 'theme' | 'centered' | 'labels'> {\n description?: string;\n /** @deprecated Use array of buttons from ContentBlockProps instead**/\n button?: ButtonProps;\n}\n\nexport interface MediaBlockProps extends MediaBaseBlockProps, WithBorder {\n media: ThemeSupporting<MediaProps>;\n}\n\nexport interface MapBlockProps extends MediaBaseBlockProps, WithBorder {\n map: Omit<MapProps, 'forceAspectRatio' | 'areaMargin' | 'copyrightPosition'>;\n}\n\nexport interface InfoBlockProps {\n theme?: TextTheme;\n backgroundColor?: ThemeSupporting<string>;\n /** @deprecated **/\n title?: string;\n /** @deprecated **/\n buttons?: Pick<ButtonProps, 'url' | 'text' | 'theme'>[];\n /** @deprecated **/\n sectionsTitle?: string;\n /** @deprecated **/\n links?: Pick<LinkProps, 'text' | 'url'>[];\n leftContent?: Omit<ContentBlockProps, 'colSizes' | 'theme' | 'size' | 'labels'>;\n rightContent?: Omit<ContentBlockProps, 'colSizes' | 'theme' | 'size' | 'labels'>;\n}\n\nexport interface TableProps {\n content: string[][];\n legend?: string[];\n hideLegend?: boolean;\n justify?: Justify[];\n marker?: LegendTableMarkerType;\n /**\n * Only as accessible name, not displayed explicitly\n */\n caption?: string;\n}\n\nexport interface TableBlockProps {\n title: string;\n table: TableProps;\n}\n\nexport interface TabsBlockItem\n extends Omit<ContentBlockProps, 'size' | 'colSizes' | 'centered' | 'theme' | 'labels'>,\n WithBorder {\n tabName: string;\n /**\n * @deprecated Use array links from ContentBlockProps instead\n */\n link?: LinkProps;\n image?: ThemedImage;\n caption?: string;\n media?: ThemedMediaProps;\n}\n\nexport interface TabsBlockProps extends Animatable {\n title?: TitleItemProps | string;\n description?: string;\n tabsColSizes?: GridColumnSizesType;\n centered?: boolean;\n direction?: MediaDirection;\n items: TabsBlockItem[];\n contentSize?: ContentSize;\n}\n\nexport interface CardLayoutBlockProps extends Childable, Animatable, LoadableChildren {\n title?: TitleItemProps | string;\n titleClassName?: string;\n description?: string;\n colSizes?: GridColumnSizesType;\n background?: ThemeSupporting<\n BackgroundImageProps & {\n border?: CardBorder;\n }\n >;\n}\n\nexport type FilterTag = {\n id: string;\n label: string;\n};\n\nexport type FilterItem = {\n tags: string[];\n card: SubBlockModels;\n};\n\nexport interface FilterBlockProps extends Animatable {\n tags: FilterTag[];\n items: FilterItem[];\n title?: TitleItemProps | string;\n description?: string;\n tagButtonSize?: ButtonSize;\n allTag?: boolean | string;\n colSizes?: GridColumnSizesType;\n centered?: boolean;\n}\n\nexport interface IconsBlockItemProps extends AnalyticsEventsBase {\n url: string;\n text: string;\n src: ThemeSupporting<string>;\n}\n\nexport interface IconsBlockProps {\n title?: string;\n description?: string;\n size?: 's' | 'm' | 'l';\n items: IconsBlockItemProps[];\n colSizes?: GridColumnSizesType;\n}\n\ninterface ContentLayoutBlockParams {\n size?: ContentSize;\n background?: ThemeSupporting<BackgroundImageProps>;\n centered?: boolean;\n theme?: ContentTheme;\n textWidth?: ContentTextSize;\n}\n\nexport interface ContentLayoutBlockProps extends ContentLayoutBlockParams {\n textContent: Omit<ContentBlockProps, 'labels'>;\n fileContent?: FileLinkProps[];\n}\n\nexport type SVGIcon = (props: React.SVGProps<SVGSVGElement>) => React.ReactNode;\n\nexport interface ContentItemProps {\n title?: string;\n text?: string;\n icon?: ThemeSupporting<ImageProps | SVGIcon>;\n gravityIcon?: ThemeSupporting<GravityIconProps>;\n}\n\nexport interface ContentListProps {\n list: ContentItemProps[];\n size: ContentSize;\n theme?: ContentTheme;\n}\n\nexport interface ContentLabelProps {\n text: string;\n icon?: ThemeSupporting<ImageProps | SVGIcon>;\n gravityIcon?: ThemeSupporting<GravityIconProps>;\n}\n\nexport interface ContentLabelsProps {\n labels: ContentLabelProps[];\n size?: ContentSize;\n theme?: ContentTheme;\n}\n\nexport interface ContentBlockProps {\n title?: TitleItemBaseProps | string;\n titleId?: string;\n text?: string;\n textId?: string;\n additionalInfo?: string;\n links?: LinkProps[];\n buttons?: ButtonProps[];\n size?: ContentSize;\n colSizes?: GridColumnSizesType;\n centered?: boolean;\n theme?: ContentTheme;\n list?: ContentItemProps[];\n labels?: ContentLabelProps[];\n controlPosition?: 'default' | 'bottom';\n}\n\nexport enum PCShareSocialNetwork {\n Vk = 'vk',\n Telegram = 'telegram',\n Twitter = 'twitter',\n Facebook = 'facebook',\n LinkedIn = 'linkedin',\n}\n\nexport interface ShareBlockProps {\n items: PCShareSocialNetwork[];\n title?: string;\n}\n\nexport enum FormBlockDataTypes {\n YANDEX = 'yandex',\n HUBSPOT = 'hubspot',\n}\n\nexport enum FormBlockDirection {\n FormContent = 'form-content',\n ContentForm = 'content-form',\n Center = 'center',\n}\n\nexport interface FormBlockYandexData {\n yandex: ThemeSupporting<YandexFormProps>;\n}\n\nexport interface FormBlockHubspotData {\n hubspot: ThemeSupporting<HubspotFormProps>;\n}\n\nexport type FormBlockData = FormBlockYandexData | FormBlockHubspotData;\n\nexport interface FormBlockBackgroundProps extends Omit<BackgroundImageProps, 'style'> {\n style?: DeviceSupporting<React.CSSProperties>;\n}\n\nexport interface FormBlockProps {\n formData: FormBlockData;\n title?: string;\n textContent?: Omit<ContentBlockProps, 'centered' | 'colSizes' | 'size'>;\n direction?: FormBlockDirection;\n background?: ThemeSupporting<FormBlockBackgroundProps>;\n customFormNode?: React.ReactNode;\n}\n\n//block models\nexport type HeaderBlockModel = {\n type: BlockType.HeaderBlock;\n} & HeaderBlockProps;\n\nexport type SliderOldBlockModel = {\n type: BlockType.SliderOldBlock;\n} & SliderOldProps;\n\nexport type ExtendedFeaturesBlockModel = {\n type: BlockType.ExtendedFeaturesBlock;\n} & ExtendedFeaturesProps;\n\nexport type PromoFeaturesBlockModel = {\n type: BlockType.PromoFeaturesBlock;\n} & PromoFeaturesProps;\n\nexport type QuestionsBlockModel = {\n type: BlockType.QuestionsBlock;\n} & QuestionsProps;\n\nexport type FoldableListBlockModel = {\n type: BlockType.FoldableListBlock;\n} & FoldableListProps;\n\nexport type BannerBlockModel = {\n type: BlockType.BannerBlock;\n} & BannerBlockProps;\n\nexport type CompaniesBlockModel = {\n type: BlockType.CompaniesBlock;\n} & CompaniesBlockProps;\n\nexport type MediaBlockModel = {\n type: BlockType.MediaBlock;\n} & MediaBlockProps;\n\nexport type MapBlockModel = {\n type: BlockType.MapBlock;\n} & MapBlockProps;\n\nexport type InfoBlockModel = {\n type: BlockType.InfoBlock;\n} & InfoBlockProps;\n\nexport type TableBlockModel = {\n type: BlockType.TableBlock;\n} & TableBlockProps;\n\nexport type TabsBlockModel = {\n type: BlockType.TabsBlock;\n} & TabsBlockProps;\n\nexport type CardLayoutBlockModel = {\n type: BlockType.CardLayoutBlock;\n} & CardLayoutBlockProps;\n\nexport type FilterBlockModel = {\n type: BlockType.FilterBlock;\n} & FilterBlockProps;\n\nexport type IconsBlockModel = {\n type: BlockType.IconsBlock;\n} & IconsBlockProps;\n\nexport type HeaderSliderBlockModel = {\n type: BlockType.HeaderSliderBlock;\n} & HeaderSliderBlockProps;\n\nexport type ContentLayoutBlockModel = {\n type: BlockType.ContentLayoutBlock;\n} & ContentLayoutBlockProps;\n\nexport type ShareBLockModel = {\n type: BlockType.ShareBlock;\n} & ShareBlockProps;\n\nexport type FormBlockModel = {\n type: BlockType.FormBlock;\n} & FormBlockProps;\n\nexport type SliderBlockModel = {\n type: BlockType.SliderBlock;\n} & SliderProps;\n\ntype BlockModels =\n | SliderOldBlockModel\n | SliderBlockModel\n | ExtendedFeaturesBlockModel\n | PromoFeaturesBlockModel\n | QuestionsBlockModel\n | FoldableListBlockModel\n | BannerBlockModel\n | CompaniesBlockModel\n | MediaBlockModel\n | MapBlockModel\n | InfoBlockModel\n | TableBlockModel\n | TabsBlockModel\n | HeaderBlockModel\n | IconsBlockModel\n | HeaderSliderBlockModel\n | CardLayoutBlockModel\n | ContentLayoutBlockModel\n | ShareBLockModel\n | FilterBlockModel\n | FormBlockModel;\n\nexport type Block = BlockModels & BlockBaseProps;\n"]}
1
+ {"version":3,"file":"blocks.js","sourceRoot":"../../../../src","sources":["models/constructor-items/blocks.ts"],"names":[],"mappings":";;;AA6CA,IAAY,SAuBX;AAvBD,WAAY,SAAS;IACjB,wDAA2C,CAAA;IAC3C,8DAAiD,CAAA;IACjD,kBAAkB;IAClB,gDAAmC,CAAA;IACnC,yCAA4B,CAAA;IAC5B,+CAAkC,CAAA;IAClC,sDAAyC,CAAA;IACzC,yCAA4B,CAAA;IAC5B,+CAAkC,CAAA;IAClC,uCAA0B,CAAA;IAC1B,qCAAwB,CAAA;IACxB,uCAA0B,CAAA;IAC1B,qCAAwB,CAAA;IACxB,sDAAyC,CAAA;IACzC,yCAA4B,CAAA;IAC5B,uCAA0B,CAAA;IAC1B,kDAAqC,CAAA;IACrC,wDAA2C,CAAA;IAC3C,uCAA0B,CAAA;IAC1B,mCAAsB,CAAA;IACtB,yCAA4B,CAAA;IAC5B,qCAAwB,CAAA;AAC5B,CAAC,EAvBW,SAAS,yBAAT,SAAS,QAuBpB;AAEY,QAAA,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;AACtC,QAAA,gBAAgB,GAAG,CAAC,SAAS,CAAC,WAAW,EAAE,SAAS,CAAC,iBAAiB,CAAC,CAAC;AAgCrF,IAAY,qBAKX;AALD,WAAY,qBAAqB;IAC7B,kCAAS,CAAA;IACT,kCAAS,CAAA;IACT,kCAAS,CAAA;IACT,kCAAS,CAAA;AACb,CAAC,EALW,qBAAqB,qCAArB,qBAAqB,QAKhC;AAED,IAAY,UAIX;AAJD,WAAY,UAAU;IAClB,sCAAwB,CAAA;IACxB,wCAA0B,CAAA;IAC1B,gDAAkC,CAAA;AACtC,CAAC,EAJW,UAAU,0BAAV,UAAU,QAIrB;AA2VD,IAAY,oBAMX;AAND,WAAY,oBAAoB;IAC5B,iCAAS,CAAA;IACT,6CAAqB,CAAA;IACrB,2CAAmB,CAAA;IACnB,6CAAqB,CAAA;IACrB,6CAAqB,CAAA;AACzB,CAAC,EANW,oBAAoB,oCAApB,oBAAoB,QAM/B;AAOD,IAAY,kBAGX;AAHD,WAAY,kBAAkB;IAC1B,uCAAiB,CAAA;IACjB,yCAAmB,CAAA;AACvB,CAAC,EAHW,kBAAkB,kCAAlB,kBAAkB,QAG7B;AAED,IAAY,kBAIX;AAJD,WAAY,kBAAkB;IAC1B,kDAA4B,CAAA;IAC5B,kDAA4B,CAAA;IAC5B,uCAAiB,CAAA;AACrB,CAAC,EAJW,kBAAkB,kCAAlB,kBAAkB,QAI7B","sourcesContent":["import * as React from 'react';\n\nimport {ButtonSize} from '@gravity-ui/uikit';\n\nimport {GridColumnSize, GridColumnSizesType, IndentValue} from '../../grid/types';\nimport {ThemeSupporting} from '../../utils';\nimport {DeviceSupporting} from '../../utils/breakpoint';\nimport {AnalyticsEventsBase} from '../common';\n\nimport {\n AnchorProps,\n Animatable,\n BackgroundImageProps,\n ButtonProps,\n CardBorder,\n ContentSize,\n ContentTextSize,\n ContentTheme,\n FileLinkProps,\n GravityIconProps,\n HeaderBreadCrumbsProps,\n HeaderImageSize,\n HeaderOffset,\n HeaderWidth,\n ImageDeviceProps,\n ImageProps,\n Justify,\n LegendTableMarkerType,\n LinkProps,\n MapProps,\n MediaDirection,\n MediaProps,\n MediaView,\n TextSize,\n TextTheme,\n ThemedImage,\n ThemedMediaProps,\n ThemedMediaVideoProps,\n TitleItemBaseProps,\n TitleItemProps,\n WithBorder,\n YandexFormProps,\n} from './common';\nimport {BannerCardProps, HubspotFormProps, SubBlock, SubBlockModels} from './sub-blocks';\n\nexport enum BlockType {\n PromoFeaturesBlock = 'promo-features-block',\n ExtendedFeaturesBlock = 'extended-features-block',\n /** @deprecated */\n SliderOldBlock = 'slider-old-block',\n SliderBlock = 'slider-block',\n QuestionsBlock = 'questions-block',\n FoldableListBlock = 'foldable-list-block',\n BannerBlock = 'banner-block',\n CompaniesBlock = 'companies-block',\n MediaBlock = 'media-block',\n InfoBlock = 'info-block',\n TableBlock = 'table-block',\n TabsBlock = 'tabs-block',\n HeaderSliderBlock = 'header-slider-block',\n HeaderBlock = 'header-block',\n IconsBlock = 'icons-block',\n CardLayoutBlock = 'card-layout-block',\n ContentLayoutBlock = 'content-layout-block',\n ShareBlock = 'share-block',\n MapBlock = 'map-block',\n FilterBlock = 'filter-block',\n FormBlock = 'form-block',\n}\n\nexport const BlockTypes = Object.values(BlockType);\nexport const HeaderBlockTypes = [BlockType.HeaderBlock, BlockType.HeaderSliderBlock];\n\nexport interface Childable {\n children?: SubBlock[];\n}\n\n//block props\nexport interface BlockBaseProps {\n anchor?: AnchorProps;\n visible?: GridColumnSize;\n /** @deprecated */\n resetPaddings?: boolean;\n indent?: {\n top?: IndentValue;\n bottom?: IndentValue;\n };\n qa?: string;\n}\n\nexport interface LoadableProps {\n source: string;\n /**\n * @deprecated Will be moved to params\n */\n serviceId?: number;\n params?: Record<string, string | number | boolean | object>;\n}\n\nexport interface LoadableChildren {\n loadable?: LoadableProps;\n}\n\nexport enum SliderBreakpointNames {\n Sm = 'sm',\n Md = 'md',\n Lg = 'lg',\n Xl = 'xl',\n}\n\nexport enum SliderType {\n MediaCard = 'media-card',\n HeaderCard = 'header-card',\n FullscreenCard = 'fullscreen-card',\n}\n\nexport type SliderBreakpointParams = Record<SliderBreakpointNames, number>;\nexport type SlidesToShow = Partial<SliderBreakpointParams> | number;\n\nexport interface SliderOldProps extends Childable, Animatable, LoadableChildren {\n dots?: boolean;\n arrows?: boolean;\n slidesToShow?: SlidesToShow;\n disclaimer?: {\n text: string;\n size?: TextSize;\n };\n title?: TitleItemBaseProps | string;\n description?: string;\n autoplay?: number;\n //for server transforms\n randomOrder?: boolean;\n adaptive?: boolean;\n}\n\nexport interface SliderProps extends Childable, Animatable, LoadableChildren {\n dots?: boolean;\n arrows?: boolean;\n slidesToShow?: SlidesToShow;\n disclaimer?: {\n text: string;\n size?: TextSize;\n };\n title?: TitleItemBaseProps | string;\n description?: string;\n autoplay?: number;\n //for server transforms\n randomOrder?: boolean;\n adaptive?: boolean;\n}\n\nexport interface HeaderSliderBlockProps extends Omit<SliderOldProps, 'title' | 'description'> {\n items: HeaderBlockProps[];\n}\n\ninterface HeaderBackgroundProps {\n /** @deprecated replaced by Media Props image */\n url?: string;\n /** @deprecated replaced by Media Props image */\n disableCompress?: boolean;\n}\n\nexport interface HeaderBlockBackground extends Partial<HeaderBackgroundProps>, Partial<MediaProps> {\n fullWidth?: boolean;\n fullWidthMedia?: boolean;\n}\n\nexport type ThemedHeaderBlockBackground = ThemeSupporting<HeaderBlockBackground>;\n\nexport interface HeaderBlockVideoIframe {\n src: string;\n autoplay?: boolean;\n previewImg?: string;\n height?: number;\n}\n\nexport interface HeaderBlockProps {\n title: string;\n overtitle?: string | JSX.Element;\n description?: string;\n additionalInfo?: string;\n buttons?: Pick<ButtonProps, 'url' | 'text' | 'theme' | 'primary' | 'size' | 'extraProps'>[];\n width?: HeaderWidth;\n /** @deprecated imageSize now depends on width */\n imageSize?: HeaderImageSize;\n /**\n * @deprecated used only on the main page\n * TODO: delete after the possibility to remove padding-bottom in the block\n */\n offset?: HeaderOffset;\n image?: ThemedImage;\n video?: ThemedMediaVideoProps;\n videoIframe?: HeaderBlockVideoIframe;\n mediaView?: MediaView;\n centered?: boolean;\n background?: ThemedHeaderBlockBackground;\n theme?: 'light' | 'dark';\n verticalOffset?: '0' | 's' | 'm' | 'l' | 'xl';\n breadcrumbs?: HeaderBreadCrumbsProps;\n status?: JSX.Element;\n renderTitle?: (title: string) => React.ReactNode;\n}\n\nexport interface ExtendedFeaturesItem\n extends Omit<\n ContentBlockProps,\n 'theme' | 'centered' | 'colSizes' | 'size' | 'title' | 'labels'\n > {\n title: string;\n label?: string;\n icon?: ThemedImage;\n /** @deprecated **/\n link?: LinkProps;\n}\n\nexport interface ExtendedFeaturesProps extends Animatable {\n items: ExtendedFeaturesItem[];\n title?: TitleItemProps | string;\n description?: string;\n colSizes?: GridColumnSizesType;\n}\n\nexport interface PromoFeaturesItem {\n title: string;\n text: string;\n theme?: 'accent' | 'accent-light' | 'primary';\n media?: ThemeSupporting<MediaProps>;\n}\n\nexport interface PromoFeaturesProps extends Animatable {\n items: PromoFeaturesItem[];\n title?: TitleItemProps | string;\n description?: string;\n theme?: 'grey' | 'default';\n}\n\nexport interface QuestionItem {\n title: string;\n text: string;\n listStyle?: 'dash' | 'disk';\n link?: LinkProps;\n}\n\nexport interface QuestionsProps\n extends Omit<ContentBlockProps, 'colSizes' | 'centered' | 'size' | 'theme' | 'labels'> {\n items: QuestionItem[];\n}\n\nexport interface QuestionBlockItemProps extends QuestionItem {\n isOpened: boolean;\n onClick: () => void;\n}\n\nexport interface FoldableListItem {\n title: string;\n text: string;\n listStyle?: 'dash' | 'disk';\n link?: LinkProps;\n}\n\nexport interface FoldableListProps\n extends Omit<ContentBlockProps, 'colSizes' | 'centered' | 'size' | 'theme' | 'labels'> {\n items: FoldableListItem[];\n}\n\nexport interface FoldableListBlockItemProps extends FoldableListItem {\n isOpened: boolean;\n onClick: () => void;\n}\n\nexport interface BannerBlockProps extends BannerCardProps, Animatable {}\n\nexport interface CompaniesBlockProps extends Animatable {\n title: string;\n description?: string;\n images: ThemeSupporting<ImageDeviceProps>;\n}\n\nexport interface MediaBaseBlockProps extends Animatable, MediaContentProps {\n direction?: MediaDirection;\n mobileDirection?: MediaDirection;\n largeMedia?: boolean;\n mediaOnly?: boolean;\n mediaOnlyColSizes?: GridColumnSizesType;\n}\n\nexport interface MediaContentProps\n extends Omit<ContentBlockProps, 'colSizes' | 'text' | 'theme' | 'centered' | 'labels'> {\n description?: string;\n /** @deprecated Use array of buttons from ContentBlockProps instead**/\n button?: ButtonProps;\n}\n\nexport interface MediaBlockProps extends MediaBaseBlockProps, WithBorder {\n media: ThemeSupporting<MediaProps>;\n}\n\nexport interface MapBlockProps extends MediaBaseBlockProps, WithBorder {\n map: Omit<MapProps, 'forceAspectRatio' | 'areaMargin' | 'copyrightPosition'>;\n}\n\nexport interface InfoBlockProps {\n theme?: TextTheme;\n backgroundColor?: ThemeSupporting<string>;\n /** @deprecated **/\n title?: string;\n /** @deprecated **/\n buttons?: Pick<ButtonProps, 'url' | 'text' | 'theme'>[];\n /** @deprecated **/\n sectionsTitle?: string;\n /** @deprecated **/\n links?: Pick<LinkProps, 'text' | 'url'>[];\n leftContent?: Omit<ContentBlockProps, 'colSizes' | 'theme' | 'size' | 'labels'>;\n rightContent?: Omit<ContentBlockProps, 'colSizes' | 'theme' | 'size' | 'labels'>;\n}\n\nexport interface TableProps {\n content: string[][];\n legend?: string[];\n hideLegend?: boolean;\n justify?: Justify[];\n marker?: LegendTableMarkerType;\n /**\n * Only as accessible name, not displayed explicitly\n */\n caption?: string;\n}\n\nexport interface TableBlockProps {\n title: string;\n table: TableProps;\n}\n\nexport interface TabsBlockItem\n extends Omit<ContentBlockProps, 'size' | 'colSizes' | 'centered' | 'theme' | 'labels'>,\n WithBorder {\n tabName: string;\n /**\n * @deprecated Use array links from ContentBlockProps instead\n */\n link?: LinkProps;\n image?: ThemedImage;\n caption?: string;\n media?: ThemedMediaProps;\n}\n\nexport interface TabsBlockProps extends Animatable {\n title?: TitleItemProps | string;\n description?: string;\n tabsColSizes?: GridColumnSizesType;\n centered?: boolean;\n direction?: MediaDirection;\n items: TabsBlockItem[];\n contentSize?: ContentSize;\n}\n\nexport interface CardLayoutBlockProps extends Childable, Animatable, LoadableChildren {\n title?: TitleItemProps | string;\n titleClassName?: string;\n centered?: boolean;\n description?: string;\n colSizes?: GridColumnSizesType;\n background?: ThemeSupporting<\n BackgroundImageProps & {\n border?: CardBorder;\n }\n >;\n}\n\nexport type FilterTag = {\n id: string;\n label: string;\n};\n\nexport type FilterItem = {\n tags: string[];\n card: SubBlockModels;\n};\n\nexport interface FilterBlockProps extends Animatable {\n tags: FilterTag[];\n items: FilterItem[];\n title?: TitleItemProps | string;\n description?: string;\n tagButtonSize?: ButtonSize;\n allTag?: boolean | string;\n colSizes?: GridColumnSizesType;\n centered?: boolean;\n}\n\nexport interface IconsBlockItemProps extends AnalyticsEventsBase {\n url: string;\n text: string;\n src: ThemeSupporting<string>;\n}\n\nexport interface IconsBlockProps {\n title?: string;\n description?: string;\n size?: 's' | 'm' | 'l';\n items: IconsBlockItemProps[];\n colSizes?: GridColumnSizesType;\n}\n\ninterface ContentLayoutBlockParams {\n size?: ContentSize;\n background?: ThemeSupporting<BackgroundImageProps>;\n centered?: boolean;\n theme?: ContentTheme;\n textWidth?: ContentTextSize;\n}\n\nexport interface ContentLayoutBlockProps extends ContentLayoutBlockParams {\n textContent: Omit<ContentBlockProps, 'labels'>;\n fileContent?: FileLinkProps[];\n}\n\nexport type SVGIcon = (props: React.SVGProps<SVGSVGElement>) => React.ReactNode;\n\nexport interface ContentItemProps {\n title?: string;\n text?: string;\n icon?: ThemeSupporting<ImageProps | SVGIcon>;\n gravityIcon?: ThemeSupporting<GravityIconProps>;\n}\n\nexport interface ContentListProps {\n list: ContentItemProps[];\n size: ContentSize;\n theme?: ContentTheme;\n}\n\nexport interface ContentLabelProps {\n text: string;\n icon?: ThemeSupporting<ImageProps | SVGIcon>;\n gravityIcon?: ThemeSupporting<GravityIconProps>;\n}\n\nexport interface ContentLabelsProps {\n labels: ContentLabelProps[];\n size?: ContentSize;\n theme?: ContentTheme;\n}\n\nexport interface ContentBlockProps {\n title?: TitleItemBaseProps | string;\n titleId?: string;\n text?: string;\n textId?: string;\n additionalInfo?: string;\n links?: LinkProps[];\n buttons?: ButtonProps[];\n size?: ContentSize;\n colSizes?: GridColumnSizesType;\n centered?: boolean;\n theme?: ContentTheme;\n list?: ContentItemProps[];\n labels?: ContentLabelProps[];\n controlPosition?: 'default' | 'bottom';\n}\n\nexport enum PCShareSocialNetwork {\n Vk = 'vk',\n Telegram = 'telegram',\n Twitter = 'twitter',\n Facebook = 'facebook',\n LinkedIn = 'linkedin',\n}\n\nexport interface ShareBlockProps {\n items: PCShareSocialNetwork[];\n title?: string;\n}\n\nexport enum FormBlockDataTypes {\n YANDEX = 'yandex',\n HUBSPOT = 'hubspot',\n}\n\nexport enum FormBlockDirection {\n FormContent = 'form-content',\n ContentForm = 'content-form',\n Center = 'center',\n}\n\nexport interface FormBlockYandexData {\n yandex: ThemeSupporting<YandexFormProps>;\n}\n\nexport interface FormBlockHubspotData {\n hubspot: ThemeSupporting<HubspotFormProps>;\n}\n\nexport type FormBlockData = FormBlockYandexData | FormBlockHubspotData;\n\nexport interface FormBlockBackgroundProps extends Omit<BackgroundImageProps, 'style'> {\n style?: DeviceSupporting<React.CSSProperties>;\n}\n\nexport interface FormBlockProps {\n formData: FormBlockData;\n title?: string;\n textContent?: Omit<ContentBlockProps, 'centered' | 'colSizes' | 'size'>;\n direction?: FormBlockDirection;\n background?: ThemeSupporting<FormBlockBackgroundProps>;\n customFormNode?: React.ReactNode;\n}\n\n//block models\nexport type HeaderBlockModel = {\n type: BlockType.HeaderBlock;\n} & HeaderBlockProps;\n\nexport type SliderOldBlockModel = {\n type: BlockType.SliderOldBlock;\n} & SliderOldProps;\n\nexport type ExtendedFeaturesBlockModel = {\n type: BlockType.ExtendedFeaturesBlock;\n} & ExtendedFeaturesProps;\n\nexport type PromoFeaturesBlockModel = {\n type: BlockType.PromoFeaturesBlock;\n} & PromoFeaturesProps;\n\nexport type QuestionsBlockModel = {\n type: BlockType.QuestionsBlock;\n} & QuestionsProps;\n\nexport type FoldableListBlockModel = {\n type: BlockType.FoldableListBlock;\n} & FoldableListProps;\n\nexport type BannerBlockModel = {\n type: BlockType.BannerBlock;\n} & BannerBlockProps;\n\nexport type CompaniesBlockModel = {\n type: BlockType.CompaniesBlock;\n} & CompaniesBlockProps;\n\nexport type MediaBlockModel = {\n type: BlockType.MediaBlock;\n} & MediaBlockProps;\n\nexport type MapBlockModel = {\n type: BlockType.MapBlock;\n} & MapBlockProps;\n\nexport type InfoBlockModel = {\n type: BlockType.InfoBlock;\n} & InfoBlockProps;\n\nexport type TableBlockModel = {\n type: BlockType.TableBlock;\n} & TableBlockProps;\n\nexport type TabsBlockModel = {\n type: BlockType.TabsBlock;\n} & TabsBlockProps;\n\nexport type CardLayoutBlockModel = {\n type: BlockType.CardLayoutBlock;\n} & CardLayoutBlockProps;\n\nexport type FilterBlockModel = {\n type: BlockType.FilterBlock;\n} & FilterBlockProps;\n\nexport type IconsBlockModel = {\n type: BlockType.IconsBlock;\n} & IconsBlockProps;\n\nexport type HeaderSliderBlockModel = {\n type: BlockType.HeaderSliderBlock;\n} & HeaderSliderBlockProps;\n\nexport type ContentLayoutBlockModel = {\n type: BlockType.ContentLayoutBlock;\n} & ContentLayoutBlockProps;\n\nexport type ShareBLockModel = {\n type: BlockType.ShareBlock;\n} & ShareBlockProps;\n\nexport type FormBlockModel = {\n type: BlockType.FormBlock;\n} & FormBlockProps;\n\nexport type SliderBlockModel = {\n type: BlockType.SliderBlock;\n} & SliderProps;\n\ntype BlockModels =\n | SliderOldBlockModel\n | SliderBlockModel\n | ExtendedFeaturesBlockModel\n | PromoFeaturesBlockModel\n | QuestionsBlockModel\n | FoldableListBlockModel\n | BannerBlockModel\n | CompaniesBlockModel\n | MediaBlockModel\n | MapBlockModel\n | InfoBlockModel\n | TableBlockModel\n | TabsBlockModel\n | HeaderBlockModel\n | IconsBlockModel\n | HeaderSliderBlockModel\n | CardLayoutBlockModel\n | ContentLayoutBlockModel\n | ShareBLockModel\n | FilterBlockModel\n | FormBlockModel;\n\nexport type Block = BlockModels & BlockBaseProps;\n"]}
@@ -14,6 +14,12 @@ unpredictable css rules order in build */
14
14
  padding: 8px 32px 48px;
15
15
  margin-top: 24px;
16
16
  }
17
+ .pc-card-layout-block__title_centered {
18
+ display: flex;
19
+ flex-direction: column;
20
+ align-items: center;
21
+ text-align: center;
22
+ }
17
23
  .pc-card-layout-block__image {
18
24
  position: absolute;
19
25
  top: 0;
@@ -2,5 +2,5 @@ import * as React from 'react';
2
2
  import { CardLayoutBlockProps as CardLayoutBlockParams, ClassNameProps } from "../../models/index.js";
3
3
  import './CardLayout.css';
4
4
  export type CardLayoutBlockProps = React.PropsWithChildren<Omit<CardLayoutBlockParams, 'children'>> & ClassNameProps;
5
- declare const CardLayout: ({ title, description, animated, colSizes, children, className, titleClassName, background, }: CardLayoutBlockProps) => import("react/jsx-runtime").JSX.Element;
5
+ declare const CardLayout: ({ title, description, animated, colSizes, children, className, titleClassName, background, centered, }: CardLayoutBlockProps) => import("react/jsx-runtime").JSX.Element;
6
6
  export default CardLayout;
@@ -3,7 +3,7 @@ import * as React from 'react';
3
3
  import isEmpty from "lodash/isEmpty.js";
4
4
  import { AnimateBlock, BackgroundImage, Title } from "../../components/index.js";
5
5
  import { useTheme } from "../../context/theme/index.js";
6
- import { Col, Row } from "../../grid/index.js";
6
+ import { Col, GridJustifyContent, Row } from "../../grid/index.js";
7
7
  import { block, getThemedValue } from "../../utils/index.js";
8
8
  import './CardLayout.css';
9
9
  const DEFAULT_SIZES = {
@@ -12,10 +12,10 @@ const DEFAULT_SIZES = {
12
12
  md: 4,
13
13
  };
14
14
  const b = block('card-layout-block');
15
- const CardLayout = ({ title, description, animated, colSizes = DEFAULT_SIZES, children, className, titleClassName, background, }) => {
15
+ const CardLayout = ({ title, description, animated, colSizes = DEFAULT_SIZES, children, className, titleClassName, background, centered = false, }) => {
16
16
  const theme = useTheme();
17
17
  const { border, ...backgroundImageProps } = getThemedValue(background || {}, theme);
18
- return (_jsxs(AnimateBlock, { className: b(null, className), animate: animated, children: [(title || description) && (_jsx(Title, { title: title, subtitle: description, className: titleClassName })), _jsxs("div", { className: b('content', {
18
+ return (_jsxs(AnimateBlock, { className: b(null, className), animate: animated, children: [(title || description) && (_jsx(Title, { title: title, subtitle: description, className: b('title', { centered }, titleClassName), colJustifyContent: centered ? GridJustifyContent.Center : GridJustifyContent.Start })), _jsxs("div", { className: b('content', {
19
19
  'with-background': !isEmpty(background),
20
20
  }), children: [_jsx(BackgroundImage, { className: b('image', { border }), ...backgroundImageProps }), _jsx(Row, { children: React.Children.map(children, (child, index) => (_jsx(Col, { sizes: colSizes, className: b('item'), children: child }, index))) })] })] }));
21
21
  };
@@ -1 +1 @@
1
- {"version":3,"file":"CardLayout.js","sourceRoot":"../../../../src","sources":["blocks/CardLayout/CardLayout.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,OAAO,0BAAuB;AAErC,OAAO,EAAC,YAAY,EAAE,eAAe,EAAE,KAAK,EAAC,kCAAyB;AACtE,OAAO,EAAC,QAAQ,EAAC,qCAA4B;AAC7C,OAAO,EAAC,GAAG,EAAuB,GAAG,EAAC,4BAAmB;AAEzD,OAAO,EAAC,KAAK,EAAE,cAAc,EAAC,6BAAoB;AAElD,OAAO,kBAAkB,CAAC;AAE1B,MAAM,aAAa,GAAwB;IACvC,GAAG,EAAE,EAAE;IACP,EAAE,EAAE,CAAC;IACL,EAAE,EAAE,CAAC;CACR,CAAC;AAMF,MAAM,CAAC,GAAG,KAAK,CAAC,mBAAmB,CAAC,CAAC;AAErC,MAAM,UAAU,GAAG,CAAC,EAChB,KAAK,EACL,WAAW,EACX,QAAQ,EACR,QAAQ,GAAG,aAAa,EACxB,QAAQ,EACR,SAAS,EACT,cAAc,EACd,UAAU,GACS,EAAE,EAAE;IACvB,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;IACzB,MAAM,EAAC,MAAM,EAAE,GAAG,oBAAoB,EAAC,GAAG,cAAc,CAAC,UAAU,IAAI,EAAE,EAAE,KAAK,CAAC,CAAC;IAClF,OAAO,CACH,MAAC,YAAY,IAAC,SAAS,EAAE,CAAC,CAAC,IAAI,EAAE,SAAS,CAAC,EAAE,OAAO,EAAE,QAAQ,aACzD,CAAC,KAAK,IAAI,WAAW,CAAC,IAAI,CACvB,KAAC,KAAK,IAAC,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,SAAS,EAAE,cAAc,GAAI,CAC5E,EACD,eACI,SAAS,EAAE,CAAC,CAAC,SAAS,EAAE;oBACpB,iBAAiB,EAAE,CAAC,OAAO,CAAC,UAAU,CAAC;iBAC1C,CAAC,aAEF,KAAC,eAAe,IAAC,SAAS,EAAE,CAAC,CAAC,OAAO,EAAE,EAAC,MAAM,EAAC,CAAC,KAAM,oBAAoB,GAAI,EAC9E,KAAC,GAAG,cACC,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC,CAC5C,KAAC,GAAG,IAAa,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC,CAAC,MAAM,CAAC,YACjD,KAAK,IADA,KAAK,CAET,CACT,CAAC,GACA,IACJ,IACK,CAClB,CAAC;AACN,CAAC,CAAC;AAEF,eAAe,UAAU,CAAC","sourcesContent":["import * as React from 'react';\n\nimport isEmpty from 'lodash/isEmpty';\n\nimport {AnimateBlock, BackgroundImage, Title} from '../../components';\nimport {useTheme} from '../../context/theme';\nimport {Col, GridColumnSizesType, Row} from '../../grid';\nimport {CardLayoutBlockProps as CardLayoutBlockParams, ClassNameProps} from '../../models';\nimport {block, getThemedValue} from '../../utils';\n\nimport './CardLayout.scss';\n\nconst DEFAULT_SIZES: GridColumnSizesType = {\n all: 12,\n sm: 6,\n md: 4,\n};\nexport type CardLayoutBlockProps = React.PropsWithChildren<\n Omit<CardLayoutBlockParams, 'children'>\n> &\n ClassNameProps;\n\nconst b = block('card-layout-block');\n\nconst CardLayout = ({\n title,\n description,\n animated,\n colSizes = DEFAULT_SIZES,\n children,\n className,\n titleClassName,\n background,\n}: CardLayoutBlockProps) => {\n const theme = useTheme();\n const {border, ...backgroundImageProps} = getThemedValue(background || {}, theme);\n return (\n <AnimateBlock className={b(null, className)} animate={animated}>\n {(title || description) && (\n <Title title={title} subtitle={description} className={titleClassName} />\n )}\n <div\n className={b('content', {\n 'with-background': !isEmpty(background),\n })}\n >\n <BackgroundImage className={b('image', {border})} {...backgroundImageProps} />\n <Row>\n {React.Children.map(children, (child, index) => (\n <Col key={index} sizes={colSizes} className={b('item')}>\n {child}\n </Col>\n ))}\n </Row>\n </div>\n </AnimateBlock>\n );\n};\n\nexport default CardLayout;\n"]}
1
+ {"version":3,"file":"CardLayout.js","sourceRoot":"../../../../src","sources":["blocks/CardLayout/CardLayout.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,OAAO,0BAAuB;AAErC,OAAO,EAAC,YAAY,EAAE,eAAe,EAAE,KAAK,EAAC,kCAAyB;AACtE,OAAO,EAAC,QAAQ,EAAC,qCAA4B;AAC7C,OAAO,EAAC,GAAG,EAAuB,kBAAkB,EAAE,GAAG,EAAC,4BAAmB;AAE7E,OAAO,EAAC,KAAK,EAAE,cAAc,EAAC,6BAAoB;AAElD,OAAO,kBAAkB,CAAC;AAE1B,MAAM,aAAa,GAAwB;IACvC,GAAG,EAAE,EAAE;IACP,EAAE,EAAE,CAAC;IACL,EAAE,EAAE,CAAC;CACR,CAAC;AAOF,MAAM,CAAC,GAAG,KAAK,CAAC,mBAAmB,CAAC,CAAC;AAErC,MAAM,UAAU,GAAG,CAAC,EAChB,KAAK,EACL,WAAW,EACX,QAAQ,EACR,QAAQ,GAAG,aAAa,EACxB,QAAQ,EACR,SAAS,EACT,cAAc,EACd,UAAU,EACV,QAAQ,GAAG,KAAK,GACG,EAAE,EAAE;IACvB,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;IACzB,MAAM,EAAC,MAAM,EAAE,GAAG,oBAAoB,EAAC,GAAG,cAAc,CAAC,UAAU,IAAI,EAAE,EAAE,KAAK,CAAC,CAAC;IAClF,OAAO,CACH,MAAC,YAAY,IAAC,SAAS,EAAE,CAAC,CAAC,IAAI,EAAE,SAAS,CAAC,EAAE,OAAO,EAAE,QAAQ,aACzD,CAAC,KAAK,IAAI,WAAW,CAAC,IAAI,CACvB,KAAC,KAAK,IACF,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,WAAW,EACrB,SAAS,EAAE,CAAC,CAAC,OAAO,EAAE,EAAC,QAAQ,EAAC,EAAE,cAAc,CAAC,EACjD,iBAAiB,EACb,QAAQ,CAAC,CAAC,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAC,CAAC,kBAAkB,CAAC,KAAK,GAErE,CACL,EACD,eACI,SAAS,EAAE,CAAC,CAAC,SAAS,EAAE;oBACpB,iBAAiB,EAAE,CAAC,OAAO,CAAC,UAAU,CAAC;iBAC1C,CAAC,aAEF,KAAC,eAAe,IAAC,SAAS,EAAE,CAAC,CAAC,OAAO,EAAE,EAAC,MAAM,EAAC,CAAC,KAAM,oBAAoB,GAAI,EAC9E,KAAC,GAAG,cACC,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC,CAC5C,KAAC,GAAG,IAAa,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC,CAAC,MAAM,CAAC,YACjD,KAAK,IADA,KAAK,CAET,CACT,CAAC,GACA,IACJ,IACK,CAClB,CAAC;AACN,CAAC,CAAC;AAEF,eAAe,UAAU,CAAC","sourcesContent":["import * as React from 'react';\n\nimport isEmpty from 'lodash/isEmpty';\n\nimport {AnimateBlock, BackgroundImage, Title} from '../../components';\nimport {useTheme} from '../../context/theme';\nimport {Col, GridColumnSizesType, GridJustifyContent, Row} from '../../grid';\nimport {CardLayoutBlockProps as CardLayoutBlockParams, ClassNameProps} from '../../models';\nimport {block, getThemedValue} from '../../utils';\n\nimport './CardLayout.scss';\n\nconst DEFAULT_SIZES: GridColumnSizesType = {\n all: 12,\n sm: 6,\n md: 4,\n};\n\nexport type CardLayoutBlockProps = React.PropsWithChildren<\n Omit<CardLayoutBlockParams, 'children'>\n> &\n ClassNameProps;\n\nconst b = block('card-layout-block');\n\nconst CardLayout = ({\n title,\n description,\n animated,\n colSizes = DEFAULT_SIZES,\n children,\n className,\n titleClassName,\n background,\n centered = false,\n}: CardLayoutBlockProps) => {\n const theme = useTheme();\n const {border, ...backgroundImageProps} = getThemedValue(background || {}, theme);\n return (\n <AnimateBlock className={b(null, className)} animate={animated}>\n {(title || description) && (\n <Title\n title={title}\n subtitle={description}\n className={b('title', {centered}, titleClassName)}\n colJustifyContent={\n centered ? GridJustifyContent.Center : GridJustifyContent.Start\n }\n />\n )}\n <div\n className={b('content', {\n 'with-background': !isEmpty(background),\n })}\n >\n <BackgroundImage className={b('image', {border})} {...backgroundImageProps} />\n <Row>\n {React.Children.map(children, (child, index) => (\n <Col key={index} sizes={colSizes} className={b('item')}>\n {child}\n </Col>\n ))}\n </Row>\n </div>\n </AnimateBlock>\n );\n};\n\nexport default CardLayout;\n"]}
@@ -1,9 +1,10 @@
1
- import { GridColumnSizesType } from "../../grid/index.js";
1
+ import { GridColumnSizesType, GridJustifyContent } from "../../grid/index.js";
2
2
  import { ClassNameProps, TitleProps as TitleParams } from "../../models/index.js";
3
3
  import './Title.css';
4
4
  export interface TitleProps extends TitleParams {
5
5
  colSizes?: GridColumnSizesType;
6
+ colJustifyContent?: GridJustifyContent;
6
7
  id?: string;
7
8
  }
8
- declare const Title: ({ title, subtitle, className, colSizes, id, }: TitleProps & ClassNameProps) => import("react/jsx-runtime").JSX.Element | null;
9
+ declare const Title: ({ title, subtitle, className, colSizes, colJustifyContent, id, }: TitleProps & ClassNameProps) => import("react/jsx-runtime").JSX.Element | null;
9
10
  export default Title;
@@ -5,12 +5,12 @@ import YFMWrapper from "../YFMWrapper/YFMWrapper.js";
5
5
  import TitleItem from "./TitleItem.js";
6
6
  import './Title.css';
7
7
  const b = block('title');
8
- const Title = ({ title, subtitle, className, colSizes = { all: 12, sm: 8 }, id, }) => {
8
+ const Title = ({ title, subtitle, className, colSizes = { all: 12, sm: 8 }, colJustifyContent, id, }) => {
9
9
  if (!title && !subtitle) {
10
10
  return null;
11
11
  }
12
12
  const { text, ...titleProps } = !title || typeof title === 'string' ? { text: title } : title;
13
- return (_jsxs("div", { className: b(null, className), id: id, children: [text && (_jsx(Col, { reset: true, sizes: colSizes, children: _jsx(TitleItem, { text: text, ...titleProps }) })), subtitle && (_jsx(Col, { reset: true, sizes: colSizes, children: _jsx("div", { className: b('description', { titleSize: titleProps?.textSize }), children: _jsx(YFMWrapper, { content: subtitle, modifiers: { constructor: true } }) }) }))] }));
13
+ return (_jsxs("div", { className: b(null, className), id: id, children: [text && (_jsx(Col, { reset: true, sizes: colSizes, ...(colJustifyContent && { justifyContent: colJustifyContent }), children: _jsx(TitleItem, { text: text, ...titleProps }) })), subtitle && (_jsx(Col, { reset: true, sizes: colSizes, ...(colJustifyContent && { justifyContent: colJustifyContent }), children: _jsx("div", { className: b('description', { titleSize: titleProps?.textSize }), children: _jsx(YFMWrapper, { content: subtitle, modifiers: { constructor: true } }) }) }))] }));
14
14
  };
15
15
  export default Title;
16
16
  //# sourceMappingURL=Title.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Title.js","sourceRoot":"../../../../src","sources":["components/Title/Title.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAC,GAAG,EAAsB,4BAAmB;AAEpD,OAAO,EAAC,KAAK,EAAC,6BAAoB;AAClC,OAAO,UAAU,oCAAiC;AAElD,OAAO,SAAS,uBAAoB;AAEpC,OAAO,aAAa,CAAC;AAErB,MAAM,CAAC,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC;AAOzB,MAAM,KAAK,GAAG,CAAC,EACX,KAAK,EACL,QAAQ,EACR,SAAS,EACT,QAAQ,GAAG,EAAC,GAAG,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EAAC,EAC3B,EAAE,GACwB,EAAE,EAAE;IAC9B,IAAI,CAAC,KAAK,IAAI,CAAC,QAAQ,EAAE,CAAC;QACtB,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,MAAM,EAAC,IAAI,EAAE,GAAG,UAAU,EAAC,GACvB,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAE,EAAC,IAAI,EAAE,KAAK,EAAoB,CAAC,CAAC,CAAC,KAAK,CAAC;IAEpF,OAAO,CACH,eAAK,SAAS,EAAE,CAAC,CAAC,IAAI,EAAE,SAAS,CAAC,EAAE,EAAE,EAAE,EAAE,aACrC,IAAI,IAAI,CACL,KAAC,GAAG,IAAC,KAAK,QAAC,KAAK,EAAE,QAAQ,YACtB,KAAC,SAAS,IAAC,IAAI,EAAE,IAAI,KAAM,UAAU,GAAI,GACvC,CACT,EACA,QAAQ,IAAI,CACT,KAAC,GAAG,IAAC,KAAK,QAAC,KAAK,EAAE,QAAQ,YACtB,cAAK,SAAS,EAAE,CAAC,CAAC,aAAa,EAAE,EAAC,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAC,CAAC,YAC/D,KAAC,UAAU,IAAC,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAC,WAAW,EAAE,IAAI,EAAC,GAAI,GAC/D,GACJ,CACT,IACC,CACT,CAAC;AACN,CAAC,CAAC;AAEF,eAAe,KAAK,CAAC","sourcesContent":["import {Col, GridColumnSizesType} from '../../grid';\nimport {ClassNameProps, TitleItemProps, TitleProps as TitleParams} from '../../models';\nimport {block} from '../../utils';\nimport YFMWrapper from '../YFMWrapper/YFMWrapper';\n\nimport TitleItem from './TitleItem';\n\nimport './Title.scss';\n\nconst b = block('title');\n\nexport interface TitleProps extends TitleParams {\n colSizes?: GridColumnSizesType;\n id?: string;\n}\n\nconst Title = ({\n title,\n subtitle,\n className,\n colSizes = {all: 12, sm: 8},\n id,\n}: TitleProps & ClassNameProps) => {\n if (!title && !subtitle) {\n return null;\n }\n\n const {text, ...titleProps} =\n !title || typeof title === 'string' ? ({text: title} as TitleItemProps) : title;\n\n return (\n <div className={b(null, className)} id={id}>\n {text && (\n <Col reset sizes={colSizes}>\n <TitleItem text={text} {...titleProps} />\n </Col>\n )}\n {subtitle && (\n <Col reset sizes={colSizes}>\n <div className={b('description', {titleSize: titleProps?.textSize})}>\n <YFMWrapper content={subtitle} modifiers={{constructor: true}} />\n </div>\n </Col>\n )}\n </div>\n );\n};\n\nexport default Title;\n"]}
1
+ {"version":3,"file":"Title.js","sourceRoot":"../../../../src","sources":["components/Title/Title.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAC,GAAG,EAA0C,4BAAmB;AAExE,OAAO,EAAC,KAAK,EAAC,6BAAoB;AAClC,OAAO,UAAU,oCAAiC;AAElD,OAAO,SAAS,uBAAoB;AAEpC,OAAO,aAAa,CAAC;AAErB,MAAM,CAAC,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC;AAQzB,MAAM,KAAK,GAAG,CAAC,EACX,KAAK,EACL,QAAQ,EACR,SAAS,EACT,QAAQ,GAAG,EAAC,GAAG,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EAAC,EAC3B,iBAAiB,EACjB,EAAE,GACwB,EAAE,EAAE;IAC9B,IAAI,CAAC,KAAK,IAAI,CAAC,QAAQ,EAAE,CAAC;QACtB,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,MAAM,EAAC,IAAI,EAAE,GAAG,UAAU,EAAC,GACvB,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAE,EAAC,IAAI,EAAE,KAAK,EAAoB,CAAC,CAAC,CAAC,KAAK,CAAC;IAEpF,OAAO,CACH,eAAK,SAAS,EAAE,CAAC,CAAC,IAAI,EAAE,SAAS,CAAC,EAAE,EAAE,EAAE,EAAE,aACrC,IAAI,IAAI,CACL,KAAC,GAAG,IACA,KAAK,QACL,KAAK,EAAE,QAAQ,KACX,CAAC,iBAAiB,IAAI,EAAC,cAAc,EAAE,iBAAiB,EAAC,CAAC,YAE9D,KAAC,SAAS,IAAC,IAAI,EAAE,IAAI,KAAM,UAAU,GAAI,GACvC,CACT,EACA,QAAQ,IAAI,CACT,KAAC,GAAG,IACA,KAAK,QACL,KAAK,EAAE,QAAQ,KACX,CAAC,iBAAiB,IAAI,EAAC,cAAc,EAAE,iBAAiB,EAAC,CAAC,YAE9D,cAAK,SAAS,EAAE,CAAC,CAAC,aAAa,EAAE,EAAC,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAC,CAAC,YAC/D,KAAC,UAAU,IAAC,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAC,WAAW,EAAE,IAAI,EAAC,GAAI,GAC/D,GACJ,CACT,IACC,CACT,CAAC;AACN,CAAC,CAAC;AAEF,eAAe,KAAK,CAAC","sourcesContent":["import {Col, GridColumnSizesType, GridJustifyContent} from '../../grid';\nimport {ClassNameProps, TitleItemProps, TitleProps as TitleParams} from '../../models';\nimport {block} from '../../utils';\nimport YFMWrapper from '../YFMWrapper/YFMWrapper';\n\nimport TitleItem from './TitleItem';\n\nimport './Title.scss';\n\nconst b = block('title');\n\nexport interface TitleProps extends TitleParams {\n colSizes?: GridColumnSizesType;\n colJustifyContent?: GridJustifyContent;\n id?: string;\n}\n\nconst Title = ({\n title,\n subtitle,\n className,\n colSizes = {all: 12, sm: 8},\n colJustifyContent,\n id,\n}: TitleProps & ClassNameProps) => {\n if (!title && !subtitle) {\n return null;\n }\n\n const {text, ...titleProps} =\n !title || typeof title === 'string' ? ({text: title} as TitleItemProps) : title;\n\n return (\n <div className={b(null, className)} id={id}>\n {text && (\n <Col\n reset\n sizes={colSizes}\n {...(colJustifyContent && {justifyContent: colJustifyContent})}\n >\n <TitleItem text={text} {...titleProps} />\n </Col>\n )}\n {subtitle && (\n <Col\n reset\n sizes={colSizes}\n {...(colJustifyContent && {justifyContent: colJustifyContent})}\n >\n <div className={b('description', {titleSize: titleProps?.textSize})}>\n <YFMWrapper content={subtitle} modifiers={{constructor: true}} />\n </div>\n </Col>\n )}\n </div>\n );\n};\n\nexport default Title;\n"]}
@@ -13,7 +13,7 @@ export declare const blockMap: {
13
13
  "header-block": (props: React.PropsWithChildren<import("./blocks/Header/Header.js").HeaderBlockFullProps>) => import("react/jsx-runtime").JSX.Element;
14
14
  "icons-block": ({ title, description, size, colSizes, items }: import("./models/index.js").IconsBlockProps) => import("react/jsx-runtime").JSX.Element;
15
15
  "header-slider-block": ({ items, arrows, ...props }: import("./models/index.js").HeaderSliderBlockProps) => import("react/jsx-runtime").JSX.Element;
16
- "card-layout-block": ({ title, description, animated, colSizes, children, className, titleClassName, background, }: import("./blocks/CardLayout/CardLayout.js").CardLayoutBlockProps) => import("react/jsx-runtime").JSX.Element;
16
+ "card-layout-block": ({ title, description, animated, colSizes, children, className, titleClassName, background, centered, }: import("./blocks/CardLayout/CardLayout.js").CardLayoutBlockProps) => import("react/jsx-runtime").JSX.Element;
17
17
  "content-layout-block": (props: import("./models/index.js").ContentLayoutBlockProps) => import("react/jsx-runtime").JSX.Element;
18
18
  "share-block": ({ items, title }: import("./models/index.js").ShareBlockProps) => import("react/jsx-runtime").JSX.Element;
19
19
  "map-block": ({ map, border, disableShadow, ...props }: import("./models/index.js").MapBlockProps) => import("react/jsx-runtime").JSX.Element;
@@ -271,6 +271,7 @@ export interface TabsBlockProps extends Animatable {
271
271
  export interface CardLayoutBlockProps extends Childable, Animatable, LoadableChildren {
272
272
  title?: TitleItemProps | string;
273
273
  titleClassName?: string;
274
+ centered?: boolean;
274
275
  description?: string;
275
276
  colSizes?: GridColumnSizesType;
276
277
  background?: ThemeSupporting<BackgroundImageProps & {
@@ -1 +1 @@
1
- {"version":3,"file":"blocks.js","sourceRoot":"../../../../src","sources":["models/constructor-items/blocks.ts"],"names":[],"mappings":"AA6CA,MAAM,CAAN,IAAY,SAuBX;AAvBD,WAAY,SAAS;IACjB,wDAA2C,CAAA;IAC3C,8DAAiD,CAAA;IACjD,kBAAkB;IAClB,gDAAmC,CAAA;IACnC,yCAA4B,CAAA;IAC5B,+CAAkC,CAAA;IAClC,sDAAyC,CAAA;IACzC,yCAA4B,CAAA;IAC5B,+CAAkC,CAAA;IAClC,uCAA0B,CAAA;IAC1B,qCAAwB,CAAA;IACxB,uCAA0B,CAAA;IAC1B,qCAAwB,CAAA;IACxB,sDAAyC,CAAA;IACzC,yCAA4B,CAAA;IAC5B,uCAA0B,CAAA;IAC1B,kDAAqC,CAAA;IACrC,wDAA2C,CAAA;IAC3C,uCAA0B,CAAA;IAC1B,mCAAsB,CAAA;IACtB,yCAA4B,CAAA;IAC5B,qCAAwB,CAAA;AAC5B,CAAC,EAvBW,SAAS,KAAT,SAAS,QAuBpB;AAED,MAAM,CAAC,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;AACnD,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,SAAS,CAAC,WAAW,EAAE,SAAS,CAAC,iBAAiB,CAAC,CAAC;AAgCrF,MAAM,CAAN,IAAY,qBAKX;AALD,WAAY,qBAAqB;IAC7B,kCAAS,CAAA;IACT,kCAAS,CAAA;IACT,kCAAS,CAAA;IACT,kCAAS,CAAA;AACb,CAAC,EALW,qBAAqB,KAArB,qBAAqB,QAKhC;AAED,MAAM,CAAN,IAAY,UAIX;AAJD,WAAY,UAAU;IAClB,sCAAwB,CAAA;IACxB,wCAA0B,CAAA;IAC1B,gDAAkC,CAAA;AACtC,CAAC,EAJW,UAAU,KAAV,UAAU,QAIrB;AA0VD,MAAM,CAAN,IAAY,oBAMX;AAND,WAAY,oBAAoB;IAC5B,iCAAS,CAAA;IACT,6CAAqB,CAAA;IACrB,2CAAmB,CAAA;IACnB,6CAAqB,CAAA;IACrB,6CAAqB,CAAA;AACzB,CAAC,EANW,oBAAoB,KAApB,oBAAoB,QAM/B;AAOD,MAAM,CAAN,IAAY,kBAGX;AAHD,WAAY,kBAAkB;IAC1B,uCAAiB,CAAA;IACjB,yCAAmB,CAAA;AACvB,CAAC,EAHW,kBAAkB,KAAlB,kBAAkB,QAG7B;AAED,MAAM,CAAN,IAAY,kBAIX;AAJD,WAAY,kBAAkB;IAC1B,kDAA4B,CAAA;IAC5B,kDAA4B,CAAA;IAC5B,uCAAiB,CAAA;AACrB,CAAC,EAJW,kBAAkB,KAAlB,kBAAkB,QAI7B","sourcesContent":["import * as React from 'react';\n\nimport {ButtonSize} from '@gravity-ui/uikit';\n\nimport {GridColumnSize, GridColumnSizesType, IndentValue} from '../../grid/types';\nimport {ThemeSupporting} from '../../utils';\nimport {DeviceSupporting} from '../../utils/breakpoint';\nimport {AnalyticsEventsBase} from '../common';\n\nimport {\n AnchorProps,\n Animatable,\n BackgroundImageProps,\n ButtonProps,\n CardBorder,\n ContentSize,\n ContentTextSize,\n ContentTheme,\n FileLinkProps,\n GravityIconProps,\n HeaderBreadCrumbsProps,\n HeaderImageSize,\n HeaderOffset,\n HeaderWidth,\n ImageDeviceProps,\n ImageProps,\n Justify,\n LegendTableMarkerType,\n LinkProps,\n MapProps,\n MediaDirection,\n MediaProps,\n MediaView,\n TextSize,\n TextTheme,\n ThemedImage,\n ThemedMediaProps,\n ThemedMediaVideoProps,\n TitleItemBaseProps,\n TitleItemProps,\n WithBorder,\n YandexFormProps,\n} from './common';\nimport {BannerCardProps, HubspotFormProps, SubBlock, SubBlockModels} from './sub-blocks';\n\nexport enum BlockType {\n PromoFeaturesBlock = 'promo-features-block',\n ExtendedFeaturesBlock = 'extended-features-block',\n /** @deprecated */\n SliderOldBlock = 'slider-old-block',\n SliderBlock = 'slider-block',\n QuestionsBlock = 'questions-block',\n FoldableListBlock = 'foldable-list-block',\n BannerBlock = 'banner-block',\n CompaniesBlock = 'companies-block',\n MediaBlock = 'media-block',\n InfoBlock = 'info-block',\n TableBlock = 'table-block',\n TabsBlock = 'tabs-block',\n HeaderSliderBlock = 'header-slider-block',\n HeaderBlock = 'header-block',\n IconsBlock = 'icons-block',\n CardLayoutBlock = 'card-layout-block',\n ContentLayoutBlock = 'content-layout-block',\n ShareBlock = 'share-block',\n MapBlock = 'map-block',\n FilterBlock = 'filter-block',\n FormBlock = 'form-block',\n}\n\nexport const BlockTypes = Object.values(BlockType);\nexport const HeaderBlockTypes = [BlockType.HeaderBlock, BlockType.HeaderSliderBlock];\n\nexport interface Childable {\n children?: SubBlock[];\n}\n\n//block props\nexport interface BlockBaseProps {\n anchor?: AnchorProps;\n visible?: GridColumnSize;\n /** @deprecated */\n resetPaddings?: boolean;\n indent?: {\n top?: IndentValue;\n bottom?: IndentValue;\n };\n qa?: string;\n}\n\nexport interface LoadableProps {\n source: string;\n /**\n * @deprecated Will be moved to params\n */\n serviceId?: number;\n params?: Record<string, string | number | boolean | object>;\n}\n\nexport interface LoadableChildren {\n loadable?: LoadableProps;\n}\n\nexport enum SliderBreakpointNames {\n Sm = 'sm',\n Md = 'md',\n Lg = 'lg',\n Xl = 'xl',\n}\n\nexport enum SliderType {\n MediaCard = 'media-card',\n HeaderCard = 'header-card',\n FullscreenCard = 'fullscreen-card',\n}\n\nexport type SliderBreakpointParams = Record<SliderBreakpointNames, number>;\nexport type SlidesToShow = Partial<SliderBreakpointParams> | number;\n\nexport interface SliderOldProps extends Childable, Animatable, LoadableChildren {\n dots?: boolean;\n arrows?: boolean;\n slidesToShow?: SlidesToShow;\n disclaimer?: {\n text: string;\n size?: TextSize;\n };\n title?: TitleItemBaseProps | string;\n description?: string;\n autoplay?: number;\n //for server transforms\n randomOrder?: boolean;\n adaptive?: boolean;\n}\n\nexport interface SliderProps extends Childable, Animatable, LoadableChildren {\n dots?: boolean;\n arrows?: boolean;\n slidesToShow?: SlidesToShow;\n disclaimer?: {\n text: string;\n size?: TextSize;\n };\n title?: TitleItemBaseProps | string;\n description?: string;\n autoplay?: number;\n //for server transforms\n randomOrder?: boolean;\n adaptive?: boolean;\n}\n\nexport interface HeaderSliderBlockProps extends Omit<SliderOldProps, 'title' | 'description'> {\n items: HeaderBlockProps[];\n}\n\ninterface HeaderBackgroundProps {\n /** @deprecated replaced by Media Props image */\n url?: string;\n /** @deprecated replaced by Media Props image */\n disableCompress?: boolean;\n}\n\nexport interface HeaderBlockBackground extends Partial<HeaderBackgroundProps>, Partial<MediaProps> {\n fullWidth?: boolean;\n fullWidthMedia?: boolean;\n}\n\nexport type ThemedHeaderBlockBackground = ThemeSupporting<HeaderBlockBackground>;\n\nexport interface HeaderBlockVideoIframe {\n src: string;\n autoplay?: boolean;\n previewImg?: string;\n height?: number;\n}\n\nexport interface HeaderBlockProps {\n title: string;\n overtitle?: string | JSX.Element;\n description?: string;\n additionalInfo?: string;\n buttons?: Pick<ButtonProps, 'url' | 'text' | 'theme' | 'primary' | 'size' | 'extraProps'>[];\n width?: HeaderWidth;\n /** @deprecated imageSize now depends on width */\n imageSize?: HeaderImageSize;\n /**\n * @deprecated used only on the main page\n * TODO: delete after the possibility to remove padding-bottom in the block\n */\n offset?: HeaderOffset;\n image?: ThemedImage;\n video?: ThemedMediaVideoProps;\n videoIframe?: HeaderBlockVideoIframe;\n mediaView?: MediaView;\n centered?: boolean;\n background?: ThemedHeaderBlockBackground;\n theme?: 'light' | 'dark';\n verticalOffset?: '0' | 's' | 'm' | 'l' | 'xl';\n breadcrumbs?: HeaderBreadCrumbsProps;\n status?: JSX.Element;\n renderTitle?: (title: string) => React.ReactNode;\n}\n\nexport interface ExtendedFeaturesItem\n extends Omit<\n ContentBlockProps,\n 'theme' | 'centered' | 'colSizes' | 'size' | 'title' | 'labels'\n > {\n title: string;\n label?: string;\n icon?: ThemedImage;\n /** @deprecated **/\n link?: LinkProps;\n}\n\nexport interface ExtendedFeaturesProps extends Animatable {\n items: ExtendedFeaturesItem[];\n title?: TitleItemProps | string;\n description?: string;\n colSizes?: GridColumnSizesType;\n}\n\nexport interface PromoFeaturesItem {\n title: string;\n text: string;\n theme?: 'accent' | 'accent-light' | 'primary';\n media?: ThemeSupporting<MediaProps>;\n}\n\nexport interface PromoFeaturesProps extends Animatable {\n items: PromoFeaturesItem[];\n title?: TitleItemProps | string;\n description?: string;\n theme?: 'grey' | 'default';\n}\n\nexport interface QuestionItem {\n title: string;\n text: string;\n listStyle?: 'dash' | 'disk';\n link?: LinkProps;\n}\n\nexport interface QuestionsProps\n extends Omit<ContentBlockProps, 'colSizes' | 'centered' | 'size' | 'theme' | 'labels'> {\n items: QuestionItem[];\n}\n\nexport interface QuestionBlockItemProps extends QuestionItem {\n isOpened: boolean;\n onClick: () => void;\n}\n\nexport interface FoldableListItem {\n title: string;\n text: string;\n listStyle?: 'dash' | 'disk';\n link?: LinkProps;\n}\n\nexport interface FoldableListProps\n extends Omit<ContentBlockProps, 'colSizes' | 'centered' | 'size' | 'theme' | 'labels'> {\n items: FoldableListItem[];\n}\n\nexport interface FoldableListBlockItemProps extends FoldableListItem {\n isOpened: boolean;\n onClick: () => void;\n}\n\nexport interface BannerBlockProps extends BannerCardProps, Animatable {}\n\nexport interface CompaniesBlockProps extends Animatable {\n title: string;\n description?: string;\n images: ThemeSupporting<ImageDeviceProps>;\n}\n\nexport interface MediaBaseBlockProps extends Animatable, MediaContentProps {\n direction?: MediaDirection;\n mobileDirection?: MediaDirection;\n largeMedia?: boolean;\n mediaOnly?: boolean;\n mediaOnlyColSizes?: GridColumnSizesType;\n}\n\nexport interface MediaContentProps\n extends Omit<ContentBlockProps, 'colSizes' | 'text' | 'theme' | 'centered' | 'labels'> {\n description?: string;\n /** @deprecated Use array of buttons from ContentBlockProps instead**/\n button?: ButtonProps;\n}\n\nexport interface MediaBlockProps extends MediaBaseBlockProps, WithBorder {\n media: ThemeSupporting<MediaProps>;\n}\n\nexport interface MapBlockProps extends MediaBaseBlockProps, WithBorder {\n map: Omit<MapProps, 'forceAspectRatio' | 'areaMargin' | 'copyrightPosition'>;\n}\n\nexport interface InfoBlockProps {\n theme?: TextTheme;\n backgroundColor?: ThemeSupporting<string>;\n /** @deprecated **/\n title?: string;\n /** @deprecated **/\n buttons?: Pick<ButtonProps, 'url' | 'text' | 'theme'>[];\n /** @deprecated **/\n sectionsTitle?: string;\n /** @deprecated **/\n links?: Pick<LinkProps, 'text' | 'url'>[];\n leftContent?: Omit<ContentBlockProps, 'colSizes' | 'theme' | 'size' | 'labels'>;\n rightContent?: Omit<ContentBlockProps, 'colSizes' | 'theme' | 'size' | 'labels'>;\n}\n\nexport interface TableProps {\n content: string[][];\n legend?: string[];\n hideLegend?: boolean;\n justify?: Justify[];\n marker?: LegendTableMarkerType;\n /**\n * Only as accessible name, not displayed explicitly\n */\n caption?: string;\n}\n\nexport interface TableBlockProps {\n title: string;\n table: TableProps;\n}\n\nexport interface TabsBlockItem\n extends Omit<ContentBlockProps, 'size' | 'colSizes' | 'centered' | 'theme' | 'labels'>,\n WithBorder {\n tabName: string;\n /**\n * @deprecated Use array links from ContentBlockProps instead\n */\n link?: LinkProps;\n image?: ThemedImage;\n caption?: string;\n media?: ThemedMediaProps;\n}\n\nexport interface TabsBlockProps extends Animatable {\n title?: TitleItemProps | string;\n description?: string;\n tabsColSizes?: GridColumnSizesType;\n centered?: boolean;\n direction?: MediaDirection;\n items: TabsBlockItem[];\n contentSize?: ContentSize;\n}\n\nexport interface CardLayoutBlockProps extends Childable, Animatable, LoadableChildren {\n title?: TitleItemProps | string;\n titleClassName?: string;\n description?: string;\n colSizes?: GridColumnSizesType;\n background?: ThemeSupporting<\n BackgroundImageProps & {\n border?: CardBorder;\n }\n >;\n}\n\nexport type FilterTag = {\n id: string;\n label: string;\n};\n\nexport type FilterItem = {\n tags: string[];\n card: SubBlockModels;\n};\n\nexport interface FilterBlockProps extends Animatable {\n tags: FilterTag[];\n items: FilterItem[];\n title?: TitleItemProps | string;\n description?: string;\n tagButtonSize?: ButtonSize;\n allTag?: boolean | string;\n colSizes?: GridColumnSizesType;\n centered?: boolean;\n}\n\nexport interface IconsBlockItemProps extends AnalyticsEventsBase {\n url: string;\n text: string;\n src: ThemeSupporting<string>;\n}\n\nexport interface IconsBlockProps {\n title?: string;\n description?: string;\n size?: 's' | 'm' | 'l';\n items: IconsBlockItemProps[];\n colSizes?: GridColumnSizesType;\n}\n\ninterface ContentLayoutBlockParams {\n size?: ContentSize;\n background?: ThemeSupporting<BackgroundImageProps>;\n centered?: boolean;\n theme?: ContentTheme;\n textWidth?: ContentTextSize;\n}\n\nexport interface ContentLayoutBlockProps extends ContentLayoutBlockParams {\n textContent: Omit<ContentBlockProps, 'labels'>;\n fileContent?: FileLinkProps[];\n}\n\nexport type SVGIcon = (props: React.SVGProps<SVGSVGElement>) => React.ReactNode;\n\nexport interface ContentItemProps {\n title?: string;\n text?: string;\n icon?: ThemeSupporting<ImageProps | SVGIcon>;\n gravityIcon?: ThemeSupporting<GravityIconProps>;\n}\n\nexport interface ContentListProps {\n list: ContentItemProps[];\n size: ContentSize;\n theme?: ContentTheme;\n}\n\nexport interface ContentLabelProps {\n text: string;\n icon?: ThemeSupporting<ImageProps | SVGIcon>;\n gravityIcon?: ThemeSupporting<GravityIconProps>;\n}\n\nexport interface ContentLabelsProps {\n labels: ContentLabelProps[];\n size?: ContentSize;\n theme?: ContentTheme;\n}\n\nexport interface ContentBlockProps {\n title?: TitleItemBaseProps | string;\n titleId?: string;\n text?: string;\n textId?: string;\n additionalInfo?: string;\n links?: LinkProps[];\n buttons?: ButtonProps[];\n size?: ContentSize;\n colSizes?: GridColumnSizesType;\n centered?: boolean;\n theme?: ContentTheme;\n list?: ContentItemProps[];\n labels?: ContentLabelProps[];\n controlPosition?: 'default' | 'bottom';\n}\n\nexport enum PCShareSocialNetwork {\n Vk = 'vk',\n Telegram = 'telegram',\n Twitter = 'twitter',\n Facebook = 'facebook',\n LinkedIn = 'linkedin',\n}\n\nexport interface ShareBlockProps {\n items: PCShareSocialNetwork[];\n title?: string;\n}\n\nexport enum FormBlockDataTypes {\n YANDEX = 'yandex',\n HUBSPOT = 'hubspot',\n}\n\nexport enum FormBlockDirection {\n FormContent = 'form-content',\n ContentForm = 'content-form',\n Center = 'center',\n}\n\nexport interface FormBlockYandexData {\n yandex: ThemeSupporting<YandexFormProps>;\n}\n\nexport interface FormBlockHubspotData {\n hubspot: ThemeSupporting<HubspotFormProps>;\n}\n\nexport type FormBlockData = FormBlockYandexData | FormBlockHubspotData;\n\nexport interface FormBlockBackgroundProps extends Omit<BackgroundImageProps, 'style'> {\n style?: DeviceSupporting<React.CSSProperties>;\n}\n\nexport interface FormBlockProps {\n formData: FormBlockData;\n title?: string;\n textContent?: Omit<ContentBlockProps, 'centered' | 'colSizes' | 'size'>;\n direction?: FormBlockDirection;\n background?: ThemeSupporting<FormBlockBackgroundProps>;\n customFormNode?: React.ReactNode;\n}\n\n//block models\nexport type HeaderBlockModel = {\n type: BlockType.HeaderBlock;\n} & HeaderBlockProps;\n\nexport type SliderOldBlockModel = {\n type: BlockType.SliderOldBlock;\n} & SliderOldProps;\n\nexport type ExtendedFeaturesBlockModel = {\n type: BlockType.ExtendedFeaturesBlock;\n} & ExtendedFeaturesProps;\n\nexport type PromoFeaturesBlockModel = {\n type: BlockType.PromoFeaturesBlock;\n} & PromoFeaturesProps;\n\nexport type QuestionsBlockModel = {\n type: BlockType.QuestionsBlock;\n} & QuestionsProps;\n\nexport type FoldableListBlockModel = {\n type: BlockType.FoldableListBlock;\n} & FoldableListProps;\n\nexport type BannerBlockModel = {\n type: BlockType.BannerBlock;\n} & BannerBlockProps;\n\nexport type CompaniesBlockModel = {\n type: BlockType.CompaniesBlock;\n} & CompaniesBlockProps;\n\nexport type MediaBlockModel = {\n type: BlockType.MediaBlock;\n} & MediaBlockProps;\n\nexport type MapBlockModel = {\n type: BlockType.MapBlock;\n} & MapBlockProps;\n\nexport type InfoBlockModel = {\n type: BlockType.InfoBlock;\n} & InfoBlockProps;\n\nexport type TableBlockModel = {\n type: BlockType.TableBlock;\n} & TableBlockProps;\n\nexport type TabsBlockModel = {\n type: BlockType.TabsBlock;\n} & TabsBlockProps;\n\nexport type CardLayoutBlockModel = {\n type: BlockType.CardLayoutBlock;\n} & CardLayoutBlockProps;\n\nexport type FilterBlockModel = {\n type: BlockType.FilterBlock;\n} & FilterBlockProps;\n\nexport type IconsBlockModel = {\n type: BlockType.IconsBlock;\n} & IconsBlockProps;\n\nexport type HeaderSliderBlockModel = {\n type: BlockType.HeaderSliderBlock;\n} & HeaderSliderBlockProps;\n\nexport type ContentLayoutBlockModel = {\n type: BlockType.ContentLayoutBlock;\n} & ContentLayoutBlockProps;\n\nexport type ShareBLockModel = {\n type: BlockType.ShareBlock;\n} & ShareBlockProps;\n\nexport type FormBlockModel = {\n type: BlockType.FormBlock;\n} & FormBlockProps;\n\nexport type SliderBlockModel = {\n type: BlockType.SliderBlock;\n} & SliderProps;\n\ntype BlockModels =\n | SliderOldBlockModel\n | SliderBlockModel\n | ExtendedFeaturesBlockModel\n | PromoFeaturesBlockModel\n | QuestionsBlockModel\n | FoldableListBlockModel\n | BannerBlockModel\n | CompaniesBlockModel\n | MediaBlockModel\n | MapBlockModel\n | InfoBlockModel\n | TableBlockModel\n | TabsBlockModel\n | HeaderBlockModel\n | IconsBlockModel\n | HeaderSliderBlockModel\n | CardLayoutBlockModel\n | ContentLayoutBlockModel\n | ShareBLockModel\n | FilterBlockModel\n | FormBlockModel;\n\nexport type Block = BlockModels & BlockBaseProps;\n"]}
1
+ {"version":3,"file":"blocks.js","sourceRoot":"../../../../src","sources":["models/constructor-items/blocks.ts"],"names":[],"mappings":"AA6CA,MAAM,CAAN,IAAY,SAuBX;AAvBD,WAAY,SAAS;IACjB,wDAA2C,CAAA;IAC3C,8DAAiD,CAAA;IACjD,kBAAkB;IAClB,gDAAmC,CAAA;IACnC,yCAA4B,CAAA;IAC5B,+CAAkC,CAAA;IAClC,sDAAyC,CAAA;IACzC,yCAA4B,CAAA;IAC5B,+CAAkC,CAAA;IAClC,uCAA0B,CAAA;IAC1B,qCAAwB,CAAA;IACxB,uCAA0B,CAAA;IAC1B,qCAAwB,CAAA;IACxB,sDAAyC,CAAA;IACzC,yCAA4B,CAAA;IAC5B,uCAA0B,CAAA;IAC1B,kDAAqC,CAAA;IACrC,wDAA2C,CAAA;IAC3C,uCAA0B,CAAA;IAC1B,mCAAsB,CAAA;IACtB,yCAA4B,CAAA;IAC5B,qCAAwB,CAAA;AAC5B,CAAC,EAvBW,SAAS,KAAT,SAAS,QAuBpB;AAED,MAAM,CAAC,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;AACnD,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,SAAS,CAAC,WAAW,EAAE,SAAS,CAAC,iBAAiB,CAAC,CAAC;AAgCrF,MAAM,CAAN,IAAY,qBAKX;AALD,WAAY,qBAAqB;IAC7B,kCAAS,CAAA;IACT,kCAAS,CAAA;IACT,kCAAS,CAAA;IACT,kCAAS,CAAA;AACb,CAAC,EALW,qBAAqB,KAArB,qBAAqB,QAKhC;AAED,MAAM,CAAN,IAAY,UAIX;AAJD,WAAY,UAAU;IAClB,sCAAwB,CAAA;IACxB,wCAA0B,CAAA;IAC1B,gDAAkC,CAAA;AACtC,CAAC,EAJW,UAAU,KAAV,UAAU,QAIrB;AA2VD,MAAM,CAAN,IAAY,oBAMX;AAND,WAAY,oBAAoB;IAC5B,iCAAS,CAAA;IACT,6CAAqB,CAAA;IACrB,2CAAmB,CAAA;IACnB,6CAAqB,CAAA;IACrB,6CAAqB,CAAA;AACzB,CAAC,EANW,oBAAoB,KAApB,oBAAoB,QAM/B;AAOD,MAAM,CAAN,IAAY,kBAGX;AAHD,WAAY,kBAAkB;IAC1B,uCAAiB,CAAA;IACjB,yCAAmB,CAAA;AACvB,CAAC,EAHW,kBAAkB,KAAlB,kBAAkB,QAG7B;AAED,MAAM,CAAN,IAAY,kBAIX;AAJD,WAAY,kBAAkB;IAC1B,kDAA4B,CAAA;IAC5B,kDAA4B,CAAA;IAC5B,uCAAiB,CAAA;AACrB,CAAC,EAJW,kBAAkB,KAAlB,kBAAkB,QAI7B","sourcesContent":["import * as React from 'react';\n\nimport {ButtonSize} from '@gravity-ui/uikit';\n\nimport {GridColumnSize, GridColumnSizesType, IndentValue} from '../../grid/types';\nimport {ThemeSupporting} from '../../utils';\nimport {DeviceSupporting} from '../../utils/breakpoint';\nimport {AnalyticsEventsBase} from '../common';\n\nimport {\n AnchorProps,\n Animatable,\n BackgroundImageProps,\n ButtonProps,\n CardBorder,\n ContentSize,\n ContentTextSize,\n ContentTheme,\n FileLinkProps,\n GravityIconProps,\n HeaderBreadCrumbsProps,\n HeaderImageSize,\n HeaderOffset,\n HeaderWidth,\n ImageDeviceProps,\n ImageProps,\n Justify,\n LegendTableMarkerType,\n LinkProps,\n MapProps,\n MediaDirection,\n MediaProps,\n MediaView,\n TextSize,\n TextTheme,\n ThemedImage,\n ThemedMediaProps,\n ThemedMediaVideoProps,\n TitleItemBaseProps,\n TitleItemProps,\n WithBorder,\n YandexFormProps,\n} from './common';\nimport {BannerCardProps, HubspotFormProps, SubBlock, SubBlockModels} from './sub-blocks';\n\nexport enum BlockType {\n PromoFeaturesBlock = 'promo-features-block',\n ExtendedFeaturesBlock = 'extended-features-block',\n /** @deprecated */\n SliderOldBlock = 'slider-old-block',\n SliderBlock = 'slider-block',\n QuestionsBlock = 'questions-block',\n FoldableListBlock = 'foldable-list-block',\n BannerBlock = 'banner-block',\n CompaniesBlock = 'companies-block',\n MediaBlock = 'media-block',\n InfoBlock = 'info-block',\n TableBlock = 'table-block',\n TabsBlock = 'tabs-block',\n HeaderSliderBlock = 'header-slider-block',\n HeaderBlock = 'header-block',\n IconsBlock = 'icons-block',\n CardLayoutBlock = 'card-layout-block',\n ContentLayoutBlock = 'content-layout-block',\n ShareBlock = 'share-block',\n MapBlock = 'map-block',\n FilterBlock = 'filter-block',\n FormBlock = 'form-block',\n}\n\nexport const BlockTypes = Object.values(BlockType);\nexport const HeaderBlockTypes = [BlockType.HeaderBlock, BlockType.HeaderSliderBlock];\n\nexport interface Childable {\n children?: SubBlock[];\n}\n\n//block props\nexport interface BlockBaseProps {\n anchor?: AnchorProps;\n visible?: GridColumnSize;\n /** @deprecated */\n resetPaddings?: boolean;\n indent?: {\n top?: IndentValue;\n bottom?: IndentValue;\n };\n qa?: string;\n}\n\nexport interface LoadableProps {\n source: string;\n /**\n * @deprecated Will be moved to params\n */\n serviceId?: number;\n params?: Record<string, string | number | boolean | object>;\n}\n\nexport interface LoadableChildren {\n loadable?: LoadableProps;\n}\n\nexport enum SliderBreakpointNames {\n Sm = 'sm',\n Md = 'md',\n Lg = 'lg',\n Xl = 'xl',\n}\n\nexport enum SliderType {\n MediaCard = 'media-card',\n HeaderCard = 'header-card',\n FullscreenCard = 'fullscreen-card',\n}\n\nexport type SliderBreakpointParams = Record<SliderBreakpointNames, number>;\nexport type SlidesToShow = Partial<SliderBreakpointParams> | number;\n\nexport interface SliderOldProps extends Childable, Animatable, LoadableChildren {\n dots?: boolean;\n arrows?: boolean;\n slidesToShow?: SlidesToShow;\n disclaimer?: {\n text: string;\n size?: TextSize;\n };\n title?: TitleItemBaseProps | string;\n description?: string;\n autoplay?: number;\n //for server transforms\n randomOrder?: boolean;\n adaptive?: boolean;\n}\n\nexport interface SliderProps extends Childable, Animatable, LoadableChildren {\n dots?: boolean;\n arrows?: boolean;\n slidesToShow?: SlidesToShow;\n disclaimer?: {\n text: string;\n size?: TextSize;\n };\n title?: TitleItemBaseProps | string;\n description?: string;\n autoplay?: number;\n //for server transforms\n randomOrder?: boolean;\n adaptive?: boolean;\n}\n\nexport interface HeaderSliderBlockProps extends Omit<SliderOldProps, 'title' | 'description'> {\n items: HeaderBlockProps[];\n}\n\ninterface HeaderBackgroundProps {\n /** @deprecated replaced by Media Props image */\n url?: string;\n /** @deprecated replaced by Media Props image */\n disableCompress?: boolean;\n}\n\nexport interface HeaderBlockBackground extends Partial<HeaderBackgroundProps>, Partial<MediaProps> {\n fullWidth?: boolean;\n fullWidthMedia?: boolean;\n}\n\nexport type ThemedHeaderBlockBackground = ThemeSupporting<HeaderBlockBackground>;\n\nexport interface HeaderBlockVideoIframe {\n src: string;\n autoplay?: boolean;\n previewImg?: string;\n height?: number;\n}\n\nexport interface HeaderBlockProps {\n title: string;\n overtitle?: string | JSX.Element;\n description?: string;\n additionalInfo?: string;\n buttons?: Pick<ButtonProps, 'url' | 'text' | 'theme' | 'primary' | 'size' | 'extraProps'>[];\n width?: HeaderWidth;\n /** @deprecated imageSize now depends on width */\n imageSize?: HeaderImageSize;\n /**\n * @deprecated used only on the main page\n * TODO: delete after the possibility to remove padding-bottom in the block\n */\n offset?: HeaderOffset;\n image?: ThemedImage;\n video?: ThemedMediaVideoProps;\n videoIframe?: HeaderBlockVideoIframe;\n mediaView?: MediaView;\n centered?: boolean;\n background?: ThemedHeaderBlockBackground;\n theme?: 'light' | 'dark';\n verticalOffset?: '0' | 's' | 'm' | 'l' | 'xl';\n breadcrumbs?: HeaderBreadCrumbsProps;\n status?: JSX.Element;\n renderTitle?: (title: string) => React.ReactNode;\n}\n\nexport interface ExtendedFeaturesItem\n extends Omit<\n ContentBlockProps,\n 'theme' | 'centered' | 'colSizes' | 'size' | 'title' | 'labels'\n > {\n title: string;\n label?: string;\n icon?: ThemedImage;\n /** @deprecated **/\n link?: LinkProps;\n}\n\nexport interface ExtendedFeaturesProps extends Animatable {\n items: ExtendedFeaturesItem[];\n title?: TitleItemProps | string;\n description?: string;\n colSizes?: GridColumnSizesType;\n}\n\nexport interface PromoFeaturesItem {\n title: string;\n text: string;\n theme?: 'accent' | 'accent-light' | 'primary';\n media?: ThemeSupporting<MediaProps>;\n}\n\nexport interface PromoFeaturesProps extends Animatable {\n items: PromoFeaturesItem[];\n title?: TitleItemProps | string;\n description?: string;\n theme?: 'grey' | 'default';\n}\n\nexport interface QuestionItem {\n title: string;\n text: string;\n listStyle?: 'dash' | 'disk';\n link?: LinkProps;\n}\n\nexport interface QuestionsProps\n extends Omit<ContentBlockProps, 'colSizes' | 'centered' | 'size' | 'theme' | 'labels'> {\n items: QuestionItem[];\n}\n\nexport interface QuestionBlockItemProps extends QuestionItem {\n isOpened: boolean;\n onClick: () => void;\n}\n\nexport interface FoldableListItem {\n title: string;\n text: string;\n listStyle?: 'dash' | 'disk';\n link?: LinkProps;\n}\n\nexport interface FoldableListProps\n extends Omit<ContentBlockProps, 'colSizes' | 'centered' | 'size' | 'theme' | 'labels'> {\n items: FoldableListItem[];\n}\n\nexport interface FoldableListBlockItemProps extends FoldableListItem {\n isOpened: boolean;\n onClick: () => void;\n}\n\nexport interface BannerBlockProps extends BannerCardProps, Animatable {}\n\nexport interface CompaniesBlockProps extends Animatable {\n title: string;\n description?: string;\n images: ThemeSupporting<ImageDeviceProps>;\n}\n\nexport interface MediaBaseBlockProps extends Animatable, MediaContentProps {\n direction?: MediaDirection;\n mobileDirection?: MediaDirection;\n largeMedia?: boolean;\n mediaOnly?: boolean;\n mediaOnlyColSizes?: GridColumnSizesType;\n}\n\nexport interface MediaContentProps\n extends Omit<ContentBlockProps, 'colSizes' | 'text' | 'theme' | 'centered' | 'labels'> {\n description?: string;\n /** @deprecated Use array of buttons from ContentBlockProps instead**/\n button?: ButtonProps;\n}\n\nexport interface MediaBlockProps extends MediaBaseBlockProps, WithBorder {\n media: ThemeSupporting<MediaProps>;\n}\n\nexport interface MapBlockProps extends MediaBaseBlockProps, WithBorder {\n map: Omit<MapProps, 'forceAspectRatio' | 'areaMargin' | 'copyrightPosition'>;\n}\n\nexport interface InfoBlockProps {\n theme?: TextTheme;\n backgroundColor?: ThemeSupporting<string>;\n /** @deprecated **/\n title?: string;\n /** @deprecated **/\n buttons?: Pick<ButtonProps, 'url' | 'text' | 'theme'>[];\n /** @deprecated **/\n sectionsTitle?: string;\n /** @deprecated **/\n links?: Pick<LinkProps, 'text' | 'url'>[];\n leftContent?: Omit<ContentBlockProps, 'colSizes' | 'theme' | 'size' | 'labels'>;\n rightContent?: Omit<ContentBlockProps, 'colSizes' | 'theme' | 'size' | 'labels'>;\n}\n\nexport interface TableProps {\n content: string[][];\n legend?: string[];\n hideLegend?: boolean;\n justify?: Justify[];\n marker?: LegendTableMarkerType;\n /**\n * Only as accessible name, not displayed explicitly\n */\n caption?: string;\n}\n\nexport interface TableBlockProps {\n title: string;\n table: TableProps;\n}\n\nexport interface TabsBlockItem\n extends Omit<ContentBlockProps, 'size' | 'colSizes' | 'centered' | 'theme' | 'labels'>,\n WithBorder {\n tabName: string;\n /**\n * @deprecated Use array links from ContentBlockProps instead\n */\n link?: LinkProps;\n image?: ThemedImage;\n caption?: string;\n media?: ThemedMediaProps;\n}\n\nexport interface TabsBlockProps extends Animatable {\n title?: TitleItemProps | string;\n description?: string;\n tabsColSizes?: GridColumnSizesType;\n centered?: boolean;\n direction?: MediaDirection;\n items: TabsBlockItem[];\n contentSize?: ContentSize;\n}\n\nexport interface CardLayoutBlockProps extends Childable, Animatable, LoadableChildren {\n title?: TitleItemProps | string;\n titleClassName?: string;\n centered?: boolean;\n description?: string;\n colSizes?: GridColumnSizesType;\n background?: ThemeSupporting<\n BackgroundImageProps & {\n border?: CardBorder;\n }\n >;\n}\n\nexport type FilterTag = {\n id: string;\n label: string;\n};\n\nexport type FilterItem = {\n tags: string[];\n card: SubBlockModels;\n};\n\nexport interface FilterBlockProps extends Animatable {\n tags: FilterTag[];\n items: FilterItem[];\n title?: TitleItemProps | string;\n description?: string;\n tagButtonSize?: ButtonSize;\n allTag?: boolean | string;\n colSizes?: GridColumnSizesType;\n centered?: boolean;\n}\n\nexport interface IconsBlockItemProps extends AnalyticsEventsBase {\n url: string;\n text: string;\n src: ThemeSupporting<string>;\n}\n\nexport interface IconsBlockProps {\n title?: string;\n description?: string;\n size?: 's' | 'm' | 'l';\n items: IconsBlockItemProps[];\n colSizes?: GridColumnSizesType;\n}\n\ninterface ContentLayoutBlockParams {\n size?: ContentSize;\n background?: ThemeSupporting<BackgroundImageProps>;\n centered?: boolean;\n theme?: ContentTheme;\n textWidth?: ContentTextSize;\n}\n\nexport interface ContentLayoutBlockProps extends ContentLayoutBlockParams {\n textContent: Omit<ContentBlockProps, 'labels'>;\n fileContent?: FileLinkProps[];\n}\n\nexport type SVGIcon = (props: React.SVGProps<SVGSVGElement>) => React.ReactNode;\n\nexport interface ContentItemProps {\n title?: string;\n text?: string;\n icon?: ThemeSupporting<ImageProps | SVGIcon>;\n gravityIcon?: ThemeSupporting<GravityIconProps>;\n}\n\nexport interface ContentListProps {\n list: ContentItemProps[];\n size: ContentSize;\n theme?: ContentTheme;\n}\n\nexport interface ContentLabelProps {\n text: string;\n icon?: ThemeSupporting<ImageProps | SVGIcon>;\n gravityIcon?: ThemeSupporting<GravityIconProps>;\n}\n\nexport interface ContentLabelsProps {\n labels: ContentLabelProps[];\n size?: ContentSize;\n theme?: ContentTheme;\n}\n\nexport interface ContentBlockProps {\n title?: TitleItemBaseProps | string;\n titleId?: string;\n text?: string;\n textId?: string;\n additionalInfo?: string;\n links?: LinkProps[];\n buttons?: ButtonProps[];\n size?: ContentSize;\n colSizes?: GridColumnSizesType;\n centered?: boolean;\n theme?: ContentTheme;\n list?: ContentItemProps[];\n labels?: ContentLabelProps[];\n controlPosition?: 'default' | 'bottom';\n}\n\nexport enum PCShareSocialNetwork {\n Vk = 'vk',\n Telegram = 'telegram',\n Twitter = 'twitter',\n Facebook = 'facebook',\n LinkedIn = 'linkedin',\n}\n\nexport interface ShareBlockProps {\n items: PCShareSocialNetwork[];\n title?: string;\n}\n\nexport enum FormBlockDataTypes {\n YANDEX = 'yandex',\n HUBSPOT = 'hubspot',\n}\n\nexport enum FormBlockDirection {\n FormContent = 'form-content',\n ContentForm = 'content-form',\n Center = 'center',\n}\n\nexport interface FormBlockYandexData {\n yandex: ThemeSupporting<YandexFormProps>;\n}\n\nexport interface FormBlockHubspotData {\n hubspot: ThemeSupporting<HubspotFormProps>;\n}\n\nexport type FormBlockData = FormBlockYandexData | FormBlockHubspotData;\n\nexport interface FormBlockBackgroundProps extends Omit<BackgroundImageProps, 'style'> {\n style?: DeviceSupporting<React.CSSProperties>;\n}\n\nexport interface FormBlockProps {\n formData: FormBlockData;\n title?: string;\n textContent?: Omit<ContentBlockProps, 'centered' | 'colSizes' | 'size'>;\n direction?: FormBlockDirection;\n background?: ThemeSupporting<FormBlockBackgroundProps>;\n customFormNode?: React.ReactNode;\n}\n\n//block models\nexport type HeaderBlockModel = {\n type: BlockType.HeaderBlock;\n} & HeaderBlockProps;\n\nexport type SliderOldBlockModel = {\n type: BlockType.SliderOldBlock;\n} & SliderOldProps;\n\nexport type ExtendedFeaturesBlockModel = {\n type: BlockType.ExtendedFeaturesBlock;\n} & ExtendedFeaturesProps;\n\nexport type PromoFeaturesBlockModel = {\n type: BlockType.PromoFeaturesBlock;\n} & PromoFeaturesProps;\n\nexport type QuestionsBlockModel = {\n type: BlockType.QuestionsBlock;\n} & QuestionsProps;\n\nexport type FoldableListBlockModel = {\n type: BlockType.FoldableListBlock;\n} & FoldableListProps;\n\nexport type BannerBlockModel = {\n type: BlockType.BannerBlock;\n} & BannerBlockProps;\n\nexport type CompaniesBlockModel = {\n type: BlockType.CompaniesBlock;\n} & CompaniesBlockProps;\n\nexport type MediaBlockModel = {\n type: BlockType.MediaBlock;\n} & MediaBlockProps;\n\nexport type MapBlockModel = {\n type: BlockType.MapBlock;\n} & MapBlockProps;\n\nexport type InfoBlockModel = {\n type: BlockType.InfoBlock;\n} & InfoBlockProps;\n\nexport type TableBlockModel = {\n type: BlockType.TableBlock;\n} & TableBlockProps;\n\nexport type TabsBlockModel = {\n type: BlockType.TabsBlock;\n} & TabsBlockProps;\n\nexport type CardLayoutBlockModel = {\n type: BlockType.CardLayoutBlock;\n} & CardLayoutBlockProps;\n\nexport type FilterBlockModel = {\n type: BlockType.FilterBlock;\n} & FilterBlockProps;\n\nexport type IconsBlockModel = {\n type: BlockType.IconsBlock;\n} & IconsBlockProps;\n\nexport type HeaderSliderBlockModel = {\n type: BlockType.HeaderSliderBlock;\n} & HeaderSliderBlockProps;\n\nexport type ContentLayoutBlockModel = {\n type: BlockType.ContentLayoutBlock;\n} & ContentLayoutBlockProps;\n\nexport type ShareBLockModel = {\n type: BlockType.ShareBlock;\n} & ShareBlockProps;\n\nexport type FormBlockModel = {\n type: BlockType.FormBlock;\n} & FormBlockProps;\n\nexport type SliderBlockModel = {\n type: BlockType.SliderBlock;\n} & SliderProps;\n\ntype BlockModels =\n | SliderOldBlockModel\n | SliderBlockModel\n | ExtendedFeaturesBlockModel\n | PromoFeaturesBlockModel\n | QuestionsBlockModel\n | FoldableListBlockModel\n | BannerBlockModel\n | CompaniesBlockModel\n | MediaBlockModel\n | MapBlockModel\n | InfoBlockModel\n | TableBlockModel\n | TabsBlockModel\n | HeaderBlockModel\n | IconsBlockModel\n | HeaderSliderBlockModel\n | CardLayoutBlockModel\n | ContentLayoutBlockModel\n | ShareBLockModel\n | FilterBlockModel\n | FormBlockModel;\n\nexport type Block = BlockModels & BlockBaseProps;\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gravity-ui/page-constructor",
3
- "version": "7.22.0",
3
+ "version": "7.23.0",
4
4
  "description": "Gravity UI Page Constructor",
5
5
  "license": "MIT",
6
6
  "type": "commonjs",
@@ -271,6 +271,7 @@ export interface TabsBlockProps extends Animatable {
271
271
  export interface CardLayoutBlockProps extends Childable, Animatable, LoadableChildren {
272
272
  title?: TitleItemProps | string;
273
273
  titleClassName?: string;
274
+ centered?: boolean;
274
275
  description?: string;
275
276
  colSizes?: GridColumnSizesType;
276
277
  background?: ThemeSupporting<BackgroundImageProps & {
package/widget/index.js CHANGED
@@ -1 +1 @@
1
- export default "(self.webpackChunk_gravity_ui_page_constructor=self.webpackChunk_gravity_ui_page_constructor||[]).push([[6007],{56007:function(_,t,e){_.exports=function(_){\"use strict\";function t(_){return _&&\"object\"==typeof _&&\"default\"in _?_:{default:_}}var e=t(_),Y={name:\"zh\",weekdays:\"星期日_星期一_星期二_星期三_星期四_星期五_星期六\".split(\"_\"),weekdaysShort:\"周日_周一_周二_周三_周四_周五_周六\".split(\"_\"),weekdaysMin:\"_____五_六\".split(\"_\"),months:\"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月\".split(\"_\"),monthsShort:\"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月\".split(\"_\"),ordinal:function(_,t){return\"W\"===t?_+\"周\":_+\"日\"},weekStart:1,yearStart:4,formats:{LT:\"HH:mm\",LTS:\"HH:mm:ss\",L:\"YYYY/MM/DD\",LL:\"YYYY年M月D日\",LLL:\"YYYY年M月D日Ah点mm分\",LLLL:\"YYYY年M月D日ddddAh点mm分\",l:\"YYYY/M/D\",ll:\"YYYY年M月D日\",lll:\"YYYY年M月D日 HH:mm\",llll:\"YYYY年M月D日dddd HH:mm\"},relativeTime:{future:\"%s后\",past:\"%s前\",s:\"几秒\",m:\"1 分钟\",mm:\"%d 分钟\",h:\"1 小时\",hh:\"%d 小时\",d:\"1 天\",dd:\"%d 天\",M:\"1 个月\",MM:\"%d 个月\",y:\"1 年\",yy:\"%d 年\"},meridiem:function(_,t){var e=100*_+t;return e<600?\"凌晨\":e<900?\"早上\":e<1100?\"上午\":e<1300?\"中午\":e<1800?\"下午\":\"晚上\"}};return e.default.locale(Y,null,!0),Y}(e(74353))}}]);";
1
+ export default "(self.webpackChunk_gravity_ui_page_constructor=self.webpackChunk_gravity_ui_page_constructor||[]).push([[5760],{5760:function(_,t,r){_.exports=function(_){\"use strict\";function t(_){return _&&\"object\"==typeof _&&\"default\"in _?_:{default:_}}var r=t(_),s={name:\"x-pseudo\",weekdays:\"S~úñdá~ý_Mó~ñdáý~_Túé~sdáý~_Wéd~ñésd~áý_T~húrs~dáý_~Fríd~áý_S~átúr~dáý\".split(\"_\"),months:\"J~áñúá~rý_F~ébrú~árý_~Márc~h_Áp~ríl_~Máý_~Júñé~_Júl~ý_Áú~gúst~_Sép~témb~ér_Ó~ctób~ér_Ñ~óvém~bér_~Décé~mbér\".split(\"_\"),weekStart:1,weekdaysShort:\"S~úñ_~Móñ_~Túé_~Wéd_~Thú_~Frí_~Sát\".split(\"_\"),monthsShort:\"J~áñ_~Féb_~Már_~Ápr_~Máý_~Júñ_~Júl_~Áúg_~Sép_~Óct_~Ñóv_~Déc\".split(\"_\"),weekdaysMin:\"S~ú_Mó~_Tú_~Wé_T~h_Fr~_Sá\".split(\"_\"),ordinal:function(_){return _},formats:{LT:\"HH:mm\",LTS:\"HH:mm:ss\",L:\"DD/MM/YYYY\",LL:\"D MMMM YYYY\",LLL:\"D MMMM YYYY HH:mm\",LLLL:\"dddd, D MMMM YYYY HH:mm\"},relativeTime:{future:\"í~ñ %s\",past:\"%s á~gó\",s:\"á ~féw ~sécó~ñds\",m:\"á ~míñ~úté\",mm:\"%d m~íñú~tés\",h:\"á~ñ hó~úr\",hh:\"%d h~óúrs\",d:\"á ~dáý\",dd:\"%d d~áýs\",M:\"á ~móñ~th\",MM:\"%d m~óñt~hs\",y:\"á ~ýéár\",yy:\"%d ý~éárs\"}};return r.default.locale(s,null,!0),s}(r(74353))}}]);";