@gravity-ui/page-constructor 4.29.2 → 4.31.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/blocks/Banner/schema.d.ts +9 -0
- package/build/cjs/blocks/CardLayout/schema.d.ts +12 -0
- package/build/cjs/blocks/ContentLayout/schema.d.ts +6 -0
- package/build/cjs/blocks/ExtendedFeatures/schema.d.ts +9 -0
- package/build/cjs/blocks/FilterBlock/schema.d.ts +12 -0
- package/build/cjs/blocks/Header/Header.js +2 -2
- package/build/cjs/blocks/Header/schema.d.ts +3 -0
- package/build/cjs/blocks/HeaderSlider/schema.d.ts +3 -0
- package/build/cjs/blocks/Icons/schema.d.ts +6 -0
- package/build/cjs/blocks/Info/schema.d.ts +6 -0
- package/build/cjs/blocks/Map/schema.d.ts +9 -0
- package/build/cjs/blocks/Media/schema.d.ts +18 -0
- package/build/cjs/blocks/PromoFeaturesBlock/schema.d.ts +6 -0
- package/build/cjs/blocks/Questions/schema.d.ts +6 -0
- package/build/cjs/blocks/Slider/schema.d.ts +6 -0
- package/build/cjs/blocks/Table/schema.d.ts +3 -0
- package/build/cjs/blocks/Tabs/schema.d.ts +12 -0
- package/build/cjs/components/Button/Button.d.ts +1 -0
- package/build/cjs/components/Button/Button.js +2 -2
- package/build/cjs/models/constructor-items/blocks.d.ts +2 -1
- package/build/cjs/models/constructor-items/common.d.ts +4 -0
- package/build/cjs/models/constructor-items/common.js +6 -1
- package/build/cjs/models/constructor-items/sub-blocks.d.ts +4 -1
- package/build/cjs/schema/constants.d.ts +22 -0
- package/build/cjs/schema/validators/common.d.ts +23 -1
- package/build/cjs/schema/validators/common.js +13 -1
- package/build/cjs/sub-blocks/BackgroundCard/schema.d.ts +6 -0
- package/build/cjs/sub-blocks/BackgroundCard/schema.js +2 -0
- package/build/cjs/sub-blocks/BasicCard/schema.d.ts +6 -0
- package/build/cjs/sub-blocks/BasicCard/schema.js +2 -0
- package/build/cjs/sub-blocks/Content/schema.d.ts +6 -0
- package/build/cjs/sub-blocks/LayoutItem/schema.d.ts +3 -0
- package/build/cjs/sub-blocks/Quote/Quote.css +12 -3
- package/build/cjs/sub-blocks/Quote/Quote.js +3 -3
- package/build/cjs/sub-blocks/Quote/schema.d.ts +7 -0
- package/build/cjs/sub-blocks/Quote/schema.js +6 -1
- package/build/esm/blocks/Banner/schema.d.ts +9 -0
- package/build/esm/blocks/CardLayout/schema.d.ts +12 -0
- package/build/esm/blocks/ContentLayout/schema.d.ts +6 -0
- package/build/esm/blocks/ExtendedFeatures/schema.d.ts +9 -0
- package/build/esm/blocks/FilterBlock/schema.d.ts +12 -0
- package/build/esm/blocks/Header/Header.js +2 -2
- package/build/esm/blocks/Header/schema.d.ts +3 -0
- package/build/esm/blocks/HeaderSlider/schema.d.ts +3 -0
- package/build/esm/blocks/Icons/schema.d.ts +6 -0
- package/build/esm/blocks/Info/schema.d.ts +6 -0
- package/build/esm/blocks/Map/schema.d.ts +9 -0
- package/build/esm/blocks/Media/schema.d.ts +18 -0
- package/build/esm/blocks/PromoFeaturesBlock/schema.d.ts +6 -0
- package/build/esm/blocks/Questions/schema.d.ts +6 -0
- package/build/esm/blocks/Slider/schema.d.ts +6 -0
- package/build/esm/blocks/Table/schema.d.ts +3 -0
- package/build/esm/blocks/Tabs/schema.d.ts +12 -0
- package/build/esm/components/Button/Button.d.ts +1 -0
- package/build/esm/components/Button/Button.js +2 -2
- package/build/esm/models/constructor-items/blocks.d.ts +2 -1
- package/build/esm/models/constructor-items/common.d.ts +4 -0
- package/build/esm/models/constructor-items/common.js +5 -0
- package/build/esm/models/constructor-items/sub-blocks.d.ts +4 -1
- package/build/esm/schema/constants.d.ts +22 -0
- package/build/esm/schema/validators/common.d.ts +23 -1
- package/build/esm/schema/validators/common.js +13 -1
- package/build/esm/sub-blocks/BackgroundCard/schema.d.ts +6 -0
- package/build/esm/sub-blocks/BackgroundCard/schema.js +2 -0
- package/build/esm/sub-blocks/BasicCard/schema.d.ts +6 -0
- package/build/esm/sub-blocks/BasicCard/schema.js +2 -0
- package/build/esm/sub-blocks/Content/schema.d.ts +6 -0
- package/build/esm/sub-blocks/LayoutItem/schema.d.ts +3 -0
- package/build/esm/sub-blocks/Quote/Quote.css +12 -3
- package/build/esm/sub-blocks/Quote/Quote.js +4 -4
- package/build/esm/sub-blocks/Quote/schema.d.ts +7 -0
- package/build/esm/sub-blocks/Quote/schema.js +7 -2
- package/package.json +1 -1
- package/server/models/constructor-items/blocks.d.ts +2 -1
- package/server/models/constructor-items/common.d.ts +4 -0
- package/server/models/constructor-items/common.js +6 -1
- package/server/models/constructor-items/sub-blocks.d.ts +4 -1
- package/widget/index.js +1 -1
|
@@ -58,6 +58,9 @@ export declare const BannerCardProps: {
|
|
|
58
58
|
url: {
|
|
59
59
|
type: string;
|
|
60
60
|
};
|
|
61
|
+
urlTitle: {
|
|
62
|
+
type: string;
|
|
63
|
+
};
|
|
61
64
|
primary: {
|
|
62
65
|
type: string;
|
|
63
66
|
};
|
|
@@ -354,6 +357,9 @@ export declare const BannerBlock: {
|
|
|
354
357
|
url: {
|
|
355
358
|
type: string;
|
|
356
359
|
};
|
|
360
|
+
urlTitle: {
|
|
361
|
+
type: string;
|
|
362
|
+
};
|
|
357
363
|
primary: {
|
|
358
364
|
type: string;
|
|
359
365
|
};
|
|
@@ -651,6 +657,9 @@ export declare const BannerCard: {
|
|
|
651
657
|
url: {
|
|
652
658
|
type: string;
|
|
653
659
|
};
|
|
660
|
+
urlTitle: {
|
|
661
|
+
type: string;
|
|
662
|
+
};
|
|
654
663
|
primary: {
|
|
655
664
|
type: string;
|
|
656
665
|
};
|
|
@@ -34,6 +34,9 @@ export declare const CardLayoutProps: {
|
|
|
34
34
|
url: {
|
|
35
35
|
type: string;
|
|
36
36
|
};
|
|
37
|
+
urlTitle: {
|
|
38
|
+
type: string;
|
|
39
|
+
};
|
|
37
40
|
resetMargin: {
|
|
38
41
|
type: string;
|
|
39
42
|
};
|
|
@@ -60,6 +63,9 @@ export declare const CardLayoutProps: {
|
|
|
60
63
|
url: {
|
|
61
64
|
type: string;
|
|
62
65
|
};
|
|
66
|
+
urlTitle: {
|
|
67
|
+
type: string;
|
|
68
|
+
};
|
|
63
69
|
};
|
|
64
70
|
};
|
|
65
71
|
visible: {
|
|
@@ -115,6 +121,9 @@ export declare const CardLayoutBlock: {
|
|
|
115
121
|
url: {
|
|
116
122
|
type: string;
|
|
117
123
|
};
|
|
124
|
+
urlTitle: {
|
|
125
|
+
type: string;
|
|
126
|
+
};
|
|
118
127
|
resetMargin: {
|
|
119
128
|
type: string;
|
|
120
129
|
};
|
|
@@ -141,6 +150,9 @@ export declare const CardLayoutBlock: {
|
|
|
141
150
|
url: {
|
|
142
151
|
type: string;
|
|
143
152
|
};
|
|
153
|
+
urlTitle: {
|
|
154
|
+
type: string;
|
|
155
|
+
};
|
|
144
156
|
};
|
|
145
157
|
};
|
|
146
158
|
visible: {
|
|
@@ -83,6 +83,9 @@ export declare const ContentLayoutBlock: {
|
|
|
83
83
|
url: {
|
|
84
84
|
type: string;
|
|
85
85
|
};
|
|
86
|
+
urlTitle: {
|
|
87
|
+
type: string;
|
|
88
|
+
};
|
|
86
89
|
resetMargin: {
|
|
87
90
|
type: string;
|
|
88
91
|
};
|
|
@@ -224,6 +227,9 @@ export declare const ContentLayoutBlock: {
|
|
|
224
227
|
url: {
|
|
225
228
|
type: string;
|
|
226
229
|
};
|
|
230
|
+
urlTitle: {
|
|
231
|
+
type: string;
|
|
232
|
+
};
|
|
227
233
|
};
|
|
228
234
|
};
|
|
229
235
|
visible: {
|
|
@@ -26,6 +26,9 @@ export declare const ExtendedFeaturesItem: {
|
|
|
26
26
|
url: {
|
|
27
27
|
type: string;
|
|
28
28
|
};
|
|
29
|
+
urlTitle: {
|
|
30
|
+
type: string;
|
|
31
|
+
};
|
|
29
32
|
arrow: {
|
|
30
33
|
type: string;
|
|
31
34
|
};
|
|
@@ -196,6 +199,9 @@ export declare const ExtendedFeaturesBlock: {
|
|
|
196
199
|
url: {
|
|
197
200
|
type: string;
|
|
198
201
|
};
|
|
202
|
+
urlTitle: {
|
|
203
|
+
type: string;
|
|
204
|
+
};
|
|
199
205
|
resetMargin: {
|
|
200
206
|
type: string;
|
|
201
207
|
};
|
|
@@ -222,6 +228,9 @@ export declare const ExtendedFeaturesBlock: {
|
|
|
222
228
|
url: {
|
|
223
229
|
type: string;
|
|
224
230
|
};
|
|
231
|
+
urlTitle: {
|
|
232
|
+
type: string;
|
|
233
|
+
};
|
|
225
234
|
};
|
|
226
235
|
};
|
|
227
236
|
visible: {
|
|
@@ -90,6 +90,9 @@ export declare const FilterProps: {
|
|
|
90
90
|
url: {
|
|
91
91
|
type: string;
|
|
92
92
|
};
|
|
93
|
+
urlTitle: {
|
|
94
|
+
type: string;
|
|
95
|
+
};
|
|
93
96
|
resetMargin: {
|
|
94
97
|
type: string;
|
|
95
98
|
};
|
|
@@ -116,6 +119,9 @@ export declare const FilterProps: {
|
|
|
116
119
|
url: {
|
|
117
120
|
type: string;
|
|
118
121
|
};
|
|
122
|
+
urlTitle: {
|
|
123
|
+
type: string;
|
|
124
|
+
};
|
|
119
125
|
};
|
|
120
126
|
};
|
|
121
127
|
visible: {
|
|
@@ -200,6 +206,9 @@ export declare const FilterBlock: {
|
|
|
200
206
|
url: {
|
|
201
207
|
type: string;
|
|
202
208
|
};
|
|
209
|
+
urlTitle: {
|
|
210
|
+
type: string;
|
|
211
|
+
};
|
|
203
212
|
resetMargin: {
|
|
204
213
|
type: string;
|
|
205
214
|
};
|
|
@@ -226,6 +235,9 @@ export declare const FilterBlock: {
|
|
|
226
235
|
url: {
|
|
227
236
|
type: string;
|
|
228
237
|
};
|
|
238
|
+
urlTitle: {
|
|
239
|
+
type: string;
|
|
240
|
+
};
|
|
229
241
|
};
|
|
230
242
|
};
|
|
231
243
|
visible: {
|
|
@@ -21,7 +21,7 @@ const Background = ({ background, isMobile }) => {
|
|
|
21
21
|
};
|
|
22
22
|
const FullWidthBackground = ({ background }) => (react_1.default.createElement("div", { className: b('background', { ['full-width']: true }), style: { backgroundColor: background === null || background === void 0 ? void 0 : background.color } }));
|
|
23
23
|
const HeaderBlock = (props) => {
|
|
24
|
-
const { title, overtitle, description, buttons, image, video, width = 'm', imageSize, offset = 'default', background, theme: textTheme = 'light', verticalOffset = 'm', className, breadcrumbs, status, children, mediaView = 'full', } = props;
|
|
24
|
+
const { title, overtitle, description, buttons, image, video, width = 'm', imageSize, offset = 'default', background, theme: textTheme = 'light', verticalOffset = 'm', className, breadcrumbs, status, renderTitle, children, mediaView = 'full', } = props;
|
|
25
25
|
const isMobile = (0, react_1.useContext)(mobileContext_1.MobileContext);
|
|
26
26
|
const theme = (0, theme_1.useTheme)();
|
|
27
27
|
const hasRightSideImage = Boolean(image || video);
|
|
@@ -59,7 +59,7 @@ const HeaderBlock = (props) => {
|
|
|
59
59
|
react_1.default.createElement(components_1.HTML, null, overtitle))),
|
|
60
60
|
react_1.default.createElement("h1", { className: b('title') },
|
|
61
61
|
status,
|
|
62
|
-
react_1.default.createElement(components_1.HTML, null, title)),
|
|
62
|
+
renderTitle ? renderTitle(title) : react_1.default.createElement(components_1.HTML, null, title)),
|
|
63
63
|
description && (react_1.default.createElement("div", { className: b('description') },
|
|
64
64
|
react_1.default.createElement(YFMWrapper_1.default, { content: description, modifiers: {
|
|
65
65
|
constructor: true,
|
|
@@ -127,6 +127,9 @@ export declare const IconsProps: {
|
|
|
127
127
|
url: {
|
|
128
128
|
type: string;
|
|
129
129
|
};
|
|
130
|
+
urlTitle: {
|
|
131
|
+
type: string;
|
|
132
|
+
};
|
|
130
133
|
};
|
|
131
134
|
};
|
|
132
135
|
visible: {
|
|
@@ -275,6 +278,9 @@ export declare const IconsBlock: {
|
|
|
275
278
|
url: {
|
|
276
279
|
type: string;
|
|
277
280
|
};
|
|
281
|
+
urlTitle: {
|
|
282
|
+
type: string;
|
|
283
|
+
};
|
|
278
284
|
};
|
|
279
285
|
};
|
|
280
286
|
visible: {
|
|
@@ -75,6 +75,9 @@ export declare const InfoBlock: {
|
|
|
75
75
|
url: {
|
|
76
76
|
type: string;
|
|
77
77
|
};
|
|
78
|
+
urlTitle: {
|
|
79
|
+
type: string;
|
|
80
|
+
};
|
|
78
81
|
resetMargin: {
|
|
79
82
|
type: string;
|
|
80
83
|
};
|
|
@@ -159,6 +162,9 @@ export declare const InfoBlock: {
|
|
|
159
162
|
url: {
|
|
160
163
|
type: string;
|
|
161
164
|
};
|
|
165
|
+
urlTitle: {
|
|
166
|
+
type: string;
|
|
167
|
+
};
|
|
162
168
|
resetMargin: {
|
|
163
169
|
type: string;
|
|
164
170
|
};
|
|
@@ -141,6 +141,9 @@ export declare const MapBlock: {
|
|
|
141
141
|
url: {
|
|
142
142
|
type: string;
|
|
143
143
|
};
|
|
144
|
+
urlTitle: {
|
|
145
|
+
type: string;
|
|
146
|
+
};
|
|
144
147
|
primary: {
|
|
145
148
|
type: string;
|
|
146
149
|
};
|
|
@@ -389,6 +392,9 @@ export declare const MapBlock: {
|
|
|
389
392
|
url: {
|
|
390
393
|
type: string;
|
|
391
394
|
};
|
|
395
|
+
urlTitle: {
|
|
396
|
+
type: string;
|
|
397
|
+
};
|
|
392
398
|
resetMargin: {
|
|
393
399
|
type: string;
|
|
394
400
|
};
|
|
@@ -452,6 +458,9 @@ export declare const MapBlock: {
|
|
|
452
458
|
url: {
|
|
453
459
|
type: string;
|
|
454
460
|
};
|
|
461
|
+
urlTitle: {
|
|
462
|
+
type: string;
|
|
463
|
+
};
|
|
455
464
|
};
|
|
456
465
|
};
|
|
457
466
|
visible: {
|
|
@@ -280,6 +280,9 @@ export declare const MediaBlockBaseProps: {
|
|
|
280
280
|
url: {
|
|
281
281
|
type: string;
|
|
282
282
|
};
|
|
283
|
+
urlTitle: {
|
|
284
|
+
type: string;
|
|
285
|
+
};
|
|
283
286
|
primary: {
|
|
284
287
|
type: string;
|
|
285
288
|
};
|
|
@@ -528,6 +531,9 @@ export declare const MediaBlockBaseProps: {
|
|
|
528
531
|
url: {
|
|
529
532
|
type: string;
|
|
530
533
|
};
|
|
534
|
+
urlTitle: {
|
|
535
|
+
type: string;
|
|
536
|
+
};
|
|
531
537
|
resetMargin: {
|
|
532
538
|
type: string;
|
|
533
539
|
};
|
|
@@ -591,6 +597,9 @@ export declare const MediaBlockBaseProps: {
|
|
|
591
597
|
url: {
|
|
592
598
|
type: string;
|
|
593
599
|
};
|
|
600
|
+
urlTitle: {
|
|
601
|
+
type: string;
|
|
602
|
+
};
|
|
594
603
|
};
|
|
595
604
|
};
|
|
596
605
|
visible: {
|
|
@@ -904,6 +913,9 @@ export declare const MediaBlock: {
|
|
|
904
913
|
url: {
|
|
905
914
|
type: string;
|
|
906
915
|
};
|
|
916
|
+
urlTitle: {
|
|
917
|
+
type: string;
|
|
918
|
+
};
|
|
907
919
|
primary: {
|
|
908
920
|
type: string;
|
|
909
921
|
};
|
|
@@ -1152,6 +1164,9 @@ export declare const MediaBlock: {
|
|
|
1152
1164
|
url: {
|
|
1153
1165
|
type: string;
|
|
1154
1166
|
};
|
|
1167
|
+
urlTitle: {
|
|
1168
|
+
type: string;
|
|
1169
|
+
};
|
|
1155
1170
|
resetMargin: {
|
|
1156
1171
|
type: string;
|
|
1157
1172
|
};
|
|
@@ -1215,6 +1230,9 @@ export declare const MediaBlock: {
|
|
|
1215
1230
|
url: {
|
|
1216
1231
|
type: string;
|
|
1217
1232
|
};
|
|
1233
|
+
urlTitle: {
|
|
1234
|
+
type: string;
|
|
1235
|
+
};
|
|
1218
1236
|
};
|
|
1219
1237
|
};
|
|
1220
1238
|
visible: {
|
|
@@ -305,6 +305,9 @@ export declare const PromoFeaturesBlock: {
|
|
|
305
305
|
url: {
|
|
306
306
|
type: string;
|
|
307
307
|
};
|
|
308
|
+
urlTitle: {
|
|
309
|
+
type: string;
|
|
310
|
+
};
|
|
308
311
|
resetMargin: {
|
|
309
312
|
type: string;
|
|
310
313
|
};
|
|
@@ -331,6 +334,9 @@ export declare const PromoFeaturesBlock: {
|
|
|
331
334
|
url: {
|
|
332
335
|
type: string;
|
|
333
336
|
};
|
|
337
|
+
urlTitle: {
|
|
338
|
+
type: string;
|
|
339
|
+
};
|
|
334
340
|
};
|
|
335
341
|
};
|
|
336
342
|
visible: {
|
|
@@ -36,6 +36,9 @@ export declare const QuestionsBlock: {
|
|
|
36
36
|
url: {
|
|
37
37
|
type: string;
|
|
38
38
|
};
|
|
39
|
+
urlTitle: {
|
|
40
|
+
type: string;
|
|
41
|
+
};
|
|
39
42
|
resetMargin: {
|
|
40
43
|
type: string;
|
|
41
44
|
};
|
|
@@ -97,6 +100,9 @@ export declare const QuestionsBlock: {
|
|
|
97
100
|
url: {
|
|
98
101
|
type: string;
|
|
99
102
|
};
|
|
103
|
+
urlTitle: {
|
|
104
|
+
type: string;
|
|
105
|
+
};
|
|
100
106
|
};
|
|
101
107
|
};
|
|
102
108
|
visible: {
|
|
@@ -100,6 +100,9 @@ export declare const SliderBlock: {
|
|
|
100
100
|
url: {
|
|
101
101
|
type: string;
|
|
102
102
|
};
|
|
103
|
+
urlTitle: {
|
|
104
|
+
type: string;
|
|
105
|
+
};
|
|
103
106
|
resetMargin: {
|
|
104
107
|
type: string;
|
|
105
108
|
};
|
|
@@ -197,6 +200,9 @@ export declare const SliderBlock: {
|
|
|
197
200
|
url: {
|
|
198
201
|
type: string;
|
|
199
202
|
};
|
|
203
|
+
urlTitle: {
|
|
204
|
+
type: string;
|
|
205
|
+
};
|
|
200
206
|
};
|
|
201
207
|
};
|
|
202
208
|
visible: {
|
|
@@ -279,6 +279,9 @@ export declare const tabsItem: {
|
|
|
279
279
|
url: {
|
|
280
280
|
type: string;
|
|
281
281
|
};
|
|
282
|
+
urlTitle: {
|
|
283
|
+
type: string;
|
|
284
|
+
};
|
|
282
285
|
arrow: {
|
|
283
286
|
type: string;
|
|
284
287
|
};
|
|
@@ -427,6 +430,9 @@ export declare const tabsItem: {
|
|
|
427
430
|
url: {
|
|
428
431
|
type: string;
|
|
429
432
|
};
|
|
433
|
+
urlTitle: {
|
|
434
|
+
type: string;
|
|
435
|
+
};
|
|
430
436
|
resetMargin: {
|
|
431
437
|
type: string;
|
|
432
438
|
};
|
|
@@ -535,6 +541,9 @@ export declare const TabsBlock: {
|
|
|
535
541
|
url: {
|
|
536
542
|
type: string;
|
|
537
543
|
};
|
|
544
|
+
urlTitle: {
|
|
545
|
+
type: string;
|
|
546
|
+
};
|
|
538
547
|
resetMargin: {
|
|
539
548
|
type: string;
|
|
540
549
|
};
|
|
@@ -558,6 +567,9 @@ export declare const TabsBlock: {
|
|
|
558
567
|
url: {
|
|
559
568
|
type: string;
|
|
560
569
|
};
|
|
570
|
+
urlTitle: {
|
|
571
|
+
type: string;
|
|
572
|
+
};
|
|
561
573
|
};
|
|
562
574
|
};
|
|
563
575
|
visible: {
|
|
@@ -3,6 +3,7 @@ import { ButtonProps as ButtonParams, QAProps } from '../../models';
|
|
|
3
3
|
export interface ButtonProps extends Omit<ButtonParams, 'url'>, QAProps {
|
|
4
4
|
className?: string;
|
|
5
5
|
url?: string;
|
|
6
|
+
urlTitle?: string;
|
|
6
7
|
onClick?: React.MouseEventHandler<HTMLButtonElement | HTMLAnchorElement>;
|
|
7
8
|
}
|
|
8
9
|
declare const Button: (props: ButtonProps) => JSX.Element;
|
|
@@ -16,7 +16,7 @@ const b = (0, utils_1.block)('button-block');
|
|
|
16
16
|
const Button = (props) => {
|
|
17
17
|
const handleMetrika = (0, useMetrika_1.useMetrika)();
|
|
18
18
|
const { tld } = (0, react_1.useContext)(localeContext_1.LocaleContext);
|
|
19
|
-
const { className, metrikaGoals, pixelEvents, analyticsEvents, size = 'l', theme = 'normal', url, img, onClick: onClickOrigin, text, width } = props, rest = tslib_1.__rest(props, ["className", "metrikaGoals", "pixelEvents", "analyticsEvents", "size", "theme", "url", "img", "onClick", "text", "width"]);
|
|
19
|
+
const { className, metrikaGoals, pixelEvents, analyticsEvents, size = 'l', theme = 'normal', url, urlTitle, img, onClick: onClickOrigin, text, width } = props, rest = tslib_1.__rest(props, ["className", "metrikaGoals", "pixelEvents", "analyticsEvents", "size", "theme", "url", "urlTitle", "img", "onClick", "text", "width"]);
|
|
20
20
|
const defaultImgPosition = 'left';
|
|
21
21
|
const handleAnalytics = (0, hooks_1.useAnalytics)(models_1.DefaultEventNames.Button, url);
|
|
22
22
|
const onClick = (0, react_1.useCallback)((e) => {
|
|
@@ -45,7 +45,7 @@ const Button = (props) => {
|
|
|
45
45
|
image = undefined;
|
|
46
46
|
}
|
|
47
47
|
const buttonTheme = theme === 'scale' ? 'accent' : theme;
|
|
48
|
-
return (react_1.default.createElement(uikit_1.Button, Object.assign({ className: buttonClass, view: (0, utils_2.toCommonView)(buttonTheme), size: (0, utils_2.toCommonSize)(size), href: url ? (0, utils_1.setUrlTld)(url, tld) : undefined, width: width }, buttonProps),
|
|
48
|
+
return (react_1.default.createElement(uikit_1.Button, Object.assign({ className: buttonClass, view: (0, utils_2.toCommonView)(buttonTheme), size: (0, utils_2.toCommonSize)(size), href: url ? (0, utils_1.setUrlTld)(url, tld) : undefined, title: urlTitle, width: width }, buttonProps),
|
|
49
49
|
icon && buttonImg.position === 'left' ? icon : null,
|
|
50
50
|
react_1.default.createElement("span", { className: b('content') },
|
|
51
51
|
image && buttonImg.position === 'left' ? image : null,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { ButtonSize } from '@gravity-ui/uikit';
|
|
3
3
|
import { GridColumnSize, GridColumnSizesType } from '../../grid/types';
|
|
4
4
|
import { ThemeSupporting } from '../../utils';
|
|
@@ -109,6 +109,7 @@ export interface HeaderBlockProps {
|
|
|
109
109
|
verticalOffset?: 's' | 'm' | 'l' | 'xl';
|
|
110
110
|
breadcrumbs?: HeaderBreadCrumbsProps;
|
|
111
111
|
status?: JSX.Element;
|
|
112
|
+
renderTitle?: (title: string) => React.ReactNode;
|
|
112
113
|
}
|
|
113
114
|
export interface ExtendedFeaturesItem extends Omit<ContentBlockProps, 'theme' | 'centered' | 'colSizes' | 'size' | 'title'> {
|
|
114
115
|
title: string;
|
|
@@ -42,6 +42,10 @@ export declare enum MediaVideoControlsType {
|
|
|
42
42
|
Default = "default",
|
|
43
43
|
Custom = "custom"
|
|
44
44
|
}
|
|
45
|
+
export declare enum QuoteType {
|
|
46
|
+
Chevron = "chevron",
|
|
47
|
+
EnglishDouble = "english-double"
|
|
48
|
+
}
|
|
45
49
|
export type TextTheme = 'light' | 'dark';
|
|
46
50
|
export type TextSize = 'xs' | 's' | 'm' | 'l';
|
|
47
51
|
export type DividerSize = '0' | 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl' | 'xxxl';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MediaVideoControlsType = exports.MediaVideoType = exports.CustomControlsButtonPositioning = exports.CustomControlsType = exports.PlayButtonThemes = exports.PlayButtonType = exports.PriceLabelColor = exports.PriceDetailsType = exports.AuthorType = void 0;
|
|
3
|
+
exports.QuoteType = exports.MediaVideoControlsType = exports.MediaVideoType = exports.CustomControlsButtonPositioning = exports.CustomControlsType = exports.PlayButtonThemes = exports.PlayButtonType = exports.PriceLabelColor = exports.PriceDetailsType = exports.AuthorType = void 0;
|
|
4
4
|
// enums
|
|
5
5
|
var AuthorType;
|
|
6
6
|
(function (AuthorType) {
|
|
@@ -51,3 +51,8 @@ var MediaVideoControlsType;
|
|
|
51
51
|
MediaVideoControlsType["Default"] = "default";
|
|
52
52
|
MediaVideoControlsType["Custom"] = "custom";
|
|
53
53
|
})(MediaVideoControlsType = exports.MediaVideoControlsType || (exports.MediaVideoControlsType = {}));
|
|
54
|
+
var QuoteType;
|
|
55
|
+
(function (QuoteType) {
|
|
56
|
+
QuoteType["Chevron"] = "chevron";
|
|
57
|
+
QuoteType["EnglishDouble"] = "english-double";
|
|
58
|
+
})(QuoteType = exports.QuoteType || (exports.QuoteType = {}));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ClassNameProps } from '../../models';
|
|
1
|
+
import { ClassNameProps, QuoteType } from '../../models';
|
|
2
2
|
import { ThemeSupporting } from '../../utils';
|
|
3
3
|
import { HubspotEventData, HubspotEventHandlers } from '../../utils/hubspot';
|
|
4
4
|
import { AnalyticsEventsBase, PixelEvent } from '../common';
|
|
@@ -67,9 +67,11 @@ export interface QuoteProps extends Themable, CardBaseProps {
|
|
|
67
67
|
logo: ImageProps;
|
|
68
68
|
color?: string;
|
|
69
69
|
url?: string;
|
|
70
|
+
urlTitle?: string;
|
|
70
71
|
author?: AuthorItem;
|
|
71
72
|
buttonText?: string;
|
|
72
73
|
theme?: TextTheme;
|
|
74
|
+
quoteType?: QuoteType;
|
|
73
75
|
}
|
|
74
76
|
export interface BackgroundCardProps extends CardBaseProps, AnalyticsEventsBase, Omit<ContentBlockProps, 'colSizes' | 'centered'> {
|
|
75
77
|
url?: string;
|
|
@@ -80,6 +82,7 @@ export interface BackgroundCardProps extends CardBaseProps, AnalyticsEventsBase,
|
|
|
80
82
|
}
|
|
81
83
|
export interface BasicCardProps extends CardBaseProps, AnalyticsEventsBase, Omit<ContentBlockProps, 'colSizes' | 'centered' | 'size' | 'theme'> {
|
|
82
84
|
url: string;
|
|
85
|
+
urlTitle?: string;
|
|
83
86
|
icon?: ImageProps;
|
|
84
87
|
target?: string;
|
|
85
88
|
iconPosition?: IconPosition;
|
|
@@ -8,6 +8,9 @@ export declare const cardSchemas: {
|
|
|
8
8
|
url: {
|
|
9
9
|
type: string;
|
|
10
10
|
};
|
|
11
|
+
urlTitle: {
|
|
12
|
+
type: string;
|
|
13
|
+
};
|
|
11
14
|
icon: {
|
|
12
15
|
oneOf: ({
|
|
13
16
|
type: string;
|
|
@@ -52,6 +55,9 @@ export declare const cardSchemas: {
|
|
|
52
55
|
url: {
|
|
53
56
|
type: string;
|
|
54
57
|
};
|
|
58
|
+
urlTitle: {
|
|
59
|
+
type: string;
|
|
60
|
+
};
|
|
55
61
|
resetMargin: {
|
|
56
62
|
type: string;
|
|
57
63
|
};
|
|
@@ -163,6 +169,9 @@ export declare const cardSchemas: {
|
|
|
163
169
|
url: {
|
|
164
170
|
type: string;
|
|
165
171
|
};
|
|
172
|
+
urlTitle: {
|
|
173
|
+
type: string;
|
|
174
|
+
};
|
|
166
175
|
buttonText: {
|
|
167
176
|
type: string;
|
|
168
177
|
};
|
|
@@ -202,6 +211,10 @@ export declare const cardSchemas: {
|
|
|
202
211
|
};
|
|
203
212
|
};
|
|
204
213
|
};
|
|
214
|
+
quoteType: {
|
|
215
|
+
type: string;
|
|
216
|
+
enum: import("../models").QuoteType[];
|
|
217
|
+
};
|
|
205
218
|
type: {};
|
|
206
219
|
when: {
|
|
207
220
|
type: string;
|
|
@@ -215,6 +228,9 @@ export declare const cardSchemas: {
|
|
|
215
228
|
url: {
|
|
216
229
|
type: string;
|
|
217
230
|
};
|
|
231
|
+
urlTitle: {
|
|
232
|
+
type: string;
|
|
233
|
+
};
|
|
218
234
|
background: {
|
|
219
235
|
oneOf: (({
|
|
220
236
|
type: string;
|
|
@@ -372,6 +388,9 @@ export declare const cardSchemas: {
|
|
|
372
388
|
url: {
|
|
373
389
|
type: string;
|
|
374
390
|
};
|
|
391
|
+
urlTitle: {
|
|
392
|
+
type: string;
|
|
393
|
+
};
|
|
375
394
|
resetMargin: {
|
|
376
395
|
type: string;
|
|
377
396
|
};
|
|
@@ -589,6 +608,9 @@ export declare const cardSchemas: {
|
|
|
589
608
|
url: {
|
|
590
609
|
type: string;
|
|
591
610
|
};
|
|
611
|
+
urlTitle: {
|
|
612
|
+
type: string;
|
|
613
|
+
};
|
|
592
614
|
primary: {
|
|
593
615
|
type: string;
|
|
594
616
|
};
|