@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.
- package/README.md +31 -9
- package/build/cjs/components/ReactPlayer/ReactPlayer.css +0 -50
- package/build/cjs/components/ReactPlayer/ReactPlayer.js +4 -16
- package/build/cjs/components/ReactPlayer/ReactPlayer.js.map +1 -1
- package/build/cjs/components/VideoBlock/VideoBlock.css +0 -30
- package/build/cjs/components/VideoBlock/VideoBlock.d.ts +2 -1
- package/build/cjs/components/VideoBlock/VideoBlock.js +18 -2
- package/build/cjs/components/VideoBlock/VideoBlock.js.map +1 -1
- package/build/cjs/components/VideoButton/VideoButton.css +64 -0
- package/build/cjs/components/VideoButton/VideoButton.d.ts +9 -0
- package/build/cjs/components/VideoButton/VideoButton.js +50 -0
- package/build/cjs/components/VideoButton/VideoButton.js.map +1 -0
- package/build/cjs/context/projectSettingsContext/ProjectSettingsContext.d.ts +7 -0
- package/build/cjs/context/projectSettingsContext/ProjectSettingsContext.js.map +1 -1
- package/build/cjs/models/constructor-items/common.d.ts +8 -1
- package/build/cjs/models/constructor-items/common.js +1 -0
- package/build/cjs/models/constructor-items/common.js.map +1 -1
- package/build/docs/INDEX.md +191 -0
- package/build/docs/blocks/Banner.md +59 -0
- package/build/docs/blocks/CardLayout.md +79 -0
- package/build/docs/blocks/Companies.md +67 -0
- package/build/docs/blocks/ContentLayout.md +54 -0
- package/build/docs/blocks/ExtendedFeatures.md +74 -0
- package/build/docs/blocks/FilterBlock.md +112 -0
- package/build/docs/blocks/FoldableList.md +78 -0
- package/build/docs/blocks/Footer.md +110 -0
- package/build/docs/blocks/Form.md +89 -0
- package/build/docs/blocks/Header.md +70 -0
- package/build/docs/blocks/HeaderSlider.md +70 -0
- package/build/docs/blocks/Hero.md +67 -0
- package/build/docs/blocks/Icons.md +61 -0
- package/build/docs/blocks/Info.md +73 -0
- package/build/docs/blocks/Map.md +81 -0
- package/build/docs/blocks/Media.md +63 -0
- package/build/docs/blocks/PromoFeaturesBlock.md +74 -0
- package/build/docs/blocks/Questions.md +78 -0
- package/build/docs/blocks/Share.md +45 -0
- package/build/docs/blocks/Slider.md +89 -0
- package/build/docs/blocks/SliderOld.md +63 -0
- package/build/docs/blocks/Table.md +64 -0
- package/build/docs/blocks/Tabs.md +92 -0
- package/build/docs/guides/data-preparation-ru.md +257 -0
- package/build/docs/guides/data-preparation.md +259 -0
- package/build/docs/sub-blocks/BackgroundCard.md +63 -0
- package/build/docs/sub-blocks/BannerCard.md +57 -0
- package/build/docs/sub-blocks/BasicCard.md +60 -0
- package/build/docs/sub-blocks/Content.md +58 -0
- package/build/docs/sub-blocks/Divider.md +47 -0
- package/build/docs/sub-blocks/HubspotForm.md +47 -0
- package/build/docs/sub-blocks/ImageCard.md +59 -0
- package/build/docs/sub-blocks/LayoutItem.md +70 -0
- package/build/docs/sub-blocks/MediaCard.md +66 -0
- package/build/docs/sub-blocks/PriceCard.md +60 -0
- package/build/docs/sub-blocks/PriceDetailed.md +74 -0
- package/build/docs/sub-blocks/Quote.md +74 -0
- package/build/esm/components/ReactPlayer/ReactPlayer.css +0 -50
- package/build/esm/components/ReactPlayer/ReactPlayer.js +4 -16
- package/build/esm/components/ReactPlayer/ReactPlayer.js.map +1 -1
- package/build/esm/components/VideoBlock/VideoBlock.css +0 -30
- package/build/esm/components/VideoBlock/VideoBlock.d.ts +2 -1
- package/build/esm/components/VideoBlock/VideoBlock.js +19 -3
- package/build/esm/components/VideoBlock/VideoBlock.js.map +1 -1
- package/build/esm/components/VideoButton/VideoButton.css +64 -0
- package/build/esm/components/VideoButton/VideoButton.d.ts +10 -0
- package/build/esm/components/VideoButton/VideoButton.js +48 -0
- package/build/esm/components/VideoButton/VideoButton.js.map +1 -0
- package/build/esm/context/projectSettingsContext/ProjectSettingsContext.d.ts +7 -0
- package/build/esm/context/projectSettingsContext/ProjectSettingsContext.js.map +1 -1
- package/build/esm/models/constructor-items/common.d.ts +8 -1
- package/build/esm/models/constructor-items/common.js +1 -0
- package/build/esm/models/constructor-items/common.js.map +1 -1
- package/package.json +3 -2
- package/server/models/constructor-items/common.d.ts +8 -1
- package/server/models/constructor-items/common.js +1 -0
- package/widget/index.js +1 -1
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# ExtendedFeatures
|
|
2
|
+
|
|
3
|
+
Renders a responsive grid of feature cards, each with an icon, title, text, an optional label (`New` / `Preview`), and an optional link. Use it to present a list of product features, capabilities, or benefits in a compact, icon-driven layout.
|
|
4
|
+
|
|
5
|
+
## Block type
|
|
6
|
+
|
|
7
|
+
`type: 'extended-features-block'`
|
|
8
|
+
|
|
9
|
+
## When to use
|
|
10
|
+
|
|
11
|
+
- Showcasing a set of features or capabilities with a small icon each.
|
|
12
|
+
- Highlighting new or preview items via a built-in `New` / `Preview` label.
|
|
13
|
+
- When you need per-item links to documentation or landing pages.
|
|
14
|
+
|
|
15
|
+
## Example
|
|
16
|
+
|
|
17
|
+
```json
|
|
18
|
+
{
|
|
19
|
+
"type": "extended-features-block",
|
|
20
|
+
"title": {"text": "Lorem ipsum dolor sit amet"},
|
|
21
|
+
"description": "Three **cards in a row on the desktop**, two cards in a row on a tablet, one card in a row on a mobile phone.",
|
|
22
|
+
"items": [
|
|
23
|
+
{
|
|
24
|
+
"title": "Sed do eiusmod tempor incididunt",
|
|
25
|
+
"text": "Ut enim ad minim veniam [quis nostrud](https://example.com) ullamco laboris nisi ut aliquip ex ea commodo consequat.",
|
|
26
|
+
"icon": {"light": "/story-assets/icon_1_light.svg", "dark": "/story-assets/icon_1_dark.svg"}
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"title": "Sed do eiusmod tempor",
|
|
30
|
+
"text": "Ut enim ad minim veniam [quis nostrud](https://example.com) ullamco laboris nisi ut aliquip ex ea commodo consequat.",
|
|
31
|
+
"icon": {"light": "/story-assets/icon_2_light.svg", "dark": "/story-assets/icon_2_dark.svg"},
|
|
32
|
+
"label": "New"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"title": "Sed do eiusmod tempor incididunt",
|
|
36
|
+
"text": "Ut enim ad minim veniam [quis nostrud](https://example.com) ullamco laboris nisi ut aliquip ex ea commodo consequat.",
|
|
37
|
+
"icon": {"light": "/story-assets/icon_3_light.svg", "dark": "/story-assets/icon_3_dark.svg"},
|
|
38
|
+
"link": {"text": "Go", "url": "#", "arrow": true, "theme": "normal"}
|
|
39
|
+
}
|
|
40
|
+
]
|
|
41
|
+
}
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Properties
|
|
45
|
+
|
|
46
|
+
| Property | Type | Default | Description |
|
|
47
|
+
| ------------- | ------------------------------------------------- | ------------------------- | --------------------------------------------------------------------------------------------------- |
|
|
48
|
+
| `title` | `string \| TitleProps` | — | Block heading (string or Title options). |
|
|
49
|
+
| `description` | `string` | — | YFM subtitle shown under the title. |
|
|
50
|
+
| `items` | `ExtendedFeaturesItem[]` | — | Array of feature cards (see below). |
|
|
51
|
+
| `colSizes` | `{all?, sm?, md?, lg?, xl?}` (each `number` 1–12) | `{all: 12, sm: 6, md: 4}` | Column width per breakpoint for a single feature. |
|
|
52
|
+
| `animated` | `boolean` | — | Enables entrance animation for the block. |
|
|
53
|
+
|
|
54
|
+
### `ExtendedFeaturesItem`
|
|
55
|
+
|
|
56
|
+
| Property | Type | Default | Description |
|
|
57
|
+
| -------- | ----------------------------- | ------- | ------------------------------------------------------------------------------- |
|
|
58
|
+
| `title` | `string` | — | Feature title. Rendered as `<h3>` when the block has a title, otherwise `<h2>`. |
|
|
59
|
+
| `text` | `string` | — | YFM body text. |
|
|
60
|
+
| `label` | `'New' \| 'Preview'` | — | Small badge rendered next to the title. |
|
|
61
|
+
| `link` | `LinkProps` | — | Single link rendered below the text. |
|
|
62
|
+
| `icon` | `ImageProps \| {light, dark}` | — | Icon image shown above the title. |
|
|
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
|
+
`icon` accepts either a plain value or a `{light, dark}` object resolved against the active runtime theme.
|
|
71
|
+
|
|
72
|
+
## Storybook
|
|
73
|
+
|
|
74
|
+
[ExtendedFeatures](https://preview.gravity-ui.com/page-constructor/?path=/docs/blocks-extendedfeatures--docs)
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
# FilterBlock
|
|
2
|
+
|
|
3
|
+
Renders a set of cards grouped by tags, with a row of toggle buttons that lets the visitor filter the visible cards by tag. Use it to present a catalog of cards (articles, features, products) that the user can narrow down without leaving the page.
|
|
4
|
+
|
|
5
|
+
## Block type
|
|
6
|
+
|
|
7
|
+
`type: 'filter-block'`
|
|
8
|
+
|
|
9
|
+
## When to use
|
|
10
|
+
|
|
11
|
+
- A catalog or gallery of cards that should be filterable by category.
|
|
12
|
+
- When you want tag-style toggle buttons above the cards.
|
|
13
|
+
- When the same card may belong to multiple categories.
|
|
14
|
+
|
|
15
|
+
## Example
|
|
16
|
+
|
|
17
|
+
```json
|
|
18
|
+
{
|
|
19
|
+
"type": "filter-block",
|
|
20
|
+
"title": "Filter Block Example",
|
|
21
|
+
"description": "Three **cards in a row on the desktop**, two cards in a row on a tablet, one card in a row on a mobile phone.",
|
|
22
|
+
"allTag": false,
|
|
23
|
+
"tagButtonSize": "l",
|
|
24
|
+
"centered": false,
|
|
25
|
+
"tags": [
|
|
26
|
+
{"id": "one", "label": "First category"},
|
|
27
|
+
{"id": "two", "label": "Second category"},
|
|
28
|
+
{"id": "three", "label": "Third category"}
|
|
29
|
+
],
|
|
30
|
+
"items": [
|
|
31
|
+
{
|
|
32
|
+
"tags": ["one"],
|
|
33
|
+
"card": {
|
|
34
|
+
"type": "layout-item",
|
|
35
|
+
"media": {
|
|
36
|
+
"dark": {"image": "/story-assets/img-mini_4-12_dark.png"},
|
|
37
|
+
"light": {"image": "/story-assets/img-mini_4-12_light.png"}
|
|
38
|
+
},
|
|
39
|
+
"content": {"title": "Card 1", "text": "Dolor sit amet consectetur adipiscing elit"}
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"tags": ["two"],
|
|
44
|
+
"card": {
|
|
45
|
+
"type": "layout-item",
|
|
46
|
+
"media": {
|
|
47
|
+
"dark": {"image": "/story-assets/img-mini_4-12_dark.png"},
|
|
48
|
+
"light": {"image": "/story-assets/img-mini_4-12_light.png"}
|
|
49
|
+
},
|
|
50
|
+
"content": {"title": "Card 2", "text": "Sed do eiusmod tempor incididunt ut labore"}
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"tags": ["three"],
|
|
55
|
+
"card": {
|
|
56
|
+
"type": "layout-item",
|
|
57
|
+
"media": {
|
|
58
|
+
"dark": {"image": "/story-assets/img-mini_4-12_dark.png"},
|
|
59
|
+
"light": {"image": "/story-assets/img-mini_4-12_light.png"}
|
|
60
|
+
},
|
|
61
|
+
"content": {"title": "Card 3", "text": "Et dolore magna aliqua ut enim ad minim"}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
],
|
|
65
|
+
"colSizes": {"all": 12, "xl": 4, "lg": 4, "md": 6, "sm": 12}
|
|
66
|
+
}
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## Properties
|
|
70
|
+
|
|
71
|
+
| Property | Type | Default | Description |
|
|
72
|
+
| ------------------ | ------------------------------------------------- | ------------------------- | -------------------------------------------------------------------------------------------------------------------------------- |
|
|
73
|
+
| `title` | `string \| TitleProps` | — | Block heading (string or Title options). |
|
|
74
|
+
| `description` | `string` | — | YFM subtitle shown under the title. |
|
|
75
|
+
| `tags` _required_ | `FilterTag[]` | — | Tag definitions used as filter toggles (see below). |
|
|
76
|
+
| `items` _required_ | `FilterItem[]` | — | Cards to filter (see below). |
|
|
77
|
+
| `allTag` | `boolean \| string \| FilterTag` | — | Adds an "All" toggle. `true` uses the default label; a string overrides the label; an object supplies `{label, analyticsEvent}`. |
|
|
78
|
+
| `tagButtonSize` | `'s' \| 'm' \| 'l' \| 'xl'` | — | Size of the filter tag buttons. |
|
|
79
|
+
| `centered` | `boolean` | `false` | Centers the header and the tag button row. |
|
|
80
|
+
| `colSizes` | `{all?, sm?, md?, lg?, xl?}` (each `number` 1–12) | `{all: 12, sm: 6, md: 4}` | Column width per breakpoint for a single card. |
|
|
81
|
+
| `animated` | `boolean` | — | Enables entrance animation for the block. |
|
|
82
|
+
|
|
83
|
+
### `FilterTag`
|
|
84
|
+
|
|
85
|
+
| Property | Type | Default | Description |
|
|
86
|
+
| ------------------ | ---------------------- | ------- | ------------------------------------------------------------------ |
|
|
87
|
+
| `id` _required_ | `string` | — | Tag identifier. Must match at least one value in an item's `tags`. |
|
|
88
|
+
| `label` _required_ | `string` | — | Tag button label. |
|
|
89
|
+
| `analyticsEvent` | `AnalyticsEventSchema` | — | Analytics event fired when the tag is selected. |
|
|
90
|
+
|
|
91
|
+
### `FilterItem`
|
|
92
|
+
|
|
93
|
+
| Property | Type | Default | Description |
|
|
94
|
+
| ----------------- | ----------- | ------- | ---------------------------------------------------------------------------------------------------------- |
|
|
95
|
+
| `tags` _required_ | `string[]` | — | Tag ids this card belongs to. |
|
|
96
|
+
| `card` _required_ | `CardBlock` | — | Card sub-block to render (any of the `cards` definitions, e.g. `layout-item`, `basic-card`, `image-card`). |
|
|
97
|
+
|
|
98
|
+
### Common properties
|
|
99
|
+
|
|
100
|
+
Inherits common block properties: `anchor`, `visible`, `indent` (`{top?, bottom?}`), `qa`, `className`, `animated`, `theme` (`'light' | 'dark'`), `when`, `context`. See the root README for details.
|
|
101
|
+
|
|
102
|
+
## Children / sub-blocks
|
|
103
|
+
|
|
104
|
+
Cards are declared inside `items[].card` (not via a top-level `children` array). Each `card` may be any sub-block registered under the `cards` definition (`basic-card`, `image-card`, `background-card`, `price-card`, `layout-item`, etc.). The filtered cards are laid out via an internal `card-layout-block`.
|
|
105
|
+
|
|
106
|
+
## Themed values
|
|
107
|
+
|
|
108
|
+
No dedicated themed props on the block itself; individual card `media`/`background` may still accept `{light, dark}` objects per their own schemas.
|
|
109
|
+
|
|
110
|
+
## Storybook
|
|
111
|
+
|
|
112
|
+
[FilterBlock](https://preview.gravity-ui.com/page-constructor/?path=/docs/blocks-filterblock--docs)
|
|
@@ -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)
|