@skyscanner/backpack-web 30.2.0 → 31.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.
- package/bpk-component-badge/index.d.ts +2 -2
- package/bpk-component-badge/index.js +3 -1
- package/bpk-component-badge/src/BpkBadgeV2/BpkBadge.d.ts +22 -0
- package/bpk-component-badge/src/BpkBadgeV2/BpkBadge.js +47 -0
- package/bpk-component-badge/src/BpkBadgeV2/BpkBadge.module.css +18 -0
- package/bpk-mixins/src/mixins/_badges-v2.scss +238 -0
- package/bpk-mixins/src/mixins/_svgs.scss +0 -93
- package/package.json +3 -3
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
|
|
19
19
|
import component, { BADGE_TYPES, type Props } from './src/BpkBadge';
|
|
20
20
|
import themeAttributes from './src/themeAttributes';
|
|
21
|
-
|
|
21
|
+
import BpkBadgeV2 from './src/BpkBadgeV2/BpkBadge';
|
|
22
22
|
export type BpkBadgeProps = Props;
|
|
23
23
|
export default component;
|
|
24
|
-
export { BADGE_TYPES, themeAttributes };
|
|
24
|
+
export { BADGE_TYPES, themeAttributes, BpkBadgeV2 };
|
|
@@ -18,5 +18,7 @@
|
|
|
18
18
|
|
|
19
19
|
import component, { BADGE_TYPES } from "./src/BpkBadge";
|
|
20
20
|
import themeAttributes from "./src/themeAttributes";
|
|
21
|
+
import BpkBadgeV2 from "./src/BpkBadgeV2/BpkBadge";
|
|
22
|
+
;
|
|
21
23
|
export default component;
|
|
22
|
-
export { BADGE_TYPES, themeAttributes };
|
|
24
|
+
export { BADGE_TYPES, themeAttributes, BpkBadgeV2 };
|
|
@@ -0,0 +1,22 @@
|
|
|
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
|
+
/// <reference types="react" />
|
|
20
|
+
import type { Props } from '../BpkBadge';
|
|
21
|
+
declare const BpkBadgeV2: ({ centered, className, docked, type, ...rest }: Props) => JSX.Element;
|
|
22
|
+
export default BpkBadgeV2;
|
|
@@ -0,0 +1,47 @@
|
|
|
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 { cssModules } from "../../../bpk-react-utils";
|
|
20
|
+
import { BADGE_TYPES } from "../BpkBadge";
|
|
21
|
+
import STYLES from "./BpkBadge.module.css";
|
|
22
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
23
|
+
const getClassName = cssModules(STYLES);
|
|
24
|
+
const badgeTypeClassNames = {
|
|
25
|
+
[BADGE_TYPES.warning]: getClassName('bpk-badge--warning'),
|
|
26
|
+
[BADGE_TYPES.success]: getClassName('bpk-badge--success'),
|
|
27
|
+
[BADGE_TYPES.critical]: getClassName('bpk-badge--critical'),
|
|
28
|
+
[BADGE_TYPES.normal]: getClassName('bpk-badge--normal'),
|
|
29
|
+
[BADGE_TYPES.inverse]: getClassName('bpk-badge--inverse'),
|
|
30
|
+
[BADGE_TYPES.outline]: getClassName('bpk-badge--outline'),
|
|
31
|
+
[BADGE_TYPES.strong]: getClassName('bpk-badge--strong'),
|
|
32
|
+
[BADGE_TYPES.brand]: getClassName('bpk-badge--brand')
|
|
33
|
+
};
|
|
34
|
+
const BpkBadgeV2 = ({
|
|
35
|
+
centered = false,
|
|
36
|
+
className = null,
|
|
37
|
+
docked = null,
|
|
38
|
+
type = BADGE_TYPES.normal,
|
|
39
|
+
...rest
|
|
40
|
+
}) => {
|
|
41
|
+
const classNames = getClassName('bpk-badge', badgeTypeClassNames[type], docked === 'right' && 'bpk-badge--docked-right', docked === 'left' && 'bpk-badge--docked-left', centered && 'bpk-badge--centered', className);
|
|
42
|
+
return /*#__PURE__*/_jsx("span", {
|
|
43
|
+
className: classNames,
|
|
44
|
+
...rest
|
|
45
|
+
});
|
|
46
|
+
};
|
|
47
|
+
export default BpkBadgeV2;
|
|
@@ -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
|
+
.bpk-badge{display:inline-flex;padding:0.25rem 0.5rem;align-items:center;border-radius:.25rem;margin:0;font-size:.875rem;line-height:1.25rem;font-weight:400}.bpk-badge--centered{vertical-align:text-bottom}.bpk-badge--docked-right{position:absolute;top:0;right:0;border-top-left-radius:0;border-top-right-radius:0;border-bottom-right-radius:0}html[dir='rtl'] .bpk-badge--docked-right{right:inherit;left:0;border-bottom-left-radius:0;border-bottom-right-radius:.25rem}.bpk-badge--docked-left{position:absolute;top:0;left:0;border-top-left-radius:0;border-top-right-radius:0;border-bottom-left-radius:0}html[dir='rtl'] .bpk-badge--docked-left{right:0;left:inherit;border-bottom-left-radius:.25rem;border-bottom-right-radius:0}.bpk-badge--warning{background-color:#eff1f2;color:#161616;fill:#f55d42}.bpk-badge--success{background-color:#eff1f2;color:#161616;fill:#0c838a}.bpk-badge--critical{background-color:#eff1f2;color:#161616;fill:#e70866}.bpk-badge--normal{background-color:#eff1f2;color:#161616;fill:#161616}.bpk-badge--inverse{background-color:#fff;color:#161616;fill:#161616}.bpk-badge--outline{background-color:transparent;color:#fff;box-shadow:inset 0 0 0 1px #fff;fill:#fff}.bpk-badge--strong{background-color:#05203c;color:#fff;fill:#fff}.bpk-badge--brand{background-color:#0062e3;color:#fff;fill:#fff}
|
|
@@ -0,0 +1,238 @@
|
|
|
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 '../bonds.scss';
|
|
20
|
+
@import 'typography.scss';
|
|
21
|
+
@import 'radii.scss';
|
|
22
|
+
@import 'utils.scss';
|
|
23
|
+
|
|
24
|
+
////
|
|
25
|
+
/// @group badges
|
|
26
|
+
////
|
|
27
|
+
|
|
28
|
+
/// Standard badge.
|
|
29
|
+
///
|
|
30
|
+
/// @example scss
|
|
31
|
+
/// .selector {
|
|
32
|
+
/// @include bpk-badge();
|
|
33
|
+
/// }
|
|
34
|
+
|
|
35
|
+
@mixin bpk-badge {
|
|
36
|
+
display: inline-flex;
|
|
37
|
+
padding: bpk-spacing-sm() bpk-spacing-md();
|
|
38
|
+
align-items: center;
|
|
39
|
+
|
|
40
|
+
@include bpk-border-radius-xs;
|
|
41
|
+
@include bpk-text;
|
|
42
|
+
@include bpk-footnote;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/// Centered badge. Modifies the bpk-badge mixin.
|
|
46
|
+
///
|
|
47
|
+
/// @require {mixin} bpk-badge
|
|
48
|
+
///
|
|
49
|
+
/// @example scss
|
|
50
|
+
/// .selector {
|
|
51
|
+
/// @include bpk-badge();
|
|
52
|
+
/// @include bpk-badge--centered();
|
|
53
|
+
/// }
|
|
54
|
+
|
|
55
|
+
@mixin bpk-badge--centered {
|
|
56
|
+
vertical-align: text-bottom;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/// Right-docked badge. Modifies the bpk-badge mixin.
|
|
60
|
+
///
|
|
61
|
+
/// @require {mixin} bpk-badge
|
|
62
|
+
///
|
|
63
|
+
/// @example scss
|
|
64
|
+
/// .selector {
|
|
65
|
+
/// @include bpk-badge();
|
|
66
|
+
/// @include bpk-badge--docked-right();
|
|
67
|
+
/// }
|
|
68
|
+
|
|
69
|
+
@mixin bpk-badge--docked-right {
|
|
70
|
+
position: absolute;
|
|
71
|
+
top: 0;
|
|
72
|
+
right: 0;
|
|
73
|
+
border-top-left-radius: 0;
|
|
74
|
+
border-top-right-radius: 0;
|
|
75
|
+
border-bottom-right-radius: 0;
|
|
76
|
+
|
|
77
|
+
@include bpk-rtl {
|
|
78
|
+
right: inherit;
|
|
79
|
+
left: 0;
|
|
80
|
+
border-bottom-left-radius: 0;
|
|
81
|
+
border-bottom-right-radius: $bpk-border-radius-xs;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/// Left-docked badge. Modifies the bpk-badge mixin.
|
|
86
|
+
///
|
|
87
|
+
/// @require {mixin} bpk-badge
|
|
88
|
+
///
|
|
89
|
+
/// @example scss
|
|
90
|
+
/// .selector {
|
|
91
|
+
/// @include bpk-badge();
|
|
92
|
+
/// @include bpk-badge--docked-left();
|
|
93
|
+
/// }
|
|
94
|
+
|
|
95
|
+
@mixin bpk-badge--docked-left {
|
|
96
|
+
position: absolute;
|
|
97
|
+
top: 0;
|
|
98
|
+
left: 0;
|
|
99
|
+
border-top-left-radius: 0;
|
|
100
|
+
border-top-right-radius: 0;
|
|
101
|
+
border-bottom-left-radius: 0;
|
|
102
|
+
|
|
103
|
+
@include bpk-rtl {
|
|
104
|
+
right: 0;
|
|
105
|
+
left: inherit;
|
|
106
|
+
border-bottom-left-radius: $bpk-border-radius-xs;
|
|
107
|
+
border-bottom-right-radius: 0;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/// Normal badge. Modifies the bpk-badge mixin.
|
|
112
|
+
///
|
|
113
|
+
/// @require {mixin} bpk-badge
|
|
114
|
+
///
|
|
115
|
+
/// @example scss
|
|
116
|
+
/// .selector {
|
|
117
|
+
/// @include bpk-badge();
|
|
118
|
+
/// @include bpk-badge--normal();
|
|
119
|
+
/// }
|
|
120
|
+
|
|
121
|
+
@mixin bpk-badge--normal {
|
|
122
|
+
background-color: $bpk-private-badge-background-normal-day;
|
|
123
|
+
color: $bpk-text-primary-day;
|
|
124
|
+
fill: $bpk-text-primary-day;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/// Warning badge. Modifies the bpk-badge mixin.
|
|
128
|
+
///
|
|
129
|
+
/// @require {mixin} bpk-badge
|
|
130
|
+
///
|
|
131
|
+
/// @example scss
|
|
132
|
+
/// .selector {
|
|
133
|
+
/// @include bpk-badge();
|
|
134
|
+
/// @include bpk-badge--warning();
|
|
135
|
+
/// }
|
|
136
|
+
|
|
137
|
+
@mixin bpk-badge--warning {
|
|
138
|
+
background-color: $bpk-private-badge-background-normal-day;
|
|
139
|
+
color: $bpk-text-on-light-day;
|
|
140
|
+
fill: $bpk-status-warning-spot-day;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/// Success badge. Modifies the bpk-badge mixin.
|
|
144
|
+
///
|
|
145
|
+
/// @require {mixin} bpk-badge
|
|
146
|
+
///
|
|
147
|
+
/// @example scss
|
|
148
|
+
/// .selector {
|
|
149
|
+
/// @include bpk-badge();
|
|
150
|
+
/// @include bpk-badge--success();
|
|
151
|
+
/// }
|
|
152
|
+
|
|
153
|
+
@mixin bpk-badge--success {
|
|
154
|
+
background-color: $bpk-private-badge-background-normal-day;
|
|
155
|
+
color: $bpk-text-on-light-day;
|
|
156
|
+
fill: $bpk-status-success-spot-day;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
/// Critical badge. Modifies the bpk-badge mixin.
|
|
160
|
+
///
|
|
161
|
+
/// @require {mixin} bpk-badge
|
|
162
|
+
///
|
|
163
|
+
/// @example scss
|
|
164
|
+
/// .selector {
|
|
165
|
+
/// @include bpk-badge();
|
|
166
|
+
/// @include bpk-badge--critical();
|
|
167
|
+
/// }
|
|
168
|
+
|
|
169
|
+
@mixin bpk-badge--critical {
|
|
170
|
+
background-color: $bpk-private-badge-background-normal-day;
|
|
171
|
+
color: $bpk-text-on-light-day;
|
|
172
|
+
fill: $bpk-status-danger-spot-day;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
/// Inverse badge. Modifies the bpk-badge mixin.
|
|
176
|
+
///
|
|
177
|
+
/// @require {mixin} bpk-badge
|
|
178
|
+
///
|
|
179
|
+
/// @example scss
|
|
180
|
+
/// .selector {
|
|
181
|
+
/// @include bpk-badge();
|
|
182
|
+
/// @include bpk-badge--inverse();
|
|
183
|
+
/// }
|
|
184
|
+
|
|
185
|
+
@mixin bpk-badge--inverse {
|
|
186
|
+
background-color: $bpk-surface-default-day;
|
|
187
|
+
color: $bpk-text-primary-day;
|
|
188
|
+
fill: $bpk-text-primary-day;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
/// Outline badge. Modifies the bpk-badge mixin.
|
|
192
|
+
///
|
|
193
|
+
/// @require {mixin} bpk-badge
|
|
194
|
+
///
|
|
195
|
+
/// @example scss
|
|
196
|
+
/// .selector {
|
|
197
|
+
/// @include bpk-badge();
|
|
198
|
+
/// @include bpk-badge--outline();
|
|
199
|
+
/// }
|
|
200
|
+
|
|
201
|
+
@mixin bpk-badge--outline {
|
|
202
|
+
background-color: transparent;
|
|
203
|
+
color: $bpk-text-on-dark-day;
|
|
204
|
+
box-shadow: inset 0 0 0 $bpk-border-size-sm $bpk-text-on-dark-day;
|
|
205
|
+
fill: $bpk-text-on-dark-day;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
/// Strong badge. Modifies the bpk-badge mixin.
|
|
209
|
+
///
|
|
210
|
+
/// @require {mixin} bpk-badge
|
|
211
|
+
///
|
|
212
|
+
/// @example scss
|
|
213
|
+
/// .selector {
|
|
214
|
+
/// @include bpk-badge();
|
|
215
|
+
/// @include bpk-badge--strong();
|
|
216
|
+
/// }
|
|
217
|
+
|
|
218
|
+
@mixin bpk-badge--strong {
|
|
219
|
+
background-color: $bpk-core-primary-day;
|
|
220
|
+
color: $bpk-text-on-dark-day;
|
|
221
|
+
fill: $bpk-text-on-dark-day;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
/// Brand badge. Modifies the bpk-badge mixin.
|
|
225
|
+
///
|
|
226
|
+
/// @require {mixin} bpk-badge
|
|
227
|
+
///
|
|
228
|
+
/// @example scss
|
|
229
|
+
/// .selector {
|
|
230
|
+
/// @include bpk-badge();
|
|
231
|
+
/// @include bpk-badge--brand();
|
|
232
|
+
/// }
|
|
233
|
+
|
|
234
|
+
@mixin bpk-badge--brand {
|
|
235
|
+
background-color: $bpk-core-accent-day;
|
|
236
|
+
color: $bpk-text-primary-inverse-day;
|
|
237
|
+
fill: $bpk-text-primary-inverse-day;
|
|
238
|
+
}
|
|
@@ -16,7 +16,6 @@
|
|
|
16
16
|
* limitations under the License.
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
|
-
@import '~@skyscanner/bpk-svgs/index.scss';
|
|
20
19
|
@import '../bonds.scss';
|
|
21
20
|
@import './utils.scss';
|
|
22
21
|
|
|
@@ -30,34 +29,6 @@
|
|
|
30
29
|
/// @group svgs
|
|
31
30
|
////
|
|
32
31
|
|
|
33
|
-
/// Icon factory.
|
|
34
|
-
///
|
|
35
|
-
/// @param {variable} $spacing
|
|
36
|
-
/// @param {key} $icon
|
|
37
|
-
///
|
|
38
|
-
/// @access private
|
|
39
|
-
|
|
40
|
-
@mixin _bpk-icon-factory($map, $size, $icon) {
|
|
41
|
-
@if map_has_key($map, $icon) != true {
|
|
42
|
-
$err: (
|
|
43
|
-
'Could not find "' +
|
|
44
|
-
$icon +
|
|
45
|
-
'" icon. Refer to ' +
|
|
46
|
-
'https://skyscanner.design/latest/components/icon/overview.html' +
|
|
47
|
-
' for the list of supported icons.'
|
|
48
|
-
);
|
|
49
|
-
|
|
50
|
-
@error $err;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
content: '';
|
|
54
|
-
display: inline-block;
|
|
55
|
-
width: $size;
|
|
56
|
-
height: $size;
|
|
57
|
-
background: url(map-get($map, $icon)) no-repeat;
|
|
58
|
-
background-size: cover;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
32
|
/// Button alignment utility.
|
|
62
33
|
///
|
|
63
34
|
/// @access private
|
|
@@ -75,70 +46,6 @@
|
|
|
75
46
|
vertical-align: top;
|
|
76
47
|
}
|
|
77
48
|
|
|
78
|
-
/// Icon.
|
|
79
|
-
///
|
|
80
|
-
/// > **Note:** You will need to pass the sassFunction `encodebase64` to your node-sass process to use this mixin:
|
|
81
|
-
/// >
|
|
82
|
-
/// > ```js
|
|
83
|
-
/// > var sass = require('node-sass');
|
|
84
|
-
/// > var sassFunctions = require('bpk-mixins/sass-functions');
|
|
85
|
-
/// > ...
|
|
86
|
-
/// > sass.render({
|
|
87
|
-
/// > file: 'mysassfile.scss',
|
|
88
|
-
/// > functions: sassFunctions,
|
|
89
|
-
/// > });
|
|
90
|
-
/// > ```
|
|
91
|
-
///
|
|
92
|
-
/// @param {key} $icon
|
|
93
|
-
/// @param {variable} $color
|
|
94
|
-
/// @param {key} $size
|
|
95
|
-
///
|
|
96
|
-
/// @example scss
|
|
97
|
-
/// .selector {
|
|
98
|
-
/// @include bpk-icon(flight, $bpk-color-sky-gray-tint-02, large);
|
|
99
|
-
/// }
|
|
100
|
-
|
|
101
|
-
@mixin bpk-icon($icon, $color, $size: small) {
|
|
102
|
-
@if function-exists(encodebase64) != true {
|
|
103
|
-
$err: (
|
|
104
|
-
'Could not find encodebase64 function. Refer to ' +
|
|
105
|
-
'https://backpack.github.io/sassdoc/#svgs-mixin-bpk-icon' +
|
|
106
|
-
' on how to provide it to node-sass.'
|
|
107
|
-
);
|
|
108
|
-
|
|
109
|
-
@error $err;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
$icon-map: if($size == large, $bpk-icons-no-color-lg, $bpk-icons-no-color-sm);
|
|
113
|
-
|
|
114
|
-
@if map_has_key($icon-map, $icon) != true {
|
|
115
|
-
$err: (
|
|
116
|
-
'Could not find "' +
|
|
117
|
-
$icon +
|
|
118
|
-
'" icon. Refer to' +
|
|
119
|
-
'https://skyscanner.design/latest/components/icon/overview.html' +
|
|
120
|
-
' for the list of supported icons.'
|
|
121
|
-
);
|
|
122
|
-
|
|
123
|
-
@error $err;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
$icon-size: if($size == large, $bpk-icon-size-lg, $bpk-icon-size-sm);
|
|
127
|
-
|
|
128
|
-
/* Disabling rule here as this method is for newer sass versions that we don't yet support */
|
|
129
|
-
/* stylelint-disable-next-line scss/no-global-function-names */
|
|
130
|
-
$raw-svg: map-get($icon-map, $icon);
|
|
131
|
-
$svg-string: str-replace($raw-svg, '$$COLOR$$', $color);
|
|
132
|
-
$datauri: 'data:image/svg+xml;base64,' + encodebase64($svg-string);
|
|
133
|
-
|
|
134
|
-
content: '';
|
|
135
|
-
display: inline-block;
|
|
136
|
-
width: $icon-size;
|
|
137
|
-
height: $icon-size;
|
|
138
|
-
background: url($datauri) no-repeat;
|
|
139
|
-
background-size: cover;
|
|
140
|
-
}
|
|
141
|
-
|
|
142
49
|
/// Align to button. Modifies the bpk-icon-sm mixin.
|
|
143
50
|
///
|
|
144
51
|
/// @require {mixin} bpk-icon-sm
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skyscanner/backpack-web",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "31.0.0",
|
|
4
4
|
"description": "Backpack Design System web library",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@popperjs/core": "^2.11.5",
|
|
26
26
|
"@react-google-maps/api": "^2.12.0",
|
|
27
|
-
"@skyscanner/bpk-foundations-web": "^17.
|
|
28
|
-
"@skyscanner/bpk-svgs": "^
|
|
27
|
+
"@skyscanner/bpk-foundations-web": "^17.4.0",
|
|
28
|
+
"@skyscanner/bpk-svgs": "^19.0.0",
|
|
29
29
|
"a11y-focus-scope": "^1.1.3",
|
|
30
30
|
"a11y-focus-store": "^1.0.0",
|
|
31
31
|
"d3-path": "^2.0.0",
|