@skyscanner/backpack-web 19.0.0 → 20.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/README.md +0 -1
  2. package/bpk-component-banner-alert/src/BpkBannerAlert.module.scss +0 -8
  3. package/bpk-component-banner-alert/src/BpkBannerAlertInner.js +0 -2
  4. package/bpk-component-banner-alert/src/common-types.js +1 -9
  5. package/bpk-component-button/README.md +0 -2
  6. package/bpk-component-button/index.js +0 -2
  7. package/bpk-component-button/src/BpkButton.js +0 -8
  8. package/bpk-component-calendar/README.md +1 -1
  9. package/bpk-component-calendar/src/BpkCalendarContainer.js +3 -18
  10. package/bpk-component-calendar/src/BpkCalendarGrid.js +1 -18
  11. package/bpk-component-calendar/src/BpkCalendarGridHeader.js +1 -6
  12. package/bpk-component-calendar/src/Week.js +1 -20
  13. package/bpk-component-calendar/src/composeCalendar.js +1 -11
  14. package/bpk-component-datepicker/src/BpkDatepicker.js +1 -11
  15. package/bpk-component-flare/src/svgs/pointer.svg +1 -1
  16. package/bpk-component-icon/index.js +0 -4
  17. package/bpk-component-image/src/BpkBackgroundImage.js +2 -19
  18. package/bpk-component-image/src/BpkImage.js +2 -21
  19. package/bpk-component-input/index.js +2 -11
  20. package/bpk-component-link/src/BpkButtonLink.js +2 -7
  21. package/bpk-component-link/src/BpkLink.js +1 -7
  22. package/bpk-component-overlay/README.md +1 -2
  23. package/bpk-component-overlay/index.js +1 -2
  24. package/bpk-component-overlay/src/BpkOverlay.js +1 -14
  25. package/bpk-component-scrollable-calendar/src/BpkScrollableCalendarGridList.js +1 -6
  26. package/bpk-component-switch/index.js +2 -5
  27. package/bpk-component-switch/src/BpkSwitch.js +2 -17
  28. package/bpk-component-switch/src/BpkSwitch.module.scss +6 -13
  29. package/bpk-component-table/README.md +0 -1
  30. package/bpk-component-table/src/BpkTable.js +3 -13
  31. package/bpk-component-table/src/BpkTable.module.scss +0 -8
  32. package/bpk-component-table/src/BpkTableHeadCell.js +4 -9
  33. package/package.json +1 -1
  34. package/bpk-component-button/BpkButtonOutline.js +0 -21
  35. package/bpk-component-button/src/BpkButtonOutline.js +0 -46
  36. package/bpk-component-button/src/BpkButtonOutline.module.css +0 -18
  37. package/bpk-component-button/src/BpkButtonOutline.module.scss +0 -23
  38. package/bpk-component-grid/README.md +0 -89
  39. package/bpk-component-grid/index.js +0 -25
  40. package/bpk-component-grid/src/BpkGridColumn.js +0 -117
  41. package/bpk-component-grid/src/BpkGridColumn.module.css +0 -18
  42. package/bpk-component-grid/src/BpkGridColumn.module.scss +0 -73
  43. package/bpk-component-grid/src/BpkGridContainer.js +0 -61
  44. package/bpk-component-grid/src/BpkGridContainer.module.css +0 -18
  45. package/bpk-component-grid/src/BpkGridContainer.module.scss +0 -33
  46. package/bpk-component-grid/src/BpkGridRow.js +0 -56
  47. package/bpk-component-grid/src/BpkGridRow.module.css +0 -18
  48. package/bpk-component-grid/src/BpkGridRow.module.scss +0 -29
  49. package/bpk-component-image/src/customPropTypes.js +0 -37
@@ -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,61 +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 './BpkGridContainer.module.scss';
24
-
25
- const getClassName = cssModules(STYLES);
26
-
27
- const BpkGridContainer = (props) => {
28
- const { children, className, debug, fullWidth, ...rest } = props;
29
- const classNames = [getClassName('bpk-grid__container')];
30
-
31
- if (debug) {
32
- classNames.push(getClassName('bpk-grid__container--debug'));
33
- }
34
- if (fullWidth) {
35
- classNames.push(getClassName('bpk-grid__container--full-width'));
36
- }
37
- if (className) {
38
- classNames.push(className);
39
- }
40
-
41
- return (
42
- <div className={classNames.join(' ')} {...rest}>
43
- {children}
44
- </div>
45
- );
46
- };
47
-
48
- BpkGridContainer.propTypes = {
49
- children: PropTypes.node.isRequired,
50
- debug: PropTypes.bool,
51
- fullWidth: PropTypes.bool,
52
- className: PropTypes.string,
53
- };
54
-
55
- BpkGridContainer.defaultProps = {
56
- debug: false,
57
- fullWidth: false,
58
- className: null,
59
- };
60
-
61
- export default BpkGridContainer;
@@ -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
- };