@gravity-ui/page-constructor 8.2.1 → 8.3.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 (123) hide show
  1. package/README.md +1 -1
  2. package/build/cjs/blocks/ContentLayout/ContentLayout.css +2 -2
  3. package/build/cjs/blocks/ContentLayout/ContentLayout.js +2 -0
  4. package/build/cjs/blocks/ContentLayout/ContentLayout.js.map +1 -1
  5. package/build/cjs/blocks/ContentLayout/schema.d.ts +0 -11
  6. package/build/cjs/blocks/FoldableList/schema.d.ts +0 -11
  7. package/build/cjs/blocks/Form/Form.css +10 -1
  8. package/build/cjs/blocks/Form/Form.js +4 -2
  9. package/build/cjs/blocks/Form/Form.js.map +1 -1
  10. package/build/cjs/blocks/Form/schema.d.ts +0 -11
  11. package/build/cjs/blocks/Header/Header.js +4 -1
  12. package/build/cjs/blocks/Header/Header.js.map +1 -1
  13. package/build/cjs/blocks/Info/schema.d.ts +0 -22
  14. package/build/cjs/blocks/Map/schema.d.ts +0 -11
  15. package/build/cjs/blocks/Media/schema.d.ts +0 -22
  16. package/build/cjs/blocks/Questions/schema.d.ts +0 -11
  17. package/build/cjs/blocks/Tabs/schema.d.ts +0 -11
  18. package/build/cjs/components/Buttons/Buttons.css +2 -2
  19. package/build/cjs/components/Buttons/Buttons.js +2 -0
  20. package/build/cjs/components/Buttons/Buttons.js.map +1 -1
  21. package/build/cjs/components/ContentList/ContentList.css +8 -8
  22. package/build/cjs/components/ContentList/ContentList.js +2 -0
  23. package/build/cjs/components/ContentList/ContentList.js.map +1 -1
  24. package/build/cjs/components/IconWrapper/IconWrapper.css +6 -0
  25. package/build/cjs/components/Links/Links.css +1 -1
  26. package/build/cjs/components/Links/Links.js +2 -0
  27. package/build/cjs/components/Links/Links.js.map +1 -1
  28. package/build/cjs/components/index.d.ts +1 -0
  29. package/build/cjs/components/index.js +3 -1
  30. package/build/cjs/components/index.js.map +1 -1
  31. package/build/cjs/models/constructor-items/blocks.d.ts +9 -19
  32. package/build/cjs/models/constructor-items/blocks.js.map +1 -1
  33. package/build/cjs/models/constructor-items/common.d.ts +1 -1
  34. package/build/cjs/models/constructor-items/common.js.map +1 -1
  35. package/build/cjs/models/constructor-items/sub-blocks.d.ts +6 -6
  36. package/build/cjs/models/constructor-items/sub-blocks.js.map +1 -1
  37. package/build/cjs/schema/constants.d.ts +5 -30
  38. package/build/cjs/schema/validators/common.js +1 -1
  39. package/build/cjs/schema/validators/common.js.map +1 -1
  40. package/build/cjs/sub-blocks/BackgroundCard/schema.d.ts +3 -10
  41. package/build/cjs/sub-blocks/BackgroundCard/schema.js +1 -1
  42. package/build/cjs/sub-blocks/BackgroundCard/schema.js.map +1 -1
  43. package/build/cjs/sub-blocks/BasicCard/schema.d.ts +2 -9
  44. package/build/cjs/sub-blocks/BasicCard/schema.js +1 -1
  45. package/build/cjs/sub-blocks/BasicCard/schema.js.map +1 -1
  46. package/build/cjs/sub-blocks/Content/Content.css +29 -17
  47. package/build/cjs/sub-blocks/Content/Content.js +7 -13
  48. package/build/cjs/sub-blocks/Content/Content.js.map +1 -1
  49. package/build/cjs/sub-blocks/Content/schema.d.ts +0 -100
  50. package/build/cjs/sub-blocks/Content/schema.js +1 -14
  51. package/build/cjs/sub-blocks/Content/schema.js.map +1 -1
  52. package/build/cjs/sub-blocks/ImageCard/schema.d.ts +0 -11
  53. package/build/cjs/sub-blocks/LayoutItem/schema.d.ts +0 -11
  54. package/build/cjs/sub-blocks/LayoutItem/schema.js +1 -1
  55. package/build/cjs/sub-blocks/LayoutItem/schema.js.map +1 -1
  56. package/build/esm/blocks/ContentLayout/ContentLayout.css +2 -2
  57. package/build/esm/blocks/ContentLayout/ContentLayout.js +2 -0
  58. package/build/esm/blocks/ContentLayout/ContentLayout.js.map +1 -1
  59. package/build/esm/blocks/ContentLayout/schema.d.ts +0 -11
  60. package/build/esm/blocks/FoldableList/schema.d.ts +0 -11
  61. package/build/esm/blocks/Form/Form.css +10 -1
  62. package/build/esm/blocks/Form/Form.js +4 -2
  63. package/build/esm/blocks/Form/Form.js.map +1 -1
  64. package/build/esm/blocks/Form/schema.d.ts +0 -11
  65. package/build/esm/blocks/Header/Header.js +4 -1
  66. package/build/esm/blocks/Header/Header.js.map +1 -1
  67. package/build/esm/blocks/Info/schema.d.ts +0 -22
  68. package/build/esm/blocks/Map/schema.d.ts +0 -11
  69. package/build/esm/blocks/Media/schema.d.ts +0 -22
  70. package/build/esm/blocks/Questions/schema.d.ts +0 -11
  71. package/build/esm/blocks/Tabs/schema.d.ts +0 -11
  72. package/build/esm/components/Buttons/Buttons.css +2 -2
  73. package/build/esm/components/Buttons/Buttons.js +2 -0
  74. package/build/esm/components/Buttons/Buttons.js.map +1 -1
  75. package/build/esm/components/ContentList/ContentList.css +8 -8
  76. package/build/esm/components/ContentList/ContentList.js +2 -0
  77. package/build/esm/components/ContentList/ContentList.js.map +1 -1
  78. package/build/esm/components/IconWrapper/IconWrapper.css +6 -0
  79. package/build/esm/components/Links/Links.css +1 -1
  80. package/build/esm/components/Links/Links.js +2 -0
  81. package/build/esm/components/Links/Links.js.map +1 -1
  82. package/build/esm/components/index.d.ts +1 -0
  83. package/build/esm/components/index.js +1 -0
  84. package/build/esm/components/index.js.map +1 -1
  85. package/build/esm/models/constructor-items/blocks.d.ts +9 -19
  86. package/build/esm/models/constructor-items/blocks.js.map +1 -1
  87. package/build/esm/models/constructor-items/common.d.ts +1 -1
  88. package/build/esm/models/constructor-items/common.js.map +1 -1
  89. package/build/esm/models/constructor-items/sub-blocks.d.ts +6 -6
  90. package/build/esm/models/constructor-items/sub-blocks.js.map +1 -1
  91. package/build/esm/schema/constants.d.ts +5 -30
  92. package/build/esm/schema/validators/common.js +1 -1
  93. package/build/esm/schema/validators/common.js.map +1 -1
  94. package/build/esm/sub-blocks/BackgroundCard/schema.d.ts +3 -10
  95. package/build/esm/sub-blocks/BackgroundCard/schema.js +1 -1
  96. package/build/esm/sub-blocks/BackgroundCard/schema.js.map +1 -1
  97. package/build/esm/sub-blocks/BasicCard/schema.d.ts +2 -9
  98. package/build/esm/sub-blocks/BasicCard/schema.js +1 -1
  99. package/build/esm/sub-blocks/BasicCard/schema.js.map +1 -1
  100. package/build/esm/sub-blocks/Content/Content.css +29 -17
  101. package/build/esm/sub-blocks/Content/Content.js +7 -12
  102. package/build/esm/sub-blocks/Content/Content.js.map +1 -1
  103. package/build/esm/sub-blocks/Content/schema.d.ts +0 -100
  104. package/build/esm/sub-blocks/Content/schema.js +0 -13
  105. package/build/esm/sub-blocks/Content/schema.js.map +1 -1
  106. package/build/esm/sub-blocks/ImageCard/schema.d.ts +0 -11
  107. package/build/esm/sub-blocks/LayoutItem/schema.d.ts +0 -11
  108. package/build/esm/sub-blocks/LayoutItem/schema.js +1 -1
  109. package/build/esm/sub-blocks/LayoutItem/schema.js.map +1 -1
  110. package/package.json +1 -1
  111. package/schema/index.js +1 -1
  112. package/server/models/constructor-items/blocks.d.ts +9 -19
  113. package/server/models/constructor-items/common.d.ts +1 -1
  114. package/server/models/constructor-items/sub-blocks.d.ts +6 -6
  115. package/widget/index.js +1 -1
  116. package/build/cjs/components/ContentLabels/ContentLabels.css +0 -53
  117. package/build/cjs/components/ContentLabels/ContentLabels.d.ts +0 -3
  118. package/build/cjs/components/ContentLabels/ContentLabels.js +0 -16
  119. package/build/cjs/components/ContentLabels/ContentLabels.js.map +0 -1
  120. package/build/esm/components/ContentLabels/ContentLabels.css +0 -53
  121. package/build/esm/components/ContentLabels/ContentLabels.d.ts +0 -4
  122. package/build/esm/components/ContentLabels/ContentLabels.js +0 -14
  123. package/build/esm/components/ContentLabels/ContentLabels.js.map +0 -1
package/README.md CHANGED
@@ -142,7 +142,7 @@ interface PageConstructorProviderProps {
142
142
  location?: Location; //API of the browser or router history, the page URL.
143
143
  analytics?: AnalyticsContextProps; // function to handle analytics event
144
144
 
145
- ssrConfig?: SSR; //A flag indicating that the code is run on the server size.
145
+ ssrConfig?: SSR; //A flag indicating that the code is run on the server side.
146
146
  theme?: 'light' | 'dark'; //Theme to render the page with.
147
147
  mapsContext?: MapsContextType; //Params for map: apikey, type, scriptSrc, nonce
148
148
  }
@@ -1,4 +1,4 @@
1
- .pc-content-layout-block__files_size_l, .pc-content-layout-block__files_size_s {
1
+ .pc-content-layout-block__files_size_l, .pc-content-layout-block__files_size_xl, .pc-content-layout-block__files_size_s {
2
2
  margin: 0;
3
3
  }
4
4
 
@@ -18,7 +18,7 @@ unpredictable css rules order in build */
18
18
  font-size: var(--g-text-body-2-font-size);
19
19
  line-height: var(--g-text-body-2-line-height);
20
20
  }
21
- .pc-content-layout-block__files_size_l {
21
+ .pc-content-layout-block__files_size_l, .pc-content-layout-block__files_size_xl {
22
22
  font-size: var(--g-text-body-3-font-size);
23
23
  line-height: var(--g-text-body-3-line-height);
24
24
  }
@@ -17,7 +17,9 @@ function getFileTextSize(size) {
17
17
  switch (size) {
18
18
  case 's':
19
19
  return 's';
20
+ case 'm':
20
21
  case 'l':
22
+ case 'xl':
21
23
  default:
22
24
  return 'l';
23
25
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ContentLayout.js","sourceRoot":"../../../../src","sources":["blocks/ContentLayout/ContentLayout.tsx"],"names":[],"mappings":";;;;;;AAAA,qDAA+B;AAE/B,0DAA2D;AAC3D,kDAA4C;AAC5C,wDAA6C;AAC7C,kFAAgE;AAChE,8CAA+B;AAE/B,0DAAyC;AACzC,gDAAkD;AAIlD,MAAM,CAAC,GAAG,IAAA,aAAK,EAAC,sBAAsB,CAAC,CAAC;AAExC,SAAS,eAAe,CAAC,IAAiB;IACtC,QAAQ,IAAI,EAAE,CAAC;QACX,KAAK,GAAG;YACJ,OAAO,GAAG,CAAC;QACf,KAAK,GAAG,CAAC;QACT;YACI,OAAO,GAAG,CAAC;IACnB,CAAC;AACL,CAAC;AAED,SAAS,YAAY,CAAC,IAAqB;IACvC,QAAQ,IAAI,EAAE,CAAC;QACX,KAAK,GAAG;YACJ,OAAO,EAAC,GAAG,EAAE,EAAE,E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EAAC,CAAC,EAAE,KAAK,QAAC,KAAK,EAAE,QAAQ,YAC9D,WAAW,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CACvB,2BAAC,qBAAQ,IACL,SAAS,EAAE,CAAC,CAAC,MAAM,CAAC,KAChB,IAAI,EACR,GAAG,EAAE,IAAI,CAAC,IAAI,EACd,IAAI,EAAC,YAAY,EACjB,QAAQ,EAAE,eAAe,CAAC,IAAI,CAAC,EAC/B,KAAK,EAAE,KAAK,GACd,CACL,CAAC,GACA,CACT,EACA,UAAU,IAAI,CACX,gCAAK,SAAS,EAAE,CAAC,CAAC,YAAY,CAAC,YAC3B,uBAAC,4BAAe,IACZ,SAAS,EAAE,CAAC,CAAC,iBAAiB,CAAC,KAC3B,gBAAgB,EACpB,IAAI,EAAE,QAAQ,GAChB,GACA,CACT,IACC,CACT,CAAC;AACN,CAAC,CAAC;AArDW,QAAA,kBAAkB,sBAqD7B;AACF,kBAAe,0BAAkB,CAAC","sourcesContent":["import * as React from 'react';\n\nimport {BackgroundImage, FileLink} from '../../components';\nimport {BREAKPOINTS} from '../../constants';\nimport {useTheme} from '../../context/theme';\nimport {useWindowWidth} from '../../context/windowWidthContext';\nimport {Col} from '../../grid';\nimport {ContentLayoutBlockProps, ContentSize, ContentTextSize} from '../../models';\nimport {Content} from '../../sub-blocks';\nimport {block, getThemedValue} from '../../utils';\n\nimport './ContentLayout.scss';\n\nconst b = block('content-layout-block');\n\nfunction getFileTextSize(size: ContentSize) {\n switch (size) {\n case 's':\n return 's';\n case 'l':\n default:\n return 'l';\n }\n}\n\nfunction getTextWidth(size: ContentTextSize) {\n switch (size) {\n case 's':\n return {all: 12, md: 6};\n case 'l':\n return {all: 12, md: 12};\n case 'm':\n default:\n return {all: 12, md: 8};\n }\n}\n\nexport const ContentLayoutBlock = (props: ContentLayoutBlockProps) => {\n const windowWidth = useWindowWidth();\n const isMobile = windowWidth <= BREAKPOINTS.sm;\n\n const {\n textContent,\n fileContent,\n size = 'l',\n background,\n centered,\n theme = 'default',\n textWidth = 'm',\n } = props;\n\n const colSizes = React.useMemo(() => getTextWidth(textWidth), [textWidth]);\n const globalTheme = useTheme();\n const themedBackground = getThemedValue(background, globalTheme);\n\n return (\n <div className={b({size, theme, background: Boolean(background)})}>\n <Content\n className={b('content')}\n {...textContent}\n size={size}\n centered={centered}\n colSizes={colSizes}\n theme={theme}\n />\n {fileContent && (\n <Col className={b('files', {size, centered})} reset sizes={colSizes}>\n {fileContent.map((file) => (\n <FileLink\n className={b('file')}\n {...file}\n key={file.href}\n type=\"horizontal\"\n textSize={getFileTextSize(size)}\n theme={theme}\n />\n ))}\n </Col>\n )}\n {background && (\n <div className={b('background')}>\n <BackgroundImage\n className={b('background-item')}\n {...themedBackground}\n hide={isMobile}\n />\n </div>\n )}\n </div>\n );\n};\nexport default ContentLayoutBlock;\n"]}
1
+ {"version":3,"file":"ContentLayout.js","sourceRoot":"../../../../src","sources":["blocks/ContentLayout/ContentLayout.tsx"],"names":[],"mappings":";;;;;;AAAA,qDAA+B;AAE/B,0DAA2D;AAC3D,kDAA4C;AAC5C,wDAA6C;AAC7C,kFAAgE;AAChE,8CAA+B;AAE/B,0DAAyC;AACzC,gDAAkD;AAIlD,MAAM,CAAC,GAAG,IAAA,aAAK,EAAC,sBAAsB,CAAC,CAAC;AAExC,SAAS,eAAe,CAAC,IAAiB;IACtC,QAAQ,IAAI,EAAE,CAAC;QACX,KAAK,GAAG;YACJ,OAAO,GAAG,CAAC;QACf,KAAK,GAAG,CAAC;QACT,KAAK,GAAG,CAAC;QACT,KAAK,IAAI,CAAC;QACV;YACI,OAAO,GAAG,CAAC;IACnB,CAAC;AACL,CAAC;AAED,SAAS,YAAY,CAAC,IAAqB;IACvC,QAAQ,IAAI,EAAE,CAAC;QACX,KAAK,GAAG;YACJ,OAAO,EAAC,GAAG,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EAAC,CAAC;QAC5B,KAAK,GAAG;YACJ,OAAO,EAAC,G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,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CACvB,2BAAC,qBAAQ,IACL,SAAS,EAAE,CAAC,CAAC,MAAM,CAAC,KAChB,IAAI,EACR,GAAG,EAAE,IAAI,CAAC,IAAI,EACd,IAAI,EAAC,YAAY,EACjB,QAAQ,EAAE,eAAe,CAAC,IAAI,CAAC,EAC/B,KAAK,EAAE,KAAK,GACd,CACL,CAAC,GACA,CACT,EACA,UAAU,IAAI,CACX,gCAAK,SAAS,EAAE,CAAC,CAAC,YAAY,CAAC,YAC3B,uBAAC,4BAAe,IACZ,SAAS,EAAE,CAAC,CAAC,iBAAiB,CAAC,KAC3B,gBAAgB,EACpB,IAAI,EAAE,QAAQ,GAChB,GACA,CACT,IACC,CACT,CAAC;AACN,CAAC,CAAC;AArDW,QAAA,kBAAkB,sBAqD7B;AACF,kBAAe,0BAAkB,CAAC","sourcesContent":["import * as React from 'react';\n\nimport {BackgroundImage, FileLink} from '../../components';\nimport {BREAKPOINTS} from '../../constants';\nimport {useTheme} from '../../context/theme';\nimport {useWindowWidth} from '../../context/windowWidthContext';\nimport {Col} from '../../grid';\nimport {ContentLayoutBlockProps, ContentSize, ContentTextSize} from '../../models';\nimport {Content} from '../../sub-blocks';\nimport {block, getThemedValue} from '../../utils';\n\nimport './ContentLayout.scss';\n\nconst b = block('content-layout-block');\n\nfunction getFileTextSize(size: ContentSize) {\n switch (size) {\n case 's':\n return 's';\n case 'm':\n case 'l':\n case 'xl':\n default:\n return 'l';\n }\n}\n\nfunction getTextWidth(size: ContentTextSize) {\n switch (size) {\n case 's':\n return {all: 12, md: 6};\n case 'l':\n return {all: 12, md: 12};\n case 'm':\n default:\n return {all: 12, md: 8};\n }\n}\n\nexport const ContentLayoutBlock = (props: ContentLayoutBlockProps) => {\n const windowWidth = useWindowWidth();\n const isMobile = windowWidth <= BREAKPOINTS.sm;\n\n const {\n textContent,\n fileContent,\n size = 'l',\n background,\n centered,\n theme = 'default',\n textWidth = 'm',\n } = props;\n\n const colSizes = React.useMemo(() => getTextWidth(textWidth), [textWidth]);\n const globalTheme = useTheme();\n const themedBackground = getThemedValue(background, globalTheme);\n\n return (\n <div className={b({size, theme, background: Boolean(background)})}>\n <Content\n className={b('content')}\n {...textContent}\n size={size}\n centered={centered}\n colSizes={colSizes}\n theme={theme}\n />\n {fileContent && (\n <Col className={b('files', {size, centered})} reset sizes={colSizes}>\n {fileContent.map((file) => (\n <FileLink\n className={b('file')}\n {...file}\n key={file.href}\n type=\"horizontal\"\n textSize={getFileTextSize(size)}\n theme={theme}\n />\n ))}\n </Col>\n )}\n {background && (\n <div className={b('background')}>\n <BackgroundImage\n className={b('background-item')}\n {...themedBackground}\n hide={isMobile}\n />\n </div>\n )}\n </div>\n );\n};\nexport default ContentLayoutBlock;\n"]}
@@ -303,17 +303,6 @@ export declare const ContentLayoutBlock: {
303
303
  };
304
304
  };
305
305
  };
306
- labels: {
307
- type: string;
308
- items: {
309
- type: string;
310
- properties: {
311
- when: {
312
- type: string;
313
- };
314
- };
315
- };
316
- };
317
306
  controlPosition: {
318
307
  type: string;
319
308
  enum: string[];
@@ -129,17 +129,6 @@ export declare const FoldableListBlock: {
129
129
  contentType: string;
130
130
  inputType: string;
131
131
  };
132
- labels: {
133
- type: string;
134
- items: {
135
- type: string;
136
- properties: {
137
- when: {
138
- type: string;
139
- };
140
- };
141
- };
142
- };
143
132
  additionalInfo: {
144
133
  type: string;
145
134
  contentType: string;
@@ -4,6 +4,15 @@ unpredictable css rules order in build */
4
4
  border-radius: 32px;
5
5
  position: relative;
6
6
  }
7
+ .pc-form-block__additional-content {
8
+ display: flex;
9
+ flex-wrap: wrap;
10
+ width: 100%;
11
+ margin-top: 20px;
12
+ }
13
+ .pc-form-block__additional-content_centered {
14
+ justify-content: center;
15
+ }
7
16
  .pc-form-block__title {
8
17
  margin: 0 0 24px 10px;
9
18
  }
@@ -94,7 +103,7 @@ unpredictable css rules order in build */
94
103
  text-align: center;
95
104
  padding-bottom: 32px;
96
105
  }
97
- .pc-form-block_with-background .pc-form-block__row .pc-form-block__content-wrapper .pc-content-labels, .pc-form-block:not(.pc-form-block_with-background) .pc-form-block__row .pc-form-block__content-wrapper .pc-content-labels {
106
+ .pc-form-block_with-background .pc-form-block__row .pc-form-block__additional-content, .pc-form-block:not(.pc-form-block_with-background) .pc-form-block__row .pc-form-block__additional-content {
98
107
  justify-content: center;
99
108
  }
100
109
  .pc-form-block:not(.pc-form-block_with-background) .pc-form-block__row .pc-form-block__content-wrapper {
@@ -16,7 +16,7 @@ const utils_2 = require("./utils.js");
16
16
  const b = (0, utils_1.block)('form-block');
17
17
  const colSizes = { [grid_1.GridColumnSize.Lg]: 6, [grid_1.GridColumnSize.All]: 12 };
18
18
  const Form = (props) => {
19
- const { formData, title, textContent, direction = models_1.FormBlockDirection.Center, background, customFormNode, } = props;
19
+ const { formData, title, textContent, direction = models_1.FormBlockDirection.Center, background, customFormNode, additionalContentNode, } = props;
20
20
  const [contentLoaded, setContentLoaded] = React.useState(false);
21
21
  const isMobile = React.useContext(mobileContext_1.MobileContext);
22
22
  const theme = (0, theme_1.useTheme)();
@@ -46,7 +46,9 @@ const Form = (props) => {
46
46
  ? grid_1.GridAlignItems.Center
47
47
  : grid_1.GridAlignItems.Start, className: b('row', {
48
48
  direction,
49
- }), children: [(0, jsx_runtime_1.jsx)(grid_1.Col, { sizes: colSizes, className: b('content-col'), children: textContent && ((0, jsx_runtime_1.jsx)("div", { className: b('content-wrapper'), children: (0, jsx_runtime_1.jsx)(sub_blocks_1.Content, { theme: "default", ...textContent, centered: direction === models_1.FormBlockDirection.Center, colSizes: { all: 12 }, className: b('content') }) })) }), (0, jsx_runtime_1.jsx)(grid_1.Col, { sizes: colSizes, className: b('form-col'), children: (0, jsx_runtime_1.jsx)("div", { className: b('form-wrapper'), children: (0, jsx_runtime_1.jsx)("div", { className: b('full-form', {
49
+ }), children: [(0, jsx_runtime_1.jsx)(grid_1.Col, { sizes: colSizes, className: b('content-col'), children: textContent && ((0, jsx_runtime_1.jsxs)("div", { className: b('content-wrapper'), children: [(0, jsx_runtime_1.jsx)(sub_blocks_1.Content, { theme: "default", ...textContent, centered: direction === models_1.FormBlockDirection.Center, colSizes: { all: 12 }, className: b('content') }), additionalContentNode && ((0, jsx_runtime_1.jsx)("div", { className: b('additional-content', {
50
+ centered: direction === models_1.FormBlockDirection.Center,
51
+ }), children: additionalContentNode }))] })) }), (0, jsx_runtime_1.jsx)(grid_1.Col, { sizes: colSizes, className: b('form-col'), children: (0, jsx_runtime_1.jsx)("div", { className: b('form-wrapper'), children: (0, jsx_runtime_1.jsx)("div", { className: b('full-form', {
50
52
  hidden: !contentLoaded,
51
53
  }), children: customFormNode || ((0, jsx_runtime_1.jsxs)(React.Fragment, { children: [title && ((0, jsx_runtime_1.jsx)(components_1.Title, { title: {
52
54
  text: title,
@@ -1 +1 @@
1
- {"version":3,"file":"Form.js","sourceRoot":"../../../../src","sources":["blocks/Form/Form.tsx"],"names":[],"mappings":";;;;AAAA,qDAA+B;AAE/B,0DAAwD;AACxD,gGAA6D;AAC7D,wEAA0D;AAC1D,wDAA6C;AAC7C,8CAA0E;AAC1E,kEAA0D;AAE1D,kDAKsB;AACtB,0DAAyC;AACzC,gDAAkD;AAElD,sCAAyC;AAIzC,MAAM,CAAC,GAAG,IAAA,aAAK,EAAC,YAAY,CAAC,CAAC;AAE9B,MAAM,QAAQ,GAAG,EAAC,CAAC,qBAAc,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,qBAAc,CAAC,GAAG,CAAC,EAAE,EAAE,EAAC,CAAC;AAEpE,MAAM,IAAI,GAAG,CAAC,KAAqB,EAAE,EAAE;IACnC,MAAM,EACF,QAAQ,EACR,KAAK,EACL,WAAW,EACX,SAAS,GAAG,2BAAkB,CAAC,MAAM,EACrC,UAAU,EACV,cAAc,GACjB,GAAG,KAAK,CAAC;IACV,MAAM,CAAC,aAAa,EAAE,gBAAgB,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC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,QAAQ,EAClB,aAAa,EAAE,aAAa,GAC9B,IACW,CACpB,GACC,GACJ,GACJ,IACJ,GACH,IACL,CACT,CAAC;AACN,CAAC,CAAC;AAEF,kBAAe,IAAI,CAAC","sourcesContent":["import * as React from 'react';\n\nimport {BackgroundImage, Title} from '../../components';\nimport InnerForm from '../../components/InnerForm/InnerForm';\nimport {MobileContext} from '../../context/mobileContext';\nimport {useTheme} from '../../context/theme';\nimport {Col, Grid, GridAlignItems, GridColumnSize, Row} from '../../grid';\nimport {useDeviceValue} from '../../hooks/useDeviceValue';\nimport type {FormBlockProps} from '../../models';\nimport {\n FormBlockDataTypes,\n FormBlockDirection,\n isHubspotDataForm,\n isYandexDataForm,\n} from '../../models';\nimport {Content} from '../../sub-blocks';\nimport {block, getThemedValue} from '../../utils';\n\nimport {hasBackgroundCSS} from './utils';\n\nimport './Form.scss';\n\nconst b = block('form-block');\n\nconst colSizes = {[GridColumnSize.Lg]: 6, [GridColumnSize.All]: 12};\n\nconst Form = (props: FormBlockProps) => {\n const {\n formData,\n title,\n textContent,\n direction = FormBlockDirection.Center,\n background,\n customFormNode,\n } = props;\n const [contentLoaded, setContentLoaded] = React.useState(false);\n const isMobile = React.useContext(MobileContext);\n const theme = useTheme();\n\n const themedBackground = getThemedValue(background, theme) || undefined;\n const themedBackgroundStyle = useDeviceValue(themedBackground?.style) || undefined;\n\n const withBackground = Boolean(\n themedBackground &&\n (themedBackground.src ||\n themedBackground.desktop ||\n hasBackgroundCSS(themedBackgroundStyle ?? {})),\n );\n\n const onContentLoad = React.useCallback(() => {\n setContentLoaded(true);\n }, []);\n\n if (!formData && !customFormNode) {\n return null;\n }\n\n let formType;\n\n if (isYandexDataForm(formData)) {\n formType = FormBlockDataTypes.YANDEX;\n } else if (isHubspotDataForm(formData)) {\n formType = FormBlockDataTypes.HUBSPOT;\n }\n\n return (\n <div\n className={b({\n 'with-background': withBackground,\n 'form-type': formType,\n })}\n >\n {themedBackground && (\n <BackgroundImage\n {...themedBackground}\n style={themedBackgroundStyle}\n className={b('media')}\n imageClassName={b('image')}\n />\n )}\n <Grid>\n <Row\n alignItems={\n direction === FormBlockDirection.Center\n ? GridAlignItems.Center\n : GridAlignItems.Start\n }\n className={b('row', {\n direction,\n })}\n >\n <Col sizes={colSizes} className={b('content-col')}>\n {textContent && (\n <div className={b('content-wrapper')}>\n <Content\n theme=\"default\"\n {...textContent}\n centered={direction === FormBlockDirection.Center}\n colSizes={{all: 12}}\n className={b('content')}\n />\n </div>\n )}\n </Col>\n <Col sizes={colSizes} className={b('form-col')}>\n <div className={b('form-wrapper')}>\n <div\n className={b('full-form', {\n hidden: !contentLoaded,\n })}\n >\n {customFormNode || (\n <React.Fragment>\n {title && (\n <Title\n title={{\n text: title,\n textSize: 's',\n }}\n className={b('title', {mobile: isMobile})}\n colSizes={{all: 12}}\n />\n )}\n <InnerForm\n className={b('form')}\n formData={formData}\n onContentLoad={onContentLoad}\n />\n </React.Fragment>\n )}\n </div>\n </div>\n </Col>\n </Row>\n </Grid>\n </div>\n );\n};\n\nexport default Form;\n"]}
1
+ {"version":3,"file":"Form.js","sourceRoot":"../../../../src","sources":["blocks/Form/Form.tsx"],"names":[],"mappings":";;;;AAAA,qDAA+B;AAE/B,0DAAwD;AACxD,gGAA6D;AAC7D,wEAA0D;AAC1D,wDAA6C;AAC7C,8CAA0E;AAC1E,kEAA0D;AAE1D,kDAKsB;AACtB,0DAAyC;AACzC,gDAAkD;AAElD,sCAAyC;AAIzC,MAAM,CAAC,GAAG,IAAA,aAAK,EAAC,YAAY,CAAC,CAAC;AAE9B,MAAM,QAAQ,GAAG,EAAC,CAAC,qBAAc,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,qBAAc,CAAC,GAAG,CAAC,EAAE,EAAE,EAAC,CAAC;AAEpE,MAAM,IAAI,GAAG,CAAC,KAAqB,EAAE,EAAE;IACnC,MAAM,EACF,QAAQ,EACR,KAAK,EACL,WAAW,EACX,SAAS,GAAG,2BAAkB,CAAC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AAI,CACN,uBAAC,kBAAK,IACF,KAAK,EAAE;oDACH,IAAI,EAAE,KAAK;oDACX,QAAQ,EAAE,GAAG;iDAChB,EACD,SAAS,EAAE,CAAC,CAAC,OAAO,EAAE,EAAC,MAAM,EAAE,QAAQ,EAAC,CAAC,EACzC,QAAQ,EAAE,EAAC,GAAG,EAAE,EAAE,EAAC,GACrB,CACL,EACD,uBAAC,mBAAS,IACN,SAAS,EAAE,CAAC,CAAC,MAAM,CAAC,EACpB,QAAQ,EAAE,QAAQ,EAClB,aAAa,EAAE,aAAa,GAC9B,IACW,CACpB,GACC,GACJ,GACJ,IACJ,GACH,IACL,CACT,CAAC;AACN,CAAC,CAAC;AAEF,kBAAe,IAAI,CAAC","sourcesContent":["import * as React from 'react';\n\nimport {BackgroundImage, Title} from '../../components';\nimport InnerForm from '../../components/InnerForm/InnerForm';\nimport {MobileContext} from '../../context/mobileContext';\nimport {useTheme} from '../../context/theme';\nimport {Col, Grid, GridAlignItems, GridColumnSize, Row} from '../../grid';\nimport {useDeviceValue} from '../../hooks/useDeviceValue';\nimport type {FormBlockProps} from '../../models';\nimport {\n FormBlockDataTypes,\n FormBlockDirection,\n isHubspotDataForm,\n isYandexDataForm,\n} from '../../models';\nimport {Content} from '../../sub-blocks';\nimport {block, getThemedValue} from '../../utils';\n\nimport {hasBackgroundCSS} from './utils';\n\nimport './Form.scss';\n\nconst b = block('form-block');\n\nconst colSizes = {[GridColumnSize.Lg]: 6, [GridColumnSize.All]: 12};\n\nconst Form = (props: FormBlockProps) => {\n const {\n formData,\n title,\n textContent,\n direction = FormBlockDirection.Center,\n background,\n customFormNode,\n additionalContentNode,\n } = props;\n const [contentLoaded, setContentLoaded] = React.useState(false);\n const isMobile = React.useContext(MobileContext);\n const theme = useTheme();\n\n const themedBackground = getThemedValue(background, theme) || undefined;\n const themedBackgroundStyle = useDeviceValue(themedBackground?.style) || undefined;\n\n const withBackground = Boolean(\n themedBackground &&\n (themedBackground.src ||\n themedBackground.desktop ||\n hasBackgroundCSS(themedBackgroundStyle ?? {})),\n );\n\n const onContentLoad = React.useCallback(() => {\n setContentLoaded(true);\n }, []);\n\n if (!formData && !customFormNode) {\n return null;\n }\n\n let formType;\n\n if (isYandexDataForm(formData)) {\n formType = FormBlockDataTypes.YANDEX;\n } else if (isHubspotDataForm(formData)) {\n formType = FormBlockDataTypes.HUBSPOT;\n }\n\n return (\n <div\n className={b({\n 'with-background': withBackground,\n 'form-type': formType,\n })}\n >\n {themedBackground && (\n <BackgroundImage\n {...themedBackground}\n style={themedBackgroundStyle}\n className={b('media')}\n imageClassName={b('image')}\n />\n )}\n <Grid>\n <Row\n alignItems={\n direction === FormBlockDirection.Center\n ? GridAlignItems.Center\n : GridAlignItems.Start\n }\n className={b('row', {\n direction,\n })}\n >\n <Col sizes={colSizes} className={b('content-col')}>\n {textContent && (\n <div className={b('content-wrapper')}>\n <Content\n theme=\"default\"\n {...textContent}\n centered={direction === FormBlockDirection.Center}\n colSizes={{all: 12}}\n className={b('content')}\n />\n {additionalContentNode && (\n <div\n className={b('additional-content', {\n centered: direction === FormBlockDirection.Center,\n })}\n >\n {additionalContentNode}\n </div>\n )}\n </div>\n )}\n </Col>\n <Col sizes={colSizes} className={b('form-col')}>\n <div className={b('form-wrapper')}>\n <div\n className={b('full-form', {\n hidden: !contentLoaded,\n })}\n >\n {customFormNode || (\n <React.Fragment>\n {title && (\n <Title\n title={{\n text: title,\n textSize: 's',\n }}\n className={b('title', {mobile: isMobile})}\n colSizes={{all: 12}}\n />\n )}\n <InnerForm\n className={b('form')}\n formData={formData}\n onContentLoad={onContentLoad}\n />\n </React.Fragment>\n )}\n </div>\n </div>\n </Col>\n </Row>\n </Grid>\n </div>\n );\n};\n\nexport default Form;\n"]}
@@ -242,17 +242,6 @@ export declare const FormBlock: {
242
242
  };
243
243
  };
244
244
  };
245
- labels: {
246
- type: string;
247
- items: {
248
- type: string;
249
- properties: {
250
- when: {
251
- type: string;
252
- };
253
- };
254
- };
255
- };
256
245
  controlPosition: {
257
246
  type: string;
258
247
  enum: string[];
@@ -51,7 +51,10 @@ const HeaderBlock = (props) => {
51
51
  offset,
52
52
  theme: textTheme,
53
53
  'vertical-offset': curVerticalOffset,
54
- }), children: (0, jsx_runtime_1.jsxs)(grid_1.Col, { sizes: titleSizes, className: b('content-inner', { centered }, contentInnerClassName), children: [overtitle && ((0, jsx_runtime_1.jsx)("div", { className: b('overtitle'), children: typeof overtitle === 'string' ? ((0, jsx_runtime_1.jsx)(YFMWrapper_1.default, { tagName: "div", className: b('overtitle'), content: overtitle, modifiers: { constructor: true } })) : (overtitle) })), (0, jsx_runtime_1.jsxs)(YFMWrapper_1.default, { content: title, contentClassName: b('title'), className: b('title-container'), modifiers: { constructor: true, constructorTheme: textTheme }, tagName: "h1", contentPosition: "end", children: [status, renderTitle ? renderTitle(title) : null] }), description && ((0, jsx_runtime_1.jsx)("div", { className: b('description', { theme: textTheme }), children: (0, jsx_runtime_1.jsx)(YFMWrapper_1.default, { content: description, modifiers: {
54
+ }), children: (0, jsx_runtime_1.jsxs)(grid_1.Col, { sizes: titleSizes, className: b('content-inner', { centered }, contentInnerClassName), children: [overtitle && ((0, jsx_runtime_1.jsx)("div", { className: b('overtitle'), children: typeof overtitle === 'string' ? ((0, jsx_runtime_1.jsx)(YFMWrapper_1.default, { tagName: "div", className: b('overtitle'), content: overtitle, modifiers: {
55
+ constructor: true,
56
+ constructorTheme: textTheme,
57
+ } })) : (overtitle) })), (0, jsx_runtime_1.jsxs)(YFMWrapper_1.default, { content: title, contentClassName: b('title'), className: b('title-container'), modifiers: { constructor: true, constructorTheme: textTheme }, tagName: "h1", contentPosition: "end", children: [status, renderTitle ? renderTitle(title) : null] }), description && ((0, jsx_runtime_1.jsx)("div", { className: b('description', { theme: textTheme }), children: (0, jsx_runtime_1.jsx)(YFMWrapper_1.default, { content: description, modifiers: {
55
58
  constructor: true,
56
59
  constructorTheme: textTheme,
57
60
  } }) })), additionalInfo && ((0, jsx_runtime_1.jsx)("div", { className: b('additional-info', { theme: textTheme }), children: (0, jsx_runtime_1.jsx)(YFMWrapper_1.default, { content: additionalInfo, modifiers: {
@@ -1 +1 @@
1
- {"version":3,"file":"Header.js","sourceRoot":"../../../../src","sources":["blocks/Header/Header.tsx"],"names":[],"mappings":";;;;;AAGA,6CAA4C;AAE5C,0DAA2D;AAC3D,wHAAqF;AACrF,iEAAiE;AACjE,mGAAgE;AAChE,kDAA4C;AAC5C,wDAA6C;AAC7C,kFAAgE;AAChE,8CAA0C;AAE1C,gDAAkD;AAClD,wDAA0D;AAE1D,sCAAyE;AAIzE,MAAM,CAAC,GAAG,IAAA,aAAK,EAAC,cAAc,CAAC,CAAC;AAgBhC,MAAM,UAAU,GAAG,CAAC,EAAC,UAAU,EAAE,QAAQ,EAAkB,EAAE,EAAE;IAC3D,MAAM,EAAC,GAAG,EAAE,KAAK,EAAE,cAAc,EAAE,KAAK,EAAE,KAAK,EAAC,GAAG,UAAU,CAAC;IAC9D,MAAM,WAAW,GAAG,GAAG,CAAC,CAAC,CAAC,IAAA,qBAAa,EAAC,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;IACrD,MAAM,WAAW,GAAG,CAAC,QAAQ,IAAI,CAAC,OAAO,KAAK,KAAK,QAAQ,IAAI,QAAQ,IAAI,KAAK,CAAC,CAAC;IAElF,OAAO,CACH,gCACI,SAAS,EAAE,CAAC,CAAC,YAAY,EAAE,EAAC,KAAK,EAAE,IAAI,EAAE,kBAAkB,EAAE,cAAc,EAAC,CAAC,EAC7E,KAAK,EAAE,EAAC,eAAe,EAAE,KAAK,EAAC,YAE9B,WAAW,IAAI,CACZ,uBAAC,kBAAK,OACE,UAAU,EACd,SAAS,EAAE,CAAC,CAAC,kBAAkB,CAAC,EAChC,cAAc,EAAE,CAAC,CAAC,OAAO,CAAC,EAC1B,cAAc,EAAE,CAAC,CAAC,OAAO,CAAC,EAC1B,YAAY,EAAE,IAAI,EAClB,QAAQ,EAAE,KAAK,EACf,KAAK,EAAE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,YAAY,CAAC,EAAE,IAAI,EAAC,EAAE,cAAc,CAAC,EAC7D,cAAc,EAAE,CAAC,CAAC,OAAO,CAAC,EAC1B,cAAc,EAAE,CAAC,CAAC,OAAO,CAAC,EAC1B,gBAAgB,EAAE,CAAC,CAAC,cAAc,CAAC,KAC/B,kBAAkB,GACxB,CACL,IACC,GACJ,IACH,IACF,CACZ,CAAC;AACN,CAAC,CAAC;AA9KW,QAAA,WAAW,eA8KtB;AAEF,kBAAe,mBAAW,CAAC","sourcesContent":["/* eslint-disable complexity */\nimport * as React from 'react';\n\nimport {useUniqId} from '@gravity-ui/uikit';\n\nimport {Button, Media, RouterLink} from '../../components';\nimport HeaderBreadcrumbs from '../../components/HeaderBreadcrumbs/HeaderBreadcrumbs';\nimport {getMediaImage} from '../../components/Media/Image/utils';\nimport YFMWrapper from '../../components/YFMWrapper/YFMWrapper';\nimport {BREAKPOINTS} from '../../constants';\nimport {useTheme} from '../../context/theme';\nimport {useWindowWidth} from '../../context/windowWidthContext';\nimport {Col, Grid, Row} from '../../grid';\nimport {ClassNameProps, HeaderBlockBackground, HeaderBlockProps} from '../../models';\nimport {block, getThemedValue} from '../../utils';\nimport {mergeVideoMicrodata} from '../../utils/microdata';\n\nimport {getImageSize, getTitleSizes, titleWithImageSizes} from './utils';\n\nimport './Header.scss';\n\nconst b = block('header-block');\n\ntype ElementsClassName = {\n gridClassName?: string;\n mediaClassName?: string;\n contentWrapperClassName?: string;\n contentInnerClassName?: string;\n};\n\nexport type HeaderBlockFullProps = HeaderBlockProps & ClassNameProps & ElementsClassName;\n\ninterface BackgroundProps {\n background: HeaderBlockBackground;\n isMobile: boolean;\n}\n\nconst Background = ({background, isMobile}: BackgroundProps) => {\n const {url, image, fullWidthMedia, video, color} = background;\n const imageObject = url ? getMediaImage(url) : image;\n const renderMedia = !isMobile || (typeof image === 'object' && 'mobile' in image);\n\n return (\n <div\n className={b('background', {media: true, 'full-width-media': fullWidthMedia})}\n style={{backgroundColor: color}}\n >\n {renderMedia && (\n <Media\n {...background}\n className={b('background-media')}\n imageClassName={b('image')}\n videoClassName={b('video')}\n isBackground={true}\n parallax={false}\n video={isMobile ? undefined : video}\n image={imageObject}\n />\n )}\n </div>\n );\n};\n\ninterface FullWidthBackgroundProps {\n background: HeaderBlockBackground;\n}\n\nconst FullWidthBackground = ({background}: FullWidthBackgroundProps) => (\n <div\n className={b('background', {['full-width']: true})}\n style={{backgroundColor: background?.color}}\n />\n);\n\nexport const HeaderBlock = (props: React.PropsWithChildren<HeaderBlockFullProps>) => {\n const {\n title,\n overtitle,\n description,\n buttons,\n image,\n video,\n videoIframe,\n width = 'm',\n imageSize,\n offset = 'default',\n background,\n theme: textTheme = 'light',\n verticalOffset = 'm',\n className,\n gridClassName,\n breadcrumbs,\n status,\n renderTitle,\n children,\n mediaView = 'full',\n centered,\n additionalInfo,\n mediaClassName,\n contentWrapperClassName,\n contentInnerClassName,\n } = props;\n const windowWidth = useWindowWidth();\n const isMobile = windowWidth <= BREAKPOINTS.sm;\n const theme = useTheme();\n const hasRightSideImage = Boolean((image || video || videoIframe) && !centered);\n const curImageSize = imageSize || getImageSize(width);\n const titleSizes = hasRightSideImage ? titleWithImageSizes(curImageSize) : getTitleSizes(width);\n let curVerticalOffset = verticalOffset;\n\n if (hasRightSideImage && !verticalOffset) {\n curVerticalOffset = 'm';\n }\n\n const backgroundThemed = background && getThemedValue(background, theme);\n const imageThemed = image && getThemedValue(image, theme);\n const videoThemed = video && getThemedValue(video, theme);\n const {src: videoIframeSrc, ...videoIframeProps} = videoIframe ?? {};\n const mediaWithMicrodata = mergeVideoMicrodata(\n {video: videoThemed, image: imageThemed, videoIframe: videoIframeSrc, ...videoIframeProps},\n {name: title, description},\n );\n const fullWidth = backgroundThemed?.fullWidth || backgroundThemed?.fullWidthMedia;\n const titleId = useUniqId();\n\n return (\n <header\n className={b(\n {\n ['has-media']: hasRightSideImage,\n ['full-width']: fullWidth,\n ['media-view']: mediaView,\n ['controls-view']: textTheme,\n },\n className,\n )}\n >\n {backgroundThemed && fullWidth && <FullWidthBackground background={backgroundThemed} />}\n {backgroundThemed && <Background background={backgroundThemed} isMobile={isMobile} />}\n <Grid containerClass={b('container-fluid')} className={b(null, gridClassName)}>\n {breadcrumbs && (\n <Row className={b('breadcrumbs')}>\n <Col>\n <HeaderBreadcrumbs {...breadcrumbs} theme={textTheme} />\n </Col>\n </Row>\n )}\n <Row>\n <Col reset className={b('content-wrapper', contentWrapperClassName)}>\n <Row>\n <Col\n className={b('content', {\n offset,\n theme: textTheme,\n 'vertical-offset': curVerticalOffset,\n })}\n >\n <Col\n sizes={titleSizes}\n className={b(\n 'content-inner',\n {centered},\n contentInnerClassName,\n )}\n >\n {overtitle && (\n <div className={b('overtitle')}>\n {typeof overtitle === 'string' ? (\n <YFMWrapper\n tagName=\"div\"\n className={b('overtitle')}\n content={overtitle}\n modifiers={{constructor: true}}\n />\n ) : (\n overtitle\n )}\n </div>\n )}\n <YFMWrapper\n content={title}\n contentClassName={b('title')}\n className={b('title-container')}\n modifiers={{constructor: true, constructorTheme: textTheme}}\n tagName=\"h1\"\n contentPosition=\"end\"\n >\n {status}\n {renderTitle ? renderTitle(title) : null}\n </YFMWrapper>\n {description && (\n <div className={b('description', {theme: textTheme})}>\n <YFMWrapper\n content={description}\n modifiers={{\n constructor: true,\n constructorTheme: textTheme,\n }}\n />\n </div>\n )}\n {additionalInfo && (\n <div className={b('additional-info', {theme: textTheme})}>\n <YFMWrapper\n content={additionalInfo}\n modifiers={{\n constructor: true,\n constructorTheme: textTheme,\n }}\n />\n </div>\n )}\n {buttons && (\n <div className={b('buttons')} data-qa=\"header-buttons\">\n {buttons.map((button, index) => (\n <RouterLink href={button.url} key={index}>\n <Button\n key={index}\n className={b('button')}\n size=\"xl\"\n extraProps={{\n 'aria-describedby': titleId,\n ...button.extraProps,\n }}\n {...button}\n />\n </RouterLink>\n ))}\n </div>\n )}\n {children}\n </Col>\n </Col>\n </Row>\n {hasRightSideImage && (\n <Media\n className={b('media', {[curImageSize]: true}, mediaClassName)}\n videoClassName={b('video')}\n imageClassName={b('image')}\n youtubeClassName={b('video-iframe')}\n {...mediaWithMicrodata}\n />\n )}\n </Col>\n </Row>\n </Grid>\n </header>\n );\n};\n\nexport default HeaderBlock;\n"]}
1
+ {"version":3,"file":"Header.js","sourceRoot":"../../../../src","sources":["blocks/Header/Header.tsx"],"names":[],"mappings":";;;;;AAGA,6CAA4C;AAE5C,0DAA2D;AAC3D,wHAAqF;AACrF,iEAAiE;AACjE,mGAAgE;AAChE,kDAA4C;AAC5C,wDAA6C;AAC7C,kFAAgE;AAChE,8CAA0C;AAE1C,gDAAkD;AAClD,wDAA0D;AAE1D,sCAAyE;AAIzE,MAAM,CAAC,GAAG,IAAA,aAAK,EAAC,cAAc,CAAC,CAAC;AAgBhC,MAAM,UAAU,GAAG,CAAC,EAAC,UAAU,EAAE,QAAQ,EAAkB,EAAE,EAAE;IAC3D,MAAM,EAAC,GAAG,EAAE,KAAK,EAAE,cAAc,EAAE,KAAK,EAAE,KAAK,EAAC,GAAG,UAAU,CAAC;IAC9D,MAAM,WAAW,GAAG,GAAG,CAAC,CAAC,CAAC,IAAA,qBAAa,EAAC,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;IACrD,MAAM,WAAW,GAAG,CAAC,QAAQ,IAAI,CAAC,OAAO,KAAK,KAAK,QAAQ,IAAI,QAAQ,IAAI,KAAK,CAAC,CAAC;IAElF,OAAO,CACH,gCACI,SAAS,EAAE,CAAC,CAAC,YAAY,EAAE,EAAC,KAAK,EAAE,IAAI,EAAE,kBAAkB,EAAE,cAAc,EAAC,CAAC,EAC7E,KAAK,EAAE,EAAC,eAAe,EAAE,KAAK,EAAC,YAE9B,WAAW,IAAI,CACZ,uBAAC,kBAAK,OACE,UAAU,EACd,SAAS,EAAE,CAAC,CAAC,kBAAkB,CAAC,EAChC,cAAc,EAAE,CAAC,CAAC,OAAO,CAAC,EAC1B,cAAc,EAAE,CAAC,CAAC,OAAO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ACJ,GACJ,EACL,iBAAiB,IAAI,CAClB,uBAAC,kBAAK,IACF,SAAS,EAAE,CAAC,CAAC,OAAO,EAAE,EAAC,CAAC,YAAY,CAAC,EAAE,IAAI,EAAC,EAAE,cAAc,CAAC,EAC7D,cAAc,EAAE,CAAC,CAAC,OAAO,CAAC,EAC1B,cAAc,EAAE,CAAC,CAAC,OAAO,CAAC,EAC1B,gBAAgB,EAAE,CAAC,CAAC,cAAc,CAAC,KAC/B,kBAAkB,GACxB,CACL,IACC,GACJ,IACH,IACF,CACZ,CAAC;AACN,CAAC,CAAC;AAjLW,QAAA,WAAW,eAiLtB;AAEF,kBAAe,mBAAW,CAAC","sourcesContent":["/* eslint-disable complexity */\nimport * as React from 'react';\n\nimport {useUniqId} from '@gravity-ui/uikit';\n\nimport {Button, Media, RouterLink} from '../../components';\nimport HeaderBreadcrumbs from '../../components/HeaderBreadcrumbs/HeaderBreadcrumbs';\nimport {getMediaImage} from '../../components/Media/Image/utils';\nimport YFMWrapper from '../../components/YFMWrapper/YFMWrapper';\nimport {BREAKPOINTS} from '../../constants';\nimport {useTheme} from '../../context/theme';\nimport {useWindowWidth} from '../../context/windowWidthContext';\nimport {Col, Grid, Row} from '../../grid';\nimport {ClassNameProps, HeaderBlockBackground, HeaderBlockProps} from '../../models';\nimport {block, getThemedValue} from '../../utils';\nimport {mergeVideoMicrodata} from '../../utils/microdata';\n\nimport {getImageSize, getTitleSizes, titleWithImageSizes} from './utils';\n\nimport './Header.scss';\n\nconst b = block('header-block');\n\ntype ElementsClassName = {\n gridClassName?: string;\n mediaClassName?: string;\n contentWrapperClassName?: string;\n contentInnerClassName?: string;\n};\n\nexport type HeaderBlockFullProps = HeaderBlockProps & ClassNameProps & ElementsClassName;\n\ninterface BackgroundProps {\n background: HeaderBlockBackground;\n isMobile: boolean;\n}\n\nconst Background = ({background, isMobile}: BackgroundProps) => {\n const {url, image, fullWidthMedia, video, color} = background;\n const imageObject = url ? getMediaImage(url) : image;\n const renderMedia = !isMobile || (typeof image === 'object' && 'mobile' in image);\n\n return (\n <div\n className={b('background', {media: true, 'full-width-media': fullWidthMedia})}\n style={{backgroundColor: color}}\n >\n {renderMedia && (\n <Media\n {...background}\n className={b('background-media')}\n imageClassName={b('image')}\n videoClassName={b('video')}\n isBackground={true}\n parallax={false}\n video={isMobile ? undefined : video}\n image={imageObject}\n />\n )}\n </div>\n );\n};\n\ninterface FullWidthBackgroundProps {\n background: HeaderBlockBackground;\n}\n\nconst FullWidthBackground = ({background}: FullWidthBackgroundProps) => (\n <div\n className={b('background', {['full-width']: true})}\n style={{backgroundColor: background?.color}}\n />\n);\n\nexport const HeaderBlock = (props: React.PropsWithChildren<HeaderBlockFullProps>) => {\n const {\n title,\n overtitle,\n description,\n buttons,\n image,\n video,\n videoIframe,\n width = 'm',\n imageSize,\n offset = 'default',\n background,\n theme: textTheme = 'light',\n verticalOffset = 'm',\n className,\n gridClassName,\n breadcrumbs,\n status,\n renderTitle,\n children,\n mediaView = 'full',\n centered,\n additionalInfo,\n mediaClassName,\n contentWrapperClassName,\n contentInnerClassName,\n } = props;\n const windowWidth = useWindowWidth();\n const isMobile = windowWidth <= BREAKPOINTS.sm;\n const theme = useTheme();\n const hasRightSideImage = Boolean((image || video || videoIframe) && !centered);\n const curImageSize = imageSize || getImageSize(width);\n const titleSizes = hasRightSideImage ? titleWithImageSizes(curImageSize) : getTitleSizes(width);\n let curVerticalOffset = verticalOffset;\n\n if (hasRightSideImage && !verticalOffset) {\n curVerticalOffset = 'm';\n }\n\n const backgroundThemed = background && getThemedValue(background, theme);\n const imageThemed = image && getThemedValue(image, theme);\n const videoThemed = video && getThemedValue(video, theme);\n const {src: videoIframeSrc, ...videoIframeProps} = videoIframe ?? {};\n const mediaWithMicrodata = mergeVideoMicrodata(\n {video: videoThemed, image: imageThemed, videoIframe: videoIframeSrc, ...videoIframeProps},\n {name: title, description},\n );\n const fullWidth = backgroundThemed?.fullWidth || backgroundThemed?.fullWidthMedia;\n const titleId = useUniqId();\n\n return (\n <header\n className={b(\n {\n ['has-media']: hasRightSideImage,\n ['full-width']: fullWidth,\n ['media-view']: mediaView,\n ['controls-view']: textTheme,\n },\n className,\n )}\n >\n {backgroundThemed && fullWidth && <FullWidthBackground background={backgroundThemed} />}\n {backgroundThemed && <Background background={backgroundThemed} isMobile={isMobile} />}\n <Grid containerClass={b('container-fluid')} className={b(null, gridClassName)}>\n {breadcrumbs && (\n <Row className={b('breadcrumbs')}>\n <Col>\n <HeaderBreadcrumbs {...breadcrumbs} theme={textTheme} />\n </Col>\n </Row>\n )}\n <Row>\n <Col reset className={b('content-wrapper', contentWrapperClassName)}>\n <Row>\n <Col\n className={b('content', {\n offset,\n theme: textTheme,\n 'vertical-offset': curVerticalOffset,\n })}\n >\n <Col\n sizes={titleSizes}\n className={b(\n 'content-inner',\n {centered},\n contentInnerClassName,\n )}\n >\n {overtitle && (\n <div className={b('overtitle')}>\n {typeof overtitle === 'string' ? (\n <YFMWrapper\n tagName=\"div\"\n className={b('overtitle')}\n content={overtitle}\n modifiers={{\n constructor: true,\n constructorTheme: textTheme,\n }}\n />\n ) : (\n overtitle\n )}\n </div>\n )}\n <YFMWrapper\n content={title}\n contentClassName={b('title')}\n className={b('title-container')}\n modifiers={{constructor: true, constructorTheme: textTheme}}\n tagName=\"h1\"\n contentPosition=\"end\"\n >\n {status}\n {renderTitle ? renderTitle(title) : null}\n </YFMWrapper>\n {description && (\n <div className={b('description', {theme: textTheme})}>\n <YFMWrapper\n content={description}\n modifiers={{\n constructor: true,\n constructorTheme: textTheme,\n }}\n />\n </div>\n )}\n {additionalInfo && (\n <div className={b('additional-info', {theme: textTheme})}>\n <YFMWrapper\n content={additionalInfo}\n modifiers={{\n constructor: true,\n constructorTheme: textTheme,\n }}\n />\n </div>\n )}\n {buttons && (\n <div className={b('buttons')} data-qa=\"header-buttons\">\n {buttons.map((button, index) => (\n <RouterLink href={button.url} key={index}>\n <Button\n key={index}\n className={b('button')}\n size=\"xl\"\n extraProps={{\n 'aria-describedby': titleId,\n ...button.extraProps,\n }}\n {...button}\n />\n </RouterLink>\n ))}\n </div>\n )}\n {children}\n </Col>\n </Col>\n </Row>\n {hasRightSideImage && (\n <Media\n className={b('media', {[curImageSize]: true}, mediaClassName)}\n videoClassName={b('video')}\n imageClassName={b('image')}\n youtubeClassName={b('video-iframe')}\n {...mediaWithMicrodata}\n />\n )}\n </Col>\n </Row>\n </Grid>\n </header>\n );\n};\n\nexport default HeaderBlock;\n"]}
@@ -213,17 +213,6 @@ export declare const InfoBlock: {
213
213
  };
214
214
  };
215
215
  };
216
- labels: {
217
- type: string;
218
- items: {
219
- type: string;
220
- properties: {
221
- when: {
222
- type: string;
223
- };
224
- };
225
- };
226
- };
227
216
  controlPosition: {
228
217
  type: string;
229
218
  enum: string[];
@@ -393,17 +382,6 @@ export declare const InfoBlock: {
393
382
  };
394
383
  };
395
384
  };
396
- labels: {
397
- type: string;
398
- items: {
399
- type: string;
400
- properties: {
401
- when: {
402
- type: string;
403
- };
404
- };
405
- };
406
- };
407
385
  controlPosition: {
408
386
  type: string;
409
387
  enum: string[];
@@ -499,17 +499,6 @@ export declare const MapBlock: {
499
499
  type: string;
500
500
  enum: string[];
501
501
  };
502
- labels: {
503
- type: string;
504
- items: {
505
- type: string;
506
- properties: {
507
- when: {
508
- type: string;
509
- };
510
- };
511
- };
512
- };
513
502
  additionalInfo: {
514
503
  type: string;
515
504
  contentType: string;
@@ -615,17 +615,6 @@ export declare const MediaBlockBaseProps: {
615
615
  type: string;
616
616
  enum: string[];
617
617
  };
618
- labels: {
619
- type: string;
620
- items: {
621
- type: string;
622
- properties: {
623
- when: {
624
- type: string;
625
- };
626
- };
627
- };
628
- };
629
618
  additionalInfo: {
630
619
  type: string;
631
620
  contentType: string;
@@ -1345,17 +1334,6 @@ export declare const MediaBlock: {
1345
1334
  type: string;
1346
1335
  enum: string[];
1347
1336
  };
1348
- labels: {
1349
- type: string;
1350
- items: {
1351
- type: string;
1352
- properties: {
1353
- when: {
1354
- type: string;
1355
- };
1356
- };
1357
- };
1358
- };
1359
1337
  additionalInfo: {
1360
1338
  type: string;
1361
1339
  contentType: string;
@@ -129,17 +129,6 @@ export declare const QuestionsBlock: {
129
129
  contentType: string;
130
130
  inputType: string;
131
131
  };
132
- labels: {
133
- type: string;
134
- items: {
135
- type: string;
136
- properties: {
137
- when: {
138
- type: string;
139
- };
140
- };
141
- };
142
- };
143
132
  additionalInfo: {
144
133
  type: string;
145
134
  contentType: string;
@@ -649,17 +649,6 @@ export declare const tabsItem: {
649
649
  };
650
650
  };
651
651
  } | undefined;
652
- labels?: {
653
- type: string;
654
- items: {
655
- type: string;
656
- properties: {
657
- when: {
658
- type: string;
659
- };
660
- };
661
- };
662
- } | undefined;
663
652
  controlPosition?: {
664
653
  type: string;
665
654
  enum: string[];
@@ -6,9 +6,9 @@
6
6
  .pc-buttons_size_s {
7
7
  row-gap: 8px;
8
8
  }
9
- .pc-buttons_size_l {
9
+ .pc-buttons_size_m {
10
10
  row-gap: 12px;
11
11
  }
12
- .pc-buttons_size_m {
12
+ .pc-buttons_size_l, .pc-buttons_size_xl {
13
13
  row-gap: 12px;
14
14
  }
@@ -10,7 +10,9 @@ function getButtonSize(size) {
10
10
  switch (size) {
11
11
  case 's':
12
12
  return 'm';
13
+ case 'm':
13
14
  case 'l':
15
+ case 'xl':
14
16
  default:
15
17
  return 'xl';
16
18
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Buttons.js","sourceRoot":"../../../../src","sources":["components/Buttons/Buttons.tsx"],"names":[],"mappings":";;;;;AACA,gDAAkC;AAClC,yEAAsC;AAItC,MAAM,CAAC,GAAG,IAAA,aAAK,EAAC,SAAS,CAAC,CAAC;AAW3B,SAAS,aAAa,CAAC,IAAiB;IACpC,QAAQ,IAAI,EAAE,CAAC;QACX,KAAK,GAAG;YACJ,OAAO,GAAG,CAAC;QACf,KAAK,GAAG,CAAC;QACT;YACI,OAAO,IAAI,CAAC;IACpB,CAAC;AACL,CAAC;AAED,MAAM,OAAO,GAAG,CAAC,EAAC,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,GAAG,GAAG,EAAE,EAAE,EAAE,QAAQ,EAAe,EAAE,EAAE,CACtF,OAAO,CAAC,CAAC,CAAC,CACN,gCAAK,SAAS,EAAE,CAAC,CAAC,EAAC,IAAI,EAAC,EAAE,SAAS,CAAC,aAAW,EAAE,YAC5C,OAAO,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CACnB,2BAAC,gBAAM,IACH,SAAS,EAAE,CAAC,CAAC,QAAQ,CAAC,KAClB,IAAI,EACR,GAAG,EAAE,IAAI,CAAC,GAAG,EACb,IAAI,EAAE,aAAa,CAAC,IAAI,CAAC,EACzB,EAAE,EAAE,QAAQ,EACZ,UAAU,EAAE;YACR,kBAAkB,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO;YACvD,GAAG,IAAI,CAAC,UAAU;SACrB,GACH,CACL,CAAC,GACA,CACT,CAAC,CAAC,CAAC,IAAI,CAAC;AAEb,kBAAe,OAAO,CAAC","sourcesContent":["import {ButtonProps, ContentSize} from '../../models';\nimport {block} from '../../utils';\nimport Button from '../Button/Button';\n\nimport './Buttons.scss';\n\nconst b = block('buttons');\n\ntype ButtonsProps = {\n className?: string;\n buttons?: ButtonProps[];\n size?: ContentSize;\n titleId?: string;\n qa?: string;\n buttonQa?: string;\n};\n\nfunction getButtonSize(size: ContentSize) {\n switch (size) {\n case 's':\n return 'm';\n case 'l':\n default:\n return 'xl';\n }\n}\n\nconst Buttons = ({className, titleId, buttons, size = 's', qa, buttonQa}: ButtonsProps) =>\n buttons ? (\n <div className={b({size}, className)} data-qa={qa}>\n {buttons.map((item) => (\n <Button\n className={b('button')}\n {...item}\n key={item.url}\n size={getButtonSize(size)}\n qa={buttonQa}\n extraProps={{\n 'aria-describedby': item.urlTitle ? undefined : titleId,\n ...item.extraProps,\n }}\n />\n ))}\n </div>\n ) : null;\n\nexport default Buttons;\n"]}
1
+ {"version":3,"file":"Buttons.js","sourceRoot":"../../../../src","sources":["components/Buttons/Buttons.tsx"],"names":[],"mappings":";;;;;AACA,gDAAkC;AAClC,yEAAsC;AAItC,MAAM,CAAC,GAAG,IAAA,aAAK,EAAC,SAAS,CAAC,CAAC;AAW3B,SAAS,aAAa,CAAC,IAAiB;IACpC,QAAQ,IAAI,EAAE,CAAC;QACX,KAAK,GAAG;YACJ,OAAO,GAAG,CAAC;QACf,KAAK,GAAG,CAAC;QACT,KAAK,GAAG,CAAC;QACT,KAAK,IAAI,CAAC;QACV;YACI,OAAO,IAAI,CAAC;IACpB,CAAC;AACL,CAAC;AAED,MAAM,OAAO,GAAG,CAAC,EAAC,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,GAAG,GAAG,EAAE,EAAE,EAAE,QAAQ,EAAe,EAAE,EAAE,CACtF,OAAO,CAAC,CAAC,CAAC,CACN,gCAAK,SAAS,EAAE,CAAC,CAAC,EAAC,IAAI,EAAC,EAAE,SAAS,CAAC,aAAW,EAAE,YAC5C,OAAO,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CACnB,2BAAC,gBAAM,IACH,SAAS,EAAE,CAAC,CAAC,QAAQ,CAAC,KAClB,IAAI,EACR,GAAG,EAAE,IAAI,CAAC,GAAG,EACb,IAAI,EAAE,aAAa,CAAC,IAAI,CAAC,EACzB,EAAE,EAAE,QAAQ,EACZ,UAAU,EAAE;YACR,kBAAkB,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO;YACvD,GAAG,IAAI,CAAC,UAAU;SACrB,GACH,CACL,CAAC,GACA,CACT,CAAC,CAAC,CAAC,IAAI,CAAC;AAEb,kBAAe,OAAO,CAAC","sourcesContent":["import {ButtonProps, ContentSize} from '../../models';\nimport {block} from '../../utils';\nimport Button from '../Button/Button';\n\nimport './Buttons.scss';\n\nconst b = block('buttons');\n\ntype ButtonsProps = {\n className?: string;\n buttons?: ButtonProps[];\n size?: ContentSize;\n titleId?: string;\n qa?: string;\n buttonQa?: string;\n};\n\nfunction getButtonSize(size: ContentSize) {\n switch (size) {\n case 's':\n return 'm';\n case 'm':\n case 'l':\n case 'xl':\n default:\n return 'xl';\n }\n}\n\nconst Buttons = ({className, titleId, buttons, size = 's', qa, buttonQa}: ButtonsProps) =>\n buttons ? (\n <div className={b({size}, className)} data-qa={qa}>\n {buttons.map((item) => (\n <Button\n className={b('button')}\n {...item}\n key={item.url}\n size={getButtonSize(size)}\n qa={buttonQa}\n extraProps={{\n 'aria-describedby': item.urlTitle ? undefined : titleId,\n ...item.extraProps,\n }}\n />\n ))}\n </div>\n ) : null;\n\nexport default Buttons;\n"]}
@@ -1,38 +1,38 @@
1
1
  /* use this for style redefinitions to awoid problems with
2
2
  unpredictable css rules order in build */
3
- .pc-content-list_size_l, .pc-content-list_size_m {
3
+ .pc-content-list_size_xl, .pc-content-list_size_l, .pc-content-list_size_m {
4
4
  max-width: 480px;
5
5
  }
6
- .pc-content-list_size_l .pc-content-list__title, .pc-content-list_size_m .pc-content-list__title {
6
+ .pc-content-list_size_xl .pc-content-list__title, .pc-content-list_size_l .pc-content-list__title, .pc-content-list_size_m .pc-content-list__title {
7
7
  font-size: var(--g-text-header-1-font-size);
8
8
  line-height: var(--g-text-header-1-line-height);
9
9
  margin: 0 0 8px;
10
10
  }
11
- .pc-content-list_size_l .pc-content-list__icon, .pc-content-list_size_m .pc-content-list__icon {
11
+ .pc-content-list_size_xl .pc-content-list__icon, .pc-content-list_size_l .pc-content-list__icon, .pc-content-list_size_m .pc-content-list__icon {
12
12
  width: 22px;
13
13
  height: 22px;
14
14
  margin-top: 1px;
15
15
  margin-bottom: 1px;
16
16
  margin-right: 12px;
17
17
  }
18
- .pc-content-list_size_l .pc-content-list__item:not(:last-child), .pc-content-list_size_m .pc-content-list__item:not(:last-child) {
18
+ .pc-content-list_size_xl .pc-content-list__item:not(:last-child), .pc-content-list_size_l .pc-content-list__item:not(:last-child), .pc-content-list_size_m .pc-content-list__item:not(:last-child) {
19
19
  margin-bottom: 16px;
20
20
  }
21
- .pc-content-list_size_l .pc-content-list__item_without-title:not(:last-child), .pc-content-list_size_m .pc-content-list__item_without-title:not(:last-child) {
21
+ .pc-content-list_size_xl .pc-content-list__item_without-title:not(:last-child), .pc-content-list_size_l .pc-content-list__item_without-title:not(:last-child), .pc-content-list_size_m .pc-content-list__item_without-title:not(:last-child) {
22
22
  margin-bottom: 12px;
23
23
  }
24
- .pc-content-list_size_l .pc-content-list__item_without-title .pc-content-list__icon, .pc-content-list_size_m .pc-content-list__item_without-title .pc-content-list__icon {
24
+ .pc-content-list_size_xl .pc-content-list__item_without-title .pc-content-list__icon, .pc-content-list_size_l .pc-content-list__item_without-title .pc-content-list__icon, .pc-content-list_size_m .pc-content-list__item_without-title .pc-content-list__icon {
25
25
  width: 20px;
26
26
  height: 20px;
27
27
  margin-top: 2px;
28
28
  margin-bottom: 2px;
29
29
  margin-right: 8px;
30
30
  }
31
- .pc-content-list_size_l .pc-content-list__text, .pc-content-list_size_m .pc-content-list__text {
31
+ .pc-content-list_size_xl .pc-content-list__text, .pc-content-list_size_l .pc-content-list__text, .pc-content-list_size_m .pc-content-list__text {
32
32
  font-size: var(--g-text-subheader-2-font-size);
33
33
  line-height: var(--g-text-subheader-2-line-height);
34
34
  }
35
- .pc-content-list_size_l .pc-content-list__text_without-title, .pc-content-list_size_m .pc-content-list__text_without-title {
35
+ .pc-content-list_size_xl .pc-content-list__text_without-title, .pc-content-list_size_l .pc-content-list__text_without-title, .pc-content-list_size_m .pc-content-list__text_without-title {
36
36
  font-size: var(--g-text-subheader-3-font-size);
37
37
  line-height: var(--g-text-subheader-3-line-height);
38
38
  }
@@ -13,7 +13,9 @@ function getHeadingLevel(size) {
13
13
  switch (size) {
14
14
  case 's':
15
15
  return 'h4';
16
+ case 'm':
16
17
  case 'l':
18
+ case 'xl':
17
19
  default:
18
20
  return 'h3';
19
21
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ContentList.js","sourceRoot":"../../../../src","sources":["components/ContentList/ContentList.tsx"],"names":[],"mappings":";;;;AAAA,qDAA+B;AAE/B,+BAAkC;AAIlC,gDAAkC;AAClC,kDAAmD;AACnD,wFAAqD;AACrD,qFAAkD;AAIlD,MAAM,CAAC,GAAG,IAAA,aAAK,EAAC,cAAc,CAAC,CAAC;AAEhC,SAAS,eAAe,CAAC,IAAiB;IACtC,QAAQ,IAAI,EAAE,CAAC;QACX,KAAK,GAAG;YACJ,OAAO,IAAI,CAAC;QAChB,KAAK,GAAG,CAAC;QACT;YACI,OAAO,IAAI,CAAC;IACpB,CAAC;AACL,CAAC;AAED,MAAM,WAAW,GAAG,CAAC,EAAC,IAAI,EAAE,IAAI,GAAG,GAAG,EAAE,EAAE,EAAE,KAAK,EAA6B,EAAE,EAAE;IAC9E,MAAM,YAAY,GAAG,IAAA,wBAAe,EAAC,EAAE,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC;IAErE,OAAO,CACH,gCAAK,SAAS,EAAE,CAAC,CAAC,EAAC,IAAI,EAAE,KAAK,EAAC,CAAC,aAAW,EAAE,YACxC,IAAI,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;YAChB,MAAM,EAAC,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,WAAW,EAAC,GAAG,IAAI,CAAC;YAC9C,OAAO,CACH,iCAAK,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,EAAC,eAAe,EAAE,CAAC,KAAK,EAAC,CAAC,aAChD,uBAAC,qBAAW,IACR,IAAI,EAAE,IAAI,EACV,SAAS,EAAE,CAAC,CAAC,MAAM,CAAC,EACpB,EAAE,EAAE,YAAY,CAAC,KAAK,EACtB,WAAW,EAAE,WAAW,GAC1B,EACF,4CACK,KAAK;gCACF,KAAK,CAAC,aAAa,CACf,eAAe,CAAC,IAAI,CAAC,EACrB,EAAC,SAAS,EAAE,CAAC,CAAC,OAAO,CAAC,EAAE,SAAS,EAAE,YAAY,CAAC,KAAK,EAAC,EACtD,uBAAC,oBAAU,IAAC,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,EAAC,WAAW,EAAE,IAAI,EAAC,GAAI,CACjE,EACJ,IAAI,IAAI,CACL,uBAAC,oBAAU,IACP,gBAAgB,EAAE,CAAC,CAAC,MAAM,EAAE,EAAC,eAAe,EAAE,CAAC,KAAK,EAAC,CAAC,EACtD,OAAO,EAAE,IAAI,EACb,SAAS,EAAE,EAAC,WAAW,EAAE,IAAI,EAAC,EAC9B,EAAE,EAAE,YAAY,CAAC,IAAI,GACvB,CACL,IACC,KAtBiD,IAAA,SAAM,GAAE,CAuB7D,CACT,CAAC;QACN,CAAC,CAAC,GACA,CACT,CAAC;AACN,CAAC,CAAC;AAEF,kBAAe,WAAW,CAAC","sourcesContent":["import * as React from 'react';\n\nimport {v4 as uuidv4} from 'uuid';\n\nimport {ContentListProps, ContentSize} from '../../models';\nimport {QAProps} from '../../models/common';\nimport {block} from '../../utils';\nimport {getQaAttrubutes} from '../../utils/blocks';\nimport ContentIcon from '../ContentIcon/ContentIcon';\nimport YFMWrapper from '../YFMWrapper/YFMWrapper';\n\nimport './ContentList.scss';\n\nconst b = block('content-list');\n\nfunction getHeadingLevel(size: ContentSize) {\n switch (size) {\n case 's':\n return 'h4';\n case 'l':\n default:\n return 'h3';\n }\n}\n\nconst ContentList = ({list, size = 'l', qa, theme}: ContentListProps & QAProps) => {\n const qaAttributes = getQaAttrubutes(qa, ['image', 'title', 'text']);\n\n return (\n <div className={b({size, theme})} data-qa={qa}>\n {list?.map((item) => {\n const {icon, title, text, gravityIcon} = item;\n return (\n <div className={b('item', {'without-title': !title})} key={uuidv4()}>\n <ContentIcon\n icon={icon}\n className={b('icon')}\n qa={qaAttributes.image}\n gravityIcon={gravityIcon}\n />\n <div>\n {title &&\n React.createElement(\n getHeadingLevel(size),\n {className: b('title'), 'data-qa': qaAttributes.title},\n <YFMWrapper content={title} modifiers={{constructor: true}} />,\n )}\n {text && (\n <YFMWrapper\n contentClassName={b('text', {'without-title': !title})}\n content={text}\n modifiers={{constructor: true}}\n qa={qaAttributes.text}\n />\n )}\n </div>\n </div>\n );\n })}\n </div>\n );\n};\n\nexport default ContentList;\n"]}
1
+ {"version":3,"file":"ContentList.js","sourceRoot":"../../../../src","sources":["components/ContentList/ContentList.tsx"],"names":[],"mappings":";;;;AAAA,qDAA+B;AAE/B,+BAAkC;AAIlC,gDAAkC;AAClC,kDAAmD;AACnD,wFAAqD;AACrD,qFAAkD;AAIlD,MAAM,CAAC,GAAG,IAAA,aAAK,EAAC,cAAc,CAAC,CAAC;AAEhC,SAAS,eAAe,CAAC,IAAiB;IACtC,QAAQ,IAAI,EAAE,CAAC;QACX,KAAK,GAAG;YACJ,OAAO,IAAI,CAAC;QAChB,KAAK,GAAG,CAAC;QACT,KAAK,GAAG,CAAC;QACT,KAAK,IAAI,CAAC;QACV;YACI,OAAO,IAAI,CAAC;IACpB,CAAC;AACL,CAAC;AAED,MAAM,WAAW,GAAG,CAAC,EAAC,IAAI,EAAE,IAAI,GAAG,GAAG,EAAE,EAAE,EAAE,KAAK,EAA6B,EAAE,EAAE;IAC9E,MAAM,YAAY,GAAG,IAAA,wBAAe,EAAC,EAAE,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC;IAErE,OAAO,CACH,gCAAK,SAAS,EAAE,CAAC,CAAC,EAAC,IAAI,EAAE,KAAK,EAAC,CAAC,aAAW,EAAE,YACxC,IAAI,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;YAChB,MAAM,EAAC,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,WAAW,EAAC,GAAG,IAAI,CAAC;YAC9C,OAAO,CACH,iCAAK,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,EAAC,eAAe,EAAE,CAAC,KAAK,EAAC,CAAC,aAChD,uBAAC,qBAAW,IACR,IAAI,EAAE,IAAI,EACV,SAAS,EAAE,CAAC,CAAC,MAAM,CAAC,EACpB,EAAE,EAAE,YAAY,CAAC,KAAK,EACtB,WAAW,EAAE,WAAW,GAC1B,EACF,4CACK,KAAK;gCACF,KAAK,CAAC,aAAa,CACf,eAAe,CAAC,IAAI,CAAC,EACrB,EAAC,SAAS,EAAE,CAAC,CAAC,OAAO,CAAC,EAAE,SAAS,EAAE,YAAY,CAAC,KAAK,EAAC,EACtD,uBAAC,oBAAU,IAAC,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,EAAC,WAAW,EAAE,IAAI,EAAC,GAAI,CACjE,EACJ,IAAI,IAAI,CACL,uBAAC,oBAAU,IACP,gBAAgB,EAAE,CAAC,CAAC,MAAM,EAAE,EAAC,eAAe,EAAE,CAAC,KAAK,EAAC,CAAC,EACtD,OAAO,EAAE,IAAI,EACb,SAAS,EAAE,EAAC,WAAW,EAAE,IAAI,EAAC,EAC9B,EAAE,EAAE,YAAY,CAAC,IAAI,GACvB,CACL,IACC,KAtBiD,IAAA,SAAM,GAAE,CAuB7D,CACT,CAAC;QACN,CAAC,CAAC,GACA,CACT,CAAC;AACN,CAAC,CAAC;AAEF,kBAAe,WAAW,CAAC","sourcesContent":["import * as React from 'react';\n\nimport {v4 as uuidv4} from 'uuid';\n\nimport {ContentListProps, ContentSize} from '../../models';\nimport {QAProps} from '../../models/common';\nimport {block} from '../../utils';\nimport {getQaAttrubutes} from '../../utils/blocks';\nimport ContentIcon from '../ContentIcon/ContentIcon';\nimport YFMWrapper from '../YFMWrapper/YFMWrapper';\n\nimport './ContentList.scss';\n\nconst b = block('content-list');\n\nfunction getHeadingLevel(size: ContentSize) {\n switch (size) {\n case 's':\n return 'h4';\n case 'm':\n case 'l':\n case 'xl':\n default:\n return 'h3';\n }\n}\n\nconst ContentList = ({list, size = 'l', qa, theme}: ContentListProps & QAProps) => {\n const qaAttributes = getQaAttrubutes(qa, ['image', 'title', 'text']);\n\n return (\n <div className={b({size, theme})} data-qa={qa}>\n {list?.map((item) => {\n const {icon, title, text, gravityIcon} = item;\n return (\n <div className={b('item', {'without-title': !title})} key={uuidv4()}>\n <ContentIcon\n icon={icon}\n className={b('icon')}\n qa={qaAttributes.image}\n gravityIcon={gravityIcon}\n />\n <div>\n {title &&\n React.createElement(\n getHeadingLevel(size),\n {className: b('title'), 'data-qa': qaAttributes.title},\n <YFMWrapper content={title} modifiers={{constructor: true}} />,\n )}\n {text && (\n <YFMWrapper\n contentClassName={b('text', {'without-title': !title})}\n content={text}\n modifiers={{constructor: true}}\n qa={qaAttributes.text}\n />\n )}\n </div>\n </div>\n );\n })}\n </div>\n );\n};\n\nexport default ContentList;\n"]}
@@ -37,6 +37,12 @@ unpredictable css rules order in build */
37
37
  margin-bottom: 4px;
38
38
  margin-top: 4px;
39
39
  }
40
+ .pc-icon-wrapper__icon_icon-position_left.pc-icon-wrapper__icon_size_xl {
41
+ height: 44px;
42
+ width: 44px;
43
+ margin-bottom: 4px;
44
+ margin-top: 4px;
45
+ }
40
46
  .pc-icon-wrapper__content {
41
47
  display: flex;
42
48
  flex-direction: column;
@@ -10,6 +10,6 @@
10
10
  .pc-links_size_s {
11
11
  gap: 8px;
12
12
  }
13
- .pc-links_size_l {
13
+ .pc-links_size_m, .pc-links_size_l, .pc-links_size_xl {
14
14
  gap: 12px;
15
15
  }
@@ -10,7 +10,9 @@ function getLinkSize(size) {
10
10
  switch (size) {
11
11
  case 's':
12
12
  return 'm';
13
+ case 'm':
13
14
  case 'l':
15
+ case 'xl':
14
16
  default:
15
17
  return 'l';
16
18
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Links.js","sourceRoot":"../../../../src","sources":["components/Links/Links.tsx"],"names":[],"mappings":";;;;;AAGA,gDAAkC;AAClC,mEAAgC;AAIhC,MAAM,CAAC,GAAG,IAAA,aAAK,EAAC,OAAO,CAAC,CAAC;AAEzB,SAAS,WAAW,CAAC,IAAiB;IAClC,QAAQ,IAAI,EAAE,CAAC;QACX,KAAK,GAAG;YACJ,OAAO,GAAG,CAAC;QACf,KAAK,GAAG,CAAC;QACT;YACI,OAAO,GAAG,CAAC;IACnB,CAAC;AACL,CAAC;AAWD,MAAM,KAAK,GAAG,CAAC,EACX,SAAS,EACT,OAAO,EACP,KAAK,EACL,IAAI,GAAG,GAAG,EACV,EAAE,EACF,MAAM,GAC4B,EAAE,EAAE,CACtC,KAAK,CAAC,CAAC,CAAC,CACJ,gCAAK,SAAS,EAAE,CAAC,CAAC,EAAC,IAAI,EAAC,EAAE,SAAS,CAAC,aAAW,EAAE,YAC5C,KAAK,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAClB,2BAAC,cAAI,IACD,SAAS,EAAE,CAAC,CAAC,MAAM,CAAC,KAChB,IAAI,EACR,QAAQ,EAAE,WAAW,CAAC,IAAI,CAAC,EAC3B,GAAG,EAAE,IAAI,CAAC,GAAG,EACb,EAAE,EAAE,MAAM,EACV,UAAU,EAAE;YACR,kBAAkB,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO;YACvD,GAAG,IAAI,CAAC,UAAU;SACrB,GACH,CACL,CAAC,GACA,CACT,CAAC,CAAC,CAAC,IAAI,CAAC;AAEb,kBAAe,KAAK,CAAC","sourcesContent":["import * as React from 'react';\n\nimport {ContentSize, LinkProps} from '../../models';\nimport {block} from '../../utils';\nimport Link from '../Link/Link';\n\nimport './Links.scss';\n\nconst b = block('links');\n\nfunction getLinkSize(size: ContentSize) {\n switch (size) {\n case 's':\n return 'm';\n case 'l':\n default:\n return 'l';\n }\n}\n\ntype LinksProps = {\n className?: string;\n titleId?: string;\n links?: LinkProps[];\n size?: ContentSize;\n qa?: string;\n linkQa?: string;\n};\n\nconst Links = ({\n className,\n titleId,\n links,\n size = 's',\n qa,\n linkQa,\n}: React.PropsWithChildren<LinksProps>) =>\n links ? (\n <div className={b({size}, className)} data-qa={qa}>\n {links?.map((link) => (\n <Link\n className={b('link')}\n {...link}\n textSize={getLinkSize(size)}\n key={link.url}\n qa={linkQa}\n extraProps={{\n 'aria-describedby': link.urlTitle ? undefined : titleId,\n ...link.extraProps,\n }}\n />\n ))}\n </div>\n ) : null;\n\nexport default Links;\n"]}
1
+ {"version":3,"file":"Links.js","sourceRoot":"../../../../src","sources":["components/Links/Links.tsx"],"names":[],"mappings":";;;;;AAGA,gDAAkC;AAClC,mEAAgC;AAIhC,MAAM,CAAC,GAAG,IAAA,aAAK,EAAC,OAAO,CAAC,CAAC;AAEzB,SAAS,WAAW,CAAC,IAAiB;IAClC,QAAQ,IAAI,EAAE,CAAC;QACX,KAAK,GAAG;YACJ,OAAO,GAAG,CAAC;QACf,KAAK,GAAG,CAAC;QACT,KAAK,GAAG,CAAC;QACT,KAAK,IAAI,CAAC;QACV;YACI,OAAO,GAAG,CAAC;IACnB,CAAC;AACL,CAAC;AAWD,MAAM,KAAK,GAAG,CAAC,EACX,SAAS,EACT,OAAO,EACP,KAAK,EACL,IAAI,GAAG,GAAG,EACV,EAAE,EACF,MAAM,GAC4B,EAAE,EAAE,CACtC,KAAK,CAAC,CAAC,CAAC,CACJ,gCAAK,SAAS,EAAE,CAAC,CAAC,EAAC,IAAI,EAAC,EAAE,SAAS,CAAC,aAAW,EAAE,YAC5C,KAAK,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAClB,2BAAC,cAAI,IACD,SAAS,EAAE,CAAC,CAAC,MAAM,CAAC,KAChB,IAAI,EACR,QAAQ,EAAE,WAAW,CAAC,IAAI,CAAC,EAC3B,GAAG,EAAE,IAAI,CAAC,GAAG,EACb,EAAE,EAAE,MAAM,EACV,UAAU,EAAE;YACR,kBAAkB,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO;YACvD,GAAG,IAAI,CAAC,UAAU;SACrB,GACH,CACL,CAAC,GACA,CACT,CAAC,CAAC,CAAC,IAAI,CAAC;AAEb,kBAAe,KAAK,CAAC","sourcesContent":["import * as React from 'react';\n\nimport {ContentSize, LinkProps} from '../../models';\nimport {block} from '../../utils';\nimport Link from '../Link/Link';\n\nimport './Links.scss';\n\nconst b = block('links');\n\nfunction getLinkSize(size: ContentSize) {\n switch (size) {\n case 's':\n return 'm';\n case 'm':\n case 'l':\n case 'xl':\n default:\n return 'l';\n }\n}\n\ntype LinksProps = {\n className?: string;\n titleId?: string;\n links?: LinkProps[];\n size?: ContentSize;\n qa?: string;\n linkQa?: string;\n};\n\nconst Links = ({\n className,\n titleId,\n links,\n size = 's',\n qa,\n linkQa,\n}: React.PropsWithChildren<LinksProps>) =>\n links ? (\n <div className={b({size}, className)} data-qa={qa}>\n {links?.map((link) => (\n <Link\n className={b('link')}\n {...link}\n textSize={getLinkSize(size)}\n key={link.url}\n qa={linkQa}\n extraProps={{\n 'aria-describedby': link.urlTitle ? undefined : titleId,\n ...link.extraProps,\n }}\n />\n ))}\n </div>\n ) : null;\n\nexport default Links;\n"]}