@skyscanner/backpack-web 38.3.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
  })
@@ -101,12 +104,15 @@ const BpkInsetBannerSponsored = ({
101
104
  className: getClassName('bpk-inset-banner--bottom-sheet-content'),
102
105
  children: [/*#__PURE__*/_jsx("div", {
103
106
  className: getClassName('bpk-inset-banner--bottom-sheet-icon'),
107
+ "data-testid": "bottom-sheet-icon-container",
104
108
  children: index === 0 ? /*#__PURE__*/_jsx(ViewIcon, {
105
109
  height: 24,
106
- width: 24
107
- }) : /*#__PURE__*/_jsx(InfoIcon, {
110
+ width: 24,
111
+ "data-testid": "view-icon"
112
+ }) : callToAction.bottomSheetContent.length > 1 && /*#__PURE__*/_jsx(InfoIcon, {
108
113
  height: 24,
109
- width: 24
114
+ width: 24,
115
+ "data-testid": "info-icon"
110
116
  })
111
117
  }), /*#__PURE__*/_jsxs("div", {
112
118
  className: getClassName('bpk-inset-banner--bottom-sheet-text'),
@@ -36,5 +36,7 @@ export type CommonProps = {
36
36
  altText: string;
37
37
  aspectRatio: number;
38
38
  };
39
+ adInfoA11yLabel?: string;
40
+ ariaAdScenicA11yLabel?: string;
39
41
  };
40
42
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skyscanner/backpack-web",
3
- "version": "38.3.0",
3
+ "version": "38.4.0",
4
4
  "description": "Backpack Design System web library",
5
5
  "repository": {
6
6
  "type": "git",