@skyscanner/backpack-web 14.0.0 → 15.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 (114) 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 +48 -23
  19. package/bpk-component-chip/index.js +5 -1
  20. package/bpk-component-chip/src/BpkDismissibleChip.js +16 -5
  21. package/bpk-component-chip/src/BpkDropdownChip.js +53 -0
  22. package/bpk-component-chip/src/BpkSelectableChip.js +1 -0
  23. package/bpk-component-chip/src/commonTypes.js +4 -4
  24. package/bpk-component-chip/src/themeAttributes.js +8 -12
  25. package/bpk-component-close-button/README.md +2 -4
  26. package/bpk-component-code/README.md +3 -5
  27. package/bpk-component-content-cards/README.md +1 -3
  28. package/bpk-component-content-container/README.md +2 -4
  29. package/bpk-component-datatable/README.md +3 -5
  30. package/bpk-component-datepicker/README.md +4 -6
  31. package/bpk-component-description-list/README.md +2 -4
  32. package/bpk-component-dialog/README.md +3 -5
  33. package/bpk-component-drawer/README.md +3 -5
  34. package/bpk-component-fieldset/README.md +3 -5
  35. package/bpk-component-fieldset/src/BpkFieldset.module.scss +1 -1
  36. package/bpk-component-flare/README.md +2 -4
  37. package/bpk-component-floating-notification/README.md +2 -4
  38. package/bpk-component-form-validation/README.md +2 -4
  39. package/bpk-component-graphic-promotion/README.md +2 -4
  40. package/bpk-component-grid/README.md +2 -4
  41. package/bpk-component-grid-toggle/README.md +2 -4
  42. package/bpk-component-grid-toggle/src/BpkGridToggle.module.scss +1 -1
  43. package/bpk-component-horizontal-nav/README.md +2 -4
  44. package/bpk-component-icon/README.md +9 -11
  45. package/bpk-component-icon/lg/baggage-cabin-add.js +8 -0
  46. package/bpk-component-icon/lg/baggage-cabin-not-included.js +8 -0
  47. package/bpk-component-icon/lg/baggage-cabin.js +8 -0
  48. package/bpk-component-icon/lg/baggage-checked-add.js +8 -0
  49. package/bpk-component-icon/lg/baggage-checked-not-included.js +8 -0
  50. package/bpk-component-icon/lg/baggage-checked.js +8 -0
  51. package/bpk-component-icon/lg/baggage-generic.js +8 -0
  52. package/bpk-component-icon/sm/baggage-cabin-add.js +8 -0
  53. package/bpk-component-icon/sm/baggage-cabin-not-included.js +8 -0
  54. package/bpk-component-icon/sm/baggage-cabin.js +8 -0
  55. package/bpk-component-icon/sm/baggage-checked-add.js +8 -0
  56. package/bpk-component-icon/sm/baggage-checked-not-included.js +8 -0
  57. package/bpk-component-icon/sm/baggage-checked.js +8 -0
  58. package/bpk-component-icon/sm/baggage-generic.js +8 -0
  59. package/bpk-component-image/README.md +5 -7
  60. package/bpk-component-infinite-scroll/README.md +5 -7
  61. package/bpk-component-input/README.md +4 -6
  62. package/bpk-component-label/README.md +2 -4
  63. package/bpk-component-label/src/BpkLabel.js +9 -14
  64. package/bpk-component-label/src/BpkLabel.module.scss +4 -0
  65. package/bpk-component-link/README.md +2 -4
  66. package/bpk-component-list/README.md +2 -4
  67. package/bpk-component-loading-button/README.md +4 -6
  68. package/bpk-component-map/README.md +7 -9
  69. package/bpk-component-mobile-scroll-container/README.md +3 -5
  70. package/bpk-component-modal/README.md +4 -6
  71. package/bpk-component-navigation-bar/README.md +7 -9
  72. package/bpk-component-nudger/README.md +5 -7
  73. package/bpk-component-nudger/src/BpkNudger.module.scss +2 -1
  74. package/bpk-component-overlay/README.md +3 -5
  75. package/bpk-component-page-indicator/README.md +42 -0
  76. package/bpk-component-page-indicator/index.js +28 -0
  77. package/bpk-component-page-indicator/src/BpkPageIndicator.js +147 -0
  78. package/bpk-component-page-indicator/src/BpkPageIndicator.module.css +18 -0
  79. package/bpk-component-page-indicator/src/BpkPageIndicator.module.scss +91 -0
  80. package/bpk-component-page-indicator/src/NavButton.js +85 -0
  81. package/bpk-component-pagination/README.md +2 -4
  82. package/bpk-component-pagination/src/BpkPaginationNudger.module.scss +1 -22
  83. package/bpk-component-pagination/src/BpkPaginationPage.js +2 -1
  84. package/bpk-component-pagination/src/BpkPaginationPage.module.scss +5 -57
  85. package/bpk-component-panel/README.md +2 -4
  86. package/bpk-component-phone-input/README.md +3 -5
  87. package/bpk-component-popover/README.md +4 -6
  88. package/bpk-component-price/README.md +2 -4
  89. package/bpk-component-progress/README.md +2 -4
  90. package/bpk-component-radio/README.md +2 -4
  91. package/bpk-component-radio/src/BpkRadio.js +9 -10
  92. package/bpk-component-radio/src/BpkRadio.module.scss +4 -0
  93. package/bpk-component-rating/README.md +2 -4
  94. package/bpk-component-rtl-toggle/README.md +2 -4
  95. package/bpk-component-scrollable-calendar/README.md +3 -5
  96. package/bpk-component-section-list/README.md +2 -4
  97. package/bpk-component-select/README.md +2 -4
  98. package/bpk-component-skip-link/README.md +2 -4
  99. package/bpk-component-slider/README.md +2 -4
  100. package/bpk-component-spinner/README.md +2 -4
  101. package/bpk-component-split-input/README.md +2 -4
  102. package/bpk-component-star-rating/README.md +2 -4
  103. package/bpk-component-switch/README.md +2 -4
  104. package/bpk-component-table/README.md +2 -4
  105. package/bpk-component-text/README.md +5 -7
  106. package/bpk-component-textarea/README.md +2 -4
  107. package/bpk-component-theme-toggle/README.md +4 -6
  108. package/bpk-component-theme-toggle/src/theming.js +10 -14
  109. package/bpk-component-ticket/README.md +2 -4
  110. package/bpk-component-tooltip/README.md +3 -5
  111. package/bpk-react-utils/README.md +11 -13
  112. package/bpk-scrim-utils/README.md +2 -4
  113. package/bpk-theming/README.md +3 -5
  114. package/package.json +4 -4
@@ -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
@@ -4,15 +4,13 @@
4
4
 
5
5
  ## Installation
6
6
 
7
- ```sh
8
- npm install bpk-component-theme-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 BpkThemeToggle from 'bpk-component-theme-toggle';
13
+ import BpkThemeToggle from '@skyscanner/backpack-web/bpk-component-theme-toggle';
16
14
 
17
15
  export default () => (
18
16
  <BpkThemeToggle />
@@ -23,8 +21,8 @@ export default () => (
23
21
 
24
22
  ```js
25
23
  import React from 'react';
26
- import { updateOnThemeChange } from 'bpk-component-theme-toggle';
27
- import BpkThemeProvider from 'bpk-theming';
24
+ import { updateOnThemeChange } from '@skyscanner/backpack-web/bpk-component-theme-toggle';
25
+ import BpkThemeProvider from '@skyscanner/backpack-web/bpk-theming';
28
26
 
29
27
  const EnhancedThemeProvider = updateOnThemeChange(BpkThemeProvider);
30
28
  ```
@@ -107,20 +107,16 @@ const generateTheme = ({
107
107
  buttonDestructiveHoverBackgroundColor: colorWhite,
108
108
  buttonDestructiveActiveBackgroundColor: colorWhite,
109
109
 
110
- chipPrimarySelectedBackgroundColor: primaryColor500,
111
- chipPrimarySelectedHoverBackgroundColor: primaryColor600,
112
- chipPrimarySelectedActiveBackgroundColor: primaryColor700,
113
- chipPrimarySelectedTextColor: colorWhite,
114
-
115
- chipSuccessSelectedBackgroundColor: secondaryColor500,
116
- chipSuccessSelectedHoverBackgroundColor: secondaryColor600,
117
- chipSuccessSelectedActiveBackgroundColor: secondaryColor700,
118
- chipSuccessSelectedTextColor: colorWhite,
119
-
120
- chipLightSelectedBackgroundColor: primaryColor500,
121
- chipLightSelectedHoverBackgroundColor: primaryColor600,
122
- chipLightSelectedActiveBackgroundColor: primaryColor700,
123
- chipLightSelectedTextColor: colorWhite,
110
+ chipDefaultSelectedBackgroundColor: primaryColor500,
111
+ chipDefaultSelectedTextColor: colorWhite,
112
+
113
+ chipOnDarkSelectedBackgroundColor: primaryColor500,
114
+ chipOnDarkSelectedTextColor: colorWhite,
115
+
116
+ chipOnImageSelectedBackgroundColor: primaryColor500,
117
+ chipOnImageSelectedHoverBackgroundColor: primaryColor500,
118
+ chipOnImageSelectedActiveBackgroundColor: primaryColor500,
119
+ chipOnImageSelectedTextColor: colorWhite,
124
120
 
125
121
  fieldsetLabelTextColor: secondaryColor500,
126
122
 
@@ -4,15 +4,13 @@
4
4
 
5
5
  ## Installation
6
6
 
7
- ```sh
8
- npm install bpk-component-ticket --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 BpkTicket from 'bpk-component-ticket';
13
+ import BpkTicket from '@skyscanner/backpack-web/bpk-component-ticket';
16
14
 
17
15
  export default () => (
18
16
  <BpkTicket stub="Lorem ipsum dolor sit amet.">
@@ -4,16 +4,14 @@
4
4
 
5
5
  ## Installation
6
6
 
7
- ```sh
8
- npm install bpk-component-tooltip --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 BpkText from 'bpk-component-text';
16
- import BpkTooltip from 'bpk-component-tooltip';
13
+ import BpkText from '@skyscanner/backpack-web/bpk-component-text';
14
+ import BpkTooltip from '@skyscanner/backpack-web/bpk-component-tooltip';
17
15
 
18
16
  const App = () => (
19
17
  const targetRef = useRef(null);
@@ -4,9 +4,7 @@
4
4
 
5
5
  ## Installation
6
6
 
7
- ```sh
8
- npm install bpk-react-utils --save-dev
9
- ```
7
+ Check the main [Readme](https://github.com/skyscanner/backpack#usage) for a complete installation guide.
10
8
 
11
9
  ## Portal.js
12
10
 
@@ -16,9 +14,9 @@ it's necessary in overcoming z-index issues when absolutely positioning elements
16
14
  ### Usage
17
15
 
18
16
  ```js
19
- import { Portal } from 'bpk-react-utils';
20
- import BpkButton from 'bpk-component-button';
21
- import { BpkCode } from 'bpk-component-code';
17
+ import { Portal } from '@skyscanner/backpack-web/bpk-react-utils';
18
+ import BpkButton from '@skyscanner/backpack-web/bpk-component-button';
19
+ import { BpkCode } from '@skyscanner/backpack-web/bpk-component-code';
22
20
  import React, { Component } from 'react';
23
21
 
24
22
  class MyComponent extends Component {
@@ -81,7 +79,7 @@ A helpful utility which permits backwards compatibility with hard coded classes
81
79
 
82
80
  ```js
83
81
  import React from 'react';
84
- import { cssModules } from 'bpk-react-utils';
82
+ import { cssModules } from '@skyscanner/backpack-web/bpk-react-utils';
85
83
 
86
84
  import STYLES from './MyComponent.scss';
87
85
 
@@ -119,7 +117,7 @@ Without CSS modules:
119
117
  The returned function accepts multiple class names and ignores values other than strings. e.g:
120
118
 
121
119
  ```js
122
- import { cssModules } from 'bpk-react-utils';
120
+ import { cssModules } from '@skyscanner/backpack-web/bpk-react-utils';
123
121
 
124
122
  import STYLES from './MyComponent.scss';
125
123
 
@@ -143,7 +141,7 @@ components initial mount. All you need to provide is two class names and a timeo
143
141
 
144
142
  ```js
145
143
  import React from 'react';
146
- import { TransitionInitialMount } from 'bpk-react-utils';
144
+ import { TransitionInitialMount } from '@skyscanner/backpack-web/bpk-react-utils';
147
145
 
148
146
  const MyComponent = (props) => (
149
147
  <TransitionInitialMount
@@ -190,7 +188,7 @@ Returns true if the browser is showing content right-to-left.
190
188
 
191
189
  ```js
192
190
  import React from 'react';
193
- import { isRTL } from 'bpk-react-utils';
191
+ import { isRTL } from '@skyscanner/backpack-web/bpk-react-utils';
194
192
 
195
193
  if (isRTL()) {
196
194
  // do RTL stuff
@@ -207,7 +205,7 @@ Returns true if the device is an iPhone.
207
205
 
208
206
  ```js
209
207
  import React from 'react';
210
- import { isDeviceIphone } from 'bpk-react-utils';
208
+ import { isDeviceIphone } from '@skyscanner/backpack-web/bpk-react-utils';
211
209
 
212
210
  if (isDeviceIphone()) {
213
211
  // do iPhone specific stuff
@@ -224,7 +222,7 @@ Returns true if the device is an iPad.
224
222
 
225
223
  ```js
226
224
  import React from 'react';
227
- import { isDeviceIpad } from 'bpk-react-utils';
225
+ import { isDeviceIpad } from '@skyscanner/backpack-web/bpk-react-utils';
228
226
 
229
227
  if (isDeviceIpad()) {
230
228
  // do iPad specific stuff
@@ -241,7 +239,7 @@ Returns true if the platform is iOS (iPhone/iPad).
241
239
 
242
240
  ```js
243
241
  import React from 'react';
244
- import { isDeviceIos } from 'bpk-react-utils';
242
+ import { isDeviceIos } from '@skyscanner/backpack-web/bpk-react-utils';
245
243
 
246
244
  if (isDeviceIos()) {
247
245
  // do iOS specific stuff
@@ -4,12 +4,10 @@
4
4
 
5
5
  ## Installation
6
6
 
7
- ```sh
8
- npm install bpk-scrim-utils --save-dev
9
- ```
7
+ Check the main [Readme](https://github.com/skyscanner/backpack#usage) for a complete installation guide.
10
8
 
11
9
  ```js
12
- import { withScrim } from 'bpk-scrim-utils';
10
+ import { withScrim } from '@skyscanner/backpack-web/bpk-scrim-utils';
13
11
 
14
12
  const Box = props => (
15
13
  <div ref={props.dialogRef}>
@@ -4,16 +4,14 @@
4
4
 
5
5
  ## Installation
6
6
 
7
- ```sh
8
- npm install bpk-theming --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
- import BpkThemeProvider from 'bpk-theming';
12
+ import BpkThemeProvider from '@skyscanner/backpack-web/bpk-theming';
15
13
 
16
- import BpkLink, { themeAttributes as linkThemeAttributes } from 'bpk-component-link';
14
+ import BpkLink, { themeAttributes as linkThemeAttributes } from '@skyscanner/backpack-web/bpk-component-link';
17
15
 
18
16
  const theme = {
19
17
  linkColor: '#c00',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skyscanner/backpack-web",
3
- "version": "14.0.0",
3
+ "version": "15.0.0",
4
4
  "description": "Backpack Design System web library",
5
5
  "repository": {
6
6
  "type": "git",
@@ -24,11 +24,11 @@
24
24
  "dependencies": {
25
25
  "@popperjs/core": "^2.11.5",
26
26
  "@react-google-maps/api": "^2.12.0",
27
- "@skyscanner/bpk-foundations-web": "^12.0.0",
28
- "@skyscanner/bpk-svgs": "^15.0.2",
27
+ "@skyscanner/bpk-foundations-web": "^12.1.2",
28
+ "@skyscanner/bpk-svgs": "^15.1.6",
29
29
  "a11y-focus-scope": "^1.1.3",
30
30
  "a11y-focus-store": "^1.0.0",
31
- "bpk-mixins": "^34.0.1",
31
+ "bpk-mixins": "^36.0.0",
32
32
  "d3-path": "^2.0.0",
33
33
  "d3-scale": "^4.0.2",
34
34
  "date-fns": "^2.21.1",