@skyscanner/backpack-web 13.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.
- package/README.md +67 -64
- package/bpk-animate-height/README.md +2 -4
- package/bpk-component-accordion/README.md +6 -8
- package/bpk-component-accordion/src/BpkAccordionItem.js +1 -2
- package/bpk-component-aria-live/README.md +2 -4
- package/bpk-component-autosuggest/README.md +5 -7
- package/bpk-component-badge/README.md +2 -4
- package/bpk-component-banner-alert/README.md +4 -6
- package/bpk-component-barchart/README.md +2 -4
- package/bpk-component-barchart/src/BpkBarchartBar.module.scss +4 -4
- package/bpk-component-barchart/src/BpkChartAxis.module.scss +2 -2
- package/bpk-component-barchart/src/BpkChartGridLines.module.scss +1 -1
- package/bpk-component-blockquote/README.md +2 -4
- package/bpk-component-breadcrumb/README.md +2 -4
- package/bpk-component-breakpoint/README.md +2 -4
- package/bpk-component-button/README.md +4 -6
- package/bpk-component-calendar/README.md +3 -5
- package/bpk-component-card/README.md +2 -4
- package/bpk-component-checkbox/README.md +2 -4
- package/bpk-component-checkbox/src/BpkCheckbox.js +1 -0
- package/bpk-component-checkbox/src/BpkCheckbox.module.scss +4 -0
- package/bpk-component-chip/README.md +3 -5
- package/bpk-component-close-button/README.md +2 -4
- package/bpk-component-code/README.md +3 -5
- package/bpk-component-content-cards/README.md +1 -3
- package/bpk-component-content-container/README.md +2 -4
- package/bpk-component-datatable/README.md +3 -5
- package/bpk-component-datepicker/README.md +4 -6
- package/bpk-component-description-list/README.md +2 -4
- package/bpk-component-dialog/README.md +3 -5
- package/bpk-component-drawer/README.md +3 -5
- package/bpk-component-fieldset/README.md +3 -5
- package/bpk-component-flare/README.md +2 -4
- package/bpk-component-floating-notification/README.md +2 -4
- package/bpk-component-form-validation/README.md +2 -4
- package/bpk-component-graphic-promotion/README.md +2 -4
- package/bpk-component-grid/README.md +2 -4
- package/bpk-component-grid-toggle/README.md +2 -4
- package/bpk-component-grid-toggle/src/BpkGridToggle.module.scss +1 -1
- package/bpk-component-horizontal-nav/README.md +2 -4
- package/bpk-component-icon/README.md +9 -11
- package/bpk-component-icon/lg/baggage-cabin-add.js +8 -0
- package/bpk-component-icon/lg/baggage-cabin-not-included.js +8 -0
- package/bpk-component-icon/lg/baggage-cabin.js +8 -0
- package/bpk-component-icon/lg/baggage-checked-add.js +8 -0
- package/bpk-component-icon/lg/baggage-checked-not-included.js +8 -0
- package/bpk-component-icon/lg/baggage-checked.js +8 -0
- package/bpk-component-icon/lg/baggage-generic.js +8 -0
- package/bpk-component-icon/sm/baggage-cabin-add.js +8 -0
- package/bpk-component-icon/sm/baggage-cabin-not-included.js +8 -0
- package/bpk-component-icon/sm/baggage-cabin.js +8 -0
- package/bpk-component-icon/sm/baggage-checked-add.js +8 -0
- package/bpk-component-icon/sm/baggage-checked-not-included.js +8 -0
- package/bpk-component-icon/sm/baggage-checked.js +8 -0
- package/bpk-component-icon/sm/baggage-generic.js +8 -0
- package/bpk-component-image/README.md +5 -7
- package/bpk-component-infinite-scroll/README.md +5 -7
- package/bpk-component-input/README.md +4 -6
- package/bpk-component-label/README.md +2 -4
- package/bpk-component-label/src/BpkLabel.js +9 -14
- package/bpk-component-label/src/BpkLabel.module.scss +4 -0
- package/bpk-component-link/README.md +2 -4
- package/bpk-component-list/README.md +2 -4
- package/bpk-component-loading-button/README.md +4 -6
- package/bpk-component-map/README.md +7 -9
- package/bpk-component-mobile-scroll-container/README.md +3 -5
- package/bpk-component-modal/README.md +4 -6
- package/bpk-component-navigation-bar/README.md +7 -9
- package/bpk-component-nudger/README.md +5 -7
- package/bpk-component-nudger/src/BpkNudger.module.scss +2 -1
- package/bpk-component-overlay/README.md +3 -5
- package/bpk-component-page-indicator/README.md +42 -0
- package/bpk-component-page-indicator/index.js +28 -0
- package/bpk-component-page-indicator/src/BpkPageIndicator.js +147 -0
- package/bpk-component-page-indicator/src/BpkPageIndicator.module.css +18 -0
- package/bpk-component-page-indicator/src/BpkPageIndicator.module.scss +91 -0
- package/bpk-component-page-indicator/src/NavButton.js +85 -0
- package/bpk-component-pagination/README.md +2 -4
- package/bpk-component-pagination/src/BpkPaginationNudger.module.scss +1 -22
- package/bpk-component-pagination/src/BpkPaginationPage.js +2 -1
- package/bpk-component-pagination/src/BpkPaginationPage.module.scss +5 -57
- package/bpk-component-panel/README.md +2 -4
- package/bpk-component-phone-input/README.md +3 -5
- package/bpk-component-popover/README.md +4 -6
- package/bpk-component-price/README.md +2 -4
- package/bpk-component-progress/README.md +2 -4
- package/bpk-component-radio/README.md +2 -4
- package/bpk-component-radio/src/BpkRadio.js +9 -10
- package/bpk-component-radio/src/BpkRadio.module.scss +4 -0
- package/bpk-component-rating/README.md +2 -4
- package/bpk-component-rtl-toggle/README.md +2 -4
- package/bpk-component-scrollable-calendar/README.md +3 -5
- package/bpk-component-section-list/README.md +2 -4
- package/bpk-component-select/README.md +2 -4
- package/bpk-component-skip-link/README.md +2 -4
- package/bpk-component-slider/README.md +2 -4
- package/bpk-component-spinner/README.md +2 -4
- package/bpk-component-split-input/README.md +2 -4
- package/bpk-component-star-rating/README.md +2 -4
- package/bpk-component-switch/README.md +2 -4
- package/bpk-component-table/README.md +2 -4
- package/bpk-component-text/README.md +5 -7
- package/bpk-component-textarea/README.md +2 -4
- package/bpk-component-theme-toggle/README.md +4 -6
- package/bpk-component-ticket/README.md +2 -4
- package/bpk-component-tooltip/README.md +3 -5
- package/bpk-react-utils/README.md +11 -13
- package/bpk-scrim-utils/README.md +2 -5
- package/bpk-scrim-utils/src/BpkScrim.js +1 -3
- package/bpk-scrim-utils/src/bpk-scrim.module.scss +3 -6
- package/bpk-scrim-utils/src/withScrim.js +1 -4
- package/bpk-theming/README.md +3 -5
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
> Backpack is a collection of design resources, reusable components and guidelines for creating Skyscanner's products.
|
|
4
4
|
|
|
5
|
+
[](https://badge.fury.io/js/@skyscanner%2Fbackpack-web)
|
|
5
6
|
[](https://github.com/Skyscanner/backpack/actions)
|
|
6
7
|
|
|
7
|
-
|
|
8
8
|
## Quick links
|
|
9
9
|
|
|
10
10
|
- [Documentation](https://backpack.github.io/)
|
|
@@ -12,10 +12,10 @@
|
|
|
12
12
|
|
|
13
13
|
## Usage
|
|
14
14
|
|
|
15
|
-
###
|
|
15
|
+
### Installation
|
|
16
16
|
|
|
17
17
|
```sh
|
|
18
|
-
npm install
|
|
18
|
+
npm install --save @skyscanner/backpack-web
|
|
19
19
|
```
|
|
20
20
|
|
|
21
21
|
## Contributing
|
|
@@ -24,72 +24,74 @@ To contribute please see [contributing.md](CONTRIBUTING.md).
|
|
|
24
24
|
|
|
25
25
|
## List of packages
|
|
26
26
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
27
|
+
[`bpk-animate-height`](/packages/bpk-animate-height)
|
|
28
|
+
[`bpk-component-accordion`](/packages/bpk-component-accordion)
|
|
29
|
+
[`bpk-component-autosuggest`](/packages/bpk-component-autosuggest)
|
|
30
|
+
[`bpk-component-badge`](/packages/bpk-component-badge)
|
|
31
|
+
[`bpk-component-banner-alert`](/packages/bpk-component-banner-alert)
|
|
32
|
+
[`bpk-component-barchart`](/packages/bpk-component-barchart)
|
|
33
|
+
[`bpk-component-blockquote`](/packages/bpk-component-blockquote)
|
|
34
|
+
[`bpk-component-breadcrumb`](/packages/bpk-component-breadcrumb)
|
|
35
|
+
[`bpk-component-breakpoint`](/packages/bpk-component-breakpoint)
|
|
36
|
+
[`bpk-component-button`](/packages/bpk-component-button)
|
|
37
|
+
[`bpk-component-calendar`](/packages/bpk-component-calendar)
|
|
38
|
+
[`bpk-component-card`](/packages/bpk-component-card)
|
|
39
|
+
[`bpk-component-checkbox`](/packages/bpk-component-checkbox)
|
|
40
|
+
[`bpk-component-chip`](/packages/bpk-component-chip)
|
|
41
|
+
[`bpk-component-close-button`](/packages/bpk-component-close-button)
|
|
42
|
+
[`bpk-component-code`](/packages/bpk-component-code)
|
|
43
|
+
[`bpk-component-content-container`](/packages/bpk-component-content-container)
|
|
44
|
+
[`bpk-component-datatable`](/packages/bpk-component-datatable)
|
|
45
|
+
[`bpk-component-datepicker`](/packages/bpk-component-datepicker)
|
|
46
|
+
[`bpk-component-description-list`](/packages/bpk-component-description-list)
|
|
47
|
+
[`bpk-component-dialog`](/packages/bpk-component-dialog)
|
|
48
|
+
[`bpk-component-drawer`](/packages/bpk-component-drawer)
|
|
49
|
+
[`bpk-component-fieldset`](/packages/bpk-component-fieldset)
|
|
50
|
+
[`bpk-component-form-validation`](/packages/bpk-component-form-validation)
|
|
51
|
+
[`bpk-component-graphic-promotion`](/packages/bpk-component-graphic-promotion)
|
|
52
|
+
[`bpk-component-grid`](/packages/bpk-component-grid)
|
|
53
|
+
[`bpk-component-grid-toggle`](/packages/bpk-component-grid-toggle)
|
|
54
|
+
[`bpk-component-horizontal-nav`](/packages/bpk-component-horizontal-nav)
|
|
55
|
+
[`bpk-component-icon`](/packages/bpk-component-icon)
|
|
56
|
+
[`bpk-component-image`](/packages/bpk-component-image)
|
|
57
|
+
[`bpk-component-infinite-scroll`](/packages/bpk-component-infinite-scroll)
|
|
58
|
+
[`bpk-component-input`](/packages/bpk-component-input)
|
|
59
|
+
[`bpk-component-label`](/packages/bpk-component-label)
|
|
60
|
+
[`bpk-component-link`](/packages/bpk-component-link)
|
|
61
|
+
[`bpk-component-list`](/packages/bpk-component-list)
|
|
62
|
+
[`bpk-component-loading-button`](/packages/bpk-component-loading-button)
|
|
63
|
+
[`bpk-component-mobile-scroll-container`](/packages/bpk-component-mobile-scroll-container)
|
|
64
|
+
[`bpk-component-modal`](/packages/bpk-component-modal)
|
|
65
|
+
[`bpk-component-navigation-bar`](/packages/bpk-component-navigation-bar)
|
|
66
|
+
[`bpk-component-nudger`](/packages/bpk-component-nudger)
|
|
67
|
+
[`bpk-component-page-indicator`](/packages/bpk-component-page-indicator)
|
|
68
|
+
[`bpk-component-pagination`](/packages/bpk-component-pagination)
|
|
69
|
+
[`bpk-component-panel`](/packages/bpk-component-panel)
|
|
70
|
+
[`bpk-component-phone-input`](/packages/bpk-component-phone-input)
|
|
71
|
+
[`bpk-component-popover`](/packages/bpk-component-popover)
|
|
72
|
+
[`bpk-component-progress`](/packages/bpk-component-progress)
|
|
73
|
+
[`bpk-component-radio`](/packages/bpk-component-radio)
|
|
74
|
+
[`bpk-component-rtl-toggle`](/packages/bpk-component-rtl-toggle)
|
|
75
|
+
[`bpk-component-section-list`](/packages/bpk-component-section-list)
|
|
76
|
+
[`bpk-component-select`](/packages/bpk-component-select)
|
|
77
|
+
[`bpk-component-slider`](/packages/bpk-component-slider)
|
|
78
|
+
[`bpk-component-spinner`](/packages/bpk-component-spinner)
|
|
79
|
+
[`bpk-component-star-rating`](/packages/bpk-component-star-rating)
|
|
80
|
+
[`bpk-component-switch`](/packages/bpk-component-switch)
|
|
81
|
+
[`bpk-component-table`](/packages/bpk-component-table)
|
|
82
|
+
[`bpk-component-text`](/packages/bpk-component-text)
|
|
83
|
+
[`bpk-component-textarea`](/packages/bpk-component-textarea)
|
|
84
|
+
[`bpk-theming`](/packages/bpk-theming)
|
|
85
|
+
[`bpk-component-ticket`](/packages/bpk-component-ticket)
|
|
86
|
+
[`bpk-component-tooltip`](/packages/bpk-component-tooltip)
|
|
87
|
+
[`bpk-react-utils`](/packages/bpk-react-utils)
|
|
88
88
|
|
|
89
89
|
## List of external packages
|
|
90
90
|
|
|
91
91
|
These components are part of Backpack and are utilised by the components but live in the Foundations repository.
|
|
92
92
|
|
|
93
|
+
These are installed separately and installation information can be found in the [`Backpack Foundations repo`](https://github.com/Skyscanner/backpack-foundations)
|
|
94
|
+
|
|
93
95
|
| Component | Version |
|
|
94
96
|
| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
95
97
|
| [`bpk-mixins`](https://github.com/Skyscanner/backpack-foundations/tree/main/packages/bpk-mixins) | [](http://badge.fury.io/js/bpk-mixins) |
|
|
@@ -98,4 +100,5 @@ These components are part of Backpack and are utilised by the components but liv
|
|
|
98
100
|
| [`@skyscanner/bpk-foundations-web`](https://github.com/Skyscanner/backpack-foundations/tree/main/packages/bpk-foundations-web) | [](https://badge.fury.io/js/%40skyscanner%2Fbpk-foundations-web) |
|
|
99
101
|
|
|
100
102
|
## Contact
|
|
103
|
+
|
|
101
104
|
- backpack@skyscanner.net
|
|
@@ -9,14 +9,12 @@ More information on the easing values can be found at [http://easings.net/](http
|
|
|
9
9
|
|
|
10
10
|
## Installation
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
npm install bpk-animate-height --save-dev
|
|
14
|
-
```
|
|
12
|
+
Check the main [Readme](https://github.com/skyscanner/backpack#usage) for a complete installation guide.
|
|
15
13
|
|
|
16
14
|
## Usage
|
|
17
15
|
|
|
18
16
|
```js
|
|
19
|
-
import AnimateHeight from 'bpk-animate-height';
|
|
17
|
+
import AnimateHeight from '@skyscanner/backpack-web/bpk-animate-height';
|
|
20
18
|
import React, { Component } from 'react';
|
|
21
19
|
|
|
22
20
|
class AnimateHeightContainer extends Component {
|
|
@@ -4,9 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
npm install bpk-component-accordion --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
|
|
|
@@ -16,7 +14,7 @@ The `withSingleItemAccordionState` higher-order component is used to limit one s
|
|
|
16
14
|
|
|
17
15
|
```js
|
|
18
16
|
import React from 'react';
|
|
19
|
-
import { BpkAccordion, BpkAccordionItem, withSingleItemAccordionState } from 'bpk-component-accordion';
|
|
17
|
+
import { BpkAccordion, BpkAccordionItem, withSingleItemAccordionState } from '@skyscanner/backpack-web/bpk-component-accordion';
|
|
20
18
|
|
|
21
19
|
const SingleItemAccordion = withSingleItemAccordionState(BpkAccordion);
|
|
22
20
|
|
|
@@ -41,7 +39,7 @@ The `withAccordionItemState` higher-order component is used to allow multiple it
|
|
|
41
39
|
|
|
42
40
|
```js
|
|
43
41
|
import React from 'react';
|
|
44
|
-
import { BpkAccordion, BpkAccordionItem, withAccordionItemState } from 'bpk-component-accordion';
|
|
42
|
+
import { BpkAccordion, BpkAccordionItem, withAccordionItemState } from '@skyscanner/backpack-web/bpk-component-accordion';
|
|
45
43
|
|
|
46
44
|
const StatefulAccordionItem = withAccordionItemState(BpkAccordionItem);
|
|
47
45
|
|
|
@@ -66,9 +64,9 @@ export default () => (
|
|
|
66
64
|
|
|
67
65
|
```js
|
|
68
66
|
import React from 'react';
|
|
69
|
-
import { BpkAccordion, BpkAccordionItem } from 'bpk-component-accordion';
|
|
70
|
-
import { withAlignment } from 'bpk-component-icon';
|
|
71
|
-
import StopsIcon from 'bpk-component-icon/sm/stops';
|
|
67
|
+
import { BpkAccordion, BpkAccordionItem } from '@skyscanner/backpack-web/bpk-component-accordion';
|
|
68
|
+
import { withAlignment } from '@skyscanner/backpack-web/bpk-component-icon';
|
|
69
|
+
import StopsIcon from '@skyscanner/backpack-web/bpk-component-icon/sm/stops';
|
|
72
70
|
import { lineHeightBase, iconSizeSm, colorPanjin } from '@skyscanner/bpk-foundations-web/tokens/base.es6';
|
|
73
71
|
|
|
74
72
|
const AlignedStopsIcon = withAlignment(StopsIcon, lineHeightBase, iconSizeSm);
|
|
@@ -80,7 +80,7 @@ const BpkAccordionItem = (props: Props) => {
|
|
|
80
80
|
return (
|
|
81
81
|
// $FlowFixMe[cannot-spread-inexact] - inexact rest. See decisions/flowfixme.md
|
|
82
82
|
<div id={id} {...rest}>
|
|
83
|
-
<dt
|
|
83
|
+
<dt className={getClassName('bpk-accordion__title')}>
|
|
84
84
|
<button
|
|
85
85
|
type="button"
|
|
86
86
|
aria-expanded={expanded}
|
|
@@ -105,7 +105,6 @@ const BpkAccordionItem = (props: Props) => {
|
|
|
105
105
|
</dt>
|
|
106
106
|
<dd
|
|
107
107
|
id={contentId}
|
|
108
|
-
aria-labelledby={contentId}
|
|
109
108
|
className={getClassName('bpk-accordion__content-container')}
|
|
110
109
|
>
|
|
111
110
|
<AnimateHeight duration={200} height={expanded ? 'auto' : 0}>
|
|
@@ -4,15 +4,13 @@
|
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
npm install bpk-component-aria-live --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
|
```tsx
|
|
14
12
|
import React from 'react';
|
|
15
|
-
import BpkAriaLive, { ARIA_LIVE_POLITENESS_SETTINGS } from 'bpk-component-aria-live';
|
|
13
|
+
import BpkAriaLive, { ARIA_LIVE_POLITENESS_SETTINGS } from '@skyscanner/backpack-web/bpk-component-aria-live';
|
|
16
14
|
|
|
17
15
|
export default () => (
|
|
18
16
|
<>
|
|
@@ -4,18 +4,16 @@
|
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
npm install bpk-component-autosuggest --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 BpkLabel from 'bpk-component-label';
|
|
16
|
-
import { withRtlSupport } from 'bpk-component-icon';
|
|
17
|
-
import FlightIcon from 'bpk-component-icon/lg/flight';
|
|
18
|
-
import BpkAutosuggest, { BpkAutosuggestSuggestion } from 'bpk-component-autosuggest';
|
|
13
|
+
import BpkLabel from '@skyscanner/backpack-web/bpk-component-label';
|
|
14
|
+
import { withRtlSupport } from '@skyscanner/backpack-web/bpk-component-icon';
|
|
15
|
+
import FlightIcon from '@skyscanner/backpack-web/bpk-component-icon/lg/flight';
|
|
16
|
+
import BpkAutosuggest, { BpkAutosuggestSuggestion } from '@skyscanner/backpack-web/bpk-component-autosuggest';
|
|
19
17
|
|
|
20
18
|
const BpkFlightIcon = withRtlSupport(FlightIcon);
|
|
21
19
|
|
|
@@ -4,15 +4,13 @@
|
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
npm install bpk-component-badge --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 BpkBadge, { BADGE_TYPES } from 'bpk-component-badge';
|
|
13
|
+
import BpkBadge, { BADGE_TYPES } from '@skyscanner/backpack-web/bpk-component-badge';
|
|
16
14
|
|
|
17
15
|
export default () => (
|
|
18
16
|
<BpkBadge
|
|
@@ -4,9 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
npm install bpk-component-banner-alert --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,7 +12,7 @@ npm install bpk-component-banner-alert --save-dev
|
|
|
14
12
|
|
|
15
13
|
```js
|
|
16
14
|
import React from 'react';
|
|
17
|
-
import BpkBannerAlert, { ALERT_TYPES } from 'bpk-component-banner-alert';
|
|
15
|
+
import BpkBannerAlert, { ALERT_TYPES } from '@skyscanner/backpack-web/bpk-component-banner-alert';
|
|
18
16
|
|
|
19
17
|
export default () => (
|
|
20
18
|
<BpkBannerAlert
|
|
@@ -28,7 +26,7 @@ export default () => (
|
|
|
28
26
|
|
|
29
27
|
```js
|
|
30
28
|
import React, { Component } from 'react';
|
|
31
|
-
import { ALERT_TYPES, BpkBannerAlertDismissable } from 'bpk-component-banner-alert';
|
|
29
|
+
import { ALERT_TYPES, BpkBannerAlertDismissable } from '@skyscanner/backpack-web/bpk-component-banner-alert';
|
|
32
30
|
|
|
33
31
|
class DismissableBpkBannerAlert extends Component {
|
|
34
32
|
constructor() {
|
|
@@ -68,7 +66,7 @@ export default () => (
|
|
|
68
66
|
|
|
69
67
|
```js
|
|
70
68
|
import React, { Component } from 'react';
|
|
71
|
-
import { ALERT_TYPES, withBannerAlertState, BpkBannerAlertDismissable, BpkBannerAlertExpandable } from 'bpk-component-banner-alert';
|
|
69
|
+
import { ALERT_TYPES, withBannerAlertState, BpkBannerAlertDismissable, BpkBannerAlertExpandable } from '@skyscanner/backpack-web/bpk-component-banner-alert';
|
|
72
70
|
|
|
73
71
|
const BannerAlertDismissableState = withBannerAlertState(BpkBannerAlertDismissable);
|
|
74
72
|
const BannerAlertExpandableState = withBannerAlertState(BpkBannerAlertExpandable);
|
|
@@ -4,15 +4,13 @@
|
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
npm install bpk-component-barchart --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 BpkBarchart from 'bpk-component-barchart';
|
|
13
|
+
import BpkBarchart from '@skyscanner/backpack-web/bpk-component-barchart';
|
|
16
14
|
|
|
17
15
|
const priceData = [
|
|
18
16
|
{
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
@include bpk-themeable-property(
|
|
23
23
|
fill,
|
|
24
24
|
--bpk-barchart-bar-background-color,
|
|
25
|
-
$bpk-
|
|
25
|
+
$bpk-line-day
|
|
26
26
|
);
|
|
27
27
|
|
|
28
28
|
&--interactive:not(.bpk-barchart-bar--selected) {
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
@include bpk-themeable-property(
|
|
33
33
|
fill,
|
|
34
34
|
--bpk-barchart-bar-hover-background-color,
|
|
35
|
-
$bpk-
|
|
35
|
+
$bpk-core-primary-day
|
|
36
36
|
);
|
|
37
37
|
}
|
|
38
38
|
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
@include bpk-themeable-property(
|
|
41
41
|
fill,
|
|
42
42
|
--bpk-barchart-bar-active-background-color,
|
|
43
|
-
$bpk-
|
|
43
|
+
$bpk-core-accent-day
|
|
44
44
|
);
|
|
45
45
|
}
|
|
46
46
|
}
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
@include bpk-themeable-property(
|
|
50
50
|
fill,
|
|
51
51
|
--bpk-barchart-bar-selected-background-color,
|
|
52
|
-
$bpk-
|
|
52
|
+
$bpk-core-accent-day
|
|
53
53
|
);
|
|
54
54
|
}
|
|
55
55
|
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
.bpk-chart {
|
|
22
22
|
&__axis-tick {
|
|
23
23
|
&-text {
|
|
24
|
-
fill: $bpk-
|
|
24
|
+
fill: $bpk-text-secondary-day;
|
|
25
25
|
|
|
26
26
|
@include bpk-text;
|
|
27
27
|
@include bpk-caption;
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
&__axis-label {
|
|
32
|
-
fill: $bpk-
|
|
32
|
+
fill: $bpk-text-secondary-day;
|
|
33
33
|
|
|
34
34
|
@include bpk-text;
|
|
35
35
|
@include bpk-caption;
|
|
@@ -4,15 +4,13 @@
|
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
npm install bpk-component-blockquote --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 BpkBlockquote from 'bpk-component-blockquote';
|
|
13
|
+
import BpkBlockquote from '@skyscanner/backpack-web/bpk-component-blockquote';
|
|
16
14
|
|
|
17
15
|
export default () => (
|
|
18
16
|
<BpkBlockquote extraSpace>
|
|
@@ -4,14 +4,12 @@
|
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
npm install bpk-component-breadcrumb --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
|
```js
|
|
13
11
|
import React, { Component } from 'react';
|
|
14
|
-
import BpkBreadcrumb, { BpkBreadcrumbItem } from 'bpk-component-breadcrumb';
|
|
12
|
+
import BpkBreadcrumb, { BpkBreadcrumbItem } from '@skyscanner/backpack-web/bpk-component-breadcrumb';
|
|
15
13
|
|
|
16
14
|
|
|
17
15
|
export default class App extends Component {
|
|
@@ -4,15 +4,13 @@
|
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
npm install bpk-component-breakpoint --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 BpkBreakpoint, { BREAKPOINTS } from 'bpk-component-breakpoint';
|
|
13
|
+
import BpkBreakpoint, { BREAKPOINTS } from '@skyscanner/backpack-web/bpk-component-breakpoint';
|
|
16
14
|
|
|
17
15
|
export default () => (
|
|
18
16
|
<BpkBreakpoint query={BREAKPOINTS.MOBILE}>
|
|
@@ -4,17 +4,15 @@
|
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
npm install bpk-component-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 { withButtonAlignment, withRtlSupport } from 'bpk-component-icon';
|
|
16
|
-
import ArrowIcon from 'bpk-component-icon/sm/long-arrow-right';
|
|
17
|
-
import BpkButton from 'bpk-component-button';
|
|
13
|
+
import { withButtonAlignment, withRtlSupport } from '@skyscanner/backpack-web/bpk-component-icon';
|
|
14
|
+
import ArrowIcon from '@skyscanner/backpack-web/bpk-component-icon/sm/long-arrow-right';
|
|
15
|
+
import BpkButton from '@skyscanner/backpack-web/bpk-component-button';
|
|
18
16
|
|
|
19
17
|
const AlignedArrowIcon = withButtonAlignment(withRtlSupport(ArrowIcon));
|
|
20
18
|
|
|
@@ -4,16 +4,14 @@
|
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
npm install bpk-component-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 BpkCalendar from 'bpk-component-calendar';
|
|
16
|
-
import BpkInput, { INPUT_TYPES } from 'bpk-component-input';
|
|
13
|
+
import BpkCalendar from '@skyscanner/backpack-web/bpk-component-calendar';
|
|
14
|
+
import BpkInput, { INPUT_TYPES } from '@skyscanner/backpack-web/bpk-component-input';
|
|
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
|
-
|
|
8
|
-
npm install bpk-component-card --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 BpkCard from 'bpk-component-card';
|
|
13
|
+
import BpkCard from '@skyscanner/backpack-web/bpk-component-card';
|
|
16
14
|
|
|
17
15
|
export default () => (
|
|
18
16
|
<BpkCard>
|
|
@@ -4,15 +4,13 @@
|
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
npm install bpk-component-checkbox --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 BpkCheckbox from 'bpk-component-checkbox';
|
|
13
|
+
import BpkCheckbox from '@skyscanner/backpack-web/bpk-component-checkbox';
|
|
16
14
|
|
|
17
15
|
export default () => (
|
|
18
16
|
<BpkCheckbox
|
|
@@ -4,16 +4,14 @@
|
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
npm install bpk-component-chip --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 BpkSelectableChip, { BpkDismissibleChip, CHIP_TYPES } from 'bpk-component-chip';
|
|
16
|
-
import BeachIconSm from 'bpk-component-icon/sm/beach';
|
|
13
|
+
import BpkSelectableChip, { BpkDismissibleChip, CHIP_TYPES } from '@skyscanner/backpack-web/bpk-component-chip';
|
|
14
|
+
import BeachIconSm from '@skyscanner/backpack-web/bpk-component-icon/sm/beach';
|
|
17
15
|
|
|
18
16
|
export default () => (
|
|
19
17
|
|