@gravity-ui/page-constructor 4.23.0-alpha.0 → 4.23.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/ContentLayout/ContentLayout.css +0 -3
- package/build/cjs/blocks/ContentLayout/ContentLayout.js +1 -1
- package/build/cjs/blocks/Header/schema.d.ts +105 -5
- package/build/cjs/blocks/HeaderSlider/schema.d.ts +42 -2
- package/build/cjs/blocks/Icons/Icons.css +0 -10
- package/build/cjs/blocks/Media/schema.d.ts +42 -2
- package/build/cjs/blocks/PromoFeaturesBlock/schema.d.ts +21 -1
- package/build/cjs/blocks/Questions/QuestionBlockItem/QuestionBlockItem.css +0 -15
- package/build/cjs/blocks/Slider/Arrow/Arrow.css +0 -7
- package/build/cjs/blocks/Slider/Slider.js +6 -12
- package/build/cjs/blocks/Table/schema.d.ts +3 -0
- package/build/cjs/blocks/Table/schema.js +2 -0
- package/build/cjs/blocks/Tabs/schema.d.ts +21 -1
- package/build/cjs/components/Button/Button.css +0 -6
- package/build/cjs/components/ButtonTabs/ButtonTabs.css +0 -3
- package/build/cjs/components/ButtonTabs/ButtonTabs.js +1 -1
- package/build/cjs/components/CardBase/CardBase.d.ts +2 -1
- package/build/cjs/components/CardBase/CardBase.js +3 -7
- package/build/cjs/components/Control/Control.css +0 -8
- package/build/cjs/components/FileLink/FileLink.css +0 -8
- package/build/cjs/components/FullscreenImage/FullscreenImage.css +0 -16
- package/build/cjs/components/FullscreenImage/FullscreenImage.js +2 -2
- package/build/cjs/components/FullscreenMedia/FullscreenMedia.css +1 -1
- package/build/cjs/components/FullscreenMedia/FullscreenMedia.js +3 -10
- package/build/cjs/components/Link/Link.css +0 -8
- package/build/cjs/components/Media/Image/Image.js +1 -1
- package/build/cjs/components/OverflowScroller/OverflowScroller.css +0 -19
- package/build/cjs/components/OverflowScroller/OverflowScroller.js +1 -2
- package/build/cjs/components/ReactPlayer/CustomBarControls.css +4 -6
- package/build/cjs/components/ReactPlayer/ReactPlayer.css +0 -7
- package/build/cjs/components/ReactPlayer/ReactPlayer.js +1 -1
- package/build/cjs/components/Title/TitleItem.css +0 -8
- package/build/cjs/components/VideoBlock/VideoBlock.css +0 -7
- package/build/cjs/containers/PageConstructor/PageConstructor.css +0 -9
- package/build/cjs/schema/constants.d.ts +21 -1
- package/build/cjs/schema/validators/common.d.ts +84 -5
- package/build/cjs/schema/validators/common.js +32 -2
- package/build/cjs/sub-blocks/BannerCard/BannerCard.css +0 -3
- package/build/cjs/sub-blocks/Content/Content.css +0 -3
- package/build/cjs/sub-blocks/HubspotForm/HubspotForm.css +0 -7
- package/build/cjs/sub-blocks/LayoutItem/schema.d.ts +21 -1
- package/build/cjs/sub-blocks/MediaCard/schema.d.ts +21 -1
- package/build/cjs/sub-blocks/PriceDetailed/PriceDetails/PriceDetails.css +2 -20
- package/build/cjs/sub-blocks/PriceDetailed/PriceDetails/PriceDetails.js +1 -1
- package/build/esm/blocks/ContentLayout/ContentLayout.css +0 -3
- package/build/esm/blocks/ContentLayout/ContentLayout.js +1 -1
- package/build/esm/blocks/Header/schema.d.ts +105 -5
- package/build/esm/blocks/HeaderSlider/schema.d.ts +42 -2
- package/build/esm/blocks/Icons/Icons.css +0 -10
- package/build/esm/blocks/Media/schema.d.ts +42 -2
- package/build/esm/blocks/PromoFeaturesBlock/schema.d.ts +21 -1
- package/build/esm/blocks/Questions/QuestionBlockItem/QuestionBlockItem.css +0 -15
- package/build/esm/blocks/Slider/Arrow/Arrow.css +0 -7
- package/build/esm/blocks/Slider/Slider.js +6 -12
- package/build/esm/blocks/Table/schema.d.ts +3 -0
- package/build/esm/blocks/Table/schema.js +2 -0
- package/build/esm/blocks/Tabs/schema.d.ts +21 -1
- package/build/esm/components/Button/Button.css +0 -6
- package/build/esm/components/ButtonTabs/ButtonTabs.css +0 -3
- package/build/esm/components/ButtonTabs/ButtonTabs.js +1 -1
- package/build/esm/components/CardBase/CardBase.d.ts +2 -1
- package/build/esm/components/CardBase/CardBase.js +2 -6
- package/build/esm/components/Control/Control.css +0 -8
- package/build/esm/components/FileLink/FileLink.css +0 -8
- package/build/esm/components/FullscreenImage/FullscreenImage.css +0 -16
- package/build/esm/components/FullscreenImage/FullscreenImage.js +2 -2
- package/build/esm/components/FullscreenMedia/FullscreenMedia.css +1 -1
- package/build/esm/components/FullscreenMedia/FullscreenMedia.js +5 -12
- package/build/esm/components/Link/Link.css +0 -8
- package/build/esm/components/Media/Image/Image.js +2 -2
- package/build/esm/components/OverflowScroller/OverflowScroller.css +0 -19
- package/build/esm/components/OverflowScroller/OverflowScroller.js +1 -2
- package/build/esm/components/ReactPlayer/CustomBarControls.css +4 -6
- package/build/esm/components/ReactPlayer/ReactPlayer.css +0 -7
- package/build/esm/components/ReactPlayer/ReactPlayer.js +1 -1
- package/build/esm/components/Title/TitleItem.css +0 -8
- package/build/esm/components/VideoBlock/VideoBlock.css +0 -7
- package/build/esm/containers/PageConstructor/PageConstructor.css +0 -9
- package/build/esm/schema/constants.d.ts +21 -1
- package/build/esm/schema/validators/common.d.ts +84 -5
- package/build/esm/schema/validators/common.js +32 -2
- package/build/esm/sub-blocks/BannerCard/BannerCard.css +0 -3
- package/build/esm/sub-blocks/Content/Content.css +0 -3
- package/build/esm/sub-blocks/HubspotForm/HubspotForm.css +0 -7
- package/build/esm/sub-blocks/LayoutItem/schema.d.ts +21 -1
- package/build/esm/sub-blocks/MediaCard/schema.d.ts +21 -1
- package/build/esm/sub-blocks/PriceDetailed/PriceDetails/PriceDetails.css +2 -20
- package/build/esm/sub-blocks/PriceDetailed/PriceDetails/PriceDetails.js +1 -1
- package/package.json +3 -3
- package/styles/mixins.scss +57 -20
- package/styles/root.scss +0 -2
- package/styles/styles.css +0 -7
- package/styles/yfm.scss +0 -2
- package/widget/index.js +1 -1
- package/build/cjs/components/OverflowScroller/i18n/en.json +0 -4
- package/build/cjs/components/OverflowScroller/i18n/index.d.ts +0 -2
- package/build/cjs/components/OverflowScroller/i18n/index.js +0 -8
- package/build/cjs/components/OverflowScroller/i18n/ru.json +0 -4
- package/build/esm/components/OverflowScroller/i18n/en.json +0 -4
- package/build/esm/components/OverflowScroller/i18n/index.d.ts +0 -2
- package/build/esm/components/OverflowScroller/i18n/index.js +0 -5
- package/build/esm/components/OverflowScroller/i18n/ru.json +0 -4
|
@@ -49,9 +49,6 @@ unpredictable css rules order in build */
|
|
|
49
49
|
.pc-content-layout-block_background {
|
|
50
50
|
padding: 64px;
|
|
51
51
|
}
|
|
52
|
-
.pc-content-layout-block_theme_dark {
|
|
53
|
-
--g-color-line-focus: var(--g-color-text-light-primary);
|
|
54
|
-
}
|
|
55
52
|
@media (max-width: 577px) {
|
|
56
53
|
.pc-content-layout-block_background {
|
|
57
54
|
padding: 32px;
|
|
@@ -33,7 +33,7 @@ const ContentLayoutBlock = (props) => {
|
|
|
33
33
|
const isMobile = (0, react_1.useContext)(mobileContext_1.MobileContext);
|
|
34
34
|
const { textContent, fileContent, size = 'l', background, centered, theme = 'default', textWidth = 'm', } = props;
|
|
35
35
|
const colSizes = (0, react_1.useMemo)(() => getTextWidth(textWidth), [textWidth]);
|
|
36
|
-
return (react_1.default.createElement("div", { className: b({ size,
|
|
36
|
+
return (react_1.default.createElement("div", { className: b({ size, background: Boolean(background) }) },
|
|
37
37
|
react_1.default.createElement(sub_blocks_1.Content, Object.assign({ className: b('content') }, textContent, { size: size, centered: centered, colSizes: colSizes, theme: theme })),
|
|
38
38
|
fileContent && (react_1.default.createElement(grid_1.Col, { className: b('files', { size, centered }), reset: true, sizes: colSizes }, fileContent.map((file) => (react_1.default.createElement(components_1.FileLink, Object.assign({ className: b('file') }, file, { key: file.href, type: "horizontal", textSize: getFileTextSize(size), theme: theme })))))),
|
|
39
39
|
background && (react_1.default.createElement("div", { className: b('background') },
|
|
@@ -111,7 +111,27 @@ export declare const HeaderBackgroundProps: {
|
|
|
111
111
|
};
|
|
112
112
|
controls: {
|
|
113
113
|
type: string;
|
|
114
|
-
enum:
|
|
114
|
+
enum: import("../..").MediaVideoControlsType[];
|
|
115
|
+
};
|
|
116
|
+
customControlsOptions: {
|
|
117
|
+
type: string;
|
|
118
|
+
additionalProperties: boolean;
|
|
119
|
+
properties: {
|
|
120
|
+
type: {
|
|
121
|
+
type: string;
|
|
122
|
+
enum: import("../..").CustomControlsType[];
|
|
123
|
+
};
|
|
124
|
+
muteButtonShown: {
|
|
125
|
+
type: string;
|
|
126
|
+
};
|
|
127
|
+
positioning: {
|
|
128
|
+
type: string;
|
|
129
|
+
enum: import("../..").CustomControlsButtonPositioning[];
|
|
130
|
+
};
|
|
131
|
+
};
|
|
132
|
+
};
|
|
133
|
+
ariaLabel: {
|
|
134
|
+
type: string;
|
|
115
135
|
};
|
|
116
136
|
};
|
|
117
137
|
};
|
|
@@ -351,7 +371,27 @@ export declare const HeaderProperties: {
|
|
|
351
371
|
};
|
|
352
372
|
controls: {
|
|
353
373
|
type: string;
|
|
354
|
-
enum:
|
|
374
|
+
enum: import("../..").MediaVideoControlsType[];
|
|
375
|
+
};
|
|
376
|
+
customControlsOptions: {
|
|
377
|
+
type: string;
|
|
378
|
+
additionalProperties: boolean;
|
|
379
|
+
properties: {
|
|
380
|
+
type: {
|
|
381
|
+
type: string;
|
|
382
|
+
enum: import("../..").CustomControlsType[];
|
|
383
|
+
};
|
|
384
|
+
muteButtonShown: {
|
|
385
|
+
type: string;
|
|
386
|
+
};
|
|
387
|
+
positioning: {
|
|
388
|
+
type: string;
|
|
389
|
+
enum: import("../..").CustomControlsButtonPositioning[];
|
|
390
|
+
};
|
|
391
|
+
};
|
|
392
|
+
};
|
|
393
|
+
ariaLabel: {
|
|
394
|
+
type: string;
|
|
355
395
|
};
|
|
356
396
|
};
|
|
357
397
|
} & {
|
|
@@ -499,7 +539,27 @@ export declare const HeaderProperties: {
|
|
|
499
539
|
};
|
|
500
540
|
controls: {
|
|
501
541
|
type: string;
|
|
502
|
-
enum:
|
|
542
|
+
enum: import("../..").MediaVideoControlsType[];
|
|
543
|
+
};
|
|
544
|
+
customControlsOptions: {
|
|
545
|
+
type: string;
|
|
546
|
+
additionalProperties: boolean;
|
|
547
|
+
properties: {
|
|
548
|
+
type: {
|
|
549
|
+
type: string;
|
|
550
|
+
enum: import("../..").CustomControlsType[];
|
|
551
|
+
};
|
|
552
|
+
muteButtonShown: {
|
|
553
|
+
type: string;
|
|
554
|
+
};
|
|
555
|
+
positioning: {
|
|
556
|
+
type: string;
|
|
557
|
+
enum: import("../..").CustomControlsButtonPositioning[];
|
|
558
|
+
};
|
|
559
|
+
};
|
|
560
|
+
};
|
|
561
|
+
ariaLabel: {
|
|
562
|
+
type: string;
|
|
503
563
|
};
|
|
504
564
|
};
|
|
505
565
|
};
|
|
@@ -788,7 +848,27 @@ export declare const HeaderBlock: {
|
|
|
788
848
|
};
|
|
789
849
|
controls: {
|
|
790
850
|
type: string;
|
|
791
|
-
enum:
|
|
851
|
+
enum: import("../..").MediaVideoControlsType[];
|
|
852
|
+
};
|
|
853
|
+
customControlsOptions: {
|
|
854
|
+
type: string;
|
|
855
|
+
additionalProperties: boolean;
|
|
856
|
+
properties: {
|
|
857
|
+
type: {
|
|
858
|
+
type: string;
|
|
859
|
+
enum: import("../..").CustomControlsType[];
|
|
860
|
+
};
|
|
861
|
+
muteButtonShown: {
|
|
862
|
+
type: string;
|
|
863
|
+
};
|
|
864
|
+
positioning: {
|
|
865
|
+
type: string;
|
|
866
|
+
enum: import("../..").CustomControlsButtonPositioning[];
|
|
867
|
+
};
|
|
868
|
+
};
|
|
869
|
+
};
|
|
870
|
+
ariaLabel: {
|
|
871
|
+
type: string;
|
|
792
872
|
};
|
|
793
873
|
};
|
|
794
874
|
} & {
|
|
@@ -936,7 +1016,27 @@ export declare const HeaderBlock: {
|
|
|
936
1016
|
};
|
|
937
1017
|
controls: {
|
|
938
1018
|
type: string;
|
|
939
|
-
enum:
|
|
1019
|
+
enum: import("../..").MediaVideoControlsType[];
|
|
1020
|
+
};
|
|
1021
|
+
customControlsOptions: {
|
|
1022
|
+
type: string;
|
|
1023
|
+
additionalProperties: boolean;
|
|
1024
|
+
properties: {
|
|
1025
|
+
type: {
|
|
1026
|
+
type: string;
|
|
1027
|
+
enum: import("../..").CustomControlsType[];
|
|
1028
|
+
};
|
|
1029
|
+
muteButtonShown: {
|
|
1030
|
+
type: string;
|
|
1031
|
+
};
|
|
1032
|
+
positioning: {
|
|
1033
|
+
type: string;
|
|
1034
|
+
enum: import("../..").CustomControlsButtonPositioning[];
|
|
1035
|
+
};
|
|
1036
|
+
};
|
|
1037
|
+
};
|
|
1038
|
+
ariaLabel: {
|
|
1039
|
+
type: string;
|
|
940
1040
|
};
|
|
941
1041
|
};
|
|
942
1042
|
};
|
|
@@ -130,7 +130,27 @@ export declare const HeaderSliderBlock: {
|
|
|
130
130
|
};
|
|
131
131
|
controls: {
|
|
132
132
|
type: string;
|
|
133
|
-
enum:
|
|
133
|
+
enum: import("../..").MediaVideoControlsType[];
|
|
134
|
+
};
|
|
135
|
+
customControlsOptions: {
|
|
136
|
+
type: string;
|
|
137
|
+
additionalProperties: boolean;
|
|
138
|
+
properties: {
|
|
139
|
+
type: {
|
|
140
|
+
type: string;
|
|
141
|
+
enum: import("../..").CustomControlsType[];
|
|
142
|
+
};
|
|
143
|
+
muteButtonShown: {
|
|
144
|
+
type: string;
|
|
145
|
+
};
|
|
146
|
+
positioning: {
|
|
147
|
+
type: string;
|
|
148
|
+
enum: import("../..").CustomControlsButtonPositioning[];
|
|
149
|
+
};
|
|
150
|
+
};
|
|
151
|
+
};
|
|
152
|
+
ariaLabel: {
|
|
153
|
+
type: string;
|
|
134
154
|
};
|
|
135
155
|
};
|
|
136
156
|
} & {
|
|
@@ -278,7 +298,27 @@ export declare const HeaderSliderBlock: {
|
|
|
278
298
|
};
|
|
279
299
|
controls: {
|
|
280
300
|
type: string;
|
|
281
|
-
enum:
|
|
301
|
+
enum: import("../..").MediaVideoControlsType[];
|
|
302
|
+
};
|
|
303
|
+
customControlsOptions: {
|
|
304
|
+
type: string;
|
|
305
|
+
additionalProperties: boolean;
|
|
306
|
+
properties: {
|
|
307
|
+
type: {
|
|
308
|
+
type: string;
|
|
309
|
+
enum: import("../..").CustomControlsType[];
|
|
310
|
+
};
|
|
311
|
+
muteButtonShown: {
|
|
312
|
+
type: string;
|
|
313
|
+
};
|
|
314
|
+
positioning: {
|
|
315
|
+
type: string;
|
|
316
|
+
enum: import("../..").CustomControlsButtonPositioning[];
|
|
317
|
+
};
|
|
318
|
+
};
|
|
319
|
+
};
|
|
320
|
+
ariaLabel: {
|
|
321
|
+
type: string;
|
|
282
322
|
};
|
|
283
323
|
};
|
|
284
324
|
};
|
|
@@ -30,16 +30,6 @@ unpredictable css rules order in build */
|
|
|
30
30
|
text-decoration: none;
|
|
31
31
|
margin: 0 8px 24px;
|
|
32
32
|
}
|
|
33
|
-
.pc-icons-block a.pc-icons-block__item {
|
|
34
|
-
border-radius: var(--g-focus-border-radius);
|
|
35
|
-
}
|
|
36
|
-
.pc-icons-block a.pc-icons-block__item:focus {
|
|
37
|
-
outline: 2px solid var(--g-color-line-focus);
|
|
38
|
-
outline-offset: 0;
|
|
39
|
-
}
|
|
40
|
-
.pc-icons-block a.pc-icons-block__item:focus:not(:focus-visible) {
|
|
41
|
-
outline: 0;
|
|
42
|
-
}
|
|
43
33
|
.pc-icons-block__image {
|
|
44
34
|
max-width: 100%;
|
|
45
35
|
margin: 0 auto;
|
|
@@ -105,7 +105,27 @@ export declare const Media: {
|
|
|
105
105
|
};
|
|
106
106
|
controls: {
|
|
107
107
|
type: string;
|
|
108
|
-
enum:
|
|
108
|
+
enum: import("../..").MediaVideoControlsType[];
|
|
109
|
+
};
|
|
110
|
+
customControlsOptions: {
|
|
111
|
+
type: string;
|
|
112
|
+
additionalProperties: boolean;
|
|
113
|
+
properties: {
|
|
114
|
+
type: {
|
|
115
|
+
type: string;
|
|
116
|
+
enum: import("../..").CustomControlsType[];
|
|
117
|
+
};
|
|
118
|
+
muteButtonShown: {
|
|
119
|
+
type: string;
|
|
120
|
+
};
|
|
121
|
+
positioning: {
|
|
122
|
+
type: string;
|
|
123
|
+
enum: import("../..").CustomControlsButtonPositioning[];
|
|
124
|
+
};
|
|
125
|
+
};
|
|
126
|
+
};
|
|
127
|
+
ariaLabel: {
|
|
128
|
+
type: string;
|
|
109
129
|
};
|
|
110
130
|
};
|
|
111
131
|
};
|
|
@@ -698,7 +718,27 @@ export declare const MediaBlock: {
|
|
|
698
718
|
};
|
|
699
719
|
controls: {
|
|
700
720
|
type: string;
|
|
701
|
-
enum:
|
|
721
|
+
enum: import("../..").MediaVideoControlsType[];
|
|
722
|
+
};
|
|
723
|
+
customControlsOptions: {
|
|
724
|
+
type: string;
|
|
725
|
+
additionalProperties: boolean;
|
|
726
|
+
properties: {
|
|
727
|
+
type: {
|
|
728
|
+
type: string;
|
|
729
|
+
enum: import("../..").CustomControlsType[];
|
|
730
|
+
};
|
|
731
|
+
muteButtonShown: {
|
|
732
|
+
type: string;
|
|
733
|
+
};
|
|
734
|
+
positioning: {
|
|
735
|
+
type: string;
|
|
736
|
+
enum: import("../..").CustomControlsButtonPositioning[];
|
|
737
|
+
};
|
|
738
|
+
};
|
|
739
|
+
};
|
|
740
|
+
ariaLabel: {
|
|
741
|
+
type: string;
|
|
702
742
|
};
|
|
703
743
|
};
|
|
704
744
|
};
|
|
@@ -121,7 +121,27 @@ export declare const PromoFeaturesItem: {
|
|
|
121
121
|
};
|
|
122
122
|
controls: {
|
|
123
123
|
type: string;
|
|
124
|
-
enum:
|
|
124
|
+
enum: import("../..").MediaVideoControlsType[];
|
|
125
|
+
};
|
|
126
|
+
customControlsOptions: {
|
|
127
|
+
type: string;
|
|
128
|
+
additionalProperties: boolean;
|
|
129
|
+
properties: {
|
|
130
|
+
type: {
|
|
131
|
+
type: string;
|
|
132
|
+
enum: import("../..").CustomControlsType[];
|
|
133
|
+
};
|
|
134
|
+
muteButtonShown: {
|
|
135
|
+
type: string;
|
|
136
|
+
};
|
|
137
|
+
positioning: {
|
|
138
|
+
type: string;
|
|
139
|
+
enum: import("../..").CustomControlsButtonPositioning[];
|
|
140
|
+
};
|
|
141
|
+
};
|
|
142
|
+
};
|
|
143
|
+
ariaLabel: {
|
|
144
|
+
type: string;
|
|
125
145
|
};
|
|
126
146
|
};
|
|
127
147
|
};
|
|
@@ -19,14 +19,6 @@ unpredictable css rules order in build */
|
|
|
19
19
|
position: relative;
|
|
20
20
|
padding-right: 24px;
|
|
21
21
|
cursor: pointer;
|
|
22
|
-
border-radius: var(--g-focus-border-radius);
|
|
23
|
-
}
|
|
24
|
-
.pc-QuestionsBlockItem__title:focus {
|
|
25
|
-
outline: 2px solid var(--g-color-line-focus);
|
|
26
|
-
outline-offset: 0;
|
|
27
|
-
}
|
|
28
|
-
.pc-QuestionsBlockItem__title:focus:not(:focus-visible) {
|
|
29
|
-
outline: 0;
|
|
30
22
|
}
|
|
31
23
|
.pc-QuestionsBlockItem__title a {
|
|
32
24
|
outline: none;
|
|
@@ -45,19 +37,12 @@ unpredictable css rules order in build */
|
|
|
45
37
|
position: absolute;
|
|
46
38
|
right: 0;
|
|
47
39
|
top: 0;
|
|
48
|
-
bottom: 0;
|
|
49
|
-
margin: auto;
|
|
50
40
|
color: var(--g-color-text-primary);
|
|
51
41
|
}
|
|
52
42
|
.pc-QuestionsBlockItem__link {
|
|
53
43
|
font-size: var(--g-text-body-2-font-size);
|
|
54
44
|
line-height: var(--g-text-body-2-line-height);
|
|
55
45
|
}
|
|
56
|
-
.pc-QuestionsBlockItem__link.pc-QuestionsBlockItem__link a {
|
|
57
|
-
outline-offset: -2px;
|
|
58
|
-
border-radius: calc(var(--g-focus-border-radius) + 2px);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
46
|
.pc-QuestionsBlockItem__text {
|
|
62
47
|
font-size: var(--g-text-body-2-font-size);
|
|
63
48
|
line-height: var(--g-text-body-2-line-height);
|
|
@@ -49,13 +49,6 @@ unpredictable css rules order in build */
|
|
|
49
49
|
box-shadow: 0 4px 24px var(--pc-color-sfx-shadow), 0 2px 8px var(--pc-color-sfx-shadow);
|
|
50
50
|
transition: box-shadow 0.3s cubic-bezier(0.22, 0.61, 0.36, 1), color 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
|
|
51
51
|
}
|
|
52
|
-
.pc-slider-block-arrow__button:focus {
|
|
53
|
-
outline: 2px solid var(--g-color-line-focus);
|
|
54
|
-
outline-offset: 0;
|
|
55
|
-
}
|
|
56
|
-
.pc-slider-block-arrow__button:focus:not(:focus-visible) {
|
|
57
|
-
outline: 0;
|
|
58
|
-
}
|
|
59
52
|
.pc-slider-block-arrow:hover .pc-slider-block-arrow__button {
|
|
60
53
|
color: var(--g-color-text-primary);
|
|
61
54
|
box-shadow: 0 2px 12px var(--pc-color-sfx-shadow), 0 4px 24px var(--pc-color-sfx-shadow);
|
|
@@ -136,12 +136,12 @@ const SliderBlock = (props) => {
|
|
|
136
136
|
const renderAccessibleBar = (index) => {
|
|
137
137
|
return (
|
|
138
138
|
// To have this key differ from keys used in renderDot function, added `-accessible-bar` part
|
|
139
|
-
react_1.default.createElement(react_1.Fragment, { key: `${index}-accessible-bar` }, slidesCountByBreakpoint >
|
|
139
|
+
react_1.default.createElement(react_1.Fragment, { key: `${index}-accessible-bar` }, slidesCountByBreakpoint > 1 && (react_1.default.createElement("li", { className: b('accessible-bar'), "aria-current": true, "aria-label": `Slide ${currentIndex + 1} of ${barSlidesCount}`, style: {
|
|
140
140
|
left: barPosition,
|
|
141
141
|
width: barWidth,
|
|
142
142
|
} }))));
|
|
143
143
|
};
|
|
144
|
-
const
|
|
144
|
+
const renderDot = (index) => {
|
|
145
145
|
const currentIndexDiff = index - currentIndex;
|
|
146
146
|
let currentSlideNumber;
|
|
147
147
|
if (0 <= currentIndexDiff && currentIndexDiff < slidesToShowCount) {
|
|
@@ -153,16 +153,10 @@ const SliderBlock = (props) => {
|
|
|
153
153
|
else {
|
|
154
154
|
currentSlideNumber = index + 1;
|
|
155
155
|
}
|
|
156
|
-
return
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
return (slidesCountByBreakpoint > 0 &&
|
|
161
|
-
0 <= currentIndexDiff &&
|
|
162
|
-
currentIndexDiff < slidesToShowCount);
|
|
163
|
-
};
|
|
164
|
-
const renderDot = (index) => {
|
|
165
|
-
return (react_1.default.createElement("li", { key: index, className: b('dot', { active: index === currentIndex }), onClick: () => handleDotClick(index), "aria-hidden": isVisibleSlide(index) ? true : undefined, "aria-label": `Slide ${getCurrentSlideNumber(index)} of ${barSlidesCount}` }));
|
|
156
|
+
return (react_1.default.createElement("li", { key: index, className: b('dot', { active: index === currentIndex }), onClick: () => handleDotClick(index), "aria-hidden": (slidesCountByBreakpoint > 1 &&
|
|
157
|
+
0 <= currentIndexDiff &&
|
|
158
|
+
currentIndexDiff < slidesToShowCount) ||
|
|
159
|
+
undefined, "aria-label": `Slide ${currentSlideNumber} of ${barSlidesCount}` }));
|
|
166
160
|
};
|
|
167
161
|
const renderNavigation = () => {
|
|
168
162
|
if (childrenCount <= slidesCountByBreakpoint || !dots || childrenCount === 1) {
|
|
@@ -116,7 +116,27 @@ export declare const tabsItem: {
|
|
|
116
116
|
};
|
|
117
117
|
controls: {
|
|
118
118
|
type: string;
|
|
119
|
-
enum:
|
|
119
|
+
enum: import("../..").MediaVideoControlsType[];
|
|
120
|
+
};
|
|
121
|
+
customControlsOptions: {
|
|
122
|
+
type: string;
|
|
123
|
+
additionalProperties: boolean;
|
|
124
|
+
properties: {
|
|
125
|
+
type: {
|
|
126
|
+
type: string;
|
|
127
|
+
enum: import("../..").CustomControlsType[];
|
|
128
|
+
};
|
|
129
|
+
muteButtonShown: {
|
|
130
|
+
type: string;
|
|
131
|
+
};
|
|
132
|
+
positioning: {
|
|
133
|
+
type: string;
|
|
134
|
+
enum: import("../..").CustomControlsButtonPositioning[];
|
|
135
|
+
};
|
|
136
|
+
};
|
|
137
|
+
};
|
|
138
|
+
ariaLabel: {
|
|
139
|
+
type: string;
|
|
120
140
|
};
|
|
121
141
|
};
|
|
122
142
|
};
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
/* use this for style redefinitions to awoid problems with
|
|
2
2
|
unpredictable css rules order in build */
|
|
3
|
-
.pc-button-block {
|
|
4
|
-
--yc-button-outline-color: var(--g-color-line-focus);
|
|
5
|
-
}
|
|
6
3
|
.pc-button-block__content {
|
|
7
4
|
display: flex;
|
|
8
5
|
align-items: center;
|
|
@@ -43,9 +40,6 @@ unpredictable css rules order in build */
|
|
|
43
40
|
color: var(--pc-monochrome-button-color);
|
|
44
41
|
}
|
|
45
42
|
|
|
46
|
-
.pc-button-block_theme_normal-contrast:focus::before, .pc-button-block_theme_raised:focus::before {
|
|
47
|
-
outline-offset: 1px;
|
|
48
|
-
}
|
|
49
43
|
.pc-button-block_size_s {
|
|
50
44
|
--btn-image-margin: 10px;
|
|
51
45
|
}
|
|
@@ -20,7 +20,7 @@ const ButtonTabs = ({ className, items, activeTab, onSelectTab, tabSize = 'l', q
|
|
|
20
20
|
return (react_1.default.createElement("div", { className: b(null, className), "data-qa": qa }, items.map(({ id, title }) => {
|
|
21
21
|
const isActive = id === activeTabId;
|
|
22
22
|
return (react_1.default.createElement(index_1.Button, { text: title, className: b('item', { active: isActive }), key: title, size: tabSize, onClick: handleClick(id), extraProps: {
|
|
23
|
-
'aria-current': isActive
|
|
23
|
+
'aria-current': isActive,
|
|
24
24
|
} }));
|
|
25
25
|
})));
|
|
26
26
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React, { HTMLAttributeAnchorTarget, ReactElement } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { ButtonPixel, CardBaseProps as CardBaseParams, ImageProps, MetrikaGoal, WithChildren } from '../../models';
|
|
3
|
+
import { AnalyticsEventsBase } from '../../models/common';
|
|
3
4
|
export interface CardBaseProps extends AnalyticsEventsBase, CardBaseParams {
|
|
4
5
|
className?: string;
|
|
5
6
|
bodyClassName?: string;
|
|
@@ -3,10 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.Layout = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const react_1 = tslib_1.__importStar(require("react"));
|
|
6
|
-
const uikit_1 = require("@gravity-ui/uikit");
|
|
7
6
|
const hooks_1 = require("../../hooks");
|
|
8
7
|
const useMetrika_1 = require("../../hooks/useMetrika");
|
|
9
|
-
const
|
|
8
|
+
const common_1 = require("../../models/common");
|
|
10
9
|
const utils_1 = require("../../utils");
|
|
11
10
|
const BackgroundImage_1 = tslib_1.__importDefault(require("../BackgroundImage/BackgroundImage"));
|
|
12
11
|
const RouterLink_1 = tslib_1.__importDefault(require("../RouterLink/RouterLink"));
|
|
@@ -17,7 +16,7 @@ const Footer = () => null;
|
|
|
17
16
|
const Layout = (props) => {
|
|
18
17
|
const { className, bodyClassName, metrikaGoals, pixelEvents, analyticsEvents, contentClassName, children, url, target, border = 'shadow', urlTitle, qa, } = props;
|
|
19
18
|
const handleMetrika = (0, useMetrika_1.useMetrika)();
|
|
20
|
-
const handleAnalytics = (0, hooks_1.useAnalytics)(
|
|
19
|
+
const handleAnalytics = (0, hooks_1.useAnalytics)(common_1.DefaultEventNames.CardBase, url);
|
|
21
20
|
let header, content, footer, image, headerClass, footerClass;
|
|
22
21
|
const qaAttributes = (0, utils_1.getQaAttrubutes)(qa, 'header', 'footer', 'body', 'content');
|
|
23
22
|
function handleChild(child) {
|
|
@@ -54,10 +53,7 @@ const Layout = (props) => {
|
|
|
54
53
|
handleAnalytics(analyticsEvents);
|
|
55
54
|
};
|
|
56
55
|
return url ? (react_1.default.createElement(RouterLink_1.default, { href: url },
|
|
57
|
-
react_1.default.createElement(
|
|
58
|
-
draggable: false,
|
|
59
|
-
onDragStart: (e) => e.preventDefault(),
|
|
60
|
-
}, qa: qa }, cardContent))) : (react_1.default.createElement("div", { className: fullClassName, "data-qa": qa }, cardContent));
|
|
56
|
+
react_1.default.createElement("a", { href: url, target: target, rel: target === '_blank' ? 'noopener noreferrer' : undefined, className: fullClassName, draggable: false, onDragStart: (e) => e.preventDefault(), onClick: onClick, title: urlTitle, "data-qa": qa }, cardContent))) : (react_1.default.createElement("div", { className: fullClassName, "data-qa": qa }, cardContent));
|
|
61
57
|
};
|
|
62
58
|
exports.Layout = Layout;
|
|
63
59
|
exports.Layout.Header = Header;
|
|
@@ -4,7 +4,6 @@ unpredictable css rules order in build */
|
|
|
4
4
|
display: flex;
|
|
5
5
|
justify-content: center;
|
|
6
6
|
align-items: center;
|
|
7
|
-
border-radius: var(--g-focus-border-radius);
|
|
8
7
|
transition: color 0.2s;
|
|
9
8
|
display: inline-block;
|
|
10
9
|
margin: 0;
|
|
@@ -26,13 +25,6 @@ unpredictable css rules order in build */
|
|
|
26
25
|
.utilityfocus .pc-control:focus {
|
|
27
26
|
outline: 2px solid #ffdb4d;
|
|
28
27
|
}
|
|
29
|
-
.pc-control:focus {
|
|
30
|
-
outline: 2px solid var(--g-color-line-focus);
|
|
31
|
-
outline-offset: 0;
|
|
32
|
-
}
|
|
33
|
-
.pc-control:focus:not(:focus-visible) {
|
|
34
|
-
outline: 0;
|
|
35
|
-
}
|
|
36
28
|
.pc-control_size_xs {
|
|
37
29
|
width: 24px;
|
|
38
30
|
height: 24px;
|
|
@@ -19,14 +19,6 @@ unpredictable css rules order in build */
|
|
|
19
19
|
}
|
|
20
20
|
.pc-file-link__link > a {
|
|
21
21
|
color: var(--g-color-text-primary);
|
|
22
|
-
border-radius: var(--g-focus-border-radius);
|
|
23
|
-
}
|
|
24
|
-
.pc-file-link__link > a:focus {
|
|
25
|
-
outline: 2px solid var(--g-color-line-focus);
|
|
26
|
-
outline-offset: 0;
|
|
27
|
-
}
|
|
28
|
-
.pc-file-link__link > a:focus:not(:focus-visible) {
|
|
29
|
-
outline: 0;
|
|
30
22
|
}
|
|
31
23
|
.pc-file-link__link > a:hover {
|
|
32
24
|
color: var(--g-color-text-secondary);
|
|
@@ -19,15 +19,6 @@ unpredictable css rules order in build */
|
|
|
19
19
|
border-radius: var(--pc-border-radius);
|
|
20
20
|
}
|
|
21
21
|
.pc-fullscreen-image__icon-wrapper {
|
|
22
|
-
display: inline-block;
|
|
23
|
-
margin: 0;
|
|
24
|
-
padding: 0;
|
|
25
|
-
font: inherit;
|
|
26
|
-
border: none;
|
|
27
|
-
outline: none;
|
|
28
|
-
color: inherit;
|
|
29
|
-
background: none;
|
|
30
|
-
cursor: pointer;
|
|
31
22
|
display: flex;
|
|
32
23
|
align-items: center;
|
|
33
24
|
justify-content: center;
|
|
@@ -42,13 +33,6 @@ unpredictable css rules order in build */
|
|
|
42
33
|
opacity: 0;
|
|
43
34
|
transition: 0.3s;
|
|
44
35
|
}
|
|
45
|
-
.pc-fullscreen-image__icon-wrapper:focus {
|
|
46
|
-
outline: 2px solid var(--g-color-line-focus);
|
|
47
|
-
outline-offset: 0;
|
|
48
|
-
}
|
|
49
|
-
.pc-fullscreen-image__icon-wrapper:focus:not(:focus-visible) {
|
|
50
|
-
outline: 0;
|
|
51
|
-
}
|
|
52
36
|
.pc-fullscreen-image__icon-wrapper_visible {
|
|
53
37
|
opacity: 1;
|
|
54
38
|
}
|
|
@@ -21,11 +21,11 @@ const FullscreenImage = (props) => {
|
|
|
21
21
|
return (react_1.default.createElement("div", { className: b() },
|
|
22
22
|
react_1.default.createElement("div", { className: b('image-wrapper'), onMouseEnter: showFullscreenIcon, onMouseLeave: hideFullscreenIcon },
|
|
23
23
|
react_1.default.createElement(Image_1.default, Object.assign({}, props, { alt: alt, className: b('image', imageClassName), onClick: openModal, style: imageStyle })),
|
|
24
|
-
react_1.default.createElement("
|
|
24
|
+
react_1.default.createElement("div", { className: b('icon-wrapper', { visible: isMouseEnter }), onClick: openModal },
|
|
25
25
|
react_1.default.createElement(uikit_1.Icon, { data: icons_1.Fullscreen, width: FULL_SCREEN_ICON_SIZE, height: FULL_SCREEN_ICON_SIZE, className: b('icon') }))),
|
|
26
26
|
isOpened && (react_1.default.createElement(uikit_1.Modal, { open: isOpened, onClose: closeModal, className: b('modal') },
|
|
27
27
|
react_1.default.createElement("div", { className: b('modal-content') },
|
|
28
|
-
react_1.default.createElement("
|
|
28
|
+
react_1.default.createElement("div", { className: b('icon-wrapper', { visible: true }), onClick: closeModal, "aria-label": (0, i18n_1.default)('close') },
|
|
29
29
|
react_1.default.createElement(uikit_1.Icon, { data: icons_1.PreviewClose, width: CLOSE_ICON_SIZE, height: CLOSE_ICON_SIZE, className: b('icon', { hover: true }) })),
|
|
30
30
|
react_1.default.createElement(Image_1.default, Object.assign({}, props, { className: b('modal-image', modalImageClass) })))))));
|
|
31
31
|
};
|
|
@@ -50,7 +50,7 @@ unpredictable css rules order in build */
|
|
|
50
50
|
transition: opacity 0.3s;
|
|
51
51
|
pointer-events: none;
|
|
52
52
|
}
|
|
53
|
-
.pc-full-screen-media__modal-content .pc-full-screen-media__icon-
|
|
53
|
+
.pc-full-screen-media__modal-content:hover .pc-full-screen-media__icon-wrapper, .pc-full-screen-media__media-wrapper:hover .pc-full-screen-media__icon-wrapper {
|
|
54
54
|
opacity: 1;
|
|
55
55
|
pointer-events: inherit;
|
|
56
56
|
}
|