@bundle-stats/ui 3.2.5-beta.1 → 3.2.5-beta.2

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/CHANGELOG.md CHANGED
@@ -3,12 +3,18 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
- ## [3.2.5-beta.1](https://github.com/relative-ci/bundle-stats/compare/v3.2.5-beta.0...v3.2.5-beta.1) (2022-01-29)
6
+ ## [3.2.5-beta.2](https://github.com/relative-ci/bundle-stats/compare/v3.2.4...v3.2.5-beta.2) (2022-02-15)
7
7
 
8
8
 
9
- ### Reverts
9
+ ### Bug Fixes
10
+
11
+ * **ui:** Move separator to layout ([abc34e7](https://github.com/relative-ci/bundle-stats/commit/abc34e73a0ffb5ae2f4d52538d4f854e1c5857dc))
12
+ * **ui:** Variables - increase outline contrast ([beacc32](https://github.com/relative-ci/bundle-stats/commit/beacc32cf98a49aa150d1820d68f140aebafbc6e))
13
+
14
+
15
+ ### Features
10
16
 
11
- * Revert "fix: Remove setup-node cache input" ([9e63575](https://github.com/relative-ci/bundle-stats/commit/9e635753e57a4a16cc6e43d3658a499865ded1c4))
17
+ * **ui:** Separator component ([1b9e56f](https://github.com/relative-ci/bundle-stats/commit/1b9e56f170834a0a111f8d19fab220d6e7f69095))
12
18
 
13
19
 
14
20
 
@@ -19,6 +19,7 @@
19
19
 
20
20
  .tabsContainer {
21
21
  border-bottom: 1px solid var(--color-outline);
22
+ background: var(--color-light);
22
23
  }
23
24
 
24
25
  .tabs {
@@ -54,4 +55,10 @@
54
55
  background-color: var(--color-background);
55
56
  border-bottom: 1px solid var(--color-outline);
56
57
  }
58
+
59
+ .tabsContainer {
60
+ position: sticky;
61
+ top: var(--header-height);
62
+ z-index: 100;
63
+ }
57
64
  }
@@ -1,18 +1,29 @@
1
+ @import url("~modern-css-reset/dist/reset.css");
2
+
1
3
  :root {
2
4
  --chart-height: 180px;
3
5
  }
4
6
 
7
+ /** modern-css-reset updates */
8
+ pre,
9
+ ul,
10
+ ol,
11
+ button {
12
+ margin: 0;
13
+ }
14
+
5
15
  html {
16
+ font-family: var(--font-family);
6
17
  font-size: 81.25%;
7
- line-height: 1.8461;
18
+ line-height: 1.6;
8
19
  }
9
20
 
10
21
  body {
22
+ background: var(--color-background);
11
23
  color: var(--color-text);
12
24
  }
13
25
 
14
- h1, h2, h3, h4, h5 {
15
- margin-bottom: var(--space-small);
26
+ h1, h2, h3, h4, h5, h6 {
16
27
  color: var(--color-heading);
17
28
  font-weight: 500;
18
29
  }
@@ -23,30 +23,30 @@
23
23
  --size-xxlarge: 1.424rem;
24
24
  --size-xxxlarge: 1.602rem;
25
25
 
26
- --line-height: var(--space-medium);
26
+ --line-height: 1.6em;
27
27
 
28
28
  /*
29
29
  * Color scheme:
30
- * http://mcg.mbitson.com/#!?mcgpalette0=%23dd555e&mcgpalette1=%2363bf5e&mcgpalette2=%23f7e37d&mcgpalette3=%23636568&mcgpalette4=%233385d6&themename=mcgtheme
31
30
  * https://coolors.co/3385d6-dd555e-63bf5e-f7e37d-192339
31
+ * http://mcg.mbitson.com/#!?mcgpalette0=%23dd555e&mcgpalette1=%2363bf5e&mcgpalette2=%23f7e37d&mcgpalette3=%235b5d60&mcgpalette4=%233385d6&themename=mcgtheme
32
32
  */
33
33
  --color-gray-25: #fafafa;
34
- --color-gray-50: #eceded;
35
- --color-gray-100: #d0d1d2;
36
- --color-gray-200: #b1b2b4;
37
- --color-gray-300: #929395;
38
- --color-gray-400: #7a7c7f;
39
- --color-gray-500: #636568;
40
- --color-gray-600: #5b5d60;
41
- --color-gray-700: #515355;
42
- --color-gray-800: #47494b;
43
- --color-gray-900: #35373a;
34
+ --color-gray-50: #e4e4e5;
35
+ --color-gray-100: #cececf;
36
+ --color-gray-200: #adaeb0;
37
+ --color-gray-300: #8c8e90;
38
+ --color-gray-400: #747578;
39
+ --color-gray-500: #5b5d60;
40
+ --color-gray-600: #535558;
41
+ --color-gray-700: #494b4e;
42
+ --color-gray-800: #404144;
43
+ --color-gray-900: #2f3033;
44
44
 
45
45
  --color-gray-ultra-light: var(--color-gray-200);
46
46
  --color-gray-light: var(--color-gray-300);
47
47
  --color-gray: var(--color-gray-500);
48
- --color-gray-dark: var(--color-gray-700);
49
- --color-gray-ultra-dark: var(--color-gray-900);
48
+ --color-gray-dark: var(--color-gray-600);
49
+ --color-gray-ultra-dark: var(--color-gray-700);
50
50
 
51
51
  --color-red-25: #fdf5f6;
52
52
  --color-red-50: #fbebec;
@@ -27,6 +27,12 @@ Object.defineProperty(exports, "Header", {
27
27
  return _header.Header;
28
28
  }
29
29
  });
30
+ Object.defineProperty(exports, "Separator", {
31
+ enumerable: true,
32
+ get: function get() {
33
+ return _separator.Separator;
34
+ }
35
+ });
30
36
  Object.defineProperty(exports, "Stack", {
31
37
  enumerable: true,
32
38
  get: function get() {
@@ -46,6 +52,8 @@ var _footer = require("./footer");
46
52
 
47
53
  var _header = require("./header");
48
54
 
55
+ var _separator = require("./separator");
56
+
49
57
  var _subHeader = require("./sub-header");
50
58
 
51
59
  var _stack = require("./stack");
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.Separator = void 0;
7
+
8
+ var _react = _interopRequireDefault(require("react"));
9
+
10
+ var _propTypes = _interopRequireDefault(require("prop-types"));
11
+
12
+ var _classnames = _interopRequireDefault(require("classnames"));
13
+
14
+ var _separatorModule = _interopRequireDefault(require("./separator.module.css"));
15
+
16
+ var _excluded = ["className"];
17
+
18
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
19
+
20
+ function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
21
+
22
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
23
+
24
+ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
25
+
26
+ var propTypes = {
27
+ className: _propTypes["default"].string
28
+ };
29
+ var defaultProps = {
30
+ className: ''
31
+ };
32
+ /**
33
+ * @param {PropTypes.InferProps<typeof propTypes>} props
34
+ * @return {React.FunctionComponentElement}
35
+ */
36
+
37
+ var Separator = function Separator(props) {
38
+ var className = props.className,
39
+ restProps = _objectWithoutProperties(props, _excluded);
40
+
41
+ return /*#__PURE__*/_react["default"].createElement("div", _extends({
42
+ className: (0, _classnames["default"])(_separatorModule["default"].root, className)
43
+ }, restProps));
44
+ };
45
+
46
+ exports.Separator = Separator;
47
+ Separator.propTypes = propTypes;
48
+ Separator.defaultProps = defaultProps;
@@ -0,0 +1,5 @@
1
+ .root {
2
+ background: var(--color-outline);
3
+ width: 100%;
4
+ height: 1px;
5
+ }
@@ -19,6 +19,7 @@
19
19
 
20
20
  .tabsContainer {
21
21
  border-bottom: 1px solid var(--color-outline);
22
+ background: var(--color-light);
22
23
  }
23
24
 
24
25
  .tabs {
@@ -54,4 +55,10 @@
54
55
  background-color: var(--color-background);
55
56
  border-bottom: 1px solid var(--color-outline);
56
57
  }
58
+
59
+ .tabsContainer {
60
+ position: sticky;
61
+ top: var(--header-height);
62
+ z-index: 100;
63
+ }
57
64
  }
@@ -1,18 +1,29 @@
1
+ @import url("~modern-css-reset/dist/reset.css");
2
+
1
3
  :root {
2
4
  --chart-height: 180px;
3
5
  }
4
6
 
7
+ /** modern-css-reset updates */
8
+ pre,
9
+ ul,
10
+ ol,
11
+ button {
12
+ margin: 0;
13
+ }
14
+
5
15
  html {
16
+ font-family: var(--font-family);
6
17
  font-size: 81.25%;
7
- line-height: 1.8461;
18
+ line-height: 1.6;
8
19
  }
9
20
 
10
21
  body {
22
+ background: var(--color-background);
11
23
  color: var(--color-text);
12
24
  }
13
25
 
14
- h1, h2, h3, h4, h5 {
15
- margin-bottom: var(--space-small);
26
+ h1, h2, h3, h4, h5, h6 {
16
27
  color: var(--color-heading);
17
28
  font-weight: 500;
18
29
  }
@@ -23,30 +23,30 @@
23
23
  --size-xxlarge: 1.424rem;
24
24
  --size-xxxlarge: 1.602rem;
25
25
 
26
- --line-height: var(--space-medium);
26
+ --line-height: 1.6em;
27
27
 
28
28
  /*
29
29
  * Color scheme:
30
- * http://mcg.mbitson.com/#!?mcgpalette0=%23dd555e&mcgpalette1=%2363bf5e&mcgpalette2=%23f7e37d&mcgpalette3=%23636568&mcgpalette4=%233385d6&themename=mcgtheme
31
30
  * https://coolors.co/3385d6-dd555e-63bf5e-f7e37d-192339
31
+ * http://mcg.mbitson.com/#!?mcgpalette0=%23dd555e&mcgpalette1=%2363bf5e&mcgpalette2=%23f7e37d&mcgpalette3=%235b5d60&mcgpalette4=%233385d6&themename=mcgtheme
32
32
  */
33
33
  --color-gray-25: #fafafa;
34
- --color-gray-50: #eceded;
35
- --color-gray-100: #d0d1d2;
36
- --color-gray-200: #b1b2b4;
37
- --color-gray-300: #929395;
38
- --color-gray-400: #7a7c7f;
39
- --color-gray-500: #636568;
40
- --color-gray-600: #5b5d60;
41
- --color-gray-700: #515355;
42
- --color-gray-800: #47494b;
43
- --color-gray-900: #35373a;
34
+ --color-gray-50: #e4e4e5;
35
+ --color-gray-100: #cececf;
36
+ --color-gray-200: #adaeb0;
37
+ --color-gray-300: #8c8e90;
38
+ --color-gray-400: #747578;
39
+ --color-gray-500: #5b5d60;
40
+ --color-gray-600: #535558;
41
+ --color-gray-700: #494b4e;
42
+ --color-gray-800: #404144;
43
+ --color-gray-900: #2f3033;
44
44
 
45
45
  --color-gray-ultra-light: var(--color-gray-200);
46
46
  --color-gray-light: var(--color-gray-300);
47
47
  --color-gray: var(--color-gray-500);
48
- --color-gray-dark: var(--color-gray-700);
49
- --color-gray-ultra-dark: var(--color-gray-900);
48
+ --color-gray-dark: var(--color-gray-600);
49
+ --color-gray-ultra-dark: var(--color-gray-700);
50
50
 
51
51
  --color-red-25: #fdf5f6;
52
52
  --color-red-50: #fbebec;
@@ -1,6 +1,7 @@
1
1
  export { Box } from './box';
2
2
  export { Footer } from './footer';
3
3
  export { Header } from './header';
4
+ export { Separator } from './separator';
4
5
  export { SubHeader } from './sub-header';
5
6
  export { Stack } from './stack';
6
7
  export { FlexStack } from './flex-stack';
@@ -0,0 +1,28 @@
1
+ function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
+
3
+ import React from 'react';
4
+ import PropTypes from 'prop-types';
5
+ import cx from 'classnames';
6
+ import css from './separator.module.css';
7
+ const propTypes = {
8
+ className: PropTypes.string
9
+ };
10
+ const defaultProps = {
11
+ className: ''
12
+ };
13
+ /**
14
+ * @param {PropTypes.InferProps<typeof propTypes>} props
15
+ * @return {React.FunctionComponentElement}
16
+ */
17
+
18
+ export const Separator = props => {
19
+ const {
20
+ className,
21
+ ...restProps
22
+ } = props;
23
+ return /*#__PURE__*/React.createElement("div", _extends({
24
+ className: cx(css.root, className)
25
+ }, restProps));
26
+ };
27
+ Separator.propTypes = propTypes;
28
+ Separator.defaultProps = defaultProps;
@@ -0,0 +1,5 @@
1
+ .root {
2
+ background: var(--color-outline);
3
+ width: 100%;
4
+ height: 1px;
5
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bundle-stats/ui",
3
- "version": "3.2.5-beta.1",
3
+ "version": "3.2.5-beta.2",
4
4
  "description": "UI components for BundleStats projects.",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib-esm/index.js",
@@ -36,25 +36,25 @@
36
36
  },
37
37
  "homepage": "https://github.com/relative-ci/bundle-stats/blob/master/packages/ui#readme",
38
38
  "devDependencies": {
39
- "@babel/cli": "7.16.8",
40
- "@babel/core": "7.16.12",
39
+ "@babel/cli": "7.17.3",
40
+ "@babel/core": "7.17.3",
41
41
  "@babel/plugin-proposal-class-properties": "7.16.7",
42
42
  "@babel/preset-env": "7.16.11",
43
43
  "@babel/preset-react": "7.16.7",
44
44
  "@simplyianm/babel-plugin-inline-react-svg": "1.2.0",
45
- "@storybook/addon-essentials": "6.4.14",
45
+ "@storybook/addon-essentials": "6.4.19",
46
46
  "@storybook/addon-knobs": "6.4.0",
47
47
  "@storybook/addon-postcss": "2.0.0",
48
- "@storybook/addon-storyshots": "6.4.14",
49
- "@storybook/addons": "6.4.14",
50
- "@storybook/builder-webpack5": "6.4.14",
51
- "@storybook/manager-webpack5": "6.4.14",
52
- "@storybook/react": "6.4.14",
48
+ "@storybook/addon-storyshots": "6.4.19",
49
+ "@storybook/addons": "6.4.19",
50
+ "@storybook/builder-webpack5": "6.4.19",
51
+ "@storybook/manager-webpack5": "6.4.19",
52
+ "@storybook/react": "6.4.19",
53
53
  "babel-core": "7.0.0-bridge.0",
54
- "babel-jest": "27.4.6",
54
+ "babel-jest": "27.5.1",
55
55
  "babel-plugin-lodash": "3.3.4",
56
56
  "babel-plugin-require-context-hook": "1.0.0",
57
- "chromatic": "6.4.1",
57
+ "chromatic": "6.4.3",
58
58
  "classnames": "2.3.1",
59
59
  "colormap": "2.3.2",
60
60
  "core-js": "3.20.2",
@@ -64,10 +64,10 @@
64
64
  "enzyme-to-json": "3.6.2",
65
65
  "hex-rgb": "5.0.0",
66
66
  "identity-obj-proxy": "3.0.0",
67
- "jest": "27.4.7",
67
+ "jest": "27.5.1",
68
68
  "jest-date-mock": "1.0.8",
69
69
  "lodash": "4.17.21",
70
- "postcss": "8.4.5",
70
+ "postcss": "8.4.6",
71
71
  "prop-types": "15.8.1",
72
72
  "react": "16.14.0",
73
73
  "react-dom": "16.14.0",
@@ -85,11 +85,12 @@
85
85
  "react-router-dom": "5.3.0"
86
86
  },
87
87
  "dependencies": {
88
- "@bundle-stats/utils": "^3.2.5-beta.1",
88
+ "@bundle-stats/utils": "^3.2.5-beta.2",
89
89
  "date-fns": "2.28.0",
90
- "query-string": "7.1.0",
90
+ "modern-css-reset": "1.4.0",
91
+ "query-string": "7.1.1",
91
92
  "reakit": "1.3.11",
92
93
  "use-query-params": "1.2.3"
93
94
  },
94
- "gitHead": "908630a10015a08dcf977ef625bb79f8ccadb4bf"
95
+ "gitHead": "5859bba1ce91b238650d8b76a0b6e11ed9587621"
95
96
  }
package/src/app/app.jsx CHANGED
@@ -58,8 +58,12 @@ Layout.defaultProps = {
58
58
 
59
59
  const AppComponent = ({ version, jobs }) => {
60
60
  const [bundleStatsState, bundleStatsSetState] = useComponentQueryState(COMPONENT.BUNDLE_ASSETS);
61
- const [bundlePackagesState, bundlePackagesSetState] = useComponentQueryState(COMPONENT.BUNDLE_PACKAGES);
62
- const [bundleModulesState, bundleModulesSetState] = useComponentQueryState(COMPONENT.BUNDLE_MODULES);
61
+ const [bundlePackagesState, bundlePackagesSetState] = useComponentQueryState(
62
+ COMPONENT.BUNDLE_PACKAGES,
63
+ );
64
+ const [bundleModulesState, bundleModulesSetState] = useComponentQueryState(
65
+ COMPONENT.BUNDLE_MODULES,
66
+ );
63
67
 
64
68
  if (jobs.length === 0) {
65
69
  return (
@@ -19,6 +19,7 @@
19
19
 
20
20
  .tabsContainer {
21
21
  border-bottom: 1px solid var(--color-outline);
22
+ background: var(--color-light);
22
23
  }
23
24
 
24
25
  .tabs {
@@ -54,4 +55,10 @@
54
55
  background-color: var(--color-background);
55
56
  border-bottom: 1px solid var(--color-outline);
56
57
  }
58
+
59
+ .tabsContainer {
60
+ position: sticky;
61
+ top: var(--header-height);
62
+ z-index: 100;
63
+ }
57
64
  }
@@ -1,18 +1,29 @@
1
+ @import url("~modern-css-reset/dist/reset.css");
2
+
1
3
  :root {
2
4
  --chart-height: 180px;
3
5
  }
4
6
 
7
+ /** modern-css-reset updates */
8
+ pre,
9
+ ul,
10
+ ol,
11
+ button {
12
+ margin: 0;
13
+ }
14
+
5
15
  html {
16
+ font-family: var(--font-family);
6
17
  font-size: 81.25%;
7
- line-height: 1.8461;
18
+ line-height: 1.6;
8
19
  }
9
20
 
10
21
  body {
22
+ background: var(--color-background);
11
23
  color: var(--color-text);
12
24
  }
13
25
 
14
- h1, h2, h3, h4, h5 {
15
- margin-bottom: var(--space-small);
26
+ h1, h2, h3, h4, h5, h6 {
16
27
  color: var(--color-heading);
17
28
  font-weight: 500;
18
29
  }
@@ -23,30 +23,30 @@
23
23
  --size-xxlarge: 1.424rem;
24
24
  --size-xxxlarge: 1.602rem;
25
25
 
26
- --line-height: var(--space-medium);
26
+ --line-height: 1.6em;
27
27
 
28
28
  /*
29
29
  * Color scheme:
30
- * http://mcg.mbitson.com/#!?mcgpalette0=%23dd555e&mcgpalette1=%2363bf5e&mcgpalette2=%23f7e37d&mcgpalette3=%23636568&mcgpalette4=%233385d6&themename=mcgtheme
31
30
  * https://coolors.co/3385d6-dd555e-63bf5e-f7e37d-192339
31
+ * http://mcg.mbitson.com/#!?mcgpalette0=%23dd555e&mcgpalette1=%2363bf5e&mcgpalette2=%23f7e37d&mcgpalette3=%235b5d60&mcgpalette4=%233385d6&themename=mcgtheme
32
32
  */
33
33
  --color-gray-25: #fafafa;
34
- --color-gray-50: #eceded;
35
- --color-gray-100: #d0d1d2;
36
- --color-gray-200: #b1b2b4;
37
- --color-gray-300: #929395;
38
- --color-gray-400: #7a7c7f;
39
- --color-gray-500: #636568;
40
- --color-gray-600: #5b5d60;
41
- --color-gray-700: #515355;
42
- --color-gray-800: #47494b;
43
- --color-gray-900: #35373a;
34
+ --color-gray-50: #e4e4e5;
35
+ --color-gray-100: #cececf;
36
+ --color-gray-200: #adaeb0;
37
+ --color-gray-300: #8c8e90;
38
+ --color-gray-400: #747578;
39
+ --color-gray-500: #5b5d60;
40
+ --color-gray-600: #535558;
41
+ --color-gray-700: #494b4e;
42
+ --color-gray-800: #404144;
43
+ --color-gray-900: #2f3033;
44
44
 
45
45
  --color-gray-ultra-light: var(--color-gray-200);
46
46
  --color-gray-light: var(--color-gray-300);
47
47
  --color-gray: var(--color-gray-500);
48
- --color-gray-dark: var(--color-gray-700);
49
- --color-gray-ultra-dark: var(--color-gray-900);
48
+ --color-gray-dark: var(--color-gray-600);
49
+ --color-gray-ultra-dark: var(--color-gray-700);
50
50
 
51
51
  --color-red-25: #fdf5f6;
52
52
  --color-red-50: #fbebec;
@@ -1,6 +1,7 @@
1
1
  export { Box } from './box';
2
2
  export { Footer } from './footer';
3
3
  export { Header } from './header';
4
+ export { Separator } from './separator';
4
5
  export { SubHeader } from './sub-header';
5
6
  export { Stack } from './stack';
6
7
  export { FlexStack } from './flex-stack';
@@ -0,0 +1,25 @@
1
+ import React from 'react';
2
+ import PropTypes from 'prop-types';
3
+ import cx from 'classnames';
4
+
5
+ import css from './separator.module.css';
6
+
7
+ const propTypes = {
8
+ className: PropTypes.string,
9
+ };
10
+
11
+ const defaultProps = {
12
+ className: '',
13
+ };
14
+
15
+ /**
16
+ * @param {PropTypes.InferProps<typeof propTypes>} props
17
+ * @return {React.FunctionComponentElement}
18
+ */
19
+ export const Separator = (props) => {
20
+ const { className, ...restProps } = props;
21
+ return <div className={cx(css.root, className)} {...restProps} />;
22
+ };
23
+
24
+ Separator.propTypes = propTypes;
25
+ Separator.defaultProps = defaultProps;
@@ -0,0 +1,5 @@
1
+ .root {
2
+ background: var(--color-outline);
3
+ width: 100%;
4
+ height: 1px;
5
+ }