@skyscanner/backpack-web 25.7.0 → 25.8.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.
@@ -0,0 +1,171 @@
1
+ "use strict";
2
+
3
+ /******/(function (modules) {
4
+ // webpackBootstrap
5
+ /******/ // The module cache
6
+ /******/
7
+ var installedModules = {};
8
+ /******/
9
+ /******/ // The require function
10
+ /******/
11
+ function __webpack_require__(moduleId) {
12
+ /******/
13
+ /******/ // Check if module is in cache
14
+ /******/if (installedModules[moduleId]) {
15
+ /******/return installedModules[moduleId].exports;
16
+ /******/
17
+ }
18
+ /******/ // Create a new module (and put it into the cache)
19
+ /******/
20
+ var module = installedModules[moduleId] = {
21
+ /******/i: moduleId,
22
+ /******/l: false,
23
+ /******/exports: {}
24
+ /******/
25
+ };
26
+ /******/
27
+ /******/ // Execute the module function
28
+ /******/
29
+ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
30
+ /******/
31
+ /******/ // Flag the module as loaded
32
+ /******/
33
+ module.l = true;
34
+ /******/
35
+ /******/ // Return the exports of the module
36
+ /******/
37
+ return module.exports;
38
+ /******/
39
+ }
40
+ /******/
41
+ /******/
42
+ /******/ // expose the modules object (__webpack_modules__)
43
+ /******/
44
+ __webpack_require__.m = modules;
45
+ /******/
46
+ /******/ // expose the module cache
47
+ /******/
48
+ __webpack_require__.c = installedModules;
49
+ /******/
50
+ /******/ // define getter function for harmony exports
51
+ /******/
52
+ __webpack_require__.d = function (exports, name, getter) {
53
+ /******/if (!__webpack_require__.o(exports, name)) {
54
+ /******/Object.defineProperty(exports, name, {
55
+ enumerable: true,
56
+ get: getter
57
+ });
58
+ /******/
59
+ }
60
+ /******/
61
+ };
62
+ /******/
63
+ /******/ // define __esModule on exports
64
+ /******/
65
+ __webpack_require__.r = function (exports) {
66
+ /******/if (typeof Symbol !== 'undefined' && Symbol.toStringTag) {
67
+ /******/Object.defineProperty(exports, Symbol.toStringTag, {
68
+ value: 'Module'
69
+ });
70
+ /******/
71
+ }
72
+ /******/
73
+ Object.defineProperty(exports, '__esModule', {
74
+ value: true
75
+ });
76
+ /******/
77
+ };
78
+ /******/
79
+ /******/ // create a fake namespace object
80
+ /******/ // mode & 1: value is a module id, require it
81
+ /******/ // mode & 2: merge all properties of value into the ns
82
+ /******/ // mode & 4: return value when already ns object
83
+ /******/ // mode & 8|1: behave like require
84
+ /******/
85
+ __webpack_require__.t = function (value, mode) {
86
+ /******/if (mode & 1) value = __webpack_require__(value);
87
+ /******/
88
+ if (mode & 8) return value;
89
+ /******/
90
+ if (mode & 4 && typeof value === 'object' && value && value.__esModule) return value;
91
+ /******/
92
+ var ns = Object.create(null);
93
+ /******/
94
+ __webpack_require__.r(ns);
95
+ /******/
96
+ Object.defineProperty(ns, 'default', {
97
+ enumerable: true,
98
+ value: value
99
+ });
100
+ /******/
101
+ if (mode & 2 && typeof value != 'string') for (var key in value) __webpack_require__.d(ns, key, function (key) {
102
+ return value[key];
103
+ }.bind(null, key));
104
+ /******/
105
+ return ns;
106
+ /******/
107
+ };
108
+ /******/
109
+ /******/ // getDefaultExport function for compatibility with non-harmony modules
110
+ /******/
111
+ __webpack_require__.n = function (module) {
112
+ /******/var getter = module && module.__esModule ? /******/function getDefault() {
113
+ return module['default'];
114
+ } : /******/function getModuleExports() {
115
+ return module;
116
+ };
117
+ /******/
118
+ __webpack_require__.d(getter, 'a', getter);
119
+ /******/
120
+ return getter;
121
+ /******/
122
+ };
123
+ /******/
124
+ /******/ // Object.prototype.hasOwnProperty.call
125
+ /******/
126
+ __webpack_require__.o = function (object, property) {
127
+ return Object.prototype.hasOwnProperty.call(object, property);
128
+ };
129
+ /******/
130
+ /******/ // __webpack_public_path__
131
+ /******/
132
+ __webpack_require__.p = "";
133
+ /******/
134
+ /******/
135
+ /******/ // Load entry module and return exports
136
+ /******/
137
+ return __webpack_require__(__webpack_require__.s = "./index.js");
138
+ /******/
139
+ }
140
+ /************************************************************************/
141
+ /******/)({
142
+ /***/"./index.js":
143
+ /*!******************!*\
144
+ !*** ./index.js ***!
145
+ \******************/
146
+ /*! no exports provided */
147
+ /***/
148
+ function (module, __webpack_exports__, __webpack_require__) {
149
+ "use strict";
150
+
151
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _index_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index.scss */ \"./index.scss\");\n/*\n * Backpack - Skyscanner's Design System\n *\n * Copyright 2016 Skyscanner Ltd\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\n(() => {\n if (typeof document === 'undefined') {\n return;\n }\n const classNames = [];\n\n // touch support\n classNames.push('ontouchstart' in window ||\n // eslint-disable-line no-undef\n window.DocumentTouch && document instanceof DocumentTouch // eslint-disable-line no-undef\n ? 'touch-support' : 'no-touch-support');\n\n // add more feature tests here...\n\n // eslint-disable-next-line no-undef\n document.documentElement.className += ` ${classNames.map(className => `bpk-${className}`).join(' ')}`;\n})();\n\n//# sourceURL=webpack:///./index.js?");
152
+
153
+ /***/
154
+ },
155
+
156
+ /***/"./index.scss":
157
+ /*!********************!*\
158
+ !*** ./index.scss ***!
159
+ \********************/
160
+ /*! no exports provided */
161
+ /***/
162
+ function (module, __webpack_exports__, __webpack_require__) {
163
+ "use strict";
164
+
165
+ eval("__webpack_require__.r(__webpack_exports__);\n// extracted by mini-css-extract-plugin\n\n\n//# sourceURL=webpack:///./index.scss?");
166
+
167
+ /***/
168
+ }
169
+
170
+ /******/
171
+ });
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+
3
+ /*
4
+ * Backpack - Skyscanner's Design System
5
+ *
6
+ * Copyright 2016 Skyscanner Ltd
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License");
9
+ * you may not use this file except in compliance with the License.
10
+ * You may obtain a copy of the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS,
16
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17
+ * See the License for the specific language governing permissions and
18
+ * limitations under the License.
19
+ */
20
+
21
+ /*
22
+ In Babel 7+, Babel stops looking for config files once it finds a package.json. As this
23
+ is a monorepo and the Babel config file is in the repo root, we need to tell Babel to go
24
+ upwards up the tree to find it.
25
+
26
+ Then, we need to call Webpack manually.
27
+ */
28
+
29
+ require('@babel/register')({
30
+ rootMode: 'upward',
31
+ // Since Babel ignores all files outside the cwd, it does not compile
32
+ // sibling packages. This rewrites the ignore list to only include node_modules.
33
+ ignore: ['node_modules']
34
+ });
35
+ const webpack = require('webpack');
36
+ const config = require("./webpack.config.babel");
37
+
38
+ /* eslint-disable no-console */
39
+ webpack(config, (err, stats) => {
40
+ if (err || stats.hasErrors()) {
41
+ console.error(err);
42
+ } else {
43
+ console.log(stats.toString());
44
+ }
45
+ });
46
+ /* eslint-enable */
@@ -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
+ @font-face{font-family:'Skyscanner Relative';font-style:normal;font-weight:400;src:url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-Book-f9356ad6.woff2") format("woff2"),url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-Book-46f9f429.woff") format("woff"),url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-Book-ab1dbcbe.ttf") format("ttf")}@font-face{font-family:'Skyscanner Relative';font-style:italic;font-weight:400;src:url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-Italic-10532ac3.woff2") format("woff2"),url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-Italic-db5d0ac5.woff") format("woff"),url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-Italic-8eec3f3a.ttf") format("ttf")}@font-face{font-family:'Skyscanner Relative';font-style:normal;font-weight:500;src:url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-Medium-c08dc28b.woff2") format("woff2"),url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-Medium-865e167a.woff") format("woff"),url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-Medium-d0ae478a.ttf") format("ttf")}@font-face{font-family:'Skyscanner Relative';font-style:italic;font-weight:500;src:url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-MediumItalic-81517f37.woff2") format("woff2"),url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-MediumItalic-bbdb6b0c.woff") format("woff"),url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-MediumItalic-226fe64c.ttf") format("ttf")}@font-face{font-family:'Skyscanner Relative';font-style:normal;font-weight:700;src:url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-Bold-8545937e.woff2") format("woff2"),url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-Bold-a099c9f7.woff") format("woff"),url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-Bold-ec4cc5a7.ttf") format("ttf")}@font-face{font-family:'Skyscanner Relative';font-style:italic;font-weight:700;src:url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-BoldItalic-01b5d138.woff2") format("woff2"),url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-BoldItalic-4d6d36e3.woff") format("woff"),url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-BoldItalic-dc9284dc.ttf") format("ttf")}@font-face{font-family:'Skyscanner Relative';font-style:normal;font-weight:900;src:url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-Black-bb3c9434.woff2") format("woff2"),url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-Black-bba2eb55.woff") format("woff"),url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-Black-314703cc.ttf") format("ttf")}@font-face{font-family:'Skyscanner Relative';font-style:italic;font-weight:900;src:url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-BlackItalic-c2149c91.woff2") format("woff2"),url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-BlackItalic-a34cd594.woff") format("woff"),url("https://js.skyscnr.com/sttc/bpk-fonts/SkyscannerRelative-BlackItalic-7e516ee5.ttf") format("ttf")}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+
3
+ require("./font.scss");
@@ -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
+ @import url(/home/runner/work/backpack/backpack/packages/node_modules/normalize.css);@keyframes bpk-keyframe-spin{100%{transform:rotate(1turn)}}html{font-size:100%;box-sizing:border-box}*{box-sizing:inherit}*::before,*::after{box-sizing:inherit}body{color:#161616;font-family:"Skyscanner Relative",-apple-system,BlinkMacSystemFont,"Roboto","Oxygen","Ubuntu","Cantarell","Fira Sans","Droid Sans","Helvetica Neue",sans-serif;font-size:1rem;line-height:1.3rem}:global(body.scaffold-font-size){font-size:13px}:global(body.enable-font-smoothing){-webkit-font-smoothing:antialiased}:global(.hidden),:global(.hide){display:none !important}:global(.visuallyhidden),:global(.visually-hidden){position:absolute;width:1px;height:1px;margin:-1px;padding:0;border:0;overflow:hidden;clip:rect(0 0 0 0)}:global(.visuallyhidden.focusable):active,:global(.visuallyhidden.focusable):focus,:global(.visually-hidden.focusable):active,:global(.visually-hidden.focusable):focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}:global(.invisible){visibility:hidden}:global(.clearfix)::before,:global(.clearfix)::after{content:'';display:table}:global(.clearfix)::after{clear:both}
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+
3
+ require("./index.scss");
4
+ /*
5
+ * Backpack - Skyscanner's Design System
6
+ *
7
+ * Copyright 2016 Skyscanner Ltd
8
+ *
9
+ * Licensed under the Apache License, Version 2.0 (the "License");
10
+ * you may not use this file except in compliance with the License.
11
+ * You may obtain a copy of the License at
12
+ *
13
+ * http://www.apache.org/licenses/LICENSE-2.0
14
+ *
15
+ * Unless required by applicable law or agreed to in writing, software
16
+ * distributed under the License is distributed on an "AS IS" BASIS,
17
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18
+ * See the License for the specific language governing permissions and
19
+ * limitations under the License.
20
+ */
21
+
22
+ (() => {
23
+ if (typeof document === 'undefined') {
24
+ return;
25
+ }
26
+ const classNames = [];
27
+
28
+ // touch support
29
+ classNames.push('ontouchstart' in window ||
30
+ // eslint-disable-line no-undef
31
+ window.DocumentTouch && document instanceof DocumentTouch // eslint-disable-line no-undef
32
+ ? 'touch-support' : 'no-touch-support');
33
+
34
+ // add more feature tests here...
35
+
36
+ // eslint-disable-next-line no-undef
37
+ document.documentElement.className += ` ${classNames.map(className => `bpk-${className}`).join(' ')}`;
38
+ })();
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.xmlComment = exports.blockComment = void 0;
7
+ const TEXT = `
8
+ Backpack - Skyscanner's Design System
9
+
10
+ Copyright 2016 Skyscanner Ltd
11
+
12
+ Licensed under the Apache License, Version 2.0 (the "License");
13
+ you may not use this file except in compliance with the License.
14
+ You may obtain a copy of the License at
15
+
16
+ http://www.apache.org/licenses/LICENSE-2.0
17
+
18
+ Unless required by applicable law or agreed to in writing, software
19
+ distributed under the License is distributed on an "AS IS" BASIS,
20
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21
+ See the License for the specific language governing permissions and
22
+ limitations under the License.
23
+ `;
24
+ const xmlComment = `
25
+ <!--
26
+ ${TEXT.replace(/^/gm, ' ')}
27
+ -->`;
28
+ exports.xmlComment = xmlComment;
29
+ const blockComment = `/*
30
+ ${TEXT.replace(/^/gm, ' * ')}
31
+ */`;
32
+ exports.blockComment = blockComment;
@@ -0,0 +1,85 @@
1
+ "use strict";
2
+
3
+ var _miniCssExtractPlugin = _interopRequireDefault(require("mini-css-extract-plugin"));
4
+ var _wrapperWebpackPlugin = _interopRequireDefault(require("wrapper-webpack-plugin"));
5
+ var _postCssPlugins = _interopRequireDefault(require("../../scripts/webpack/postCssPlugins"));
6
+ var _licenseHeader = require("./license-header");
7
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
8
+ /*
9
+ * Backpack - Skyscanner's Design System
10
+ *
11
+ * Copyright 2016 Skyscanner Ltd
12
+ *
13
+ * Licensed under the Apache License, Version 2.0 (the "License");
14
+ * you may not use this file except in compliance with the License.
15
+ * You may obtain a copy of the License at
16
+ *
17
+ * http://www.apache.org/licenses/LICENSE-2.0
18
+ *
19
+ * Unless required by applicable law or agreed to in writing, software
20
+ * distributed under the License is distributed on an "AS IS" BASIS,
21
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22
+ * See the License for the specific language governing permissions and
23
+ * limitations under the License.
24
+ */
25
+
26
+ const path = require('path');
27
+ module.exports = {
28
+ mode: 'development',
29
+ entry: {
30
+ base: './index.js'
31
+ },
32
+ output: {
33
+ path: path.resolve(__dirname, ''),
34
+ filename: 'base.js'
35
+ },
36
+ module: {
37
+ rules: [{
38
+ test: /\.[jt]sx?$/,
39
+ exclude: /node_modules/,
40
+ loader: 'babel-loader'
41
+ }, {
42
+ test: /\.scss$/,
43
+ use: [{
44
+ loader: _miniCssExtractPlugin.default.loader
45
+ }, {
46
+ loader: 'css-loader',
47
+ options: {
48
+ importLoaders: 1
49
+ }
50
+ }, {
51
+ loader: 'postcss-loader',
52
+ options: {
53
+ postcssOptions: {
54
+ plugins: [_postCssPlugins.default]
55
+ }
56
+ }
57
+ }, {
58
+ loader: 'sass-loader'
59
+ }]
60
+ }, {
61
+ test: /\.css$/,
62
+ use: [{
63
+ loader: _miniCssExtractPlugin.default.loader
64
+ }, {
65
+ loader: 'css-loader',
66
+ options: {
67
+ importLoaders: 1
68
+ }
69
+ }, {
70
+ loader: 'postcss-loader',
71
+ options: {
72
+ postcssOptions: {
73
+ plugins: [_postCssPlugins.default]
74
+ }
75
+ }
76
+ }]
77
+ }]
78
+ },
79
+ plugins: [new _wrapperWebpackPlugin.default({
80
+ test: /\.css$/,
81
+ header: _licenseHeader.blockComment
82
+ }), new _miniCssExtractPlugin.default({
83
+ filename: 'base.css'
84
+ })]
85
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skyscanner/backpack-web",
3
- "version": "25.7.0",
3
+ "version": "25.8.0",
4
4
  "description": "Backpack Design System web library",
5
5
  "repository": {
6
6
  "type": "git",
@@ -28,7 +28,6 @@
28
28
  "@skyscanner/bpk-svgs": "^16.4.0",
29
29
  "a11y-focus-scope": "^1.1.3",
30
30
  "a11y-focus-store": "^1.0.0",
31
- "bpk-mixins": "^41.1.1",
32
31
  "d3-path": "^2.0.0",
33
32
  "d3-scale": "^4.0.2",
34
33
  "date-fns": "^2.21.1",
@@ -36,6 +35,7 @@
36
35
  "lodash": "^4.17.20",
37
36
  "lodash.clamp": "^4.0.3",
38
37
  "lodash.debounce": "^4.0.8",
38
+ "normalize.css": "4.2.0",
39
39
  "object-assign": "^4.1.1",
40
40
  "prop-types": "^15.7.2",
41
41
  "react-autosuggest": "^9.4.3",
@@ -46,6 +46,7 @@
46
46
  "react-window": "^1.8.7"
47
47
  },
48
48
  "peerDependencies": {
49
+ "node-sass": "^4.12.0 || ^5.0.0 || ^6.0.0 || ^7.0.0",
49
50
  "react": "^17.0.2",
50
51
  "react-dom": "^17.0.2"
51
52
  }