@bundle-stats/ui 4.13.0 → 4.13.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/lib/components/bundle-packages/bundle-packages.js +2 -2
- package/lib/components/bundle-packages/bundle-packages.js.map +1 -1
- package/lib/components/metric-run-info/metric-run-info.js +12 -8
- package/lib/components/metric-run-info/metric-run-info.js.map +1 -1
- package/lib/components/metric-run-info/metric-run-info.module.css +13 -0
- package/lib/components/metrics-treemap/metrics-treemap.js +1 -0
- package/lib/components/metrics-treemap/metrics-treemap.js.map +1 -1
- package/lib/components/metrics-treemap/metrics-treemap.module.css +5 -0
- package/lib/components/metrics-treemap/metrics-treemap.utils.js +16 -9
- package/lib/components/metrics-treemap/metrics-treemap.utils.js.map +1 -1
- package/lib/components/run-info/run-info.js +1 -1
- package/lib/components/run-info/run-info.js.map +1 -1
- package/lib/components/run-info/run-info.module.css +10 -3
- package/lib/css/variables.css +1 -0
- package/lib/ui/tooltip/tooltip.module.css +4 -3
- 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/metric-run-info/metric-run-info.js +12 -8
- package/lib-esm/components/metric-run-info/metric-run-info.js.map +1 -1
- package/lib-esm/components/metric-run-info/metric-run-info.module.css +13 -0
- package/lib-esm/components/metrics-treemap/metrics-treemap.js +1 -0
- package/lib-esm/components/metrics-treemap/metrics-treemap.js.map +1 -1
- package/lib-esm/components/metrics-treemap/metrics-treemap.module.css +5 -0
- package/lib-esm/components/metrics-treemap/metrics-treemap.utils.js +16 -9
- package/lib-esm/components/metrics-treemap/metrics-treemap.utils.js.map +1 -1
- package/lib-esm/components/run-info/run-info.js +1 -1
- package/lib-esm/components/run-info/run-info.js.map +1 -1
- package/lib-esm/components/run-info/run-info.module.css +10 -3
- package/lib-esm/css/variables.css +1 -0
- package/lib-esm/ui/tooltip/tooltip.module.css +4 -3
- package/package.json +4 -4
- package/src/components/bundle-packages/bundle-packages.jsx +1 -1
- package/src/components/metric-run-info/metric-run-info.module.css +13 -0
- package/src/components/metric-run-info/metric-run-info.stories.tsx +19 -0
- package/src/components/metric-run-info/metric-run-info.tsx +26 -11
- package/src/components/metrics-treemap/metrics-treemap.constants.ts +1 -1
- package/src/components/metrics-treemap/metrics-treemap.module.css +5 -0
- package/src/components/metrics-treemap/metrics-treemap.tsx +2 -0
- package/src/components/metrics-treemap/metrics-treemap.utils.ts +18 -11
- package/src/components/run-info/run-info.module.css +10 -3
- package/src/components/run-info/run-info.stories.tsx +1 -1
- package/src/components/run-info/run-info.tsx +9 -9
- package/src/css/variables.css +1 -0
- package/src/ui/tooltip/tooltip.module.css +4 -3
- package/types/components/metric-run-info/metric-run-info.d.ts +2 -1
- package/types/components/metrics-treemap/metrics-treemap.constants.d.ts +1 -1
- package/types/components/run-info/run-info.d.ts +7 -7
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useMemo } from 'react';
|
|
1
|
+
import React, { type ReactNode, useMemo } from 'react';
|
|
2
2
|
import cx from 'classnames';
|
|
3
3
|
|
|
4
4
|
import { Icon } from '../../ui/icon';
|
|
@@ -25,17 +25,17 @@ const getMetricParams = (value: string): [string, string?] => {
|
|
|
25
25
|
};
|
|
26
26
|
|
|
27
27
|
export interface RunInfoProps {
|
|
28
|
-
title?:
|
|
29
|
-
titleHoverCard?:
|
|
30
|
-
titleTooltip?:
|
|
31
|
-
current?:
|
|
28
|
+
title?: ReactNode;
|
|
29
|
+
titleHoverCard?: ReactNode;
|
|
30
|
+
titleTooltip?: ReactNode;
|
|
31
|
+
current?: ReactNode;
|
|
32
32
|
baseline?: string;
|
|
33
33
|
delta?: string;
|
|
34
34
|
deltaPercentage?: string;
|
|
35
35
|
deltaType?: string;
|
|
36
36
|
|
|
37
37
|
as?: React.ElementType;
|
|
38
|
-
size?: 'small' | 'medium' | 'large';
|
|
38
|
+
size?: 'small' | 'medium' | 'large' | 'xlarge';
|
|
39
39
|
|
|
40
40
|
showBaseline?: boolean;
|
|
41
41
|
loading?: boolean;
|
|
@@ -44,7 +44,7 @@ export interface RunInfoProps {
|
|
|
44
44
|
|
|
45
45
|
export const RunInfo = ({
|
|
46
46
|
className = '',
|
|
47
|
-
title =
|
|
47
|
+
title = null,
|
|
48
48
|
titleHoverCard = null,
|
|
49
49
|
titleTooltip = null,
|
|
50
50
|
current = '',
|
|
@@ -58,7 +58,7 @@ export const RunInfo = ({
|
|
|
58
58
|
loading = false,
|
|
59
59
|
enhance = false,
|
|
60
60
|
...restProps
|
|
61
|
-
}: RunInfoProps & React.ComponentProps<'div'>) => {
|
|
61
|
+
}: RunInfoProps & Omit<React.ComponentProps<'div'>, 'title'>) => {
|
|
62
62
|
const rootClassName = cx(
|
|
63
63
|
css.root,
|
|
64
64
|
className,
|
|
@@ -66,7 +66,7 @@ export const RunInfo = ({
|
|
|
66
66
|
(delta || deltaPercentage) && css.showDelta,
|
|
67
67
|
);
|
|
68
68
|
|
|
69
|
-
const currentValueParams: [
|
|
69
|
+
const currentValueParams: [ReactNode, string?] = useMemo(() => {
|
|
70
70
|
if (!enhance || typeof current !== 'string') {
|
|
71
71
|
return [current];
|
|
72
72
|
}
|
package/src/css/variables.css
CHANGED
|
@@ -11,15 +11,16 @@
|
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
.tooltip {
|
|
14
|
+
z-index: var(--layer-xxhigh);
|
|
14
15
|
padding: var(--space-xxxsmall) var(--space-xxsmall);
|
|
15
16
|
border-radius: var(--radius-small);
|
|
16
17
|
background: var(--color-light);
|
|
17
|
-
max-width:
|
|
18
|
+
max-width: 28em;
|
|
18
19
|
color: var(--color-text);
|
|
20
|
+
font-size: var(--size-xsmall);
|
|
21
|
+
text-align: center;
|
|
19
22
|
filter: drop-shadow(var(--shadow-layer));
|
|
20
23
|
will-change: filter;
|
|
21
|
-
font-size: var(--size-xsmall);
|
|
22
|
-
z-index: var(--layer-xxhigh);
|
|
23
24
|
}
|
|
24
25
|
|
|
25
26
|
.arrow svg {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { ElementType } from 'react';
|
|
2
2
|
import { RunInfoProps } from '../run-info';
|
|
3
3
|
export interface MetricRunInfoProps {
|
|
4
4
|
metricId: string;
|
|
@@ -7,6 +7,7 @@ export interface MetricRunInfoProps {
|
|
|
7
7
|
showDelta?: boolean;
|
|
8
8
|
showMetricDescription?: boolean;
|
|
9
9
|
showBaseline?: boolean;
|
|
10
|
+
titleWrapper?: ElementType;
|
|
10
11
|
size?: RunInfoProps['size'];
|
|
11
12
|
loading?: RunInfoProps['loading'];
|
|
12
13
|
}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { type ReactNode } from 'react';
|
|
2
2
|
export interface RunInfoProps {
|
|
3
|
-
title?:
|
|
4
|
-
titleHoverCard?:
|
|
5
|
-
titleTooltip?:
|
|
6
|
-
current?:
|
|
3
|
+
title?: ReactNode;
|
|
4
|
+
titleHoverCard?: ReactNode;
|
|
5
|
+
titleTooltip?: ReactNode;
|
|
6
|
+
current?: ReactNode;
|
|
7
7
|
baseline?: string;
|
|
8
8
|
delta?: string;
|
|
9
9
|
deltaPercentage?: string;
|
|
10
10
|
deltaType?: string;
|
|
11
11
|
as?: React.ElementType;
|
|
12
|
-
size?: 'small' | 'medium' | 'large';
|
|
12
|
+
size?: 'small' | 'medium' | 'large' | 'xlarge';
|
|
13
13
|
showBaseline?: boolean;
|
|
14
14
|
loading?: boolean;
|
|
15
15
|
enhance?: boolean;
|
|
16
16
|
}
|
|
17
|
-
export declare const RunInfo: ({ className, title, titleHoverCard, titleTooltip, current, baseline, delta, deltaPercentage, deltaType, as: Component, size, showBaseline, loading, enhance, ...restProps }: RunInfoProps & React.ComponentProps<'div'>) => React.JSX.Element;
|
|
17
|
+
export declare const RunInfo: ({ className, title, titleHoverCard, titleTooltip, current, baseline, delta, deltaPercentage, deltaType, as: Component, size, showBaseline, loading, enhance, ...restProps }: RunInfoProps & Omit<React.ComponentProps<'div'>, 'title'>) => React.JSX.Element;
|