@skyscanner/backpack-web 38.22.0 → 39.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 (44) hide show
  1. package/bpk-mixins/_badges-v2.scss +37 -36
  2. package/bpk-mixins/_badges.scss +37 -36
  3. package/bpk-mixins/_borders.scss +16 -16
  4. package/bpk-mixins/_breakpoints.scss +11 -11
  5. package/bpk-mixins/_buttons.scss +141 -137
  6. package/bpk-mixins/_cards.scss +13 -13
  7. package/bpk-mixins/_chips.scss +66 -66
  8. package/bpk-mixins/_forms.scss +214 -202
  9. package/bpk-mixins/_icons.scss +7 -4
  10. package/bpk-mixins/_index.scss +19 -19
  11. package/bpk-mixins/_layers.scss +34 -34
  12. package/bpk-mixins/_margins.scss +3 -3
  13. package/bpk-mixins/_panels.scss +9 -9
  14. package/bpk-mixins/_radii.scss +6 -6
  15. package/bpk-mixins/_scroll-indicators.scss +2 -2
  16. package/bpk-mixins/_shadows.scss +4 -4
  17. package/bpk-mixins/_spinners.scss +10 -10
  18. package/bpk-mixins/_tokens.scss +1 -3
  19. package/bpk-mixins/_typography.scss +204 -195
  20. package/bpk-mixins/_utils.scss +17 -12
  21. package/bpk-stylesheets/index.scss +13 -14
  22. package/bpk-stylesheets/normalize.css +18 -422
  23. package/bpk-stylesheets/normalize.scss +422 -0
  24. package/package.json +1 -5
  25. package/unstable__bpk-mixins/_badges-v2.scss +0 -240
  26. package/unstable__bpk-mixins/_badges.scss +0 -240
  27. package/unstable__bpk-mixins/_borders.scss +0 -268
  28. package/unstable__bpk-mixins/_breakpoints.scss +0 -221
  29. package/unstable__bpk-mixins/_buttons.scss +0 -587
  30. package/unstable__bpk-mixins/_cards.scss +0 -94
  31. package/unstable__bpk-mixins/_chips.scss +0 -249
  32. package/unstable__bpk-mixins/_forms.scss +0 -1045
  33. package/unstable__bpk-mixins/_icons.scss +0 -88
  34. package/unstable__bpk-mixins/_index.scss +0 -38
  35. package/unstable__bpk-mixins/_layers.scss +0 -199
  36. package/unstable__bpk-mixins/_margins.scss +0 -75
  37. package/unstable__bpk-mixins/_panels.scss +0 -96
  38. package/unstable__bpk-mixins/_radii.scss +0 -80
  39. package/unstable__bpk-mixins/_scroll-indicators.scss +0 -79
  40. package/unstable__bpk-mixins/_shadows.scss +0 -58
  41. package/unstable__bpk-mixins/_spinners.scss +0 -102
  42. package/unstable__bpk-mixins/_tokens.scss +0 -19
  43. package/unstable__bpk-mixins/_typography.scss +0 -1225
  44. package/unstable__bpk-mixins/_utils.scss +0 -267
@@ -0,0 +1,422 @@
1
+ /*! normalize.css v4.1.1 | MIT License | github.com/necolas/normalize.css */
2
+
3
+ /**
4
+ * 1. Change the default font family in all browsers (opinionated).
5
+ * 2. Correct the line height in all browsers.
6
+ * 3. Prevent adjustments of font size after orientation changes in IE and iOS.
7
+ */
8
+
9
+ html {
10
+ font-family: sans-serif; /* 1 */
11
+ line-height: 1.15; /* 2 */
12
+ -ms-text-size-adjust: 100%; /* 3 */
13
+ -webkit-text-size-adjust: 100%; /* 3 */
14
+ }
15
+
16
+ /**
17
+ * Remove the margin in all browsers (opinionated).
18
+ */
19
+
20
+ body {
21
+ margin: 0;
22
+ }
23
+
24
+ /* HTML5 display definitions
25
+ ========================================================================== */
26
+
27
+ /**
28
+ * Add the correct display in IE 9-.
29
+ * 1. Add the correct display in Edge, IE, and Firefox.
30
+ * 2. Add the correct display in IE.
31
+ */
32
+
33
+ article,
34
+ aside,
35
+ details, /* 1 */
36
+ figcaption,
37
+ figure,
38
+ footer,
39
+ header,
40
+ main, /* 2 */
41
+ menu,
42
+ nav,
43
+ section,
44
+ summary { /* 1 */
45
+ display: block;
46
+ }
47
+
48
+ /**
49
+ * Add the correct display in IE 9-.
50
+ */
51
+
52
+ audio,
53
+ canvas,
54
+ progress,
55
+ video {
56
+ display: inline-block;
57
+ }
58
+
59
+ /**
60
+ * Add the correct display in iOS 4-7.
61
+ */
62
+
63
+ audio:not([controls]) {
64
+ display: none;
65
+ height: 0;
66
+ }
67
+
68
+ /**
69
+ * Add the correct vertical alignment in Chrome, Firefox, and Opera.
70
+ */
71
+
72
+ progress {
73
+ vertical-align: baseline;
74
+ }
75
+
76
+ /**
77
+ * Add the correct display in IE 10-.
78
+ * 1. Add the correct display in IE.
79
+ */
80
+
81
+ template, /* 1 */
82
+ [hidden] {
83
+ display: none;
84
+ }
85
+
86
+ /* Links
87
+ ========================================================================== */
88
+
89
+ /**
90
+ * 1. Remove the gray background on active links in IE 10.
91
+ * 2. Remove gaps in links underline in iOS 8+ and Safari 8+.
92
+ */
93
+
94
+ a {
95
+ background-color: transparent; /* 1 */
96
+ -webkit-text-decoration-skip: objects; /* 2 */
97
+ }
98
+
99
+ /**
100
+ * Remove the outline on focused links when they are also active or hovered
101
+ * in all browsers (opinionated).
102
+ */
103
+
104
+ a:active,
105
+ a:hover {
106
+ outline-width: 0;
107
+ }
108
+
109
+ /* Text-level semantics
110
+ ========================================================================== */
111
+
112
+ /**
113
+ * 1. Remove the bottom border in Firefox 39-.
114
+ * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
115
+ */
116
+
117
+ abbr[title] {
118
+ border-bottom: none; /* 1 */
119
+ text-decoration: underline; /* 2 */
120
+ text-decoration: underline dotted; /* 2 */
121
+ }
122
+
123
+ /**
124
+ * Prevent the duplicate application of `bolder` by the next rule in Safari 6.
125
+ */
126
+
127
+ b,
128
+ strong {
129
+ font-weight: inherit;
130
+ }
131
+
132
+ /**
133
+ * Add the correct font weight in Chrome, Edge, and Safari.
134
+ */
135
+
136
+ b,
137
+ strong {
138
+ font-weight: bolder;
139
+ }
140
+
141
+ /**
142
+ * Add the correct font style in Android 4.3-.
143
+ */
144
+
145
+ dfn {
146
+ font-style: italic;
147
+ }
148
+
149
+ /**
150
+ * Correct the font size and margin on `h1` elements within `section` and
151
+ * `article` contexts in Chrome, Firefox, and Safari.
152
+ */
153
+
154
+ h1 {
155
+ font-size: 2em;
156
+ margin: 0.67em 0;
157
+ }
158
+
159
+ /**
160
+ * Add the correct background and color in IE 9-.
161
+ */
162
+
163
+ mark {
164
+ background-color: #ff0;
165
+ color: #000;
166
+ }
167
+
168
+ /**
169
+ * Add the correct font size in all browsers.
170
+ */
171
+
172
+ small {
173
+ font-size: 80%;
174
+ }
175
+
176
+ /**
177
+ * Prevent `sub` and `sup` elements from affecting the line height in
178
+ * all browsers.
179
+ */
180
+
181
+ sub,
182
+ sup {
183
+ font-size: 75%;
184
+ line-height: 0;
185
+ position: relative;
186
+ vertical-align: baseline;
187
+ }
188
+
189
+ sub {
190
+ bottom: -0.25em;
191
+ }
192
+
193
+ sup {
194
+ top: -0.5em;
195
+ }
196
+
197
+ /* Embedded content
198
+ ========================================================================== */
199
+
200
+ /**
201
+ * Remove the border on images inside links in IE 10-.
202
+ */
203
+
204
+ img {
205
+ border-style: none;
206
+ }
207
+
208
+ /**
209
+ * Hide the overflow in IE.
210
+ */
211
+
212
+ svg:not(:root) {
213
+ overflow: hidden;
214
+ }
215
+
216
+ /* Grouping content
217
+ ========================================================================== */
218
+
219
+ /**
220
+ * 1. Correct the inheritance and scaling of font size in all browsers.
221
+ * 2. Correct the odd `em` font sizing in all browsers.
222
+ */
223
+
224
+ code,
225
+ kbd,
226
+ pre,
227
+ samp {
228
+ font-family: monospace, monospace; /* 1 */
229
+ font-size: 1em; /* 2 */
230
+ }
231
+
232
+ /**
233
+ * Add the correct margin in IE 8.
234
+ */
235
+
236
+ figure {
237
+ margin: 1em 40px;
238
+ }
239
+
240
+ /**
241
+ * 1. Add the correct box sizing in Firefox.
242
+ * 2. Show the overflow in Edge and IE.
243
+ */
244
+
245
+ hr {
246
+ box-sizing: content-box; /* 1 */
247
+ height: 0; /* 1 */
248
+ overflow: visible; /* 2 */
249
+ }
250
+
251
+ /* Forms
252
+ ========================================================================== */
253
+
254
+ /**
255
+ * 1. Change font properties to `inherit` in all browsers (opinionated).
256
+ * 2. Remove the margin in Firefox and Safari.
257
+ */
258
+
259
+ button,
260
+ input,
261
+ optgroup,
262
+ select,
263
+ textarea {
264
+ font: inherit; /* 1 */
265
+ margin: 0; /* 2 */
266
+ }
267
+
268
+ /**
269
+ * Restore the font weight unset by the previous rule.
270
+ */
271
+
272
+ optgroup {
273
+ font-weight: bold;
274
+ }
275
+
276
+ /**
277
+ * Show the overflow in IE.
278
+ * 1. Show the overflow in Edge.
279
+ */
280
+
281
+ button,
282
+ input { /* 1 */
283
+ overflow: visible;
284
+ }
285
+
286
+ /**
287
+ * Remove the inheritance of text transform in Edge, Firefox, and IE.
288
+ * 1. Remove the inheritance of text transform in Firefox.
289
+ */
290
+
291
+ button,
292
+ select { /* 1 */
293
+ text-transform: none;
294
+ }
295
+
296
+ /**
297
+ * 1. Prevent a WebKit bug where (2) destroys native `audio` and `video`
298
+ * controls in Android 4.
299
+ * 2. Correct the inability to style clickable types in iOS and Safari.
300
+ */
301
+
302
+ button,
303
+ html [type="button"], /* 1 */
304
+ [type="reset"],
305
+ [type="submit"] {
306
+ -webkit-appearance: button; /* 2 */
307
+ }
308
+
309
+ /**
310
+ * Remove the inner border and padding in Firefox.
311
+ */
312
+
313
+ button::-moz-focus-inner,
314
+ [type="button"]::-moz-focus-inner,
315
+ [type="reset"]::-moz-focus-inner,
316
+ [type="submit"]::-moz-focus-inner {
317
+ border-style: none;
318
+ padding: 0;
319
+ }
320
+
321
+ /**
322
+ * Restore the focus styles unset by the previous rule.
323
+ */
324
+
325
+ button:-moz-focusring,
326
+ [type="button"]:-moz-focusring,
327
+ [type="reset"]:-moz-focusring,
328
+ [type="submit"]:-moz-focusring {
329
+ outline: 1px dotted ButtonText;
330
+ }
331
+
332
+ /**
333
+ * Change the border, margin, and padding in all browsers (opinionated).
334
+ */
335
+
336
+ fieldset {
337
+ border: 1px solid #c0c0c0;
338
+ margin: 0 2px;
339
+ padding: 0.35em 0.625em 0.75em;
340
+ }
341
+
342
+ /**
343
+ * 1. Correct the text wrapping in Edge and IE.
344
+ * 2. Correct the color inheritance from `fieldset` elements in IE.
345
+ * 3. Remove the padding so developers are not caught out when they zero out
346
+ * `fieldset` elements in all browsers.
347
+ */
348
+
349
+ legend {
350
+ box-sizing: border-box; /* 1 */
351
+ color: inherit; /* 2 */
352
+ display: table; /* 1 */
353
+ max-width: 100%; /* 1 */
354
+ padding: 0; /* 3 */
355
+ white-space: normal; /* 1 */
356
+ }
357
+
358
+ /**
359
+ * Remove the default vertical scrollbar in IE.
360
+ */
361
+
362
+ textarea {
363
+ overflow: auto;
364
+ }
365
+
366
+ /**
367
+ * 1. Add the correct box sizing in IE 10-.
368
+ * 2. Remove the padding in IE 10-.
369
+ */
370
+
371
+ [type="checkbox"],
372
+ [type="radio"] {
373
+ box-sizing: border-box; /* 1 */
374
+ padding: 0; /* 2 */
375
+ }
376
+
377
+ /**
378
+ * Correct the cursor style of increment and decrement buttons in Chrome.
379
+ */
380
+
381
+ [type="number"]::-webkit-inner-spin-button,
382
+ [type="number"]::-webkit-outer-spin-button {
383
+ height: auto;
384
+ }
385
+
386
+ /**
387
+ * 1. Correct the odd appearance in Chrome and Safari.
388
+ * 2. Correct the outline style in Safari.
389
+ */
390
+
391
+ [type="search"] {
392
+ -webkit-appearance: textfield; /* 1 */
393
+ outline-offset: -2px; /* 2 */
394
+ }
395
+
396
+ /**
397
+ * Remove the inner padding and cancel buttons in Chrome and Safari on OS X.
398
+ */
399
+
400
+ [type="search"]::-webkit-search-cancel-button,
401
+ [type="search"]::-webkit-search-decoration {
402
+ -webkit-appearance: none;
403
+ }
404
+
405
+ /**
406
+ * Correct the text style of placeholders in Chrome, Edge, and Safari.
407
+ */
408
+
409
+ ::-webkit-input-placeholder {
410
+ color: inherit;
411
+ opacity: 0.54;
412
+ }
413
+
414
+ /**
415
+ * 1. Correct the inability to style clickable types in iOS and Safari.
416
+ * 2. Change font properties to `inherit` in Safari.
417
+ */
418
+
419
+ ::-webkit-file-upload-button {
420
+ -webkit-appearance: button; /* 1 */
421
+ font: inherit; /* 2 */
422
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skyscanner/backpack-web",
3
- "version": "38.22.0",
3
+ "version": "39.0.0",
4
4
  "description": "Backpack Design System web library",
5
5
  "repository": {
6
6
  "type": "git",
@@ -48,7 +48,6 @@
48
48
  },
49
49
  "peerDependencies": {
50
50
  "date-fns": "3.3.1 - 4",
51
- "node-sass": ">= 7",
52
51
  "react": "17.0.2 - 18.3.1",
53
52
  "react-dom": "17.0.2 - 18.3.1",
54
53
  "react-transition-group": "^4.4.5",
@@ -56,9 +55,6 @@
56
55
  "sass-embedded": "^1"
57
56
  },
58
57
  "peerDependenciesMeta": {
59
- "node-sass": {
60
- "optional": true
61
- },
62
58
  "sass": {
63
59
  "optional": true
64
60
  },
@@ -1,240 +0,0 @@
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 at-rule-disallowed-list */
20
-
21
- @use 'tokens.scss';
22
- @use 'typography.scss';
23
- @use 'radii.scss';
24
- @use 'utils.scss';
25
-
26
- ////
27
- /// @group badges
28
- ////
29
-
30
- /// Standard badge.
31
- ///
32
- /// @example scss
33
- /// .selector {
34
- /// @include bpk-badge();
35
- /// }
36
-
37
- @mixin bpk-badge {
38
- display: inline-flex;
39
- padding: tokens.bpk-spacing-sm() tokens.bpk-spacing-md();
40
- align-items: center;
41
-
42
- @include radii.bpk-border-radius-xs;
43
- @include typography.bpk-text;
44
- @include typography.bpk-footnote;
45
- }
46
-
47
- /// Centered badge. Modifies the bpk-badge mixin.
48
- ///
49
- /// @require {mixin} bpk-badge
50
- ///
51
- /// @example scss
52
- /// .selector {
53
- /// @include bpk-badge();
54
- /// @include bpk-badge--centered();
55
- /// }
56
-
57
- @mixin bpk-badge--centered {
58
- vertical-align: text-bottom;
59
- }
60
-
61
- /// Right-docked badge. Modifies the bpk-badge mixin.
62
- ///
63
- /// @require {mixin} bpk-badge
64
- ///
65
- /// @example scss
66
- /// .selector {
67
- /// @include bpk-badge();
68
- /// @include bpk-badge--docked-right();
69
- /// }
70
-
71
- @mixin bpk-badge--docked-right {
72
- position: absolute;
73
- top: 0;
74
- right: 0;
75
- border-top-left-radius: 0;
76
- border-top-right-radius: 0;
77
- border-bottom-right-radius: 0;
78
-
79
- @include utils.bpk-rtl {
80
- right: inherit;
81
- left: 0;
82
- border-bottom-left-radius: 0;
83
- border-bottom-right-radius: tokens.$bpk-border-radius-xs;
84
- }
85
- }
86
-
87
- /// Left-docked badge. Modifies the bpk-badge mixin.
88
- ///
89
- /// @require {mixin} bpk-badge
90
- ///
91
- /// @example scss
92
- /// .selector {
93
- /// @include bpk-badge();
94
- /// @include bpk-badge--docked-left();
95
- /// }
96
-
97
- @mixin bpk-badge--docked-left {
98
- position: absolute;
99
- top: 0;
100
- left: 0;
101
- border-top-left-radius: 0;
102
- border-top-right-radius: 0;
103
- border-bottom-left-radius: 0;
104
-
105
- @include utils.bpk-rtl {
106
- right: 0;
107
- left: inherit;
108
- border-bottom-left-radius: tokens.$bpk-border-radius-xs;
109
- border-bottom-right-radius: 0;
110
- }
111
- }
112
-
113
- /// Normal badge. Modifies the bpk-badge mixin.
114
- ///
115
- /// @require {mixin} bpk-badge
116
- ///
117
- /// @example scss
118
- /// .selector {
119
- /// @include bpk-badge();
120
- /// @include bpk-badge--normal();
121
- /// }
122
-
123
- @mixin bpk-badge--normal {
124
- background-color: tokens.$bpk-private-badge-background-normal-day;
125
- color: tokens.$bpk-text-primary-day;
126
- fill: tokens.$bpk-text-primary-day;
127
- }
128
-
129
- /// Warning badge. Modifies the bpk-badge mixin.
130
- ///
131
- /// @require {mixin} bpk-badge
132
- ///
133
- /// @example scss
134
- /// .selector {
135
- /// @include bpk-badge();
136
- /// @include bpk-badge--warning();
137
- /// }
138
-
139
- @mixin bpk-badge--warning {
140
- background-color: tokens.$bpk-private-badge-background-normal-day;
141
- color: tokens.$bpk-text-on-light-day;
142
- fill: tokens.$bpk-status-warning-spot-day;
143
- }
144
-
145
- /// Success badge. Modifies the bpk-badge mixin.
146
- ///
147
- /// @require {mixin} bpk-badge
148
- ///
149
- /// @example scss
150
- /// .selector {
151
- /// @include bpk-badge();
152
- /// @include bpk-badge--success();
153
- /// }
154
-
155
- @mixin bpk-badge--success {
156
- background-color: tokens.$bpk-private-badge-background-normal-day;
157
- color: tokens.$bpk-text-on-light-day;
158
- fill: tokens.$bpk-status-success-spot-day;
159
- }
160
-
161
- /// Critical badge. Modifies the bpk-badge mixin.
162
- ///
163
- /// @require {mixin} bpk-badge
164
- ///
165
- /// @example scss
166
- /// .selector {
167
- /// @include bpk-badge();
168
- /// @include bpk-badge--critical();
169
- /// }
170
-
171
- @mixin bpk-badge--critical {
172
- background-color: tokens.$bpk-private-badge-background-normal-day;
173
- color: tokens.$bpk-text-on-light-day;
174
- fill: tokens.$bpk-status-danger-spot-day;
175
- }
176
-
177
- /// Inverse badge. Modifies the bpk-badge mixin.
178
- ///
179
- /// @require {mixin} bpk-badge
180
- ///
181
- /// @example scss
182
- /// .selector {
183
- /// @include bpk-badge();
184
- /// @include bpk-badge--inverse();
185
- /// }
186
-
187
- @mixin bpk-badge--inverse {
188
- background-color: tokens.$bpk-surface-default-day;
189
- color: tokens.$bpk-text-primary-day;
190
- fill: tokens.$bpk-text-primary-day;
191
- }
192
-
193
- /// Outline badge. Modifies the bpk-badge mixin.
194
- ///
195
- /// @require {mixin} bpk-badge
196
- ///
197
- /// @example scss
198
- /// .selector {
199
- /// @include bpk-badge();
200
- /// @include bpk-badge--outline();
201
- /// }
202
-
203
- @mixin bpk-badge--outline {
204
- background-color: transparent;
205
- color: tokens.$bpk-text-on-dark-day;
206
- box-shadow: inset 0 0 0 tokens.$bpk-border-size-sm tokens.$bpk-text-on-dark-day;
207
- fill: tokens.$bpk-text-on-dark-day;
208
- }
209
-
210
- /// Strong badge. Modifies the bpk-badge mixin.
211
- ///
212
- /// @require {mixin} bpk-badge
213
- ///
214
- /// @example scss
215
- /// .selector {
216
- /// @include bpk-badge();
217
- /// @include bpk-badge--strong();
218
- /// }
219
-
220
- @mixin bpk-badge--strong {
221
- background-color: tokens.$bpk-core-primary-day;
222
- color: tokens.$bpk-text-on-dark-day;
223
- fill: tokens.$bpk-text-on-dark-day;
224
- }
225
-
226
- /// Brand badge. Modifies the bpk-badge mixin.
227
- ///
228
- /// @require {mixin} bpk-badge
229
- ///
230
- /// @example scss
231
- /// .selector {
232
- /// @include bpk-badge();
233
- /// @include bpk-badge--brand();
234
- /// }
235
-
236
- @mixin bpk-badge--brand {
237
- background-color: tokens.$bpk-core-accent-day;
238
- color: tokens.$bpk-text-primary-inverse-day;
239
- fill: tokens.$bpk-text-primary-inverse-day;
240
- }