@codacy/ui-components 0.67.58 → 0.67.65
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/DiffCaption/DiffCaption.d.ts +7 -0
- package/lib/DiffCaption/DiffCaption.js +128 -0
- package/lib/DiffCaption/DiffCaption.types.d.ts +22 -0
- package/lib/DiffCaption/DiffCaption.types.js +1 -0
- package/lib/DiffCaption/index.d.ts +2 -0
- package/lib/DiffCaption/index.js +2 -0
- package/lib/Icons/Arrows.d.ts +3 -0
- package/lib/Icons/Arrows.js +23 -0
- package/lib/Icons/Grades/GradeA.d.ts +2 -0
- package/lib/Icons/Grades/GradeA.js +18 -0
- package/lib/Icons/Grades/GradeB.d.ts +2 -0
- package/lib/Icons/Grades/GradeB.js +18 -0
- package/lib/Icons/Grades/GradeC.d.ts +2 -0
- package/lib/Icons/Grades/GradeC.js +18 -0
- package/lib/Icons/Grades/GradeD.d.ts +2 -0
- package/lib/Icons/Grades/GradeD.js +18 -0
- package/lib/Icons/Grades/GradeE.d.ts +2 -0
- package/lib/Icons/Grades/GradeE.js +18 -0
- package/lib/Icons/Grades/GradeError.d.ts +2 -0
- package/lib/Icons/Grades/GradeError.js +18 -0
- package/lib/Icons/Grades/GradeF.d.ts +2 -0
- package/lib/Icons/Grades/GradeF.js +18 -0
- package/lib/Icons/Grades/index.d.ts +7 -0
- package/lib/Icons/Grades/index.js +7 -0
- package/lib/Icons/Symbols.d.ts +1 -0
- package/lib/Icons/Symbols.js +10 -0
- package/lib/Icons/index.d.ts +2 -0
- package/lib/Icons/index.js +2 -0
- package/lib/QuickFilter/QuickFilter.d.ts +26 -0
- package/lib/QuickFilter/QuickFilter.js +62 -0
- package/lib/QuickFilter/QuickFilter.styles.d.ts +29 -0
- package/lib/QuickFilter/QuickFilter.styles.js +57 -0
- package/lib/QuickFilter/QuickFilter.types.d.ts +21 -0
- package/lib/QuickFilter/QuickFilter.types.js +1 -0
- package/lib/QuickFilter/index.d.ts +2 -0
- package/lib/QuickFilter/index.js +2 -0
- package/lib/SeverityLabel/SeverityLabel.d.ts +11 -0
- package/lib/SeverityLabel/SeverityLabel.js +80 -0
- package/lib/SeverityLabel/SeverityLabel.styles.d.ts +4 -0
- package/lib/SeverityLabel/SeverityLabel.styles.js +16 -0
- package/lib/SeverityLabel/SeverityLabel.types.d.ts +29 -0
- package/lib/SeverityLabel/SeverityLabel.types.js +1 -0
- package/lib/SeverityLabel/index.d.ts +2 -0
- package/lib/SeverityLabel/index.js +2 -0
- package/lib/Skeleton/Skeleton.js +1 -1
- package/lib/index.d.ts +3 -0
- package/lib/index.js +4 -1
- package/package.json +1 -1
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { DiffCaptionProps } from './DiffCaption.types';
|
|
3
|
+
/**
|
|
4
|
+
* Displays the variation between a value and a previous value, color coded by
|
|
5
|
+
* whether that variation is an improvement or a regression.
|
|
6
|
+
*/
|
|
7
|
+
export declare const DiffCaption: React.FC<DiffCaptionProps>;
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import numeral from 'numeral';
|
|
4
|
+
import { lowerCase } from 'lodash';
|
|
5
|
+
import { ArrowDownIcon, ArrowUpIcon, EqualsIcon } from '../Icons';
|
|
6
|
+
import { Caption, DataPoint, Paragraph } from '../Typography';
|
|
7
|
+
import { IconAndText } from '../IconAndText';
|
|
8
|
+
import { Icon } from '../Icon';
|
|
9
|
+
import { Flex } from '../Flexbox';
|
|
10
|
+
import { Tooltip } from '../Tooltip';
|
|
11
|
+
const diffColors = {
|
|
12
|
+
good: {
|
|
13
|
+
text: 'text-success',
|
|
14
|
+
background: 'background-success',
|
|
15
|
+
icon: 'icon-success'
|
|
16
|
+
},
|
|
17
|
+
bad: {
|
|
18
|
+
text: 'text-danger',
|
|
19
|
+
background: 'background-danger',
|
|
20
|
+
icon: 'icon-danger'
|
|
21
|
+
},
|
|
22
|
+
neutral: {
|
|
23
|
+
text: 'text-tertiary',
|
|
24
|
+
background: 'background-primary',
|
|
25
|
+
icon: 'icon-disabled'
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
const iconDetails = {
|
|
29
|
+
increase: {
|
|
30
|
+
icon: ArrowUpIcon,
|
|
31
|
+
title: 'Increase'
|
|
32
|
+
},
|
|
33
|
+
decrease: {
|
|
34
|
+
icon: ArrowDownIcon,
|
|
35
|
+
title: 'Decrease'
|
|
36
|
+
},
|
|
37
|
+
'no-diff': {
|
|
38
|
+
icon: EqualsIcon,
|
|
39
|
+
title: 'No change'
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Displays the variation between a value and a previous value, color coded by
|
|
45
|
+
* whether that variation is an improvement or a regression.
|
|
46
|
+
*/
|
|
47
|
+
export const DiffCaption = ({
|
|
48
|
+
value,
|
|
49
|
+
previousValue,
|
|
50
|
+
isPercentage = false,
|
|
51
|
+
greaterIsBetter = false,
|
|
52
|
+
noSeverity = false,
|
|
53
|
+
onlyIcon = false,
|
|
54
|
+
format = '+0[.]00a',
|
|
55
|
+
periodComparison,
|
|
56
|
+
size = 'md',
|
|
57
|
+
...other
|
|
58
|
+
}) => {
|
|
59
|
+
if (value === undefined || previousValue === undefined) return null;
|
|
60
|
+
const {
|
|
61
|
+
m,
|
|
62
|
+
mt,
|
|
63
|
+
mb,
|
|
64
|
+
ml,
|
|
65
|
+
mr
|
|
66
|
+
} = other;
|
|
67
|
+
const marginProps = {
|
|
68
|
+
m,
|
|
69
|
+
mt,
|
|
70
|
+
mb,
|
|
71
|
+
ml,
|
|
72
|
+
mr
|
|
73
|
+
};
|
|
74
|
+
const variation = Math.abs(value - previousValue) < (isPercentage ? 0.0001 : 0.01) ? 'no-diff' : value > previousValue ? 'increase' : 'decrease';
|
|
75
|
+
const diff = variation === 'no-diff' ? 'neutral' : greaterIsBetter ? variation === 'increase' ? 'good' : 'bad' : variation === 'increase' ? 'bad' : 'good';
|
|
76
|
+
const diffIcon = iconDetails[variation];
|
|
77
|
+
const diffValue = variation === 'no-diff' ? '0' : numeral(value - previousValue).format(format);
|
|
78
|
+
const diffElement = isPercentage ? /*#__PURE__*/React.createElement(React.Fragment, null, diffValue, " ", isPercentage && /*#__PURE__*/React.createElement("small", null, " %")) : /*#__PURE__*/React.createElement(React.Fragment, null, diffValue);
|
|
79
|
+
if (diff === 'neutral' && onlyIcon) {
|
|
80
|
+
return /*#__PURE__*/React.createElement(Icon, _extends({}, marginProps, {
|
|
81
|
+
icon: EqualsIcon,
|
|
82
|
+
title: "No change",
|
|
83
|
+
color: diffColors[diff].icon,
|
|
84
|
+
size: size,
|
|
85
|
+
mr: 2
|
|
86
|
+
}));
|
|
87
|
+
}
|
|
88
|
+
return onlyIcon ? /*#__PURE__*/React.createElement(Tooltip, {
|
|
89
|
+
content: /*#__PURE__*/React.createElement(Flex, {
|
|
90
|
+
alignItems: "center",
|
|
91
|
+
my: -2,
|
|
92
|
+
flexWrap: "wrap"
|
|
93
|
+
}, /*#__PURE__*/React.createElement(Icon, _extends({}, diffIcon, {
|
|
94
|
+
color: diffColors[diff].icon,
|
|
95
|
+
size: "md",
|
|
96
|
+
mr: 1
|
|
97
|
+
})), /*#__PURE__*/React.createElement(DataPoint, {
|
|
98
|
+
value: value - previousValue,
|
|
99
|
+
format: format,
|
|
100
|
+
color: diffColors[diff].text,
|
|
101
|
+
showPercentage: isPercentage
|
|
102
|
+
}), ' ', periodComparison && /*#__PURE__*/React.createElement(Paragraph, {
|
|
103
|
+
size: "sm",
|
|
104
|
+
color: diffColors[diff].text,
|
|
105
|
+
ml: 1
|
|
106
|
+
}, "vs ", lowerCase(periodComparison))),
|
|
107
|
+
maxWidth: "fit-content",
|
|
108
|
+
backgroundColor: diffColors[diff].background
|
|
109
|
+
}, /*#__PURE__*/React.createElement(Icon, _extends({}, diffIcon, marginProps, {
|
|
110
|
+
style: {
|
|
111
|
+
pointerEvents: 'none'
|
|
112
|
+
},
|
|
113
|
+
color: noSeverity ? 'icon-enabled' : diffColors[diff].icon,
|
|
114
|
+
size: size,
|
|
115
|
+
mr: 2
|
|
116
|
+
}))) : /*#__PURE__*/React.createElement(Caption, _extends({
|
|
117
|
+
color: diffColors[noSeverity ? 'neutral' : diff].text,
|
|
118
|
+
as: "div"
|
|
119
|
+
}, other), /*#__PURE__*/React.createElement(IconAndText, {
|
|
120
|
+
icon: diffIcon.icon,
|
|
121
|
+
iconProps: {
|
|
122
|
+
scale: 0.9,
|
|
123
|
+
title: diffIcon.title,
|
|
124
|
+
size
|
|
125
|
+
},
|
|
126
|
+
toRight: true
|
|
127
|
+
}, diffElement));
|
|
128
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { CaptionProps } from '../Typography';
|
|
2
|
+
type CompareAgainstValueType = 'previous-day' | 'previous-week' | 'previous-month';
|
|
3
|
+
export interface DiffCaptionProps extends CaptionProps {
|
|
4
|
+
/** The current value to compare */
|
|
5
|
+
value?: number;
|
|
6
|
+
/** The value to compare against */
|
|
7
|
+
previousValue?: number;
|
|
8
|
+
/** Renders the values as percentages */
|
|
9
|
+
isPercentage?: boolean;
|
|
10
|
+
/** Determines whether an increase is a positive or a negative variation */
|
|
11
|
+
greaterIsBetter?: boolean;
|
|
12
|
+
/** Renders the variation without the good/bad color coding */
|
|
13
|
+
noSeverity?: boolean;
|
|
14
|
+
/** Renders only the variation icon, with the values in a tooltip */
|
|
15
|
+
onlyIcon?: boolean;
|
|
16
|
+
/** Numeral format for the variation value */
|
|
17
|
+
format?: string;
|
|
18
|
+
/** The period the current value is being compared against */
|
|
19
|
+
periodComparison?: CompareAgainstValueType;
|
|
20
|
+
}
|
|
21
|
+
export type DiffTypes = 'good' | 'bad' | 'neutral';
|
|
22
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export const ArrowUpIcon = () => /*#__PURE__*/React.createElement("svg", {
|
|
3
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
4
|
+
className: "ionicon",
|
|
5
|
+
viewBox: "0 0 512 512"
|
|
6
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
7
|
+
strokeLinecap: "round",
|
|
8
|
+
strokeLinejoin: "round",
|
|
9
|
+
strokeWidth: "48",
|
|
10
|
+
d: "M112 244l144-144 144 144M256 120v292",
|
|
11
|
+
className: "ionicon-fill-none"
|
|
12
|
+
}));
|
|
13
|
+
export const ArrowDownIcon = () => /*#__PURE__*/React.createElement("svg", {
|
|
14
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
15
|
+
className: "ionicon",
|
|
16
|
+
viewBox: "0 0 512 512"
|
|
17
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
18
|
+
strokeLinecap: "round",
|
|
19
|
+
strokeLinejoin: "round",
|
|
20
|
+
strokeWidth: "48",
|
|
21
|
+
d: "M112 268l144 144 144-144M256 392V100",
|
|
22
|
+
className: "ionicon-fill-none"
|
|
23
|
+
}));
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { useTheme } from '@emotion/react';
|
|
3
|
+
export const GradeA = () => {
|
|
4
|
+
const theme = useTheme();
|
|
5
|
+
return /*#__PURE__*/React.createElement("svg", {
|
|
6
|
+
viewBox: "0 0 51 51",
|
|
7
|
+
fill: "none",
|
|
8
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
9
|
+
}, /*#__PURE__*/React.createElement("circle", {
|
|
10
|
+
cx: "25.1255",
|
|
11
|
+
cy: "25.1255",
|
|
12
|
+
r: "25.1255",
|
|
13
|
+
fill: theme.colors['grades-background-elite']
|
|
14
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
15
|
+
d: "M29.7479 30.6688H20.188L17.7004 36.1808H14.0703L25.1198 12.0603L35.7788 36.1808H32.0908L29.7479 30.6688ZM28.3739 27.4498L25.0619 19.733L21.5909 27.4498H28.3739Z",
|
|
16
|
+
fill: theme.colors['grades-text']
|
|
17
|
+
}));
|
|
18
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { useTheme } from '@emotion/react';
|
|
3
|
+
export const GradeB = () => {
|
|
4
|
+
const theme = useTheme();
|
|
5
|
+
return /*#__PURE__*/React.createElement("svg", {
|
|
6
|
+
viewBox: "0 0 51 51",
|
|
7
|
+
fill: "none",
|
|
8
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
9
|
+
}, /*#__PURE__*/React.createElement("circle", {
|
|
10
|
+
cx: "25.9693",
|
|
11
|
+
cy: "25.1255",
|
|
12
|
+
r: "25.1255",
|
|
13
|
+
fill: theme.colors['grades-background-high']
|
|
14
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
15
|
+
d: "M20.4453 37.1858V13.0653H24.0696C25.6839 13.0653 26.9701 13.1903 27.9283 13.4402C28.8969 13.6902 29.7144 14.112 30.381 14.7056C31.0579 15.3201 31.5943 16.0856 31.99 17.0021C32.3962 17.929 32.5993 18.8663 32.5993 19.8141C32.5993 21.5429 31.938 23.0062 30.6153 24.2039C31.8963 24.6413 32.9065 25.4068 33.646 26.5003C34.3959 27.5834 34.7708 28.8436 34.7708 30.2809C34.7708 32.1659 34.1042 33.7594 32.7712 35.0612C31.9692 35.8632 31.0683 36.4204 30.0685 36.7328C28.975 37.0348 27.6054 37.1858 25.9599 37.1858H20.4453ZM24.0853 23.4228H25.2257C26.5796 23.4228 27.569 23.1259 28.1939 22.5323C28.8292 21.9282 29.1468 21.043 29.1468 19.8765C29.1468 18.7413 28.824 17.8821 28.1783 17.2989C27.5325 16.7053 26.5952 16.4084 25.3663 16.4084H24.0853V23.4228ZM24.0853 33.7646H26.3348C27.9804 33.7646 29.1885 33.4417 29.9592 32.796C30.7715 32.0982 31.1777 31.213 31.1777 30.1403C31.1777 29.0988 30.7871 28.224 30.006 27.5158C29.2458 26.818 27.8866 26.4691 25.9287 26.4691H24.0853V33.7646Z",
|
|
16
|
+
fill: theme.colors['grades-text']
|
|
17
|
+
}));
|
|
18
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { useTheme } from '@emotion/react';
|
|
3
|
+
export const GradeC = () => {
|
|
4
|
+
const theme = useTheme();
|
|
5
|
+
return /*#__PURE__*/React.createElement("svg", {
|
|
6
|
+
viewBox: "0 0 51 51",
|
|
7
|
+
fill: "none",
|
|
8
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
9
|
+
}, /*#__PURE__*/React.createElement("circle", {
|
|
10
|
+
cx: "25.813",
|
|
11
|
+
cy: "25.1255",
|
|
12
|
+
r: "25.1255",
|
|
13
|
+
fill: theme.colors['grades-background-medium']
|
|
14
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
15
|
+
d: "M33.5966 14.7667V18.9223C31.569 17.2259 29.4712 16.3777 27.303 16.3777C24.9141 16.3777 22.9015 17.236 21.2654 18.9524C19.6192 20.6588 18.7961 22.7466 18.7961 25.2159C18.7961 27.6551 19.6192 29.7128 21.2654 31.3891C22.9115 33.0654 24.9291 33.9035 27.3181 33.9035C28.5527 33.9035 29.6016 33.7028 30.4649 33.3013C30.9467 33.1005 31.4436 32.8295 31.9555 32.4882C32.4774 32.1469 33.0245 31.7354 33.5966 31.2536V35.4844C31.5891 36.6187 29.4812 37.1858 27.2729 37.1858C23.9504 37.1858 21.1148 36.0265 18.766 33.7078C16.4272 31.369 15.2578 28.5484 15.2578 25.246C15.2578 22.2849 16.2365 19.645 18.1938 17.3263C20.6029 14.4856 23.7196 13.0653 27.5439 13.0653C29.6318 13.0653 31.6493 13.6324 33.5966 14.7667Z",
|
|
16
|
+
fill: theme.colors['grades-text']
|
|
17
|
+
}));
|
|
18
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { useTheme } from '@emotion/react';
|
|
3
|
+
export const GradeD = () => {
|
|
4
|
+
const theme = useTheme();
|
|
5
|
+
return /*#__PURE__*/React.createElement("svg", {
|
|
6
|
+
viewBox: "0 0 51 51",
|
|
7
|
+
fill: "none",
|
|
8
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
9
|
+
}, /*#__PURE__*/React.createElement("circle", {
|
|
10
|
+
cx: "25.6636",
|
|
11
|
+
cy: "25.1255",
|
|
12
|
+
r: "25.1255",
|
|
13
|
+
fill: theme.colors['grades-background-low']
|
|
14
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
15
|
+
d: "M18.1318 37.1858V13.0653H23.1934C25.62 13.0653 27.5363 13.3048 28.9423 13.7839C30.4525 14.2526 31.822 15.0493 33.0509 16.1741C35.5401 18.4445 36.7846 21.4283 36.7846 25.1256C36.7846 28.8332 35.488 31.8327 32.8947 34.1239C31.5929 35.2695 30.2285 36.0663 28.8017 36.5141C27.4686 36.9619 25.5784 37.1858 23.1309 37.1858H18.1318ZM21.7718 33.7646H23.4121C25.0472 33.7646 26.4063 33.5928 27.4895 33.2491C28.5726 32.8846 29.5516 32.3065 30.4264 31.515C32.2178 29.8799 33.1134 27.7501 33.1134 25.1256C33.1134 22.4802 32.2282 20.3348 30.4577 18.6893C28.8642 17.2208 26.5157 16.4865 23.4121 16.4865H21.7718V33.7646Z",
|
|
16
|
+
fill: theme.colors['grades-text']
|
|
17
|
+
}));
|
|
18
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { useTheme } from '@emotion/react';
|
|
3
|
+
export const GradeE = () => {
|
|
4
|
+
const theme = useTheme();
|
|
5
|
+
return /*#__PURE__*/React.createElement("svg", {
|
|
6
|
+
viewBox: "0 0 51 51",
|
|
7
|
+
fill: "none",
|
|
8
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
9
|
+
}, /*#__PURE__*/React.createElement("circle", {
|
|
10
|
+
cx: "26.023",
|
|
11
|
+
cy: "25.1255",
|
|
12
|
+
r: "25.1255",
|
|
13
|
+
fill: theme.colors['grades-background-generic']
|
|
14
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
15
|
+
d: "M32.8012 16.4865H23.1312V22.2823H32.52V25.7036H23.1312V33.7646H32.8012V37.1858H19.4912V13.0653H32.8012V16.4865Z",
|
|
16
|
+
fill: theme.colors['grades-text']
|
|
17
|
+
}));
|
|
18
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { useTheme } from '@emotion/react';
|
|
3
|
+
export const GradeError = () => {
|
|
4
|
+
const theme = useTheme();
|
|
5
|
+
return /*#__PURE__*/React.createElement("svg", {
|
|
6
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
7
|
+
"data-name": "Layer 1",
|
|
8
|
+
viewBox: "0 0 40 40"
|
|
9
|
+
}, /*#__PURE__*/React.createElement("circle", {
|
|
10
|
+
cx: "20",
|
|
11
|
+
cy: "20",
|
|
12
|
+
r: "20",
|
|
13
|
+
fill: theme.colors['grades-background-icon']
|
|
14
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
15
|
+
fill: theme.colors['grades-text'],
|
|
16
|
+
d: "M21.71 22.12h-3.42V10.94h3.42v11.18zm0 5.88h-3.42v-3h3.42v3z"
|
|
17
|
+
}));
|
|
18
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { useTheme } from '@emotion/react';
|
|
3
|
+
export const GradeF = () => {
|
|
4
|
+
const theme = useTheme();
|
|
5
|
+
return /*#__PURE__*/React.createElement("svg", {
|
|
6
|
+
viewBox: "0 0 51 51",
|
|
7
|
+
fill: "none",
|
|
8
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
9
|
+
}, /*#__PURE__*/React.createElement("circle", {
|
|
10
|
+
cx: "25.8746",
|
|
11
|
+
cy: "25.1255",
|
|
12
|
+
r: "25.1255",
|
|
13
|
+
fill: theme.colors['grades-background-other']
|
|
14
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
15
|
+
d: "M32.8952 16.4865H24.4905V22.2823H32.5984V25.7036H24.4905V37.1858H20.8506V13.0653H32.8952V16.4865Z",
|
|
16
|
+
fill: theme.colors['grades-text']
|
|
17
|
+
}));
|
|
18
|
+
};
|
package/lib/Icons/Symbols.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { AllColorsKeys } from '../theme/ColorSchemes/light';
|
|
3
3
|
export declare const CheckIcon: () => React.JSX.Element;
|
|
4
4
|
export declare const MinusIcon: () => React.JSX.Element;
|
|
5
|
+
export declare const EqualsIcon: () => React.JSX.Element;
|
|
5
6
|
export declare const CloseIcon: () => React.JSX.Element;
|
|
6
7
|
export declare const DangerIcon: () => React.JSX.Element;
|
|
7
8
|
export declare const RocketIcon: React.FC<{
|
package/lib/Icons/Symbols.js
CHANGED
|
@@ -20,6 +20,16 @@ export const MinusIcon = () => /*#__PURE__*/React.createElement("svg", {
|
|
|
20
20
|
d: "M400 256H112",
|
|
21
21
|
className: "ionicon-fill-none ionicon-stroke-width"
|
|
22
22
|
}));
|
|
23
|
+
export const EqualsIcon = () => /*#__PURE__*/React.createElement("svg", {
|
|
24
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
25
|
+
className: "ionicon",
|
|
26
|
+
viewBox: "0 0 512 512"
|
|
27
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
28
|
+
strokeLinecap: "round",
|
|
29
|
+
strokeLinejoin: "round",
|
|
30
|
+
d: "M112 304h288M112 208h288",
|
|
31
|
+
className: "ionicon-fill-none ionicon-stroke-width"
|
|
32
|
+
}));
|
|
23
33
|
export const CloseIcon = () => /*#__PURE__*/React.createElement("svg", {
|
|
24
34
|
className: "ionicon close-icon",
|
|
25
35
|
viewBox: "0 0 512 512"
|
package/lib/Icons/index.d.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
export * from './Search';
|
|
2
2
|
export * from './Spinner';
|
|
3
|
+
export * from './Arrows';
|
|
3
4
|
export * from './Chevrons';
|
|
4
5
|
export * from './Sorting';
|
|
5
6
|
export * from './Symbols';
|
|
6
7
|
export * from './Messages';
|
|
7
8
|
export * from './Severities';
|
|
9
|
+
export * from './Grades';
|
|
8
10
|
export * from './CodacyIcon';
|
package/lib/Icons/index.js
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
export * from './Search';
|
|
2
2
|
export * from './Spinner';
|
|
3
|
+
export * from './Arrows';
|
|
3
4
|
export * from './Chevrons';
|
|
4
5
|
export * from './Sorting';
|
|
5
6
|
export * from './Symbols';
|
|
6
7
|
export * from './Messages';
|
|
7
8
|
export * from './Severities';
|
|
9
|
+
export * from './Grades';
|
|
8
10
|
export * from './CodacyIcon';
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { QuickFilterOptionProps } from './QuickFilter.types';
|
|
3
|
+
import { RectSkeletonProps } from '../Skeleton/Skeleton.types';
|
|
4
|
+
/**
|
|
5
|
+
* A column of filter options, optionally split into groups. Selection state lives with the
|
|
6
|
+
* consumer: pass `selected` and handle `onClick`.
|
|
7
|
+
*/
|
|
8
|
+
export declare const QuickFilter: import("@emotion/styled").StyledComponent<{
|
|
9
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
10
|
+
as?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
|
|
11
|
+
} & import("..").ColorProps & Omit<import("..").LayoutProps, "size"> & import("..").SpaceProps & import("..").BorderProps & import("..").PositionProps & import("..").ShadowProps & import("..").TextAlignProps & Omit<import("..").TypographyProps, "fontWeight"> & import("../Flexbox").As & {
|
|
12
|
+
fontWeight?: import("styled-system").ResponsiveValue<number | import("..").FontWeights, import("..").CodacyTheme> | undefined;
|
|
13
|
+
} & React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & {
|
|
14
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
15
|
+
} & import("..").FlexboxProps, {}, {}> & {
|
|
16
|
+
Option: React.FC<QuickFilterOptionProps>;
|
|
17
|
+
Group: import("@emotion/styled").StyledComponent<{
|
|
18
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
19
|
+
as?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
|
|
20
|
+
} & import("..").ColorProps & Omit<import("..").LayoutProps, "size"> & import("..").SpaceProps & import("..").BorderProps & import("..").PositionProps & import("..").ShadowProps & import("..").TextAlignProps & Omit<import("..").TypographyProps, "fontWeight"> & import("../Flexbox").As & {
|
|
21
|
+
fontWeight?: import("styled-system").ResponsiveValue<number | import("..").FontWeights, import("..").CodacyTheme> | undefined;
|
|
22
|
+
} & React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & {
|
|
23
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
24
|
+
} & import("..").FlexboxProps, {}, {}>;
|
|
25
|
+
OptionSkeleton: React.FC<RectSkeletonProps>;
|
|
26
|
+
};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { QuickFilterBaseElement, QuickFilterGroupElement, QuickFilterOptionElement, QuickFilterOptionLabel } from './QuickFilter.styles';
|
|
4
|
+
import { Box, Flex } from '../Flexbox';
|
|
5
|
+
import { IconAndText } from '../IconAndText';
|
|
6
|
+
import { MoreInfo } from '../MoreInfo';
|
|
7
|
+
import { Skeleton } from '../Skeleton';
|
|
8
|
+
const QuickFilterOption = ({
|
|
9
|
+
selected,
|
|
10
|
+
onClick,
|
|
11
|
+
value,
|
|
12
|
+
helpText,
|
|
13
|
+
size = 'md',
|
|
14
|
+
icon,
|
|
15
|
+
iconProps,
|
|
16
|
+
count,
|
|
17
|
+
label,
|
|
18
|
+
...props
|
|
19
|
+
}) => /*#__PURE__*/React.createElement(QuickFilterOptionElement, _extends({}, props, {
|
|
20
|
+
onClick: () => onClick === null || onClick === void 0 ? void 0 : onClick(value),
|
|
21
|
+
size: size,
|
|
22
|
+
selected: selected,
|
|
23
|
+
"aria-selected": selected
|
|
24
|
+
}), /*#__PURE__*/React.createElement(Flex, {
|
|
25
|
+
alignItems: "center",
|
|
26
|
+
id: `${label === null || label === void 0 ? void 0 : label.toString().replace(/\s+/g, '-').toLowerCase()}-filter`
|
|
27
|
+
}, icon ? /*#__PURE__*/React.createElement(IconAndText, {
|
|
28
|
+
icon: icon,
|
|
29
|
+
iconProps: iconProps
|
|
30
|
+
}, /*#__PURE__*/React.createElement(QuickFilterOptionLabel, null, label)) : /*#__PURE__*/React.createElement(QuickFilterOptionLabel, null, label), helpText && /*#__PURE__*/React.createElement(Box, {
|
|
31
|
+
flexShrink: 0,
|
|
32
|
+
ml: 1
|
|
33
|
+
}, /*#__PURE__*/React.createElement(MoreInfo, {
|
|
34
|
+
helpContent: helpText,
|
|
35
|
+
inline: true,
|
|
36
|
+
style: {
|
|
37
|
+
transform: 'translateY(2px)'
|
|
38
|
+
}
|
|
39
|
+
})), count !== undefined && /*#__PURE__*/React.createElement(Box, {
|
|
40
|
+
flexShrink: 0,
|
|
41
|
+
flexGrow: 1,
|
|
42
|
+
textAlign: "right",
|
|
43
|
+
ml: 1
|
|
44
|
+
}, count)));
|
|
45
|
+
const QuickFilterOptionSkeleton = ({
|
|
46
|
+
height = 24,
|
|
47
|
+
width = 100,
|
|
48
|
+
...props
|
|
49
|
+
}) => /*#__PURE__*/React.createElement(Skeleton.Rect, _extends({
|
|
50
|
+
height: height,
|
|
51
|
+
width: width
|
|
52
|
+
}, props));
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* A column of filter options, optionally split into groups. Selection state lives with the
|
|
56
|
+
* consumer: pass `selected` and handle `onClick`.
|
|
57
|
+
*/
|
|
58
|
+
export const QuickFilter = Object.assign(QuickFilterBaseElement, {
|
|
59
|
+
Option: QuickFilterOption,
|
|
60
|
+
Group: QuickFilterGroupElement,
|
|
61
|
+
OptionSkeleton: QuickFilterOptionSkeleton
|
|
62
|
+
});
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const QuickFilterBaseElement: import("@emotion/styled").StyledComponent<{
|
|
3
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
4
|
+
as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
|
|
5
|
+
} & import("..").ColorProps & Omit<import("..").LayoutProps, "size"> & import("..").SpaceProps & import("..").BorderProps & import("..").PositionProps & import("..").ShadowProps & import("..").TextAlignProps & Omit<import("..").TypographyProps, "fontWeight"> & import("../Flexbox").As & {
|
|
6
|
+
fontWeight?: import("styled-system").ResponsiveValue<number | import("..").FontWeights, import("..").CodacyTheme> | undefined;
|
|
7
|
+
} & import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
|
|
8
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
9
|
+
} & import("..").FlexboxProps, {}, {}>;
|
|
10
|
+
export declare const QuickFilterGroupElement: import("@emotion/styled").StyledComponent<{
|
|
11
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
12
|
+
as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
|
|
13
|
+
} & import("..").ColorProps & Omit<import("..").LayoutProps, "size"> & import("..").SpaceProps & import("..").BorderProps & import("..").PositionProps & import("..").ShadowProps & import("..").TextAlignProps & Omit<import("..").TypographyProps, "fontWeight"> & import("../Flexbox").As & {
|
|
14
|
+
fontWeight?: import("styled-system").ResponsiveValue<number | import("..").FontWeights, import("..").CodacyTheme> | undefined;
|
|
15
|
+
} & import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
|
|
16
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
17
|
+
} & import("..").FlexboxProps, {}, {}>;
|
|
18
|
+
export declare const QuickFilterOptionLabel: import("@emotion/styled").StyledComponent<{
|
|
19
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
20
|
+
as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
|
|
21
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
22
|
+
export declare const QuickFilterOptionElement: import("@emotion/styled").StyledComponent<{
|
|
23
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
24
|
+
as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
|
|
25
|
+
} & Pick<import("..").LinkProps, "size" | "styleType"> & import("react").ClassAttributes<HTMLAnchorElement> & import("react").AnchorHTMLAttributes<HTMLAnchorElement> & {
|
|
26
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
27
|
+
} & {
|
|
28
|
+
selected?: boolean | undefined;
|
|
29
|
+
}, {}, {}>;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import _styled from "@emotion/styled/base";
|
|
2
|
+
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
3
|
+
import { Flex } from '../Flexbox';
|
|
4
|
+
import { StyledLink } from '../Link/Link.styles';
|
|
5
|
+
import { IconAndTextWrapper } from '../IconAndText/IconAndText.styles';
|
|
6
|
+
export const QuickFilterBaseElement = /*#__PURE__*/_styled(Flex, process.env.NODE_ENV === "production" ? {
|
|
7
|
+
target: "ebw50jb3"
|
|
8
|
+
} : {
|
|
9
|
+
target: "ebw50jb3",
|
|
10
|
+
label: "codacy"
|
|
11
|
+
})(process.env.NODE_ENV === "production" ? {
|
|
12
|
+
name: "qdeacm",
|
|
13
|
+
styles: "flex-direction:column"
|
|
14
|
+
} : {
|
|
15
|
+
name: "qdeacm",
|
|
16
|
+
styles: "flex-direction:column/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9RdWlja0ZpbHRlci9RdWlja0ZpbHRlci5zdHlsZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBS2tEIiwiZmlsZSI6Ii4uLy4uL3NyYy9RdWlja0ZpbHRlci9RdWlja0ZpbHRlci5zdHlsZXMudHMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCdcbmltcG9ydCB7IEZsZXggfSBmcm9tICcuLi9GbGV4Ym94J1xuaW1wb3J0IHsgU3R5bGVkTGluayB9IGZyb20gJy4uL0xpbmsvTGluay5zdHlsZXMnXG5pbXBvcnQgeyBJY29uQW5kVGV4dFdyYXBwZXIgfSBmcm9tICcuLi9JY29uQW5kVGV4dC9JY29uQW5kVGV4dC5zdHlsZXMnXG5cbmV4cG9ydCBjb25zdCBRdWlja0ZpbHRlckJhc2VFbGVtZW50ID0gc3R5bGVkKEZsZXgpYFxuICBmbGV4LWRpcmVjdGlvbjogY29sdW1uO1xuYFxuXG5leHBvcnQgY29uc3QgUXVpY2tGaWx0ZXJHcm91cEVsZW1lbnQgPSBzdHlsZWQoRmxleClgXG4gIGZsZXgtZGlyZWN0aW9uOiBjb2x1bW47XG4gIHBhZGRpbmc6ICR7KHsgdGhlbWUgfSkgPT4gdGhlbWUuc3BhY2VbMl19IDA7XG5cbiAgJjpub3QoOmxhc3QtY2hpbGQpIHtcbiAgICBib3JkZXItYm90dG9tOiAkeyh7IHRoZW1lIH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G4gICAgbWluLXdpZHRoOiAwO1xuXG4gICAgPiBzcGFuIHtcbiAgICAgIG1pbi13aWR0aDogMDtcbiAgICAgIG92ZXJmbG93OiBoaWRkZW47XG4gICAgfVxuICB9XG5cbiAgJjpob3ZlciB7XG4gICAgY29sb3I6ICR7KHsgdGhlbWUgfSkgPT4gdGhlbWUuY29sb3JzWyd0ZXh0LWluZm8nXX07XG4gIH1cbmBcbiJdfQ== */",
|
|
17
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
18
|
+
});
|
|
19
|
+
export const QuickFilterGroupElement = /*#__PURE__*/_styled(Flex, process.env.NODE_ENV === "production" ? {
|
|
20
|
+
target: "ebw50jb2"
|
|
21
|
+
} : {
|
|
22
|
+
target: "ebw50jb2",
|
|
23
|
+
label: "codacy"
|
|
24
|
+
})("flex-direction:column;padding:", ({
|
|
25
|
+
theme
|
|
26
|
+
}) => theme.space[2], " 0;&:not(:last-child){border-bottom:", ({
|
|
27
|
+
theme
|
|
28
|
+
}) => theme.borders[0], ";}" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9RdWlja0ZpbHRlci9RdWlja0ZpbHRlci5zdHlsZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBU21EIiwiZmlsZSI6Ii4uLy4uL3NyYy9RdWlja0ZpbHRlci9RdWlja0ZpbHRlci5zdHlsZXMudHMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCdcbmltcG9ydCB7IEZsZXggfSBmcm9tICcuLi9GbGV4Ym94J1xuaW1wb3J0IHsgU3R5bGVkTGluayB9IGZyb20gJy4uL0xpbmsvTGluay5zdHlsZXMnXG5pbXBvcnQgeyBJY29uQW5kVGV4dFdyYXBwZXIgfSBmcm9tICcuLi9JY29uQW5kVG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7IHNlbGVjdGVkLCB0aGVtZSB9KSA9PiB0aGVtZS5mb250V2VpZ2h0c1tzZWxlY3RlZCA/ICdzZW1pLWJvbGQnIDogJ3JlZ3VsYXInXX07XG5cbiAgLyogZmxleCBpdGVtcyBkZWZhdWx0IHRvIG1pbi13aWR0aDogYXV0bywgd2hpY2ggd291bGQgZGVmZWF0IHRoZSBsYWJlbCdzIGVsbGlwc2lzLiBXaXRoIGFuXG4gICAgIGljb24gdGhlIGxhYmVsIHNpdHMgaW5zaWRlIEljb25BbmRUZXh0J3Mgb3duIHNwYW4sIHNvIGJvdGggbGV2ZWxzIGhhdmUgdG8gZ2l2ZSB3YXkuICovXG4gICR7SWNvbkFuZFRleHRXcmFwcGVyfSB7XG4gICAgbWluLXdpZHRoOiAwO1xuXG4gICAgPiBzcGFuIHtcbiAgICAgIG1pbi13aWR0aDogMDtcbiAgICAgIG92ZXJmbG93OiBoaWRkZW47XG4gICAgfVxuICB9XG5cbiAgJjpob3ZlciB7XG4gICAgY29sb3I6ICR7KHsgdGhlbWUgfSkgPT4gdGhlbWUuY29sb3JzWyd0ZXh0LWluZm8nXX07XG4gIH1cbmBcbiJdfQ== */"));
|
|
29
|
+
export const QuickFilterOptionLabel = /*#__PURE__*/_styled("span", process.env.NODE_ENV === "production" ? {
|
|
30
|
+
target: "ebw50jb1"
|
|
31
|
+
} : {
|
|
32
|
+
target: "ebw50jb1",
|
|
33
|
+
label: "codacy"
|
|
34
|
+
})(process.env.NODE_ENV === "production" ? {
|
|
35
|
+
name: "wuzzic",
|
|
36
|
+
styles: "display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0"
|
|
37
|
+
} : {
|
|
38
|
+
name: "wuzzic",
|
|
39
|
+
styles: "display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9RdWlja0ZpbHRlci9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+
});
|
|
42
|
+
export const QuickFilterOptionElement = /*#__PURE__*/_styled(StyledLink, process.env.NODE_ENV === "production" ? {
|
|
43
|
+
target: "ebw50jb0"
|
|
44
|
+
} : {
|
|
45
|
+
target: "ebw50jb0",
|
|
46
|
+
label: "codacy"
|
|
47
|
+
})("flex-grow:1;margin:", ({
|
|
48
|
+
theme
|
|
49
|
+
}) => theme.space[1], " 0;transition:color 0.3s ease-in-out;color:", ({
|
|
50
|
+
theme,
|
|
51
|
+
selected
|
|
52
|
+
}) => theme.colors[selected ? 'text-info' : 'text-secondary'], ";font-weight:", ({
|
|
53
|
+
selected,
|
|
54
|
+
theme
|
|
55
|
+
}) => theme.fontWeights[selected ? 'semi-bold' : 'regular'], ";", IconAndTextWrapper, "{min-width:0;>span{min-width:0;overflow:hidden;}}&:hover{color:", ({
|
|
56
|
+
theme
|
|
57
|
+
}) => theme.colors['text-info'], ";}" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9RdWlja0ZpbHRlci9RdWlja0ZpbHRlci5zdHlsZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBMEJrRiIsImZpbGUiOiIuLi8uLi9zcmMvUXVpY2tGaWx0ZXIvUXVpY2tGaWx0ZXIuc3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnXG5pbXBvcnQgeyBGbGV4IH0gZnJvbSAnLi4vRmxleGJveCdcbmltcG9ydCB7IFN0eWxlZExpbmsgfSBmcm9tICcuLi9MaW5rL0xpbmsuc3R5bGVzJ1xuaW1wb3J0IHsgSWNvbkFuZFRleHRXcmFwcGVyIH0gZnJvbSAnLi4vSWNvbkFuZFRleHQvSWNvbkFuZFRleHQuc3R5bGVzJ1xuXG5leHBvcnQgY29uc3QgUXVpY2tG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N0ZWQgPyAnc2VtaS1ib2xkJyA6ICdyZWd1bGFyJ119O1xuXG4gIC8qIGZsZXggaXRlbXMgZGVmYXVsdCB0byBtaW4td2lkdGg6IGF1dG8sIHdoaWNoIHdvdWxkIGRlZmVhdCB0aGUgbGFiZWwncyBlbGxpcHNpcy4gV2l0aCBhblxuICAgICBpY29uIHRoZSBsYWJlbCBzaXRzIGluc2lkZSBJY29uQW5kVGV4dCdzIG93biBzcGFuLCBzbyBib3RoIGxldmVscyBoYXZlIHRvIGdpdmUgd2F5LiAqL1xuICAke0ljb25BbmRUZXh0V3JhcHBlcn0ge1xuICAgIG1pbi13aWR0aDogMDtcblxuICAgID4gc3BhbiB7XG4gICAgICBtaW4td2lkdGg6IDA7XG4gICAgICBvdmVyZmxvdzogaGlkZGVuO1xuICAgIH1cbiAgfVxuXG4gICY6aG92ZXIge1xuICAgIGNvbG9yOiAkeyh7IHRoZW1lIH0pID0+IHRoZW1lLmNvbG9yc1sndGV4dC1pbmZvJ119O1xuICB9XG5gXG4iXX0= */"));
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { SpaceProps } from '../system-props/types';
|
|
2
|
+
import { IconAndTextProps } from '../IconAndText';
|
|
3
|
+
import { TextSize } from '../Typography';
|
|
4
|
+
export interface QuickFilterOptionProps extends Pick<IconAndTextProps, 'iconProps'>, SpaceProps {
|
|
5
|
+
/** Icon for the option */
|
|
6
|
+
icon?: IconAndTextProps['icon'];
|
|
7
|
+
/** Renders the option as the selected one */
|
|
8
|
+
selected?: boolean;
|
|
9
|
+
/** The value handed back to `onClick` */
|
|
10
|
+
value: string;
|
|
11
|
+
/** The option's visible label */
|
|
12
|
+
label: string;
|
|
13
|
+
/** Renders a `MoreInfo` tooltip next to the label */
|
|
14
|
+
helpText?: string;
|
|
15
|
+
/** Called with the option's `value` when it is clicked */
|
|
16
|
+
onClick?: (value: string) => void;
|
|
17
|
+
/** Shown right-aligned, typically the number of matches */
|
|
18
|
+
count?: number | string;
|
|
19
|
+
/** Text size for the option */
|
|
20
|
+
size?: TextSize;
|
|
21
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Severity, SeverityDetails, SeverityLabelProps } from './SeverityLabel.types';
|
|
3
|
+
/**
|
|
4
|
+
* The icon and colors that belong to each severity. Exported so consumers can compose their
|
|
5
|
+
* own layouts without rebuilding the mapping.
|
|
6
|
+
*/
|
|
7
|
+
export declare const severityDetails: Record<Severity, SeverityDetails>;
|
|
8
|
+
/**
|
|
9
|
+
* A severity, rendered with its icon and colors from the theme.
|
|
10
|
+
*/
|
|
11
|
+
export declare const SeverityLabel: React.FC<SeverityLabelProps>;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { SeverityCaption } from './SeverityLabel.styles';
|
|
4
|
+
import { IconAndText } from '../IconAndText';
|
|
5
|
+
import { PillLabel } from '../PillLabel';
|
|
6
|
+
import { CriticalSeverityIcon, HighSeverityIcon, MediumSeverityIcon, MinorSeverityIcon } from '../Icons';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* The icon and colors that belong to each severity. Exported so consumers can compose their
|
|
10
|
+
* own layouts without rebuilding the mapping.
|
|
11
|
+
*/
|
|
12
|
+
export const severityDetails = {
|
|
13
|
+
minor: {
|
|
14
|
+
icon: MinorSeverityIcon,
|
|
15
|
+
iconColor: 'label-minor-icon',
|
|
16
|
+
textColor: 'label-minor-text',
|
|
17
|
+
label: 'Minor'
|
|
18
|
+
},
|
|
19
|
+
medium: {
|
|
20
|
+
icon: MediumSeverityIcon,
|
|
21
|
+
iconColor: 'label-medium-icon',
|
|
22
|
+
textColor: 'label-medium-text',
|
|
23
|
+
label: 'Medium'
|
|
24
|
+
},
|
|
25
|
+
high: {
|
|
26
|
+
icon: HighSeverityIcon,
|
|
27
|
+
iconColor: 'label-high-icon',
|
|
28
|
+
textColor: 'label-high-text',
|
|
29
|
+
label: 'High'
|
|
30
|
+
},
|
|
31
|
+
critical: {
|
|
32
|
+
icon: CriticalSeverityIcon,
|
|
33
|
+
iconColor: 'label-critical-icon',
|
|
34
|
+
textColor: 'label-critical-text',
|
|
35
|
+
label: 'Critical'
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* A severity, rendered with its icon and colors from the theme.
|
|
41
|
+
*/
|
|
42
|
+
export const SeverityLabel = ({
|
|
43
|
+
severity,
|
|
44
|
+
variant = 'text',
|
|
45
|
+
size,
|
|
46
|
+
children,
|
|
47
|
+
...props
|
|
48
|
+
}) => {
|
|
49
|
+
const {
|
|
50
|
+
icon,
|
|
51
|
+
iconColor,
|
|
52
|
+
textColor,
|
|
53
|
+
label
|
|
54
|
+
} = severityDetails[severity];
|
|
55
|
+
const content = children ?? label;
|
|
56
|
+
if (variant === 'pill') {
|
|
57
|
+
return (
|
|
58
|
+
/*#__PURE__*/
|
|
59
|
+
// `Severity` is a subset of `PillLabelStatus`, so it maps straight onto the status
|
|
60
|
+
React.createElement(PillLabel, _extends({}, props, {
|
|
61
|
+
status: severity,
|
|
62
|
+
size: size === 'xs' || size === 'sm' ? 'sm' : 'md',
|
|
63
|
+
leftIcon: icon
|
|
64
|
+
}), content)
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
return /*#__PURE__*/React.createElement(SeverityCaption, _extends({}, props, {
|
|
68
|
+
size: size || 'xs',
|
|
69
|
+
fontWeight: "semi-bold",
|
|
70
|
+
color: textColor,
|
|
71
|
+
pl: 1,
|
|
72
|
+
as: "div"
|
|
73
|
+
}), /*#__PURE__*/React.createElement(IconAndText, {
|
|
74
|
+
icon: icon,
|
|
75
|
+
iconProps: {
|
|
76
|
+
scale: 1.2,
|
|
77
|
+
color: iconColor
|
|
78
|
+
}
|
|
79
|
+
}, content));
|
|
80
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const SeverityCaption: import("@emotion/styled").StyledComponent<import("../Typography").CaptionProps & import("react").RefAttributes<HTMLParagraphElement> & {
|
|
3
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
4
|
+
}, {}, {}>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import _styled from "@emotion/styled/base";
|
|
2
|
+
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
3
|
+
import { Caption } from '../Typography';
|
|
4
|
+
export const SeverityCaption = /*#__PURE__*/_styled(Caption, process.env.NODE_ENV === "production" ? {
|
|
5
|
+
target: "e1pdfgxc0"
|
|
6
|
+
} : {
|
|
7
|
+
target: "e1pdfgxc0",
|
|
8
|
+
label: "codacy"
|
|
9
|
+
})(process.env.NODE_ENV === "production" ? {
|
|
10
|
+
name: "50zrmy",
|
|
11
|
+
styles: "text-transform:uppercase"
|
|
12
|
+
} : {
|
|
13
|
+
name: "50zrmy",
|
|
14
|
+
styles: "text-transform:uppercase/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9TZXZlcml0eUxhYmVsL1NldmVyaXR5TGFiZWwuc3R5bGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUc4QyIsImZpbGUiOiIuLi8uLi9zcmMvU2V2ZXJpdHlMYWJlbC9TZXZlcml0eUxhYmVsLnN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJ1xuaW1wb3J0IHsgQ2FwdGlvbiB9IGZyb20gJy4uL1R5cG9ncmFwaHknXG5cbmV4cG9ydCBjb25zdCBTZXZlcml0eUNhcHRpb24gPSBzdHlsZWQoQ2FwdGlvbilgXG4gIHRleHQtdHJhbnNmb3JtOiB1cHBlcmNhc2U7XG5gXG4iXX0= */",
|
|
15
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
16
|
+
});
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ContainerComponentProps } from '../types';
|
|
3
|
+
import { SpaceProps, LayoutProps } from '../system-props/types';
|
|
4
|
+
import { AllColorsKeys } from '../theme';
|
|
5
|
+
import { IconFile } from '../Icon/Icon.types';
|
|
6
|
+
import { TextSize } from '../Typography';
|
|
7
|
+
/**
|
|
8
|
+
* The design system's severity vocabulary. Consumers whose API speaks a different one
|
|
9
|
+
* (`Info`/`Warning`/`Error`, numeric levels, …) should map onto this at their boundary
|
|
10
|
+
* rather than this package learning their domain.
|
|
11
|
+
*/
|
|
12
|
+
export type Severity = 'minor' | 'medium' | 'high' | 'critical';
|
|
13
|
+
export type SeverityLabelVariant = 'text' | 'pill';
|
|
14
|
+
export interface SeverityDetails {
|
|
15
|
+
icon: IconFile;
|
|
16
|
+
iconColor: AllColorsKeys;
|
|
17
|
+
textColor: AllColorsKeys;
|
|
18
|
+
label: string;
|
|
19
|
+
}
|
|
20
|
+
export interface SeverityLabelProps extends ContainerComponentProps, SpaceProps, Omit<LayoutProps, 'size'> {
|
|
21
|
+
/** The severity to render */
|
|
22
|
+
severity: Severity;
|
|
23
|
+
/** `text` renders an uppercase caption, `pill` renders a PillLabel */
|
|
24
|
+
variant?: SeverityLabelVariant;
|
|
25
|
+
/** Text size; the `pill` variant maps `xs`/`sm` to its small size and the rest to medium */
|
|
26
|
+
size?: TextSize;
|
|
27
|
+
/** Overrides the built-in label, for consumers with their own glossary */
|
|
28
|
+
children?: React.ReactNode;
|
|
29
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/lib/Skeleton/Skeleton.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { SkeletonPrimitive } from './Skeleton.styles';
|
|
4
|
-
import { Box } from '../';
|
|
4
|
+
import { Box } from '../Flexbox';
|
|
5
5
|
const CircleSkeleton = ({
|
|
6
6
|
size = '2rem',
|
|
7
7
|
...props
|
package/lib/index.d.ts
CHANGED
|
@@ -29,6 +29,8 @@ export * from './Textarea';
|
|
|
29
29
|
export * from './Divider';
|
|
30
30
|
export * from './Message';
|
|
31
31
|
export * from './PillLabel';
|
|
32
|
+
export * from './QuickFilter';
|
|
33
|
+
export * from './SeverityLabel';
|
|
32
34
|
export * from './Tab';
|
|
33
35
|
export * from './IconAndText';
|
|
34
36
|
export * from './Table';
|
|
@@ -51,3 +53,4 @@ export * from './Bannerol';
|
|
|
51
53
|
export * from './Orb';
|
|
52
54
|
export * from './IconButton';
|
|
53
55
|
export * from './Card';
|
|
56
|
+
export * from './DiffCaption';
|
package/lib/index.js
CHANGED
|
@@ -29,6 +29,8 @@ export * from './Textarea';
|
|
|
29
29
|
export * from './Divider';
|
|
30
30
|
export * from './Message';
|
|
31
31
|
export * from './PillLabel';
|
|
32
|
+
export * from './QuickFilter';
|
|
33
|
+
export * from './SeverityLabel';
|
|
32
34
|
export * from './Tab';
|
|
33
35
|
export * from './IconAndText';
|
|
34
36
|
export * from './Table';
|
|
@@ -50,4 +52,5 @@ export * from './ExpandableBox';
|
|
|
50
52
|
export * from './Bannerol';
|
|
51
53
|
export * from './Orb';
|
|
52
54
|
export * from './IconButton';
|
|
53
|
-
export * from './Card';
|
|
55
|
+
export * from './Card';
|
|
56
|
+
export * from './DiffCaption';
|