@bundle-stats/ui 3.2.6-beta.1 → 3.2.6-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 +3 -1
- package/lib/components/bundle-assets/bundle-assets.js +8 -6
- package/lib/components/bundle-assets/bundle-assets.module.css +5 -0
- package/lib/components/bundle-modules/bundle-modules.js +4 -5
- package/lib/components/bundle-packages/bundle-packages.js +6 -4
- package/lib/components/bundle-packages/bundle-packages.module.css +4 -0
- package/lib/components/metrics-table-title/metrics-table-title.js +9 -7
- package/lib/components/metrics-table-title/metrics-table-title.module.css +2 -0
- package/lib/components/module-info/module-info.module.css +1 -0
- package/lib/components/summary-item/summary-item.js +14 -17
- package/lib/components/summary-item/summary-item.module.css +1 -19
- package/lib/components/total-size-type-title/total-size-type-title.js +7 -3
- package/lib/css/variables.css +1 -1
- package/lib/hooks/search-params.js +6 -6
- package/lib/ui/dropdown/dropdown.js +15 -24
- package/lib/ui/dropdown/dropdown.module.css +7 -7
- package/lib/ui/dropdown/dropdown.stories.js +2 -9
- package/lib/ui/hover-card/hover-card.js +100 -0
- package/lib/ui/hover-card/hover-card.module.css +52 -0
- package/lib/ui/hover-card/hover-card.stories.js +56 -0
- package/lib/ui/{popover → hover-card}/index.js +4 -4
- package/lib/ui/icon/icon.js +6 -6
- package/lib/ui/index.js +0 -8
- package/lib/ui/tooltip/tooltip.js +10 -9
- package/lib-esm/components/bundle-assets/bundle-assets.js +8 -6
- package/lib-esm/components/bundle-assets/bundle-assets.module.css +5 -0
- package/lib-esm/components/bundle-modules/bundle-modules.js +4 -5
- package/lib-esm/components/bundle-packages/bundle-packages.js +6 -4
- package/lib-esm/components/bundle-packages/bundle-packages.module.css +4 -0
- package/lib-esm/components/metrics-table-title/metrics-table-title.js +8 -7
- package/lib-esm/components/metrics-table-title/metrics-table-title.module.css +2 -0
- package/lib-esm/components/module-info/module-info.module.css +1 -0
- package/lib-esm/components/summary-item/summary-item.js +13 -17
- package/lib-esm/components/summary-item/summary-item.module.css +1 -19
- package/lib-esm/components/total-size-type-title/total-size-type-title.js +6 -3
- package/lib-esm/css/variables.css +1 -1
- package/lib-esm/hooks/search-params.js +6 -6
- package/lib-esm/ui/dropdown/dropdown.js +14 -23
- package/lib-esm/ui/dropdown/dropdown.module.css +7 -7
- package/lib-esm/ui/dropdown/dropdown.stories.js +2 -7
- package/lib-esm/ui/hover-card/hover-card.js +86 -0
- package/lib-esm/ui/hover-card/hover-card.module.css +52 -0
- package/lib-esm/ui/hover-card/hover-card.stories.js +35 -0
- package/lib-esm/ui/hover-card/index.js +1 -0
- package/lib-esm/ui/icon/icon.js +3 -3
- package/lib-esm/ui/index.js +0 -1
- package/lib-esm/ui/tooltip/tooltip.js +10 -9
- package/package.json +5 -5
- package/src/components/bundle-assets/bundle-assets.jsx +38 -36
- package/src/components/bundle-assets/bundle-assets.module.css +5 -0
- package/src/components/bundle-modules/bundle-modules.jsx +24 -14
- package/src/components/bundle-packages/bundle-packages.jsx +11 -3
- package/src/components/bundle-packages/bundle-packages.module.css +4 -0
- package/src/components/metrics-table-title/metrics-table-title.jsx +20 -21
- package/src/components/metrics-table-title/metrics-table-title.module.css +2 -0
- package/src/components/module-info/module-info.jsx +1 -5
- package/src/components/module-info/module-info.module.css +1 -0
- package/src/components/summary-item/summary-item.jsx +20 -26
- package/src/components/summary-item/summary-item.module.css +1 -19
- package/src/components/total-size-type-title/total-size-type-title.jsx +6 -9
- package/src/css/variables.css +1 -1
- package/src/hooks/search-params.js +18 -11
- package/src/ui/dropdown/dropdown.jsx +9 -17
- package/src/ui/dropdown/dropdown.module.css +7 -7
- package/src/ui/hover-card/hover-card.jsx +79 -0
- package/src/ui/hover-card/hover-card.module.css +52 -0
- package/src/ui/hover-card/index.js +1 -0
- package/src/ui/icon/icon.jsx +11 -7
- package/src/ui/index.js +0 -1
- package/src/ui/tooltip/tooltip.jsx +10 -14
- package/lib/ui/popover/popover.js +0 -92
- package/lib/ui/popover/popover.module.css +0 -66
- package/lib/ui/popover/popover.stories.js +0 -26
- package/lib-esm/ui/popover/index.js +0 -1
- package/lib-esm/ui/popover/popover.js +0 -71
- package/lib-esm/ui/popover/popover.module.css +0 -66
- package/lib-esm/ui/popover/popover.stories.js +0 -14
- package/src/ui/popover/index.js +0 -1
- package/src/ui/popover/popover.jsx +0 -79
- package/src/ui/popover/popover.module.css +0 -66
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
.root {
|
|
2
|
+
display: inline-block;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.button {
|
|
2
6
|
background: none;
|
|
3
7
|
border: none;
|
|
4
8
|
padding: 0;
|
|
@@ -18,9 +22,9 @@
|
|
|
18
22
|
color: var(--color-text-light);
|
|
19
23
|
}
|
|
20
24
|
|
|
21
|
-
.
|
|
22
|
-
.
|
|
23
|
-
.
|
|
25
|
+
.button:hover,
|
|
26
|
+
.button:focus,
|
|
27
|
+
.button:active {
|
|
24
28
|
outline: none;
|
|
25
29
|
box-shadow: 0 0 var(--space-xxxsmall) var(--color-shadow);
|
|
26
30
|
border-color: var(--color-outline-dark);
|
|
@@ -44,10 +48,6 @@
|
|
|
44
48
|
box-shadow: 0 2px var(--space-xsmall) var(--color-shadow);
|
|
45
49
|
}
|
|
46
50
|
|
|
47
|
-
.activeLabel .label {
|
|
48
|
-
color: var(--color-text);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
51
|
.menuItem {
|
|
52
52
|
display: block;
|
|
53
53
|
appearance: none;
|
|
@@ -8,20 +8,15 @@ stories.add('default', () => /*#__PURE__*/React.createElement(Dropdown, {
|
|
|
8
8
|
glyph: "filter",
|
|
9
9
|
label: "Toggle"
|
|
10
10
|
}, /*#__PURE__*/React.createElement("ul", null, /*#__PURE__*/React.createElement("li", null, "Option 1"), /*#__PURE__*/React.createElement("li", null, "Option 2"))));
|
|
11
|
-
stories.add('with right alignement', () => /*#__PURE__*/React.createElement(Dropdown, {
|
|
12
|
-
glyph: "filter",
|
|
13
|
-
label: "Toggle",
|
|
14
|
-
align: "right"
|
|
15
|
-
}, /*#__PURE__*/React.createElement("ul", null, /*#__PURE__*/React.createElement("li", null, "Option 1"), /*#__PURE__*/React.createElement("li", null, "Option 2"))));
|
|
16
11
|
stories.add('with render function', () => /*#__PURE__*/React.createElement(Dropdown, {
|
|
17
12
|
glyph: "filter",
|
|
18
13
|
label: "Toggle"
|
|
19
14
|
}, _ref => {
|
|
20
15
|
let {
|
|
21
|
-
|
|
16
|
+
menu
|
|
22
17
|
} = _ref;
|
|
23
18
|
return /*#__PURE__*/React.createElement("button", {
|
|
24
19
|
type: "button",
|
|
25
|
-
onClick:
|
|
20
|
+
onClick: menu.toggle
|
|
26
21
|
}, "Toggle dropdown");
|
|
27
22
|
}));
|
|
@@ -0,0 +1,86 @@
|
|
|
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 { Hovercard, HovercardAnchor, HovercardArrow, useHovercard, useHovercardState } from 'ariakit/hovercard';
|
|
7
|
+
import { Icon } from '../icon';
|
|
8
|
+
import css from './hover-card.module.css';
|
|
9
|
+
|
|
10
|
+
const resolveComponent = (as, href) => {
|
|
11
|
+
if (as) {
|
|
12
|
+
return as;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
if (href) {
|
|
16
|
+
return 'a';
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
return 'span';
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export const HoverCard = props => {
|
|
23
|
+
const {
|
|
24
|
+
className,
|
|
25
|
+
href,
|
|
26
|
+
as,
|
|
27
|
+
label,
|
|
28
|
+
children
|
|
29
|
+
} = props;
|
|
30
|
+
const state = useHovercardState({
|
|
31
|
+
gutter: 8
|
|
32
|
+
});
|
|
33
|
+
const hoverCardProps = useHovercard({
|
|
34
|
+
state,
|
|
35
|
+
portal: true
|
|
36
|
+
}); // Fallback to span if no href
|
|
37
|
+
|
|
38
|
+
const Component = resolveComponent(as, href);
|
|
39
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
40
|
+
className: cx(css.root, className)
|
|
41
|
+
}, /*#__PURE__*/React.createElement(HovercardAnchor, {
|
|
42
|
+
state: state,
|
|
43
|
+
href: href,
|
|
44
|
+
className: css.anchor,
|
|
45
|
+
as: Component
|
|
46
|
+
}, label), /*#__PURE__*/React.createElement(Hovercard, _extends({}, hoverCardProps, {
|
|
47
|
+
state: state,
|
|
48
|
+
className: css.hoverCard,
|
|
49
|
+
style: {
|
|
50
|
+
zIndex: 10000
|
|
51
|
+
}
|
|
52
|
+
}), /*#__PURE__*/React.createElement(HovercardArrow, {
|
|
53
|
+
size: 24
|
|
54
|
+
}), typeof children === 'function' ? children({
|
|
55
|
+
close: state.hide
|
|
56
|
+
}) : children, /*#__PURE__*/React.createElement(Icon, {
|
|
57
|
+
glyph: "close",
|
|
58
|
+
size: "small",
|
|
59
|
+
as: "button",
|
|
60
|
+
type: "button",
|
|
61
|
+
className: css.closeBtn,
|
|
62
|
+
onClick: state.hide
|
|
63
|
+
})));
|
|
64
|
+
};
|
|
65
|
+
HoverCard.propTypes = {
|
|
66
|
+
/** Adopted child class name */
|
|
67
|
+
className: PropTypes.string,
|
|
68
|
+
|
|
69
|
+
/** Anchor label */
|
|
70
|
+
label: PropTypes.node,
|
|
71
|
+
|
|
72
|
+
/** Anchor href */
|
|
73
|
+
href: PropTypes.string,
|
|
74
|
+
|
|
75
|
+
/** Anchor component */
|
|
76
|
+
as: PropTypes.elementType,
|
|
77
|
+
|
|
78
|
+
/** Hover card component */
|
|
79
|
+
children: PropTypes.oneOfType([PropTypes.node, PropTypes.func]).isRequired
|
|
80
|
+
};
|
|
81
|
+
HoverCard.defaultProps = {
|
|
82
|
+
className: '',
|
|
83
|
+
label: '',
|
|
84
|
+
as: '',
|
|
85
|
+
href: ''
|
|
86
|
+
};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
.root {
|
|
2
|
+
display: inline-block;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.anchor {
|
|
6
|
+
display: inline-block;
|
|
7
|
+
color: inherit;
|
|
8
|
+
text-decoration: none;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
a.anchor,
|
|
12
|
+
buton.anchor {
|
|
13
|
+
cursor: pointer;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
a.anchor:hover,
|
|
17
|
+
button.anchor:hover {
|
|
18
|
+
color: var(--color-primary);
|
|
19
|
+
text-decoration: underline;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.hoverCard {
|
|
23
|
+
padding: var(--space-xsmall) var(--space-large) var(--space-xsmall) var(--space-small);
|
|
24
|
+
border-radius: var(--radius-medium);
|
|
25
|
+
max-width: 320px;
|
|
26
|
+
outline: none;
|
|
27
|
+
filter: drop-shadow(0 0 var(--space-xxsmall) var(--color-shadow));
|
|
28
|
+
will-change: filter;
|
|
29
|
+
background: var(--color-light);
|
|
30
|
+
font-size: var(--size-small);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.closeBtn {
|
|
34
|
+
position: absolute;
|
|
35
|
+
right: 0;
|
|
36
|
+
top: var(--space-xxxsmall);
|
|
37
|
+
width: var(--space-large);
|
|
38
|
+
height: var(--space-large);
|
|
39
|
+
padding: var(--space-xxsmall);
|
|
40
|
+
background: none;
|
|
41
|
+
border: none;
|
|
42
|
+
cursor: pointer;
|
|
43
|
+
color: var(--color-text-ultra-light);
|
|
44
|
+
transition: var(--transition-out);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.closeBtn:hover,
|
|
48
|
+
.closeBtn:active,
|
|
49
|
+
.closeBtn:focus {
|
|
50
|
+
color: var(--color-text-light);
|
|
51
|
+
transition: var(--transition-in);
|
|
52
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
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 { HoverCard } from '.';
|
|
5
|
+
export default {
|
|
6
|
+
title: 'UI/HoverCard',
|
|
7
|
+
component: HoverCard
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
const Template = props => /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(HoverCard, _extends({}, props, {
|
|
11
|
+
style: {
|
|
12
|
+
zIndex: 2
|
|
13
|
+
}
|
|
14
|
+
})), /*#__PURE__*/React.createElement("p", {
|
|
15
|
+
style: {
|
|
16
|
+
position: 'relative',
|
|
17
|
+
zIndex: 1,
|
|
18
|
+
maxWidth: 360
|
|
19
|
+
}
|
|
20
|
+
}, "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras in neque ante. Curabitur vehicula, lorem sit amet fringilla dapibus, justo mauris varius elit, ut fermentum leo velit eget risus"));
|
|
21
|
+
|
|
22
|
+
export const Default = () => /*#__PURE__*/React.createElement(Template, {
|
|
23
|
+
label: "main.js"
|
|
24
|
+
}, /*#__PURE__*/React.createElement("h1", null, "main.js"), /*#__PURE__*/React.createElement("p", null, "info"));
|
|
25
|
+
export const WithRenderFn = () => /*#__PURE__*/React.createElement(Template, {
|
|
26
|
+
label: "main.js"
|
|
27
|
+
}, _ref => {
|
|
28
|
+
let {
|
|
29
|
+
close
|
|
30
|
+
} = _ref;
|
|
31
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("h1", null, "main.js"), /*#__PURE__*/React.createElement("p", null, "info"), /*#__PURE__*/React.createElement("button", {
|
|
32
|
+
type: "button",
|
|
33
|
+
onClick: close
|
|
34
|
+
}, "close"));
|
|
35
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './hover-card';
|
package/lib-esm/ui/icon/icon.js
CHANGED
|
@@ -17,14 +17,14 @@ const ICONS = {
|
|
|
17
17
|
SORT: 'sort',
|
|
18
18
|
WARNING: 'warning'
|
|
19
19
|
};
|
|
20
|
-
export const Icon =
|
|
21
|
-
|
|
20
|
+
export const Icon = props => {
|
|
21
|
+
const {
|
|
22
22
|
className,
|
|
23
23
|
glyph,
|
|
24
24
|
as: Component,
|
|
25
25
|
size,
|
|
26
26
|
...restProps
|
|
27
|
-
} =
|
|
27
|
+
} = props;
|
|
28
28
|
return /*#__PURE__*/React.createElement(Component, _extends({
|
|
29
29
|
className: cx(css.root, className, css[size])
|
|
30
30
|
}, restProps), /*#__PURE__*/React.createElement("svg", {
|
package/lib-esm/ui/index.js
CHANGED
|
@@ -10,7 +10,6 @@ export { Input } from './input';
|
|
|
10
10
|
export { Loader } from './loader';
|
|
11
11
|
export { Logo } from './logo';
|
|
12
12
|
export { Panels } from './panels';
|
|
13
|
-
export { Popover } from './popover';
|
|
14
13
|
export { Skeleton } from './skeleton';
|
|
15
14
|
export { SortDropdown } from './sort-dropdown';
|
|
16
15
|
export { Table } from './table';
|
|
@@ -3,7 +3,7 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
5
5
|
import cx from 'classnames';
|
|
6
|
-
import { Tooltip as UITooltip,
|
|
6
|
+
import { Tooltip as UITooltip, TooltipAnchor as UITooltipAnchor, TooltipArrow as UITooltipArrow, useTooltipState } from 'ariakit/tooltip';
|
|
7
7
|
import css from './tooltip.module.css';
|
|
8
8
|
export const Tooltip = props => {
|
|
9
9
|
const {
|
|
@@ -15,22 +15,23 @@ export const Tooltip = props => {
|
|
|
15
15
|
darkMode,
|
|
16
16
|
...restProps
|
|
17
17
|
} = props;
|
|
18
|
-
const
|
|
19
|
-
const tooltipProps = useTooltipState({
|
|
20
|
-
baseId: process.env.NODE_ENV === 'test' && 'id-test',
|
|
18
|
+
const tooltip = useTooltipState({
|
|
21
19
|
placement: 'top'
|
|
22
20
|
});
|
|
23
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(
|
|
21
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(UITooltipAnchor, _extends({
|
|
24
22
|
as: Component,
|
|
25
|
-
className:
|
|
23
|
+
className: cx(css.root, className),
|
|
24
|
+
state: tooltip
|
|
26
25
|
}, ref ? {
|
|
27
26
|
ref
|
|
28
|
-
} : {}, restProps
|
|
27
|
+
} : {}, restProps), children), title && /*#__PURE__*/React.createElement(UITooltip, {
|
|
28
|
+
state: tooltip,
|
|
29
29
|
className: cx(css.tooltip, darkMode && css.tooltipDarkMode)
|
|
30
|
-
}
|
|
30
|
+
}, /*#__PURE__*/React.createElement(UITooltipArrow, {
|
|
31
|
+
state: tooltip,
|
|
31
32
|
className: css.arrow,
|
|
32
33
|
size: 12
|
|
33
|
-
})
|
|
34
|
+
}), title));
|
|
34
35
|
};
|
|
35
36
|
Tooltip.defaultProps = {
|
|
36
37
|
className: '',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bundle-stats/ui",
|
|
3
|
-
"version": "3.2.6-beta.
|
|
3
|
+
"version": "3.2.6-beta.2",
|
|
4
4
|
"description": "UI components for BundleStats projects.",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "lib-esm/index.js",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"generate-svg-sprite": "npx svg-sprite -s --si --no-svg-namespace-classnames src/assets/icons/*.svg && mv symbol/svg/sprite.symbol.svg src/assets/icons.svg",
|
|
16
16
|
"lint": "../../node_modules/.bin/eslint . --ext .jsx,.js",
|
|
17
17
|
"start": "cross-env NODE_ENV=development start-storybook -c ./build/storybook -p 8080",
|
|
18
|
-
"test": "npm run test:unit
|
|
18
|
+
"test": "npm run test:unit",
|
|
19
19
|
"test:unit": "jest src --passWithNoTests",
|
|
20
20
|
"test:storyshots": "jest build/storybook ",
|
|
21
21
|
"chromatic": "chromatic --exit-zero-on-changes"
|
|
@@ -85,12 +85,12 @@
|
|
|
85
85
|
"react-router-dom": "5.3.0"
|
|
86
86
|
},
|
|
87
87
|
"dependencies": {
|
|
88
|
-
"@bundle-stats/utils": "^3.2.6-beta.
|
|
88
|
+
"@bundle-stats/utils": "^3.2.6-beta.2",
|
|
89
|
+
"ariakit": "2.0.0-alpha.18",
|
|
89
90
|
"date-fns": "2.28.0",
|
|
90
91
|
"modern-css-reset": "1.4.0",
|
|
91
92
|
"query-string": "7.1.1",
|
|
92
|
-
"reakit": "1.3.11",
|
|
93
93
|
"use-query-params": "1.2.3"
|
|
94
94
|
},
|
|
95
|
-
"gitHead": "
|
|
95
|
+
"gitHead": "5031b68ff5f696929c1466dc177c4e7b949829fd"
|
|
96
96
|
}
|
|
@@ -14,7 +14,7 @@ import I18N from '../../i18n';
|
|
|
14
14
|
import { FlexStack } from '../../layout/flex-stack';
|
|
15
15
|
import { Icon } from '../../ui/icon';
|
|
16
16
|
import { FileName } from '../../ui/file-name';
|
|
17
|
-
import {
|
|
17
|
+
import { HoverCard } from '../../ui/hover-card';
|
|
18
18
|
import { Tooltip } from '../../ui/tooltip';
|
|
19
19
|
import { Tag } from '../../ui/tag';
|
|
20
20
|
import { Filters } from '../../ui/filters';
|
|
@@ -83,40 +83,42 @@ const getRenderRowHeader =
|
|
|
83
83
|
const { label, isNotPredictive, runs, isChunk, isEntry, isInitial } = item;
|
|
84
84
|
|
|
85
85
|
return (
|
|
86
|
-
<
|
|
87
|
-
label={
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
86
|
+
<HoverCard
|
|
87
|
+
label={
|
|
88
|
+
<FlexStack space="xxxsmall" className={css.assetName}>
|
|
89
|
+
<div className={css.assetInfoFlags}>
|
|
90
|
+
{isNotPredictive && (
|
|
91
|
+
<Tooltip className={css.notPredictive} title={<TooltipNotPredictive runs={runs} />}>
|
|
92
|
+
<Icon className={css.notPredictiveIcon} glyph="warning" />
|
|
93
|
+
</Tooltip>
|
|
94
|
+
)}
|
|
95
|
+
{isChunk && (
|
|
96
|
+
<Tag
|
|
97
|
+
title="Chunk"
|
|
98
|
+
size={Tag.SIZES.SMALL}
|
|
99
|
+
kind={Tag.KINDS.INFO}
|
|
100
|
+
className={cx(css.tag, css.tagChunk)}
|
|
101
|
+
/>
|
|
102
|
+
)}
|
|
103
|
+
{isEntry && (
|
|
104
|
+
<Tag
|
|
105
|
+
title="Entrypoint"
|
|
106
|
+
size={Tag.SIZES.SMALL}
|
|
107
|
+
kind={Tag.KINDS.INFO}
|
|
108
|
+
className={cx(css.tag, css.tagEntry)}
|
|
109
|
+
/>
|
|
110
|
+
)}
|
|
111
|
+
{isInitial && (
|
|
112
|
+
<Tag
|
|
113
|
+
title="Initial"
|
|
114
|
+
size={Tag.SIZES.SMALL}
|
|
115
|
+
kind={Tag.KINDS.INFO}
|
|
116
|
+
className={cx(css.tag, css.tagInitial)}
|
|
117
|
+
/>
|
|
118
|
+
)}
|
|
119
|
+
</div>
|
|
120
|
+
<FileName name={label} />
|
|
121
|
+
</FlexStack>
|
|
120
122
|
}
|
|
121
123
|
>
|
|
122
124
|
<AssetInfo
|
|
@@ -126,7 +128,7 @@ const getRenderRowHeader =
|
|
|
126
128
|
chunks={chunks}
|
|
127
129
|
CustomComponentLink={CustomComponentLink}
|
|
128
130
|
/>
|
|
129
|
-
</
|
|
131
|
+
</HoverCard>
|
|
130
132
|
);
|
|
131
133
|
};
|
|
132
134
|
|
|
@@ -18,7 +18,7 @@ import { FlexStack } from '../../layout/flex-stack';
|
|
|
18
18
|
import { EmptySet } from '../../ui/empty-set';
|
|
19
19
|
import { FileName } from '../../ui/file-name';
|
|
20
20
|
import { Filters } from '../../ui/filters';
|
|
21
|
-
import {
|
|
21
|
+
import { HoverCard } from '../../ui/hover-card';
|
|
22
22
|
import { SortDropdown } from '../../ui/sort-dropdown';
|
|
23
23
|
import { Toolbar } from '../../ui/toolbar';
|
|
24
24
|
import { MetricsTable } from '../metrics-table';
|
|
@@ -37,11 +37,11 @@ const RowHeader = ({ row, chunks, labels, CustomComponentLink }) => {
|
|
|
37
37
|
|
|
38
38
|
return (
|
|
39
39
|
<div onMouseEnter={handleOnMouseEnter}>
|
|
40
|
-
{!showPopopver ?
|
|
40
|
+
{!showPopopver ? (
|
|
41
41
|
content
|
|
42
|
-
|
|
43
|
-
<
|
|
44
|
-
{({
|
|
42
|
+
) : (
|
|
43
|
+
<HoverCard label={content}>
|
|
44
|
+
{({ close }) => (
|
|
45
45
|
<ModuleInfo
|
|
46
46
|
className={css.namePopover}
|
|
47
47
|
item={row}
|
|
@@ -49,10 +49,10 @@ const RowHeader = ({ row, chunks, labels, CustomComponentLink }) => {
|
|
|
49
49
|
chunkIds={chunkIds}
|
|
50
50
|
labels={labels}
|
|
51
51
|
customComponentLink={CustomComponentLink}
|
|
52
|
-
onClick={
|
|
52
|
+
onClick={close}
|
|
53
53
|
/>
|
|
54
54
|
)}
|
|
55
|
-
</
|
|
55
|
+
</HoverCard>
|
|
56
56
|
)}
|
|
57
57
|
</div>
|
|
58
58
|
);
|
|
@@ -76,9 +76,17 @@ RowHeader.defaultProps = {
|
|
|
76
76
|
chunks: [],
|
|
77
77
|
};
|
|
78
78
|
|
|
79
|
-
const getRenderRowHeader =
|
|
80
|
-
|
|
81
|
-
)
|
|
79
|
+
const getRenderRowHeader =
|
|
80
|
+
({ labels, chunks, CustomComponentLink }) =>
|
|
81
|
+
(row) =>
|
|
82
|
+
(
|
|
83
|
+
<RowHeader
|
|
84
|
+
row={row}
|
|
85
|
+
chunks={chunks}
|
|
86
|
+
labels={labels}
|
|
87
|
+
CustomComponentLink={CustomComponentLink}
|
|
88
|
+
/>
|
|
89
|
+
);
|
|
82
90
|
|
|
83
91
|
export const BundleModules = ({
|
|
84
92
|
className,
|
|
@@ -240,10 +248,12 @@ BundleModules.propTypes = {
|
|
|
240
248
|
jobs: PropTypes.array, // eslint-disable-line react/forbid-prop-types
|
|
241
249
|
|
|
242
250
|
/** Chunks data */
|
|
243
|
-
chunks: PropTypes.arrayOf(
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
251
|
+
chunks: PropTypes.arrayOf(
|
|
252
|
+
PropTypes.shape({
|
|
253
|
+
id: PropTypes.string,
|
|
254
|
+
name: PropTypes.string,
|
|
255
|
+
}),
|
|
256
|
+
).isRequired,
|
|
247
257
|
|
|
248
258
|
/** total row count */
|
|
249
259
|
totalRowCount: PropTypes.number,
|
|
@@ -15,7 +15,7 @@ import { Stack } from '../../layout/stack';
|
|
|
15
15
|
import { FlexStack } from '../../layout/flex-stack';
|
|
16
16
|
import { EmptySet } from '../../ui/empty-set';
|
|
17
17
|
import { Filters } from '../../ui/filters';
|
|
18
|
-
import {
|
|
18
|
+
import { HoverCard } from '../../ui/hover-card';
|
|
19
19
|
import { SortDropdown } from '../../ui/sort-dropdown';
|
|
20
20
|
import { Tag } from '../../ui/tag';
|
|
21
21
|
import { Toolbar } from '../../ui/toolbar';
|
|
@@ -116,7 +116,15 @@ const PackageRowHeader = ({ item, CustomComponentLink }) => {
|
|
|
116
116
|
);
|
|
117
117
|
|
|
118
118
|
return (
|
|
119
|
-
<
|
|
119
|
+
<HoverCard
|
|
120
|
+
className={css.packageName}
|
|
121
|
+
label={
|
|
122
|
+
<FlexStack space="xxxsmall" className={css.packageNameLabel}>
|
|
123
|
+
{duplicateFlag}
|
|
124
|
+
<span>{packageName}</span>
|
|
125
|
+
</FlexStack>
|
|
126
|
+
}
|
|
127
|
+
>
|
|
120
128
|
<PackagePopoverContent
|
|
121
129
|
name={packageName}
|
|
122
130
|
path={path}
|
|
@@ -124,7 +132,7 @@ const PackageRowHeader = ({ item, CustomComponentLink }) => {
|
|
|
124
132
|
duplicate={item.duplicate}
|
|
125
133
|
CustomComponentLink={CustomComponentLink}
|
|
126
134
|
/>
|
|
127
|
-
</
|
|
135
|
+
</HoverCard>
|
|
128
136
|
);
|
|
129
137
|
})}
|
|
130
138
|
</span>
|
|
@@ -5,7 +5,8 @@ import cx from 'classnames';
|
|
|
5
5
|
import I18N from '../../i18n';
|
|
6
6
|
import { FlexStack } from '../../layout/flex-stack';
|
|
7
7
|
import { Stack } from '../../layout/stack';
|
|
8
|
-
import {
|
|
8
|
+
import { Icon } from '../../ui/icon';
|
|
9
|
+
import { HoverCard } from '../../ui/hover-card';
|
|
9
10
|
import css from './metrics-table-title.module.css';
|
|
10
11
|
|
|
11
12
|
export const MetricsTableTitle = (props) => {
|
|
@@ -13,26 +14,24 @@ export const MetricsTableTitle = (props) => {
|
|
|
13
14
|
const rootClassName = cx(css.root, className);
|
|
14
15
|
|
|
15
16
|
return (
|
|
16
|
-
<
|
|
17
|
-
<
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
{
|
|
21
|
-
<
|
|
22
|
-
<
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
<
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
</FlexStack>
|
|
35
|
-
</Stack>
|
|
17
|
+
<FlexStack space="xxxsmall" className={rootClassName}>
|
|
18
|
+
<span>{title}</span>
|
|
19
|
+
{info && <span className={css.info}>{info}</span>}
|
|
20
|
+
{(popoverInfo || popoverHref) && (
|
|
21
|
+
<HoverCard label={<Icon glyph="help" />}>
|
|
22
|
+
<Stack space="xxxsmall">
|
|
23
|
+
{popoverInfo && <p>{popoverInfo}</p>}
|
|
24
|
+
{popoverHref && (
|
|
25
|
+
<p>
|
|
26
|
+
<a href={popoverHref} target="_blank" rel="noreferrer">
|
|
27
|
+
{I18N.READ_MORE}
|
|
28
|
+
</a>
|
|
29
|
+
</p>
|
|
30
|
+
)}
|
|
31
|
+
</Stack>
|
|
32
|
+
</HoverCard>
|
|
33
|
+
)}
|
|
34
|
+
</FlexStack>
|
|
36
35
|
);
|
|
37
36
|
};
|
|
38
37
|
|