@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
@@ -0,0 +1,42 @@
1
+ # bpk-component-page-indicator
2
+
3
+ > Backpack page indicator component.
4
+
5
+ ## Installation
6
+
7
+ Check the main [Readme](https://github.com/skyscanner/backpack#usage) for a complete installation guide.
8
+
9
+ ## Usage
10
+
11
+ ```js
12
+ import React from 'react';
13
+ import BpkPageIndicator from '@skyscanner/backpack-web/bpk-component-page-indicator';
14
+
15
+ export default () =>
16
+ <BpkPageIndicator
17
+ currentIndex={0}
18
+ totalIndicators={7}
19
+ onClick={(e, newIndex, direction) => {
20
+ console.log('Slide to new index:', newIndex);
21
+ console.log('Slide direction:', direction);
22
+ }}
23
+ indicatorLabel='Go to slide'
24
+ prevNavLabel='Previous slide'
25
+ nextNavLabel='Next slide'
26
+ />;
27
+ ```
28
+
29
+ ## Props
30
+
31
+ | Property | PropType | Required | Default Value |
32
+ |-----------------|----------------|----------|-----------------|
33
+ | currentIndex | number | true | - |
34
+ | totalIndicators | number | true | - |
35
+ | indicatorLabel | string | true | - |
36
+ | prevNavLabel | string | true | - |
37
+ | nextNavLabel | string | true | - |
38
+ | className | string | false | null |
39
+ | showNav | bool | false | false |
40
+ | variant | oneOf(VARIANT) | false | VARIANT.default |
41
+ | onClick | func | false | null |
42
+
@@ -0,0 +1,28 @@
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 BpkPageIndicator, {
21
+ type Props as BpkPageIndicatorProps,
22
+ VARIANT,
23
+ } from './src/BpkPageIndicator';
24
+ import { DIRECTIONS } from './src/NavButton';
25
+
26
+ export type { BpkPageIndicatorProps };
27
+ export { DIRECTIONS, VARIANT };
28
+ export default BpkPageIndicator;
@@ -0,0 +1,147 @@
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 { cssModules } from '../../bpk-react-utils';
24
+
25
+ import NavButton, { DIRECTIONS } from './NavButton';
26
+ import STYLES from './BpkPageIndicator.module.scss';
27
+
28
+ const getClassName = cssModules(STYLES);
29
+
30
+ const DISPLAYED_TOTAL = 5;
31
+ const START_SCROLL_INDEX = Math.floor(DISPLAYED_TOTAL / 2);
32
+
33
+ export const VARIANT = {
34
+ default: 'default',
35
+ overImage: 'overImage',
36
+ };
37
+
38
+ export type Props = {
39
+ className: ?string,
40
+ showNav: ?boolean,
41
+ currentIndex: number,
42
+ totalIndicators: number,
43
+ onClick: ?() => void,
44
+ indicatorLabel: string,
45
+ prevNavLabel: string,
46
+ nextNavLabel: string,
47
+ variant: ?$Keys<typeof VARIANT>,
48
+ };
49
+
50
+ const BpkPageIndicator = ({
51
+ className,
52
+ currentIndex,
53
+ indicatorLabel,
54
+ nextNavLabel,
55
+ onClick,
56
+ prevNavLabel,
57
+ showNav,
58
+ totalIndicators,
59
+ variant,
60
+ }: Props) => (
61
+ // $FlowFixMe[cannot-spread-inexact] - inexact rest. See 'decisions/flowfixme.md'.
62
+ <div className={className}>
63
+ <div
64
+ className={getClassName(
65
+ 'bpk-page-indicator',
66
+ showNav && 'bpk-page-indicator__showNav',
67
+ )}
68
+ >
69
+ {showNav && (
70
+ <NavButton
71
+ currentIndex={currentIndex}
72
+ onClick={onClick}
73
+ disabled={currentIndex === 0}
74
+ direction={DIRECTIONS.PREV}
75
+ ariaLabel={prevNavLabel}
76
+ />
77
+ )}
78
+ <div className={getClassName('bpk-page-indicator__container')}>
79
+ <div
80
+ className={getClassName('bpk-page-indicator__indicators-container')}
81
+ style={
82
+ currentIndex > START_SCROLL_INDEX
83
+ ? {
84
+ '--scroll-index':
85
+ totalIndicators > DISPLAYED_TOTAL
86
+ ? Math.min(
87
+ currentIndex - START_SCROLL_INDEX,
88
+ totalIndicators - DISPLAYED_TOTAL,
89
+ )
90
+ : 0,
91
+ }
92
+ : undefined
93
+ }
94
+ >
95
+ {[...Array(totalIndicators)].map((val, index) => (
96
+ <button
97
+ type="button"
98
+ onClick={(e) => {
99
+ onClick(e, index, DIRECTIONS.INDICATORS);
100
+ }}
101
+ className={getClassName(
102
+ 'bpk-page-indicator__indicator',
103
+ `bpk-page-indicator__indicator--${variant}`,
104
+ index === currentIndex &&
105
+ `bpk-page-indicator__indicator--active-${variant}`,
106
+ )}
107
+ aria-label={`${indicatorLabel} ${index + 1}`}
108
+ aria-current={currentIndex === index ? 'true' : 'false'}
109
+ // eslint-disable-next-line react/no-array-index-key
110
+ key={`indicator-${index}`}
111
+ />
112
+ ))}
113
+ </div>
114
+ </div>
115
+ {showNav && (
116
+ <NavButton
117
+ currentIndex={currentIndex}
118
+ onClick={onClick}
119
+ disabled={currentIndex === totalIndicators - 1}
120
+ ariaLabel={nextNavLabel}
121
+ direction={DIRECTIONS.NEXT}
122
+ />
123
+ )}
124
+ </div>
125
+ </div>
126
+ );
127
+
128
+ BpkPageIndicator.propTypes = {
129
+ indicatorLabel: PropTypes.string.isRequired,
130
+ prevNavLabel: PropTypes.string.isRequired,
131
+ nextNavLabel: PropTypes.string.isRequired,
132
+ currentIndex: PropTypes.number.isRequired,
133
+ totalIndicators: PropTypes.number.isRequired,
134
+ variant: PropTypes.oneOf(Object.keys(VARIANT)),
135
+ onClick: PropTypes.func,
136
+ className: PropTypes.string,
137
+ showNav: PropTypes.bool,
138
+ };
139
+
140
+ BpkPageIndicator.defaultProps = {
141
+ onClick: null,
142
+ className: null,
143
+ showNav: false,
144
+ variant: VARIANT.default,
145
+ };
146
+
147
+ export default BpkPageIndicator;
@@ -0,0 +1,18 @@
1
+ /*
2
+ * Backpack - Skyscanner's Design System
3
+ *
4
+ * Copyright 2016 Skyscanner Ltd
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */
18
+ @keyframes bpk-keyframe-spin{100%{transform:rotate(1turn)}}.bpk-page-indicator{display:flex}
@@ -0,0 +1,91 @@
1
+ /*
2
+ * Backpack - Skyscanner's Design System
3
+ *
4
+ * Copyright 2016 Skyscanner Ltd
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */
18
+
19
+ @import '~bpk-mixins/index.scss';
20
+
21
+ $bpk-spacing-v2: true;
22
+ $dot-size: bpk-spacing-md();
23
+ $dot-margin: bpk-spacing-sm();
24
+ $displayed-total: 5;
25
+ /* stylelint-disable-next-line scss/operator-no-newline-after */
26
+ $container-width: $dot-size * $displayed-total + $dot-margin * $displayed-total *
27
+ 2;
28
+
29
+ .bpk-page-indicator {
30
+ display: flex;
31
+ width: 100%;
32
+ justify-content: center;
33
+ align-items: center;
34
+
35
+ &__showNav {
36
+ justify-content: space-between;
37
+ }
38
+
39
+ &__container {
40
+ max-width: $container-width;
41
+ min-height: $dot-size;
42
+ overflow: hidden;
43
+ }
44
+
45
+ &__indicators-container {
46
+ --direction: -1;
47
+
48
+ /* stylelint-disable scss/operator-no-newline-after */
49
+ transform: translateX(
50
+ calc(
51
+ var(--direction) * var(--scroll-index, 0) * #{$dot-size + $dot-margin *
52
+ 2}
53
+ )
54
+ );
55
+ /* stylelint-enable scss/operator-no-newline-after */
56
+ transition: transform $bpk-duration-sm ease-in-out;
57
+ white-space: nowrap;
58
+
59
+ @include bpk-rtl {
60
+ --direction: 1;
61
+ }
62
+ }
63
+
64
+ &__indicator {
65
+ display: inline-block;
66
+ width: $dot-size;
67
+ height: $dot-size;
68
+ padding: 0;
69
+ border: none;
70
+ border-radius: 50%;
71
+ margin-inline: $dot-margin;
72
+
73
+ &--default {
74
+ background-color: $bpk-line-day;
75
+ }
76
+
77
+ &--overImage {
78
+ background-color: $bpk-line-on-dark-day;
79
+ }
80
+
81
+ &--active {
82
+ &-default {
83
+ background-color: $bpk-text-secondary-day;
84
+ }
85
+
86
+ &-overImage {
87
+ background-color: $bpk-text-on-dark-day;
88
+ }
89
+ }
90
+ }
91
+ }
@@ -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