@skyscanner/backpack-web 19.0.0 → 20.1.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 +0 -1
- package/bpk-component-banner-alert/src/BpkBannerAlert.module.scss +0 -8
- package/bpk-component-banner-alert/src/BpkBannerAlertInner.js +0 -2
- package/bpk-component-banner-alert/src/common-types.js +1 -9
- package/bpk-component-button/README.md +0 -2
- package/bpk-component-button/index.js +0 -2
- package/bpk-component-button/src/BpkButton.js +0 -8
- package/bpk-component-calendar/README.md +1 -1
- package/bpk-component-calendar/src/BpkCalendarContainer.js +3 -18
- package/bpk-component-calendar/src/BpkCalendarGrid.js +1 -18
- package/bpk-component-calendar/src/BpkCalendarGridHeader.js +1 -6
- package/bpk-component-calendar/src/Week.js +1 -20
- package/bpk-component-calendar/src/composeCalendar.js +1 -11
- package/bpk-component-card/README.md +50 -17
- package/bpk-component-card/index.js +2 -1
- package/{bpk-component-grid/src/BpkGridContainer.js → bpk-component-card/src/BpkCardWrapper.js} +28 -23
- package/bpk-component-card/src/BpkCardWrapper.module.scss +61 -0
- package/bpk-component-datatable/README.md +5 -5
- package/bpk-component-datatable/src/BpkDataTable.js +4 -4
- package/bpk-component-datepicker/src/BpkDatepicker.js +1 -11
- package/bpk-component-flare/src/svgs/pointer.svg +1 -1
- package/bpk-component-icon/index.js +0 -4
- package/bpk-component-image/src/BpkBackgroundImage.js +2 -19
- package/bpk-component-image/src/BpkImage.js +2 -21
- package/bpk-component-input/index.js +2 -11
- package/bpk-component-link/src/BpkButtonLink.js +2 -7
- package/bpk-component-link/src/BpkLink.js +1 -7
- package/bpk-component-overlay/README.md +1 -2
- package/bpk-component-overlay/index.js +1 -2
- package/bpk-component-overlay/src/BpkOverlay.js +1 -14
- package/bpk-component-scrollable-calendar/src/BpkScrollableCalendarGridList.js +1 -6
- package/bpk-component-switch/index.js +2 -5
- package/bpk-component-switch/src/BpkSwitch.js +2 -17
- package/bpk-component-switch/src/BpkSwitch.module.scss +6 -13
- package/bpk-component-table/README.md +0 -1
- package/bpk-component-table/src/BpkTable.js +3 -13
- package/bpk-component-table/src/BpkTable.module.scss +0 -8
- package/bpk-component-table/src/BpkTableHeadCell.js +4 -9
- package/package.json +1 -1
- package/bpk-component-button/BpkButtonOutline.js +0 -21
- package/bpk-component-button/src/BpkButtonOutline.js +0 -46
- package/bpk-component-button/src/BpkButtonOutline.module.css +0 -18
- package/bpk-component-button/src/BpkButtonOutline.module.scss +0 -23
- package/bpk-component-grid/README.md +0 -89
- package/bpk-component-grid/index.js +0 -25
- package/bpk-component-grid/src/BpkGridColumn.js +0 -117
- package/bpk-component-grid/src/BpkGridColumn.module.css +0 -18
- package/bpk-component-grid/src/BpkGridColumn.module.scss +0 -73
- package/bpk-component-grid/src/BpkGridContainer.module.css +0 -18
- package/bpk-component-grid/src/BpkGridContainer.module.scss +0 -33
- package/bpk-component-grid/src/BpkGridRow.js +0 -56
- package/bpk-component-grid/src/BpkGridRow.module.css +0 -18
- package/bpk-component-grid/src/BpkGridRow.module.scss +0 -29
- package/bpk-component-image/src/customPropTypes.js +0 -37
|
@@ -1,46 +0,0 @@
|
|
|
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
|
-
/* @flow strict */
|
|
20
|
-
|
|
21
|
-
import { Props, defaultProps, propTypes } from './common-types';
|
|
22
|
-
import BpkButtonBase, { cssModules } from './BpkButtonBase';
|
|
23
|
-
import STYLES from './BpkButtonOutline.module.scss';
|
|
24
|
-
|
|
25
|
-
const getClassName = cssModules(STYLES);
|
|
26
|
-
|
|
27
|
-
const BpkButtonOutline = (props: Props) => {
|
|
28
|
-
const { className, ...rest } = props;
|
|
29
|
-
|
|
30
|
-
const classNames = [getClassName('bpk-button--outline')];
|
|
31
|
-
|
|
32
|
-
if (className) {
|
|
33
|
-
classNames.push(className);
|
|
34
|
-
}
|
|
35
|
-
const classNamesFinal = classNames.join(' ');
|
|
36
|
-
|
|
37
|
-
return (
|
|
38
|
-
// $FlowFixMe[cannot-spread-inexact] - inexact rest. See 'decisions/flowfixme.md'.
|
|
39
|
-
<BpkButtonBase className={classNamesFinal} {...rest} />
|
|
40
|
-
);
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
BpkButtonOutline.propTypes = { ...propTypes };
|
|
44
|
-
BpkButtonOutline.defaultProps = { ...defaultProps };
|
|
45
|
-
|
|
46
|
-
export default BpkButtonOutline;
|
|
@@ -1,18 +0,0 @@
|
|
|
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-button--outline{background-color:rgba(0,0,0,0);background-image:none;color:#fff;box-shadow:0 0 0 2px #fff inset}.bpk-no-touch-support .bpk-button--outline:hover:not(:active):not(:disabled){background-color:rgba(0,0,0,0);box-shadow:0 0 0 2px rgba(255,255,255,0.5) inset}:global(.bpk-no-touch-support) .bpk-button--outline:hover:not(:active):not(:disabled){background-color:rgba(0,0,0,0);box-shadow:0 0 0 2px rgba(255,255,255,0.5) inset}.bpk-button--outline:active{background-color:rgba(0,0,0,0);box-shadow:0 0 0 3px #fff inset}.bpk-button--outline:disabled{background-color:#dddde5;background-image:none;color:#b2b2bf;box-shadow:none}
|
|
@@ -1,23 +0,0 @@
|
|
|
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.scss';
|
|
20
|
-
|
|
21
|
-
.bpk-button--outline {
|
|
22
|
-
@include bpk-button--outline;
|
|
23
|
-
}
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
# bpk-component-grid
|
|
2
|
-
|
|
3
|
-
> Backpack grid components.
|
|
4
|
-
|
|
5
|
-
This component is deprecated and will be removed in a future release.
|
|
6
|
-
|
|
7
|
-
## Installation
|
|
8
|
-
|
|
9
|
-
Check the main [Readme](https://github.com/skyscanner/backpack#usage) for a complete installation guide.
|
|
10
|
-
|
|
11
|
-
## Usage
|
|
12
|
-
|
|
13
|
-
```js
|
|
14
|
-
import { BpkGridContainer, BpkGridRow, BpkGridColumn } from '@skyscanner/backpack-web/bpk-component-grid';
|
|
15
|
-
|
|
16
|
-
export default () => (
|
|
17
|
-
<BpkGridContainer>
|
|
18
|
-
<BpkGridRow>
|
|
19
|
-
<BpkGridColumn width={8} tabletWidth={12}>
|
|
20
|
-
Search controls
|
|
21
|
-
</BpkGridColumn>
|
|
22
|
-
<BpkGridColumn width={4} tabletWidth={0}>
|
|
23
|
-
MPU
|
|
24
|
-
</BpkGridColumn>
|
|
25
|
-
</BpkGridRow>
|
|
26
|
-
<BpkGridRow>
|
|
27
|
-
<BpkGridColumn width={12}>
|
|
28
|
-
Provider logos
|
|
29
|
-
</BpkGridColumn>
|
|
30
|
-
</BpkGridRow>
|
|
31
|
-
<BpkGridRow>
|
|
32
|
-
<BpkGridColumn width={4} mobileWidth={12}>
|
|
33
|
-
Content panel
|
|
34
|
-
</BpkGridColumn>
|
|
35
|
-
<BpkGridColumn width={4} mobileWidth={12}>
|
|
36
|
-
Content panel
|
|
37
|
-
</BpkGridColumn>
|
|
38
|
-
<BpkGridColumn width={4} mobileWidth={12}>
|
|
39
|
-
Content panel
|
|
40
|
-
</BpkGridColumn>
|
|
41
|
-
</BpkGridRow>
|
|
42
|
-
<BpkGridRow>
|
|
43
|
-
<BpkGridColumn width={3} tabletWidth={6} mobileWidth={12}>
|
|
44
|
-
Confidence statement
|
|
45
|
-
</BpkGridColumn>
|
|
46
|
-
<BpkGridColumn width={3} tabletWidth={6} mobileWidth={12}>
|
|
47
|
-
Confidence statement
|
|
48
|
-
</BpkGridColumn>
|
|
49
|
-
<BpkGridColumn width={3} tabletWidth={6} mobileWidth={12}>
|
|
50
|
-
Confidence statement
|
|
51
|
-
</BpkGridColumn>
|
|
52
|
-
<BpkGridColumn width={3} tabletWidth={6} mobileWidth={12}>
|
|
53
|
-
Confidence statement
|
|
54
|
-
</BpkGridColumn>
|
|
55
|
-
</BpkGridRow>
|
|
56
|
-
</BpkGridContainer>
|
|
57
|
-
);
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
## Props
|
|
61
|
-
|
|
62
|
-
### BpkGridContainer
|
|
63
|
-
|
|
64
|
-
| Property | PropType | Required | Default Value |
|
|
65
|
-
| --------- | -------- | -------- | ------------- |
|
|
66
|
-
| children | node | true | - |
|
|
67
|
-
| debug | bool | false | false |
|
|
68
|
-
| fullWidth | bool | false | false |
|
|
69
|
-
|
|
70
|
-
### BpkGridRow
|
|
71
|
-
|
|
72
|
-
| Property | PropType | Required | Default Value |
|
|
73
|
-
| --------- | -------- | -------- | ------------- |
|
|
74
|
-
| children | node | true | - |
|
|
75
|
-
| padded | bool | false | true |
|
|
76
|
-
|
|
77
|
-
### BpkGridColumn
|
|
78
|
-
|
|
79
|
-
| Property | PropType | Required | Default Value |
|
|
80
|
-
| ------------ | -------- | -------- | ------------- |
|
|
81
|
-
| children | node | true | - |
|
|
82
|
-
| width | number | true | - |
|
|
83
|
-
| mobileWidth | number | false | null |
|
|
84
|
-
| tabletWidth | number | false | null |
|
|
85
|
-
| offset | number | false | null |
|
|
86
|
-
| mobileOffset | number | false | null |
|
|
87
|
-
| tabletOffset | number | false | null |
|
|
88
|
-
| padded | bool | false | true |
|
|
89
|
-
| debug | bool | false | false |
|
|
@@ -1,25 +0,0 @@
|
|
|
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 Container from './src/BpkGridContainer';
|
|
20
|
-
import Row from './src/BpkGridRow';
|
|
21
|
-
import Column from './src/BpkGridColumn';
|
|
22
|
-
|
|
23
|
-
export const BpkGridContainer = Container;
|
|
24
|
-
export const BpkGridRow = Row;
|
|
25
|
-
export const BpkGridColumn = Column;
|
|
@@ -1,117 +0,0 @@
|
|
|
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 PropTypes from 'prop-types';
|
|
20
|
-
|
|
21
|
-
import { cssModules } from '../../bpk-react-utils';
|
|
22
|
-
|
|
23
|
-
import STYLES from './BpkGridColumn.module.scss';
|
|
24
|
-
|
|
25
|
-
const getClassName = cssModules(STYLES);
|
|
26
|
-
|
|
27
|
-
// IE11 doesn't support `Number.isNaN` so we must use the global.
|
|
28
|
-
// When IE11 support drops we can migrate.
|
|
29
|
-
// eslint-disable-next-line no-restricted-globals
|
|
30
|
-
const isNumeric = (n) => !isNaN(parseFloat(n)) && isFinite(n);
|
|
31
|
-
|
|
32
|
-
const BpkGridColumn = (props) => {
|
|
33
|
-
const {
|
|
34
|
-
children,
|
|
35
|
-
className,
|
|
36
|
-
debug,
|
|
37
|
-
mobileOffset,
|
|
38
|
-
mobileWidth,
|
|
39
|
-
offset,
|
|
40
|
-
padded,
|
|
41
|
-
tabletOffset,
|
|
42
|
-
tabletWidth,
|
|
43
|
-
width,
|
|
44
|
-
...rest
|
|
45
|
-
} = props;
|
|
46
|
-
|
|
47
|
-
const classNames = ['bpk-grid__column', `bpk-grid__column--${width}`].map(
|
|
48
|
-
getClassName,
|
|
49
|
-
);
|
|
50
|
-
|
|
51
|
-
if (isNumeric(mobileWidth)) {
|
|
52
|
-
classNames.push(getClassName(`bpk-grid__column--mobile-${mobileWidth}`));
|
|
53
|
-
}
|
|
54
|
-
if (isNumeric(tabletWidth)) {
|
|
55
|
-
classNames.push(getClassName(`bpk-grid__column--tablet-${tabletWidth}`));
|
|
56
|
-
}
|
|
57
|
-
if (isNumeric(offset)) {
|
|
58
|
-
classNames.push(getClassName(`bpk-grid__column--offset-${offset}`));
|
|
59
|
-
}
|
|
60
|
-
if (isNumeric(mobileOffset)) {
|
|
61
|
-
classNames.push(
|
|
62
|
-
getClassName(`bpk-grid__column--offset-mobile-${mobileOffset}`),
|
|
63
|
-
);
|
|
64
|
-
}
|
|
65
|
-
if (isNumeric(tabletOffset)) {
|
|
66
|
-
classNames.push(
|
|
67
|
-
getClassName(`bpk-grid__column--offset-tablet-${tabletOffset}`),
|
|
68
|
-
);
|
|
69
|
-
}
|
|
70
|
-
if (padded) {
|
|
71
|
-
classNames.push(getClassName('bpk-grid__column--padded'));
|
|
72
|
-
}
|
|
73
|
-
if (debug) {
|
|
74
|
-
classNames.push(getClassName('bpk-grid__column--debug'));
|
|
75
|
-
}
|
|
76
|
-
if (className) {
|
|
77
|
-
classNames.push(className);
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
return (
|
|
81
|
-
<div className={classNames.join(' ')} {...rest}>
|
|
82
|
-
{debug ? (
|
|
83
|
-
<div className={getClassName('bpk-grid__column-debugger')}>
|
|
84
|
-
{children}
|
|
85
|
-
</div>
|
|
86
|
-
) : (
|
|
87
|
-
children
|
|
88
|
-
)}
|
|
89
|
-
</div>
|
|
90
|
-
);
|
|
91
|
-
};
|
|
92
|
-
|
|
93
|
-
BpkGridColumn.propTypes = {
|
|
94
|
-
children: PropTypes.node.isRequired,
|
|
95
|
-
width: PropTypes.number.isRequired,
|
|
96
|
-
mobileWidth: PropTypes.number,
|
|
97
|
-
tabletWidth: PropTypes.number,
|
|
98
|
-
offset: PropTypes.number,
|
|
99
|
-
mobileOffset: PropTypes.number,
|
|
100
|
-
tabletOffset: PropTypes.number,
|
|
101
|
-
padded: PropTypes.bool,
|
|
102
|
-
debug: PropTypes.bool,
|
|
103
|
-
className: PropTypes.string,
|
|
104
|
-
};
|
|
105
|
-
|
|
106
|
-
BpkGridColumn.defaultProps = {
|
|
107
|
-
mobileWidth: null,
|
|
108
|
-
tabletWidth: null,
|
|
109
|
-
offset: null,
|
|
110
|
-
mobileOffset: null,
|
|
111
|
-
tabletOffset: null,
|
|
112
|
-
padded: true,
|
|
113
|
-
debug: false,
|
|
114
|
-
className: null,
|
|
115
|
-
};
|
|
116
|
-
|
|
117
|
-
export default BpkGridColumn;
|
|
@@ -1,18 +0,0 @@
|
|
|
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-grid__column{float:left;padding-right:.75rem;padding-left:.75rem}html[dir='rtl'] .bpk-grid__column{float:right}.bpk-grid__column--padded{padding-top:.75rem;padding-bottom:.75rem}.bpk-grid__column--debug{padding:.75rem}.bpk-grid__column-debugger{background-color:#fff}.bpk-grid__column--0{display:none}.bpk-grid__column--1{display:block;width:8.33333%}.bpk-grid__column--2{display:block;width:16.66667%}.bpk-grid__column--3{display:block;width:25%}.bpk-grid__column--4{display:block;width:33.33333%}.bpk-grid__column--5{display:block;width:41.66667%}.bpk-grid__column--6{display:block;width:50%}.bpk-grid__column--7{display:block;width:58.33333%}.bpk-grid__column--8{display:block;width:66.66667%}.bpk-grid__column--9{display:block;width:75%}.bpk-grid__column--10{display:block;width:83.33333%}.bpk-grid__column--11{display:block;width:91.66667%}.bpk-grid__column--12{display:block;width:100%}.bpk-grid__column--offset-0{margin-left:0}html[dir='rtl'] .bpk-grid__column--offset-0{margin-right:0}.bpk-grid__column--offset-1{margin-left:8.33333%}html[dir='rtl'] .bpk-grid__column--offset-1{margin-right:8.33333%;margin-left:0}.bpk-grid__column--offset-2{margin-left:16.66667%}html[dir='rtl'] .bpk-grid__column--offset-2{margin-right:16.66667%;margin-left:0}.bpk-grid__column--offset-3{margin-left:25%}html[dir='rtl'] .bpk-grid__column--offset-3{margin-right:25%;margin-left:0}.bpk-grid__column--offset-4{margin-left:33.33333%}html[dir='rtl'] .bpk-grid__column--offset-4{margin-right:33.33333%;margin-left:0}.bpk-grid__column--offset-5{margin-left:41.66667%}html[dir='rtl'] .bpk-grid__column--offset-5{margin-right:41.66667%;margin-left:0}.bpk-grid__column--offset-6{margin-left:50%}html[dir='rtl'] .bpk-grid__column--offset-6{margin-right:50%;margin-left:0}.bpk-grid__column--offset-7{margin-left:58.33333%}html[dir='rtl'] .bpk-grid__column--offset-7{margin-right:58.33333%;margin-left:0}.bpk-grid__column--offset-8{margin-left:66.66667%}html[dir='rtl'] .bpk-grid__column--offset-8{margin-right:66.66667%;margin-left:0}.bpk-grid__column--offset-9{margin-left:75%}html[dir='rtl'] .bpk-grid__column--offset-9{margin-right:75%;margin-left:0}.bpk-grid__column--offset-10{margin-left:83.33333%}html[dir='rtl'] .bpk-grid__column--offset-10{margin-right:83.33333%;margin-left:0}.bpk-grid__column--offset-11{margin-left:91.66667%}html[dir='rtl'] .bpk-grid__column--offset-11{margin-right:91.66667%;margin-left:0}.bpk-grid__column--offset-12{margin-left:100%}html[dir='rtl'] .bpk-grid__column--offset-12{margin-right:100%;margin-left:0}@media (max-width: 50.25rem){.bpk-grid__column--tablet-0{display:none}}@media (max-width: 50.25rem){.bpk-grid__column--tablet-1{display:block;width:8.33333%}}@media (max-width: 50.25rem){.bpk-grid__column--tablet-2{display:block;width:16.66667%}}@media (max-width: 50.25rem){.bpk-grid__column--tablet-3{display:block;width:25%}}@media (max-width: 50.25rem){.bpk-grid__column--tablet-4{display:block;width:33.33333%}}@media (max-width: 50.25rem){.bpk-grid__column--tablet-5{display:block;width:41.66667%}}@media (max-width: 50.25rem){.bpk-grid__column--tablet-6{display:block;width:50%}}@media (max-width: 50.25rem){.bpk-grid__column--tablet-7{display:block;width:58.33333%}}@media (max-width: 50.25rem){.bpk-grid__column--tablet-8{display:block;width:66.66667%}}@media (max-width: 50.25rem){.bpk-grid__column--tablet-9{display:block;width:75%}}@media (max-width: 50.25rem){.bpk-grid__column--tablet-10{display:block;width:83.33333%}}@media (max-width: 50.25rem){.bpk-grid__column--tablet-11{display:block;width:91.66667%}}@media (max-width: 50.25rem){.bpk-grid__column--tablet-12{display:block;width:100%}}@media (max-width: 50.25rem){.bpk-grid__column--offset-tablet-0{margin-left:0}html[dir='rtl'] .bpk-grid__column--offset-tablet-0{margin-right:0}}@media (max-width: 50.25rem){.bpk-grid__column--offset-tablet-1{margin-left:8.33333%}html[dir='rtl'] .bpk-grid__column--offset-tablet-1{margin-right:8.33333%;margin-left:0}}@media (max-width: 50.25rem){.bpk-grid__column--offset-tablet-2{margin-left:16.66667%}html[dir='rtl'] .bpk-grid__column--offset-tablet-2{margin-right:16.66667%;margin-left:0}}@media (max-width: 50.25rem){.bpk-grid__column--offset-tablet-3{margin-left:25%}html[dir='rtl'] .bpk-grid__column--offset-tablet-3{margin-right:25%;margin-left:0}}@media (max-width: 50.25rem){.bpk-grid__column--offset-tablet-4{margin-left:33.33333%}html[dir='rtl'] .bpk-grid__column--offset-tablet-4{margin-right:33.33333%;margin-left:0}}@media (max-width: 50.25rem){.bpk-grid__column--offset-tablet-5{margin-left:41.66667%}html[dir='rtl'] .bpk-grid__column--offset-tablet-5{margin-right:41.66667%;margin-left:0}}@media (max-width: 50.25rem){.bpk-grid__column--offset-tablet-6{margin-left:50%}html[dir='rtl'] .bpk-grid__column--offset-tablet-6{margin-right:50%;margin-left:0}}@media (max-width: 50.25rem){.bpk-grid__column--offset-tablet-7{margin-left:58.33333%}html[dir='rtl'] .bpk-grid__column--offset-tablet-7{margin-right:58.33333%;margin-left:0}}@media (max-width: 50.25rem){.bpk-grid__column--offset-tablet-8{margin-left:66.66667%}html[dir='rtl'] .bpk-grid__column--offset-tablet-8{margin-right:66.66667%;margin-left:0}}@media (max-width: 50.25rem){.bpk-grid__column--offset-tablet-9{margin-left:75%}html[dir='rtl'] .bpk-grid__column--offset-tablet-9{margin-right:75%;margin-left:0}}@media (max-width: 50.25rem){.bpk-grid__column--offset-tablet-10{margin-left:83.33333%}html[dir='rtl'] .bpk-grid__column--offset-tablet-10{margin-right:83.33333%;margin-left:0}}@media (max-width: 50.25rem){.bpk-grid__column--offset-tablet-11{margin-left:91.66667%}html[dir='rtl'] .bpk-grid__column--offset-tablet-11{margin-right:91.66667%;margin-left:0}}@media (max-width: 50.25rem){.bpk-grid__column--offset-tablet-12{margin-left:100%}html[dir='rtl'] .bpk-grid__column--offset-tablet-12{margin-right:100%;margin-left:0}}@media (max-width: 32.25rem){.bpk-grid__column--mobile-0{display:none}}@media (max-width: 32.25rem){.bpk-grid__column--mobile-1{display:block;width:8.33333%}}@media (max-width: 32.25rem){.bpk-grid__column--mobile-2{display:block;width:16.66667%}}@media (max-width: 32.25rem){.bpk-grid__column--mobile-3{display:block;width:25%}}@media (max-width: 32.25rem){.bpk-grid__column--mobile-4{display:block;width:33.33333%}}@media (max-width: 32.25rem){.bpk-grid__column--mobile-5{display:block;width:41.66667%}}@media (max-width: 32.25rem){.bpk-grid__column--mobile-6{display:block;width:50%}}@media (max-width: 32.25rem){.bpk-grid__column--mobile-7{display:block;width:58.33333%}}@media (max-width: 32.25rem){.bpk-grid__column--mobile-8{display:block;width:66.66667%}}@media (max-width: 32.25rem){.bpk-grid__column--mobile-9{display:block;width:75%}}@media (max-width: 32.25rem){.bpk-grid__column--mobile-10{display:block;width:83.33333%}}@media (max-width: 32.25rem){.bpk-grid__column--mobile-11{display:block;width:91.66667%}}@media (max-width: 32.25rem){.bpk-grid__column--mobile-12{display:block;width:100%}}@media (max-width: 32.25rem){.bpk-grid__column--offset-mobile-0{margin-left:0}html[dir='rtl'] .bpk-grid__column--offset-mobile-0{margin-right:0}}@media (max-width: 32.25rem){.bpk-grid__column--offset-mobile-1{margin-left:8.33333%}html[dir='rtl'] .bpk-grid__column--offset-mobile-1{margin-right:8.33333%;margin-left:0}}@media (max-width: 32.25rem){.bpk-grid__column--offset-mobile-2{margin-left:16.66667%}html[dir='rtl'] .bpk-grid__column--offset-mobile-2{margin-right:16.66667%;margin-left:0}}@media (max-width: 32.25rem){.bpk-grid__column--offset-mobile-3{margin-left:25%}html[dir='rtl'] .bpk-grid__column--offset-mobile-3{margin-right:25%;margin-left:0}}@media (max-width: 32.25rem){.bpk-grid__column--offset-mobile-4{margin-left:33.33333%}html[dir='rtl'] .bpk-grid__column--offset-mobile-4{margin-right:33.33333%;margin-left:0}}@media (max-width: 32.25rem){.bpk-grid__column--offset-mobile-5{margin-left:41.66667%}html[dir='rtl'] .bpk-grid__column--offset-mobile-5{margin-right:41.66667%;margin-left:0}}@media (max-width: 32.25rem){.bpk-grid__column--offset-mobile-6{margin-left:50%}html[dir='rtl'] .bpk-grid__column--offset-mobile-6{margin-right:50%;margin-left:0}}@media (max-width: 32.25rem){.bpk-grid__column--offset-mobile-7{margin-left:58.33333%}html[dir='rtl'] .bpk-grid__column--offset-mobile-7{margin-right:58.33333%;margin-left:0}}@media (max-width: 32.25rem){.bpk-grid__column--offset-mobile-8{margin-left:66.66667%}html[dir='rtl'] .bpk-grid__column--offset-mobile-8{margin-right:66.66667%;margin-left:0}}@media (max-width: 32.25rem){.bpk-grid__column--offset-mobile-9{margin-left:75%}html[dir='rtl'] .bpk-grid__column--offset-mobile-9{margin-right:75%;margin-left:0}}@media (max-width: 32.25rem){.bpk-grid__column--offset-mobile-10{margin-left:83.33333%}html[dir='rtl'] .bpk-grid__column--offset-mobile-10{margin-right:83.33333%;margin-left:0}}@media (max-width: 32.25rem){.bpk-grid__column--offset-mobile-11{margin-left:91.66667%}html[dir='rtl'] .bpk-grid__column--offset-mobile-11{margin-right:91.66667%;margin-left:0}}@media (max-width: 32.25rem){.bpk-grid__column--offset-mobile-12{margin-left:100%}html[dir='rtl'] .bpk-grid__column--offset-mobile-12{margin-right:100%;margin-left:0}}
|
|
@@ -1,73 +0,0 @@
|
|
|
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.scss';
|
|
20
|
-
|
|
21
|
-
.bpk-grid {
|
|
22
|
-
&__column {
|
|
23
|
-
@include bpk-grid__column;
|
|
24
|
-
|
|
25
|
-
&--padded {
|
|
26
|
-
@include bpk-grid__column--padded;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
&--debug {
|
|
30
|
-
@include bpk-grid__column--debug;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
&-debugger {
|
|
34
|
-
@include bpk-grid__column-debugger;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
@for $i from 0 through $bpk-grid-columns {
|
|
38
|
-
&--#{$i} {
|
|
39
|
-
@include bpk-grid__column--($i);
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
@for $i from 0 through $bpk-grid-columns {
|
|
44
|
-
&--offset-#{$i} {
|
|
45
|
-
@include bpk-grid__column--offset-($i);
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
@for $i from 0 through $bpk-grid-columns {
|
|
50
|
-
&--tablet-#{$i} {
|
|
51
|
-
@include bpk-grid__column--tablet-($i);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
@for $i from 0 through $bpk-grid-columns {
|
|
56
|
-
&--offset-tablet-#{$i} {
|
|
57
|
-
@include bpk-grid__column--offset-tablet-($i);
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
@for $i from 0 through $bpk-grid-columns {
|
|
62
|
-
&--mobile-#{$i} {
|
|
63
|
-
@include bpk-grid__column--mobile-($i);
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
@for $i from 0 through $bpk-grid-columns {
|
|
68
|
-
&--offset-mobile-#{$i} {
|
|
69
|
-
@include bpk-grid__column--offset-mobile-($i);
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
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-grid__container{max-width:71.25rem;margin:0 auto;padding-right:.75rem;padding-left:.75rem}@media (min-width: 50.3125rem){.bpk-grid__container{padding-right:1.5rem;padding-left:1.5rem}}.bpk-grid__container--debug{background-color:#f1f2f8}.bpk-grid__container--full-width{max-width:100%}
|
|
@@ -1,33 +0,0 @@
|
|
|
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.scss';
|
|
20
|
-
|
|
21
|
-
.bpk-grid {
|
|
22
|
-
&__container {
|
|
23
|
-
@include bpk-grid__container;
|
|
24
|
-
|
|
25
|
-
&--debug {
|
|
26
|
-
@include bpk-grid__container--debug;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
&--full-width {
|
|
30
|
-
@include bpk-grid__container--full-width;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
}
|
|
@@ -1,56 +0,0 @@
|
|
|
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 PropTypes from 'prop-types';
|
|
20
|
-
|
|
21
|
-
import { cssModules } from '../../bpk-react-utils';
|
|
22
|
-
|
|
23
|
-
import STYLES from './BpkGridRow.module.scss';
|
|
24
|
-
|
|
25
|
-
const getClassName = cssModules(STYLES);
|
|
26
|
-
|
|
27
|
-
const BpkGridRow = (props) => {
|
|
28
|
-
const classNames = [getClassName('bpk-grid__row')];
|
|
29
|
-
const { children, className, padded, ...rest } = props;
|
|
30
|
-
|
|
31
|
-
if (padded) {
|
|
32
|
-
classNames.push(getClassName('bpk-grid__row--padded'));
|
|
33
|
-
}
|
|
34
|
-
if (className) {
|
|
35
|
-
classNames.push(className);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
return (
|
|
39
|
-
<div className={classNames.join(' ')} {...rest}>
|
|
40
|
-
{children}
|
|
41
|
-
</div>
|
|
42
|
-
);
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
BpkGridRow.propTypes = {
|
|
46
|
-
children: PropTypes.node.isRequired,
|
|
47
|
-
padded: PropTypes.bool,
|
|
48
|
-
className: PropTypes.string,
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
BpkGridRow.defaultProps = {
|
|
52
|
-
padded: true,
|
|
53
|
-
className: null,
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
export default BpkGridRow;
|
|
@@ -1,18 +0,0 @@
|
|
|
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-grid__row{margin-right:-.75rem;margin-left:-.75rem}.bpk-grid__row::before,.bpk-grid__row::after{content:'';display:table}.bpk-grid__row::after{clear:both}@media (min-width: 50.3125rem){.bpk-grid__row--padded:first-child{padding-top:.75rem}.bpk-grid__row--padded:last-child{padding-bottom:.75rem}}
|
|
@@ -1,29 +0,0 @@
|
|
|
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.scss';
|
|
20
|
-
|
|
21
|
-
.bpk-grid {
|
|
22
|
-
&__row {
|
|
23
|
-
@include bpk-grid__row;
|
|
24
|
-
|
|
25
|
-
&--padded {
|
|
26
|
-
@include bpk-grid__row--padded;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
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
|
-
/* @flow strict */
|
|
20
|
-
|
|
21
|
-
// eslint-disable-next-line import/prefer-default-export
|
|
22
|
-
export const widthHeightAspectRatioPropType = (
|
|
23
|
-
props: Object,
|
|
24
|
-
propName: string,
|
|
25
|
-
componentName: string,
|
|
26
|
-
): ?Error => {
|
|
27
|
-
const usingWidthHeight = props.width && props.height;
|
|
28
|
-
const usingAspectRatio = !!props.aspectRatio;
|
|
29
|
-
|
|
30
|
-
if (!usingWidthHeight && !usingAspectRatio) {
|
|
31
|
-
return new Error(
|
|
32
|
-
`Invalid prop \`${propName}\` supplied to \`${componentName}\`. You must either specify "width" and "height" or you must specify "aspectRatio".`,
|
|
33
|
-
);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
return null;
|
|
37
|
-
};
|