@skyscanner/backpack-web 3.0.1 → 3.3.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/bpk-component-accordion/package.json +1 -1
- package/bpk-component-aria-live/package.json +3 -3
- package/bpk-component-autosuggest/package.json +2 -2
- package/bpk-component-banner-alert/package.json +2 -2
- package/bpk-component-calendar/package.json +2 -2
- package/bpk-component-chip/package.json +2 -2
- package/bpk-component-datepicker/package.json +4 -4
- package/bpk-component-fieldset/package.json +6 -6
- package/bpk-component-floating-notification/README.md +53 -0
- package/bpk-component-floating-notification/index.js +27 -0
- package/bpk-component-floating-notification/package.json +25 -0
- package/bpk-component-floating-notification/src/BpkFloatingNotification.js +150 -0
- package/bpk-component-floating-notification/src/BpkFloatingNotification.module.css +18 -0
- package/bpk-component-floating-notification/src/BpkFloatingNotification.module.scss +96 -0
- package/bpk-component-form-validation/package.json +2 -2
- package/bpk-component-graphic-promotion/package.json +1 -1
- package/bpk-component-graphic-promotion/src/BpkGraphicPromo.module.scss +10 -4
- package/bpk-component-image/package.json +2 -2
- package/bpk-component-input/package.json +2 -2
- package/bpk-component-map/package.json +1 -1
- package/bpk-component-overlay/package.json +2 -2
- package/bpk-component-phone-input/package.json +4 -4
- package/bpk-component-popover/package.json +2 -2
- package/bpk-component-price/README.md +35 -0
- package/bpk-component-price/index.js +23 -0
- package/bpk-component-price/package.json +24 -0
- package/bpk-component-price/src/BpkPrice.js +106 -0
- package/bpk-component-price/src/BpkPrice.module.scss +55 -0
- package/bpk-component-scrollable-calendar/package.json +2 -2
- package/bpk-component-theme-toggle/package.json +1 -2
- package/bpk-component-theme-toggle/src/BpkThemeToggle.js +0 -8
- package/package.json +5 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bpk-component-aria-live",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.16",
|
|
4
4
|
"description": "Backpack aria-live component.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -18,9 +18,9 @@
|
|
|
18
18
|
"prop-types": "^15.5.8"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
|
-
"bpk-component-chip": "^5.2.
|
|
21
|
+
"bpk-component-chip": "^5.2.14",
|
|
22
22
|
"bpk-component-code": "^3.1.10",
|
|
23
|
-
"bpk-component-fieldset": "^4.1.
|
|
23
|
+
"bpk-component-fieldset": "^4.1.16",
|
|
24
24
|
"bpk-component-select": "^5.1.10",
|
|
25
25
|
"bpk-component-switch": "^2.1.11"
|
|
26
26
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bpk-component-autosuggest",
|
|
3
|
-
"version": "6.1.
|
|
3
|
+
"version": "6.1.14",
|
|
4
4
|
"description": "Backpack autosuggest component.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
},
|
|
15
15
|
"gitHead": "4e4ec9add28e1db54d6a38a10c331bbd163f2926",
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"bpk-component-input": "^6.1.
|
|
17
|
+
"bpk-component-input": "^6.1.14",
|
|
18
18
|
"bpk-mixins": "^31.1.1",
|
|
19
19
|
"bpk-react-utils": "^4.1.2",
|
|
20
20
|
"prop-types": "^15.7.2",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bpk-component-banner-alert",
|
|
3
|
-
"version": "6.1.
|
|
3
|
+
"version": "6.1.14",
|
|
4
4
|
"description": "Backpack banner alert component.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"react-transition-group": "^2.5.3"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"bpk-component-aria-live": "^2.1.
|
|
27
|
+
"bpk-component-aria-live": "^2.1.16",
|
|
28
28
|
"bpk-component-button": "^6.2.5",
|
|
29
29
|
"bpk-storybook-utils": "^1.1.9"
|
|
30
30
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bpk-component-calendar",
|
|
3
|
-
"version": "11.1.
|
|
3
|
+
"version": "11.1.16",
|
|
4
4
|
"description": "Backpack calendar component.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"gitHead": "4e4ec9add28e1db54d6a38a10c331bbd163f2926",
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@skyscanner/bpk-foundations-web": "^8.0.0",
|
|
18
|
-
"bpk-component-aria-live": "^2.1.
|
|
18
|
+
"bpk-component-aria-live": "^2.1.16",
|
|
19
19
|
"bpk-component-icon": "^9.2.11",
|
|
20
20
|
"bpk-component-select": "^5.1.10",
|
|
21
21
|
"bpk-mixins": "^31.1.1",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bpk-component-chip",
|
|
3
|
-
"version": "5.2.
|
|
3
|
+
"version": "5.2.14",
|
|
4
4
|
"description": "Backpack chip component.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"react": "^16.3.0 || ^17.0.0"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"bpk-component-aria-live": "^2.1.
|
|
26
|
+
"bpk-component-aria-live": "^2.1.16",
|
|
27
27
|
"bpk-component-text": "^7.0.4"
|
|
28
28
|
}
|
|
29
29
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bpk-component-datepicker",
|
|
3
|
-
"version": "15.2.
|
|
3
|
+
"version": "15.2.16",
|
|
4
4
|
"description": "Backpack datepicker component.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -15,10 +15,10 @@
|
|
|
15
15
|
"gitHead": "f9f94f86d7cfc75e43bc6ad5eb01b23e62a89cc8",
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"bpk-component-breakpoint": "^4.0.2",
|
|
18
|
-
"bpk-component-calendar": "^11.1.
|
|
19
|
-
"bpk-component-input": "^6.1.
|
|
18
|
+
"bpk-component-calendar": "^11.1.16",
|
|
19
|
+
"bpk-component-input": "^6.1.14",
|
|
20
20
|
"bpk-component-modal": "^3.1.12",
|
|
21
|
-
"bpk-component-popover": "^5.0.
|
|
21
|
+
"bpk-component-popover": "^5.0.1",
|
|
22
22
|
"bpk-mixins": "^31.1.1",
|
|
23
23
|
"bpk-react-utils": "^4.1.2",
|
|
24
24
|
"prop-types": "^15.7.2"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bpk-component-fieldset",
|
|
3
|
-
"version": "4.1.
|
|
3
|
+
"version": "4.1.16",
|
|
4
4
|
"description": "Backpack fieldset component.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
},
|
|
15
15
|
"gitHead": "4e4ec9add28e1db54d6a38a10c331bbd163f2926",
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"bpk-component-form-validation": "^4.2.
|
|
17
|
+
"bpk-component-form-validation": "^4.2.14",
|
|
18
18
|
"bpk-component-label": "^5.1.10",
|
|
19
19
|
"bpk-mixins": "^31.1.1",
|
|
20
20
|
"bpk-react-utils": "^4.1.2",
|
|
@@ -24,12 +24,12 @@
|
|
|
24
24
|
"react": "^16.3.0 || ^17.0.0"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"bpk-component-autosuggest": "^6.1.
|
|
27
|
+
"bpk-component-autosuggest": "^6.1.14",
|
|
28
28
|
"bpk-component-button": "^6.2.5",
|
|
29
|
-
"bpk-component-calendar": "^11.1.
|
|
29
|
+
"bpk-component-calendar": "^11.1.16",
|
|
30
30
|
"bpk-component-checkbox": "^4.1.12",
|
|
31
|
-
"bpk-component-datepicker": "^15.2.
|
|
32
|
-
"bpk-component-input": "^6.1.
|
|
31
|
+
"bpk-component-datepicker": "^15.2.16",
|
|
32
|
+
"bpk-component-input": "^6.1.14",
|
|
33
33
|
"bpk-component-select": "^5.1.10",
|
|
34
34
|
"bpk-component-textarea": "^4.2.10"
|
|
35
35
|
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# bpk-component-floating-notification
|
|
2
|
+
|
|
3
|
+
## Installation
|
|
4
|
+
|
|
5
|
+
```sh
|
|
6
|
+
npm install bpk-component-floating-notification --save-dev
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
```js
|
|
12
|
+
import React from 'react';
|
|
13
|
+
import BpkFloatingNotification from 'bpk-component-floating-notification';
|
|
14
|
+
import BpkIconHeart from '../../packages/bpk-component-icon/sm/heart';
|
|
15
|
+
|
|
16
|
+
export default () => (
|
|
17
|
+
<BpkFloatingNotification
|
|
18
|
+
ctaText="View"
|
|
19
|
+
type={TYPE.dark}
|
|
20
|
+
icon={BpkIconHeart}
|
|
21
|
+
onClick={() => {}}
|
|
22
|
+
text="Killer Combo saved to New York and Miami 🎉"
|
|
23
|
+
/>
|
|
24
|
+
);
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Props
|
|
28
|
+
|
|
29
|
+
| Property | PropType | Required | Default Value |
|
|
30
|
+
| -------------- | ------------ | -------- | ------------- |
|
|
31
|
+
| animateOnEnter | bool | false | true |
|
|
32
|
+
| animateOnExit | bool | false | true |
|
|
33
|
+
| className | string | false | null |
|
|
34
|
+
| ctaText | string | false | null |
|
|
35
|
+
| hideAfter | number | false | 4000 |
|
|
36
|
+
| icon | ReactElement | false | null |
|
|
37
|
+
| onClick | func | false | null |
|
|
38
|
+
| text | string | true | - |
|
|
39
|
+
| type | oneOf(TYPE) | false | TYPE.light |
|
|
40
|
+
|
|
41
|
+
### Prop Details
|
|
42
|
+
|
|
43
|
+
#### hideAfter
|
|
44
|
+
|
|
45
|
+
This prop controls the amount of time that the notification stays visible before the exit animation begins.
|
|
46
|
+
|
|
47
|
+
The default value is 4 seconds (4000 milliseconds).
|
|
48
|
+
|
|
49
|
+
#### type
|
|
50
|
+
|
|
51
|
+
By default the component is rendered in the light theme (`TYPE.light`) which uses a dark background and white text for the notification. This contrasts against a white page.
|
|
52
|
+
|
|
53
|
+
The dark theme (`TYPE.dark`) displays the notification with a white background and black text. This contrasts against a dark page.
|
|
@@ -0,0 +1,27 @@
|
|
|
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
|
+
/* @flow strict */
|
|
19
|
+
|
|
20
|
+
import BpkFloatingNotification, {
|
|
21
|
+
type Props as BpkFloatingNotificationProps,
|
|
22
|
+
TYPE,
|
|
23
|
+
} from './src/BpkFloatingNotification';
|
|
24
|
+
|
|
25
|
+
export type { BpkFloatingNotificationProps };
|
|
26
|
+
export { TYPE };
|
|
27
|
+
export default BpkFloatingNotification;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "bpk-component-floating-notification",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Backpack floating-notification component.",
|
|
5
|
+
"license": "Apache-2.0",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git@github.com:Skyscanner/backpack.git"
|
|
9
|
+
},
|
|
10
|
+
"author": "Backpack Design System <backpack@skyscanner.net>",
|
|
11
|
+
"main": "index.js",
|
|
12
|
+
"publishConfig": {
|
|
13
|
+
"registry": "https://registry.npmjs.org/"
|
|
14
|
+
},
|
|
15
|
+
"dependencies": {
|
|
16
|
+
"bpk-component-button": "^6.2.5",
|
|
17
|
+
"bpk-component-text": "^7.0.4",
|
|
18
|
+
"bpk-mixins": "^31.1.1",
|
|
19
|
+
"bpk-react-utils": "^4.1.2",
|
|
20
|
+
"prop-types": "^15.5.8"
|
|
21
|
+
},
|
|
22
|
+
"peerDependencies": {
|
|
23
|
+
"react": "^16.8.0 || ^17.0.0"
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,150 @@
|
|
|
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
|
+
/* @flow strict */
|
|
19
|
+
|
|
20
|
+
import PropTypes from 'prop-types';
|
|
21
|
+
import React, { useEffect, useState, ReactElement } from 'react';
|
|
22
|
+
import { CSSTransition } from 'react-transition-group';
|
|
23
|
+
|
|
24
|
+
import BpkButton from '../../bpk-component-button';
|
|
25
|
+
import BpkText, { TEXT_STYLES } from '../../bpk-component-text';
|
|
26
|
+
import { cssModules } from '../../bpk-react-utils';
|
|
27
|
+
|
|
28
|
+
import STYLES from './BpkFloatingNotification.module.scss';
|
|
29
|
+
|
|
30
|
+
const getClassName = cssModules(STYLES);
|
|
31
|
+
|
|
32
|
+
export const TYPE = {
|
|
33
|
+
light: 'light',
|
|
34
|
+
dark: 'dark',
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
export type Props = {
|
|
38
|
+
animateOnEnter: ?boolean,
|
|
39
|
+
animateOnExit: ?boolean,
|
|
40
|
+
className: ?string,
|
|
41
|
+
ctaText: ?string,
|
|
42
|
+
hideAfter: ?number,
|
|
43
|
+
icon: ?() => ReactElement,
|
|
44
|
+
onClick: ?() => void,
|
|
45
|
+
text: string,
|
|
46
|
+
type: ?TYPE,
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
const BpkFloatingNotification = (props: Props) => {
|
|
50
|
+
const [showMessage, setShowMessage] = useState(true);
|
|
51
|
+
|
|
52
|
+
const {
|
|
53
|
+
animateOnEnter,
|
|
54
|
+
animateOnExit,
|
|
55
|
+
className,
|
|
56
|
+
ctaText,
|
|
57
|
+
hideAfter,
|
|
58
|
+
icon: Icon,
|
|
59
|
+
onClick,
|
|
60
|
+
text,
|
|
61
|
+
type,
|
|
62
|
+
...rest
|
|
63
|
+
} = props;
|
|
64
|
+
|
|
65
|
+
const classNames = getClassName(
|
|
66
|
+
'bpk-floating-notification',
|
|
67
|
+
type === TYPE.dark && 'bpk-floating-notification--dark',
|
|
68
|
+
className,
|
|
69
|
+
);
|
|
70
|
+
|
|
71
|
+
const iconClassNames = getClassName(
|
|
72
|
+
'bpk-floating-notification__icon',
|
|
73
|
+
type === TYPE.dark && 'bpk-floating-notification__icon--dark',
|
|
74
|
+
);
|
|
75
|
+
|
|
76
|
+
const buttonClassNames = getClassName(
|
|
77
|
+
'bpk-floating-notification__button',
|
|
78
|
+
type === TYPE.dark && 'bpk-floating-notification__button--dark',
|
|
79
|
+
);
|
|
80
|
+
|
|
81
|
+
useEffect(() => {
|
|
82
|
+
let timer;
|
|
83
|
+
if (hideAfter) {
|
|
84
|
+
timer = setTimeout(() => setShowMessage(false), hideAfter);
|
|
85
|
+
}
|
|
86
|
+
return () => timer && clearTimeout(timer);
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
return (
|
|
90
|
+
<CSSTransition
|
|
91
|
+
in={showMessage}
|
|
92
|
+
classNames={{
|
|
93
|
+
exit: getClassName('bpk-floating-notification--leave'),
|
|
94
|
+
exitActive: getClassName('bpk-floating-notification--leave-active'),
|
|
95
|
+
exitDone: getClassName('bpk-floating-notification--leave-done'),
|
|
96
|
+
appear: getClassName('bpk-floating-notification--appear'),
|
|
97
|
+
appearActive: getClassName('bpk-floating-notification--appear-active'),
|
|
98
|
+
}}
|
|
99
|
+
timeout={400}
|
|
100
|
+
appear={animateOnEnter}
|
|
101
|
+
exit={animateOnExit}
|
|
102
|
+
unmountOnExit
|
|
103
|
+
>
|
|
104
|
+
<div className={classNames} {...rest}>
|
|
105
|
+
{Icon && (
|
|
106
|
+
<div className={iconClassNames}>
|
|
107
|
+
<Icon />
|
|
108
|
+
</div>
|
|
109
|
+
)}
|
|
110
|
+
<BpkText
|
|
111
|
+
tagName="p"
|
|
112
|
+
textStyle={TEXT_STYLES.bodyDefault}
|
|
113
|
+
className={getClassName('bpk-floating-notification__text')}
|
|
114
|
+
>
|
|
115
|
+
{text}
|
|
116
|
+
</BpkText>
|
|
117
|
+
{ctaText && (
|
|
118
|
+
<BpkButton link onClick={onClick} className={buttonClassNames}>
|
|
119
|
+
{ctaText}
|
|
120
|
+
</BpkButton>
|
|
121
|
+
)}
|
|
122
|
+
</div>
|
|
123
|
+
</CSSTransition>
|
|
124
|
+
);
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
BpkFloatingNotification.propTypes = {
|
|
128
|
+
animateOnEnter: PropTypes.bool,
|
|
129
|
+
animateOnExit: PropTypes.bool,
|
|
130
|
+
className: PropTypes.string,
|
|
131
|
+
ctaText: PropTypes.string,
|
|
132
|
+
hideAfter: PropTypes.number,
|
|
133
|
+
icon: PropTypes.ReactElement,
|
|
134
|
+
onClick: PropTypes.func,
|
|
135
|
+
text: PropTypes.string.isRequired,
|
|
136
|
+
type: PropTypes.oneOf(Object.values(TYPE)),
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
BpkFloatingNotification.defaultProps = {
|
|
140
|
+
animateOnEnter: true,
|
|
141
|
+
animateOnExit: true,
|
|
142
|
+
className: null,
|
|
143
|
+
ctaText: null,
|
|
144
|
+
hideAfter: 4000,
|
|
145
|
+
icon: null,
|
|
146
|
+
onClick: null,
|
|
147
|
+
type: TYPE.light,
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
export default BpkFloatingNotification;
|
|
@@ -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-floating-notification{display:flex}
|
|
@@ -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
|
+
@import '~bpk-mixins/index';
|
|
20
|
+
|
|
21
|
+
.bpk-floating-notification {
|
|
22
|
+
position: absolute;
|
|
23
|
+
right: 0;
|
|
24
|
+
bottom: bpk-spacing-xl();
|
|
25
|
+
left: 0;
|
|
26
|
+
display: flex;
|
|
27
|
+
max-width: bpk-spacing-xxl() * 10;
|
|
28
|
+
margin: auto;
|
|
29
|
+
padding: bpk-spacing-lg();
|
|
30
|
+
transition: opacity $bpk-duration-base ease-in-out,
|
|
31
|
+
transform $bpk-duration-base ease-in-out;
|
|
32
|
+
border-radius: $bpk-border-radius-md;
|
|
33
|
+
background: $bpk-color-sky-blue-shade-03;
|
|
34
|
+
color: $bpk-color-white;
|
|
35
|
+
box-shadow: $bpk-box-shadow-xl, $bpk-box-shadow-lg;
|
|
36
|
+
|
|
37
|
+
@include bpk-breakpoint-mobile {
|
|
38
|
+
max-width: 100%;
|
|
39
|
+
padding: bpk-spacing-base();
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
&--leave {
|
|
43
|
+
transform: translateY(0);
|
|
44
|
+
opacity: 1;
|
|
45
|
+
|
|
46
|
+
&-active {
|
|
47
|
+
transform: translateY(bpk-spacing-xl());
|
|
48
|
+
opacity: 0;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
&-done {
|
|
52
|
+
opacity: 0;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
&--appear {
|
|
57
|
+
transform: translateY(bpk-spacing-xl());
|
|
58
|
+
opacity: 0;
|
|
59
|
+
|
|
60
|
+
&-active {
|
|
61
|
+
transform: translateY(0);
|
|
62
|
+
opacity: 1;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
&__button {
|
|
67
|
+
min-height: 0;
|
|
68
|
+
margin: 0 0 auto auto;
|
|
69
|
+
padding: 0;
|
|
70
|
+
color: $bpk-color-sky-blue-tint-01;
|
|
71
|
+
|
|
72
|
+
&--dark {
|
|
73
|
+
color: $bpk-link-color;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
&__icon {
|
|
78
|
+
margin: bpk-spacing-sm() bpk-spacing-md() 0 bpk-spacing-sm();
|
|
79
|
+
flex-shrink: 0;
|
|
80
|
+
text-align: bottom;
|
|
81
|
+
fill: $bpk-color-white;
|
|
82
|
+
|
|
83
|
+
&--dark {
|
|
84
|
+
fill: $bpk-color-sky-gray;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
&__text {
|
|
89
|
+
margin-right: bpk-spacing-md();
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
&--dark {
|
|
93
|
+
background: $bpk-color-white;
|
|
94
|
+
color: $bpk-color-sky-gray;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bpk-component-form-validation",
|
|
3
|
-
"version": "4.2.
|
|
3
|
+
"version": "4.2.14",
|
|
4
4
|
"description": "Backpack form-validation component.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"bpk-component-button": "^6.2.5",
|
|
28
28
|
"bpk-component-checkbox": "^4.1.12",
|
|
29
29
|
"bpk-component-icon": "^9.2.11",
|
|
30
|
-
"bpk-component-input": "^6.1.
|
|
30
|
+
"bpk-component-input": "^6.1.14",
|
|
31
31
|
"bpk-component-select": "^5.1.10",
|
|
32
32
|
"bpk-component-textarea": "^4.2.10"
|
|
33
33
|
}
|
|
@@ -30,8 +30,6 @@
|
|
|
30
30
|
box-shadow: none;
|
|
31
31
|
|
|
32
32
|
@include breakpoint-landscape {
|
|
33
|
-
pointer-events: none;
|
|
34
|
-
|
|
35
33
|
&__sponsor-label {
|
|
36
34
|
margin-bottom: bpk-spacing-sm();
|
|
37
35
|
|
|
@@ -172,6 +170,11 @@
|
|
|
172
170
|
|
|
173
171
|
@include bpk-margin-leading(bpk-spacing-xxxl(), false);
|
|
174
172
|
@include bpk-margin-trailing(bpk-spacing-xxl(), false);
|
|
173
|
+
|
|
174
|
+
/* adjusting for 1.5rem different between margins */
|
|
175
|
+
&--center > * {
|
|
176
|
+
@include bpk-margin-trailing(bpk-spacing-lg());
|
|
177
|
+
}
|
|
175
178
|
}
|
|
176
179
|
|
|
177
180
|
@include breakpoint-landscape-tablet {
|
|
@@ -179,6 +182,11 @@
|
|
|
179
182
|
|
|
180
183
|
@include bpk-margin-leading(bpk-spacing-xxl(), false);
|
|
181
184
|
@include bpk-margin-trailing(bpk-spacing-xl(), false);
|
|
185
|
+
|
|
186
|
+
/* adjusting for 0.5rem different between margins */
|
|
187
|
+
&--center > * {
|
|
188
|
+
@include bpk-margin-trailing(bpk-spacing-md());
|
|
189
|
+
}
|
|
182
190
|
}
|
|
183
191
|
|
|
184
192
|
@include breakpoint-portrait-large {
|
|
@@ -237,8 +245,6 @@
|
|
|
237
245
|
}
|
|
238
246
|
|
|
239
247
|
&__cta {
|
|
240
|
-
pointer-events: auto;
|
|
241
|
-
|
|
242
248
|
@include breakpoint-landscape {
|
|
243
249
|
margin-top: bpk-spacing-xl();
|
|
244
250
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bpk-component-image",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.12",
|
|
4
4
|
"description": "Backpack image component.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
},
|
|
15
15
|
"gitHead": "f9f94f86d7cfc75e43bc6ad5eb01b23e62a89cc8",
|
|
16
16
|
"dependencies": {
|
|
17
|
+
"@skyscanner/bpk-foundations-web": "^8.0.0",
|
|
17
18
|
"bpk-component-spinner": "^5.1.10",
|
|
18
19
|
"bpk-mixins": "^31.1.1",
|
|
19
20
|
"bpk-react-utils": "^4.1.2",
|
|
@@ -24,7 +25,6 @@
|
|
|
24
25
|
"react": "^16.3.0 || ^17.0.0"
|
|
25
26
|
},
|
|
26
27
|
"devDependencies": {
|
|
27
|
-
"@skyscanner/bpk-foundations-web": "^8.0.0",
|
|
28
28
|
"bpk-component-mobile-scroll-container": "^3.1.10",
|
|
29
29
|
"bpk-component-text": "^7.0.4"
|
|
30
30
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bpk-component-input",
|
|
3
|
-
"version": "6.1.
|
|
3
|
+
"version": "6.1.14",
|
|
4
4
|
"description": "Backpack input component.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"react": "^16.3.0 || ^17.0.0"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"bpk-component-banner-alert": "^6.1.
|
|
26
|
+
"bpk-component-banner-alert": "^6.1.14",
|
|
27
27
|
"bpk-component-label": "^5.1.10",
|
|
28
28
|
"bpk-storybook-utils": "^1.1.9"
|
|
29
29
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bpk-component-overlay",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.12",
|
|
4
4
|
"description": "Backpack overlay component.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"react": "^16.3.0 || ^17.0.0"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
|
-
"bpk-component-image": "^5.1.
|
|
24
|
+
"bpk-component-image": "^5.1.12",
|
|
25
25
|
"bpk-component-text": "^7.0.4"
|
|
26
26
|
},
|
|
27
27
|
"gitHead": "f9f94f86d7cfc75e43bc6ad5eb01b23e62a89cc8"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bpk-component-phone-input",
|
|
3
|
-
"version": "7.1.
|
|
3
|
+
"version": "7.1.16",
|
|
4
4
|
"description": "Backpack phone input component.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"gitHead": "f9f94f86d7cfc75e43bc6ad5eb01b23e62a89cc8",
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@skyscanner/bpk-foundations-web": "^8.0.0",
|
|
18
|
-
"bpk-component-input": "^6.1.
|
|
18
|
+
"bpk-component-input": "^6.1.14",
|
|
19
19
|
"bpk-component-label": "^5.1.10",
|
|
20
20
|
"bpk-component-select": "^5.1.10",
|
|
21
21
|
"bpk-component-text": "^7.0.4",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"react": "^16.3.0 || ^17.0.0"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"bpk-component-fieldset": "^4.1.
|
|
31
|
-
"bpk-component-image": "^5.1.
|
|
30
|
+
"bpk-component-fieldset": "^4.1.16",
|
|
31
|
+
"bpk-component-image": "^5.1.12"
|
|
32
32
|
}
|
|
33
33
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bpk-component-popover",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.1",
|
|
4
4
|
"description": "Backpack popover component.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -30,6 +30,6 @@
|
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"bpk-component-button": "^6.2.5",
|
|
32
32
|
"bpk-component-content-container": "^5.0.4",
|
|
33
|
-
"bpk-component-input": "^6.1.
|
|
33
|
+
"bpk-component-input": "^6.1.14"
|
|
34
34
|
}
|
|
35
35
|
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# bpk-component-price
|
|
2
|
+
|
|
3
|
+
> Backpack example component.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
npm install bpk-component-price --save-dev
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```js
|
|
14
|
+
import React from 'react';
|
|
15
|
+
import BpkPrice, { SIZES } from 'bpk-component-price';
|
|
16
|
+
|
|
17
|
+
export default () => (
|
|
18
|
+
<BpkPrice
|
|
19
|
+
size={SIZES.large}
|
|
20
|
+
subtitle="£209"
|
|
21
|
+
title="£1,830"
|
|
22
|
+
description="/ night"
|
|
23
|
+
/>
|
|
24
|
+
);
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Props
|
|
28
|
+
|
|
29
|
+
| Property | PropType | Required | Default Value |
|
|
30
|
+
| --------- | -------- | -------- | ------------- |
|
|
31
|
+
| title | string | true | - |
|
|
32
|
+
| size | oneOf(SIZES) | false | SIZES.small |
|
|
33
|
+
| subtitle | string | false | null |
|
|
34
|
+
| description | string | false | null |
|
|
35
|
+
| className | string | false | null |
|
|
@@ -0,0 +1,23 @@
|
|
|
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
|
+
/* @flow strict */
|
|
19
|
+
|
|
20
|
+
import BpkPrice, { SIZES } from './src/BpkPrice';
|
|
21
|
+
|
|
22
|
+
export default BpkPrice;
|
|
23
|
+
export { SIZES };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "bpk-component-price",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Backpack price component.",
|
|
5
|
+
"license": "Apache-2.0",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git@github.com:Skyscanner/backpack.git"
|
|
9
|
+
},
|
|
10
|
+
"author": "Backpack Design System <backpack@skyscanner.net>",
|
|
11
|
+
"main": "index.js",
|
|
12
|
+
"publishConfig": {
|
|
13
|
+
"registry": "https://registry.npmjs.org/"
|
|
14
|
+
},
|
|
15
|
+
"dependencies": {
|
|
16
|
+
"bpk-component-text": "^7.0.4",
|
|
17
|
+
"bpk-mixins": "^31.1.1",
|
|
18
|
+
"bpk-react-utils": "^4.1.2",
|
|
19
|
+
"prop-types": "^15.5.8"
|
|
20
|
+
},
|
|
21
|
+
"peerDependencies": {
|
|
22
|
+
"react": "^16.3.0 || ^17.0.0"
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -0,0 +1,106 @@
|
|
|
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
|
+
/* @flow strict */
|
|
19
|
+
|
|
20
|
+
import PropTypes from 'prop-types';
|
|
21
|
+
import React from 'react';
|
|
22
|
+
|
|
23
|
+
import { cssModules } from '../../bpk-react-utils';
|
|
24
|
+
import BpkText, { TEXT_STYLES } from '../../bpk-component-text';
|
|
25
|
+
|
|
26
|
+
import STYLES from './BpkPrice.module.scss';
|
|
27
|
+
|
|
28
|
+
export const SIZES = {
|
|
29
|
+
small: 'small',
|
|
30
|
+
large: 'large',
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
type Props = {
|
|
34
|
+
title: string,
|
|
35
|
+
size: $Values<typeof SIZES>,
|
|
36
|
+
className: ?string,
|
|
37
|
+
subtitle: ?string,
|
|
38
|
+
description: ?string,
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
const getClassName = cssModules(STYLES);
|
|
42
|
+
|
|
43
|
+
const BpkPrice = (props: Props) => {
|
|
44
|
+
const { className, description, size, subtitle, title, ...rest } = props;
|
|
45
|
+
|
|
46
|
+
const isSmall = size === SIZES.small;
|
|
47
|
+
|
|
48
|
+
return (
|
|
49
|
+
<div
|
|
50
|
+
className={getClassName(
|
|
51
|
+
'bpk-price',
|
|
52
|
+
isSmall && 'bpk-price--small',
|
|
53
|
+
className,
|
|
54
|
+
)}
|
|
55
|
+
// $FlowFixMe[cannot-spread-inexact] - inexact rest. See 'decisions/flowfixme.md'.
|
|
56
|
+
{...rest}
|
|
57
|
+
>
|
|
58
|
+
{subtitle && (
|
|
59
|
+
<BpkText
|
|
60
|
+
className={getClassName('bpk-price__subtitle')}
|
|
61
|
+
textStyle={isSmall ? TEXT_STYLES.xs : TEXT_STYLES.sm}
|
|
62
|
+
tagName="span"
|
|
63
|
+
>
|
|
64
|
+
{subtitle}
|
|
65
|
+
</BpkText>
|
|
66
|
+
)}
|
|
67
|
+
<div className={isSmall && getClassName('bpk-price__titleColumn')}>
|
|
68
|
+
<BpkText
|
|
69
|
+
textStyle={isSmall ? TEXT_STYLES.heading4 : TEXT_STYLES.xxl}
|
|
70
|
+
tagName="span"
|
|
71
|
+
>
|
|
72
|
+
{title}
|
|
73
|
+
</BpkText>
|
|
74
|
+
{description && (
|
|
75
|
+
<BpkText
|
|
76
|
+
textStyle={isSmall ? TEXT_STYLES.xs : TEXT_STYLES.sm}
|
|
77
|
+
tagName="span"
|
|
78
|
+
className={getClassName(
|
|
79
|
+
'bpk-price__description',
|
|
80
|
+
!isSmall && 'bpk-price__descriptionSpacing',
|
|
81
|
+
)}
|
|
82
|
+
>
|
|
83
|
+
{description}
|
|
84
|
+
</BpkText>
|
|
85
|
+
)}
|
|
86
|
+
</div>
|
|
87
|
+
</div>
|
|
88
|
+
);
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
BpkPrice.propTypes = {
|
|
92
|
+
title: PropTypes.string.isRequired,
|
|
93
|
+
size: PropTypes.oneOf(Object.keys(SIZES)),
|
|
94
|
+
className: PropTypes.string,
|
|
95
|
+
subtitle: PropTypes.string,
|
|
96
|
+
description: PropTypes.string,
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
BpkPrice.defaultProps = {
|
|
100
|
+
size: SIZES.small,
|
|
101
|
+
className: null,
|
|
102
|
+
subtitle: null,
|
|
103
|
+
description: null,
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
export default BpkPrice;
|
|
@@ -0,0 +1,55 @@
|
|
|
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 '~bpk-mixins/index';
|
|
20
|
+
|
|
21
|
+
.bpk-price {
|
|
22
|
+
display: flex;
|
|
23
|
+
flex-direction: column;
|
|
24
|
+
|
|
25
|
+
&--small {
|
|
26
|
+
text-align: right;
|
|
27
|
+
|
|
28
|
+
@include bpk-rtl {
|
|
29
|
+
text-align: left;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
&__subtitle {
|
|
34
|
+
color: $bpk-color-sky-gray-tint-02;
|
|
35
|
+
text-decoration-line: line-through;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
&__titleColumn {
|
|
39
|
+
display: flex;
|
|
40
|
+
flex-direction: column;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
&__description {
|
|
44
|
+
color: $bpk-color-sky-gray-tint-02;
|
|
45
|
+
|
|
46
|
+
&Spacing {
|
|
47
|
+
margin-left: bpk-spacing-sm();
|
|
48
|
+
|
|
49
|
+
@include bpk-rtl {
|
|
50
|
+
margin-right: bpk-spacing-sm();
|
|
51
|
+
margin-left: unset;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bpk-component-scrollable-calendar",
|
|
3
|
-
"version": "6.1.
|
|
3
|
+
"version": "6.1.17",
|
|
4
4
|
"description": "Backpack scrollable calendar component.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"gitHead": "4e4ec9add28e1db54d6a38a10c331bbd163f2926",
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@skyscanner/bpk-foundations-web": "^8.0.0",
|
|
18
|
-
"bpk-component-calendar": "^11.1.
|
|
18
|
+
"bpk-component-calendar": "^11.1.16",
|
|
19
19
|
"bpk-component-text": "^7.0.4",
|
|
20
20
|
"bpk-mixins": "^31.1.1",
|
|
21
21
|
"bpk-react-utils": "^4.1.2",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bpk-component-theme-toggle",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.11",
|
|
4
4
|
"description": "Backpack theme toggle component.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -19,7 +19,6 @@
|
|
|
19
19
|
"bpk-component-select": "^5.1.10",
|
|
20
20
|
"bpk-mixins": "^31.1.1",
|
|
21
21
|
"bpk-react-utils": "^4.1.2",
|
|
22
|
-
"konami": "^1.6.2",
|
|
23
22
|
"prop-types": "^15.7.2"
|
|
24
23
|
},
|
|
25
24
|
"peerDependencies": {
|
|
@@ -17,7 +17,6 @@
|
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
19
|
import React from 'react';
|
|
20
|
-
import Konami from 'konami';
|
|
21
20
|
|
|
22
21
|
import BpkLabel from '../../bpk-component-label';
|
|
23
22
|
import BpkSelect from '../../bpk-component-select';
|
|
@@ -48,17 +47,10 @@ class BpkThemeToggle extends React.Component {
|
|
|
48
47
|
|
|
49
48
|
componentDidMount() {
|
|
50
49
|
document.addEventListener('keydown', this.handleKeyDown);
|
|
51
|
-
this.easterEgg = new Konami(() => {
|
|
52
|
-
this.konamiInterval = setInterval(this.cycleTheme, 200);
|
|
53
|
-
});
|
|
54
50
|
}
|
|
55
51
|
|
|
56
52
|
componentWillUnmount() {
|
|
57
53
|
document.removeEventListener('keydown', this.handleKeyDown);
|
|
58
|
-
|
|
59
|
-
if (this.konamiInterval) {
|
|
60
|
-
clearInterval(this.konamiInterval);
|
|
61
|
-
}
|
|
62
54
|
}
|
|
63
55
|
|
|
64
56
|
handleKeyDown = (e) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skyscanner/backpack-web",
|
|
3
|
-
"version": "3.0
|
|
3
|
+
"version": "3.3.0",
|
|
4
4
|
"description": "Backpack Design System web library",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -22,13 +22,16 @@
|
|
|
22
22
|
"access": "public"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
+
"@popperjs/core": "^2.11.5",
|
|
26
|
+
"@react-google-maps/api": "^2.12.0",
|
|
25
27
|
"@skyscanner/bpk-foundations-web": "^8.0.0",
|
|
28
|
+
"@skyscanner/bpk-svgs": "^14.1.9",
|
|
26
29
|
"a11y-focus-scope": "^1.1.3",
|
|
27
30
|
"a11y-focus-store": "^1.0.0",
|
|
28
31
|
"bpk-mixins": "^31.1.1",
|
|
29
|
-
"date-fns": "^2.21.1",
|
|
30
32
|
"d3-path": "^2.0.0",
|
|
31
33
|
"d3-scale": "^4.0.2",
|
|
34
|
+
"date-fns": "^2.21.1",
|
|
32
35
|
"intersection-observer": "^0.7.0",
|
|
33
36
|
"lodash": "^4.17.20",
|
|
34
37
|
"lodash.clamp": "^4.0.3",
|