@gravity-ui/page-constructor 2.18.0 → 3.0.0-alpha.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 (242) hide show
  1. package/CHANGELOG.md +0 -19
  2. package/build/cjs/blocks/index.d.ts +0 -4
  3. package/build/cjs/blocks/index.js +1 -9
  4. package/build/cjs/blocks/validators.d.ts +0 -4
  5. package/build/cjs/blocks/validators.js +0 -4
  6. package/build/cjs/components/Anchor/Anchor.d.ts +2 -2
  7. package/build/cjs/components/Anchor/Anchor.js +1 -1
  8. package/build/cjs/components/Anchor/__tests__/Anchor.test.d.ts +1 -0
  9. package/build/cjs/components/Anchor/__tests__/Anchor.test.js +21 -0
  10. package/build/cjs/components/AnimateBlock/__tests__/AnimateBlock.test.d.ts +1 -0
  11. package/build/cjs/components/AnimateBlock/__tests__/AnimateBlock.test.js +36 -0
  12. package/build/cjs/components/Author/__tests__/Author.test.d.ts +1 -0
  13. package/build/cjs/components/Author/__tests__/Author.test.js +49 -0
  14. package/build/cjs/components/BackLink/__tests__/BackLink.test.d.ts +1 -0
  15. package/build/cjs/components/BackLink/__tests__/BackLink.test.js +63 -0
  16. package/build/cjs/components/BlockBase/__tests__/BlockBase.test.d.ts +1 -0
  17. package/build/cjs/components/BlockBase/__tests__/BlockBase.test.js +44 -0
  18. package/build/cjs/components/Button/__tests__/Button.test.d.ts +1 -0
  19. package/build/cjs/components/Button/__tests__/Button.test.js +91 -0
  20. package/build/cjs/components/ButtonTabs/__tests__/ButtonTabs.test.d.ts +1 -0
  21. package/build/cjs/components/ButtonTabs/__tests__/ButtonTabs.test.js +58 -0
  22. package/build/cjs/components/index.d.ts +0 -1
  23. package/build/cjs/components/index.js +1 -3
  24. package/build/cjs/constructor-items.d.ts +0 -16
  25. package/build/cjs/constructor-items.js +0 -16
  26. package/build/cjs/grid/Col/Col.d.ts +1 -1
  27. package/build/cjs/hooks/index.d.ts +1 -1
  28. package/build/cjs/hooks/index.js +3 -3
  29. package/build/cjs/internal-typings/global.d.ts +16 -18
  30. package/build/cjs/models/constructor-items/blocks.d.ts +2 -50
  31. package/build/cjs/models/constructor-items/blocks.js +0 -4
  32. package/build/cjs/models/constructor-items/common.d.ts +0 -14
  33. package/build/cjs/models/constructor-items/common.js +1 -6
  34. package/build/cjs/models/constructor-items/sub-blocks.d.ts +5 -46
  35. package/build/cjs/models/constructor-items/sub-blocks.js +2 -11
  36. package/build/cjs/schema/index.js +2 -8
  37. package/build/cjs/schema/validators/blocks.d.ts +0 -4
  38. package/build/cjs/schema/validators/blocks.js +0 -4
  39. package/build/cjs/schema/validators/sub-blocks.d.ts +0 -3
  40. package/build/cjs/schema/validators/sub-blocks.js +0 -3
  41. package/build/cjs/sub-blocks/HubspotForm/HubspotFormContainer.d.ts +1 -2
  42. package/build/cjs/sub-blocks/HubspotForm/HubspotFormContainer.js +2 -5
  43. package/build/cjs/sub-blocks/HubspotForm/index.d.ts +1 -1
  44. package/build/cjs/sub-blocks/HubspotForm/index.js +5 -6
  45. package/build/cjs/sub-blocks/index.d.ts +0 -3
  46. package/build/cjs/sub-blocks/index.js +1 -7
  47. package/build/cjs/text-transform/{blocks.d.ts → common.d.ts} +1 -4
  48. package/build/cjs/text-transform/common.js +31 -0
  49. package/build/cjs/text-transform/config.d.ts +28 -0
  50. package/build/cjs/text-transform/config.js +291 -0
  51. package/build/cjs/text-transform/index.d.ts +3 -1
  52. package/build/cjs/text-transform/index.js +3 -1
  53. package/build/cjs/text-transform/transformers.d.ts +16 -0
  54. package/build/cjs/text-transform/transformers.js +61 -0
  55. package/build/cjs/utils/index.d.ts +0 -1
  56. package/build/cjs/utils/index.js +0 -1
  57. package/build/esm/blocks/index.d.ts +0 -4
  58. package/build/esm/blocks/index.js +0 -4
  59. package/build/esm/blocks/validators.d.ts +0 -4
  60. package/build/esm/blocks/validators.js +0 -4
  61. package/build/esm/components/Anchor/Anchor.d.ts +2 -2
  62. package/build/esm/components/Anchor/Anchor.js +1 -1
  63. package/build/esm/components/Anchor/__tests__/Anchor.test.d.ts +1 -0
  64. package/build/esm/components/Anchor/__tests__/Anchor.test.js +18 -0
  65. package/build/esm/components/AnimateBlock/__tests__/AnimateBlock.test.d.ts +1 -0
  66. package/build/esm/components/AnimateBlock/__tests__/AnimateBlock.test.js +33 -0
  67. package/build/esm/components/Author/__tests__/Author.test.d.ts +1 -0
  68. package/build/esm/components/Author/__tests__/Author.test.js +46 -0
  69. package/build/esm/components/BackLink/__tests__/BackLink.test.d.ts +1 -0
  70. package/build/esm/components/BackLink/__tests__/BackLink.test.js +60 -0
  71. package/build/esm/components/BlockBase/__tests__/BlockBase.test.d.ts +1 -0
  72. package/build/esm/components/BlockBase/__tests__/BlockBase.test.js +41 -0
  73. package/build/esm/components/Button/__tests__/Button.test.d.ts +1 -0
  74. package/build/esm/components/Button/__tests__/Button.test.js +88 -0
  75. package/build/esm/components/ButtonTabs/__tests__/ButtonTabs.test.d.ts +1 -0
  76. package/build/esm/components/ButtonTabs/__tests__/ButtonTabs.test.js +55 -0
  77. package/build/esm/components/index.d.ts +0 -1
  78. package/build/esm/components/index.js +0 -1
  79. package/build/esm/constructor-items.d.ts +0 -16
  80. package/build/esm/constructor-items.js +2 -18
  81. package/build/esm/grid/Col/Col.d.ts +1 -1
  82. package/build/esm/hooks/index.d.ts +1 -1
  83. package/build/esm/hooks/index.js +1 -1
  84. package/build/esm/internal-typings/global.d.ts +16 -18
  85. package/build/esm/models/constructor-items/blocks.d.ts +2 -50
  86. package/build/esm/models/constructor-items/blocks.js +0 -4
  87. package/build/esm/models/constructor-items/common.d.ts +0 -14
  88. package/build/esm/models/constructor-items/common.js +0 -5
  89. package/build/esm/models/constructor-items/sub-blocks.d.ts +5 -46
  90. package/build/esm/models/constructor-items/sub-blocks.js +2 -11
  91. package/build/esm/schema/index.js +4 -10
  92. package/build/esm/schema/validators/blocks.d.ts +0 -4
  93. package/build/esm/schema/validators/blocks.js +0 -4
  94. package/build/esm/schema/validators/sub-blocks.d.ts +0 -3
  95. package/build/esm/schema/validators/sub-blocks.js +0 -3
  96. package/build/esm/sub-blocks/HubspotForm/HubspotFormContainer.d.ts +1 -2
  97. package/build/esm/sub-blocks/HubspotForm/HubspotFormContainer.js +3 -6
  98. package/build/esm/sub-blocks/HubspotForm/index.d.ts +1 -1
  99. package/build/esm/sub-blocks/HubspotForm/index.js +6 -7
  100. package/build/esm/sub-blocks/index.d.ts +0 -3
  101. package/build/esm/sub-blocks/index.js +0 -3
  102. package/build/esm/text-transform/{blocks.d.ts → common.d.ts} +1 -4
  103. package/build/esm/text-transform/common.js +25 -0
  104. package/build/esm/text-transform/config.d.ts +28 -0
  105. package/build/esm/text-transform/{blocks.js → config.js} +15 -123
  106. package/build/esm/text-transform/index.d.ts +3 -1
  107. package/build/esm/text-transform/index.js +3 -1
  108. package/build/esm/text-transform/transformers.d.ts +16 -0
  109. package/build/esm/text-transform/transformers.js +56 -0
  110. package/build/esm/utils/index.d.ts +0 -1
  111. package/build/esm/utils/index.js +0 -1
  112. package/package.json +4 -1
  113. package/server/models/constructor-items/blocks.d.ts +2 -50
  114. package/server/models/constructor-items/blocks.js +0 -4
  115. package/server/models/constructor-items/common.d.ts +0 -14
  116. package/server/models/constructor-items/common.js +1 -6
  117. package/server/models/constructor-items/sub-blocks.d.ts +5 -46
  118. package/server/models/constructor-items/sub-blocks.js +2 -11
  119. package/server/text-transform/{blocks.d.ts → common.d.ts} +1 -4
  120. package/server/text-transform/common.js +31 -0
  121. package/server/text-transform/config.d.ts +28 -0
  122. package/server/text-transform/config.js +301 -0
  123. package/server/text-transform/index.d.ts +3 -1
  124. package/server/text-transform/index.js +3 -1
  125. package/server/text-transform/transformers.d.ts +16 -0
  126. package/server/text-transform/transformers.js +63 -0
  127. package/server/utils/index.d.ts +0 -1
  128. package/server/utils/index.js +0 -1
  129. package/build/cjs/blocks/LinkTable/LinkTable.css +0 -3
  130. package/build/cjs/blocks/LinkTable/LinkTable.d.ts +0 -3
  131. package/build/cjs/blocks/LinkTable/LinkTable.js +0 -22
  132. package/build/cjs/blocks/LinkTable/schema.d.ts +0 -77
  133. package/build/cjs/blocks/LinkTable/schema.js +0 -15
  134. package/build/cjs/blocks/Preview/MediaContent/MediaContent.css +0 -50
  135. package/build/cjs/blocks/Preview/MediaContent/MediaContent.d.ts +0 -13
  136. package/build/cjs/blocks/Preview/MediaContent/MediaContent.js +0 -49
  137. package/build/cjs/blocks/Preview/MediaContent/PreviewContent.css +0 -106
  138. package/build/cjs/blocks/Preview/MediaContent/PreviewContent.d.ts +0 -11
  139. package/build/cjs/blocks/Preview/MediaContent/PreviewContent.js +0 -17
  140. package/build/cjs/blocks/Preview/MediaContent/PreviewMedia.css +0 -54
  141. package/build/cjs/blocks/Preview/MediaContent/PreviewMedia.d.ts +0 -9
  142. package/build/cjs/blocks/Preview/MediaContent/PreviewMedia.js +0 -13
  143. package/build/cjs/blocks/Preview/Preview.css +0 -50
  144. package/build/cjs/blocks/Preview/Preview.d.ts +0 -3
  145. package/build/cjs/blocks/Preview/Preview.js +0 -130
  146. package/build/cjs/blocks/Preview/schema.d.ts +0 -40
  147. package/build/cjs/blocks/Preview/schema.js +0 -53
  148. package/build/cjs/blocks/Security/Security.css +0 -142
  149. package/build/cjs/blocks/Security/Security.d.ts +0 -3
  150. package/build/cjs/blocks/Security/Security.js +0 -29
  151. package/build/cjs/blocks/Security/schema.d.ts +0 -170
  152. package/build/cjs/blocks/Security/schema.js +0 -32
  153. package/build/cjs/blocks/Simple/Simple.css +0 -22
  154. package/build/cjs/blocks/Simple/Simple.d.ts +0 -3
  155. package/build/cjs/blocks/Simple/Simple.js +0 -22
  156. package/build/cjs/blocks/Simple/schema.d.ts +0 -68
  157. package/build/cjs/blocks/Simple/schema.js +0 -14
  158. package/build/cjs/components/HeightCalculator/HeightCalculator.css +0 -9
  159. package/build/cjs/components/HeightCalculator/HeightCalculator.d.ts +0 -10
  160. package/build/cjs/components/HeightCalculator/HeightCalculator.js +0 -44
  161. package/build/cjs/context/breakpointContext/breakpointContext.d.ts +0 -2
  162. package/build/cjs/context/breakpointContext/breakpointContext.js +0 -7
  163. package/build/cjs/context/breakpointContext/index.d.ts +0 -1
  164. package/build/cjs/context/breakpointContext/index.js +0 -4
  165. package/build/cjs/hooks/useIntersection.d.ts +0 -1
  166. package/build/cjs/hooks/useIntersection.js +0 -21
  167. package/build/cjs/sub-blocks/CardWithImage/CardWithImage.css +0 -19
  168. package/build/cjs/sub-blocks/CardWithImage/CardWithImage.d.ts +0 -3
  169. package/build/cjs/sub-blocks/CardWithImage/CardWithImage.js +0 -16
  170. package/build/cjs/sub-blocks/CardWithImage/schema.d.ts +0 -154
  171. package/build/cjs/sub-blocks/CardWithImage/schema.js +0 -46
  172. package/build/cjs/sub-blocks/Partner/Partner.css +0 -8
  173. package/build/cjs/sub-blocks/Partner/Partner.d.ts +0 -3
  174. package/build/cjs/sub-blocks/Partner/Partner.js +0 -15
  175. package/build/cjs/sub-blocks/Partner/schema.d.ts +0 -30
  176. package/build/cjs/sub-blocks/Partner/schema.js +0 -17
  177. package/build/cjs/sub-blocks/TutorialCard/TutorialCard.css +0 -20
  178. package/build/cjs/sub-blocks/TutorialCard/TutorialCard.d.ts +0 -3
  179. package/build/cjs/sub-blocks/TutorialCard/TutorialCard.js +0 -23
  180. package/build/cjs/sub-blocks/TutorialCard/schema.d.ts +0 -34
  181. package/build/cjs/sub-blocks/TutorialCard/schema.js +0 -20
  182. package/build/cjs/text-transform/blocks.js +0 -404
  183. package/build/cjs/utils/scroll.d.ts +0 -15
  184. package/build/cjs/utils/scroll.js +0 -35
  185. package/build/esm/blocks/LinkTable/LinkTable.css +0 -3
  186. package/build/esm/blocks/LinkTable/LinkTable.d.ts +0 -4
  187. package/build/esm/blocks/LinkTable/LinkTable.js +0 -21
  188. package/build/esm/blocks/LinkTable/schema.d.ts +0 -77
  189. package/build/esm/blocks/LinkTable/schema.js +0 -12
  190. package/build/esm/blocks/Preview/MediaContent/MediaContent.css +0 -50
  191. package/build/esm/blocks/Preview/MediaContent/MediaContent.d.ts +0 -14
  192. package/build/esm/blocks/Preview/MediaContent/MediaContent.js +0 -47
  193. package/build/esm/blocks/Preview/MediaContent/PreviewContent.css +0 -106
  194. package/build/esm/blocks/Preview/MediaContent/PreviewContent.d.ts +0 -12
  195. package/build/esm/blocks/Preview/MediaContent/PreviewContent.js +0 -15
  196. package/build/esm/blocks/Preview/MediaContent/PreviewMedia.css +0 -54
  197. package/build/esm/blocks/Preview/MediaContent/PreviewMedia.d.ts +0 -10
  198. package/build/esm/blocks/Preview/MediaContent/PreviewMedia.js +0 -11
  199. package/build/esm/blocks/Preview/Preview.css +0 -50
  200. package/build/esm/blocks/Preview/Preview.d.ts +0 -4
  201. package/build/esm/blocks/Preview/Preview.js +0 -126
  202. package/build/esm/blocks/Preview/schema.d.ts +0 -40
  203. package/build/esm/blocks/Preview/schema.js +0 -50
  204. package/build/esm/blocks/Security/Security.css +0 -142
  205. package/build/esm/blocks/Security/Security.d.ts +0 -4
  206. package/build/esm/blocks/Security/Security.js +0 -25
  207. package/build/esm/blocks/Security/schema.d.ts +0 -170
  208. package/build/esm/blocks/Security/schema.js +0 -28
  209. package/build/esm/blocks/Simple/Simple.css +0 -22
  210. package/build/esm/blocks/Simple/Simple.d.ts +0 -4
  211. package/build/esm/blocks/Simple/Simple.js +0 -18
  212. package/build/esm/blocks/Simple/schema.d.ts +0 -68
  213. package/build/esm/blocks/Simple/schema.js +0 -11
  214. package/build/esm/components/HeightCalculator/HeightCalculator.css +0 -9
  215. package/build/esm/components/HeightCalculator/HeightCalculator.d.ts +0 -11
  216. package/build/esm/components/HeightCalculator/HeightCalculator.js +0 -42
  217. package/build/esm/context/breakpointContext/breakpointContext.d.ts +0 -2
  218. package/build/esm/context/breakpointContext/breakpointContext.js +0 -3
  219. package/build/esm/context/breakpointContext/index.d.ts +0 -1
  220. package/build/esm/context/breakpointContext/index.js +0 -1
  221. package/build/esm/hooks/useIntersection.d.ts +0 -1
  222. package/build/esm/hooks/useIntersection.js +0 -17
  223. package/build/esm/sub-blocks/CardWithImage/CardWithImage.css +0 -19
  224. package/build/esm/sub-blocks/CardWithImage/CardWithImage.d.ts +0 -4
  225. package/build/esm/sub-blocks/CardWithImage/CardWithImage.js +0 -14
  226. package/build/esm/sub-blocks/CardWithImage/schema.d.ts +0 -154
  227. package/build/esm/sub-blocks/CardWithImage/schema.js +0 -43
  228. package/build/esm/sub-blocks/Partner/Partner.css +0 -8
  229. package/build/esm/sub-blocks/Partner/Partner.d.ts +0 -4
  230. package/build/esm/sub-blocks/Partner/Partner.js +0 -13
  231. package/build/esm/sub-blocks/Partner/schema.d.ts +0 -30
  232. package/build/esm/sub-blocks/Partner/schema.js +0 -14
  233. package/build/esm/sub-blocks/TutorialCard/TutorialCard.css +0 -20
  234. package/build/esm/sub-blocks/TutorialCard/TutorialCard.d.ts +0 -4
  235. package/build/esm/sub-blocks/TutorialCard/TutorialCard.js +0 -21
  236. package/build/esm/sub-blocks/TutorialCard/schema.d.ts +0 -34
  237. package/build/esm/sub-blocks/TutorialCard/schema.js +0 -17
  238. package/build/esm/utils/scroll.d.ts +0 -15
  239. package/build/esm/utils/scroll.js +0 -31
  240. package/server/text-transform/blocks.js +0 -417
  241. package/server/utils/scroll.d.ts +0 -15
  242. package/server/utils/scroll.js +0 -35
@@ -1,53 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PreviewBlock = void 0;
4
- const common_1 = require("../../schema/validators/common");
5
- const utils_1 = require("../../schema/validators/utils");
6
- const schema_1 = require("../Media/schema");
7
- const previewRatioMediaContent = ['2-1', '1-1'];
8
- const PreviewContentItem = {
9
- additionalProperties: false,
10
- required: ['title', 'description'],
11
- properties: {
12
- title: {
13
- type: 'string',
14
- contentType: 'text',
15
- },
16
- description: {
17
- type: 'string',
18
- contentType: 'yfm',
19
- },
20
- },
21
- };
22
- const PreviewItem = {
23
- type: 'object',
24
- additionalProperties: false,
25
- required: ['type', 'media', 'content'],
26
- properties: {
27
- type: {
28
- type: 'string',
29
- enum: ['video', 'image'],
30
- },
31
- media: (0, common_1.withTheme)(schema_1.Media),
32
- content: PreviewContentItem,
33
- },
34
- };
35
- exports.PreviewBlock = {
36
- 'preview-block': {
37
- additionalProperties: false,
38
- required: ['title', 'items'],
39
- properties: Object.assign(Object.assign(Object.assign({}, common_1.BaseProps), common_1.AnimatableProps), { title: {
40
- type: 'string',
41
- contentType: 'text',
42
- }, description: {
43
- type: 'string',
44
- contentType: 'yfm',
45
- }, direction: {
46
- type: 'string',
47
- enum: common_1.mediaDirection,
48
- }, ratioMediaContent: {
49
- type: 'string',
50
- enum: previewRatioMediaContent,
51
- }, items: (0, utils_1.filteredArray)(PreviewItem) }),
52
- },
53
- };
@@ -1,142 +0,0 @@
1
- .pc-SecurityBlock__title {
2
- margin: 0;
3
- }
4
-
5
- /* use this for style redefinitions to awoid problems with
6
- unpredictable css rules order in build */
7
- .pc-SecurityBlock_theme_dark {
8
- color: var(--yc-color-text-light-primary);
9
- }
10
- .pc-SecurityBlock_theme_dark h1,
11
- .pc-SecurityBlock_theme_dark h2,
12
- .pc-SecurityBlock_theme_dark h3,
13
- .pc-SecurityBlock_theme_dark h4,
14
- .pc-SecurityBlock_theme_dark h5,
15
- .pc-SecurityBlock_theme_dark h6,
16
- .pc-SecurityBlock_theme_dark .yfm {
17
- color: var(--yc-color-text-light-primary);
18
- }
19
- .pc-SecurityBlock_theme_light .pc-SecurityBlock__background {
20
- background-color: var(--yc-color-base-background);
21
- }
22
- .pc-SecurityBlock_theme_light .pc-SecurityBlock__content {
23
- padding: 0;
24
- }
25
- .pc-SecurityBlock_theme_light .pc-SecurityBlock__point-icon,
26
- .pc-SecurityBlock_theme_light .pc-SecurityBlock__point-text {
27
- color: var(--yc-color-text-primary);
28
- }
29
- .pc-SecurityBlock__title {
30
- font-size: var(--yc-text-display-2-font-size);
31
- line-height: var(--yc-text-display-2-line-height);
32
- color: var(--pc-text-header-color);
33
- font-weight: var(--yc-text-accent-font-weight);
34
- }
35
- @media (max-width: 576px) {
36
- .pc-SecurityBlock__title {
37
- font-size: var(--yc-text-display-1-font-size);
38
- line-height: var(--yc-text-display-1-line-height);
39
- }
40
- }
41
- .pc-SecurityBlock__background {
42
- background-color: var(--yc-color-promo-base-asphalt);
43
- }
44
- .pc-SecurityBlock__content {
45
- padding: 96px 0 128px;
46
- }
47
- .pc-SecurityBlock__points {
48
- padding-top: 20px;
49
- }
50
- .pc-SecurityBlock__point-icon {
51
- width: 48px;
52
- height: 48px;
53
- }
54
- .pc-SecurityBlock__point-text {
55
- color: var(--yc-color-text-light-primary);
56
- }
57
- .pc-SecurityBlock__point-text a {
58
- outline: none;
59
- color: var(--yc-color-text-link);
60
- text-decoration: none;
61
- cursor: pointer;
62
- }
63
- .utilityfocus .pc-SecurityBlock__point-text a:focus {
64
- outline: 2px solid #ffdb4d;
65
- }
66
- .pc-SecurityBlock__point-text a:hover, .pc-SecurityBlock__point-text a:active {
67
- --pc-text-header-color: var(--yc-color-text-link-hover);
68
- color: var(--yc-color-text-link-hover);
69
- }
70
- .pc-SecurityBlock__point-text, .pc-SecurityBlock__point-link {
71
- font-size: var(--yc-text-body-2-font-size);
72
- line-height: var(--yc-text-body-2-line-height);
73
- margin-top: 8px;
74
- }
75
- .pc-SecurityBlock__media {
76
- margin-top: 48px;
77
- border-radius: var(--pc-border-radius);
78
- overflow: hidden;
79
- }
80
- @media (max-width: 577px) {
81
- .pc-SecurityBlock__content {
82
- padding: 64px 0;
83
- }
84
- .pc-SecurityBlock__point + .pc-SecurityBlock__point {
85
- margin-top: 20px;
86
- }
87
- }
88
- @media (min-width: 769px) {
89
- .pc-SecurityBlock.pc-AnimateBlock .pc-SecurityBlock__point, .pc-AnimateBlock .pc-SecurityBlock .pc-SecurityBlock__point {
90
- position: relative;
91
- top: 100px;
92
- opacity: 0;
93
- }
94
- .pc-SecurityBlock.pc-AnimateBlock.animate .pc-SecurityBlock__point, .pc-AnimateBlock .pc-SecurityBlock.animate .pc-SecurityBlock__point {
95
- top: 0;
96
- opacity: 1;
97
- transition: top 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
98
- }
99
- .pc-SecurityBlock.pc-AnimateBlock.animate .pc-SecurityBlock__point:nth-child(0), .pc-AnimateBlock .pc-SecurityBlock.animate .pc-SecurityBlock__point:nth-child(0) {
100
- transition-delay: 0s;
101
- }
102
- .pc-SecurityBlock.pc-AnimateBlock.animate .pc-SecurityBlock__point:nth-child(1), .pc-AnimateBlock .pc-SecurityBlock.animate .pc-SecurityBlock__point:nth-child(1) {
103
- transition-delay: 0.1s;
104
- }
105
- .pc-SecurityBlock.pc-AnimateBlock.animate .pc-SecurityBlock__point:nth-child(2), .pc-AnimateBlock .pc-SecurityBlock.animate .pc-SecurityBlock__point:nth-child(2) {
106
- transition-delay: 0.2s;
107
- }
108
- .pc-SecurityBlock.pc-AnimateBlock.animate .pc-SecurityBlock__point:nth-child(3), .pc-AnimateBlock .pc-SecurityBlock.animate .pc-SecurityBlock__point:nth-child(3) {
109
- transition-delay: 0.3s;
110
- }
111
- .pc-SecurityBlock.pc-AnimateBlock.animate .pc-SecurityBlock__point:nth-child(4), .pc-AnimateBlock .pc-SecurityBlock.animate .pc-SecurityBlock__point:nth-child(4) {
112
- transition-delay: 0.4s;
113
- }
114
- .pc-SecurityBlock.pc-AnimateBlock.animate .pc-SecurityBlock__point:nth-child(5), .pc-AnimateBlock .pc-SecurityBlock.animate .pc-SecurityBlock__point:nth-child(5) {
115
- transition-delay: 0.5s;
116
- }
117
- .pc-SecurityBlock.pc-AnimateBlock.animate .pc-SecurityBlock__point:nth-child(6), .pc-AnimateBlock .pc-SecurityBlock.animate .pc-SecurityBlock__point:nth-child(6) {
118
- transition-delay: 0.6s;
119
- }
120
- .pc-SecurityBlock.pc-AnimateBlock.animate .pc-SecurityBlock__point:nth-child(7), .pc-AnimateBlock .pc-SecurityBlock.animate .pc-SecurityBlock__point:nth-child(7) {
121
- transition-delay: 0.7s;
122
- }
123
- .pc-SecurityBlock.pc-AnimateBlock.animate .pc-SecurityBlock__point:nth-child(8), .pc-AnimateBlock .pc-SecurityBlock.animate .pc-SecurityBlock__point:nth-child(8) {
124
- transition-delay: 0.8s;
125
- }
126
- .pc-SecurityBlock.pc-AnimateBlock.animate .pc-SecurityBlock__point:nth-child(9), .pc-AnimateBlock .pc-SecurityBlock.animate .pc-SecurityBlock__point:nth-child(9) {
127
- transition-delay: 0.9s;
128
- }
129
- }
130
- @media (min-width: 769px) {
131
- .pc-SecurityBlock.pc-AnimateBlock .pc-SecurityBlock__media, .pc-AnimateBlock .pc-SecurityBlock .pc-SecurityBlock__media {
132
- position: relative;
133
- top: 100px;
134
- opacity: 0;
135
- }
136
- .pc-SecurityBlock.pc-AnimateBlock.animate .pc-SecurityBlock__media, .pc-AnimateBlock .pc-SecurityBlock.animate .pc-SecurityBlock__media {
137
- top: 0;
138
- opacity: 1;
139
- transition: top 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
140
- transition-delay: 0.5s;
141
- }
142
- }
@@ -1,3 +0,0 @@
1
- import { SecurityBlockProps } from '../../models';
2
- export declare const SecurityBlock: (props: SecurityBlockProps) => JSX.Element;
3
- export default SecurityBlock;
@@ -1,29 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SecurityBlock = void 0;
4
- const tslib_1 = require("tslib");
5
- const react_1 = tslib_1.__importDefault(require("react"));
6
- const components_1 = require("../../components");
7
- const grid_1 = require("../../grid");
8
- const utils_1 = require("../../utils");
9
- const i18n_1 = tslib_1.__importDefault(require("./i18n"));
10
- const b = (0, utils_1.block)('SecurityBlock');
11
- const SecurityBlock = (props) => {
12
- const { backgroundColor, theme = 'dark', title, points, media, animated } = props;
13
- return (react_1.default.createElement(components_1.AnimateBlock, { className: b({ theme }), offset: 200, animate: animated },
14
- react_1.default.createElement("div", { className: b('content') },
15
- react_1.default.createElement(components_1.FullWidthBackground, { className: b('background'), style: { backgroundColor } }),
16
- react_1.default.createElement(grid_1.Grid, null,
17
- react_1.default.createElement(grid_1.Row, null,
18
- react_1.default.createElement(grid_1.Col, null,
19
- react_1.default.createElement("h2", { className: b('title') }, title))),
20
- points && (react_1.default.createElement(grid_1.Row, { className: b('points') }, points.map(({ text, link, img }, index) => (react_1.default.createElement(grid_1.Col, { key: index, className: b('point'), sizes: { sm: 4, all: 12 } },
21
- react_1.default.createElement(components_1.ImageBase, { className: b('point-icon'), src: img, alt: text || (0, i18n_1.default)('image-alt') }),
22
- react_1.default.createElement(components_1.HTML, { className: b('point-text'), block: true }, text),
23
- link && (react_1.default.createElement(components_1.Link, { className: b('point-link'), text: link.text, url: link.url, theme: 'normal', arrow: true }))))))),
24
- media && (react_1.default.createElement(grid_1.Row, { className: b('media') },
25
- react_1.default.createElement(grid_1.Col, null,
26
- react_1.default.createElement(components_1.Media, Object.assign({ className: b('media') }, media)))))))));
27
- };
28
- exports.SecurityBlock = SecurityBlock;
29
- exports.default = exports.SecurityBlock;
@@ -1,170 +0,0 @@
1
- export declare const SecurityBlock: {
2
- 'security-block': {
3
- additionalProperties: boolean;
4
- required: string[];
5
- properties: {
6
- theme: {
7
- type: string;
8
- enum: string[];
9
- };
10
- backgroundColor: {
11
- type: string;
12
- };
13
- title: {
14
- type: string;
15
- contentType: string;
16
- };
17
- media: {
18
- type: string;
19
- additionalProperties: boolean;
20
- required: never[];
21
- properties: {
22
- color: {
23
- type: string;
24
- };
25
- image: {
26
- anyOf: ({
27
- oneOf: ({
28
- type: string;
29
- properties: {
30
- when: {
31
- type: string;
32
- };
33
- };
34
- } | {
35
- type: string;
36
- pattern: string;
37
- })[];
38
- } | {
39
- type: string;
40
- items: {
41
- oneOf: ({
42
- type: string;
43
- properties: {
44
- when: {
45
- type: string;
46
- };
47
- };
48
- } | {
49
- type: string;
50
- pattern: string;
51
- })[];
52
- };
53
- })[];
54
- };
55
- video: {
56
- type: string;
57
- additionalProperties: boolean;
58
- required: string[];
59
- properties: {
60
- src: {
61
- type: string;
62
- items: {
63
- type: string;
64
- };
65
- };
66
- loop: {
67
- anyOf: ({
68
- type: string;
69
- additionalProperties: boolean;
70
- required: string[];
71
- properties: {
72
- start: {
73
- type: string;
74
- };
75
- end: {
76
- type: string;
77
- };
78
- };
79
- } | {
80
- type: string;
81
- })[];
82
- };
83
- type: {
84
- type: string;
85
- enum: string[];
86
- };
87
- muted: {
88
- type: string;
89
- };
90
- playing: {
91
- type: string;
92
- };
93
- elapsedTime: {
94
- type: string;
95
- };
96
- playIcon: {
97
- type: string;
98
- additionalProperties: boolean;
99
- properties: {
100
- type: {
101
- type: string;
102
- enum: string[];
103
- };
104
- theme: {
105
- type: string;
106
- enum: string[];
107
- };
108
- text: {
109
- type: string;
110
- contentType: string;
111
- };
112
- };
113
- };
114
- controls: {
115
- type: string;
116
- enum: string[];
117
- };
118
- };
119
- };
120
- youtube: {
121
- type: string;
122
- };
123
- parallax: {
124
- type: string;
125
- };
126
- height: {
127
- type: string;
128
- };
129
- previewImg: {
130
- type: string;
131
- };
132
- dataLens: {
133
- oneOf: ({
134
- type: string;
135
- additionalProperties: boolean;
136
- required: string[];
137
- properties: {
138
- id: {
139
- type: string;
140
- };
141
- theme: {
142
- type: string;
143
- enum: string[];
144
- };
145
- };
146
- } | {
147
- type: string;
148
- })[];
149
- };
150
- };
151
- };
152
- points: {
153
- type: string;
154
- items: {
155
- type: string;
156
- properties: {
157
- when: {
158
- type: string;
159
- };
160
- };
161
- };
162
- };
163
- animated: {
164
- type: string;
165
- };
166
- type: {};
167
- when: {};
168
- };
169
- };
170
- };
@@ -1,32 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SecurityBlock = void 0;
4
- const tslib_1 = require("tslib");
5
- const lodash_1 = tslib_1.__importDefault(require("lodash"));
6
- const common_1 = require("../../schema/validators/common");
7
- const utils_1 = require("../../schema/validators/utils");
8
- const schema_1 = require("../Media/schema");
9
- exports.SecurityBlock = {
10
- 'security-block': {
11
- additionalProperties: false,
12
- required: ['title', 'media'],
13
- properties: Object.assign(Object.assign(Object.assign({}, common_1.BaseProps), common_1.AnimatableProps), { theme: common_1.ThemeProps, backgroundColor: {
14
- type: 'string',
15
- }, title: {
16
- type: 'string',
17
- contentType: 'text',
18
- }, media: schema_1.Media, points: (0, utils_1.filteredArray)({
19
- type: 'object',
20
- properties: {
21
- img: {
22
- type: 'string',
23
- },
24
- text: {
25
- type: 'string',
26
- contentType: 'text',
27
- },
28
- link: lodash_1.default.pick(common_1.LinkProps, ['text', 'url']),
29
- },
30
- }) }),
31
- },
32
- };
@@ -1,22 +0,0 @@
1
- /* use this for style redefinitions to awoid problems with
2
- unpredictable css rules order in build */
3
- @media (min-width: 769px) {
4
- .pc-simple-block.pc-AnimateBlock .pc-simple-block__animate-block, .pc-AnimateBlock .pc-simple-block .pc-simple-block__animate-block {
5
- position: relative;
6
- top: 100px;
7
- opacity: 0;
8
- }
9
- .pc-simple-block.pc-AnimateBlock.animate .pc-simple-block__animate-block, .pc-AnimateBlock .pc-simple-block.animate .pc-simple-block__animate-block {
10
- top: 0;
11
- opacity: 1;
12
- transition: top 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
13
- transition-delay: 0.5s;
14
- }
15
- }
16
- .pc-simple-block__animate-block {
17
- margin-top: 20px;
18
- }
19
- .pc-simple-block__description {
20
- margin-top: 16px;
21
- font-size: var(--yc-text-body-2-font-size);
22
- }
@@ -1,3 +0,0 @@
1
- import { SimpleBlockProps, WithChildren } from '../../models';
2
- export declare const SimpleBlock: (props: WithChildren<SimpleBlockProps>) => JSX.Element;
3
- export default SimpleBlock;
@@ -1,22 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SimpleBlock = void 0;
4
- const tslib_1 = require("tslib");
5
- const react_1 = tslib_1.__importDefault(require("react"));
6
- const AnimateBlock_1 = tslib_1.__importDefault(require("../../components/AnimateBlock/AnimateBlock"));
7
- const BlockHeader_1 = tslib_1.__importDefault(require("../../components/BlockHeader/BlockHeader"));
8
- const YFMWrapper_1 = tslib_1.__importDefault(require("../../components/YFMWrapper/YFMWrapper"));
9
- const utils_1 = require("../../utils");
10
- const b = (0, utils_1.block)('simple-block');
11
- const SimpleBlock = (props) => {
12
- const { title, description, animated = true, children } = props;
13
- const blockHeader = title && react_1.default.createElement(BlockHeader_1.default, { title: title });
14
- return (react_1.default.createElement(AnimateBlock_1.default, { className: b(), animate: animated },
15
- react_1.default.createElement("div", null,
16
- blockHeader,
17
- react_1.default.createElement("div", { className: b('description') },
18
- react_1.default.createElement(YFMWrapper_1.default, { content: description, modifiers: { constructor: true } })),
19
- react_1.default.createElement("div", { className: b('animate-block') }, children))));
20
- };
21
- exports.SimpleBlock = SimpleBlock;
22
- exports.default = exports.SimpleBlock;
@@ -1,68 +0,0 @@
1
- export declare const SimpleBlock: {
2
- 'simple-block': {
3
- additionalProperties: boolean;
4
- required: string[];
5
- properties: {
6
- children: {
7
- type: string;
8
- items: {
9
- $ref: string;
10
- };
11
- };
12
- animated: {
13
- type: string;
14
- };
15
- anchor: {
16
- type: string;
17
- additionalProperties: boolean;
18
- required: string[];
19
- properties: {
20
- text: {
21
- type: string;
22
- contentType: string;
23
- };
24
- url: {
25
- type: string;
26
- };
27
- };
28
- };
29
- visible: {
30
- type: string;
31
- enum: string[];
32
- };
33
- resetPaddings: {
34
- type: string;
35
- };
36
- context: {
37
- type: string;
38
- };
39
- type: {};
40
- when: {};
41
- title: {
42
- type: string;
43
- additionalProperties: boolean;
44
- required: string[];
45
- properties: {
46
- text: {
47
- type: string;
48
- contentType: string;
49
- };
50
- textSize: {
51
- type: string;
52
- enum: string[];
53
- };
54
- url: {
55
- type: string;
56
- };
57
- resetMargin: {
58
- type: string;
59
- };
60
- };
61
- };
62
- description: {
63
- type: string;
64
- contentType: string;
65
- };
66
- };
67
- };
68
- };
@@ -1,14 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SimpleBlock = void 0;
4
- const common_1 = require("../../schema/validators/common");
5
- exports.SimpleBlock = {
6
- 'simple-block': {
7
- additionalProperties: false,
8
- required: ['title', 'description'],
9
- properties: Object.assign(Object.assign(Object.assign({ title: common_1.TitleProps, description: {
10
- type: 'string',
11
- contentType: 'yfm',
12
- } }, common_1.BlockBaseProps), common_1.AnimatableProps), { children: common_1.ChildrenProps }),
13
- },
14
- };
@@ -1,9 +0,0 @@
1
- .pc-height-calculator {
2
- position: relative;
3
- width: 100%;
4
- opacity: 0;
5
- pointer-events: none;
6
- }
7
- .pc-height-calculator__item-wrapper {
8
- position: absolute;
9
- }
@@ -1,10 +0,0 @@
1
- import { WithChildren } from '../../models';
2
- export interface HeightCalculatorProps {
3
- onCalculate: (height: number) => void;
4
- }
5
- /**
6
- * @deprecated Will be removed, use the useHeightCalculator hook instead.
7
- * @returns The HeightCalculator component.
8
- */
9
- declare const HeightCalculator: ({ onCalculate, children }: WithChildren<HeightCalculatorProps>) => JSX.Element | null;
10
- export default HeightCalculator;
@@ -1,44 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- const react_1 = tslib_1.__importStar(require("react"));
5
- const lodash_1 = tslib_1.__importDefault(require("lodash"));
6
- const utils_1 = require("../../utils");
7
- const b = (0, utils_1.block)('height-calculator');
8
- /**
9
- * @deprecated Will be removed, use the useHeightCalculator hook instead.
10
- * @returns The HeightCalculator component.
11
- */
12
- const HeightCalculator = ({ onCalculate, children }) => {
13
- const [isCalculating, setIsCalculating] = (0, react_1.useState)(true);
14
- const container = (0, react_1.useRef)(null);
15
- const itemRefs = (0, react_1.useMemo)(() => {
16
- var _a;
17
- return (_a = react_1.Children.map(children, () => react_1.default.createRef())) !== null && _a !== void 0 ? _a : [];
18
- }, [children]);
19
- const calculateContainerHeight = (0, react_1.useCallback)(() => {
20
- if (container && container.current && itemRefs.length) {
21
- const maxHeight = Math.max(...itemRefs.map((tabRef) => {
22
- if (tabRef && tabRef.current) {
23
- return tabRef.current.offsetHeight;
24
- }
25
- return 0;
26
- }));
27
- onCalculate(maxHeight);
28
- setIsCalculating(false);
29
- }
30
- }, [itemRefs, onCalculate]);
31
- (0, react_1.useEffect)(() => {
32
- const handleResize = lodash_1.default.debounce(() => {
33
- setIsCalculating(true);
34
- calculateContainerHeight();
35
- }, 1000);
36
- calculateContainerHeight();
37
- window.addEventListener('resize', handleResize, { passive: true });
38
- return () => window.removeEventListener('resize', handleResize);
39
- }, [calculateContainerHeight]);
40
- return isCalculating ? (react_1.default.createElement("div", { className: b(), ref: container }, react_1.Children.map(children, (child, index) => {
41
- return (react_1.default.createElement("div", { className: b('item-wrapper'), ref: itemRefs[index], key: index }, child));
42
- }))) : null;
43
- };
44
- exports.default = HeightCalculator;
@@ -1,2 +0,0 @@
1
- import React from 'react';
2
- export declare const BreakpointContext: React.Context<number>;
@@ -1,7 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.BreakpointContext = void 0;
4
- const tslib_1 = require("tslib");
5
- const react_1 = tslib_1.__importDefault(require("react"));
6
- const constants_1 = require("../../constants");
7
- exports.BreakpointContext = react_1.default.createContext(constants_1.BREAKPOINTS.sm);
@@ -1 +0,0 @@
1
- export * from './breakpointContext';
@@ -1,4 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- tslib_1.__exportStar(require("./breakpointContext"), exports);
@@ -1 +0,0 @@
1
- export declare const useIntersection: (element?: Element, startMargin?: string, threshold?: number) => boolean;