@skyscanner/backpack-web 14.0.0 → 14.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.
Files changed (106) hide show
  1. package/README.md +67 -64
  2. package/bpk-animate-height/README.md +2 -4
  3. package/bpk-component-accordion/README.md +6 -8
  4. package/bpk-component-aria-live/README.md +2 -4
  5. package/bpk-component-autosuggest/README.md +5 -7
  6. package/bpk-component-badge/README.md +2 -4
  7. package/bpk-component-banner-alert/README.md +4 -6
  8. package/bpk-component-barchart/README.md +2 -4
  9. package/bpk-component-blockquote/README.md +2 -4
  10. package/bpk-component-breadcrumb/README.md +2 -4
  11. package/bpk-component-breakpoint/README.md +2 -4
  12. package/bpk-component-button/README.md +4 -6
  13. package/bpk-component-calendar/README.md +3 -5
  14. package/bpk-component-card/README.md +2 -4
  15. package/bpk-component-checkbox/README.md +2 -4
  16. package/bpk-component-checkbox/src/BpkCheckbox.js +1 -0
  17. package/bpk-component-checkbox/src/BpkCheckbox.module.scss +4 -0
  18. package/bpk-component-chip/README.md +3 -5
  19. package/bpk-component-close-button/README.md +2 -4
  20. package/bpk-component-code/README.md +3 -5
  21. package/bpk-component-content-cards/README.md +1 -3
  22. package/bpk-component-content-container/README.md +2 -4
  23. package/bpk-component-datatable/README.md +3 -5
  24. package/bpk-component-datepicker/README.md +4 -6
  25. package/bpk-component-description-list/README.md +2 -4
  26. package/bpk-component-dialog/README.md +3 -5
  27. package/bpk-component-drawer/README.md +3 -5
  28. package/bpk-component-fieldset/README.md +3 -5
  29. package/bpk-component-flare/README.md +2 -4
  30. package/bpk-component-floating-notification/README.md +2 -4
  31. package/bpk-component-form-validation/README.md +2 -4
  32. package/bpk-component-graphic-promotion/README.md +2 -4
  33. package/bpk-component-grid/README.md +2 -4
  34. package/bpk-component-grid-toggle/README.md +2 -4
  35. package/bpk-component-grid-toggle/src/BpkGridToggle.module.scss +1 -1
  36. package/bpk-component-horizontal-nav/README.md +2 -4
  37. package/bpk-component-icon/README.md +9 -11
  38. package/bpk-component-icon/lg/baggage-cabin-add.js +8 -0
  39. package/bpk-component-icon/lg/baggage-cabin-not-included.js +8 -0
  40. package/bpk-component-icon/lg/baggage-cabin.js +8 -0
  41. package/bpk-component-icon/lg/baggage-checked-add.js +8 -0
  42. package/bpk-component-icon/lg/baggage-checked-not-included.js +8 -0
  43. package/bpk-component-icon/lg/baggage-checked.js +8 -0
  44. package/bpk-component-icon/lg/baggage-generic.js +8 -0
  45. package/bpk-component-icon/sm/baggage-cabin-add.js +8 -0
  46. package/bpk-component-icon/sm/baggage-cabin-not-included.js +8 -0
  47. package/bpk-component-icon/sm/baggage-cabin.js +8 -0
  48. package/bpk-component-icon/sm/baggage-checked-add.js +8 -0
  49. package/bpk-component-icon/sm/baggage-checked-not-included.js +8 -0
  50. package/bpk-component-icon/sm/baggage-checked.js +8 -0
  51. package/bpk-component-icon/sm/baggage-generic.js +8 -0
  52. package/bpk-component-image/README.md +5 -7
  53. package/bpk-component-infinite-scroll/README.md +5 -7
  54. package/bpk-component-input/README.md +4 -6
  55. package/bpk-component-label/README.md +2 -4
  56. package/bpk-component-label/src/BpkLabel.js +9 -14
  57. package/bpk-component-label/src/BpkLabel.module.scss +4 -0
  58. package/bpk-component-link/README.md +2 -4
  59. package/bpk-component-list/README.md +2 -4
  60. package/bpk-component-loading-button/README.md +4 -6
  61. package/bpk-component-map/README.md +7 -9
  62. package/bpk-component-mobile-scroll-container/README.md +3 -5
  63. package/bpk-component-modal/README.md +4 -6
  64. package/bpk-component-navigation-bar/README.md +7 -9
  65. package/bpk-component-nudger/README.md +5 -7
  66. package/bpk-component-nudger/src/BpkNudger.module.scss +2 -1
  67. package/bpk-component-overlay/README.md +3 -5
  68. package/bpk-component-page-indicator/README.md +42 -0
  69. package/bpk-component-page-indicator/index.js +28 -0
  70. package/bpk-component-page-indicator/src/BpkPageIndicator.js +147 -0
  71. package/bpk-component-page-indicator/src/BpkPageIndicator.module.css +18 -0
  72. package/bpk-component-page-indicator/src/BpkPageIndicator.module.scss +91 -0
  73. package/bpk-component-page-indicator/src/NavButton.js +85 -0
  74. package/bpk-component-pagination/README.md +2 -4
  75. package/bpk-component-pagination/src/BpkPaginationNudger.module.scss +1 -22
  76. package/bpk-component-pagination/src/BpkPaginationPage.js +2 -1
  77. package/bpk-component-pagination/src/BpkPaginationPage.module.scss +5 -57
  78. package/bpk-component-panel/README.md +2 -4
  79. package/bpk-component-phone-input/README.md +3 -5
  80. package/bpk-component-popover/README.md +4 -6
  81. package/bpk-component-price/README.md +2 -4
  82. package/bpk-component-progress/README.md +2 -4
  83. package/bpk-component-radio/README.md +2 -4
  84. package/bpk-component-radio/src/BpkRadio.js +9 -10
  85. package/bpk-component-radio/src/BpkRadio.module.scss +4 -0
  86. package/bpk-component-rating/README.md +2 -4
  87. package/bpk-component-rtl-toggle/README.md +2 -4
  88. package/bpk-component-scrollable-calendar/README.md +3 -5
  89. package/bpk-component-section-list/README.md +2 -4
  90. package/bpk-component-select/README.md +2 -4
  91. package/bpk-component-skip-link/README.md +2 -4
  92. package/bpk-component-slider/README.md +2 -4
  93. package/bpk-component-spinner/README.md +2 -4
  94. package/bpk-component-split-input/README.md +2 -4
  95. package/bpk-component-star-rating/README.md +2 -4
  96. package/bpk-component-switch/README.md +2 -4
  97. package/bpk-component-table/README.md +2 -4
  98. package/bpk-component-text/README.md +5 -7
  99. package/bpk-component-textarea/README.md +2 -4
  100. package/bpk-component-theme-toggle/README.md +4 -6
  101. package/bpk-component-ticket/README.md +2 -4
  102. package/bpk-component-tooltip/README.md +3 -5
  103. package/bpk-react-utils/README.md +11 -13
  104. package/bpk-scrim-utils/README.md +2 -4
  105. package/bpk-theming/README.md +3 -5
  106. package/package.json +4 -4
@@ -0,0 +1,85 @@
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 React from 'react';
21
+ import PropTypes from 'prop-types';
22
+
23
+ import { withButtonAlignment, withRtlSupport } from '../../bpk-component-icon';
24
+ import BpkButton from '../../bpk-component-button';
25
+ import LeftArrowIcon from '../../bpk-component-icon/lg/chevron-left';
26
+ import RightArrowIcon from '../../bpk-component-icon/lg/chevron-right';
27
+
28
+ export const DIRECTIONS = {
29
+ PREV: 'PREV',
30
+ INDICATORS: 'INDICATORS',
31
+ NEXT: 'NEXT',
32
+ };
33
+
34
+ type Props = {
35
+ direction: $Keys<typeof DIRECTIONS>,
36
+ disabled?: boolean,
37
+ currentIndex: number,
38
+ onClick: ?() => void,
39
+ ariaLabel: string,
40
+ };
41
+
42
+ const AlignedLeftArrowIcon = withButtonAlignment(withRtlSupport(LeftArrowIcon));
43
+ const AlignedRightArrowIcon = withButtonAlignment(
44
+ withRtlSupport(RightArrowIcon),
45
+ );
46
+
47
+ const NavButton = (props: Props) => {
48
+ const { ariaLabel, currentIndex, direction, disabled, onClick } = props;
49
+ return (
50
+ <BpkButton
51
+ iconOnly
52
+ link
53
+ onClick={(e) => {
54
+ if (direction === DIRECTIONS.PREV) {
55
+ onClick(e, currentIndex - 1, direction);
56
+ } else {
57
+ onClick(e, currentIndex + 1, direction);
58
+ }
59
+ }}
60
+ aria-label={ariaLabel}
61
+ disabled={disabled}
62
+ >
63
+ {direction === DIRECTIONS.PREV ? (
64
+ <AlignedLeftArrowIcon />
65
+ ) : (
66
+ <AlignedRightArrowIcon />
67
+ )}
68
+ </BpkButton>
69
+ );
70
+ };
71
+
72
+ NavButton.propTypes = {
73
+ direction: PropTypes.oneOf(Object.keys(DIRECTIONS)).isRequired,
74
+ disabled: PropTypes.bool,
75
+ ariaLabel: PropTypes.string.isRequired,
76
+ currentIndex: PropTypes.number.isRequired,
77
+ onClick: PropTypes.func,
78
+ };
79
+
80
+ NavButton.defaultProps = {
81
+ disabled: false,
82
+ onClick: null,
83
+ };
84
+
85
+ export default NavButton;
@@ -4,15 +4,13 @@
4
4
 
5
5
  ## Installation
6
6
 
7
- ```sh
8
- npm install bpk-component-pagination --save-dev
9
- ```
7
+ Check the main [Readme](https://github.com/skyscanner/backpack#usage) for a complete installation guide.
10
8
 
11
9
  ## Usage
12
10
 
13
11
  ```js
14
12
  import React from 'react';
15
- import BpkPagination from 'bpk-component-pagination';
13
+ import BpkPagination from '@skyscanner/backpack-web/bpk-component-pagination';
16
14
 
17
15
  const Pagination = () => (
18
16
  <BpkPagination
@@ -32,30 +32,9 @@ $bpk-spacing-v2: true;
32
32
  cursor: pointer;
33
33
  appearance: none;
34
34
 
35
- @include bpk-themeable-property(
36
- color,
37
- --bpk-pagination-nudger-color,
38
- $bpk-color-sky-blue
39
- );
40
-
41
- @include bpk-hover {
42
- @include bpk-themeable-property(
43
- color,
44
- --bpk-pagination-nudger-hover-color,
45
- $bpk-color-sky-blue-shade-02
46
- );
47
- }
48
-
49
- &:active {
50
- @include bpk-themeable-property(
51
- color,
52
- --bpk-pagination-nudger-active-color,
53
- $bpk-color-sky-blue
54
- );
55
- }
35
+ @include bpk-button--link;
56
36
 
57
37
  &:disabled {
58
- color: $bpk-color-sky-gray-tint-06;
59
38
  cursor: not-allowed;
60
39
  }
61
40
 
@@ -36,7 +36,8 @@ const BpkPaginationPage = (props) => {
36
36
 
37
37
  return (
38
38
  <BpkButton
39
- secondary
39
+ primaryOnDark={!isSelected}
40
+ primary={isSelected}
40
41
  onClick={onSelect}
41
42
  className={classNames.join(' ')}
42
43
  aria-label={pageLabel(page, isSelected)}
@@ -25,68 +25,16 @@ $bpk-spacing-v2: true;
25
25
  height: $bpk-button-height;
26
26
  padding: 0;
27
27
  border-radius: 50%;
28
+ color: $bpk-text-link-day;
28
29
 
30
+ @include bpk-border-lg(
31
+ var(--bpk-pagination-selected-background-color, $bpk-line-day)
32
+ );
29
33
  @include bpk-label-1;
30
34
  }
31
35
 
32
36
  .bpk-pagination-page--selected {
33
- background-image: $bpk-button-secondary-background-image;
34
- color: $bpk-button-selected-color;
37
+ color: $bpk-text-primary-inverse-day;
35
38
  box-shadow: $bpk-button-selected-box-shadow;
36
39
  cursor: auto;
37
-
38
- @include bpk-themeable-property(
39
- background-color,
40
- --bpk-pagination-selected-background-color,
41
- $bpk-color-sky-blue-shade-02
42
- );
43
- @include bpk-border-lg($bpk-color-sky-blue-shade-02);
44
- @include bpk-border-lg(
45
- var(
46
- --bpk-pagination-selected-background-color,
47
- $bpk-color-sky-blue-shade-02
48
- )
49
- );
50
-
51
- @include bpk-hover {
52
- background-image: $bpk-button-selected-hover-background-image;
53
- color: $bpk-button-selected-hover-color;
54
- box-shadow: $bpk-button-selected-hover-box-shadow;
55
-
56
- @include bpk-themeable-property(
57
- background-color,
58
- --bpk-pagination-selected-background-color,
59
- $bpk-color-sky-blue-shade-02
60
- );
61
- @include bpk-border-lg($bpk-color-sky-blue-shade-02);
62
- @include bpk-border-lg(
63
- var(
64
- --bpk-pagination-selected-background-color,
65
- $bpk-color-sky-blue-shade-02
66
- )
67
- );
68
- }
69
-
70
- &:active {
71
- background-image: $bpk-button-selected-active-background-image;
72
- color: $bpk-button-selected-active-color;
73
- box-shadow: $bpk-button-selected-active-box-shadow;
74
-
75
- @include bpk-themeable-property(
76
- background-color,
77
- --bpk-pagination-selected-background-color,
78
- $bpk-color-sky-blue-shade-02
79
- );
80
- @include bpk-border-lg($bpk-color-sky-blue-shade-02);
81
- @include bpk-border-lg(
82
- var(
83
- --bpk-pagination-selected-background-color,
84
- $bpk-color-sky-blue-shade-02
85
- )
86
- );
87
- }
88
-
89
- &:disabled {
90
- box-shadow: $bpk-button-selected-disabled-box-shadow;
91
- }
92
40
  }
@@ -4,15 +4,13 @@
4
4
 
5
5
  ## Installation
6
6
 
7
- ```sh
8
- npm install bpk-component-panel --save-dev
9
- ```
7
+ Check the main [Readme](https://github.com/skyscanner/backpack#usage) for a complete installation guide.
10
8
 
11
9
  ## Usage
12
10
 
13
11
  ```js
14
12
  import React from 'react';
15
- import BpkPanel from 'bpk-component-panel';
13
+ import BpkPanel from '@skyscanner/backpack-web/bpk-component-panel';
16
14
 
17
15
  export default () => (
18
16
  <BpkPanel>
@@ -4,16 +4,14 @@
4
4
 
5
5
  ## Installation
6
6
 
7
- ```sh
8
- npm install bpk-component-phone-input --save-dev
9
- ```
7
+ Check the main [Readme](https://github.com/skyscanner/backpack#usage) for a complete installation guide.
10
8
 
11
9
  ## Usage
12
10
 
13
11
  ```js
14
12
  import React, { Component } from 'react';
15
- import BpkPhoneInput from 'bpk-component-phone-input';
16
- import BpkImage from 'bpk-component-image';
13
+ import BpkPhoneInput from '@skyscanner/backpack-web/bpk-component-phone-input';
14
+ import BpkImage from '@skyscanner/backpack-web/bpk-component-image';
17
15
 
18
16
  const DIALING_CODE_TO_ID_MAP = {
19
17
  '44': 'uk',
@@ -4,17 +4,15 @@
4
4
 
5
5
  ## Installation
6
6
 
7
- ```sh
8
- npm install bpk-component-popover --save-dev
9
- ```
7
+ Check the main [Readme](https://github.com/skyscanner/backpack#usage) for a complete installation guide.
10
8
 
11
9
  ## Usage
12
10
 
13
11
  ```js
14
12
  import React, { Component } from 'react';
15
- import BpkButton from 'bpk-component-button';
16
- import BpkPopover from 'bpk-component-popover';
17
- import BpkText from 'bpk-component-text';
13
+ import BpkButton from '@skyscanner/backpack-web/bpk-component-button';
14
+ import BpkPopover from '@skyscanner/backpack-web/bpk-component-popover';
15
+ import BpkText from '@skyscanner/backpack-web/bpk-component-text';
18
16
 
19
17
  class App extends Component {
20
18
  constructor() {
@@ -4,15 +4,13 @@
4
4
 
5
5
  ## Installation
6
6
 
7
- ```sh
8
- npm install bpk-component-price --save-dev
9
- ```
7
+ Check the main [Readme](https://github.com/skyscanner/backpack#usage) for a complete installation guide.
10
8
 
11
9
  ## Usage
12
10
 
13
11
  ```js
14
12
  import React from 'react';
15
- import BpkPrice, { SIZES, ALIGNS } from 'bpk-component-price';
13
+ import BpkPrice, { SIZES, ALIGNS } from '@skyscanner/backpack-web/bpk-component-price';
16
14
 
17
15
  export default () => (
18
16
  <BpkPrice
@@ -4,15 +4,13 @@
4
4
 
5
5
  ## Installation
6
6
 
7
- ```sh
8
- npm install bpk-component-progress --save-dev
9
- ```
7
+ Check the main [Readme](https://github.com/skyscanner/backpack#usage) for a complete installation guide.
10
8
 
11
9
  ## Usage
12
10
 
13
11
  ```js
14
12
  import React, { Component } from 'react';
15
- import BpkProgress from 'bpk-component-progress';
13
+ import BpkProgress from '@skyscanner/backpack-web/bpk-component-progress';
16
14
 
17
15
  const Progress = () => (
18
16
  <BpkProgress
@@ -4,15 +4,13 @@
4
4
 
5
5
  ## Installation
6
6
 
7
- ```sh
8
- npm install bpk-component-radio --save-dev
9
- ```
7
+ Check the main [Readme](https://github.com/skyscanner/backpack#usage) for a complete installation guide.
10
8
 
11
9
  ## Usage
12
10
 
13
11
  ```js
14
12
  import React from 'react';
15
- import BpkRadio from 'bpk-component-radio';
13
+ import BpkRadio from '@skyscanner/backpack-web/bpk-component-radio';
16
14
 
17
15
  export default () => (
18
16
  <BpkRadio
@@ -45,18 +45,17 @@ const BpkRadio = (props: Props) => {
45
45
  // treated as neither valid nor invalid
46
46
  const isInvalid = valid === false;
47
47
 
48
- const classNames = [
49
- getClassName(
50
- 'bpk-radio',
51
- white && 'bpk-radio--white',
52
- disabled && 'bpk-radio--disabled',
53
- isInvalid && 'bpk-radio--invalid',
54
- className,
55
- ),
56
- ];
48
+ const classNames = getClassName(
49
+ 'bpk-radio',
50
+ white && 'bpk-radio--white',
51
+ disabled && 'bpk-radio--disabled',
52
+ white && disabled && 'bpk-radio--disabled--white',
53
+ isInvalid && 'bpk-radio--invalid',
54
+ className,
55
+ );
57
56
 
58
57
  return (
59
- <label className={classNames.join(' ')}>
58
+ <label className={classNames}>
60
59
  {/* Deciding to support this because `aria-invalid` does often work with voiceover
61
60
  despite not being in the spec. */}
62
61
  {/* eslint-disable jsx-a11y/role-supports-aria-props */}
@@ -31,6 +31,10 @@ $bpk-radio-size: bpk-spacing-lg() - ($bpk-one-pixel-rem * 4);
31
31
 
32
32
  &--disabled {
33
33
  @include bpk-radio--disabled;
34
+
35
+ &--white {
36
+ color: $bpk-text-disabled-on-dark-day;
37
+ }
34
38
  }
35
39
 
36
40
  &--invalid {
@@ -4,15 +4,13 @@
4
4
 
5
5
  ## Installation
6
6
 
7
- ```sh
8
- npm install bpk-component-rating --save-dev
9
- ```
7
+ Check the main [Readme](https://github.com/skyscanner/backpack#usage) for a complete installation guide.
10
8
 
11
9
  ## Usage
12
10
 
13
11
  ```js
14
12
  import React from 'react';
15
- import BpkRating, { RATING_SIZES, RATING_SCALES } from 'bpk-component-rating';
13
+ import BpkRating, { RATING_SIZES, RATING_SCALES } from '@skyscanner/backpack-web/bpk-component-rating';
16
14
 
17
15
  export default () => (
18
16
  <BpkRating
@@ -4,15 +4,13 @@
4
4
 
5
5
  ## Installation
6
6
 
7
- ```sh
8
- npm install bpk-component-rtl-toggle --save-dev
9
- ```
7
+ Check the main [Readme](https://github.com/skyscanner/backpack#usage) for a complete installation guide.
10
8
 
11
9
  ## Usage
12
10
 
13
11
  ```js
14
12
  import React from 'react';
15
- import BpkRtlToggle from 'bpk-component-rtl-toggle';
13
+ import BpkRtlToggle from '@skyscanner/backpack-web/bpk-component-rtl-toggle';
16
14
 
17
15
  export default () => (
18
16
  <BpkRtlToggle />
@@ -4,16 +4,14 @@
4
4
 
5
5
  ## Installation
6
6
 
7
- ```sh
8
- npm install bpk-component-scrollable-calendar --save-dev
9
- ```
7
+ Check the main [Readme](https://github.com/skyscanner/backpack#usage) for a complete installation guide.
10
8
 
11
9
  ## Usage
12
10
 
13
11
  ```js
14
12
  import React, { Component } from 'react';
15
- import { DateUtils } from 'bpk-component-calendar';
16
- import BpkScrollableCalendar, { CALENDAR_SELECTION_TYPE } from 'bpk-component-scrollable-calendar';
13
+ import { DateUtils } from '@skyscanner/backpack-web/bpk-component-calendar';
14
+ import BpkScrollableCalendar, { CALENDAR_SELECTION_TYPE } from '@skyscanner/backpack-web/bpk-component-scrollable-calendar';
17
15
  import format from 'date-fns/format';
18
16
 
19
17
  const formatDateFull = date => format(date, 'EEEE, do MMMM yyyy');
@@ -4,15 +4,13 @@
4
4
 
5
5
  ## Installation
6
6
 
7
- ```sh
8
- npm install bpk-component-section-list --save-dev
9
- ```
7
+ Check the main [Readme](https://github.com/skyscanner/backpack#usage) for a complete installation guide.
10
8
 
11
9
  ## Usage
12
10
 
13
11
  ```js
14
12
  import React from 'react';
15
- import BpkSectionList, { BpkSectionListSection, BpkSectionListItem } from 'bpk-component-section-list';
13
+ import BpkSectionList, { BpkSectionListSection, BpkSectionListItem } from '@skyscanner/backpack-web/bpk-component-section-list';
16
14
 
17
15
  export default () => (
18
16
  <BpkSectionList>
@@ -4,15 +4,13 @@
4
4
 
5
5
  ## Installation
6
6
 
7
- ```sh
8
- npm install bpk-component-select --save-dev
9
- ```
7
+ Check the main [Readme](https://github.com/skyscanner/backpack#usage) for a complete installation guide.
10
8
 
11
9
  ## Usage
12
10
 
13
11
  ```js
14
12
  import React from 'react';
15
- import BpkSelect from 'bpk-component-select';
13
+ import BpkSelect from '@skyscanner/backpack-web/bpk-component-select';
16
14
 
17
15
  export default () => (
18
16
  <BpkSelect
@@ -4,15 +4,13 @@
4
4
 
5
5
  ## Installation
6
6
 
7
- ```sh
8
- npm install bpk-component-skip-link --save-dev
9
- ```
7
+ Check the main [Readme](https://github.com/skyscanner/backpack#usage) for a complete installation guide.
10
8
 
11
9
  ## Usage
12
10
 
13
11
  ```js
14
12
  import React from 'react';
15
- import BpkSkipLink from 'bpk-component-skip-link';
13
+ import BpkSkipLink from '@skyscanner/backpack-web/bpk-component-skip-link';
16
14
 
17
15
  export default () => <BpkSkipLink href="#main" label="Skip to main content" />;
18
16
  ```
@@ -4,15 +4,13 @@
4
4
 
5
5
  ## Installation
6
6
 
7
- ```sh
8
- npm install bpk-component-slider --save-dev
9
- ```
7
+ Check the main [Readme](https://github.com/skyscanner/backpack#usage) for a complete installation guide.
10
8
 
11
9
  ## Usage
12
10
 
13
11
  ```js
14
12
  import React, { Component } from 'react';
15
- import BpkSlider from 'bpk-component-slider';
13
+ import BpkSlider from '@skyscanner/backpack-web/bpk-component-slider';
16
14
 
17
15
  const Slider = () => (
18
16
  <BpkSlider
@@ -4,15 +4,13 @@
4
4
 
5
5
  ## Installation
6
6
 
7
- ```sh
8
- npm install bpk-component-spinner --save-dev
9
- ```
7
+ Check the main [Readme](https://github.com/skyscanner/backpack#usage) for a complete installation guide.
10
8
 
11
9
  ## Usage
12
10
 
13
11
  ```js
14
12
  import React from 'react';
15
- import { BpkSpinner, BpkLargeSpinner, BpkExtraLargeSpinner, SPINNER_TYPES } from 'bpk-component-spinner';
13
+ import { BpkSpinner, BpkLargeSpinner, BpkExtraLargeSpinner, SPINNER_TYPES } from '@skyscanner/backpack-web/bpk-component-spinner';
16
14
 
17
15
  export default () => (
18
16
  <div>
@@ -4,15 +4,13 @@
4
4
 
5
5
  ## Installation
6
6
 
7
- ```sh
8
- npm install bpk-component-split-input --save-dev
9
- ```
7
+ Check the main [Readme](https://github.com/skyscanner/backpack#usage) for a complete installation guide.
10
8
 
11
9
  ## Usage
12
10
 
13
11
  ```js
14
12
  import React from 'react';
15
- import BpkSplitInput, { INPUT_TYPES } from 'bpk-component-split-input';
13
+ import BpkSplitInput, { INPUT_TYPES } from '@skyscanner/backpack-web/bpk-component-split-input';
16
14
 
17
15
  export default () => (
18
16
  <BpkSplitInput
@@ -4,9 +4,7 @@
4
4
 
5
5
  ## Installation
6
6
 
7
- ```sh
8
- npm install bpk-component-star-rating --save-dev
9
- ```
7
+ Check the main [Readme](https://github.com/skyscanner/backpack#usage) for a complete installation guide.
10
8
 
11
9
  ## Usage
12
10
 
@@ -17,7 +15,7 @@ import BpkStarRating, {
17
15
  STAR_TYPES,
18
16
  BpkInteractiveStarRating,
19
17
  withInteractiveStarRatingState
20
- } from 'bpk-component-star-rating';
18
+ } from '@skyscanner/backpack-web/bpk-component-star-rating';
21
19
 
22
20
  const InteractiveStarRating = withInteractiveStarRatingState(BpkInteractiveStarRating);
23
21
 
@@ -4,15 +4,13 @@
4
4
 
5
5
  ## Installation
6
6
 
7
- ```sh
8
- npm install bpk-component-switch --save-dev
9
- ```
7
+ Check the main [Readme](https://github.com/skyscanner/backpack#usage) for a complete installation guide.
10
8
 
11
9
  ## Usage
12
10
 
13
11
  ```js
14
12
  import React from 'react';
15
- import BpkSwitch from 'bpk-component-switch';
13
+ import BpkSwitch from '@skyscanner/backpack-web/bpk-component-switch';
16
14
 
17
15
  export default () => (
18
16
  <div>
@@ -4,9 +4,7 @@
4
4
 
5
5
  ## Installation
6
6
 
7
- ```sh
8
- npm install bpk-component-table --save-dev
9
- ```
7
+ Check the main [Readme](https://github.com/skyscanner/backpack#usage) for a complete installation guide.
10
8
 
11
9
  ## Usage
12
10
 
@@ -19,7 +17,7 @@ import {
19
17
  BpkTableRow,
20
18
  BpkTableCell,
21
19
  BpkTableHeadCell,
22
- } from 'bpk-component-table';
20
+ } from '@skyscanner/backpack-web/bpk-component-table';
23
21
 
24
22
  export default () => (
25
23
  <BpkTable>
@@ -4,15 +4,13 @@
4
4
 
5
5
  ## Installation
6
6
 
7
- ```sh
8
- npm install bpk-component-text --save-dev
9
- ```
7
+ Check the main [Readme](https://github.com/skyscanner/backpack#usage) for a complete installation guide.
10
8
 
11
9
  ## Usage
12
10
 
13
11
  ```javascript
14
12
  import React from 'react';
15
- import BpkText, { TEXT_STYLES } from 'bpk-component-text';
13
+ import BpkText, { TEXT_STYLES } from '@skyscanner/backpack-web/bpk-component-text';
16
14
 
17
15
  export default () => (
18
16
  <BpkText tagName="h1" textStyle={TEXT_STYLES.subheading}>My heading</BpkText>
@@ -25,8 +23,8 @@ When using the same style in many places repeating the `textStyle` and `tagName`
25
23
 
26
24
  ```javascript
27
25
  import React from 'react';
28
- import BpkText from 'bpk-component-text';
29
- import { withDefaultProps } from 'bpk-react-utils';
26
+ import BpkText from '@skyscanner/backpack-web/bpk-component-text';
27
+ import { withDefaultProps } from '@skyscanner/backpack-web/bpk-react-utils';
30
28
 
31
29
  const LargeParagraph = withDefaultProps(BpkText, { textStyle: 'bodyLongform', tagName: 'p' });
32
30
  const TinySpan = withDefaultProps(BpkText, { textStyle: 'caption', tagName: 'span' });
@@ -56,7 +54,7 @@ Heading `textStyle` should not be confused with heading `tagName` that provide s
56
54
 
57
55
  ```javascript
58
56
  import React from 'react';
59
- import BpkText, { TEXT_STYLES } from 'bpk-component-text';
57
+ import BpkText, { TEXT_STYLES } from '@skyscanner/backpack-web/bpk-component-text';
60
58
 
61
59
  export default () => (
62
60
  <BpkText tagName="h1" textStyle={TEXT_STYLES.heading1}>My heading</BpkText>
@@ -4,15 +4,13 @@
4
4
 
5
5
  ## Installation
6
6
 
7
- ```sh
8
- npm install bpk-component-textarea --save-dev
9
- ```
7
+ Check the main [Readme](https://github.com/skyscanner/backpack#usage) for a complete installation guide.
10
8
 
11
9
  ## Usage
12
10
 
13
11
  ```js
14
12
  import React from 'react';
15
- import BpkTextarea from 'bpk-component-textarea';
13
+ import BpkTextarea from '@skyscanner/backpack-web/bpk-component-textarea';
16
14
 
17
15
  export default () => (
18
16
  <BpkTextarea