@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,57 @@
1
+ # BannerCard
2
+
3
+ A compact banner card with a title, optional subtitle, a single call-to-action button, and a decorative background image. Designed to draw attention inside a card layout.
4
+
5
+ ## Sub-block type
6
+
7
+ `type: 'banner-card'`
8
+
9
+ > The schema for this sub-block is defined in `src/blocks/Banner/schema.ts` (`BannerCardProps`) and shared with the standalone `banner-block`.
10
+
11
+ ## Used in
12
+
13
+ Accepted as a child of: `card-layout-block`, `slider-block`, `slider-old-block`.
14
+
15
+ ## Example
16
+
17
+ ```json
18
+ {
19
+ "type": "banner-card",
20
+ "title": "Try the new release",
21
+ "subtitle": "Faster builds, simpler APIs, and improved theming.",
22
+ "image": {
23
+ "light": "/story-assets/banner_light.png",
24
+ "dark": "/story-assets/banner_dark.png"
25
+ },
26
+ "color": "#0275d8",
27
+ "theme": "light",
28
+ "mediaView": "full",
29
+ "button": {
30
+ "text": "Get started",
31
+ "url": "https://example.com",
32
+ "target": "_blank",
33
+ "theme": "raised"
34
+ }
35
+ }
36
+ ```
37
+
38
+ ## Properties
39
+
40
+ | Property | Type | Default | Description |
41
+ | ------------------- | ------------------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
42
+ | `type` _required_ | `'banner-card'` | — | Sub-block discriminator. |
43
+ | `when` | `string` | — | Conditional rendering expression. |
44
+ | `animated` | `boolean` | — | Enables entrance animation. |
45
+ | `title` _required_ | `string` | — | Banner heading (rendered as `<h2>`, plain text). |
46
+ | `subtitle` | `string` | — | Secondary text (YFM supported). |
47
+ | `image` | `string \| {light, dark}` | — | Decorative background image URL (themed). |
48
+ | `mediaView` | `'fit' \| 'full'` | `'full'` | How the background media fills the banner. |
49
+ | `disableCompress` | `boolean` | — | Disables image compression for `image`. |
50
+ | `color` | `string \| {light, dark}` | — | Background color (CSS value, themed). Applied to the content layer. |
51
+ | `theme` | `'light' \| 'dark'` | `'light'` | Text color theme. |
52
+ | `width` | `'s' \| 'm' \| 'l'` | — | Banner width. |
53
+ | `button` _required_ | `ButtonProps` | — | Single call-to-action button. Uses only `text`, `url`, `target`, `theme` (`'raised'` by default). |
54
+
55
+ ## Themed values
56
+
57
+ `image` and `color` each accept either a plain value or a `{light, dark}` object resolved against the active runtime theme.
@@ -0,0 +1,60 @@
1
+ # BasicCard
2
+
3
+ A general-purpose card with an optional icon (image or Gravity UI icon) and text content (title, text, links, buttons, or a content list). The simplest and most versatile card.
4
+
5
+ ## Sub-block type
6
+
7
+ `type: 'basic-card'`
8
+
9
+ ## Used in
10
+
11
+ Accepted as a child of: `card-layout-block`, `slider-block`, `slider-old-block`.
12
+
13
+ ## Example
14
+
15
+ ```json
16
+ {
17
+ "type": "basic-card",
18
+ "title": "Tell a story",
19
+ "text": "**Ut enim ad minim veniam** [quis nostrud](https://example.com) exercitation ullamco.",
20
+ "icon": {
21
+ "light": "/story-assets/icon_1_light.svg",
22
+ "dark": "/story-assets/icon_1_dark.svg"
23
+ },
24
+ "iconPosition": "top",
25
+ "url": "https://example.com",
26
+ "urlTitle": "Opens in a new tab",
27
+ "buttons": [{"text": "Read more", "theme": "action", "url": "https://example.com"}]
28
+ }
29
+ ```
30
+
31
+ ## Properties
32
+
33
+ | Property | Type | Default | Description |
34
+ | ---------------------- | -------------------------------------------- | ----------- | -------------------------------------------------------------------------------------------------------- |
35
+ | `type` _required_ | `'basic-card'` | — | Sub-block discriminator. |
36
+ | `when` | `string` | — | Conditional rendering expression. |
37
+ | `title` | `string \| TitleProps` | — | Card title (plain string or Title options). |
38
+ | `text` | `string` | — | Body text (YFM supported). |
39
+ | `additionalInfo` | `string` | — | Secondary gray text (YFM supported). |
40
+ | `size` | `'s' \| 'm' \| 'l' \| 'xl'` | `'s'` | Content size; controls font sizes. |
41
+ | `links` | `LinkProps[]` | — | Array of links. |
42
+ | `buttons` | `ButtonProps[]` | — | Array of buttons. |
43
+ | `list` | `ContentItem[]` | — | Array of icon-content items (each requires `icon` or `gravityIcon`). |
44
+ | `border` | `'line' \| 'shadow' \| 'none'` | — | Card border style. |
45
+ | `controlPosition` | `'content' \| 'footer'` | `'content'` | Position of buttons/links inside the card. |
46
+ | `url` | `string` | — | Wraps the whole card in a link. |
47
+ | `urlTitle` | `string` | — | `title` attribute for the card link. |
48
+ | `target` | `'_blank' \| '_parent' \| '_top' \| '_self'` | — | Link target. |
49
+ | `icon` | `ImageProps` | — | Leading icon image (URL string, object, or device-aware object). |
50
+ | `gravityIcon` | `GravityIconProps` | — | Leading Gravity UI icon (`string` name, or `{name, color?}` where `color` is `'brand' \| 'text-color'`). |
51
+ | `iconPosition` | `'top' \| 'left'` | `'top'` | Position of the icon relative to the content. |
52
+ | `hoverBackgroundColor` | `string` | — | _Deprecated._ Background color/gradient applied on hover. |
53
+
54
+ ## Themed values
55
+
56
+ `icon` and `gravityIcon` accept either a plain value or a `{light, dark}` object resolved against the active runtime theme.
57
+
58
+ ## Storybook
59
+
60
+ [BasicCard](https://preview.gravity-ui.com/page-constructor/?path=/docs/components-cards-basiccard--docs)
@@ -0,0 +1,58 @@
1
+ # Content
2
+
3
+ A text content block rendering a title, body text, additional info, links, buttons, and/or an icon content list. Used on its own as the textual portion of a content layout.
4
+
5
+ ## Sub-block type
6
+
7
+ `type: 'content'`
8
+
9
+ ## Used in
10
+
11
+ Accepted as `textContent` of: `content-layout-block`.
12
+
13
+ ## Example
14
+
15
+ ```json
16
+ {
17
+ "type": "content",
18
+ "title": "Lorem ipsum",
19
+ "text": "**Ut enim ad minim veniam** [quis nostrud](https://example.com) exercitation ullamco laboris.",
20
+ "additionalInfo": "Duis aute irure dolor in reprehenderit.",
21
+ "size": "l",
22
+ "centered": false,
23
+ "links": [{"url": "#", "text": "Link", "theme": "normal", "arrow": true}],
24
+ "buttons": [{"text": "Button", "theme": "action", "url": "https://example.com"}],
25
+ "list": [
26
+ {
27
+ "icon": {"light": "/story-assets/icon_1_light.svg", "dark": "/story-assets/icon_1_dark.svg"},
28
+ "title": "Lorem ipsum",
29
+ "text": "Ut enim ad minim veniam quis nostrud exercitation."
30
+ }
31
+ ]
32
+ }
33
+ ```
34
+
35
+ ## Properties
36
+
37
+ | Property | Type | Default | Description |
38
+ | ----------------- | ------------------------------------------------- | ------------------ | --------------------------------------------------------------------------------------------------- |
39
+ | `type` _required_ | `'content'` | — | Sub-block discriminator. |
40
+ | `title` | `string \| TitleProps` | — | Heading (plain string or Title options). |
41
+ | `text` | `string` | — | Body text (YFM supported). |
42
+ | `additionalInfo` | `string` | — | Secondary gray text (YFM supported). |
43
+ | `size` | `'s' \| 'm' \| 'l' \| 'xl'` | `'l'` | Content size; controls font sizes. |
44
+ | `centered` | `boolean` | `false` | Centers all content horizontally. |
45
+ | `theme` | `'default' \| 'dark' \| 'light'` | — | Content theme. |
46
+ | `links` | `LinkProps[]` | — | Array of links. |
47
+ | `buttons` | `ButtonProps[]` | — | Array of buttons. |
48
+ | `list` | `ContentItem[]` | — | Array of icon-content items (each requires `icon` or `gravityIcon`). |
49
+ | `controlPosition` | `'default' \| 'bottom'` | `'default'` | Position of buttons/links. |
50
+ | `colSizes` | `{all?, sm?, md?, lg?, xl?}` (each `number` 1–12) | `{all: 12, sm: 8}` | Column width per breakpoint. |
51
+
52
+ ## Themed values
53
+
54
+ `icon`/`gravityIcon` inside `list` items accept either a plain value or a `{light, dark}` object resolved against the active runtime theme.
55
+
56
+ ## Storybook
57
+
58
+ [Content](https://preview.gravity-ui.com/page-constructor/?path=/docs/components-content--docs)
@@ -0,0 +1,47 @@
1
+ # Divider
2
+
3
+ A spacing/separator element that adds vertical space between sibling items, optionally drawing a horizontal line. Useful for tuning rhythm inside a layout.
4
+
5
+ ## Sub-block type
6
+
7
+ `type: 'divider'`
8
+
9
+ ## Used in
10
+
11
+ Registered both as a sub-block and as a standalone block; appears in the page `blocks` array.
12
+
13
+ ## Example
14
+
15
+ ```json
16
+ {
17
+ "type": "divider",
18
+ "size": "m"
19
+ }
20
+ ```
21
+
22
+ With a horizontal line:
23
+
24
+ ```json
25
+ {
26
+ "type": "divider",
27
+ "size": "l",
28
+ "border": true
29
+ }
30
+ ```
31
+
32
+ ## Properties
33
+
34
+ | Property | Type | Default | Description |
35
+ | ----------------- | ---------------------------------------------------------------------- | ------- | ----------------------------------------------------------------- |
36
+ | `type` _required_ | `'divider'` | — | Sub-block discriminator. |
37
+ | `when` | `string` | — | Conditional rendering expression. |
38
+ | `size` | `'0' \| 'xxs' \| 'xs' \| 's' \| 'm' \| 'l' \| 'xl' \| 'xxl' \| 'xxxl'` | `'m'` | Vertical height of the divider. `'0'` collapses spacing entirely. |
39
+ | `border` | `boolean` | — | When `true`, draws a horizontal line across the full width. |
40
+
41
+ ## Themed values
42
+
43
+ None — `Divider` has no themed properties.
44
+
45
+ ## Storybook
46
+
47
+ [Divider](https://preview.gravity-ui.com/page-constructor/?path=/docs/components-divider--docs)
@@ -0,0 +1,47 @@
1
+ # HubspotForm
2
+
3
+ Embeds a HubSpot form inside a page. Loads the HubSpot scripts on demand and renders the form into a container; emits analytics events on submit and supports default field values and form event handlers.
4
+
5
+ ## Sub-block type
6
+
7
+ `type: 'hubspot-form'`
8
+
9
+ ## Used in
10
+
11
+ Accepted as `children` by `CardLayout`, `Slider`, `SliderOld`; also usable inside any block that renders sub-blocks (e.g. `FilterBlock` items).
12
+
13
+ ## Example
14
+
15
+ ```json
16
+ {
17
+ "type": "hubspot-form",
18
+ "region": "eu1",
19
+ "portalId": "25764979",
20
+ "formId": "a3eb06a6-e8ce-45d4-81bd-7fadb7dab313"
21
+ }
22
+ ```
23
+
24
+ ## Properties
25
+
26
+ | Property | Type | Default | Description |
27
+ | --------------------- | ---------------- | ------- | -------------------------------------------------------------------------------- |
28
+ | `type` _required_ | `'hubspot-form'` | — | Sub-block discriminator. |
29
+ | `when` | `string` | — | Conditional rendering expression. |
30
+ | `portalId` _required_ | `string` | — | HubSpot portal ID. |
31
+ | `formId` _required_ | `string` | — | HubSpot form ID. |
32
+ | `region` | `string` | — | HubSpot region (e.g. `'eu1'`, `'na1'`). |
33
+ | `formInstanceId` | `string` | — | Unique instance ID, required to render the same form multiple times on one page. |
34
+
35
+ Additional runtime-only props (`className`, `theme`, `isMobile`, `formClassName`, `createDOMElement`, `defaultValues`, `onBeforeLoad` / `onBeforeSubmit` / `onSubmit` / `onLoad` / `hubspotEvents`) are available on the React component but are not part of the JSON schema.
36
+
37
+ ## Setup notes
38
+
39
+ HubSpot forms require the `formsContext` to be configured on `PageConstructorProvider`. The context wires form event handling and any HubSpot-specific runtime configuration; without it, submit analytics and the `onSubmit` / `onBeforeSubmit` / `onLoad` handlers wired through `useHandleHubspotEvents` will not fire. When the form is rendered inside an iframe, set up the `useLoopBackHubspotEvents` hook on the top-level frame so events propagate.
40
+
41
+ ## Themed values
42
+
43
+ No themed media fields; theme is taken from the active theme context (or the `theme` runtime prop).
44
+
45
+ ## Storybook
46
+
47
+ [HubspotForm](https://preview.gravity-ui.com/page-constructor/?path=/docs/components-hubspotform--docs)
@@ -0,0 +1,59 @@
1
+ # ImageCard
2
+
3
+ A card pairing a foreground image with text content (title, text, links, buttons, or a content list). The image and content can be ordered in either direction.
4
+
5
+ ## Sub-block type
6
+
7
+ `type: 'image-card'`
8
+
9
+ ## Used in
10
+
11
+ Accepted as a child of: `card-layout-block`, `slider-block`, `slider-old-block`.
12
+
13
+ ## Example
14
+
15
+ ```json
16
+ {
17
+ "type": "image-card",
18
+ "title": "Tell a story and build a narrative",
19
+ "text": "We are all storytellers. Stories are a powerful way to communicate ideas.",
20
+ "image": {
21
+ "dark": "/story-assets/img_8-12_dark.png",
22
+ "light": "/story-assets/img_8-12_light.png"
23
+ },
24
+ "direction": "direct",
25
+ "border": "shadow"
26
+ }
27
+ ```
28
+
29
+ ## Properties
30
+
31
+ | Property | Type | Default | Description |
32
+ | ------------------ | ------------------------------------ | ----------- | ------------------------------------------------------------------------------------------------------ |
33
+ | `type` _required_ | `'image-card'` | — | Sub-block discriminator. |
34
+ | `when` | `string` | — | Conditional rendering expression. |
35
+ | `image` _required_ | `ImageProps` | — | Foreground image (URL string, object, or device-aware object). |
36
+ | `title` | `string \| TitleProps` | — | Card title (plain string or Title options). |
37
+ | `text` | `string` | — | Body text (YFM supported). |
38
+ | `additionalInfo` | `string` | — | Secondary gray text (YFM supported). |
39
+ | `size` | `'s' \| 'm' \| 'l' \| 'xl'` | `'s'` | Content size; controls font sizes. |
40
+ | `theme` | `'default' \| 'dark' \| 'light'` | `'default'` | Content theme. |
41
+ | `links` | `LinkProps[]` | — | Array of links. |
42
+ | `buttons` | `ButtonProps[]` | — | Array of buttons. |
43
+ | `list` | `ContentItem[]` | — | Array of icon-content items (each requires `icon` or `gravityIcon`). |
44
+ | `border` | `'line' \| 'shadow' \| 'none'` | `'shadow'` | Card border style. |
45
+ | `controlPosition` | `'content' \| 'footer'` | `'content'` | Position of buttons/links inside the card. |
46
+ | `direction` | `'direct' \| 'reverse'` | `'direct'` | Image/content order: `direct` = image first, `reverse` = content first. |
47
+ | `margins` | `'s' \| 'm'` | — | Internal margins around the image. |
48
+ | `backgroundColor` | `string` | — | Solid background color (CSS value). |
49
+ | `url` | `string` | — | Wraps the whole card in a link. |
50
+ | `urlTitle` | `string` | — | `title` attribute for the card link. |
51
+ | `analyticsEvents` | `AnalyticsEvent \| AnalyticsEvent[]` | — | Analytics events fired on card interaction. |
52
+
53
+ ## Themed values
54
+
55
+ `image` accepts either a plain value or a `{light, dark}` object resolved against the active runtime theme.
56
+
57
+ ## Storybook
58
+
59
+ [ImageCard](https://preview.gravity-ui.com/page-constructor/?path=/docs/components-cards-imagecard--docs)
@@ -0,0 +1,75 @@
1
+ # LayoutItem
2
+
3
+ Renders a two-part card: a media area (image, video, YouTube, etc.) stacked above a text content area with optional title, body, buttons, links, list, and meta info. Used as the primary content unit inside card-grid blocks.
4
+
5
+ ## Sub-block type
6
+
7
+ `type: 'layout-item'`
8
+
9
+ ## Used in
10
+
11
+ Accepted as `children` by `CardLayout`, `Slider`, `SliderOld`; also used as the card payload in `FilterBlock` items.
12
+
13
+ ## Example
14
+
15
+ ```json
16
+ {
17
+ "type": "layout-item",
18
+ "content": {
19
+ "title": "Lorem ipsum",
20
+ "text": "Dolor sit *amet*",
21
+ "buttons": [
22
+ {"text": "Button 1", "theme": "action", "url": "#test1"},
23
+ {"text": "Button 2", "theme": "outlined", "url": "#test2"}
24
+ ]
25
+ },
26
+ "media": {
27
+ "light": {"image": "/assets/light.png"},
28
+ "dark": {"image": "/assets/dark.png"}
29
+ },
30
+ "url": "https://example.com",
31
+ "target": "_blank"
32
+ }
33
+ ```
34
+
35
+ ## Properties
36
+
37
+ | Property | Type | Default | Description |
38
+ | -------------------- | -------------------------------------------- | ----------- | --------------------------------------------------------------------------------------------- |
39
+ | `type` _required_ | `'layout-item'` | — | Sub-block discriminator. |
40
+ | `when` | `string` | — | Conditional rendering expression. |
41
+ | `content` _required_ | `object` | — | Text content area. See below. |
42
+ | `media` _required_ | `MediaProps \| {light, dark}` | — | Media area (image / video / youtube / iframe / dataLens). Themed: `T \| {light: T, dark: T}`. |
43
+ | `contentMargin` | `'m' \| 'l'` | `'m'` | Spacing between the media and the content. |
44
+ | `metaInfo` | `string[]` | — | List of meta strings rendered under the media (YFM supported). |
45
+ | `border` | `boolean` | — | Adds a border to the media. |
46
+ | `fullscreen` | `boolean` | — | Enables fullscreen-expandable media (icon + overlay). |
47
+ | `controlPosition` | `'content' \| 'footer'` | `'content'` | Where buttons/links render: inline in the content or at the card footer. |
48
+ | `url` | `string` | — | Makes the entire card a link. Linked cards animate their image on hover. |
49
+ | `urlTitle` | `string` | — | Native `title` attribute for the card link. |
50
+ | `target` | `'_blank' \| '_parent' \| '_top' \| '_self'` | — | Link target. |
51
+ | `analyticsEvents` | `AnalyticsEvent \| AnalyticsEvent[]` | — | Analytics events fired on media interaction. |
52
+
53
+ ### `content` object
54
+
55
+ Inherits the `Content` schema (without `colSizes` / `centered`):
56
+
57
+ | Property | Type | Default | Description |
58
+ | ----------------- | -------------------------------- | ------- | --------------------------------------------------------------------- |
59
+ | `title` | `string \| TitleProps` | — | Card title (plain text or a title options object). |
60
+ | `text` | `string` (YFM) | — | Body text in YFM Markdown. |
61
+ | `additionalInfo` | `string` (YFM) | — | Secondary text block below the body. |
62
+ | `size` | `'s' \| 'm' \| 'l' \| 'xl'` | `'s'` | Text/content scale. |
63
+ | `theme` | `'default' \| 'dark' \| 'light'` | — | Content color theme. |
64
+ | `links` | `LinkProps[]` | — | Inline links (each requires `text` + `url`). |
65
+ | `buttons` | `ButtonProps[]` | — | Inline buttons (each requires `text` + `url`). |
66
+ | `list` | `ContentItem[]` | — | Icon + title + text list. Each item requires `icon` or `gravityIcon`. |
67
+ | `controlPosition` | `'default' \| 'bottom'` | — | Inline positioning of buttons/links within the content. |
68
+
69
+ ## Themed values
70
+
71
+ `media` (and the deprecated `icon`) accept `T | {light: T, dark: T}` and are resolved at runtime via the active theme.
72
+
73
+ ## Storybook
74
+
75
+ [LayoutItem](https://preview.gravity-ui.com/page-constructor/?path=/docs/components-cards-layoutitem--docs)
@@ -0,0 +1,66 @@
1
+ # MediaCard
2
+
3
+ Wraps a single media element (image, image slider, video, YouTube, iframe, or DataLens) inside a card with an optional border. Pure media card — no text content.
4
+
5
+ ## Sub-block type
6
+
7
+ `type: 'media-card'`
8
+
9
+ ## Used in
10
+
11
+ Accepted as `children` by `CardLayout`, `Slider`, `SliderOld`; also usable as a card payload in `FilterBlock` items.
12
+
13
+ ## Example
14
+
15
+ ```json
16
+ {
17
+ "type": "media-card",
18
+ "image": {
19
+ "src": "/assets/img_6-12_white.png",
20
+ "alt": "Picture",
21
+ "disableCompress": true
22
+ }
23
+ }
24
+ ```
25
+
26
+ Array of images creates a slider:
27
+
28
+ ```json
29
+ {
30
+ "type": "media-card",
31
+ "image": ["/assets/img1.png", "/assets/img2.png", "/assets/img3.png"]
32
+ }
33
+ ```
34
+
35
+ ## Properties
36
+
37
+ | Property | Type | Default | Description |
38
+ | --------------------------------- | --------------------------------------- | ------- | ----------------------------------------------------------- |
39
+ | `type` _required_ | `'media-card'` | — | Sub-block discriminator. |
40
+ | `when` | `string` | — | Conditional rendering expression. |
41
+ | `border` | `'line' \| 'shadow' \| 'none'` | — | Card border style. |
42
+ | `animated` | `boolean` | — | Enables scroll-triggered entrance animation. |
43
+ | `color` | `string` | — | Background color. |
44
+ | `image` | `ImageProps \| ImageProps[]` | — | Single image or array of images (array becomes a slider). |
45
+ | `disableImageSliderForArrayInput` | `boolean` | — | Render an image array as a static grid instead of a slider. |
46
+ | `video` | `VideoProps` | — | Hosted video (`src` array required). |
47
+ | `youtube` | `string` | — | YouTube video URL or ID. |
48
+ | `videoIframe` | `string` | — | Embeddable video iframe URL. |
49
+ | `autoplay` | `boolean` | — | Autoplay video media. |
50
+ | `parallax` | `boolean` | — | Parallax scroll effect on the media. |
51
+ | `height` | `number` | — | Fixed media height in pixels. |
52
+ | `previewImg` | `string` | — | Poster image shown before video playback. |
53
+ | `dataLens` | `string \| {id, theme}` | — | Embedded DataLens chart/object. |
54
+ | `fullscreen` | `boolean` | — | Enables fullscreen-expandable media. |
55
+ | `ratio` | `number \| 'auto'` | — | Aspect ratio of the media. |
56
+ | `iframe` | `{src, name?, title?, height?, width?}` | — | Generic iframe embed (`src` required). |
57
+ | `margins` | `boolean` | — | Adds inner media margins. |
58
+ | `analyticsEvents` | `AnalyticsEvent \| AnalyticsEvent[]` | — | Analytics events fired on media interaction. |
59
+
60
+ ## Themed values
61
+
62
+ `color`, `image`, and other media fields resolve themed values (`T | {light: T, dark: T}`) at runtime via the active theme.
63
+
64
+ ## Storybook
65
+
66
+ [MediaCard](https://preview.gravity-ui.com/page-constructor/?path=/docs/components-cards-mediacard--docs)
@@ -0,0 +1,60 @@
1
+ # PriceCard
2
+
3
+ Renders a pricing card: a title, a price (with optional period and details), a description, a checklist of features, and optional buttons and links. Typically placed in a grid to compare plans.
4
+
5
+ ## Sub-block type
6
+
7
+ `type: 'price-card'`
8
+
9
+ ## Used in
10
+
11
+ Accepted as `children` by `CardLayout`, `Slider`, `SliderOld`; also usable as a card payload in `FilterBlock` items.
12
+
13
+ ## Example
14
+
15
+ ```json
16
+ {
17
+ "type": "price-card",
18
+ "title": "Lorem ipsum",
19
+ "price": "299.99 $",
20
+ "pricePeriod": "month",
21
+ "priceDetails": "plan details",
22
+ "description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
23
+ "list": [
24
+ "Ut enim ad minim veniam [quis nostrud](https://example.com) exercitation.",
25
+ "Ut enim ad minim veniam [quis nostrud](https://example.com) exercitation."
26
+ ],
27
+ "buttons": [
28
+ {"text": "Choose plan", "url": "https://example.com", "width": "max", "theme": "action"}
29
+ ],
30
+ "theme": "light",
31
+ "backgroundColor": "#CCDAFF"
32
+ }
33
+ ```
34
+
35
+ ## Properties
36
+
37
+ | Property | Type | Default | Description |
38
+ | ------------------ | -------------------------------- | ------- | ---------------------------------------------------------------------------- |
39
+ | `type` _required_ | `'price-card'` | — | Sub-block discriminator. |
40
+ | `when` | `string` | — | Conditional rendering expression. |
41
+ | `border` | `'line' \| 'shadow' \| 'none'` | — | Card border style. |
42
+ | `theme` | `'default' \| 'dark' \| 'light'` | — | Content color theme. |
43
+ | `title` _required_ | `string` (YFM) | — | Plan name rendered as YFM. |
44
+ | `price` _required_ | `string` | — | Price value (e.g. `"299.99 $"`). |
45
+ | `pricePeriod` | `string` | — | Billing period shown after the price (e.g. `"month"`). |
46
+ | `priceDetails` | `string` | — | Small print under the price. |
47
+ | `description` | `string` | — | Short plan description. |
48
+ | `list` | `string[]` | — | Feature list; each item rendered with a check icon (YFM/Markdown supported). |
49
+ | `buttons` | `ButtonProps[]` | — | CTA buttons (each requires `text` + `url`). |
50
+ | `links` | `LinkProps[]` | — | Secondary links (each requires `text` + `url`). |
51
+ | `backgroundColor` | `string` | — | Custom card background color. |
52
+ | `controlPosition` | `'content' \| 'footer'` | — | Where buttons/links render within the card. |
53
+
54
+ ## Themed values
55
+
56
+ `backgroundColor` and color-bearing fields resolve themed values (`T | {light: T, dark: T}`) at runtime via the active theme.
57
+
58
+ ## Storybook
59
+
60
+ [PriceCard](https://preview.gravity-ui.com/page-constructor/?path=/docs/components-cards-pricecard--docs)
@@ -0,0 +1,74 @@
1
+ # PriceDetailed
2
+
3
+ > ⚠️ **Deprecated.** This sub-block is deprecated and will be removed in a future major release. Prefer [`PriceCard`](./PriceCard.md) for pricing cards.
4
+
5
+ Renders a detailed pricing comparison table: each item has a title, a per-unit description, an optional label, and a list of details (either a marked list or a settings list). Supports combined or separate layout, foldable details, and per-color default label text.
6
+
7
+ ## Sub-block type
8
+
9
+ `type: 'price-detailed'`
10
+
11
+ ## Used in
12
+
13
+ Accepted as `children` by `CardLayout`, `Slider`, `SliderOld`.
14
+
15
+ ## Example
16
+
17
+ ```json
18
+ {
19
+ "type": "price-detailed",
20
+ "priceType": "settings",
21
+ "description": {"titleSize": "l", "descriptionSize": "m", "titleColor": "cornflower"},
22
+ "details": {"titleSize": "s", "descriptionSize": "m"},
23
+ "items": [
24
+ {
25
+ "title": "Free",
26
+ "detailedTitle": "",
27
+ "description": "For use by individuals and small teams",
28
+ "label": {"color": "blue", "text": "Free", "size": "s"},
29
+ "items": [{"title": "up to 5 users", "description": "up to 5 users"}]
30
+ }
31
+ ]
32
+ }
33
+ ```
34
+
35
+ ## Properties
36
+
37
+ | Property | Type | Default | Description |
38
+ | ----------------------------- | ----------------------------------------- | -------------- | ----------------------------------------------------------------------------- |
39
+ | `type` _required_ | `'price-detailed'` | — | Sub-block discriminator. |
40
+ | `when` | `string` | — | Conditional rendering expression. |
41
+ | `animated` | `boolean` | — | Enables scroll-triggered entrance animation. |
42
+ | `items` _required_ | `PriceItem[]` | — | Pricing columns/rows. See below. |
43
+ | `description` | `object` | — | Sizing/color overrides for the description block. |
44
+ | `description.titleSize` | `'xs' \| 's' \| 'sm' \| 'm' \| 'l'` | `'l'` | Description title size. |
45
+ | `description.descriptionSize` | `'xs' \| 's' \| 'sm' \| 'm' \| 'l'` | `'m'` | Description body size. |
46
+ | `description.titleColor` | `'cornflower' \| 'black'` | `'cornflower'` | Description title color. |
47
+ | `details` | `object` | — | Sizing overrides for the details block. |
48
+ | `details.titleSize` | `'xs' \| 's' \| 'sm' \| 'm' \| 'l'` | `'s'` | Details title size. |
49
+ | `details.descriptionSize` | `'xs' \| 's' \| 'sm' \| 'm' \| 'l'` | `'m'` | Details body size. |
50
+ | `priceType` | `'marked-list' \| 'settings'` | `'settings'` | Layout of each item's `items` list. |
51
+ | `numberGroupItems` | `3 \| 4 \| 5` | — | Items per row in the combined layout. |
52
+ | `isCombined` | `boolean` | `false` | Use the combined grid layout instead of separate columns. |
53
+ | `useMixedView` | `boolean` | `false` | Mix list item views (extended details on desktop, collapse on tablet/mobile). |
54
+ | `foldable` | `{title*required, size?, titleColor?}` | — | Makes the details section collapsible with a toggle. |
55
+ | `labelsDefaultText` | `{blue?, green?, yellow?, purple?, red?}` | — | Default text used for each label color when an item label has no `text`. |
56
+
57
+ ### `PriceItem` object
58
+
59
+ | Property | Type | Default | Description |
60
+ | ------------------------ | ---------------------------------------------- | ------- | -------------------------------------------------------------------------------------------------------------------------------- |
61
+ | `title` _required_ | `string` | — | Plan title (e.g. `"Free"`, `"100$"`). |
62
+ | `description` _required_ | `string` (YFM) | — | Plan description. |
63
+ | `detailedTitle` | `string` | — | Suffix/qualifier shown next to the title (e.g. `"/ month*"`). |
64
+ | `label` | `{color*required, text?, size?}` | — | Colored label badge. `color`: `'blue' \| 'green' \| 'yellow' \| 'purple' \| 'red'`. `size`: `'xs' \| 's' \| 'sm' \| 'm' \| 'l'`. |
65
+ | `items` | `PriceDetailsList[] \| PriceDetailsSettings[]` | — | Detail list. With `priceType: 'marked-list'` each item requires `text`; with `'settings'` each requires `title` + `description`. |
66
+ | `analyticsEvents` | `AnalyticsEvent \| AnalyticsEvent[]` | — | Analytics events. |
67
+
68
+ ## Themed values
69
+
70
+ This sub-block does not consume themed media; sizing/color controls above are explicit.
71
+
72
+ ## Storybook
73
+
74
+ [PriceDetailed](https://preview.gravity-ui.com/page-constructor/?path=/docs/components-cards-pricedetailed-deprecated--docs)