@bundle-stats/ui 3.2.4 → 3.2.5-alpha.0
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 +32 -0
- package/lib/app/app.js +13 -6
- package/lib/app/app.module.css +17 -15
- package/lib/app/header/header.js +14 -8
- package/lib/app/header/header.module.css +11 -18
- package/lib/components/bundle-assets/bundle-assets.module.css +1 -0
- package/lib/components/bundle-packages/bundle-packages.module.css +9 -5
- package/lib/components/delta/delta.js +22 -15
- package/lib/components/delta/delta.module.css +13 -6
- package/lib/components/duplicate-packages-warning/duplicate-packages-warning.js +2 -2
- package/lib/components/job-header/job-header.js +8 -5
- package/lib/components/job-header/job-header.module.css +6 -10
- package/lib/components/jobs-header/jobs-header.js +1 -1
- package/lib/components/jobs-header/jobs-header.module.css +1 -4
- package/lib/components/metric/metric.js +1 -4
- package/lib/components/metric/metric.module.css +7 -7
- package/lib/components/metrics-table-search/metrics-table-search.module.css +5 -4
- package/lib/components/summary-item/summary-item.js +3 -3
- package/lib/components/summary-item/summary-item.module.css +2 -9
- package/lib/css/default.css +13 -7
- package/lib/css/variables.css +24 -24
- package/lib/layout/box/box.module.css +9 -0
- package/lib/layout/footer/footer.module.css +2 -1
- package/lib/layout/index.js +8 -0
- package/lib/layout/separator.js +48 -0
- package/lib/layout/separator.module.css +5 -0
- package/lib/ui/dropdown/dropdown.js +1 -2
- package/lib/ui/dropdown/dropdown.module.css +7 -8
- package/lib/ui/filters/filters.js +10 -5
- package/lib/ui/filters/filters.module.css +10 -0
- package/lib/ui/popover/popover.module.css +1 -1
- package/lib/ui/table/table.module.css +1 -9
- package/lib/ui/tabs/tabs.module.css +1 -2
- package/lib/ui/tooltip/tooltip.module.css +1 -1
- package/lib-esm/app/app.js +12 -6
- package/lib-esm/app/app.module.css +17 -15
- package/lib-esm/app/header/header.js +13 -8
- package/lib-esm/app/header/header.module.css +11 -18
- package/lib-esm/components/bundle-assets/bundle-assets.module.css +1 -0
- package/lib-esm/components/bundle-packages/bundle-packages.module.css +9 -5
- package/lib-esm/components/delta/delta.js +20 -13
- package/lib-esm/components/delta/delta.module.css +13 -6
- package/lib-esm/components/duplicate-packages-warning/duplicate-packages-warning.js +2 -2
- package/lib-esm/components/job-header/job-header.js +8 -5
- package/lib-esm/components/job-header/job-header.module.css +6 -10
- package/lib-esm/components/jobs-header/jobs-header.js +1 -1
- package/lib-esm/components/jobs-header/jobs-header.module.css +1 -4
- package/lib-esm/components/metric/metric.js +1 -4
- package/lib-esm/components/metric/metric.module.css +7 -7
- package/lib-esm/components/metrics-table-search/metrics-table-search.module.css +5 -4
- package/lib-esm/components/summary-item/summary-item.js +3 -3
- package/lib-esm/components/summary-item/summary-item.module.css +2 -9
- package/lib-esm/css/default.css +13 -7
- package/lib-esm/css/variables.css +24 -24
- package/lib-esm/layout/box/box.module.css +9 -0
- package/lib-esm/layout/footer/footer.module.css +2 -1
- package/lib-esm/layout/index.js +1 -0
- package/lib-esm/layout/separator.js +28 -0
- package/lib-esm/layout/separator.module.css +5 -0
- package/lib-esm/ui/dropdown/dropdown.js +1 -2
- package/lib-esm/ui/dropdown/dropdown.module.css +7 -8
- package/lib-esm/ui/filters/filters.js +9 -4
- package/lib-esm/ui/filters/filters.module.css +10 -0
- package/lib-esm/ui/popover/popover.module.css +1 -1
- package/lib-esm/ui/table/table.module.css +1 -9
- package/lib-esm/ui/tabs/tabs.module.css +1 -2
- package/lib-esm/ui/tooltip/tooltip.module.css +1 -1
- package/package.json +13 -11
- package/src/app/app.jsx +23 -15
- package/src/app/app.module.css +17 -15
- package/src/app/header/header.jsx +15 -10
- package/src/app/header/header.module.css +11 -18
- package/src/components/bundle-assets/bundle-assets.module.css +1 -0
- package/src/components/bundle-packages/bundle-packages.module.css +9 -5
- package/src/components/delta/delta.jsx +17 -9
- package/src/components/delta/delta.module.css +13 -6
- package/src/components/duplicate-packages-warning/duplicate-packages-warning.jsx +7 -2
- package/src/components/job-header/job-header.jsx +9 -5
- package/src/components/job-header/job-header.module.css +6 -10
- package/src/components/jobs-header/jobs-header.jsx +1 -1
- package/src/components/jobs-header/jobs-header.module.css +1 -4
- package/src/components/metric/metric.jsx +2 -9
- package/src/components/metric/metric.module.css +7 -7
- package/src/components/metrics-table-search/metrics-table-search.module.css +5 -4
- package/src/components/summary-item/summary-item.jsx +1 -1
- package/src/components/summary-item/summary-item.module.css +2 -9
- package/src/css/default.css +13 -7
- package/src/css/variables.css +24 -24
- package/src/layout/box/box.module.css +9 -0
- package/src/layout/footer/footer.module.css +2 -1
- package/src/layout/index.js +1 -0
- package/src/layout/separator.jsx +25 -0
- package/src/layout/separator.module.css +5 -0
- package/src/ui/dropdown/dropdown.jsx +4 -6
- package/src/ui/dropdown/dropdown.module.css +7 -8
- package/src/ui/filters/filters.jsx +53 -50
- package/src/ui/filters/filters.module.css +10 -0
- package/src/ui/popover/popover.module.css +1 -1
- package/src/ui/table/table.module.css +1 -9
- package/src/ui/tabs/tabs.module.css +1 -2
- package/src/ui/tooltip/tooltip.module.css +1 -1
|
@@ -2,25 +2,32 @@ 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
|
-
|
|
6
|
-
|
|
5
|
+
const propTypes = {
|
|
6
|
+
className: PropTypes.string,
|
|
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 {
|
|
7
22
|
className,
|
|
8
23
|
displayValue,
|
|
9
24
|
deltaType,
|
|
10
25
|
inverted
|
|
11
|
-
} =
|
|
26
|
+
} = props;
|
|
12
27
|
const rootClassName = cx(css.root, className, inverted && css.inverted, css[deltaType]);
|
|
13
28
|
return /*#__PURE__*/React.createElement("span", {
|
|
14
29
|
className: rootClassName
|
|
15
30
|
}, displayValue);
|
|
16
31
|
};
|
|
17
|
-
Delta.defaultProps =
|
|
18
|
-
|
|
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
|
-
};
|
|
32
|
+
Delta.defaultProps = defaultProps;
|
|
33
|
+
Delta.propTypes = propTypes;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
.root {
|
|
2
2
|
white-space: nowrap;
|
|
3
|
-
color: var(--color-gray-ultra-light);
|
|
4
3
|
}
|
|
5
4
|
|
|
6
5
|
.HIGH_NEGATIVE {
|
|
@@ -8,7 +7,7 @@
|
|
|
8
7
|
}
|
|
9
8
|
|
|
10
9
|
.NEGATIVE {
|
|
11
|
-
color: var(--color-red
|
|
10
|
+
color: var(--color-red);
|
|
12
11
|
}
|
|
13
12
|
|
|
14
13
|
.LOW_NEGATIVE {
|
|
@@ -20,7 +19,7 @@
|
|
|
20
19
|
}
|
|
21
20
|
|
|
22
21
|
.POSITIVE {
|
|
23
|
-
color: var(--color-green
|
|
22
|
+
color: var(--color-green);
|
|
24
23
|
}
|
|
25
24
|
|
|
26
25
|
.HIGH_POSITIVE {
|
|
@@ -28,30 +27,38 @@
|
|
|
28
27
|
}
|
|
29
28
|
|
|
30
29
|
.inverted {
|
|
31
|
-
|
|
30
|
+
padding: 2px;
|
|
31
|
+
border-radius: var(--radius-small);
|
|
32
|
+
background: var(--color-gray-ultra-light);
|
|
32
33
|
color: var(--color-light);
|
|
33
34
|
}
|
|
34
35
|
|
|
35
36
|
.inverted.HIGH_NEGATIVE {
|
|
36
37
|
background: var(--color-red-dark);
|
|
38
|
+
color: var(--color-highlight-danger);
|
|
37
39
|
}
|
|
38
40
|
|
|
39
41
|
.inverted.NEGATIVE {
|
|
40
|
-
background: var(--color-red
|
|
42
|
+
background: var(--color-red);
|
|
43
|
+
color: var(--color-highlight-danger);
|
|
41
44
|
}
|
|
42
45
|
|
|
43
46
|
.inverted.LOW_NEGATIVE {
|
|
44
47
|
background: var(--color-red-light);
|
|
48
|
+
color: var(--color-highlight-danger);
|
|
45
49
|
}
|
|
46
50
|
|
|
47
51
|
.inverted.LOW_POSITIVE {
|
|
48
52
|
background: var(--color-green-light);
|
|
53
|
+
color: var(--color-highlight-success);
|
|
49
54
|
}
|
|
50
55
|
|
|
51
56
|
.inverted.POSITIVE {
|
|
52
|
-
background: var(--color-green
|
|
57
|
+
background: var(--color-green);
|
|
58
|
+
color: var(--color-highlight-success);
|
|
53
59
|
}
|
|
54
60
|
|
|
55
61
|
.inverted.HIGH_POSITIVE {
|
|
56
62
|
background: var(--color-green-dark);
|
|
63
|
+
color: var(--color-highlight-success);
|
|
57
64
|
}
|
|
@@ -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,
|
|
24
23
|
displayValue: metricRunInfo.displayDelta,
|
|
25
|
-
deltaType: metricRunInfo.deltaType
|
|
24
|
+
deltaType: metricRunInfo.deltaType,
|
|
25
|
+
inverted: true
|
|
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: "xxxsmall"
|
|
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,9 +32,10 @@ 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(FlexStack, {
|
|
36
36
|
className: css.metaItem,
|
|
37
|
-
title: `${formatDate(builtAt)} ${formatTime(builtAt)}
|
|
37
|
+
title: `${formatDate(builtAt)} ${formatTime(builtAt)}`,
|
|
38
|
+
space: "xxxsmall"
|
|
38
39
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
39
40
|
glyph: "clock",
|
|
40
41
|
className: css.metaIcon
|
|
@@ -42,9 +43,11 @@ export const JobHeader = props => {
|
|
|
42
43
|
className: css.metaLabel
|
|
43
44
|
}, formatDistanceToNow(new Date(builtAt), {
|
|
44
45
|
addSuffix: true
|
|
45
|
-
}))), hash && /*#__PURE__*/React.createElement(
|
|
46
|
+
}))), hash && /*#__PURE__*/React.createElement(FlexStack, {
|
|
47
|
+
span: true,
|
|
46
48
|
className: css.metaItem,
|
|
47
|
-
title: "Webpack bundle hash"
|
|
49
|
+
title: "Webpack bundle hash",
|
|
50
|
+
space: "xxxsmall"
|
|
48
51
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
49
52
|
glyph: "commit",
|
|
50
53
|
className: css.metaIcon
|
|
@@ -1,36 +1,32 @@
|
|
|
1
1
|
.title {
|
|
2
|
-
|
|
3
|
-
font-weight: bold;
|
|
2
|
+
font-size: var(--size-xlarge);
|
|
4
3
|
vertical-align: top;
|
|
5
4
|
}
|
|
6
5
|
|
|
7
6
|
.tag {
|
|
8
7
|
padding: var(--space-xxxsmall);
|
|
9
8
|
margin-left: var(--space-xxxsmall);
|
|
10
|
-
background
|
|
9
|
+
background: var(--color-highlight);
|
|
11
10
|
color: var(--color-text-light);
|
|
12
11
|
display: inline-block;
|
|
13
|
-
font-size:
|
|
12
|
+
font-size: var(--size-xsmall);
|
|
14
13
|
line-height: var(--space-xxsmall);
|
|
15
14
|
font-weight: normal;
|
|
16
15
|
vertical-align: top;
|
|
17
16
|
}
|
|
18
17
|
|
|
19
|
-
.meta {
|
|
20
|
-
color: var(--color-text-light);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
18
|
.metaItem {
|
|
24
19
|
display: inline-flex;
|
|
25
20
|
align-items: center;
|
|
21
|
+
white-space: nowrap;
|
|
26
22
|
}
|
|
27
23
|
|
|
28
24
|
.metaIcon {
|
|
29
25
|
width: var(--space-small);
|
|
30
26
|
height: var(--space-small);
|
|
31
|
-
|
|
27
|
+
color: var(--color-text-ultra-light);
|
|
32
28
|
}
|
|
33
29
|
|
|
34
30
|
.metaLabel {
|
|
35
|
-
|
|
31
|
+
color: var(--color-text-light);
|
|
36
32
|
}
|
|
@@ -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: "small"
|
|
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,7 +9,6 @@ export const Metric = _ref => {
|
|
|
9
9
|
className,
|
|
10
10
|
value,
|
|
11
11
|
formatter,
|
|
12
|
-
inline,
|
|
13
12
|
anchored,
|
|
14
13
|
children,
|
|
15
14
|
enhanced
|
|
@@ -17,7 +16,7 @@ export const Metric = _ref => {
|
|
|
17
16
|
const formattedValue = formatter(value); // eslint-disable-next-line no-unused-vars
|
|
18
17
|
|
|
19
18
|
const [matched, displayValue, displayUnit] = enhanced && formattedValue ? formattedValue.match(EXTRACT_VALUE_UNIT_PATTERN) : [null, formattedValue, null];
|
|
20
|
-
const rootClassName = cx(className, styles.root,
|
|
19
|
+
const rootClassName = cx(className, styles.root, anchored && styles.anchored);
|
|
21
20
|
return /*#__PURE__*/React.createElement("span", {
|
|
22
21
|
className: rootClassName
|
|
23
22
|
}, /*#__PURE__*/React.createElement("span", {
|
|
@@ -34,7 +33,6 @@ Metric.defaultProps = {
|
|
|
34
33
|
className: '',
|
|
35
34
|
anchored: false,
|
|
36
35
|
enhanced: false,
|
|
37
|
-
inline: false,
|
|
38
36
|
value: 0,
|
|
39
37
|
children: [],
|
|
40
38
|
formatter: val => val
|
|
@@ -42,7 +40,6 @@ Metric.defaultProps = {
|
|
|
42
40
|
Metric.propTypes = {
|
|
43
41
|
className: PropTypes.string,
|
|
44
42
|
enhanced: PropTypes.bool,
|
|
45
|
-
inline: PropTypes.bool,
|
|
46
43
|
anchored: PropTypes.bool,
|
|
47
44
|
value: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
48
45
|
formatter: PropTypes.func,
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
.root {
|
|
2
2
|
display: block;
|
|
3
|
-
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.display {
|
|
6
|
+
vertical-align: middle;
|
|
4
7
|
}
|
|
5
8
|
|
|
6
9
|
.displayUnit {
|
|
@@ -8,7 +11,9 @@
|
|
|
8
11
|
}
|
|
9
12
|
|
|
10
13
|
.delta {
|
|
11
|
-
display:
|
|
14
|
+
display: inline;
|
|
15
|
+
vertical-align: middle;
|
|
16
|
+
margin: 0 0 0 var(--space-xxxsmall);
|
|
12
17
|
font-size: var(--size-xsmall);
|
|
13
18
|
}
|
|
14
19
|
|
|
@@ -23,8 +28,3 @@
|
|
|
23
28
|
line-height: 1;
|
|
24
29
|
margin-top: -2px;
|
|
25
30
|
}
|
|
26
|
-
|
|
27
|
-
.inline .delta {
|
|
28
|
-
display: inline-block;
|
|
29
|
-
margin: 0 0 0 var(--space-xxxsmall);
|
|
30
|
-
}
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
}
|
|
6
6
|
|
|
7
7
|
.input {
|
|
8
|
+
border-radius: var(--radius-medium) 0 0 var(--radius-medium);
|
|
8
9
|
height: var(--space-large);
|
|
9
10
|
border-color: var(--color-outline);
|
|
10
11
|
}
|
|
@@ -21,12 +22,12 @@
|
|
|
21
22
|
cursor: pointer;
|
|
22
23
|
border-radius: 50%;
|
|
23
24
|
position: absolute;
|
|
24
|
-
right:
|
|
25
|
+
right: 2px;
|
|
25
26
|
top: 50%;
|
|
26
27
|
transform: translateY(-50%);
|
|
27
|
-
padding: var(--space-
|
|
28
|
-
width: var(--space-
|
|
29
|
-
height: var(--space-
|
|
28
|
+
padding: var(--space-xxxsmall);
|
|
29
|
+
width: var(--space-medium);
|
|
30
|
+
height: var(--space-medium);
|
|
30
31
|
background: radial-gradient(var(--color-background) 50%, transparent);
|
|
31
32
|
color: var(--color-text-ultra-light);
|
|
32
33
|
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
|
|
81
|
-
inline: true
|
|
80
|
+
enhanced: true
|
|
82
81
|
}, showDelta && /*#__PURE__*/React.createElement(Delta, {
|
|
83
82
|
className: css.delta,
|
|
84
83
|
displayValue: runInfo.displayDeltaPercentage,
|
|
85
|
-
deltaType: runInfo.deltaType
|
|
84
|
+
deltaType: runInfo.deltaType,
|
|
85
|
+
inverted: true
|
|
86
86
|
})), /*#__PURE__*/React.createElement(Metric, {
|
|
87
87
|
className: css.baselineMetric,
|
|
88
88
|
value: baseline,
|
|
@@ -29,21 +29,14 @@
|
|
|
29
29
|
.currentMetric {
|
|
30
30
|
display: block;
|
|
31
31
|
color: var(--color-heading);
|
|
32
|
-
font-size: var(--size-
|
|
32
|
+
font-size: var(--size-xlarge);
|
|
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
|
-
|
|
43
38
|
.baselineMetric {
|
|
44
39
|
color: var(--color-text-light);
|
|
45
|
-
font-size: var(--size-small);
|
|
46
|
-
line-height: var(--space-small);
|
|
47
40
|
}
|
|
48
41
|
|
|
49
42
|
/* Loading state */
|
|
@@ -57,6 +50,6 @@
|
|
|
57
50
|
|
|
58
51
|
/* Size large */
|
|
59
52
|
.large .currentMetric {
|
|
60
|
-
font-size: var(--size-
|
|
53
|
+
font-size: var(--size-xxlarge);
|
|
61
54
|
line-height: var(--space-medium);
|
|
62
55
|
}
|
package/lib-esm/css/default.css
CHANGED
|
@@ -1,25 +1,31 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
@import url("~modern-css-reset/dist/reset.css");
|
|
2
|
+
|
|
3
|
+
/** modern-css-reset updates */
|
|
4
|
+
pre,
|
|
5
|
+
ul,
|
|
6
|
+
ol,
|
|
7
|
+
button {
|
|
8
|
+
margin: 0;
|
|
3
9
|
}
|
|
4
10
|
|
|
5
11
|
html {
|
|
12
|
+
font-family: var(--font-family);
|
|
6
13
|
font-size: 81.25%;
|
|
7
|
-
line-height: 1.8461;
|
|
8
14
|
}
|
|
9
15
|
|
|
10
16
|
body {
|
|
17
|
+
background: var(--color-background);
|
|
11
18
|
color: var(--color-text);
|
|
19
|
+
line-height: var(--line-height);
|
|
12
20
|
}
|
|
13
21
|
|
|
14
|
-
h1, h2, h3, h4, h5 {
|
|
15
|
-
margin-bottom: var(--space-small);
|
|
22
|
+
h1, h2, h3, h4, h5, h6 {
|
|
16
23
|
color: var(--color-heading);
|
|
17
|
-
font-weight:
|
|
24
|
+
font-weight: bold;
|
|
18
25
|
}
|
|
19
26
|
|
|
20
27
|
h1 {
|
|
21
28
|
font-size: var(--size-xxxlarge);
|
|
22
|
-
line-height: var(--space-xlarge)
|
|
23
29
|
}
|
|
24
30
|
|
|
25
31
|
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 - https://type-scale.com 1.2 */
|
|
17
|
+
--size-xsmall: 0.8rem;
|
|
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.2rem;
|
|
22
|
+
--size-xlarge: 1.44rem;
|
|
23
|
+
--size-xxlarge: 1.728rem;
|
|
24
|
+
--size-xxxlarge: 2.074rem;
|
|
25
25
|
|
|
26
|
-
--line-height:
|
|
26
|
+
--line-height: 1.66em;
|
|
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
|
|
31
30
|
* 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: #e4e4e5;
|
|
35
|
+
--color-gray-100: #cececf;
|
|
36
|
+
--color-gray-200: #adaeb0;
|
|
37
|
+
--color-gray-300: #8c8e90;
|
|
38
|
+
--color-gray-400: #747578;
|
|
39
|
+
--color-gray-500: #5b5d60;
|
|
40
|
+
--color-gray-600: #535558;
|
|
41
|
+
--color-gray-700: #494b4e;
|
|
42
|
+
--color-gray-800: #404144;
|
|
43
|
+
--color-gray-900: #2f3033;
|
|
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-600);
|
|
49
|
+
--color-gray-ultra-dark: var(--color-gray-700);
|
|
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.1);
|
|
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: var(--space-xxxsmall);
|
|
185
|
-
--radius-medium: var(--space-
|
|
186
|
-
--radius-large: var(--space-
|
|
184
|
+
--radius-small: calc(var(--space-xxxsmall) / 2);
|
|
185
|
+
--radius-medium: var(--space-xxxsmall);
|
|
186
|
+
--radius-large: var(--space-xxsmall);
|
|
187
187
|
|
|
188
188
|
/** Layout */
|
|
189
189
|
--max-width: 80rem;
|
|
@@ -4,6 +4,15 @@
|
|
|
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);
|
|
7
16
|
}
|
|
8
17
|
|
|
9
18
|
.padding-xxxsmall {
|
package/lib-esm/layout/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { Box } from './box';
|
|
2
2
|
export { Footer } from './footer';
|
|
3
3
|
export { Header } from './header';
|
|
4
|
+
export { Separator } from './separator';
|
|
4
5
|
export { SubHeader } from './sub-header';
|
|
5
6
|
export { Stack } from './stack';
|
|
6
7
|
export { FlexStack } from './flex-stack';
|
|
@@ -0,0 +1,28 @@
|
|
|
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;
|
|
@@ -25,8 +25,7 @@ export const Dropdown = props => {
|
|
|
25
25
|
className: rootClassName,
|
|
26
26
|
tabIndex: null
|
|
27
27
|
}), /*#__PURE__*/React.createElement(FlexStack, {
|
|
28
|
-
space: "xxxsmall"
|
|
29
|
-
className: css.label
|
|
28
|
+
space: "xxxsmall"
|
|
30
29
|
}, glyph && /*#__PURE__*/React.createElement(Icon, {
|
|
31
30
|
className: css.labelIcon,
|
|
32
31
|
glyph: glyph
|
|
@@ -2,15 +2,9 @@
|
|
|
2
2
|
background: none;
|
|
3
3
|
border: none;
|
|
4
4
|
padding: 0;
|
|
5
|
-
}
|
|
6
5
|
|
|
7
|
-
.root:focus {
|
|
8
|
-
outline: none;
|
|
9
|
-
box-shadow: 0 0 var(--space-xxxsmall) var(--color-shadow);
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
.label {
|
|
13
6
|
border: 1px solid var(--color-outline);
|
|
7
|
+
border-radius: var(--radius-medium);
|
|
14
8
|
padding: calc(var(--space-xxsmall) - 1px);
|
|
15
9
|
display: flex;
|
|
16
10
|
align-items: center;
|
|
@@ -24,7 +18,11 @@
|
|
|
24
18
|
color: var(--color-text-light);
|
|
25
19
|
}
|
|
26
20
|
|
|
27
|
-
.
|
|
21
|
+
.root:hover,
|
|
22
|
+
.root:focus,
|
|
23
|
+
.root:active {
|
|
24
|
+
outline: none;
|
|
25
|
+
box-shadow: 0 0 var(--space-xxxsmall) var(--color-shadow);
|
|
28
26
|
border-color: var(--color-outline-dark);
|
|
29
27
|
color: var(--color-text);
|
|
30
28
|
}
|
|
@@ -33,6 +31,7 @@
|
|
|
33
31
|
position: absolute;
|
|
34
32
|
left: 0;
|
|
35
33
|
top: 100%;
|
|
34
|
+
border-radius: var(--radius-medium);
|
|
36
35
|
box-shadow: 0 2px var(--space-xxsmall) var(--color-shadow);
|
|
37
36
|
background: var(--color-background);
|
|
38
37
|
min-width: 180px;
|
|
@@ -54,6 +54,7 @@ Filter.defaultProps = {
|
|
|
54
54
|
|
|
55
55
|
const FilterGroup = props => {
|
|
56
56
|
const {
|
|
57
|
+
className,
|
|
57
58
|
groupKey,
|
|
58
59
|
data,
|
|
59
60
|
values,
|
|
@@ -98,6 +99,7 @@ const FilterGroup = props => {
|
|
|
98
99
|
};
|
|
99
100
|
|
|
100
101
|
return /*#__PURE__*/React.createElement(Dropdown, {
|
|
102
|
+
className: className,
|
|
101
103
|
label: dropdownLabel,
|
|
102
104
|
ariaLabel: `${groupLabel}: ${filterSuffix}`
|
|
103
105
|
}, _ref4 => {
|
|
@@ -147,6 +149,7 @@ const FilterGroup = props => {
|
|
|
147
149
|
};
|
|
148
150
|
|
|
149
151
|
FilterGroup.propTypes = {
|
|
152
|
+
className: PropTypes.string,
|
|
150
153
|
groupKey: PropTypes.string.isRequired,
|
|
151
154
|
data: PropTypes.object.isRequired,
|
|
152
155
|
// eslint-disable-line react/forbid-prop-types
|
|
@@ -155,6 +158,9 @@ FilterGroup.propTypes = {
|
|
|
155
158
|
onCheckboxChange: PropTypes.func.isRequired,
|
|
156
159
|
toggleFilters: PropTypes.func.isRequired
|
|
157
160
|
};
|
|
161
|
+
FilterGroup.defaultProps = {
|
|
162
|
+
className: ''
|
|
163
|
+
};
|
|
158
164
|
export const Filters = props => {
|
|
159
165
|
const {
|
|
160
166
|
className,
|
|
@@ -191,16 +197,15 @@ export const Filters = props => {
|
|
|
191
197
|
});
|
|
192
198
|
}
|
|
193
199
|
|
|
194
|
-
return /*#__PURE__*/React.createElement(
|
|
195
|
-
className: css.item
|
|
196
|
-
}, /*#__PURE__*/React.createElement(FilterGroup, {
|
|
200
|
+
return /*#__PURE__*/React.createElement(FilterGroup, {
|
|
201
|
+
className: css.item,
|
|
197
202
|
key: name,
|
|
198
203
|
groupKey: name,
|
|
199
204
|
data: data,
|
|
200
205
|
values: values,
|
|
201
206
|
onCheckboxChange: onCheckboxChange,
|
|
202
207
|
toggleFilters: toggleFilters
|
|
203
|
-
})
|
|
208
|
+
});
|
|
204
209
|
})));
|
|
205
210
|
};
|
|
206
211
|
Filters.defaultProps = {
|