@skyscanner/backpack-web 38.12.0 → 38.14.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.
@@ -45,6 +45,10 @@ class AnimateHeight extends Component {
45
45
  }
46
46
  }
47
47
  componentDidUpdate(prevProps, prevState) {
48
+ const {
49
+ height: prevHeight,
50
+ transitionOverflow: prevTransitionOverflow
51
+ } = prevProps;
48
52
  const {
49
53
  duration,
50
54
  height,
@@ -52,16 +56,15 @@ class AnimateHeight extends Component {
52
56
  } = this.props;
53
57
 
54
58
  // Check if 'height' prop has changed
55
- if (this.contentElement && height !== prevProps.height) {
59
+ if (this.contentElement && height !== prevHeight) {
56
60
  // Cache content height
57
61
  this.contentElement.style.display = '';
58
- this.contentElement.style.overflow = transitionOverflow;
59
62
  const contentHeight = this.contentElement.offsetHeight;
60
63
  this.contentElement.style.overflow = '';
61
64
  let newHeight = null;
62
65
  let shouldSetTimeout = false;
63
66
  let timeoutHeight = null;
64
- let timeoutOverflow = transitionOverflow;
67
+ let timeoutOverflow = prevTransitionOverflow;
65
68
  let timeoutDuration = duration;
66
69
  clearTimeout(this.timeoutID);
67
70
  if (isNumber(height)) {
@@ -0,0 +1,4 @@
1
+ import BpkBlockquote from './src/BpkBlockquote';
2
+ import themeAttributes from './src/themeAttributes';
3
+ export default BpkBlockquote;
4
+ export { themeAttributes };
@@ -0,0 +1,7 @@
1
+ import type { ReactNode } from 'react';
2
+ export type Props = {
3
+ children: ReactNode;
4
+ extraSpace?: boolean;
5
+ };
6
+ declare const BpkBlockquote: ({ children, extraSpace }: Props) => import("react/jsx-runtime").JSX.Element;
7
+ export default BpkBlockquote;
@@ -16,26 +16,21 @@
16
16
  * limitations under the License.
17
17
  */
18
18
 
19
- import PropTypes from 'prop-types';
20
19
  import { cssModules } from "../../bpk-react-utils";
21
20
  import STYLES from "./BpkBlockquote.module.css";
22
21
  import { jsx as _jsx } from "react/jsx-runtime";
23
22
  const getClassName = cssModules(STYLES);
24
- const BpkBlockquote = props => {
23
+ const BpkBlockquote = ({
24
+ children,
25
+ extraSpace = false
26
+ }) => {
25
27
  const classNames = [getClassName('bpk-blockquote')];
26
- if (props.extraSpace) {
28
+ if (extraSpace) {
27
29
  classNames.push(getClassName('bpk-blockquote--extra-spacing'));
28
30
  }
29
31
  return /*#__PURE__*/_jsx("blockquote", {
30
32
  className: classNames.join(' '),
31
- children: props.children
33
+ children: children
32
34
  });
33
35
  };
34
- BpkBlockquote.propTypes = {
35
- children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]).isRequired,
36
- extraSpace: PropTypes.bool
37
- };
38
- BpkBlockquote.defaultProps = {
39
- extraSpace: false
40
- };
41
36
  export default BpkBlockquote;
@@ -0,0 +1,2 @@
1
+ declare const themeAttributes: readonly ["blockquoteBarColor"];
2
+ export default themeAttributes;
@@ -16,4 +16,5 @@
16
16
  * limitations under the License.
17
17
  */
18
18
 
19
- export default ['blockquoteBarColor'];
19
+ const themeAttributes = ['blockquoteBarColor'];
20
+ export default themeAttributes;
@@ -0,0 +1,5 @@
1
+ import BpkBreadcrumb, { type Props as BpkBreadcrumbProps } from './src/BpkBreadcrumb';
2
+ import BpkBreadcrumbItem, { type Props as BpkBreadcrumbItemProps } from './src/BpkBreadcrumbItem';
3
+ export type { BpkBreadcrumbProps, BpkBreadcrumbItemProps };
4
+ export default BpkBreadcrumb;
5
+ export { BpkBreadcrumbItem };
@@ -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 BpkBreadcrumb from "./src/BpkBreadcrumb";
17
+ */
18
+
19
+ import BpkBreadcrumb from "./src/BpkBreadcrumb";
18
20
  import BpkBreadcrumbItem from "./src/BpkBreadcrumbItem";
19
21
  export default BpkBreadcrumb;
20
22
  export { BpkBreadcrumbItem };
@@ -0,0 +1,18 @@
1
+ import { Component, type ReactNode } from 'react';
2
+ interface SchemaMetaDataItem {
3
+ url: string;
4
+ label: string;
5
+ }
6
+ export type Props = {
7
+ children: ReactNode;
8
+ schemaMetaData?: SchemaMetaDataItem[];
9
+ label: string;
10
+ className?: string;
11
+ [rest: string]: any;
12
+ };
13
+ declare class BpkBreadcrumb extends Component<Props> {
14
+ metaData?: string;
15
+ constructor(props: Props);
16
+ render(): import("react/jsx-runtime").JSX.Element;
17
+ }
18
+ export default BpkBreadcrumb;
@@ -14,7 +14,8 @@
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
  import { Component, Fragment } from 'react';
19
20
  import { cssModules } from "../../bpk-react-utils";
20
21
  import STYLES from "./BpkBreadcrumb.module.css";
@@ -41,9 +42,6 @@ const buildMetaData = schemaMetaData => {
41
42
  });
42
43
  };
43
44
  class BpkBreadcrumb extends Component {
44
- static defaultProps = {
45
- schemaMetaData: null
46
- };
47
45
  constructor(props) {
48
46
  super(props);
49
47
  this.metaData = props.schemaMetaData && buildMetaData(props.schemaMetaData);
@@ -74,15 +72,4 @@ class BpkBreadcrumb extends Component {
74
72
  });
75
73
  }
76
74
  }
77
- BpkBreadcrumb.propTypes = {
78
- children: PropTypes.node.isRequired,
79
- label: PropTypes.string.isRequired,
80
- schemaMetaData: PropTypes.arrayOf(PropTypes.shape({
81
- url: PropTypes.string.isRequired,
82
- label: PropTypes.string.isRequired
83
- }))
84
- };
85
- BpkBreadcrumb.defaultProps = {
86
- schemaMetaData: null
87
- };
88
75
  export default BpkBreadcrumb;
@@ -0,0 +1,13 @@
1
+ import type { ReactNode } from 'react';
2
+ export type Props = {
3
+ children: ReactNode;
4
+ active?: boolean;
5
+ href?: string;
6
+ className?: string;
7
+ linkProps?: {
8
+ [key: string]: any;
9
+ };
10
+ [rest: string]: any;
11
+ };
12
+ declare const BpkBreadcrumbItem: (props: Props) => import("react/jsx-runtime").JSX.Element;
13
+ export default BpkBreadcrumbItem;
@@ -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 PropTypes from 'prop-types';
17
+ */
18
+
18
19
  import { withRtlSupport } from "../../bpk-component-icon";
19
20
  import ArrowRight from "../../bpk-component-icon/sm/arrow-right";
21
+ // @ts-expect-error Untyped import. See `decisions/imports-ts-suppressions.md`.
20
22
  import BpkLink from "../../bpk-component-link";
21
23
  import BpkText from "../../bpk-component-text";
22
24
  import { cssModules } from "../../bpk-react-utils";
@@ -26,57 +28,34 @@ const getClassName = cssModules(STYLES);
26
28
  const RtlSupportedArrowRight = withRtlSupport(ArrowRight);
27
29
  const BpkBreadcrumbItem = props => {
28
30
  const {
29
- active,
31
+ active = false,
30
32
  children,
31
33
  className,
32
34
  href,
33
35
  linkProps,
34
36
  ...rest
35
37
  } = props;
36
- return (
37
- /*#__PURE__*/
38
- // $FlowFixMe[cannot-spread-inexact] - inexact rest. See 'decisions/flowfixme.md'.
39
- _jsxs("li", {
40
- className: getClassName('bpk-breadcrumb-item', className),
41
- ...rest,
42
- children: [active ?
43
- /*#__PURE__*/
44
- // $FlowFixMe[cannot-spread-inexact] - inexact rest. See 'decisions/flowfixme.md'.
45
- _jsx("div", {
46
- className: getClassName('bpk-breadcrumb-item__active-item'),
47
- children: /*#__PURE__*/_jsx(BpkText, {
48
- "aria-current": "page",
49
- ...linkProps,
50
- children: children
51
- })
52
- }) :
53
- /*#__PURE__*/
54
- // $FlowFixMe[cannot-spread-inexact] - inexact rest. See 'decisions/flowfixme.md'.
55
- _jsx("div", {
56
- className: getClassName('bpk-breadcrumb-item__link'),
57
- children: /*#__PURE__*/_jsx(BpkLink, {
58
- href: href,
59
- ...linkProps,
60
- children: children
61
- })
62
- }), /*#__PURE__*/_jsx("div", {
63
- className: getClassName('bpk-breadcrumb-item__arrow'),
64
- children: !active && /*#__PURE__*/_jsx(RtlSupportedArrowRight, {})
65
- })]
66
- })
67
- );
68
- };
69
- BpkBreadcrumbItem.propTypes = {
70
- children: PropTypes.node.isRequired,
71
- active: PropTypes.bool,
72
- href: PropTypes.string,
73
- className: PropTypes.string,
74
- linkProps: PropTypes.object // eslint-disable-line react/forbid-prop-types
75
- };
76
- BpkBreadcrumbItem.defaultProps = {
77
- active: false,
78
- href: null,
79
- className: null,
80
- linkProps: null
38
+ return /*#__PURE__*/_jsxs("li", {
39
+ className: getClassName('bpk-breadcrumb-item', className),
40
+ ...rest,
41
+ children: [active ? /*#__PURE__*/_jsx("div", {
42
+ className: getClassName('bpk-breadcrumb-item__active-item'),
43
+ children: /*#__PURE__*/_jsx(BpkText, {
44
+ "aria-current": "page",
45
+ ...linkProps,
46
+ children: children
47
+ })
48
+ }) : /*#__PURE__*/_jsx("div", {
49
+ className: getClassName('bpk-breadcrumb-item__link'),
50
+ children: /*#__PURE__*/_jsx(BpkLink, {
51
+ href: href,
52
+ ...linkProps,
53
+ children: children
54
+ })
55
+ }), /*#__PURE__*/_jsx("div", {
56
+ className: getClassName('bpk-breadcrumb-item__arrow'),
57
+ children: !active && /*#__PURE__*/_jsx(RtlSupportedArrowRight, {})
58
+ })]
59
+ });
81
60
  };
82
61
  export default BpkBreadcrumbItem;
@@ -132,6 +132,17 @@ export const propTypes = {
132
132
  validationProps: PropTypes.object,
133
133
  description: PropTypes.string
134
134
  };
135
+ export const defaultProps = {
136
+ label: null,
137
+ disabled: false,
138
+ valid: null,
139
+ required: false,
140
+ className: null,
141
+ validationMessage: null,
142
+ isCheckbox: false,
143
+ validationProps: {},
144
+ description: null
145
+ };
135
146
  BpkFieldset.propTypes = {
136
147
  ...propTypes
137
148
  };
@@ -19,30 +19,23 @@ import { cssModules } from "../../bpk-react-utils";
19
19
  import STYLES from "./BpkSkipLink.module.css";
20
20
  import { jsx as _jsx } from "react/jsx-runtime";
21
21
  const getClassName = cssModules(STYLES);
22
- const BpkSkipLink = props => {
23
- const {
24
- className,
25
- href,
26
- label,
27
- ...rest
28
- } = props;
29
- return (
30
- /*#__PURE__*/
31
- // $FlowFixMe[cannot-spread-inexact] - inexact rest. See 'decisions/flowfixme.md'.
32
- _jsx("a", {
33
- href: href,
34
- className: getClassName('bpk-skip-link', className),
35
- ...rest,
36
- children: label
37
- })
38
- );
39
- };
22
+ const BpkSkipLink = ({
23
+ className = null,
24
+ href,
25
+ label,
26
+ ...rest
27
+ }) =>
28
+ /*#__PURE__*/
29
+ // $FlowFixMe[cannot-spread-inexact] - inexact rest. See 'decisions/flowfixme.md'.
30
+ _jsx("a", {
31
+ href: href,
32
+ className: getClassName('bpk-skip-link', className),
33
+ ...rest,
34
+ children: label
35
+ });
40
36
  BpkSkipLink.propTypes = {
41
37
  label: PropTypes.string.isRequired,
42
38
  href: PropTypes.string.isRequired,
43
39
  className: PropTypes.string
44
40
  };
45
- BpkSkipLink.defaultProps = {
46
- className: null
47
- };
48
41
  export default BpkSkipLink;
@@ -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
- @font-face{font-family:"Skyscanner Relative";font-style:normal;font-weight:400;src:url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-Book-f9356ad6.woff2") format("woff2"),url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-Book-46f9f429.woff") format("woff"),url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-Book-ab1dbcbe.ttf") format("ttf")}@font-face{font-family:"Skyscanner Relative";font-style:italic;font-weight:400;src:url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-Italic-10532ac3.woff2") format("woff2"),url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-Italic-db5d0ac5.woff") format("woff"),url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-Italic-8eec3f3a.ttf") format("ttf")}@font-face{font-family:"Skyscanner Relative";font-style:normal;font-weight:500;src:url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-Medium-c08dc28b.woff2") format("woff2"),url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-Medium-865e167a.woff") format("woff"),url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-Medium-d0ae478a.ttf") format("ttf")}@font-face{font-family:"Skyscanner Relative";font-style:italic;font-weight:500;src:url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-MediumItalic-81517f37.woff2") format("woff2"),url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-MediumItalic-bbdb6b0c.woff") format("woff"),url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-MediumItalic-226fe64c.ttf") format("ttf")}@font-face{font-family:"Skyscanner Relative";font-style:normal;font-weight:700;src:url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-Bold-8545937e.woff2") format("woff2"),url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-Bold-a099c9f7.woff") format("woff"),url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-Bold-ec4cc5a7.ttf") format("ttf")}@font-face{font-family:"Skyscanner Relative";font-style:italic;font-weight:700;src:url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-BoldItalic-01b5d138.woff2") format("woff2"),url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-BoldItalic-4d6d36e3.woff") format("woff"),url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-BoldItalic-dc9284dc.ttf") format("ttf")}@font-face{font-family:"Skyscanner Relative";font-style:normal;font-weight:900;src:url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-Black-bb3c9434.woff2") format("woff2"),url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-Black-bba2eb55.woff") format("woff"),url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-Black-314703cc.ttf") format("ttf")}@font-face{font-family:"Skyscanner Relative";font-style:italic;font-weight:900;src:url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-BlackItalic-c2149c91.woff2") format("woff2"),url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-BlackItalic-a34cd594.woff") format("woff"),url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-BlackItalic-7e516ee5.ttf") format("ttf")}
18
+ @font-face{font-family:"Skyscanner Relative";font-style:normal;font-weight:400;src:url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-Book-f9356ad6.woff2") format("woff2"),url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-Book-46f9f429.woff") format("woff"),url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-Book-ab1dbcbe.ttf") format("ttf")}@font-face{font-family:"Skyscanner Relative";font-style:italic;font-weight:400;src:url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-Italic-10532ac3.woff2") format("woff2"),url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-Italic-db5d0ac5.woff") format("woff"),url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-Italic-8eec3f3a.ttf") format("ttf")}@font-face{font-family:"Skyscanner Relative";font-style:normal;font-weight:500;src:url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-Medium-c08dc28b.woff2") format("woff2"),url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-Medium-865e167a.woff") format("woff"),url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-Medium-d0ae478a.ttf") format("ttf")}@font-face{font-family:"Skyscanner Relative";font-style:italic;font-weight:500;src:url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-MediumItalic-81517f37.woff2") format("woff2"),url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-MediumItalic-bbdb6b0c.woff") format("woff"),url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-MediumItalic-226fe64c.ttf") format("ttf")}@font-face{font-family:"Skyscanner Relative";font-style:normal;font-weight:700;src:url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-Bold-8545937e.woff2") format("woff2"),url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-Bold-a099c9f7.woff") format("woff"),url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-Bold-ec4cc5a7.ttf") format("ttf")}@font-face{font-family:"Skyscanner Relative";font-style:italic;font-weight:700;src:url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-BoldItalic-01b5d138.woff2") format("woff2"),url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-BoldItalic-4d6d36e3.woff") format("woff"),url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-BoldItalic-dc9284dc.ttf") format("ttf")}@font-face{font-family:"Skyscanner Relative";font-style:normal;font-weight:900;src:url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-Black-bb3c9434.woff2") format("woff2"),url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-Black-bba2eb55.woff") format("woff"),url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-Black-314703cc.ttf") format("ttf")}@font-face{font-family:"Skyscanner Relative";font-style:italic;font-weight:900;src:url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-BlackItalic-c2149c91.woff2") format("woff2"),url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-BlackItalic-a34cd594.woff") format("woff"),url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-BlackItalic-7e516ee5.ttf") format("ttf")}@font-face{font-family:"Noto Sans Arabic";font-style:normal;font-weight:800;src:url("https://js.skyscnr.com/sttc/bpk-fonts/NotoSansArabic-ExtraBold-da8cf050.woff2") format("woff2"),url("https://js.skyscnr.com/sttc/bpk-fonts/NotoSansArabic-ExtraBold-4ac084a2.woff") format("woff"),url("https://js.skyscnr.com/sttc/bpk-fonts/NotoSansArabic-ExtraBold-a965fbb5.ttf") format("ttf")}@font-face{font-family:"Noto Sans Hebrew";font-style:normal;font-weight:800;src:url("https://js.skyscnr.com/sttc/bpk-fonts/NotoSansHebrew-ExtraBold-e04df8b4.woff2") format("woff2"),url("https://js.skyscnr.com/sttc/bpk-fonts/NotoSansHebrew-ExtraBold-3303fb69.woff") format("woff"),url("https://js.skyscnr.com/sttc/bpk-fonts/NotoSansHebrew-ExtraBold-4cfb24e3.ttf") format("ttf")}@font-face{font-family:"Noto Serif";font-style:normal;font-weight:800;src:url("https://js.skyscnr.com/sttc/bpk-fonts/NotoSans-ExtraBold-d8d5cc89.woff2") format("woff2"),url("https://js.skyscnr.com/sttc/bpk-fonts/NotoSans-ExtraBold-177dbfc0.woff") format("woff"),url("https://js.skyscnr.com/sttc/bpk-fonts/NotoSans-ExtraBold-cac84afc.ttf") format("ttf")}@font-face{font-family:"Noto Serif Devanagari";font-style:normal;font-weight:800;src:url("https://js.skyscnr.com/sttc/bpk-fonts/NotoSansDevanagari-Bold-19924491.woff2") format("woff2"),url("https://js.skyscnr.com/sttc/bpk-fonts/NotoSansDevanagari-Bold-2598dc51.woff") format("woff"),url("https://js.skyscnr.com/sttc/bpk-fonts/NotoSansDevanagari-Bold-bca34adc.ttf") format("ttf")}@font-face{font-family:"Noto Serif Thai";font-style:normal;font-weight:700;src:url("https://js.skyscnr.com/sttc/bpk-fonts/NotoSansThai-Bold-74e247cc.woff2") format("woff2"),url("https://js.skyscnr.com/sttc/bpk-fonts/NotoSansThai-Bold-91433b5b.woff") format("woff"),url("https://js.skyscnr.com/sttc/bpk-fonts/NotoSansThai-Bold-778d694c.ttf") format("ttf")}@font-face{font-family:"Noto Sans SC";font-style:normal;font-weight:700;src:url("https://js.skyscnr.com/sttc/bpk-fonts/NotoSansSC-Bold-22c3e4e0.woff2") format("woff2"),url("https://js.skyscnr.com/sttc/bpk-fonts/NotoSansSC-Bold-87ef5110.woff") format("woff"),url("https://js.skyscnr.com/sttc/bpk-fonts/NotoSansSC-Bold-57f04989.ttf") format("ttf")}@font-face{font-family:"Noto Sans TC";font-style:normal;font-weight:700;src:url("https://js.skyscnr.com/sttc/bpk-fonts/NotoSansTC-Bold-355d38e9.woff2") format("woff2"),url("https://js.skyscnr.com/sttc/bpk-fonts/NotoSansTC-Bold-2abc3583.woff") format("woff"),url("https://js.skyscnr.com/sttc/bpk-fonts/NotoSansTC-Bold-86244830.ttf") format("ttf")}@font-face{font-family:"Noto Sans JP";font-style:normal;font-weight:800;src:url("https://js.skyscnr.com/sttc/bpk-fonts/NotoSansJP-Bold-b656150c.woff2") format("woff2"),url("https://js.skyscnr.com/sttc/bpk-fonts/NotoSansJP-Bold-6ddf472f.woff") format("woff"),url("https://js.skyscnr.com/sttc/bpk-fonts/NotoSansJP-Bold-deeb2988.ttf") format("ttf")}@font-face{font-family:"Noto Sans KR";font-style:normal;font-weight:800;src:url("https://js.skyscnr.com/sttc/bpk-fonts/NotoSansKR-Bold-5286cc6d.woff2") format("woff2"),url("https://js.skyscnr.com/sttc/bpk-fonts/NotoSansKR-Bold-74c4cbc7.woff") format("woff"),url("https://js.skyscnr.com/sttc/bpk-fonts/NotoSansKR-Bold-5651f33d.ttf") format("ttf")}
@@ -105,3 +105,93 @@ $base-url: 'https://js.skyscnr.com/sttc/bpk-fonts';
105
105
  url('#{$base-url}/SkyscannerRelative-BlackItalic-7e516ee5.ttf')
106
106
  format('ttf');
107
107
  }
108
+
109
+ @font-face {
110
+ font-family: 'Noto Sans Arabic';
111
+ font-style: normal;
112
+ font-weight: 800;
113
+ src:
114
+ url('#{$base-url}/NotoSansArabic-ExtraBold-da8cf050.woff2') format('woff2'),
115
+ url('#{$base-url}/NotoSansArabic-ExtraBold-4ac084a2.woff') format('woff'),
116
+ url('#{$base-url}/NotoSansArabic-ExtraBold-a965fbb5.ttf') format('ttf');
117
+ }
118
+
119
+ @font-face {
120
+ font-family: 'Noto Sans Hebrew';
121
+ font-style: normal;
122
+ font-weight: 800;
123
+ src:
124
+ url('#{$base-url}/NotoSansHebrew-ExtraBold-e04df8b4.woff2') format('woff2'),
125
+ url('#{$base-url}/NotoSansHebrew-ExtraBold-3303fb69.woff') format('woff'),
126
+ url('#{$base-url}/NotoSansHebrew-ExtraBold-4cfb24e3.ttf') format('ttf');
127
+ }
128
+
129
+ @font-face {
130
+ font-family: 'Noto Serif';
131
+ font-style: normal;
132
+ font-weight: 800;
133
+ src:
134
+ url('#{$base-url}/NotoSans-ExtraBold-d8d5cc89.woff2') format('woff2'),
135
+ url('#{$base-url}/NotoSans-ExtraBold-177dbfc0.woff') format('woff'),
136
+ url('#{$base-url}/NotoSans-ExtraBold-cac84afc.ttf') format('ttf');
137
+ }
138
+
139
+ @font-face {
140
+ font-family: 'Noto Serif Devanagari';
141
+ font-style: normal;
142
+ font-weight: 800;
143
+ src:
144
+ url('#{$base-url}/NotoSansDevanagari-Bold-19924491.woff2') format('woff2'),
145
+ url('#{$base-url}/NotoSansDevanagari-Bold-2598dc51.woff') format('woff'),
146
+ url('#{$base-url}/NotoSansDevanagari-Bold-bca34adc.ttf') format('ttf');
147
+ }
148
+
149
+ @font-face {
150
+ font-family: 'Noto Serif Thai';
151
+ font-style: normal;
152
+ font-weight: 700;
153
+ src:
154
+ url('#{$base-url}/NotoSansThai-Bold-74e247cc.woff2') format('woff2'),
155
+ url('#{$base-url}/NotoSansThai-Bold-91433b5b.woff') format('woff'),
156
+ url('#{$base-url}/NotoSansThai-Bold-778d694c.ttf') format('ttf');
157
+ }
158
+
159
+ @font-face {
160
+ font-family: 'Noto Sans SC';
161
+ font-style: normal;
162
+ font-weight: 700;
163
+ src:
164
+ url('#{$base-url}/NotoSansSC-Bold-22c3e4e0.woff2') format('woff2'),
165
+ url('#{$base-url}/NotoSansSC-Bold-87ef5110.woff') format('woff'),
166
+ url('#{$base-url}/NotoSansSC-Bold-57f04989.ttf') format('ttf');
167
+ }
168
+
169
+ @font-face {
170
+ font-family: 'Noto Sans TC';
171
+ font-style: normal;
172
+ font-weight: 700;
173
+ src:
174
+ url('#{$base-url}/NotoSansTC-Bold-355d38e9.woff2') format('woff2'),
175
+ url('#{$base-url}/NotoSansTC-Bold-2abc3583.woff') format('woff'),
176
+ url('#{$base-url}/NotoSansTC-Bold-86244830.ttf') format('ttf');
177
+ }
178
+
179
+ @font-face {
180
+ font-family: 'Noto Sans JP';
181
+ font-style: normal;
182
+ font-weight: 800;
183
+ src:
184
+ url('#{$base-url}/NotoSansJP-Bold-b656150c.woff2') format('woff2'),
185
+ url('#{$base-url}/NotoSansJP-Bold-6ddf472f.woff') format('woff'),
186
+ url('#{$base-url}/NotoSansJP-Bold-deeb2988.ttf') format('ttf');
187
+ }
188
+
189
+ @font-face {
190
+ font-family: 'Noto Sans KR';
191
+ font-style: normal;
192
+ font-weight: 800;
193
+ src:
194
+ url('#{$base-url}/NotoSansKR-Bold-5286cc6d.woff2') format('woff2'),
195
+ url('#{$base-url}/NotoSansKR-Bold-74c4cbc7.woff') format('woff'),
196
+ url('#{$base-url}/NotoSansKR-Bold-5651f33d.ttf') format('ttf');
197
+ }
@@ -49,15 +49,14 @@ const createStyle = (theme, themeAttributes) => {
49
49
  }
50
50
  return style;
51
51
  };
52
- const BpkThemeProvider = props => {
53
- const {
54
- children,
55
- component: WrapperComponent,
56
- style: userStyle,
57
- theme,
58
- themeAttributes,
59
- ...rest
60
- } = props;
52
+ const BpkThemeProvider = ({
53
+ children,
54
+ component: WrapperComponent = 'div',
55
+ style: userStyle = null,
56
+ theme = null,
57
+ themeAttributes,
58
+ ...rest
59
+ }) => {
61
60
  const dedupedThemeAttributes = uniq(themeAttributes);
62
61
  const style = createStyle(theme, dedupedThemeAttributes);
63
62
  return /*#__PURE__*/_jsx(WrapperComponent, {
@@ -119,9 +118,4 @@ BpkThemeProvider.propTypes = {
119
118
  component: PropTypes.elementType,
120
119
  style: PropTypes.object // eslint-disable-line react/forbid-prop-types
121
120
  };
122
- BpkThemeProvider.defaultProps = {
123
- theme: null,
124
- component: 'div',
125
- style: null
126
- };
127
121
  export default BpkThemeProvider;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skyscanner/backpack-web",
3
- "version": "38.12.0",
3
+ "version": "38.14.0",
4
4
  "description": "Backpack Design System web library",
5
5
  "repository": {
6
6
  "type": "git",