@skyscanner/backpack-web 38.2.0 → 38.4.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.
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { type CommonProps } from './common-types';
|
|
2
|
-
declare const BpkInsetBannerSponsored: ({ accessibilityLabel, backgroundColor, callToAction, image, logo, subheadline, title, variant, }: CommonProps) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
declare const BpkInsetBannerSponsored: ({ accessibilityLabel, adInfoA11yLabel, ariaAdScenicA11yLabel, backgroundColor, callToAction, image, logo, subheadline, title, variant, }: CommonProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default BpkInsetBannerSponsored;
|
|
@@ -29,6 +29,8 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
29
29
|
const getClassName = cssModules(STYLES);
|
|
30
30
|
const BpkInsetBannerSponsored = ({
|
|
31
31
|
accessibilityLabel,
|
|
32
|
+
adInfoA11yLabel = '',
|
|
33
|
+
ariaAdScenicA11yLabel = '',
|
|
32
34
|
backgroundColor = surfaceHighlightDay,
|
|
33
35
|
callToAction,
|
|
34
36
|
image,
|
|
@@ -51,7 +53,7 @@ const BpkInsetBannerSponsored = ({
|
|
|
51
53
|
children: logo && /*#__PURE__*/_jsx("img", {
|
|
52
54
|
className: getClassName('bpk-inset-banner--image'),
|
|
53
55
|
src: logo,
|
|
54
|
-
alt:
|
|
56
|
+
alt: ariaAdScenicA11yLabel,
|
|
55
57
|
"aria-hidden": true
|
|
56
58
|
})
|
|
57
59
|
}), /*#__PURE__*/_jsxs("div", {
|
|
@@ -85,6 +87,7 @@ const BpkInsetBannerSponsored = ({
|
|
|
85
87
|
children: callToAction.text
|
|
86
88
|
}), /*#__PURE__*/_jsx("div", {
|
|
87
89
|
className: getClassName('bpk-inset-banner--cta-info-icon'),
|
|
90
|
+
"aria-label": adInfoA11yLabel,
|
|
88
91
|
children: /*#__PURE__*/_jsx(InfoIcon, {})
|
|
89
92
|
})]
|
|
90
93
|
})
|
|
@@ -95,16 +98,21 @@ const BpkInsetBannerSponsored = ({
|
|
|
95
98
|
title: callToAction?.bottomSheetTitle || '',
|
|
96
99
|
closeLabel: "Close bottom sheet",
|
|
97
100
|
ariaLabel: callToAction?.bottomSheetA11yLabel || '',
|
|
101
|
+
closeOnScrimClick: true,
|
|
102
|
+
closeOnEscPressed: true,
|
|
98
103
|
children: callToAction.bottomSheetContent.map((item, index) => /*#__PURE__*/_jsxs("div", {
|
|
99
104
|
className: getClassName('bpk-inset-banner--bottom-sheet-content'),
|
|
100
105
|
children: [/*#__PURE__*/_jsx("div", {
|
|
101
106
|
className: getClassName('bpk-inset-banner--bottom-sheet-icon'),
|
|
107
|
+
"data-testid": "bottom-sheet-icon-container",
|
|
102
108
|
children: index === 0 ? /*#__PURE__*/_jsx(ViewIcon, {
|
|
103
109
|
height: 24,
|
|
104
|
-
width: 24
|
|
105
|
-
|
|
110
|
+
width: 24,
|
|
111
|
+
"data-testid": "view-icon"
|
|
112
|
+
}) : callToAction.bottomSheetContent.length > 1 && /*#__PURE__*/_jsx(InfoIcon, {
|
|
106
113
|
height: 24,
|
|
107
|
-
width: 24
|
|
114
|
+
width: 24,
|
|
115
|
+
"data-testid": "info-icon"
|
|
108
116
|
})
|
|
109
117
|
}), /*#__PURE__*/_jsxs("div", {
|
|
110
118
|
className: getClassName('bpk-inset-banner--bottom-sheet-text'),
|