@skyscanner/backpack-web 34.5.0 → 34.7.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.
Files changed (36) hide show
  1. package/bpk-component-aria-live/src/BpkAriaLive.module.css +1 -1
  2. package/bpk-component-barchart/src/BpkChartDataTable.module.css +1 -1
  3. package/bpk-component-calendar/src/BpkCalendarGrid.module.css +1 -1
  4. package/bpk-component-calendar/src/BpkCalendarNav.module.css +1 -1
  5. package/bpk-component-carousel/index.d.ts +2 -0
  6. package/bpk-component-carousel/index.js +20 -0
  7. package/bpk-component-carousel/src/BpkCarousel.d.ts +4 -0
  8. package/bpk-component-carousel/src/BpkCarousel.js +62 -0
  9. package/bpk-component-carousel/src/BpkCarousel.module.css +18 -0
  10. package/bpk-component-carousel/src/BpkCarouselContainer.d.ts +10 -0
  11. package/bpk-component-carousel/src/BpkCarouselContainer.js +92 -0
  12. package/bpk-component-carousel/src/BpkCarouselContainer.module.css +18 -0
  13. package/bpk-component-carousel/src/BpkCarouselImage.d.ts +7 -0
  14. package/bpk-component-carousel/src/BpkCarouselImage.js +34 -0
  15. package/bpk-component-carousel/src/BpkCarouselImage.module.css +18 -0
  16. package/bpk-component-carousel/src/types.d.ts +11 -0
  17. package/bpk-component-carousel/src/types.js +1 -0
  18. package/bpk-component-carousel/src/utils.d.ts +4 -0
  19. package/bpk-component-carousel/src/utils.js +68 -0
  20. package/bpk-component-drawer/src/BpkDrawerContent.module.css +1 -1
  21. package/bpk-component-graphic-promotion/src/BpkGraphicPromo.module.css +1 -1
  22. package/bpk-component-icon/src/withDescription.module.css +1 -1
  23. package/bpk-component-page-indicator/src/BpkPageIndicator.js +56 -42
  24. package/bpk-component-pagination/src/BpkPaginationNudger.module.css +1 -1
  25. package/bpk-component-popover/src/BpkPopover.js +8 -5
  26. package/bpk-component-popover/src/BpkPopover.module.css +1 -1
  27. package/bpk-component-text/src/BpkText.d.ts +1 -0
  28. package/bpk-component-text/src/BpkText.js +1 -0
  29. package/bpk-component-text/src/BpkText.module.css +1 -1
  30. package/bpk-component-theme-toggle/src/BpkThemeToggle.module.css +1 -1
  31. package/bpk-mixins/_typography.scss +27 -11
  32. package/bpk-mixins/_utils.scss +1 -0
  33. package/bpk-stylesheets/base.css +1 -1
  34. package/package.json +2 -2
  35. package/unstable__bpk-mixins/_typography.scss +27 -11
  36. package/unstable__bpk-mixins/_utils.scss +1 -0
@@ -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-aria-live--invisible{position:absolute;width:1px;height:1px;margin:-1px;padding:0;border:0;overflow:hidden;clip:rect(0 0 0 0)}
18
+ .bpk-aria-live--invisible{position:absolute;width:1px;height:1px;margin:-1px;padding:0;border:0;white-space:nowrap;overflow:hidden;clip:rect(0 0 0 0)}
@@ -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-chart-data-table{position:absolute;width:1px;height:1px;margin:-1px;padding:0;border:0;overflow:hidden;clip:rect(0 0 0 0)}.bpk-chart-data-table thead,.bpk-chart-data-table tbody{position:absolute;width:1px;height:1px;margin:-1px;padding:0;border:0;overflow:hidden;clip:rect(0 0 0 0)}
18
+ .bpk-chart-data-table{position:absolute;width:1px;height:1px;margin:-1px;padding:0;border:0;white-space:nowrap;overflow:hidden;clip:rect(0 0 0 0)}.bpk-chart-data-table thead,.bpk-chart-data-table tbody{position:absolute;width:1px;height:1px;margin:-1px;padding:0;border:0;white-space:nowrap;overflow:hidden;clip:rect(0 0 0 0)}
@@ -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-calendar-grid{border-collapse:separate;border-spacing:0}.bpk-calendar-grid--animating{z-index:1;transition:transform .2s ease-in-out}.bpk-calendar-grid__caption{position:absolute;width:1px;height:1px;margin:-1px;padding:0;border:0;overflow:hidden;clip:rect(0 0 0 0)}
18
+ .bpk-calendar-grid{border-collapse:separate;border-spacing:0}.bpk-calendar-grid--animating{z-index:1;transition:transform .2s ease-in-out}.bpk-calendar-grid__caption{position:absolute;width:1px;height:1px;margin:-1px;padding:0;border:0;white-space:nowrap;overflow:hidden;clip:rect(0 0 0 0)}
@@ -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-calendar-nav{display:table}.bpk-calendar-nav__month{display:table-cell;text-align:center}.bpk-calendar-nav__nudger{display:table-cell;padding:0 .5rem;text-align:center;vertical-align:middle;box-sizing:border-box}.bpk-calendar-nav__button{width:100%;height:2.25rem;padding:.375rem 0;border:none;background:none;cursor:pointer;appearance:none;color:#161616;color:var(--bpk-calendar-nudger-icon-color, rgb(22, 22, 22))}.bpk-no-touch-support .bpk-calendar-nav__button:hover:not(:active):not(:disabled){color:#161616;color:var(--bpk-calendar-nudger-icon-hover-color, rgb(22, 22, 22))}:global(.bpk-no-touch-support) .bpk-calendar-nav__button:hover:not(:active):not(:disabled){color:#161616;color:var(--bpk-calendar-nudger-icon-hover-color, rgb(22, 22, 22))}.bpk-calendar-nav__button:active{color:#161616;color:var(--bpk-calendar-nudger-icon-active-color, rgb(22, 22, 22))}html[dir=rtl] .bpk-calendar-nav__button .bpk-calendar-nav__icon{transform:scaleX(-1)}.bpk-calendar-nav__button:disabled{cursor:not-allowed}.bpk-calendar-nav__text--hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;border:0;overflow:hidden;clip:rect(0 0 0 0)}
18
+ .bpk-calendar-nav{display:table}.bpk-calendar-nav__month{display:table-cell;text-align:center}.bpk-calendar-nav__nudger{display:table-cell;padding:0 .5rem;text-align:center;vertical-align:middle;box-sizing:border-box}.bpk-calendar-nav__button{width:100%;height:2.25rem;padding:.375rem 0;border:none;background:none;cursor:pointer;appearance:none;color:#161616;color:var(--bpk-calendar-nudger-icon-color, rgb(22, 22, 22))}.bpk-no-touch-support .bpk-calendar-nav__button:hover:not(:active):not(:disabled){color:#161616;color:var(--bpk-calendar-nudger-icon-hover-color, rgb(22, 22, 22))}:global(.bpk-no-touch-support) .bpk-calendar-nav__button:hover:not(:active):not(:disabled){color:#161616;color:var(--bpk-calendar-nudger-icon-hover-color, rgb(22, 22, 22))}.bpk-calendar-nav__button:active{color:#161616;color:var(--bpk-calendar-nudger-icon-active-color, rgb(22, 22, 22))}html[dir=rtl] .bpk-calendar-nav__button .bpk-calendar-nav__icon{transform:scaleX(-1)}.bpk-calendar-nav__button:disabled{cursor:not-allowed}.bpk-calendar-nav__text--hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;border:0;white-space:nowrap;overflow:hidden;clip:rect(0 0 0 0)}
@@ -0,0 +1,2 @@
1
+ import BpkCarousel from "./src/BpkCarousel";
2
+ export default BpkCarousel;
@@ -0,0 +1,20 @@
1
+ /*
2
+ * Backpack - Skyscanner's Design System
3
+ *
4
+ * Copyright 2016 Skyscanner Ltd
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */
18
+
19
+ import BpkCarousel from "./src/BpkCarousel";
20
+ export default BpkCarousel;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import type { Props } from './types';
3
+ declare const BpkCarousel: ({ bottom, images, initialImageIndex, onImageChanged, }: Props) => JSX.Element;
4
+ export default BpkCarousel;
@@ -0,0 +1,62 @@
1
+ /*
2
+ * Backpack - Skyscanner's Design System
3
+ *
4
+ * Copyright 2022 Skyscanner Ltd
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */
18
+
19
+ import { useRef, useState } from 'react';
20
+
21
+ // @ts-expect-error Untyped import. See `decisions/imports-ts-suppressions.md`.
22
+ import BpkPageIndicator, { VARIANT } from "../../bpk-component-page-indicator";
23
+ import { cssModules } from "../../bpk-react-utils";
24
+ import BpkCarouselContainer from "./BpkCarouselContainer";
25
+ import { useScrollToInitialImage } from "./utils";
26
+ import STYLES from "./BpkCarousel.module.css";
27
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
28
+ const getClassName = cssModules(STYLES);
29
+ const BpkCarousel = ({
30
+ bottom,
31
+ images,
32
+ initialImageIndex = 0,
33
+ onImageChanged = null
34
+ }) => {
35
+ const [shownImageIndex, updateShownImageIndex] = useState(initialImageIndex);
36
+ const imagesRef = useRef([]);
37
+ useScrollToInitialImage(initialImageIndex, imagesRef);
38
+ return /*#__PURE__*/_jsxs("div", {
39
+ className: getClassName('bpk-carousel'),
40
+ children: [/*#__PURE__*/_jsx(BpkCarouselContainer, {
41
+ images: images,
42
+ onVisible: updateShownImageIndex,
43
+ imagesRef: imagesRef,
44
+ onImageChanged: onImageChanged
45
+ }), /*#__PURE__*/_jsx("div", {
46
+ className: getClassName('bpk-carousel__page-indicator-over-image'),
47
+ style: bottom ? {
48
+ bottom
49
+ } : undefined,
50
+ "data-testid": "carousel-page-indicator-container",
51
+ children: /*#__PURE__*/_jsx(BpkPageIndicator, {
52
+ currentIndex: shownImageIndex,
53
+ totalIndicators: images.length,
54
+ variant: VARIANT.overImage,
55
+ indicatorLabel: "Go to slide",
56
+ prevNavLabel: "Previous slide",
57
+ nextNavLabel: "Next slide"
58
+ })
59
+ })]
60
+ });
61
+ };
62
+ export default BpkCarousel;
@@ -0,0 +1,18 @@
1
+ /*
2
+ * Backpack - Skyscanner's Design System
3
+ *
4
+ * Copyright 2016 Skyscanner Ltd
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */
18
+ .bpk-carousel{position:relative}.bpk-carousel__page-indicator-over-image{position:absolute;right:0;bottom:.25rem;left:0;display:flex;margin:auto 1rem;justify-content:center;overflow:clip}
@@ -0,0 +1,10 @@
1
+ import type { MutableRefObject, ReactNode } from 'react';
2
+ import type { OnImageChangedHandler } from './types';
3
+ type Props = {
4
+ images: ReactNode[];
5
+ onVisible: (visibleIndex: number) => void;
6
+ imagesRef: MutableRefObject<Array<HTMLElement | null>>;
7
+ onImageChanged: OnImageChangedHandler;
8
+ };
9
+ declare const BpkScrollContainer: import("react").MemoExoticComponent<({ images, imagesRef, onImageChanged, onVisible }: Props) => JSX.Element>;
10
+ export default BpkScrollContainer;
@@ -0,0 +1,92 @@
1
+ /*
2
+ * Backpack - Skyscanner's Design System
3
+ *
4
+ * Copyright 2022 Skyscanner Ltd
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */
18
+
19
+ import { memo, useState } from 'react';
20
+ import { cssModules } from "../../bpk-react-utils";
21
+ import BpkCarouselImage from "./BpkCarouselImage";
22
+ import { useIntersectionObserver } from "./utils";
23
+ import STYLES from "./BpkCarouselContainer.module.css";
24
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
25
+ const getClassName = cssModules(STYLES);
26
+ const BpkScrollContainer = /*#__PURE__*/memo(({
27
+ images,
28
+ imagesRef,
29
+ onImageChanged,
30
+ onVisible
31
+ }) => {
32
+ const [root, setRoot] = useState(null);
33
+ const observeImageChange = useIntersectionObserver(onVisible, {
34
+ root,
35
+ threshold: 0.5
36
+ }, onImageChanged);
37
+ const observeCycleScroll = useIntersectionObserver(index => {
38
+ const imageElement = imagesRef.current && imagesRef.current[index];
39
+ if (imageElement) {
40
+ imageElement.scrollIntoView({
41
+ block: 'nearest',
42
+ inline: 'start'
43
+ });
44
+ }
45
+ }, {
46
+ root,
47
+ threshold: 1
48
+ });
49
+ if (images.length === 1) {
50
+ return /*#__PURE__*/_jsx("div", {
51
+ className: getClassName('bpk-carousel-container'),
52
+ role: "list",
53
+ "data-testid": "image-gallery-scroll-container",
54
+ children: /*#__PURE__*/_jsx(BpkCarouselImage, {
55
+ image: images[0],
56
+ index: 0
57
+ })
58
+ });
59
+ }
60
+ return /*#__PURE__*/_jsxs("div", {
61
+ className: getClassName('bpk-carousel-container'),
62
+ ref: setRoot,
63
+ "data-testid": "image-gallery-scroll-container",
64
+ role: "list",
65
+ children: [/*#__PURE__*/_jsx(BpkCarouselImage, {
66
+ image: images[images.length - 1],
67
+ index: images.length - 1,
68
+ ref: el => {
69
+ observeCycleScroll(el);
70
+ observeImageChange(el);
71
+ }
72
+ }), images.map((image, index) => /*#__PURE__*/_jsx(BpkCarouselImage
73
+ // eslint-disable-next-line react/no-array-index-key
74
+ , {
75
+ image: image,
76
+ index: index,
77
+ ref: el => {
78
+ // eslint-disable-next-line no-param-reassign
79
+ imagesRef.current[index] = el;
80
+ observeImageChange(el);
81
+ }
82
+ }, index)), /*#__PURE__*/_jsx(BpkCarouselImage, {
83
+ image: images[0],
84
+ index: 0,
85
+ ref: el => {
86
+ observeCycleScroll(el);
87
+ observeImageChange(el);
88
+ }
89
+ })]
90
+ });
91
+ });
92
+ export default BpkScrollContainer;
@@ -0,0 +1,18 @@
1
+ /*
2
+ * Backpack - Skyscanner's Design System
3
+ *
4
+ * Copyright 2016 Skyscanner Ltd
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */
18
+ .bpk-carousel-container{display:grid;width:100%;height:100%;grid:1fr/auto-flow 100%;overflow-x:auto;overflow-y:hidden;backface-visibility:hidden;overscroll-behavior:contain;scroll-snap-type:x mandatory;scrollbar-width:none;user-select:none}.bpk-carousel-container::-webkit-scrollbar{display:none}
@@ -0,0 +1,7 @@
1
+ import type { ReactNode } from "react";
2
+ type ImageProps = {
3
+ image: ReactNode;
4
+ index: number;
5
+ };
6
+ declare const BpkCarouselImage: import("react").ForwardRefExoticComponent<ImageProps & import("react").RefAttributes<HTMLDivElement>>;
7
+ export default BpkCarouselImage;
@@ -0,0 +1,34 @@
1
+ /*
2
+ * Backpack - Skyscanner's Design System
3
+ *
4
+ * Copyright 2022 Skyscanner Ltd
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */
18
+
19
+ import { forwardRef } from "react";
20
+ import { cssModules } from "../../bpk-react-utils";
21
+ import STYLES from "./BpkCarouselImage.module.css";
22
+ import { jsx as _jsx } from "react/jsx-runtime";
23
+ const getClassName = cssModules(STYLES);
24
+ const BpkCarouselImage = /*#__PURE__*/forwardRef(({
25
+ image,
26
+ index
27
+ }, ref) => /*#__PURE__*/_jsx("div", {
28
+ className: getClassName('bpk-carousel-image'),
29
+ "data-index": index,
30
+ ref: ref,
31
+ role: "listitem",
32
+ children: image
33
+ }, index));
34
+ export default BpkCarouselImage;
@@ -0,0 +1,18 @@
1
+ /*
2
+ * Backpack - Skyscanner's Design System
3
+ *
4
+ * Copyright 2016 Skyscanner Ltd
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */
18
+ .bpk-carousel-image{display:inline-flex;width:100%;min-width:0;height:100%;min-height:0;justify-content:center;scroll-snap-align:start;scroll-snap-stop:always;isolation:isolate}.bpk-carousel-image img{max-width:100%;max-height:100%;object-fit:initial}
@@ -0,0 +1,11 @@
1
+ import type { ReactNode } from "react";
2
+ export type OnImageChangedHandler = ((shownImageIndex: number) => void) | null | undefined;
3
+ export type Props = {
4
+ images: ReactNode[];
5
+ initialImageIndex?: number;
6
+ onImageChanged?: OnImageChangedHandler;
7
+ /**
8
+ * This prop is used to let the consumer adjust the spacing between the page indicator and the bottom of the image when variant is VARIANT.overImage
9
+ */
10
+ bottom?: number;
11
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,4 @@
1
+ import type { MutableRefObject } from 'react';
2
+ import type { OnImageChangedHandler } from './types';
3
+ export declare function useScrollToInitialImage(initialImageIndex: number, imagesRef: MutableRefObject<Array<HTMLElement | null>>): void;
4
+ export declare function useIntersectionObserver(onIntersecting: (index: number) => void, { root, threshold }: IntersectionObserverInit, onImageChanged?: OnImageChangedHandler): (element: HTMLElement | null) => void;
@@ -0,0 +1,68 @@
1
+ /*
2
+ * Backpack - Skyscanner's Design System
3
+ *
4
+ * Copyright 2022 Skyscanner Ltd
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */
18
+
19
+ import { useEffect, useMemo, useRef } from 'react';
20
+ export function useScrollToInitialImage(initialImageIndex, imagesRef) {
21
+ useEffect(() => {
22
+ const element = imagesRef.current[initialImageIndex];
23
+ if (element) {
24
+ element.scrollIntoView({
25
+ block: 'nearest',
26
+ inline: 'start'
27
+ });
28
+ }
29
+ }, [initialImageIndex, imagesRef]);
30
+ }
31
+ export function useIntersectionObserver(onIntersecting, {
32
+ root,
33
+ threshold
34
+ }, onImageChanged) {
35
+ const callbackRef = useRef(onIntersecting);
36
+ useEffect(() => {
37
+ callbackRef.current = onIntersecting;
38
+ });
39
+ const observe = useMemo(() => {
40
+ if (!root) return () => {};
41
+ const observer = new IntersectionObserver(entries => {
42
+ const shownEntry = entries.find(entry => entry.isIntersecting);
43
+ if (!shownEntry) {
44
+ return;
45
+ }
46
+ const {
47
+ index
48
+ } = shownEntry.target.dataset;
49
+ if (index) {
50
+ const currentIndex = parseInt(index, 10);
51
+ callbackRef.current(currentIndex);
52
+ if (onImageChanged) {
53
+ onImageChanged(currentIndex);
54
+ }
55
+ }
56
+ }, {
57
+ root,
58
+ threshold
59
+ });
60
+ const observeElement = element => {
61
+ if (element && observer) {
62
+ observer.observe(element);
63
+ }
64
+ };
65
+ return observeElement;
66
+ }, [onImageChanged, root, threshold]);
67
+ return observe;
68
+ }
@@ -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-drawer{position:fixed;right:0;display:flex;z-index:1100;width:90%;max-width:25rem;height:100%;flex-direction:column;transform:translate(100%);transition:transform 200ms ease;outline:0;background:#fff;overflow-y:scroll;box-shadow:0px 12px 50px 0px rgba(37,32,31,.25)}html[dir=rtl] .bpk-drawer{right:auto;left:0;transform:translate(-100%)}@media(max-width: 32rem){.bpk-drawer{width:100%;max-width:100%}}.bpk-drawer--entering,.bpk-drawer--entered{transform:translate(0)}html[dir=rtl] .bpk-drawer--entering,html[dir=rtl] .bpk-drawer--entered{transform:translate(0)}.bpk-drawer--exiting{transition:transform 50ms ease}.bpk-drawer--exiting,.bpk-drawer--exited{transform:translate(100%)}html[dir=rtl] .bpk-drawer--exiting,html[dir=rtl] .bpk-drawer--exited{transform:translate(-100%)}.bpk-drawer__header{display:flex;min-height:3rem;padding:1rem;justify-content:space-between;align-items:center;flex:0 0;box-shadow:0 -1px 0 0 #c1c7cf inset}.bpk-drawer__heading{margin:0;font-size:1rem;line-height:1.5rem;font-weight:700}.bpk-drawer__heading--visually-hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;border:0;overflow:hidden;clip:rect(0 0 0 0)}.bpk-drawer__close-button{float:right}html[dir=rtl] .bpk-drawer__close-button{float:left}.bpk-drawer__content{height:100%;padding:1rem;flex:1 1 100%;overflow-y:auto}
18
+ .bpk-drawer{position:fixed;right:0;display:flex;z-index:1100;width:90%;max-width:25rem;height:100%;flex-direction:column;transform:translate(100%);transition:transform 200ms ease;outline:0;background:#fff;overflow-y:scroll;box-shadow:0px 12px 50px 0px rgba(37,32,31,.25)}html[dir=rtl] .bpk-drawer{right:auto;left:0;transform:translate(-100%)}@media(max-width: 32rem){.bpk-drawer{width:100%;max-width:100%}}.bpk-drawer--entering,.bpk-drawer--entered{transform:translate(0)}html[dir=rtl] .bpk-drawer--entering,html[dir=rtl] .bpk-drawer--entered{transform:translate(0)}.bpk-drawer--exiting{transition:transform 50ms ease}.bpk-drawer--exiting,.bpk-drawer--exited{transform:translate(100%)}html[dir=rtl] .bpk-drawer--exiting,html[dir=rtl] .bpk-drawer--exited{transform:translate(-100%)}.bpk-drawer__header{display:flex;min-height:3rem;padding:1rem;justify-content:space-between;align-items:center;flex:0 0;box-shadow:0 -1px 0 0 #c1c7cf inset}.bpk-drawer__heading{margin:0;font-size:1rem;line-height:1.5rem;font-weight:700}.bpk-drawer__heading--visually-hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;border:0;white-space:nowrap;overflow:hidden;clip:rect(0 0 0 0)}.bpk-drawer__close-button{float:right}html[dir=rtl] .bpk-drawer__close-button{float:left}.bpk-drawer__content{height:100%;padding:1rem;flex:1 1 100%;overflow-y:auto}
@@ -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-card{position:relative;display:block;background-color:#fff;color:#161616;text-decoration:none;cursor:pointer;box-shadow:0px 1px 3px 0px rgba(37,32,31,.3);border-radius:.75rem}.bpk-no-touch-support .bpk-card:hover:not(:active):not(:disabled)::after{opacity:1}:global(.bpk-no-touch-support) .bpk-card:hover:not(:active):not(:disabled)::after{opacity:1}.bpk-card::after{position:absolute;top:0;right:0;bottom:0;left:0;content:"";transition:opacity 200ms ease-in-out;opacity:0;pointer-events:none;box-shadow:0px 4px 14px 0px rgba(37,32,31,.25);border-radius:.75rem}@media screen\0 {.bpk-card::after{z-index:-1}}.bpk-card:active::after{box-shadow:none}.bpk-graphic-promo{max-width:76.5rem;margin-right:auto;margin-left:auto;background-color:#05203c;background-position:center;background-size:cover;color:#fff;box-shadow:none}@media(max-width: 48rem){.bpk-graphic-promo{padding-top:133%;box-sizing:border-box}}.bpk-graphic-promo::after{display:none}.bpk-graphic-promo__container{display:flex;flex-direction:column;justify-content:center}.bpk-graphic-promo__container--start{align-items:start}.bpk-graphic-promo__container--center{align-items:center}.bpk-graphic-promo__container--end{align-items:end}@media(min-width: 64.0625rem){.bpk-graphic-promo__container{height:28.75rem;margin-left:4rem;margin-right:2.5rem}html[dir=rtl] .bpk-graphic-promo__container{margin-right:4rem}html[dir=rtl] .bpk-graphic-promo__container{margin-left:2.5rem}.bpk-graphic-promo__container--center>*{margin-left:0;margin-right:1.5rem}html[dir=rtl] .bpk-graphic-promo__container--center>*{margin-left:1.5rem;margin-right:0}}@media(max-width: 64rem){.bpk-graphic-promo__container{height:22.5rem;margin-left:2.5rem;margin-right:2rem}html[dir=rtl] .bpk-graphic-promo__container{margin-right:2.5rem}html[dir=rtl] .bpk-graphic-promo__container{margin-left:2rem}.bpk-graphic-promo__container--center>*{margin-left:0;margin-right:.5rem}html[dir=rtl] .bpk-graphic-promo__container--center>*{margin-left:.5rem;margin-right:0}}@media(max-width: 48rem){.bpk-graphic-promo__container{padding:2rem;justify-content:space-between;align-items:start;text-align:start;margin-left:0;margin-right:0;position:absolute;top:0;right:0;left:0;height:100%}html[dir=rtl] .bpk-graphic-promo__container{margin-left:0;margin-right:0}.bpk-graphic-promo__container--inverted{flex-direction:column-reverse}.bpk-graphic-promo__container>*{margin-left:0;margin-right:0}html[dir=rtl] .bpk-graphic-promo__container>*{margin-left:0;margin-right:0}}@media(max-width: 22.4375rem){.bpk-graphic-promo__container{padding:1.5rem}}.bpk-graphic-promo__tagline{margin-bottom:.5rem;font-size:1rem;line-height:1.25rem;font-weight:700}@media(max-width: 64rem){.bpk-graphic-promo__tagline{font-size:1rem;line-height:1.5rem;font-weight:700}}@media(max-width: 48rem){.bpk-graphic-promo__tagline{font-size:1.5rem;line-height:2rem;font-weight:400}}@media(max-width: 22.4375rem){.bpk-graphic-promo__tagline{font-size:1rem;line-height:1.5rem;font-weight:700}}.bpk-graphic-promo__headline{margin:0}@media(min-width: 64.0625rem){.bpk-graphic-promo__headline{font-size:3rem;line-height:3.5rem;font-weight:700;letter-spacing:-0.02em}.bpk-graphic-promo__headline:not(:last-child){margin-bottom:.5rem}}@media(max-width: 64rem){.bpk-graphic-promo__headline{font-size:2.5rem;line-height:3rem;font-weight:700}.bpk-graphic-promo__headline:not(:last-child){margin-bottom:.5rem}}@media(max-width: 48rem){.bpk-graphic-promo__headline{margin-bottom:.5rem}}@media(max-width: 32rem){.bpk-graphic-promo__headline{font-size:2rem;line-height:2.5rem;font-weight:700}}.bpk-graphic-promo__subheading{margin:0;font-size:1rem;line-height:1.5rem;font-weight:400}@media(max-width: 64rem){.bpk-graphic-promo__subheading{font-size:1rem;line-height:1.25rem;font-weight:700}}@media(max-width: 48rem){.bpk-graphic-promo__subheading{font-size:1.5rem;line-height:1.75rem;font-weight:700}}@media(max-width: 32rem){.bpk-graphic-promo__subheading{font-size:1rem;line-height:1.25rem;font-weight:700}}.bpk-graphic-promo__promo-content,.bpk-graphic-promo__sponsor-content{display:flex;flex-direction:column}.bpk-graphic-promo__promo-content--start,.bpk-graphic-promo__sponsor-content--start{align-items:start;text-align:start}.bpk-graphic-promo__promo-content--center,.bpk-graphic-promo__sponsor-content--center{align-items:center;text-align:center}.bpk-graphic-promo__promo-content--end,.bpk-graphic-promo__sponsor-content--end{align-items:start;text-align:start}@media(min-width: 64.0625rem){.bpk-graphic-promo__promo-content,.bpk-graphic-promo__sponsor-content{width:22.5rem}}@media(max-width: 64rem){.bpk-graphic-promo__promo-content,.bpk-graphic-promo__sponsor-content{width:20rem}}@media(max-width: 48rem){.bpk-graphic-promo__promo-content,.bpk-graphic-promo__sponsor-content{width:initial;align-items:start;text-align:start}}.bpk-graphic-promo__sponsor-content{display:flex;margin-bottom:1rem;flex-direction:column}@media(max-width: 48rem){.bpk-graphic-promo__sponsor-content{margin-bottom:initial}}.bpk-graphic-promo__sponsor-label{margin-bottom:.25rem;font-size:1rem;line-height:1.5rem;font-weight:700}@media(max-width: 48rem){.bpk-graphic-promo__sponsor-label{margin-bottom:.5rem;font-size:1.5rem;line-height:1.75rem;font-weight:700}}@media(max-width: 22.4375rem){.bpk-graphic-promo__sponsor-label{margin-bottom:.25rem;font-size:1rem;line-height:1.5rem;font-weight:700}}.bpk-graphic-promo__sponsor-logo{width:auto;max-width:9.25rem;height:auto;max-height:3.75rem}.bpk-graphic-promo__cta{margin-top:2rem}@media(max-width: 48rem){.bpk-graphic-promo__cta{display:none}}
18
+ .bpk-card{position:relative;display:block;background-color:#fff;color:#161616;text-decoration:none;cursor:pointer;box-shadow:0px 1px 3px 0px rgba(37,32,31,.3);border-radius:.75rem}.bpk-no-touch-support .bpk-card:hover:not(:active):not(:disabled)::after{opacity:1}:global(.bpk-no-touch-support) .bpk-card:hover:not(:active):not(:disabled)::after{opacity:1}.bpk-card::after{position:absolute;top:0;right:0;bottom:0;left:0;content:"";transition:opacity 200ms ease-in-out;opacity:0;pointer-events:none;box-shadow:0px 4px 14px 0px rgba(37,32,31,.25);border-radius:.75rem}@media screen\0 {.bpk-card::after{z-index:-1}}.bpk-card:active::after{box-shadow:none}.bpk-graphic-promo{max-width:76.5rem;margin-right:auto;margin-left:auto;background-color:#05203c;background-position:center;background-size:cover;color:#fff;box-shadow:none}@media(max-width: 48rem){.bpk-graphic-promo{padding-top:133%;box-sizing:border-box}}.bpk-graphic-promo::after{display:none}.bpk-graphic-promo__container{display:flex;flex-direction:column;justify-content:center}.bpk-graphic-promo__container--start{align-items:start}.bpk-graphic-promo__container--center{align-items:center}.bpk-graphic-promo__container--end{align-items:end}@media(min-width: 64.0625rem){.bpk-graphic-promo__container{height:28.75rem;margin-left:4rem;margin-right:2.5rem}html[dir=rtl] .bpk-graphic-promo__container{margin-right:4rem}html[dir=rtl] .bpk-graphic-promo__container{margin-left:2.5rem}.bpk-graphic-promo__container--center>*{margin-left:0;margin-right:1.5rem}html[dir=rtl] .bpk-graphic-promo__container--center>*{margin-left:1.5rem;margin-right:0}}@media(max-width: 64rem){.bpk-graphic-promo__container{height:22.5rem;margin-left:2.5rem;margin-right:2rem}html[dir=rtl] .bpk-graphic-promo__container{margin-right:2.5rem}html[dir=rtl] .bpk-graphic-promo__container{margin-left:2rem}.bpk-graphic-promo__container--center>*{margin-left:0;margin-right:.5rem}html[dir=rtl] .bpk-graphic-promo__container--center>*{margin-left:.5rem;margin-right:0}}@media(max-width: 48rem){.bpk-graphic-promo__container{padding:2rem;justify-content:space-between;align-items:start;text-align:start;margin-left:0;margin-right:0;position:absolute;top:0;right:0;left:0;height:100%}html[dir=rtl] .bpk-graphic-promo__container{margin-left:0;margin-right:0}.bpk-graphic-promo__container--inverted{flex-direction:column-reverse}.bpk-graphic-promo__container>*{margin-left:0;margin-right:0}html[dir=rtl] .bpk-graphic-promo__container>*{margin-left:0;margin-right:0}}@media(max-width: 22.4375rem){.bpk-graphic-promo__container{padding:1.5rem}}.bpk-graphic-promo__tagline{margin-bottom:.5rem;font-size:1rem;line-height:1.25rem;font-weight:700}@media(max-width: 64rem){.bpk-graphic-promo__tagline{font-size:1rem;line-height:1.5rem;font-weight:700}}@media(max-width: 48rem){.bpk-graphic-promo__tagline{font-size:1.5rem;line-height:2rem;font-weight:400}}@media(max-width: 22.4375rem){.bpk-graphic-promo__tagline{font-size:1rem;line-height:1.5rem;font-weight:700}}.bpk-graphic-promo__headline{margin:0}@media(min-width: 64.0625rem){.bpk-graphic-promo__headline{font-size:3rem;line-height:3rem;font-weight:900;letter-spacing:-0.04em}.bpk-graphic-promo__headline:not(:last-child){margin-bottom:.5rem}}@media(max-width: 64rem){.bpk-graphic-promo__headline{font-size:2.5rem;line-height:3rem;font-weight:700}.bpk-graphic-promo__headline:not(:last-child){margin-bottom:.5rem}}@media(max-width: 48rem){.bpk-graphic-promo__headline{margin-bottom:.5rem}}@media(max-width: 32rem){.bpk-graphic-promo__headline{font-size:2rem;line-height:2.5rem;font-weight:700}}.bpk-graphic-promo__subheading{margin:0;font-size:1rem;line-height:1.5rem;font-weight:400}@media(max-width: 64rem){.bpk-graphic-promo__subheading{font-size:1rem;line-height:1.25rem;font-weight:700}}@media(max-width: 48rem){.bpk-graphic-promo__subheading{font-size:1.5rem;line-height:1.75rem;font-weight:700}}@media(max-width: 32rem){.bpk-graphic-promo__subheading{font-size:1rem;line-height:1.25rem;font-weight:700}}.bpk-graphic-promo__promo-content,.bpk-graphic-promo__sponsor-content{display:flex;flex-direction:column}.bpk-graphic-promo__promo-content--start,.bpk-graphic-promo__sponsor-content--start{align-items:start;text-align:start}.bpk-graphic-promo__promo-content--center,.bpk-graphic-promo__sponsor-content--center{align-items:center;text-align:center}.bpk-graphic-promo__promo-content--end,.bpk-graphic-promo__sponsor-content--end{align-items:start;text-align:start}@media(min-width: 64.0625rem){.bpk-graphic-promo__promo-content,.bpk-graphic-promo__sponsor-content{width:22.5rem}}@media(max-width: 64rem){.bpk-graphic-promo__promo-content,.bpk-graphic-promo__sponsor-content{width:20rem}}@media(max-width: 48rem){.bpk-graphic-promo__promo-content,.bpk-graphic-promo__sponsor-content{width:initial;align-items:start;text-align:start}}.bpk-graphic-promo__sponsor-content{display:flex;margin-bottom:1rem;flex-direction:column}@media(max-width: 48rem){.bpk-graphic-promo__sponsor-content{margin-bottom:initial}}.bpk-graphic-promo__sponsor-label{margin-bottom:.25rem;font-size:1rem;line-height:1.5rem;font-weight:700}@media(max-width: 48rem){.bpk-graphic-promo__sponsor-label{margin-bottom:.5rem;font-size:1.5rem;line-height:1.75rem;font-weight:700}}@media(max-width: 22.4375rem){.bpk-graphic-promo__sponsor-label{margin-bottom:.25rem;font-size:1rem;line-height:1.5rem;font-weight:700}}.bpk-graphic-promo__sponsor-logo{width:auto;max-width:9.25rem;height:auto;max-height:3.75rem}.bpk-graphic-promo__cta{margin-top:2rem}@media(max-width: 48rem){.bpk-graphic-promo__cta{display:none}}
@@ -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-icon-description{position:absolute;width:1px;height:1px;margin:-1px;padding:0;border:0;overflow:hidden;clip:rect(0 0 0 0)}
18
+ .bpk-icon-description{position:absolute;width:1px;height:1px;margin:-1px;padding:0;border:0;white-space:nowrap;overflow:hidden;clip:rect(0 0 0 0)}
@@ -36,50 +36,64 @@ const BpkPageIndicator = ({
36
36
  showNav,
37
37
  totalIndicators,
38
38
  variant
39
- }) =>
40
- /*#__PURE__*/
41
- // $FlowFixMe[cannot-spread-inexact] - inexact rest. See 'decisions/flowfixme.md'.
42
- _jsx("div", {
43
- className: className,
44
- children: /*#__PURE__*/_jsxs("div", {
45
- className: getClassName('bpk-page-indicator', showNav && 'bpk-page-indicator__showNav'),
46
- children: [showNav && /*#__PURE__*/_jsx(NavButton, {
47
- currentIndex: currentIndex,
48
- onClick: onClick,
49
- disabled: currentIndex === 0,
50
- direction: DIRECTIONS.PREV,
51
- ariaLabel: prevNavLabel
52
- }), /*#__PURE__*/_jsx("div", {
53
- className: getClassName('bpk-page-indicator__container'),
54
- children: /*#__PURE__*/_jsx("div", {
55
- className: getClassName('bpk-page-indicator__indicators-container'),
56
- style: currentIndex > START_SCROLL_INDEX ? {
57
- '--scroll-index': totalIndicators > DISPLAYED_TOTAL ? Math.min(currentIndex - START_SCROLL_INDEX, totalIndicators - DISPLAYED_TOTAL) : 0
58
- } : undefined,
59
- children: [...Array(totalIndicators)].map((val, index) => /*#__PURE__*/_jsx("button", {
60
- type: "button",
61
- onClick: e => {
62
- onClick(e, index, DIRECTIONS.INDICATORS);
63
- },
64
- className: getClassName('bpk-page-indicator__indicator', `bpk-page-indicator__indicator--${variant}`, index === currentIndex && `bpk-page-indicator__indicator--active-${variant}`),
65
- "aria-label": `${indicatorLabel} ${index + 1}`,
66
- "aria-current": currentIndex === index ? 'true' : 'false'
67
- // eslint-disable-next-line react/no-array-index-key
68
- }, `indicator-${index}`))
39
+ }) => {
40
+ /**
41
+ * This validation is used to avoid an a11y issue when onClick isn't available.
42
+ * In this case, we can set aria-hidden = true to let screen reader skip reading page indicator dots.
43
+ * and render the dot as div rather than button to align with aria-hidden = true.
44
+ */
45
+ const isInteractive = !!onClick;
46
+ return (
47
+ /*#__PURE__*/
48
+ // $FlowFixMe[cannot-spread-inexact] - inexact rest. See 'decisions/flowfixme.md'.
49
+ _jsx("div", {
50
+ className: className,
51
+ "aria-hidden": isInteractive ? 'false' : 'true',
52
+ "data-testid": "indicator-container",
53
+ children: /*#__PURE__*/_jsxs("div", {
54
+ className: getClassName('bpk-page-indicator', showNav && 'bpk-page-indicator__showNav'),
55
+ children: [showNav && /*#__PURE__*/_jsx(NavButton, {
56
+ currentIndex: currentIndex,
57
+ onClick: onClick,
58
+ disabled: currentIndex === 0,
59
+ direction: DIRECTIONS.PREV,
60
+ ariaLabel: prevNavLabel
61
+ }), /*#__PURE__*/_jsx("div", {
62
+ className: getClassName('bpk-page-indicator__container'),
63
+ children: /*#__PURE__*/_jsx("div", {
64
+ className: getClassName('bpk-page-indicator__indicators-container'),
65
+ style: currentIndex > START_SCROLL_INDEX ? {
66
+ '--scroll-index': totalIndicators > DISPLAYED_TOTAL ? Math.min(currentIndex - START_SCROLL_INDEX, totalIndicators - DISPLAYED_TOTAL) : 0
67
+ } : undefined,
68
+ children: [...Array(totalIndicators)].map((val, index) => isInteractive ? /*#__PURE__*/_jsx("button", {
69
+ type: "button",
70
+ onClick: e => {
71
+ onClick(e, index, DIRECTIONS.INDICATORS);
72
+ },
73
+ className: getClassName('bpk-page-indicator__indicator', `bpk-page-indicator__indicator--${variant}`, index === currentIndex && `bpk-page-indicator__indicator--active-${variant}`),
74
+ "aria-label": `${indicatorLabel} ${index + 1}`,
75
+ "aria-current": currentIndex === index ? 'true' : 'false'
76
+ // eslint-disable-next-line react/no-array-index-key
77
+ }, `indicator-${index}`) : /*#__PURE__*/_jsx("div", {
78
+ className: getClassName('bpk-page-indicator__indicator', `bpk-page-indicator__indicator--${variant}`, index === currentIndex && `bpk-page-indicator__indicator--active-${variant}`)
79
+ // eslint-disable-next-line react/no-array-index-key
80
+ }, `indicator-${index}`))
81
+ })
82
+ }), showNav && /*#__PURE__*/_jsx(NavButton, {
83
+ currentIndex: currentIndex,
84
+ onClick: onClick,
85
+ disabled: currentIndex === totalIndicators - 1,
86
+ ariaLabel: nextNavLabel,
87
+ direction: DIRECTIONS.NEXT
88
+ })]
69
89
  })
70
- }), showNav && /*#__PURE__*/_jsx(NavButton, {
71
- currentIndex: currentIndex,
72
- onClick: onClick,
73
- disabled: currentIndex === totalIndicators - 1,
74
- ariaLabel: nextNavLabel,
75
- direction: DIRECTIONS.NEXT
76
- })]
77
- })
78
- });
90
+ })
91
+ );
92
+ };
79
93
  BpkPageIndicator.propTypes = {
80
- indicatorLabel: PropTypes.string.isRequired,
81
- prevNavLabel: PropTypes.string.isRequired,
82
- nextNavLabel: PropTypes.string.isRequired,
94
+ indicatorLabel: PropTypes.string,
95
+ prevNavLabel: PropTypes.string,
96
+ nextNavLabel: PropTypes.string,
83
97
  currentIndex: PropTypes.number.isRequired,
84
98
  totalIndicators: PropTypes.number.isRequired,
85
99
  variant: PropTypes.oneOf(Object.keys(VARIANT)),
@@ -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-pagination-nudger{display:flex;width:2.25rem;height:2.25rem;justify-content:center;align-content:center}.bpk-pagination-nudger__text--hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;border:0;overflow:hidden;clip:rect(0 0 0 0)}
18
+ .bpk-pagination-nudger{display:flex;width:2.25rem;height:2.25rem;justify-content:center;align-content:center}.bpk-pagination-nudger__text--hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;border:0;white-space:nowrap;overflow:hidden;clip:rect(0 0 0 0)}
@@ -16,8 +16,8 @@
16
16
  * limitations under the License.
17
17
  */
18
18
 
19
- import { useState, useRef, cloneElement, isValidElement } from 'react';
20
- import { useFloating, autoUpdate, offset, useClick, useDismiss, useInteractions, FloatingFocusManager, arrow, FloatingArrow, flip, shift } from '@floating-ui/react';
19
+ import { useState, useEffect, useRef, cloneElement, isValidElement } from 'react';
20
+ import { useFloating, autoUpdate, offset, useClick, useDismiss, useInteractions, FloatingFocusManager, arrow, FloatingArrow, shift } from '@floating-ui/react';
21
21
  import { surfaceHighlightDay } from '@skyscanner/bpk-foundations-web/tokens/base.es6';
22
22
 
23
23
  // @ts-expect-error Untyped import. See `decisions/imports-ts-suppressions.md`.
@@ -66,6 +66,11 @@ const BpkPopover = ({
66
66
  ...rest
67
67
  }) => {
68
68
  const [isOpenState, setIsOpenState] = useState(isOpen);
69
+ useEffect(() => {
70
+ if (!isOpen) {
71
+ setIsOpenState(false);
72
+ }
73
+ }, [isOpen]);
69
74
  const arrowRef = useRef(null);
70
75
  const {
71
76
  context,
@@ -75,9 +80,7 @@ const BpkPopover = ({
75
80
  open: isOpenState,
76
81
  onOpenChange: setIsOpenState,
77
82
  placement,
78
- middleware: [showArrow && offset(17), flip({
79
- crossAxis: true
80
- }), shift(), showArrow && arrow({
83
+ middleware: [showArrow && offset(17), shift(), showArrow && arrow({
81
84
  element: arrowRef
82
85
  })],
83
86
  whileElementsMounted: autoUpdate
@@ -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;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--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}
@@ -27,6 +27,7 @@ export declare const TEXT_STYLES: {
27
27
  readonly hero3: "hero-3";
28
28
  readonly hero4: "hero-4";
29
29
  readonly hero5: "hero-5";
30
+ readonly hero6: "hero-6";
30
31
  readonly editorial1: "editorial-1";
31
32
  readonly editorial2: "editorial-2";
32
33
  readonly editorial3: "editorial-3";
@@ -48,6 +48,7 @@ export const TEXT_STYLES = {
48
48
  hero3: 'hero-3',
49
49
  hero4: 'hero-4',
50
50
  hero5: 'hero-5',
51
+ hero6: 'hero-6',
51
52
  editorial1: 'editorial-1',
52
53
  editorial2: 'editorial-2',
53
54
  editorial3: 'editorial-3'
@@ -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-text{margin:0}.bpk-text--xs{font-size:.75rem;line-height:1rem;font-weight:400}.bpk-text--sm{font-size:.875rem;line-height:1.25rem;font-weight:400}.bpk-text--base{font-size:1rem;line-height:1.5rem;font-weight:400}.bpk-text--lg{font-size:1.25rem;line-height:1.75rem;font-weight:400}.bpk-text--xl{font-size:1.5rem;line-height:2rem;font-weight:400}.bpk-text--xxl{font-size:2rem;line-height:2.5rem;font-weight:700}.bpk-text--xxxl{font-size:2.5rem;line-height:3rem;font-weight:700}.bpk-text--xxxxl{font-size:3rem;line-height:3.5rem;font-weight:700;letter-spacing:-0.02em}.bpk-text--xxxxxl{font-size:4rem;line-height:4.5rem;font-weight:700;letter-spacing:-0.02em}.bpk-text--caption{font-size:.75rem;line-height:1rem;font-weight:400}.bpk-text--footnote{font-size:.875rem;line-height:1.25rem;font-weight:400}.bpk-text--label-1{font-size:1rem;line-height:1.5rem;font-weight:700}.bpk-text--label-2{font-size:.875rem;line-height:1.25rem;font-weight:700}.bpk-text--label-3{font-size:.75rem;line-height:1rem;font-weight:700}.bpk-text--body-default{font-size:1rem;line-height:1.5rem;font-weight:400}.bpk-text--body-longform{font-size:1.25rem;line-height:1.75rem;font-weight:400}.bpk-text--subheading{font-size:1.5rem;line-height:2rem;font-weight:400}.bpk-text--heading-1{font-size:2.5rem;line-height:3rem;font-weight:700}.bpk-text--heading-2{font-size:2rem;line-height:2.5rem;font-weight:700}.bpk-text--heading-3{font-size:1.5rem;line-height:1.75rem;font-weight:700}.bpk-text--heading-4{font-size:1.25rem;line-height:1.5rem;font-weight:700}.bpk-text--heading-5{font-size:1rem;line-height:1.25rem;font-weight:700}.bpk-text--hero-1{font-size:7.5rem;line-height:7.5rem;font-weight:700;letter-spacing:-0.02em}.bpk-text--hero-2{font-size:6rem;line-height:6rem;font-weight:700;letter-spacing:-0.02em}.bpk-text--hero-3{font-size:4.75rem;line-height:5.25rem;font-weight:700;letter-spacing:-0.02em}.bpk-text--hero-4{font-size:4rem;line-height:4.5rem;font-weight:700;letter-spacing:-0.02em}.bpk-text--hero-5{font-size:3rem;line-height:3.5rem;font-weight:700;letter-spacing:-0.02em}.bpk-text--editorial-1{font-family:"Larken","Noto Sans Arabic","Noto Sans Hebrew","Noto Serif","Noto Serif Devanagari","Noto Serif Thai","Noto Sans SC","Noto Sans TC","Noto Sans JP","Noto Sans KR",sans-serif;font-size:3rem;line-height:3.5rem;font-weight:300}.bpk-text--editorial-2{font-family:"Larken","Noto Sans Arabic","Noto Sans Hebrew","Noto Serif","Noto Serif Devanagari","Noto Serif Thai","Noto Sans SC","Noto Sans TC","Noto Sans JP","Noto Sans KR",sans-serif;font-size:2rem;line-height:2.5rem;font-weight:300}.bpk-text--editorial-3{font-family:"Larken","Noto Sans Arabic","Noto Sans Hebrew","Noto Serif","Noto Serif Devanagari","Noto Serif Thai","Noto Sans SC","Noto Sans TC","Noto Sans JP","Noto Sans KR",sans-serif;font-size:1.25rem;line-height:1.75rem;font-weight:400}
18
+ .bpk-text{margin:0}.bpk-text--xs{font-size:.75rem;line-height:1rem;font-weight:400}.bpk-text--sm{font-size:.875rem;line-height:1.25rem;font-weight:400}.bpk-text--base{font-size:1rem;line-height:1.5rem;font-weight:400}.bpk-text--lg{font-size:1.25rem;line-height:1.75rem;font-weight:400}.bpk-text--xl{font-size:1.5rem;line-height:2rem;font-weight:400}.bpk-text--xxl{font-size:2rem;line-height:2.5rem;font-weight:700}.bpk-text--xxxl{font-size:2.5rem;line-height:3rem;font-weight:700}.bpk-text--xxxxl{font-size:3rem;line-height:3.5rem;font-weight:700;letter-spacing:-0.02em}.bpk-text--xxxxxl{font-size:4rem;line-height:4rem;font-weight:700;letter-spacing:-0.02em}.bpk-text--caption{font-size:.75rem;line-height:1rem;font-weight:400}.bpk-text--footnote{font-size:.875rem;line-height:1.25rem;font-weight:400}.bpk-text--label-1{font-size:1rem;line-height:1.5rem;font-weight:700}.bpk-text--label-2{font-size:.875rem;line-height:1.25rem;font-weight:700}.bpk-text--label-3{font-size:.75rem;line-height:1rem;font-weight:700}.bpk-text--body-default{font-size:1rem;line-height:1.5rem;font-weight:400}.bpk-text--body-longform{font-size:1.25rem;line-height:1.75rem;font-weight:400}.bpk-text--subheading{font-size:1.5rem;line-height:2rem;font-weight:400}.bpk-text--heading-1{font-size:2.5rem;line-height:3rem;font-weight:700}.bpk-text--heading-2{font-size:2rem;line-height:2.5rem;font-weight:700}.bpk-text--heading-3{font-size:1.5rem;line-height:1.75rem;font-weight:700}.bpk-text--heading-4{font-size:1.25rem;line-height:1.5rem;font-weight:700}.bpk-text--heading-5{font-size:1rem;line-height:1.25rem;font-weight:700}.bpk-text--hero-1{font-size:7.5rem;line-height:7.5rem;font-weight:900;letter-spacing:-0.04em}.bpk-text--hero-2{font-size:6rem;line-height:6rem;font-weight:900;letter-spacing:-0.04em}.bpk-text--hero-3{font-size:4.75rem;line-height:4.75rem;font-weight:900;letter-spacing:-0.04em}.bpk-text--hero-4{font-size:4rem;line-height:4rem;font-weight:900;letter-spacing:-0.04em}.bpk-text--hero-5{font-size:3rem;line-height:3rem;font-weight:900;letter-spacing:-0.04em}.bpk-text--hero-6{font-size:2.5rem;line-height:2.5rem;font-weight:900;letter-spacing:-0.04em}.bpk-text--editorial-1{font-family:"Larken","Noto Sans Arabic","Noto Sans Hebrew","Noto Serif","Noto Serif Devanagari","Noto Serif Thai","Noto Sans SC","Noto Sans TC","Noto Sans JP","Noto Sans KR",sans-serif;font-size:3rem;line-height:3.5rem;font-weight:300}.bpk-text--editorial-2{font-family:"Larken","Noto Sans Arabic","Noto Sans Hebrew","Noto Serif","Noto Serif Devanagari","Noto Serif Thai","Noto Sans SC","Noto Sans TC","Noto Sans JP","Noto Sans KR",sans-serif;font-size:2rem;line-height:2.5rem;font-weight:300}.bpk-text--editorial-3{font-family:"Larken","Noto Sans Arabic","Noto Sans Hebrew","Noto Serif","Noto Serif Devanagari","Noto Serif Thai","Noto Sans SC","Noto Sans TC","Noto Sans JP","Noto Sans KR",sans-serif;font-size:1.25rem;line-height:1.75rem;font-weight:400}
@@ -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-theme-toggle__label{position:absolute;width:1px;height:1px;margin:-1px;padding:0;border:0;overflow:hidden;clip:rect(0 0 0 0)}
18
+ .bpk-theme-toggle__label{position:absolute;width:1px;height:1px;margin:-1px;padding:0;border:0;white-space:nowrap;overflow:hidden;clip:rect(0 0 0 0)}
@@ -560,8 +560,8 @@
560
560
  @include _bpk-text-factory(
561
561
  $bpk-font-size-8-xl,
562
562
  $bpk-line-height-8-xl,
563
- $bpk-font-weight-bold,
564
- $bpk-letter-spacing-tight
563
+ $bpk-font-weight-black,
564
+ $bpk-letter-spacing-hero
565
565
  );
566
566
  }
567
567
 
@@ -576,8 +576,8 @@
576
576
  @include _bpk-text-factory(
577
577
  $bpk-font-size-7-xl,
578
578
  $bpk-line-height-7-xl,
579
- $bpk-font-weight-bold,
580
- $bpk-letter-spacing-tight
579
+ $bpk-font-weight-black,
580
+ $bpk-letter-spacing-hero
581
581
  );
582
582
  }
583
583
 
@@ -592,8 +592,8 @@
592
592
  @include _bpk-text-factory(
593
593
  $bpk-font-size-6-xl,
594
594
  $bpk-line-height-6-xl,
595
- $bpk-font-weight-bold,
596
- $bpk-letter-spacing-tight
595
+ $bpk-font-weight-black,
596
+ $bpk-letter-spacing-hero
597
597
  );
598
598
  }
599
599
 
@@ -608,8 +608,8 @@
608
608
  @include _bpk-text-factory(
609
609
  $bpk-font-size-xxxxxl,
610
610
  $bpk-line-height-xxxxxl,
611
- $bpk-font-weight-bold,
612
- $bpk-letter-spacing-tight
611
+ $bpk-font-weight-black,
612
+ $bpk-letter-spacing-hero
613
613
  );
614
614
  }
615
615
 
@@ -623,9 +623,25 @@
623
623
  @mixin bpk-hero-5 {
624
624
  @include _bpk-text-factory(
625
625
  $bpk-font-size-xxxxl,
626
- $bpk-line-height-xxxxl,
627
- $bpk-font-weight-bold,
628
- $bpk-letter-spacing-tight
626
+ $bpk-line-height-xxxl,
627
+ $bpk-font-weight-black,
628
+ $bpk-letter-spacing-hero
629
+ );
630
+ }
631
+
632
+ /// Hero 6 text style
633
+ ///
634
+ /// @example scss
635
+ /// .selector {
636
+ /// @include bpk-hero-6;
637
+ /// }
638
+
639
+ @mixin bpk-hero-6 {
640
+ @include _bpk-text-factory(
641
+ $bpk-font-size-xxxl,
642
+ $bpk-line-height-xxl,
643
+ $bpk-font-weight-black,
644
+ $bpk-letter-spacing-hero
629
645
  );
630
646
  }
631
647
 
@@ -63,6 +63,7 @@
63
63
  margin: -1px; /* stylelint-disable-line unit-disallowed-list */
64
64
  padding: 0;
65
65
  border: 0;
66
+ white-space: nowrap;
66
67
  overflow: hidden;
67
68
  clip: rect(0 0 0 0);
68
69
  }
@@ -16,4 +16,4 @@
16
16
  * See the License for the specific language governing permissions and
17
17
  * limitations under the License.
18
18
  *
19
- *//*! normalize.css v4.1.1 | MIT License | github.com/necolas/normalize.css */html{font-family:sans-serif;line-height:1.15;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block}audio:not([controls]){display:none;height:0}progress{vertical-align:baseline}template,[hidden]{display:none}a{background-color:transparent;-webkit-text-decoration-skip:objects}a:active,a:hover{outline-width:0}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:inherit}b,strong{font-weight:bolder}dfn{font-style:italic}h1{font-size:2em;margin:.67em 0}mark{background-color:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}svg:not(:root){overflow:hidden}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}figure{margin:1em 40px}hr{box-sizing:content-box;height:0;overflow:visible}button,input,optgroup,select,textarea{font:inherit;margin:0}optgroup{font-weight:bold}button,input{overflow:visible}button,select{text-transform:none}button,html [type=button],[type=reset],[type=submit]{-webkit-appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-input-placeholder{color:inherit;opacity:.54}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}html{font-size:100%;box-sizing:border-box}*{box-sizing:inherit}*::before,*::after{box-sizing:inherit}body{color:#161616;font-family:"Skyscanner Relative",-apple-system,BlinkMacSystemFont,"Roboto","Oxygen","Ubuntu","Cantarell","Fira Sans","Droid Sans","Helvetica Neue",sans-serif;font-size:1rem;line-height:1.3rem}body.scaffold-font-size{font-size:13px}body.enable-font-smoothing{-webkit-font-smoothing:antialiased}:focus-visible{outline:.125rem solid #0062e3;outline-offset:.125rem}.hidden,.hide{display:none !important}.visuallyhidden,.visually-hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;border:0;overflow:hidden;clip:rect(0 0 0 0)}.visuallyhidden.focusable:active,.visuallyhidden.focusable:focus,.visually-hidden.focusable:active,.visually-hidden.focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}.invisible{visibility:hidden}.clearfix::before,.clearfix::after{content:"";display:table}.clearfix::after{clear:both}
19
+ *//*! normalize.css v4.1.1 | MIT License | github.com/necolas/normalize.css */html{font-family:sans-serif;line-height:1.15;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block}audio:not([controls]){display:none;height:0}progress{vertical-align:baseline}template,[hidden]{display:none}a{background-color:transparent;-webkit-text-decoration-skip:objects}a:active,a:hover{outline-width:0}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:inherit}b,strong{font-weight:bolder}dfn{font-style:italic}h1{font-size:2em;margin:.67em 0}mark{background-color:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}svg:not(:root){overflow:hidden}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}figure{margin:1em 40px}hr{box-sizing:content-box;height:0;overflow:visible}button,input,optgroup,select,textarea{font:inherit;margin:0}optgroup{font-weight:bold}button,input{overflow:visible}button,select{text-transform:none}button,html [type=button],[type=reset],[type=submit]{-webkit-appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-input-placeholder{color:inherit;opacity:.54}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}html{font-size:100%;box-sizing:border-box}*{box-sizing:inherit}*::before,*::after{box-sizing:inherit}body{color:#161616;font-family:"Skyscanner Relative",-apple-system,BlinkMacSystemFont,"Roboto","Oxygen","Ubuntu","Cantarell","Fira Sans","Droid Sans","Helvetica Neue",sans-serif;font-size:1rem;line-height:1.3rem}body.scaffold-font-size{font-size:13px}body.enable-font-smoothing{-webkit-font-smoothing:antialiased}:focus-visible{outline:.125rem solid #0062e3;outline-offset:.125rem}.hidden,.hide{display:none !important}.visuallyhidden,.visually-hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;border:0;white-space:nowrap;overflow:hidden;clip:rect(0 0 0 0)}.visuallyhidden.focusable:active,.visuallyhidden.focusable:focus,.visually-hidden.focusable:active,.visually-hidden.focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}.invisible{visibility:hidden}.clearfix::before,.clearfix::after{content:"";display:table}.clearfix::after{clear:both}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skyscanner/backpack-web",
3
- "version": "34.5.0",
3
+ "version": "34.7.0",
4
4
  "description": "Backpack Design System web library",
5
5
  "repository": {
6
6
  "type": "git",
@@ -26,7 +26,7 @@
26
26
  "@popperjs/core": "^2.11.8",
27
27
  "@radix-ui/react-slider": "^1.1.2",
28
28
  "@react-google-maps/api": "^2.12.0",
29
- "@skyscanner/bpk-foundations-web": "^17.14.0",
29
+ "@skyscanner/bpk-foundations-web": "^18.1.0",
30
30
  "@skyscanner/bpk-svgs": "^19.3.0",
31
31
  "a11y-focus-scope": "^1.1.3",
32
32
  "a11y-focus-store": "^1.0.0",
@@ -560,8 +560,8 @@
560
560
  @include _bpk-text-factory(
561
561
  tokens.$bpk-font-size-8-xl,
562
562
  tokens.$bpk-line-height-8-xl,
563
- tokens.$bpk-font-weight-bold,
564
- tokens.$bpk-letter-spacing-tight
563
+ tokens.$bpk-font-weight-black,
564
+ tokens.$bpk-letter-spacing-hero
565
565
  );
566
566
  }
567
567
 
@@ -576,8 +576,8 @@
576
576
  @include _bpk-text-factory(
577
577
  tokens.$bpk-font-size-7-xl,
578
578
  tokens.$bpk-line-height-7-xl,
579
- tokens.$bpk-font-weight-bold,
580
- tokens.$bpk-letter-spacing-tight
579
+ tokens.$bpk-font-weight-black,
580
+ tokens.$bpk-letter-spacing-hero
581
581
  );
582
582
  }
583
583
 
@@ -592,8 +592,8 @@
592
592
  @include _bpk-text-factory(
593
593
  tokens.$bpk-font-size-6-xl,
594
594
  tokens.$bpk-line-height-6-xl,
595
- tokens.$bpk-font-weight-bold,
596
- tokens.$bpk-letter-spacing-tight
595
+ tokens.$bpk-font-weight-black,
596
+ tokens.$bpk-letter-spacing-hero
597
597
  );
598
598
  }
599
599
 
@@ -608,8 +608,8 @@
608
608
  @include _bpk-text-factory(
609
609
  tokens.$bpk-font-size-xxxxxl,
610
610
  tokens.$bpk-line-height-xxxxxl,
611
- tokens.$bpk-font-weight-bold,
612
- tokens.$bpk-letter-spacing-tight
611
+ tokens.$bpk-font-weight-black,
612
+ tokens.$bpk-letter-spacing-hero
613
613
  );
614
614
  }
615
615
 
@@ -623,9 +623,25 @@
623
623
  @mixin bpk-hero-5 {
624
624
  @include _bpk-text-factory(
625
625
  tokens.$bpk-font-size-xxxxl,
626
- tokens.$bpk-line-height-xxxxl,
627
- tokens.$bpk-font-weight-bold,
628
- tokens.$bpk-letter-spacing-tight
626
+ tokens.$bpk-line-height-xxxl,
627
+ tokens.$bpk-font-weight-black,
628
+ tokens.$bpk-letter-spacing-hero
629
+ );
630
+ }
631
+
632
+ /// Hero 6 text style
633
+ ///
634
+ /// @example scss
635
+ /// .selector {
636
+ /// @include bpk-hero-6;
637
+ /// }
638
+
639
+ @mixin bpk-hero-6 {
640
+ @include _bpk-text-factory(
641
+ tokens.$bpk-font-size-xxxl,
642
+ tokens.$bpk-line-height-xxl,
643
+ tokens.$bpk-font-weight-black,
644
+ tokens.$bpk-letter-spacing-hero
629
645
  );
630
646
  }
631
647
 
@@ -64,6 +64,7 @@
64
64
  margin: -1px; /* stylelint-disable-line unit-disallowed-list */
65
65
  padding: 0;
66
66
  border: 0;
67
+ white-space: nowrap;
67
68
  overflow: hidden;
68
69
  clip: rect(0 0 0 0);
69
70
  }