@gravity-ui/page-constructor 5.17.2 → 5.18.1-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/ExtendedFeatures/ExtendedFeatures.css +2 -0
- package/build/cjs/blocks/ExtendedFeatures/ExtendedFeatures.js +2 -1
- package/build/cjs/blocks/HeaderSlider/HeaderSlider.js +2 -2
- package/build/cjs/blocks/Questions/QuestionBlockItem/QuestionBlockItem.js +4 -1
- package/build/cjs/blocks/SliderNew/Slider.css +15 -4
- package/build/cjs/blocks/SliderNew/useSlider.d.ts +1 -0
- package/build/cjs/blocks/SliderNew/useSlider.js +1 -0
- package/build/cjs/components/DefaultVideo/DefaultVideo.js +2 -0
- package/build/cjs/components/HeaderBreadcrumbs/HeaderBreadcrumbs.js +2 -1
- package/build/cjs/components/HeaderBreadcrumbs/i18n/en.json +3 -0
- package/build/cjs/components/HeaderBreadcrumbs/i18n/index.d.ts +1 -0
- package/build/cjs/components/HeaderBreadcrumbs/i18n/index.js +9 -0
- package/build/cjs/components/HeaderBreadcrumbs/i18n/ru.json +3 -0
- package/build/cjs/components/ImageBase/ImageBase.js +1 -0
- package/build/cjs/components/Media/Image/Image.js +2 -2
- package/build/cjs/components/OutsideClick/OutsideClick.js +3 -0
- package/build/cjs/components/ReactPlayer/ReactPlayer.js +3 -0
- package/build/cjs/components/Title/TitleItem.js +3 -0
- package/build/cjs/components/VideoBlock/VideoBlock.js +3 -0
- package/build/cjs/editor/components/AddBlock/AddBlock.js +3 -0
- package/build/cjs/editor/components/EditBlock/EditBlock.js +3 -0
- package/build/cjs/models/navigation.d.ts +1 -0
- package/build/cjs/navigation/components/Logo/Logo.d.ts +1 -0
- package/build/cjs/navigation/components/Logo/Logo.js +5 -1
- package/build/cjs/navigation/components/Logo/i18n/en.json +3 -0
- package/build/cjs/navigation/components/Logo/i18n/index.d.ts +1 -0
- package/build/cjs/navigation/components/Logo/i18n/index.js +9 -0
- package/build/cjs/navigation/components/Logo/i18n/ru.json +3 -0
- package/build/cjs/navigation/components/NavigationItem/components/NavigationDropdown/NavigationDropdown.css +16 -0
- package/build/cjs/navigation/components/NavigationItem/components/NavigationDropdown/NavigationDropdown.js +2 -2
- package/build/cjs/navigation/components/NavigationItem/components/NavigationLink/NavigationLink.css +7 -0
- package/build/cjs/sub-blocks/PriceDetailed/PriceDetails/Details/List.js +1 -1
- package/build/esm/blocks/ExtendedFeatures/ExtendedFeatures.css +2 -0
- package/build/esm/blocks/ExtendedFeatures/ExtendedFeatures.js +2 -1
- package/build/esm/blocks/HeaderSlider/HeaderSlider.js +1 -1
- package/build/esm/blocks/Questions/QuestionBlockItem/QuestionBlockItem.js +4 -1
- package/build/esm/blocks/SliderNew/Slider.css +15 -4
- package/build/esm/blocks/SliderNew/useSlider.d.ts +1 -0
- package/build/esm/blocks/SliderNew/useSlider.js +1 -0
- package/build/esm/components/DefaultVideo/DefaultVideo.js +2 -0
- package/build/esm/components/HeaderBreadcrumbs/HeaderBreadcrumbs.js +2 -1
- package/build/esm/components/HeaderBreadcrumbs/i18n/en.json +3 -0
- package/build/esm/components/HeaderBreadcrumbs/i18n/index.d.ts +1 -0
- package/build/esm/components/HeaderBreadcrumbs/i18n/index.js +5 -0
- package/build/esm/components/HeaderBreadcrumbs/i18n/ru.json +3 -0
- package/build/esm/components/ImageBase/ImageBase.js +1 -0
- package/build/esm/components/Media/Image/Image.js +1 -1
- package/build/esm/components/OutsideClick/OutsideClick.js +3 -0
- package/build/esm/components/ReactPlayer/ReactPlayer.js +3 -0
- package/build/esm/components/Title/TitleItem.js +3 -0
- package/build/esm/components/VideoBlock/VideoBlock.js +3 -0
- package/build/esm/editor/components/AddBlock/AddBlock.js +3 -0
- package/build/esm/editor/components/EditBlock/EditBlock.js +3 -0
- package/build/esm/models/navigation.d.ts +1 -0
- package/build/esm/navigation/components/Logo/Logo.d.ts +1 -0
- package/build/esm/navigation/components/Logo/Logo.js +6 -1
- package/build/esm/navigation/components/Logo/i18n/en.json +3 -0
- package/build/esm/navigation/components/Logo/i18n/index.d.ts +1 -0
- package/build/esm/navigation/components/Logo/i18n/index.js +5 -0
- package/build/esm/navigation/components/Logo/i18n/ru.json +3 -0
- package/build/esm/navigation/components/NavigationItem/components/NavigationDropdown/NavigationDropdown.css +16 -0
- package/build/esm/navigation/components/NavigationItem/components/NavigationDropdown/NavigationDropdown.js +2 -2
- package/build/esm/navigation/components/NavigationItem/components/NavigationLink/NavigationLink.css +7 -0
- package/build/esm/sub-blocks/PriceDetailed/PriceDetails/Details/List.js +1 -1
- package/package.json +4 -4
- package/server/models/navigation.d.ts +1 -0
- package/widget/index.js +1 -1
|
@@ -30,7 +30,8 @@ const ExtendedFeaturesBlock = ({ title, description, items, colSizes = DEFAULT_S
|
|
|
30
30
|
itemLinks.push(link);
|
|
31
31
|
}
|
|
32
32
|
return (react_1.default.createElement(grid_1.Col, { className: b('item'), key: text || itemTitle, sizes: colSizes },
|
|
33
|
-
iconData && react_1.default.createElement(
|
|
33
|
+
iconData && (react_1.default.createElement("div", { className: b('icon-wrap'), "aria-hidden": true },
|
|
34
|
+
react_1.default.createElement(Image_1.default, Object.assign({}, iconData, { className: b('icon') })))),
|
|
34
35
|
react_1.default.createElement("div", { className: b('container') },
|
|
35
36
|
itemTitle &&
|
|
36
37
|
react_1.default.createElement(itemTitleHeadingTag, {
|
|
@@ -7,14 +7,14 @@ const mobileContext_1 = require("../../context/mobileContext");
|
|
|
7
7
|
const models_1 = require("../../models");
|
|
8
8
|
const utils_1 = require("../../utils");
|
|
9
9
|
const Header_1 = tslib_1.__importDefault(require("../Header/Header"));
|
|
10
|
-
const
|
|
10
|
+
const unstable_1 = require("../unstable");
|
|
11
11
|
const b = (0, utils_1.block)('header-slider-block');
|
|
12
12
|
const HeaderSliderBlock = (_a) => {
|
|
13
13
|
var { items, arrows } = _a, props = tslib_1.__rest(_a, ["items", "arrows"]);
|
|
14
14
|
const isMobile = (0, react_1.useContext)(mobileContext_1.MobileContext);
|
|
15
15
|
const showArrows = isMobile ? false : arrows;
|
|
16
16
|
return (react_1.default.createElement("div", { className: b('wrapper'), "data-qa": "header-slider" },
|
|
17
|
-
react_1.default.createElement(
|
|
17
|
+
react_1.default.createElement(unstable_1.SliderNewBlock, Object.assign({}, props, { arrows: showArrows, slidesToShow: 1, type: models_1.SliderType.HeaderCard, animated: false, blockClassName: b(), arrowSize: 20 }), items.map((item, index) => (react_1.default.createElement("div", { key: index, className: b('item'), "data-qa": `header-slider-item-${index + 1}` },
|
|
18
18
|
react_1.default.createElement(Header_1.default, Object.assign({}, item, { className: b('item-content') }))))))));
|
|
19
19
|
};
|
|
20
20
|
exports.HeaderSliderBlock = HeaderSliderBlock;
|
|
@@ -12,7 +12,10 @@ const b = (0, utils_1.block)('QuestionsBlockItem');
|
|
|
12
12
|
const QuestionBlockItem = ({ title: itemTitle, text: itemText, link, listStyle = 'dash', isOpened, onClick, }) => {
|
|
13
13
|
const { onKeyDown } = (0, uikit_1.useActionHandlers)(onClick);
|
|
14
14
|
return (react_1.default.createElement("div", { className: b(), itemScope: true, itemProp: models_1.FaqMicrodataValues.QuestionProp, itemType: models_1.FaqMicrodataValues.QuestionType, role: 'listitem' },
|
|
15
|
-
react_1.default.createElement("h3", { className: b('title'), onClick: onClick, "aria-expanded": isOpened,
|
|
15
|
+
react_1.default.createElement("h3", { className: b('title'), onClick: onClick, "aria-expanded": isOpened,
|
|
16
|
+
// TODO fix in https://github.com/gravity-ui/page-constructor/issues/966
|
|
17
|
+
// eslint-disable-next-line jsx-a11y/no-noninteractive-element-to-interactive-role
|
|
18
|
+
role: 'button', tabIndex: 0, onKeyDown: onKeyDown },
|
|
16
19
|
react_1.default.createElement(components_1.HTML, { itemProp: models_1.FaqMicrodataValues.QuestionNameProp }, itemTitle),
|
|
17
20
|
react_1.default.createElement(components_1.ToggleArrow, { open: isOpened, size: 16, type: 'vertical', iconType: "navigation", className: b('arrow') })),
|
|
18
21
|
react_1.default.createElement(components_1.Foldable, { isOpened: isOpened },
|
|
@@ -11,10 +11,21 @@ unpredictable css rules order in build */
|
|
|
11
11
|
.pc-SliderNewBlock_without-dots .pc-SliderNewBlock__slider {
|
|
12
12
|
padding-bottom: 20px;
|
|
13
13
|
}
|
|
14
|
-
.pc-SliderNewBlock__slide {
|
|
14
|
+
.pc-SliderNewBlock__slide.swiper-slide {
|
|
15
15
|
padding: 0 8px;
|
|
16
16
|
box-sizing: border-box;
|
|
17
|
-
|
|
17
|
+
height: auto;
|
|
18
|
+
}
|
|
19
|
+
@keyframes safari-fix {
|
|
20
|
+
from {
|
|
21
|
+
transform: translateX(0.001px);
|
|
22
|
+
}
|
|
23
|
+
to {
|
|
24
|
+
transform: translateX(0);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
.pc-SliderNewBlock__slide.swiper-slide.swiper-slide-visible {
|
|
28
|
+
animation: safari-fix 300ms;
|
|
18
29
|
}
|
|
19
30
|
.pc-SliderNewBlock__arrow {
|
|
20
31
|
position: absolute;
|
|
@@ -708,7 +719,7 @@ unpredictable css rules order in build */
|
|
|
708
719
|
overflow: inherit;
|
|
709
720
|
}
|
|
710
721
|
}
|
|
711
|
-
.pc-SliderNewBlock_type_media-card .
|
|
722
|
+
.pc-SliderNewBlock_type_media-card .swiper-container-horizontal .swiper-pagination-bullets {
|
|
712
723
|
bottom: 24px;
|
|
713
724
|
}
|
|
714
725
|
.pc-SliderNewBlock_type_media-card .pc-SliderNewBlock__slider {
|
|
@@ -746,7 +757,7 @@ unpredictable css rules order in build */
|
|
|
746
757
|
.pc-SliderNewBlock_type_header-card .pc-SliderNewBlock__wrapper {
|
|
747
758
|
position: relative;
|
|
748
759
|
}
|
|
749
|
-
.pc-SliderNewBlock_type_header-card .
|
|
760
|
+
.pc-SliderNewBlock_type_header-card .swiper-container-horizontal .swiper-pagination-bullets {
|
|
750
761
|
bottom: 32px;
|
|
751
762
|
}
|
|
752
763
|
.pc-SliderNewBlock_type_header-card .pc-SliderNewBlock__slider {
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.DefaultVideo = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
+
/* eslint-disable jsx-a11y/media-has-caption */
|
|
6
|
+
// TODO fix in https://github.com/gravity-ui/page-constructor/issues/967
|
|
5
7
|
const react_1 = tslib_1.__importStar(require("react"));
|
|
6
8
|
const models_1 = require("../../models");
|
|
7
9
|
const utils_1 = require("../../utils");
|
|
@@ -5,6 +5,7 @@ const react_1 = tslib_1.__importStar(require("react"));
|
|
|
5
5
|
const hooks_1 = require("../../hooks");
|
|
6
6
|
const models_1 = require("../../models");
|
|
7
7
|
const utils_1 = require("../../utils");
|
|
8
|
+
const i18n_1 = require("./i18n");
|
|
8
9
|
const b = (0, utils_1.block)('header-breadcrumbs');
|
|
9
10
|
function HeaderBreadcrumbs(props) {
|
|
10
11
|
const { items, theme = 'light', className, analyticsEvents } = props;
|
|
@@ -12,7 +13,7 @@ function HeaderBreadcrumbs(props) {
|
|
|
12
13
|
const onClick = (0, react_1.useCallback)(() => {
|
|
13
14
|
handleAnalytics(analyticsEvents);
|
|
14
15
|
}, [analyticsEvents, handleAnalytics]);
|
|
15
|
-
return (react_1.default.createElement("div", { className: b({ theme }, className) }, items === null || items === void 0 ? void 0 : items.map((item) => (react_1.default.createElement("div", { className: b('item'), key: item.url },
|
|
16
|
+
return (react_1.default.createElement("div", { className: b({ theme }, className), "aria-label": (0, i18n_1.i18n)('label') }, items === null || items === void 0 ? void 0 : items.map((item) => (react_1.default.createElement("div", { className: b('item'), key: item.url },
|
|
16
17
|
react_1.default.createElement("a", { href: item.url, className: b('text'), onClick: onClick }, item.text))))));
|
|
17
18
|
}
|
|
18
19
|
exports.default = HeaderBreadcrumbs;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const i18n: (key: "label", params?: import("@gravity-ui/i18n").Params | undefined) => string;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.i18n = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const i18n_1 = require("@gravity-ui/uikit/i18n");
|
|
6
|
+
const cn_1 = require("../../../utils/cn");
|
|
7
|
+
const en_json_1 = tslib_1.__importDefault(require("./en.json"));
|
|
8
|
+
const ru_json_1 = tslib_1.__importDefault(require("./ru.json"));
|
|
9
|
+
exports.i18n = (0, i18n_1.addComponentKeysets)({ en: en_json_1.default, ru: ru_json_1.default }, `${cn_1.NAMESPACE}HeaderBreadcrumbs`);
|
|
@@ -6,6 +6,7 @@ const react_1 = tslib_1.__importDefault(require("react"));
|
|
|
6
6
|
const imageContext_1 = require("../../context/imageContext/imageContext");
|
|
7
7
|
const ImageBase = (props) => {
|
|
8
8
|
const { Image } = react_1.default.useContext(imageContext_1.ImageContext);
|
|
9
|
+
// eslint-disable-next-line jsx-a11y/alt-text
|
|
9
10
|
return Image ? react_1.default.createElement(Image, Object.assign({}, props)) : react_1.default.createElement("img", Object.assign({}, props));
|
|
10
11
|
};
|
|
11
12
|
exports.ImageBase = ImageBase;
|
|
@@ -5,7 +5,7 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const react_1 = tslib_1.__importStar(require("react"));
|
|
6
6
|
const web_1 = require("@react-spring/web");
|
|
7
7
|
const debounce_1 = tslib_1.__importDefault(require("lodash/debounce"));
|
|
8
|
-
const
|
|
8
|
+
const unstable_1 = require("../../../blocks/unstable");
|
|
9
9
|
const models_1 = require("../../../models");
|
|
10
10
|
const utils_1 = require("../../../utils");
|
|
11
11
|
const BackgroundImage_1 = tslib_1.__importDefault(require("../../BackgroundImage/BackgroundImage"));
|
|
@@ -56,7 +56,7 @@ const Image = (props) => {
|
|
|
56
56
|
};
|
|
57
57
|
const imageSlider = (imageArray) => {
|
|
58
58
|
const fullscreenItem = fullscreen === undefined || fullscreen;
|
|
59
|
-
return (react_1.default.createElement(
|
|
59
|
+
return (react_1.default.createElement(unstable_1.SliderNewBlock, { slidesToShow: 1, type: models_1.SliderType.MediaCard }, imageArray.map((item, index) => (react_1.default.createElement(react_1.Fragment, { key: index }, fullscreenItem ? renderFullscreenImage(item) : imageOnly(item))))));
|
|
60
60
|
};
|
|
61
61
|
if (Array.isArray(image)) {
|
|
62
62
|
return imageSlider(image);
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/* eslint-disable jsx-a11y/no-static-element-interactions */
|
|
3
|
+
/* eslint-disable jsx-a11y/click-events-have-key-events */
|
|
4
|
+
// TODO fix in https://github.com/gravity-ui/page-constructor/issues/965
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
const tslib_1 = require("tslib");
|
|
4
7
|
//TODO move into cloud components?
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/* eslint-disable jsx-a11y/no-static-element-interactions */
|
|
3
|
+
/* eslint-disable jsx-a11y/click-events-have-key-events */
|
|
4
|
+
// TODO fix in https://github.com/gravity-ui/page-constructor/issues/965
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.ReactPlayerBlock = void 0;
|
|
4
7
|
const tslib_1 = require("tslib");
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/* eslint-disable jsx-a11y/no-static-element-interactions */
|
|
3
|
+
/* eslint-disable jsx-a11y/click-events-have-key-events */
|
|
4
|
+
// TODO fix in https://github.com/gravity-ui/page-constructor/issues/965
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.getArrowSize = void 0;
|
|
4
7
|
const tslib_1 = require("tslib");
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/* eslint-disable jsx-a11y/no-static-element-interactions */
|
|
3
|
+
/* eslint-disable jsx-a11y/click-events-have-key-events */
|
|
4
|
+
// TODO fix in https://github.com/gravity-ui/page-constructor/issues/965
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.getHeight = exports.AUTOPLAY_ATTRIBUTES = void 0;
|
|
4
7
|
const tslib_1 = require("tslib");
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/* eslint-disable jsx-a11y/no-static-element-interactions */
|
|
3
|
+
/* eslint-disable jsx-a11y/click-events-have-key-events */
|
|
4
|
+
// TODO fix in https://github.com/gravity-ui/page-constructor/issues/965
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
const tslib_1 = require("tslib");
|
|
4
7
|
const react_1 = tslib_1.__importStar(require("react"));
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/* eslint-disable jsx-a11y/no-static-element-interactions */
|
|
3
|
+
/* eslint-disable jsx-a11y/click-events-have-key-events */
|
|
4
|
+
// TODO fix in https://github.com/gravity-ui/page-constructor/issues/965
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.EditBlockControls = void 0;
|
|
4
7
|
const tslib_1 = require("tslib");
|
|
@@ -8,12 +8,16 @@ const RouterLink_1 = tslib_1.__importDefault(require("../../../components/Router
|
|
|
8
8
|
const locationContext_1 = require("../../../context/locationContext");
|
|
9
9
|
const theme_1 = require("../../../context/theme");
|
|
10
10
|
const utils_2 = require("../../../utils");
|
|
11
|
+
const i18n_1 = require("./i18n");
|
|
11
12
|
const b = (0, utils_2.block)('logo');
|
|
12
|
-
const Logo = (
|
|
13
|
+
const Logo = (_a) => {
|
|
14
|
+
var { alt = (0, i18n_1.i18n)('image-alt') } = _a, restProps = tslib_1.__rest(_a, ["alt"]);
|
|
15
|
+
const props = Object.assign(Object.assign({}, restProps), { alt });
|
|
13
16
|
const { hostname, Link } = (0, react_1.useContext)(locationContext_1.LocationContext);
|
|
14
17
|
const theme = (0, theme_1.useTheme)();
|
|
15
18
|
const themedLogoProps = (0, utils_2.getThemedValue)(props, theme) || props;
|
|
16
19
|
const imageData = (0, utils_1.getMediaImage)(themedLogoProps.icon || props.icon);
|
|
20
|
+
imageData.alt = alt;
|
|
17
21
|
const textData = themedLogoProps.text || props.text;
|
|
18
22
|
const url = themedLogoProps.url || props.url || '/';
|
|
19
23
|
const urlTitle = themedLogoProps.urlTitle || props.urlTitle || textData;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const i18n: (key: "image-alt", params?: import("@gravity-ui/i18n").Params | undefined) => string;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.i18n = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const i18n_1 = require("@gravity-ui/uikit/i18n");
|
|
6
|
+
const cn_1 = require("../../../../utils/cn");
|
|
7
|
+
const en_json_1 = tslib_1.__importDefault(require("./en.json"));
|
|
8
|
+
const ru_json_1 = tslib_1.__importDefault(require("./ru.json"));
|
|
9
|
+
exports.i18n = (0, i18n_1.addComponentKeysets)({ en: en_json_1.default, ru: ru_json_1.default }, `${cn_1.NAMESPACE}Logo`);
|
|
@@ -1,8 +1,24 @@
|
|
|
1
|
+
/* use this for style redefinitions to awoid problems with
|
|
2
|
+
unpredictable css rules order in build */
|
|
1
3
|
.pc-navigation-dropdown {
|
|
2
4
|
position: relative;
|
|
3
5
|
display: flex;
|
|
4
6
|
align-items: center;
|
|
5
7
|
white-space: nowrap;
|
|
8
|
+
display: flex;
|
|
9
|
+
align-items: center;
|
|
10
|
+
height: 100%;
|
|
11
|
+
background: inherit;
|
|
12
|
+
font: inherit;
|
|
13
|
+
color: var(--g-color-text-primary);
|
|
14
|
+
border: none;
|
|
15
|
+
}
|
|
16
|
+
.pc-navigation-dropdown:focus {
|
|
17
|
+
outline: 2px solid var(--g-color-line-focus);
|
|
18
|
+
outline-offset: 0;
|
|
19
|
+
}
|
|
20
|
+
.pc-navigation-dropdown:focus:not(:focus-visible) {
|
|
21
|
+
outline: 0;
|
|
6
22
|
}
|
|
7
23
|
.pc-navigation-dropdown__arrow {
|
|
8
24
|
margin-left: 7px;
|
|
@@ -15,8 +15,8 @@ const NavigationDropdown = (_a) => {
|
|
|
15
15
|
const iconData = icon && (0, utils_1.getMediaImage)(icon);
|
|
16
16
|
const anchorRef = (0, react_1.useRef)(null);
|
|
17
17
|
return (react_1.default.createElement(react_1.Fragment, null,
|
|
18
|
-
react_1.default.createElement("
|
|
19
|
-
react_1.default.createElement(ContentWrapper_1.ContentWrapper, { text: text, icon: iconData, iconSize: iconSize }),
|
|
18
|
+
react_1.default.createElement("button", Object.assign({ ref: anchorRef }, props, { type: "button", className: b(null, className), "aria-expanded": isActive }),
|
|
19
|
+
react_1.default.createElement(ContentWrapper_1.ContentWrapper, { text: text, icon: iconData, iconSize: iconSize, "aria-expanded": isActive }),
|
|
20
20
|
react_1.default.createElement(components_1.ToggleArrow, { className: b('arrow'), size: TOGGLE_ARROW_SIZE, type: 'vertical', iconType: "navigation", open: isActive })),
|
|
21
21
|
react_1.default.createElement(NavigationPopup_1.default, { open: isActive, onClose: hidePopup, items: items, anchorRef: anchorRef })));
|
|
22
22
|
};
|
package/build/cjs/navigation/components/NavigationItem/components/NavigationLink/NavigationLink.css
CHANGED
|
@@ -16,6 +16,13 @@ unpredictable css rules order in build */
|
|
|
16
16
|
.pc-navigation-link:hover, .pc-navigation-link_active {
|
|
17
17
|
color: var(--g-color-text-link);
|
|
18
18
|
}
|
|
19
|
+
.pc-navigation-link:focus {
|
|
20
|
+
outline: 2px solid var(--g-color-line-focus);
|
|
21
|
+
outline-offset: 0;
|
|
22
|
+
}
|
|
23
|
+
.pc-navigation-link:focus:not(:focus-visible) {
|
|
24
|
+
outline: 0;
|
|
25
|
+
}
|
|
19
26
|
.pc-navigation-link__arrow {
|
|
20
27
|
position: relative;
|
|
21
28
|
top: -2px;
|
|
@@ -8,7 +8,7 @@ const b = (0, utils_1.block)('marked-list');
|
|
|
8
8
|
const List = (props) => {
|
|
9
9
|
const { items = [], titleSize = 's' } = props;
|
|
10
10
|
return (react_1.default.createElement(react_1.Fragment, null, items.map((item, id) => (react_1.default.createElement("div", { key: id, className: b('list-item') },
|
|
11
|
-
react_1.default.createElement("img", { className: b('img') }),
|
|
11
|
+
react_1.default.createElement("img", { className: b('img'), alt: "" }),
|
|
12
12
|
react_1.default.createElement("div", { className: b('text', { size: titleSize }) },
|
|
13
13
|
react_1.default.createElement(components_1.YFMWrapper, { content: item.text, modifiers: { constructor: true } })))))));
|
|
14
14
|
};
|
|
@@ -27,7 +27,8 @@ export const ExtendedFeaturesBlock = ({ title, description, items, colSizes = DE
|
|
|
27
27
|
itemLinks.push(link);
|
|
28
28
|
}
|
|
29
29
|
return (React.createElement(Col, { className: b('item'), key: text || itemTitle, sizes: colSizes },
|
|
30
|
-
iconData && React.createElement(
|
|
30
|
+
iconData && (React.createElement("div", { className: b('icon-wrap'), "aria-hidden": true },
|
|
31
|
+
React.createElement(Image, Object.assign({}, iconData, { className: b('icon') })))),
|
|
31
32
|
React.createElement("div", { className: b('container') },
|
|
32
33
|
itemTitle &&
|
|
33
34
|
React.createElement(itemTitleHeadingTag, {
|
|
@@ -4,7 +4,7 @@ import { MobileContext } from '../../context/mobileContext';
|
|
|
4
4
|
import { SliderType } from '../../models';
|
|
5
5
|
import { block } from '../../utils';
|
|
6
6
|
import Header from '../Header/Header';
|
|
7
|
-
import { SliderBlock } from '../
|
|
7
|
+
import { SliderNewBlock as SliderBlock } from '../unstable';
|
|
8
8
|
import './HeaderSlider.css';
|
|
9
9
|
const b = block('header-slider-block');
|
|
10
10
|
export const HeaderSliderBlock = (_a) => {
|
|
@@ -9,7 +9,10 @@ const b = block('QuestionsBlockItem');
|
|
|
9
9
|
export const QuestionBlockItem = ({ title: itemTitle, text: itemText, link, listStyle = 'dash', isOpened, onClick, }) => {
|
|
10
10
|
const { onKeyDown } = useActionHandlers(onClick);
|
|
11
11
|
return (React.createElement("div", { className: b(), itemScope: true, itemProp: FaqMicrodataValues.QuestionProp, itemType: FaqMicrodataValues.QuestionType, role: 'listitem' },
|
|
12
|
-
React.createElement("h3", { className: b('title'), onClick: onClick, "aria-expanded": isOpened,
|
|
12
|
+
React.createElement("h3", { className: b('title'), onClick: onClick, "aria-expanded": isOpened,
|
|
13
|
+
// TODO fix in https://github.com/gravity-ui/page-constructor/issues/966
|
|
14
|
+
// eslint-disable-next-line jsx-a11y/no-noninteractive-element-to-interactive-role
|
|
15
|
+
role: 'button', tabIndex: 0, onKeyDown: onKeyDown },
|
|
13
16
|
React.createElement(HTML, { itemProp: FaqMicrodataValues.QuestionNameProp }, itemTitle),
|
|
14
17
|
React.createElement(ToggleArrow, { open: isOpened, size: 16, type: 'vertical', iconType: "navigation", className: b('arrow') })),
|
|
15
18
|
React.createElement(Foldable, { isOpened: isOpened },
|
|
@@ -11,10 +11,21 @@ unpredictable css rules order in build */
|
|
|
11
11
|
.pc-SliderNewBlock_without-dots .pc-SliderNewBlock__slider {
|
|
12
12
|
padding-bottom: 20px;
|
|
13
13
|
}
|
|
14
|
-
.pc-SliderNewBlock__slide {
|
|
14
|
+
.pc-SliderNewBlock__slide.swiper-slide {
|
|
15
15
|
padding: 0 8px;
|
|
16
16
|
box-sizing: border-box;
|
|
17
|
-
|
|
17
|
+
height: auto;
|
|
18
|
+
}
|
|
19
|
+
@keyframes safari-fix {
|
|
20
|
+
from {
|
|
21
|
+
transform: translateX(0.001px);
|
|
22
|
+
}
|
|
23
|
+
to {
|
|
24
|
+
transform: translateX(0);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
.pc-SliderNewBlock__slide.swiper-slide.swiper-slide-visible {
|
|
28
|
+
animation: safari-fix 300ms;
|
|
18
29
|
}
|
|
19
30
|
.pc-SliderNewBlock__arrow {
|
|
20
31
|
position: absolute;
|
|
@@ -708,7 +719,7 @@ unpredictable css rules order in build */
|
|
|
708
719
|
overflow: inherit;
|
|
709
720
|
}
|
|
710
721
|
}
|
|
711
|
-
.pc-SliderNewBlock_type_media-card .
|
|
722
|
+
.pc-SliderNewBlock_type_media-card .swiper-container-horizontal .swiper-pagination-bullets {
|
|
712
723
|
bottom: 24px;
|
|
713
724
|
}
|
|
714
725
|
.pc-SliderNewBlock_type_media-card .pc-SliderNewBlock__slider {
|
|
@@ -746,7 +757,7 @@ unpredictable css rules order in build */
|
|
|
746
757
|
.pc-SliderNewBlock_type_header-card .pc-SliderNewBlock__wrapper {
|
|
747
758
|
position: relative;
|
|
748
759
|
}
|
|
749
|
-
.pc-SliderNewBlock_type_header-card .
|
|
760
|
+
.pc-SliderNewBlock_type_header-card .swiper-container-horizontal .swiper-pagination-bullets {
|
|
750
761
|
bottom: 32px;
|
|
751
762
|
}
|
|
752
763
|
.pc-SliderNewBlock_type_header-card .pc-SliderNewBlock__slider {
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/* eslint-disable jsx-a11y/media-has-caption */
|
|
2
|
+
// TODO fix in https://github.com/gravity-ui/page-constructor/issues/967
|
|
1
3
|
import React, { Fragment, useCallback, useImperativeHandle, useRef, useState } from 'react';
|
|
2
4
|
import { CustomControlsType, MediaVideoControlsType } from '../../models';
|
|
3
5
|
import { block } from '../../utils';
|
|
@@ -2,6 +2,7 @@ import React, { useCallback } from 'react';
|
|
|
2
2
|
import { useAnalytics } from '../../hooks';
|
|
3
3
|
import { DefaultEventNames } from '../../models';
|
|
4
4
|
import { block } from '../../utils';
|
|
5
|
+
import { i18n } from './i18n';
|
|
5
6
|
import './HeaderBreadcrumbs.css';
|
|
6
7
|
const b = block('header-breadcrumbs');
|
|
7
8
|
export default function HeaderBreadcrumbs(props) {
|
|
@@ -10,6 +11,6 @@ export default function HeaderBreadcrumbs(props) {
|
|
|
10
11
|
const onClick = useCallback(() => {
|
|
11
12
|
handleAnalytics(analyticsEvents);
|
|
12
13
|
}, [analyticsEvents, handleAnalytics]);
|
|
13
|
-
return (React.createElement("div", { className: b({ theme }, className) }, items === null || items === void 0 ? void 0 : items.map((item) => (React.createElement("div", { className: b('item'), key: item.url },
|
|
14
|
+
return (React.createElement("div", { className: b({ theme }, className), "aria-label": i18n('label') }, items === null || items === void 0 ? void 0 : items.map((item) => (React.createElement("div", { className: b('item'), key: item.url },
|
|
14
15
|
React.createElement("a", { href: item.url, className: b('text'), onClick: onClick }, item.text))))));
|
|
15
16
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const i18n: (key: "label", params?: import("@gravity-ui/i18n").Params | undefined) => string;
|
|
@@ -2,6 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { ImageContext } from '../../context/imageContext/imageContext';
|
|
3
3
|
export const ImageBase = (props) => {
|
|
4
4
|
const { Image } = React.useContext(ImageContext);
|
|
5
|
+
// eslint-disable-next-line jsx-a11y/alt-text
|
|
5
6
|
return Image ? React.createElement(Image, Object.assign({}, props)) : React.createElement("img", Object.assign({}, props));
|
|
6
7
|
};
|
|
7
8
|
export default ImageBase;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { Fragment, useEffect, useState } from 'react';
|
|
2
2
|
import { animated, config, useSpring } from '@react-spring/web';
|
|
3
3
|
import debounce from 'lodash/debounce';
|
|
4
|
-
import SliderBlock from '../../../blocks/
|
|
4
|
+
import { SliderNewBlock as SliderBlock } from '../../../blocks/unstable';
|
|
5
5
|
import { SliderType } from '../../../models';
|
|
6
6
|
import { block, getQaAttrubutes } from '../../../utils';
|
|
7
7
|
import BackgroundImage from '../../BackgroundImage/BackgroundImage';
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
/* eslint-disable jsx-a11y/no-static-element-interactions */
|
|
2
|
+
/* eslint-disable jsx-a11y/click-events-have-key-events */
|
|
3
|
+
// TODO fix in https://github.com/gravity-ui/page-constructor/issues/965
|
|
1
4
|
//TODO move into cloud components?
|
|
2
5
|
import React, { createRef } from 'react';
|
|
3
6
|
export default class OutsideClick extends React.Component {
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
/* eslint-disable jsx-a11y/no-static-element-interactions */
|
|
2
|
+
/* eslint-disable jsx-a11y/click-events-have-key-events */
|
|
3
|
+
// TODO fix in https://github.com/gravity-ui/page-constructor/issues/965
|
|
1
4
|
import React, { Fragment, useCallback, useContext, useEffect, useImperativeHandle, useMemo, useRef, useState, } from 'react';
|
|
2
5
|
import { PlayFill } from '@gravity-ui/icons';
|
|
3
6
|
import { Icon } from '@gravity-ui/uikit';
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
/* eslint-disable jsx-a11y/no-static-element-interactions */
|
|
2
|
+
/* eslint-disable jsx-a11y/click-events-have-key-events */
|
|
3
|
+
// TODO fix in https://github.com/gravity-ui/page-constructor/issues/965
|
|
1
4
|
import React, { Fragment, useContext } from 'react';
|
|
2
5
|
import { HTML, ToggleArrow } from '../';
|
|
3
6
|
import { LocationContext } from '../../context/locationContext';
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
/* eslint-disable jsx-a11y/no-static-element-interactions */
|
|
2
|
+
/* eslint-disable jsx-a11y/click-events-have-key-events */
|
|
3
|
+
// TODO fix in https://github.com/gravity-ui/page-constructor/issues/965
|
|
1
4
|
import React, { useCallback, useEffect, useRef, useState } from 'react';
|
|
2
5
|
import { PlayFill } from '@gravity-ui/icons';
|
|
3
6
|
import { Icon } from '@gravity-ui/uikit';
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
/* eslint-disable jsx-a11y/no-static-element-interactions */
|
|
2
|
+
/* eslint-disable jsx-a11y/click-events-have-key-events */
|
|
3
|
+
// TODO fix in https://github.com/gravity-ui/page-constructor/issues/965
|
|
1
4
|
import React, { useMemo, useRef, useState } from 'react';
|
|
2
5
|
import { Plus } from '@gravity-ui/icons';
|
|
3
6
|
import { Popup, TextInput } from '@gravity-ui/uikit';
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
/* eslint-disable jsx-a11y/no-static-element-interactions */
|
|
2
|
+
/* eslint-disable jsx-a11y/click-events-have-key-events */
|
|
3
|
+
// TODO fix in https://github.com/gravity-ui/page-constructor/issues/965
|
|
1
4
|
import React, { useEffect, useRef } from 'react';
|
|
2
5
|
import { ChevronDown, ChevronUp, Copy as CopyIcon, TrashBin } from '@gravity-ui/icons';
|
|
3
6
|
import { block } from '../../../utils';
|