@skyscanner/backpack-web 30.3.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.
@@ -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": "30.3.0",
3
+ "version": "31.0.0",
4
4
  "description": "Backpack Design System web library",
5
5
  "repository": {
6
6
  "type": "git",
@@ -25,7 +25,7 @@
25
25
  "@popperjs/core": "^2.11.5",
26
26
  "@react-google-maps/api": "^2.12.0",
27
27
  "@skyscanner/bpk-foundations-web": "^17.4.0",
28
- "@skyscanner/bpk-svgs": "^18.1.2",
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",
@@ -1,6 +0,0 @@
1
- /// <reference types="react" />
2
- declare const _default: ({ styles, ...props }: {
3
- [x: string]: any;
4
- styles?: {} | undefined;
5
- }) => JSX.Element;
6
- export default _default;
@@ -1,6 +0,0 @@
1
- /// <reference types="react" />
2
- declare const _default: ({ styles, ...props }: {
3
- [x: string]: any;
4
- styles?: {} | undefined;
5
- }) => JSX.Element;
6
- export default _default;