@bundle-stats/ui 4.23.0-beta.5 → 4.23.0-beta.7
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 +2 -1
- package/lib/app/app.js.map +1 -1
- package/lib/app/app.module.css +0 -5
- package/lib/chart-colors.json +44 -58
- package/lib/components/asset-name/asset-name.js +3 -3
- package/lib/components/asset-name/asset-name.js.map +1 -1
- package/lib/components/asset-name/asset-name.module.css +0 -9
- package/lib/components/bundle-modules/bundle-modules.js +1 -1
- package/lib/components/bundle-modules/bundle-modules.js.map +1 -1
- package/lib/components/bundle-modules/bundle-modules.module.css +0 -6
- package/lib/components/bundle-packages/bundle-packages.js +1 -1
- package/lib/components/bundle-packages/bundle-packages.js.map +1 -1
- package/lib/components/bundle-packages/bundle-packages.module.css +0 -3
- package/lib/components/jobs-header/jobs-header.js +1 -1
- package/lib/components/jobs-header/jobs-header.js.map +1 -1
- package/lib/components/jobs-header/jobs-header.module.css +0 -1
- package/lib/components/metrics-treemap/metrics-treemap.js +6 -4
- package/lib/components/metrics-treemap/metrics-treemap.js.map +1 -1
- package/lib/components/metrics-treemap/metrics-treemap.module.css +0 -7
- package/lib/components/summary/summary.js +5 -4
- package/lib/components/summary/summary.js.map +1 -1
- package/lib/components/summary/summary.module.css +0 -11
- package/lib/css/variables.css +11 -10
- package/lib/ui/button/button.module.css +6 -1
- package/lib/ui/control-group/control-group.js +1 -1
- package/lib/ui/control-group/control-group.js.map +1 -1
- package/lib/ui/filters/filters.js +1 -1
- package/lib/ui/filters/filters.js.map +1 -1
- package/lib/ui/toolbar/toolbar.js +2 -1
- package/lib/ui/toolbar/toolbar.js.map +1 -1
- package/lib/ui/toolbar/toolbar.module.css +0 -6
- package/lib-esm/app/app.js +2 -1
- package/lib-esm/app/app.js.map +1 -1
- package/lib-esm/app/app.module.css +0 -5
- package/lib-esm/chart-colors.json +44 -58
- package/lib-esm/components/asset-name/asset-name.js +3 -3
- package/lib-esm/components/asset-name/asset-name.js.map +1 -1
- package/lib-esm/components/asset-name/asset-name.module.css +0 -9
- package/lib-esm/components/bundle-modules/bundle-modules.js +1 -1
- package/lib-esm/components/bundle-modules/bundle-modules.js.map +1 -1
- package/lib-esm/components/bundle-modules/bundle-modules.module.css +0 -6
- package/lib-esm/components/bundle-packages/bundle-packages.js +1 -1
- package/lib-esm/components/bundle-packages/bundle-packages.js.map +1 -1
- package/lib-esm/components/bundle-packages/bundle-packages.module.css +0 -3
- package/lib-esm/components/jobs-header/jobs-header.js +1 -1
- package/lib-esm/components/jobs-header/jobs-header.js.map +1 -1
- package/lib-esm/components/jobs-header/jobs-header.module.css +0 -1
- package/lib-esm/components/metrics-treemap/metrics-treemap.js +6 -4
- package/lib-esm/components/metrics-treemap/metrics-treemap.js.map +1 -1
- package/lib-esm/components/metrics-treemap/metrics-treemap.module.css +0 -7
- package/lib-esm/components/summary/summary.js +5 -4
- package/lib-esm/components/summary/summary.js.map +1 -1
- package/lib-esm/components/summary/summary.module.css +0 -11
- package/lib-esm/css/variables.css +11 -10
- package/lib-esm/ui/button/button.module.css +6 -1
- package/lib-esm/ui/control-group/control-group.js +1 -1
- package/lib-esm/ui/control-group/control-group.js.map +1 -1
- package/lib-esm/ui/filters/filters.js +1 -1
- package/lib-esm/ui/filters/filters.js.map +1 -1
- package/lib-esm/ui/toolbar/toolbar.js +2 -1
- package/lib-esm/ui/toolbar/toolbar.js.map +1 -1
- package/lib-esm/ui/toolbar/toolbar.module.css +0 -6
- package/package.json +3 -3
- package/src/app/app.jsx +3 -2
- package/src/app/app.module.css +0 -5
- package/src/chart-colors.json +44 -58
- package/src/components/asset-name/asset-name.module.css +0 -9
- package/src/components/asset-name/asset-name.tsx +12 -5
- package/src/components/bundle-modules/bundle-modules.module.css +0 -6
- package/src/components/bundle-modules/bundle-modules.tsx +2 -2
- package/src/components/bundle-packages/bundle-packages.jsx +9 -2
- package/src/components/bundle-packages/bundle-packages.module.css +0 -3
- package/src/components/jobs-header/jobs-header.module.css +0 -1
- package/src/components/jobs-header/jobs-header.tsx +2 -2
- package/src/components/metrics-treemap/metrics-treemap.module.css +0 -7
- package/src/components/metrics-treemap/metrics-treemap.tsx +18 -7
- package/src/components/summary/summary.module.css +0 -11
- package/src/components/summary/summary.tsx +9 -8
- package/src/css/variables.css +11 -10
- package/src/ui/button/button.module.css +6 -1
- package/src/ui/button/button.stories.tsx +1 -1
- package/src/ui/control-group/control-group.tsx +1 -1
- package/src/ui/filters/filters.tsx +1 -6
- package/src/ui/toolbar/toolbar.jsx +4 -1
- package/src/ui/toolbar/toolbar.module.css +0 -6
|
@@ -76,7 +76,7 @@ export const JobsHeader = (props: JobsHeaderProps & React.ComponentProps<'header
|
|
|
76
76
|
const rootClassName = cx(css.root, className);
|
|
77
77
|
|
|
78
78
|
return (
|
|
79
|
-
<header className={rootClassName}>
|
|
79
|
+
<FlexStack as="header" className={rootClassName}>
|
|
80
80
|
{jobs?.map((job, index) => (
|
|
81
81
|
<Item
|
|
82
82
|
key={job.internalBuildNumber || index}
|
|
@@ -84,6 +84,6 @@ export const JobsHeader = (props: JobsHeaderProps & React.ComponentProps<'header
|
|
|
84
84
|
tag={index === 0 ? I18N.CURRENT : I18N.BASELINE}
|
|
85
85
|
/>
|
|
86
86
|
))}
|
|
87
|
-
</
|
|
87
|
+
</FlexStack>
|
|
88
88
|
);
|
|
89
89
|
};
|
|
@@ -163,11 +163,7 @@
|
|
|
163
163
|
z-index: 1;
|
|
164
164
|
width: 100%;
|
|
165
165
|
height: 100%;
|
|
166
|
-
display: flex;
|
|
167
|
-
flex-flow: column;
|
|
168
|
-
justify-content: center;
|
|
169
166
|
padding: var(--space-xxsmall);
|
|
170
|
-
gap: var(--space-xxxsmall);
|
|
171
167
|
line-height: var(--line-height-heading);
|
|
172
168
|
cursor: default;
|
|
173
169
|
}
|
|
@@ -284,9 +280,6 @@
|
|
|
284
280
|
top: 0;
|
|
285
281
|
width: 100%;
|
|
286
282
|
height: 100%;
|
|
287
|
-
display: flex;
|
|
288
|
-
align-items: center;
|
|
289
|
-
justify-content: center;
|
|
290
283
|
}
|
|
291
284
|
|
|
292
285
|
.emptyMessageWrapper {
|
|
@@ -20,6 +20,7 @@ import {
|
|
|
20
20
|
getMetricRunInfo,
|
|
21
21
|
} from '@bundle-stats/utils';
|
|
22
22
|
|
|
23
|
+
import { FlexStack } from '../../layout/flex-stack';
|
|
23
24
|
import { Stack } from '../../layout/stack';
|
|
24
25
|
import { FileName } from '../../ui/file-name';
|
|
25
26
|
import { Delta } from '../delta';
|
|
@@ -110,12 +111,22 @@ interface TileContentProps {
|
|
|
110
111
|
runInfo: MetricRunInfo;
|
|
111
112
|
}
|
|
112
113
|
|
|
114
|
+
const TileContentContainer = (props: ComponentProps<'div'>) => (
|
|
115
|
+
<FlexStack
|
|
116
|
+
direction="column"
|
|
117
|
+
justifyContent="center"
|
|
118
|
+
gap="xxxsmall"
|
|
119
|
+
className={css.tileContent}
|
|
120
|
+
{...props}
|
|
121
|
+
/>
|
|
122
|
+
);
|
|
123
|
+
|
|
113
124
|
const TileContent = (props: TileContentProps) => {
|
|
114
125
|
const { label, sizeDisplay, item, runInfo } = props;
|
|
115
126
|
|
|
116
127
|
// Render only the container
|
|
117
128
|
if (sizeDisplay === 'minimal') {
|
|
118
|
-
return <
|
|
129
|
+
return <TileContentContainer />;
|
|
119
130
|
}
|
|
120
131
|
|
|
121
132
|
const resolvedLabel = label || item.label;
|
|
@@ -123,14 +134,14 @@ const TileContent = (props: TileContentProps) => {
|
|
|
123
134
|
// Render only the label
|
|
124
135
|
if (sizeDisplay === 'small') {
|
|
125
136
|
return (
|
|
126
|
-
<
|
|
137
|
+
<TileContentContainer>
|
|
127
138
|
<p className={css.tileContentLabel}>{resolvedLabel}</p>
|
|
128
|
-
</
|
|
139
|
+
</TileContentContainer>
|
|
129
140
|
);
|
|
130
141
|
}
|
|
131
142
|
|
|
132
143
|
return (
|
|
133
|
-
<
|
|
144
|
+
<TileContentContainer>
|
|
134
145
|
<p className={css.tileContentLabel}>{label || item.label}</p>
|
|
135
146
|
<p className={css.tileContentValue}>
|
|
136
147
|
<span className={css.tileContentMetric}>{runInfo.displayValue}</span>
|
|
@@ -140,7 +151,7 @@ const TileContent = (props: TileContentProps) => {
|
|
|
140
151
|
deltaType={runInfo.deltaType}
|
|
141
152
|
/>
|
|
142
153
|
</p>
|
|
143
|
-
</
|
|
154
|
+
</TileContentContainer>
|
|
144
155
|
);
|
|
145
156
|
};
|
|
146
157
|
|
|
@@ -585,9 +596,9 @@ export const MetricsTreemap = (props: MetricsTreemapProps & ComponentProps<'div'
|
|
|
585
596
|
{canvasContent}
|
|
586
597
|
</div>
|
|
587
598
|
) : (
|
|
588
|
-
<
|
|
599
|
+
<FlexStack alignItems="center" justifyContent="center" className={css.emptyMessage}>
|
|
589
600
|
<div className={css.emptyMessageWrapper}>{emptyMessage}</div>
|
|
590
|
-
</
|
|
601
|
+
</FlexStack>
|
|
591
602
|
)}
|
|
592
603
|
{tooltipNode && (
|
|
593
604
|
<Tooltip state={tooltipState} className={css.tooltip}>
|
|
@@ -5,10 +5,6 @@
|
|
|
5
5
|
|
|
6
6
|
.row {
|
|
7
7
|
width: 100%;
|
|
8
|
-
display: flex;
|
|
9
|
-
align-items: stretch;
|
|
10
|
-
flex-wrap: wrap;
|
|
11
|
-
gap: var(--space-small);
|
|
12
8
|
}
|
|
13
9
|
|
|
14
10
|
.rowGroup {
|
|
@@ -26,13 +22,6 @@
|
|
|
26
22
|
margin-top: var(--summary-gap);
|
|
27
23
|
}
|
|
28
24
|
|
|
29
|
-
.items {
|
|
30
|
-
display: flex;
|
|
31
|
-
align-items: stretch;
|
|
32
|
-
flex-wrap: wrap;
|
|
33
|
-
gap: var(--space-medium);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
25
|
.item {
|
|
37
26
|
flex: 1 1 10%; /* force equal sizes */
|
|
38
27
|
min-width: 8em;
|
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
METRICS_WEBPACK_GENERAL,
|
|
11
11
|
} from '../../constants';
|
|
12
12
|
import { Box } from '../../layout/box';
|
|
13
|
+
import { FlexStack } from '../../layout/flex-stack';
|
|
13
14
|
import { ComponentLink } from '../component-link';
|
|
14
15
|
import { MetricRunInfo, MetricRunInfoProps } from '../metric-run-info';
|
|
15
16
|
import css from './summary.module.css';
|
|
@@ -77,9 +78,9 @@ export const Summary = ({
|
|
|
77
78
|
summaryItemLink = ComponentLink,
|
|
78
79
|
}: SummaryProps & React.ComponentProps<'div'>) => (
|
|
79
80
|
<Box className={cx(css.root, className)}>
|
|
80
|
-
<
|
|
81
|
+
<FlexStack wrap="wrap" gap="small" className={css.row}>
|
|
81
82
|
<Box outline padding="small" className={css.rowGroup}>
|
|
82
|
-
<
|
|
83
|
+
<FlexStack wrap="wrap" gap="medium">
|
|
83
84
|
{METRICS_WEBPACK_GENERAL.map((metricId) => (
|
|
84
85
|
<SummaryItem
|
|
85
86
|
key={metricId}
|
|
@@ -93,15 +94,15 @@ export const Summary = ({
|
|
|
93
94
|
showBaseline={showSummaryItemBaseline}
|
|
94
95
|
/>
|
|
95
96
|
))}
|
|
96
|
-
</
|
|
97
|
+
</FlexStack>
|
|
97
98
|
</Box>
|
|
98
|
-
</
|
|
99
|
-
<
|
|
99
|
+
</FlexStack>
|
|
100
|
+
<FlexStack wrap="wrap" gap="small" className={css.row}>
|
|
100
101
|
{[METRICS_GROUP_ASSETS, METRICS_GROUP_MODULES, METRICS_GROUP_PACKAGES].map((metricGroup) => (
|
|
101
102
|
<Stack className={css.rowGroup} key={metricGroup.title}>
|
|
102
103
|
<h3 className={css.rowGroupTitle}>{metricGroup.title}</h3>
|
|
103
104
|
<Box outline padding="small">
|
|
104
|
-
<
|
|
105
|
+
<FlexStack wrap="wrap" gap="medium">
|
|
105
106
|
{metricGroup.metrics.map((metricId) => (
|
|
106
107
|
<SummaryItem
|
|
107
108
|
key={metricId}
|
|
@@ -115,10 +116,10 @@ export const Summary = ({
|
|
|
115
116
|
showBaseline={showSummaryItemBaseline}
|
|
116
117
|
/>
|
|
117
118
|
))}
|
|
118
|
-
</
|
|
119
|
+
</FlexStack>
|
|
119
120
|
</Box>
|
|
120
121
|
</Stack>
|
|
121
122
|
))}
|
|
122
|
-
</
|
|
123
|
+
</FlexStack>
|
|
123
124
|
</Box>
|
|
124
125
|
);
|
package/src/css/variables.css
CHANGED
|
@@ -111,17 +111,17 @@
|
|
|
111
111
|
--color-green-ultra-dark: var(--color-green-900);
|
|
112
112
|
|
|
113
113
|
--color-yellow-25: #fffdf2;
|
|
114
|
-
/* https://hihayk.github.io/scale/#4/5/
|
|
114
|
+
/* https://hihayk.github.io/scale/#4/5/20/80/0/-0/0/0/E5C110/229/193/16/white */
|
|
115
115
|
--color-yellow-50: #faf3cf;
|
|
116
116
|
--color-yellow-100: #f6e9a9;
|
|
117
117
|
--color-yellow-200: #f2df83;
|
|
118
118
|
--color-yellow-300: #edd55d;
|
|
119
119
|
--color-yellow-400: #e9cb36;
|
|
120
120
|
--color-yellow-500: #e5c110;
|
|
121
|
-
--color-yellow-600: #
|
|
122
|
-
--color-yellow-700: #
|
|
123
|
-
--color-yellow-800: #
|
|
124
|
-
--color-yellow-900: #
|
|
121
|
+
--color-yellow-600: #dab70f;
|
|
122
|
+
--color-yellow-700: #ceae0e;
|
|
123
|
+
--color-yellow-800: #c3a40e;
|
|
124
|
+
--color-yellow-900: #b79a0d;
|
|
125
125
|
|
|
126
126
|
--color-yellow-ultra-light: var(--color-yellow-100);
|
|
127
127
|
--color-yellow-light: var(--color-yellow-300);
|
|
@@ -132,9 +132,10 @@
|
|
|
132
132
|
--color-dark: #111;
|
|
133
133
|
--color-light: #fff;
|
|
134
134
|
|
|
135
|
-
|
|
135
|
+
/* https://hihayk.github.io/scale/#4/4/40/40/0/-0/0/0/1a477f/26/71/127/white */
|
|
136
|
+
--color-branding-light: #31598c;
|
|
136
137
|
--color-branding: #1a477f;
|
|
137
|
-
--color-branding-dark: #
|
|
138
|
+
--color-branding-dark: #102b4c;
|
|
138
139
|
}
|
|
139
140
|
|
|
140
141
|
body {
|
|
@@ -146,9 +147,9 @@ body {
|
|
|
146
147
|
--color-text-ultra-dark: var(--color-gray-ultra-dark);
|
|
147
148
|
--color-heading: var(--color-gray-ultra-dark);
|
|
148
149
|
|
|
149
|
-
--color-accent-light: var(--color-
|
|
150
|
-
--color-accent: var(--color-
|
|
151
|
-
--color-accent-dark: var(--color-
|
|
150
|
+
--color-accent-light: var(--color-branding-light);
|
|
151
|
+
--color-accent: var(--color-branding);
|
|
152
|
+
--color-accent-dark: var(--color-branding-dark);
|
|
152
153
|
|
|
153
154
|
--color-success-light: var(--color-green-light);
|
|
154
155
|
--color-success: var(--color-green);
|
|
@@ -19,7 +19,7 @@ export default meta;
|
|
|
19
19
|
type Story = StoryObj<typeof meta>;
|
|
20
20
|
|
|
21
21
|
const Items = (props: React.ComponentProps<typeof FlexStack>) => (
|
|
22
|
-
<FlexStack alignItems="top"
|
|
22
|
+
<FlexStack alignItems="top" wrap="wrap" gap="xsmall" {...props} />
|
|
23
23
|
);
|
|
24
24
|
|
|
25
25
|
export const Default: Story = {};
|
|
@@ -20,12 +20,7 @@ const Filter = (props: FilterBooleanProps) => {
|
|
|
20
20
|
const { className = '', label, name, ...inputProps } = props;
|
|
21
21
|
|
|
22
22
|
return (
|
|
23
|
-
<FlexStack
|
|
24
|
-
space="xxxsmall"
|
|
25
|
-
alignItems="center"
|
|
26
|
-
as="label"
|
|
27
|
-
className={cx(css.filter, className)}
|
|
28
|
-
>
|
|
23
|
+
<FlexStack gap="xxxsmall" alignItems="center" as="label" className={cx(css.filter, className)}>
|
|
29
24
|
<input
|
|
30
25
|
type="checkbox"
|
|
31
26
|
id={`filter-${name}`}
|
|
@@ -2,6 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import cx from 'classnames';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
|
|
5
|
+
import { FlexStack } from '../../layout/flex-stack';
|
|
5
6
|
import css from './toolbar.module.css';
|
|
6
7
|
|
|
7
8
|
export const Toolbar = (props) => {
|
|
@@ -12,7 +13,9 @@ export const Toolbar = (props) => {
|
|
|
12
13
|
<div className={rootClassName}>
|
|
13
14
|
<div className={css.content}>{children}</div>
|
|
14
15
|
{renderActions && (
|
|
15
|
-
<
|
|
16
|
+
<FlexStack gap="xsmall" alignItems="center" className={css.actions}>
|
|
17
|
+
{renderActions({ actionClassName: css.action })}
|
|
18
|
+
</FlexStack>
|
|
16
19
|
)}
|
|
17
20
|
</div>
|
|
18
21
|
);
|
|
@@ -6,18 +6,12 @@
|
|
|
6
6
|
|
|
7
7
|
.actions {
|
|
8
8
|
margin-top: var(--space-xsmall);
|
|
9
|
-
display: flex;
|
|
10
|
-
align-items: center;
|
|
11
9
|
}
|
|
12
10
|
|
|
13
11
|
.action {
|
|
14
12
|
flex: 0 0 auto;
|
|
15
13
|
}
|
|
16
14
|
|
|
17
|
-
.action + .action {
|
|
18
|
-
margin-left: var(--space-xsmall);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
15
|
@media (min-width: 768px) {
|
|
22
16
|
.root {
|
|
23
17
|
display: flex;
|