@bundle-stats/ui 3.2.5-beta.1 → 3.2.6-beta.1
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 +28 -3
- package/lib/app/app.module.css +7 -0
- package/lib/components/bundle-assets/bundle-assets.js +15 -7
- package/lib/components/bundle-assets/bundle-assets.module.css +13 -26
- package/lib/components/bundle-packages/bundle-packages.js +8 -4
- package/lib/components/bundle-packages/bundle-packages.module.css +4 -12
- package/lib/components/delta/delta.module.css +1 -0
- package/lib/components/metrics-table-search/metrics-table-search.module.css +5 -4
- package/lib/css/default.css +14 -3
- package/lib/css/variables.css +18 -18
- package/lib/layout/box/box.module.css +9 -0
- 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/index.js +8 -0
- package/lib/ui/table/table.module.css +0 -4
- package/lib/ui/tag/index.js +18 -0
- package/lib/ui/tag/tag.js +72 -0
- package/lib/ui/tag/tag.module.css +55 -0
- package/lib/ui/tag/tag.stories.js +38 -0
- package/lib/ui/tooltip/tooltip.module.css +1 -1
- package/lib-esm/app/app.module.css +7 -0
- package/lib-esm/components/bundle-assets/bundle-assets.js +14 -7
- package/lib-esm/components/bundle-assets/bundle-assets.module.css +13 -26
- package/lib-esm/components/bundle-packages/bundle-packages.js +7 -4
- package/lib-esm/components/bundle-packages/bundle-packages.module.css +4 -12
- package/lib-esm/components/delta/delta.module.css +1 -0
- package/lib-esm/components/metrics-table-search/metrics-table-search.module.css +5 -4
- package/lib-esm/css/default.css +14 -3
- package/lib-esm/css/variables.css +18 -18
- package/lib-esm/layout/box/box.module.css +9 -0
- 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/index.js +1 -0
- package/lib-esm/ui/table/table.module.css +0 -4
- package/lib-esm/ui/tag/index.js +1 -0
- package/lib-esm/ui/tag/tag.js +45 -0
- package/lib-esm/ui/tag/tag.module.css +55 -0
- package/lib-esm/ui/tag/tag.stories.js +23 -0
- package/lib-esm/ui/tooltip/tooltip.module.css +1 -1
- package/package.json +17 -16
- package/src/app/app.jsx +6 -2
- package/src/app/app.module.css +7 -0
- package/src/components/bundle-assets/bundle-assets.jsx +58 -41
- package/src/components/bundle-assets/bundle-assets.module.css +13 -26
- package/src/components/bundle-packages/bundle-packages.jsx +10 -5
- package/src/components/bundle-packages/bundle-packages.module.css +4 -12
- package/src/components/delta/delta.module.css +1 -0
- package/src/components/metrics-table-search/metrics-table-search.module.css +5 -4
- package/src/css/default.css +14 -3
- package/src/css/variables.css +18 -18
- package/src/layout/box/box.module.css +9 -0
- 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/index.js +1 -0
- package/src/ui/table/table.module.css +0 -4
- package/src/ui/tag/index.js +1 -0
- package/src/ui/tag/tag.jsx +49 -0
- package/src/ui/tag/tag.module.css +55 -0
- package/src/ui/tooltip/tooltip.module.css +1 -1
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.Tag = exports.SIZES = exports.KINDS = 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 _tagModule = _interopRequireDefault(require("./tag.module.css"));
|
|
15
|
+
|
|
16
|
+
var _excluded = ["className", "as", "kind", "size"];
|
|
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 KINDS = {
|
|
27
|
+
DEFAULT: 'default',
|
|
28
|
+
SUCCESS: 'success',
|
|
29
|
+
INFO: 'info',
|
|
30
|
+
WARNING: 'warning',
|
|
31
|
+
DANGER: 'danger'
|
|
32
|
+
};
|
|
33
|
+
exports.KINDS = KINDS;
|
|
34
|
+
var SIZES = {
|
|
35
|
+
SMALL: 'small',
|
|
36
|
+
MEDIUM: 'medium',
|
|
37
|
+
LARGE: 'large'
|
|
38
|
+
};
|
|
39
|
+
exports.SIZES = SIZES;
|
|
40
|
+
|
|
41
|
+
var Tag = function Tag(props) {
|
|
42
|
+
var _props$className = props.className,
|
|
43
|
+
className = _props$className === void 0 ? '' : _props$className,
|
|
44
|
+
_props$as = props.as,
|
|
45
|
+
Component = _props$as === void 0 ? 'span' : _props$as,
|
|
46
|
+
_props$kind = props.kind,
|
|
47
|
+
kind = _props$kind === void 0 ? KINDS.DEFAULT : _props$kind,
|
|
48
|
+
_props$size = props.size,
|
|
49
|
+
size = _props$size === void 0 ? SIZES.MEDIUM : _props$size,
|
|
50
|
+
restProps = _objectWithoutProperties(props, _excluded);
|
|
51
|
+
|
|
52
|
+
var rootClassName = (0, _classnames["default"])(_tagModule["default"].root, className, _tagModule["default"][kind], _tagModule["default"][size]);
|
|
53
|
+
return /*#__PURE__*/_react["default"].createElement(Component, _extends({
|
|
54
|
+
className: rootClassName
|
|
55
|
+
}, restProps));
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
exports.Tag = Tag;
|
|
59
|
+
Tag.propTypes = {
|
|
60
|
+
className: _propTypes["default"].string,
|
|
61
|
+
as: _propTypes["default"].elementType,
|
|
62
|
+
kind: _propTypes["default"].oneOf(Object.values(KINDS)),
|
|
63
|
+
size: _propTypes["default"].oneOf(Object.values(SIZES))
|
|
64
|
+
};
|
|
65
|
+
Tag.defaultProps = {
|
|
66
|
+
className: '',
|
|
67
|
+
as: 'span',
|
|
68
|
+
kind: KINDS.DEFAULT,
|
|
69
|
+
size: SIZES.MEDIUM
|
|
70
|
+
};
|
|
71
|
+
Tag.KINDS = KINDS;
|
|
72
|
+
Tag.SIZES = SIZES;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
.root {
|
|
2
|
+
display: inline-block;
|
|
3
|
+
font-family: var(--font-family);
|
|
4
|
+
font-weight: bold;
|
|
5
|
+
background: var(--color-text-light);
|
|
6
|
+
color: var(--color-light);
|
|
7
|
+
text-align: center;
|
|
8
|
+
text-transform: uppercase;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/** Kind variation */
|
|
12
|
+
.success {
|
|
13
|
+
background: var(--color-success);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.info {
|
|
17
|
+
background: var(--color-info);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.warning {
|
|
21
|
+
background: var(--color-warning-dark);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.danger {
|
|
25
|
+
background: var(--color-danger);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/** Size variation */
|
|
29
|
+
/** default: medium */
|
|
30
|
+
.root {
|
|
31
|
+
border-radius: var(--radius-medium);
|
|
32
|
+
padding: var(--space-xxxsmall);
|
|
33
|
+
min-width: var(--space-small);
|
|
34
|
+
height: var(--space-small);
|
|
35
|
+
font-size: 9px;
|
|
36
|
+
line-height: 1;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.small {
|
|
40
|
+
border-radius: var(--radius-small);
|
|
41
|
+
padding: calc(var(--space-xxxsmall) / 2);
|
|
42
|
+
height: var(--space-xsmall);
|
|
43
|
+
min-width: var(--space-xsmall);
|
|
44
|
+
font-size: 8px;
|
|
45
|
+
line-height: 1;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.large {
|
|
49
|
+
border-radius: var(--radius-large);
|
|
50
|
+
padding: var(--space-xxxsmall) var(--space-xxsmall);
|
|
51
|
+
min-width: var(--space-medium);
|
|
52
|
+
height: var(--space-medium);
|
|
53
|
+
font-size: 12px;
|
|
54
|
+
line-height: var(--space-small);
|
|
55
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = exports.OneLetter = exports.Default = void 0;
|
|
7
|
+
|
|
8
|
+
var _ = require(".");
|
|
9
|
+
|
|
10
|
+
var _default = {
|
|
11
|
+
title: 'UI/Tag',
|
|
12
|
+
component: _.Tag,
|
|
13
|
+
argTypes: {
|
|
14
|
+
kind: {
|
|
15
|
+
control: 'select',
|
|
16
|
+
options: Object.values(_.Tag.KINDS)
|
|
17
|
+
},
|
|
18
|
+
size: {
|
|
19
|
+
control: 'select',
|
|
20
|
+
options: Object.values(_.Tag.SIZES)
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
args: {
|
|
24
|
+
children: 'tag'
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
exports["default"] = _default;
|
|
28
|
+
|
|
29
|
+
var Default = _.Tag.bind();
|
|
30
|
+
|
|
31
|
+
exports.Default = Default;
|
|
32
|
+
|
|
33
|
+
var OneLetter = _.Tag.bind();
|
|
34
|
+
|
|
35
|
+
exports.OneLetter = OneLetter;
|
|
36
|
+
OneLetter.args = {
|
|
37
|
+
children: 'd'
|
|
38
|
+
};
|
|
@@ -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-medium);
|
|
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));
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
|
|
20
20
|
.tabsContainer {
|
|
21
21
|
border-bottom: 1px solid var(--color-outline);
|
|
22
|
+
background: var(--color-light);
|
|
22
23
|
}
|
|
23
24
|
|
|
24
25
|
.tabs {
|
|
@@ -54,4 +55,10 @@
|
|
|
54
55
|
background-color: var(--color-background);
|
|
55
56
|
border-bottom: 1px solid var(--color-outline);
|
|
56
57
|
}
|
|
58
|
+
|
|
59
|
+
.tabsContainer {
|
|
60
|
+
position: sticky;
|
|
61
|
+
top: var(--header-height);
|
|
62
|
+
z-index: 100;
|
|
63
|
+
}
|
|
57
64
|
}
|
|
@@ -14,6 +14,7 @@ import { Icon } from '../../ui/icon';
|
|
|
14
14
|
import { FileName } from '../../ui/file-name';
|
|
15
15
|
import { Popover } from '../../ui/popover';
|
|
16
16
|
import { Tooltip } from '../../ui/tooltip';
|
|
17
|
+
import { Tag } from '../../ui/tag';
|
|
17
18
|
import { Filters } from '../../ui/filters';
|
|
18
19
|
import { SortDropdown } from '../../ui/sort-dropdown';
|
|
19
20
|
import { EmptySet } from '../../ui/empty-set';
|
|
@@ -100,16 +101,22 @@ const getRenderRowHeader = _ref4 => {
|
|
|
100
101
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
101
102
|
className: css.notPredictiveIcon,
|
|
102
103
|
glyph: "warning"
|
|
103
|
-
})), isChunk && /*#__PURE__*/React.createElement(
|
|
104
|
+
})), isChunk && /*#__PURE__*/React.createElement(Tag, {
|
|
104
105
|
title: "Chunk",
|
|
105
|
-
|
|
106
|
-
|
|
106
|
+
size: Tag.SIZES.SMALL,
|
|
107
|
+
kind: Tag.KINDS.INFO,
|
|
108
|
+
className: cx(css.tag, css.tagChunk)
|
|
109
|
+
}), isEntry && /*#__PURE__*/React.createElement(Tag, {
|
|
107
110
|
title: "Entrypoint",
|
|
108
|
-
|
|
109
|
-
|
|
111
|
+
size: Tag.SIZES.SMALL,
|
|
112
|
+
kind: Tag.KINDS.INFO,
|
|
113
|
+
className: cx(css.tag, css.tagEntry)
|
|
114
|
+
}), isInitial && /*#__PURE__*/React.createElement(Tag, {
|
|
110
115
|
title: "Initial",
|
|
111
|
-
|
|
112
|
-
|
|
116
|
+
size: Tag.SIZES.SMALL,
|
|
117
|
+
kind: Tag.KINDS.INFO,
|
|
118
|
+
className: cx(css.tag, css.tagInitial)
|
|
119
|
+
}))
|
|
113
120
|
}, /*#__PURE__*/React.createElement(AssetInfo, {
|
|
114
121
|
className: css.assetInfo,
|
|
115
122
|
item: item,
|
|
@@ -30,41 +30,28 @@
|
|
|
30
30
|
display: none;
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
.
|
|
34
|
-
display: inline-block;
|
|
35
|
-
width: var(--space-xsmall);
|
|
36
|
-
height: var(--space-xsmall);
|
|
37
|
-
font-family: var(--font-family);
|
|
38
|
-
font-size: 8px;
|
|
39
|
-
font-weight: bold;
|
|
40
|
-
background: var(--color-highlight);
|
|
41
|
-
color: var(--color-text-light);
|
|
42
|
-
line-height: var(--space-xsmall);
|
|
43
|
-
text-align: center;
|
|
44
|
-
text-transform: uppercase;
|
|
45
|
-
vertical-align: middle;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
.flag + .flag {
|
|
33
|
+
.tag + .tag {
|
|
49
34
|
margin-left: 2px;
|
|
50
35
|
}
|
|
51
36
|
|
|
52
|
-
.
|
|
53
|
-
composes: flag;
|
|
37
|
+
.tagEntry {
|
|
54
38
|
background: var(--color-info-light);
|
|
55
|
-
color: var(--color-background);
|
|
56
39
|
}
|
|
57
40
|
|
|
58
|
-
.
|
|
59
|
-
|
|
41
|
+
.tagEntry::before {
|
|
42
|
+
content: 'e';
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.tagInitial {
|
|
60
46
|
background: var(--color-info-light);
|
|
61
|
-
color: var(--color-background);
|
|
62
47
|
}
|
|
63
48
|
|
|
64
|
-
.
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
49
|
+
.tagInitial::before {
|
|
50
|
+
content: 'i';
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.tagChunk::before {
|
|
54
|
+
content: 'c';
|
|
68
55
|
}
|
|
69
56
|
|
|
70
57
|
/* Tooltip not predictive */
|
|
@@ -12,6 +12,7 @@ import { EmptySet } from '../../ui/empty-set';
|
|
|
12
12
|
import { Filters } from '../../ui/filters';
|
|
13
13
|
import { Popover } from '../../ui/popover';
|
|
14
14
|
import { SortDropdown } from '../../ui/sort-dropdown';
|
|
15
|
+
import { Tag } from '../../ui/tag';
|
|
15
16
|
import { Toolbar } from '../../ui/toolbar';
|
|
16
17
|
import { FileName } from '../../ui/file-name';
|
|
17
18
|
import { ComponentLink } from '../component-link';
|
|
@@ -89,10 +90,12 @@ const PackageRowHeader = _ref2 => {
|
|
|
89
90
|
className: css.packageNames
|
|
90
91
|
}, packageNames.map((packageName, index) => {
|
|
91
92
|
// Render duplicate flag only for the last entry
|
|
92
|
-
const duplicateFlag = index === packageNames.length - 1 && item.duplicate && /*#__PURE__*/React.createElement(
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
93
|
+
const duplicateFlag = index === packageNames.length - 1 && item.duplicate && /*#__PURE__*/React.createElement(Tag, {
|
|
94
|
+
title: "Duplicate package",
|
|
95
|
+
kind: Tag.KINDS.DANGER,
|
|
96
|
+
size: Tag.SIZES.SMALL,
|
|
97
|
+
className: css.tagDuplicate
|
|
98
|
+
});
|
|
96
99
|
return /*#__PURE__*/React.createElement(Popover, {
|
|
97
100
|
className: css.packageName,
|
|
98
101
|
icon: duplicateFlag,
|
|
@@ -12,20 +12,12 @@
|
|
|
12
12
|
margin-right: -1px; /** collapse border */
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
.
|
|
15
|
+
.tagDuplicate {
|
|
16
16
|
margin-right: var(--space-xxxsmall);
|
|
17
|
-
|
|
18
|
-
width: var(--space-small);
|
|
19
|
-
height: var(--space-small);
|
|
20
|
-
font-size: 10px;
|
|
21
|
-
font-weight: bold;
|
|
22
|
-
line-height: var(--space-small);
|
|
23
|
-
text-align: center;
|
|
24
|
-
text-transform: uppercase;
|
|
25
|
-
vertical-align: middle;
|
|
17
|
+
}
|
|
26
18
|
|
|
27
|
-
|
|
28
|
-
|
|
19
|
+
.tagDuplicate::before {
|
|
20
|
+
content: 'd';
|
|
29
21
|
}
|
|
30
22
|
|
|
31
23
|
.packageName {
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
}
|
|
6
6
|
|
|
7
7
|
.input {
|
|
8
|
+
border-radius: var(--radius-small) 0 0 var(--radius-small);
|
|
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);
|
package/lib-esm/css/default.css
CHANGED
|
@@ -1,18 +1,29 @@
|
|
|
1
|
+
@import url("~modern-css-reset/dist/reset.css");
|
|
2
|
+
|
|
1
3
|
:root {
|
|
2
4
|
--chart-height: 180px;
|
|
3
5
|
}
|
|
4
6
|
|
|
7
|
+
/** modern-css-reset updates */
|
|
8
|
+
pre,
|
|
9
|
+
ul,
|
|
10
|
+
ol,
|
|
11
|
+
button {
|
|
12
|
+
margin: 0;
|
|
13
|
+
}
|
|
14
|
+
|
|
5
15
|
html {
|
|
16
|
+
font-family: var(--font-family);
|
|
6
17
|
font-size: 81.25%;
|
|
7
|
-
line-height: 1.
|
|
18
|
+
line-height: 1.6;
|
|
8
19
|
}
|
|
9
20
|
|
|
10
21
|
body {
|
|
22
|
+
background: var(--color-background);
|
|
11
23
|
color: var(--color-text);
|
|
12
24
|
}
|
|
13
25
|
|
|
14
|
-
h1, h2, h3, h4, h5 {
|
|
15
|
-
margin-bottom: var(--space-small);
|
|
26
|
+
h1, h2, h3, h4, h5, h6 {
|
|
16
27
|
color: var(--color-heading);
|
|
17
28
|
font-weight: 500;
|
|
18
29
|
}
|
|
@@ -23,30 +23,30 @@
|
|
|
23
23
|
--size-xxlarge: 1.424rem;
|
|
24
24
|
--size-xxxlarge: 1.602rem;
|
|
25
25
|
|
|
26
|
-
--line-height:
|
|
26
|
+
--line-height: 1.6em;
|
|
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:
|
|
185
|
-
--radius-medium: var(--space-
|
|
186
|
-
--radius-large: var(--space-
|
|
184
|
+
--radius-small: 2px;
|
|
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-medium) var(--radius-medium) 0 0;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.outline > :last-child {
|
|
15
|
+
border-radius: 0 0 var(--radius-medium) 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-small);
|
|
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 = {
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
.filterInput {
|
|
14
|
+
border-radius: var(--radius-small) 0 0 var(--radius-small);
|
|
14
15
|
flex: 0 0 auto;
|
|
15
16
|
height: 1em;
|
|
16
17
|
cursor: pointer;
|
|
@@ -129,11 +130,20 @@
|
|
|
129
130
|
}
|
|
130
131
|
|
|
131
132
|
.item {
|
|
133
|
+
border-radius: 0;
|
|
132
134
|
position: relative;
|
|
133
135
|
flex: 0 0 auto;
|
|
134
136
|
margin-right: -1px;
|
|
135
137
|
}
|
|
136
138
|
|
|
139
|
+
.item:first-child {
|
|
140
|
+
border-radius: var(--radius-small) 0 0 var(--radius-small);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.item:last-child {
|
|
144
|
+
border-radius: 0 var(--radius-small) var(--radius-small) 0;
|
|
145
|
+
}
|
|
146
|
+
|
|
137
147
|
.item:hover {
|
|
138
148
|
z-index: var(--layer-low); /* show collapsed border */
|
|
139
149
|
}
|