@redis-ui/styles 21.5.0 → 21.6.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/dist/index.js +291 -15
- package/dist/index.umd.cjs +2 -2
- package/dist/themes/themeDark/theme/components/charts.js +48 -0
- package/dist/themes/themeDarkNext/theme/components/charts.js +57 -6
- package/dist/themes/themeLight/theme/components/charts.js +48 -0
- package/dist/themes/themeLightNext/theme/components/charts.js +60 -9
- package/dist/themes/types/theme/components/charts.types.d.ts +55 -0
- package/package.json +1 -1
|
@@ -11,10 +11,58 @@ const theme = {
|
|
|
11
11
|
tokens.semantic.color.icon.discovery700
|
|
12
12
|
],
|
|
13
13
|
grid: tokens.semantic.color.border.secondary700,
|
|
14
|
+
gridDashArray: '3',
|
|
14
15
|
axisLabel: tokens.semantic.color.text.secondary400,
|
|
15
16
|
threshold: {
|
|
16
17
|
warning: tokens.semantic.color.icon.attention400,
|
|
17
18
|
critical: tokens.semantic.color.icon.danger500
|
|
19
|
+
},
|
|
20
|
+
axis: {
|
|
21
|
+
fontFamily: tokens.core.font.fontFamily.regular,
|
|
22
|
+
fontSize: { S: tokens.core.font.fontSize.s10, M: tokens.core.font.fontSize.s12 }
|
|
23
|
+
},
|
|
24
|
+
series: {
|
|
25
|
+
strokeWidth: { S: 2, M: 2 },
|
|
26
|
+
areaOpacity: { from: 0.3, to: 0 }
|
|
27
|
+
},
|
|
28
|
+
cursor: {
|
|
29
|
+
color: tokens.semantic.color.border.secondary500,
|
|
30
|
+
width: 1
|
|
31
|
+
},
|
|
32
|
+
activeDot: {
|
|
33
|
+
size: 8,
|
|
34
|
+
ringColor: tokens.semantic.color.background.secondary900,
|
|
35
|
+
ringWidth: 2
|
|
36
|
+
},
|
|
37
|
+
referenceLine: {
|
|
38
|
+
color: tokens.semantic.color.border.secondary400,
|
|
39
|
+
dashArray: '4 4'
|
|
40
|
+
},
|
|
41
|
+
tooltip: {
|
|
42
|
+
bgColor: tokens.semantic.color.background.secondary900,
|
|
43
|
+
textColor: tokens.semantic.color.text.secondary200,
|
|
44
|
+
labelColor: tokens.semantic.color.text.secondary400,
|
|
45
|
+
borderColor: tokens.semantic.color.border.secondary700,
|
|
46
|
+
borderRadius: '0.4rem',
|
|
47
|
+
shadow: tokens.core.shadow.shadow200,
|
|
48
|
+
padding: '0.8rem 1.2rem',
|
|
49
|
+
fontSize: tokens.core.font.fontSize.s12,
|
|
50
|
+
labelFontSize: tokens.core.font.fontSize.s12,
|
|
51
|
+
valueFontFamily: tokens.core.font.fontFamily.regular,
|
|
52
|
+
markerSize: '0.8rem'
|
|
53
|
+
},
|
|
54
|
+
legend: {
|
|
55
|
+
textColor: tokens.semantic.color.text.secondary300,
|
|
56
|
+
fontFamily: { S: tokens.core.font.fontFamily.regular, M: tokens.core.font.fontFamily.regular },
|
|
57
|
+
fontSize: { S: tokens.core.font.fontSize.s12, M: tokens.core.font.fontSize.s12 },
|
|
58
|
+
gap: { S: '1.2rem', M: '1.6rem' },
|
|
59
|
+
dotSize: '0.8rem',
|
|
60
|
+
lineWidth: '1.2rem',
|
|
61
|
+
lineHeight: '0.2rem'
|
|
62
|
+
},
|
|
63
|
+
sparkline: {
|
|
64
|
+
strokeWidth: 1.5,
|
|
65
|
+
areaOpacity: { from: 0.4, to: 0.04 }
|
|
18
66
|
}
|
|
19
67
|
};
|
|
20
68
|
export default theme;
|
|
@@ -1,20 +1,71 @@
|
|
|
1
1
|
import { tokens } from '../../tokens';
|
|
2
2
|
const theme = {
|
|
3
3
|
categorical: [
|
|
4
|
-
tokens.semantic.color.icon.
|
|
5
|
-
tokens.semantic.color.icon.
|
|
6
|
-
tokens.semantic.color.icon.success400,
|
|
4
|
+
tokens.semantic.color.icon.informative300,
|
|
5
|
+
tokens.semantic.color.icon.success500,
|
|
7
6
|
tokens.semantic.color.icon.attention400,
|
|
8
|
-
tokens.semantic.color.icon.
|
|
7
|
+
tokens.semantic.color.icon.discovery300,
|
|
8
|
+
tokens.semantic.color.icon.primary300,
|
|
9
9
|
tokens.semantic.color.icon.secondary400,
|
|
10
10
|
tokens.semantic.color.icon.informative700,
|
|
11
|
-
tokens.semantic.color.icon.
|
|
11
|
+
tokens.semantic.color.icon.discovery500
|
|
12
12
|
],
|
|
13
13
|
grid: tokens.semantic.color.border.secondary700,
|
|
14
|
+
gridDashArray: '3 3',
|
|
14
15
|
axisLabel: tokens.semantic.color.text.secondary400,
|
|
15
16
|
threshold: {
|
|
16
17
|
warning: tokens.semantic.color.icon.attention400,
|
|
17
|
-
critical: tokens.semantic.color.icon.
|
|
18
|
+
critical: tokens.semantic.color.icon.primary400
|
|
19
|
+
},
|
|
20
|
+
axis: {
|
|
21
|
+
fontFamily: tokens.core.font.fontFamily.sourceCodeProRegular,
|
|
22
|
+
fontSize: { S: '0.95rem', M: '1.05rem' }
|
|
23
|
+
},
|
|
24
|
+
series: {
|
|
25
|
+
strokeWidth: { S: 2, M: 1.6 },
|
|
26
|
+
areaOpacity: { from: 0.45, to: 0.03 }
|
|
27
|
+
},
|
|
28
|
+
cursor: {
|
|
29
|
+
color: tokens.semantic.color.border.secondary500,
|
|
30
|
+
width: 1
|
|
31
|
+
},
|
|
32
|
+
activeDot: {
|
|
33
|
+
size: 9,
|
|
34
|
+
ringColor: tokens.semantic.color.background.secondary950,
|
|
35
|
+
ringWidth: 2
|
|
36
|
+
},
|
|
37
|
+
referenceLine: {
|
|
38
|
+
color: tokens.semantic.color.border.secondary400,
|
|
39
|
+
dashArray: '4 4'
|
|
40
|
+
},
|
|
41
|
+
tooltip: {
|
|
42
|
+
bgColor: tokens.semantic.color.background.secondary950,
|
|
43
|
+
textColor: tokens.semantic.color.text.secondary200,
|
|
44
|
+
labelColor: tokens.semantic.color.text.secondary300,
|
|
45
|
+
borderColor: tokens.semantic.color.border.secondary800,
|
|
46
|
+
borderRadius: '0.5rem',
|
|
47
|
+
shadow: '0 4px 14px rgba(0, 0, 0, 0.28)',
|
|
48
|
+
padding: '0.7rem 1rem',
|
|
49
|
+
fontSize: '1.1rem',
|
|
50
|
+
labelFontSize: '0.95rem',
|
|
51
|
+
valueFontFamily: tokens.core.font.fontFamily.sourceCodeProRegular,
|
|
52
|
+
markerSize: '0.8rem'
|
|
53
|
+
},
|
|
54
|
+
legend: {
|
|
55
|
+
textColor: tokens.semantic.color.text.secondary300,
|
|
56
|
+
fontFamily: {
|
|
57
|
+
S: tokens.core.font.fontFamily.sourceCodeProRegular,
|
|
58
|
+
M: tokens.core.font.fontFamily.regular
|
|
59
|
+
},
|
|
60
|
+
fontSize: { S: tokens.core.font.fontSize.s10, M: '1.25rem' },
|
|
61
|
+
gap: { S: '1rem', M: '1.6rem' },
|
|
62
|
+
dotSize: '0.9rem',
|
|
63
|
+
lineWidth: '1.2rem',
|
|
64
|
+
lineHeight: '0.2rem'
|
|
65
|
+
},
|
|
66
|
+
sparkline: {
|
|
67
|
+
strokeWidth: 1.6,
|
|
68
|
+
areaOpacity: { from: 0.55, to: 0.04 }
|
|
18
69
|
}
|
|
19
70
|
};
|
|
20
71
|
export default theme;
|
|
@@ -11,10 +11,58 @@ const theme = {
|
|
|
11
11
|
tokens.semantic.color.icon.discovery700
|
|
12
12
|
],
|
|
13
13
|
grid: tokens.semantic.color.border.secondary200,
|
|
14
|
+
gridDashArray: '3',
|
|
14
15
|
axisLabel: tokens.semantic.color.text.secondary500,
|
|
15
16
|
threshold: {
|
|
16
17
|
warning: tokens.semantic.color.icon.attention400,
|
|
17
18
|
critical: tokens.semantic.color.icon.danger500
|
|
19
|
+
},
|
|
20
|
+
axis: {
|
|
21
|
+
fontFamily: tokens.core.font.fontFamily.regular,
|
|
22
|
+
fontSize: { S: tokens.core.font.fontSize.s10, M: tokens.core.font.fontSize.s12 }
|
|
23
|
+
},
|
|
24
|
+
series: {
|
|
25
|
+
strokeWidth: { S: 2, M: 2 },
|
|
26
|
+
areaOpacity: { from: 0.3, to: 0 }
|
|
27
|
+
},
|
|
28
|
+
cursor: {
|
|
29
|
+
color: tokens.semantic.color.border.secondary300,
|
|
30
|
+
width: 1
|
|
31
|
+
},
|
|
32
|
+
activeDot: {
|
|
33
|
+
size: 8,
|
|
34
|
+
ringColor: tokens.semantic.color.background.secondary0,
|
|
35
|
+
ringWidth: 2
|
|
36
|
+
},
|
|
37
|
+
referenceLine: {
|
|
38
|
+
color: tokens.semantic.color.border.secondary500,
|
|
39
|
+
dashArray: '4 4'
|
|
40
|
+
},
|
|
41
|
+
tooltip: {
|
|
42
|
+
bgColor: tokens.semantic.color.background.secondary0,
|
|
43
|
+
textColor: tokens.semantic.color.text.secondary950,
|
|
44
|
+
labelColor: tokens.semantic.color.text.secondary500,
|
|
45
|
+
borderColor: tokens.semantic.color.border.secondary200,
|
|
46
|
+
borderRadius: '0.4rem',
|
|
47
|
+
shadow: tokens.core.shadow.shadow200,
|
|
48
|
+
padding: '0.8rem 1.2rem',
|
|
49
|
+
fontSize: tokens.core.font.fontSize.s12,
|
|
50
|
+
labelFontSize: tokens.core.font.fontSize.s12,
|
|
51
|
+
valueFontFamily: tokens.core.font.fontFamily.regular,
|
|
52
|
+
markerSize: '0.8rem'
|
|
53
|
+
},
|
|
54
|
+
legend: {
|
|
55
|
+
textColor: tokens.semantic.color.text.secondary600,
|
|
56
|
+
fontFamily: { S: tokens.core.font.fontFamily.regular, M: tokens.core.font.fontFamily.regular },
|
|
57
|
+
fontSize: { S: tokens.core.font.fontSize.s12, M: tokens.core.font.fontSize.s12 },
|
|
58
|
+
gap: { S: '1.2rem', M: '1.6rem' },
|
|
59
|
+
dotSize: '0.8rem',
|
|
60
|
+
lineWidth: '1.2rem',
|
|
61
|
+
lineHeight: '0.2rem'
|
|
62
|
+
},
|
|
63
|
+
sparkline: {
|
|
64
|
+
strokeWidth: 1.5,
|
|
65
|
+
areaOpacity: { from: 0.4, to: 0.04 }
|
|
18
66
|
}
|
|
19
67
|
};
|
|
20
68
|
export default theme;
|
|
@@ -1,20 +1,71 @@
|
|
|
1
1
|
import { tokens } from '../../tokens';
|
|
2
2
|
const theme = {
|
|
3
3
|
categorical: [
|
|
4
|
-
tokens.semantic.color.icon.
|
|
4
|
+
tokens.semantic.color.icon.informative600,
|
|
5
|
+
tokens.semantic.color.icon.success600,
|
|
6
|
+
tokens.semantic.color.icon.attention600,
|
|
5
7
|
tokens.semantic.color.icon.discovery400,
|
|
6
|
-
tokens.semantic.color.icon.
|
|
7
|
-
tokens.semantic.color.icon.
|
|
8
|
-
tokens.semantic.color.icon.
|
|
9
|
-
tokens.semantic.color.icon.
|
|
10
|
-
tokens.semantic.color.icon.informative700,
|
|
11
|
-
tokens.semantic.color.icon.discovery700
|
|
8
|
+
tokens.semantic.color.icon.primary500,
|
|
9
|
+
tokens.semantic.color.icon.secondary500,
|
|
10
|
+
tokens.semantic.color.icon.informative800,
|
|
11
|
+
tokens.semantic.color.icon.discovery600
|
|
12
12
|
],
|
|
13
13
|
grid: tokens.semantic.color.border.secondary200,
|
|
14
|
+
gridDashArray: '3 3',
|
|
14
15
|
axisLabel: tokens.semantic.color.text.secondary500,
|
|
15
16
|
threshold: {
|
|
16
|
-
warning: tokens.semantic.color.icon.
|
|
17
|
-
critical: tokens.semantic.color.icon.
|
|
17
|
+
warning: tokens.semantic.color.icon.attention600,
|
|
18
|
+
critical: tokens.semantic.color.icon.primary500
|
|
19
|
+
},
|
|
20
|
+
axis: {
|
|
21
|
+
fontFamily: tokens.core.font.fontFamily.sourceCodeProRegular,
|
|
22
|
+
fontSize: { S: '0.95rem', M: '1.05rem' }
|
|
23
|
+
},
|
|
24
|
+
series: {
|
|
25
|
+
strokeWidth: { S: 2, M: 1.6 },
|
|
26
|
+
areaOpacity: { from: 0.3, to: 0.02 }
|
|
27
|
+
},
|
|
28
|
+
cursor: {
|
|
29
|
+
color: tokens.semantic.color.border.secondary300,
|
|
30
|
+
width: 1
|
|
31
|
+
},
|
|
32
|
+
activeDot: {
|
|
33
|
+
size: 9,
|
|
34
|
+
ringColor: tokens.semantic.color.background.secondary0,
|
|
35
|
+
ringWidth: 2
|
|
36
|
+
},
|
|
37
|
+
referenceLine: {
|
|
38
|
+
color: tokens.semantic.color.border.secondary500,
|
|
39
|
+
dashArray: '4 4'
|
|
40
|
+
},
|
|
41
|
+
tooltip: {
|
|
42
|
+
bgColor: tokens.semantic.color.background.secondary0,
|
|
43
|
+
textColor: tokens.semantic.color.text.secondary950,
|
|
44
|
+
labelColor: tokens.semantic.color.text.secondary500,
|
|
45
|
+
borderColor: tokens.semantic.color.border.secondary200,
|
|
46
|
+
borderRadius: '0.5rem',
|
|
47
|
+
shadow: tokens.core.shadow.shadow200,
|
|
48
|
+
padding: '0.7rem 1rem',
|
|
49
|
+
fontSize: '1.1rem',
|
|
50
|
+
labelFontSize: '0.95rem',
|
|
51
|
+
valueFontFamily: tokens.core.font.fontFamily.sourceCodeProRegular,
|
|
52
|
+
markerSize: '0.8rem'
|
|
53
|
+
},
|
|
54
|
+
legend: {
|
|
55
|
+
textColor: tokens.semantic.color.text.secondary500,
|
|
56
|
+
fontFamily: {
|
|
57
|
+
S: tokens.core.font.fontFamily.sourceCodeProRegular,
|
|
58
|
+
M: tokens.core.font.fontFamily.regular
|
|
59
|
+
},
|
|
60
|
+
fontSize: { S: tokens.core.font.fontSize.s10, M: '1.25rem' },
|
|
61
|
+
gap: { S: '1rem', M: '1.6rem' },
|
|
62
|
+
dotSize: '0.9rem',
|
|
63
|
+
lineWidth: '1.2rem',
|
|
64
|
+
lineHeight: '0.2rem'
|
|
65
|
+
},
|
|
66
|
+
sparkline: {
|
|
67
|
+
strokeWidth: 1.6,
|
|
68
|
+
areaOpacity: { from: 0.35, to: 0.04 }
|
|
18
69
|
}
|
|
19
70
|
};
|
|
20
71
|
export default theme;
|
|
@@ -1,10 +1,65 @@
|
|
|
1
|
+
export type ChartSize = 'S' | 'M';
|
|
1
2
|
export interface ChartsTheme {
|
|
2
3
|
/** Ordered series colors for categorical charts */
|
|
3
4
|
categorical: string[];
|
|
4
5
|
grid: string;
|
|
6
|
+
gridDashArray: string;
|
|
5
7
|
axisLabel: string;
|
|
6
8
|
threshold: {
|
|
7
9
|
warning: string;
|
|
8
10
|
critical: string;
|
|
9
11
|
};
|
|
12
|
+
axis: {
|
|
13
|
+
fontFamily: string;
|
|
14
|
+
fontSize: Record<ChartSize, string>;
|
|
15
|
+
};
|
|
16
|
+
series: {
|
|
17
|
+
strokeWidth: Record<ChartSize, number>;
|
|
18
|
+
areaOpacity: {
|
|
19
|
+
from: number;
|
|
20
|
+
to: number;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
cursor: {
|
|
24
|
+
color: string;
|
|
25
|
+
width: number;
|
|
26
|
+
};
|
|
27
|
+
activeDot: {
|
|
28
|
+
size: number;
|
|
29
|
+
ringColor: string;
|
|
30
|
+
ringWidth: number;
|
|
31
|
+
};
|
|
32
|
+
referenceLine: {
|
|
33
|
+
color: string;
|
|
34
|
+
dashArray: string;
|
|
35
|
+
};
|
|
36
|
+
tooltip: {
|
|
37
|
+
bgColor: string;
|
|
38
|
+
textColor: string;
|
|
39
|
+
labelColor: string;
|
|
40
|
+
borderColor: string;
|
|
41
|
+
borderRadius: string;
|
|
42
|
+
shadow: string;
|
|
43
|
+
padding: string;
|
|
44
|
+
fontSize: string;
|
|
45
|
+
labelFontSize: string;
|
|
46
|
+
valueFontFamily: string;
|
|
47
|
+
markerSize: string;
|
|
48
|
+
};
|
|
49
|
+
legend: {
|
|
50
|
+
textColor: string;
|
|
51
|
+
fontFamily: Record<ChartSize, string>;
|
|
52
|
+
fontSize: Record<ChartSize, string>;
|
|
53
|
+
gap: Record<ChartSize, string>;
|
|
54
|
+
dotSize: string;
|
|
55
|
+
lineWidth: string;
|
|
56
|
+
lineHeight: string;
|
|
57
|
+
};
|
|
58
|
+
sparkline: {
|
|
59
|
+
strokeWidth: number;
|
|
60
|
+
areaOpacity: {
|
|
61
|
+
from: number;
|
|
62
|
+
to: number;
|
|
63
|
+
};
|
|
64
|
+
};
|
|
10
65
|
}
|