@skyscanner/backpack-web 31.4.1-dev.0 → 31.5.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.
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)
@@ -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,96 @@
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
+ // @ts-expect-error Untyped import. See `decisions/imports-ts-suppressions.md`.
27
+ import BpkNavigationBar from "../../bpk-component-navigation-bar";
28
+ import { cssModules } from "../../bpk-react-utils";
29
+ import STYLES from "./BpkBottomSheetInner.module.css";
30
+ import { jsx as _jsx } from "react/jsx-runtime";
31
+ import { jsxs as _jsxs } from "react/jsx-runtime";
32
+ const getClassName = cssModules(STYLES);
33
+ const BpkBottomSheetInner = ({
34
+ actionText = '',
35
+ children,
36
+ closeLabel = '',
37
+ exiting,
38
+ id,
39
+ onAction = () => null,
40
+ onClose,
41
+ title = '',
42
+ wide = false
43
+ }) => {
44
+ const classNames = getClassName('bpk-bottom-sheet', wide && 'bpk-bottom-sheet--wide');
45
+ const headingId = `bpk-bottom-sheet-heading-${id}`;
46
+ return /*#__PURE__*/_jsx(CSSTransition, {
47
+ classNames: {
48
+ appear: getClassName('bpk-bottom-sheet--appear'),
49
+ appearActive: getClassName('bpk-bottom-sheet--appear-active'),
50
+ exit: getClassName('bpk-bottom-sheet--exit')
51
+ },
52
+ in: !exiting,
53
+ appear: !exiting,
54
+ out: exiting,
55
+ exit: exiting,
56
+ timeout: {
57
+ appear: 240,
58
+ exit: 240
59
+ },
60
+ children: /*#__PURE__*/_jsxs("section", {
61
+ id: id,
62
+ tabIndex: -1,
63
+ role: "dialog",
64
+ "aria-labelledby": headingId,
65
+ className: classNames,
66
+ children: [/*#__PURE__*/_jsx("header", {
67
+ className: getClassName('bpk-bottom-sheet--header'),
68
+ children: /*#__PURE__*/_jsx(BpkNavigationBar, {
69
+ id: headingId,
70
+ className: getClassName('bpk-bottom-sheet--navigation'),
71
+ title: /*#__PURE__*/_jsx("h2", {
72
+ id: headingId,
73
+ className: getClassName('bpk-bottom-sheet--heading'),
74
+ children: title
75
+ }),
76
+ leadingButton: /*#__PURE__*/_jsx(BpkCloseButton, {
77
+ className: getClassName('bpk-bottom-sheet--close-button'),
78
+ label: closeLabel,
79
+ onClick: onClose
80
+ }),
81
+ trailingButton: actionText && onAction ? /*#__PURE__*/_jsx(BpkButtonLink, {
82
+ className: getClassName('bpk-bottom-sheet--action-button'),
83
+ onClick: onAction,
84
+ children: actionText
85
+ }) : /*#__PURE__*/_jsx("div", {
86
+ className: getClassName('bpk-bottom-sheet--action-button')
87
+ })
88
+ })
89
+ }), /*#__PURE__*/_jsx("div", {
90
+ className: getClassName('bpk-bottom-sheet--content'),
91
+ children: children
92
+ })]
93
+ })
94
+ });
95
+ };
96
+ 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)}
@@ -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.5.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;