@bundle-stats/ui 3.2.5-alpha.0 → 3.2.5-alpha.10
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
|
@@ -2,32 +2,25 @@ import React from 'react';
|
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import cx from 'classnames';
|
|
4
4
|
import css from './delta.module.css';
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
displayValue: PropTypes.string.isRequired,
|
|
8
|
-
deltaType: PropTypes.string.isRequired,
|
|
9
|
-
inverted: PropTypes.bool
|
|
10
|
-
};
|
|
11
|
-
const defaultProps = {
|
|
12
|
-
className: '',
|
|
13
|
-
inverted: false
|
|
14
|
-
};
|
|
15
|
-
/**
|
|
16
|
-
* @param {PropTypes.InferProps<typeof propTypes>} props
|
|
17
|
-
* @return {React.FunctionComponentElement}
|
|
18
|
-
*/
|
|
19
|
-
|
|
20
|
-
export const Delta = props => {
|
|
21
|
-
const {
|
|
5
|
+
export const Delta = _ref => {
|
|
6
|
+
let {
|
|
22
7
|
className,
|
|
23
8
|
displayValue,
|
|
24
9
|
deltaType,
|
|
25
10
|
inverted
|
|
26
|
-
} =
|
|
11
|
+
} = _ref;
|
|
27
12
|
const rootClassName = cx(css.root, className, inverted && css.inverted, css[deltaType]);
|
|
28
13
|
return /*#__PURE__*/React.createElement("span", {
|
|
29
14
|
className: rootClassName
|
|
30
15
|
}, displayValue);
|
|
31
16
|
};
|
|
32
|
-
Delta.defaultProps =
|
|
33
|
-
|
|
17
|
+
Delta.defaultProps = {
|
|
18
|
+
className: '',
|
|
19
|
+
inverted: false
|
|
20
|
+
};
|
|
21
|
+
Delta.propTypes = {
|
|
22
|
+
className: PropTypes.string,
|
|
23
|
+
displayValue: PropTypes.string.isRequired,
|
|
24
|
+
deltaType: PropTypes.string.isRequired,
|
|
25
|
+
inverted: PropTypes.bool
|
|
26
|
+
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
.root {
|
|
2
2
|
white-space: nowrap;
|
|
3
|
+
color: var(--color-gray-ultra-light);
|
|
3
4
|
}
|
|
4
5
|
|
|
5
6
|
.HIGH_NEGATIVE {
|
|
@@ -7,7 +8,7 @@
|
|
|
7
8
|
}
|
|
8
9
|
|
|
9
10
|
.NEGATIVE {
|
|
10
|
-
color: var(--color-red);
|
|
11
|
+
color: var(--color-red-dark);
|
|
11
12
|
}
|
|
12
13
|
|
|
13
14
|
.LOW_NEGATIVE {
|
|
@@ -19,7 +20,7 @@
|
|
|
19
20
|
}
|
|
20
21
|
|
|
21
22
|
.POSITIVE {
|
|
22
|
-
color: var(--color-green);
|
|
23
|
+
color: var(--color-green-dark);
|
|
23
24
|
}
|
|
24
25
|
|
|
25
26
|
.HIGH_POSITIVE {
|
|
@@ -27,38 +28,30 @@
|
|
|
27
28
|
}
|
|
28
29
|
|
|
29
30
|
.inverted {
|
|
30
|
-
|
|
31
|
-
border-radius: var(--radius-small);
|
|
32
|
-
background: var(--color-gray-ultra-light);
|
|
31
|
+
background-color: var(--color-gray-ultra-light);
|
|
33
32
|
color: var(--color-light);
|
|
34
33
|
}
|
|
35
34
|
|
|
36
35
|
.inverted.HIGH_NEGATIVE {
|
|
37
36
|
background: var(--color-red-dark);
|
|
38
|
-
color: var(--color-highlight-danger);
|
|
39
37
|
}
|
|
40
38
|
|
|
41
39
|
.inverted.NEGATIVE {
|
|
42
|
-
background: var(--color-red);
|
|
43
|
-
color: var(--color-highlight-danger);
|
|
40
|
+
background: var(--color-red-dark);
|
|
44
41
|
}
|
|
45
42
|
|
|
46
43
|
.inverted.LOW_NEGATIVE {
|
|
47
44
|
background: var(--color-red-light);
|
|
48
|
-
color: var(--color-highlight-danger);
|
|
49
45
|
}
|
|
50
46
|
|
|
51
47
|
.inverted.LOW_POSITIVE {
|
|
52
48
|
background: var(--color-green-light);
|
|
53
|
-
color: var(--color-highlight-success);
|
|
54
49
|
}
|
|
55
50
|
|
|
56
51
|
.inverted.POSITIVE {
|
|
57
|
-
background: var(--color-green);
|
|
58
|
-
color: var(--color-highlight-success);
|
|
52
|
+
background: var(--color-green-dark);
|
|
59
53
|
}
|
|
60
54
|
|
|
61
55
|
.inverted.HIGH_POSITIVE {
|
|
62
56
|
background: var(--color-green-dark);
|
|
63
|
-
color: var(--color-highlight-success);
|
|
64
57
|
}
|
|
@@ -20,9 +20,9 @@ export const DuplicatePackagesWarning = props => {
|
|
|
20
20
|
className: cx(css.root, className)
|
|
21
21
|
}, `Bundle contains `, /*#__PURE__*/React.createElement(CustomComponentLink, BUNDLE_PACKAGES_DUPLICATE, metricRunInfo.value, showDelta && metricRunInfo.delta !== 0 && /*#__PURE__*/React.createElement(Delta, {
|
|
22
22
|
className: css.titleDelta,
|
|
23
|
+
inverted: true,
|
|
23
24
|
displayValue: metricRunInfo.displayDelta,
|
|
24
|
-
deltaType: metricRunInfo.deltaType
|
|
25
|
-
inverted: true
|
|
25
|
+
deltaType: metricRunInfo.deltaType
|
|
26
26
|
}), ` duplicate ${metricRunInfo.value === 1 ? 'package' : 'packages'}.`));
|
|
27
27
|
};
|
|
28
28
|
DuplicatePackagesWarning.propTypes = {
|
|
@@ -24,7 +24,7 @@ export const JobHeader = props => {
|
|
|
24
24
|
const rootClassName = cx(css.root, className);
|
|
25
25
|
return /*#__PURE__*/React.createElement(Stack, {
|
|
26
26
|
className: rootClassName,
|
|
27
|
-
space: "
|
|
27
|
+
space: "xxsmall"
|
|
28
28
|
}, /*#__PURE__*/React.createElement("h1", {
|
|
29
29
|
className: css.title
|
|
30
30
|
}, /*#__PURE__*/React.createElement("span", null, `#${job.internalBuildNumber}`), tag && /*#__PURE__*/React.createElement("span", {
|
|
@@ -32,10 +32,9 @@ export const JobHeader = props => {
|
|
|
32
32
|
}, tag)), /*#__PURE__*/React.createElement(FlexStack, {
|
|
33
33
|
className: css.meta,
|
|
34
34
|
space: "xxsmall"
|
|
35
|
-
}, builtAt && /*#__PURE__*/React.createElement(
|
|
35
|
+
}, builtAt && /*#__PURE__*/React.createElement("span", {
|
|
36
36
|
className: css.metaItem,
|
|
37
|
-
title: `${formatDate(builtAt)} ${formatTime(builtAt)}
|
|
38
|
-
space: "xxxsmall"
|
|
37
|
+
title: `${formatDate(builtAt)} ${formatTime(builtAt)}`
|
|
39
38
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
40
39
|
glyph: "clock",
|
|
41
40
|
className: css.metaIcon
|
|
@@ -43,11 +42,9 @@ export const JobHeader = props => {
|
|
|
43
42
|
className: css.metaLabel
|
|
44
43
|
}, formatDistanceToNow(new Date(builtAt), {
|
|
45
44
|
addSuffix: true
|
|
46
|
-
}))), hash && /*#__PURE__*/React.createElement(
|
|
47
|
-
span: true,
|
|
45
|
+
}))), hash && /*#__PURE__*/React.createElement("span", {
|
|
48
46
|
className: css.metaItem,
|
|
49
|
-
title: "Webpack bundle hash"
|
|
50
|
-
space: "xxxsmall"
|
|
47
|
+
title: "Webpack bundle hash"
|
|
51
48
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
52
49
|
glyph: "commit",
|
|
53
50
|
className: css.metaIcon
|
|
@@ -1,32 +1,36 @@
|
|
|
1
1
|
.title {
|
|
2
|
-
|
|
2
|
+
line-height: 1;
|
|
3
|
+
font-weight: bold;
|
|
3
4
|
vertical-align: top;
|
|
4
5
|
}
|
|
5
6
|
|
|
6
7
|
.tag {
|
|
7
8
|
padding: var(--space-xxxsmall);
|
|
8
9
|
margin-left: var(--space-xxxsmall);
|
|
9
|
-
background: var(--color-highlight);
|
|
10
|
+
background-color: var(--color-highlight);
|
|
10
11
|
color: var(--color-text-light);
|
|
11
12
|
display: inline-block;
|
|
12
|
-
font-size:
|
|
13
|
+
font-size: 9px;
|
|
13
14
|
line-height: var(--space-xxsmall);
|
|
14
15
|
font-weight: normal;
|
|
15
16
|
vertical-align: top;
|
|
16
17
|
}
|
|
17
18
|
|
|
19
|
+
.meta {
|
|
20
|
+
color: var(--color-text-light);
|
|
21
|
+
}
|
|
22
|
+
|
|
18
23
|
.metaItem {
|
|
19
24
|
display: inline-flex;
|
|
20
25
|
align-items: center;
|
|
21
|
-
white-space: nowrap;
|
|
22
26
|
}
|
|
23
27
|
|
|
24
28
|
.metaIcon {
|
|
25
29
|
width: var(--space-small);
|
|
26
30
|
height: var(--space-small);
|
|
27
|
-
|
|
31
|
+
margin-right: var(--space-xxxsmall);
|
|
28
32
|
}
|
|
29
33
|
|
|
30
34
|
.metaLabel {
|
|
31
|
-
|
|
35
|
+
line-height: var(--space-small);
|
|
32
36
|
}
|
|
@@ -13,7 +13,7 @@ export const JobsHeader = props => {
|
|
|
13
13
|
const rootClassName = cx(css.root, className);
|
|
14
14
|
return /*#__PURE__*/React.createElement(FlexStack, {
|
|
15
15
|
className: rootClassName,
|
|
16
|
-
space: "
|
|
16
|
+
space: "none"
|
|
17
17
|
}, jobs == null ? void 0 : jobs.map((job, index) => /*#__PURE__*/React.createElement(JobHeader, {
|
|
18
18
|
key: job.internalBuildNumber || index,
|
|
19
19
|
className: css.item,
|
|
@@ -9,6 +9,7 @@ export const Metric = _ref => {
|
|
|
9
9
|
className,
|
|
10
10
|
value,
|
|
11
11
|
formatter,
|
|
12
|
+
inline,
|
|
12
13
|
anchored,
|
|
13
14
|
children,
|
|
14
15
|
enhanced
|
|
@@ -16,7 +17,7 @@ export const Metric = _ref => {
|
|
|
16
17
|
const formattedValue = formatter(value); // eslint-disable-next-line no-unused-vars
|
|
17
18
|
|
|
18
19
|
const [matched, displayValue, displayUnit] = enhanced && formattedValue ? formattedValue.match(EXTRACT_VALUE_UNIT_PATTERN) : [null, formattedValue, null];
|
|
19
|
-
const rootClassName = cx(className, styles.root, anchored && styles.anchored);
|
|
20
|
+
const rootClassName = cx(className, styles.root, inline && styles.inline, anchored && styles.anchored);
|
|
20
21
|
return /*#__PURE__*/React.createElement("span", {
|
|
21
22
|
className: rootClassName
|
|
22
23
|
}, /*#__PURE__*/React.createElement("span", {
|
|
@@ -33,6 +34,7 @@ Metric.defaultProps = {
|
|
|
33
34
|
className: '',
|
|
34
35
|
anchored: false,
|
|
35
36
|
enhanced: false,
|
|
37
|
+
inline: false,
|
|
36
38
|
value: 0,
|
|
37
39
|
children: [],
|
|
38
40
|
formatter: val => val
|
|
@@ -40,6 +42,7 @@ Metric.defaultProps = {
|
|
|
40
42
|
Metric.propTypes = {
|
|
41
43
|
className: PropTypes.string,
|
|
42
44
|
enhanced: PropTypes.bool,
|
|
45
|
+
inline: PropTypes.bool,
|
|
43
46
|
anchored: PropTypes.bool,
|
|
44
47
|
value: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
45
48
|
formatter: PropTypes.func,
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
.root {
|
|
2
2
|
display: block;
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
.display {
|
|
6
|
-
vertical-align: middle;
|
|
3
|
+
letter-spacing: 0.05em;
|
|
7
4
|
}
|
|
8
5
|
|
|
9
6
|
.displayUnit {
|
|
@@ -11,9 +8,7 @@
|
|
|
11
8
|
}
|
|
12
9
|
|
|
13
10
|
.delta {
|
|
14
|
-
display:
|
|
15
|
-
vertical-align: middle;
|
|
16
|
-
margin: 0 0 0 var(--space-xxxsmall);
|
|
11
|
+
display: block;
|
|
17
12
|
font-size: var(--size-xsmall);
|
|
18
13
|
}
|
|
19
14
|
|
|
@@ -28,3 +23,8 @@
|
|
|
28
23
|
line-height: 1;
|
|
29
24
|
margin-top: -2px;
|
|
30
25
|
}
|
|
26
|
+
|
|
27
|
+
.inline .delta {
|
|
28
|
+
display: inline-block;
|
|
29
|
+
margin: 0 0 0 var(--space-xxxsmall);
|
|
30
|
+
}
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
}
|
|
6
6
|
|
|
7
7
|
.input {
|
|
8
|
-
border-radius: var(--radius-medium) 0 0 var(--radius-medium);
|
|
9
8
|
height: var(--space-large);
|
|
10
9
|
border-color: var(--color-outline);
|
|
11
10
|
}
|
|
@@ -22,12 +21,12 @@
|
|
|
22
21
|
cursor: pointer;
|
|
23
22
|
border-radius: 50%;
|
|
24
23
|
position: absolute;
|
|
25
|
-
right:
|
|
24
|
+
right: 0;
|
|
26
25
|
top: 50%;
|
|
27
26
|
transform: translateY(-50%);
|
|
28
|
-
padding: var(--space-
|
|
29
|
-
width: var(--space-
|
|
30
|
-
height: var(--space-
|
|
27
|
+
padding: var(--space-xxsmall);
|
|
28
|
+
width: var(--space-large);
|
|
29
|
+
height: var(--space-large);
|
|
31
30
|
background: radial-gradient(var(--color-background) 50%, transparent);
|
|
32
31
|
color: var(--color-text-ultra-light);
|
|
33
32
|
transition: var(--transition-in);
|
|
@@ -77,12 +77,12 @@ export const SummaryItem = _ref2 => {
|
|
|
77
77
|
className: css.currentMetric,
|
|
78
78
|
value: current,
|
|
79
79
|
formatter: metric.formatter,
|
|
80
|
-
enhanced: true
|
|
80
|
+
enhanced: true,
|
|
81
|
+
inline: true
|
|
81
82
|
}, showDelta && /*#__PURE__*/React.createElement(Delta, {
|
|
82
83
|
className: css.delta,
|
|
83
84
|
displayValue: runInfo.displayDeltaPercentage,
|
|
84
|
-
deltaType: runInfo.deltaType
|
|
85
|
-
inverted: true
|
|
85
|
+
deltaType: runInfo.deltaType
|
|
86
86
|
})), /*#__PURE__*/React.createElement(Metric, {
|
|
87
87
|
className: css.baselineMetric,
|
|
88
88
|
value: baseline,
|
|
@@ -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/lib-esm/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 {
|
|
@@ -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/lib-esm/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';
|
|
@@ -25,7 +25,8 @@ export const Dropdown = props => {
|
|
|
25
25
|
className: rootClassName,
|
|
26
26
|
tabIndex: null
|
|
27
27
|
}), /*#__PURE__*/React.createElement(FlexStack, {
|
|
28
|
-
space: "xxxsmall"
|
|
28
|
+
space: "xxxsmall",
|
|
29
|
+
className: css.label
|
|
29
30
|
}, glyph && /*#__PURE__*/React.createElement(Icon, {
|
|
30
31
|
className: css.labelIcon,
|
|
31
32
|
glyph: glyph
|
|
@@ -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;
|
|
@@ -54,7 +54,6 @@ Filter.defaultProps = {
|
|
|
54
54
|
|
|
55
55
|
const FilterGroup = props => {
|
|
56
56
|
const {
|
|
57
|
-
className,
|
|
58
57
|
groupKey,
|
|
59
58
|
data,
|
|
60
59
|
values,
|
|
@@ -99,7 +98,6 @@ const FilterGroup = props => {
|
|
|
99
98
|
};
|
|
100
99
|
|
|
101
100
|
return /*#__PURE__*/React.createElement(Dropdown, {
|
|
102
|
-
className: className,
|
|
103
101
|
label: dropdownLabel,
|
|
104
102
|
ariaLabel: `${groupLabel}: ${filterSuffix}`
|
|
105
103
|
}, _ref4 => {
|
|
@@ -149,7 +147,6 @@ const FilterGroup = props => {
|
|
|
149
147
|
};
|
|
150
148
|
|
|
151
149
|
FilterGroup.propTypes = {
|
|
152
|
-
className: PropTypes.string,
|
|
153
150
|
groupKey: PropTypes.string.isRequired,
|
|
154
151
|
data: PropTypes.object.isRequired,
|
|
155
152
|
// eslint-disable-line react/forbid-prop-types
|
|
@@ -158,9 +155,6 @@ FilterGroup.propTypes = {
|
|
|
158
155
|
onCheckboxChange: PropTypes.func.isRequired,
|
|
159
156
|
toggleFilters: PropTypes.func.isRequired
|
|
160
157
|
};
|
|
161
|
-
FilterGroup.defaultProps = {
|
|
162
|
-
className: ''
|
|
163
|
-
};
|
|
164
158
|
export const Filters = props => {
|
|
165
159
|
const {
|
|
166
160
|
className,
|
|
@@ -197,15 +191,16 @@ export const Filters = props => {
|
|
|
197
191
|
});
|
|
198
192
|
}
|
|
199
193
|
|
|
200
|
-
return /*#__PURE__*/React.createElement(
|
|
201
|
-
className: css.item
|
|
194
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
195
|
+
className: css.item
|
|
196
|
+
}, /*#__PURE__*/React.createElement(FilterGroup, {
|
|
202
197
|
key: name,
|
|
203
198
|
groupKey: name,
|
|
204
199
|
data: data,
|
|
205
200
|
values: values,
|
|
206
201
|
onCheckboxChange: onCheckboxChange,
|
|
207
202
|
toggleFilters: toggleFilters
|
|
208
|
-
});
|
|
203
|
+
}));
|
|
209
204
|
})));
|
|
210
205
|
};
|
|
211
206
|
Filters.defaultProps = {
|
|
@@ -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));
|