@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
@@ -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 'radii.scss';
23
- @use 'typography.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
- }
@@ -1,268 +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
-
23
- ////
24
- /// @group borders
25
- ////
26
-
27
- /// Full border utility.
28
- ///
29
- /// @access private
30
-
31
- @mixin _bpk-border($size, $color, $inset) {
32
- box-shadow: 0 0 0 $size $color #{$inset};
33
- }
34
-
35
- /// Top border utility.
36
- ///
37
- /// @access private
38
-
39
- @mixin _bpk-border-top($size, $color, $inset) {
40
- $offset-y: if($inset == inset, $size, -#{$size});
41
-
42
- box-shadow: 0 $offset-y 0 0 $color #{$inset};
43
- }
44
-
45
- /// Right border utility.
46
- ///
47
- /// @access private
48
-
49
- @mixin bpk-border-right($size, $color, $inset) {
50
- $offset-x: if($inset == inset, -#{$size}, $size);
51
-
52
- box-shadow: $offset-x 0 0 0 $color #{$inset};
53
- }
54
-
55
- /// Bottom border utility.
56
- ///
57
- /// @access private
58
-
59
- @mixin _bpk-border-bottom($size, $color, $inset) {
60
- $offset-y: if($inset == inset, -#{$size}, $size);
61
-
62
- box-shadow: 0 $offset-y 0 0 $color #{$inset};
63
- }
64
-
65
- /// Left border utility.
66
- ///
67
- /// @access private
68
-
69
- @mixin bpk-border-left($size, $color, $inset) {
70
- $offset-x: if($inset == inset, $size, -#{$size});
71
-
72
- box-shadow: $offset-x 0 0 0 $color #{$inset};
73
- }
74
-
75
- /// Small "1px" border.
76
- ///
77
- /// Applied using box-shadow which preserves vertical rhythm on elements without a fixed height.
78
- ///
79
- /// @example scss
80
- /// .selector {
81
- /// @include bpk-border-sm($bpk-color-sky-gray-tint-06);
82
- /// }
83
-
84
- @mixin bpk-border-sm($color, $inset: inset) {
85
- @include _bpk-border(tokens.$bpk-border-size-sm, $color, $inset);
86
- }
87
-
88
- /// Small "1px" top border.
89
- ///
90
- /// Applied using box-shadow which preserves vertical rhythm on elements without a fixed height.
91
- ///
92
- /// @example scss
93
- /// .selector {
94
- /// @include bpk-border-top-sm($bpk-color-sky-gray-tint-06);
95
- /// }
96
-
97
- @mixin bpk-border-top-sm($color, $inset: inset) {
98
- @include _bpk-border-top(tokens.$bpk-border-size-sm, $color, $inset);
99
- }
100
-
101
- /// Small "1px" right border.
102
- ///
103
- /// Applied using box-shadow which preserves vertical rhythm on elements without a fixed height.
104
- ///
105
- /// @example scss
106
- /// .selector {
107
- /// @include bpk-border-right-sm($bpk-color-sky-gray-tint-06);
108
- /// }
109
-
110
- @mixin bpk-border-right-sm($color, $inset: inset) {
111
- @include bpk-border-right(tokens.$bpk-border-size-sm, $color, $inset);
112
- }
113
-
114
- /// Small "1px" bottom border.
115
- ///
116
- /// Applied using box-shadow which preserves vertical rhythm on elements without a fixed height.
117
- ///
118
- /// @example scss
119
- /// .selector {
120
- /// @include bpk-border-bottom-sm($bpk-color-sky-gray-tint-06);
121
- /// }
122
-
123
- @mixin bpk-border-bottom-sm($color, $inset: inset) {
124
- @include _bpk-border-bottom(tokens.$bpk-border-size-sm, $color, $inset);
125
- }
126
-
127
- /// Small "1px" left border.
128
- ///
129
- /// Applied using box-shadow which preserves vertical rhythm on elements without a fixed height.
130
- ///
131
- /// @example scss
132
- /// .selector {
133
- /// @include bpk-border-left-sm($bpk-color-sky-gray-tint-06);
134
- /// }
135
-
136
- @mixin bpk-border-left-sm($color, $inset: inset) {
137
- @include bpk-border-left(tokens.$bpk-border-size-sm, $color, $inset);
138
- }
139
-
140
- /// Large "2px" border.
141
- ///
142
- /// Applied using box-shadow which preserves vertical rhythm on elements without a fixed height.
143
- ///
144
- /// @example scss
145
- /// .selector {
146
- /// @include bpk-border-lg($bpk-color-sky-gray-tint-06);
147
- /// }
148
-
149
- @mixin bpk-border-lg($color, $inset: inset) {
150
- @include _bpk-border(tokens.$bpk-border-size-lg, $color, $inset);
151
- }
152
-
153
- /// Large "2px" top border.
154
- ///
155
- /// Applied using box-shadow which preserves vertical rhythm on elements without a fixed height.
156
- ///
157
- /// @example scss
158
- /// .selector {
159
- /// @include bpk-border-top-lg($bpk-color-sky-gray-tint-06);
160
- /// }
161
-
162
- @mixin bpk-border-top-lg($color, $inset: inset) {
163
- @include _bpk-border-top(tokens.$bpk-border-size-lg, $color, $inset);
164
- }
165
-
166
- /// Large "2px" right border.
167
- ///
168
- /// Applied using box-shadow which preserves vertical rhythm on elements without a fixed height.
169
- ///
170
- /// @example scss
171
- /// .selector {
172
- /// @include bpk-border-right-lg($bpk-color-sky-gray-tint-06);
173
- /// }
174
-
175
- @mixin bpk-border-right-lg($color, $inset: inset) {
176
- @include bpk-border-right(tokens.$bpk-border-size-lg, $color, $inset);
177
- }
178
-
179
- /// Large "2px" bottom border.
180
- ///
181
- /// Applied using box-shadow which preserves vertical rhythm on elements without a fixed height.
182
- ///
183
- /// @example scss
184
- /// .selector {
185
- /// @include bpk-border-bottom-lg($bpk-color-sky-gray-tint-06);
186
- /// }
187
-
188
- @mixin bpk-border-bottom-lg($color, $inset: inset) {
189
- @include _bpk-border-bottom(tokens.$bpk-border-size-lg, $color, $inset);
190
- }
191
-
192
- /// Large "2px" left border.
193
- ///
194
- /// Applied using box-shadow which preserves vertical rhythm on elements without a fixed height.
195
- ///
196
- /// @example scss
197
- /// .selector {
198
- /// @include bpk-border-left-lg($bpk-color-sky-gray-tint-06);
199
- /// }
200
-
201
- @mixin bpk-border-left-lg($color, $inset: inset) {
202
- @include bpk-border-left(tokens.$bpk-border-size-lg, $color, $inset);
203
- }
204
-
205
- /// Extra large "3px" border.
206
- ///
207
- /// Applied using box-shadow which preserves vertical rhythm on elements without a fixed height.
208
- ///
209
- /// @example scss
210
- /// .selector {
211
- /// @include bpk-border-xl($bpk-color-sky-gray-tint-06);
212
- /// }
213
-
214
- @mixin bpk-border-xl($color, $inset: inset) {
215
- @include _bpk-border(tokens.$bpk-border-size-xl, $color, $inset);
216
- }
217
-
218
- /// Extra large "3px" top border.
219
- ///
220
- /// Applied using box-shadow which preserves vertical rhythm on elements without a fixed height.
221
- ///
222
- /// @example scss
223
- /// .selector {
224
- /// @include bpk-border-top-xl($bpk-color-sky-gray-tint-06);
225
- /// }
226
-
227
- @mixin bpk-border-top-xl($color, $inset: inset) {
228
- @include _bpk-border-top(tokens.$bpk-border-size-xl, $color, $inset);
229
- }
230
-
231
- /// Extra large "3px" right border.
232
- ///
233
- /// Applied using box-shadow which preserves vertical rhythm on elements without a fixed height.
234
- ///
235
- /// @example scss
236
- /// .selector {
237
- /// @include bpk-border-right-xl($bpk-color-sky-gray-tint-06);
238
- /// }
239
-
240
- @mixin bpk-border-right-xl($color, $inset: inset) {
241
- @include bpk-border-right(tokens.$bpk-border-size-xl, $color, $inset);
242
- }
243
-
244
- /// Extra large "3px" bottom border.
245
- ///
246
- /// Applied using box-shadow which preserves vertical rhythm on elements without a fixed height.
247
- ///
248
- /// @example scss
249
- /// .selector {
250
- /// @include bpk-border-bottom-xl($bpk-color-sky-gray-tint-06);
251
- /// }
252
-
253
- @mixin bpk-border-bottom-xl($color, $inset: inset) {
254
- @include _bpk-border-bottom(tokens.$bpk-border-size-xl, $color, $inset);
255
- }
256
-
257
- /// Extra large "3px" left border.
258
- ///
259
- /// Applied using box-shadow which preserves vertical rhythm on elements without a fixed height.
260
- ///
261
- /// @example scss
262
- /// .selector {
263
- /// @include bpk-border-left-xl($bpk-color-sky-gray-tint-06);
264
- /// }
265
-
266
- @mixin bpk-border-left-xl($color, $inset: inset) {
267
- @include bpk-border-left(tokens.$bpk-border-size-xl, $color, $inset);
268
- }