mirror of
https://github.com/apache/superset.git
synced 2026-04-18 23:55:00 +00:00
feat: completely migrate from DeprecatedThemeColors to Antd semantic tokens (#34732)
Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
committed by
GitHub
parent
31e2143c84
commit
1f482b42eb
@@ -169,7 +169,7 @@ export default function PopKPI(props: PopKPIProps) {
|
||||
|
||||
const getArrowIndicatorColor = () => {
|
||||
if (!comparisonColorEnabled || percentDifferenceNumber === 0) {
|
||||
return theme.colors.grayscale.base;
|
||||
return theme.colorTextTertiary;
|
||||
}
|
||||
|
||||
if (percentDifferenceNumber > 0) {
|
||||
@@ -190,7 +190,7 @@ export default function PopKPI(props: PopKPIProps) {
|
||||
`;
|
||||
|
||||
const defaultBackgroundColor = theme.colorBgContainer;
|
||||
const defaultTextColor = theme.colors.grayscale.base;
|
||||
const defaultTextColor = theme.colorTextTertiary;
|
||||
const { backgroundColor, textColor } = useMemo(() => {
|
||||
let bgColor = defaultBackgroundColor;
|
||||
let txtColor = defaultTextColor;
|
||||
|
||||
@@ -25,6 +25,7 @@ import {
|
||||
getXAxisLabel,
|
||||
Metric,
|
||||
getValueFormatter,
|
||||
supersetTheme,
|
||||
t,
|
||||
tooltipHtml,
|
||||
} from '@superset-ui/core';
|
||||
@@ -78,7 +79,6 @@ export default function transformProps(
|
||||
queriesData,
|
||||
formData,
|
||||
rawFormData,
|
||||
theme,
|
||||
hooks,
|
||||
inContextMenu,
|
||||
datasource: { currencyFormats = {}, columnFormats = {} },
|
||||
@@ -281,7 +281,7 @@ export default function transformProps(
|
||||
},
|
||||
{
|
||||
offset: 1,
|
||||
color: theme.colors.grayscale.light5,
|
||||
color: supersetTheme.colorBgContainer,
|
||||
},
|
||||
]),
|
||||
},
|
||||
|
||||
@@ -176,9 +176,9 @@ export default function transformProps(
|
||||
},
|
||||
emphasis: {
|
||||
itemStyle: {
|
||||
borderColor: supersetTheme.colors.grayscale.light5,
|
||||
borderColor: supersetTheme.colorBgContainer,
|
||||
shadowBlur: 10,
|
||||
shadowColor: supersetTheme.colors.grayscale.dark2,
|
||||
shadowColor: supersetTheme.colorTextBase,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
@@ -424,7 +424,7 @@ export function transformIntervalAnnotation(
|
||||
const intervalLabel: SeriesLabelOption = showLabel
|
||||
? {
|
||||
show: true,
|
||||
color: theme.colors.grayscale.dark2,
|
||||
color: theme.colorTextLabel,
|
||||
position: 'insideTop',
|
||||
verticalAlign: 'top',
|
||||
fontWeight: 'bold',
|
||||
@@ -432,19 +432,19 @@ export function transformIntervalAnnotation(
|
||||
emphasis: {
|
||||
position: 'insideTop',
|
||||
verticalAlign: 'top',
|
||||
backgroundColor: theme.colors.grayscale.light5,
|
||||
backgroundColor: theme.colorPrimaryBgHover,
|
||||
},
|
||||
}
|
||||
: {
|
||||
show: false,
|
||||
color: theme.colors.grayscale.dark2,
|
||||
color: theme.colorTextLabel,
|
||||
// @ts-ignore
|
||||
emphasis: {
|
||||
fontWeight: 'bold',
|
||||
show: true,
|
||||
position: 'insideTop',
|
||||
verticalAlign: 'top',
|
||||
backgroundColor: theme.colors.grayscale.light5,
|
||||
backgroundColor: theme.colorPrimaryBgHover,
|
||||
},
|
||||
};
|
||||
series.push({
|
||||
@@ -505,25 +505,25 @@ export function transformEventAnnotation(
|
||||
const eventLabel: SeriesLineLabelOption = showLabel
|
||||
? {
|
||||
show: true,
|
||||
color: theme.colors.grayscale.dark2,
|
||||
color: theme.colorTextLabel,
|
||||
position: 'insideEndTop',
|
||||
fontWeight: 'bold',
|
||||
formatter: (params: CallbackDataParams) => params.name,
|
||||
// @ts-ignore
|
||||
emphasis: {
|
||||
backgroundColor: theme.colors.grayscale.light5,
|
||||
backgroundColor: theme.colorPrimaryBgHover,
|
||||
},
|
||||
}
|
||||
: {
|
||||
show: false,
|
||||
color: theme.colors.grayscale.dark2,
|
||||
color: theme.colorTextLabel,
|
||||
position: 'insideEndTop',
|
||||
// @ts-ignore
|
||||
emphasis: {
|
||||
formatter: (params: CallbackDataParams) => params.name,
|
||||
fontWeight: 'bold',
|
||||
show: true,
|
||||
backgroundColor: theme.colors.grayscale.light5,
|
||||
backgroundColor: theme.colorPrimaryBgHover,
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user