@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
@@ -4,16 +4,14 @@
4
4
 
5
5
  ## Installation
6
6
 
7
- ```sh
8
- npm install bpk-component-icon --save-dev
9
- ```
7
+ Check the main [Readme](https://github.com/skyscanner/backpack#usage) for a complete installation guide.
10
8
 
11
9
  ## Basic usage
12
10
 
13
11
  ```js
14
12
  import React from 'react';
15
- import BpkSmallFlightIcon from 'bpk-component-icon/sm/flight';
16
- import BpkLargeAccessibilityIcon from 'bpk-component-icon/lg/accessibility';
13
+ import BpkSmallFlightIcon from '@skyscanner/backpack-web/bpk-component-icon/sm/flight';
14
+ import BpkLargeAccessibilityIcon from '@skyscanner/backpack-web/bpk-component-icon/lg/accessibility';
17
15
 
18
16
  import './icons.scss';
19
17
 
@@ -42,10 +40,10 @@ export default () => (
42
40
 
43
41
  ```js
44
42
  import React from 'react';
45
- import BpkButton from 'bpk-component-button';
46
- import BpkSmallFlightIcon from 'bpk-component-icon/sm/flight';
47
- import BpkLargeAccessibilityIcon from 'bpk-component-icon/lg/accessibility';
48
- import { withButtonAlignment, withLargeButtonAlignment } from 'bpk-component-icon';
43
+ import BpkButton from '@skyscanner/backpack-web/bpk-component-button';
44
+ import BpkSmallFlightIcon from '@skyscanner/backpack-web/bpk-component-icon/sm/flight';
45
+ import BpkLargeAccessibilityIcon from '@skyscanner/backpack-web/bpk-component-icon/lg/accessibility';
46
+ import { withButtonAlignment, withLargeButtonAlignment } from '@skyscanner/backpack-web/bpk-component-icon';
49
47
 
50
48
  const AlignedBpkSmallFlightIcon = withButtonAlignment(BpkSmallFlightIcon);
51
49
  const AlignedBpkLargeAccessibilityIcon = withLargeButtonAlignment(BpkLargeAccessibilityIcon);
@@ -66,8 +64,8 @@ export default () => (
66
64
 
67
65
  ```js
68
66
  import React from 'react';
69
- import BpkSmallFlightIcon from 'bpk-component-icon/sm/flight';
70
- import { withRtlSupport } from 'bpk-component-icon';
67
+ import BpkSmallFlightIcon from '@skyscanner/backpack-web/bpk-component-icon/sm/flight';
68
+ import { withRtlSupport } from '@skyscanner/backpack-web/bpk-component-icon';
71
69
 
72
70
  import './icons.scss';
73
71
 
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ export default (({
3
+ styles = {},
4
+ ...props
5
+ }) => <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" style={{
6
+ width: "1.5rem",
7
+ height: "1.5rem"
8
+ }} {...props}><path d="M6 2.333C6 1.597 6.597 1 7.333 1h3.334C11.403 1 12 1.597 12 2.333V10.5a.5.5 0 0 1-1 0V3H7v7.5a.5.5 0 0 1-1 0V2.333zM5 12h5.594c.506 0 .747.752.393 1.114A6.977 6.977 0 0 0 9 18c0 .794.132 1.556.375 2.268.12.347-.125.732-.492.732H7v1a1 1 0 1 1-2 0v-1a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2zm16.001 6.001A5 5 0 1 1 11 18a5 5 0 0 1 10.001.001zm-2 0a1 1 0 0 0-1-1h-1v-1a1 1 0 1 0-2 0v1h-1A1 1 0 0 0 14 19h1v1a1 1 0 1 0 2 0v-1h1a1 1 0 0 0 1-1z" /></svg>);
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ export default (({
3
+ styles = {},
4
+ ...props
5
+ }) => <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" style={{
6
+ width: "1.5rem",
7
+ height: "1.5rem"
8
+ }} {...props}><path d="M9 2.333C9 1.597 9.597 1 10.333 1h3.334C14.403 1 15 1.597 15 2.333V7.55l6.254-6.254a1 1 0 0 1 1.414 0l.036.035a1 1 0 0 1 0 1.414L15 10.45l-.548.549L13.449 12l-7.407 7.408L2.748 22.7a1 1 0 0 1-1.414 0l-.036-.035a1 1 0 0 1 0-1.415L6 16.55V14a2 2 0 0 1 2-2h2.55L14 8.55V3h-4v7.5a.5.5 0 0 1-1 0V2.333zm7.503 9.73A2 2 0 0 1 18 14v5a2 2 0 0 1-2 2v1a1 1 0 1 1-2 0v-1h-4v1a1 1 0 1 1-2 0v-1.515a.5.5 0 0 1 .146-.354l7.94-7.94a.438.438 0 0 1 .417-.127z" /></svg>);
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ export default (({
3
+ styles = {},
4
+ ...props
5
+ }) => <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" style={{
6
+ width: "1.5rem",
7
+ height: "1.5rem"
8
+ }} {...props}><path d="M9 2.333C9 1.597 9.597 1 10.333 1h3.334C14.403 1 15 1.597 15 2.333V10.5a.5.5 0 0 1-1 0V3h-4v7.5a.5.5 0 0 1-1 0V2.333zM8 12h8a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2v1a1 1 0 1 1-2 0v-1h-4v1a1 1 0 1 1-2 0v-1a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2z" /></svg>);
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ export default (({
3
+ styles = {},
4
+ ...props
5
+ }) => <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" style={{
6
+ width: "1.5rem",
7
+ height: "1.5rem"
8
+ }} {...props}><path d="M7.333 1C6.597 1 6 1.597 6 2.333c0 .03.002.06.006.09A.504.504 0 0 0 6 2.5v1a.5.5 0 0 0 1 0V3h4v.5a.5.5 0 0 0 1 0v-1a.505.505 0 0 0-.006-.077.675.675 0 0 0 .006-.09C12 1.597 11.403 1 10.667 1H7.333zM3 7a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v3.637a.527.527 0 0 1-.427.509 7.003 7.003 0 0 0-5.198 9.122c.12.347-.125.732-.492.732H7v1a1 1 0 1 1-2 0v-1a2 2 0 0 1-2-2V7zm18.001 11.001A5 5 0 1 1 11 18a5 5 0 0 1 10.001.001zm-2 0a1 1 0 0 0-1-1h-1v-1a1 1 0 1 0-2 0v1h-1A1 1 0 0 0 14 19h1v1a1 1 0 1 0 2 0v-1h1a1 1 0 0 0 1-1z" /></svg>);
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ export default (({
3
+ styles = {},
4
+ ...props
5
+ }) => <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" style={{
6
+ width: "1.5rem",
7
+ height: "1.5rem"
8
+ }} {...props}><path d="M10.333 1h3.334C14.403 1 15 1.597 15 2.333V3.5a.5.5 0 0 1-1 0V3h-4v.5a.5.5 0 0 1-1 0V2.333C9 1.597 9.597 1 10.333 1zM6 7a2 2 0 0 1 2-2h8c.437 0 .842.14 1.171.379l4.083-4.083a1 1 0 0 1 1.414 0l.036.035a1 1 0 0 1 0 1.414L18 7.45 6.042 19.408 2.748 22.7a1 1 0 0 1-1.414 0l-.036-.035a1 1 0 0 1 0-1.415L6 16.55V7zm2 13.485a.5.5 0 0 1 .146-.354l9-9a.5.5 0 0 1 .854.354V19a2 2 0 0 1-2 2v1a1 1 0 1 1-2 0v-1h-4v1a1 1 0 1 1-2 0v-1.515z" /></svg>);
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ export default (({
3
+ styles = {},
4
+ ...props
5
+ }) => <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" style={{
6
+ width: "1.5rem",
7
+ height: "1.5rem"
8
+ }} {...props}><path d="M10.333 1h3.334C14.403 1 15 1.597 15 2.333V3.5a.5.5 0 0 1-1 0V3h-4v.5a.5.5 0 0 1-1 0V2.333C9 1.597 9.597 1 10.333 1zM6 7a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2v1a1 1 0 1 1-2 0v-1h-4v1a1 1 0 1 1-2 0v-1a2 2 0 0 1-2-2V7z" /></svg>);
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ export default (({
3
+ styles = {},
4
+ ...props
5
+ }) => <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" style={{
6
+ width: "1.5rem",
7
+ height: "1.5rem"
8
+ }} {...props}><path d="M6.333 1h3.334C10.403 1 11 1.597 11 2.333V10.5a.5.5 0 0 1-1 0V3H6v7.5a.5.5 0 0 1-1 0V2.333C5 1.597 5.597 1 6.333 1zM2 14a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2v1a1 1 0 1 1-2 0v-1H6v1a1 1 0 1 1-2 0v-1a2 2 0 0 1-2-2v-5zM13 3.5V2.333C13 1.597 13.597 1 14.333 1h3.334C18.403 1 19 1.597 19 2.333V3.5a.5.5 0 0 1-1 0V3h-4v.5a.5.5 0 0 1-1 0zm3 17V14c0-1.728-1.095-3.2-2.63-3.76a.545.545 0 0 1-.37-.502V5.5a.5.5 0 0 1 .5-.5H20a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2v1a1 1 0 1 1-2 0v-1h-1.5a.5.5 0 0 1-.5-.5z" /></svg>);
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ export default (({
3
+ styles = {},
4
+ ...props
5
+ }) => <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="18" height="18" style={{
6
+ width: "1.125rem",
7
+ height: "1.125rem"
8
+ }} {...props}><path d="M7.8 0h2.4A1.8 1.8 0 0 1 12 1.746v9.504a.75.75 0 0 1-1.5 0V3h-3v8.25a.75.75 0 0 1-1.5 0V1.8A1.8 1.8 0 0 1 7.8 0zM5.25 13.5h5.172c.362 0 .541.477.3.747A6.725 6.725 0 0 0 9 18.75c0 1.137.28 2.207.777 3.147.14.265-.043.603-.343.603H7.5v.375a1.125 1.125 0 0 1-2.25 0V22.5A2.25 2.25 0 0 1 3 20.25v-4.5a2.25 2.25 0 0 1 2.25-2.25zM21 18.75a5.25 5.25 0 1 1-10.5 0 5.25 5.25 0 0 1 10.5 0zm-6-3V18h-2.25a.75.75 0 0 0 0 1.5H15v2.25a.75.75 0 0 0 1.5 0V19.5h2.25a.75.75 0 0 0 0-1.5H16.5v-2.25a.75.75 0 0 0-1.5 0z" /></svg>);
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ export default (({
3
+ styles = {},
4
+ ...props
5
+ }) => <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="18" height="18" style={{
6
+ width: "1.125rem",
7
+ height: "1.125rem"
8
+ }} {...props}><g clipPath="url(#clip0_8306_178)"><path d="M10.8 0h2.4A1.8 1.8 0 0 1 15 1.746V6.9L21.443.457a1.5 1.5 0 1 1 2.121 2.121L2.582 23.561a1.5 1.5 0 0 1-2.121-2.122L9 12.9V1.8A1.8 1.8 0 0 1 10.8 0zm2.7 8.4V3h-3v8.25c-.02.17-.007.115-.02.17L13.5 8.4zM8.25 22.875v-.636a.25.25 0 0 1 .073-.177l8.237-8.237a.234.234 0 0 1 .278-.045A2.25 2.25 0 0 1 18 15.75v4.5a2.25 2.25 0 0 1-2.25 2.25v.375a1.125 1.125 0 0 1-2.25 0V22.5h-3v.375a1.125 1.125 0 0 1-2.25 0z" /></g></svg>);
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ export default (({
3
+ styles = {},
4
+ ...props
5
+ }) => <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="18" height="18" style={{
6
+ width: "1.125rem",
7
+ height: "1.125rem"
8
+ }} {...props}><path d="M10.8 0h2.4A1.8 1.8 0 0 1 15 1.746v9.504a.75.75 0 0 1-1.5 0V3h-3v8.25a.75.75 0 0 1-1.5 0V1.8A1.8 1.8 0 0 1 10.8 0zM8.25 13.5h7.5A2.25 2.25 0 0 1 18 15.75v4.5a2.25 2.25 0 0 1-2.25 2.25v.375a1.125 1.125 0 0 1-2.25 0V22.5h-3v.375a1.125 1.125 0 0 1-2.25 0V22.5A2.25 2.25 0 0 1 6 20.25v-4.5a2.25 2.25 0 0 1 2.25-2.25z" /></svg>);
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ export default (({
3
+ styles = {},
4
+ ...props
5
+ }) => <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="18" height="18" style={{
6
+ width: "1.125rem",
7
+ height: "1.125rem"
8
+ }} {...props}><path d="M6 1.8A1.8 1.8 0 0 1 7.8 0h2.4A1.8 1.8 0 0 1 12 1.8v1.95a.75.75 0 0 1-1.5 0V3h-3v.75a.75.75 0 0 1-1.5 0V1.8zM5.25 6h7.5A2.25 2.25 0 0 1 15 8.25v3.455a.39.39 0 0 1-.333.381 6.752 6.752 0 0 0-4.89 9.811c.14.265-.043.603-.343.603H7.5v.375a1.125 1.125 0 0 1-2.25 0V22.5A2.25 2.25 0 0 1 3 20.25v-12A2.25 2.25 0 0 1 5.25 6zM21 18.75a5.25 5.25 0 1 1-10.5 0 5.25 5.25 0 0 1 10.5 0zm-6-3V18h-2.25a.75.75 0 0 0 0 1.5H15v2.25a.75.75 0 0 0 1.5 0V19.5h2.25a.75.75 0 0 0 0-1.5H16.5v-2.25a.75.75 0 0 0-1.5 0z" /></svg>);
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ export default (({
3
+ styles = {},
4
+ ...props
5
+ }) => <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="18" height="18" style={{
6
+ width: "1.125rem",
7
+ height: "1.125rem"
8
+ }} {...props}><g clipPath="url(#clip0_8306_180)"><path d="M9 1.8A1.8 1.8 0 0 1 10.8 0h2.4A1.8 1.8 0 0 1 15 1.8v1.95a.75.75 0 0 1-1.5 0V3h-3v.75a.75.75 0 0 1-1.5 0V1.8zM8.25 6h7.5c.049 0 .097.002.146.005L21.453.446a1.485 1.485 0 0 1 2.1 2.1l-5.559 5.56L6 20.1l-3.45 3.45a1.485 1.485 0 1 1-2.1-2.1L6 15.9V8.25A2.25 2.25 0 0 1 8.25 6zm0 16.249c0-.1.04-.195.11-.266l9-9a.375.375 0 0 1 .64.266v7.001a2.25 2.25 0 0 1-2.25 2.25v.375a1.125 1.125 0 0 1-2.25 0V22.5h-3v.375a1.125 1.125 0 0 1-2.25 0v-.626z" /></g></svg>);
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ export default (({
3
+ styles = {},
4
+ ...props
5
+ }) => <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="18" height="18" style={{
6
+ width: "1.125rem",
7
+ height: "1.125rem"
8
+ }} {...props}><path d="M9 1.8A1.8 1.8 0 0 1 10.8 0h2.4A1.8 1.8 0 0 1 15 1.8v1.95a.75.75 0 0 1-1.5 0V3h-3v.75a.75.75 0 0 1-1.5 0V1.8zM8.25 6h7.5A2.25 2.25 0 0 1 18 8.25v12a2.25 2.25 0 0 1-2.25 2.25v.375a1.125 1.125 0 0 1-2.25 0V22.5h-3v.375a1.125 1.125 0 0 1-2.25 0V22.5A2.25 2.25 0 0 1 6 20.25v-12A2.25 2.25 0 0 1 8.25 6z" /></svg>);
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ export default (({
3
+ styles = {},
4
+ ...props
5
+ }) => <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="18" height="18" style={{
6
+ width: "1.125rem",
7
+ height: "1.125rem"
8
+ }} {...props}><path d="M4.5 1.8A1.8 1.8 0 0 1 6.3 0h2.4a1.8 1.8 0 0 1 1.8 1.746v9.504a.75.75 0 0 1-1.5 0V3H6v8.25a.75.75 0 0 1-1.5 0V1.8zm-3 13.95a2.25 2.25 0 0 1 2.25-2.25h7.5a2.25 2.25 0 0 1 2.25 2.25v4.5a2.25 2.25 0 0 1-2.25 2.25v.375a1.125 1.125 0 0 1-2.25 0V22.5H6v.375a1.125 1.125 0 0 1-2.25 0V22.5a2.25 2.25 0 0 1-2.25-2.25v-4.5zm13.875 6.75a.375.375 0 0 1-.375-.375V15.75a3.752 3.752 0 0 0-2.703-3.602.403.403 0 0 1-.298-.38L12 6.393c0-.159.1-.303.255-.338.16-.036.325-.055.495-.055h7.5a2.25 2.25 0 0 1 2.25 2.25v12a2.25 2.25 0 0 1-2.25 2.25v.375a1.125 1.125 0 0 1-2.25 0V22.5h-2.625zM13.5 1.8A1.8 1.8 0 0 1 15.3 0h2.4a1.8 1.8 0 0 1 1.8 1.8v1.95a.75.75 0 0 1-1.5 0V3h-3v.75a.75.75 0 0 1-1.5 0V1.8z" /></svg>);
@@ -4,15 +4,13 @@
4
4
 
5
5
  ## Installation
6
6
 
7
- ```sh
8
- npm install bpk-component-image --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 BpkImage from 'bpk-component-image';
13
+ import BpkImage from '@skyscanner/backpack-web/bpk-component-image';
16
14
  import { breakpointDesktop, breakpointTablet } from '@skyscanner/bpk-foundations-web/tokens/base.es6';
17
15
 
18
16
  export default () => (
@@ -34,7 +32,7 @@ The `BpkImage` component will only load images if `inView` is true.
34
32
  Using this HOC can make pages load faster and prevent data being used to display images which are never seen by the user.
35
33
 
36
34
  ```js
37
- import BpkImage, { withLazyLoading, withLoadingBehavior } from 'bpk-component-image';
35
+ import BpkImage, { withLazyLoading, withLoadingBehavior } from '@skyscanner/backpack-web/bpk-component-image';
38
36
  import { breakpointDesktop, breakpointTablet } from '@skyscanner/bpk-foundations-web/tokens/base.es6';
39
37
 
40
38
  // Support for SSR
@@ -58,7 +56,7 @@ export default () => (
58
56
  When the `loading` prop is set true, a spinner will be displayed. When this changes to false, the spinner will fade away and the loaded image and content will fade into view.
59
57
 
60
58
  ```js
61
- import BpkImage, { BpkBackgroundImage, withLazyLoading, withLoadingBehavior } from 'bpk-component-image';
59
+ import BpkImage, { BpkBackgroundImage, withLazyLoading, withLoadingBehavior } from '@skyscanner/backpack-web/bpk-component-image';
62
60
  import { breakpointDesktop, breakpointTablet } from '@skyscanner/bpk-foundations-web/tokens/base.es6';
63
61
 
64
62
  const FadingImage = withLoadingBehavior(BpkImage);
@@ -90,7 +88,7 @@ export default () => (
90
88
  Combining `withLazyLoading` and `withLoadingBehavior` gives us a lazily loaded image that will show a spinner while the image loads.
91
89
 
92
90
  ```js
93
- import BpkImage, { withLazyLoading, withLoadingBehavior } from 'bpk-component-image';
91
+ import BpkImage, { withLazyLoading, withLoadingBehavior } from '@skyscanner/backpack-web/bpk-component-image';
94
92
  import { breakpointDesktop, breakpointTablet } from '@skyscanner/bpk-foundations-web/tokens/base.es6';
95
93
 
96
94
  const documentIfExists = typeof window !== 'undefined' ? document : null;
@@ -4,20 +4,18 @@
4
4
 
5
5
  ## Installation
6
6
 
7
- ```sh
8
- npm install bpk-component-infinite-scroll --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
13
  import PropTypes from 'prop-types';
16
- import BpkButton from 'bpk-component-button';
17
- import BpkSpinner, { SPINNER_TYPES } from 'bpk-component-spinner';
14
+ import BpkButton from '@skyscanner/backpack-web/bpk-component-button';
15
+ import BpkSpinner, { SPINNER_TYPES } from '@skyscanner/backpack-web/bpk-component-spinner';
18
16
  import withInfiniteScroll, {
19
17
  ArrayDataSource,
20
- } from 'bpk-component-infinite-scroll';
18
+ } from '@skyscanner/backpack-web/bpk-component-infinite-scroll';
21
19
 
22
20
  const SomeList = ({ elements }) => (
23
21
  <div id="list">
@@ -108,7 +106,7 @@ its data.
108
106
  ```js
109
107
  import React from 'react';
110
108
  import PropTypes from 'prop-types';
111
- import withInfiniteScroll, { DataSource } from 'bpk-component-infinite-scroll';
109
+ import withInfiniteScroll, { DataSource } from '@skyscanner/backpack-web/bpk-component-infinite-scroll';
112
110
 
113
111
  const SomeList = ({ elements }) => (
114
112
  <div id="list">
@@ -4,15 +4,13 @@
4
4
 
5
5
  ## Installation
6
6
 
7
- ```sh
8
- npm install bpk-component-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 BpkInput, { INPUT_TYPES, CLEAR_BUTTON_MODES } from 'bpk-component-input';
13
+ import BpkInput, { INPUT_TYPES, CLEAR_BUTTON_MODES } from '@skyscanner/backpack-web/bpk-component-input';
16
14
 
17
15
  export default () => (
18
16
  <BpkInput
@@ -75,8 +73,8 @@ You can still attach custom handlers for these events as they will still be call
75
73
 
76
74
  ```js
77
75
  import React from 'react';
78
- import BpkInput, { withOpenEvents } from 'bpk-component-input';
79
- import BpkPopover from 'bpk-component-popover';
76
+ import BpkInput, { withOpenEvents } from '@skyscanner/backpack-web/bpk-component-input';
77
+ import BpkPopover from '@skyscanner/backpack-web/bpk-component-popover';
80
78
 
81
79
  const EnhancedInput = withOpenEvents(BpkInput);
82
80
 
@@ -4,15 +4,13 @@
4
4
 
5
5
  ## Installation
6
6
 
7
- ```sh
8
- npm install bpk-component-label --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 BpkLabel from 'bpk-component-label';
13
+ import BpkLabel from '@skyscanner/backpack-web/bpk-component-label';
16
14
 
17
15
  export default () => (
18
16
  <BpkLabel htmlFor="origin">Origin</BpkLabel>
@@ -38,25 +38,20 @@ export type Props = {
38
38
  const BpkLabel = (props: Props) => {
39
39
  const { children, className, disabled, required, valid, white, ...rest } =
40
40
  props;
41
- const classNames = [getClassName('bpk-label')];
42
41
  const invalid = valid === false;
43
42
 
44
- if (white) {
45
- classNames.push(getClassName('bpk-label--white'));
46
- }
47
- if (invalid) {
48
- classNames.push(getClassName('bpk-label--invalid'));
49
- }
50
- if (disabled) {
51
- classNames.push(getClassName('bpk-label--disabled'));
52
- }
53
- if (className) {
54
- classNames.push(className);
55
- }
43
+ const classNames = getClassName(
44
+ 'bpk-label',
45
+ white && 'bpk-label--white',
46
+ invalid && 'bpk-label--invalid',
47
+ disabled && 'bpk-label--disabled',
48
+ white && disabled && 'bpk-label--disabled--white',
49
+ className,
50
+ );
56
51
 
57
52
  return (
58
53
  // $FlowFixMe[cannot-spread-inexact] - inexact rest. See 'decisions/flowfixme.md'.
59
- <label className={classNames.join(' ')} {...rest}>
54
+ <label className={classNames} {...rest}>
60
55
  {children}
61
56
  {!disabled && required && (
62
57
  <span className={getClassName('bpk-label__asterisk')}>*</span>
@@ -31,6 +31,10 @@
31
31
 
32
32
  &--disabled {
33
33
  @include bpk-label--disabled;
34
+
35
+ &--white {
36
+ color: $bpk-text-disabled-on-dark-day;
37
+ }
34
38
  }
35
39
 
36
40
  &__asterisk {
@@ -4,15 +4,13 @@
4
4
 
5
5
  ## Installation
6
6
 
7
- ```sh
8
- npm install bpk-component-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 BpkLink, { BpkButtonLink } from 'bpk-component-link';
13
+ import BpkLink, { BpkButtonLink } from '@skyscanner/backpack-web/bpk-component-link';
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-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 { BpkList, BpkListItem } from 'bpk-component-list';
13
+ import { BpkList, BpkListItem } from '@skyscanner/backpack-web/bpk-component-list';
16
14
 
17
15
  export default () => (
18
16
  <BpkList>
@@ -4,17 +4,15 @@
4
4
 
5
5
  ## Installation
6
6
 
7
- ```sh
8
- npm install bpk-component-loading-button --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 BpkLoadingButton from 'bpk-component-loading-button';
16
- import BaggageIcon from 'bpk-component-icon/sm/baggage';
17
- import { withButtonAlignment, withRtlSupport } from 'bpk-component-icon';
13
+ import BpkLoadingButton from '@skyscanner/backpack-web/bpk-component-loading-button';
14
+ import BaggageIcon from '@skyscanner/backpack-web/bpk-component-icon/sm/baggage';
15
+ import { withButtonAlignment, withRtlSupport } from '@skyscanner/backpack-web/bpk-component-icon';
18
16
 
19
17
  const AlignedBaggageIcon = withButtonAlignment(withRtlSupport(BaggageIcon));
20
18
  const icon = <AlignedBaggageIcon />;
@@ -6,21 +6,19 @@ Requires **React 16.8+**
6
6
 
7
7
  ## Installation
8
8
 
9
- ```sh
10
- npm install bpk-component-map --save-dev
11
- ```
9
+ Check the main [Readme](https://github.com/skyscanner/backpack#usage) for a complete installation guide.
12
10
 
13
11
  ## Usage
14
12
 
15
13
  ```js
16
14
  import React from 'react';
17
- import BpkText from 'bpk-component-text';
18
- import { withRtlSupport } from 'bpk-component-icon';
19
- import LandmarkIconSm from 'bpk-component-icon/sm/landmark';
15
+ import BpkText from '@skyscanner/backpack-web/bpk-component-text';
16
+ import { withRtlSupport } from '@skyscanner/backpack-web/bpk-component-icon';
17
+ import LandmarkIconSm from '@skyscanner/backpack-web/bpk-component-icon/sm/landmark';
20
18
  import BpkMap, {
21
19
  BpkIconMarker,
22
20
  BpkOverlayView,
23
- } from 'bpk-component-map';
21
+ } from '@skyscanner/backpack-web/bpk-component-map';
24
22
 
25
23
  const AlignedLandmarkIconSm = withRtlSupport(LandmarkIconSm);
26
24
 
@@ -64,7 +62,7 @@ Price markers are used to display clickable prices on a map.
64
62
 
65
63
  ```js
66
64
  import React from 'react';
67
- import BpkMap, { BpkPriceMarker, PRICE_MARKER_STATUSES } from 'bpk-component-map';
65
+ import BpkMap, { BpkPriceMarker, PRICE_MARKER_STATUSES } from '@skyscanner/backpack-web/bpk-component-map';
68
66
 
69
67
  export default () => (
70
68
  <BpkMap
@@ -106,7 +104,7 @@ If you intend to include multiple maps on one page, it's better to load the Goog
106
104
 
107
105
  ```js
108
106
  import React from 'react';
109
- import BpkMap, { withGoogleMapsScript } from 'bpk-component-map';
107
+ import BpkMap, { withGoogleMapsScript } from '@skyscanner/backpack-web/bpk-component-map';
110
108
 
111
109
  const BpkMapWithScript = withGoogleMapsScript(BpkMap);
112
110
 
@@ -4,16 +4,14 @@
4
4
 
5
5
  ## Installation
6
6
 
7
- ```sh
8
- npm install bpk-component-mobile-scroll-container --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 { cssModules } from 'bpk-react-utils';
16
- import BpkMobileScrollContainer from 'bpk-component-mobile-scroll-container';
13
+ import { cssModules } from '@skyscanner/backpack-web/bpk-react-utils';
14
+ import BpkMobileScrollContainer from '@skyscanner/backpack-web/bpk-component-mobile-scroll-container';
17
15
 
18
16
  import STYLES from './MyComponent.scss';
19
17
 
@@ -4,17 +4,15 @@
4
4
 
5
5
  ## Installation
6
6
 
7
- ```sh
8
- npm install bpk-component-modal --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 BpkModal from 'bpk-component-modal';
16
- import BpkButton from 'bpk-component-button';
17
- import { BpkNavigationBarButtonLink } from 'bpk-component-navigation-bar';
13
+ import BpkModal from '@skyscanner/backpack-web/bpk-component-modal';
14
+ import BpkButton from '@skyscanner/backpack-web/bpk-component-button';
15
+ import { BpkNavigationBarButtonLink } from '@skyscanner/backpack-web/bpk-component-navigation-bar';
18
16
 
19
17
  class App extends Component {
20
18
  constructor() {
@@ -4,9 +4,7 @@
4
4
 
5
5
  ## Installation
6
6
 
7
- ```sh
8
- npm install bpk-component-navigation-bar --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
 
@@ -14,10 +12,10 @@ npm install bpk-component-navigation-bar --save-dev
14
12
 
15
13
  ```js
16
14
  import React from 'react';
17
- import ArrowIcon from 'bpk-component-icon/sm/long-arrow-left';
18
- import { withRtlSupport } from 'bpk-component-icon';
15
+ import ArrowIcon from '@skyscanner/backpack-web/bpk-component-icon/sm/long-arrow-left';
16
+ import { withRtlSupport } from '@skyscanner/backpack-web/bpk-component-icon';
19
17
 
20
- import BpkNavigationBar, { BpkNavigationBarIconButton, BpkNavigationBarButtonLink } from 'bpk-component-navigation-bar';
18
+ import BpkNavigationBar, { BpkNavigationBarIconButton, BpkNavigationBarButtonLink } from '@skyscanner/backpack-web/bpk-component-navigation-bar';
21
19
 
22
20
  const ArrowIconWithRtl = withRtlSupport(ArrowIcon);
23
21
 
@@ -58,8 +56,8 @@ export default () => (
58
56
 
59
57
  ```js
60
58
  import React from 'react';
61
- import ArrowIcon from 'bpk-component-icon/sm/long-arrow-left';
62
- import { BpkNavigationBarIconButton } from 'bpk-component-navigation-bar';
59
+ import ArrowIcon from '@skyscanner/backpack-web/bpk-component-icon/sm/long-arrow-left';
60
+ import { BpkNavigationBarIconButton } from '@skyscanner/backpack-web/bpk-component-navigation-bar';
63
61
 
64
62
  export default () => (
65
63
  <BpkNavigationBarIconButton
@@ -89,7 +87,7 @@ export default () => (
89
87
 
90
88
  ```js
91
89
  import React from 'react';
92
- import { BpkNavigationBarButtonLink } from 'bpk-component-navigation-bar';
90
+ import { BpkNavigationBarButtonLink } from '@skyscanner/backpack-web/bpk-component-navigation-bar';
93
91
 
94
92
  export default () => (
95
93
  <BpkNavigationBarButtonLink onClick={() => {}}>
@@ -4,9 +4,7 @@
4
4
 
5
5
  ## Installation
6
6
 
7
- ```sh
8
- npm install bpk-component-nudger --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
 
@@ -14,8 +12,8 @@ npm install bpk-component-nudger --save-dev
14
12
 
15
13
  ```js
16
14
  import React, { Component } from 'react';
17
- import BpkLabel from 'bpk-component-label';
18
- import BpkNudger from 'bpk-component-nudger';
15
+ import BpkLabel from '@skyscanner/backpack-web/bpk-component-label';
16
+ import BpkNudger from '@skyscanner/backpack-web/bpk-component-nudger';
19
17
 
20
18
  class App extends Component {
21
19
  constructor() {
@@ -53,8 +51,8 @@ class App extends Component {
53
51
 
54
52
  ```js
55
53
  import React, { Component } from 'react';
56
- import BpkLabel from 'bpk-component-label';
57
- import { BpkConfigurableNudger } from 'bpk-component-nudger';
54
+ import BpkLabel from '@skyscanner/backpack-web/bpk-component-label';
55
+ import { BpkConfigurableNudger } from '@skyscanner/backpack-web/bpk-component-nudger';
58
56
 
59
57
  const options = ['economy', 'premium', 'business', 'first'];
60
58
 
@@ -29,6 +29,7 @@ $bpk-spacing-v2: true;
29
29
  display: inline-block;
30
30
  padding: bpk-spacing-md() 0;
31
31
  border: none;
32
+ color: $bpk-text-primary-day;
32
33
  text-align: center;
33
34
  vertical-align: middle;
34
35
 
@@ -37,7 +38,7 @@ $bpk-spacing-v2: true;
37
38
 
38
39
  &--secondary-on-dark {
39
40
  background-color: transparent;
40
- color: $bpk-text-primary-night;
41
+ color: $bpk-text-on-dark-day;
41
42
  }
42
43
 
43
44
  &--numeric {
@@ -4,16 +4,14 @@
4
4
 
5
5
  ## Installation
6
6
 
7
- ```sh
8
- npm install bpk-component-overlay --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 BpkText from 'bpk-component-text';
16
- import BpkOverlay, { BORDER_RADIUS_STYLES, OVERLAY_TYPES } from 'bpk-component-overlay';
13
+ import BpkText from '@skyscanner/backpack-web/bpk-component-text';
14
+ import BpkOverlay, { BORDER_RADIUS_STYLES, OVERLAY_TYPES } from '@skyscanner/backpack-web/bpk-component-overlay';
17
15
 
18
16
  export default () => (
19
17
  <div>