@bundle-stats/ui 4.13.0-beta.8 → 4.13.0-beta.9
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-modules/bundle-modules.js +2 -1
- package/lib/components/bundle-modules/bundle-modules.js.map +1 -1
- package/lib/components/metrics-display-selector/metrics-display-selector.js +2 -2
- package/lib/components/metrics-display-selector/metrics-display-selector.js.map +1 -1
- package/lib/components/metrics-table-header/metrics-table-header.js +7 -7
- package/lib/components/metrics-table-header/metrics-table-header.js.map +1 -1
- package/lib/components/metrics-table-header/metrics-table-header.module.css +11 -4
- package/lib/components/metrics-table-options/metrics-table-options.js +2 -2
- package/lib/components/metrics-table-options/metrics-table-options.js.map +1 -1
- package/lib/components/metrics-table-title/metrics-table-title.js +1 -1
- package/lib/components/metrics-table-title/metrics-table-title.js.map +1 -1
- package/lib/components/metrics-table-title/metrics-table-title.module.css +1 -0
- package/lib/components/metrics-treemap/metrics-treemap.js +4 -4
- package/lib/components/metrics-treemap/metrics-treemap.js.map +1 -1
- package/lib/components/metrics-treemap/metrics-treemap.module.css +1 -1
- package/lib/ui/dropdown/dropdown.js +9 -39
- package/lib/ui/dropdown/dropdown.js.map +1 -1
- package/lib/ui/dropdown/index.js.map +1 -1
- package/lib/ui/filters/filters.js +32 -34
- package/lib/ui/filters/filters.js.map +1 -1
- package/lib/ui/filters/filters.module.css +48 -67
- package/lib-esm/components/bundle-modules/bundle-modules.js +2 -1
- package/lib-esm/components/bundle-modules/bundle-modules.js.map +1 -1
- package/lib-esm/components/metrics-display-selector/metrics-display-selector.js +2 -2
- package/lib-esm/components/metrics-display-selector/metrics-display-selector.js.map +1 -1
- package/lib-esm/components/metrics-table-header/metrics-table-header.js +7 -7
- package/lib-esm/components/metrics-table-header/metrics-table-header.js.map +1 -1
- package/lib-esm/components/metrics-table-header/metrics-table-header.module.css +11 -4
- package/lib-esm/components/metrics-table-options/metrics-table-options.js +3 -3
- package/lib-esm/components/metrics-table-options/metrics-table-options.js.map +1 -1
- package/lib-esm/components/metrics-table-title/metrics-table-title.js +1 -1
- package/lib-esm/components/metrics-table-title/metrics-table-title.js.map +1 -1
- package/lib-esm/components/metrics-table-title/metrics-table-title.module.css +1 -0
- package/lib-esm/components/metrics-treemap/metrics-treemap.js +4 -4
- package/lib-esm/components/metrics-treemap/metrics-treemap.js.map +1 -1
- package/lib-esm/components/metrics-treemap/metrics-treemap.module.css +1 -1
- package/lib-esm/ui/dropdown/dropdown.js +7 -38
- package/lib-esm/ui/dropdown/dropdown.js.map +1 -1
- package/lib-esm/ui/dropdown/index.js.map +1 -1
- package/lib-esm/ui/filters/filters.js +33 -35
- package/lib-esm/ui/filters/filters.js.map +1 -1
- package/lib-esm/ui/filters/filters.module.css +48 -67
- package/package.json +5 -5
- package/src/components/bundle-modules/bundle-modules.tsx +3 -2
- package/src/components/metrics-display-selector/metrics-display-selector.tsx +4 -4
- package/src/components/metrics-table-header/metrics-table-header.module.css +11 -4
- package/src/components/metrics-table-header/metrics-table-header.tsx +7 -7
- package/src/components/metrics-table-options/metrics-table-options.jsx +4 -10
- package/src/components/metrics-table-title/metrics-table-title.jsx +1 -1
- package/src/components/metrics-table-title/metrics-table-title.module.css +1 -0
- package/src/components/metrics-treemap/metrics-treemap.module.css +1 -1
- package/src/components/metrics-treemap/metrics-treemap.tsx +4 -3
- package/src/ui/dropdown/dropdown.stories.tsx +25 -0
- package/src/ui/dropdown/dropdown.tsx +67 -0
- package/src/ui/filters/filters.module.css +48 -67
- package/src/ui/filters/filters.stories.tsx +109 -0
- package/src/ui/filters/filters.tsx +128 -166
- package/types/components/metrics-display-selector/metrics-display-selector.d.ts +2 -2
- package/types/ui/dropdown/dropdown.d.ts +13 -47
- package/types/ui/dropdown/index.d.ts +1 -1
- package/types/ui/filters/filters.d.ts +2 -7
- package/src/ui/dropdown/dropdown.jsx +0 -88
- /package/src/ui/dropdown/{index.js → index.ts} +0 -0
|
@@ -3,23 +3,20 @@ import cx from 'classnames';
|
|
|
3
3
|
import { FlexStack } from '../../layout/flex-stack';
|
|
4
4
|
import { Stack } from '../../layout/stack';
|
|
5
5
|
import { Button } from '../button';
|
|
6
|
-
import {
|
|
6
|
+
import { ControlGroup } from '../control-group';
|
|
7
|
+
import { Dropdown, DropdownItem } from '../dropdown';
|
|
7
8
|
import { InputSearch } from '../input-search';
|
|
8
9
|
import * as I18N from './filters.i18n';
|
|
9
10
|
import { getGroupFiltersLabelSuffix, LABELS } from './filters.utils';
|
|
10
11
|
import css from './filters.module.css';
|
|
11
12
|
const Filter = (props) => {
|
|
12
|
-
const { className = '',
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
React.createElement(FlexStack, { space: "xxxsmall", alignItems: "center", as: "label", className: cx(css.filterCheckbox, buttonClassName) },
|
|
17
|
-
React.createElement("input", { type: "checkbox", id: id, name: name, ...inputProps, className: css.filterInput }),
|
|
18
|
-
React.createElement("span", { title: label, className: css.filterLabel }, label)),
|
|
19
|
-
getOnOnlyClick && (React.createElement(Button, { kind: "info", solid: true, size: "small", type: "button", onClick: getOnOnlyClick(name), className: css.filterOnlyButton }, I18N.ONLY))));
|
|
13
|
+
const { className = '', label, name, ...inputProps } = props;
|
|
14
|
+
return (React.createElement(FlexStack, { space: "xxxsmall", alignItems: "center", as: "label", className: cx(css.filter, className) },
|
|
15
|
+
React.createElement("input", { type: "checkbox", id: `filter-${name}`, name: name, ...inputProps, className: css.filterControl }),
|
|
16
|
+
React.createElement("span", { title: label, className: css.filterLabel }, label)));
|
|
20
17
|
};
|
|
21
18
|
const FilterGroup = (props) => {
|
|
22
|
-
const { className = '',
|
|
19
|
+
const { className = '', groupKey, data, values, onCheckboxChange, toggleFilters } = props;
|
|
23
20
|
const [search, setSearch] = useState('');
|
|
24
21
|
const { label: groupLabel, children: groupItems } = data;
|
|
25
22
|
const areAllGroupItemsChecked = groupItems
|
|
@@ -30,7 +27,7 @@ const FilterGroup = (props) => {
|
|
|
30
27
|
const dropdownLabel = (React.createElement(React.Fragment, null,
|
|
31
28
|
`${groupLabel}:`,
|
|
32
29
|
"\u00A0",
|
|
33
|
-
React.createElement("span", { className: cx(hasCustomFilterSuffix && css.
|
|
30
|
+
React.createElement("span", { className: cx(hasCustomFilterSuffix && css.filterGroupLabelSuffixCustom) }, filterSuffix)));
|
|
34
31
|
const getOnGroupCheck = (value, overrides = {}) => () => {
|
|
35
32
|
const newFilters = groupItems.reduce((agg, { key: itemKey }) => ({
|
|
36
33
|
...agg,
|
|
@@ -47,22 +44,22 @@ const FilterGroup = (props) => {
|
|
|
47
44
|
}
|
|
48
45
|
return groupItems.filter((item) => item.label.match(new RegExp(`${search}`, 'i')));
|
|
49
46
|
}, [search, groupItems]);
|
|
50
|
-
return (React.createElement(Dropdown, {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
React.createElement(
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
React.createElement("
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
47
|
+
return (React.createElement(Dropdown, { buttonClassName: className, label: dropdownLabel, ariaLabel: `${groupLabel}: ${filterSuffix}` },
|
|
48
|
+
groupItems.length > 10 && (React.createElement("div", { className: css.filterGroupSearchWrapper },
|
|
49
|
+
React.createElement(InputSearch, { defaultValue: search, onChange: setSearch, placeholder: I18N.GROUP_SEARCH, debounceWait: 0 }))),
|
|
50
|
+
React.createElement("div", { className: css.filterGroupItems },
|
|
51
|
+
filteredGroupItems.length === 0 && (React.createElement(Stack, { className: css.filterGroupSearchNotFound },
|
|
52
|
+
React.createElement("p", null, I18N.GROUP_NOT_FOUND),
|
|
53
|
+
React.createElement("div", null,
|
|
54
|
+
React.createElement(Button, { size: "small", kind: "primary", type: "button", onClick: () => setSearch(''), className: css.filterGroupSearchNotFoundClear }, I18N.GROUP_SEARCH_CLEAR)))),
|
|
55
|
+
filteredGroupItems.map(({ key: itemKey, ...itemData }) => {
|
|
56
|
+
const id = [groupKey, itemKey].join('.');
|
|
57
|
+
const getOnOnlyClick = () => getOnGroupCheck(false, { [id]: true });
|
|
58
|
+
return (React.createElement(DropdownItem, { key: id, className: css.filterGroupItem },
|
|
59
|
+
React.createElement(Filter, { label: itemData.label, name: id, onChange: onCheckboxChange, checked: values[id], disabled: itemData.disabled, className: css.filterGroupItemFilter }),
|
|
60
|
+
React.createElement(Button, { kind: "info", solid: true, size: "small", type: "button", onClick: getOnOnlyClick(), disabled: itemData.disabled, className: css.filterGroupOnlyButton }, I18N.ONLY)));
|
|
61
|
+
})),
|
|
62
|
+
filteredGroupItems.length !== 0 && (React.createElement("div", { className: css.filterGroupActions }, areAllGroupItemsChecked ? (React.createElement(DropdownItem, { id: "clear-all", onClick: getOnGroupCheck(false), role: "button" }, I18N.CLEAR)) : (React.createElement(DropdownItem, { id: "clear-all", onClick: getOnGroupCheck(true), role: "button" }, I18N.CHECK))))));
|
|
66
63
|
};
|
|
67
64
|
export const Filters = (props) => {
|
|
68
65
|
const { className = '', values, filters, toggleFilter, toggleFilters } = props;
|
|
@@ -70,13 +67,14 @@ export const Filters = (props) => {
|
|
|
70
67
|
const { name } = event.target;
|
|
71
68
|
toggleFilter(name, !values[name]);
|
|
72
69
|
}, [toggleFilter, values]);
|
|
73
|
-
const
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
}))
|
|
70
|
+
const filterList = Object.entries(filters);
|
|
71
|
+
const filterCount = filterList.length;
|
|
72
|
+
return (React.createElement(ControlGroup, { className: cx(css.root, className) }, filterList.map(([name, data], index) => {
|
|
73
|
+
const lastItem = index === filterCount - 1;
|
|
74
|
+
if ('defaultValue' in data) {
|
|
75
|
+
return (React.createElement(Filter, { name: name, label: data.label, onChange: onCheckboxChange, checked: values[name], disabled: data.disabled, key: name, className: cx(css.filterSingle, lastItem && css.itemLast) }));
|
|
76
|
+
}
|
|
77
|
+
return (React.createElement(FilterGroup, { groupKey: name, data: data, values: values, onCheckboxChange: onCheckboxChange, toggleFilters: toggleFilters, className: cx(lastItem && css.itemLast), key: name }));
|
|
78
|
+
})));
|
|
81
79
|
};
|
|
82
80
|
//# sourceMappingURL=filters.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filters.js","sourceRoot":"","sources":["../../../src/ui/filters/filters.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC9D,OAAO,EAAE,MAAM,YAAY,CAAC;AAG5B,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"filters.js","sourceRoot":"","sources":["../../../src/ui/filters/filters.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC9D,OAAO,EAAE,MAAM,YAAY,CAAC;AAG5B,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,KAAK,IAAI,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAAE,0BAA0B,EAAE,MAAM,EAAE,MAAM,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nodes */
|
|
2
|
+
.itemLast {
|
|
3
|
+
border-top-right-radius: var(--radius-small) !important;
|
|
4
|
+
border-bottom-right-radius: var(--radius-small) !important;
|
|
5
|
+
}
|
|
6
6
|
|
|
7
|
+
/* Filter (label with input + text) */
|
|
8
|
+
.filter {
|
|
7
9
|
position: relative;
|
|
8
10
|
width: 100%;
|
|
9
11
|
max-width: 240px;
|
|
12
|
+
color: var(--color-text);
|
|
10
13
|
}
|
|
11
14
|
|
|
12
|
-
.
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
.filterInput {
|
|
15
|
+
.filterControl {
|
|
16
16
|
flex: 0 0 auto;
|
|
17
17
|
height: 1em;
|
|
18
18
|
}
|
|
@@ -25,7 +25,42 @@
|
|
|
25
25
|
text-overflow: ellipsis;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
.
|
|
28
|
+
.filterControl[disabled] + .filterLabel {
|
|
29
|
+
color: var(--color-text-light);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.filter:hover {
|
|
33
|
+
color: var(--color-dark);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/** Filter single */
|
|
37
|
+
.filterSingle {
|
|
38
|
+
padding: calc(var(--space-xxsmall) - 1px);
|
|
39
|
+
border: 1px solid var(--color-outline);
|
|
40
|
+
border-radius: var(--radius-small);
|
|
41
|
+
font-size: var(--size-small);
|
|
42
|
+
line-height: var(--space-small);
|
|
43
|
+
color: var(--color-text-ultra-light);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.filterSingle:hover,
|
|
47
|
+
.filterSingle:active,
|
|
48
|
+
.filterSingle:focus {
|
|
49
|
+
border-color: var(--color-outline-dark);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/** Filter group */
|
|
53
|
+
.filterGroupItems {
|
|
54
|
+
max-height: calc(10 * (var(--space-small) + 2 * var(--space-xxxsmall)));
|
|
55
|
+
overflow: auto;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.filterGroupItem {
|
|
59
|
+
position: relative;
|
|
60
|
+
padding-right: 10em;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.filterGroupOnlyButton {
|
|
29
64
|
display: none;
|
|
30
65
|
position: absolute;
|
|
31
66
|
right: 2px;
|
|
@@ -37,7 +72,7 @@
|
|
|
37
72
|
}
|
|
38
73
|
|
|
39
74
|
/** cover item text */
|
|
40
|
-
.
|
|
75
|
+
.filterGroupOnlyButton::before {
|
|
41
76
|
content: ' ';
|
|
42
77
|
display: block;
|
|
43
78
|
position: absolute;
|
|
@@ -48,53 +83,13 @@
|
|
|
48
83
|
background: linear-gradient(90deg, rgba(255, 255, 255, 0), var(--color-highlight) 75%);
|
|
49
84
|
}
|
|
50
85
|
|
|
51
|
-
/** filter disabled state */
|
|
52
|
-
.filterInput[disabled] + .filterLabel {
|
|
53
|
-
color: var(--color-text-light);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
.filterInput[disabled] + .filterOnlyButton {
|
|
57
|
-
display: none;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
86
|
/** filter hover state */
|
|
61
|
-
.
|
|
62
|
-
color: var(--color-text);
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
.filter:hover {
|
|
66
|
-
color: var(--color-dark);
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
.filter:hover .filterOnlyButton {
|
|
87
|
+
.filterGroupItem:hover .filterGroupOnlyButton {
|
|
70
88
|
display: block;
|
|
71
89
|
}
|
|
72
90
|
|
|
73
|
-
/** Filter standard variation */
|
|
74
|
-
.filterStandalone {
|
|
75
|
-
padding: 0;
|
|
76
|
-
width: auto;
|
|
77
|
-
color: var(--color-text-light);
|
|
78
|
-
z-index: var(--layout-xlow); /* show collapsed border */
|
|
79
|
-
font-size: var(--size-small);
|
|
80
|
-
line-height: var(--space-small);
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
.filterStandalone .filterCheckbox {
|
|
84
|
-
padding: calc(var(--space-xxsmall) - 1px) calc(var(--space-xxsmall) - 1px);
|
|
85
|
-
border: 1px solid var(--color-outline);
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
.filterStandalone:hover .filterCheckbox,
|
|
89
|
-
.filterStandalone:active .filterCheckbox,
|
|
90
|
-
.filterStandalone:focus .filterCheckbox {
|
|
91
|
-
z-index: var(--layout-xlow); /* show collapsed border */
|
|
92
|
-
box-shadow: var(--outline-hover);
|
|
93
|
-
color: var(--color-text);
|
|
94
|
-
}
|
|
95
|
-
|
|
96
91
|
/** Filter group variation */
|
|
97
|
-
.
|
|
92
|
+
.filterGroupLabelSuffixCustom {
|
|
98
93
|
color: var(--color-text);
|
|
99
94
|
text-transform: lowercase;
|
|
100
95
|
}
|
|
@@ -112,11 +107,6 @@
|
|
|
112
107
|
color: var(--color-text-light);
|
|
113
108
|
}
|
|
114
109
|
|
|
115
|
-
.filterGroupItems {
|
|
116
|
-
max-height: calc(10 * (var(--space-small) + 2 * var(--space-xxxsmall)));
|
|
117
|
-
overflow: auto;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
110
|
.filterGroupActions {
|
|
121
111
|
margin-top: var(--space-xxxsmall);
|
|
122
112
|
padding-top: var(--space-xxxsmall);
|
|
@@ -124,12 +114,3 @@
|
|
|
124
114
|
margin-bottom: calc(0px - var(--space-xxxsmall));
|
|
125
115
|
border-top: 1px solid var(--color-outline);
|
|
126
116
|
}
|
|
127
|
-
|
|
128
|
-
.item {
|
|
129
|
-
position: relative;
|
|
130
|
-
flex: 0 0 auto;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
.itemButton {
|
|
134
|
-
border-radius: var(--radius-small);
|
|
135
|
-
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bundle-stats/ui",
|
|
3
|
-
"version": "4.13.0-beta.
|
|
3
|
+
"version": "4.13.0-beta.9",
|
|
4
4
|
"description": "UI components for BundleStats projects.",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "lib-esm/index.js",
|
|
@@ -36,14 +36,14 @@
|
|
|
36
36
|
},
|
|
37
37
|
"homepage": "https://github.com/relative-ci/bundle-stats/blob/master/packages/ui#readme",
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@babel/preset-env": "7.24.
|
|
39
|
+
"@babel/preset-env": "7.24.4",
|
|
40
40
|
"@babel/preset-react": "7.24.1",
|
|
41
41
|
"@babel/preset-typescript": "7.24.1",
|
|
42
42
|
"@storybook/addon-essentials": "7.6.17",
|
|
43
43
|
"@storybook/react": "7.6.17",
|
|
44
44
|
"@storybook/react-webpack5": "7.6.17",
|
|
45
45
|
"@types/d3": "7.4.3",
|
|
46
|
-
"@types/react": "18.2.
|
|
46
|
+
"@types/react": "18.2.74",
|
|
47
47
|
"@types/react-router-dom": "5.3.3",
|
|
48
48
|
"babel-plugin-require-context-hook": "1.0.0",
|
|
49
49
|
"classnames": "2.5.1",
|
|
@@ -73,12 +73,12 @@
|
|
|
73
73
|
"react-router-dom": "^5.0.0"
|
|
74
74
|
},
|
|
75
75
|
"dependencies": {
|
|
76
|
-
"@bundle-stats/utils": "4.13.0-beta.
|
|
76
|
+
"@bundle-stats/utils": "4.13.0-beta.9",
|
|
77
77
|
"ariakit": "2.0.0-next.44",
|
|
78
78
|
"d3": "^7.8.5",
|
|
79
79
|
"modern-css-reset": "1.4.0",
|
|
80
80
|
"react-use": "^17.5.0",
|
|
81
81
|
"use-query-params": "2.2.1"
|
|
82
82
|
},
|
|
83
|
-
"gitHead": "
|
|
83
|
+
"gitHead": "b41e83e66332b5467db02d266974a30bf8e0a034"
|
|
84
84
|
}
|
|
@@ -9,6 +9,7 @@ import { Box } from '../../layout/box';
|
|
|
9
9
|
import { MetricsDisplayType } from '../../constants';
|
|
10
10
|
import { FlexStack } from '../../layout/flex-stack';
|
|
11
11
|
import { Button } from '../../ui/button';
|
|
12
|
+
import { ControlGroup } from '../../ui/control-group';
|
|
12
13
|
import { EmptySet } from '../../ui/empty-set';
|
|
13
14
|
import { FileName } from '../../ui/file-name';
|
|
14
15
|
import { Filters } from '../../ui/filters';
|
|
@@ -197,7 +198,7 @@ export const BundleModules = (props: BundleModulesProps) => {
|
|
|
197
198
|
</FlexStack>
|
|
198
199
|
</Toolbar>
|
|
199
200
|
<Box padding={['xsmall', 'small']} className={css.metricSelector}>
|
|
200
|
-
<
|
|
201
|
+
<ControlGroup as="nav">
|
|
201
202
|
<Button
|
|
202
203
|
outline
|
|
203
204
|
active={moduleMetric === ModuleMetric.SIZE}
|
|
@@ -216,7 +217,7 @@ export const BundleModules = (props: BundleModulesProps) => {
|
|
|
216
217
|
>
|
|
217
218
|
<Tooltip title="Size (including duplicate modules)">Module total size</Tooltip>
|
|
218
219
|
</Button>
|
|
219
|
-
</
|
|
220
|
+
</ControlGroup>
|
|
220
221
|
</Box>
|
|
221
222
|
{displayType === MetricsDisplayType.TABLE && (
|
|
222
223
|
<MetricsTable
|
|
@@ -2,8 +2,8 @@ import React from 'react';
|
|
|
2
2
|
import cx from 'classnames';
|
|
3
3
|
|
|
4
4
|
import { MetricsDisplayType } from '../../constants';
|
|
5
|
-
import { FlexStack } from '../../layout/flex-stack';
|
|
6
5
|
import { Button } from '../../ui/button';
|
|
6
|
+
import { ControlGroup } from '../../ui/control-group';
|
|
7
7
|
import { Icon } from '../../ui/icon';
|
|
8
8
|
import css from './metrics-display-selector.module.css';
|
|
9
9
|
|
|
@@ -14,12 +14,12 @@ interface MetricsDisplaySelectorProps {
|
|
|
14
14
|
|
|
15
15
|
export const MetricsDisplaySelector = (
|
|
16
16
|
props: MetricsDisplaySelectorProps &
|
|
17
|
-
Omit<React.ComponentProps<typeof
|
|
17
|
+
Omit<React.ComponentProps<typeof ControlGroup>, 'onSelect' | 'value'>,
|
|
18
18
|
) => {
|
|
19
19
|
const { className = '', value, onSelect, ...restProps } = props;
|
|
20
20
|
|
|
21
21
|
return (
|
|
22
|
-
<
|
|
22
|
+
<ControlGroup className={cx(css.root, className)} {...restProps}>
|
|
23
23
|
<Button
|
|
24
24
|
outline
|
|
25
25
|
active={value === MetricsDisplayType.TABLE}
|
|
@@ -42,6 +42,6 @@ export const MetricsDisplaySelector = (
|
|
|
42
42
|
>
|
|
43
43
|
Treemap
|
|
44
44
|
</Button>
|
|
45
|
-
</
|
|
45
|
+
</ControlGroup>
|
|
46
46
|
);
|
|
47
47
|
};
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
/* columns */
|
|
2
|
-
.root .
|
|
2
|
+
.root .col {
|
|
3
|
+
padding-top: var(--space-xxsmall);
|
|
4
|
+
padding-bottom: var(--space-xxsmall);
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.root .metric {
|
|
3
8
|
width: 55%;
|
|
9
|
+
vertical-align: middle;
|
|
4
10
|
}
|
|
5
11
|
|
|
6
12
|
.root .job {
|
|
13
|
+
padding-top: var(--space-xxsmall);
|
|
7
14
|
text-align: right;
|
|
8
15
|
}
|
|
9
16
|
|
|
@@ -30,13 +37,13 @@
|
|
|
30
37
|
}
|
|
31
38
|
|
|
32
39
|
/* columns overrides for showHeaderSum */
|
|
33
|
-
.showHeaderSum .
|
|
40
|
+
.showHeaderSum .job {
|
|
34
41
|
border-bottom: 0;
|
|
35
42
|
padding-bottom: 0;
|
|
36
43
|
}
|
|
37
44
|
|
|
38
|
-
.showHeaderSum .
|
|
39
|
-
padding-top:
|
|
45
|
+
.showHeaderSum .sum {
|
|
46
|
+
padding-top: 0;
|
|
40
47
|
font-size: var(--size-small);
|
|
41
48
|
vertical-align: middle;
|
|
42
49
|
text-transform: none;
|
|
@@ -34,7 +34,7 @@ const JobColumn = ({ job, isBaseline }: JobColumnProps) => {
|
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
return (
|
|
37
|
-
<Table.Th className={css.job} colSpan={colSpan}>
|
|
37
|
+
<Table.Th className={cx(css.col, css.job)} colSpan={colSpan}>
|
|
38
38
|
<JobName
|
|
39
39
|
title={isBaseline ? I18N.BASELINE_TITLE : I18N.CURRENT_TITLE}
|
|
40
40
|
internalBuildNumber={internalBuildNumber}
|
|
@@ -65,7 +65,7 @@ const SumColumn = ({ rows, isBaseline, runIndex, updateSort, sort }: ColumnSumPr
|
|
|
65
65
|
|
|
66
66
|
return (
|
|
67
67
|
<>
|
|
68
|
-
<Table.Th className={cx(css.value, css.sum)}>
|
|
68
|
+
<Table.Th className={cx(css.col, css.value, css.sum)}>
|
|
69
69
|
<SortButton
|
|
70
70
|
fieldPath={fieldPath}
|
|
71
71
|
fieldName="value"
|
|
@@ -78,7 +78,7 @@ const SumColumn = ({ rows, isBaseline, runIndex, updateSort, sort }: ColumnSumPr
|
|
|
78
78
|
</Table.Th>
|
|
79
79
|
{!isBaseline && (
|
|
80
80
|
<>
|
|
81
|
-
<Table.Th className={cx(css.delta, css.sum)}>
|
|
81
|
+
<Table.Th className={cx(css.col, css.delta, css.sum)}>
|
|
82
82
|
<SortButton
|
|
83
83
|
fieldPath={fieldPath}
|
|
84
84
|
fieldName="delta"
|
|
@@ -91,7 +91,7 @@ const SumColumn = ({ rows, isBaseline, runIndex, updateSort, sort }: ColumnSumPr
|
|
|
91
91
|
)}
|
|
92
92
|
</SortButton>
|
|
93
93
|
</Table.Th>
|
|
94
|
-
<Table.Th className={cx(css.delta, css.deltaPercentage, css.sum)}>
|
|
94
|
+
<Table.Th className={cx(css.col, css.delta, css.deltaPercentage, css.sum)}>
|
|
95
95
|
<SortButton
|
|
96
96
|
fieldPath={fieldPath}
|
|
97
97
|
fieldName="deltaPercentage"
|
|
@@ -146,8 +146,8 @@ export const MetricsTableHeader = (
|
|
|
146
146
|
|
|
147
147
|
return (
|
|
148
148
|
<Table.THead className={rootClassName}>
|
|
149
|
-
<Table.Tr
|
|
150
|
-
<Table.Th className={css.
|
|
149
|
+
<Table.Tr>
|
|
150
|
+
<Table.Th className={cx(css.col, css.metric)} rowSpan={showSum ? 2 : 1}>
|
|
151
151
|
{metricTitle || ' '}
|
|
152
152
|
</Table.Th>
|
|
153
153
|
{jobs.map((job, runIndex) => (
|
|
@@ -155,7 +155,7 @@ export const MetricsTableHeader = (
|
|
|
155
155
|
))}
|
|
156
156
|
</Table.Tr>
|
|
157
157
|
{showSum && (
|
|
158
|
-
<Table.Tr
|
|
158
|
+
<Table.Tr>
|
|
159
159
|
{jobs.map((_, runIndex) => (
|
|
160
160
|
<SumColumn
|
|
161
161
|
rows={rows}
|
|
@@ -2,23 +2,17 @@ import React from 'react';
|
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
|
|
4
4
|
import I18N from '../../i18n';
|
|
5
|
-
import { Dropdown } from '../../ui/dropdown';
|
|
5
|
+
import { Dropdown, DropdownItem } from '../../ui/dropdown';
|
|
6
6
|
|
|
7
7
|
export const MetricsTableOptions = (props) => {
|
|
8
|
-
const { className,
|
|
8
|
+
const { className, handleViewAll, handleResetFilters, ...restProps } = props;
|
|
9
9
|
|
|
10
10
|
return (
|
|
11
11
|
<Dropdown className={className} glyph="more-vertical" {...restProps}>
|
|
12
12
|
{handleResetFilters && (
|
|
13
|
-
<
|
|
14
|
-
{I18N.RESET_FILTERS}
|
|
15
|
-
</Dropdown.Item>
|
|
16
|
-
)}
|
|
17
|
-
{handleViewAll && (
|
|
18
|
-
<Dropdown.Item onClick={handleViewAll}>
|
|
19
|
-
{I18N.VIEW_ALL}
|
|
20
|
-
</Dropdown.Item>
|
|
13
|
+
<DropdownItem onClick={handleResetFilters}>{I18N.RESET_FILTERS}</DropdownItem>
|
|
21
14
|
)}
|
|
15
|
+
{handleViewAll && <DropdownItem onClick={handleViewAll}>{I18N.VIEW_ALL}</DropdownItem>}
|
|
22
16
|
</Dropdown>
|
|
23
17
|
);
|
|
24
18
|
};
|
|
@@ -15,7 +15,7 @@ export const MetricsTableTitle = (props) => {
|
|
|
15
15
|
const rootClassName = cx(css.root, className);
|
|
16
16
|
|
|
17
17
|
return (
|
|
18
|
-
<Stack space="
|
|
18
|
+
<Stack space="none" className={rootClassName}>
|
|
19
19
|
<FlexStack space="xxxsmall" alignItems="center" as="h3" className={css.title}>
|
|
20
20
|
<span>{title}</span>
|
|
21
21
|
|
|
@@ -11,9 +11,9 @@ import { Delta } from '../delta';
|
|
|
11
11
|
import { RunInfo } from '../run-info';
|
|
12
12
|
import css from './metrics-treemap.module.css';
|
|
13
13
|
|
|
14
|
-
const SQUARIFY_RATIO = 1.
|
|
15
|
-
const PADDING_OUTER =
|
|
16
|
-
const PADDING_INNER =
|
|
14
|
+
const SQUARIFY_RATIO = 1.33;
|
|
15
|
+
const PADDING_OUTER = 0;
|
|
16
|
+
const PADDING_INNER = 2;
|
|
17
17
|
|
|
18
18
|
type TileSizeDisplay = 'minimal' | 'small' | 'default';
|
|
19
19
|
|
|
@@ -180,6 +180,7 @@ const Leaf = (props: LeafProps) => {
|
|
|
180
180
|
css.leaf,
|
|
181
181
|
css[`leaf-${runInfo.deltaType}`],
|
|
182
182
|
sizeDisplay === 'small' && css.leafSmall,
|
|
183
|
+
left === 0 && css.leafFirstCol,
|
|
183
184
|
);
|
|
184
185
|
|
|
185
186
|
return (
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Meta } from '@storybook/react';
|
|
3
|
+
|
|
4
|
+
import { getWrapperDecorator } from '../../stories';
|
|
5
|
+
import { Dropdown, DropdownItem } from '.';
|
|
6
|
+
|
|
7
|
+
export default {
|
|
8
|
+
title: 'UI/Dropdown',
|
|
9
|
+
component: Dropdown,
|
|
10
|
+
decorators: [getWrapperDecorator()],
|
|
11
|
+
} as Meta;
|
|
12
|
+
|
|
13
|
+
export const Defualt = () => (
|
|
14
|
+
<Dropdown glyph="filter" label="Toggle">
|
|
15
|
+
<DropdownItem>Option 1</DropdownItem>
|
|
16
|
+
<DropdownItem>Option 2</DropdownItem>
|
|
17
|
+
</Dropdown>
|
|
18
|
+
);
|
|
19
|
+
|
|
20
|
+
export const Disabled = () => (
|
|
21
|
+
<Dropdown glyph="filter" label="Toggle" disabled>
|
|
22
|
+
<DropdownItem>Option 1</DropdownItem>
|
|
23
|
+
<DropdownItem>Option 2</DropdownItem>
|
|
24
|
+
</Dropdown>
|
|
25
|
+
);
|