@gravity-ui/page-constructor 8.15.0 → 8.17.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 (129) hide show
  1. package/README.md +31 -9
  2. package/build/cjs/constructor-items.d.ts +1 -1
  3. package/build/cjs/demo/ComponentMap/ComponentMap.css +55 -0
  4. package/build/cjs/demo/ComponentMap/ComponentMap.d.ts +6 -0
  5. package/build/cjs/demo/ComponentMap/ComponentMap.js +286 -0
  6. package/build/cjs/demo/ComponentMap/ComponentMap.js.map +1 -0
  7. package/build/cjs/demo/ComponentMap/draw.d.ts +23 -0
  8. package/build/cjs/demo/ComponentMap/draw.js +134 -0
  9. package/build/cjs/demo/ComponentMap/draw.js.map +1 -0
  10. package/build/cjs/demo/ComponentMap/edgeGeometry.d.ts +20 -0
  11. package/build/cjs/demo/ComponentMap/edgeGeometry.js +146 -0
  12. package/build/cjs/demo/ComponentMap/edgeGeometry.js.map +1 -0
  13. package/build/cjs/demo/ComponentMap/graph.d.ts +9 -0
  14. package/build/cjs/demo/ComponentMap/graph.js +68 -0
  15. package/build/cjs/demo/ComponentMap/graph.js.map +1 -0
  16. package/build/cjs/demo/ComponentMap/layout.d.ts +12 -0
  17. package/build/cjs/demo/ComponentMap/layout.js +149 -0
  18. package/build/cjs/demo/ComponentMap/layout.js.map +1 -0
  19. package/build/cjs/demo/ComponentMap/model.d.ts +55 -0
  20. package/build/cjs/demo/ComponentMap/model.js +3 -0
  21. package/build/cjs/demo/ComponentMap/model.js.map +1 -0
  22. package/build/cjs/demo/ComponentMap/viewport.d.ts +7 -0
  23. package/build/cjs/demo/ComponentMap/viewport.js +41 -0
  24. package/build/cjs/demo/ComponentMap/viewport.js.map +1 -0
  25. package/build/cjs/demo/HeroAndMedia.stories.js +12 -23
  26. package/build/cjs/demo/HeroAndMedia.stories.js.map +1 -1
  27. package/build/cjs/demo/TokenizationHeader.stories.d.ts +13 -0
  28. package/build/cjs/demo/TokenizationHeader.stories.js +47 -0
  29. package/build/cjs/demo/TokenizationHeader.stories.js.map +1 -0
  30. package/build/cjs/demo/TokenizationHero.stories.d.ts +9 -0
  31. package/build/cjs/demo/TokenizationHero.stories.js +20 -0
  32. package/build/cjs/demo/TokenizationHero.stories.js.map +1 -0
  33. package/build/cjs/demo/tokenizationLanding.d.ts +2 -0
  34. package/build/cjs/demo/tokenizationLanding.js +21 -0
  35. package/build/cjs/demo/tokenizationLanding.js.map +1 -0
  36. package/build/cjs/models/constructor-items/sub-blocks.d.ts +3 -0
  37. package/build/cjs/models/constructor-items/sub-blocks.js.map +1 -1
  38. package/build/cjs/sub-blocks/LayoutItem/LayoutItem.css +15 -0
  39. package/build/cjs/sub-blocks/LayoutItem/LayoutItem.d.ts +1 -1
  40. package/build/cjs/sub-blocks/LayoutItem/LayoutItem.js +12 -2
  41. package/build/cjs/sub-blocks/LayoutItem/LayoutItem.js.map +1 -1
  42. package/build/cjs/sub-blocks/LayoutItem/schema.d.ts +10 -0
  43. package/build/cjs/sub-blocks/LayoutItem/schema.js +10 -0
  44. package/build/cjs/sub-blocks/LayoutItem/schema.js.map +1 -1
  45. package/build/docs/INDEX.md +191 -0
  46. package/build/docs/blocks/Banner.md +59 -0
  47. package/build/docs/blocks/CardLayout.md +79 -0
  48. package/build/docs/blocks/Companies.md +67 -0
  49. package/build/docs/blocks/ContentLayout.md +54 -0
  50. package/build/docs/blocks/ExtendedFeatures.md +74 -0
  51. package/build/docs/blocks/FilterBlock.md +112 -0
  52. package/build/docs/blocks/FoldableList.md +78 -0
  53. package/build/docs/blocks/Footer.md +110 -0
  54. package/build/docs/blocks/Form.md +89 -0
  55. package/build/docs/blocks/Header.md +70 -0
  56. package/build/docs/blocks/HeaderSlider.md +70 -0
  57. package/build/docs/blocks/Hero.md +67 -0
  58. package/build/docs/blocks/Icons.md +61 -0
  59. package/build/docs/blocks/Info.md +73 -0
  60. package/build/docs/blocks/Map.md +81 -0
  61. package/build/docs/blocks/Media.md +63 -0
  62. package/build/docs/blocks/PromoFeaturesBlock.md +74 -0
  63. package/build/docs/blocks/Questions.md +78 -0
  64. package/build/docs/blocks/Share.md +45 -0
  65. package/build/docs/blocks/Slider.md +89 -0
  66. package/build/docs/blocks/SliderOld.md +63 -0
  67. package/build/docs/blocks/Table.md +64 -0
  68. package/build/docs/blocks/Tabs.md +92 -0
  69. package/build/docs/guides/data-preparation-ru.md +257 -0
  70. package/build/docs/guides/data-preparation.md +259 -0
  71. package/build/docs/sub-blocks/BackgroundCard.md +63 -0
  72. package/build/docs/sub-blocks/BannerCard.md +57 -0
  73. package/build/docs/sub-blocks/BasicCard.md +60 -0
  74. package/build/docs/sub-blocks/Content.md +58 -0
  75. package/build/docs/sub-blocks/Divider.md +47 -0
  76. package/build/docs/sub-blocks/HubspotForm.md +47 -0
  77. package/build/docs/sub-blocks/ImageCard.md +59 -0
  78. package/build/docs/sub-blocks/LayoutItem.md +75 -0
  79. package/build/docs/sub-blocks/MediaCard.md +66 -0
  80. package/build/docs/sub-blocks/PriceCard.md +60 -0
  81. package/build/docs/sub-blocks/PriceDetailed.md +74 -0
  82. package/build/docs/sub-blocks/Quote.md +74 -0
  83. package/build/esm/constructor-items.d.ts +1 -1
  84. package/build/esm/demo/ComponentMap/ComponentMap.css +55 -0
  85. package/build/esm/demo/ComponentMap/ComponentMap.d.ts +7 -0
  86. package/build/esm/demo/ComponentMap/ComponentMap.js +283 -0
  87. package/build/esm/demo/ComponentMap/ComponentMap.js.map +1 -0
  88. package/build/esm/demo/ComponentMap/draw.d.ts +23 -0
  89. package/build/esm/demo/ComponentMap/draw.js +130 -0
  90. package/build/esm/demo/ComponentMap/draw.js.map +1 -0
  91. package/build/esm/demo/ComponentMap/edgeGeometry.d.ts +20 -0
  92. package/build/esm/demo/ComponentMap/edgeGeometry.js +136 -0
  93. package/build/esm/demo/ComponentMap/edgeGeometry.js.map +1 -0
  94. package/build/esm/demo/ComponentMap/graph.d.ts +9 -0
  95. package/build/esm/demo/ComponentMap/graph.js +62 -0
  96. package/build/esm/demo/ComponentMap/graph.js.map +1 -0
  97. package/build/esm/demo/ComponentMap/layout.d.ts +12 -0
  98. package/build/esm/demo/ComponentMap/layout.js +144 -0
  99. package/build/esm/demo/ComponentMap/layout.js.map +1 -0
  100. package/build/esm/demo/ComponentMap/model.d.ts +55 -0
  101. package/build/esm/demo/ComponentMap/model.js +2 -0
  102. package/build/esm/demo/ComponentMap/model.js.map +1 -0
  103. package/build/esm/demo/ComponentMap/viewport.d.ts +7 -0
  104. package/build/esm/demo/ComponentMap/viewport.js +34 -0
  105. package/build/esm/demo/ComponentMap/viewport.js.map +1 -0
  106. package/build/esm/demo/HeroAndMedia.stories.js +1 -12
  107. package/build/esm/demo/HeroAndMedia.stories.js.map +1 -1
  108. package/build/esm/demo/TokenizationHeader.stories.d.ts +13 -0
  109. package/build/esm/demo/TokenizationHeader.stories.js +43 -0
  110. package/build/esm/demo/TokenizationHeader.stories.js.map +1 -0
  111. package/build/esm/demo/TokenizationHero.stories.d.ts +9 -0
  112. package/build/esm/demo/TokenizationHero.stories.js +16 -0
  113. package/build/esm/demo/TokenizationHero.stories.js.map +1 -0
  114. package/build/esm/demo/tokenizationLanding.d.ts +2 -0
  115. package/build/esm/demo/tokenizationLanding.js +16 -0
  116. package/build/esm/demo/tokenizationLanding.js.map +1 -0
  117. package/build/esm/models/constructor-items/sub-blocks.d.ts +3 -0
  118. package/build/esm/models/constructor-items/sub-blocks.js.map +1 -1
  119. package/build/esm/sub-blocks/LayoutItem/LayoutItem.css +15 -0
  120. package/build/esm/sub-blocks/LayoutItem/LayoutItem.d.ts +1 -1
  121. package/build/esm/sub-blocks/LayoutItem/LayoutItem.js +14 -4
  122. package/build/esm/sub-blocks/LayoutItem/LayoutItem.js.map +1 -1
  123. package/build/esm/sub-blocks/LayoutItem/schema.d.ts +10 -0
  124. package/build/esm/sub-blocks/LayoutItem/schema.js +10 -0
  125. package/build/esm/sub-blocks/LayoutItem/schema.js.map +1 -1
  126. package/package.json +4 -2
  127. package/schema/index.js +1 -1
  128. package/server/models/constructor-items/sub-blocks.d.ts +3 -0
  129. package/widget/index.js +1 -1
@@ -0,0 +1,78 @@
1
+ # FoldableList
2
+
3
+ Renders a two-column block: a content panel on the left (title, text, links, buttons) and a list of collapsible items on the right, each with its own title, YFM text, and optional link. Use it for FAQ-style or specification pages where each row expands to reveal more detail.
4
+
5
+ ## Block type
6
+
7
+ `type: 'foldable-list-block'`
8
+
9
+ ## When to use
10
+
11
+ - FAQs, glossaries, or specification lists where each entry should expand/collapse.
12
+ - When you need a sticky intro panel (title, description, CTA) next to a long list.
13
+ - When individual answers may contain a bulleted list (`dash` or `disk` markers).
14
+
15
+ ## Example
16
+
17
+ ```json
18
+ {
19
+ "type": "foldable-list-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": "Some title with a list",
38
+ "text": "Lorem ipsum dolor sit amet:\n\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_ | `FoldableListItem[]` | — | Collapsible rows on the right (see below). |
58
+
59
+ ### `FoldableListItem`
60
+
61
+ | Property | Type | Default | Description |
62
+ | ------------------ | ------------------ | -------- | ------------------------------------------------ |
63
+ | `title` _required_ | `string` | — | Row title (always visible). |
64
+ | `text` _required_ | `string` | — | YFM body text revealed when the row is expanded. |
65
+ | `link` | `LinkProps` | — | Link rendered below the text. |
66
+ | `listStyle` | `'dash' \| 'disk'` | `'dash'` | Marker style for lists inside the text. |
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
+ [FoldableList](https://preview.gravity-ui.com/page-constructor/?path=/docs/blocks-foldablelist--docs)
@@ -0,0 +1,110 @@
1
+ # Footer
2
+
3
+ A configurable page footer assembled from optional floors: navigation columns, contacts (social icons), disclaimer, copyright (legal links, language switcher, logo), and an attribution strip.
4
+
5
+ ## Block type
6
+
7
+ `type: 'footer-block'`
8
+
9
+ ## When to use
10
+
11
+ - You need a site-wide footer with link columns and/or a logo.
12
+ - You need social/contact icon links and/or a legal disclaimer.
13
+ - You need a copyright floor with legal links, language switcher, or a logo.
14
+
15
+ ## Example
16
+
17
+ ```json
18
+ {
19
+ "type": "footer-block",
20
+ "indentTop": "l",
21
+ "backgroundColor": {"light": "#ffffff", "dark": "#111111"},
22
+ "navigation": {
23
+ "logo": {
24
+ "image": {"src": "story-assets/icon_1-with-text_light.svg"},
25
+ "url": "/"
26
+ },
27
+ "columns": [
28
+ {
29
+ "title": "Product",
30
+ "links": [
31
+ {"text": "Overview", "url": "#overview"},
32
+ {"text": "Docs", "url": "#docs"}
33
+ ]
34
+ }
35
+ ]
36
+ },
37
+ "contacts": {
38
+ "title": "Join us",
39
+ "links": [
40
+ {
41
+ "icon": {"src": "story-assets/icons-github_light.svg"},
42
+ "url": "https://example.com",
43
+ "urlTitle": "GitHub"
44
+ }
45
+ ]
46
+ },
47
+ "disclaimer": {"text": "Legal disclaimer text.", "align": "left"},
48
+ "copyright": {
49
+ "links": [
50
+ {"text": "Privacy Policy", "url": "#privacy"},
51
+ {"text": "Terms", "url": "#terms"}
52
+ ],
53
+ "copyrightText": "© 2026 Company"
54
+ },
55
+ "attribution": true
56
+ }
57
+ ```
58
+
59
+ ## Properties
60
+
61
+ | Property | Type | Default | Description |
62
+ | ----------------- | --------------------------------------------------------- | ------- | --------------------------------------------------------------------------------------- |
63
+ | `navigation` | `FooterNavigation` | — | Navigation floor: logo and required link columns. Rendered when `columns` is non-empty. |
64
+ | `contacts` | `FooterContacts` | — | Contacts floor: title + icon links. Rendered when `links` is non-empty. |
65
+ | `disclaimer` | `{text *required*, align *required*: 'left' \| 'center'}` | — | Disclaimer floor rendered as YFM. |
66
+ | `copyright` | `FooterCopyright` | — | Copyright floor with optional legal links, language switcher, logo, and copyright text. |
67
+ | `attribution` | `boolean` | — | Shows the branded "Created with ..." attribution strip. |
68
+ | `backgroundColor` | `string \| {light, dark}` | — | Theme-aware footer background color. |
69
+ | `indentTop` | `'0' \| 'xs' \| 's' \| 'm' \| 'l' \| 'xl'` | — | Top indent of the footer. |
70
+
71
+ ### `navigation` (FooterNavigation)
72
+
73
+ | Property | Type | Default | Description |
74
+ | -------------------- | ------------------------------------------------------------------------------------------ | ------------------------------- | ------------------------------------------------------- |
75
+ | `columns` _required_ | `Array<{title *required*, links *required*: LinkProps[]}>` | — | Link columns. |
76
+ | `logo` | `{image *required*: ImageProps \| {light, dark}, url?, alt?, placement?: 'left' \| 'top'}` | — | Optional footer logo. `placement` defaults to `'left'`. |
77
+ | `colSizes` | `{sm?, md?, lg?, xl?, all?}` | `{all: 6, sm: 4, md: 3, lg: 3}` | Grid sizes per column. |
78
+ | `columnsPerRow` | `number` (1–12) | — | Switches to a fixed percentage-width-per-column layout. |
79
+
80
+ ### `contacts` (FooterContacts)
81
+
82
+ | Property | Type | Default | Description |
83
+ | --------------- | ---------------------------------------------------------------------------------- | -------- | --------------------------------------------- |
84
+ | `title` | `string` | — | Contacts floor heading. |
85
+ | `links` | `Array<{icon *required*: ImageProps \| {light, dark}, url *required*, urlTitle?}>` | — | Social/contact icon links. Open in a new tab. |
86
+ | `iconsSize` | `'m' \| 'l'` | `'l'` | Icon size. |
87
+ | `linksPosition` | `'left' \| 'center'` | `'left'` | Horizontal alignment of icons. |
88
+ | `titlePosition` | `'top' \| 'near'` | `'top'` | Title placement relative to icons. |
89
+
90
+ ### `copyright` (FooterCopyright)
91
+
92
+ | Property | Type | Default | Description |
93
+ | ----------------------- | ----------------------------------------------------------------------------------------------------------------- | ------------ | ------------------------------------------------- |
94
+ | `links` | `LinkProps[]` | — | Legal or service links. |
95
+ | `linksOverflowStrategy` | `'dropdown' \| 'line-wrap'` | `'dropdown'` | Overflow behavior for links. |
96
+ | `languageSwitcher` | `{items *required*: Array<{text *required*, href *required*}>, buttonText?, image?: ImageProps \| {light, dark}}` | — | Dropdown language switcher rendered on the right. |
97
+ | `logo` | `{image *required*: ImageProps \| {light, dark}, url?, alt?}` | — | Optional logo for the copyright floor. |
98
+ | `copyrightText` | `string` | — | Copyright text rendered on the right. |
99
+
100
+ ### Common properties
101
+
102
+ Inherits: `anchor`, `visible`, `indent`, `qa`, `className`, `animated`, `theme`, `when`, `context`. See root README.
103
+
104
+ ## Themed values
105
+
106
+ `backgroundColor`, `navigation.logo.image`, `contacts.links[].icon`, `copyright.languageSwitcher.image`, and `copyright.logo.image` accept either a plain value or `{light, dark}`.
107
+
108
+ ## Storybook
109
+
110
+ [Footer](https://preview.gravity-ui.com/page-constructor/?path=/docs/blocks-footer--docs)
@@ -0,0 +1,89 @@
1
+ # Form
2
+
3
+ A two-column block that renders a third-party form (Yandex Forms or HubSpot) alongside optional YFM text content, with a configurable layout direction and background.
4
+
5
+ ## Block type
6
+
7
+ `type: 'form-block'`
8
+
9
+ ## When to use
10
+
11
+ - You need to embed a Yandex Form or HubSpot form into a page assembled from JSON.
12
+ - You want to place marketing copy, title, and links next to a lead-generation form.
13
+ - You need a themed background (color or image) behind the form.
14
+
15
+ ## Example
16
+
17
+ ```json
18
+ {
19
+ "type": "form-block",
20
+ "title": "Hubspot form",
21
+ "direction": "center",
22
+ "textContent": {
23
+ "title": "Lorem ipsum dolor sit amet",
24
+ "text": "**Ut enim ad minim veniam** [quis nostrud](https://example.com) exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat."
25
+ },
26
+ "formData": {
27
+ "hubspot": {
28
+ "region": "eu1",
29
+ "portalId": "25764979",
30
+ "formId": "a3eb06a6-e8ce-45d4-81bd-7fadb7dab313"
31
+ }
32
+ }
33
+ }
34
+ ```
35
+
36
+ A Yandex form variant:
37
+
38
+ ```json
39
+ {
40
+ "type": "form-block",
41
+ "formData": {
42
+ "yandex": {
43
+ "id": "5f3c4d2b1e2a4c0001a2b3c4"
44
+ }
45
+ }
46
+ }
47
+ ```
48
+
49
+ ## Properties
50
+
51
+ | Property | Type | Default | Description |
52
+ | --------------------- | ------------------------------------------------------------------------------------------ | ---------- | ---------------------------------------------------------------------------------------- |
53
+ | `formData` _required_ | `{yandex?: YandexFormProps \| {light, dark}, hubspot?: HubspotFormProps \| {light, dark}}` | — | The form to embed. Exactly one of `yandex` or `hubspot` is expected. |
54
+ | `title` | `string` | — | Block title rendered above the form. |
55
+ | `textContent` | `ContentBase` (without `size`, `centered`, `colSizes`) | — | Title, text (YFM), links, buttons, list items for the content column. |
56
+ | `direction` | `'content-form' \| 'form-content' \| 'center'` | `'center'` | Layout direction of the content column relative to the form. |
57
+ | `background` | `ImageProps` | — | Background image or CSS style; `style` supports `{desktop, mobile}` breakpoints. Themed. |
58
+
59
+ ### `formData.yandex` (YandexFormProps)
60
+
61
+ | Property | Type | Default | Description |
62
+ | --------------- | -------- | ------- | ------------------------------------------------ |
63
+ | `id` _required_ | `string` | — | Yandex Forms form id. |
64
+ | `containerId` | `string` | — | Optional DOM container id for the embedded form. |
65
+
66
+ ### `formData.hubspot` (HubspotFormProps)
67
+
68
+ | Property | Type | Default | Description |
69
+ | --------------------- | -------- | ------- | ---------------------------------- |
70
+ | `portalId` _required_ | `string` | — | HubSpot portal id. |
71
+ | `formId` _required_ | `string` | — | HubSpot form id. |
72
+ | `region` | `string` | — | HubSpot region (e.g. `'eu1'`). |
73
+ | `formInstanceId` | `string` | — | Optional HubSpot form instance id. |
74
+
75
+ ### Common properties
76
+
77
+ Inherits: `anchor`, `visible`, `indent`, `qa`, `className`, `animated`, `theme`, `when`, `context`. See root README.
78
+
79
+ ## Setup notes
80
+
81
+ HubSpot forms are loaded through the HubSpot embed script automatically; no extra provider configuration is required. Yandex Forms are loaded via the Yandex Forms script. If you use a custom React node instead of `formData`, pass it via the `customFormNode` / `additionalContentNode` props when mounting the block from code (not available from JSON).
82
+
83
+ ## Themed values
84
+
85
+ `background`, `formData.yandex`, and `formData.hubspot` accept either a plain value or `{light, dark}`.
86
+
87
+ ## Storybook
88
+
89
+ [Form](https://preview.gravity-ui.com/page-constructor/?path=/docs/blocks-form--docs)
@@ -0,0 +1,70 @@
1
+ # Header
2
+
3
+ Renders a full-width page header with a title, optional overtitle/description, call-to-action buttons, breadcrumbs, and an optional media asset (image, video, or video iframe) positioned to the right or centered. Use it as the primary hero/landing block at the top of a page.
4
+
5
+ ## Block type
6
+
7
+ `type: 'header-block'`
8
+
9
+ ## When to use
10
+
11
+ - As the first block of a page to introduce the product, section, or campaign.
12
+ - When you need a large headline paired with CTA buttons and an illustration or background media.
13
+ - When you want breadcrumbs, status pills, or additional info alongside the title.
14
+
15
+ ## Example
16
+
17
+ ```json
18
+ {
19
+ "type": "header-block",
20
+ "title": "Lorem ipsum dolor sit amet, consectetur adipiscing elit",
21
+ "description": "**Ut enim ad minim veniam** [quis nostrud](https://example.com) exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.",
22
+ "additionalInfo": "**Ut enim ad minim veniam** ut aliquip ex ea commodo consequat.",
23
+ "buttons": [
24
+ {"text": "Primary", "theme": "action", "url": "https://example.com"},
25
+ {"text": "Secondary", "theme": "outlined", "url": "https://example.com"}
26
+ ],
27
+ "background": {
28
+ "light": {"image": "/images/header-bg-light.png", "color": "#EFF2F8"},
29
+ "dark": {"image": "/images/header-bg-dark.png", "color": "#262626"}
30
+ }
31
+ }
32
+ ```
33
+
34
+ ## Properties
35
+
36
+ | Property | Type | Default | Description |
37
+ | ------------------ | --------------------------------------------------------- | ---------------------- | --------------------------------------------------------------------------- |
38
+ | `title` _required_ | `string` | — | Main heading text (YFM-supported). Rendered as `<h1>`. |
39
+ | `overtitle` | `string` | — | Small label rendered above the title. Accepts YFM or a React node. |
40
+ | `description` | `string` | — | YFM body text shown below the title. |
41
+ | `additionalInfo` | `string` | — | YFM supplementary text shown below the description. |
42
+ | `width` | `'s' \| 'm' \| 'l'` | `'m'` | Maximum text width; also drives the title size. |
43
+ | `buttons` | `ButtonBlock[]` | — | Call-to-action buttons rendered under the text. |
44
+ | `offset` | `'default' \| 'large'` | `'default'` | Horizontal indent of the content column. |
45
+ | `image` | `ImageProps \| {light, dark}` | — | Inline media image placed on the right side. |
46
+ | `video` | `VideoProps \| {light, dark}` | — | Inline media video placed on the right side. |
47
+ | `videoIframe` | `{src, autoplay?, previewImg?, height?} \| {light, dark}` | — | External iframe video (e.g. video hosting) placed on the right side. |
48
+ | `mediaView` | `'fit' \| 'full'` | `'full'` | `fit` constrains the media height; `full` lets it fill the available space. |
49
+ | `backLink` | `{url, title}` | — | "Back" navigation link rendered above the title. |
50
+ | `imageSize` | `'s' \| 'm'` | derived from `width` | Overrides the inline media column size. |
51
+ | `verticalOffset` | `'0' \| 's' \| 'm' \| 'l' \| 'xl'` | `'m'` | Vertical spacing around the content. |
52
+ | `background` | `HeaderBackgroundProps \| {light, dark}` | — | Full-bleed background media/color behind the content. |
53
+ | `theme` | `'default' \| 'dark'` | `'light'` (text theme) | Text/background color scheme for the content area. |
54
+ | `breadcrumbs` | `{items: {url, text}[], theme?}` | — | Breadcrumb navigation rendered above the content. |
55
+ | `status` | `string` | — | Status text/React node rendered next to the title. |
56
+ | `centered` | `boolean` | `false` | Centers the content and hides the right-side media. |
57
+
58
+ `HeaderBackgroundProps` extends `MediaProps` with `fullWidth?: boolean` and `fullWidthMedia?: boolean`.
59
+
60
+ ### Common properties
61
+
62
+ Inherits common block properties: `anchor`, `visible`, `indent` (`{top?, bottom?}`), `qa`, `className`, `animated`, `theme` (`'light' | 'dark'`), `when`, `context`. See the root README for details.
63
+
64
+ ## Themed values
65
+
66
+ `image`, `video`, `videoIframe`, and `background` each accept either a plain value or a `{light, dark}` object resolved against the active runtime theme.
67
+
68
+ ## Storybook
69
+
70
+ [Header](https://preview.gravity-ui.com/page-constructor/?path=/docs/blocks-header--docs)
@@ -0,0 +1,70 @@
1
+ # HeaderSlider
2
+
3
+ Renders a carousel of full-bleed `header-block` slides — each slide carries its own title, description, buttons, and background media. Use it when the top of the page needs to rotate multiple equally important campaigns or announcements instead of a single hero.
4
+
5
+ ## Block type
6
+
7
+ `type: 'header-slider-block'`
8
+
9
+ ## When to use
10
+
11
+ - Top-of-page hero carousel with two or more featured items.
12
+ - When each slide needs the full Header feature set (buttons, background image/video, breadcrumbs, theme).
13
+ - When you want autoplay, dots, or arrows to navigate between slides.
14
+
15
+ ## Example
16
+
17
+ ```json
18
+ {
19
+ "type": "header-slider-block",
20
+ "dots": true,
21
+ "arrows": true,
22
+ "autoplay": 3000,
23
+ "items": [
24
+ {
25
+ "title": "Lorem ipsum dolor sit amet",
26
+ "description": "Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris.",
27
+ "background": {
28
+ "light": {"image": "/images/header-bg-light.png", "color": "#EFF2F8", "fullWidth": true},
29
+ "dark": {"image": "/images/header-bg-dark.png", "color": "#262626", "fullWidth": true}
30
+ },
31
+ "buttons": [{"text": "Primary", "theme": "action", "url": "https://example.com"}]
32
+ },
33
+ {
34
+ "title": "Second campaign headline",
35
+ "description": "Duis aute irure dolor in reprehenderit in voluptate velit esse.",
36
+ "background": {"color": "#262626", "fullWidth": true},
37
+ "theme": "dark",
38
+ "buttons": [{"text": "Learn more", "theme": "normal-contrast", "url": "https://example.com"}]
39
+ }
40
+ ]
41
+ }
42
+ ```
43
+
44
+ ## Properties
45
+
46
+ | Property | Type | Default | Description |
47
+ | ------------------ | -------------------------------------------------- | ------- | ------------------------------------------------------------------------------------------------------------- |
48
+ | `items` _required_ | `HeaderItem[]` | — | Array of slides. Each item follows the Header schema (`title` required) and renders as a full `header-block`. |
49
+ | `dots` | `boolean` | — | Shows pagination dots under the slider. |
50
+ | `arrows` | `boolean` | — | Shows navigation arrows (hidden automatically on mobile). |
51
+ | `randomOrder` | `boolean` | — | Shuffles slide order on load. |
52
+ | `autoplay` | `number` | — | Slide interval in milliseconds; omit to disable autoplay. |
53
+ | `adaptive` | `boolean` | — | Lets the slider height adapt to the tallest slide. |
54
+ | `arrowSize` | `number` | `20` | Pixel size of the navigation arrows. |
55
+ | `slidesToShow` | `{sm?, md?, lg?, xl?, all?}` | — | Responsive count of slides visible (HeaderSlider forces a single slide). |
56
+ | `disclaimer` | `{text: string, size?: 'xs'\|'s'\|'sm'\|'m'\|'l'}` | — | Small legal/disclaimer text rendered near the slider. |
57
+
58
+ Each `HeaderItem` supports every property of the [Header](./Header.md) block (`title`, `description`, `buttons`, `background`, `breadcrumbs`, `theme`, etc.).
59
+
60
+ ### Common properties
61
+
62
+ Inherits common block properties: `anchor`, `visible`, `indent` (`{top?, bottom?}`), `qa`, `className`, `animated`, `theme` (`'light' | 'dark'`), `when`, `context`. See the root README for details.
63
+
64
+ ## Themed values
65
+
66
+ Theming is delegated to the individual slide `items`, which support `{light, dark}` values per the Header block.
67
+
68
+ ## Storybook
69
+
70
+ [HeaderSlider](https://preview.gravity-ui.com/page-constructor/?path=/docs/blocks-headerslider--docs)
@@ -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)