@bundle-stats/ui 3.3.1-beta.8 → 3.3.3-beta.1
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/lib/app/app.js +8 -21
- package/lib/app/app.stories.js +1 -22
- package/lib/app/header/header.js +2 -1
- package/lib/assets/icons.svg +0 -8
- package/lib/components/bundle-assets/bundle-assets.js +2 -1
- package/lib/components/bundle-assets-totals-table/bundle-assets-totals-table.js +7 -43
- package/lib/components/bundle-assets-totals-table/bundle-assets-totals-table.module.css +2 -2
- package/lib/components/bundle-assets-totals-table/bundle-assets-totals-table.stories.js +1 -20
- package/lib/components/bundle-modules/bundle-modules.js +1 -1
- package/lib/components/index.js +0 -8
- package/lib/components/summary/summary.js +7 -12
- package/lib/components/summary/summary.module.css +1 -1
- package/lib/components/summary/summary.stories.js +0 -29
- package/lib/components/summary-item/summary-item.js +5 -22
- package/lib/components/summary-item/summary-item.module.css +0 -11
- package/lib/components/summary-item/summary-item.stories.js +53 -51
- package/lib/constants.js +4 -4
- package/lib/ui/alert/alert.js +3 -13
- package/lib/ui/icon/icon.js +0 -2
- package/lib-esm/app/app.js +8 -20
- package/lib-esm/app/app.stories.js +1 -22
- package/lib-esm/app/header/header.js +2 -1
- package/lib-esm/assets/icons.svg +0 -8
- package/lib-esm/components/bundle-assets/bundle-assets.js +2 -1
- package/lib-esm/components/bundle-assets-totals-table/bundle-assets-totals-table.js +7 -24
- package/lib-esm/components/bundle-assets-totals-table/bundle-assets-totals-table.module.css +2 -2
- package/lib-esm/components/bundle-assets-totals-table/bundle-assets-totals-table.stories.js +0 -18
- package/lib-esm/components/bundle-modules/bundle-modules.js +1 -1
- package/lib-esm/components/index.js +0 -1
- package/lib-esm/components/summary/summary.js +7 -11
- package/lib-esm/components/summary/summary.module.css +1 -1
- package/lib-esm/components/summary/summary.stories.js +0 -27
- package/lib-esm/components/summary-item/summary-item.js +4 -20
- package/lib-esm/components/summary-item/summary-item.module.css +0 -11
- package/lib-esm/components/summary-item/summary-item.stories.js +38 -50
- package/lib-esm/constants.js +4 -4
- package/lib-esm/ui/alert/alert.js +3 -6
- package/lib-esm/ui/icon/icon.js +0 -2
- package/package.json +9 -9
- package/src/components/bundle-modules/bundle-modules.jsx +1 -1
- package/build-storybook.log +0 -4691
- package/lib/assets/icons/alert-circle.svg +0 -1
- package/lib/assets/icons/check-circle.svg +0 -1
- package/lib/components/budget-info/budget-info.js +0 -80
- package/lib/components/budget-info/budget-info.module.css +0 -40
- package/lib/components/budget-info/budget-info.stories.js +0 -44
- package/lib/components/budget-info/index.js +0 -18
- package/lib/components/budget-insights/budget-insights.js +0 -200
- package/lib/components/budget-insights/budget-insights.module.css +0 -53
- package/lib/components/budget-insights/budget-insights.stories.js +0 -104
- package/lib/components/budget-insights/index.js +0 -18
- package/lib-esm/assets/icons/alert-circle.svg +0 -1
- package/lib-esm/assets/icons/check-circle.svg +0 -1
- package/lib-esm/components/budget-info/budget-info.js +0 -58
- package/lib-esm/components/budget-info/budget-info.module.css +0 -40
- package/lib-esm/components/budget-info/budget-info.stories.js +0 -30
- package/lib-esm/components/budget-info/index.js +0 -1
- package/lib-esm/components/budget-insights/budget-insights.js +0 -148
- package/lib-esm/components/budget-insights/budget-insights.module.css +0 -53
- package/lib-esm/components/budget-insights/budget-insights.stories.js +0 -84
- package/lib-esm/components/budget-insights/index.js +0 -1
- package/storybook-static/favicon.ico +0 -0
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
.root {
|
|
2
|
-
position: relative;
|
|
3
|
-
padding-right: var(--space-xlarge);
|
|
4
|
-
}
|
|
5
|
-
|
|
6
1
|
.title {
|
|
7
2
|
align-items: center;
|
|
8
3
|
color: var(--color-text-ultra-light);
|
|
@@ -13,12 +8,6 @@
|
|
|
13
8
|
white-space: nowrap;
|
|
14
9
|
}
|
|
15
10
|
|
|
16
|
-
.budgetInfo {
|
|
17
|
-
position: absolute;
|
|
18
|
-
right: 0;
|
|
19
|
-
top: 0;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
11
|
.currentMetric {
|
|
23
12
|
display: block;
|
|
24
13
|
color: var(--color-heading);
|
|
@@ -2,56 +2,44 @@ import React from 'react';
|
|
|
2
2
|
import { SummaryItem } from './summary-item';
|
|
3
3
|
export default {
|
|
4
4
|
title: 'Components/SummaryItem',
|
|
5
|
-
component: SummaryItem
|
|
6
|
-
decorators: [Story => /*#__PURE__*/React.createElement("div", {
|
|
7
|
-
style: {
|
|
8
|
-
maxWidth: '320px'
|
|
9
|
-
}
|
|
10
|
-
}, /*#__PURE__*/React.createElement(Story, null))],
|
|
11
|
-
args: {
|
|
12
|
-
loading: false,
|
|
13
|
-
id: 'webpack.totalSizeByTypeALL',
|
|
14
|
-
data: {
|
|
15
|
-
current: 120 * 1000,
|
|
16
|
-
baseline: 100 * 1000
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
const Template = args => /*#__PURE__*/React.createElement(SummaryItem, args);
|
|
22
|
-
|
|
23
|
-
export const Standard = Template.bind();
|
|
24
|
-
export const SizeLarge = Template.bind();
|
|
25
|
-
SizeLarge.args = {
|
|
26
|
-
size: 'large'
|
|
27
|
-
};
|
|
28
|
-
export const ShowMetricDescription = Template.bind();
|
|
29
|
-
ShowMetricDescription.args = {
|
|
30
|
-
showMetricDescription: true
|
|
31
|
-
};
|
|
32
|
-
export const ShowDeltaFalse = Template.bind();
|
|
33
|
-
ShowDeltaFalse.args = {
|
|
34
|
-
showDelta: false
|
|
5
|
+
component: SummaryItem
|
|
35
6
|
};
|
|
36
|
-
export const
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
failed: true
|
|
7
|
+
export const Standard = () => /*#__PURE__*/React.createElement(SummaryItem, {
|
|
8
|
+
loading: false,
|
|
9
|
+
id: "webpack.totalSizeByTypeALL",
|
|
10
|
+
data: {
|
|
11
|
+
current: 120 * 1000,
|
|
12
|
+
baseline: 100 * 1000
|
|
43
13
|
}
|
|
44
|
-
};
|
|
45
|
-
export const
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
14
|
+
});
|
|
15
|
+
export const SizeLarge = () => /*#__PURE__*/React.createElement(SummaryItem, {
|
|
16
|
+
size: "large",
|
|
17
|
+
loading: false,
|
|
18
|
+
id: "webpack.totalSizeByTypeALL",
|
|
19
|
+
data: {
|
|
20
|
+
current: 120 * 1000,
|
|
21
|
+
baseline: 100 * 1000
|
|
52
22
|
}
|
|
53
|
-
};
|
|
54
|
-
export const
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
23
|
+
});
|
|
24
|
+
export const ShowMetricDescription = () => /*#__PURE__*/React.createElement(SummaryItem, {
|
|
25
|
+
loading: false,
|
|
26
|
+
id: "webpack.totalSizeByTypeALL",
|
|
27
|
+
data: {
|
|
28
|
+
current: 120 * 1000,
|
|
29
|
+
baseline: 100 * 1000
|
|
30
|
+
},
|
|
31
|
+
showMetricDescription: true
|
|
32
|
+
});
|
|
33
|
+
export const ShowDeltaFalse = () => /*#__PURE__*/React.createElement(SummaryItem, {
|
|
34
|
+
loading: false,
|
|
35
|
+
id: "webpack.totalSizeByTypeALL",
|
|
36
|
+
data: {
|
|
37
|
+
current: 120 * 1000,
|
|
38
|
+
baseline: 0
|
|
39
|
+
},
|
|
40
|
+
showDelta: false
|
|
41
|
+
});
|
|
42
|
+
export const Loading = () => /*#__PURE__*/React.createElement(SummaryItem, {
|
|
43
|
+
loading: true,
|
|
44
|
+
id: "webpack.totalSizeByTypeALL"
|
|
45
|
+
});
|
package/lib-esm/constants.js
CHANGED
|
@@ -25,7 +25,7 @@ export const SECTION_URLS = {
|
|
|
25
25
|
export const ASSETS_SIZES_FILE_TYPE_MAP = FILE_TYPES.reduce((agg, fileType) => ({ ...agg,
|
|
26
26
|
[`webpack.sizes.totalSizeByType${fileType}`]: fileType
|
|
27
27
|
}), {});
|
|
28
|
-
export const METRICS_WEBPACK_GENERAL = ['totalSizeByTypeALL', 'totalInitialSizeJS', 'totalInitialSizeCSS', 'cacheInvalidation'];
|
|
29
|
-
export const METRICS_WEBPACK_ASSETS = ['assetCount', 'chunkCount'];
|
|
30
|
-
export const METRICS_WEBPACK_MODULES = ['moduleCount', 'duplicateModulesCount', 'duplicateCode'];
|
|
31
|
-
export const METRICS_WEBPACK_PACKAGES = ['packageCount', 'duplicatePackagesCount'];
|
|
28
|
+
export const METRICS_WEBPACK_GENERAL = ['webpack.totalSizeByTypeALL', 'webpack.totalInitialSizeJS', 'webpack.totalInitialSizeCSS', 'webpack.cacheInvalidation'];
|
|
29
|
+
export const METRICS_WEBPACK_ASSETS = ['webpack.assetCount', 'webpack.chunkCount'];
|
|
30
|
+
export const METRICS_WEBPACK_MODULES = ['webpack.moduleCount', 'webpack.duplicateModulesCount', 'webpack.duplicateCode'];
|
|
31
|
+
export const METRICS_WEBPACK_PACKAGES = ['webpack.packageCount', 'webpack.duplicatePackagesCount'];
|
|
@@ -1,5 +1,3 @@
|
|
|
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
1
|
import React from 'react';
|
|
4
2
|
import cx from 'classnames';
|
|
5
3
|
import PropTypes from 'prop-types';
|
|
@@ -9,14 +7,13 @@ export const Alert = props => {
|
|
|
9
7
|
const {
|
|
10
8
|
className,
|
|
11
9
|
kind,
|
|
12
|
-
children
|
|
13
|
-
...restProps
|
|
10
|
+
children
|
|
14
11
|
} = props;
|
|
15
|
-
return /*#__PURE__*/React.createElement(Box,
|
|
12
|
+
return /*#__PURE__*/React.createElement(Box, {
|
|
16
13
|
padding: ['xsmall', 'small'],
|
|
17
14
|
outline: true,
|
|
18
15
|
className: cx(css.root, className, css[kind])
|
|
19
|
-
},
|
|
16
|
+
}, children);
|
|
20
17
|
};
|
|
21
18
|
Alert.propTypes = {
|
|
22
19
|
className: PropTypes.string,
|
package/lib-esm/ui/icon/icon.js
CHANGED
|
@@ -5,13 +5,11 @@ import PropTypes from 'prop-types';
|
|
|
5
5
|
import cx from 'classnames';
|
|
6
6
|
import css from './icon.module.css';
|
|
7
7
|
const ICONS = {
|
|
8
|
-
ALERT_CIRCLE: 'alert-circle',
|
|
9
8
|
ARROW: 'arrow',
|
|
10
9
|
ARROW_RIGHT_CIRLCE: 'arrow-right-circle',
|
|
11
10
|
CANCEL: 'cancel',
|
|
12
11
|
CLOSE: 'close',
|
|
13
12
|
CLOCK: 'clock',
|
|
14
|
-
CHECK_CIRCLE: 'check-circle',
|
|
15
13
|
COMMIT: 'commit',
|
|
16
14
|
FILTER: 'filter',
|
|
17
15
|
HELP: 'help',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bundle-stats/ui",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.3-beta.1",
|
|
4
4
|
"description": "UI components for BundleStats projects.",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "lib-esm/index.js",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"homepage": "https://github.com/relative-ci/bundle-stats/blob/master/packages/ui#readme",
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@babel/cli": "7.17.6",
|
|
40
|
-
"@babel/core": "7.17.
|
|
40
|
+
"@babel/core": "7.17.8",
|
|
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",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"chromatic": "6.5.3",
|
|
58
58
|
"classnames": "2.3.1",
|
|
59
59
|
"colormap": "2.3.2",
|
|
60
|
-
"core-js": "3.
|
|
60
|
+
"core-js": "3.21.1",
|
|
61
61
|
"cross-env": "7.0.3",
|
|
62
62
|
"enzyme": "3.11.0",
|
|
63
63
|
"enzyme-adapter-react-16": "1.15.6",
|
|
@@ -85,12 +85,12 @@
|
|
|
85
85
|
"react-router-dom": "^5.0.0"
|
|
86
86
|
},
|
|
87
87
|
"dependencies": {
|
|
88
|
-
"@bundle-stats/utils": "^3.3.
|
|
88
|
+
"@bundle-stats/utils": "^3.3.3-beta.1",
|
|
89
89
|
"ariakit": "2.0.0-alpha.19",
|
|
90
|
-
"date-fns": "2.28.0",
|
|
91
|
-
"modern-css-reset": "1.4.0",
|
|
92
|
-
"query-string": "7.1.
|
|
93
|
-
"use-query-params": "1.2.3"
|
|
90
|
+
"date-fns": "^2.28.0",
|
|
91
|
+
"modern-css-reset": "^1.4.0",
|
|
92
|
+
"query-string": "^7.1.0",
|
|
93
|
+
"use-query-params": "^1.2.3"
|
|
94
94
|
},
|
|
95
|
-
"gitHead": "
|
|
95
|
+
"gitHead": "c502a4722cebce2ff4ecb0bf2bca1b687b908b00"
|
|
96
96
|
}
|