@skyscanner/backpack-web 4.0.0 → 5.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 (34) hide show
  1. package/bpk-component-aria-live/package.json +3 -3
  2. package/bpk-component-autosuggest/package.json +2 -2
  3. package/bpk-component-banner-alert/package.json +2 -2
  4. package/bpk-component-calendar/package.json +2 -2
  5. package/bpk-component-chip/package.json +2 -2
  6. package/bpk-component-datepicker/package.json +5 -5
  7. package/bpk-component-fieldset/package.json +6 -6
  8. package/bpk-component-form-validation/package.json +2 -2
  9. package/bpk-component-input/package.json +2 -2
  10. package/bpk-component-modal/package.json +1 -1
  11. package/bpk-component-modal/src/BpkModal.js +3 -3
  12. package/bpk-component-phone-input/package.json +3 -3
  13. package/bpk-component-popover/package.json +2 -2
  14. package/bpk-component-price/README.md +4 -2
  15. package/bpk-component-price/index.js +3 -2
  16. package/bpk-component-price/package.json +1 -1
  17. package/bpk-component-price/src/BpkPrice.js +16 -12
  18. package/bpk-component-price/src/BpkPrice.module.scss +16 -10
  19. package/bpk-component-price/src/common-types.js +29 -0
  20. package/bpk-component-scrollable-calendar/package.json +2 -2
  21. package/bpk-component-split-input/README.md +42 -0
  22. package/bpk-component-split-input/index.js +27 -0
  23. package/bpk-component-split-input/package.json +24 -0
  24. package/bpk-component-split-input/src/BpkInputField.js +71 -0
  25. package/bpk-component-split-input/src/BpkInputField.module.scss +34 -0
  26. package/bpk-component-split-input/src/BpkSplitInput.js +243 -0
  27. package/bpk-component-split-input/src/BpkSplitInput.module.css +18 -0
  28. package/bpk-component-split-input/src/BpkSplitInput.module.scss +36 -0
  29. package/bpk-component-star-rating/package.json +1 -1
  30. package/bpk-component-ticket/README.md +0 -1
  31. package/bpk-component-ticket/package.json +1 -1
  32. package/bpk-component-ticket/src/BpkTicket.js +0 -40
  33. package/bpk-component-ticket/src/BpkTicket.module.scss +13 -165
  34. package/package.json +1 -1
@@ -0,0 +1,34 @@
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
+ /* stylelint-disable */
19
+ @import '~bpk-mixins';
20
+
21
+ .BpkInputField {
22
+ display: flex;
23
+ max-width: 3*bpk-spacing-xxl();
24
+ margin-right: bpk-spacing-xs();
25
+ align-items: center;
26
+
27
+ input {
28
+ text-align: center;
29
+ }
30
+ }
31
+
32
+ .BpkInputField:last-child {
33
+ margin-right: $bpk-spacing-none;
34
+ }
@@ -0,0 +1,243 @@
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, { Component } from 'react';
21
+ import PropTypes from 'prop-types';
22
+
23
+ import { cssModules } from '../../bpk-react-utils';
24
+ import { INPUT_TYPES } from '../../bpk-component-input';
25
+
26
+ import InputField from './BpkInputField';
27
+ import STYLES from './BpkSplitInput.module.scss';
28
+
29
+ const getClassName = cssModules(STYLES);
30
+
31
+ // keyCode constants
32
+ const BACKSPACE = 8;
33
+ const LEFT_ARROW = 37;
34
+ const RIGHT_ARROW = 39;
35
+ const DELETE = 46;
36
+ const SPACEBAR = 32;
37
+ const ENTER = 13;
38
+
39
+ class BpkSplitInput extends Component {
40
+ constructor(props) {
41
+ super(props);
42
+
43
+ this.state = {
44
+ focusedInput: 0,
45
+ inputValue: [],
46
+ };
47
+ }
48
+
49
+ onInputChange = (input) => {
50
+ this.setState({ inputValue: input });
51
+ const { onChange } = this.props;
52
+ const value = input.join('');
53
+ onChange(value);
54
+ };
55
+
56
+ updateInputValue = (value) => {
57
+ const { focusedInput, inputValue } = this.state;
58
+ inputValue[focusedInput] = value;
59
+
60
+ this.onInputChange(inputValue);
61
+ };
62
+
63
+ handleSubmit = () => {
64
+ const { onSubmit } = this.props;
65
+ const { inputValue } = this.state;
66
+ if (this.validateInput(inputValue)) {
67
+ const value = inputValue.join('');
68
+ onSubmit(value);
69
+ }
70
+ };
71
+
72
+ validateInput = (inputValue) => {
73
+ let index = 0;
74
+ while (index < inputValue.length) {
75
+ if (!this.isInputValid(inputValue[index])) {
76
+ this.setState({ focusedInput: index });
77
+ return false;
78
+ }
79
+ index += 1;
80
+ }
81
+ return true;
82
+ };
83
+
84
+ isNumeric = () => this.props.type === INPUT_TYPES.number;
85
+
86
+ isInputValid = (value) => {
87
+ const isTypeValid = this.isNumeric()
88
+ ? /^\d$/.test(value)
89
+ : typeof value === 'string';
90
+ return isTypeValid && value.trim().length === 1;
91
+ };
92
+
93
+ focusInput = (inputIndex) => {
94
+ const { inputLength } = this.props;
95
+ const focusedInput = Math.max(Math.min(inputLength - 1, inputIndex), 0);
96
+ this.setState({ focusedInput });
97
+ };
98
+
99
+ focusNextInput = () => {
100
+ const { focusedInput } = this.state;
101
+ this.focusInput(focusedInput + 1);
102
+ };
103
+
104
+ focusPreviousInput = () => {
105
+ const { focusedInput } = this.state;
106
+ this.focusInput(focusedInput - 1);
107
+ };
108
+
109
+ handleOnPaste = (e) => {
110
+ e.preventDefault();
111
+ const { inputLength } = this.props;
112
+ const { focusedInput, inputValue } = this.state;
113
+
114
+ const pastedData = e.clipboardData
115
+ .getData('text/plain')
116
+ .slice(0, inputLength - focusedInput)
117
+ .split('');
118
+ const charsReceived = pastedData.length;
119
+
120
+ let firstInvalidInputPosition;
121
+ let position = focusedInput;
122
+ for (position; position < charsReceived; position += 1) {
123
+ const firstElement = pastedData.shift();
124
+ if (this.isInputValid(firstElement)) {
125
+ inputValue[position] = firstElement;
126
+ } else if (typeof firstInvalidInputPosition === 'undefined') {
127
+ firstInvalidInputPosition = position;
128
+ }
129
+ }
130
+ this.focusInput(
131
+ typeof firstInvalidInputPosition !== 'undefined'
132
+ ? firstInvalidInputPosition
133
+ : position,
134
+ );
135
+ this.onInputChange(inputValue);
136
+ };
137
+
138
+ handleOnKeyDown = (e) => {
139
+ if (e.keyCode === BACKSPACE || e.key === 'Backspace') {
140
+ e.preventDefault();
141
+ this.updateInputValue('');
142
+ this.focusPreviousInput();
143
+ } else if (e.keyCode === DELETE || e.key === 'Delete') {
144
+ e.preventDefault();
145
+ this.updateInputValue('');
146
+ } else if (
147
+ e.keyCode === LEFT_ARROW ||
148
+ e.key === 'Left' ||
149
+ e.key === 'ArrowLeft'
150
+ ) {
151
+ e.preventDefault();
152
+ this.focusPreviousInput();
153
+ } else if (
154
+ e.keyCode === RIGHT_ARROW ||
155
+ e.key === 'Right' ||
156
+ e.key === 'ArrowRight'
157
+ ) {
158
+ e.preventDefault();
159
+ this.focusNextInput();
160
+ } else if (e.keyCode === ENTER || e.key === 'Enter') {
161
+ e.preventDefault();
162
+ this.handleSubmit();
163
+ } else if (
164
+ e.keyCode === SPACEBAR ||
165
+ e.key === ' ' ||
166
+ e.key === 'Spacebar' ||
167
+ e.key === 'Space'
168
+ ) {
169
+ e.preventDefault();
170
+ }
171
+ };
172
+
173
+ handleOnChange = (e) => {
174
+ const { value } = e.target;
175
+ if (this.isInputValid(value)) {
176
+ this.updateInputValue(value);
177
+ this.focusNextInput();
178
+ }
179
+ };
180
+
181
+ handleOnFocus = (e, index) => {
182
+ this.setState({ focusedInput: index });
183
+ e.target.select();
184
+ };
185
+
186
+ renderInputs = () => {
187
+ const { focusedInput, inputValue } = this.state;
188
+ const { id, inputLength, label, large, name, placeholder, type } =
189
+ this.props;
190
+ const inputs = [];
191
+ for (let index = 0; index < inputLength; index += 1) {
192
+ inputs.push(
193
+ <InputField
194
+ key={index}
195
+ index={index}
196
+ focus={focusedInput === index}
197
+ id={`${id}-${index}`}
198
+ label={label}
199
+ name={name}
200
+ type={type}
201
+ large={large}
202
+ value={inputValue && inputValue[index]}
203
+ placeholder={placeholder}
204
+ onChange={this.handleOnChange}
205
+ onInput={this.handleOnChange}
206
+ onKeyDown={this.handleOnKeyDown}
207
+ onPaste={this.handleOnPaste}
208
+ onFocus={(e) => this.handleOnFocus(e, index)}
209
+ />,
210
+ );
211
+ }
212
+
213
+ return inputs;
214
+ };
215
+
216
+ render() {
217
+ return (
218
+ <div className={getClassName('BpkSplitInput')}>{this.renderInputs()}</div>
219
+ );
220
+ }
221
+ }
222
+
223
+ BpkSplitInput.propTypes = {
224
+ type: PropTypes.oneOf([INPUT_TYPES.text, INPUT_TYPES.number]),
225
+ id: PropTypes.string.isRequired,
226
+ label: PropTypes.string.isRequired,
227
+ name: PropTypes.string.isRequired,
228
+ inputLength: PropTypes.number,
229
+ placeholder: PropTypes.string,
230
+ onChange: PropTypes.func.isRequired,
231
+ onSubmit: PropTypes.func.isRequired,
232
+ large: PropTypes.bool,
233
+ };
234
+
235
+ BpkSplitInput.defaultProps = {
236
+ type: INPUT_TYPES.number,
237
+ inputLength: 4,
238
+ large: true,
239
+ placeholder: '',
240
+ };
241
+
242
+ export default BpkSplitInput;
243
+ export { INPUT_TYPES };
@@ -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-split-input{display:flex}
@@ -0,0 +1,36 @@
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
+ /* stylelint-disable */
20
+
21
+ @import '~bpk-mixins/index';
22
+
23
+ .BpkSplitInput {
24
+ @include bpk-body-default;
25
+ display: flex;
26
+ width: 100%;
27
+ padding-top: bpk-spacing-xs();
28
+ flex-direction: row;
29
+ align-items: center;
30
+ direction: ltr;
31
+
32
+ &__textbox {
33
+ display: flex;
34
+ align-items: center;
35
+ }
36
+ }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bpk-component-star-rating",
3
- "version": "3.1.12",
3
+ "version": "3.1.13",
4
4
  "description": "Backpack rating star component.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -34,5 +34,4 @@ export default () => (
34
34
  | vertical | bool | false | false |
35
35
  | stubProps | object | false | {} |
36
36
  | stubClassName | string | false | null |
37
- | withNotches | bool | false | true |
38
37
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bpk-component-ticket",
3
- "version": "4.1.12",
3
+ "version": "5.0.0",
4
4
  "description": "Backpack ticket component.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -33,7 +33,6 @@ type Props = {
33
33
  stubProps: { [string]: any },
34
34
  padded: boolean,
35
35
  vertical: boolean,
36
- withNotches: boolean,
37
36
  className: ?string,
38
37
  stubClassName: ?string,
39
38
  href: ?string,
@@ -49,7 +48,6 @@ const BpkTicket = (props: Props) => {
49
48
  stubClassName,
50
49
  stubProps,
51
50
  vertical,
52
- withNotches,
53
51
  ...rest
54
52
  } = props;
55
53
 
@@ -57,7 +55,6 @@ const BpkTicket = (props: Props) => {
57
55
  'bpk-ticket',
58
56
  className,
59
57
  vertical && 'bpk-ticket--vertical',
60
- withNotches && 'bpk-ticket--with-notches',
61
58
  );
62
59
 
63
60
  const mainClassNames = getClassName(
@@ -66,7 +63,6 @@ const BpkTicket = (props: Props) => {
66
63
  padded && 'bpk-ticket__main--padded',
67
64
  vertical && 'bpk-ticket__main--vertical',
68
65
  !vertical && 'bpk-ticket__main--horizontal',
69
- withNotches && 'bpk-ticket__paper--with-notches',
70
66
  );
71
67
 
72
68
  const mainInnerClassNames = getClassName(
@@ -82,7 +78,6 @@ const BpkTicket = (props: Props) => {
82
78
  padded && 'bpk-ticket__stub--padded',
83
79
  vertical && 'bpk-ticket__stub--vertical',
84
80
  !vertical && 'bpk-ticket__stub--horizontal',
85
- withNotches && 'bpk-ticket__paper--with-notches',
86
81
  );
87
82
 
88
83
  const stubInnerClassNames = getClassName(
@@ -91,30 +86,6 @@ const BpkTicket = (props: Props) => {
91
86
  !vertical && 'bpk-ticket__stub-inner--horizontal',
92
87
  );
93
88
 
94
- const punchlineClassNames = getClassName(
95
- 'bpk-ticket__punchline',
96
- vertical &&
97
- (withNotches
98
- ? 'bpk-ticket__punchline--horizontal-with-notches'
99
- : 'bpk-ticket__punchline--horizontal'),
100
- !vertical &&
101
- (withNotches
102
- ? 'bpk-ticket__punchline--vertical-with-notches'
103
- : 'bpk-ticket__punchline--vertical'),
104
- );
105
-
106
- const startNotchClassNames = getClassName(
107
- 'bpk-ticket__notch',
108
- vertical && 'bpk-ticket__notch--left',
109
- !vertical && 'bpk-ticket__notch--top',
110
- );
111
-
112
- const endNotchClassNames = getClassName(
113
- 'bpk-ticket__notch',
114
- vertical && 'bpk-ticket__notch--right',
115
- !vertical && 'bpk-ticket__notch--bottom',
116
- );
117
-
118
89
  const mainContent = padded ? (
119
90
  children
120
91
  ) : (
@@ -131,15 +102,6 @@ const BpkTicket = (props: Props) => {
131
102
  <div key="main" className={mainClassNames}>
132
103
  {mainContent}
133
104
  </div>,
134
- <div
135
- key="punchline"
136
- className={punchlineClassNames}
137
- role="presentation"
138
- aria-hidden="true"
139
- >
140
- {withNotches && <div className={startNotchClassNames} />}
141
- {withNotches && <div className={endNotchClassNames} />}
142
- </div>,
143
105
  // $FlowFixMe[cannot-spread-indexer] - inexact rest. See 'decisions/flowfixme.md'.
144
106
  <div key="stub" className={stubClassNames} {...stubProps}>
145
107
  {stubContent}
@@ -172,7 +134,6 @@ BpkTicket.propTypes = {
172
134
  vertical: PropTypes.bool,
173
135
  stubClassName: PropTypes.string,
174
136
  stubProps: PropTypes.object, // eslint-disable-line react/forbid-prop-types
175
- withNotches: PropTypes.bool,
176
137
  };
177
138
 
178
139
  BpkTicket.defaultProps = {
@@ -182,7 +143,6 @@ BpkTicket.defaultProps = {
182
143
  vertical: false,
183
144
  stubClassName: null,
184
145
  stubProps: {},
185
- withNotches: true,
186
146
  };
187
147
 
188
148
  export default BpkTicket;
@@ -41,7 +41,6 @@ $bpk-spacing-v2: true;
41
41
  }
42
42
 
43
43
  .bpk-ticket {
44
- $notch-size: bpk-spacing-md();
45
44
  $ticket-padding: bpk-spacing-base();
46
45
 
47
46
  position: relative;
@@ -49,12 +48,14 @@ $bpk-spacing-v2: true;
49
48
  display: flex;
50
49
  flex-direction: row;
51
50
  align-items: stretch;
51
+ flex: none;
52
52
  color: $bpk-card-color;
53
53
  text-decoration: none;
54
+ box-shadow: 0 5px 12px rgba($bpk-button-outline-background-color, 0.08),
55
+ 0 3px 12px rgba($bpk-button-outline-background-color, 0.08);
54
56
  cursor: pointer;
55
57
 
56
- @include bpk-box-shadow-sm;
57
- @include bpk-border-radius-sm;
58
+ @include bpk-border-radius-md;
58
59
  @include hidden-box-shadow-after;
59
60
 
60
61
  @include bpk-hover {
@@ -71,35 +72,22 @@ $bpk-spacing-v2: true;
71
72
  flex-direction: column;
72
73
  }
73
74
 
74
- &--with-notches {
75
- box-shadow: none;
76
-
77
- &::after {
78
- content: none;
79
- }
80
- }
81
-
82
75
  &__paper {
83
76
  position: relative;
84
77
  background-color: $bpk-card-background-color;
85
-
86
- &--with-notches {
87
- @include bpk-box-shadow-sm;
88
- @include hidden-box-shadow-after;
89
- }
90
78
  }
91
79
 
92
80
  @mixin main-styles {
93
81
  &--horizontal {
94
- border-radius: $bpk-border-radius-sm 0 0 $bpk-border-radius-sm;
82
+ border-radius: $bpk-border-radius-md 0 0 $bpk-border-radius-md;
95
83
 
96
84
  @include bpk-rtl {
97
- border-radius: 0 $bpk-border-radius-sm $bpk-border-radius-sm 0;
85
+ border-radius: 0 $bpk-border-radius-md $bpk-border-radius-md 0;
98
86
  }
99
87
  }
100
88
 
101
89
  &--vertical {
102
- border-radius: $bpk-border-radius-sm $bpk-border-radius-sm 0 0;
90
+ border-radius: $bpk-border-radius-md $bpk-border-radius-md 0 0;
103
91
  }
104
92
  }
105
93
 
@@ -123,15 +111,18 @@ $bpk-spacing-v2: true;
123
111
  @mixin stub-styles {
124
112
  &--horizontal {
125
113
  min-width: 30%;
126
- border-radius: 0 $bpk-border-radius-sm $bpk-border-radius-sm 0;
114
+ border-radius: 0 $bpk-border-radius-md $bpk-border-radius-md 0;
115
+ box-shadow: inset $bpk-one-pixel-rem 0 0 $bpk-color-sky-gray-tint-05;
127
116
 
128
117
  @include bpk-rtl {
129
- border-radius: $bpk-border-radius-sm 0 0 $bpk-border-radius-sm;
118
+ border-radius: $bpk-border-radius-md 0 0 $bpk-border-radius-md;
119
+ box-shadow: inset (-$bpk-one-pixel-rem) 0 0 $bpk-color-sky-gray-tint-05;
130
120
  }
131
121
  }
132
122
 
133
123
  &--vertical {
134
- border-radius: 0 0 $bpk-border-radius-sm $bpk-border-radius-sm;
124
+ border-radius: 0 0 $bpk-border-radius-md $bpk-border-radius-md;
125
+ box-shadow: inset 0 $bpk-one-pixel-rem 0 $bpk-color-sky-gray-tint-05;
135
126
  }
136
127
  }
137
128
 
@@ -151,147 +142,4 @@ $bpk-spacing-v2: true;
151
142
 
152
143
  @include stub-styles;
153
144
  }
154
-
155
- &__punchline {
156
- position: relative;
157
- z-index: 1;
158
- flex: 0 0 auto;
159
- background-color: $bpk-card-background-color;
160
-
161
- &--horizontal {
162
- height: $bpk-one-pixel-rem * 2;
163
- background-image: linear-gradient(
164
- $bpk-color-sky-gray-tint-06,
165
- $bpk-color-sky-gray-tint-06
166
- );
167
- background-repeat: repeat-x;
168
- background-position: 0 50%;
169
- background-size: 8 * $bpk-one-pixel-rem 2 * $bpk-one-pixel-rem;
170
- }
171
-
172
- &--horizontal-with-notches {
173
- height: $notch-size * 2;
174
- margin: auto $notch-size;
175
- padding: 0 $notch-size;
176
- background-image: linear-gradient(
177
- $bpk-color-sky-gray-tint-06,
178
- $bpk-color-sky-gray-tint-06
179
- );
180
- background-repeat: repeat-x;
181
- background-position: 0 50%;
182
- background-size: 8 * $bpk-one-pixel-rem 2 * $bpk-one-pixel-rem;
183
- }
184
-
185
- &--vertical {
186
- width: $bpk-one-pixel-rem * 2;
187
- background-image: linear-gradient(
188
- $bpk-color-sky-gray-tint-06,
189
- $bpk-color-sky-gray-tint-06
190
- );
191
- background-repeat: repeat-y;
192
- background-position: 50% 0;
193
- background-size: 2 * $bpk-one-pixel-rem 8 * $bpk-one-pixel-rem;
194
- }
195
-
196
- &--vertical-with-notches {
197
- width: $notch-size * 2;
198
- margin: $notch-size auto;
199
- padding: $notch-size 0;
200
- background-image: linear-gradient(
201
- $bpk-color-sky-gray-tint-06,
202
- $bpk-color-sky-gray-tint-06
203
- );
204
- background-repeat: repeat-y;
205
- background-position: 50% 0;
206
- background-size: 2 * $bpk-one-pixel-rem 8 * $bpk-one-pixel-rem;
207
- }
208
-
209
- &--fallback {
210
- display: table-cell;
211
- width: 2 * $bpk-one-pixel-rem;
212
- background-image: linear-gradient(
213
- $bpk-color-sky-gray-tint-06,
214
- $bpk-color-sky-gray-tint-06
215
- );
216
- background-repeat: repeat-y;
217
- background-position: 50% 0;
218
- background-size: 2 * $bpk-one-pixel-rem 8 * $bpk-one-pixel-rem;
219
- }
220
- }
221
-
222
- &__notch {
223
- position: absolute;
224
- width: $notch-size * 2;
225
- height: $notch-size;
226
- overflow: hidden;
227
-
228
- &::after {
229
- position: relative;
230
- content: '';
231
- display: block;
232
- width: $notch-size * 4;
233
- height: $notch-size * 4;
234
- transform: translate3d(
235
- 0,
236
- 0,
237
- 0
238
- ); // BPK-1011 fix rendering bug in safari 11
239
-
240
- border: $notch-size solid $bpk-color-white;
241
- border-radius: $notch-size * 2;
242
- box-shadow: $bpk-box-shadow-sm inset;
243
- }
244
-
245
- &--top {
246
- top: -$notch-size;
247
-
248
- &::after {
249
- right: -50%;
250
- bottom: 200%;
251
- left: -50%;
252
- }
253
- }
254
-
255
- &--right {
256
- right: -$notch-size;
257
- width: $notch-size;
258
- height: $notch-size * 2;
259
-
260
- &::after {
261
- right: 100%;
262
- bottom: 50%;
263
-
264
- @include bpk-rtl {
265
- right: auto;
266
- left: 200%;
267
- }
268
- }
269
- }
270
-
271
- &--bottom {
272
- bottom: -$notch-size;
273
-
274
- &::after {
275
- right: -50%;
276
- bottom: 100%;
277
- left: -50%;
278
- }
279
- }
280
-
281
- &--left {
282
- left: -$notch-size;
283
- width: $notch-size;
284
- height: $notch-size * 2;
285
-
286
- &::after {
287
- right: 200%;
288
- bottom: 50%;
289
-
290
- @include bpk-rtl {
291
- right: auto;
292
- left: 100%;
293
- }
294
- }
295
- }
296
- }
297
145
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skyscanner/backpack-web",
3
- "version": "4.0.0",
3
+ "version": "5.0.0",
4
4
  "description": "Backpack Design System web library",
5
5
  "repository": {
6
6
  "type": "git",