@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.
Files changed (62) hide show
  1. package/lib/app/app.js +8 -21
  2. package/lib/app/app.stories.js +1 -22
  3. package/lib/app/header/header.js +2 -1
  4. package/lib/assets/icons.svg +0 -8
  5. package/lib/components/bundle-assets/bundle-assets.js +2 -1
  6. package/lib/components/bundle-assets-totals-table/bundle-assets-totals-table.js +7 -43
  7. package/lib/components/bundle-assets-totals-table/bundle-assets-totals-table.module.css +2 -2
  8. package/lib/components/bundle-assets-totals-table/bundle-assets-totals-table.stories.js +1 -20
  9. package/lib/components/bundle-modules/bundle-modules.js +1 -1
  10. package/lib/components/index.js +0 -8
  11. package/lib/components/summary/summary.js +7 -12
  12. package/lib/components/summary/summary.module.css +1 -1
  13. package/lib/components/summary/summary.stories.js +0 -29
  14. package/lib/components/summary-item/summary-item.js +5 -22
  15. package/lib/components/summary-item/summary-item.module.css +0 -11
  16. package/lib/components/summary-item/summary-item.stories.js +53 -51
  17. package/lib/constants.js +4 -4
  18. package/lib/ui/alert/alert.js +3 -13
  19. package/lib/ui/icon/icon.js +0 -2
  20. package/lib-esm/app/app.js +8 -20
  21. package/lib-esm/app/app.stories.js +1 -22
  22. package/lib-esm/app/header/header.js +2 -1
  23. package/lib-esm/assets/icons.svg +0 -8
  24. package/lib-esm/components/bundle-assets/bundle-assets.js +2 -1
  25. package/lib-esm/components/bundle-assets-totals-table/bundle-assets-totals-table.js +7 -24
  26. package/lib-esm/components/bundle-assets-totals-table/bundle-assets-totals-table.module.css +2 -2
  27. package/lib-esm/components/bundle-assets-totals-table/bundle-assets-totals-table.stories.js +0 -18
  28. package/lib-esm/components/bundle-modules/bundle-modules.js +1 -1
  29. package/lib-esm/components/index.js +0 -1
  30. package/lib-esm/components/summary/summary.js +7 -11
  31. package/lib-esm/components/summary/summary.module.css +1 -1
  32. package/lib-esm/components/summary/summary.stories.js +0 -27
  33. package/lib-esm/components/summary-item/summary-item.js +4 -20
  34. package/lib-esm/components/summary-item/summary-item.module.css +0 -11
  35. package/lib-esm/components/summary-item/summary-item.stories.js +38 -50
  36. package/lib-esm/constants.js +4 -4
  37. package/lib-esm/ui/alert/alert.js +3 -6
  38. package/lib-esm/ui/icon/icon.js +0 -2
  39. package/package.json +9 -9
  40. package/src/components/bundle-modules/bundle-modules.jsx +1 -1
  41. package/build-storybook.log +0 -4691
  42. package/lib/assets/icons/alert-circle.svg +0 -1
  43. package/lib/assets/icons/check-circle.svg +0 -1
  44. package/lib/components/budget-info/budget-info.js +0 -80
  45. package/lib/components/budget-info/budget-info.module.css +0 -40
  46. package/lib/components/budget-info/budget-info.stories.js +0 -44
  47. package/lib/components/budget-info/index.js +0 -18
  48. package/lib/components/budget-insights/budget-insights.js +0 -200
  49. package/lib/components/budget-insights/budget-insights.module.css +0 -53
  50. package/lib/components/budget-insights/budget-insights.stories.js +0 -104
  51. package/lib/components/budget-insights/index.js +0 -18
  52. package/lib-esm/assets/icons/alert-circle.svg +0 -1
  53. package/lib-esm/assets/icons/check-circle.svg +0 -1
  54. package/lib-esm/components/budget-info/budget-info.js +0 -58
  55. package/lib-esm/components/budget-info/budget-info.module.css +0 -40
  56. package/lib-esm/components/budget-info/budget-info.stories.js +0 -30
  57. package/lib-esm/components/budget-info/index.js +0 -1
  58. package/lib-esm/components/budget-insights/budget-insights.js +0 -148
  59. package/lib-esm/components/budget-insights/budget-insights.module.css +0 -53
  60. package/lib-esm/components/budget-insights/budget-insights.stories.js +0 -84
  61. package/lib-esm/components/budget-insights/index.js +0 -1
  62. 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 BudgetError = Template.bind();
37
- BudgetError.args = {
38
- showMetricDescription: true,
39
- budget: {
40
- currentValue: 120 * 1000,
41
- budgetValue: 100 * 1000,
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 BudgetSuccess = Template.bind();
46
- BudgetSuccess.args = {
47
- showMetricDescription: true,
48
- budget: {
49
- currentValue: 120 * 1000,
50
- budgetValue: 120 * 1024,
51
- failed: false
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 Loading = Template.bind();
55
- Loading.args = {
56
- loading: true
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
+ });
@@ -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, _extends({
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
- }, restProps), children);
16
+ }, children);
20
17
  };
21
18
  Alert.propTypes = {
22
19
  className: PropTypes.string,
@@ -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.1-beta.8",
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.7",
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.20.2",
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.1-beta.8",
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.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": "f9c5ac2bd0cd6019e8a32586fe4c23b38757efe9"
95
+ "gitHead": "c502a4722cebce2ff4ecb0bf2bca1b687b908b00"
96
96
  }
@@ -131,7 +131,7 @@ export const BundleModules = ({
131
131
  disabled: jobs.length <= 1,
132
132
  },
133
133
  [MODULE_FILTERS.DUPLICATED]: {
134
- label: 'Duplicated',
134
+ label: 'Duplicate',
135
135
  defaultValue: filters[MODULE_FILTERS.DUPLICATED],
136
136
  disabled: jobs.length <= 1,
137
137
  },