@gravity-ui/page-constructor 1.26.0 → 1.26.2-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 (65) hide show
  1. package/CHANGELOG.md +41 -8
  2. package/README.md +7 -0
  3. package/build/cjs/blocks/Map/schema.d.ts +0 -12
  4. package/build/cjs/blocks/Share/Share.css +12 -11
  5. package/build/cjs/components/BlockHeader/BlockHeader.css +2 -2
  6. package/build/cjs/components/Button/Button.d.ts +1 -0
  7. package/build/cjs/components/Button/Button.js +1 -1
  8. package/build/cjs/components/Button/__tests__/Button.test.d.ts +1 -0
  9. package/build/cjs/components/Button/__tests__/Button.test.js +91 -0
  10. package/build/cjs/components/Button/utils.d.ts +1 -0
  11. package/build/cjs/components/Button/utils.js +2 -1
  12. package/build/cjs/components/ButtonTabs/ButtonTabs.css +6 -6
  13. package/build/cjs/components/HTML/HTML.d.ts +1 -1
  14. package/build/cjs/components/Map/GoogleMap.js +7 -5
  15. package/build/cjs/components/Map/Map.css +5 -0
  16. package/build/cjs/components/Map/YMap/YMap.d.ts +4 -2
  17. package/build/cjs/components/Map/YMap/YMap.js +18 -10
  18. package/build/cjs/components/Map/YMap/YandexMap.js +18 -9
  19. package/build/cjs/components/ReactPlayer/utils.js +13 -12
  20. package/build/cjs/components/Title/Title.css +20 -5
  21. package/build/cjs/components/Title/Title.d.ts +1 -1
  22. package/build/cjs/components/Title/Title.js +4 -2
  23. package/build/cjs/models/constructor-items/common.d.ts +5 -5
  24. package/build/cjs/navigation/components/Navigation/Navigation.js +7 -6
  25. package/build/cjs/schema/validators/common.d.ts +0 -6
  26. package/build/cjs/schema/validators/common.js +0 -4
  27. package/build/cjs/sub-blocks/BannerCard/BannerCard.css +2 -1
  28. package/build/cjs/sub-blocks/Content/Content.css +6 -0
  29. package/build/cjs/sub-blocks/HubspotForm/HubspotForm.css +1 -0
  30. package/build/cjs/utils/blocks.d.ts +1 -1
  31. package/build/cjs/utils/blocks.js +2 -0
  32. package/build/esm/blocks/Map/schema.d.ts +0 -12
  33. package/build/esm/blocks/Share/Share.css +12 -11
  34. package/build/esm/components/BlockHeader/BlockHeader.css +2 -2
  35. package/build/esm/components/Button/Button.d.ts +1 -0
  36. package/build/esm/components/Button/Button.js +2 -2
  37. package/build/esm/components/Button/__tests__/Button.test.d.ts +1 -0
  38. package/build/esm/components/Button/__tests__/Button.test.js +88 -0
  39. package/build/esm/components/Button/utils.d.ts +1 -0
  40. package/build/esm/components/Button/utils.js +1 -0
  41. package/build/esm/components/ButtonTabs/ButtonTabs.css +6 -6
  42. package/build/esm/components/HTML/HTML.d.ts +1 -1
  43. package/build/esm/components/Map/GoogleMap.js +7 -5
  44. package/build/esm/components/Map/Map.css +5 -0
  45. package/build/esm/components/Map/YMap/YMap.d.ts +4 -2
  46. package/build/esm/components/Map/YMap/YMap.js +18 -10
  47. package/build/esm/components/Map/YMap/YandexMap.js +18 -9
  48. package/build/esm/components/ReactPlayer/utils.js +13 -12
  49. package/build/esm/components/Title/Title.css +20 -5
  50. package/build/esm/components/Title/Title.d.ts +1 -1
  51. package/build/esm/components/Title/Title.js +4 -2
  52. package/build/esm/models/constructor-items/common.d.ts +5 -5
  53. package/build/esm/navigation/components/Navigation/Navigation.js +7 -6
  54. package/build/esm/schema/validators/common.d.ts +0 -6
  55. package/build/esm/schema/validators/common.js +0 -4
  56. package/build/esm/sub-blocks/BannerCard/BannerCard.css +2 -1
  57. package/build/esm/sub-blocks/Content/Content.css +6 -0
  58. package/build/esm/sub-blocks/HubspotForm/HubspotForm.css +1 -0
  59. package/build/esm/utils/blocks.d.ts +1 -1
  60. package/build/esm/utils/blocks.js +2 -0
  61. package/package.json +7 -6
  62. package/server/models/constructor-items/common.d.ts +5 -5
  63. package/server/utils/blocks.d.ts +1 -1
  64. package/server/utils/blocks.js +2 -0
  65. package/styles/mixins.scss +9 -7
@@ -13,8 +13,12 @@ import { getMapHeight } from '../helpers';
13
13
  const b = block('map');
14
14
  const DEFAULT_CONTAINER_ID = 'ymap';
15
15
  const DEFAULT_ZOOM = 9;
16
+ // Center - is a required parameter for creating a new map
17
+ // We use this init center to create a map
18
+ // The real center of the map will be calculated later, using the coordinates of the markers
19
+ const INITIAL_CENTER = [0, 0];
16
20
  const YandexMap = (props) => {
17
- const { markers, zoom, center, id } = props;
21
+ const { markers, zoom, id } = props;
18
22
  const { apiKey, scriptSrc, nonce } = useContext(MapsContext);
19
23
  const isMobile = useContext(MobileContext);
20
24
  const { lang = 'ru' } = useContext(LocaleContext);
@@ -23,6 +27,7 @@ const YandexMap = (props) => {
23
27
  const [height, setHeight] = useState(undefined);
24
28
  const ref = useRef(null);
25
29
  const [loading, setLoading] = useState(false);
30
+ const [ready, setReady] = useState(false);
26
31
  const [attemptsIndex, setAttemptsIndex] = useState(0);
27
32
  const onTryAgain = useCallback(() => {
28
33
  setAttemptsIndex(attemptsIndex + 1);
@@ -30,20 +35,17 @@ const YandexMap = (props) => {
30
35
  useEffect(() => {
31
36
  (async function () {
32
37
  var _a;
33
- if (!center) {
34
- return;
35
- }
36
38
  setLoading(true);
37
39
  await YMapsApiLoader.loadApi(apiKey, scriptSrc, lang, nonce);
38
40
  (_a = window.ymaps) === null || _a === void 0 ? void 0 : _a.ready(() => {
39
41
  setYmaps(new YMap(new window.ymaps.Map(containerId, {
40
- center,
42
+ center: INITIAL_CENTER,
41
43
  zoom: zoom || DEFAULT_ZOOM,
42
44
  }, { autoFitToViewport: 'always' }), ref.current));
43
45
  });
44
46
  setLoading(false);
45
47
  })();
46
- }, [apiKey, lang, scriptSrc, containerId, zoom, center, nonce, attemptsIndex, setLoading]);
48
+ }, [apiKey, lang, scriptSrc, containerId, zoom, nonce, attemptsIndex, setLoading]);
47
49
  useEffect(() => {
48
50
  const updateSize = _.debounce(() => {
49
51
  if (ref.current) {
@@ -58,12 +60,19 @@ const YandexMap = (props) => {
58
60
  }, [markers, ymap, setYmaps, isMobile]);
59
61
  useEffect(() => {
60
62
  if (ymap) {
61
- ymap.showPlacemarks(markers);
63
+ // show with computed center and placemarks
64
+ const showPlacemarks = async () => {
65
+ await ymap.showPlacemarks({ markers, zoom });
66
+ setReady(true);
67
+ };
68
+ showPlacemarks();
62
69
  }
63
70
  });
64
- if (!center)
71
+ if (!markers)
65
72
  return null;
66
73
  return (React.createElement(ErrorWrapper, { isError: YMapsApiLoader.status === MapApiStatus.Error, text: i18n('map-load-error'), buttonText: i18n('map-try-again'), handler: onTryAgain, className: b('wrapper') },
67
- React.createElement("div", { id: containerId, className: b(), ref: ref, style: { height } }, loading ? React.createElement(Spin, { size: "xl", className: b('spinner') }) : null)));
74
+ React.createElement("div", { className: b('wrapper') },
75
+ React.createElement("div", { id: containerId, className: b({ hidden: !ready }), ref: ref, style: { height } }),
76
+ loading ? React.createElement(Spin, { size: "xl", className: b('spinner') }) : null)));
68
77
  };
69
78
  export default YandexMap;
@@ -1,19 +1,20 @@
1
1
  // the file serves to support live video with react-player@2.9
2
2
  const LIVE_YUOTUBE_VIDEO_REGEX = /(?:youtu\.be\/live\/|youtube(?:-nocookie)?\.com\/(?:live\/))((\w|-){11})/;
3
3
  const YOUTUBE_VIDEO_TEMPLATE = 'https://www.youtube.com/watch?v=';
4
+ const transformYoutubeUrl = (src) => {
5
+ var _a;
6
+ if (LIVE_YUOTUBE_VIDEO_REGEX.test(src)) {
7
+ const youtubeLiveId = (_a = src.match(LIVE_YUOTUBE_VIDEO_REGEX)) === null || _a === void 0 ? void 0 : _a[1];
8
+ if (!youtubeLiveId) {
9
+ return src;
10
+ }
11
+ return `${YOUTUBE_VIDEO_TEMPLATE}${youtubeLiveId}`;
12
+ }
13
+ return src;
14
+ };
4
15
  export const checkYoutubeVideos = (src) => {
5
16
  if (Array.isArray(src)) {
6
- return src.map((videoUrl) => {
7
- var _a;
8
- if (LIVE_YUOTUBE_VIDEO_REGEX.test(videoUrl)) {
9
- const youtubeLiveId = (_a = videoUrl.match(LIVE_YUOTUBE_VIDEO_REGEX)) === null || _a === void 0 ? void 0 : _a[1];
10
- if (!youtubeLiveId) {
11
- return videoUrl;
12
- }
13
- return `${YOUTUBE_VIDEO_TEMPLATE}${youtubeLiveId}`;
14
- }
15
- return videoUrl;
16
- });
17
+ return src.map((videoUrl) => transformYoutubeUrl(videoUrl));
17
18
  }
18
- return src;
19
+ return transformYoutubeUrl(src);
19
20
  };
@@ -1,4 +1,4 @@
1
- .pc-title-block_size_l, .pc-title-block_size_m, .pc-title-block_size_s {
1
+ .pc-title-block_size_l, .pc-title-block_size_m, .pc-title-block_size_s, .pc-title-block_size_xs {
2
2
  margin: 0;
3
3
  }
4
4
 
@@ -10,6 +10,12 @@ unpredictable css rules order in build */
10
10
  .pc-title-block_justify_end {
11
11
  text-align: right;
12
12
  }
13
+ .pc-title-block_size_xs {
14
+ font-size: var(--yc-text-body-3-font-size);
15
+ line-height: var(--yc-text-body-3-line-height);
16
+ color: var(--pc-text-header-color);
17
+ font-weight: var(--yc-text-accent-font-weight);
18
+ }
13
19
  .pc-title-block_size_s {
14
20
  font-size: var(--yc-text-header-1-font-size);
15
21
  line-height: var(--yc-text-header-1-line-height);
@@ -44,10 +50,13 @@ unpredictable css rules order in build */
44
50
  }
45
51
  }
46
52
  .pc-title-block__arrow {
47
- margin: 8px 0 0 4px;
53
+ margin-top: 10px;
54
+ }
55
+ .pc-title-block__arrow_size_xs {
56
+ margin-top: 7px;
48
57
  }
49
58
  .pc-title-block__arrow_size_s {
50
- margin: 4px 0 0 4px;
59
+ margin-top: 5px;
51
60
  }
52
61
  .pc-title-block__link {
53
62
  color: inherit;
@@ -62,7 +71,10 @@ unpredictable css rules order in build */
62
71
  cursor: pointer;
63
72
  }
64
73
  .pc-title-block__link:hover .pc-title-block__arrow {
65
- margin-left: 12px;
74
+ margin-left: 10px;
75
+ }
76
+ .pc-title-block__link:hover .pc-title-block__arrow_size_xs {
77
+ margin-left: 6px;
66
78
  }
67
79
  .pc-title-block__link:hover .pc-title-block__arrow_size_s {
68
80
  margin-left: 8px;
@@ -90,7 +102,10 @@ unpredictable css rules order in build */
90
102
  margin-top: 0;
91
103
  }
92
104
  @media (max-width: 577px) {
93
- .pc-title-block_size_l {
105
+ .pc-title-block_size_l:not(.pc-title-block_reset-margin) {
94
106
  margin-top: 48px;
95
107
  }
108
+ .pc-title-block__arrow_size_m, .pc-title-block__arrow_size_l {
109
+ margin-top: 9px;
110
+ }
96
111
  }
@@ -1,6 +1,6 @@
1
1
  import { TextSize, TitleProps } from '../../models';
2
2
  import './Title.css';
3
- export declare function getArrowSize(size: TextSize, isMobile: boolean): 16 | 20 | 24;
3
+ export declare function getArrowSize(size: TextSize, isMobile: boolean): 16 | 13 | 20 | 24 | 22 | 26 | 38;
4
4
  export interface TitleFullProps extends TitleProps {
5
5
  className?: string;
6
6
  onClick?: () => void;
@@ -8,12 +8,14 @@ import './Title.css';
8
8
  const b = block('title-block');
9
9
  export function getArrowSize(size, isMobile) {
10
10
  switch (size) {
11
+ case 'xs':
12
+ return 13;
11
13
  case 's':
12
14
  return 16;
13
15
  case 'm':
14
- return isMobile ? 20 : 24;
16
+ return isMobile ? 22 : 24;
15
17
  case 'l':
16
- return isMobile ? 20 : 24;
18
+ return isMobile ? 26 : 38;
17
19
  default:
18
20
  return 20;
19
21
  }
@@ -38,7 +38,7 @@ export declare enum MediaVideoControlsType {
38
38
  Custom = "custom"
39
39
  }
40
40
  export type TextTheme = 'light' | 'dark';
41
- export type TextSize = 's' | 'm' | 'l';
41
+ export type TextSize = 'xs' | 's' | 'm' | 'l';
42
42
  export type DividerSize = '0' | 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl' | 'xxxl';
43
43
  export type HeaderWidth = 's' | 'm' | 'l';
44
44
  export type HeaderImageSize = 's' | 'm';
@@ -130,20 +130,22 @@ export interface FileLinkProps extends ClassNameProps {
130
130
  theme?: ContentTheme;
131
131
  onClick?: () => void;
132
132
  }
133
+ export type ButtonTheme = ButtonView | 'github' | 'app-store' | 'google-play' | 'scale' | 'monochrome';
133
134
  export interface ButtonProps extends AnalyticsEventsBase {
134
135
  text: string;
135
136
  url: string;
136
137
  primary?: boolean;
137
138
  size?: ButtonSize;
138
- theme?: ButtonView | 'github' | 'app-store' | 'google-play' | 'scale' | 'monochrome';
139
+ theme?: ButtonTheme;
139
140
  img?: ButtonImageProps | string;
140
141
  metrikaGoals?: MetrikaGoal;
141
142
  pixelEvents?: ButtonPixel;
142
143
  target?: string;
143
144
  }
145
+ export type ButtonImagePosition = 'left' | 'right';
144
146
  export interface ButtonImageProps {
145
147
  url: string;
146
- position?: 'left' | 'right';
148
+ position?: ButtonImagePosition;
147
149
  alt?: string;
148
150
  }
149
151
  export interface PlayButtonProps extends ClassNameProps {
@@ -189,7 +191,6 @@ export interface MediaProps extends Animatable, Partial<MediaComponentDataLensPr
189
191
  export type Coordinate = number[];
190
192
  export interface MapBaseProps {
191
193
  zoom?: number;
192
- center?: Coordinate;
193
194
  }
194
195
  export interface GMapProps extends MapBaseProps {
195
196
  address: string;
@@ -197,7 +198,6 @@ export interface GMapProps extends MapBaseProps {
197
198
  export interface YMapProps extends MapBaseProps {
198
199
  markers: YMapMarker[];
199
200
  id: string;
200
- center: Coordinate;
201
201
  }
202
202
  export interface YMapMarker {
203
203
  address?: string;
@@ -7,6 +7,7 @@ import { ItemColumnName } from '../../constants';
7
7
  import { NavigationListItem } from '../NavigationListItem/NavigationListItem';
8
8
  import './Navigation.css';
9
9
  const b = block('navigation');
10
+ const EVENT_HANDLE_DELAY = 100;
10
11
  const Navigation = ({ className, onActiveItemChange, links, activeItemId, highlightActiveItem, }) => {
11
12
  const { asPath, pathname } = useContext(LocationContext);
12
13
  const itemRefs = useRef([]);
@@ -22,21 +23,21 @@ const Navigation = ({ className, onActiveItemChange, links, activeItemId, highli
22
23
  }
23
24
  }, []);
24
25
  useEffect(() => {
25
- const debouncedCalculateItemPositions = _.debounce(calculateItemPositions, 100);
26
- const calculateOnScroll = _.debounce(() => {
26
+ const debouncedCalculateItemPositions = _.debounce(calculateItemPositions, EVENT_HANDLE_DELAY);
27
+ const debouncedCalculateOnScroll = _.debounce(() => {
27
28
  const curLeftScroll = window.pageXOffset;
28
29
  if (curLeftScroll !== lastLeftScroll) {
29
30
  setLastLeftScroll(window.pageXOffset);
30
31
  calculateItemPositions();
31
32
  }
32
- }, 100);
33
+ }, EVENT_HANDLE_DELAY);
33
34
  calculateItemPositions();
34
35
  setLastLeftScroll(window.pageXOffset);
35
36
  window.addEventListener('resize', debouncedCalculateItemPositions);
36
- window.addEventListener('scroll', calculateOnScroll);
37
+ window.addEventListener('scroll', debouncedCalculateOnScroll);
37
38
  return () => {
38
- window.removeEventListener(`resize`, calculateItemPositions);
39
- window.removeEventListener('scroll', calculateOnScroll);
39
+ window.removeEventListener(`resize`, debouncedCalculateItemPositions);
40
+ window.removeEventListener('scroll', debouncedCalculateOnScroll);
40
41
  };
41
42
  }, [calculateItemPositions, itemRefs, lastLeftScroll]);
42
43
  useEffect(() => {
@@ -1168,12 +1168,6 @@ export declare const MapProps: {
1168
1168
  zoom: {
1169
1169
  type: string;
1170
1170
  };
1171
- center: {
1172
- type: string;
1173
- items: {
1174
- type: string;
1175
- };
1176
- };
1177
1171
  address: {
1178
1172
  type: string;
1179
1173
  };
@@ -489,10 +489,6 @@ export const MapProps = {
489
489
  zoom: {
490
490
  type: 'number',
491
491
  },
492
- center: {
493
- type: 'array',
494
- items: { type: 'number' },
495
- },
496
492
  address: {
497
493
  type: 'string',
498
494
  },
@@ -70,9 +70,10 @@ unpredictable css rules order in build */
70
70
  font-weight: var(--yc-text-accent-font-weight);
71
71
  font-weight: normal;
72
72
  }
73
- .pc-banner-card__button {
73
+ .pc-banner-card__button.pc-banner-card__button {
74
74
  margin-top: 28px;
75
75
  }
76
+
76
77
  .pc-banner-card__image {
77
78
  border-top-right-radius: var(--pc-border-radius);
78
79
  border-bottom-right-radius: var(--pc-border-radius);
@@ -31,6 +31,9 @@ unpredictable css rules order in build */
31
31
  margin-top: 0;
32
32
  margin-right: 12px;
33
33
  }
34
+ .pc-content__button.pc-content__button:last-child {
35
+ margin-right: 0;
36
+ }
34
37
 
35
38
  .pc-content__links {
36
39
  display: flex;
@@ -41,6 +44,9 @@ unpredictable css rules order in build */
41
44
  display: block;
42
45
  margin-right: 32px;
43
46
  }
47
+ .pc-content__link:last-child {
48
+ margin-right: 0;
49
+ }
44
50
  .pc-content_centered.pc-content_centered {
45
51
  margin: 0 auto;
46
52
  text-align: center;
@@ -268,6 +268,7 @@ unpredictable css rules order in build */
268
268
  .pc-hubspot-form .hs-button.primary {
269
269
  margin: 0;
270
270
  padding: 0;
271
+ font-family: var(--yc-text-body-font-family);
271
272
  font-size: inherit;
272
273
  font-weight: 400;
273
274
  color: inherit;
@@ -1,6 +1,6 @@
1
1
  import { ConstructorBlock } from '../models/constructor';
2
2
  import { TextSize, CustomConfig, PCShareSocialNetwork } from '../models';
3
- export declare function getHeaderTag(size: TextSize): "h1" | "h2" | "h4";
3
+ export declare function getHeaderTag(size: TextSize): "h1" | "h2" | "h4" | "h5";
4
4
  export declare function getBlockKey(block: ConstructorBlock, index: number): string;
5
5
  export declare const getCustomBlockTypes: ({ blocks, headers }?: CustomConfig) => string[];
6
6
  export declare const getCustomItems: ({ blocks, headers, subBlocks }?: CustomConfig) => {
@@ -5,6 +5,8 @@ export function getHeaderTag(size) {
5
5
  return 'h1';
6
6
  case 's':
7
7
  return 'h4';
8
+ case 'xs':
9
+ return 'h5';
8
10
  case 'm':
9
11
  default:
10
12
  return 'h2';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gravity-ui/page-constructor",
3
- "version": "1.26.0",
3
+ "version": "1.26.2-alpha.0",
4
4
  "description": "Gravity UI Page Constructor",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -61,8 +61,8 @@
61
61
  "uuid": "^9.0.0"
62
62
  },
63
63
  "peerDependencies": {
64
- "react": "^16.0.0 || ^17.0.0",
65
- "@gravity-ui/uikit": "^3.11.0",
64
+ "react": "^16.0.0 || ^17.0.0 || ^18.0.0",
65
+ "@gravity-ui/uikit": "^4.1.0",
66
66
  "@doc-tools/transform": "^2.6.1"
67
67
  },
68
68
  "devDependencies": {
@@ -73,19 +73,20 @@
73
73
  "@gravity-ui/prettier-config": "^1.0.1",
74
74
  "@gravity-ui/stylelint-config": "^1.0.0",
75
75
  "@gravity-ui/tsconfig": "^1.0.0",
76
- "@gravity-ui/uikit": "^3.11.0",
76
+ "@gravity-ui/uikit": "^4.1.0",
77
77
  "@storybook/addon-actions": "^6.3.12",
78
78
  "@storybook/addon-essentials": "^6.5.10",
79
79
  "@storybook/addon-knobs": "^6.3.1",
80
80
  "@storybook/addon-viewport": "^6.3.12",
81
81
  "@storybook/preset-scss": "^1.0.3",
82
- "@storybook/react": "^6.5.10",
82
+ "@storybook/react": "^6.5.16",
83
83
  "@testing-library/jest-dom": "^5.16.5",
84
84
  "@testing-library/react": "^13.4.0",
85
85
  "@testing-library/user-event": "^14.4.3",
86
86
  "@types/jest": "^29.2.4",
87
87
  "@types/lodash": "^4.14.176",
88
- "@types/react": "^16.14.20",
88
+ "@types/react": "^18.0.27",
89
+ "@types/react-dom": "^18.0.10",
89
90
  "@types/react-slick": "^0.23.7",
90
91
  "@types/react-transition-group": "^4.4.4",
91
92
  "@types/sanitize-html": "^2.6.0",
@@ -38,7 +38,7 @@ export declare enum MediaVideoControlsType {
38
38
  Custom = "custom"
39
39
  }
40
40
  export type TextTheme = 'light' | 'dark';
41
- export type TextSize = 's' | 'm' | 'l';
41
+ export type TextSize = 'xs' | 's' | 'm' | 'l';
42
42
  export type DividerSize = '0' | 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl' | 'xxxl';
43
43
  export type HeaderWidth = 's' | 'm' | 'l';
44
44
  export type HeaderImageSize = 's' | 'm';
@@ -130,20 +130,22 @@ export interface FileLinkProps extends ClassNameProps {
130
130
  theme?: ContentTheme;
131
131
  onClick?: () => void;
132
132
  }
133
+ export type ButtonTheme = ButtonView | 'github' | 'app-store' | 'google-play' | 'scale' | 'monochrome';
133
134
  export interface ButtonProps extends AnalyticsEventsBase {
134
135
  text: string;
135
136
  url: string;
136
137
  primary?: boolean;
137
138
  size?: ButtonSize;
138
- theme?: ButtonView | 'github' | 'app-store' | 'google-play' | 'scale' | 'monochrome';
139
+ theme?: ButtonTheme;
139
140
  img?: ButtonImageProps | string;
140
141
  metrikaGoals?: MetrikaGoal;
141
142
  pixelEvents?: ButtonPixel;
142
143
  target?: string;
143
144
  }
145
+ export type ButtonImagePosition = 'left' | 'right';
144
146
  export interface ButtonImageProps {
145
147
  url: string;
146
- position?: 'left' | 'right';
148
+ position?: ButtonImagePosition;
147
149
  alt?: string;
148
150
  }
149
151
  export interface PlayButtonProps extends ClassNameProps {
@@ -189,7 +191,6 @@ export interface MediaProps extends Animatable, Partial<MediaComponentDataLensPr
189
191
  export type Coordinate = number[];
190
192
  export interface MapBaseProps {
191
193
  zoom?: number;
192
- center?: Coordinate;
193
194
  }
194
195
  export interface GMapProps extends MapBaseProps {
195
196
  address: string;
@@ -197,7 +198,6 @@ export interface GMapProps extends MapBaseProps {
197
198
  export interface YMapProps extends MapBaseProps {
198
199
  markers: YMapMarker[];
199
200
  id: string;
200
- center: Coordinate;
201
201
  }
202
202
  export interface YMapMarker {
203
203
  address?: string;
@@ -1,6 +1,6 @@
1
1
  import { ConstructorBlock } from '../models/constructor';
2
2
  import { TextSize, CustomConfig, PCShareSocialNetwork } from '../models';
3
- export declare function getHeaderTag(size: TextSize): "h1" | "h2" | "h4";
3
+ export declare function getHeaderTag(size: TextSize): "h1" | "h2" | "h4" | "h5";
4
4
  export declare function getBlockKey(block: ConstructorBlock, index: number): string;
5
5
  export declare const getCustomBlockTypes: ({ blocks, headers }?: CustomConfig) => string[];
6
6
  export declare const getCustomItems: ({ blocks, headers, subBlocks }?: CustomConfig) => {
@@ -8,6 +8,8 @@ function getHeaderTag(size) {
8
8
  return 'h1';
9
9
  case 's':
10
10
  return 'h4';
11
+ case 'xs':
12
+ return 'h5';
11
13
  case 'm':
12
14
  default:
13
15
  return 'h2';
@@ -141,15 +141,17 @@
141
141
  }
142
142
 
143
143
  @mixin label($size: m) {
144
- @include text-size(body-1);
144
+ @if $size == m {
145
+ @include text-size(body-1);
145
146
 
146
- $label-height: 20px;
147
+ $label-height: 20px;
147
148
 
148
- display: inline-block;
149
- padding: 0 8px;
150
- border-radius: 2px;
151
- height: $label-height;
152
- line-height: $label-height;
149
+ display: inline-block;
150
+ padding: 0 8px;
151
+ border-radius: 2px;
152
+ height: $label-height;
153
+ line-height: $label-height;
154
+ }
153
155
 
154
156
  @if $size == s {
155
157
  @include text-size(caption-2);