@skyscanner/backpack-web 31.4.1-dev.0 → 31.6.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 (25) hide show
  1. package/README.md +1 -0
  2. package/bpk-component-autosuggest/src/BpkAutosuggestSuggestion.js +4 -4
  3. package/bpk-component-bottom-sheet/index.d.ts +22 -0
  4. package/bpk-component-bottom-sheet/index.js +20 -0
  5. package/bpk-component-bottom-sheet/src/BpkBottomSheet.d.ts +40 -0
  6. package/bpk-component-bottom-sheet/src/BpkBottomSheet.js +68 -0
  7. package/bpk-component-bottom-sheet/src/BpkBottomSheet.module.css +18 -0
  8. package/bpk-component-bottom-sheet/src/BpkBottomSheetInner.d.ts +28 -0
  9. package/bpk-component-bottom-sheet/src/BpkBottomSheetInner.js +95 -0
  10. package/bpk-component-bottom-sheet/src/BpkBottomSheetInner.module.css +18 -0
  11. package/bpk-component-link/src/BpkLink.module.css +1 -1
  12. package/bpk-component-modal/src/BpkModalInner.js +0 -1
  13. package/bpk-component-navigation-bar/index.js +4 -2
  14. package/bpk-component-navigation-bar/src/BpkNavigationBar.js +24 -26
  15. package/bpk-component-navigation-bar/src/BpkNavigationBar.module.css +1 -1
  16. package/bpk-component-navigation-bar/src/BpkNavigationBarButtonLink.js +10 -11
  17. package/bpk-component-navigation-bar/src/BpkNavigationBarButtonLink.module.css +1 -1
  18. package/bpk-component-navigation-bar/src/BpkNavigationBarIconButton.js +10 -11
  19. package/bpk-component-navigation-bar/src/BpkNavigationBarIconButton.module.css +1 -1
  20. package/bpk-component-navigation-bar/src/themeAttributes.js +3 -1
  21. package/bpk-stylesheets/base.css +1 -1
  22. package/bpk-stylesheets/index.scss +45 -47
  23. package/package.json +1 -1
  24. package/bpk-component-flare/src/corner-radius.d.ts +0 -6
  25. package/bpk-component-flare/src/pointer.d.ts +0 -6
package/README.md CHANGED
@@ -31,6 +31,7 @@ To contribute please see [contributing.md](CONTRIBUTING.md).
31
31
  [`bpk-component-banner-alert`](/packages/bpk-component-banner-alert)
32
32
  [`bpk-component-barchart`](/packages/bpk-component-barchart)
33
33
  [`bpk-component-blockquote`](/packages/bpk-component-blockquote)
34
+ [`bpk-component-bottom-sheet`](/packages/bpk-component-bottom-sheet)
34
35
  [`bpk-component-breadcrumb`](/packages/bpk-component-breadcrumb)
35
36
  [`bpk-component-breakpoint`](/packages/bpk-component-breakpoint)
36
37
  [`bpk-component-button`](/packages/bpk-component-button)
@@ -20,7 +20,7 @@ import STYLES from "./BpkAutosuggest.module.css";
20
20
  import { jsx as _jsx } from "react/jsx-runtime";
21
21
  import { jsxs as _jsxs } from "react/jsx-runtime";
22
22
  const getClassName = cssModules(STYLES);
23
- const BpkSuggestion = props => {
23
+ const BpkAutosuggestSuggestion = props => {
24
24
  const classNames = [getClassName('bpk-autosuggest__suggestion')];
25
25
  const {
26
26
  className,
@@ -67,7 +67,7 @@ const BpkSuggestion = props => {
67
67
  })
68
68
  );
69
69
  };
70
- BpkSuggestion.propTypes = {
70
+ BpkAutosuggestSuggestion.propTypes = {
71
71
  value: PropTypes.node.isRequired,
72
72
  subHeading: PropTypes.node,
73
73
  tertiaryLabel: PropTypes.string,
@@ -75,11 +75,11 @@ BpkSuggestion.propTypes = {
75
75
  indent: PropTypes.bool,
76
76
  className: PropTypes.string
77
77
  };
78
- BpkSuggestion.defaultProps = {
78
+ BpkAutosuggestSuggestion.defaultProps = {
79
79
  subHeading: null,
80
80
  tertiaryLabel: null,
81
81
  icon: null,
82
82
  indent: false,
83
83
  className: null
84
84
  };
85
- export default BpkSuggestion;
85
+ export default BpkAutosuggestSuggestion;
@@ -0,0 +1,22 @@
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 BpkBottomSheet from './src/BpkBottomSheet';
20
+ import type { Props } from './src/BpkBottomSheet';
21
+ export type BpkBottomSheetProps = Props;
22
+ export default BpkBottomSheet;
@@ -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 BpkBottomSheet from "./src/BpkBottomSheet";
20
+ export default BpkBottomSheet;
@@ -0,0 +1,40 @@
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 type { ReactNode } from 'react';
20
+ import type { Props as BottomSheetProps } from './BpkBottomSheet';
21
+ export type Props = Partial<BottomSheetProps> & {
22
+ children: ReactNode;
23
+ closeLabel?: string;
24
+ closeOnEscPressed?: boolean;
25
+ closeOnScrimClick?: boolean;
26
+ id: string;
27
+ isOpen: boolean;
28
+ onClose: () => void;
29
+ title?: string;
30
+ /**
31
+ * Because this component uses a modal on mobile viewports, you need to let it know what
32
+ * the root element of your application is by returning its DOM node via this prop
33
+ * This is to "hide" your application from screen readers whilst the modal is open.
34
+ * The "pagewrap" element id is a convention we use internally at Skyscanner. In most cases it should "just work".
35
+ */
36
+ getApplicationElement: () => HTMLElement | null;
37
+ renderTarget?: null | HTMLElement | (() => null | HTMLElement);
38
+ };
39
+ declare const BpkBottomSheet: ({ closeLabel, closeOnEscPressed, closeOnScrimClick, id, isOpen, onClose, title, renderTarget, ...rest }: Props) => JSX.Element;
40
+ export default BpkBottomSheet;
@@ -0,0 +1,68 @@
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
+ import { useState } from "react";
19
+ import { Portal, cssModules } from "../../bpk-react-utils";
20
+ import { withScrim } from "../../bpk-scrim-utils";
21
+ import STYLES from "./BpkBottomSheet.module.css";
22
+ import BpkBottomSheetInner from "./BpkBottomSheetInner";
23
+ import { jsx as _jsx } from "react/jsx-runtime";
24
+ const getClassName = cssModules(STYLES);
25
+ const ScrimBpkBottomSheetInner = withScrim(BpkBottomSheetInner);
26
+ const BpkBottomSheet = ({
27
+ actionText = '',
28
+ closeLabel = '',
29
+ closeOnEscPressed = false,
30
+ closeOnScrimClick = false,
31
+ id,
32
+ isOpen,
33
+ onAction = () => null,
34
+ onClose,
35
+ renderTarget,
36
+ title = '',
37
+ wide = false,
38
+ ...rest
39
+ }) => {
40
+ const [exiting, setExitting] = useState(false);
41
+ const handleClose = () => {
42
+ setExitting(true);
43
+ setTimeout(() => {
44
+ onClose();
45
+ setExitting(false);
46
+ }, 240);
47
+ };
48
+ return /*#__PURE__*/_jsx(Portal, {
49
+ isOpen: isOpen,
50
+ onClose: handleClose,
51
+ closeOnEscPressed: closeOnEscPressed,
52
+ renderTarget: renderTarget,
53
+ children: /*#__PURE__*/_jsx(ScrimBpkBottomSheetInner, {
54
+ id: id,
55
+ onClose: handleClose,
56
+ closeOnScrimClick: closeOnScrimClick,
57
+ containerClassName: getClassName('bpk-bottom-sheet--container'),
58
+ title: title,
59
+ closeLabel: closeLabel,
60
+ actionText: actionText,
61
+ onAction: onAction,
62
+ wide: wide,
63
+ exiting: exiting,
64
+ ...rest
65
+ })
66
+ });
67
+ };
68
+ export default BpkBottomSheet;
@@ -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
+ @keyframes bpk-keyframe-spin{100%{transform:rotate(1turn)}}.bpk-bottom-sheet--container{display:flex;padding:1.5rem}@media (max-width: 32rem){.bpk-bottom-sheet--container{padding:0;overflow:hidden}}
@@ -0,0 +1,28 @@
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 type { ReactNode } from 'react';
20
+ export type Props = {
21
+ children: ReactNode;
22
+ closeLabel?: string;
23
+ id: string;
24
+ onClose: () => void;
25
+ title?: string;
26
+ };
27
+ declare const BpkBottomSheetInner: ({ children, closeLabel, id, onClose, title, }: Props) => JSX.Element;
28
+ export default BpkBottomSheetInner;
@@ -0,0 +1,95 @@
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
+ // @ts-expect-error Untyped import. See `decisions/imports-ts-suppressions.md`.
20
+ import CSSTransition from 'react-transition-group/CSSTransition';
21
+
22
+ // @ts-expect-error Untyped import. See `decisions/imports-ts-suppressions.md`.
23
+ import { BpkButtonLink } from "../../bpk-component-link";
24
+ // @ts-expect-error Untyped import. See `decisions/imports-ts-suppressions.md`.
25
+ import BpkCloseButton from "../../bpk-component-close-button";
26
+ import BpkNavigationBar from "../../bpk-component-navigation-bar";
27
+ import { cssModules } from "../../bpk-react-utils";
28
+ import STYLES from "./BpkBottomSheetInner.module.css";
29
+ import { jsx as _jsx } from "react/jsx-runtime";
30
+ import { jsxs as _jsxs } from "react/jsx-runtime";
31
+ const getClassName = cssModules(STYLES);
32
+ const BpkBottomSheetInner = ({
33
+ actionText = '',
34
+ children,
35
+ closeLabel = '',
36
+ exiting,
37
+ id,
38
+ onAction = () => null,
39
+ onClose,
40
+ title = '',
41
+ wide = false
42
+ }) => {
43
+ const classNames = getClassName('bpk-bottom-sheet', wide && 'bpk-bottom-sheet--wide');
44
+ const headingId = `bpk-bottom-sheet-heading-${id}`;
45
+ return /*#__PURE__*/_jsx(CSSTransition, {
46
+ classNames: {
47
+ appear: getClassName('bpk-bottom-sheet--appear'),
48
+ appearActive: getClassName('bpk-bottom-sheet--appear-active'),
49
+ exit: getClassName('bpk-bottom-sheet--exit')
50
+ },
51
+ in: !exiting,
52
+ appear: !exiting,
53
+ out: exiting,
54
+ exit: exiting,
55
+ timeout: {
56
+ appear: 240,
57
+ exit: 240
58
+ },
59
+ children: /*#__PURE__*/_jsxs("section", {
60
+ id: id,
61
+ tabIndex: -1,
62
+ role: "dialog",
63
+ "aria-labelledby": headingId,
64
+ className: classNames,
65
+ children: [/*#__PURE__*/_jsx("header", {
66
+ className: getClassName('bpk-bottom-sheet--header'),
67
+ children: /*#__PURE__*/_jsx(BpkNavigationBar, {
68
+ id: headingId,
69
+ className: getClassName('bpk-bottom-sheet--navigation'),
70
+ title: /*#__PURE__*/_jsx("h2", {
71
+ id: headingId,
72
+ className: getClassName('bpk-bottom-sheet--heading'),
73
+ children: title
74
+ }),
75
+ leadingButton: /*#__PURE__*/_jsx(BpkCloseButton, {
76
+ className: getClassName('bpk-bottom-sheet--close-button'),
77
+ label: closeLabel,
78
+ onClick: onClose
79
+ }),
80
+ trailingButton: actionText && onAction ? /*#__PURE__*/_jsx(BpkButtonLink, {
81
+ className: getClassName('bpk-bottom-sheet--action-button'),
82
+ onClick: onAction,
83
+ children: actionText
84
+ }) : /*#__PURE__*/_jsx("div", {
85
+ className: getClassName('bpk-bottom-sheet--action-button')
86
+ })
87
+ })
88
+ }), /*#__PURE__*/_jsx("div", {
89
+ className: getClassName('bpk-bottom-sheet--content'),
90
+ children: children
91
+ })]
92
+ })
93
+ });
94
+ };
95
+ export default BpkBottomSheetInner;
@@ -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
+ @keyframes bpk-keyframe-spin{100%{transform:rotate(1turn)}}.bpk-bottom-sheet{z-index:1100;width:100%;max-width:32rem;margin:auto;transform:scale(1);transition:opacity 200ms ease-in-out,transform 200ms ease-in-out;outline:0;background-color:#fff;opacity:1;overflow:hidden;-webkit-tap-highlight-color:transparent;box-shadow:0px 12px 50px 0px rgba(37,32,31,0.25);border-radius:.5rem}@media (max-width: 32rem){.bpk-bottom-sheet{height:fit-content;max-height:90%;margin-bottom:0;border-radius:1.5rem 1.5rem 0 0;overflow-x:hidden;overflow-y:scroll;-ms-overflow-style:none;scrollbar-width:none}.bpk-bottom-sheet::-webkit-scrollbar{display:none}}.bpk-bottom-sheet--content{padding:1rem;flex:1;overflow-y:auto}@media (min-width: 32.0625rem){.bpk-bottom-sheet--wide{max-width:64rem}}@keyframes slide-up{0%{transform:translateY(100%)}100%{transform:translateY(0%)}}.bpk-bottom-sheet--appear{animation-duration:0.24s;animation-name:slide-up;animation-timing-function:ease-in-out}@media (min-width: 32.0625rem){.bpk-bottom-sheet--appear{transform:scale(0.9);opacity:0;animation:none}}@media (min-width: 32.0625rem){.bpk-bottom-sheet--appear-active{transform:scale(1);opacity:1}}.bpk-bottom-sheet--exit{animation-direction:reverse;animation-duration:0.24s;animation-name:slide-up;animation-timing-function:ease-in-out}@media (min-width: 32.0625rem){.bpk-bottom-sheet--exit{animation:none}}.bpk-bottom-sheet--header{position:sticky;top:0;z-index:899;box-shadow:0 -1px 0 0 #c2c9cd inset}.bpk-bottom-sheet--navigation{display:flex;justify-content:space-between;background-color:#fff}.bpk-bottom-sheet--heading{width:calc( 100% - ((3rem) * 2 + 0.25rem / 2));margin-right:auto;text-align:center;margin:0;font-size:1rem;line-height:1.5rem;font-weight:700}.bpk-bottom-sheet--close-button{position:relative;left:auto;margin-right:1.5rem}html[dir='rtl'] .bpk-bottom-sheet--close-button{right:auto;margin-right:calc(-0.25rem / 2);margin-left:1.5rem}.bpk-bottom-sheet--action-button{position:relative;right:auto;width:calc(3rem - (0.25rem));margin-right:calc(0.25rem / 2);margin-left:calc(0.25rem);word-break:break-all}html[dir='rtl'] .bpk-bottom-sheet--action-button{left:auto;margin-right:calc(0.25rem);margin-left:calc(0.25rem / 2)}
@@ -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
- @layer component{@keyframes bpk-keyframe-spin{100%{transform:rotate(1turn)}}.bpk-link{padding:0;border:0;background-color:transparent;text-decoration:none;cursor:pointer;appearance:none;color:#0062e3;color:var(--bpk-link-color, #0062e3)}.bpk-no-touch-support .bpk-link:hover:not(:active):not(:disabled){text-decoration:underline;color:#0062e3;color:var(--bpk-link-hover-color, #0062e3)}:global(.bpk-no-touch-support) .bpk-link:hover:not(:active):not(:disabled){text-decoration:underline;color:#0062e3;color:var(--bpk-link-hover-color, #0062e3)}.bpk-link:visited{color:#0062e3;color:var(--bpk-link-visited-color, #0062e3)}.bpk-link:active{text-decoration:underline;color:#0062e3;color:var(--bpk-link-active-color, #0062e3)}.bpk-link--active{color:#0062e3}.bpk-link--active:visited{color:#0062e3}.bpk-link--active:active{color:#0062e3}.bpk-link--alternate{color:#fff;color:var(--bpk-link-alternate-color, #fff)}.bpk-no-touch-support .bpk-link--alternate:hover:not(:active):not(:disabled){color:#fff;color:var(--bpk-link-alternate-hover-color, #fff)}:global(.bpk-no-touch-support) .bpk-link--alternate:hover:not(:active):not(:disabled){color:#fff;color:var(--bpk-link-alternate-hover-color, #fff)}.bpk-link--alternate:visited{color:#fff;color:var(--bpk-link-alternate-visited-color, #fff)}.bpk-link--alternate:active{color:#fff;color:var(--bpk-link-alternate-active-color, #fff)}}
18
+ @keyframes bpk-keyframe-spin{100%{transform:rotate(1turn)}}.bpk-link{padding:0;border:0;background-color:transparent;text-decoration:none;cursor:pointer;appearance:none;color:#0062e3;color:var(--bpk-link-color, #0062e3)}.bpk-no-touch-support .bpk-link:hover:not(:active):not(:disabled){text-decoration:underline;color:#0062e3;color:var(--bpk-link-hover-color, #0062e3)}:global(.bpk-no-touch-support) .bpk-link:hover:not(:active):not(:disabled){text-decoration:underline;color:#0062e3;color:var(--bpk-link-hover-color, #0062e3)}.bpk-link:visited{color:#0062e3;color:var(--bpk-link-visited-color, #0062e3)}.bpk-link:active{text-decoration:underline;color:#0062e3;color:var(--bpk-link-active-color, #0062e3)}.bpk-link--active{color:#0062e3}.bpk-link--active:visited{color:#0062e3}.bpk-link--active:active{color:#0062e3}.bpk-link--alternate{color:#fff;color:var(--bpk-link-alternate-color, #fff)}.bpk-no-touch-support .bpk-link--alternate:hover:not(:active):not(:disabled){color:#fff;color:var(--bpk-link-alternate-hover-color, #fff)}:global(.bpk-no-touch-support) .bpk-link--alternate:hover:not(:active):not(:disabled){color:#fff;color:var(--bpk-link-alternate-hover-color, #fff)}.bpk-link--alternate:visited{color:#fff;color:var(--bpk-link-alternate-visited-color, #fff)}.bpk-link--alternate:active{color:#fff;color:var(--bpk-link-alternate-active-color, #fff)}
@@ -20,7 +20,6 @@
20
20
  import { BpkButtonLink } from "../../bpk-component-link";
21
21
  // @ts-expect-error Untyped import. See `decisions/imports-ts-suppressions.md`.
22
22
  import BpkCloseButton from "../../bpk-component-close-button";
23
- // @ts-expect-error Untyped import. See `decisions/imports-ts-suppressions.md`.
24
23
  import BpkNavigationBar from "../../bpk-component-navigation-bar";
25
24
  import { TransitionInitialMount, cssModules } from "../../bpk-react-utils";
26
25
  import STYLES from "./BpkModalInner.module.css";
@@ -14,9 +14,11 @@
14
14
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
15
  * See the License for the specific language governing permissions and
16
16
  * limitations under the License.
17
- */import BpkNavigationBar from "./src/BpkNavigationBar";
17
+ */
18
+
19
+ import BpkNavigationBar, { BAR_STYLES } from "./src/BpkNavigationBar";
18
20
  import BpkNavigationBarIconButton from "./src/BpkNavigationBarIconButton";
19
21
  import BpkNavigationBarButtonLink from "./src/BpkNavigationBarButtonLink";
20
22
  import themeAttributes from "./src/themeAttributes";
21
- export { BpkNavigationBarIconButton, BpkNavigationBarButtonLink, themeAttributes };
23
+ export { BpkNavigationBarIconButton, BpkNavigationBarButtonLink, themeAttributes, BAR_STYLES };
22
24
  export default BpkNavigationBar;
@@ -14,7 +14,9 @@
14
14
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
15
  * See the License for the specific language governing permissions and
16
16
  * limitations under the License.
17
- */import { cloneElement } from 'react';
17
+ */
18
+
19
+ import { cloneElement } from 'react';
18
20
  import PropTypes from 'prop-types';
19
21
  import { cssModules } from "../../bpk-react-utils";
20
22
  import BpkText, { TEXT_STYLES } from "../../bpk-component-text";
@@ -22,8 +24,12 @@ import STYLES from "./BpkNavigationBar.module.css";
22
24
  import { jsx as _jsx } from "react/jsx-runtime";
23
25
  import { jsxs as _jsxs } from "react/jsx-runtime";
24
26
  const getClassNames = cssModules(STYLES);
25
- const cloneWithClass = (elem, newStyle) => {
26
- const className = getClassNames(elem.props.className, newStyle);
27
+ export const BAR_STYLES = {
28
+ 'default': 'default',
29
+ onDark: 'on-dark'
30
+ };
31
+ const cloneWithClasses = (elem, ...newStyles) => {
32
+ const className = getClassNames(elem.props.className, ...newStyles);
27
33
  return /*#__PURE__*/cloneElement(elem, {
28
34
  ...elem.props,
29
35
  className
@@ -31,10 +37,11 @@ const cloneWithClass = (elem, newStyle) => {
31
37
  };
32
38
  const BpkNavigationBar = props => {
33
39
  const {
40
+ barStyle = BAR_STYLES.default,
34
41
  className,
35
42
  id,
36
43
  leadingButton,
37
- sticky,
44
+ sticky = false,
38
45
  title,
39
46
  trailingButton,
40
47
  ...rest
@@ -43,21 +50,17 @@ const BpkNavigationBar = props => {
43
50
  // If the title is a component that sets its own id we want the aria-labelledby on the nav to match this so it can find the element
44
51
  // Otherwise if its just a string we set the id on the title component.
45
52
  const titleId = typeof title === 'string' ? `${id}-bpk-navigation-bar-title` : id;
46
- return (
47
- /*#__PURE__*/
48
- // $FlowFixMe[cannot-spread-inexact] - inexact rest. See 'decisions/flowfixme.md'.
49
- _jsxs("nav", {
50
- "aria-labelledby": titleId,
51
- className: getClassNames('bpk-navigation-bar', sticky && 'bpk-navigation-bar__sticky', className),
52
- ...rest,
53
- children: [leadingButton && cloneWithClass(leadingButton, 'bpk-navigation-bar__leading-item'), typeof title === 'string' ? /*#__PURE__*/_jsx(BpkText, {
54
- id: titleId,
55
- textStyle: TEXT_STYLES.heading5,
56
- className: getClassNames('bpk-navigation-bar__title'),
57
- children: title
58
- }) : title, trailingButton && cloneWithClass(trailingButton, 'bpk-navigation-bar__trailing-item')]
59
- })
60
- );
53
+ return /*#__PURE__*/_jsxs("nav", {
54
+ "aria-labelledby": titleId,
55
+ className: getClassNames('bpk-navigation-bar', `bpk-navigation-bar--${barStyle}`, sticky && 'bpk-navigation-bar__sticky', className),
56
+ ...rest,
57
+ children: [leadingButton && cloneWithClasses(leadingButton, 'bpk-navigation-bar__leading-item', `bpk-navigation-bar__leading-item--${barStyle}`), typeof title === 'string' ? /*#__PURE__*/_jsx(BpkText, {
58
+ id: titleId,
59
+ textStyle: TEXT_STYLES.heading5,
60
+ className: getClassNames('bpk-navigation-bar__title', `bpk-navigation-bar__title--${barStyle}`),
61
+ children: title
62
+ }) : title, trailingButton && cloneWithClasses(trailingButton, 'bpk-navigation-bar__trailing-item', `bpk-navigation-bar__trailing-item--${barStyle}`)]
63
+ });
61
64
  };
62
65
  BpkNavigationBar.propTypes = {
63
66
  id: PropTypes.string.isRequired,
@@ -65,12 +68,7 @@ BpkNavigationBar.propTypes = {
65
68
  className: PropTypes.string,
66
69
  leadingButton: PropTypes.element,
67
70
  trailingButton: PropTypes.element,
68
- sticky: PropTypes.bool
69
- };
70
- BpkNavigationBar.defaultProps = {
71
- className: null,
72
- leadingButton: null,
73
- trailingButton: null,
74
- sticky: false
71
+ sticky: PropTypes.bool,
72
+ barStyle: PropTypes.oneOf(Object.values(BAR_STYLES))
75
73
  };
76
74
  export default BpkNavigationBar;
@@ -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
- @keyframes bpk-keyframe-spin{100%{transform:rotate(1turn)}}.bpk-navigation-bar{position:relative;display:flex;min-height:3.5rem;padding:1rem;flex-direction:row;justify-content:center;align-items:center;background-color:#fff;background-color:var(--bpk-navigation-bar-background-color, #fff)}.bpk-navigation-bar__title{color:#161616;color:var(--bpk-navigation-bar-title-color, #161616)}.bpk-navigation-bar__leading-item,.bpk-navigation-bar__trailing-item{position:absolute;font-size:.875rem;line-height:1.25rem;font-weight:700}.bpk-navigation-bar__leading-item{left:1rem}html[dir='rtl'] .bpk-navigation-bar__leading-item{right:1rem;left:auto}.bpk-navigation-bar__trailing-item{right:1rem}html[dir='rtl'] .bpk-navigation-bar__trailing-item{right:auto;left:1rem}.bpk-navigation-bar__sticky{position:sticky;top:0;z-index:899;box-shadow:0px 1px 3px 0px rgba(37,32,31,0.3)}
18
+ @keyframes bpk-keyframe-spin{100%{transform:rotate(1turn)}}.bpk-navigation-bar{position:relative;display:flex;min-height:3.5rem;padding:1rem;flex-direction:row;justify-content:center;align-items:center;background-color:#fff;background-color:var(--bpk-navigation-bar-background-color, #fff)}.bpk-navigation-bar--on-dark{background-color:#05203c}.bpk-navigation-bar__title{color:#161616;color:var(--bpk-navigation-bar-title-color, #161616)}.bpk-navigation-bar__title--on-dark{color:#fff}.bpk-navigation-bar__leading-item,.bpk-navigation-bar__trailing-item{position:absolute;font-size:.875rem;line-height:1.25rem;font-weight:700}.bpk-navigation-bar__leading-item{left:1rem}html[dir='rtl'] .bpk-navigation-bar__leading-item{right:1rem;left:auto}.bpk-navigation-bar__trailing-item{right:1rem}html[dir='rtl'] .bpk-navigation-bar__trailing-item{right:auto;left:1rem}.bpk-navigation-bar__sticky{position:sticky;top:0;z-index:899;box-shadow:0px 1px 3px 0px rgba(37,32,31,0.3)}
@@ -14,32 +14,31 @@
14
14
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
15
  * See the License for the specific language governing permissions and
16
16
  * limitations under the License.
17
- */import PropTypes from 'prop-types';
17
+ */
18
18
 
19
- // TODO: close button is not really only a close button, we should rename and update the import here
19
+ import PropTypes from 'prop-types';
20
+
21
+ // @ts-expect-error Untyped import. See `decisions/imports-ts-suppressions.md`.
20
22
  import { BpkButtonLink } from "../../bpk-component-link";
21
23
  import { cssModules } from "../../bpk-react-utils";
22
24
  import STYLES from "./BpkNavigationBarButtonLink.module.css";
25
+ import { BAR_STYLES } from "./BpkNavigationBar";
23
26
  import { jsx as _jsx } from "react/jsx-runtime";
24
27
  const getClassName = cssModules(STYLES);
25
28
  const BpkNavigationBarButtonLink = ({
29
+ barStyle = BAR_STYLES.default,
26
30
  children,
27
31
  className,
28
32
  ...rest
29
- }) =>
30
- /*#__PURE__*/
31
- // $FlowFixMe[cannot-spread-inexact] - inexact rest. See 'decisions/flowfixme.md'.
32
- _jsx(BpkButtonLink, {
33
- className: getClassName('bpk-navigation-bar-button-link', className),
33
+ }) => /*#__PURE__*/_jsx(BpkButtonLink, {
34
+ className: getClassName('bpk-navigation-bar-button-link', `bpk-navigation-bar-button-link--${barStyle}`, className),
34
35
  ...rest,
35
36
  children: children
36
37
  });
37
38
  BpkNavigationBarButtonLink.propTypes = {
38
39
  children: PropTypes.node.isRequired,
39
40
  onClick: PropTypes.func.isRequired,
40
- className: PropTypes.string
41
- };
42
- BpkNavigationBarButtonLink.defaultProps = {
43
- className: null
41
+ className: PropTypes.string,
42
+ barStyle: PropTypes.oneOf(Object.values(BAR_STYLES))
44
43
  };
45
44
  export default BpkNavigationBarButtonLink;
@@ -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
- @keyframes bpk-keyframe-spin{100%{transform:rotate(1turn)}}.bpk-navigation-bar-button-link{color:#161616;color:var(--bpk-navigation-bar-button-link-color, #161616)}.bpk-no-touch-support .bpk-navigation-bar-button-link:hover:not(:active):not(:disabled){color:#161616;color:var(--bpk-navigation-bar-button-link-hover-color, #161616)}:global(.bpk-no-touch-support) .bpk-navigation-bar-button-link:hover:not(:active):not(:disabled){color:#161616;color:var(--bpk-navigation-bar-button-link-hover-color, #161616)}.bpk-navigation-bar-button-link:active{color:#161616;color:var(--bpk-navigation-bar-button-link-active-color, #161616)}.bpk-navigation-bar-button-link:visited{color:#161616;color:var(--bpk-navigation-bar-button-link-visited-color, #161616)}
18
+ @keyframes bpk-keyframe-spin{100%{transform:rotate(1turn)}}.bpk-navigation-bar-button-link{color:#161616;color:var(--bpk-navigation-bar-button-link-color, #161616)}.bpk-no-touch-support .bpk-navigation-bar-button-link:hover:not(:active):not(:disabled){color:#161616;color:var(--bpk-navigation-bar-button-link-hover-color, #161616)}:global(.bpk-no-touch-support) .bpk-navigation-bar-button-link:hover:not(:active):not(:disabled){color:#161616;color:var(--bpk-navigation-bar-button-link-hover-color, #161616)}.bpk-navigation-bar-button-link:active{color:#161616;color:var(--bpk-navigation-bar-button-link-active-color, #161616)}.bpk-navigation-bar-button-link:visited{color:#161616;color:var(--bpk-navigation-bar-button-link-visited-color, #161616)}.bpk-navigation-bar-button-link--on-dark{color:#fff}.bpk-no-touch-support .bpk-navigation-bar-button-link--on-dark:hover:not(:active):not(:disabled){color:#fff}:global(.bpk-no-touch-support) .bpk-navigation-bar-button-link--on-dark:hover:not(:active):not(:disabled){color:#fff}.bpk-navigation-bar-button-link--on-dark:active{color:#fff}.bpk-navigation-bar-button-link--on-dark:visited{color:#fff}
@@ -14,33 +14,32 @@
14
14
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
15
  * See the License for the specific language governing permissions and
16
16
  * limitations under the License.
17
- */import PropTypes from 'prop-types';
17
+ */
18
18
 
19
- // TODO: close button is not really only a close button, we should rename and update the import here
19
+ import PropTypes from 'prop-types';
20
+
21
+ // @ts-expect-error Untyped import. See `decisions/imports-ts-suppressions.md`.
20
22
  import BpkIconButton from "../../bpk-component-close-button";
21
23
  import { cssModules } from "../../bpk-react-utils";
22
24
  import STYLES from "./BpkNavigationBarIconButton.module.css";
25
+ import { BAR_STYLES } from "./BpkNavigationBar";
23
26
  import { jsx as _jsx } from "react/jsx-runtime";
24
27
  const getClassName = cssModules(STYLES);
25
28
  const BpkNavigationBarIconButton = ({
29
+ barStyle = BAR_STYLES.default,
26
30
  className,
27
31
  icon,
28
32
  ...rest
29
- }) =>
30
- /*#__PURE__*/
31
- // $FlowFixMe[cannot-spread-inexact] - inexact rest. See 'decisions/flowfixme.md'.
32
- _jsx(BpkIconButton, {
33
+ }) => /*#__PURE__*/_jsx(BpkIconButton, {
33
34
  customIcon: icon,
34
- className: getClassName('bpk-navigation-bar-icon-button', className),
35
+ className: getClassName('bpk-navigation-bar-icon-button', `bpk-navigation-bar-icon-button--${barStyle}`, className),
35
36
  ...rest
36
37
  });
37
38
  BpkNavigationBarIconButton.propTypes = {
38
39
  icon: PropTypes.func.isRequired,
39
40
  label: PropTypes.string.isRequired,
40
41
  onClick: PropTypes.func.isRequired,
41
- className: PropTypes.string
42
- };
43
- BpkNavigationBarIconButton.defaultProps = {
44
- className: null
42
+ className: PropTypes.string,
43
+ barStyle: PropTypes.oneOf(Object.values(BAR_STYLES))
45
44
  };
46
45
  export default BpkNavigationBarIconButton;
@@ -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
- @keyframes bpk-keyframe-spin{100%{transform:rotate(1turn)}}.bpk-navigation-bar-icon-button{color:#161616;color:var(--bpk-navigation-bar-icon-button-color, #161616)}.bpk-no-touch-support .bpk-navigation-bar-icon-button:hover:not(:active):not(:disabled){color:#161616;color:var(--bpk-navigation-bar-icon-button-hover-color, #161616)}:global(.bpk-no-touch-support) .bpk-navigation-bar-icon-button:hover:not(:active):not(:disabled){color:#161616;color:var(--bpk-navigation-bar-icon-button-hover-color, #161616)}.bpk-navigation-bar-icon-button:active{color:#161616;color:var(--bpk-navigation-bar-icon-button-active-color, #161616)}
18
+ @keyframes bpk-keyframe-spin{100%{transform:rotate(1turn)}}.bpk-navigation-bar-icon-button{color:#161616;color:var(--bpk-navigation-bar-icon-button-color, #161616)}.bpk-no-touch-support .bpk-navigation-bar-icon-button:hover:not(:active):not(:disabled){color:#161616;color:var(--bpk-navigation-bar-icon-button-hover-color, #161616)}:global(.bpk-no-touch-support) .bpk-navigation-bar-icon-button:hover:not(:active):not(:disabled){color:#161616;color:var(--bpk-navigation-bar-icon-button-hover-color, #161616)}.bpk-navigation-bar-icon-button:active{color:#161616;color:var(--bpk-navigation-bar-icon-button-active-color, #161616)}.bpk-navigation-bar-icon-button--on-dark{color:#fff}.bpk-no-touch-support .bpk-navigation-bar-icon-button--on-dark:hover:not(:active):not(:disabled){color:#fff}:global(.bpk-no-touch-support) .bpk-navigation-bar-icon-button--on-dark:hover:not(:active):not(:disabled){color:#fff}.bpk-navigation-bar-icon-button--on-dark:active{color:#fff}
@@ -14,4 +14,6 @@
14
14
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
15
  * See the License for the specific language governing permissions and
16
16
  * limitations under the License.
17
- */export default ['navigationBarBackgroundColor', 'navigationBarTitleColor', 'navigationBarButtonLinkColor', 'navigationBarButtonLinkActiveColor', 'navigationBarButtonLinkHoverColor', 'navigationBarButtonLinkVisitedColor', 'navigationBarIconButtonColor', 'navigationBarIconButtonActiveColor', 'navigationBarIconButtonHoverColor'];
17
+ */
18
+
19
+ export default ['navigationBarBackgroundColor', 'navigationBarTitleColor', 'navigationBarButtonLinkColor', 'navigationBarButtonLinkActiveColor', 'navigationBarButtonLinkHoverColor', 'navigationBarButtonLinkVisitedColor', 'navigationBarIconButtonColor', 'navigationBarIconButtonActiveColor', 'navigationBarIconButtonHoverColor'];
@@ -16,5 +16,5 @@
16
16
  * See the License for the specific language governing permissions and
17
17
  * limitations under the License.
18
18
  *
19
- */@layer base{/*! 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:0.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 #c0c0c0;margin:0 2px;padding:0.35em 0.625em 0.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:0.54}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}@keyframes bpk-keyframe-spin{100%{transform:rotate(1turn)}}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 !important;outline-offset:.125rem !important}.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:0.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 #c0c0c0;margin:0 2px;padding:0.35em 0.625em 0.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:0.54}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}@keyframes bpk-keyframe-spin{100%{transform:rotate(1turn)}}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 !important;outline-offset:.125rem !important}.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}
20
20
 
@@ -16,67 +16,65 @@
16
16
  * limitations under the License.
17
17
  */
18
18
 
19
- @layer base {
20
- @import '~normalize.css';
21
- @import '../bpk-mixins/index.scss';
19
+ @import '~normalize.css';
20
+ @import '../bpk-mixins/index.scss';
22
21
 
23
- // stylelint-disable-next-line selector-max-type
24
- html {
25
- font-size: $bpk-font-size-root;
26
- box-sizing: border-box;
27
- }
22
+ // stylelint-disable-next-line selector-max-type
23
+ html {
24
+ font-size: $bpk-font-size-root;
25
+ box-sizing: border-box;
26
+ }
28
27
 
29
- * {
30
- box-sizing: inherit;
28
+ * {
29
+ box-sizing: inherit;
31
30
 
32
- &::before,
33
- &::after {
34
- box-sizing: inherit;
35
- }
31
+ &::before,
32
+ &::after {
33
+ box-sizing: inherit;
36
34
  }
35
+ }
37
36
 
38
- /* stylelint-disable selector-class-pattern */
39
- body {
40
- color: $bpk-font-color-base;
41
- font-family: $bpk-font-family-base;
42
- font-size: $bpk-font-size-base;
43
- line-height: 1.3rem; /* stylelint-disable-line scale-unlimited/declaration-strict-value */
44
-
45
- :global(&.scaffold-font-size) {
46
- font-size: 13px; /* stylelint-disable-line unit-disallowed-list, scale-unlimited/declaration-strict-value */
47
- }
37
+ /* stylelint-disable selector-class-pattern */
38
+ body {
39
+ color: $bpk-font-color-base;
40
+ font-family: $bpk-font-family-base;
41
+ font-size: $bpk-font-size-base;
42
+ line-height: 1.3rem; /* stylelint-disable-line scale-unlimited/declaration-strict-value */
48
43
 
49
- :global(&.enable-font-smoothing) {
50
- -webkit-font-smoothing: antialiased;
51
- }
44
+ :global(&.scaffold-font-size) {
45
+ font-size: 13px; /* stylelint-disable-line unit-disallowed-list, scale-unlimited/declaration-strict-value */
52
46
  }
53
47
 
54
- :focus-visible {
55
- @include bpk-focus-indicator;
48
+ :global(&.enable-font-smoothing) {
49
+ -webkit-font-smoothing: antialiased;
56
50
  }
51
+ }
57
52
 
58
- :global(.hidden),
59
- :global(.hide) {
60
- @include bpk-hidden;
61
- }
53
+ :focus-visible {
54
+ @include bpk-focus-indicator;
55
+ }
62
56
 
63
- :global(.visuallyhidden),
64
- :global(.visually-hidden) {
65
- @include bpk-visually-hidden;
66
- }
57
+ :global(.hidden),
58
+ :global(.hide) {
59
+ @include bpk-hidden;
60
+ }
67
61
 
68
- :global(.visuallyhidden.focusable),
69
- :global(.visually-hidden.focusable) {
70
- @include bpk-visually-hidden--focusable;
71
- }
62
+ :global(.visuallyhidden),
63
+ :global(.visually-hidden) {
64
+ @include bpk-visually-hidden;
65
+ }
72
66
 
73
- :global(.invisible) {
74
- @include bpk-invisible;
75
- }
67
+ :global(.visuallyhidden.focusable),
68
+ :global(.visually-hidden.focusable) {
69
+ @include bpk-visually-hidden--focusable;
70
+ }
76
71
 
77
- :global(.clearfix) {
78
- @include bpk-clearfix;
79
- }
72
+ :global(.invisible) {
73
+ @include bpk-invisible;
74
+ }
75
+
76
+ :global(.clearfix) {
77
+ @include bpk-clearfix;
80
78
  }
81
79
 
82
80
  /* stylelint-enable */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skyscanner/backpack-web",
3
- "version": "31.4.1-dev.0",
3
+ "version": "31.6.0",
4
4
  "description": "Backpack Design System web library",
5
5
  "repository": {
6
6
  "type": "git",
@@ -1,6 +0,0 @@
1
- /// <reference types="react" />
2
- declare const _default: ({ styles, ...props }: {
3
- [x: string]: any;
4
- styles?: {} | undefined;
5
- }) => JSX.Element;
6
- export default _default;
@@ -1,6 +0,0 @@
1
- /// <reference types="react" />
2
- declare const _default: ({ styles, ...props }: {
3
- [x: string]: any;
4
- styles?: {} | undefined;
5
- }) => JSX.Element;
6
- export default _default;