@gravity-ui/page-constructor 8.14.2 → 8.16.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.
Files changed (75) hide show
  1. package/README.md +31 -9
  2. package/build/cjs/components/ReactPlayer/ReactPlayer.css +0 -50
  3. package/build/cjs/components/ReactPlayer/ReactPlayer.js +4 -16
  4. package/build/cjs/components/ReactPlayer/ReactPlayer.js.map +1 -1
  5. package/build/cjs/components/VideoBlock/VideoBlock.css +0 -30
  6. package/build/cjs/components/VideoBlock/VideoBlock.d.ts +2 -1
  7. package/build/cjs/components/VideoBlock/VideoBlock.js +18 -2
  8. package/build/cjs/components/VideoBlock/VideoBlock.js.map +1 -1
  9. package/build/cjs/components/VideoButton/VideoButton.css +64 -0
  10. package/build/cjs/components/VideoButton/VideoButton.d.ts +9 -0
  11. package/build/cjs/components/VideoButton/VideoButton.js +50 -0
  12. package/build/cjs/components/VideoButton/VideoButton.js.map +1 -0
  13. package/build/cjs/context/projectSettingsContext/ProjectSettingsContext.d.ts +7 -0
  14. package/build/cjs/context/projectSettingsContext/ProjectSettingsContext.js.map +1 -1
  15. package/build/cjs/models/constructor-items/common.d.ts +8 -1
  16. package/build/cjs/models/constructor-items/common.js +1 -0
  17. package/build/cjs/models/constructor-items/common.js.map +1 -1
  18. package/build/docs/INDEX.md +191 -0
  19. package/build/docs/blocks/Banner.md +59 -0
  20. package/build/docs/blocks/CardLayout.md +79 -0
  21. package/build/docs/blocks/Companies.md +67 -0
  22. package/build/docs/blocks/ContentLayout.md +54 -0
  23. package/build/docs/blocks/ExtendedFeatures.md +74 -0
  24. package/build/docs/blocks/FilterBlock.md +112 -0
  25. package/build/docs/blocks/FoldableList.md +78 -0
  26. package/build/docs/blocks/Footer.md +110 -0
  27. package/build/docs/blocks/Form.md +89 -0
  28. package/build/docs/blocks/Header.md +70 -0
  29. package/build/docs/blocks/HeaderSlider.md +70 -0
  30. package/build/docs/blocks/Hero.md +67 -0
  31. package/build/docs/blocks/Icons.md +61 -0
  32. package/build/docs/blocks/Info.md +73 -0
  33. package/build/docs/blocks/Map.md +81 -0
  34. package/build/docs/blocks/Media.md +63 -0
  35. package/build/docs/blocks/PromoFeaturesBlock.md +74 -0
  36. package/build/docs/blocks/Questions.md +78 -0
  37. package/build/docs/blocks/Share.md +45 -0
  38. package/build/docs/blocks/Slider.md +89 -0
  39. package/build/docs/blocks/SliderOld.md +63 -0
  40. package/build/docs/blocks/Table.md +64 -0
  41. package/build/docs/blocks/Tabs.md +92 -0
  42. package/build/docs/guides/data-preparation-ru.md +257 -0
  43. package/build/docs/guides/data-preparation.md +259 -0
  44. package/build/docs/sub-blocks/BackgroundCard.md +63 -0
  45. package/build/docs/sub-blocks/BannerCard.md +57 -0
  46. package/build/docs/sub-blocks/BasicCard.md +60 -0
  47. package/build/docs/sub-blocks/Content.md +58 -0
  48. package/build/docs/sub-blocks/Divider.md +47 -0
  49. package/build/docs/sub-blocks/HubspotForm.md +47 -0
  50. package/build/docs/sub-blocks/ImageCard.md +59 -0
  51. package/build/docs/sub-blocks/LayoutItem.md +70 -0
  52. package/build/docs/sub-blocks/MediaCard.md +66 -0
  53. package/build/docs/sub-blocks/PriceCard.md +60 -0
  54. package/build/docs/sub-blocks/PriceDetailed.md +74 -0
  55. package/build/docs/sub-blocks/Quote.md +74 -0
  56. package/build/esm/components/ReactPlayer/ReactPlayer.css +0 -50
  57. package/build/esm/components/ReactPlayer/ReactPlayer.js +4 -16
  58. package/build/esm/components/ReactPlayer/ReactPlayer.js.map +1 -1
  59. package/build/esm/components/VideoBlock/VideoBlock.css +0 -30
  60. package/build/esm/components/VideoBlock/VideoBlock.d.ts +2 -1
  61. package/build/esm/components/VideoBlock/VideoBlock.js +19 -3
  62. package/build/esm/components/VideoBlock/VideoBlock.js.map +1 -1
  63. package/build/esm/components/VideoButton/VideoButton.css +64 -0
  64. package/build/esm/components/VideoButton/VideoButton.d.ts +10 -0
  65. package/build/esm/components/VideoButton/VideoButton.js +48 -0
  66. package/build/esm/components/VideoButton/VideoButton.js.map +1 -0
  67. package/build/esm/context/projectSettingsContext/ProjectSettingsContext.d.ts +7 -0
  68. package/build/esm/context/projectSettingsContext/ProjectSettingsContext.js.map +1 -1
  69. package/build/esm/models/constructor-items/common.d.ts +8 -1
  70. package/build/esm/models/constructor-items/common.js +1 -0
  71. package/build/esm/models/constructor-items/common.js.map +1 -1
  72. package/package.json +3 -2
  73. package/server/models/constructor-items/common.d.ts +8 -1
  74. package/server/models/constructor-items/common.js +1 -0
  75. package/widget/index.js +1 -1
@@ -0,0 +1,67 @@
1
+ # Hero
2
+
3
+ Renders a modern, content-driven hero block: an overtitle, a rich content column (title, body text, list, links, buttons) and a media column (image/video/iframe) that adapts to its intrinsic aspect ratio. Use it as the primary landing block when you want more layout flexibility than the classic Header provides.
4
+
5
+ ## Block type
6
+
7
+ `type: 'hero-block'`
8
+
9
+ ## When to use
10
+
11
+ - Top-of-page hero with a richer content column (lists, additional info, links).
12
+ - When media should intelligently switch between horizontal and vertical orientation based on its aspect ratio.
13
+ - When you need a colored or media background that can be full-width or contained.
14
+
15
+ ## Example
16
+
17
+ ```json
18
+ {
19
+ "type": "hero-block",
20
+ "overtitle": "Overtitle",
21
+ "title": "Lorem ipsum dolor",
22
+ "text": "**Ut enim ad minim veniam** [quis nostrud](https://example.com) exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.",
23
+ "additionalInfo": "Duis aute irure dolor in reprehenderit in voluptate velit esse.",
24
+ "buttons": [
25
+ {"text": "Primary", "theme": "action", "url": "https://example.com"},
26
+ {"text": "Secondary", "theme": "outlined", "url": "https://example.com"}
27
+ ],
28
+ "media": {
29
+ "light": {"image": "/images/hero-light.png"},
30
+ "dark": {"image": "/images/hero-dark.png"}
31
+ }
32
+ }
33
+ ```
34
+
35
+ ## Properties
36
+
37
+ | Property | Type | Default | Description |
38
+ | ------------------ | -------------------------------------------------------- | ----------- | ----------------------------------------------------------------------------------------------------------- |
39
+ | `title` _required_ | `string \| TitleProps` | — | Main heading. A string or a `TitleProps` object (`text`, `textSize`, `url`, `urlTitle`, `analyticsEvents`). |
40
+ | `text` | `string` | — | YFM body content rendered below the title. |
41
+ | `additionalInfo` | `string` | — | YFM supplementary text under the body. |
42
+ | `links` | `LinkProps[]` | — | Inline text links rendered below the content. |
43
+ | `list` | `ContentItem[]` | — | Bullet-style list; each item has `title`, `text`, and an `icon`/`gravityIcon`. |
44
+ | `theme` | `'default' \| 'light' \| 'dark'` | `'default'` | Color theme; `default` follows the runtime theme, `light`/`dark` force a monochrome scheme. |
45
+ | `overtitle` | `string` | — | Small label rendered above the title. |
46
+ | `buttons` | `HeroButton[] \| {light, dark}[]` | — | CTA buttons. Each requires `text` + `url` and supports `theme`, `primary`, `size`, `extraProps`. |
47
+ | `media` | `MediaProps & {roundCorners?: boolean} \| {light, dark}` | — | Media column (image/video/youtube/iframe/dataLens). `roundCorners` defaults to `true`. |
48
+ | `fullWidth` | `boolean` | `false` | Extends the background to the full viewport width. |
49
+ | `verticalOffset` | `'s' \| 'm' \| 'l' \| 'xl'` | `'m'` | Vertical spacing around the content. |
50
+ | `background` | `HeroBackground \| {light, dark}` | — | Background color and/or media behind the block. |
51
+ | `breadcrumbs` | `{items: {url, text}[], theme?}` | — | Breadcrumb navigation rendered above the content. |
52
+
53
+ `HeroBackground` accepts `image`, `video`, `parallax`, `height`, `ratio`, `previewImg` (from `MediaProps`) plus `color`.
54
+
55
+ `ContentItem` requires either `icon` or `gravityIcon` and supports `title`/`text`.
56
+
57
+ ### Common properties
58
+
59
+ Inherits common block properties: `anchor`, `visible`, `indent` (`{top?, bottom?}`), `qa`, `className`, `animated`, `theme` (`'light' | 'dark'`), `when`, `context`. See the root README for details.
60
+
61
+ ## Themed values
62
+
63
+ `buttons`, `media`, and `background` each accept either a plain value or a `{light, dark}` object resolved against the active runtime theme.
64
+
65
+ ## Storybook
66
+
67
+ [Hero](https://preview.gravity-ui.com/page-constructor/?path=/docs/blocks-hero--docs)
@@ -0,0 +1,61 @@
1
+ # Icons
2
+
3
+ Renders a responsive grid of small icon items, each consisting of an image and a caption. Items can optionally be wrapped in links, turning the grid into a navigable set of icon links.
4
+
5
+ ## Block type
6
+
7
+ `type: 'icons-block'`
8
+
9
+ ## When to use
10
+
11
+ - Compact grids of icon + label pairs (e.g. feature highlights, category links, value props).
12
+ - Quick-link hubs where each entry is a small graphic and a short caption.
13
+ - Sections that need a plain title/description header followed by an icon row.
14
+
15
+ ## Example
16
+
17
+ ```json
18
+ {
19
+ "type": "icons-block",
20
+ "title": "Icons block title",
21
+ "description": "**Ut enim ad minim veniam** [quis nostrud](https://example.com) exercitation.",
22
+ "size": "s",
23
+ "items": [
24
+ {"src": "/images/icon-1.svg", "text": "Lorem ipsum dolor sit amet", "url": "#"},
25
+ {"src": "/images/icon-2.svg", "text": "Lorem ipsum dolor sit amet", "url": "#"},
26
+ {"src": "/images/icon-3.svg", "text": "Lorem ipsum dolor sit amet", "url": "#"}
27
+ ]
28
+ }
29
+ ```
30
+
31
+ ## Properties
32
+
33
+ | Property | Type | Default | Description |
34
+ | ------------------ | ---------------------------- | ----------- | ------------------------------------------------------ |
35
+ | `items` _required_ | `IconsBlockItem[]` | — | Array of icon items. See below. |
36
+ | `size` _required_ | `'s' \| 'm' \| 'l'` | `'s'` | Controls the rendered item/grid scale. |
37
+ | `title` | `string` | — | Optional section heading (plain text). |
38
+ | `description` | `string` | — | Optional plain-text subtitle rendered under the title. |
39
+ | `colSizes` | `{sm?, md?, lg?, xl?, all?}` | `{all: 12}` | Grid column sizes for the optional header. |
40
+ | `animated` | `boolean` | — | Enables an entrance animation. |
41
+
42
+ ### `items[]`
43
+
44
+ | Property | Type | Default | Description |
45
+ | ----------------- | ------------------------------------ | ------- | ---------------------------------------------------------------------------- |
46
+ | `url` _required_ | `string` | — | If present, the item is rendered as a link wrapping the icon and text. |
47
+ | `text` _required_ | `string` | — | Caption rendered under the icon; also used as the link `aria-label`/`title`. |
48
+ | `src` _required_ | `string \| {light, dark}` | — | Icon image URL. |
49
+ | `analyticsEvents` | `AnalyticsEvent \| AnalyticsEvent[]` | — | Analytics events fired when the item link is clicked. |
50
+
51
+ ### Common properties
52
+
53
+ Inherits: `anchor`, `visible`, `indent` (`{top?, bottom?}`), `qa`, `className`, `animated`, `when`, `context`. See the root README for details.
54
+
55
+ ## Themed values
56
+
57
+ Each item's `src` accepts either a plain URL string or a `{light, dark}` object resolved against the active runtime theme.
58
+
59
+ ## Storybook
60
+
61
+ [Icons](https://preview.gravity-ui.com/page-constructor/?path=/docs/blocks-icons--docs)
@@ -0,0 +1,73 @@
1
+ # Info
2
+
3
+ Renders a two-column information section: a left content column and a right content column, each with its own title, text, lists, buttons, and links, placed inside an optional themed background container.
4
+
5
+ ## Block type
6
+
7
+ `type: 'info-block'`
8
+
9
+ ## When to use
10
+
11
+ - Side-by-side information panels that share a background but present distinct content (e.g. summary vs. details).
12
+ - Sections needing a colored/themed container wrapping two `Content`-style columns.
13
+ - When you want independent buttons, links, and bullet lists per column.
14
+
15
+ ## Example
16
+
17
+ ```json
18
+ {
19
+ "type": "info-block",
20
+ "theme": "dark",
21
+ "backgroundColor": {"light": "#eef3fe", "dark": "#000000"},
22
+ "leftContent": {
23
+ "title": "Lorem ipsum dolor sit amet",
24
+ "text": "**Ut enim ad minim veniam** [quis nostrud](https://example.com) exercitation.",
25
+ "buttons": [
26
+ {"text": "Button", "theme": "raised", "url": "#"},
27
+ {"text": "Button", "theme": "outlined-contrast", "url": "#"}
28
+ ]
29
+ },
30
+ "rightContent": {
31
+ "title": "Lorem ipsum dolor sit amet",
32
+ "text": "**Ut enim ad minim veniam** [quis nostrud](https://example.com) exercitation.",
33
+ "links": [{"url": "#", "text": "Link", "theme": "normal", "arrow": true}]
34
+ }
35
+ }
36
+ ```
37
+
38
+ ## Properties
39
+
40
+ | Property | Type | Default | Description |
41
+ | ---------------------------- | ------------------------- | -------- | ------------------------------------------------------------------------------------------------- |
42
+ | `leftContent` | `ContentProps` | — | Left column content. See below. |
43
+ | `rightContent` | `ContentProps` | — | Right column content. See below. |
44
+ | `backgroundColor` | `string \| {light, dark}` | — | Background color of the container. |
45
+ | `theme` | `'light' \| 'dark'` | `'dark'` | Text/content theme used inside the columns. |
46
+ | `title` _deprecated_ | `string` | — | Legacy left-column title; prefer `leftContent.title`. |
47
+ | `sectionsTitle` _deprecated_ | `string` | — | Legacy right-column title; prefer `rightContent.title`. |
48
+ | `buttons` _deprecated_ | `ButtonBlock[]` | `[]` | Legacy buttons appended to the left column; prefer `leftContent.buttons`. |
49
+ | `links` _deprecated_ | `LinkProps[]` | `[]` | Legacy links appended to the right column (rendered as arrow links); prefer `rightContent.links`. |
50
+
51
+ ### `leftContent` / `rightContent` (`ContentProps`)
52
+
53
+ | Property | Type | Default | Description |
54
+ | ----------------- | ----------------------- | ------- | ---------------------------------------------------------------------------------------------- |
55
+ | `title` | `string \| TitleProps` | — | Column heading. |
56
+ | `text` | `string` | — | YFM body text. |
57
+ | `additionalInfo` | `string` | — | YFM supplementary text below the body. |
58
+ | `links` | `LinkProps[]` | — | Inline text links. |
59
+ | `buttons` | `ButtonBlock[]` | — | CTA buttons. |
60
+ | `list` | `ContentItem[]` | — | Bullet-style list with optional icons per item (`icon` or `gravityIcon`, plus `title`/`text`). |
61
+ | `controlPosition` | `'default' \| 'bottom'` | — | Vertical placement of buttons/links. |
62
+
63
+ ### Common properties
64
+
65
+ Inherits: `when`. See the root README for details. (This block does not expose `anchor`, `visible`, `indent`, `animated`, or `context`.)
66
+
67
+ ## Themed values
68
+
69
+ `backgroundColor` accepts either a plain color string or a `{light, dark}` object resolved against the active runtime theme.
70
+
71
+ ## Storybook
72
+
73
+ [Info](https://preview.gravity-ui.com/page-constructor/?path=/docs/blocks-info--docs)
@@ -0,0 +1,81 @@
1
+ # Map
2
+
3
+ A media-and-content block that embeds an interactive Yandex Map inside a card, paired with an optional title, description, links, and buttons.
4
+
5
+ ## Block type
6
+
7
+ `type: 'map-block'`
8
+
9
+ ## When to use
10
+
11
+ - You need to show one or more geographic points with an interactive map.
12
+ - You want a titled, bordered map card next to marketing copy and CTAs.
13
+ - You want a responsive `media-content` / `content-media` layout.
14
+
15
+ ## Example
16
+
17
+ ```json
18
+ {
19
+ "type": "map-block",
20
+ "title": "Our office",
21
+ "description": "**Ut enim ad minim veniam** [quis nostrud](https://example.com) exercitation ullamco laboris.",
22
+ "direction": "content-media",
23
+ "map": {
24
+ "zoom": 9,
25
+ "id": "common-places",
26
+ "markers": [
27
+ {
28
+ "address": "Moscow Arbat",
29
+ "coordinate": [55.753994, 37.622093]
30
+ }
31
+ ]
32
+ }
33
+ }
34
+ ```
35
+
36
+ ## Properties
37
+
38
+ | Property | Type | Default | Description |
39
+ | ------------------- | ------------------------------------ | ------- | -------------------------------------------------------------------------- |
40
+ | `title` _required_ | `string \| TitleProps` | — | Block title (plain string or options object with `textSize`, `url`, etc.). |
41
+ | `map` _required_ | `MapProps` | — | Map configuration. See below. |
42
+ | `description` | `string` (YFM) | — | Block description. |
43
+ | `direction` | `'media-content' \| 'content-media'` | — | Relative position of map and content. |
44
+ | `mobileDirection` | `'media-content' \| 'content-media'` | — | Direction on touch devices. |
45
+ | `largeMedia` | `boolean` | — | When `true`, the map takes 8 of 12 columns. |
46
+ | `border` | `'shadow' \| 'line' \| 'none'` | — | Map card border. |
47
+ | `disableShadow` | `boolean` (deprecated) | — | Use `border: 'none'` instead. |
48
+ | `mediaOnly` | `boolean` | — | Renders only the map, without content. |
49
+ | `mediaOnlyColSizes` | `{sm?, md?, lg?, xl?, all?}` | — | Column sizes when `mediaOnly` is `true`. |
50
+ | `additionalInfo` | `string` (YFM) | — | Gray supplementary text. |
51
+ | `links` | `LinkProps[]` | — | Array of link objects. |
52
+ | `buttons` | `ButtonProps[]` | — | Array of button objects. |
53
+ | `theme` | `'default' \| 'dark' \| 'light'` | — | Content theme. |
54
+ | `controlPosition` | `'default' \| 'bottom'` | — | Vertical position of links/buttons. |
55
+
56
+ ### `map` (MapProps)
57
+
58
+ | Property | Type | Default | Description |
59
+ | ----------------- | --------------------------------------- | ------- | ---------------------------------------------------------- |
60
+ | `zoom` | `number` | — | Initial map zoom level. |
61
+ | `address` | `string` | — | Address string used for geocoding / balloons. |
62
+ | `id` | `string` | — | Map instance id. |
63
+ | `markers` | `Array<{coordinate, address?, label?}>` | — | Markers to place on the map. `coordinate` is `[lat, lng]`. |
64
+ | `disableControls` | `boolean` | — | Hides map controls. |
65
+ | `disableBalloons` | `boolean` | — | Disables marker balloons. |
66
+
67
+ ### Common properties
68
+
69
+ Inherits: `anchor`, `visible`, `indent`, `qa`, `className`, `animated`, `theme`, `when`, `context`. See root README.
70
+
71
+ ## Setup notes
72
+
73
+ The Map block requires the maps provider. Pass `mapsContext` (with `apikey`, map `type`, and `scriptSrc`) to `PageConstructorProvider`, otherwise the map cannot be loaded.
74
+
75
+ ## Themed values
76
+
77
+ `map` is not themed itself, but the surrounding media block supports themed media; pass `{light, dark}` where a themed media value is expected.
78
+
79
+ ## Storybook
80
+
81
+ [Map](https://preview.gravity-ui.com/page-constructor/?path=/docs/blocks-map--docs)
@@ -0,0 +1,63 @@
1
+ # Media
2
+
3
+ Renders a two-column layout that pairs a content column (title, body, list, links, button) with a media column (image, video, YouTube, iframe, or DataLens embed). Use it for feature or explainer sections where text and a rich media asset need to sit side by side.
4
+
5
+ ## Block type
6
+
7
+ `type: 'media-block'`
8
+
9
+ ## When to use
10
+
11
+ - Feature or "how it works" sections with text on one side and media on the other.
12
+ - When you need an image gallery (array of images becomes a slider), video player, YouTube embed, iframe, or DataLens visualization in the same block.
13
+ - When you want to control media-vs-content order, sizing, or border treatment.
14
+
15
+ ## Example
16
+
17
+ ```json
18
+ {
19
+ "type": "media-block",
20
+ "title": "Lorem ipsum dolor sit",
21
+ "description": "**Ut enim ad minim veniam** [quis nostrud](https://example.com) exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.",
22
+ "size": "l",
23
+ "direction": "media-content",
24
+ "media": {
25
+ "light": {"image": "/images/media-light.png"},
26
+ "dark": {"image": "/images/media-dark.png"}
27
+ }
28
+ }
29
+ ```
30
+
31
+ ## Properties
32
+
33
+ | Property | Type | Default | Description |
34
+ | -------------------- | ------------------------------------ | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
35
+ | `title` _required_ | `string \| TitleProps` | — | Section heading. String or `TitleProps` (`text`, `textSize`, `url`, `urlTitle`, `analyticsEvents`). |
36
+ | `media` _required_ | `MediaProps \| {light, dark}` | — | Media column: `image` (single or array → slider), `video`, `youtube`, `videoIframe`, `iframe`, `dataLens`, plus `previewImg`, `autoplay`, `parallax`, `height`, `ratio`, `fullscreen`, `margins`, etc. |
37
+ | `description` | `string` | — | YFM body text rendered under the title. |
38
+ | `additionalInfo` | `string` | — | YFM supplementary text below the body. |
39
+ | `size` | `'s' \| 'm' \| 'l' \| 'xl'` | — | Overall content/media scale. |
40
+ | `links` | `LinkProps[]` | — | Inline text links rendered under the content. |
41
+ | `buttons` / `button` | `ButtonBlock[]` / `ButtonBlock` | — | CTA button(s) attached to the content column. |
42
+ | `list` | `ContentItem[]` | — | Bullet-style list with optional icons per item. |
43
+ | `controlPosition` | `'default' \| 'bottom'` | — | Vertical placement of the buttons/links. |
44
+ | `direction` | `'media-content' \| 'content-media'` | — | Column order on desktop. |
45
+ | `mobileDirection` | `'media-content' \| 'content-media'` | — | Column order on mobile. |
46
+ | `largeMedia` | `boolean` | — | Gives the media column a wider share of the grid. |
47
+ | `mediaOnly` | `boolean` | — | Renders only the media column, hiding the content. |
48
+ | `mediaOnlyColSizes` | `{sm?, md?, lg?, xl?, all?}` | — | Column sizes used when `mediaOnly` is `true`. |
49
+ | `border` | `'shadow' \| 'line' \| 'none'` | — | Border/shadow treatment around the media. |
50
+ | `disableShadow` | `boolean` (deprecated) | — | Legacy flag; use `border: 'none'` instead. |
51
+ | `animated` | `boolean` | — | Enables an entrance animation. |
52
+
53
+ ### Common properties
54
+
55
+ Inherits common block properties: `anchor`, `visible`, `indent` (`{top?, bottom?}`), `qa`, `className`, `animated`, `theme` (`'light' | 'dark'`), `when`, `context`. See the root README for details.
56
+
57
+ ## Themed values
58
+
59
+ `media` accepts either a plain value or a `{light, dark}` object resolved against the active runtime theme.
60
+
61
+ ## Storybook
62
+
63
+ [Media](https://preview.gravity-ui.com/page-constructor/?path=/docs/blocks-media--docs)
@@ -0,0 +1,74 @@
1
+ # PromoFeaturesBlock
2
+
3
+ Renders a masonry layout of promotional feature cards, each pairing a title, YFM text, and an optional media asset, displayed against a full-width background. Use it for marketing sections that showcase several value propositions with rich imagery in a non-uniform grid.
4
+
5
+ ## Block type
6
+
7
+ `type: 'promo-features-block'`
8
+
9
+ ## When to use
10
+
11
+ - Marketing sections that mix feature cards with media (image/video) of varying heights.
12
+ - When you want an accent/primary card theme to draw attention to specific items.
13
+ - Promo landing sections where a full-width background tone (default or grey) is desired.
14
+
15
+ ## Example
16
+
17
+ ```json
18
+ {
19
+ "type": "promo-features-block",
20
+ "title": "Lorem ipsum dolor sit amet",
21
+ "description": "**Ut enim ad minim veniam** [quis nostrud](https://example.com) exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.",
22
+ "theme": "grey",
23
+ "items": [
24
+ {
25
+ "title": "Lorem ipsum dolor sit amet",
26
+ "text": "**Ut enim ad minim veniam** [quis nostrud](https://example.com) exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.",
27
+ "media": {"image": "/story-assets/img-mini_4-12_dark.png"}
28
+ },
29
+ {
30
+ "title": "Lorem ipsum dolor sit amet",
31
+ "text": "**Ut enim ad minim veniam** [quis nostrud](https://example.com) exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.",
32
+ "theme": "accent",
33
+ "media": {"image": "/story-assets/img-mini_4-12_dark.png"}
34
+ },
35
+ {
36
+ "title": "Lorem ipsum dolor sit amet",
37
+ "text": "**Ut enim ad minim veniam** [quis nostrud](https://example.com) exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.",
38
+ "theme": "primary",
39
+ "media": {"image": "/story-assets/img-mini_4-12_white.png"}
40
+ }
41
+ ]
42
+ }
43
+ ```
44
+
45
+ ## Properties
46
+
47
+ | Property | Type | Default | Description |
48
+ | ------------------ | ---------------------- | ----------- | --------------------------------------------------------------------------------------------------- |
49
+ | `title` | `string \| TitleProps` | — | Block heading (string or Title options). |
50
+ | `description` | `string` | — | YFM subtitle shown under the title. |
51
+ | `theme` | `'grey' \| 'default'` | `'default'` | Full-width background tone for the block. |
52
+ | `items` _required_ | `PromoFeaturesItem[]` | — | Array of promo feature cards (see below). |
53
+ | `animated` | `boolean` | `true` | Enables entrance animation for the block. |
54
+
55
+ ### `PromoFeaturesItem`
56
+
57
+ | Property | Type | Default | Description |
58
+ | ------------------ | ----------------------------------------- | ------------------------ | ---------------------------------------------------------------------------------------------- |
59
+ | `title` _required_ | `string` | — | Card title (rendered as `<h3>`). |
60
+ | `text` _required_ | `string` | — | YFM card body text. |
61
+ | `theme` | `'accent' \| 'accent-light' \| 'primary'` | derived from block theme | Card color treatment. |
62
+ | `media` | `MediaProps \| {light, dark}` | — | Media (image/video) attached to the card. When omitted, the card renders without a media area. |
63
+
64
+ ### Common properties
65
+
66
+ Inherits common block properties: `anchor`, `visible`, `indent` (`{top?, bottom?}`), `qa`, `className`, `animated`, `theme` (`'light' | 'dark'`), `when`, `context`. See the root README for details.
67
+
68
+ ## Themed values
69
+
70
+ `media` accepts either a plain value or a `{light, dark}` object resolved against the active runtime theme.
71
+
72
+ ## Storybook
73
+
74
+ [PromoFeaturesBlock](https://preview.gravity-ui.com/page-constructor/?path=/docs/blocks-promofeaturesblock--docs)
@@ -0,0 +1,78 @@
1
+ # Questions
2
+
3
+ Renders an FAQ block: a left content panel (title, text, links, buttons) and a list of expandable question/answer rows on the right. Automatically emits `FAQPage` JSON-LD microdata so search engines can index the answers as rich results.
4
+
5
+ ## Block type
6
+
7
+ `type: 'questions-block'`
8
+
9
+ ## When to use
10
+
11
+ - FAQ sections that benefit from search-engine rich results (JSON-LD `FAQPage`).
12
+ - Q&A lists where each answer should expand/collapse.
13
+ - When you need an intro panel (title, description, CTA) next to the questions.
14
+
15
+ ## Example
16
+
17
+ ```json
18
+ {
19
+ "type": "questions-block",
20
+ "title": "Lorem ipsum",
21
+ "text": "Dolor sit amet, consectetur adipiscing elit [sed do eiusmod](https://example.com) tempor incididunt ut labore et dolore magna aliqua.",
22
+ "additionalInfo": "Dolor sit amet [consectetur adipiscing](https://example.com) Duis aute irure dolor in reprehenderit.",
23
+ "links": [{"url": "/security", "text": "Learn more", "theme": "normal", "arrow": true}],
24
+ "buttons": [{"text": "Button", "theme": "action", "url": "https://example.com"}],
25
+ "items": [
26
+ {
27
+ "title": "Lorem ipsum dolor sit amet 0",
28
+ "text": "Consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
29
+ "link": {"url": "#", "text": "Documentation", "theme": "normal", "arrow": true}
30
+ },
31
+ {
32
+ "title": "Ut enim ad minim veniam, quis nostrud exercitation ullamco? 1",
33
+ "text": "laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.",
34
+ "link": {"url": "#", "text": "Documentation", "theme": "normal", "arrow": true}
35
+ },
36
+ {
37
+ "title": "1. Lorem ipsum",
38
+ "text": "Lorem ipsum dolor sit amet:\n- Lorem ipsum\n- Lorem ipsum\n- Lorem ipsum",
39
+ "link": {"url": "#", "text": "Documentation", "theme": "normal", "arrow": true},
40
+ "listStyle": "disk"
41
+ }
42
+ ]
43
+ }
44
+ ```
45
+
46
+ ## Properties
47
+
48
+ | Property | Type | Default | Description |
49
+ | ------------------ | ----------------------- | ------- | -------------------------------------------------------------------------------------------------------- |
50
+ | `title` _required_ | `string \| TitleProps` | — | Left-panel heading (string or Title options). |
51
+ | `text` | `string` | — | YFM body text in the left panel. |
52
+ | `additionalInfo` | `string` | — | YFM supplementary text in the left panel. |
53
+ | `links` | `LinkProps[]` | — | Array of links rendered in the left panel. |
54
+ | `buttons` | `ButtonBlock[]` | — | Array of buttons rendered in the left panel. |
55
+ | `list` | `ContentItem[]` | — | Icon + title + text list rendered in the left panel. Each item requires an `icon` or `gravityIcon`. |
56
+ | `controlPosition` | `'default' \| 'bottom'` | — | Position of the link/button controls in the left panel. |
57
+ | `items` _required_ | `QuestionItem[]` | — | Collapsible question rows on the right (see below). |
58
+
59
+ ### `QuestionItem`
60
+
61
+ | Property | Type | Default | Description |
62
+ | ------------------ | ------------------ | -------- | --------------------------------------------------------------------------------------- |
63
+ | `title` _required_ | `string` | — | Question text (always visible). Also used as the JSON-LD `Question.name`. |
64
+ | `text` _required_ | `string` | — | YFM answer text revealed when expanded. Also used as the JSON-LD `acceptedAnswer.text`. |
65
+ | `link` | `LinkProps` | — | Link rendered below the answer. |
66
+ | `listStyle` | `'dash' \| 'disk'` | `'dash'` | Marker style for lists inside the answer. |
67
+
68
+ ### Common properties
69
+
70
+ Inherits common block properties: `anchor`, `visible`, `indent` (`{top?, bottom?}`), `qa`, `className`, `animated`, `theme` (`'light' | 'dark'`), `when`, `context`. See the root README for details.
71
+
72
+ ## Themed values
73
+
74
+ No dedicated themed props; the block follows the runtime `theme` for text/background coloring.
75
+
76
+ ## Storybook
77
+
78
+ [Questions](https://preview.gravity-ui.com/page-constructor/?path=/docs/blocks-questions--docs)
@@ -0,0 +1,45 @@
1
+ # Share
2
+
3
+ Renders a row of social-network share buttons that share the current page URL.
4
+
5
+ ## Block type
6
+
7
+ `type: 'share-block'`
8
+
9
+ ## When to use
10
+
11
+ - You want to let visitors share the current page on social networks.
12
+ - You need a compact, localized share strip with analytics events on click.
13
+
14
+ ## Example
15
+
16
+ ```json
17
+ {
18
+ "type": "share-block",
19
+ "title": "Share on social networks",
20
+ "items": ["facebook", "vk", "telegram", "twitter", "linkedin"]
21
+ }
22
+ ```
23
+
24
+ ## Properties
25
+
26
+ | Property | Type | Default | Description |
27
+ | ------------------ | -------------------------------------------------------------------- | ------------------------ | ---------------------------------------------------------------------------- |
28
+ | `items` _required_ | `Array<'telegram' \| 'facebook' \| 'twitter' \| 'vk' \| 'linkedin'>` | — | Social networks to render, in order. |
29
+ | `title` | `string` (YFM) | localized "Share" string | Heading above the buttons. When omitted, a localized default title is shown. |
30
+
31
+ ### Common properties
32
+
33
+ Inherits: `anchor`, `visible`, `indent`, `qa`, `className`, `animated`, `theme`, `when`, `context`. See root README.
34
+
35
+ ## Notes
36
+
37
+ The shared URL is derived from the `LocationContext` (hostname + pathname) provided by `PageConstructorProvider`. Click events are reported through the analytics handler under the `shareButton` event name.
38
+
39
+ ## Themed values
40
+
41
+ This block has no themed-value properties.
42
+
43
+ ## Storybook
44
+
45
+ [Share](https://preview.gravity-ui.com/page-constructor/?path=/docs/blocks-share--docs)