@doyourjob/gravity-ui-page-constructor 5.31.142-dev.3 → 5.31.142-dev.5

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 (33) hide show
  1. package/build/cjs/blocks/Benchmark/Benchmark.css +4 -0
  2. package/build/cjs/blocks/Benchmark/Benchmark.js +1 -1
  3. package/build/cjs/blocks/Benchmark/schema.d.ts +1 -145
  4. package/build/cjs/blocks/Benchmark/schema.js +3 -1
  5. package/build/cjs/blocks/Benefits/Benefits.css +1 -1
  6. package/build/cjs/blocks/Benefits/BenefitsCard/BenefitsCard.css +1 -0
  7. package/build/cjs/blocks/HeaderMinify/Button/Button.css +2 -1
  8. package/build/cjs/blocks/HeaderMinify/HeaderMinify.css +13 -3
  9. package/build/cjs/blocks/LogoRotator/LogoRotator.css +21 -0
  10. package/build/cjs/blocks/LogoRotator/LogoRotator.js +7 -6
  11. package/build/cjs/blocks/LogoRotator/schema.d.ts +3 -138
  12. package/build/cjs/blocks/LogoRotator/schema.js +3 -1
  13. package/build/cjs/models/constructor-items/blocks.d.ts +3 -2
  14. package/build/cjs/text-transform/config.js +0 -7
  15. package/build/esm/blocks/Benchmark/Benchmark.css +4 -0
  16. package/build/esm/blocks/Benchmark/Benchmark.js +2 -2
  17. package/build/esm/blocks/Benchmark/schema.d.ts +1 -145
  18. package/build/esm/blocks/Benchmark/schema.js +4 -2
  19. package/build/esm/blocks/Benefits/Benefits.css +1 -1
  20. package/build/esm/blocks/Benefits/BenefitsCard/BenefitsCard.css +1 -0
  21. package/build/esm/blocks/HeaderMinify/Button/Button.css +2 -1
  22. package/build/esm/blocks/HeaderMinify/HeaderMinify.css +13 -3
  23. package/build/esm/blocks/LogoRotator/LogoRotator.css +21 -0
  24. package/build/esm/blocks/LogoRotator/LogoRotator.js +7 -6
  25. package/build/esm/blocks/LogoRotator/schema.d.ts +3 -138
  26. package/build/esm/blocks/LogoRotator/schema.js +4 -2
  27. package/build/esm/models/constructor-items/blocks.d.ts +3 -2
  28. package/build/esm/text-transform/config.js +0 -7
  29. package/package.json +1 -1
  30. package/schema/index.js +1 -1
  31. package/server/models/constructor-items/blocks.d.ts +3 -2
  32. package/server/text-transform/config.js +0 -7
  33. package/widget/index.js +1 -1
@@ -4,151 +4,7 @@ export declare const BenchmarkBlock: {
4
4
  required: string[];
5
5
  properties: {
6
6
  title: {
7
- oneOf: ({
8
- type: string;
9
- optionName: string;
10
- } | {
11
- optionName: string;
12
- type: string;
13
- additionalProperties: boolean;
14
- required: string[];
15
- properties: {
16
- text: {
17
- type: string;
18
- contentType: string;
19
- };
20
- link: {
21
- type: string;
22
- additionalProperties: boolean;
23
- required: string[];
24
- properties: {
25
- text: {
26
- type: string;
27
- contentType: string;
28
- };
29
- url: {
30
- type: string;
31
- };
32
- urlTitle: {
33
- type: string;
34
- };
35
- arrow: {
36
- type: string;
37
- };
38
- theme: {
39
- type: string;
40
- enum: string[];
41
- };
42
- textSize: {
43
- type: string;
44
- enum: string[];
45
- };
46
- target: {
47
- type: string;
48
- enum: string[];
49
- };
50
- analyticsEvents: {
51
- oneOf: ({
52
- optionName: string;
53
- type: string;
54
- additionalProperties: {
55
- type: string;
56
- };
57
- required: string[];
58
- properties: {
59
- name: {
60
- type: string;
61
- };
62
- type: {
63
- type: string;
64
- };
65
- counters: {
66
- type: string;
67
- additionalProperties: boolean;
68
- required: never[];
69
- properties: {
70
- include: {
71
- type: string;
72
- items: {
73
- type: string;
74
- };
75
- };
76
- exclude: {
77
- type: string;
78
- items: {
79
- type: string;
80
- };
81
- };
82
- };
83
- };
84
- context: {
85
- type: string;
86
- };
87
- };
88
- items?: undefined;
89
- } | {
90
- type: string;
91
- items: {
92
- type: string;
93
- additionalProperties: {
94
- type: string;
95
- };
96
- required: string[];
97
- properties: {
98
- name: {
99
- type: string;
100
- };
101
- type: {
102
- type: string;
103
- };
104
- counters: {
105
- type: string;
106
- additionalProperties: boolean;
107
- required: never[];
108
- properties: {
109
- include: {
110
- type: string;
111
- items: {
112
- type: string;
113
- };
114
- };
115
- exclude: {
116
- type: string;
117
- items: {
118
- type: string;
119
- };
120
- };
121
- };
122
- };
123
- context: {
124
- type: string;
125
- };
126
- };
127
- };
128
- optionName: string;
129
- })[];
130
- };
131
- type: {};
132
- when: {
133
- type: string;
134
- };
135
- };
136
- };
137
- textSize: {
138
- type: string;
139
- enum: string[];
140
- };
141
- url: {
142
- type: string;
143
- };
144
- urlTitle: {
145
- type: string;
146
- };
147
- resetMargin: {
148
- type: string;
149
- };
150
- };
151
- })[];
7
+ type: string;
152
8
  };
153
9
  duration: {
154
10
  type: string;
@@ -1,9 +1,11 @@
1
- import { AnimatableProps, BlockBaseProps, BlockHeaderProps, containerSizesObject, } from '../../schema/validators/common';
1
+ import { AnimatableProps, BlockBaseProps, containerSizesObject, } from '../../schema/validators/common';
2
2
  export const BenchmarkBlock = {
3
3
  'benchmark-block': {
4
4
  additionalProperties: false,
5
5
  required: ['data'],
6
- properties: Object.assign(Object.assign(Object.assign({}, BlockBaseProps), AnimatableProps), { title: BlockHeaderProps.title, duration: {
6
+ properties: Object.assign(Object.assign(Object.assign({}, BlockBaseProps), AnimatableProps), { title: {
7
+ type: 'string',
8
+ }, duration: {
7
9
  type: 'number',
8
10
  }, data: {
9
11
  type: 'array',
@@ -17,7 +17,7 @@ unpredictable css rules order in build */
17
17
  right: -27px;
18
18
  bottom: 0;
19
19
  z-index: -1;
20
- border-radius: 40px;
20
+ border-radius: 24px;
21
21
  }
22
22
  .pc-benefits-block__header {
23
23
  padding-top: 48px;
@@ -22,6 +22,7 @@ unpredictable css rules order in build */
22
22
  font-size: var(--g-text-header-2-font-size, var(--pc-text-header-2-font-size));
23
23
  line-height: var(--g-text-header-2-line-height, var(--pc-text-header-2-line-height));
24
24
  color: var(--local-accent-color);
25
+ letter-spacing: 0.01em;
25
26
  }
26
27
  .pc-benefits-card__text {
27
28
  font-size: var(--g-text-body-3-font-size, var(--pc-text-body-3-font-size));
@@ -8,10 +8,11 @@ unpredictable css rules order in build */
8
8
  border-radius: 16px;
9
9
  background: #001a2b;
10
10
  color: #ffffff;
11
+ height: 61px;
11
12
  font-size: 24px;
12
13
  line-height: 24px;
13
14
  font-weight: 500;
14
- letter-spacing: 0.01em;
15
+ letter-spacing: 0.03em;
15
16
  text-decoration: none;
16
17
  transition: opacity 0.3s ease;
17
18
  }
@@ -7,18 +7,27 @@ unpredictable css rules order in build */
7
7
  position: relative;
8
8
  z-index: 1;
9
9
  color: #001a2b;
10
- padding-top: 155px;
11
- padding-bottom: 203px;
10
+ padding-top: 186px;
11
+ padding-bottom: 186px;
12
12
  text-align: center;
13
13
  }
14
14
  .pc-header-minify-block__title {
15
15
  font-size: 128px;
16
16
  font-weight: 700;
17
17
  line-height: 102px;
18
- letter-spacing: -0.02em;
19
18
  margin: 0;
20
19
  position: relative;
21
20
  }
21
+ .pc-header-minify-block__title.pc-header-minify-block__title {
22
+ letter-spacing: -0.014em;
23
+ }
24
+
25
+ @media (max-width: 769px) {
26
+ .pc-header-minify-block__title {
27
+ font-size: 48px;
28
+ line-height: 52px;
29
+ }
30
+ }
22
31
  .pc-header-minify-block__description {
23
32
  margin-top: 24px;
24
33
  position: relative;
@@ -28,6 +37,7 @@ unpredictable css rules order in build */
28
37
  .pc-header-minify-block__description .yfm {
29
38
  font-size: var(--g-text-header-2-font-size, var(--pc-text-header-2-font-size));
30
39
  line-height: var(--g-text-header-2-line-height, var(--pc-text-header-2-line-height));
40
+ font-weight: 600;
31
41
  }
32
42
  .pc-header-minify-block__buttons {
33
43
  position: relative;
@@ -22,6 +22,9 @@ unpredictable css rules order in build */
22
22
  .pc-logo-rotator-block__title {
23
23
  margin-bottom: 48px;
24
24
  text-align: center;
25
+ font-size: 48px;
26
+ line-height: 52px;
27
+ font-weight: 600;
25
28
  }
26
29
  .pc-logo-rotator-block__items {
27
30
  display: flex;
@@ -48,4 +51,22 @@ unpredictable css rules order in build */
48
51
  width: 100%;
49
52
  height: 100%;
50
53
  object-fit: contain;
54
+ }
55
+ .pc-logo-rotator-block__row-items {
56
+ display: flex;
57
+ flex-wrap: wrap;
58
+ padding-top: 16px;
59
+ padding-bottom: 16px;
60
+ gap: 46px 16px;
61
+ }
62
+ .pc-logo-rotator-block__row-item {
63
+ display: block;
64
+ height: 36px;
65
+ min-width: 160px;
66
+ flex: 1;
67
+ transition: opacity 0.5s ease 0.1s;
68
+ opacity: 1;
69
+ }
70
+ .pc-logo-rotator-block__row-item_hidden {
71
+ opacity: 0;
51
72
  }
@@ -1,13 +1,14 @@
1
1
  import React, { useEffect, useMemo, useRef, useState } from 'react';
2
+ import { Link } from '@gravity-ui/uikit';
3
+ import { ImageBase } from '../../components';
2
4
  import AnimateBlock from '../../components/AnimateBlock/AnimateBlock';
3
- import TitleItem from '../../components/Title/TitleItem';
4
5
  import { Grid, Row } from '../../grid';
5
6
  import { block } from '../../utils';
6
7
  import Item from './Item';
7
8
  import './LogoRotator.css';
8
9
  const b = block('logo-rotator-block');
9
10
  export const LogoRotatorBlock = (props) => {
10
- const { animated, title, theme, items, count, colSizes } = props;
11
+ const { animated, title, theme, items, count, colSizes, rowMode } = props;
11
12
  const [slots, setSlots] = useState(new Array(count).fill(0).map((_, index) => index));
12
13
  const [hidden, setHidden] = useState(() => Array(count).fill(false));
13
14
  const nextIndexRef = useRef(count - 1);
@@ -46,10 +47,10 @@ export const LogoRotatorBlock = (props) => {
46
47
  };
47
48
  }, [count, items]);
48
49
  const renderItems = useMemo(() => slots.map((slot, index) => (React.createElement(Item, { key: index, colSizes: colSizes, url: items[slot].url, src: items[slot].src, hidden: hidden[index] }))), [colSizes, hidden, items, slots]);
49
- const titleProps = !title || typeof title === 'string' ? { text: title } : title;
50
50
  return (React.createElement(AnimateBlock, { className: b({ theme }), animate: animated },
51
- React.createElement(TitleItem, Object.assign({ className: b('title') }, titleProps)),
52
- React.createElement(Grid, { className: b('items') },
53
- React.createElement(Row, { className: b('row') }, renderItems))));
51
+ title && React.createElement("div", { className: b('title') }, title),
52
+ rowMode ? (React.createElement("div", { className: b('row-items') }, slots.map((slot, index) => (React.createElement(Link, { key: index, href: items[slot].url, className: b('row-item', { hidden: hidden[index] }) },
53
+ React.createElement(ImageBase, { src: items[slot].src, className: b('image'), alt: "", "aria-hidden": "true" })))))) : (React.createElement(Grid, { className: b('items') },
54
+ React.createElement(Row, { className: b('row') }, renderItems)))));
54
55
  };
55
56
  export default LogoRotatorBlock;
@@ -5,144 +5,6 @@ export declare const LogoRotatorBlock: {
5
5
  properties: {
6
6
  title: {
7
7
  type: string;
8
- additionalProperties: boolean;
9
- required: string[];
10
- properties: {
11
- text: {
12
- type: string;
13
- contentType: string;
14
- };
15
- link: {
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
- urlTitle: {
28
- type: string;
29
- };
30
- arrow: {
31
- type: string;
32
- };
33
- theme: {
34
- type: string;
35
- enum: string[];
36
- };
37
- textSize: {
38
- type: string;
39
- enum: string[];
40
- };
41
- target: {
42
- type: string;
43
- enum: string[];
44
- };
45
- analyticsEvents: {
46
- oneOf: ({
47
- optionName: string;
48
- type: string;
49
- additionalProperties: {
50
- type: string;
51
- };
52
- required: string[];
53
- properties: {
54
- name: {
55
- type: string;
56
- };
57
- type: {
58
- type: string;
59
- };
60
- counters: {
61
- type: string;
62
- additionalProperties: boolean;
63
- required: never[];
64
- properties: {
65
- include: {
66
- type: string;
67
- items: {
68
- type: string;
69
- };
70
- };
71
- exclude: {
72
- type: string;
73
- items: {
74
- type: string;
75
- };
76
- };
77
- };
78
- };
79
- context: {
80
- type: string;
81
- };
82
- };
83
- items?: undefined;
84
- } | {
85
- type: string;
86
- items: {
87
- type: string;
88
- additionalProperties: {
89
- type: string;
90
- };
91
- required: string[];
92
- properties: {
93
- name: {
94
- type: string;
95
- };
96
- type: {
97
- type: string;
98
- };
99
- counters: {
100
- type: string;
101
- additionalProperties: boolean;
102
- required: never[];
103
- properties: {
104
- include: {
105
- type: string;
106
- items: {
107
- type: string;
108
- };
109
- };
110
- exclude: {
111
- type: string;
112
- items: {
113
- type: string;
114
- };
115
- };
116
- };
117
- };
118
- context: {
119
- type: string;
120
- };
121
- };
122
- };
123
- optionName: string;
124
- })[];
125
- };
126
- type: {};
127
- when: {
128
- type: string;
129
- };
130
- };
131
- };
132
- textSize: {
133
- type: string;
134
- enum: string[];
135
- };
136
- url: {
137
- type: string;
138
- };
139
- urlTitle: {
140
- type: string;
141
- };
142
- resetMargin: {
143
- type: string;
144
- };
145
- };
146
8
  };
147
9
  theme: {
148
10
  type: string;
@@ -175,6 +37,9 @@ export declare const LogoRotatorBlock: {
175
37
  properties: {};
176
38
  };
177
39
  };
40
+ rowMode: {
41
+ type: string;
42
+ };
178
43
  animated: {
179
44
  type: string;
180
45
  };
@@ -1,9 +1,9 @@
1
- import { AnimatableProps, BaseProps, ThemeProps, TitleProps, containerSizesObject, } from '../../schema/validators/common';
1
+ import { AnimatableProps, BaseProps, ThemeProps, containerSizesObject, } from '../../schema/validators/common';
2
2
  export const LogoRotatorBlock = {
3
3
  'logo-rotator-block': {
4
4
  additionalProperties: false,
5
5
  required: ['items', 'count'],
6
- properties: Object.assign(Object.assign(Object.assign({}, BaseProps), AnimatableProps), { title: TitleProps, theme: ThemeProps, items: {
6
+ properties: Object.assign(Object.assign(Object.assign({}, BaseProps), AnimatableProps), { title: { type: 'string' }, theme: ThemeProps, items: {
7
7
  type: 'array',
8
8
  items: {
9
9
  type: 'object',
@@ -19,6 +19,8 @@ export const LogoRotatorBlock = {
19
19
  }, colSizes: {
20
20
  type: 'object',
21
21
  additionalProperties: containerSizesObject,
22
+ }, rowMode: {
23
+ type: 'boolean',
22
24
  } }),
23
25
  },
24
26
  };
@@ -272,7 +272,7 @@ export interface QuestionBlockItemProps extends QuestionItem {
272
272
  export interface BannerBlockProps extends BannerCardProps, Animatable {
273
273
  }
274
274
  export interface LogoRotatorBlockProps extends Animatable {
275
- title?: TitleItemBaseProps | string;
275
+ title?: string;
276
276
  items: {
277
277
  url: string;
278
278
  src: string;
@@ -280,6 +280,7 @@ export interface LogoRotatorBlockProps extends Animatable {
280
280
  count: number;
281
281
  colSizes?: Partial<Record<GridColumnSize, number>>;
282
282
  theme?: TextTheme;
283
+ rowMode?: boolean;
283
284
  }
284
285
  export interface AdvantagesBlockProps {
285
286
  title?: string;
@@ -570,7 +571,7 @@ export interface CardLayoutBlockProps extends Childable, Animatable, LoadableChi
570
571
  largeItemGap?: boolean;
571
572
  }
572
573
  export interface BenchmarkBlockProps extends Animatable {
573
- title?: TitleItemProps | string;
574
+ title?: string;
574
575
  duration?: number;
575
576
  data: {
576
577
  title?: string;
@@ -411,13 +411,6 @@ export const config = {
411
411
  },
412
412
  ],
413
413
  [BlockType.CardLayoutBlock]: blockHeaderTransformer,
414
- [BlockType.BenchmarkBlock]: [
415
- {
416
- fields: ['title'],
417
- transformer: typografTransformer,
418
- parser: parseTitle,
419
- },
420
- ],
421
414
  [BlockType.FilterBlock]: blockHeaderTransformer,
422
415
  [BlockType.FilterCardLayoutBlock]: [
423
416
  ...blockHeaderTransformer,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@doyourjob/gravity-ui-page-constructor",
3
- "version": "5.31.142-dev.3",
3
+ "version": "5.31.142-dev.5",
4
4
  "description": "Gravity UI Page Constructor",
5
5
  "license": "MIT",
6
6
  "repository": {