@gravity-ui/page-constructor 8.2.2 → 8.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/build/cjs/blocks/ContentLayout/ContentLayout.css +2 -2
- package/build/cjs/blocks/ContentLayout/ContentLayout.js +2 -0
- package/build/cjs/blocks/ContentLayout/ContentLayout.js.map +1 -1
- package/build/cjs/blocks/ContentLayout/schema.d.ts +0 -11
- package/build/cjs/blocks/FoldableList/schema.d.ts +0 -11
- package/build/cjs/blocks/Form/Form.css +10 -1
- package/build/cjs/blocks/Form/Form.js +4 -2
- package/build/cjs/blocks/Form/Form.js.map +1 -1
- package/build/cjs/blocks/Form/schema.d.ts +0 -11
- package/build/cjs/blocks/Header/Header.css +6 -0
- package/build/cjs/blocks/Header/schema.js +1 -25
- package/build/cjs/blocks/Header/schema.js.map +1 -1
- package/build/cjs/blocks/Hero/Hero.css +211 -0
- package/build/cjs/blocks/Hero/Hero.d.ts +3 -0
- package/build/cjs/blocks/Hero/Hero.js +50 -0
- package/build/cjs/blocks/Hero/Hero.js.map +1 -0
- package/build/cjs/blocks/Hero/hooks.d.ts +4 -0
- package/build/cjs/blocks/Hero/hooks.js +38 -0
- package/build/cjs/blocks/Hero/hooks.js.map +1 -0
- package/build/cjs/blocks/Hero/schema.d.ts +2076 -0
- package/build/cjs/blocks/Hero/schema.js +66 -0
- package/build/cjs/blocks/Hero/schema.js.map +1 -0
- package/build/cjs/blocks/Info/schema.d.ts +0 -22
- package/build/cjs/blocks/Map/schema.d.ts +0 -11
- package/build/cjs/blocks/Media/schema.d.ts +0 -22
- package/build/cjs/blocks/Questions/schema.d.ts +0 -11
- package/build/cjs/blocks/Tabs/schema.d.ts +0 -11
- package/build/cjs/blocks/index.d.ts +1 -0
- package/build/cjs/blocks/index.js +3 -1
- package/build/cjs/blocks/index.js.map +1 -1
- package/build/cjs/components/Buttons/Buttons.css +2 -2
- package/build/cjs/components/Buttons/Buttons.d.ts +2 -1
- package/build/cjs/components/Buttons/Buttons.js +8 -3
- package/build/cjs/components/Buttons/Buttons.js.map +1 -1
- package/build/cjs/components/ContentList/ContentList.css +8 -8
- package/build/cjs/components/ContentList/ContentList.js +2 -0
- package/build/cjs/components/ContentList/ContentList.js.map +1 -1
- package/build/cjs/components/DefaultVideo/DefaultVideo.d.ts +1 -0
- package/build/cjs/components/DefaultVideo/DefaultVideo.js +2 -2
- package/build/cjs/components/DefaultVideo/DefaultVideo.js.map +1 -1
- package/build/cjs/components/IconWrapper/IconWrapper.css +6 -0
- package/build/cjs/components/Image/Image.d.ts +5 -1
- package/build/cjs/components/Image/Image.js +4 -2
- package/build/cjs/components/Image/Image.js.map +1 -1
- package/build/cjs/components/ImageBase/ImageBase.d.ts +2 -2
- package/build/cjs/components/ImageBase/ImageBase.js +5 -5
- package/build/cjs/components/ImageBase/ImageBase.js.map +1 -1
- package/build/cjs/components/Links/Links.css +1 -1
- package/build/cjs/components/Links/Links.js +2 -0
- package/build/cjs/components/Links/Links.js.map +1 -1
- package/build/cjs/components/Media/Image/Image.d.ts +4 -0
- package/build/cjs/components/Media/Image/Image.js +3 -3
- package/build/cjs/components/Media/Image/Image.js.map +1 -1
- package/build/cjs/components/Media/Media.js +8 -4
- package/build/cjs/components/Media/Media.js.map +1 -1
- package/build/cjs/components/Media/Video/Video.d.ts +5 -0
- package/build/cjs/components/Media/Video/Video.js +30 -4
- package/build/cjs/components/Media/Video/Video.js.map +1 -1
- package/build/cjs/components/ReactPlayer/ReactPlayer.css +5 -0
- package/build/cjs/components/ReactPlayer/ReactPlayer.d.ts +5 -0
- package/build/cjs/components/ReactPlayer/ReactPlayer.js +12 -4
- package/build/cjs/components/ReactPlayer/ReactPlayer.js.map +1 -1
- package/build/cjs/components/Title/TitleItem.css +6 -0
- package/build/cjs/components/index.d.ts +1 -0
- package/build/cjs/components/index.js +3 -1
- package/build/cjs/components/index.js.map +1 -1
- package/build/cjs/constructor-items.d.ts +1 -0
- package/build/cjs/constructor-items.js +1 -0
- package/build/cjs/constructor-items.js.map +1 -1
- package/build/cjs/context/imageContext/imageContext.d.ts +1 -1
- package/build/cjs/context/imageContext/imageContext.js.map +1 -1
- package/build/cjs/demo/ComponentsText.stories.js +3 -3
- package/build/cjs/demo/ComponentsText.stories.js.map +1 -1
- package/build/cjs/hooks/index.d.ts +1 -0
- package/build/cjs/hooks/index.js +1 -0
- package/build/cjs/hooks/index.js.map +1 -1
- package/build/cjs/hooks/useImageSize.d.ts +8 -0
- package/build/cjs/hooks/useImageSize.js +52 -0
- package/build/cjs/hooks/useImageSize.js.map +1 -0
- package/build/cjs/models/constructor-items/blocks.d.ts +31 -22
- package/build/cjs/models/constructor-items/blocks.js +6 -1
- package/build/cjs/models/constructor-items/blocks.js.map +1 -1
- package/build/cjs/models/constructor-items/common.d.ts +1 -1
- package/build/cjs/models/constructor-items/common.js.map +1 -1
- package/build/cjs/models/constructor-items/sub-blocks.d.ts +6 -6
- package/build/cjs/models/constructor-items/sub-blocks.js.map +1 -1
- package/build/cjs/schema/constants.d.ts +5 -30
- package/build/cjs/schema/constants.js +1 -0
- package/build/cjs/schema/constants.js.map +1 -1
- package/build/cjs/schema/validators/blocks.d.ts +1 -0
- package/build/cjs/schema/validators/blocks.js +1 -0
- package/build/cjs/schema/validators/blocks.js.map +1 -1
- package/build/cjs/schema/validators/common.d.ts +28 -0
- package/build/cjs/schema/validators/common.js +27 -2
- package/build/cjs/schema/validators/common.js.map +1 -1
- package/build/cjs/sub-blocks/BackgroundCard/schema.d.ts +3 -10
- package/build/cjs/sub-blocks/BackgroundCard/schema.js +1 -1
- package/build/cjs/sub-blocks/BackgroundCard/schema.js.map +1 -1
- package/build/cjs/sub-blocks/BasicCard/schema.d.ts +2 -9
- package/build/cjs/sub-blocks/BasicCard/schema.js +1 -1
- package/build/cjs/sub-blocks/BasicCard/schema.js.map +1 -1
- package/build/cjs/sub-blocks/Content/Content.css +29 -17
- package/build/cjs/sub-blocks/Content/Content.js +7 -13
- package/build/cjs/sub-blocks/Content/Content.js.map +1 -1
- package/build/cjs/sub-blocks/Content/schema.d.ts +0 -100
- package/build/cjs/sub-blocks/Content/schema.js +1 -14
- package/build/cjs/sub-blocks/Content/schema.js.map +1 -1
- package/build/cjs/sub-blocks/ImageCard/schema.d.ts +0 -11
- package/build/cjs/sub-blocks/LayoutItem/schema.d.ts +0 -11
- package/build/cjs/sub-blocks/LayoutItem/schema.js +1 -1
- package/build/cjs/sub-blocks/LayoutItem/schema.js.map +1 -1
- package/build/cjs/text-transform/config.js +17 -0
- package/build/cjs/text-transform/config.js.map +1 -1
- package/build/esm/blocks/ContentLayout/ContentLayout.css +2 -2
- package/build/esm/blocks/ContentLayout/ContentLayout.js +2 -0
- package/build/esm/blocks/ContentLayout/ContentLayout.js.map +1 -1
- package/build/esm/blocks/ContentLayout/schema.d.ts +0 -11
- package/build/esm/blocks/FoldableList/schema.d.ts +0 -11
- package/build/esm/blocks/Form/Form.css +10 -1
- package/build/esm/blocks/Form/Form.js +4 -2
- package/build/esm/blocks/Form/Form.js.map +1 -1
- package/build/esm/blocks/Form/schema.d.ts +0 -11
- package/build/esm/blocks/Header/Header.css +6 -0
- package/build/esm/blocks/Header/schema.js +2 -26
- package/build/esm/blocks/Header/schema.js.map +1 -1
- package/build/esm/blocks/Hero/Hero.css +211 -0
- package/build/esm/blocks/Hero/Hero.d.ts +4 -0
- package/build/esm/blocks/Hero/Hero.js +48 -0
- package/build/esm/blocks/Hero/Hero.js.map +1 -0
- package/build/esm/blocks/Hero/hooks.d.ts +4 -0
- package/build/esm/blocks/Hero/hooks.js +33 -0
- package/build/esm/blocks/Hero/hooks.js.map +1 -0
- package/build/esm/blocks/Hero/schema.d.ts +2076 -0
- package/build/esm/blocks/Hero/schema.js +62 -0
- package/build/esm/blocks/Hero/schema.js.map +1 -0
- package/build/esm/blocks/Info/schema.d.ts +0 -22
- package/build/esm/blocks/Map/schema.d.ts +0 -11
- package/build/esm/blocks/Media/schema.d.ts +0 -22
- package/build/esm/blocks/Questions/schema.d.ts +0 -11
- package/build/esm/blocks/Tabs/schema.d.ts +0 -11
- package/build/esm/blocks/index.d.ts +1 -0
- package/build/esm/blocks/index.js +1 -0
- package/build/esm/blocks/index.js.map +1 -1
- package/build/esm/components/Buttons/Buttons.css +2 -2
- package/build/esm/components/Buttons/Buttons.d.ts +2 -1
- package/build/esm/components/Buttons/Buttons.js +8 -3
- package/build/esm/components/Buttons/Buttons.js.map +1 -1
- package/build/esm/components/ContentList/ContentList.css +8 -8
- package/build/esm/components/ContentList/ContentList.js +2 -0
- package/build/esm/components/ContentList/ContentList.js.map +1 -1
- package/build/esm/components/DefaultVideo/DefaultVideo.d.ts +1 -0
- package/build/esm/components/DefaultVideo/DefaultVideo.js +2 -2
- package/build/esm/components/DefaultVideo/DefaultVideo.js.map +1 -1
- package/build/esm/components/IconWrapper/IconWrapper.css +6 -0
- package/build/esm/components/Image/Image.d.ts +5 -1
- package/build/esm/components/Image/Image.js +4 -2
- package/build/esm/components/Image/Image.js.map +1 -1
- package/build/esm/components/ImageBase/ImageBase.d.ts +2 -2
- package/build/esm/components/ImageBase/ImageBase.js +5 -4
- package/build/esm/components/ImageBase/ImageBase.js.map +1 -1
- package/build/esm/components/Links/Links.css +1 -1
- package/build/esm/components/Links/Links.js +2 -0
- package/build/esm/components/Links/Links.js.map +1 -1
- package/build/esm/components/Media/Image/Image.d.ts +4 -0
- package/build/esm/components/Media/Image/Image.js +3 -3
- package/build/esm/components/Media/Image/Image.js.map +1 -1
- package/build/esm/components/Media/Media.js +8 -4
- package/build/esm/components/Media/Media.js.map +1 -1
- package/build/esm/components/Media/Video/Video.d.ts +5 -0
- package/build/esm/components/Media/Video/Video.js +30 -4
- package/build/esm/components/Media/Video/Video.js.map +1 -1
- package/build/esm/components/ReactPlayer/ReactPlayer.css +5 -0
- package/build/esm/components/ReactPlayer/ReactPlayer.d.ts +5 -0
- package/build/esm/components/ReactPlayer/ReactPlayer.js +13 -5
- package/build/esm/components/ReactPlayer/ReactPlayer.js.map +1 -1
- package/build/esm/components/Title/TitleItem.css +6 -0
- package/build/esm/components/index.d.ts +1 -0
- package/build/esm/components/index.js +1 -0
- package/build/esm/components/index.js.map +1 -1
- package/build/esm/constructor-items.d.ts +1 -0
- package/build/esm/constructor-items.js +2 -1
- package/build/esm/constructor-items.js.map +1 -1
- package/build/esm/context/imageContext/imageContext.d.ts +1 -1
- package/build/esm/context/imageContext/imageContext.js.map +1 -1
- package/build/esm/demo/ComponentsText.stories.js +3 -3
- package/build/esm/demo/ComponentsText.stories.js.map +1 -1
- package/build/esm/hooks/index.d.ts +1 -0
- package/build/esm/hooks/index.js +1 -0
- package/build/esm/hooks/index.js.map +1 -1
- package/build/esm/hooks/useImageSize.d.ts +8 -0
- package/build/esm/hooks/useImageSize.js +47 -0
- package/build/esm/hooks/useImageSize.js.map +1 -0
- package/build/esm/models/constructor-items/blocks.d.ts +31 -22
- package/build/esm/models/constructor-items/blocks.js +6 -1
- package/build/esm/models/constructor-items/blocks.js.map +1 -1
- package/build/esm/models/constructor-items/common.d.ts +1 -1
- package/build/esm/models/constructor-items/common.js.map +1 -1
- package/build/esm/models/constructor-items/sub-blocks.d.ts +6 -6
- package/build/esm/models/constructor-items/sub-blocks.js.map +1 -1
- package/build/esm/schema/constants.d.ts +5 -30
- package/build/esm/schema/constants.js +2 -1
- package/build/esm/schema/constants.js.map +1 -1
- package/build/esm/schema/validators/blocks.d.ts +1 -0
- package/build/esm/schema/validators/blocks.js +1 -0
- package/build/esm/schema/validators/blocks.js.map +1 -1
- package/build/esm/schema/validators/common.d.ts +28 -0
- package/build/esm/schema/validators/common.js +26 -1
- package/build/esm/schema/validators/common.js.map +1 -1
- package/build/esm/sub-blocks/BackgroundCard/schema.d.ts +3 -10
- package/build/esm/sub-blocks/BackgroundCard/schema.js +1 -1
- package/build/esm/sub-blocks/BackgroundCard/schema.js.map +1 -1
- package/build/esm/sub-blocks/BasicCard/schema.d.ts +2 -9
- package/build/esm/sub-blocks/BasicCard/schema.js +1 -1
- package/build/esm/sub-blocks/BasicCard/schema.js.map +1 -1
- package/build/esm/sub-blocks/Content/Content.css +29 -17
- package/build/esm/sub-blocks/Content/Content.js +7 -12
- package/build/esm/sub-blocks/Content/Content.js.map +1 -1
- package/build/esm/sub-blocks/Content/schema.d.ts +0 -100
- package/build/esm/sub-blocks/Content/schema.js +0 -13
- package/build/esm/sub-blocks/Content/schema.js.map +1 -1
- package/build/esm/sub-blocks/ImageCard/schema.d.ts +0 -11
- package/build/esm/sub-blocks/LayoutItem/schema.d.ts +0 -11
- package/build/esm/sub-blocks/LayoutItem/schema.js +1 -1
- package/build/esm/sub-blocks/LayoutItem/schema.js.map +1 -1
- package/build/esm/text-transform/config.js +17 -0
- package/build/esm/text-transform/config.js.map +1 -1
- package/package.json +1 -1
- package/schema/index.js +1 -1
- package/server/models/constructor-items/blocks.d.ts +31 -22
- package/server/models/constructor-items/blocks.js +6 -1
- package/server/models/constructor-items/common.d.ts +1 -1
- package/server/models/constructor-items/sub-blocks.d.ts +6 -6
- package/server/text-transform/config.js +17 -0
- package/styles/mixins.scss +4 -0
- package/widget/index.js +1 -1
- package/build/cjs/components/ContentLabels/ContentLabels.css +0 -53
- package/build/cjs/components/ContentLabels/ContentLabels.d.ts +0 -3
- package/build/cjs/components/ContentLabels/ContentLabels.js +0 -16
- package/build/cjs/components/ContentLabels/ContentLabels.js.map +0 -1
- package/build/esm/components/ContentLabels/ContentLabels.css +0 -53
- package/build/esm/components/ContentLabels/ContentLabels.d.ts +0 -4
- package/build/esm/components/ContentLabels/ContentLabels.js +0 -14
- package/build/esm/components/ContentLabels/ContentLabels.js.map +0 -1
|
@@ -50,6 +50,12 @@ unpredictable css rules order in build */
|
|
|
50
50
|
font-weight: var(--g-text-accent-font-weight);
|
|
51
51
|
margin-top: 96px;
|
|
52
52
|
}
|
|
53
|
+
@media (max-width: 769px) {
|
|
54
|
+
.pc-title-item_size_l {
|
|
55
|
+
font-size: var(--g-text-display-3-font-size);
|
|
56
|
+
line-height: var(--g-text-display-3-line-height);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
53
59
|
@media (max-width: 577px) {
|
|
54
60
|
.pc-title-item_size_l {
|
|
55
61
|
font-size: var(--g-text-display-2-font-size);
|
|
@@ -41,5 +41,6 @@ export { default as UnpublishedLabel } from "./UnpublishedLabel/UnpublishedLabel
|
|
|
41
41
|
export { default as VideoBlock } from "./VideoBlock/VideoBlock.js";
|
|
42
42
|
export { default as YFMWrapper } from "./YFMWrapper/YFMWrapper.js";
|
|
43
43
|
export { default as YandexForm } from "./YandexForm/YandexForm.js";
|
|
44
|
+
export { default as ContentIcon } from "./ContentIcon/ContentIcon.js";
|
|
44
45
|
export type { RouterLinkProps } from "./RouterLink/RouterLink.js";
|
|
45
46
|
export type { ImageBaseProps } from "./ImageBase/ImageBase.js";
|
|
@@ -41,4 +41,5 @@ export { default as UnpublishedLabel } from "./UnpublishedLabel/UnpublishedLabel
|
|
|
41
41
|
export { default as VideoBlock } from "./VideoBlock/VideoBlock.js";
|
|
42
42
|
export { default as YFMWrapper } from "./YFMWrapper/YFMWrapper.js";
|
|
43
43
|
export { default as YandexForm } from "./YandexForm/YandexForm.js";
|
|
44
|
+
export { default as ContentIcon } from "./ContentIcon/ContentIcon.js";
|
|
44
45
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"../../../src","sources":["components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,IAAI,MAAM,EAAC,2BAAwB;AAClD,OAAO,EAAC,OAAO,IAAI,YAAY,EAAC,uCAAoC;AACpE,OAAO,EAAC,OAAO,IAAI,MAAM,EAAC,2BAAwB;AAClD,OAAO,EAAC,OAAO,IAAI,eAAe,EAAC,6CAA0C;AAC7E,OAAO,EAAC,OAAO,IAAI,eAAe,EAAC,6CAA0C;AAC7E,OAAO,EAAC,OAAO,IAAI,QAAQ,EAAC,+BAA4B;AACx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C/C,OAAO,EAAC,OAAO,IAAI,QAAQ,EAAC,+BAA4B;AACxD,OAAO,EAAC,OAAO,IAAI,YAAY,EAAC,uCAAoC;AACpE,OAAO,EAAC,OAAO,IAAI,gBAAgB,EAAC,+CAA4C;AAChF,OAAO,EAAC,OAAO,IAAI,WAAW,EAAC,qCAAkC;AACjE,OAAO,EAAC,OAAO,IAAI,UAAU,EAAC,mCAAgC;AAC9D,OAAO,EAAC,OAAO,IAAI,KAAK,EAAC,yBAAsB;AAC/C,OAAO,EAAC,OAAO,IAAI,UAAU,EAAC,mCAAgC;AAC9D,OAAO,EAAC,OAAO,IAAI,KAAK,EAAC,yBAAsB;AAC/C,OAAO,EAAC,OAAO,IAAI,WAAW,EAAC,qCAAkC;AACjE,OAAO,EAAC,OAAO,IAAI,gBAAgB,EAAC,+CAA4C;AAChF,OAAO,EAAC,OAAO,IAAI,UAAU,EAAC,mCAAgC;AAC9D,OAAO,EAAC,OAAO,IAAI,UAAU,EAAC,mCAAgC;AAC9D,OAAO,EAAC,OAAO,IAAI,UAAU,EAAC,mCAAgC","sourcesContent":["export {default as Anchor} from './Anchor/Anchor';\nexport {default as AnimateBlock} from './AnimateBlock/AnimateBlock';\nexport {default as Author} from './Author/Author';\nexport {default as BackgroundImage} from './BackgroundImage/BackgroundImage';\nexport {default as BackgroundMedia} from './BackgroundMedia/BackgroundMedia';\nexport {default as BackLink} from './BackLink/BackLink';\nexport {default as BalancedMasonry} from './BalancedMasonry/BalancedMasonry';\nexport {default as BlockBase} from './BlockBase/BlockBase';\nexport {default as Button} from './Button/Button';\nexport {default as Buttons} from './Buttons/Buttons';\nexport {default as BrandFooter} from './BrandFooter/BrandFooter';\nexport {default as CardBase} from './CardBase/CardBase';\nexport {default as ContentList} from './ContentList/ContentList';\nexport {default as Control} from './Control/Control';\nexport {default as ErrorWrapper} from './ErrorWrapper/ErrorWrapper';\nexport {default as FileLink} from './FileLink/FileLink';\nexport {default as Foldable} from './Foldable/Foldable';\nexport {default as FullscreenImage} from './FullscreenImage/FullscreenImage';\nexport {default as FullscreenMedia} from './FullscreenMedia/FullscreenMedia';\nexport {default as FullWidthBackground} from './FullWidthBackground/FullWidthBackground';\nexport {default as HeaderBreadcrumbs} from './HeaderBreadcrumbs/HeaderBreadcrumbs';\nexport {default as HTML} from './HTML/HTML';\nexport {default as IconWrapper} from './IconWrapper/IconWrapper';\nexport {default as Image} from './Image/Image';\nexport {default as ImageBase} from './ImageBase/ImageBase';\nexport {default as InnerForm} from './InnerForm/InnerForm';\nexport {default as Link} from './Link/Link';\nexport {default as Links} from './Links/Links';\nexport {default as Map} from './Map/Map';\nexport {default as Media} from './Media/Media';\nexport {default as MetaInfo} from './MetaInfo/MetaInfo';\nexport {default as OutsideClick} from './OutsideClick/OutsideClick';\nexport {default as OverflowScroller} from './OverflowScroller/OverflowScroller';\nexport {default as ReactPlayer} from './ReactPlayer/ReactPlayer';\nexport {default as RouterLink} from './RouterLink/RouterLink';\nexport {default as Table} from './Table/Table';\nexport {default as ButtonTabs} from './ButtonTabs/ButtonTabs';\nexport {default as Title} from './Title/Title';\nexport {default as ToggleArrow} from './ToggleArrow/ToggleArrow';\nexport {default as UnpublishedLabel} from './UnpublishedLabel/UnpublishedLabel';\nexport {default as VideoBlock} from './VideoBlock/VideoBlock';\nexport {default as YFMWrapper} from './YFMWrapper/YFMWrapper';\nexport {default as YandexForm} from './YandexForm/YandexForm';\n\nexport type {RouterLinkProps} from './RouterLink/RouterLink';\nexport type {ImageBaseProps} from './ImageBase/ImageBase';\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"../../../src","sources":["components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,IAAI,MAAM,EAAC,2BAAwB;AAClD,OAAO,EAAC,OAAO,IAAI,YAAY,EAAC,uCAAoC;AACpE,OAAO,EAAC,OAAO,IAAI,MAAM,EAAC,2BAAwB;AAClD,OAAO,EAAC,OAAO,IAAI,eAAe,EAAC,6CAA0C;AAC7E,OA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,OAAO,EAAC,OAAO,IAAI,GAAG,EAAC,qBAAkB;AACzC,OAAO,EAAC,OAAO,IAAI,KAAK,EAAC,yBAAsB;AAC/C,OAAO,EAAC,OAAO,IAAI,QAAQ,EAAC,+BAA4B;AACxD,OAAO,EAAC,OAAO,IAAI,YAAY,EAAC,uCAAoC;AACpE,OAAO,EAAC,OAAO,IAAI,gBAAgB,EAAC,+CAA4C;AAChF,OAAO,EAAC,OAAO,IAAI,WAAW,EAAC,qCAAkC;AACjE,OAAO,EAAC,OAAO,IAAI,UAAU,EAAC,mCAAgC;AAC9D,OAAO,EAAC,OAAO,IAAI,KAAK,EAAC,yBAAsB;AAC/C,OAAO,EAAC,OAAO,IAAI,UAAU,EAAC,mCAAgC;AAC9D,OAAO,EAAC,OAAO,IAAI,KAAK,EAAC,yBAAsB;AAC/C,OAAO,EAAC,OAAO,IAAI,WAAW,EAAC,qCAAkC;AACjE,OAAO,EAAC,OAAO,IAAI,gBAAgB,EAAC,+CAA4C;AAChF,OAAO,EAAC,OAAO,IAAI,UAAU,EAAC,mCAAgC;AAC9D,OAAO,EAAC,OAAO,IAAI,UAAU,EAAC,mCAAgC;AAC9D,OAAO,EAAC,OAAO,IAAI,UAAU,EAAC,mCAAgC;AAC9D,OAAO,EAAC,OAAO,IAAI,WAAW,EAAC,qCAAkC","sourcesContent":["export {default as Anchor} from './Anchor/Anchor';\nexport {default as AnimateBlock} from './AnimateBlock/AnimateBlock';\nexport {default as Author} from './Author/Author';\nexport {default as BackgroundImage} from './BackgroundImage/BackgroundImage';\nexport {default as BackgroundMedia} from './BackgroundMedia/BackgroundMedia';\nexport {default as BackLink} from './BackLink/BackLink';\nexport {default as BalancedMasonry} from './BalancedMasonry/BalancedMasonry';\nexport {default as BlockBase} from './BlockBase/BlockBase';\nexport {default as Button} from './Button/Button';\nexport {default as Buttons} from './Buttons/Buttons';\nexport {default as BrandFooter} from './BrandFooter/BrandFooter';\nexport {default as CardBase} from './CardBase/CardBase';\nexport {default as ContentList} from './ContentList/ContentList';\nexport {default as Control} from './Control/Control';\nexport {default as ErrorWrapper} from './ErrorWrapper/ErrorWrapper';\nexport {default as FileLink} from './FileLink/FileLink';\nexport {default as Foldable} from './Foldable/Foldable';\nexport {default as FullscreenImage} from './FullscreenImage/FullscreenImage';\nexport {default as FullscreenMedia} from './FullscreenMedia/FullscreenMedia';\nexport {default as FullWidthBackground} from './FullWidthBackground/FullWidthBackground';\nexport {default as HeaderBreadcrumbs} from './HeaderBreadcrumbs/HeaderBreadcrumbs';\nexport {default as HTML} from './HTML/HTML';\nexport {default as IconWrapper} from './IconWrapper/IconWrapper';\nexport {default as Image} from './Image/Image';\nexport {default as ImageBase} from './ImageBase/ImageBase';\nexport {default as InnerForm} from './InnerForm/InnerForm';\nexport {default as Link} from './Link/Link';\nexport {default as Links} from './Links/Links';\nexport {default as Map} from './Map/Map';\nexport {default as Media} from './Media/Media';\nexport {default as MetaInfo} from './MetaInfo/MetaInfo';\nexport {default as OutsideClick} from './OutsideClick/OutsideClick';\nexport {default as OverflowScroller} from './OverflowScroller/OverflowScroller';\nexport {default as ReactPlayer} from './ReactPlayer/ReactPlayer';\nexport {default as RouterLink} from './RouterLink/RouterLink';\nexport {default as Table} from './Table/Table';\nexport {default as ButtonTabs} from './ButtonTabs/ButtonTabs';\nexport {default as Title} from './Title/Title';\nexport {default as ToggleArrow} from './ToggleArrow/ToggleArrow';\nexport {default as UnpublishedLabel} from './UnpublishedLabel/UnpublishedLabel';\nexport {default as VideoBlock} from './VideoBlock/VideoBlock';\nexport {default as YFMWrapper} from './YFMWrapper/YFMWrapper';\nexport {default as YandexForm} from './YandexForm/YandexForm';\nexport {default as ContentIcon} from './ContentIcon/ContentIcon';\n\nexport type {RouterLinkProps} from './RouterLink/RouterLink';\nexport type {ImageBaseProps} from './ImageBase/ImageBase';\n"]}
|
|
@@ -11,6 +11,7 @@ export declare const blockMap: {
|
|
|
11
11
|
"table-block": (props: import("./models/index.js").TableBlockProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
12
|
"tabs-block": ({ items, title, description, animated, tabsColSizes, centered, direction, contentSize, }: import("./models/index.js").TabsBlockProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
13
|
"header-block": (props: React.PropsWithChildren<import("./blocks/Header/Header.js").HeaderBlockFullProps>) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
"hero-block": (props: import("./models/index.js").HeroBlockProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
15
|
"icons-block": ({ title, description, size, colSizes, items }: import("./models/index.js").IconsBlockProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
16
|
"header-slider-block": ({ items, arrows, ...props }: import("./models/index.js").HeaderSliderBlockProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
17
|
"card-layout-block": ({ title, description, animated, colSizes, children, className, titleClassName, background, centered, }: import("./blocks/CardLayout/CardLayout.js").CardLayoutBlockProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BannerBlock, CardLayoutBlock, CompaniesBlock, ContentLayoutBlock, ExtendedFeaturesBlock, FilterBlock, FoldableListBlock, FormBlock, HeaderBlock, HeaderSliderBlock, IconsBlock, InfoBlock, MapBlock, MediaBlock, PromoFeaturesBlock, QuestionsBlock, ShareBlock, SliderBlock, SliderOldBlock, TableBlock, TabsBlock, } from "./blocks/index.js";
|
|
1
|
+
import { BannerBlock, CardLayoutBlock, CompaniesBlock, ContentLayoutBlock, ExtendedFeaturesBlock, FilterBlock, FoldableListBlock, FormBlock, HeaderBlock, HeaderSliderBlock, HeroBlock, IconsBlock, InfoBlock, MapBlock, MediaBlock, PromoFeaturesBlock, QuestionsBlock, ShareBlock, SliderBlock, SliderOldBlock, TableBlock, TabsBlock, } from "./blocks/index.js";
|
|
2
2
|
import { BlockType, NavigationItemType, SubBlockType } from "./models/index.js";
|
|
3
3
|
import { GithubButton, NavigationButton, NavigationDropdown, NavigationLink, } from "./navigation/components/NavigationItem/index.js";
|
|
4
4
|
import SocialIcon from "./navigation/components/SocialIcon/SocialIcon.js";
|
|
@@ -16,6 +16,7 @@ export const blockMap = {
|
|
|
16
16
|
[BlockType.TableBlock]: TableBlock,
|
|
17
17
|
[BlockType.TabsBlock]: TabsBlock,
|
|
18
18
|
[BlockType.HeaderBlock]: HeaderBlock,
|
|
19
|
+
[BlockType.HeroBlock]: HeroBlock,
|
|
19
20
|
[BlockType.IconsBlock]: IconsBlock,
|
|
20
21
|
[BlockType.HeaderSliderBlock]: HeaderSliderBlock,
|
|
21
22
|
[BlockType.CardLayoutBlock]: CardLayoutBlock,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constructor-items.js","sourceRoot":"../../src","sources":["constructor-items.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,WAAW,EACX,eAAe,EACf,cAAc,EACd,kBAAkB,EAClB,qBAAqB,EACrB,WAAW,EACX,iBAAiB,EACjB,SAAS,EACT,WAAW,EACX,iBAAiB,EACjB,UAAU,EACV,SAAS,EACT,QAAQ,EACR,UAAU,EACV,kBAAkB,EAClB,cAAc,EACd,UAAU,EACV,WAAW,EACX,cAAc,EACd,UAAU,EACV,SAAS,GACZ,0BAAiB;AAClB,OAAO,EAAC,SAAS,EAAE,kBAAkB,EAAE,YAAY,EAAC,0BAAiB;AACrE,OAAO,EACH,YAAY,EACZ,gBAAgB,EAChB,kBAAkB,EAClB,cAAc,GACjB,wDAA+C;AAChD,OAAO,UAAU,yDAAsD;AACvE,OAAO,EACH,cAAc,EACd,UAAU,EACV,SAAS,EACT,OAAO,EACP,OAAO,EACP,SAAS,EACT,UAAU,EACV,SAAS,EACT,SAAS,EACT,aAAa,EACb,KAAK,GACR,8BAAqB;AAEtB,MAAM,CAAC,MAAM,QAAQ,GAAG;IACpB,CAAC,SAAS,CAAC,cAAc,CAAC,EAAE,cAAc;IAC1C,CAAC,SAAS,CAAC,qBAAqB,CAAC,EAAE,qBAAqB;IACxD,CAAC,SAAS,CAAC,kBAAkB,C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C,EAAE,cAAc;IAC7C,CAAC,YAAY,CAAC,SAAS,CAAC,EAAE,SAAS;IACnC,CAAC,YAAY,CAAC,OAAO,CAAC,EAAE,OAAO;IAC/B,CAAC,YAAY,CAAC,KAAK,CAAC,EAAE,KAAK;IAC3B,CAAC,YAAY,CAAC,SAAS,CAAC,EAAE,SAAS;IACnC,CAAC,YAAY,CAAC,SAAS,CAAC,EAAE,SAAS;CACtC,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAAG;IACtB,CAAC,kBAAkB,CAAC,MAAM,CAAC,EAAE,gBAAgB;IAC7C,CAAC,kBAAkB,CAAC,MAAM,CAAC,EAAE,UAAU;IACvC,CAAC,kBAAkB,CAAC,QAAQ,CAAC,EAAE,kBAAkB;IACjD,CAAC,kBAAkB,CAAC,IAAI,CAAC,EAAE,cAAc;IACzC,CAAC,kBAAkB,CAAC,YAAY,CAAC,EAAE,YAAY;CAClD,CAAC","sourcesContent":["import {\n BannerBlock,\n CardLayoutBlock,\n CompaniesBlock,\n ContentLayoutBlock,\n ExtendedFeaturesBlock,\n FilterBlock,\n FoldableListBlock,\n FormBlock,\n HeaderBlock,\n HeaderSliderBlock,\n IconsBlock,\n InfoBlock,\n MapBlock,\n MediaBlock,\n PromoFeaturesBlock,\n QuestionsBlock,\n ShareBlock,\n SliderBlock,\n SliderOldBlock,\n TableBlock,\n TabsBlock,\n} from './blocks';\nimport {BlockType, NavigationItemType, SubBlockType} from './models';\nimport {\n GithubButton,\n NavigationButton,\n NavigationDropdown,\n NavigationLink,\n} from './navigation/components/NavigationItem';\nimport SocialIcon from './navigation/components/SocialIcon/SocialIcon';\nimport {\n BackgroundCard,\n BannerCard,\n BasicCard,\n Content,\n Divider,\n ImageCard,\n LayoutItem,\n MediaCard,\n PriceCard,\n PriceDetailed,\n Quote,\n} from './sub-blocks';\n\nexport const blockMap = {\n [BlockType.SliderOldBlock]: SliderOldBlock,\n [BlockType.ExtendedFeaturesBlock]: ExtendedFeaturesBlock,\n [BlockType.PromoFeaturesBlock]: PromoFeaturesBlock,\n [BlockType.QuestionsBlock]: QuestionsBlock,\n [BlockType.FoldableListBlock]: FoldableListBlock,\n [BlockType.BannerBlock]: BannerBlock,\n [BlockType.CompaniesBlock]: CompaniesBlock,\n [BlockType.MediaBlock]: MediaBlock,\n [BlockType.InfoBlock]: InfoBlock,\n [BlockType.TableBlock]: TableBlock,\n [BlockType.TabsBlock]: TabsBlock,\n [BlockType.HeaderBlock]: HeaderBlock,\n [BlockType.IconsBlock]: IconsBlock,\n [BlockType.HeaderSliderBlock]: HeaderSliderBlock,\n [BlockType.CardLayoutBlock]: CardLayoutBlock,\n [BlockType.ContentLayoutBlock]: ContentLayoutBlock,\n [BlockType.ShareBlock]: ShareBlock,\n [BlockType.MapBlock]: MapBlock,\n [BlockType.FilterBlock]: FilterBlock,\n [BlockType.FormBlock]: FormBlock,\n [BlockType.SliderBlock]: SliderBlock,\n};\n\nexport const subBlockMap = {\n [SubBlockType.Divider]: Divider,\n [SubBlockType.PriceDetailed]: PriceDetailed,\n [SubBlockType.MediaCard]: MediaCard,\n [SubBlockType.BannerCard]: BannerCard,\n [SubBlockType.LayoutItem]: LayoutItem,\n [SubBlockType.BackgroundCard]: BackgroundCard,\n [SubBlockType.BasicCard]: BasicCard,\n [SubBlockType.Content]: Content,\n [SubBlockType.Quote]: Quote,\n [SubBlockType.PriceCard]: PriceCard,\n [SubBlockType.ImageCard]: ImageCard,\n};\n\nexport const navItemMap = {\n [NavigationItemType.Button]: NavigationButton,\n [NavigationItemType.Social]: SocialIcon,\n [NavigationItemType.Dropdown]: NavigationDropdown,\n [NavigationItemType.Link]: NavigationLink,\n [NavigationItemType.GithubButton]: GithubButton,\n};\n"]}
|
|
1
|
+
{"version":3,"file":"constructor-items.js","sourceRoot":"../../src","sources":["constructor-items.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,WAAW,EACX,eAAe,EACf,cAAc,EACd,kBAAkB,EAClB,qBAAqB,EACrB,WAAW,EACX,iBA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EAAE,cAAc;IACzC,CAAC,kBAAkB,CAAC,YAAY,CAAC,EAAE,YAAY;CAClD,CAAC","sourcesContent":["import {\n BannerBlock,\n CardLayoutBlock,\n CompaniesBlock,\n ContentLayoutBlock,\n ExtendedFeaturesBlock,\n FilterBlock,\n FoldableListBlock,\n FormBlock,\n HeaderBlock,\n HeaderSliderBlock,\n HeroBlock,\n IconsBlock,\n InfoBlock,\n MapBlock,\n MediaBlock,\n PromoFeaturesBlock,\n QuestionsBlock,\n ShareBlock,\n SliderBlock,\n SliderOldBlock,\n TableBlock,\n TabsBlock,\n} from './blocks';\nimport {BlockType, NavigationItemType, SubBlockType} from './models';\nimport {\n GithubButton,\n NavigationButton,\n NavigationDropdown,\n NavigationLink,\n} from './navigation/components/NavigationItem';\nimport SocialIcon from './navigation/components/SocialIcon/SocialIcon';\nimport {\n BackgroundCard,\n BannerCard,\n BasicCard,\n Content,\n Divider,\n ImageCard,\n LayoutItem,\n MediaCard,\n PriceCard,\n PriceDetailed,\n Quote,\n} from './sub-blocks';\n\nexport const blockMap = {\n [BlockType.SliderOldBlock]: SliderOldBlock,\n [BlockType.ExtendedFeaturesBlock]: ExtendedFeaturesBlock,\n [BlockType.PromoFeaturesBlock]: PromoFeaturesBlock,\n [BlockType.QuestionsBlock]: QuestionsBlock,\n [BlockType.FoldableListBlock]: FoldableListBlock,\n [BlockType.BannerBlock]: BannerBlock,\n [BlockType.CompaniesBlock]: CompaniesBlock,\n [BlockType.MediaBlock]: MediaBlock,\n [BlockType.InfoBlock]: InfoBlock,\n [BlockType.TableBlock]: TableBlock,\n [BlockType.TabsBlock]: TabsBlock,\n [BlockType.HeaderBlock]: HeaderBlock,\n [BlockType.HeroBlock]: HeroBlock,\n [BlockType.IconsBlock]: IconsBlock,\n [BlockType.HeaderSliderBlock]: HeaderSliderBlock,\n [BlockType.CardLayoutBlock]: CardLayoutBlock,\n [BlockType.ContentLayoutBlock]: ContentLayoutBlock,\n [BlockType.ShareBlock]: ShareBlock,\n [BlockType.MapBlock]: MapBlock,\n [BlockType.FilterBlock]: FilterBlock,\n [BlockType.FormBlock]: FormBlock,\n [BlockType.SliderBlock]: SliderBlock,\n};\n\nexport const subBlockMap = {\n [SubBlockType.Divider]: Divider,\n [SubBlockType.PriceDetailed]: PriceDetailed,\n [SubBlockType.MediaCard]: MediaCard,\n [SubBlockType.BannerCard]: BannerCard,\n [SubBlockType.LayoutItem]: LayoutItem,\n [SubBlockType.BackgroundCard]: BackgroundCard,\n [SubBlockType.BasicCard]: BasicCard,\n [SubBlockType.Content]: Content,\n [SubBlockType.Quote]: Quote,\n [SubBlockType.PriceCard]: PriceCard,\n [SubBlockType.ImageCard]: ImageCard,\n};\n\nexport const navItemMap = {\n [NavigationItemType.Button]: NavigationButton,\n [NavigationItemType.Social]: SocialIcon,\n [NavigationItemType.Dropdown]: NavigationDropdown,\n [NavigationItemType.Link]: NavigationLink,\n [NavigationItemType.GithubButton]: GithubButton,\n};\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import type { ImageBaseProps } from "../../components/index.js";
|
|
3
3
|
export type ImageContextProps = {
|
|
4
|
-
Image?: React.ComponentType<ImageBaseProps
|
|
4
|
+
Image?: React.ComponentType<ImageBaseProps> | React.ForwardRefExoticComponent<ImageBaseProps & React.RefAttributes<HTMLImageElement>>;
|
|
5
5
|
};
|
|
6
6
|
export declare const ImageContext: React.Context<ImageContextProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"imageContext.js","sourceRoot":"../../../../src","sources":["context/imageContext/imageContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"imageContext.js","sourceRoot":"../../../../src","sources":["context/imageContext/imageContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAU/B,MAAM,CAAC,MAAM,YAAY,GAAG,KAAK,CAAC,aAAa,CAAoB,EAAE,CAAC,CAAC","sourcesContent":["import * as React from 'react';\n\nimport type {ImageBaseProps} from '../../components';\n\nexport type ImageContextProps = {\n Image?:\n | React.ComponentType<ImageBaseProps>\n | React.ForwardRefExoticComponent<ImageBaseProps & React.RefAttributes<HTMLImageElement>>;\n};\n\nexport const ImageContext = React.createContext<ImageContextProps>({});\n"]}
|
|
@@ -13,9 +13,9 @@ import titleData from "../components/Title/__stories__/data.json";
|
|
|
13
13
|
import yfmWrapperData from "../components/YFMWrapper/__stories__/data.json";
|
|
14
14
|
export default { title: 'Lab/Tokenization/Components/Text' };
|
|
15
15
|
const defaultTitleArgs = {
|
|
16
|
-
|
|
17
|
-
subtitle: yfmTransform(titleData.default.
|
|
16
|
+
title: titleData.default.title,
|
|
17
|
+
subtitle: yfmTransform(titleData.default.subtitle),
|
|
18
18
|
};
|
|
19
19
|
const transformContentList = (item) => blockTransform(item);
|
|
20
|
-
export const Default = () => (_jsxs("div", { style: { padding: '40px', display: 'flex', flexDirection: 'column', gap: '48px' }, children: [_jsxs("section", { children: [_jsx("strong", { children: "Title \u2014 default" }), _jsx(Title, { ...defaultTitleArgs })] }), _jsxs("section", { children: [_jsx("strong", { children: "Title \u2014 sizes (l \u2192 xs)" }), _jsx("div", { children: Object.entries(titleData.sizes).map(([size, props]) => (_jsx("div", { style: { paddingBottom: '32px' }, children: _jsx(Title, { ...defaultTitleArgs, title: props }) }, size))) })] }), _jsxs("section", { children: [_jsx("strong", { children: "Title \u2014 with link" }), _jsx(Title, { ...defaultTitleArgs, title: titleData.titleLink.
|
|
20
|
+
export const Default = () => (_jsxs("div", { style: { padding: '40px', display: 'flex', flexDirection: 'column', gap: '48px' }, children: [_jsxs("section", { children: [_jsx("strong", { children: "Title \u2014 default" }), _jsx(Title, { ...defaultTitleArgs })] }), _jsxs("section", { children: [_jsx("strong", { children: "Title \u2014 sizes (l \u2192 xs)" }), _jsx("div", { children: Object.entries(titleData.sizes).map(([size, props]) => (_jsx("div", { style: { paddingBottom: '32px' }, children: _jsx(Title, { ...defaultTitleArgs, title: props }) }, size))) })] }), _jsxs("section", { children: [_jsx("strong", { children: "Title \u2014 with link" }), _jsx(Title, { ...defaultTitleArgs, title: titleData.titleLink.title })] }), _jsxs("section", { children: [_jsx("strong", { children: "YFMWrapper" }), _jsx(YFMWrapper, { ...yfmWrapperData.default.content })] }), _jsxs("section", { children: [_jsx("strong", { children: "Author \u2014 column" }), _jsx(Author, { ...authorData.default.content })] }), _jsxs("section", { children: [_jsx("strong", { children: "Author \u2014 line" }), _jsx(Author, { ...authorData.default.content, type: AuthorType.Line })] }), _jsxs("section", { children: [_jsx("strong", { children: "ContentList \u2014 default" }), _jsx(ContentList, { ...transformContentList(contentListData.default) })] }), _jsxs("section", { children: [_jsx("strong", { children: "ContentList \u2014 without icon" }), _jsx(ContentList, { ...transformContentList(contentListData.withoutIcon) })] }), _jsxs("section", { children: [_jsx("strong", { children: "ContentList \u2014 sizes (s / m / l)" }), _jsx("div", { style: { display: 'flex', flexDirection: 'column', gap: '16px' }, children: contentListData.sizes.map((item, index) => (_jsx(ContentList, { ...transformContentList(item) }, index))) })] }), _jsxs("section", { children: [_jsx("strong", { children: "MetaInfo" }), _jsx(MetaInfo, { ...metaInfoData.default.content })] })] }));
|
|
21
21
|
//# sourceMappingURL=ComponentsText.stories.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComponentsText.stories.js","sourceRoot":"../../../src","sources":["demo/ComponentsText.stories.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAC,cAAc,EAAE,YAAY,EAAC,kCAA+B;AACpE,OAAO,MAAM,uCAAoC;AACjD,OAAO,WAAW,iDAA8C;AAChE,OAAO,QAAQ,2CAAwC;AACvD,OAAO,KAAK,qCAAkC;AAC9C,OAAO,UAAU,+CAA4C;AAC7D,OAAO,EAAC,UAAU,EAAgD,2BAAkB;AAEpF,OAAO,UAAU,mDAAmD;AACpE,OAAO,eAAe,wDAAwD;AAC9E,OAA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ACT,CAAC","sourcesContent":["import {Meta, StoryFn} from '@storybook/react';\n\nimport {blockTransform, yfmTransform} from '../../.storybook/utils';\nimport Author from '../components/Author/Author';\nimport ContentList from '../components/ContentList/ContentList';\nimport MetaInfo from '../components/MetaInfo/MetaInfo';\nimport Title from '../components/Title/Title';\nimport YFMWrapper from '../components/YFMWrapper/YFMWrapper';\nimport {AuthorType, ContentListProps, CustomBlock, TitleItemProps} from '../models';\n\nimport authorData from '../components/Author/__stories__/data.json';\nimport contentListData from '../components/ContentList/__stories__/data.json';\nimport metaInfoData from '../components/MetaInfo/__stories__/data.json';\nimport titleData from '../components/Title/__stories__/data.json';\nimport yfmWrapperData from '../components/YFMWrapper/__stories__/data.json';\n\nexport default {title: 'Lab/Tokenization/Components/Text'} as Meta;\n\nconst defaultTitleArgs = {\n title: titleData.default.title as TitleItemProps,\n subtitle: yfmTransform(titleData.default.subtitle),\n};\n\nconst transformContentList = (item: unknown) =>\n blockTransform(item as unknown as CustomBlock) as ContentListProps;\n\nexport const Default: StoryFn = () => (\n <div style={{padding: '40px', display: 'flex', flexDirection: 'column', gap: '48px'}}>\n <section>\n <strong>Title — default</strong>\n <Title {...defaultTitleArgs} />\n </section>\n <section>\n <strong>Title — sizes (l → xs)</strong>\n <div>\n {Object.entries(titleData.sizes).map(([size, props]) => (\n <div key={size} style={{paddingBottom: '32px'}}>\n <Title {...defaultTitleArgs} title={props as TitleItemProps} />\n </div>\n ))}\n </div>\n </section>\n <section>\n <strong>Title — with link</strong>\n <Title {...defaultTitleArgs} title={titleData.titleLink.title as TitleItemProps} />\n </section>\n <section>\n <strong>YFMWrapper</strong>\n <YFMWrapper {...yfmWrapperData.default.content} />\n </section>\n <section>\n <strong>Author — column</strong>\n <Author {...authorData.default.content} />\n </section>\n <section>\n <strong>Author — line</strong>\n <Author {...authorData.default.content} type={AuthorType.Line} />\n </section>\n <section>\n <strong>ContentList — default</strong>\n <ContentList {...transformContentList(contentListData.default)} />\n </section>\n <section>\n <strong>ContentList — without icon</strong>\n <ContentList {...transformContentList(contentListData.withoutIcon)} />\n </section>\n <section>\n <strong>ContentList — sizes (s / m / l)</strong>\n <div style={{display: 'flex', flexDirection: 'column', gap: '16px'}}>\n {contentListData.sizes.map((item, index) => (\n <ContentList key={index} {...transformContentList(item)} />\n ))}\n </div>\n </section>\n <section>\n <strong>MetaInfo</strong>\n <MetaInfo {...metaInfoData.default.content} />\n </section>\n </div>\n);\n"]}
|
|
@@ -2,6 +2,7 @@ export { default as useFocus } from "./useFocus.js";
|
|
|
2
2
|
export { default as useWindowBreakpoint } from "./useWindowBreakpoint.js";
|
|
3
3
|
export { default as useMount } from "./useMount.js";
|
|
4
4
|
export { default as useHeightCalculator } from "./useHeightCalculator.js";
|
|
5
|
+
export * from "./useImageSize.js";
|
|
5
6
|
export * from "./useAnalytics.js";
|
|
6
7
|
export * from "./hubspot.js";
|
|
7
8
|
export * from "./useDeviceValue.js";
|
package/build/esm/hooks/index.js
CHANGED
|
@@ -2,6 +2,7 @@ export { default as useFocus } from "./useFocus.js";
|
|
|
2
2
|
export { default as useWindowBreakpoint } from "./useWindowBreakpoint.js";
|
|
3
3
|
export { default as useMount } from "./useMount.js";
|
|
4
4
|
export { default as useHeightCalculator } from "./useHeightCalculator.js";
|
|
5
|
+
export * from "./useImageSize.js";
|
|
5
6
|
export * from "./useAnalytics.js";
|
|
6
7
|
export * from "./hubspot.js";
|
|
7
8
|
export * from "./useDeviceValue.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"../../../src","sources":["hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,IAAI,QAAQ,EAAC,sBAAmB;AAC/C,OAAO,EAAC,OAAO,IAAI,mBAAmB,EAAC,iCAA8B;AACrE,OAAO,EAAC,OAAO,IAAI,QAAQ,EAAC,sBAAmB;AAC/C,OAAO,EAAC,OAAO,IAAI,mBAAmB,EAAC,iCAA8B;AACrE,kCAA+B;AAC/B,6BAA0B;AAC1B,oCAAiC","sourcesContent":["export {default as useFocus} from './useFocus';\nexport {default as useWindowBreakpoint} from './useWindowBreakpoint';\nexport {default as useMount} from './useMount';\nexport {default as useHeightCalculator} from './useHeightCalculator';\nexport * from './useAnalytics';\nexport * from './hubspot';\nexport * from './useDeviceValue';\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"../../../src","sources":["hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,IAAI,QAAQ,EAAC,sBAAmB;AAC/C,OAAO,EAAC,OAAO,IAAI,mBAAmB,EAAC,iCAA8B;AACrE,OAAO,EAAC,OAAO,IAAI,QAAQ,EAAC,sBAAmB;AAC/C,OAAO,EAAC,OAAO,IAAI,mBAAmB,EAAC,iCAA8B;AACrE,kCAA+B;AAC/B,kCAA+B;AAC/B,6BAA0B;AAC1B,oCAAiC","sourcesContent":["export {default as useFocus} from './useFocus';\nexport {default as useWindowBreakpoint} from './useWindowBreakpoint';\nexport {default as useMount} from './useMount';\nexport {default as useHeightCalculator} from './useHeightCalculator';\nexport * from './useImageSize';\nexport * from './useAnalytics';\nexport * from './hubspot';\nexport * from './useDeviceValue';\n"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { MediaAllProps } from "../components/Media/Media.js";
|
|
3
|
+
export declare const useImageSize: ({ onIntrinsicSizeChange, onLoad: onLoadProps, }: Pick<MediaAllProps, "onIntrinsicSizeChange"> & {
|
|
4
|
+
onLoad?: React.ReactEventHandler<HTMLImageElement>;
|
|
5
|
+
}) => {
|
|
6
|
+
imageRef: React.RefObject<HTMLImageElement>;
|
|
7
|
+
onLoad: React.ReactEventHandler<HTMLImageElement>;
|
|
8
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { useWindowWidth } from "../context/windowWidthContext/index.js";
|
|
3
|
+
export const useImageSize = ({ onIntrinsicSizeChange, onLoad: onLoadProps, }) => {
|
|
4
|
+
const windowWidth = useWindowWidth();
|
|
5
|
+
const imageRef = React.useRef(null);
|
|
6
|
+
const [imageLoaded, setImageLoaded] = React.useState(false);
|
|
7
|
+
const [imageSize, setImageSize] = React.useState(undefined);
|
|
8
|
+
const onImageSizeChange = React.useMemo(() => onIntrinsicSizeChange
|
|
9
|
+
? (image) => {
|
|
10
|
+
if (image) {
|
|
11
|
+
setImageSize((prev) => {
|
|
12
|
+
if (prev?.width === image.naturalWidth &&
|
|
13
|
+
prev?.height === image.naturalHeight) {
|
|
14
|
+
return prev;
|
|
15
|
+
}
|
|
16
|
+
return { width: image.naturalWidth, height: image.naturalHeight };
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
: undefined, [onIntrinsicSizeChange]);
|
|
21
|
+
const onLoad = React.useCallback((e) => {
|
|
22
|
+
setImageLoaded(true);
|
|
23
|
+
onImageSizeChange?.(imageRef.current);
|
|
24
|
+
onLoadProps?.(e);
|
|
25
|
+
}, [onImageSizeChange, onLoadProps]);
|
|
26
|
+
// to receive size even if the image has been loaded before hydration
|
|
27
|
+
React.useEffect(() => {
|
|
28
|
+
setImageLoaded(Boolean(imageRef.current?.complete));
|
|
29
|
+
}, []);
|
|
30
|
+
React.useEffect(() => {
|
|
31
|
+
if (imageLoaded) {
|
|
32
|
+
onImageSizeChange?.(imageRef.current);
|
|
33
|
+
}
|
|
34
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
35
|
+
}, [windowWidth, imageLoaded]);
|
|
36
|
+
React.useEffect(() => {
|
|
37
|
+
if (imageSize) {
|
|
38
|
+
onIntrinsicSizeChange?.(imageSize);
|
|
39
|
+
}
|
|
40
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
41
|
+
}, [imageSize]);
|
|
42
|
+
return {
|
|
43
|
+
imageRef,
|
|
44
|
+
onLoad,
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
//# sourceMappingURL=useImageSize.js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IAAI,CAAC,CAAC;QACrB,iBAAiB,EAAE,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QACtC,WAAW,EAAE,CAAC,CAAC,CAAC,CAAC;IACrB,CAAC,EACD,CAAC,iBAAiB,EAAE,WAAW,CAAC,CACnC,CAAC;IAEF,qEAAqE;IACrE,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACjB,cAAc,CAAC,OAAO,CAAC,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC;IACxD,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACjB,IAAI,WAAW,EAAE,CAAC;YACd,iBAAiB,EAAE,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QAC1C,CAAC;QACD,uDAAuD;IAC3D,CAAC,EAAE,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC,CAAC;IAE/B,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACjB,IAAI,SAAS,EAAE,CAAC;YACZ,qBAAqB,EAAE,CAAC,SAAS,CAAC,CAAC;QACvC,CAAC;QACD,uDAAuD;IAC3D,CAAC,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC;IAEhB,OAAO;QACH,QAAQ;QACR,MAAM;KACT,CAAC;AACN,CAAC,CAAC","sourcesContent":["import * as React from 'react';\n\nimport {MediaAllProps} from '../components/Media/Media';\nimport {useWindowWidth} from '../context/windowWidthContext';\n\nexport const useImageSize = ({\n onIntrinsicSizeChange,\n onLoad: onLoadProps,\n}: Pick<MediaAllProps, 'onIntrinsicSizeChange'> & {\n onLoad?: React.ReactEventHandler<HTMLImageElement>;\n}) => {\n const windowWidth = useWindowWidth();\n\n const imageRef = React.useRef<HTMLImageElement>(null);\n\n const [imageLoaded, setImageLoaded] = React.useState(false);\n const [imageSize, setImageSize] = React.useState<{width: number; height: number} | undefined>(\n undefined,\n );\n\n const onImageSizeChange = React.useMemo(\n () =>\n onIntrinsicSizeChange\n ? (image: HTMLImageElement | null) => {\n if (image) {\n setImageSize((prev) => {\n if (\n prev?.width === image.naturalWidth &&\n prev?.height === image.naturalHeight\n ) {\n return prev;\n }\n\n return {width: image.naturalWidth, height: image.naturalHeight};\n });\n }\n }\n : undefined,\n [onIntrinsicSizeChange],\n );\n\n const onLoad = React.useCallback<React.ReactEventHandler<HTMLImageElement>>(\n (e) => {\n setImageLoaded(true);\n onImageSizeChange?.(imageRef.current);\n onLoadProps?.(e);\n },\n [onImageSizeChange, onLoadProps],\n );\n\n // to receive size even if the image has been loaded before hydration\n React.useEffect(() => {\n setImageLoaded(Boolean(imageRef.current?.complete));\n }, []);\n\n React.useEffect(() => {\n if (imageLoaded) {\n onImageSizeChange?.(imageRef.current);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [windowWidth, imageLoaded]);\n\n React.useEffect(() => {\n if (imageSize) {\n onIntrinsicSizeChange?.(imageSize);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [imageSize]);\n\n return {\n imageRef,\n onLoad,\n };\n};\n"]}
|
|
@@ -4,7 +4,7 @@ import { GridColumnSize, GridColumnSizesType, IndentValue } from "../../grid/typ
|
|
|
4
4
|
import { ThemeSupporting } from "../../utils/index.js";
|
|
5
5
|
import { DeviceSupporting } from "../../utils/breakpoint.js";
|
|
6
6
|
import { AnalyticsEventsBase } from "../common.js";
|
|
7
|
-
import { AnchorProps, Animatable, BackgroundImageProps, ButtonProps, CardBorder, ContentSize, ContentTextSize, ContentTheme, FileLinkProps, GravityIconProps, HeaderBreadCrumbsProps, HeaderImageSize, HeaderOffset, HeaderWidth, ImageDeviceProps, ImageProps, Justify, LegendTableMarkerType, LinkProps, MapProps, MediaDirection, MediaProps, MediaView, TextSize, TextTheme, ThemedImage, ThemedMediaProps, ThemedMediaVideoProps, TitleItemBaseProps, TitleItemProps, WithBorder, YandexFormProps } from "./common.js";
|
|
7
|
+
import { AnchorProps, Animatable, BackgroundImageProps, ButtonProps, CardBorder, ContentSize, ContentTextSize, ContentTheme, FileLinkProps, GravityIconProps, HeaderBreadCrumbsProps, HeaderImageSize, HeaderOffset, HeaderWidth, ImageDeviceProps, ImageProps, Justify, LegendTableMarkerType, LinkProps, MapProps, MediaComponentImageProps, MediaComponentVideoProps, MediaDirection, MediaProps, MediaView, TextSize, TextTheme, ThemedImage, ThemedMediaProps, ThemedMediaVideoProps, TitleItemBaseProps, TitleItemProps, WithBorder, YandexFormProps } from "./common.js";
|
|
8
8
|
import { BannerCardProps, HubspotFormProps, SubBlock, SubBlockModels } from "./sub-blocks.js";
|
|
9
9
|
export declare enum BlockType {
|
|
10
10
|
PromoFeaturesBlock = "promo-features-block",
|
|
@@ -22,6 +22,7 @@ export declare enum BlockType {
|
|
|
22
22
|
TabsBlock = "tabs-block",
|
|
23
23
|
HeaderSliderBlock = "header-slider-block",
|
|
24
24
|
HeaderBlock = "header-block",
|
|
25
|
+
HeroBlock = "hero-block",
|
|
25
26
|
IconsBlock = "icons-block",
|
|
26
27
|
CardLayoutBlock = "card-layout-block",
|
|
27
28
|
ContentLayoutBlock = "content-layout-block",
|
|
@@ -144,7 +145,22 @@ export interface HeaderBlockProps {
|
|
|
144
145
|
status?: JSX.Element;
|
|
145
146
|
renderTitle?: (title: string) => React.ReactNode;
|
|
146
147
|
}
|
|
147
|
-
export interface
|
|
148
|
+
export interface HeroBlockBackground extends Partial<MediaComponentImageProps>, Partial<MediaComponentVideoProps> {
|
|
149
|
+
color?: string;
|
|
150
|
+
}
|
|
151
|
+
export interface HeroBlockMedia extends Partial<MediaProps> {
|
|
152
|
+
roundCorners?: boolean;
|
|
153
|
+
}
|
|
154
|
+
export interface HeroBlockProps extends Pick<ContentBlockProps, 'title' | 'text' | 'list' | 'additionalInfo' | 'links' | 'theme'> {
|
|
155
|
+
breadcrumbs?: HeaderBreadCrumbsProps;
|
|
156
|
+
overtitle?: string | JSX.Element;
|
|
157
|
+
buttons?: ThemeSupporting<Pick<ButtonProps, 'url' | 'text' | 'theme' | 'primary' | 'extraProps'> | React.ReactNode>[];
|
|
158
|
+
media?: ThemeSupporting<HeroBlockMedia>;
|
|
159
|
+
fullWidth?: boolean;
|
|
160
|
+
verticalOffset?: 's' | 'm' | 'l' | 'xl';
|
|
161
|
+
background?: ThemeSupporting<HeroBlockBackground>;
|
|
162
|
+
}
|
|
163
|
+
export interface ExtendedFeaturesItem extends Omit<ContentBlockProps, 'theme' | 'centered' | 'colSizes' | 'size' | 'title'> {
|
|
148
164
|
title: string;
|
|
149
165
|
label?: string;
|
|
150
166
|
icon?: ThemedImage;
|
|
@@ -176,7 +192,7 @@ export interface QuestionItem {
|
|
|
176
192
|
link?: LinkProps;
|
|
177
193
|
onClick?: (index: number, newOpenState: boolean) => void;
|
|
178
194
|
}
|
|
179
|
-
export interface QuestionsProps extends Omit<ContentBlockProps, 'colSizes' | 'centered' | 'size' | 'theme'
|
|
195
|
+
export interface QuestionsProps extends Omit<ContentBlockProps, 'colSizes' | 'centered' | 'size' | 'theme'> {
|
|
180
196
|
items: QuestionItem[];
|
|
181
197
|
}
|
|
182
198
|
export interface QuestionBlockItemProps extends QuestionItem {
|
|
@@ -189,7 +205,7 @@ export interface FoldableListItem {
|
|
|
189
205
|
listStyle?: 'dash' | 'disk';
|
|
190
206
|
link?: LinkProps;
|
|
191
207
|
}
|
|
192
|
-
export interface FoldableListProps extends Omit<ContentBlockProps, 'colSizes' | 'centered' | 'size' | 'theme'
|
|
208
|
+
export interface FoldableListProps extends Omit<ContentBlockProps, 'colSizes' | 'centered' | 'size' | 'theme'> {
|
|
193
209
|
items: FoldableListItem[];
|
|
194
210
|
}
|
|
195
211
|
export interface FoldableListBlockItemProps extends FoldableListItem {
|
|
@@ -210,7 +226,7 @@ export interface MediaBaseBlockProps extends Animatable, MediaContentProps {
|
|
|
210
226
|
mediaOnly?: boolean;
|
|
211
227
|
mediaOnlyColSizes?: GridColumnSizesType;
|
|
212
228
|
}
|
|
213
|
-
export interface MediaContentProps extends Omit<ContentBlockProps, 'colSizes' | 'text' | 'theme' | 'centered'
|
|
229
|
+
export interface MediaContentProps extends Omit<ContentBlockProps, 'colSizes' | 'text' | 'theme' | 'centered'> {
|
|
214
230
|
description?: string;
|
|
215
231
|
/** @deprecated Use array of buttons from ContentBlockProps instead**/
|
|
216
232
|
button?: ButtonProps;
|
|
@@ -232,8 +248,8 @@ export interface InfoBlockProps {
|
|
|
232
248
|
sectionsTitle?: string;
|
|
233
249
|
/** @deprecated **/
|
|
234
250
|
links?: Pick<LinkProps, 'text' | 'url'>[];
|
|
235
|
-
leftContent?: Omit<ContentBlockProps, 'colSizes' | 'theme' | 'size'
|
|
236
|
-
rightContent?: Omit<ContentBlockProps, 'colSizes' | 'theme' | 'size'
|
|
251
|
+
leftContent?: Omit<ContentBlockProps, 'colSizes' | 'theme' | 'size'>;
|
|
252
|
+
rightContent?: Omit<ContentBlockProps, 'colSizes' | 'theme' | 'size'>;
|
|
237
253
|
}
|
|
238
254
|
export interface TableProps {
|
|
239
255
|
content: string[][];
|
|
@@ -250,7 +266,7 @@ export interface TableBlockProps {
|
|
|
250
266
|
title: string;
|
|
251
267
|
table: TableProps;
|
|
252
268
|
}
|
|
253
|
-
export interface TabsBlockItem extends Omit<ContentBlockProps, 'size' | 'colSizes' | 'centered' | 'theme'
|
|
269
|
+
export interface TabsBlockItem extends Omit<ContentBlockProps, 'size' | 'colSizes' | 'centered' | 'theme'>, WithBorder {
|
|
254
270
|
tabName: string;
|
|
255
271
|
/**
|
|
256
272
|
* @deprecated Use array links from ContentBlockProps instead
|
|
@@ -317,7 +333,7 @@ interface ContentLayoutBlockParams {
|
|
|
317
333
|
textWidth?: ContentTextSize;
|
|
318
334
|
}
|
|
319
335
|
export interface ContentLayoutBlockProps extends ContentLayoutBlockParams {
|
|
320
|
-
textContent:
|
|
336
|
+
textContent: ContentBlockProps;
|
|
321
337
|
fileContent?: FileLinkProps[];
|
|
322
338
|
}
|
|
323
339
|
export type SVGIcon = (props: React.SVGProps<SVGSVGElement>) => React.ReactNode;
|
|
@@ -332,16 +348,6 @@ export interface ContentListProps {
|
|
|
332
348
|
size: ContentSize;
|
|
333
349
|
theme?: ContentTheme;
|
|
334
350
|
}
|
|
335
|
-
export interface ContentLabelProps {
|
|
336
|
-
text: string;
|
|
337
|
-
icon?: ThemeSupporting<ImageProps | SVGIcon>;
|
|
338
|
-
gravityIcon?: ThemeSupporting<GravityIconProps>;
|
|
339
|
-
}
|
|
340
|
-
export interface ContentLabelsProps {
|
|
341
|
-
labels: ContentLabelProps[];
|
|
342
|
-
size?: ContentSize;
|
|
343
|
-
theme?: ContentTheme;
|
|
344
|
-
}
|
|
345
351
|
export interface ContentBlockProps {
|
|
346
352
|
title?: TitleItemBaseProps | string;
|
|
347
353
|
titleId?: string;
|
|
@@ -349,13 +355,12 @@ export interface ContentBlockProps {
|
|
|
349
355
|
textId?: string;
|
|
350
356
|
additionalInfo?: string;
|
|
351
357
|
links?: LinkProps[];
|
|
352
|
-
buttons?: ButtonProps[];
|
|
358
|
+
buttons?: (ButtonProps | React.ReactNode)[];
|
|
353
359
|
size?: ContentSize;
|
|
354
360
|
colSizes?: GridColumnSizesType;
|
|
355
361
|
centered?: boolean;
|
|
356
362
|
theme?: ContentTheme;
|
|
357
363
|
list?: ContentItemProps[];
|
|
358
|
-
labels?: ContentLabelProps[];
|
|
359
364
|
controlPosition?: 'default' | 'bottom';
|
|
360
365
|
}
|
|
361
366
|
export declare enum PCShareSocialNetwork {
|
|
@@ -395,10 +400,14 @@ export interface FormBlockProps {
|
|
|
395
400
|
direction?: FormBlockDirection;
|
|
396
401
|
background?: ThemeSupporting<FormBlockBackgroundProps>;
|
|
397
402
|
customFormNode?: React.ReactNode;
|
|
403
|
+
additionalContentNode?: React.ReactNode;
|
|
398
404
|
}
|
|
399
405
|
export type HeaderBlockModel = {
|
|
400
406
|
type: BlockType.HeaderBlock;
|
|
401
407
|
} & HeaderBlockProps;
|
|
408
|
+
export type HeroBlockModel = {
|
|
409
|
+
type: BlockType.HeroBlock;
|
|
410
|
+
} & HeroBlockProps;
|
|
402
411
|
export type SliderOldBlockModel = {
|
|
403
412
|
type: BlockType.SliderOldBlock;
|
|
404
413
|
} & SliderOldProps;
|
|
@@ -459,6 +468,6 @@ export type FormBlockModel = {
|
|
|
459
468
|
export type SliderBlockModel = {
|
|
460
469
|
type: BlockType.SliderBlock;
|
|
461
470
|
} & SliderProps;
|
|
462
|
-
type BlockModels = SliderOldBlockModel | SliderBlockModel | ExtendedFeaturesBlockModel | PromoFeaturesBlockModel | QuestionsBlockModel | FoldableListBlockModel | BannerBlockModel | CompaniesBlockModel | MediaBlockModel | MapBlockModel | InfoBlockModel | TableBlockModel | TabsBlockModel | HeaderBlockModel | IconsBlockModel | HeaderSliderBlockModel | CardLayoutBlockModel | ContentLayoutBlockModel | ShareBLockModel | FilterBlockModel | FormBlockModel;
|
|
471
|
+
type BlockModels = SliderOldBlockModel | SliderBlockModel | ExtendedFeaturesBlockModel | PromoFeaturesBlockModel | QuestionsBlockModel | FoldableListBlockModel | BannerBlockModel | CompaniesBlockModel | MediaBlockModel | MapBlockModel | InfoBlockModel | TableBlockModel | TabsBlockModel | HeaderBlockModel | HeroBlockModel | IconsBlockModel | HeaderSliderBlockModel | CardLayoutBlockModel | ContentLayoutBlockModel | ShareBLockModel | FilterBlockModel | FormBlockModel;
|
|
463
472
|
export type Block = BlockModels & BlockBaseProps;
|
|
464
473
|
export {};
|
|
@@ -15,6 +15,7 @@ export var BlockType;
|
|
|
15
15
|
BlockType["TabsBlock"] = "tabs-block";
|
|
16
16
|
BlockType["HeaderSliderBlock"] = "header-slider-block";
|
|
17
17
|
BlockType["HeaderBlock"] = "header-block";
|
|
18
|
+
BlockType["HeroBlock"] = "hero-block";
|
|
18
19
|
BlockType["IconsBlock"] = "icons-block";
|
|
19
20
|
BlockType["CardLayoutBlock"] = "card-layout-block";
|
|
20
21
|
BlockType["ContentLayoutBlock"] = "content-layout-block";
|
|
@@ -24,7 +25,11 @@ export var BlockType;
|
|
|
24
25
|
BlockType["FormBlock"] = "form-block";
|
|
25
26
|
})(BlockType || (BlockType = {}));
|
|
26
27
|
export const BlockTypes = Object.values(BlockType);
|
|
27
|
-
export const HeaderBlockTypes = [
|
|
28
|
+
export const HeaderBlockTypes = [
|
|
29
|
+
BlockType.HeaderBlock,
|
|
30
|
+
BlockType.HeaderSliderBlock,
|
|
31
|
+
BlockType.HeroBlock,
|
|
32
|
+
];
|
|
28
33
|
export var SliderBreakpointNames;
|
|
29
34
|
(function (SliderBreakpointNames) {
|
|
30
35
|
SliderBreakpointNames["Sm"] = "sm";
|
|
@@ -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;AA4VD,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 onClick?: (index: number, newOpenState: boolean) => void;\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"]}
|
|
1
|
+
{"version":3,"file":"blocks.js","sourceRoot":"../../../../src","sources":["models/constructor-items/blocks.ts"],"names":[],"mappings":"AA+CA,MAAM,CAAN,IAAY,SAwBX;AAxBD,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,qCAAwB,CAAA;IACxB,uCAA0B,CAAA;IAC1B,kDAAqC,CAAA;IACrC,wDAA2C,CAAA;IAC3C,uCAA0B,CAAA;IAC1B,mCAAsB,CAAA;IACtB,yCAA4B,CAAA;IAC5B,qCAAwB,CAAA;AAC5B,CAAC,EAxBW,SAAS,KAAT,SAAS,QAwBpB;AAED,MAAM,CAAC,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;AACnD,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC5B,SAAS,CAAC,WAAW;IACrB,SAAS,CAAC,iBAAiB;IAC3B,SAAS,CAAC,SAAS;CACtB,CAAC;AAgCF,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;AAuWD,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 MediaComponentImageProps,\n MediaComponentVideoProps,\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 HeroBlock = 'hero-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 = [\n BlockType.HeaderBlock,\n BlockType.HeaderSliderBlock,\n BlockType.HeroBlock,\n];\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 HeroBlockBackground\n extends Partial<MediaComponentImageProps>,\n Partial<MediaComponentVideoProps> {\n color?: string;\n}\n\nexport interface HeroBlockMedia extends Partial<MediaProps> {\n roundCorners?: boolean;\n}\n\nexport interface HeroBlockProps\n extends Pick<\n ContentBlockProps,\n 'title' | 'text' | 'list' | 'additionalInfo' | 'links' | 'theme'\n > {\n breadcrumbs?: HeaderBreadCrumbsProps;\n // TODO: add overtitle to ContentProps\n overtitle?: string | JSX.Element;\n buttons?: ThemeSupporting<\n Pick<ButtonProps, 'url' | 'text' | 'theme' | 'primary' | 'extraProps'> | React.ReactNode\n >[];\n media?: ThemeSupporting<HeroBlockMedia>;\n fullWidth?: boolean;\n verticalOffset?: 's' | 'm' | 'l' | 'xl';\n background?: ThemeSupporting<HeroBlockBackground>;\n}\n\nexport interface ExtendedFeaturesItem\n extends Omit<ContentBlockProps, 'theme' | 'centered' | 'colSizes' | 'size' | 'title'> {\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 onClick?: (index: number, newOpenState: boolean) => void;\n}\n\nexport interface QuestionsProps\n extends Omit<ContentBlockProps, 'colSizes' | 'centered' | 'size' | 'theme'> {\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'> {\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'> {\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'>;\n rightContent?: Omit<ContentBlockProps, 'colSizes' | 'theme' | 'size'>;\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'>,\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: ContentBlockProps;\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 ContentBlockProps {\n title?: TitleItemBaseProps | string;\n titleId?: string;\n text?: string;\n textId?: string;\n additionalInfo?: string;\n links?: LinkProps[];\n buttons?: (ButtonProps | React.ReactNode)[];\n size?: ContentSize;\n colSizes?: GridColumnSizesType;\n centered?: boolean;\n theme?: ContentTheme;\n list?: ContentItemProps[];\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 additionalContentNode?: React.ReactNode;\n}\n\n//block models\nexport type HeaderBlockModel = {\n type: BlockType.HeaderBlock;\n} & HeaderBlockProps;\n\nexport type HeroBlockModel = {\n type: BlockType.HeroBlock;\n} & HeroBlockProps;\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 | HeroBlockModel\n | IconsBlockModel\n | HeaderSliderBlockModel\n | CardLayoutBlockModel\n | ContentLayoutBlockModel\n | ShareBLockModel\n | FilterBlockModel\n | FormBlockModel;\n\nexport type Block = BlockModels & BlockBaseProps;\n"]}
|
|
@@ -59,7 +59,7 @@ export type LegendTableMarkerType = 'disk' | 'tick';
|
|
|
59
59
|
export type LinkTheme = 'file-link' | 'normal' | 'back' | 'underline';
|
|
60
60
|
export type MediaDirection = 'media-content' | 'content-media';
|
|
61
61
|
export type PriceDescriptionColor = 'cornflower' | 'black';
|
|
62
|
-
export type ContentSize = 's' | 'm' | 'l';
|
|
62
|
+
export type ContentSize = 's' | 'm' | 'l' | 'xl';
|
|
63
63
|
export type ContentTextSize = 's' | 'm' | 'l';
|
|
64
64
|
export type ContentTheme = 'default' | 'dark' | 'light';
|
|
65
65
|
export type FileLinkType = 'vertical' | 'horizontal';
|