@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.
Files changed (78) hide show
  1. package/build/cjs/blocks/Banner/schema.d.ts +9 -0
  2. package/build/cjs/blocks/CardLayout/schema.d.ts +12 -0
  3. package/build/cjs/blocks/ContentLayout/schema.d.ts +6 -0
  4. package/build/cjs/blocks/ExtendedFeatures/schema.d.ts +9 -0
  5. package/build/cjs/blocks/FilterBlock/schema.d.ts +12 -0
  6. package/build/cjs/blocks/Header/Header.js +2 -2
  7. package/build/cjs/blocks/Header/schema.d.ts +3 -0
  8. package/build/cjs/blocks/HeaderSlider/schema.d.ts +3 -0
  9. package/build/cjs/blocks/Icons/schema.d.ts +6 -0
  10. package/build/cjs/blocks/Info/schema.d.ts +6 -0
  11. package/build/cjs/blocks/Map/schema.d.ts +9 -0
  12. package/build/cjs/blocks/Media/schema.d.ts +18 -0
  13. package/build/cjs/blocks/PromoFeaturesBlock/schema.d.ts +6 -0
  14. package/build/cjs/blocks/Questions/schema.d.ts +6 -0
  15. package/build/cjs/blocks/Slider/schema.d.ts +6 -0
  16. package/build/cjs/blocks/Table/schema.d.ts +3 -0
  17. package/build/cjs/blocks/Tabs/schema.d.ts +12 -0
  18. package/build/cjs/components/Button/Button.d.ts +1 -0
  19. package/build/cjs/components/Button/Button.js +2 -2
  20. package/build/cjs/models/constructor-items/blocks.d.ts +2 -1
  21. package/build/cjs/models/constructor-items/common.d.ts +4 -0
  22. package/build/cjs/models/constructor-items/common.js +6 -1
  23. package/build/cjs/models/constructor-items/sub-blocks.d.ts +4 -1
  24. package/build/cjs/schema/constants.d.ts +22 -0
  25. package/build/cjs/schema/validators/common.d.ts +23 -1
  26. package/build/cjs/schema/validators/common.js +13 -1
  27. package/build/cjs/sub-blocks/BackgroundCard/schema.d.ts +6 -0
  28. package/build/cjs/sub-blocks/BackgroundCard/schema.js +2 -0
  29. package/build/cjs/sub-blocks/BasicCard/schema.d.ts +6 -0
  30. package/build/cjs/sub-blocks/BasicCard/schema.js +2 -0
  31. package/build/cjs/sub-blocks/Content/schema.d.ts +6 -0
  32. package/build/cjs/sub-blocks/LayoutItem/schema.d.ts +3 -0
  33. package/build/cjs/sub-blocks/Quote/Quote.css +12 -3
  34. package/build/cjs/sub-blocks/Quote/Quote.js +3 -3
  35. package/build/cjs/sub-blocks/Quote/schema.d.ts +7 -0
  36. package/build/cjs/sub-blocks/Quote/schema.js +6 -1
  37. package/build/esm/blocks/Banner/schema.d.ts +9 -0
  38. package/build/esm/blocks/CardLayout/schema.d.ts +12 -0
  39. package/build/esm/blocks/ContentLayout/schema.d.ts +6 -0
  40. package/build/esm/blocks/ExtendedFeatures/schema.d.ts +9 -0
  41. package/build/esm/blocks/FilterBlock/schema.d.ts +12 -0
  42. package/build/esm/blocks/Header/Header.js +2 -2
  43. package/build/esm/blocks/Header/schema.d.ts +3 -0
  44. package/build/esm/blocks/HeaderSlider/schema.d.ts +3 -0
  45. package/build/esm/blocks/Icons/schema.d.ts +6 -0
  46. package/build/esm/blocks/Info/schema.d.ts +6 -0
  47. package/build/esm/blocks/Map/schema.d.ts +9 -0
  48. package/build/esm/blocks/Media/schema.d.ts +18 -0
  49. package/build/esm/blocks/PromoFeaturesBlock/schema.d.ts +6 -0
  50. package/build/esm/blocks/Questions/schema.d.ts +6 -0
  51. package/build/esm/blocks/Slider/schema.d.ts +6 -0
  52. package/build/esm/blocks/Table/schema.d.ts +3 -0
  53. package/build/esm/blocks/Tabs/schema.d.ts +12 -0
  54. package/build/esm/components/Button/Button.d.ts +1 -0
  55. package/build/esm/components/Button/Button.js +2 -2
  56. package/build/esm/models/constructor-items/blocks.d.ts +2 -1
  57. package/build/esm/models/constructor-items/common.d.ts +4 -0
  58. package/build/esm/models/constructor-items/common.js +5 -0
  59. package/build/esm/models/constructor-items/sub-blocks.d.ts +4 -1
  60. package/build/esm/schema/constants.d.ts +22 -0
  61. package/build/esm/schema/validators/common.d.ts +23 -1
  62. package/build/esm/schema/validators/common.js +13 -1
  63. package/build/esm/sub-blocks/BackgroundCard/schema.d.ts +6 -0
  64. package/build/esm/sub-blocks/BackgroundCard/schema.js +2 -0
  65. package/build/esm/sub-blocks/BasicCard/schema.d.ts +6 -0
  66. package/build/esm/sub-blocks/BasicCard/schema.js +2 -0
  67. package/build/esm/sub-blocks/Content/schema.d.ts +6 -0
  68. package/build/esm/sub-blocks/LayoutItem/schema.d.ts +3 -0
  69. package/build/esm/sub-blocks/Quote/Quote.css +12 -3
  70. package/build/esm/sub-blocks/Quote/Quote.js +4 -4
  71. package/build/esm/sub-blocks/Quote/schema.d.ts +7 -0
  72. package/build/esm/sub-blocks/Quote/schema.js +7 -2
  73. package/package.json +1 -1
  74. package/server/models/constructor-items/blocks.d.ts +2 -1
  75. package/server/models/constructor-items/common.d.ts +4 -0
  76. package/server/models/constructor-items/common.js +6 -1
  77. package/server/models/constructor-items/sub-blocks.d.ts +4 -1
  78. package/widget/index.js +1 -1
@@ -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: {
@@ -66,6 +66,9 @@ export declare const TableBlock: {
66
66
  url: {
67
67
  type: string;
68
68
  };
69
+ urlTitle: {
70
+ type: string;
71
+ };
69
72
  };
70
73
  };
71
74
  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: {
@@ -4,6 +4,7 @@ import './Button.css';
4
4
  export interface ButtonProps extends Omit<ButtonParams, 'url'>, QAProps {
5
5
  className?: string;
6
6
  url?: string;
7
+ urlTitle?: string;
7
8
  onClick?: React.MouseEventHandler<HTMLButtonElement | HTMLAnchorElement>;
8
9
  }
9
10
  declare const Button: (props: ButtonProps) => JSX.Element;
@@ -15,7 +15,7 @@ const b = block('button-block');
15
15
  const Button = (props) => {
16
16
  const handleMetrika = useMetrika();
17
17
  const { tld } = useContext(LocaleContext);
18
- const { className, metrikaGoals, pixelEvents, analyticsEvents, size = 'l', theme = 'normal', url, img, onClick: onClickOrigin, text, width } = props, rest = __rest(props, ["className", "metrikaGoals", "pixelEvents", "analyticsEvents", "size", "theme", "url", "img", "onClick", "text", "width"]);
18
+ const { className, metrikaGoals, pixelEvents, analyticsEvents, size = 'l', theme = 'normal', url, urlTitle, img, onClick: onClickOrigin, text, width } = props, rest = __rest(props, ["className", "metrikaGoals", "pixelEvents", "analyticsEvents", "size", "theme", "url", "urlTitle", "img", "onClick", "text", "width"]);
19
19
  const defaultImgPosition = 'left';
20
20
  const handleAnalytics = useAnalytics(DefaultEventNames.Button, url);
21
21
  const onClick = useCallback((e) => {
@@ -44,7 +44,7 @@ const Button = (props) => {
44
44
  image = undefined;
45
45
  }
46
46
  const buttonTheme = theme === 'scale' ? 'accent' : theme;
47
- return (React.createElement(CommonButton, Object.assign({ className: buttonClass, view: toCommonView(buttonTheme), size: toCommonSize(size), href: url ? setUrlTld(url, tld) : undefined, width: width }, buttonProps),
47
+ return (React.createElement(CommonButton, Object.assign({ className: buttonClass, view: toCommonView(buttonTheme), size: toCommonSize(size), href: url ? setUrlTld(url, tld) : undefined, title: urlTitle, width: width }, buttonProps),
48
48
  icon && buttonImg.position === 'left' ? icon : null,
49
49
  React.createElement("span", { className: b('content') },
50
50
  image && buttonImg.position === 'left' ? image : null,
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
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';
@@ -48,3 +48,8 @@ export var MediaVideoControlsType;
48
48
  MediaVideoControlsType["Default"] = "default";
49
49
  MediaVideoControlsType["Custom"] = "custom";
50
50
  })(MediaVideoControlsType || (MediaVideoControlsType = {}));
51
+ export var QuoteType;
52
+ (function (QuoteType) {
53
+ QuoteType["Chevron"] = "chevron";
54
+ QuoteType["EnglishDouble"] = "english-double";
55
+ })(QuoteType || (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
  };
@@ -1,4 +1,4 @@
1
- import { CustomControlsButtonPositioning, CustomControlsType, MediaVideoControlsType, Theme } from '../../models';
1
+ import { CustomControlsButtonPositioning, CustomControlsType, MediaVideoControlsType, QuoteType, Theme } from '../../models';
2
2
  export declare const mediaDirection: string[];
3
3
  export declare const textSize: string[];
4
4
  export declare const containerSizesArray: string[];
@@ -19,6 +19,7 @@ export declare const sizeNumber: {
19
19
  minimum: number;
20
20
  };
21
21
  export declare const contentThemes: string[];
22
+ export declare const quoteTypes: QuoteType[];
22
23
  export declare const customControlsType: CustomControlsType[];
23
24
  export declare const customControlsButtonPositioning: CustomControlsButtonPositioning[];
24
25
  export declare const BaseProps: {
@@ -376,6 +377,9 @@ export declare const LinkProps: {
376
377
  url: {
377
378
  type: string;
378
379
  };
380
+ urlTitle: {
381
+ type: string;
382
+ };
379
383
  arrow: {
380
384
  type: string;
381
385
  };
@@ -544,6 +548,9 @@ export declare const ButtonProps: {
544
548
  url: {
545
549
  type: string;
546
550
  };
551
+ urlTitle: {
552
+ type: string;
553
+ };
547
554
  primary: {
548
555
  type: string;
549
556
  };
@@ -795,6 +802,9 @@ export declare const AnchorProps: {
795
802
  url: {
796
803
  type: string;
797
804
  };
805
+ urlTitle: {
806
+ type: string;
807
+ };
798
808
  };
799
809
  };
800
810
  export declare const BlockBaseProps: {
@@ -810,6 +820,9 @@ export declare const BlockBaseProps: {
810
820
  url: {
811
821
  type: string;
812
822
  };
823
+ urlTitle: {
824
+ type: string;
825
+ };
813
826
  };
814
827
  };
815
828
  visible: {
@@ -843,6 +856,9 @@ export declare const TitleProps: {
843
856
  url: {
844
857
  type: string;
845
858
  };
859
+ urlTitle: {
860
+ type: string;
861
+ };
846
862
  resetMargin: {
847
863
  type: string;
848
864
  };
@@ -859,6 +875,9 @@ export declare const ButtonBlock: {
859
875
  url: {
860
876
  type: string;
861
877
  };
878
+ urlTitle: {
879
+ type: string;
880
+ };
862
881
  primary: {
863
882
  type: string;
864
883
  };
@@ -1463,6 +1482,9 @@ export declare const BlockHeaderProps: {
1463
1482
  url: {
1464
1483
  type: string;
1465
1484
  };
1485
+ urlTitle: {
1486
+ type: string;
1487
+ };
1466
1488
  resetMargin: {
1467
1489
  type: string;
1468
1490
  };
@@ -1,5 +1,5 @@
1
1
  import { ImageProps } from '../../components/Image/schema';
2
- import { CustomControlsButtonPositioning, CustomControlsType, MediaVideoControlsType, Theme, } from '../../models';
2
+ import { CustomControlsButtonPositioning, CustomControlsType, MediaVideoControlsType, QuoteType, Theme, } from '../../models';
3
3
  import { AnalyticsEventSchema } from './event';
4
4
  import { pixelEvents } from './pixel';
5
5
  export const mediaDirection = ['media-content', 'content-media'];
@@ -16,6 +16,7 @@ export const fileLinkTypes = ['vertical', 'horizontal'];
16
16
  export const dividerEnum = { enum: [0, 'xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl', 'xxxl'] };
17
17
  export const sizeNumber = { type: 'number', maximum: 12, minimum: 1 };
18
18
  export const contentThemes = ['default', 'dark', 'light'];
19
+ export const quoteTypes = Object.values(QuoteType);
19
20
  export const customControlsType = [
20
21
  CustomControlsType.WithMuteButton,
21
22
  CustomControlsType.WithPlayPauseButton,
@@ -207,6 +208,8 @@ export const LinkProps = {
207
208
  contentType: 'text',
208
209
  }, url: {
209
210
  type: 'string',
211
+ }, urlTitle: {
212
+ type: 'string',
210
213
  }, arrow: {
211
214
  type: 'boolean',
212
215
  }, theme: {
@@ -282,6 +285,9 @@ export const ButtonProps = {
282
285
  url: {
283
286
  type: 'string',
284
287
  },
288
+ urlTitle: {
289
+ type: 'string',
290
+ },
285
291
  primary: {
286
292
  type: 'boolean',
287
293
  },
@@ -435,6 +441,9 @@ export const AnchorProps = {
435
441
  url: {
436
442
  type: 'string',
437
443
  },
444
+ urlTitle: {
445
+ type: 'string',
446
+ },
438
447
  },
439
448
  };
440
449
  export const BlockBaseProps = Object.assign(Object.assign({}, BaseProps), { anchor: AnchorProps, visible: {
@@ -461,6 +470,9 @@ export const TitleProps = {
461
470
  url: {
462
471
  type: 'string',
463
472
  },
473
+ urlTitle: {
474
+ type: 'string',
475
+ },
464
476
  resetMargin: {
465
477
  type: 'boolean',
466
478
  },
@@ -6,6 +6,9 @@ export declare const BackgroundCard: {
6
6
  url: {
7
7
  type: string;
8
8
  };
9
+ urlTitle: {
10
+ type: string;
11
+ };
9
12
  background: {
10
13
  oneOf: (({
11
14
  type: string;
@@ -163,6 +166,9 @@ export declare const BackgroundCard: {
163
166
  url: {
164
167
  type: string;
165
168
  };
169
+ urlTitle: {
170
+ type: string;
171
+ };
166
172
  resetMargin: {
167
173
  type: string;
168
174
  };
@@ -10,6 +10,8 @@ export const BackgroundCard = {
10
10
  required: ['title', 'text'],
11
11
  properties: Object.assign(Object.assign(Object.assign(Object.assign({}, BaseProps), CardBase), BackgroundCardContentProps), { url: {
12
12
  type: 'string',
13
+ }, urlTitle: {
14
+ type: 'string',
13
15
  }, background: withTheme(ImageObjectProps), backgroundColor: {
14
16
  type: 'string',
15
17
  }, paddingBottom: {
@@ -6,6 +6,9 @@ export declare const BasicCard: {
6
6
  url: {
7
7
  type: string;
8
8
  };
9
+ urlTitle: {
10
+ type: string;
11
+ };
9
12
  icon: {
10
13
  oneOf: ({
11
14
  type: string;
@@ -50,6 +53,9 @@ export declare const BasicCard: {
50
53
  url: {
51
54
  type: string;
52
55
  };
56
+ urlTitle: {
57
+ type: string;
58
+ };
53
59
  resetMargin: {
54
60
  type: string;
55
61
  };
@@ -9,6 +9,8 @@ export const BasicCard = {
9
9
  required: [],
10
10
  properties: Object.assign(Object.assign(Object.assign(Object.assign({}, BaseProps), CardBase), BasicCardContentProps), { url: {
11
11
  type: 'string',
12
+ }, urlTitle: {
13
+ type: 'string',
12
14
  }, icon: ImageProps, target: {
13
15
  type: 'string',
14
16
  enum: ['_blank', '_parent', '_top', '_self'],
@@ -59,6 +59,9 @@ export declare const ContentBase: {
59
59
  url: {
60
60
  type: string;
61
61
  };
62
+ urlTitle: {
63
+ type: string;
64
+ };
62
65
  resetMargin: {
63
66
  type: string;
64
67
  };
@@ -147,6 +150,9 @@ export declare const ContentBlock: {
147
150
  url: {
148
151
  type: string;
149
152
  };
153
+ urlTitle: {
154
+ type: string;
155
+ };
150
156
  resetMargin: {
151
157
  type: string;
152
158
  };
@@ -270,6 +270,9 @@ export declare const LayoutItem: {
270
270
  url: {
271
271
  type: string;
272
272
  };
273
+ urlTitle: {
274
+ type: string;
275
+ };
273
276
  resetMargin: {
274
277
  type: string;
275
278
  };
@@ -60,14 +60,23 @@ unpredictable css rules order in build */
60
60
  font-size: var(--g-text-body-3-font-size);
61
61
  line-height: var(--g-text-body-3-line-height);
62
62
  }
63
- .pc-quote__content::before {
63
+ .pc-quote__content_quote-type_chevron::before {
64
64
  position: absolute;
65
65
  top: -1px;
66
66
  left: -10px;
67
67
  content: "«";
68
68
  }
69
- .pc-quote__text::after {
70
- content: "».";
69
+ .pc-quote__content_quote-type_chevron .pc-quote__text::after {
70
+ content: "»";
71
+ }
72
+ .pc-quote__content_quote-type_english-double::before {
73
+ position: absolute;
74
+ top: -1px;
75
+ left: -8px;
76
+ content: "“";
77
+ }
78
+ .pc-quote__content_quote-type_english-double .pc-quote__text::after {
79
+ content: "”";
71
80
  }
72
81
  .pc-quote__image {
73
82
  width: 100%;
@@ -4,12 +4,12 @@ import { Author, HTML, Image } from '../../components';
4
4
  import { getMediaImage } from '../../components/Media/Image/utils';
5
5
  import { useTheme } from '../../context/theme';
6
6
  import { useAnalytics } from '../../hooks';
7
- import { AuthorType, DefaultEventNames } from '../../models';
7
+ import { AuthorType, DefaultEventNames, QuoteType } from '../../models';
8
8
  import { block, getThemedValue } from '../../utils';
9
9
  import './Quote.css';
10
10
  const b = block('quote');
11
11
  const Quote = (props) => {
12
- const { theme: textTheme = 'light', color, image, border = 'shadow', text, logo, author, url, buttonText, } = props;
12
+ const { theme: textTheme = 'light', color, image, border = 'shadow', text, logo, author, url, urlTitle, buttonText, quoteType = QuoteType.Chevron, } = props;
13
13
  const theme = useTheme();
14
14
  const imageThemed = getThemedValue(image, theme);
15
15
  const imageData = getMediaImage(imageThemed);
@@ -17,13 +17,13 @@ const Quote = (props) => {
17
17
  const handleButtonClick = useCallback(() => handleAnalytics(), [handleAnalytics]);
18
18
  const renderFooter = Boolean(author || url) && (React.createElement("div", { className: b('author-wrapper') },
19
19
  author && (React.createElement(Author, { className: b('author', { theme: textTheme }), author: author, type: AuthorType.Line })),
20
- url && buttonText && (React.createElement(Button, { view: "outlined", size: "xl", href: url, className: b('link-button', { theme: textTheme }), onClick: handleButtonClick }, buttonText))));
20
+ url && buttonText && (React.createElement(Button, { view: "outlined", size: "xl", href: url, className: b('link-button', { theme: textTheme }), onClick: handleButtonClick, title: urlTitle }, buttonText))));
21
21
  const logoProps = getMediaImage(logo);
22
22
  return (React.createElement("div", { className: b({ theme: textTheme, border }), style: color ? { backgroundColor: color } : {} },
23
23
  React.createElement("div", { key: text, className: b('content-wrapper') },
24
24
  React.createElement("div", null,
25
25
  React.createElement(Image, Object.assign({ className: b('logo') }, logoProps)),
26
- React.createElement("div", { className: b('content') },
26
+ React.createElement("div", { className: b('content', { 'quote-type': quoteType }) },
27
27
  React.createElement("span", { className: b('text') },
28
28
  React.createElement(HTML, null, text)))),
29
29
  renderFooter),
@@ -51,6 +51,9 @@ export declare const Quote: {
51
51
  url: {
52
52
  type: string;
53
53
  };
54
+ urlTitle: {
55
+ type: string;
56
+ };
54
57
  buttonText: {
55
58
  type: string;
56
59
  };
@@ -90,6 +93,10 @@ export declare const Quote: {
90
93
  };
91
94
  };
92
95
  };
96
+ quoteType: {
97
+ type: string;
98
+ enum: import("../..").QuoteType[];
99
+ };
93
100
  type: {};
94
101
  when: {
95
102
  type: string;
@@ -1,5 +1,5 @@
1
1
  import { ImageProps } from '../../components/Image/schema';
2
- import { BaseProps, ThemeProps, authorItem, withTheme } from '../../schema/validators/common';
2
+ import { BaseProps, ThemeProps, authorItem, quoteTypes, withTheme, } from '../../schema/validators/common';
3
3
  export const Quote = {
4
4
  quote: {
5
5
  additionalProperties: false,
@@ -11,8 +11,13 @@ export const Quote = {
11
11
  type: 'string',
12
12
  }, url: {
13
13
  type: 'string',
14
+ }, urlTitle: {
15
+ type: 'string',
14
16
  }, buttonText: {
15
17
  type: 'string',
16
- }, theme: ThemeProps, author: authorItem }),
18
+ }, theme: ThemeProps, author: authorItem, quoteType: {
19
+ type: 'string',
20
+ enum: quoteTypes,
21
+ } }),
17
22
  },
18
23
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gravity-ui/page-constructor",
3
- "version": "4.29.2",
3
+ "version": "4.31.0",
4
4
  "description": "Gravity UI Page Constructor",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
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;