@gravity-ui/page-constructor 4.24.0-alpha.0 → 4.25.0-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.
- 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 +9 -0
- package/build/cjs/blocks/HeaderSlider/schema.d.ts +3 -0
- package/build/cjs/blocks/Icons/Icons.css +0 -10
- package/build/cjs/blocks/Media/schema.d.ts +6 -0
- package/build/cjs/blocks/PromoFeaturesBlock/schema.d.ts +3 -0
- 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/Tabs/schema.d.ts +3 -0
- 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 +5 -6
- package/build/cjs/components/ReactPlayer/ReactPlayer.css +0 -7
- package/build/cjs/components/ReactPlayer/ReactPlayer.js +3 -2
- 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 +3 -0
- package/build/cjs/schema/validators/common.d.ts +3 -0
- package/build/cjs/schema/validators/common.js +3 -0
- 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 +3 -0
- package/build/cjs/sub-blocks/MediaCard/schema.d.ts +3 -0
- 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 +9 -0
- package/build/esm/blocks/HeaderSlider/schema.d.ts +3 -0
- package/build/esm/blocks/Icons/Icons.css +0 -10
- package/build/esm/blocks/Media/schema.d.ts +6 -0
- package/build/esm/blocks/PromoFeaturesBlock/schema.d.ts +3 -0
- 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/Tabs/schema.d.ts +3 -0
- 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 +5 -6
- package/build/esm/components/ReactPlayer/ReactPlayer.css +0 -7
- package/build/esm/components/ReactPlayer/ReactPlayer.js +3 -2
- 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 +3 -0
- package/build/esm/schema/validators/common.d.ts +3 -0
- package/build/esm/schema/validators/common.js +3 -0
- 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 +3 -0
- package/build/esm/sub-blocks/MediaCard/schema.d.ts +3 -0
- 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 +1 -1
- package/styles/mixins.scss +0 -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
|
@@ -41,14 +41,12 @@ unpredictable css rules order in build */
|
|
|
41
41
|
--pc-color-base-gold: #ffdb4d;
|
|
42
42
|
--pc-color-base-asphalt: #313538;
|
|
43
43
|
--pc-color-base-copper: #ffe6c4;
|
|
44
|
-
--g-color-line-focus: var(--g-color-text-brand);
|
|
45
44
|
}
|
|
46
45
|
.g-root_theme_dark {
|
|
47
46
|
--pc-color-base-silver: #bcc0c4;
|
|
48
47
|
--pc-color-base-gold: #ffde5d;
|
|
49
48
|
--pc-color-base-asphalt: #474d52;
|
|
50
49
|
--pc-color-base-copper: #7f7262;
|
|
51
|
-
--g-color-line-focus: var(--g-color-text-light-primary);
|
|
52
50
|
}
|
|
53
51
|
.g-root.g-root_theme_dark {
|
|
54
52
|
--pc-color-sfx-shadow: var(--g-color-sfx-shadow);
|
|
@@ -126,7 +124,6 @@ unpredictable css rules order in build */
|
|
|
126
124
|
color: var(--g-color-text-link);
|
|
127
125
|
text-decoration: none;
|
|
128
126
|
cursor: pointer;
|
|
129
|
-
border-radius: var(--g-focus-border-radius);
|
|
130
127
|
}
|
|
131
128
|
.utilityfocus .yfm_constructor a:focus {
|
|
132
129
|
outline: 2px solid #ffdb4d;
|
|
@@ -135,12 +132,6 @@ unpredictable css rules order in build */
|
|
|
135
132
|
--pc-text-header-color: var(--g-color-text-link-hover);
|
|
136
133
|
color: var(--g-color-text-link-hover);
|
|
137
134
|
}
|
|
138
|
-
.yfm_constructor a:focus {
|
|
139
|
-
box-shadow: 0 0 0 2px var(--g-color-line-focus);
|
|
140
|
-
}
|
|
141
|
-
.yfm_constructor a:focus:not(:focus-visible) {
|
|
142
|
-
box-shadow: none;
|
|
143
|
-
}
|
|
144
135
|
.yfm_constructor table {
|
|
145
136
|
color: var(--g-color-text-primary);
|
|
146
137
|
border: 1px solid var(--g-color-line-generic);
|
|
@@ -521,6 +521,9 @@ exports.MediaProps = {
|
|
|
521
521
|
analyticsEvents: {
|
|
522
522
|
anyOf: [event_1.AnalyticsEventSchema, { type: 'array', items: event_1.AnalyticsEventSchema }],
|
|
523
523
|
},
|
|
524
|
+
ratio: {
|
|
525
|
+
type: 'number',
|
|
526
|
+
},
|
|
524
527
|
};
|
|
525
528
|
exports.YMapMarkerLabel = {
|
|
526
529
|
type: 'object',
|
|
@@ -4,9 +4,6 @@
|
|
|
4
4
|
|
|
5
5
|
/* use this for style redefinitions to awoid problems with
|
|
6
6
|
unpredictable css rules order in build */
|
|
7
|
-
.pc-banner-card_theme_dark {
|
|
8
|
-
--g-color-line-focus: var(--g-color-text-light-primary);
|
|
9
|
-
}
|
|
10
7
|
.pc-banner-card_theme_dark.pc-banner-card_theme_dark .pc-banner-card__title,
|
|
11
8
|
.pc-banner-card_theme_dark.pc-banner-card_theme_dark .pc-banner-card__subtitle {
|
|
12
9
|
color: var(--g-color-text-light-primary);
|
|
@@ -91,9 +91,6 @@ unpredictable css rules order in build */
|
|
|
91
91
|
.pc-content_size_l .pc-content__button {
|
|
92
92
|
margin-top: 12px;
|
|
93
93
|
}
|
|
94
|
-
.pc-content_theme_dark {
|
|
95
|
-
--g-color-line-focus: var(--g-color-text-light-primary);
|
|
96
|
-
}
|
|
97
94
|
.pc-content_theme_dark .pc-content__title *,
|
|
98
95
|
.pc-content_theme_dark .pc-content__text .yfm,
|
|
99
96
|
.pc-content_theme_dark .pc-content__text .yfm *,
|
|
@@ -301,13 +301,6 @@ unpredictable css rules order in build */
|
|
|
301
301
|
white-space: nowrap;
|
|
302
302
|
appearance: none;
|
|
303
303
|
}
|
|
304
|
-
.pc-hubspot-form .hs-button.primary:focus {
|
|
305
|
-
outline: 2px solid var(--g-color-line-focus);
|
|
306
|
-
outline-offset: 1px;
|
|
307
|
-
}
|
|
308
|
-
.pc-hubspot-form .hs-button.primary:focus:not(:focus-visible) {
|
|
309
|
-
outline: 0;
|
|
310
|
-
}
|
|
311
304
|
.pc-hubspot-form .hs-button.primary:hover {
|
|
312
305
|
background-color: var(--g-color-base-brand-hover);
|
|
313
306
|
}
|
|
@@ -23,29 +23,11 @@ unpredictable css rules order in build */
|
|
|
23
23
|
margin: auto 10px;
|
|
24
24
|
}
|
|
25
25
|
.pc-price-details__foldable_title {
|
|
26
|
-
font-size: var(--g-text-body-2-font-size);
|
|
27
|
-
line-height: var(--g-text-body-2-line-height);
|
|
28
|
-
display: inline-block;
|
|
29
|
-
margin: 0;
|
|
30
|
-
padding: 0;
|
|
31
|
-
font: inherit;
|
|
32
|
-
border: none;
|
|
33
|
-
outline: none;
|
|
34
|
-
color: inherit;
|
|
35
|
-
background: none;
|
|
36
|
-
cursor: pointer;
|
|
37
26
|
cursor: pointer;
|
|
38
27
|
display: flex;
|
|
39
|
-
align-items: center;
|
|
40
28
|
font-weight: 400;
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
.pc-price-details__foldable_title:focus {
|
|
44
|
-
outline: 2px solid var(--g-color-line-focus);
|
|
45
|
-
outline-offset: 0;
|
|
46
|
-
}
|
|
47
|
-
.pc-price-details__foldable_title:focus:not(:focus-visible) {
|
|
48
|
-
outline: 0;
|
|
29
|
+
font-size: var(--g-text-body-2-font-size);
|
|
30
|
+
line-height: var(--g-text-body-2-line-height);
|
|
49
31
|
}
|
|
50
32
|
.pc-price-details__foldable_title_color_cornflower {
|
|
51
33
|
color: var(--g-color-text-link);
|
|
@@ -28,7 +28,7 @@ const PriceDetails = (props) => {
|
|
|
28
28
|
return react_1.default.createElement("div", { className: b('foldable_block') }, getPriceDetails());
|
|
29
29
|
};
|
|
30
30
|
const getFoldableTitle = () => {
|
|
31
|
-
return (react_1.default.createElement("
|
|
31
|
+
return (react_1.default.createElement("div", { className: b('foldable_title', { color: foldableColor, size: foldableSize }), onClick: toggleOpen },
|
|
32
32
|
foldableTitle,
|
|
33
33
|
react_1.default.createElement(components_1.ToggleArrow, { open: isOpened, size: 14, type: 'vertical', className: b('arrow') })));
|
|
34
34
|
};
|
|
@@ -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;
|
|
@@ -30,7 +30,7 @@ export const ContentLayoutBlock = (props) => {
|
|
|
30
30
|
const isMobile = useContext(MobileContext);
|
|
31
31
|
const { textContent, fileContent, size = 'l', background, centered, theme = 'default', textWidth = 'm', } = props;
|
|
32
32
|
const colSizes = useMemo(() => getTextWidth(textWidth), [textWidth]);
|
|
33
|
-
return (React.createElement("div", { className: b({ size,
|
|
33
|
+
return (React.createElement("div", { className: b({ size, background: Boolean(background) }) },
|
|
34
34
|
React.createElement(Content, Object.assign({ className: b('content') }, textContent, { size: size, centered: centered, colSizes: colSizes, theme: theme })),
|
|
35
35
|
fileContent && (React.createElement(Col, { className: b('files', { size, centered }), reset: true, sizes: colSizes }, fileContent.map((file) => (React.createElement(FileLink, Object.assign({ className: b('file') }, file, { key: file.href, type: "horizontal", textSize: getFileTextSize(size), theme: theme })))))),
|
|
36
36
|
background && (React.createElement("div", { className: b('background') },
|
|
@@ -248,6 +248,9 @@ export declare const HeaderBackgroundProps: {
|
|
|
248
248
|
};
|
|
249
249
|
})[];
|
|
250
250
|
};
|
|
251
|
+
ratio: {
|
|
252
|
+
type: string;
|
|
253
|
+
};
|
|
251
254
|
};
|
|
252
255
|
};
|
|
253
256
|
export declare const HeaderProperties: {
|
|
@@ -676,6 +679,9 @@ export declare const HeaderProperties: {
|
|
|
676
679
|
};
|
|
677
680
|
})[];
|
|
678
681
|
};
|
|
682
|
+
ratio: {
|
|
683
|
+
type: string;
|
|
684
|
+
};
|
|
679
685
|
};
|
|
680
686
|
} & {
|
|
681
687
|
optionName: string;
|
|
@@ -1153,6 +1159,9 @@ export declare const HeaderBlock: {
|
|
|
1153
1159
|
};
|
|
1154
1160
|
})[];
|
|
1155
1161
|
};
|
|
1162
|
+
ratio: {
|
|
1163
|
+
type: string;
|
|
1164
|
+
};
|
|
1156
1165
|
};
|
|
1157
1166
|
} & {
|
|
1158
1167
|
optionName: string;
|
|
@@ -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;
|
|
@@ -242,6 +242,9 @@ export declare const Media: {
|
|
|
242
242
|
};
|
|
243
243
|
})[];
|
|
244
244
|
};
|
|
245
|
+
ratio: {
|
|
246
|
+
type: string;
|
|
247
|
+
};
|
|
245
248
|
};
|
|
246
249
|
};
|
|
247
250
|
export declare const MediaBlockBaseProps: {
|
|
@@ -855,6 +858,9 @@ export declare const MediaBlock: {
|
|
|
855
858
|
};
|
|
856
859
|
})[];
|
|
857
860
|
};
|
|
861
|
+
ratio: {
|
|
862
|
+
type: string;
|
|
863
|
+
};
|
|
858
864
|
};
|
|
859
865
|
} & {
|
|
860
866
|
optionName: string;
|
|
@@ -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);
|
|
@@ -133,12 +133,12 @@ export const SliderBlock = (props) => {
|
|
|
133
133
|
const renderAccessibleBar = (index) => {
|
|
134
134
|
return (
|
|
135
135
|
// To have this key differ from keys used in renderDot function, added `-accessible-bar` part
|
|
136
|
-
React.createElement(Fragment, { key: `${index}-accessible-bar` }, slidesCountByBreakpoint >
|
|
136
|
+
React.createElement(Fragment, { key: `${index}-accessible-bar` }, slidesCountByBreakpoint > 1 && (React.createElement("li", { className: b('accessible-bar'), "aria-current": true, "aria-label": `Slide ${currentIndex + 1} of ${barSlidesCount}`, style: {
|
|
137
137
|
left: barPosition,
|
|
138
138
|
width: barWidth,
|
|
139
139
|
} }))));
|
|
140
140
|
};
|
|
141
|
-
const
|
|
141
|
+
const renderDot = (index) => {
|
|
142
142
|
const currentIndexDiff = index - currentIndex;
|
|
143
143
|
let currentSlideNumber;
|
|
144
144
|
if (0 <= currentIndexDiff && currentIndexDiff < slidesToShowCount) {
|
|
@@ -150,16 +150,10 @@ export const SliderBlock = (props) => {
|
|
|
150
150
|
else {
|
|
151
151
|
currentSlideNumber = index + 1;
|
|
152
152
|
}
|
|
153
|
-
return
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
return (slidesCountByBreakpoint > 0 &&
|
|
158
|
-
0 <= currentIndexDiff &&
|
|
159
|
-
currentIndexDiff < slidesToShowCount);
|
|
160
|
-
};
|
|
161
|
-
const renderDot = (index) => {
|
|
162
|
-
return (React.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}` }));
|
|
153
|
+
return (React.createElement("li", { key: index, className: b('dot', { active: index === currentIndex }), onClick: () => handleDotClick(index), "aria-hidden": (slidesCountByBreakpoint > 1 &&
|
|
154
|
+
0 <= currentIndexDiff &&
|
|
155
|
+
currentIndexDiff < slidesToShowCount) ||
|
|
156
|
+
undefined, "aria-label": `Slide ${currentSlideNumber} of ${barSlidesCount}` }));
|
|
163
157
|
};
|
|
164
158
|
const renderNavigation = () => {
|
|
165
159
|
if (childrenCount <= slidesCountByBreakpoint || !dots || childrenCount === 1) {
|
|
@@ -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
|
}
|
|
@@ -18,7 +18,7 @@ const ButtonTabs = ({ className, items, activeTab, onSelectTab, tabSize = 'l', q
|
|
|
18
18
|
return (React.createElement("div", { className: b(null, className), "data-qa": qa }, items.map(({ id, title }) => {
|
|
19
19
|
const isActive = id === activeTabId;
|
|
20
20
|
return (React.createElement(Button, { text: title, className: b('item', { active: isActive }), key: title, size: tabSize, onClick: handleClick(id), extraProps: {
|
|
21
|
-
'aria-current': isActive
|
|
21
|
+
'aria-current': isActive,
|
|
22
22
|
} }));
|
|
23
23
|
})));
|
|
24
24
|
};
|
|
@@ -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
|
import './CardBase.css';
|
|
4
5
|
export interface CardBaseProps extends AnalyticsEventsBase, CardBaseParams {
|
|
5
6
|
className?: string;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import React, { Children, Fragment } from 'react';
|
|
2
|
-
import { Link } from '@gravity-ui/uikit';
|
|
3
2
|
import { useAnalytics } from '../../hooks';
|
|
4
3
|
import { useMetrika } from '../../hooks/useMetrika';
|
|
5
|
-
import { DefaultEventNames
|
|
4
|
+
import { DefaultEventNames } from '../../models/common';
|
|
6
5
|
import { block, getQaAttrubutes } from '../../utils';
|
|
7
6
|
import BackgroundImage from '../BackgroundImage/BackgroundImage';
|
|
8
7
|
import RouterLink from '../RouterLink/RouterLink';
|
|
@@ -51,10 +50,7 @@ export const Layout = (props) => {
|
|
|
51
50
|
handleAnalytics(analyticsEvents);
|
|
52
51
|
};
|
|
53
52
|
return url ? (React.createElement(RouterLink, { href: url },
|
|
54
|
-
React.createElement(
|
|
55
|
-
draggable: false,
|
|
56
|
-
onDragStart: (e) => e.preventDefault(),
|
|
57
|
-
}, qa: qa }, cardContent))) : (React.createElement("div", { className: fullClassName, "data-qa": qa }, cardContent));
|
|
53
|
+
React.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.createElement("div", { className: fullClassName, "data-qa": qa }, cardContent));
|
|
58
54
|
};
|
|
59
55
|
Layout.Header = Header;
|
|
60
56
|
Layout.Content = Content;
|
|
@@ -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
|
}
|
|
@@ -19,11 +19,11 @@ const FullscreenImage = (props) => {
|
|
|
19
19
|
return (React.createElement("div", { className: b() },
|
|
20
20
|
React.createElement("div", { className: b('image-wrapper'), onMouseEnter: showFullscreenIcon, onMouseLeave: hideFullscreenIcon },
|
|
21
21
|
React.createElement(Image, Object.assign({}, props, { alt: alt, className: b('image', imageClassName), onClick: openModal, style: imageStyle })),
|
|
22
|
-
React.createElement("
|
|
22
|
+
React.createElement("div", { className: b('icon-wrapper', { visible: isMouseEnter }), onClick: openModal },
|
|
23
23
|
React.createElement(Icon, { data: Fullscreen, width: FULL_SCREEN_ICON_SIZE, height: FULL_SCREEN_ICON_SIZE, className: b('icon') }))),
|
|
24
24
|
isOpened && (React.createElement(Modal, { open: isOpened, onClose: closeModal, className: b('modal') },
|
|
25
25
|
React.createElement("div", { className: b('modal-content') },
|
|
26
|
-
React.createElement("
|
|
26
|
+
React.createElement("div", { className: b('icon-wrapper', { visible: true }), onClick: closeModal, "aria-label": i18n('close') },
|
|
27
27
|
React.createElement(Icon, { data: PreviewClose, width: CLOSE_ICON_SIZE, height: CLOSE_ICON_SIZE, className: b('icon', { hover: true }) })),
|
|
28
28
|
React.createElement(Image, Object.assign({}, props, { className: b('modal-image', modalImageClass) })))))));
|
|
29
29
|
};
|
|
@@ -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
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React, {
|
|
2
|
-
import {
|
|
1
|
+
import React, { useContext, useState } from 'react';
|
|
2
|
+
import { Icon, Modal } from '@gravity-ui/uikit';
|
|
3
3
|
import { MobileContext } from '../../context/mobileContext';
|
|
4
4
|
import { Fullscreen, PreviewClose } from '../../icons';
|
|
5
5
|
import { block } from '../../utils';
|
|
@@ -11,29 +11,22 @@ const getMediaClass = (type) => b('modal-media', { type });
|
|
|
11
11
|
const FullscreenMedia = ({ children, showFullscreenIcon = true }) => {
|
|
12
12
|
const [isOpened, setIsOpened] = useState(false);
|
|
13
13
|
const isMobile = useContext(MobileContext);
|
|
14
|
-
const [isFullscreenButtonFocused, setIsFullscreenButtonFocused] = useState(false);
|
|
15
14
|
const openModal = (e) => {
|
|
16
15
|
e.stopPropagation();
|
|
17
16
|
setIsOpened(true);
|
|
18
17
|
};
|
|
19
18
|
const closeModal = () => setIsOpened(false);
|
|
20
|
-
const onShowFullScreenButton = useCallback(() => {
|
|
21
|
-
setIsFullscreenButtonFocused(true);
|
|
22
|
-
}, []);
|
|
23
|
-
const onHideFullScreenButton = useCallback(() => {
|
|
24
|
-
setIsFullscreenButtonFocused(false);
|
|
25
|
-
}, []);
|
|
26
19
|
if (isMobile) {
|
|
27
20
|
return children();
|
|
28
21
|
}
|
|
29
22
|
return (React.createElement("div", { className: b() },
|
|
30
|
-
React.createElement("div", { className: b('media-wrapper'), onClickCapture: openModal
|
|
23
|
+
React.createElement("div", { className: b('media-wrapper'), onClickCapture: openModal },
|
|
31
24
|
children({ className: b('inline-media') }),
|
|
32
|
-
showFullscreenIcon && (React.createElement(
|
|
25
|
+
showFullscreenIcon && (React.createElement("div", { className: b('icon-wrapper'), onClickCapture: openModal },
|
|
33
26
|
React.createElement(Icon, { data: Fullscreen, width: FULL_SCREEN_ICON_SIZE, height: FULL_SCREEN_ICON_SIZE, className: b('icon') })))),
|
|
34
27
|
isOpened && (React.createElement(Modal, { open: isOpened, onClose: closeModal, className: b('modal') },
|
|
35
28
|
React.createElement("div", { className: b('modal-content') },
|
|
36
|
-
React.createElement(
|
|
29
|
+
React.createElement("div", { className: b('icon-wrapper', { visible: true }), onClick: closeModal },
|
|
37
30
|
React.createElement(Icon, { data: PreviewClose, width: CLOSE_ICON_SIZE, height: CLOSE_ICON_SIZE, className: b('icon', { hover: true }) })),
|
|
38
31
|
children({
|
|
39
32
|
imageClassName: getMediaClass('image'),
|
|
@@ -10,7 +10,6 @@ unpredictable css rules order in build */
|
|
|
10
10
|
cursor: pointer;
|
|
11
11
|
display: flex;
|
|
12
12
|
align-items: center;
|
|
13
|
-
border-radius: var(--g-focus-border-radius);
|
|
14
13
|
}
|
|
15
14
|
.utilityfocus .pc-link-block__link:focus {
|
|
16
15
|
outline: 2px solid #ffdb4d;
|
|
@@ -19,13 +18,6 @@ unpredictable css rules order in build */
|
|
|
19
18
|
--pc-text-header-color: var(--g-color-text-link-hover);
|
|
20
19
|
color: var(--g-color-text-link-hover);
|
|
21
20
|
}
|
|
22
|
-
.pc-link-block__link:focus {
|
|
23
|
-
outline: 2px solid var(--g-color-line-focus);
|
|
24
|
-
outline-offset: 0;
|
|
25
|
-
}
|
|
26
|
-
.pc-link-block__link:focus:not(:focus-visible) {
|
|
27
|
-
outline: 0;
|
|
28
|
-
}
|
|
29
21
|
.pc-link-block__link_theme_dark {
|
|
30
22
|
color: var(--g-color-text-light-primary);
|
|
31
23
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, {
|
|
1
|
+
import React, { useEffect, useState } from 'react';
|
|
2
2
|
import debounce from 'lodash/debounce';
|
|
3
3
|
import { animated, config, useSpring } from 'react-spring';
|
|
4
4
|
import SliderBlock from '../../../blocks/Slider/Slider';
|
|
@@ -50,7 +50,7 @@ const Image = (props) => {
|
|
|
50
50
|
};
|
|
51
51
|
const imageSlider = (imageArray) => {
|
|
52
52
|
const fullscreenItem = fullscreen === undefined || fullscreen;
|
|
53
|
-
return (React.createElement(SliderBlock, { slidesToShow: 1, type: SliderType.MediaCard }, imageArray.map((item
|
|
53
|
+
return (React.createElement(SliderBlock, { slidesToShow: 1, type: SliderType.MediaCard }, imageArray.map((item) => fullscreenItem ? renderFullscreenImage(item) : imageOnly(item))));
|
|
54
54
|
};
|
|
55
55
|
if (Array.isArray(image)) {
|
|
56
56
|
return imageSlider(image);
|