@bundle-stats/ui 3.2.5-alpha.0 → 3.2.5-alpha.21
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 +69 -21
- package/lib/app/app.js +6 -13
- package/lib/app/app.module.css +15 -17
- package/lib/app/header/header.js +8 -14
- package/lib/app/header/header.module.css +18 -11
- package/lib/components/bundle-assets/bundle-assets.module.css +0 -1
- package/lib/components/bundle-packages/bundle-packages.module.css +5 -9
- package/lib/components/delta/delta.js +15 -22
- package/lib/components/delta/delta.module.css +6 -13
- package/lib/components/duplicate-packages-warning/duplicate-packages-warning.js +2 -2
- package/lib/components/job-header/job-header.js +5 -8
- package/lib/components/job-header/job-header.module.css +10 -6
- package/lib/components/jobs-header/jobs-header.js +1 -1
- package/lib/components/jobs-header/jobs-header.module.css +4 -1
- package/lib/components/metric/metric.js +4 -1
- package/lib/components/metric/metric.module.css +7 -7
- package/lib/components/metrics-table-search/metrics-table-search.module.css +4 -5
- package/lib/components/summary-item/summary-item.js +3 -3
- package/lib/components/summary-item/summary-item.module.css +9 -2
- package/lib/css/default.css +7 -13
- package/lib/css/variables.css +24 -24
- package/lib/layout/box/box.module.css +0 -9
- package/lib/layout/footer/footer.module.css +1 -2
- package/lib/layout/index.js +0 -8
- package/lib/ui/dropdown/dropdown.js +2 -1
- package/lib/ui/dropdown/dropdown.module.css +8 -7
- package/lib/ui/filters/filters.js +5 -10
- package/lib/ui/filters/filters.module.css +0 -10
- package/lib/ui/popover/popover.module.css +1 -1
- package/lib/ui/table/table.module.css +9 -1
- package/lib/ui/tabs/tabs.module.css +2 -1
- package/lib/ui/tooltip/tooltip.module.css +1 -1
- package/lib-esm/app/app.js +6 -12
- package/lib-esm/app/app.module.css +15 -17
- package/lib-esm/app/header/header.js +8 -13
- package/lib-esm/app/header/header.module.css +18 -11
- package/lib-esm/components/bundle-assets/bundle-assets.module.css +0 -1
- package/lib-esm/components/bundle-packages/bundle-packages.module.css +5 -9
- package/lib-esm/components/delta/delta.js +13 -20
- package/lib-esm/components/delta/delta.module.css +6 -13
- package/lib-esm/components/duplicate-packages-warning/duplicate-packages-warning.js +2 -2
- package/lib-esm/components/job-header/job-header.js +5 -8
- package/lib-esm/components/job-header/job-header.module.css +10 -6
- package/lib-esm/components/jobs-header/jobs-header.js +1 -1
- package/lib-esm/components/jobs-header/jobs-header.module.css +4 -1
- package/lib-esm/components/metric/metric.js +4 -1
- package/lib-esm/components/metric/metric.module.css +7 -7
- package/lib-esm/components/metrics-table-search/metrics-table-search.module.css +4 -5
- package/lib-esm/components/summary-item/summary-item.js +3 -3
- package/lib-esm/components/summary-item/summary-item.module.css +9 -2
- package/lib-esm/css/default.css +7 -13
- package/lib-esm/css/variables.css +24 -24
- package/lib-esm/layout/box/box.module.css +0 -9
- package/lib-esm/layout/footer/footer.module.css +1 -2
- package/lib-esm/layout/index.js +0 -1
- package/lib-esm/ui/dropdown/dropdown.js +2 -1
- package/lib-esm/ui/dropdown/dropdown.module.css +8 -7
- package/lib-esm/ui/filters/filters.js +4 -9
- package/lib-esm/ui/filters/filters.module.css +0 -10
- package/lib-esm/ui/popover/popover.module.css +1 -1
- package/lib-esm/ui/table/table.module.css +9 -1
- package/lib-esm/ui/tabs/tabs.module.css +2 -1
- package/lib-esm/ui/tooltip/tooltip.module.css +1 -1
- package/package.json +3 -4
- package/src/app/app.jsx +15 -23
- package/src/app/app.module.css +15 -17
- package/src/app/header/header.jsx +10 -15
- package/src/app/header/header.module.css +18 -11
- package/src/components/bundle-assets/bundle-assets.module.css +0 -1
- package/src/components/bundle-packages/bundle-packages.module.css +5 -9
- package/src/components/delta/delta.jsx +9 -17
- package/src/components/delta/delta.module.css +6 -13
- package/src/components/duplicate-packages-warning/duplicate-packages-warning.jsx +2 -7
- package/src/components/job-header/job-header.jsx +5 -9
- package/src/components/job-header/job-header.module.css +10 -6
- package/src/components/jobs-header/jobs-header.jsx +1 -1
- package/src/components/jobs-header/jobs-header.module.css +4 -1
- package/src/components/metric/metric.jsx +9 -2
- package/src/components/metric/metric.module.css +7 -7
- package/src/components/metrics-table-search/metrics-table-search.module.css +4 -5
- package/src/components/summary-item/summary-item.jsx +1 -1
- package/src/components/summary-item/summary-item.module.css +9 -2
- package/src/css/default.css +7 -13
- package/src/css/variables.css +24 -24
- package/src/layout/box/box.module.css +0 -9
- package/src/layout/footer/footer.module.css +1 -2
- package/src/layout/index.js +0 -1
- package/src/ui/dropdown/dropdown.jsx +6 -4
- package/src/ui/dropdown/dropdown.module.css +8 -7
- package/src/ui/filters/filters.jsx +50 -53
- package/src/ui/filters/filters.module.css +0 -10
- package/src/ui/popover/popover.module.css +1 -1
- package/src/ui/table/table.module.css +9 -1
- package/src/ui/tabs/tabs.module.css +2 -1
- package/src/ui/tooltip/tooltip.module.css +1 -1
- package/lib/layout/separator.js +0 -48
- package/lib/layout/separator.module.css +0 -5
- package/lib-esm/layout/separator.js +0 -28
- package/lib-esm/layout/separator.module.css +0 -5
- package/src/layout/separator.jsx +0 -25
- package/src/layout/separator.module.css +0 -5
|
@@ -29,14 +29,21 @@
|
|
|
29
29
|
.currentMetric {
|
|
30
30
|
display: block;
|
|
31
31
|
color: var(--color-heading);
|
|
32
|
-
font-size: var(--size-
|
|
32
|
+
font-size: var(--size-large);
|
|
33
33
|
line-height: var(--space-medium);
|
|
34
34
|
white-space: nowrap;
|
|
35
35
|
font-weight: bold;
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
+
.delta {
|
|
39
|
+
font-size: var(--size-small);
|
|
40
|
+
line-height: var(--space-medium);
|
|
41
|
+
}
|
|
42
|
+
|
|
38
43
|
.baselineMetric {
|
|
39
44
|
color: var(--color-text-light);
|
|
45
|
+
font-size: var(--size-small);
|
|
46
|
+
line-height: var(--space-small);
|
|
40
47
|
}
|
|
41
48
|
|
|
42
49
|
/* Loading state */
|
|
@@ -50,6 +57,6 @@
|
|
|
50
57
|
|
|
51
58
|
/* Size large */
|
|
52
59
|
.large .currentMetric {
|
|
53
|
-
font-size: var(--size-
|
|
60
|
+
font-size: var(--size-xxxlarge);
|
|
54
61
|
line-height: var(--space-medium);
|
|
55
62
|
}
|
package/src/css/default.css
CHANGED
|
@@ -1,31 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
/** modern-css-reset updates */
|
|
4
|
-
pre,
|
|
5
|
-
ul,
|
|
6
|
-
ol,
|
|
7
|
-
button {
|
|
8
|
-
margin: 0;
|
|
1
|
+
:root {
|
|
2
|
+
--chart-height: 180px;
|
|
9
3
|
}
|
|
10
4
|
|
|
11
5
|
html {
|
|
12
|
-
font-family: var(--font-family);
|
|
13
6
|
font-size: 81.25%;
|
|
7
|
+
line-height: 1.8461;
|
|
14
8
|
}
|
|
15
9
|
|
|
16
10
|
body {
|
|
17
|
-
background: var(--color-background);
|
|
18
11
|
color: var(--color-text);
|
|
19
|
-
line-height: var(--line-height);
|
|
20
12
|
}
|
|
21
13
|
|
|
22
|
-
h1, h2, h3, h4, h5
|
|
14
|
+
h1, h2, h3, h4, h5 {
|
|
15
|
+
margin-bottom: var(--space-small);
|
|
23
16
|
color: var(--color-heading);
|
|
24
|
-
font-weight:
|
|
17
|
+
font-weight: 500;
|
|
25
18
|
}
|
|
26
19
|
|
|
27
20
|
h1 {
|
|
28
21
|
font-size: var(--size-xxxlarge);
|
|
22
|
+
line-height: var(--space-xlarge)
|
|
29
23
|
}
|
|
30
24
|
|
|
31
25
|
h2 {
|
package/src/css/variables.css
CHANGED
|
@@ -13,40 +13,40 @@
|
|
|
13
13
|
--space-xxlarge: 48px;
|
|
14
14
|
--space-xxxlarge: 64px;
|
|
15
15
|
|
|
16
|
-
/* Typography scale
|
|
17
|
-
--size-xsmall: 0.
|
|
16
|
+
/* Typography scale */
|
|
17
|
+
--size-xsmall: 0.77rem;
|
|
18
18
|
--size-small: 0.92rem;
|
|
19
19
|
--size: 1rem;
|
|
20
20
|
--size-medium: var(--size);
|
|
21
|
-
--size-large: 1.
|
|
22
|
-
--size-xlarge: 1.
|
|
23
|
-
--size-xxlarge: 1.
|
|
24
|
-
--size-xxxlarge:
|
|
21
|
+
--size-large: 1.125rem;
|
|
22
|
+
--size-xlarge: 1.266rem;
|
|
23
|
+
--size-xxlarge: 1.424rem;
|
|
24
|
+
--size-xxxlarge: 1.602rem;
|
|
25
25
|
|
|
26
|
-
--line-height:
|
|
26
|
+
--line-height: var(--space-medium);
|
|
27
27
|
|
|
28
28
|
/*
|
|
29
29
|
* Color scheme:
|
|
30
|
+
* http://mcg.mbitson.com/#!?mcgpalette0=%23dd555e&mcgpalette1=%2363bf5e&mcgpalette2=%23f7e37d&mcgpalette3=%23636568&mcgpalette4=%233385d6&themename=mcgtheme
|
|
30
31
|
* https://coolors.co/3385d6-dd555e-63bf5e-f7e37d-192339
|
|
31
|
-
* http://mcg.mbitson.com/#!?mcgpalette0=%23dd555e&mcgpalette1=%2363bf5e&mcgpalette2=%23f7e37d&mcgpalette3=%235b5d60&mcgpalette4=%233385d6&themename=mcgtheme
|
|
32
32
|
*/
|
|
33
33
|
--color-gray-25: #fafafa;
|
|
34
|
-
--color-gray-50: #
|
|
35
|
-
--color-gray-100: #
|
|
36
|
-
--color-gray-200: #
|
|
37
|
-
--color-gray-300: #
|
|
38
|
-
--color-gray-400: #
|
|
39
|
-
--color-gray-500: #
|
|
40
|
-
--color-gray-600: #
|
|
41
|
-
--color-gray-700: #
|
|
42
|
-
--color-gray-800: #
|
|
43
|
-
--color-gray-900: #
|
|
34
|
+
--color-gray-50: #eceded;
|
|
35
|
+
--color-gray-100: #d0d1d2;
|
|
36
|
+
--color-gray-200: #b1b2b4;
|
|
37
|
+
--color-gray-300: #929395;
|
|
38
|
+
--color-gray-400: #7a7c7f;
|
|
39
|
+
--color-gray-500: #636568;
|
|
40
|
+
--color-gray-600: #5b5d60;
|
|
41
|
+
--color-gray-700: #515355;
|
|
42
|
+
--color-gray-800: #47494b;
|
|
43
|
+
--color-gray-900: #35373a;
|
|
44
44
|
|
|
45
45
|
--color-gray-ultra-light: var(--color-gray-200);
|
|
46
46
|
--color-gray-light: var(--color-gray-300);
|
|
47
47
|
--color-gray: var(--color-gray-500);
|
|
48
|
-
--color-gray-dark: var(--color-gray-
|
|
49
|
-
--color-gray-ultra-dark: var(--color-gray-
|
|
48
|
+
--color-gray-dark: var(--color-gray-700);
|
|
49
|
+
--color-gray-ultra-dark: var(--color-gray-900);
|
|
50
50
|
|
|
51
51
|
--color-red-25: #fdf5f6;
|
|
52
52
|
--color-red-50: #fbebec;
|
|
@@ -170,7 +170,7 @@
|
|
|
170
170
|
--color-outline-warning: var(--color-yellow-200);
|
|
171
171
|
--color-outline-danger: var(--color-red-100);
|
|
172
172
|
|
|
173
|
-
--color-shadow: rgba(0, 0, 0, 0.
|
|
173
|
+
--color-shadow: rgba(0, 0, 0, 0.2);
|
|
174
174
|
|
|
175
175
|
--transition-in: all 0.2s ease-in;
|
|
176
176
|
--transition-out: all 0.17s ease-out;
|
|
@@ -181,9 +181,9 @@
|
|
|
181
181
|
--layer-high: 1000;
|
|
182
182
|
--layer-xhigh: 10000;
|
|
183
183
|
|
|
184
|
-
--radius-small:
|
|
185
|
-
--radius-medium: var(--space-
|
|
186
|
-
--radius-large: var(--space-
|
|
184
|
+
--radius-small: var(--space-xxxsmall);
|
|
185
|
+
--radius-medium: var(--space-xxsmall);
|
|
186
|
+
--radius-large: var(--space-small);
|
|
187
187
|
|
|
188
188
|
/** Layout */
|
|
189
189
|
--max-width: 80rem;
|
|
@@ -4,15 +4,6 @@
|
|
|
4
4
|
|
|
5
5
|
.outline {
|
|
6
6
|
border: 1px solid var(--color-outline);
|
|
7
|
-
border-radius: var(--radius-medium);
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.outline > :first-child {
|
|
11
|
-
border-radius: var(--radius-large) var(--radius-medium) 0 0;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.outline > :last-child {
|
|
15
|
-
border-radius: 0 0 var(--radius-large) var(--radius-medium);
|
|
16
7
|
}
|
|
17
8
|
|
|
18
9
|
.padding-xxxsmall {
|
package/src/layout/index.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
export { Box } from './box';
|
|
2
2
|
export { Footer } from './footer';
|
|
3
3
|
export { Header } from './header';
|
|
4
|
-
export { Separator } from './separator';
|
|
5
4
|
export { SubHeader } from './sub-header';
|
|
6
5
|
export { Stack } from './stack';
|
|
7
6
|
export { FlexStack } from './flex-stack';
|
|
@@ -11,25 +11,27 @@ export const Dropdown = (props) => {
|
|
|
11
11
|
const { className, label, ariaLabel, glyph, activeLabel, children } = props;
|
|
12
12
|
const rootClassName = cx(css.root, activeLabel && css.activeLabel, className);
|
|
13
13
|
|
|
14
|
-
const menu = useMenuState({
|
|
14
|
+
const menu = useMenuState({baseId: process.env.NODE_ENV === 'test' && 'id-test', modal: true });
|
|
15
15
|
|
|
16
16
|
return (
|
|
17
17
|
<>
|
|
18
18
|
<MenuButton {...menu} className={rootClassName} tabIndex={null}>
|
|
19
|
-
<FlexStack space="xxxsmall">
|
|
19
|
+
<FlexStack space="xxxsmall" className={css.label}>
|
|
20
20
|
{glyph && <Icon className={css.labelIcon} glyph={glyph} />}
|
|
21
21
|
{label}
|
|
22
22
|
</FlexStack>
|
|
23
23
|
</MenuButton>
|
|
24
24
|
<Menu {...menu} aria-label={ariaLabel || label} className={css.dropdown}>
|
|
25
25
|
{typeof children === 'function'
|
|
26
|
-
?
|
|
26
|
+
?
|
|
27
|
+
children({
|
|
27
28
|
MenuItem,
|
|
28
29
|
menu,
|
|
29
30
|
menuItemClassName: css.menuItem,
|
|
30
31
|
menuItemActiveClassName: css.menuItemActive,
|
|
31
32
|
})
|
|
32
|
-
: children
|
|
33
|
+
: children
|
|
34
|
+
}
|
|
33
35
|
</Menu>
|
|
34
36
|
</>
|
|
35
37
|
);
|
|
@@ -2,9 +2,15 @@
|
|
|
2
2
|
background: none;
|
|
3
3
|
border: none;
|
|
4
4
|
padding: 0;
|
|
5
|
+
}
|
|
5
6
|
|
|
7
|
+
.root:focus {
|
|
8
|
+
outline: none;
|
|
9
|
+
box-shadow: 0 0 var(--space-xxxsmall) var(--color-shadow);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.label {
|
|
6
13
|
border: 1px solid var(--color-outline);
|
|
7
|
-
border-radius: var(--radius-medium);
|
|
8
14
|
padding: calc(var(--space-xxsmall) - 1px);
|
|
9
15
|
display: flex;
|
|
10
16
|
align-items: center;
|
|
@@ -18,11 +24,7 @@
|
|
|
18
24
|
color: var(--color-text-light);
|
|
19
25
|
}
|
|
20
26
|
|
|
21
|
-
.
|
|
22
|
-
.root:focus,
|
|
23
|
-
.root:active {
|
|
24
|
-
outline: none;
|
|
25
|
-
box-shadow: 0 0 var(--space-xxxsmall) var(--color-shadow);
|
|
27
|
+
.label:hover {
|
|
26
28
|
border-color: var(--color-outline-dark);
|
|
27
29
|
color: var(--color-text);
|
|
28
30
|
}
|
|
@@ -31,7 +33,6 @@
|
|
|
31
33
|
position: absolute;
|
|
32
34
|
left: 0;
|
|
33
35
|
top: 100%;
|
|
34
|
-
border-radius: var(--radius-medium);
|
|
35
36
|
box-shadow: 0 2px var(--space-xxsmall) var(--color-shadow);
|
|
36
37
|
background: var(--color-background);
|
|
37
38
|
min-width: 180px;
|
|
@@ -18,15 +18,25 @@ const Filter = (props) => {
|
|
|
18
18
|
<div className={rootClassName}>
|
|
19
19
|
{/* eslint-disable */}
|
|
20
20
|
<FlexStack space="xxxsmall" as="label" className={css.filterCheckbox}>
|
|
21
|
-
|
|
22
|
-
<input
|
|
21
|
+
{/* eslint-enabled */}
|
|
22
|
+
<input
|
|
23
|
+
className={css.filterInput}
|
|
24
|
+
type="checkbox"
|
|
25
|
+
id={id}
|
|
26
|
+
name={name}
|
|
27
|
+
{...inputProps}
|
|
28
|
+
/>
|
|
23
29
|
<span className={css.filterLabel} title={label}>
|
|
24
30
|
{label}
|
|
25
31
|
</span>
|
|
26
32
|
</FlexStack>
|
|
27
33
|
|
|
28
34
|
{getOnOnlyClick && (
|
|
29
|
-
<button
|
|
35
|
+
<button
|
|
36
|
+
className={css.filterOnlyButton}
|
|
37
|
+
type="button"
|
|
38
|
+
onClick={getOnOnlyClick(name)}
|
|
39
|
+
>
|
|
30
40
|
only
|
|
31
41
|
</button>
|
|
32
42
|
)}
|
|
@@ -47,17 +57,13 @@ Filter.defaultProps = {
|
|
|
47
57
|
};
|
|
48
58
|
|
|
49
59
|
const FilterGroup = (props) => {
|
|
50
|
-
const {
|
|
60
|
+
const { groupKey, data, values, onCheckboxChange, toggleFilters } = props;
|
|
51
61
|
|
|
52
62
|
const { label: groupLabel, ...groupData } = data;
|
|
53
63
|
|
|
54
64
|
const groupItems = Object.entries(groupData);
|
|
55
|
-
const groupCheckboxes = groupItems.filter(
|
|
56
|
-
|
|
57
|
-
);
|
|
58
|
-
const isGroupChecked = groupCheckboxes
|
|
59
|
-
.map(([itemKey]) => get(values, `${groupKey}.${itemKey}`))
|
|
60
|
-
.reduce((agg, val) => agg && val, true);
|
|
65
|
+
const groupCheckboxes = groupItems.filter(([itemKey, item]) => typeof item?.defaultValue !== 'undefined');
|
|
66
|
+
const isGroupChecked = groupCheckboxes.map(([itemKey]) => get(values, `${groupKey}.${itemKey}`)).reduce((agg, val) => agg && val, true);
|
|
61
67
|
|
|
62
68
|
const filterSuffix = getGroupFiltersLabelSuffix(groupItems);
|
|
63
69
|
const hasCustomFilterSuffix = !Object.values(LABELS).includes(filterSuffix);
|
|
@@ -65,33 +71,26 @@ const FilterGroup = (props) => {
|
|
|
65
71
|
<>
|
|
66
72
|
{`${groupLabel}:`}
|
|
67
73
|
|
|
68
|
-
<span className={cx(hasCustomFilterSuffix && css.labelSuffixCustom)}>
|
|
74
|
+
<span className={cx(hasCustomFilterSuffix && css.labelSuffixCustom)}>
|
|
75
|
+
{filterSuffix}
|
|
76
|
+
</span>
|
|
69
77
|
</>
|
|
70
78
|
);
|
|
71
79
|
|
|
72
|
-
const getOnGroupCheck =
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
toggleFilters({
|
|
84
|
-
...newFilters,
|
|
85
|
-
...overrides,
|
|
86
|
-
});
|
|
87
|
-
};
|
|
80
|
+
const getOnGroupCheck = (value, overrides = {}) => () => {
|
|
81
|
+
const newFilters = groupCheckboxes.reduce((agg, [itemKey]) => ({
|
|
82
|
+
...agg,
|
|
83
|
+
[`${groupKey}.${itemKey}`]: value,
|
|
84
|
+
}), {});
|
|
85
|
+
|
|
86
|
+
toggleFilters({
|
|
87
|
+
...newFilters,
|
|
88
|
+
...overrides,
|
|
89
|
+
});
|
|
90
|
+
};
|
|
88
91
|
|
|
89
92
|
return (
|
|
90
|
-
<Dropdown
|
|
91
|
-
className={className}
|
|
92
|
-
label={dropdownLabel}
|
|
93
|
-
ariaLabel={`${groupLabel}: ${filterSuffix}`}
|
|
94
|
-
>
|
|
93
|
+
<Dropdown label={dropdownLabel} ariaLabel={`${groupLabel}: ${filterSuffix}`}>
|
|
95
94
|
{({ MenuItem, menu, menuItemClassName }) => {
|
|
96
95
|
return (
|
|
97
96
|
<>
|
|
@@ -101,11 +100,7 @@ const FilterGroup = (props) => {
|
|
|
101
100
|
const getOnOnlyClick = () => getOnGroupCheck(false, { [id]: true });
|
|
102
101
|
|
|
103
102
|
return (
|
|
104
|
-
<MenuItem
|
|
105
|
-
key={id}
|
|
106
|
-
{...menu}
|
|
107
|
-
className={cx(menuItemClassName, css.filterGroupItem)}
|
|
108
|
-
>
|
|
103
|
+
<MenuItem key={id} {...menu} className={cx(menuItemClassName, css.filterGroupItem)}>
|
|
109
104
|
<Filter
|
|
110
105
|
name={id}
|
|
111
106
|
label={itemData.label}
|
|
@@ -143,13 +138,12 @@ const FilterGroup = (props) => {
|
|
|
143
138
|
</div>
|
|
144
139
|
</>
|
|
145
140
|
);
|
|
146
|
-
|
|
141
|
+
}}
|
|
147
142
|
</Dropdown>
|
|
148
143
|
);
|
|
149
144
|
};
|
|
150
145
|
|
|
151
146
|
FilterGroup.propTypes = {
|
|
152
|
-
className: PropTypes.string,
|
|
153
147
|
groupKey: PropTypes.string.isRequired,
|
|
154
148
|
data: PropTypes.object.isRequired, // eslint-disable-line react/forbid-prop-types
|
|
155
149
|
values: PropTypes.object.isRequired, // eslint-disable-line react/forbid-prop-types
|
|
@@ -157,12 +151,14 @@ FilterGroup.propTypes = {
|
|
|
157
151
|
toggleFilters: PropTypes.func.isRequired,
|
|
158
152
|
};
|
|
159
153
|
|
|
160
|
-
FilterGroup.defaultProps = {
|
|
161
|
-
className: '',
|
|
162
|
-
};
|
|
163
|
-
|
|
164
154
|
export const Filters = (props) => {
|
|
165
|
-
const {
|
|
155
|
+
const {
|
|
156
|
+
className,
|
|
157
|
+
values,
|
|
158
|
+
filters,
|
|
159
|
+
toggleFilter,
|
|
160
|
+
toggleFilters,
|
|
161
|
+
} = props;
|
|
166
162
|
|
|
167
163
|
const onCheckboxChange = ({ target }) => toggleFilter(target.name, target.checked);
|
|
168
164
|
const rootClassName = cx(css.root, className);
|
|
@@ -186,15 +182,16 @@ export const Filters = (props) => {
|
|
|
186
182
|
}
|
|
187
183
|
|
|
188
184
|
return (
|
|
189
|
-
<
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
185
|
+
<div className={css.item}>
|
|
186
|
+
<FilterGroup
|
|
187
|
+
key={name}
|
|
188
|
+
groupKey={name}
|
|
189
|
+
data={data}
|
|
190
|
+
values={values}
|
|
191
|
+
onCheckboxChange={onCheckboxChange}
|
|
192
|
+
toggleFilters={toggleFilters}
|
|
193
|
+
/>
|
|
194
|
+
</div>
|
|
198
195
|
);
|
|
199
196
|
})}
|
|
200
197
|
</FlexStack>
|
|
@@ -11,7 +11,6 @@
|
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
.filterInput {
|
|
14
|
-
border-radius: var(--radius-medium) 0 0 var(--radius-medium);
|
|
15
14
|
flex: 0 0 auto;
|
|
16
15
|
height: 1em;
|
|
17
16
|
cursor: pointer;
|
|
@@ -130,20 +129,11 @@
|
|
|
130
129
|
}
|
|
131
130
|
|
|
132
131
|
.item {
|
|
133
|
-
border-radius: 0;
|
|
134
132
|
position: relative;
|
|
135
133
|
flex: 0 0 auto;
|
|
136
134
|
margin-right: -1px;
|
|
137
135
|
}
|
|
138
136
|
|
|
139
|
-
.item:first-child {
|
|
140
|
-
border-radius: var(--radius-medium) 0 0 var(--radius-medium);
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
.item:last-child {
|
|
144
|
-
border-radius: 0 var(--radius-medium) var(--radius-medium) 0;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
137
|
.item:hover {
|
|
148
138
|
z-index: var(--layer-low); /* show collapsed border */
|
|
149
139
|
}
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
|
|
25
25
|
.popover {
|
|
26
26
|
padding: var(--space-small) var(--space-large) var(--space-small) var(--space-small);
|
|
27
|
-
border-radius: var(--radius-
|
|
27
|
+
border-radius: var(--radius-small);
|
|
28
28
|
max-width: 360px;
|
|
29
29
|
outline: none;
|
|
30
30
|
filter: drop-shadow(0 0 var(--space-xxxsmall) var(--color-shadow));
|
|
@@ -13,8 +13,12 @@
|
|
|
13
13
|
text-align: left;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
+
tr:last-child .cell {
|
|
17
|
+
border-bottom-width: 1px;
|
|
18
|
+
}
|
|
19
|
+
|
|
16
20
|
.root thead .cell {
|
|
17
|
-
border-width: 0 0
|
|
21
|
+
border-width: 0 0 2px;
|
|
18
22
|
text-transform: uppercase;
|
|
19
23
|
vertical-align: top;
|
|
20
24
|
}
|
|
@@ -40,6 +44,10 @@
|
|
|
40
44
|
text-decoration: underline;
|
|
41
45
|
}
|
|
42
46
|
|
|
47
|
+
.root tbody tr:nth-child(odd) .cell {
|
|
48
|
+
background-color: var(--color-highlight);
|
|
49
|
+
}
|
|
50
|
+
|
|
43
51
|
.root tbody tr:hover .cell {
|
|
44
52
|
background-color: var(--color-highlight-warning);
|
|
45
53
|
}
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
.tooltip {
|
|
14
14
|
padding: var(--space-xxxsmall) var(--space-xxsmall);
|
|
15
|
-
border-radius: var(--radius-
|
|
15
|
+
border-radius: var(--radius-small);
|
|
16
16
|
background: var(--color-light);
|
|
17
17
|
color: var(--color-text);
|
|
18
18
|
filter: drop-shadow(0 0 var(--space-xxxsmall) var(--color-shadow));
|
package/lib/layout/separator.js
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.Separator = void 0;
|
|
7
|
-
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
-
|
|
12
|
-
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
|
-
|
|
14
|
-
var _separatorModule = _interopRequireDefault(require("./separator.module.css"));
|
|
15
|
-
|
|
16
|
-
var _excluded = ["className"];
|
|
17
|
-
|
|
18
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
19
|
-
|
|
20
|
-
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); }
|
|
21
|
-
|
|
22
|
-
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
23
|
-
|
|
24
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
25
|
-
|
|
26
|
-
var propTypes = {
|
|
27
|
-
className: _propTypes["default"].string
|
|
28
|
-
};
|
|
29
|
-
var defaultProps = {
|
|
30
|
-
className: ''
|
|
31
|
-
};
|
|
32
|
-
/**
|
|
33
|
-
* @param {PropTypes.InferProps<typeof propTypes>} props
|
|
34
|
-
* @return {React.FunctionComponentElement}
|
|
35
|
-
*/
|
|
36
|
-
|
|
37
|
-
var Separator = function Separator(props) {
|
|
38
|
-
var className = props.className,
|
|
39
|
-
restProps = _objectWithoutProperties(props, _excluded);
|
|
40
|
-
|
|
41
|
-
return /*#__PURE__*/_react["default"].createElement("div", _extends({
|
|
42
|
-
className: (0, _classnames["default"])(_separatorModule["default"].root, className)
|
|
43
|
-
}, restProps));
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
exports.Separator = Separator;
|
|
47
|
-
Separator.propTypes = propTypes;
|
|
48
|
-
Separator.defaultProps = defaultProps;
|
|
@@ -1,28 +0,0 @@
|
|
|
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 css from './separator.module.css';
|
|
7
|
-
const propTypes = {
|
|
8
|
-
className: PropTypes.string
|
|
9
|
-
};
|
|
10
|
-
const defaultProps = {
|
|
11
|
-
className: ''
|
|
12
|
-
};
|
|
13
|
-
/**
|
|
14
|
-
* @param {PropTypes.InferProps<typeof propTypes>} props
|
|
15
|
-
* @return {React.FunctionComponentElement}
|
|
16
|
-
*/
|
|
17
|
-
|
|
18
|
-
export const Separator = props => {
|
|
19
|
-
const {
|
|
20
|
-
className,
|
|
21
|
-
...restProps
|
|
22
|
-
} = props;
|
|
23
|
-
return /*#__PURE__*/React.createElement("div", _extends({
|
|
24
|
-
className: cx(css.root, className)
|
|
25
|
-
}, restProps));
|
|
26
|
-
};
|
|
27
|
-
Separator.propTypes = propTypes;
|
|
28
|
-
Separator.defaultProps = defaultProps;
|
package/src/layout/separator.jsx
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
import cx from 'classnames';
|
|
4
|
-
|
|
5
|
-
import css from './separator.module.css';
|
|
6
|
-
|
|
7
|
-
const propTypes = {
|
|
8
|
-
className: PropTypes.string,
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
const defaultProps = {
|
|
12
|
-
className: '',
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* @param {PropTypes.InferProps<typeof propTypes>} props
|
|
17
|
-
* @return {React.FunctionComponentElement}
|
|
18
|
-
*/
|
|
19
|
-
export const Separator = (props) => {
|
|
20
|
-
const { className, ...restProps } = props;
|
|
21
|
-
return <div className={cx(css.root, className)} {...restProps} />;
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
Separator.propTypes = propTypes;
|
|
25
|
-
Separator.defaultProps = defaultProps;
|