@skyscanner/backpack-web 36.15.0 → 36.16.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.
@@ -21,6 +21,7 @@ export type Props = {
21
21
  popoverId?: string;
22
22
  labelTitle?: boolean;
23
23
  closeBtnIcon?: boolean;
24
+ zIndexCustom?: number;
24
25
  };
25
26
  logo?: string;
26
27
  subheadline?: string;
@@ -81,10 +81,11 @@ const BpkInsetBanner = ({
81
81
  closeButtonText: callToAction?.buttonCloseLabel,
82
82
  closeButtonIcon: callToAction?.closeBtnIcon,
83
83
  labelAsTitle: callToAction?.labelTitle,
84
+ zIndexValue: callToAction?.zIndexCustom,
84
85
  target: /*#__PURE__*/_jsx("button", {
85
86
  "aria-label": callToAction?.buttonA11yLabel,
86
87
  className: getClassName('bpk-inset-banner--cta-button'),
87
- "data-testid": "adInfoBtn",
88
+ "data-testid": "ctaBtn",
88
89
  "aria-hidden": "false",
89
90
  type: "button",
90
91
  children: /*#__PURE__*/_jsxs("div", {
@@ -20,11 +20,12 @@ export type Props = {
20
20
  * The accessory view allows for icons and actions to be placed in front of the main title inside the modal header. To be used with `BpkNavigationBarButtonLink`
21
21
  */
22
22
  accessoryView?: ReactNode;
23
+ ariaLabel?: string;
23
24
  };
24
25
  export declare const MODAL_STYLING: {
25
26
  default: string;
26
27
  surfaceContrast: string;
27
28
  };
28
29
  export type ModalStyle = (typeof MODAL_STYLING)[keyof typeof MODAL_STYLING];
29
- declare const BpkModalInner: ({ accessoryView, children, className, closeLabel, closeText, contentClassName, dialogRef, fullScreen, fullScreenOnMobile, id, isIphone, modalStyle, onClose, padded, showHeader, title, wide, }: Props) => import("react/jsx-runtime").JSX.Element;
30
+ declare const BpkModalInner: ({ accessoryView, ariaLabel, children, className, closeLabel, closeText, contentClassName, dialogRef, fullScreen, fullScreenOnMobile, id, isIphone, modalStyle, onClose, padded, showHeader, title, wide, }: Props) => import("react/jsx-runtime").JSX.Element;
30
31
  export default BpkModalInner;
@@ -31,6 +31,7 @@ export const MODAL_STYLING = {
31
31
  };
32
32
  const BpkModalInner = ({
33
33
  accessoryView = null,
34
+ ariaLabel,
34
35
  children,
35
36
  className = null,
36
37
  closeLabel = '',
@@ -83,6 +84,7 @@ const BpkModalInner = ({
83
84
  tabIndex: -1,
84
85
  role: "dialog",
85
86
  "aria-labelledby": showHeader ? headingId : undefined,
87
+ "aria-label": !showHeader ? ariaLabel : undefined,
86
88
  className: classNames.join(' '),
87
89
  ref: dialogRef,
88
90
  children: [showHeader && /*#__PURE__*/_jsx("header", {
@@ -31,9 +31,10 @@ export type Props = CloseButtonProps & {
31
31
  target: ReactElement<any>;
32
32
  closeButtonLabel?: string;
33
33
  actionText?: string;
34
+ zIndexValue?: number;
34
35
  onAction?: () => void;
35
36
  renderTarget?: () => HTMLElement | HTMLElement | undefined;
36
37
  [rest: string]: any;
37
38
  };
38
- declare const BpkPopover: ({ actionText, children, className, closeButtonIcon, closeButtonLabel, closeButtonProps, closeButtonText, hoverable, id, isOpen, label, labelAsTitle, onAction, onClose, padded, placement, renderTarget, showArrow, target, ...rest }: Props) => import("react/jsx-runtime").JSX.Element;
39
+ declare const BpkPopover: ({ actionText, children, className, closeButtonIcon, closeButtonLabel, closeButtonProps, closeButtonText, hoverable, id, isOpen, label, labelAsTitle, onAction, onClose, padded, placement, renderTarget, showArrow, target, zIndexValue, ...rest }: Props) => import("react/jsx-runtime").JSX.Element;
39
40
  export default BpkPopover;
@@ -65,6 +65,7 @@ const BpkPopover = ({
65
65
  renderTarget = () => undefined,
66
66
  showArrow = true,
67
67
  target,
68
+ zIndexValue = 900,
68
69
  ...rest
69
70
  }) => {
70
71
  const [isOpenState, setIsOpenState] = useState(isOpen);
@@ -132,8 +133,11 @@ const BpkPopover = ({
132
133
  children: /*#__PURE__*/_jsx("div", {
133
134
  className: getClassName('bpk-popover--container'),
134
135
  ref: refs.setFloating,
135
- style: floatingStyles,
136
136
  ...getFloatingProps(),
137
+ style: {
138
+ ...floatingStyles,
139
+ zIndex: zIndexValue
140
+ },
137
141
  children: /*#__PURE__*/_jsx(TransitionInitialMount, {
138
142
  appearClassName: getClassName('bpk-popover--appear'),
139
143
  appearActiveClassName: getClassName('bpk-popover--appear-active'),
@@ -15,4 +15,4 @@
15
15
  * See the License for the specific language governing permissions and
16
16
  * limitations under the License.
17
17
  */
18
- .bpk-popover--container{z-index:900}.bpk-popover{transition:opacity 200ms ease-in-out;outline:0;background-color:#fff;opacity:1;border-radius:.5rem;box-shadow:0px 4px 14px 0px rgba(37,32,31,.25)}@media(min-width: 32.0625rem){.bpk-popover{max-width:32rem;transition:opacity 50ms ease-in-out}}.bpk-popover--appear{opacity:0}.bpk-popover--appear-active{opacity:1}.bpk-popover__arrow{width:1.5rem;height:1.5rem;fill:#fff}.bpk-popover__arrow[data-hide]{visibility:hidden}.bpk-popover__body--padded{padding:1rem}.bpk-popover__body--padded:not(:last-of-type){padding-bottom:0}.bpk-popover__header{display:flex;padding:1rem 1rem 0;justify-content:space-between}.bpk-popover__header~.bpk-popover__body--padded{padding-top:.5rem}.bpk-popover__label{position:absolute;width:1px;height:1px;margin:-1px;padding:0;border:0;white-space:nowrap;overflow:hidden;clip:rect(0 0 0 0)}.bpk-popover__footer{padding:.5rem 1rem;text-align:right}html[dir=rtl] .bpk-popover__footer{text-align:left}.bpk-popover__action{padding:0 1rem 1rem 1rem}
18
+ .bpk-popover{transition:opacity 200ms ease-in-out;outline:0;background-color:#fff;opacity:1;border-radius:.5rem;box-shadow:0px 4px 14px 0px rgba(37,32,31,.25)}@media(min-width: 32.0625rem){.bpk-popover{max-width:32rem;transition:opacity 50ms ease-in-out}}.bpk-popover--appear{opacity:0}.bpk-popover--appear-active{opacity:1}.bpk-popover__arrow{width:1.5rem;height:1.5rem;fill:#fff}.bpk-popover__arrow[data-hide]{visibility:hidden}.bpk-popover__body--padded{padding:1rem}.bpk-popover__body--padded:not(:last-of-type){padding-bottom:0}.bpk-popover__header{display:flex;padding:1rem 1rem 0;justify-content:space-between}.bpk-popover__header~.bpk-popover__body--padded{padding-top:.5rem}.bpk-popover__label{position:absolute;width:1px;height:1px;margin:-1px;padding:0;border:0;white-space:nowrap;overflow:hidden;clip:rect(0 0 0 0)}.bpk-popover__footer{padding:.5rem 1rem;text-align:right}html[dir=rtl] .bpk-popover__footer{text-align:left}.bpk-popover__action{padding:0 1rem 1rem 1rem}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skyscanner/backpack-web",
3
- "version": "36.15.0",
3
+ "version": "36.16.0",
4
4
  "description": "Backpack Design System web library",
5
5
  "repository": {
6
6
  "type": "git",